25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

79487 satır
2.6MB

  1. /*! pdfmake v0.2.4, @license MIT, @link http://pdfmake.org */
  2. (function webpackUniversalModuleDefinition(root, factory) {
  3. if(typeof exports === 'object' && typeof module === 'object')
  4. module.exports = factory();
  5. else if(typeof define === 'function' && define.amd)
  6. define([], factory);
  7. else {
  8. var a = factory();
  9. for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
  10. }
  11. })(typeof self !== 'undefined' ? self : this, function() {
  12. return /******/ (function() { // webpackBootstrap
  13. /******/ var __webpack_modules__ = ({
  14. /***/ 9282:
  15. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  16. "use strict";
  17. /* provided dependency */ var process = __webpack_require__(4155);
  18. // Currently in sync with Node.js lib/assert.js
  19. // https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b
  20. // Originally from narwhal.js (http://narwhaljs.org)
  21. // Copyright (c) 2009 Thomas Robinson <280north.com>
  22. //
  23. // Permission is hereby granted, free of charge, to any person obtaining a copy
  24. // of this software and associated documentation files (the 'Software'), to
  25. // deal in the Software without restriction, including without limitation the
  26. // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
  27. // sell copies of the Software, and to permit persons to whom the Software is
  28. // furnished to do so, subject to the following conditions:
  29. //
  30. // The above copyright notice and this permission notice shall be included in
  31. // all copies or substantial portions of the Software.
  32. //
  33. // THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  34. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  35. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  36. // AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
  37. // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
  38. // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  39. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  40. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  41. var _require = __webpack_require__(2136),
  42. _require$codes = _require.codes,
  43. ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,
  44. ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
  45. ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,
  46. ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,
  47. ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;
  48. var AssertionError = __webpack_require__(5961);
  49. var _require2 = __webpack_require__(9539),
  50. inspect = _require2.inspect;
  51. var _require$types = (__webpack_require__(9539).types),
  52. isPromise = _require$types.isPromise,
  53. isRegExp = _require$types.isRegExp;
  54. var objectAssign = Object.assign ? Object.assign : (__webpack_require__(8091).assign);
  55. var objectIs = Object.is ? Object.is : __webpack_require__(609);
  56. var errorCache = new Map();
  57. var isDeepEqual;
  58. var isDeepStrictEqual;
  59. var parseExpressionAt;
  60. var findNodeAround;
  61. var decoder;
  62. function lazyLoadComparison() {
  63. var comparison = __webpack_require__(9158);
  64. isDeepEqual = comparison.isDeepEqual;
  65. isDeepStrictEqual = comparison.isDeepStrictEqual;
  66. } // Escape control characters but not \n and \t to keep the line breaks and
  67. // indentation intact.
  68. // eslint-disable-next-line no-control-regex
  69. var escapeSequencesRegExp = /[\x00-\x08\x0b\x0c\x0e-\x1f]/g;
  70. var meta = (/* unused pure expression or super */ null && (["\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", '\\b', '', '', "\\u000b", '\\f', '', "\\u000e", "\\u000f", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001a", "\\u001b", "\\u001c", "\\u001d", "\\u001e", "\\u001f"]));
  71. var escapeFn = function escapeFn(str) {
  72. return meta[str.charCodeAt(0)];
  73. };
  74. var warned = false; // The assert module provides functions that throw
  75. // AssertionError's when particular conditions are not met. The
  76. // assert module must conform to the following interface.
  77. var assert = module.exports = ok;
  78. var NO_EXCEPTION_SENTINEL = {}; // All of the following functions must throw an AssertionError
  79. // when a corresponding condition is not met, with a message that
  80. // may be undefined if not provided. All assertion methods provide
  81. // both the actual and expected values to the assertion error for
  82. // display purposes.
  83. function innerFail(obj) {
  84. if (obj.message instanceof Error) throw obj.message;
  85. throw new AssertionError(obj);
  86. }
  87. function fail(actual, expected, message, operator, stackStartFn) {
  88. var argsLen = arguments.length;
  89. var internalMessage;
  90. if (argsLen === 0) {
  91. internalMessage = 'Failed';
  92. } else if (argsLen === 1) {
  93. message = actual;
  94. actual = undefined;
  95. } else {
  96. if (warned === false) {
  97. warned = true;
  98. var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);
  99. warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');
  100. }
  101. if (argsLen === 2) operator = '!=';
  102. }
  103. if (message instanceof Error) throw message;
  104. var errArgs = {
  105. actual: actual,
  106. expected: expected,
  107. operator: operator === undefined ? 'fail' : operator,
  108. stackStartFn: stackStartFn || fail
  109. };
  110. if (message !== undefined) {
  111. errArgs.message = message;
  112. }
  113. var err = new AssertionError(errArgs);
  114. if (internalMessage) {
  115. err.message = internalMessage;
  116. err.generatedMessage = true;
  117. }
  118. throw err;
  119. }
  120. assert.fail = fail; // The AssertionError is defined in internal/error.
  121. assert.AssertionError = AssertionError;
  122. function innerOk(fn, argLen, value, message) {
  123. if (!value) {
  124. var generatedMessage = false;
  125. if (argLen === 0) {
  126. generatedMessage = true;
  127. message = 'No value argument passed to `assert.ok()`';
  128. } else if (message instanceof Error) {
  129. throw message;
  130. }
  131. var err = new AssertionError({
  132. actual: value,
  133. expected: true,
  134. message: message,
  135. operator: '==',
  136. stackStartFn: fn
  137. });
  138. err.generatedMessage = generatedMessage;
  139. throw err;
  140. }
  141. } // Pure assertion tests whether a value is truthy, as determined
  142. // by !!value.
  143. function ok() {
  144. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  145. args[_key] = arguments[_key];
  146. }
  147. innerOk.apply(void 0, [ok, args.length].concat(args));
  148. }
  149. assert.ok = ok; // The equality assertion tests shallow, coercive equality with ==.
  150. /* eslint-disable no-restricted-properties */
  151. assert.equal = function equal(actual, expected, message) {
  152. if (arguments.length < 2) {
  153. throw new ERR_MISSING_ARGS('actual', 'expected');
  154. } // eslint-disable-next-line eqeqeq
  155. if (actual != expected) {
  156. innerFail({
  157. actual: actual,
  158. expected: expected,
  159. message: message,
  160. operator: '==',
  161. stackStartFn: equal
  162. });
  163. }
  164. }; // The non-equality assertion tests for whether two objects are not
  165. // equal with !=.
  166. assert.notEqual = function notEqual(actual, expected, message) {
  167. if (arguments.length < 2) {
  168. throw new ERR_MISSING_ARGS('actual', 'expected');
  169. } // eslint-disable-next-line eqeqeq
  170. if (actual == expected) {
  171. innerFail({
  172. actual: actual,
  173. expected: expected,
  174. message: message,
  175. operator: '!=',
  176. stackStartFn: notEqual
  177. });
  178. }
  179. }; // The equivalence assertion tests a deep equality relation.
  180. assert.deepEqual = function deepEqual(actual, expected, message) {
  181. if (arguments.length < 2) {
  182. throw new ERR_MISSING_ARGS('actual', 'expected');
  183. }
  184. if (isDeepEqual === undefined) lazyLoadComparison();
  185. if (!isDeepEqual(actual, expected)) {
  186. innerFail({
  187. actual: actual,
  188. expected: expected,
  189. message: message,
  190. operator: 'deepEqual',
  191. stackStartFn: deepEqual
  192. });
  193. }
  194. }; // The non-equivalence assertion tests for any deep inequality.
  195. assert.notDeepEqual = function notDeepEqual(actual, expected, message) {
  196. if (arguments.length < 2) {
  197. throw new ERR_MISSING_ARGS('actual', 'expected');
  198. }
  199. if (isDeepEqual === undefined) lazyLoadComparison();
  200. if (isDeepEqual(actual, expected)) {
  201. innerFail({
  202. actual: actual,
  203. expected: expected,
  204. message: message,
  205. operator: 'notDeepEqual',
  206. stackStartFn: notDeepEqual
  207. });
  208. }
  209. };
  210. /* eslint-enable */
  211. assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {
  212. if (arguments.length < 2) {
  213. throw new ERR_MISSING_ARGS('actual', 'expected');
  214. }
  215. if (isDeepEqual === undefined) lazyLoadComparison();
  216. if (!isDeepStrictEqual(actual, expected)) {
  217. innerFail({
  218. actual: actual,
  219. expected: expected,
  220. message: message,
  221. operator: 'deepStrictEqual',
  222. stackStartFn: deepStrictEqual
  223. });
  224. }
  225. };
  226. assert.notDeepStrictEqual = notDeepStrictEqual;
  227. function notDeepStrictEqual(actual, expected, message) {
  228. if (arguments.length < 2) {
  229. throw new ERR_MISSING_ARGS('actual', 'expected');
  230. }
  231. if (isDeepEqual === undefined) lazyLoadComparison();
  232. if (isDeepStrictEqual(actual, expected)) {
  233. innerFail({
  234. actual: actual,
  235. expected: expected,
  236. message: message,
  237. operator: 'notDeepStrictEqual',
  238. stackStartFn: notDeepStrictEqual
  239. });
  240. }
  241. }
  242. assert.strictEqual = function strictEqual(actual, expected, message) {
  243. if (arguments.length < 2) {
  244. throw new ERR_MISSING_ARGS('actual', 'expected');
  245. }
  246. if (!objectIs(actual, expected)) {
  247. innerFail({
  248. actual: actual,
  249. expected: expected,
  250. message: message,
  251. operator: 'strictEqual',
  252. stackStartFn: strictEqual
  253. });
  254. }
  255. };
  256. assert.notStrictEqual = function notStrictEqual(actual, expected, message) {
  257. if (arguments.length < 2) {
  258. throw new ERR_MISSING_ARGS('actual', 'expected');
  259. }
  260. if (objectIs(actual, expected)) {
  261. innerFail({
  262. actual: actual,
  263. expected: expected,
  264. message: message,
  265. operator: 'notStrictEqual',
  266. stackStartFn: notStrictEqual
  267. });
  268. }
  269. };
  270. var Comparison = function Comparison(obj, keys, actual) {
  271. var _this = this;
  272. _classCallCheck(this, Comparison);
  273. keys.forEach(function (key) {
  274. if (key in obj) {
  275. if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && obj[key].test(actual[key])) {
  276. _this[key] = actual[key];
  277. } else {
  278. _this[key] = obj[key];
  279. }
  280. }
  281. });
  282. };
  283. function compareExceptionKey(actual, expected, key, message, keys, fn) {
  284. if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {
  285. if (!message) {
  286. // Create placeholder objects to create a nice output.
  287. var a = new Comparison(actual, keys);
  288. var b = new Comparison(expected, keys, actual);
  289. var err = new AssertionError({
  290. actual: a,
  291. expected: b,
  292. operator: 'deepStrictEqual',
  293. stackStartFn: fn
  294. });
  295. err.actual = actual;
  296. err.expected = expected;
  297. err.operator = fn.name;
  298. throw err;
  299. }
  300. innerFail({
  301. actual: actual,
  302. expected: expected,
  303. message: message,
  304. operator: fn.name,
  305. stackStartFn: fn
  306. });
  307. }
  308. }
  309. function expectedException(actual, expected, msg, fn) {
  310. if (typeof expected !== 'function') {
  311. if (isRegExp(expected)) return expected.test(actual); // assert.doesNotThrow does not accept objects.
  312. if (arguments.length === 2) {
  313. throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);
  314. } // Handle primitives properly.
  315. if (_typeof(actual) !== 'object' || actual === null) {
  316. var err = new AssertionError({
  317. actual: actual,
  318. expected: expected,
  319. message: msg,
  320. operator: 'deepStrictEqual',
  321. stackStartFn: fn
  322. });
  323. err.operator = fn.name;
  324. throw err;
  325. }
  326. var keys = Object.keys(expected); // Special handle errors to make sure the name and the message are compared
  327. // as well.
  328. if (expected instanceof Error) {
  329. keys.push('name', 'message');
  330. } else if (keys.length === 0) {
  331. throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');
  332. }
  333. if (isDeepEqual === undefined) lazyLoadComparison();
  334. keys.forEach(function (key) {
  335. if (typeof actual[key] === 'string' && isRegExp(expected[key]) && expected[key].test(actual[key])) {
  336. return;
  337. }
  338. compareExceptionKey(actual, expected, key, msg, keys, fn);
  339. });
  340. return true;
  341. } // Guard instanceof against arrow functions as they don't have a prototype.
  342. if (expected.prototype !== undefined && actual instanceof expected) {
  343. return true;
  344. }
  345. if (Error.isPrototypeOf(expected)) {
  346. return false;
  347. }
  348. return expected.call({}, actual) === true;
  349. }
  350. function getActual(fn) {
  351. if (typeof fn !== 'function') {
  352. throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);
  353. }
  354. try {
  355. fn();
  356. } catch (e) {
  357. return e;
  358. }
  359. return NO_EXCEPTION_SENTINEL;
  360. }
  361. function checkIsPromise(obj) {
  362. // Accept native ES6 promises and promises that are implemented in a similar
  363. // way. Do not accept thenables that use a function as `obj` and that have no
  364. // `catch` handler.
  365. // TODO: thenables are checked up until they have the correct methods,
  366. // but according to documentation, the `then` method should receive
  367. // the `fulfill` and `reject` arguments as well or it may be never resolved.
  368. return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';
  369. }
  370. function waitForActual(promiseFn) {
  371. return Promise.resolve().then(function () {
  372. var resultPromise;
  373. if (typeof promiseFn === 'function') {
  374. // Return a rejected promise if `promiseFn` throws synchronously.
  375. resultPromise = promiseFn(); // Fail in case no promise is returned.
  376. if (!checkIsPromise(resultPromise)) {
  377. throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);
  378. }
  379. } else if (checkIsPromise(promiseFn)) {
  380. resultPromise = promiseFn;
  381. } else {
  382. throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);
  383. }
  384. return Promise.resolve().then(function () {
  385. return resultPromise;
  386. }).then(function () {
  387. return NO_EXCEPTION_SENTINEL;
  388. }).catch(function (e) {
  389. return e;
  390. });
  391. });
  392. }
  393. function expectsError(stackStartFn, actual, error, message) {
  394. if (typeof error === 'string') {
  395. if (arguments.length === 4) {
  396. throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);
  397. }
  398. if (_typeof(actual) === 'object' && actual !== null) {
  399. if (actual.message === error) {
  400. throw new ERR_AMBIGUOUS_ARGUMENT('error/message', "The error message \"".concat(actual.message, "\" is identical to the message."));
  401. }
  402. } else if (actual === error) {
  403. throw new ERR_AMBIGUOUS_ARGUMENT('error/message', "The error \"".concat(actual, "\" is identical to the message."));
  404. }
  405. message = error;
  406. error = undefined;
  407. } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {
  408. throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);
  409. }
  410. if (actual === NO_EXCEPTION_SENTINEL) {
  411. var details = '';
  412. if (error && error.name) {
  413. details += " (".concat(error.name, ")");
  414. }
  415. details += message ? ": ".concat(message) : '.';
  416. var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';
  417. innerFail({
  418. actual: undefined,
  419. expected: error,
  420. operator: stackStartFn.name,
  421. message: "Missing expected ".concat(fnType).concat(details),
  422. stackStartFn: stackStartFn
  423. });
  424. }
  425. if (error && !expectedException(actual, error, message, stackStartFn)) {
  426. throw actual;
  427. }
  428. }
  429. function expectsNoError(stackStartFn, actual, error, message) {
  430. if (actual === NO_EXCEPTION_SENTINEL) return;
  431. if (typeof error === 'string') {
  432. message = error;
  433. error = undefined;
  434. }
  435. if (!error || expectedException(actual, error)) {
  436. var details = message ? ": ".concat(message) : '.';
  437. var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';
  438. innerFail({
  439. actual: actual,
  440. expected: error,
  441. operator: stackStartFn.name,
  442. message: "Got unwanted ".concat(fnType).concat(details, "\n") + "Actual message: \"".concat(actual && actual.message, "\""),
  443. stackStartFn: stackStartFn
  444. });
  445. }
  446. throw actual;
  447. }
  448. assert.throws = function throws(promiseFn) {
  449. for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
  450. args[_key2 - 1] = arguments[_key2];
  451. }
  452. expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));
  453. };
  454. assert.rejects = function rejects(promiseFn) {
  455. for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
  456. args[_key3 - 1] = arguments[_key3];
  457. }
  458. return waitForActual(promiseFn).then(function (result) {
  459. return expectsError.apply(void 0, [rejects, result].concat(args));
  460. });
  461. };
  462. assert.doesNotThrow = function doesNotThrow(fn) {
  463. for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
  464. args[_key4 - 1] = arguments[_key4];
  465. }
  466. expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));
  467. };
  468. assert.doesNotReject = function doesNotReject(fn) {
  469. for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
  470. args[_key5 - 1] = arguments[_key5];
  471. }
  472. return waitForActual(fn).then(function (result) {
  473. return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));
  474. });
  475. };
  476. assert.ifError = function ifError(err) {
  477. if (err !== null && err !== undefined) {
  478. var message = 'ifError got unwanted exception: ';
  479. if (_typeof(err) === 'object' && typeof err.message === 'string') {
  480. if (err.message.length === 0 && err.constructor) {
  481. message += err.constructor.name;
  482. } else {
  483. message += err.message;
  484. }
  485. } else {
  486. message += inspect(err);
  487. }
  488. var newErr = new AssertionError({
  489. actual: err,
  490. expected: null,
  491. operator: 'ifError',
  492. message: message,
  493. stackStartFn: ifError
  494. }); // Make sure we actually have a stack trace!
  495. var origStack = err.stack;
  496. if (typeof origStack === 'string') {
  497. // This will remove any duplicated frames from the error frames taken
  498. // from within `ifError` and add the original error frames to the newly
  499. // created ones.
  500. var tmp2 = origStack.split('\n');
  501. tmp2.shift(); // Filter all frames existing in err.stack.
  502. var tmp1 = newErr.stack.split('\n');
  503. for (var i = 0; i < tmp2.length; i++) {
  504. // Find the first occurrence of the frame.
  505. var pos = tmp1.indexOf(tmp2[i]);
  506. if (pos !== -1) {
  507. // Only keep new frames.
  508. tmp1 = tmp1.slice(0, pos);
  509. break;
  510. }
  511. }
  512. newErr.stack = "".concat(tmp1.join('\n'), "\n").concat(tmp2.join('\n'));
  513. }
  514. throw newErr;
  515. }
  516. }; // Expose a strict only variant of assert
  517. function strict() {
  518. for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
  519. args[_key6] = arguments[_key6];
  520. }
  521. innerOk.apply(void 0, [strict, args.length].concat(args));
  522. }
  523. assert.strict = objectAssign(strict, assert, {
  524. equal: assert.strictEqual,
  525. deepEqual: assert.deepStrictEqual,
  526. notEqual: assert.notStrictEqual,
  527. notDeepEqual: assert.notDeepStrictEqual
  528. });
  529. assert.strict.strict = assert.strict;
  530. /***/ }),
  531. /***/ 5961:
  532. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  533. "use strict";
  534. /* provided dependency */ var process = __webpack_require__(4155);
  535. // Currently in sync with Node.js lib/internal/assert/assertion_error.js
  536. // https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c
  537. function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
  538. 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; }
  539. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  540. 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); } }
  541. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  542. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  543. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  544. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  545. function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
  546. 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; } }
  547. function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }
  548. function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; }
  549. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  550. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  551. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  552. var _require = __webpack_require__(9539),
  553. inspect = _require.inspect;
  554. var _require2 = __webpack_require__(2136),
  555. ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
  556. function endsWith(str, search, this_len) {
  557. if (this_len === undefined || this_len > str.length) {
  558. this_len = str.length;
  559. }
  560. return str.substring(this_len - search.length, this_len) === search;
  561. } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
  562. function repeat(str, count) {
  563. count = Math.floor(count);
  564. if (str.length == 0 || count == 0) return '';
  565. var maxCount = str.length * count;
  566. count = Math.floor(Math.log(count) / Math.log(2));
  567. while (count) {
  568. str += str;
  569. count--;
  570. }
  571. str += str.substring(0, maxCount - str.length);
  572. return str;
  573. }
  574. var blue = '';
  575. var green = '';
  576. var red = '';
  577. var white = '';
  578. var kReadableOperator = {
  579. deepStrictEqual: 'Expected values to be strictly deep-equal:',
  580. strictEqual: 'Expected values to be strictly equal:',
  581. strictEqualObject: 'Expected "actual" to be reference-equal to "expected":',
  582. deepEqual: 'Expected values to be loosely deep-equal:',
  583. equal: 'Expected values to be loosely equal:',
  584. notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:',
  585. notStrictEqual: 'Expected "actual" to be strictly unequal to:',
  586. notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":',
  587. notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:',
  588. notEqual: 'Expected "actual" to be loosely unequal to:',
  589. notIdentical: 'Values identical but not reference-equal:'
  590. }; // Comparing short primitives should just show === / !== instead of using the
  591. // diff.
  592. var kMaxShortLength = 10;
  593. function copyError(source) {
  594. var keys = Object.keys(source);
  595. var target = Object.create(Object.getPrototypeOf(source));
  596. keys.forEach(function (key) {
  597. target[key] = source[key];
  598. });
  599. Object.defineProperty(target, 'message', {
  600. value: source.message
  601. });
  602. return target;
  603. }
  604. function inspectValue(val) {
  605. // The util.inspect default values could be changed. This makes sure the
  606. // error messages contain the necessary information nevertheless.
  607. return inspect(val, {
  608. compact: false,
  609. customInspect: false,
  610. depth: 1000,
  611. maxArrayLength: Infinity,
  612. // Assert compares only enumerable properties (with a few exceptions).
  613. showHidden: false,
  614. // Having a long line as error is better than wrapping the line for
  615. // comparison for now.
  616. // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we
  617. // have meta information about the inspected properties (i.e., know where
  618. // in what line the property starts and ends).
  619. breakLength: Infinity,
  620. // Assert does not detect proxies currently.
  621. showProxy: false,
  622. sorted: true,
  623. // Inspect getters as we also check them when comparing entries.
  624. getters: true
  625. });
  626. }
  627. function createErrDiff(actual, expected, operator) {
  628. var other = '';
  629. var res = '';
  630. var lastPos = 0;
  631. var end = '';
  632. var skipped = false;
  633. var actualInspected = inspectValue(actual);
  634. var actualLines = actualInspected.split('\n');
  635. var expectedLines = inspectValue(expected).split('\n');
  636. var i = 0;
  637. var indicator = ''; // In case both values are objects explicitly mark them as not reference equal
  638. // for the `strictEqual` operator.
  639. if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {
  640. operator = 'strictEqualObject';
  641. } // If "actual" and "expected" fit on a single line and they are not strictly
  642. // equal, check further special handling.
  643. if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {
  644. var inputLength = actualLines[0].length + expectedLines[0].length; // If the character length of "actual" and "expected" together is less than
  645. // kMaxShortLength and if neither is an object and at least one of them is
  646. // not `zero`, use the strict equal comparison to visualize the output.
  647. if (inputLength <= kMaxShortLength) {
  648. if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {
  649. // -0 === +0
  650. return "".concat(kReadableOperator[operator], "\n\n") + "".concat(actualLines[0], " !== ").concat(expectedLines[0], "\n");
  651. }
  652. } else if (operator !== 'strictEqualObject') {
  653. // If the stderr is a tty and the input length is lower than the current
  654. // columns per line, add a mismatch indicator below the output. If it is
  655. // not a tty, use a default value of 80 characters.
  656. var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;
  657. if (inputLength < maxLength) {
  658. while (actualLines[0][i] === expectedLines[0][i]) {
  659. i++;
  660. } // Ignore the first characters.
  661. if (i > 2) {
  662. // Add position indicator for the first mismatch in case it is a
  663. // single line and the input length is less than the column length.
  664. indicator = "\n ".concat(repeat(' ', i), "^");
  665. i = 0;
  666. }
  667. }
  668. }
  669. } // Remove all ending lines that match (this optimizes the output for
  670. // readability by reducing the number of total changed lines).
  671. var a = actualLines[actualLines.length - 1];
  672. var b = expectedLines[expectedLines.length - 1];
  673. while (a === b) {
  674. if (i++ < 2) {
  675. end = "\n ".concat(a).concat(end);
  676. } else {
  677. other = a;
  678. }
  679. actualLines.pop();
  680. expectedLines.pop();
  681. if (actualLines.length === 0 || expectedLines.length === 0) break;
  682. a = actualLines[actualLines.length - 1];
  683. b = expectedLines[expectedLines.length - 1];
  684. }
  685. var maxLines = Math.max(actualLines.length, expectedLines.length); // Strict equal with identical objects that are not identical by reference.
  686. // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })
  687. if (maxLines === 0) {
  688. // We have to get the result again. The lines were all removed before.
  689. var _actualLines = actualInspected.split('\n'); // Only remove lines in case it makes sense to collapse those.
  690. // TODO: Accept env to always show the full error.
  691. if (_actualLines.length > 30) {
  692. _actualLines[26] = "".concat(blue, "...").concat(white);
  693. while (_actualLines.length > 27) {
  694. _actualLines.pop();
  695. }
  696. }
  697. return "".concat(kReadableOperator.notIdentical, "\n\n").concat(_actualLines.join('\n'), "\n");
  698. }
  699. if (i > 3) {
  700. end = "\n".concat(blue, "...").concat(white).concat(end);
  701. skipped = true;
  702. }
  703. if (other !== '') {
  704. end = "\n ".concat(other).concat(end);
  705. other = '';
  706. }
  707. var printedLines = 0;
  708. var msg = kReadableOperator[operator] + "\n".concat(green, "+ actual").concat(white, " ").concat(red, "- expected").concat(white);
  709. var skippedMsg = " ".concat(blue, "...").concat(white, " Lines skipped");
  710. for (i = 0; i < maxLines; i++) {
  711. // Only extra expected lines exist
  712. var cur = i - lastPos;
  713. if (actualLines.length < i + 1) {
  714. // If the last diverging line is more than one line above and the
  715. // current line is at least line three, add some of the former lines and
  716. // also add dots to indicate skipped entries.
  717. if (cur > 1 && i > 2) {
  718. if (cur > 4) {
  719. res += "\n".concat(blue, "...").concat(white);
  720. skipped = true;
  721. } else if (cur > 3) {
  722. res += "\n ".concat(expectedLines[i - 2]);
  723. printedLines++;
  724. }
  725. res += "\n ".concat(expectedLines[i - 1]);
  726. printedLines++;
  727. } // Mark the current line as the last diverging one.
  728. lastPos = i; // Add the expected line to the cache.
  729. other += "\n".concat(red, "-").concat(white, " ").concat(expectedLines[i]);
  730. printedLines++; // Only extra actual lines exist
  731. } else if (expectedLines.length < i + 1) {
  732. // If the last diverging line is more than one line above and the
  733. // current line is at least line three, add some of the former lines and
  734. // also add dots to indicate skipped entries.
  735. if (cur > 1 && i > 2) {
  736. if (cur > 4) {
  737. res += "\n".concat(blue, "...").concat(white);
  738. skipped = true;
  739. } else if (cur > 3) {
  740. res += "\n ".concat(actualLines[i - 2]);
  741. printedLines++;
  742. }
  743. res += "\n ".concat(actualLines[i - 1]);
  744. printedLines++;
  745. } // Mark the current line as the last diverging one.
  746. lastPos = i; // Add the actual line to the result.
  747. res += "\n".concat(green, "+").concat(white, " ").concat(actualLines[i]);
  748. printedLines++; // Lines diverge
  749. } else {
  750. var expectedLine = expectedLines[i];
  751. var actualLine = actualLines[i]; // If the lines diverge, specifically check for lines that only diverge by
  752. // a trailing comma. In that case it is actually identical and we should
  753. // mark it as such.
  754. var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical,
  755. // add a comma at the end of the actual line. Otherwise the output could
  756. // look weird as in:
  757. //
  758. // [
  759. // 1 // No comma at the end!
  760. // + 2
  761. // ]
  762. //
  763. if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {
  764. divergingLines = false;
  765. actualLine += ',';
  766. }
  767. if (divergingLines) {
  768. // If the last diverging line is more than one line above and the
  769. // current line is at least line three, add some of the former lines and
  770. // also add dots to indicate skipped entries.
  771. if (cur > 1 && i > 2) {
  772. if (cur > 4) {
  773. res += "\n".concat(blue, "...").concat(white);
  774. skipped = true;
  775. } else if (cur > 3) {
  776. res += "\n ".concat(actualLines[i - 2]);
  777. printedLines++;
  778. }
  779. res += "\n ".concat(actualLines[i - 1]);
  780. printedLines++;
  781. } // Mark the current line as the last diverging one.
  782. lastPos = i; // Add the actual line to the result and cache the expected diverging
  783. // line so consecutive diverging lines show up as +++--- and not +-+-+-.
  784. res += "\n".concat(green, "+").concat(white, " ").concat(actualLine);
  785. other += "\n".concat(red, "-").concat(white, " ").concat(expectedLine);
  786. printedLines += 2; // Lines are identical
  787. } else {
  788. // Add all cached information to the result before adding other things
  789. // and reset the cache.
  790. res += other;
  791. other = ''; // If the last diverging line is exactly one line above or if it is the
  792. // very first line, add the line to the result.
  793. if (cur === 1 || i === 0) {
  794. res += "\n ".concat(actualLine);
  795. printedLines++;
  796. }
  797. }
  798. } // Inspected object to big (Show ~20 rows max)
  799. if (printedLines > 20 && i < maxLines - 2) {
  800. return "".concat(msg).concat(skippedMsg, "\n").concat(res, "\n").concat(blue, "...").concat(white).concat(other, "\n") + "".concat(blue, "...").concat(white);
  801. }
  802. }
  803. return "".concat(msg).concat(skipped ? skippedMsg : '', "\n").concat(res).concat(other).concat(end).concat(indicator);
  804. }
  805. var AssertionError =
  806. /*#__PURE__*/
  807. function (_Error) {
  808. _inherits(AssertionError, _Error);
  809. function AssertionError(options) {
  810. var _this;
  811. _classCallCheck(this, AssertionError);
  812. if (_typeof(options) !== 'object' || options === null) {
  813. throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);
  814. }
  815. var message = options.message,
  816. operator = options.operator,
  817. stackStartFn = options.stackStartFn;
  818. var actual = options.actual,
  819. expected = options.expected;
  820. var limit = Error.stackTraceLimit;
  821. Error.stackTraceLimit = 0;
  822. if (message != null) {
  823. _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, String(message)));
  824. } else {
  825. if (process.stderr && process.stderr.isTTY) {
  826. // Reset on each call to make sure we handle dynamically set environment
  827. // variables correct.
  828. if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {
  829. blue = "\x1B[34m";
  830. green = "\x1B[32m";
  831. white = "\x1B[39m";
  832. red = "\x1B[31m";
  833. } else {
  834. blue = '';
  835. green = '';
  836. white = '';
  837. red = '';
  838. }
  839. } // Prevent the error stack from being visible by duplicating the error
  840. // in a very close way to the original in case both sides are actually
  841. // instances of Error.
  842. if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {
  843. actual = copyError(actual);
  844. expected = copyError(expected);
  845. }
  846. if (operator === 'deepStrictEqual' || operator === 'strictEqual') {
  847. _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, createErrDiff(actual, expected, operator)));
  848. } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {
  849. // In case the objects are equal but the operator requires unequal, show
  850. // the first object and say A equals B
  851. var base = kReadableOperator[operator];
  852. var res = inspectValue(actual).split('\n'); // In case "actual" is an object, it should not be reference equal.
  853. if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {
  854. base = kReadableOperator.notStrictEqualObject;
  855. } // Only remove lines in case it makes sense to collapse those.
  856. // TODO: Accept env to always show the full error.
  857. if (res.length > 30) {
  858. res[26] = "".concat(blue, "...").concat(white);
  859. while (res.length > 27) {
  860. res.pop();
  861. }
  862. } // Only print a single input.
  863. if (res.length === 1) {
  864. _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, "".concat(base, " ").concat(res[0])));
  865. } else {
  866. _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, "".concat(base, "\n\n").concat(res.join('\n'), "\n")));
  867. }
  868. } else {
  869. var _res = inspectValue(actual);
  870. var other = '';
  871. var knownOperators = kReadableOperator[operator];
  872. if (operator === 'notDeepEqual' || operator === 'notEqual') {
  873. _res = "".concat(kReadableOperator[operator], "\n\n").concat(_res);
  874. if (_res.length > 1024) {
  875. _res = "".concat(_res.slice(0, 1021), "...");
  876. }
  877. } else {
  878. other = "".concat(inspectValue(expected));
  879. if (_res.length > 512) {
  880. _res = "".concat(_res.slice(0, 509), "...");
  881. }
  882. if (other.length > 512) {
  883. other = "".concat(other.slice(0, 509), "...");
  884. }
  885. if (operator === 'deepEqual' || operator === 'equal') {
  886. _res = "".concat(knownOperators, "\n\n").concat(_res, "\n\nshould equal\n\n");
  887. } else {
  888. other = " ".concat(operator, " ").concat(other);
  889. }
  890. }
  891. _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, "".concat(_res).concat(other)));
  892. }
  893. }
  894. Error.stackTraceLimit = limit;
  895. _this.generatedMessage = !message;
  896. Object.defineProperty(_assertThisInitialized(_this), 'name', {
  897. value: 'AssertionError [ERR_ASSERTION]',
  898. enumerable: false,
  899. writable: true,
  900. configurable: true
  901. });
  902. _this.code = 'ERR_ASSERTION';
  903. _this.actual = actual;
  904. _this.expected = expected;
  905. _this.operator = operator;
  906. if (Error.captureStackTrace) {
  907. // eslint-disable-next-line no-restricted-syntax
  908. Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);
  909. } // Create error message including the error code in the name.
  910. _this.stack; // Reset the name.
  911. _this.name = 'AssertionError';
  912. return _possibleConstructorReturn(_this);
  913. }
  914. _createClass(AssertionError, [{
  915. key: "toString",
  916. value: function toString() {
  917. return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message);
  918. }
  919. }, {
  920. key: inspect.custom,
  921. value: function value(recurseTimes, ctx) {
  922. // This limits the `actual` and `expected` property default inspection to
  923. // the minimum depth. Otherwise those values would be too verbose compared
  924. // to the actual error message which contains a combined view of these two
  925. // input values.
  926. return inspect(this, _objectSpread({}, ctx, {
  927. customInspect: false,
  928. depth: 0
  929. }));
  930. }
  931. }]);
  932. return AssertionError;
  933. }(_wrapNativeSuper(Error));
  934. module.exports = AssertionError;
  935. /***/ }),
  936. /***/ 2136:
  937. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  938. "use strict";
  939. // Currently in sync with Node.js lib/internal/errors.js
  940. // https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f
  941. /* eslint node-core/documented-errors: "error" */
  942. /* eslint node-core/alphabetize-errors: "error" */
  943. /* eslint node-core/prefer-util-format-errors: "error" */
  944. // The whole point behind this internal module is to allow Node.js to no
  945. // longer be forced to treat every error message change as a semver-major
  946. // change. The NodeError classes here all expose a `code` property whose
  947. // value statically and permanently identifies the error. While the error
  948. // message may change, the code should not.
  949. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  950. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  951. function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  952. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  953. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  954. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  955. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  956. var codes = {}; // Lazy loaded
  957. var assert;
  958. var util;
  959. function createErrorType(code, message, Base) {
  960. if (!Base) {
  961. Base = Error;
  962. }
  963. function getMessage(arg1, arg2, arg3) {
  964. if (typeof message === 'string') {
  965. return message;
  966. } else {
  967. return message(arg1, arg2, arg3);
  968. }
  969. }
  970. var NodeError =
  971. /*#__PURE__*/
  972. function (_Base) {
  973. _inherits(NodeError, _Base);
  974. function NodeError(arg1, arg2, arg3) {
  975. var _this;
  976. _classCallCheck(this, NodeError);
  977. _this = _possibleConstructorReturn(this, _getPrototypeOf(NodeError).call(this, getMessage(arg1, arg2, arg3)));
  978. _this.code = code;
  979. return _this;
  980. }
  981. return NodeError;
  982. }(Base);
  983. codes[code] = NodeError;
  984. } // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
  985. function oneOf(expected, thing) {
  986. if (Array.isArray(expected)) {
  987. var len = expected.length;
  988. expected = expected.map(function (i) {
  989. return String(i);
  990. });
  991. if (len > 2) {
  992. return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1];
  993. } else if (len === 2) {
  994. return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
  995. } else {
  996. return "of ".concat(thing, " ").concat(expected[0]);
  997. }
  998. } else {
  999. return "of ".concat(thing, " ").concat(String(expected));
  1000. }
  1001. } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
  1002. function startsWith(str, search, pos) {
  1003. return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
  1004. } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
  1005. function endsWith(str, search, this_len) {
  1006. if (this_len === undefined || this_len > str.length) {
  1007. this_len = str.length;
  1008. }
  1009. return str.substring(this_len - search.length, this_len) === search;
  1010. } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
  1011. function includes(str, search, start) {
  1012. if (typeof start !== 'number') {
  1013. start = 0;
  1014. }
  1015. if (start + search.length > str.length) {
  1016. return false;
  1017. } else {
  1018. return str.indexOf(search, start) !== -1;
  1019. }
  1020. }
  1021. createErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The "%s" argument is ambiguous. %s', TypeError);
  1022. createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
  1023. if (assert === undefined) assert = __webpack_require__(9282);
  1024. assert(typeof name === 'string', "'name' must be a string"); // determiner: 'must be' or 'must not be'
  1025. var determiner;
  1026. if (typeof expected === 'string' && startsWith(expected, 'not ')) {
  1027. determiner = 'must not be';
  1028. expected = expected.replace(/^not /, '');
  1029. } else {
  1030. determiner = 'must be';
  1031. }
  1032. var msg;
  1033. if (endsWith(name, ' argument')) {
  1034. // For cases like 'first argument'
  1035. msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
  1036. } else {
  1037. var type = includes(name, '.') ? 'property' : 'argument';
  1038. msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
  1039. } // TODO(BridgeAR): Improve the output by showing `null` and similar.
  1040. msg += ". Received type ".concat(_typeof(actual));
  1041. return msg;
  1042. }, TypeError);
  1043. createErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {
  1044. var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';
  1045. if (util === undefined) util = __webpack_require__(9539);
  1046. var inspected = util.inspect(value);
  1047. if (inspected.length > 128) {
  1048. inspected = "".concat(inspected.slice(0, 128), "...");
  1049. }
  1050. return "The argument '".concat(name, "' ").concat(reason, ". Received ").concat(inspected);
  1051. }, TypeError, RangeError);
  1052. createErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {
  1053. var type;
  1054. if (value && value.constructor && value.constructor.name) {
  1055. type = "instance of ".concat(value.constructor.name);
  1056. } else {
  1057. type = "type ".concat(_typeof(value));
  1058. }
  1059. return "Expected ".concat(input, " to be returned from the \"").concat(name, "\"") + " function but got ".concat(type, ".");
  1060. }, TypeError);
  1061. createErrorType('ERR_MISSING_ARGS', function () {
  1062. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  1063. args[_key] = arguments[_key];
  1064. }
  1065. if (assert === undefined) assert = __webpack_require__(9282);
  1066. assert(args.length > 0, 'At least one arg needs to be specified');
  1067. var msg = 'The ';
  1068. var len = args.length;
  1069. args = args.map(function (a) {
  1070. return "\"".concat(a, "\"");
  1071. });
  1072. switch (len) {
  1073. case 1:
  1074. msg += "".concat(args[0], " argument");
  1075. break;
  1076. case 2:
  1077. msg += "".concat(args[0], " and ").concat(args[1], " arguments");
  1078. break;
  1079. default:
  1080. msg += args.slice(0, len - 1).join(', ');
  1081. msg += ", and ".concat(args[len - 1], " arguments");
  1082. break;
  1083. }
  1084. return "".concat(msg, " must be specified");
  1085. }, TypeError);
  1086. module.exports.codes = codes;
  1087. /***/ }),
  1088. /***/ 9158:
  1089. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1090. "use strict";
  1091. // Currently in sync with Node.js lib/internal/util/comparisons.js
  1092. // https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
  1093. function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); }
  1094. function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
  1095. function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
  1096. function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
  1097. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  1098. var regexFlagsSupported = /a/g.flags !== undefined;
  1099. var arrayFromSet = function arrayFromSet(set) {
  1100. var array = [];
  1101. set.forEach(function (value) {
  1102. return array.push(value);
  1103. });
  1104. return array;
  1105. };
  1106. var arrayFromMap = function arrayFromMap(map) {
  1107. var array = [];
  1108. map.forEach(function (value, key) {
  1109. return array.push([key, value]);
  1110. });
  1111. return array;
  1112. };
  1113. var objectIs = Object.is ? Object.is : __webpack_require__(609);
  1114. var objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {
  1115. return [];
  1116. };
  1117. var numberIsNaN = Number.isNaN ? Number.isNaN : __webpack_require__(360);
  1118. function uncurryThis(f) {
  1119. return f.call.bind(f);
  1120. }
  1121. var hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);
  1122. var propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);
  1123. var objectToString = uncurryThis(Object.prototype.toString);
  1124. var _require$types = (__webpack_require__(9539).types),
  1125. isAnyArrayBuffer = _require$types.isAnyArrayBuffer,
  1126. isArrayBufferView = _require$types.isArrayBufferView,
  1127. isDate = _require$types.isDate,
  1128. isMap = _require$types.isMap,
  1129. isRegExp = _require$types.isRegExp,
  1130. isSet = _require$types.isSet,
  1131. isNativeError = _require$types.isNativeError,
  1132. isBoxedPrimitive = _require$types.isBoxedPrimitive,
  1133. isNumberObject = _require$types.isNumberObject,
  1134. isStringObject = _require$types.isStringObject,
  1135. isBooleanObject = _require$types.isBooleanObject,
  1136. isBigIntObject = _require$types.isBigIntObject,
  1137. isSymbolObject = _require$types.isSymbolObject,
  1138. isFloat32Array = _require$types.isFloat32Array,
  1139. isFloat64Array = _require$types.isFloat64Array;
  1140. function isNonIndex(key) {
  1141. if (key.length === 0 || key.length > 10) return true;
  1142. for (var i = 0; i < key.length; i++) {
  1143. var code = key.charCodeAt(i);
  1144. if (code < 48 || code > 57) return true;
  1145. } // The maximum size for an array is 2 ** 32 -1.
  1146. return key.length === 10 && key >= Math.pow(2, 32);
  1147. }
  1148. function getOwnNonIndexProperties(value) {
  1149. return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));
  1150. } // Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js
  1151. // original notice:
  1152. /*!
  1153. * The buffer module from node.js, for the browser.
  1154. *
  1155. * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
  1156. * @license MIT
  1157. */
  1158. function compare(a, b) {
  1159. if (a === b) {
  1160. return 0;
  1161. }
  1162. var x = a.length;
  1163. var y = b.length;
  1164. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  1165. if (a[i] !== b[i]) {
  1166. x = a[i];
  1167. y = b[i];
  1168. break;
  1169. }
  1170. }
  1171. if (x < y) {
  1172. return -1;
  1173. }
  1174. if (y < x) {
  1175. return 1;
  1176. }
  1177. return 0;
  1178. }
  1179. var ONLY_ENUMERABLE = undefined;
  1180. var kStrict = true;
  1181. var kLoose = false;
  1182. var kNoIterator = 0;
  1183. var kIsArray = 1;
  1184. var kIsSet = 2;
  1185. var kIsMap = 3; // Check if they have the same source and flags
  1186. function areSimilarRegExps(a, b) {
  1187. return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);
  1188. }
  1189. function areSimilarFloatArrays(a, b) {
  1190. if (a.byteLength !== b.byteLength) {
  1191. return false;
  1192. }
  1193. for (var offset = 0; offset < a.byteLength; offset++) {
  1194. if (a[offset] !== b[offset]) {
  1195. return false;
  1196. }
  1197. }
  1198. return true;
  1199. }
  1200. function areSimilarTypedArrays(a, b) {
  1201. if (a.byteLength !== b.byteLength) {
  1202. return false;
  1203. }
  1204. return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;
  1205. }
  1206. function areEqualArrayBuffers(buf1, buf2) {
  1207. return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;
  1208. }
  1209. function isEqualBoxedPrimitive(val1, val2) {
  1210. if (isNumberObject(val1)) {
  1211. return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));
  1212. }
  1213. if (isStringObject(val1)) {
  1214. return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);
  1215. }
  1216. if (isBooleanObject(val1)) {
  1217. return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);
  1218. }
  1219. if (isBigIntObject(val1)) {
  1220. return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);
  1221. }
  1222. return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);
  1223. } // Notes: Type tags are historical [[Class]] properties that can be set by
  1224. // FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS
  1225. // and retrieved using Object.prototype.toString.call(obj) in JS
  1226. // See https://tc39.github.io/ecma262/#sec-object.prototype.tostring
  1227. // for a list of tags pre-defined in the spec.
  1228. // There are some unspecified tags in the wild too (e.g. typed array tags).
  1229. // Since tags can be altered, they only serve fast failures
  1230. //
  1231. // Typed arrays and buffers are checked by comparing the content in their
  1232. // underlying ArrayBuffer. This optimization requires that it's
  1233. // reasonable to interpret their underlying memory in the same way,
  1234. // which is checked by comparing their type tags.
  1235. // (e.g. a Uint8Array and a Uint16Array with the same memory content
  1236. // could still be different because they will be interpreted differently).
  1237. //
  1238. // For strict comparison, objects should have
  1239. // a) The same built-in type tags
  1240. // b) The same prototypes.
  1241. function innerDeepEqual(val1, val2, strict, memos) {
  1242. // All identical values are equivalent, as determined by ===.
  1243. if (val1 === val2) {
  1244. if (val1 !== 0) return true;
  1245. return strict ? objectIs(val1, val2) : true;
  1246. } // Check more closely if val1 and val2 are equal.
  1247. if (strict) {
  1248. if (_typeof(val1) !== 'object') {
  1249. return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);
  1250. }
  1251. if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {
  1252. return false;
  1253. }
  1254. if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {
  1255. return false;
  1256. }
  1257. } else {
  1258. if (val1 === null || _typeof(val1) !== 'object') {
  1259. if (val2 === null || _typeof(val2) !== 'object') {
  1260. // eslint-disable-next-line eqeqeq
  1261. return val1 == val2;
  1262. }
  1263. return false;
  1264. }
  1265. if (val2 === null || _typeof(val2) !== 'object') {
  1266. return false;
  1267. }
  1268. }
  1269. var val1Tag = objectToString(val1);
  1270. var val2Tag = objectToString(val2);
  1271. if (val1Tag !== val2Tag) {
  1272. return false;
  1273. }
  1274. if (Array.isArray(val1)) {
  1275. // Check for sparse arrays and general fast path
  1276. if (val1.length !== val2.length) {
  1277. return false;
  1278. }
  1279. var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);
  1280. var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);
  1281. if (keys1.length !== keys2.length) {
  1282. return false;
  1283. }
  1284. return keyCheck(val1, val2, strict, memos, kIsArray, keys1);
  1285. } // [browserify] This triggers on certain types in IE (Map/Set) so we don't
  1286. // wan't to early return out of the rest of the checks. However we can check
  1287. // if the second value is one of these values and the first isn't.
  1288. if (val1Tag === '[object Object]') {
  1289. // return keyCheck(val1, val2, strict, memos, kNoIterator);
  1290. if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {
  1291. return false;
  1292. }
  1293. }
  1294. if (isDate(val1)) {
  1295. if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {
  1296. return false;
  1297. }
  1298. } else if (isRegExp(val1)) {
  1299. if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {
  1300. return false;
  1301. }
  1302. } else if (isNativeError(val1) || val1 instanceof Error) {
  1303. // Do not compare the stack as it might differ even though the error itself
  1304. // is otherwise identical.
  1305. if (val1.message !== val2.message || val1.name !== val2.name) {
  1306. return false;
  1307. }
  1308. } else if (isArrayBufferView(val1)) {
  1309. if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {
  1310. if (!areSimilarFloatArrays(val1, val2)) {
  1311. return false;
  1312. }
  1313. } else if (!areSimilarTypedArrays(val1, val2)) {
  1314. return false;
  1315. } // Buffer.compare returns true, so val1.length === val2.length. If they both
  1316. // only contain numeric keys, we don't need to exam further than checking
  1317. // the symbols.
  1318. var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);
  1319. var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);
  1320. if (_keys.length !== _keys2.length) {
  1321. return false;
  1322. }
  1323. return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);
  1324. } else if (isSet(val1)) {
  1325. if (!isSet(val2) || val1.size !== val2.size) {
  1326. return false;
  1327. }
  1328. return keyCheck(val1, val2, strict, memos, kIsSet);
  1329. } else if (isMap(val1)) {
  1330. if (!isMap(val2) || val1.size !== val2.size) {
  1331. return false;
  1332. }
  1333. return keyCheck(val1, val2, strict, memos, kIsMap);
  1334. } else if (isAnyArrayBuffer(val1)) {
  1335. if (!areEqualArrayBuffers(val1, val2)) {
  1336. return false;
  1337. }
  1338. } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {
  1339. return false;
  1340. }
  1341. return keyCheck(val1, val2, strict, memos, kNoIterator);
  1342. }
  1343. function getEnumerables(val, keys) {
  1344. return keys.filter(function (k) {
  1345. return propertyIsEnumerable(val, k);
  1346. });
  1347. }
  1348. function keyCheck(val1, val2, strict, memos, iterationType, aKeys) {
  1349. // For all remaining Object pairs, including Array, objects and Maps,
  1350. // equivalence is determined by having:
  1351. // a) The same number of owned enumerable properties
  1352. // b) The same set of keys/indexes (although not necessarily the same order)
  1353. // c) Equivalent values for every corresponding key/index
  1354. // d) For Sets and Maps, equal contents
  1355. // Note: this accounts for both named and indexed properties on Arrays.
  1356. if (arguments.length === 5) {
  1357. aKeys = Object.keys(val1);
  1358. var bKeys = Object.keys(val2); // The pair must have the same number of owned properties.
  1359. if (aKeys.length !== bKeys.length) {
  1360. return false;
  1361. }
  1362. } // Cheap key test
  1363. var i = 0;
  1364. for (; i < aKeys.length; i++) {
  1365. if (!hasOwnProperty(val2, aKeys[i])) {
  1366. return false;
  1367. }
  1368. }
  1369. if (strict && arguments.length === 5) {
  1370. var symbolKeysA = objectGetOwnPropertySymbols(val1);
  1371. if (symbolKeysA.length !== 0) {
  1372. var count = 0;
  1373. for (i = 0; i < symbolKeysA.length; i++) {
  1374. var key = symbolKeysA[i];
  1375. if (propertyIsEnumerable(val1, key)) {
  1376. if (!propertyIsEnumerable(val2, key)) {
  1377. return false;
  1378. }
  1379. aKeys.push(key);
  1380. count++;
  1381. } else if (propertyIsEnumerable(val2, key)) {
  1382. return false;
  1383. }
  1384. }
  1385. var symbolKeysB = objectGetOwnPropertySymbols(val2);
  1386. if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {
  1387. return false;
  1388. }
  1389. } else {
  1390. var _symbolKeysB = objectGetOwnPropertySymbols(val2);
  1391. if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {
  1392. return false;
  1393. }
  1394. }
  1395. }
  1396. if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {
  1397. return true;
  1398. } // Use memos to handle cycles.
  1399. if (memos === undefined) {
  1400. memos = {
  1401. val1: new Map(),
  1402. val2: new Map(),
  1403. position: 0
  1404. };
  1405. } else {
  1406. // We prevent up to two map.has(x) calls by directly retrieving the value
  1407. // and checking for undefined. The map can only contain numbers, so it is
  1408. // safe to check for undefined only.
  1409. var val2MemoA = memos.val1.get(val1);
  1410. if (val2MemoA !== undefined) {
  1411. var val2MemoB = memos.val2.get(val2);
  1412. if (val2MemoB !== undefined) {
  1413. return val2MemoA === val2MemoB;
  1414. }
  1415. }
  1416. memos.position++;
  1417. }
  1418. memos.val1.set(val1, memos.position);
  1419. memos.val2.set(val2, memos.position);
  1420. var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);
  1421. memos.val1.delete(val1);
  1422. memos.val2.delete(val2);
  1423. return areEq;
  1424. }
  1425. function setHasEqualElement(set, val1, strict, memo) {
  1426. // Go looking.
  1427. var setValues = arrayFromSet(set);
  1428. for (var i = 0; i < setValues.length; i++) {
  1429. var val2 = setValues[i];
  1430. if (innerDeepEqual(val1, val2, strict, memo)) {
  1431. // Remove the matching element to make sure we do not check that again.
  1432. set.delete(val2);
  1433. return true;
  1434. }
  1435. }
  1436. return false;
  1437. } // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using
  1438. // Sadly it is not possible to detect corresponding values properly in case the
  1439. // type is a string, number, bigint or boolean. The reason is that those values
  1440. // can match lots of different string values (e.g., 1n == '+00001').
  1441. function findLooseMatchingPrimitives(prim) {
  1442. switch (_typeof(prim)) {
  1443. case 'undefined':
  1444. return null;
  1445. case 'object':
  1446. // Only pass in null as object!
  1447. return undefined;
  1448. case 'symbol':
  1449. return false;
  1450. case 'string':
  1451. prim = +prim;
  1452. // Loose equal entries exist only if the string is possible to convert to
  1453. // a regular number and not NaN.
  1454. // Fall through
  1455. case 'number':
  1456. if (numberIsNaN(prim)) {
  1457. return false;
  1458. }
  1459. }
  1460. return true;
  1461. }
  1462. function setMightHaveLoosePrim(a, b, prim) {
  1463. var altValue = findLooseMatchingPrimitives(prim);
  1464. if (altValue != null) return altValue;
  1465. return b.has(altValue) && !a.has(altValue);
  1466. }
  1467. function mapMightHaveLoosePrim(a, b, prim, item, memo) {
  1468. var altValue = findLooseMatchingPrimitives(prim);
  1469. if (altValue != null) {
  1470. return altValue;
  1471. }
  1472. var curB = b.get(altValue);
  1473. if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {
  1474. return false;
  1475. }
  1476. return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);
  1477. }
  1478. function setEquiv(a, b, strict, memo) {
  1479. // This is a lazily initiated Set of entries which have to be compared
  1480. // pairwise.
  1481. var set = null;
  1482. var aValues = arrayFromSet(a);
  1483. for (var i = 0; i < aValues.length; i++) {
  1484. var val = aValues[i]; // Note: Checking for the objects first improves the performance for object
  1485. // heavy sets but it is a minor slow down for primitives. As they are fast
  1486. // to check this improves the worst case scenario instead.
  1487. if (_typeof(val) === 'object' && val !== null) {
  1488. if (set === null) {
  1489. set = new Set();
  1490. } // If the specified value doesn't exist in the second set its an not null
  1491. // object (or non strict only: a not matching primitive) we'll need to go
  1492. // hunting for something thats deep-(strict-)equal to it. To make this
  1493. // O(n log n) complexity we have to copy these values in a new set first.
  1494. set.add(val);
  1495. } else if (!b.has(val)) {
  1496. if (strict) return false; // Fast path to detect missing string, symbol, undefined and null values.
  1497. if (!setMightHaveLoosePrim(a, b, val)) {
  1498. return false;
  1499. }
  1500. if (set === null) {
  1501. set = new Set();
  1502. }
  1503. set.add(val);
  1504. }
  1505. }
  1506. if (set !== null) {
  1507. var bValues = arrayFromSet(b);
  1508. for (var _i = 0; _i < bValues.length; _i++) {
  1509. var _val = bValues[_i]; // We have to check if a primitive value is already
  1510. // matching and only if it's not, go hunting for it.
  1511. if (_typeof(_val) === 'object' && _val !== null) {
  1512. if (!setHasEqualElement(set, _val, strict, memo)) return false;
  1513. } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {
  1514. return false;
  1515. }
  1516. }
  1517. return set.size === 0;
  1518. }
  1519. return true;
  1520. }
  1521. function mapHasEqualEntry(set, map, key1, item1, strict, memo) {
  1522. // To be able to handle cases like:
  1523. // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])
  1524. // ... we need to consider *all* matching keys, not just the first we find.
  1525. var setValues = arrayFromSet(set);
  1526. for (var i = 0; i < setValues.length; i++) {
  1527. var key2 = setValues[i];
  1528. if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {
  1529. set.delete(key2);
  1530. return true;
  1531. }
  1532. }
  1533. return false;
  1534. }
  1535. function mapEquiv(a, b, strict, memo) {
  1536. var set = null;
  1537. var aEntries = arrayFromMap(a);
  1538. for (var i = 0; i < aEntries.length; i++) {
  1539. var _aEntries$i = _slicedToArray(aEntries[i], 2),
  1540. key = _aEntries$i[0],
  1541. item1 = _aEntries$i[1];
  1542. if (_typeof(key) === 'object' && key !== null) {
  1543. if (set === null) {
  1544. set = new Set();
  1545. }
  1546. set.add(key);
  1547. } else {
  1548. // By directly retrieving the value we prevent another b.has(key) check in
  1549. // almost all possible cases.
  1550. var item2 = b.get(key);
  1551. if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {
  1552. if (strict) return false; // Fast path to detect missing string, symbol, undefined and null
  1553. // keys.
  1554. if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;
  1555. if (set === null) {
  1556. set = new Set();
  1557. }
  1558. set.add(key);
  1559. }
  1560. }
  1561. }
  1562. if (set !== null) {
  1563. var bEntries = arrayFromMap(b);
  1564. for (var _i2 = 0; _i2 < bEntries.length; _i2++) {
  1565. var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),
  1566. key = _bEntries$_i[0],
  1567. item = _bEntries$_i[1];
  1568. if (_typeof(key) === 'object' && key !== null) {
  1569. if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return false;
  1570. } else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) {
  1571. return false;
  1572. }
  1573. }
  1574. return set.size === 0;
  1575. }
  1576. return true;
  1577. }
  1578. function objEquiv(a, b, strict, keys, memos, iterationType) {
  1579. // Sets and maps don't have their entries accessible via normal object
  1580. // properties.
  1581. var i = 0;
  1582. if (iterationType === kIsSet) {
  1583. if (!setEquiv(a, b, strict, memos)) {
  1584. return false;
  1585. }
  1586. } else if (iterationType === kIsMap) {
  1587. if (!mapEquiv(a, b, strict, memos)) {
  1588. return false;
  1589. }
  1590. } else if (iterationType === kIsArray) {
  1591. for (; i < a.length; i++) {
  1592. if (hasOwnProperty(a, i)) {
  1593. if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {
  1594. return false;
  1595. }
  1596. } else if (hasOwnProperty(b, i)) {
  1597. return false;
  1598. } else {
  1599. // Array is sparse.
  1600. var keysA = Object.keys(a);
  1601. for (; i < keysA.length; i++) {
  1602. var key = keysA[i];
  1603. if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {
  1604. return false;
  1605. }
  1606. }
  1607. if (keysA.length !== Object.keys(b).length) {
  1608. return false;
  1609. }
  1610. return true;
  1611. }
  1612. }
  1613. } // The pair must have equivalent values for every corresponding key.
  1614. // Possibly expensive deep test:
  1615. for (i = 0; i < keys.length; i++) {
  1616. var _key = keys[i];
  1617. if (!innerDeepEqual(a[_key], b[_key], strict, memos)) {
  1618. return false;
  1619. }
  1620. }
  1621. return true;
  1622. }
  1623. function isDeepEqual(val1, val2) {
  1624. return innerDeepEqual(val1, val2, kLoose);
  1625. }
  1626. function isDeepStrictEqual(val1, val2) {
  1627. return innerDeepEqual(val1, val2, kStrict);
  1628. }
  1629. module.exports = {
  1630. isDeepEqual: isDeepEqual,
  1631. isDeepStrictEqual: isDeepStrictEqual
  1632. };
  1633. /***/ }),
  1634. /***/ 2055:
  1635. /***/ (function(__unused_webpack_module, exports) {
  1636. "use strict";
  1637. // The following break classes are handled by the pair table
  1638. exports.OP = 0; // Opening punctuation
  1639. exports.CL = 1; // Closing punctuation
  1640. exports.CP = 2; // Closing parenthesis
  1641. exports.QU = 3; // Ambiguous quotation
  1642. exports.GL = 4; // Glue
  1643. exports.NS = 5; // Non-starters
  1644. exports.EX = 6; // Exclamation/Interrogation
  1645. exports.SY = 7; // Symbols allowing break after
  1646. exports.IS = 8; // Infix separator
  1647. exports.PR = 9; // Prefix
  1648. exports.PO = 10; // Postfix
  1649. exports.NU = 11; // Numeric
  1650. exports.AL = 12; // Alphabetic
  1651. exports.HL = 13; // Hebrew Letter
  1652. exports.ID = 14; // Ideographic
  1653. exports.IN = 15; // Inseparable characters
  1654. exports.HY = 16; // Hyphen
  1655. exports.BA = 17; // Break after
  1656. exports.BB = 18; // Break before
  1657. exports.B2 = 19; // Break on either side (but not pair)
  1658. exports.ZW = 20; // Zero-width space
  1659. exports.CM = 21; // Combining marks
  1660. exports.WJ = 22; // Word joiner
  1661. exports.H2 = 23; // Hangul LV
  1662. exports.H3 = 24; // Hangul LVT
  1663. exports.JL = 25; // Hangul L Jamo
  1664. exports.JV = 26; // Hangul V Jamo
  1665. exports.JT = 27; // Hangul T Jamo
  1666. exports.RI = 28; // Regional Indicator
  1667. exports.EB = 29; // Emoji Base
  1668. exports.EM = 30; // Emoji Modifier
  1669. exports.ZWJ = 31; // Zero Width Joiner
  1670. exports.CB = 32; // Contingent break
  1671. // The following break classes are not handled by the pair table
  1672. exports.AI = 33; // Ambiguous (Alphabetic or Ideograph)
  1673. exports.BK = 34; // Break (mandatory)
  1674. exports.CJ = 35; // Conditional Japanese Starter
  1675. exports.CR = 36; // Carriage return
  1676. exports.LF = 37; // Line feed
  1677. exports.NL = 38; // Next line
  1678. exports.SA = 39; // South-East Asian
  1679. exports.SG = 40; // Surrogates
  1680. exports.SP = 41; // Space
  1681. exports.XX = 42; // Unknown
  1682. /***/ }),
  1683. /***/ 8383:
  1684. /***/ (function(__unused_webpack_module, exports) {
  1685. "use strict";
  1686. var CI_BRK, CP_BRK, DI_BRK, IN_BRK, PR_BRK;
  1687. exports.DI_BRK = DI_BRK = 0; // Direct break opportunity
  1688. exports.IN_BRK = IN_BRK = 1; // Indirect break opportunity
  1689. exports.CI_BRK = CI_BRK = 2; // Indirect break opportunity for combining marks
  1690. exports.CP_BRK = CP_BRK = 3; // Prohibited break for combining marks
  1691. exports.PR_BRK = PR_BRK = 4; // Prohibited break
  1692. // Based on example pair table from https://www.unicode.org/reports/tr14/tr14-37.html#Table2
  1693. // - ZWJ special processing for LB8a of Revision 41
  1694. // - CB manually added as per Rule LB20
  1695. // - CL, CP, NS, SY, IS, PR, PO, HY, BA, B2 and RI manually adjusted as per LB22 of Revision 45
  1696. exports.pairTable = [//OP , CL , CP , QU , GL , NS , EX , SY , IS , PR , PO , NU , AL , HL , ID , IN , HY , BA , BB , B2 , ZW , CM , WJ , H2 , H3 , JL , JV , JT , RI , EB , EM , ZWJ , CB
  1697. [PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, CP_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK], // OP
  1698. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CL
  1699. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CP
  1700. [PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // QU
  1701. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // GL
  1702. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NS
  1703. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EX
  1704. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // SY
  1705. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IS
  1706. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // PR
  1707. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // PO
  1708. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NU
  1709. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // AL
  1710. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HL
  1711. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ID
  1712. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IN
  1713. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HY
  1714. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // BA
  1715. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // BB
  1716. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // B2
  1717. [DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK], // ZW
  1718. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CM
  1719. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // WJ
  1720. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H2
  1721. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H3
  1722. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JL
  1723. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JV
  1724. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JT
  1725. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // RI
  1726. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK], // EB
  1727. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EM
  1728. [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ZWJ
  1729. [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK] // CB
  1730. ];
  1731. /***/ }),
  1732. /***/ 5106:
  1733. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  1734. "use strict";
  1735. __webpack_require__(9601);
  1736. exports.EncodeStream = __webpack_require__(9126);
  1737. exports.DecodeStream = __webpack_require__(3030);
  1738. exports.Array = __webpack_require__(1988);
  1739. exports.LazyArray = __webpack_require__(6768);
  1740. exports.Bitfield = __webpack_require__(3425);
  1741. exports.Boolean = __webpack_require__(9024);
  1742. exports.Buffer = __webpack_require__(5250);
  1743. exports.Enum = __webpack_require__(3100);
  1744. exports.Optional = __webpack_require__(9541);
  1745. exports.Reserved = __webpack_require__(7468);
  1746. exports.String = __webpack_require__(1466);
  1747. exports.Struct = __webpack_require__(1219);
  1748. exports.VersionedStruct = __webpack_require__(3585);
  1749. var utils = __webpack_require__(6610);
  1750. var NumberT = __webpack_require__(6462);
  1751. var Pointer = __webpack_require__(8011);
  1752. Object.assign(exports, utils, NumberT, Pointer);
  1753. /***/ }),
  1754. /***/ 1988:
  1755. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1756. "use strict";
  1757. __webpack_require__(7042);
  1758. __webpack_require__(1539);
  1759. __webpack_require__(8309);
  1760. __webpack_require__(1038);
  1761. __webpack_require__(8783);
  1762. __webpack_require__(4916);
  1763. __webpack_require__(2526);
  1764. __webpack_require__(1817);
  1765. __webpack_require__(2165);
  1766. __webpack_require__(6992);
  1767. __webpack_require__(3948);
  1768. 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."); }
  1769. 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); }
  1770. 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; }
  1771. var _require = __webpack_require__(6462),
  1772. NumberT = _require.Number;
  1773. var utils = __webpack_require__(6610);
  1774. var ArrayT = /*#__PURE__*/function () {
  1775. function ArrayT(type, length, lengthType) {
  1776. if (lengthType === void 0) {
  1777. lengthType = 'count';
  1778. }
  1779. this.type = type;
  1780. this.length = length;
  1781. this.lengthType = lengthType;
  1782. }
  1783. var _proto = ArrayT.prototype;
  1784. _proto.decode = function decode(stream, parent) {
  1785. var length;
  1786. var pos = stream.pos;
  1787. var res = [];
  1788. var ctx = parent;
  1789. if (this.length != null) {
  1790. length = utils.resolveLength(this.length, stream, parent);
  1791. }
  1792. if (this.length instanceof NumberT) {
  1793. // define hidden properties
  1794. Object.defineProperties(res, {
  1795. parent: {
  1796. value: parent
  1797. },
  1798. _startOffset: {
  1799. value: pos
  1800. },
  1801. _currentOffset: {
  1802. value: 0,
  1803. writable: true
  1804. },
  1805. _length: {
  1806. value: length
  1807. }
  1808. });
  1809. ctx = res;
  1810. }
  1811. if (length == null || this.lengthType === 'bytes') {
  1812. var target = length != null ? stream.pos + length : (parent != null ? parent._length : undefined) ? parent._startOffset + parent._length : stream.length;
  1813. while (stream.pos < target) {
  1814. res.push(this.type.decode(stream, ctx));
  1815. }
  1816. } else {
  1817. for (var i = 0, end = length; i < end; i++) {
  1818. res.push(this.type.decode(stream, ctx));
  1819. }
  1820. }
  1821. return res;
  1822. };
  1823. _proto.size = function size(array, ctx) {
  1824. if (!array) {
  1825. return this.type.size(null, ctx) * utils.resolveLength(this.length, null, ctx);
  1826. }
  1827. var size = 0;
  1828. if (this.length instanceof NumberT) {
  1829. size += this.length.size();
  1830. ctx = {
  1831. parent: ctx
  1832. };
  1833. }
  1834. for (var _iterator = _createForOfIteratorHelperLoose(array), _step; !(_step = _iterator()).done;) {
  1835. var item = _step.value;
  1836. size += this.type.size(item, ctx);
  1837. }
  1838. return size;
  1839. };
  1840. _proto.encode = function encode(stream, array, parent) {
  1841. var ctx = parent;
  1842. if (this.length instanceof NumberT) {
  1843. ctx = {
  1844. pointers: [],
  1845. startOffset: stream.pos,
  1846. parent: parent
  1847. };
  1848. ctx.pointerOffset = stream.pos + this.size(array, ctx);
  1849. this.length.encode(stream, array.length);
  1850. }
  1851. for (var _iterator2 = _createForOfIteratorHelperLoose(array), _step2; !(_step2 = _iterator2()).done;) {
  1852. var item = _step2.value;
  1853. this.type.encode(stream, item, ctx);
  1854. }
  1855. if (this.length instanceof NumberT) {
  1856. var i = 0;
  1857. while (i < ctx.pointers.length) {
  1858. var ptr = ctx.pointers[i++];
  1859. ptr.type.encode(stream, ptr.val);
  1860. }
  1861. }
  1862. };
  1863. return ArrayT;
  1864. }();
  1865. module.exports = ArrayT;
  1866. /***/ }),
  1867. /***/ 3425:
  1868. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1869. "use strict";
  1870. __webpack_require__(2087);
  1871. var Bitfield = /*#__PURE__*/function () {
  1872. function Bitfield(type, flags) {
  1873. if (flags === void 0) {
  1874. flags = [];
  1875. }
  1876. this.type = type;
  1877. this.flags = flags;
  1878. }
  1879. var _proto = Bitfield.prototype;
  1880. _proto.decode = function decode(stream) {
  1881. var val = this.type.decode(stream);
  1882. var res = {};
  1883. for (var i = 0; i < this.flags.length; i++) {
  1884. var flag = this.flags[i];
  1885. if (flag != null) {
  1886. res[flag] = !!(val & 1 << i);
  1887. }
  1888. }
  1889. return res;
  1890. };
  1891. _proto.size = function size() {
  1892. return this.type.size();
  1893. };
  1894. _proto.encode = function encode(stream, keys) {
  1895. var val = 0;
  1896. for (var i = 0; i < this.flags.length; i++) {
  1897. var flag = this.flags[i];
  1898. if (flag != null) {
  1899. if (keys[flag]) {
  1900. val |= 1 << i;
  1901. }
  1902. }
  1903. }
  1904. return this.type.encode(stream, val);
  1905. };
  1906. return Bitfield;
  1907. }();
  1908. module.exports = Bitfield;
  1909. /***/ }),
  1910. /***/ 9024:
  1911. /***/ (function(module) {
  1912. "use strict";
  1913. var BooleanT = /*#__PURE__*/function () {
  1914. function BooleanT(type) {
  1915. this.type = type;
  1916. }
  1917. var _proto = BooleanT.prototype;
  1918. _proto.decode = function decode(stream, parent) {
  1919. return !!this.type.decode(stream, parent);
  1920. };
  1921. _proto.size = function size(val, parent) {
  1922. return this.type.size(val, parent);
  1923. };
  1924. _proto.encode = function encode(stream, val, parent) {
  1925. return this.type.encode(stream, +val, parent);
  1926. };
  1927. return BooleanT;
  1928. }();
  1929. module.exports = BooleanT;
  1930. /***/ }),
  1931. /***/ 5250:
  1932. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1933. "use strict";
  1934. var utils = __webpack_require__(6610);
  1935. var _require = __webpack_require__(6462),
  1936. NumberT = _require.Number;
  1937. var BufferT = /*#__PURE__*/function () {
  1938. function BufferT(length) {
  1939. this.length = length;
  1940. }
  1941. var _proto = BufferT.prototype;
  1942. _proto.decode = function decode(stream, parent) {
  1943. var length = utils.resolveLength(this.length, stream, parent);
  1944. return stream.readBuffer(length);
  1945. };
  1946. _proto.size = function size(val, parent) {
  1947. if (!val) {
  1948. return utils.resolveLength(this.length, null, parent);
  1949. }
  1950. return val.length;
  1951. };
  1952. _proto.encode = function encode(stream, buf, parent) {
  1953. if (this.length instanceof NumberT) {
  1954. this.length.encode(stream, buf.length);
  1955. }
  1956. return stream.writeBuffer(buf);
  1957. };
  1958. return BufferT;
  1959. }();
  1960. module.exports = BufferT;
  1961. /***/ }),
  1962. /***/ 3030:
  1963. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  1964. "use strict";
  1965. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  1966. __webpack_require__(1539);
  1967. __webpack_require__(9714);
  1968. __webpack_require__(7042);
  1969. __webpack_require__(4916);
  1970. __webpack_require__(5306);
  1971. var iconv;
  1972. try {
  1973. iconv = __webpack_require__(4914);
  1974. } catch (error) {}
  1975. var DecodeStream = /*#__PURE__*/function () {
  1976. function DecodeStream(buffer) {
  1977. this.buffer = buffer;
  1978. this.pos = 0;
  1979. this.length = this.buffer.length;
  1980. }
  1981. var _proto = DecodeStream.prototype;
  1982. _proto.readString = function readString(length, encoding) {
  1983. if (encoding === void 0) {
  1984. encoding = 'ascii';
  1985. }
  1986. switch (encoding) {
  1987. case 'utf16le':
  1988. case 'ucs2':
  1989. case 'utf8':
  1990. case 'ascii':
  1991. return this.buffer.toString(encoding, this.pos, this.pos += length);
  1992. case 'utf16be':
  1993. var buf = Buffer.from(this.readBuffer(length)); // swap the bytes
  1994. for (var i = 0, end = buf.length - 1; i < end; i += 2) {
  1995. var byte = buf[i];
  1996. buf[i] = buf[i + 1];
  1997. buf[i + 1] = byte;
  1998. }
  1999. return buf.toString('utf16le');
  2000. default:
  2001. buf = this.readBuffer(length);
  2002. if (iconv) {
  2003. try {
  2004. return iconv.decode(buf, encoding);
  2005. } catch (error1) {}
  2006. }
  2007. return buf;
  2008. }
  2009. };
  2010. _proto.readBuffer = function readBuffer(length) {
  2011. return this.buffer.slice(this.pos, this.pos += length);
  2012. };
  2013. _proto.readUInt24BE = function readUInt24BE() {
  2014. return (this.readUInt16BE() << 8) + this.readUInt8();
  2015. };
  2016. _proto.readUInt24LE = function readUInt24LE() {
  2017. return this.readUInt16LE() + (this.readUInt8() << 16);
  2018. };
  2019. _proto.readInt24BE = function readInt24BE() {
  2020. return (this.readInt16BE() << 8) + this.readUInt8();
  2021. };
  2022. _proto.readInt24LE = function readInt24LE() {
  2023. return this.readUInt16LE() + (this.readInt8() << 16);
  2024. };
  2025. return DecodeStream;
  2026. }();
  2027. DecodeStream.TYPES = {
  2028. UInt8: 1,
  2029. UInt16: 2,
  2030. UInt24: 3,
  2031. UInt32: 4,
  2032. Int8: 1,
  2033. Int16: 2,
  2034. Int24: 3,
  2035. Int32: 4,
  2036. Float: 4,
  2037. Double: 8
  2038. };
  2039. var _loop = function _loop(key) {
  2040. if (key.slice(0, 4) === 'read') {
  2041. var bytes = DecodeStream.TYPES[key.replace(/read|[BL]E/g, '')];
  2042. DecodeStream.prototype[key] = function () {
  2043. var ret = this.buffer[key](this.pos);
  2044. this.pos += bytes;
  2045. return ret;
  2046. };
  2047. }
  2048. };
  2049. for (var key in Buffer.prototype) {
  2050. _loop(key);
  2051. }
  2052. module.exports = DecodeStream;
  2053. /***/ }),
  2054. /***/ 9126:
  2055. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2056. "use strict";
  2057. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  2058. __webpack_require__(7042);
  2059. __webpack_require__(3290);
  2060. __webpack_require__(4916);
  2061. __webpack_require__(5306);
  2062. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
  2063. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  2064. var iconv;
  2065. var stream = __webpack_require__(2830);
  2066. var DecodeStream = __webpack_require__(3030);
  2067. try {
  2068. iconv = __webpack_require__(4914);
  2069. } catch (error) {}
  2070. var EncodeStream = /*#__PURE__*/function (_stream$Readable) {
  2071. _inheritsLoose(EncodeStream, _stream$Readable);
  2072. function EncodeStream(bufferSize) {
  2073. var _this;
  2074. if (bufferSize === void 0) {
  2075. bufferSize = 65536;
  2076. }
  2077. _this = _stream$Readable.apply(this, arguments) || this;
  2078. _this.buffer = Buffer.alloc(bufferSize);
  2079. _this.bufferOffset = 0;
  2080. _this.pos = 0;
  2081. return _this;
  2082. } // do nothing, required by node
  2083. var _proto = EncodeStream.prototype;
  2084. _proto._read = function _read() {};
  2085. _proto.ensure = function ensure(bytes) {
  2086. if (this.bufferOffset + bytes > this.buffer.length) {
  2087. return this.flush();
  2088. }
  2089. };
  2090. _proto.flush = function flush() {
  2091. if (this.bufferOffset > 0) {
  2092. this.push(Buffer.from(this.buffer.slice(0, this.bufferOffset)));
  2093. return this.bufferOffset = 0;
  2094. }
  2095. };
  2096. _proto.writeBuffer = function writeBuffer(buffer) {
  2097. this.flush();
  2098. this.push(buffer);
  2099. return this.pos += buffer.length;
  2100. };
  2101. _proto.writeString = function writeString(string, encoding) {
  2102. if (encoding === void 0) {
  2103. encoding = 'ascii';
  2104. }
  2105. switch (encoding) {
  2106. case 'utf16le':
  2107. case 'ucs2':
  2108. case 'utf8':
  2109. case 'ascii':
  2110. return this.writeBuffer(Buffer.from(string, encoding));
  2111. case 'utf16be':
  2112. var buf = Buffer.from(string, 'utf16le'); // swap the bytes
  2113. for (var i = 0, end = buf.length - 1; i < end; i += 2) {
  2114. var byte = buf[i];
  2115. buf[i] = buf[i + 1];
  2116. buf[i + 1] = byte;
  2117. }
  2118. return this.writeBuffer(buf);
  2119. default:
  2120. if (iconv) {
  2121. return this.writeBuffer(iconv.encode(string, encoding));
  2122. } else {
  2123. throw new Error('Install iconv-lite to enable additional string encodings.');
  2124. }
  2125. }
  2126. };
  2127. _proto.writeUInt24BE = function writeUInt24BE(val) {
  2128. this.ensure(3);
  2129. this.buffer[this.bufferOffset++] = val >>> 16 & 0xff;
  2130. this.buffer[this.bufferOffset++] = val >>> 8 & 0xff;
  2131. this.buffer[this.bufferOffset++] = val & 0xff;
  2132. return this.pos += 3;
  2133. };
  2134. _proto.writeUInt24LE = function writeUInt24LE(val) {
  2135. this.ensure(3);
  2136. this.buffer[this.bufferOffset++] = val & 0xff;
  2137. this.buffer[this.bufferOffset++] = val >>> 8 & 0xff;
  2138. this.buffer[this.bufferOffset++] = val >>> 16 & 0xff;
  2139. return this.pos += 3;
  2140. };
  2141. _proto.writeInt24BE = function writeInt24BE(val) {
  2142. if (val >= 0) {
  2143. return this.writeUInt24BE(val);
  2144. } else {
  2145. return this.writeUInt24BE(val + 0xffffff + 1);
  2146. }
  2147. };
  2148. _proto.writeInt24LE = function writeInt24LE(val) {
  2149. if (val >= 0) {
  2150. return this.writeUInt24LE(val);
  2151. } else {
  2152. return this.writeUInt24LE(val + 0xffffff + 1);
  2153. }
  2154. };
  2155. _proto.fill = function fill(val, length) {
  2156. if (length < this.buffer.length) {
  2157. this.ensure(length);
  2158. this.buffer.fill(val, this.bufferOffset, this.bufferOffset + length);
  2159. this.bufferOffset += length;
  2160. return this.pos += length;
  2161. } else {
  2162. var buf = Buffer.alloc(length);
  2163. buf.fill(val);
  2164. return this.writeBuffer(buf);
  2165. }
  2166. };
  2167. _proto.end = function end() {
  2168. this.flush();
  2169. return this.push(null);
  2170. };
  2171. return EncodeStream;
  2172. }(stream.Readable);
  2173. var _loop = function _loop(key) {
  2174. if (key.slice(0, 5) === 'write') {
  2175. var bytes = +DecodeStream.TYPES[key.replace(/write|[BL]E/g, '')];
  2176. EncodeStream.prototype[key] = function (value) {
  2177. this.ensure(bytes);
  2178. this.buffer[key](value, this.bufferOffset);
  2179. this.bufferOffset += bytes;
  2180. return this.pos += bytes;
  2181. };
  2182. }
  2183. };
  2184. for (var key in Buffer.prototype) {
  2185. _loop(key);
  2186. }
  2187. module.exports = EncodeStream;
  2188. /***/ }),
  2189. /***/ 3100:
  2190. /***/ (function(module) {
  2191. "use strict";
  2192. var Enum = /*#__PURE__*/function () {
  2193. function Enum(type, options) {
  2194. if (options === void 0) {
  2195. options = [];
  2196. }
  2197. this.type = type;
  2198. this.options = options;
  2199. }
  2200. var _proto = Enum.prototype;
  2201. _proto.decode = function decode(stream) {
  2202. var index = this.type.decode(stream);
  2203. return this.options[index] || index;
  2204. };
  2205. _proto.size = function size() {
  2206. return this.type.size();
  2207. };
  2208. _proto.encode = function encode(stream, val) {
  2209. var index = this.options.indexOf(val);
  2210. if (index === -1) {
  2211. throw new Error("Unknown option in enum: " + val);
  2212. }
  2213. return this.type.encode(stream, index);
  2214. };
  2215. return Enum;
  2216. }();
  2217. module.exports = Enum;
  2218. /***/ }),
  2219. /***/ 6768:
  2220. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2221. "use strict";
  2222. __webpack_require__(1539);
  2223. __webpack_require__(8674);
  2224. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
  2225. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  2226. var ArrayT = __webpack_require__(1988);
  2227. var _require = __webpack_require__(6462),
  2228. NumberT = _require.Number;
  2229. var utils = __webpack_require__(6610);
  2230. var _require2 = __webpack_require__(9539),
  2231. _inspect = _require2.inspect;
  2232. var LazyArrayT = /*#__PURE__*/function (_ArrayT) {
  2233. _inheritsLoose(LazyArrayT, _ArrayT);
  2234. function LazyArrayT() {
  2235. return _ArrayT.apply(this, arguments) || this;
  2236. }
  2237. var _proto = LazyArrayT.prototype;
  2238. _proto.decode = function decode(stream, parent) {
  2239. var pos = stream.pos;
  2240. var length = utils.resolveLength(this.length, stream, parent);
  2241. if (this.length instanceof NumberT) {
  2242. parent = {
  2243. parent: parent,
  2244. _startOffset: pos,
  2245. _currentOffset: 0,
  2246. _length: length
  2247. };
  2248. }
  2249. var res = new LazyArray(this.type, length, stream, parent);
  2250. stream.pos += length * this.type.size(null, parent);
  2251. return res;
  2252. };
  2253. _proto.size = function size(val, ctx) {
  2254. if (val instanceof LazyArray) {
  2255. val = val.toArray();
  2256. }
  2257. return _ArrayT.prototype.size.call(this, val, ctx);
  2258. };
  2259. _proto.encode = function encode(stream, val, ctx) {
  2260. if (val instanceof LazyArray) {
  2261. val = val.toArray();
  2262. }
  2263. return _ArrayT.prototype.encode.call(this, stream, val, ctx);
  2264. };
  2265. return LazyArrayT;
  2266. }(ArrayT);
  2267. var LazyArray = /*#__PURE__*/function () {
  2268. function LazyArray(type, length, stream, ctx) {
  2269. this.type = type;
  2270. this.length = length;
  2271. this.stream = stream;
  2272. this.ctx = ctx;
  2273. this.base = this.stream.pos;
  2274. this.items = [];
  2275. }
  2276. var _proto2 = LazyArray.prototype;
  2277. _proto2.get = function get(index) {
  2278. if (index < 0 || index >= this.length) {
  2279. return undefined;
  2280. }
  2281. if (this.items[index] == null) {
  2282. var pos = this.stream.pos;
  2283. this.stream.pos = this.base + this.type.size(null, this.ctx) * index;
  2284. this.items[index] = this.type.decode(this.stream, this.ctx);
  2285. this.stream.pos = pos;
  2286. }
  2287. return this.items[index];
  2288. };
  2289. _proto2.toArray = function toArray() {
  2290. var result = [];
  2291. for (var i = 0, end = this.length; i < end; i++) {
  2292. result.push(this.get(i));
  2293. }
  2294. return result;
  2295. };
  2296. _proto2.inspect = function inspect() {
  2297. return _inspect(this.toArray());
  2298. };
  2299. return LazyArray;
  2300. }();
  2301. module.exports = LazyArrayT;
  2302. /***/ }),
  2303. /***/ 6462:
  2304. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2305. "use strict";
  2306. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
  2307. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  2308. var DecodeStream = __webpack_require__(3030);
  2309. var NumberT = /*#__PURE__*/function () {
  2310. function NumberT(type, endian) {
  2311. if (endian === void 0) {
  2312. endian = 'BE';
  2313. }
  2314. this.type = type;
  2315. this.endian = endian;
  2316. this.fn = this.type;
  2317. if (this.type[this.type.length - 1] !== '8') {
  2318. this.fn += this.endian;
  2319. }
  2320. }
  2321. var _proto = NumberT.prototype;
  2322. _proto.size = function size() {
  2323. return DecodeStream.TYPES[this.type];
  2324. };
  2325. _proto.decode = function decode(stream) {
  2326. return stream["read" + this.fn]();
  2327. };
  2328. _proto.encode = function encode(stream, val) {
  2329. return stream["write" + this.fn](val);
  2330. };
  2331. return NumberT;
  2332. }();
  2333. exports.Number = NumberT;
  2334. exports.uint8 = new NumberT('UInt8');
  2335. exports.uint16be = exports.uint16 = new NumberT('UInt16', 'BE');
  2336. exports.uint16le = new NumberT('UInt16', 'LE');
  2337. exports.uint24be = exports.uint24 = new NumberT('UInt24', 'BE');
  2338. exports.uint24le = new NumberT('UInt24', 'LE');
  2339. exports.uint32be = exports.uint32 = new NumberT('UInt32', 'BE');
  2340. exports.uint32le = new NumberT('UInt32', 'LE');
  2341. exports.int8 = new NumberT('Int8');
  2342. exports.int16be = exports.int16 = new NumberT('Int16', 'BE');
  2343. exports.int16le = new NumberT('Int16', 'LE');
  2344. exports.int24be = exports.int24 = new NumberT('Int24', 'BE');
  2345. exports.int24le = new NumberT('Int24', 'LE');
  2346. exports.int32be = exports.int32 = new NumberT('Int32', 'BE');
  2347. exports.int32le = new NumberT('Int32', 'LE');
  2348. exports.floatbe = exports.float = new NumberT('Float', 'BE');
  2349. exports.floatle = new NumberT('Float', 'LE');
  2350. exports.doublebe = exports.double = new NumberT('Double', 'BE');
  2351. exports.doublele = new NumberT('Double', 'LE');
  2352. var Fixed = /*#__PURE__*/function (_NumberT) {
  2353. _inheritsLoose(Fixed, _NumberT);
  2354. function Fixed(size, endian, fracBits) {
  2355. var _this;
  2356. if (fracBits === void 0) {
  2357. fracBits = size >> 1;
  2358. }
  2359. _this = _NumberT.call(this, "Int" + size, endian) || this;
  2360. _this._point = 1 << fracBits;
  2361. return _this;
  2362. }
  2363. var _proto2 = Fixed.prototype;
  2364. _proto2.decode = function decode(stream) {
  2365. return _NumberT.prototype.decode.call(this, stream) / this._point;
  2366. };
  2367. _proto2.encode = function encode(stream, val) {
  2368. return _NumberT.prototype.encode.call(this, stream, val * this._point | 0);
  2369. };
  2370. return Fixed;
  2371. }(NumberT);
  2372. exports.Fixed = Fixed;
  2373. exports.fixed16be = exports.fixed16 = new Fixed(16, 'BE');
  2374. exports.fixed16le = new Fixed(16, 'LE');
  2375. exports.fixed32be = exports.fixed32 = new Fixed(32, 'BE');
  2376. exports.fixed32le = new Fixed(32, 'LE');
  2377. /***/ }),
  2378. /***/ 9541:
  2379. /***/ (function(module) {
  2380. "use strict";
  2381. var Optional = /*#__PURE__*/function () {
  2382. function Optional(type, condition) {
  2383. if (condition === void 0) {
  2384. condition = true;
  2385. }
  2386. this.type = type;
  2387. this.condition = condition;
  2388. }
  2389. var _proto = Optional.prototype;
  2390. _proto.decode = function decode(stream, parent) {
  2391. var condition = this.condition;
  2392. if (typeof condition === 'function') {
  2393. condition = condition.call(parent, parent);
  2394. }
  2395. if (condition) {
  2396. return this.type.decode(stream, parent);
  2397. }
  2398. };
  2399. _proto.size = function size(val, parent) {
  2400. var condition = this.condition;
  2401. if (typeof condition === 'function') {
  2402. condition = condition.call(parent, parent);
  2403. }
  2404. if (condition) {
  2405. return this.type.size(val, parent);
  2406. } else {
  2407. return 0;
  2408. }
  2409. };
  2410. _proto.encode = function encode(stream, val, parent) {
  2411. var condition = this.condition;
  2412. if (typeof condition === 'function') {
  2413. condition = condition.call(parent, parent);
  2414. }
  2415. if (condition) {
  2416. return this.type.encode(stream, val, parent);
  2417. }
  2418. };
  2419. return Optional;
  2420. }();
  2421. module.exports = Optional;
  2422. /***/ }),
  2423. /***/ 8011:
  2424. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2425. "use strict";
  2426. var utils = __webpack_require__(6610);
  2427. var Pointer = /*#__PURE__*/function () {
  2428. function Pointer(offsetType, type, options) {
  2429. if (options === void 0) {
  2430. options = {};
  2431. }
  2432. this.offsetType = offsetType;
  2433. this.type = type;
  2434. this.options = options;
  2435. if (this.type === 'void') {
  2436. this.type = null;
  2437. }
  2438. if (this.options.type == null) {
  2439. this.options.type = 'local';
  2440. }
  2441. if (this.options.allowNull == null) {
  2442. this.options.allowNull = true;
  2443. }
  2444. if (this.options.nullValue == null) {
  2445. this.options.nullValue = 0;
  2446. }
  2447. if (this.options.lazy == null) {
  2448. this.options.lazy = false;
  2449. }
  2450. if (this.options.relativeTo) {
  2451. if (typeof this.options.relativeTo !== 'function') {
  2452. throw new Error('relativeTo option must be a function');
  2453. }
  2454. this.relativeToGetter = options.relativeTo;
  2455. }
  2456. }
  2457. var _proto = Pointer.prototype;
  2458. _proto.decode = function decode(stream, ctx) {
  2459. var _this = this;
  2460. var offset = this.offsetType.decode(stream, ctx); // handle NULL pointers
  2461. if (offset === this.options.nullValue && this.options.allowNull) {
  2462. return null;
  2463. }
  2464. var relative;
  2465. switch (this.options.type) {
  2466. case 'local':
  2467. relative = ctx._startOffset;
  2468. break;
  2469. case 'immediate':
  2470. relative = stream.pos - this.offsetType.size();
  2471. break;
  2472. case 'parent':
  2473. relative = ctx.parent._startOffset;
  2474. break;
  2475. default:
  2476. var c = ctx;
  2477. while (c.parent) {
  2478. c = c.parent;
  2479. }
  2480. relative = c._startOffset || 0;
  2481. }
  2482. if (this.options.relativeTo) {
  2483. relative += this.relativeToGetter(ctx);
  2484. }
  2485. var ptr = offset + relative;
  2486. if (this.type != null) {
  2487. var val = null;
  2488. var decodeValue = function decodeValue() {
  2489. if (val != null) {
  2490. return val;
  2491. }
  2492. var pos = stream.pos;
  2493. stream.pos = ptr;
  2494. val = _this.type.decode(stream, ctx);
  2495. stream.pos = pos;
  2496. return val;
  2497. }; // If this is a lazy pointer, define a getter to decode only when needed.
  2498. // This obviously only works when the pointer is contained by a Struct.
  2499. if (this.options.lazy) {
  2500. return new utils.PropertyDescriptor({
  2501. get: decodeValue
  2502. });
  2503. }
  2504. return decodeValue();
  2505. } else {
  2506. return ptr;
  2507. }
  2508. };
  2509. _proto.size = function size(val, ctx) {
  2510. var parent = ctx;
  2511. switch (this.options.type) {
  2512. case 'local':
  2513. case 'immediate':
  2514. break;
  2515. case 'parent':
  2516. ctx = ctx.parent;
  2517. break;
  2518. default:
  2519. // global
  2520. while (ctx.parent) {
  2521. ctx = ctx.parent;
  2522. }
  2523. }
  2524. var type = this.type;
  2525. if (type == null) {
  2526. if (!(val instanceof VoidPointer)) {
  2527. throw new Error("Must be a VoidPointer");
  2528. }
  2529. var _val = val;
  2530. type = _val.type;
  2531. val = val.value;
  2532. }
  2533. if (val && ctx) {
  2534. ctx.pointerSize += type.size(val, parent);
  2535. }
  2536. return this.offsetType.size();
  2537. };
  2538. _proto.encode = function encode(stream, val, ctx) {
  2539. var relative;
  2540. var parent = ctx;
  2541. if (val == null) {
  2542. this.offsetType.encode(stream, this.options.nullValue);
  2543. return;
  2544. }
  2545. switch (this.options.type) {
  2546. case 'local':
  2547. relative = ctx.startOffset;
  2548. break;
  2549. case 'immediate':
  2550. relative = stream.pos + this.offsetType.size(val, parent);
  2551. break;
  2552. case 'parent':
  2553. ctx = ctx.parent;
  2554. relative = ctx.startOffset;
  2555. break;
  2556. default:
  2557. // global
  2558. relative = 0;
  2559. while (ctx.parent) {
  2560. ctx = ctx.parent;
  2561. }
  2562. }
  2563. if (this.options.relativeTo) {
  2564. relative += this.relativeToGetter(parent.val);
  2565. }
  2566. this.offsetType.encode(stream, ctx.pointerOffset - relative);
  2567. var type = this.type;
  2568. if (type == null) {
  2569. if (!(val instanceof VoidPointer)) {
  2570. throw new Error("Must be a VoidPointer");
  2571. }
  2572. var _val2 = val;
  2573. type = _val2.type;
  2574. val = val.value;
  2575. }
  2576. ctx.pointers.push({
  2577. type: type,
  2578. val: val,
  2579. parent: parent
  2580. });
  2581. return ctx.pointerOffset += type.size(val, parent);
  2582. };
  2583. return Pointer;
  2584. }(); // A pointer whose type is determined at decode time
  2585. var VoidPointer = function VoidPointer(type, value) {
  2586. this.type = type;
  2587. this.value = value;
  2588. };
  2589. exports.Pointer = Pointer;
  2590. exports.VoidPointer = VoidPointer;
  2591. /***/ }),
  2592. /***/ 7468:
  2593. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2594. "use strict";
  2595. __webpack_require__(3290);
  2596. var utils = __webpack_require__(6610);
  2597. var Reserved = /*#__PURE__*/function () {
  2598. function Reserved(type, count) {
  2599. if (count === void 0) {
  2600. count = 1;
  2601. }
  2602. this.type = type;
  2603. this.count = count;
  2604. }
  2605. var _proto = Reserved.prototype;
  2606. _proto.decode = function decode(stream, parent) {
  2607. stream.pos += this.size(null, parent);
  2608. return undefined;
  2609. };
  2610. _proto.size = function size(data, parent) {
  2611. var count = utils.resolveLength(this.count, null, parent);
  2612. return this.type.size() * count;
  2613. };
  2614. _proto.encode = function encode(stream, val, parent) {
  2615. return stream.fill(0, this.size(val, parent));
  2616. };
  2617. return Reserved;
  2618. }();
  2619. module.exports = Reserved;
  2620. /***/ }),
  2621. /***/ 1466:
  2622. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2623. "use strict";
  2624. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  2625. var _require = __webpack_require__(6462),
  2626. NumberT = _require.Number;
  2627. var utils = __webpack_require__(6610);
  2628. var StringT = /*#__PURE__*/function () {
  2629. function StringT(length, encoding) {
  2630. if (encoding === void 0) {
  2631. encoding = 'ascii';
  2632. }
  2633. this.length = length;
  2634. this.encoding = encoding;
  2635. }
  2636. var _proto = StringT.prototype;
  2637. _proto.decode = function decode(stream, parent) {
  2638. var length, pos;
  2639. if (this.length != null) {
  2640. length = utils.resolveLength(this.length, stream, parent);
  2641. } else {
  2642. var buffer;
  2643. buffer = stream.buffer;
  2644. length = stream.length;
  2645. pos = stream.pos;
  2646. while (pos < length && buffer[pos] !== 0x00) {
  2647. ++pos;
  2648. }
  2649. length = pos - stream.pos;
  2650. }
  2651. var encoding = this.encoding;
  2652. if (typeof encoding === 'function') {
  2653. encoding = encoding.call(parent, parent) || 'ascii';
  2654. }
  2655. var string = stream.readString(length, encoding);
  2656. if (this.length == null && stream.pos < stream.length) {
  2657. stream.pos++;
  2658. }
  2659. return string;
  2660. };
  2661. _proto.size = function size(val, parent) {
  2662. // Use the defined value if no value was given
  2663. if (!val) {
  2664. return utils.resolveLength(this.length, null, parent);
  2665. }
  2666. var encoding = this.encoding;
  2667. if (typeof encoding === 'function') {
  2668. encoding = encoding.call(parent != null ? parent.val : undefined, parent != null ? parent.val : undefined) || 'ascii';
  2669. }
  2670. if (encoding === 'utf16be') {
  2671. encoding = 'utf16le';
  2672. }
  2673. var size = Buffer.byteLength(val, encoding);
  2674. if (this.length instanceof NumberT) {
  2675. size += this.length.size();
  2676. }
  2677. if (this.length == null) {
  2678. size++;
  2679. }
  2680. return size;
  2681. };
  2682. _proto.encode = function encode(stream, val, parent) {
  2683. var encoding = this.encoding;
  2684. if (typeof encoding === 'function') {
  2685. encoding = encoding.call(parent != null ? parent.val : undefined, parent != null ? parent.val : undefined) || 'ascii';
  2686. }
  2687. if (this.length instanceof NumberT) {
  2688. this.length.encode(stream, Buffer.byteLength(val, encoding));
  2689. }
  2690. stream.writeString(val, encoding);
  2691. if (this.length == null) {
  2692. return stream.writeUInt8(0x00);
  2693. }
  2694. };
  2695. return StringT;
  2696. }();
  2697. module.exports = StringT;
  2698. /***/ }),
  2699. /***/ 1219:
  2700. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2701. "use strict";
  2702. var utils = __webpack_require__(6610);
  2703. var Struct = /*#__PURE__*/function () {
  2704. function Struct(fields) {
  2705. if (fields === void 0) {
  2706. fields = {};
  2707. }
  2708. this.fields = fields;
  2709. }
  2710. var _proto = Struct.prototype;
  2711. _proto.decode = function decode(stream, parent, length) {
  2712. if (length === void 0) {
  2713. length = 0;
  2714. }
  2715. var res = this._setup(stream, parent, length);
  2716. this._parseFields(stream, res, this.fields);
  2717. if (this.process != null) {
  2718. this.process.call(res, stream);
  2719. }
  2720. return res;
  2721. };
  2722. _proto._setup = function _setup(stream, parent, length) {
  2723. var res = {}; // define hidden properties
  2724. Object.defineProperties(res, {
  2725. parent: {
  2726. value: parent
  2727. },
  2728. _startOffset: {
  2729. value: stream.pos
  2730. },
  2731. _currentOffset: {
  2732. value: 0,
  2733. writable: true
  2734. },
  2735. _length: {
  2736. value: length
  2737. }
  2738. });
  2739. return res;
  2740. };
  2741. _proto._parseFields = function _parseFields(stream, res, fields) {
  2742. for (var key in fields) {
  2743. var val;
  2744. var type = fields[key];
  2745. if (typeof type === 'function') {
  2746. val = type.call(res, res);
  2747. } else {
  2748. val = type.decode(stream, res);
  2749. }
  2750. if (val !== undefined) {
  2751. if (val instanceof utils.PropertyDescriptor) {
  2752. Object.defineProperty(res, key, val);
  2753. } else {
  2754. res[key] = val;
  2755. }
  2756. }
  2757. res._currentOffset = stream.pos - res._startOffset;
  2758. }
  2759. };
  2760. _proto.size = function size(val, parent, includePointers) {
  2761. if (val == null) {
  2762. val = {};
  2763. }
  2764. if (includePointers == null) {
  2765. includePointers = true;
  2766. }
  2767. var ctx = {
  2768. parent: parent,
  2769. val: val,
  2770. pointerSize: 0
  2771. };
  2772. var size = 0;
  2773. for (var key in this.fields) {
  2774. var type = this.fields[key];
  2775. if (type.size != null) {
  2776. size += type.size(val[key], ctx);
  2777. }
  2778. }
  2779. if (includePointers) {
  2780. size += ctx.pointerSize;
  2781. }
  2782. return size;
  2783. };
  2784. _proto.encode = function encode(stream, val, parent) {
  2785. var type;
  2786. if (this.preEncode != null) {
  2787. this.preEncode.call(val, stream);
  2788. }
  2789. var ctx = {
  2790. pointers: [],
  2791. startOffset: stream.pos,
  2792. parent: parent,
  2793. val: val,
  2794. pointerSize: 0
  2795. };
  2796. ctx.pointerOffset = stream.pos + this.size(val, ctx, false);
  2797. for (var key in this.fields) {
  2798. type = this.fields[key];
  2799. if (type.encode != null) {
  2800. type.encode(stream, val[key], ctx);
  2801. }
  2802. }
  2803. var i = 0;
  2804. while (i < ctx.pointers.length) {
  2805. var ptr = ctx.pointers[i++];
  2806. ptr.type.encode(stream, ptr.val, ptr.parent);
  2807. }
  2808. };
  2809. return Struct;
  2810. }();
  2811. module.exports = Struct;
  2812. /***/ }),
  2813. /***/ 3585:
  2814. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  2815. "use strict";
  2816. __webpack_require__(1539);
  2817. __webpack_require__(4916);
  2818. __webpack_require__(3123);
  2819. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
  2820. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  2821. var Struct = __webpack_require__(1219);
  2822. var getPath = function getPath(object, pathArray) {
  2823. return pathArray.reduce(function (prevObj, key) {
  2824. return prevObj && prevObj[key];
  2825. }, object);
  2826. };
  2827. var VersionedStruct = /*#__PURE__*/function (_Struct) {
  2828. _inheritsLoose(VersionedStruct, _Struct);
  2829. function VersionedStruct(type, versions) {
  2830. var _this;
  2831. if (versions === void 0) {
  2832. versions = {};
  2833. }
  2834. _this = _Struct.call(this) || this;
  2835. _this.type = type;
  2836. _this.versions = versions;
  2837. if (typeof type === 'string') {
  2838. _this.versionPath = type.split('.');
  2839. }
  2840. return _this;
  2841. }
  2842. var _proto = VersionedStruct.prototype;
  2843. _proto.decode = function decode(stream, parent, length) {
  2844. if (length === void 0) {
  2845. length = 0;
  2846. }
  2847. var res = this._setup(stream, parent, length);
  2848. if (typeof this.type === 'string') {
  2849. res.version = getPath(parent, this.versionPath);
  2850. } else {
  2851. res.version = this.type.decode(stream);
  2852. }
  2853. if (this.versions.header) {
  2854. this._parseFields(stream, res, this.versions.header);
  2855. }
  2856. var fields = this.versions[res.version];
  2857. if (fields == null) {
  2858. throw new Error("Unknown version " + res.version);
  2859. }
  2860. if (fields instanceof VersionedStruct) {
  2861. return fields.decode(stream, parent);
  2862. }
  2863. this._parseFields(stream, res, fields);
  2864. if (this.process != null) {
  2865. this.process.call(res, stream);
  2866. }
  2867. return res;
  2868. };
  2869. _proto.size = function size(val, parent, includePointers) {
  2870. if (includePointers === void 0) {
  2871. includePointers = true;
  2872. }
  2873. var key, type;
  2874. if (!val) {
  2875. throw new Error('Not a fixed size');
  2876. }
  2877. var ctx = {
  2878. parent: parent,
  2879. val: val,
  2880. pointerSize: 0
  2881. };
  2882. var size = 0;
  2883. if (typeof this.type !== 'string') {
  2884. size += this.type.size(val.version, ctx);
  2885. }
  2886. if (this.versions.header) {
  2887. for (key in this.versions.header) {
  2888. type = this.versions.header[key];
  2889. if (type.size != null) {
  2890. size += type.size(val[key], ctx);
  2891. }
  2892. }
  2893. }
  2894. var fields = this.versions[val.version];
  2895. if (fields == null) {
  2896. throw new Error("Unknown version " + val.version);
  2897. }
  2898. for (key in fields) {
  2899. type = fields[key];
  2900. if (type.size != null) {
  2901. size += type.size(val[key], ctx);
  2902. }
  2903. }
  2904. if (includePointers) {
  2905. size += ctx.pointerSize;
  2906. }
  2907. return size;
  2908. };
  2909. _proto.encode = function encode(stream, val, parent) {
  2910. var key, type;
  2911. if (this.preEncode != null) {
  2912. this.preEncode.call(val, stream);
  2913. }
  2914. var ctx = {
  2915. pointers: [],
  2916. startOffset: stream.pos,
  2917. parent: parent,
  2918. val: val,
  2919. pointerSize: 0
  2920. };
  2921. ctx.pointerOffset = stream.pos + this.size(val, ctx, false);
  2922. if (typeof this.type !== 'string') {
  2923. this.type.encode(stream, val.version);
  2924. }
  2925. if (this.versions.header) {
  2926. for (key in this.versions.header) {
  2927. type = this.versions.header[key];
  2928. if (type.encode != null) {
  2929. type.encode(stream, val[key], ctx);
  2930. }
  2931. }
  2932. }
  2933. var fields = this.versions[val.version];
  2934. for (key in fields) {
  2935. type = fields[key];
  2936. if (type.encode != null) {
  2937. type.encode(stream, val[key], ctx);
  2938. }
  2939. }
  2940. var i = 0;
  2941. while (i < ctx.pointers.length) {
  2942. var ptr = ctx.pointers[i++];
  2943. ptr.type.encode(stream, ptr.val, ptr.parent);
  2944. }
  2945. };
  2946. return VersionedStruct;
  2947. }(Struct);
  2948. module.exports = VersionedStruct;
  2949. /***/ }),
  2950. /***/ 6610:
  2951. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2952. "use strict";
  2953. var _require = __webpack_require__(6462),
  2954. NumberT = _require.Number;
  2955. exports.resolveLength = function (length, stream, parent) {
  2956. var res;
  2957. if (typeof length === 'number') {
  2958. res = length;
  2959. } else if (typeof length === 'function') {
  2960. res = length.call(parent, parent);
  2961. } else if (parent && typeof length === 'string') {
  2962. res = parent[length];
  2963. } else if (stream && length instanceof NumberT) {
  2964. res = length.decode(stream);
  2965. }
  2966. if (isNaN(res)) {
  2967. throw new Error('Not a fixed size');
  2968. }
  2969. return res;
  2970. };
  2971. var PropertyDescriptor = function PropertyDescriptor(opts) {
  2972. if (opts === void 0) {
  2973. opts = {};
  2974. }
  2975. this.enumerable = true;
  2976. this.configurable = true;
  2977. for (var key in opts) {
  2978. var val = opts[key];
  2979. this[key] = val;
  2980. }
  2981. };
  2982. exports.PropertyDescriptor = PropertyDescriptor;
  2983. /***/ }),
  2984. /***/ 8823:
  2985. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  2986. "use strict";
  2987. /*!
  2988. * The buffer module from node.js, for the browser.
  2989. *
  2990. * @author Feross Aboukhadijeh <https://feross.org>
  2991. * @license MIT
  2992. */
  2993. /* eslint-disable no-proto */
  2994. __webpack_require__(2526);
  2995. __webpack_require__(1817);
  2996. __webpack_require__(1539);
  2997. __webpack_require__(6992);
  2998. __webpack_require__(2472);
  2999. __webpack_require__(2990);
  3000. __webpack_require__(8927);
  3001. __webpack_require__(3105);
  3002. __webpack_require__(5035);
  3003. __webpack_require__(4345);
  3004. __webpack_require__(7174);
  3005. __webpack_require__(2846);
  3006. __webpack_require__(4731);
  3007. __webpack_require__(7209);
  3008. __webpack_require__(6319);
  3009. __webpack_require__(8867);
  3010. __webpack_require__(7789);
  3011. __webpack_require__(3739);
  3012. __webpack_require__(9368);
  3013. __webpack_require__(4483);
  3014. __webpack_require__(2056);
  3015. __webpack_require__(3462);
  3016. __webpack_require__(678);
  3017. __webpack_require__(7462);
  3018. __webpack_require__(3824);
  3019. __webpack_require__(5021);
  3020. __webpack_require__(2974);
  3021. __webpack_require__(5016);
  3022. __webpack_require__(7803);
  3023. __webpack_require__(6649);
  3024. __webpack_require__(6078);
  3025. __webpack_require__(3290);
  3026. __webpack_require__(7042);
  3027. __webpack_require__(2222);
  3028. __webpack_require__(9714);
  3029. __webpack_require__(3210);
  3030. __webpack_require__(4916);
  3031. __webpack_require__(5306);
  3032. __webpack_require__(6699);
  3033. __webpack_require__(2023);
  3034. __webpack_require__(9653);
  3035. __webpack_require__(3753);
  3036. __webpack_require__(545);
  3037. __webpack_require__(8309);
  3038. __webpack_require__(3161);
  3039. __webpack_require__(3123);
  3040. 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); } }
  3041. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  3042. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  3043. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
  3044. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  3045. var base64 = __webpack_require__(9742);
  3046. var ieee754 = __webpack_require__(645);
  3047. var customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation
  3048. ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
  3049. : null;
  3050. exports.Buffer = Buffer;
  3051. exports.SlowBuffer = SlowBuffer;
  3052. exports.INSPECT_MAX_BYTES = 50;
  3053. var K_MAX_LENGTH = 0x7fffffff;
  3054. exports.kMaxLength = K_MAX_LENGTH;
  3055. /**
  3056. * If `Buffer.TYPED_ARRAY_SUPPORT`:
  3057. * === true Use Uint8Array implementation (fastest)
  3058. * === false Print warning and recommend using `buffer` v4.x which has an Object
  3059. * implementation (most compatible, even IE6)
  3060. *
  3061. * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
  3062. * Opera 11.6+, iOS 4.2+.
  3063. *
  3064. * We report that the browser does not support typed arrays if the are not subclassable
  3065. * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
  3066. * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support
  3067. * for __proto__ and has a buggy typed array implementation.
  3068. */
  3069. Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport();
  3070. if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') {
  3071. 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.');
  3072. }
  3073. function typedArraySupport() {
  3074. // Can typed array instances can be augmented?
  3075. try {
  3076. var arr = new Uint8Array(1);
  3077. var proto = {
  3078. foo: function foo() {
  3079. return 42;
  3080. }
  3081. };
  3082. Object.setPrototypeOf(proto, Uint8Array.prototype);
  3083. Object.setPrototypeOf(arr, proto);
  3084. return arr.foo() === 42;
  3085. } catch (e) {
  3086. return false;
  3087. }
  3088. }
  3089. Object.defineProperty(Buffer.prototype, 'parent', {
  3090. enumerable: true,
  3091. get: function get() {
  3092. if (!Buffer.isBuffer(this)) return undefined;
  3093. return this.buffer;
  3094. }
  3095. });
  3096. Object.defineProperty(Buffer.prototype, 'offset', {
  3097. enumerable: true,
  3098. get: function get() {
  3099. if (!Buffer.isBuffer(this)) return undefined;
  3100. return this.byteOffset;
  3101. }
  3102. });
  3103. function createBuffer(length) {
  3104. if (length > K_MAX_LENGTH) {
  3105. throw new RangeError('The value "' + length + '" is invalid for option "size"');
  3106. } // Return an augmented `Uint8Array` instance
  3107. var buf = new Uint8Array(length);
  3108. Object.setPrototypeOf(buf, Buffer.prototype);
  3109. return buf;
  3110. }
  3111. /**
  3112. * The Buffer constructor returns instances of `Uint8Array` that have their
  3113. * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
  3114. * `Uint8Array`, so the returned instances will have all the node `Buffer` methods
  3115. * and the `Uint8Array` methods. Square bracket notation works as expected -- it
  3116. * returns a single octet.
  3117. *
  3118. * The `Uint8Array` prototype remains unmodified.
  3119. */
  3120. function Buffer(arg, encodingOrOffset, length) {
  3121. // Common case.
  3122. if (typeof arg === 'number') {
  3123. if (typeof encodingOrOffset === 'string') {
  3124. throw new TypeError('The "string" argument must be of type string. Received type number');
  3125. }
  3126. return allocUnsafe(arg);
  3127. }
  3128. return from(arg, encodingOrOffset, length);
  3129. }
  3130. Buffer.poolSize = 8192; // not used by this implementation
  3131. function from(value, encodingOrOffset, length) {
  3132. if (typeof value === 'string') {
  3133. return fromString(value, encodingOrOffset);
  3134. }
  3135. if (ArrayBuffer.isView(value)) {
  3136. return fromArrayView(value);
  3137. }
  3138. if (value == null) {
  3139. throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value);
  3140. }
  3141. if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) {
  3142. return fromArrayBuffer(value, encodingOrOffset, length);
  3143. }
  3144. if (typeof SharedArrayBuffer !== 'undefined' && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) {
  3145. return fromArrayBuffer(value, encodingOrOffset, length);
  3146. }
  3147. if (typeof value === 'number') {
  3148. throw new TypeError('The "value" argument must not be of type number. Received type number');
  3149. }
  3150. var valueOf = value.valueOf && value.valueOf();
  3151. if (valueOf != null && valueOf !== value) {
  3152. return Buffer.from(valueOf, encodingOrOffset, length);
  3153. }
  3154. var b = fromObject(value);
  3155. if (b) return b;
  3156. if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') {
  3157. return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length);
  3158. }
  3159. throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value);
  3160. }
  3161. /**
  3162. * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
  3163. * if value is a number.
  3164. * Buffer.from(str[, encoding])
  3165. * Buffer.from(array)
  3166. * Buffer.from(buffer)
  3167. * Buffer.from(arrayBuffer[, byteOffset[, length]])
  3168. **/
  3169. Buffer.from = function (value, encodingOrOffset, length) {
  3170. return from(value, encodingOrOffset, length);
  3171. }; // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
  3172. // https://github.com/feross/buffer/pull/148
  3173. Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype);
  3174. Object.setPrototypeOf(Buffer, Uint8Array);
  3175. function assertSize(size) {
  3176. if (typeof size !== 'number') {
  3177. throw new TypeError('"size" argument must be of type number');
  3178. } else if (size < 0) {
  3179. throw new RangeError('The value "' + size + '" is invalid for option "size"');
  3180. }
  3181. }
  3182. function alloc(size, fill, encoding) {
  3183. assertSize(size);
  3184. if (size <= 0) {
  3185. return createBuffer(size);
  3186. }
  3187. if (fill !== undefined) {
  3188. // Only pay attention to encoding if it's a string. This
  3189. // prevents accidentally sending in a number that would
  3190. // be interpreted as a start offset.
  3191. return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill);
  3192. }
  3193. return createBuffer(size);
  3194. }
  3195. /**
  3196. * Creates a new filled Buffer instance.
  3197. * alloc(size[, fill[, encoding]])
  3198. **/
  3199. Buffer.alloc = function (size, fill, encoding) {
  3200. return alloc(size, fill, encoding);
  3201. };
  3202. function allocUnsafe(size) {
  3203. assertSize(size);
  3204. return createBuffer(size < 0 ? 0 : checked(size) | 0);
  3205. }
  3206. /**
  3207. * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
  3208. * */
  3209. Buffer.allocUnsafe = function (size) {
  3210. return allocUnsafe(size);
  3211. };
  3212. /**
  3213. * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
  3214. */
  3215. Buffer.allocUnsafeSlow = function (size) {
  3216. return allocUnsafe(size);
  3217. };
  3218. function fromString(string, encoding) {
  3219. if (typeof encoding !== 'string' || encoding === '') {
  3220. encoding = 'utf8';
  3221. }
  3222. if (!Buffer.isEncoding(encoding)) {
  3223. throw new TypeError('Unknown encoding: ' + encoding);
  3224. }
  3225. var length = byteLength(string, encoding) | 0;
  3226. var buf = createBuffer(length);
  3227. var actual = buf.write(string, encoding);
  3228. if (actual !== length) {
  3229. // Writing a hex string, for example, that contains invalid characters will
  3230. // cause everything after the first invalid character to be ignored. (e.g.
  3231. // 'abxxcd' will be treated as 'ab')
  3232. buf = buf.slice(0, actual);
  3233. }
  3234. return buf;
  3235. }
  3236. function fromArrayLike(array) {
  3237. var length = array.length < 0 ? 0 : checked(array.length) | 0;
  3238. var buf = createBuffer(length);
  3239. for (var i = 0; i < length; i += 1) {
  3240. buf[i] = array[i] & 255;
  3241. }
  3242. return buf;
  3243. }
  3244. function fromArrayView(arrayView) {
  3245. if (isInstance(arrayView, Uint8Array)) {
  3246. var copy = new Uint8Array(arrayView);
  3247. return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength);
  3248. }
  3249. return fromArrayLike(arrayView);
  3250. }
  3251. function fromArrayBuffer(array, byteOffset, length) {
  3252. if (byteOffset < 0 || array.byteLength < byteOffset) {
  3253. throw new RangeError('"offset" is outside of buffer bounds');
  3254. }
  3255. if (array.byteLength < byteOffset + (length || 0)) {
  3256. throw new RangeError('"length" is outside of buffer bounds');
  3257. }
  3258. var buf;
  3259. if (byteOffset === undefined && length === undefined) {
  3260. buf = new Uint8Array(array);
  3261. } else if (length === undefined) {
  3262. buf = new Uint8Array(array, byteOffset);
  3263. } else {
  3264. buf = new Uint8Array(array, byteOffset, length);
  3265. } // Return an augmented `Uint8Array` instance
  3266. Object.setPrototypeOf(buf, Buffer.prototype);
  3267. return buf;
  3268. }
  3269. function fromObject(obj) {
  3270. if (Buffer.isBuffer(obj)) {
  3271. var len = checked(obj.length) | 0;
  3272. var buf = createBuffer(len);
  3273. if (buf.length === 0) {
  3274. return buf;
  3275. }
  3276. obj.copy(buf, 0, 0, len);
  3277. return buf;
  3278. }
  3279. if (obj.length !== undefined) {
  3280. if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {
  3281. return createBuffer(0);
  3282. }
  3283. return fromArrayLike(obj);
  3284. }
  3285. if (obj.type === 'Buffer' && Array.isArray(obj.data)) {
  3286. return fromArrayLike(obj.data);
  3287. }
  3288. }
  3289. function checked(length) {
  3290. // Note: cannot use `length < K_MAX_LENGTH` here because that fails when
  3291. // length is NaN (which is otherwise coerced to zero.)
  3292. if (length >= K_MAX_LENGTH) {
  3293. throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes');
  3294. }
  3295. return length | 0;
  3296. }
  3297. function SlowBuffer(length) {
  3298. if (+length != length) {
  3299. // eslint-disable-line eqeqeq
  3300. length = 0;
  3301. }
  3302. return Buffer.alloc(+length);
  3303. }
  3304. Buffer.isBuffer = function isBuffer(b) {
  3305. return b != null && b._isBuffer === true && b !== Buffer.prototype; // so Buffer.isBuffer(Buffer.prototype) will be false
  3306. };
  3307. Buffer.compare = function compare(a, b) {
  3308. if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength);
  3309. if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength);
  3310. if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
  3311. throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');
  3312. }
  3313. if (a === b) return 0;
  3314. var x = a.length;
  3315. var y = b.length;
  3316. for (var i = 0, len = Math.min(x, y); i < len; ++i) {
  3317. if (a[i] !== b[i]) {
  3318. x = a[i];
  3319. y = b[i];
  3320. break;
  3321. }
  3322. }
  3323. if (x < y) return -1;
  3324. if (y < x) return 1;
  3325. return 0;
  3326. };
  3327. Buffer.isEncoding = function isEncoding(encoding) {
  3328. switch (String(encoding).toLowerCase()) {
  3329. case 'hex':
  3330. case 'utf8':
  3331. case 'utf-8':
  3332. case 'ascii':
  3333. case 'latin1':
  3334. case 'binary':
  3335. case 'base64':
  3336. case 'ucs2':
  3337. case 'ucs-2':
  3338. case 'utf16le':
  3339. case 'utf-16le':
  3340. return true;
  3341. default:
  3342. return false;
  3343. }
  3344. };
  3345. Buffer.concat = function concat(list, length) {
  3346. if (!Array.isArray(list)) {
  3347. throw new TypeError('"list" argument must be an Array of Buffers');
  3348. }
  3349. if (list.length === 0) {
  3350. return Buffer.alloc(0);
  3351. }
  3352. var i;
  3353. if (length === undefined) {
  3354. length = 0;
  3355. for (i = 0; i < list.length; ++i) {
  3356. length += list[i].length;
  3357. }
  3358. }
  3359. var buffer = Buffer.allocUnsafe(length);
  3360. var pos = 0;
  3361. for (i = 0; i < list.length; ++i) {
  3362. var buf = list[i];
  3363. if (isInstance(buf, Uint8Array)) {
  3364. if (pos + buf.length > buffer.length) {
  3365. if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf);
  3366. buf.copy(buffer, pos);
  3367. } else {
  3368. Uint8Array.prototype.set.call(buffer, buf, pos);
  3369. }
  3370. } else if (!Buffer.isBuffer(buf)) {
  3371. throw new TypeError('"list" argument must be an Array of Buffers');
  3372. } else {
  3373. buf.copy(buffer, pos);
  3374. }
  3375. pos += buf.length;
  3376. }
  3377. return buffer;
  3378. };
  3379. function byteLength(string, encoding) {
  3380. if (Buffer.isBuffer(string)) {
  3381. return string.length;
  3382. }
  3383. if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {
  3384. return string.byteLength;
  3385. }
  3386. if (typeof string !== 'string') {
  3387. throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + typeof string);
  3388. }
  3389. var len = string.length;
  3390. var mustMatch = arguments.length > 2 && arguments[2] === true;
  3391. if (!mustMatch && len === 0) return 0; // Use a for loop to avoid recursion
  3392. var loweredCase = false;
  3393. for (;;) {
  3394. switch (encoding) {
  3395. case 'ascii':
  3396. case 'latin1':
  3397. case 'binary':
  3398. return len;
  3399. case 'utf8':
  3400. case 'utf-8':
  3401. return utf8ToBytes(string).length;
  3402. case 'ucs2':
  3403. case 'ucs-2':
  3404. case 'utf16le':
  3405. case 'utf-16le':
  3406. return len * 2;
  3407. case 'hex':
  3408. return len >>> 1;
  3409. case 'base64':
  3410. return base64ToBytes(string).length;
  3411. default:
  3412. if (loweredCase) {
  3413. return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8
  3414. }
  3415. encoding = ('' + encoding).toLowerCase();
  3416. loweredCase = true;
  3417. }
  3418. }
  3419. }
  3420. Buffer.byteLength = byteLength;
  3421. function slowToString(encoding, start, end) {
  3422. var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
  3423. // property of a typed array.
  3424. // This behaves neither like String nor Uint8Array in that we set start/end
  3425. // to their upper/lower bounds if the value passed is out of range.
  3426. // undefined is handled specially as per ECMA-262 6th Edition,
  3427. // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
  3428. if (start === undefined || start < 0) {
  3429. start = 0;
  3430. } // Return early if start > this.length. Done here to prevent potential uint32
  3431. // coercion fail below.
  3432. if (start > this.length) {
  3433. return '';
  3434. }
  3435. if (end === undefined || end > this.length) {
  3436. end = this.length;
  3437. }
  3438. if (end <= 0) {
  3439. return '';
  3440. } // Force coercion to uint32. This will also coerce falsey/NaN values to 0.
  3441. end >>>= 0;
  3442. start >>>= 0;
  3443. if (end <= start) {
  3444. return '';
  3445. }
  3446. if (!encoding) encoding = 'utf8';
  3447. while (true) {
  3448. switch (encoding) {
  3449. case 'hex':
  3450. return hexSlice(this, start, end);
  3451. case 'utf8':
  3452. case 'utf-8':
  3453. return utf8Slice(this, start, end);
  3454. case 'ascii':
  3455. return asciiSlice(this, start, end);
  3456. case 'latin1':
  3457. case 'binary':
  3458. return latin1Slice(this, start, end);
  3459. case 'base64':
  3460. return base64Slice(this, start, end);
  3461. case 'ucs2':
  3462. case 'ucs-2':
  3463. case 'utf16le':
  3464. case 'utf-16le':
  3465. return utf16leSlice(this, start, end);
  3466. default:
  3467. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  3468. encoding = (encoding + '').toLowerCase();
  3469. loweredCase = true;
  3470. }
  3471. }
  3472. } // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
  3473. // to detect a Buffer instance. It's not possible to use `instanceof Buffer`
  3474. // reliably in a browserify context because there could be multiple different
  3475. // copies of the 'buffer' package in use. This method works even for Buffer
  3476. // instances that were created from another copy of the `buffer` package.
  3477. // See: https://github.com/feross/buffer/issues/154
  3478. Buffer.prototype._isBuffer = true;
  3479. function swap(b, n, m) {
  3480. var i = b[n];
  3481. b[n] = b[m];
  3482. b[m] = i;
  3483. }
  3484. Buffer.prototype.swap16 = function swap16() {
  3485. var len = this.length;
  3486. if (len % 2 !== 0) {
  3487. throw new RangeError('Buffer size must be a multiple of 16-bits');
  3488. }
  3489. for (var i = 0; i < len; i += 2) {
  3490. swap(this, i, i + 1);
  3491. }
  3492. return this;
  3493. };
  3494. Buffer.prototype.swap32 = function swap32() {
  3495. var len = this.length;
  3496. if (len % 4 !== 0) {
  3497. throw new RangeError('Buffer size must be a multiple of 32-bits');
  3498. }
  3499. for (var i = 0; i < len; i += 4) {
  3500. swap(this, i, i + 3);
  3501. swap(this, i + 1, i + 2);
  3502. }
  3503. return this;
  3504. };
  3505. Buffer.prototype.swap64 = function swap64() {
  3506. var len = this.length;
  3507. if (len % 8 !== 0) {
  3508. throw new RangeError('Buffer size must be a multiple of 64-bits');
  3509. }
  3510. for (var i = 0; i < len; i += 8) {
  3511. swap(this, i, i + 7);
  3512. swap(this, i + 1, i + 6);
  3513. swap(this, i + 2, i + 5);
  3514. swap(this, i + 3, i + 4);
  3515. }
  3516. return this;
  3517. };
  3518. Buffer.prototype.toString = function toString() {
  3519. var length = this.length;
  3520. if (length === 0) return '';
  3521. if (arguments.length === 0) return utf8Slice(this, 0, length);
  3522. return slowToString.apply(this, arguments);
  3523. };
  3524. Buffer.prototype.toLocaleString = Buffer.prototype.toString;
  3525. Buffer.prototype.equals = function equals(b) {
  3526. if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer');
  3527. if (this === b) return true;
  3528. return Buffer.compare(this, b) === 0;
  3529. };
  3530. Buffer.prototype.inspect = function inspect() {
  3531. var str = '';
  3532. var max = exports.INSPECT_MAX_BYTES;
  3533. str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim();
  3534. if (this.length > max) str += ' ... ';
  3535. return '<Buffer ' + str + '>';
  3536. };
  3537. if (customInspectSymbol) {
  3538. Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect;
  3539. }
  3540. Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) {
  3541. if (isInstance(target, Uint8Array)) {
  3542. target = Buffer.from(target, target.offset, target.byteLength);
  3543. }
  3544. if (!Buffer.isBuffer(target)) {
  3545. throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + typeof target);
  3546. }
  3547. if (start === undefined) {
  3548. start = 0;
  3549. }
  3550. if (end === undefined) {
  3551. end = target ? target.length : 0;
  3552. }
  3553. if (thisStart === undefined) {
  3554. thisStart = 0;
  3555. }
  3556. if (thisEnd === undefined) {
  3557. thisEnd = this.length;
  3558. }
  3559. if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
  3560. throw new RangeError('out of range index');
  3561. }
  3562. if (thisStart >= thisEnd && start >= end) {
  3563. return 0;
  3564. }
  3565. if (thisStart >= thisEnd) {
  3566. return -1;
  3567. }
  3568. if (start >= end) {
  3569. return 1;
  3570. }
  3571. start >>>= 0;
  3572. end >>>= 0;
  3573. thisStart >>>= 0;
  3574. thisEnd >>>= 0;
  3575. if (this === target) return 0;
  3576. var x = thisEnd - thisStart;
  3577. var y = end - start;
  3578. var len = Math.min(x, y);
  3579. var thisCopy = this.slice(thisStart, thisEnd);
  3580. var targetCopy = target.slice(start, end);
  3581. for (var i = 0; i < len; ++i) {
  3582. if (thisCopy[i] !== targetCopy[i]) {
  3583. x = thisCopy[i];
  3584. y = targetCopy[i];
  3585. break;
  3586. }
  3587. }
  3588. if (x < y) return -1;
  3589. if (y < x) return 1;
  3590. return 0;
  3591. }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
  3592. // OR the last index of `val` in `buffer` at offset <= `byteOffset`.
  3593. //
  3594. // Arguments:
  3595. // - buffer - a Buffer to search
  3596. // - val - a string, Buffer, or number
  3597. // - byteOffset - an index into `buffer`; will be clamped to an int32
  3598. // - encoding - an optional encoding, relevant is val is a string
  3599. // - dir - true for indexOf, false for lastIndexOf
  3600. function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) {
  3601. // Empty buffer means no match
  3602. if (buffer.length === 0) return -1; // Normalize byteOffset
  3603. if (typeof byteOffset === 'string') {
  3604. encoding = byteOffset;
  3605. byteOffset = 0;
  3606. } else if (byteOffset > 0x7fffffff) {
  3607. byteOffset = 0x7fffffff;
  3608. } else if (byteOffset < -0x80000000) {
  3609. byteOffset = -0x80000000;
  3610. }
  3611. byteOffset = +byteOffset; // Coerce to Number.
  3612. if (numberIsNaN(byteOffset)) {
  3613. // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
  3614. byteOffset = dir ? 0 : buffer.length - 1;
  3615. } // Normalize byteOffset: negative offsets start from the end of the buffer
  3616. if (byteOffset < 0) byteOffset = buffer.length + byteOffset;
  3617. if (byteOffset >= buffer.length) {
  3618. if (dir) return -1;else byteOffset = buffer.length - 1;
  3619. } else if (byteOffset < 0) {
  3620. if (dir) byteOffset = 0;else return -1;
  3621. } // Normalize val
  3622. if (typeof val === 'string') {
  3623. val = Buffer.from(val, encoding);
  3624. } // Finally, search either indexOf (if dir is true) or lastIndexOf
  3625. if (Buffer.isBuffer(val)) {
  3626. // Special case: looking for empty string/buffer always fails
  3627. if (val.length === 0) {
  3628. return -1;
  3629. }
  3630. return arrayIndexOf(buffer, val, byteOffset, encoding, dir);
  3631. } else if (typeof val === 'number') {
  3632. val = val & 0xFF; // Search for a byte value [0-255]
  3633. if (typeof Uint8Array.prototype.indexOf === 'function') {
  3634. if (dir) {
  3635. return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset);
  3636. } else {
  3637. return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset);
  3638. }
  3639. }
  3640. return arrayIndexOf(buffer, [val], byteOffset, encoding, dir);
  3641. }
  3642. throw new TypeError('val must be string, number or Buffer');
  3643. }
  3644. function arrayIndexOf(arr, val, byteOffset, encoding, dir) {
  3645. var indexSize = 1;
  3646. var arrLength = arr.length;
  3647. var valLength = val.length;
  3648. if (encoding !== undefined) {
  3649. encoding = String(encoding).toLowerCase();
  3650. if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') {
  3651. if (arr.length < 2 || val.length < 2) {
  3652. return -1;
  3653. }
  3654. indexSize = 2;
  3655. arrLength /= 2;
  3656. valLength /= 2;
  3657. byteOffset /= 2;
  3658. }
  3659. }
  3660. function read(buf, i) {
  3661. if (indexSize === 1) {
  3662. return buf[i];
  3663. } else {
  3664. return buf.readUInt16BE(i * indexSize);
  3665. }
  3666. }
  3667. var i;
  3668. if (dir) {
  3669. var foundIndex = -1;
  3670. for (i = byteOffset; i < arrLength; i++) {
  3671. if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
  3672. if (foundIndex === -1) foundIndex = i;
  3673. if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
  3674. } else {
  3675. if (foundIndex !== -1) i -= i - foundIndex;
  3676. foundIndex = -1;
  3677. }
  3678. }
  3679. } else {
  3680. if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
  3681. for (i = byteOffset; i >= 0; i--) {
  3682. var found = true;
  3683. for (var j = 0; j < valLength; j++) {
  3684. if (read(arr, i + j) !== read(val, j)) {
  3685. found = false;
  3686. break;
  3687. }
  3688. }
  3689. if (found) return i;
  3690. }
  3691. }
  3692. return -1;
  3693. }
  3694. Buffer.prototype.includes = function includes(val, byteOffset, encoding) {
  3695. return this.indexOf(val, byteOffset, encoding) !== -1;
  3696. };
  3697. Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) {
  3698. return bidirectionalIndexOf(this, val, byteOffset, encoding, true);
  3699. };
  3700. Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) {
  3701. return bidirectionalIndexOf(this, val, byteOffset, encoding, false);
  3702. };
  3703. function hexWrite(buf, string, offset, length) {
  3704. offset = Number(offset) || 0;
  3705. var remaining = buf.length - offset;
  3706. if (!length) {
  3707. length = remaining;
  3708. } else {
  3709. length = Number(length);
  3710. if (length > remaining) {
  3711. length = remaining;
  3712. }
  3713. }
  3714. var strLen = string.length;
  3715. if (length > strLen / 2) {
  3716. length = strLen / 2;
  3717. }
  3718. var i;
  3719. for (i = 0; i < length; ++i) {
  3720. var parsed = parseInt(string.substr(i * 2, 2), 16);
  3721. if (numberIsNaN(parsed)) return i;
  3722. buf[offset + i] = parsed;
  3723. }
  3724. return i;
  3725. }
  3726. function utf8Write(buf, string, offset, length) {
  3727. return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
  3728. }
  3729. function asciiWrite(buf, string, offset, length) {
  3730. return blitBuffer(asciiToBytes(string), buf, offset, length);
  3731. }
  3732. function base64Write(buf, string, offset, length) {
  3733. return blitBuffer(base64ToBytes(string), buf, offset, length);
  3734. }
  3735. function ucs2Write(buf, string, offset, length) {
  3736. return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
  3737. }
  3738. Buffer.prototype.write = function write(string, offset, length, encoding) {
  3739. // Buffer#write(string)
  3740. if (offset === undefined) {
  3741. encoding = 'utf8';
  3742. length = this.length;
  3743. offset = 0; // Buffer#write(string, encoding)
  3744. } else if (length === undefined && typeof offset === 'string') {
  3745. encoding = offset;
  3746. length = this.length;
  3747. offset = 0; // Buffer#write(string, offset[, length][, encoding])
  3748. } else if (isFinite(offset)) {
  3749. offset = offset >>> 0;
  3750. if (isFinite(length)) {
  3751. length = length >>> 0;
  3752. if (encoding === undefined) encoding = 'utf8';
  3753. } else {
  3754. encoding = length;
  3755. length = undefined;
  3756. }
  3757. } else {
  3758. throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');
  3759. }
  3760. var remaining = this.length - offset;
  3761. if (length === undefined || length > remaining) length = remaining;
  3762. if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) {
  3763. throw new RangeError('Attempt to write outside buffer bounds');
  3764. }
  3765. if (!encoding) encoding = 'utf8';
  3766. var loweredCase = false;
  3767. for (;;) {
  3768. switch (encoding) {
  3769. case 'hex':
  3770. return hexWrite(this, string, offset, length);
  3771. case 'utf8':
  3772. case 'utf-8':
  3773. return utf8Write(this, string, offset, length);
  3774. case 'ascii':
  3775. case 'latin1':
  3776. case 'binary':
  3777. return asciiWrite(this, string, offset, length);
  3778. case 'base64':
  3779. // Warning: maxLength not taken into account in base64Write
  3780. return base64Write(this, string, offset, length);
  3781. case 'ucs2':
  3782. case 'ucs-2':
  3783. case 'utf16le':
  3784. case 'utf-16le':
  3785. return ucs2Write(this, string, offset, length);
  3786. default:
  3787. if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding);
  3788. encoding = ('' + encoding).toLowerCase();
  3789. loweredCase = true;
  3790. }
  3791. }
  3792. };
  3793. Buffer.prototype.toJSON = function toJSON() {
  3794. return {
  3795. type: 'Buffer',
  3796. data: Array.prototype.slice.call(this._arr || this, 0)
  3797. };
  3798. };
  3799. function base64Slice(buf, start, end) {
  3800. if (start === 0 && end === buf.length) {
  3801. return base64.fromByteArray(buf);
  3802. } else {
  3803. return base64.fromByteArray(buf.slice(start, end));
  3804. }
  3805. }
  3806. function utf8Slice(buf, start, end) {
  3807. end = Math.min(buf.length, end);
  3808. var res = [];
  3809. var i = start;
  3810. while (i < end) {
  3811. var firstByte = buf[i];
  3812. var codePoint = null;
  3813. var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1;
  3814. if (i + bytesPerSequence <= end) {
  3815. var secondByte = void 0,
  3816. thirdByte = void 0,
  3817. fourthByte = void 0,
  3818. tempCodePoint = void 0;
  3819. switch (bytesPerSequence) {
  3820. case 1:
  3821. if (firstByte < 0x80) {
  3822. codePoint = firstByte;
  3823. }
  3824. break;
  3825. case 2:
  3826. secondByte = buf[i + 1];
  3827. if ((secondByte & 0xC0) === 0x80) {
  3828. tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F;
  3829. if (tempCodePoint > 0x7F) {
  3830. codePoint = tempCodePoint;
  3831. }
  3832. }
  3833. break;
  3834. case 3:
  3835. secondByte = buf[i + 1];
  3836. thirdByte = buf[i + 2];
  3837. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
  3838. tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F;
  3839. if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
  3840. codePoint = tempCodePoint;
  3841. }
  3842. }
  3843. break;
  3844. case 4:
  3845. secondByte = buf[i + 1];
  3846. thirdByte = buf[i + 2];
  3847. fourthByte = buf[i + 3];
  3848. if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
  3849. tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F;
  3850. if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
  3851. codePoint = tempCodePoint;
  3852. }
  3853. }
  3854. }
  3855. }
  3856. if (codePoint === null) {
  3857. // we did not generate a valid codePoint so insert a
  3858. // replacement char (U+FFFD) and advance only 1 byte
  3859. codePoint = 0xFFFD;
  3860. bytesPerSequence = 1;
  3861. } else if (codePoint > 0xFFFF) {
  3862. // encode to utf16 (surrogate pair dance)
  3863. codePoint -= 0x10000;
  3864. res.push(codePoint >>> 10 & 0x3FF | 0xD800);
  3865. codePoint = 0xDC00 | codePoint & 0x3FF;
  3866. }
  3867. res.push(codePoint);
  3868. i += bytesPerSequence;
  3869. }
  3870. return decodeCodePointsArray(res);
  3871. } // Based on http://stackoverflow.com/a/22747272/680742, the browser with
  3872. // the lowest limit is Chrome, with 0x10000 args.
  3873. // We go 1 magnitude less, for safety
  3874. var MAX_ARGUMENTS_LENGTH = 0x1000;
  3875. function decodeCodePointsArray(codePoints) {
  3876. var len = codePoints.length;
  3877. if (len <= MAX_ARGUMENTS_LENGTH) {
  3878. return String.fromCharCode.apply(String, codePoints); // avoid extra slice()
  3879. } // Decode in chunks to avoid "call stack size exceeded".
  3880. var res = '';
  3881. var i = 0;
  3882. while (i < len) {
  3883. res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH));
  3884. }
  3885. return res;
  3886. }
  3887. function asciiSlice(buf, start, end) {
  3888. var ret = '';
  3889. end = Math.min(buf.length, end);
  3890. for (var i = start; i < end; ++i) {
  3891. ret += String.fromCharCode(buf[i] & 0x7F);
  3892. }
  3893. return ret;
  3894. }
  3895. function latin1Slice(buf, start, end) {
  3896. var ret = '';
  3897. end = Math.min(buf.length, end);
  3898. for (var i = start; i < end; ++i) {
  3899. ret += String.fromCharCode(buf[i]);
  3900. }
  3901. return ret;
  3902. }
  3903. function hexSlice(buf, start, end) {
  3904. var len = buf.length;
  3905. if (!start || start < 0) start = 0;
  3906. if (!end || end < 0 || end > len) end = len;
  3907. var out = '';
  3908. for (var i = start; i < end; ++i) {
  3909. out += hexSliceLookupTable[buf[i]];
  3910. }
  3911. return out;
  3912. }
  3913. function utf16leSlice(buf, start, end) {
  3914. var bytes = buf.slice(start, end);
  3915. var res = ''; // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)
  3916. for (var i = 0; i < bytes.length - 1; i += 2) {
  3917. res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256);
  3918. }
  3919. return res;
  3920. }
  3921. Buffer.prototype.slice = function slice(start, end) {
  3922. var len = this.length;
  3923. start = ~~start;
  3924. end = end === undefined ? len : ~~end;
  3925. if (start < 0) {
  3926. start += len;
  3927. if (start < 0) start = 0;
  3928. } else if (start > len) {
  3929. start = len;
  3930. }
  3931. if (end < 0) {
  3932. end += len;
  3933. if (end < 0) end = 0;
  3934. } else if (end > len) {
  3935. end = len;
  3936. }
  3937. if (end < start) end = start;
  3938. var newBuf = this.subarray(start, end); // Return an augmented `Uint8Array` instance
  3939. Object.setPrototypeOf(newBuf, Buffer.prototype);
  3940. return newBuf;
  3941. };
  3942. /*
  3943. * Need to make sure that buffer isn't trying to write out of bounds.
  3944. */
  3945. function checkOffset(offset, ext, length) {
  3946. if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint');
  3947. if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length');
  3948. }
  3949. Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) {
  3950. offset = offset >>> 0;
  3951. byteLength = byteLength >>> 0;
  3952. if (!noAssert) checkOffset(offset, byteLength, this.length);
  3953. var val = this[offset];
  3954. var mul = 1;
  3955. var i = 0;
  3956. while (++i < byteLength && (mul *= 0x100)) {
  3957. val += this[offset + i] * mul;
  3958. }
  3959. return val;
  3960. };
  3961. Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) {
  3962. offset = offset >>> 0;
  3963. byteLength = byteLength >>> 0;
  3964. if (!noAssert) {
  3965. checkOffset(offset, byteLength, this.length);
  3966. }
  3967. var val = this[offset + --byteLength];
  3968. var mul = 1;
  3969. while (byteLength > 0 && (mul *= 0x100)) {
  3970. val += this[offset + --byteLength] * mul;
  3971. }
  3972. return val;
  3973. };
  3974. Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) {
  3975. offset = offset >>> 0;
  3976. if (!noAssert) checkOffset(offset, 1, this.length);
  3977. return this[offset];
  3978. };
  3979. Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) {
  3980. offset = offset >>> 0;
  3981. if (!noAssert) checkOffset(offset, 2, this.length);
  3982. return this[offset] | this[offset + 1] << 8;
  3983. };
  3984. Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) {
  3985. offset = offset >>> 0;
  3986. if (!noAssert) checkOffset(offset, 2, this.length);
  3987. return this[offset] << 8 | this[offset + 1];
  3988. };
  3989. Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) {
  3990. offset = offset >>> 0;
  3991. if (!noAssert) checkOffset(offset, 4, this.length);
  3992. return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000;
  3993. };
  3994. Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) {
  3995. offset = offset >>> 0;
  3996. if (!noAssert) checkOffset(offset, 4, this.length);
  3997. return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]);
  3998. };
  3999. Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) {
  4000. offset = offset >>> 0;
  4001. validateNumber(offset, 'offset');
  4002. var first = this[offset];
  4003. var last = this[offset + 7];
  4004. if (first === undefined || last === undefined) {
  4005. boundsError(offset, this.length - 8);
  4006. }
  4007. var lo = first + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 24);
  4008. var hi = this[++offset] + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + last * Math.pow(2, 24);
  4009. return BigInt(lo) + (BigInt(hi) << BigInt(32));
  4010. });
  4011. Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) {
  4012. offset = offset >>> 0;
  4013. validateNumber(offset, 'offset');
  4014. var first = this[offset];
  4015. var last = this[offset + 7];
  4016. if (first === undefined || last === undefined) {
  4017. boundsError(offset, this.length - 8);
  4018. }
  4019. var hi = first * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + this[++offset];
  4020. var lo = this[++offset] * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + last;
  4021. return (BigInt(hi) << BigInt(32)) + BigInt(lo);
  4022. });
  4023. Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) {
  4024. offset = offset >>> 0;
  4025. byteLength = byteLength >>> 0;
  4026. if (!noAssert) checkOffset(offset, byteLength, this.length);
  4027. var val = this[offset];
  4028. var mul = 1;
  4029. var i = 0;
  4030. while (++i < byteLength && (mul *= 0x100)) {
  4031. val += this[offset + i] * mul;
  4032. }
  4033. mul *= 0x80;
  4034. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  4035. return val;
  4036. };
  4037. Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) {
  4038. offset = offset >>> 0;
  4039. byteLength = byteLength >>> 0;
  4040. if (!noAssert) checkOffset(offset, byteLength, this.length);
  4041. var i = byteLength;
  4042. var mul = 1;
  4043. var val = this[offset + --i];
  4044. while (i > 0 && (mul *= 0x100)) {
  4045. val += this[offset + --i] * mul;
  4046. }
  4047. mul *= 0x80;
  4048. if (val >= mul) val -= Math.pow(2, 8 * byteLength);
  4049. return val;
  4050. };
  4051. Buffer.prototype.readInt8 = function readInt8(offset, noAssert) {
  4052. offset = offset >>> 0;
  4053. if (!noAssert) checkOffset(offset, 1, this.length);
  4054. if (!(this[offset] & 0x80)) return this[offset];
  4055. return (0xff - this[offset] + 1) * -1;
  4056. };
  4057. Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) {
  4058. offset = offset >>> 0;
  4059. if (!noAssert) checkOffset(offset, 2, this.length);
  4060. var val = this[offset] | this[offset + 1] << 8;
  4061. return val & 0x8000 ? val | 0xFFFF0000 : val;
  4062. };
  4063. Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) {
  4064. offset = offset >>> 0;
  4065. if (!noAssert) checkOffset(offset, 2, this.length);
  4066. var val = this[offset + 1] | this[offset] << 8;
  4067. return val & 0x8000 ? val | 0xFFFF0000 : val;
  4068. };
  4069. Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) {
  4070. offset = offset >>> 0;
  4071. if (!noAssert) checkOffset(offset, 4, this.length);
  4072. return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24;
  4073. };
  4074. Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) {
  4075. offset = offset >>> 0;
  4076. if (!noAssert) checkOffset(offset, 4, this.length);
  4077. return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3];
  4078. };
  4079. Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) {
  4080. offset = offset >>> 0;
  4081. validateNumber(offset, 'offset');
  4082. var first = this[offset];
  4083. var last = this[offset + 7];
  4084. if (first === undefined || last === undefined) {
  4085. boundsError(offset, this.length - 8);
  4086. }
  4087. var val = this[offset + 4] + this[offset + 5] * Math.pow(2, 8) + this[offset + 6] * Math.pow(2, 16) + (last << 24); // Overflow
  4088. return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 24));
  4089. });
  4090. Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) {
  4091. offset = offset >>> 0;
  4092. validateNumber(offset, 'offset');
  4093. var first = this[offset];
  4094. var last = this[offset + 7];
  4095. if (first === undefined || last === undefined) {
  4096. boundsError(offset, this.length - 8);
  4097. }
  4098. var val = (first << 24) + // Overflow
  4099. this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + this[++offset];
  4100. return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + last);
  4101. });
  4102. Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) {
  4103. offset = offset >>> 0;
  4104. if (!noAssert) checkOffset(offset, 4, this.length);
  4105. return ieee754.read(this, offset, true, 23, 4);
  4106. };
  4107. Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) {
  4108. offset = offset >>> 0;
  4109. if (!noAssert) checkOffset(offset, 4, this.length);
  4110. return ieee754.read(this, offset, false, 23, 4);
  4111. };
  4112. Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) {
  4113. offset = offset >>> 0;
  4114. if (!noAssert) checkOffset(offset, 8, this.length);
  4115. return ieee754.read(this, offset, true, 52, 8);
  4116. };
  4117. Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) {
  4118. offset = offset >>> 0;
  4119. if (!noAssert) checkOffset(offset, 8, this.length);
  4120. return ieee754.read(this, offset, false, 52, 8);
  4121. };
  4122. function checkInt(buf, value, offset, ext, max, min) {
  4123. if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance');
  4124. if (value > max || value < min) throw new RangeError('"value" argument is out of bounds');
  4125. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  4126. }
  4127. Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) {
  4128. value = +value;
  4129. offset = offset >>> 0;
  4130. byteLength = byteLength >>> 0;
  4131. if (!noAssert) {
  4132. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  4133. checkInt(this, value, offset, byteLength, maxBytes, 0);
  4134. }
  4135. var mul = 1;
  4136. var i = 0;
  4137. this[offset] = value & 0xFF;
  4138. while (++i < byteLength && (mul *= 0x100)) {
  4139. this[offset + i] = value / mul & 0xFF;
  4140. }
  4141. return offset + byteLength;
  4142. };
  4143. Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) {
  4144. value = +value;
  4145. offset = offset >>> 0;
  4146. byteLength = byteLength >>> 0;
  4147. if (!noAssert) {
  4148. var maxBytes = Math.pow(2, 8 * byteLength) - 1;
  4149. checkInt(this, value, offset, byteLength, maxBytes, 0);
  4150. }
  4151. var i = byteLength - 1;
  4152. var mul = 1;
  4153. this[offset + i] = value & 0xFF;
  4154. while (--i >= 0 && (mul *= 0x100)) {
  4155. this[offset + i] = value / mul & 0xFF;
  4156. }
  4157. return offset + byteLength;
  4158. };
  4159. Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) {
  4160. value = +value;
  4161. offset = offset >>> 0;
  4162. if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0);
  4163. this[offset] = value & 0xff;
  4164. return offset + 1;
  4165. };
  4166. Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) {
  4167. value = +value;
  4168. offset = offset >>> 0;
  4169. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  4170. this[offset] = value & 0xff;
  4171. this[offset + 1] = value >>> 8;
  4172. return offset + 2;
  4173. };
  4174. Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) {
  4175. value = +value;
  4176. offset = offset >>> 0;
  4177. if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0);
  4178. this[offset] = value >>> 8;
  4179. this[offset + 1] = value & 0xff;
  4180. return offset + 2;
  4181. };
  4182. Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) {
  4183. value = +value;
  4184. offset = offset >>> 0;
  4185. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  4186. this[offset + 3] = value >>> 24;
  4187. this[offset + 2] = value >>> 16;
  4188. this[offset + 1] = value >>> 8;
  4189. this[offset] = value & 0xff;
  4190. return offset + 4;
  4191. };
  4192. Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) {
  4193. value = +value;
  4194. offset = offset >>> 0;
  4195. if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0);
  4196. this[offset] = value >>> 24;
  4197. this[offset + 1] = value >>> 16;
  4198. this[offset + 2] = value >>> 8;
  4199. this[offset + 3] = value & 0xff;
  4200. return offset + 4;
  4201. };
  4202. function wrtBigUInt64LE(buf, value, offset, min, max) {
  4203. checkIntBI(value, min, max, buf, offset, 7);
  4204. var lo = Number(value & BigInt(0xffffffff));
  4205. buf[offset++] = lo;
  4206. lo = lo >> 8;
  4207. buf[offset++] = lo;
  4208. lo = lo >> 8;
  4209. buf[offset++] = lo;
  4210. lo = lo >> 8;
  4211. buf[offset++] = lo;
  4212. var hi = Number(value >> BigInt(32) & BigInt(0xffffffff));
  4213. buf[offset++] = hi;
  4214. hi = hi >> 8;
  4215. buf[offset++] = hi;
  4216. hi = hi >> 8;
  4217. buf[offset++] = hi;
  4218. hi = hi >> 8;
  4219. buf[offset++] = hi;
  4220. return offset;
  4221. }
  4222. function wrtBigUInt64BE(buf, value, offset, min, max) {
  4223. checkIntBI(value, min, max, buf, offset, 7);
  4224. var lo = Number(value & BigInt(0xffffffff));
  4225. buf[offset + 7] = lo;
  4226. lo = lo >> 8;
  4227. buf[offset + 6] = lo;
  4228. lo = lo >> 8;
  4229. buf[offset + 5] = lo;
  4230. lo = lo >> 8;
  4231. buf[offset + 4] = lo;
  4232. var hi = Number(value >> BigInt(32) & BigInt(0xffffffff));
  4233. buf[offset + 3] = hi;
  4234. hi = hi >> 8;
  4235. buf[offset + 2] = hi;
  4236. hi = hi >> 8;
  4237. buf[offset + 1] = hi;
  4238. hi = hi >> 8;
  4239. buf[offset] = hi;
  4240. return offset + 8;
  4241. }
  4242. Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset) {
  4243. if (offset === void 0) {
  4244. offset = 0;
  4245. }
  4246. return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));
  4247. });
  4248. Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset) {
  4249. if (offset === void 0) {
  4250. offset = 0;
  4251. }
  4252. return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'));
  4253. });
  4254. Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) {
  4255. value = +value;
  4256. offset = offset >>> 0;
  4257. if (!noAssert) {
  4258. var limit = Math.pow(2, 8 * byteLength - 1);
  4259. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  4260. }
  4261. var i = 0;
  4262. var mul = 1;
  4263. var sub = 0;
  4264. this[offset] = value & 0xFF;
  4265. while (++i < byteLength && (mul *= 0x100)) {
  4266. if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
  4267. sub = 1;
  4268. }
  4269. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  4270. }
  4271. return offset + byteLength;
  4272. };
  4273. Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) {
  4274. value = +value;
  4275. offset = offset >>> 0;
  4276. if (!noAssert) {
  4277. var limit = Math.pow(2, 8 * byteLength - 1);
  4278. checkInt(this, value, offset, byteLength, limit - 1, -limit);
  4279. }
  4280. var i = byteLength - 1;
  4281. var mul = 1;
  4282. var sub = 0;
  4283. this[offset + i] = value & 0xFF;
  4284. while (--i >= 0 && (mul *= 0x100)) {
  4285. if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
  4286. sub = 1;
  4287. }
  4288. this[offset + i] = (value / mul >> 0) - sub & 0xFF;
  4289. }
  4290. return offset + byteLength;
  4291. };
  4292. Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) {
  4293. value = +value;
  4294. offset = offset >>> 0;
  4295. if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
  4296. if (value < 0) value = 0xff + value + 1;
  4297. this[offset] = value & 0xff;
  4298. return offset + 1;
  4299. };
  4300. Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) {
  4301. value = +value;
  4302. offset = offset >>> 0;
  4303. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  4304. this[offset] = value & 0xff;
  4305. this[offset + 1] = value >>> 8;
  4306. return offset + 2;
  4307. };
  4308. Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) {
  4309. value = +value;
  4310. offset = offset >>> 0;
  4311. if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
  4312. this[offset] = value >>> 8;
  4313. this[offset + 1] = value & 0xff;
  4314. return offset + 2;
  4315. };
  4316. Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) {
  4317. value = +value;
  4318. offset = offset >>> 0;
  4319. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  4320. this[offset] = value & 0xff;
  4321. this[offset + 1] = value >>> 8;
  4322. this[offset + 2] = value >>> 16;
  4323. this[offset + 3] = value >>> 24;
  4324. return offset + 4;
  4325. };
  4326. Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) {
  4327. value = +value;
  4328. offset = offset >>> 0;
  4329. if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
  4330. if (value < 0) value = 0xffffffff + value + 1;
  4331. this[offset] = value >>> 24;
  4332. this[offset + 1] = value >>> 16;
  4333. this[offset + 2] = value >>> 8;
  4334. this[offset + 3] = value & 0xff;
  4335. return offset + 4;
  4336. };
  4337. Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset) {
  4338. if (offset === void 0) {
  4339. offset = 0;
  4340. }
  4341. return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));
  4342. });
  4343. Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset) {
  4344. if (offset === void 0) {
  4345. offset = 0;
  4346. }
  4347. return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'));
  4348. });
  4349. function checkIEEE754(buf, value, offset, ext, max, min) {
  4350. if (offset + ext > buf.length) throw new RangeError('Index out of range');
  4351. if (offset < 0) throw new RangeError('Index out of range');
  4352. }
  4353. function writeFloat(buf, value, offset, littleEndian, noAssert) {
  4354. value = +value;
  4355. offset = offset >>> 0;
  4356. if (!noAssert) {
  4357. checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
  4358. }
  4359. ieee754.write(buf, value, offset, littleEndian, 23, 4);
  4360. return offset + 4;
  4361. }
  4362. Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) {
  4363. return writeFloat(this, value, offset, true, noAssert);
  4364. };
  4365. Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) {
  4366. return writeFloat(this, value, offset, false, noAssert);
  4367. };
  4368. function writeDouble(buf, value, offset, littleEndian, noAssert) {
  4369. value = +value;
  4370. offset = offset >>> 0;
  4371. if (!noAssert) {
  4372. checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
  4373. }
  4374. ieee754.write(buf, value, offset, littleEndian, 52, 8);
  4375. return offset + 8;
  4376. }
  4377. Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) {
  4378. return writeDouble(this, value, offset, true, noAssert);
  4379. };
  4380. Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) {
  4381. return writeDouble(this, value, offset, false, noAssert);
  4382. }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
  4383. Buffer.prototype.copy = function copy(target, targetStart, start, end) {
  4384. if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer');
  4385. if (!start) start = 0;
  4386. if (!end && end !== 0) end = this.length;
  4387. if (targetStart >= target.length) targetStart = target.length;
  4388. if (!targetStart) targetStart = 0;
  4389. if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done
  4390. if (end === start) return 0;
  4391. if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions
  4392. if (targetStart < 0) {
  4393. throw new RangeError('targetStart out of bounds');
  4394. }
  4395. if (start < 0 || start >= this.length) throw new RangeError('Index out of range');
  4396. if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob?
  4397. if (end > this.length) end = this.length;
  4398. if (target.length - targetStart < end - start) {
  4399. end = target.length - targetStart + start;
  4400. }
  4401. var len = end - start;
  4402. if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {
  4403. // Use built-in when available, missing from IE11
  4404. this.copyWithin(targetStart, start, end);
  4405. } else {
  4406. Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart);
  4407. }
  4408. return len;
  4409. }; // Usage:
  4410. // buffer.fill(number[, offset[, end]])
  4411. // buffer.fill(buffer[, offset[, end]])
  4412. // buffer.fill(string[, offset[, end]][, encoding])
  4413. Buffer.prototype.fill = function fill(val, start, end, encoding) {
  4414. // Handle string cases:
  4415. if (typeof val === 'string') {
  4416. if (typeof start === 'string') {
  4417. encoding = start;
  4418. start = 0;
  4419. end = this.length;
  4420. } else if (typeof end === 'string') {
  4421. encoding = end;
  4422. end = this.length;
  4423. }
  4424. if (encoding !== undefined && typeof encoding !== 'string') {
  4425. throw new TypeError('encoding must be a string');
  4426. }
  4427. if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
  4428. throw new TypeError('Unknown encoding: ' + encoding);
  4429. }
  4430. if (val.length === 1) {
  4431. var code = val.charCodeAt(0);
  4432. if (encoding === 'utf8' && code < 128 || encoding === 'latin1') {
  4433. // Fast path: If `val` fits into a single byte, use that numeric value.
  4434. val = code;
  4435. }
  4436. }
  4437. } else if (typeof val === 'number') {
  4438. val = val & 255;
  4439. } else if (typeof val === 'boolean') {
  4440. val = Number(val);
  4441. } // Invalid ranges are not set to a default, so can range check early.
  4442. if (start < 0 || this.length < start || this.length < end) {
  4443. throw new RangeError('Out of range index');
  4444. }
  4445. if (end <= start) {
  4446. return this;
  4447. }
  4448. start = start >>> 0;
  4449. end = end === undefined ? this.length : end >>> 0;
  4450. if (!val) val = 0;
  4451. var i;
  4452. if (typeof val === 'number') {
  4453. for (i = start; i < end; ++i) {
  4454. this[i] = val;
  4455. }
  4456. } else {
  4457. var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding);
  4458. var len = bytes.length;
  4459. if (len === 0) {
  4460. throw new TypeError('The value "' + val + '" is invalid for argument "value"');
  4461. }
  4462. for (i = 0; i < end - start; ++i) {
  4463. this[i + start] = bytes[i % len];
  4464. }
  4465. }
  4466. return this;
  4467. }; // CUSTOM ERRORS
  4468. // =============
  4469. // Simplified versions from Node, changed for Buffer-only usage
  4470. var errors = {};
  4471. function E(sym, getMessage, Base) {
  4472. errors[sym] = /*#__PURE__*/function (_Base) {
  4473. _inheritsLoose(NodeError, _Base);
  4474. function NodeError() {
  4475. var _this;
  4476. _this = _Base.call(this) || this;
  4477. Object.defineProperty(_assertThisInitialized(_this), 'message', {
  4478. value: getMessage.apply(_assertThisInitialized(_this), arguments),
  4479. writable: true,
  4480. configurable: true
  4481. }); // Add the error code to the name to include it in the stack trace.
  4482. _this.name = _this.name + " [" + sym + "]"; // Access the stack to generate the error message including the error code
  4483. // from the name.
  4484. _this.stack; // eslint-disable-line no-unused-expressions
  4485. // Reset the name to the actual name.
  4486. delete _this.name;
  4487. return _this;
  4488. }
  4489. var _proto = NodeError.prototype;
  4490. _proto.toString = function toString() {
  4491. return this.name + " [" + sym + "]: " + this.message;
  4492. };
  4493. _createClass(NodeError, [{
  4494. key: "code",
  4495. get: function get() {
  4496. return sym;
  4497. },
  4498. set: function set(value) {
  4499. Object.defineProperty(this, 'code', {
  4500. configurable: true,
  4501. enumerable: true,
  4502. value: value,
  4503. writable: true
  4504. });
  4505. }
  4506. }]);
  4507. return NodeError;
  4508. }(Base);
  4509. }
  4510. E('ERR_BUFFER_OUT_OF_BOUNDS', function (name) {
  4511. if (name) {
  4512. return name + " is outside of buffer bounds";
  4513. }
  4514. return 'Attempt to access memory outside buffer bounds';
  4515. }, RangeError);
  4516. E('ERR_INVALID_ARG_TYPE', function (name, actual) {
  4517. return "The \"" + name + "\" argument must be of type number. Received type " + typeof actual;
  4518. }, TypeError);
  4519. E('ERR_OUT_OF_RANGE', function (str, range, input) {
  4520. var msg = "The value of \"" + str + "\" is out of range.";
  4521. var received = input;
  4522. if (Number.isInteger(input) && Math.abs(input) > Math.pow(2, 32)) {
  4523. received = addNumericalSeparator(String(input));
  4524. } else if (typeof input === 'bigint') {
  4525. received = String(input);
  4526. if (input > Math.pow(BigInt(2), BigInt(32)) || input < -Math.pow(BigInt(2), BigInt(32))) {
  4527. received = addNumericalSeparator(received);
  4528. }
  4529. received += 'n';
  4530. }
  4531. msg += " It must be " + range + ". Received " + received;
  4532. return msg;
  4533. }, RangeError);
  4534. function addNumericalSeparator(val) {
  4535. var res = '';
  4536. var i = val.length;
  4537. var start = val[0] === '-' ? 1 : 0;
  4538. for (; i >= start + 4; i -= 3) {
  4539. res = "_" + val.slice(i - 3, i) + res;
  4540. }
  4541. return "" + val.slice(0, i) + res;
  4542. } // CHECK FUNCTIONS
  4543. // ===============
  4544. function checkBounds(buf, offset, byteLength) {
  4545. validateNumber(offset, 'offset');
  4546. if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {
  4547. boundsError(offset, buf.length - (byteLength + 1));
  4548. }
  4549. }
  4550. function checkIntBI(value, min, max, buf, offset, byteLength) {
  4551. if (value > max || value < min) {
  4552. var n = typeof min === 'bigint' ? 'n' : '';
  4553. var range;
  4554. if (byteLength > 3) {
  4555. if (min === 0 || min === BigInt(0)) {
  4556. range = ">= 0" + n + " and < 2" + n + " ** " + (byteLength + 1) * 8 + n;
  4557. } else {
  4558. range = ">= -(2" + n + " ** " + ((byteLength + 1) * 8 - 1) + n + ") and < 2 ** " + ("" + ((byteLength + 1) * 8 - 1) + n);
  4559. }
  4560. } else {
  4561. range = ">= " + min + n + " and <= " + max + n;
  4562. }
  4563. throw new errors.ERR_OUT_OF_RANGE('value', range, value);
  4564. }
  4565. checkBounds(buf, offset, byteLength);
  4566. }
  4567. function validateNumber(value, name) {
  4568. if (typeof value !== 'number') {
  4569. throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value);
  4570. }
  4571. }
  4572. function boundsError(value, length, type) {
  4573. if (Math.floor(value) !== value) {
  4574. validateNumber(value, type);
  4575. throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value);
  4576. }
  4577. if (length < 0) {
  4578. throw new errors.ERR_BUFFER_OUT_OF_BOUNDS();
  4579. }
  4580. throw new errors.ERR_OUT_OF_RANGE(type || 'offset', ">= " + (type ? 1 : 0) + " and <= " + length, value);
  4581. } // HELPER FUNCTIONS
  4582. // ================
  4583. var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
  4584. function base64clean(str) {
  4585. // Node takes equal signs as end of the Base64 encoding
  4586. str = str.split('=')[0]; // Node strips out invalid characters like \n and \t from the string, base64-js does not
  4587. str = str.trim().replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to ''
  4588. if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
  4589. while (str.length % 4 !== 0) {
  4590. str = str + '=';
  4591. }
  4592. return str;
  4593. }
  4594. function utf8ToBytes(string, units) {
  4595. units = units || Infinity;
  4596. var codePoint;
  4597. var length = string.length;
  4598. var leadSurrogate = null;
  4599. var bytes = [];
  4600. for (var i = 0; i < length; ++i) {
  4601. codePoint = string.charCodeAt(i); // is surrogate component
  4602. if (codePoint > 0xD7FF && codePoint < 0xE000) {
  4603. // last char was a lead
  4604. if (!leadSurrogate) {
  4605. // no lead yet
  4606. if (codePoint > 0xDBFF) {
  4607. // unexpected trail
  4608. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  4609. continue;
  4610. } else if (i + 1 === length) {
  4611. // unpaired lead
  4612. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  4613. continue;
  4614. } // valid lead
  4615. leadSurrogate = codePoint;
  4616. continue;
  4617. } // 2 leads in a row
  4618. if (codePoint < 0xDC00) {
  4619. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  4620. leadSurrogate = codePoint;
  4621. continue;
  4622. } // valid surrogate pair
  4623. codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
  4624. } else if (leadSurrogate) {
  4625. // valid bmp char, but last char was a lead
  4626. if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
  4627. }
  4628. leadSurrogate = null; // encode utf8
  4629. if (codePoint < 0x80) {
  4630. if ((units -= 1) < 0) break;
  4631. bytes.push(codePoint);
  4632. } else if (codePoint < 0x800) {
  4633. if ((units -= 2) < 0) break;
  4634. bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80);
  4635. } else if (codePoint < 0x10000) {
  4636. if ((units -= 3) < 0) break;
  4637. bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  4638. } else if (codePoint < 0x110000) {
  4639. if ((units -= 4) < 0) break;
  4640. bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80);
  4641. } else {
  4642. throw new Error('Invalid code point');
  4643. }
  4644. }
  4645. return bytes;
  4646. }
  4647. function asciiToBytes(str) {
  4648. var byteArray = [];
  4649. for (var i = 0; i < str.length; ++i) {
  4650. // Node's code seems to be doing this and not & 0x7F..
  4651. byteArray.push(str.charCodeAt(i) & 0xFF);
  4652. }
  4653. return byteArray;
  4654. }
  4655. function utf16leToBytes(str, units) {
  4656. var c, hi, lo;
  4657. var byteArray = [];
  4658. for (var i = 0; i < str.length; ++i) {
  4659. if ((units -= 2) < 0) break;
  4660. c = str.charCodeAt(i);
  4661. hi = c >> 8;
  4662. lo = c % 256;
  4663. byteArray.push(lo);
  4664. byteArray.push(hi);
  4665. }
  4666. return byteArray;
  4667. }
  4668. function base64ToBytes(str) {
  4669. return base64.toByteArray(base64clean(str));
  4670. }
  4671. function blitBuffer(src, dst, offset, length) {
  4672. var i;
  4673. for (i = 0; i < length; ++i) {
  4674. if (i + offset >= dst.length || i >= src.length) break;
  4675. dst[i + offset] = src[i];
  4676. }
  4677. return i;
  4678. } // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass
  4679. // the `instanceof` check but they should be treated as of that type.
  4680. // See: https://github.com/feross/buffer/issues/166
  4681. function isInstance(obj, type) {
  4682. return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name;
  4683. }
  4684. function numberIsNaN(obj) {
  4685. // For IE11 support
  4686. return obj !== obj; // eslint-disable-line no-self-compare
  4687. } // Create lookup table for `toString('hex')`
  4688. // See: https://github.com/feross/buffer/issues/219
  4689. var hexSliceLookupTable = function () {
  4690. var alphabet = '0123456789abcdef';
  4691. var table = new Array(256);
  4692. for (var i = 0; i < 16; ++i) {
  4693. var i16 = i * 16;
  4694. for (var j = 0; j < 16; ++j) {
  4695. table[i16 + j] = alphabet[i] + alphabet[j];
  4696. }
  4697. }
  4698. return table;
  4699. }(); // Return not function with Error if BigInt not supported
  4700. function defineBigIntMethod(fn) {
  4701. return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn;
  4702. }
  4703. function BufferBigIntNotDefined() {
  4704. throw new Error('BigInt not supported');
  4705. }
  4706. /***/ }),
  4707. /***/ 477:
  4708. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  4709. "use strict";
  4710. __webpack_require__(7803);
  4711. __webpack_require__(1539);
  4712. // eslint-disable-next-line es/no-typed-arrays -- safe
  4713. module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
  4714. /***/ }),
  4715. /***/ 2094:
  4716. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  4717. "use strict";
  4718. var NATIVE_ARRAY_BUFFER = __webpack_require__(477);
  4719. var DESCRIPTORS = __webpack_require__(9781);
  4720. var global = __webpack_require__(7854);
  4721. var isCallable = __webpack_require__(614);
  4722. var isObject = __webpack_require__(111);
  4723. var hasOwn = __webpack_require__(2597);
  4724. var classof = __webpack_require__(648);
  4725. var tryToString = __webpack_require__(6330);
  4726. var createNonEnumerableProperty = __webpack_require__(8880);
  4727. var redefine = __webpack_require__(1320);
  4728. var defineProperty = (__webpack_require__(3070).f);
  4729. var isPrototypeOf = __webpack_require__(7976);
  4730. var getPrototypeOf = __webpack_require__(9518);
  4731. var setPrototypeOf = __webpack_require__(7674);
  4732. var wellKnownSymbol = __webpack_require__(5112);
  4733. var uid = __webpack_require__(9711);
  4734. var Int8Array = global.Int8Array;
  4735. var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
  4736. var Uint8ClampedArray = global.Uint8ClampedArray;
  4737. var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
  4738. var TypedArray = Int8Array && getPrototypeOf(Int8Array);
  4739. var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
  4740. var ObjectPrototype = Object.prototype;
  4741. var TypeError = global.TypeError;
  4742. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  4743. var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
  4744. var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR'); // Fixing native typed arrays in Opera Presto crashes the browser, see #595
  4745. var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
  4746. var TYPED_ARRAY_TAG_REQIRED = false;
  4747. var NAME, Constructor, Prototype;
  4748. var TypedArrayConstructorsList = {
  4749. Int8Array: 1,
  4750. Uint8Array: 1,
  4751. Uint8ClampedArray: 1,
  4752. Int16Array: 2,
  4753. Uint16Array: 2,
  4754. Int32Array: 4,
  4755. Uint32Array: 4,
  4756. Float32Array: 4,
  4757. Float64Array: 8
  4758. };
  4759. var BigIntArrayConstructorsList = {
  4760. BigInt64Array: 8,
  4761. BigUint64Array: 8
  4762. };
  4763. var isView = function isView(it) {
  4764. if (!isObject(it)) return false;
  4765. var klass = classof(it);
  4766. return klass === 'DataView' || hasOwn(TypedArrayConstructorsList, klass) || hasOwn(BigIntArrayConstructorsList, klass);
  4767. };
  4768. var isTypedArray = function isTypedArray(it) {
  4769. if (!isObject(it)) return false;
  4770. var klass = classof(it);
  4771. return hasOwn(TypedArrayConstructorsList, klass) || hasOwn(BigIntArrayConstructorsList, klass);
  4772. };
  4773. var aTypedArray = function aTypedArray(it) {
  4774. if (isTypedArray(it)) return it;
  4775. throw TypeError('Target is not a typed array');
  4776. };
  4777. var aTypedArrayConstructor = function aTypedArrayConstructor(C) {
  4778. if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C;
  4779. throw TypeError(tryToString(C) + ' is not a typed array constructor');
  4780. };
  4781. var exportTypedArrayMethod = function exportTypedArrayMethod(KEY, property, forced) {
  4782. if (!DESCRIPTORS) return;
  4783. if (forced) for (var ARRAY in TypedArrayConstructorsList) {
  4784. var TypedArrayConstructor = global[ARRAY];
  4785. if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try {
  4786. delete TypedArrayConstructor.prototype[KEY];
  4787. } catch (error) {
  4788. /* empty */
  4789. }
  4790. }
  4791. if (!TypedArrayPrototype[KEY] || forced) {
  4792. redefine(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
  4793. }
  4794. };
  4795. var exportTypedArrayStaticMethod = function exportTypedArrayStaticMethod(KEY, property, forced) {
  4796. var ARRAY, TypedArrayConstructor;
  4797. if (!DESCRIPTORS) return;
  4798. if (setPrototypeOf) {
  4799. if (forced) for (ARRAY in TypedArrayConstructorsList) {
  4800. TypedArrayConstructor = global[ARRAY];
  4801. if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try {
  4802. delete TypedArrayConstructor[KEY];
  4803. } catch (error) {
  4804. /* empty */
  4805. }
  4806. }
  4807. if (!TypedArray[KEY] || forced) {
  4808. // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
  4809. try {
  4810. return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
  4811. } catch (error) {
  4812. /* empty */
  4813. }
  4814. } else return;
  4815. }
  4816. for (ARRAY in TypedArrayConstructorsList) {
  4817. TypedArrayConstructor = global[ARRAY];
  4818. if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
  4819. redefine(TypedArrayConstructor, KEY, property);
  4820. }
  4821. }
  4822. };
  4823. for (NAME in TypedArrayConstructorsList) {
  4824. Constructor = global[NAME];
  4825. Prototype = Constructor && Constructor.prototype;
  4826. if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);else NATIVE_ARRAY_BUFFER_VIEWS = false;
  4827. }
  4828. for (NAME in BigIntArrayConstructorsList) {
  4829. Constructor = global[NAME];
  4830. Prototype = Constructor && Constructor.prototype;
  4831. if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
  4832. } // WebKit bug - typed arrays constructors prototype is Object.prototype
  4833. if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
  4834. // eslint-disable-next-line no-shadow -- safe
  4835. TypedArray = function TypedArray() {
  4836. throw TypeError('Incorrect invocation');
  4837. };
  4838. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  4839. if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
  4840. }
  4841. }
  4842. if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
  4843. TypedArrayPrototype = TypedArray.prototype;
  4844. if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
  4845. if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
  4846. }
  4847. } // WebKit bug - one more object in Uint8ClampedArray prototype chain
  4848. if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
  4849. setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
  4850. }
  4851. if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) {
  4852. TYPED_ARRAY_TAG_REQIRED = true;
  4853. defineProperty(TypedArrayPrototype, TO_STRING_TAG, {
  4854. get: function get() {
  4855. return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
  4856. }
  4857. });
  4858. for (NAME in TypedArrayConstructorsList) {
  4859. if (global[NAME]) {
  4860. createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
  4861. }
  4862. }
  4863. }
  4864. module.exports = {
  4865. NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
  4866. TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
  4867. TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
  4868. aTypedArray: aTypedArray,
  4869. aTypedArrayConstructor: aTypedArrayConstructor,
  4870. exportTypedArrayMethod: exportTypedArrayMethod,
  4871. exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
  4872. isView: isView,
  4873. isTypedArray: isTypedArray,
  4874. TypedArray: TypedArray,
  4875. TypedArrayPrototype: TypedArrayPrototype
  4876. };
  4877. /***/ }),
  4878. /***/ 2091:
  4879. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  4880. "use strict";
  4881. __webpack_require__(8309);
  4882. var global = __webpack_require__(7854);
  4883. var uncurryThis = __webpack_require__(1702);
  4884. var DESCRIPTORS = __webpack_require__(9781);
  4885. var NATIVE_ARRAY_BUFFER = __webpack_require__(477);
  4886. var FunctionName = __webpack_require__(6530);
  4887. var createNonEnumerableProperty = __webpack_require__(8880);
  4888. var redefineAll = __webpack_require__(2248);
  4889. var fails = __webpack_require__(7293);
  4890. var anInstance = __webpack_require__(5787);
  4891. var toIntegerOrInfinity = __webpack_require__(9303);
  4892. var toLength = __webpack_require__(7466);
  4893. var toIndex = __webpack_require__(7067);
  4894. var IEEE754 = __webpack_require__(1179);
  4895. var getPrototypeOf = __webpack_require__(9518);
  4896. var setPrototypeOf = __webpack_require__(7674);
  4897. var getOwnPropertyNames = (__webpack_require__(8006).f);
  4898. var defineProperty = (__webpack_require__(3070).f);
  4899. var arrayFill = __webpack_require__(1285);
  4900. var arraySlice = __webpack_require__(206);
  4901. var setToStringTag = __webpack_require__(8003);
  4902. var InternalStateModule = __webpack_require__(9909);
  4903. var PROPER_FUNCTION_NAME = FunctionName.PROPER;
  4904. var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
  4905. var getInternalState = InternalStateModule.get;
  4906. var setInternalState = InternalStateModule.set;
  4907. var ARRAY_BUFFER = 'ArrayBuffer';
  4908. var DATA_VIEW = 'DataView';
  4909. var PROTOTYPE = 'prototype';
  4910. var WRONG_LENGTH = 'Wrong length';
  4911. var WRONG_INDEX = 'Wrong index';
  4912. var NativeArrayBuffer = global[ARRAY_BUFFER];
  4913. var $ArrayBuffer = NativeArrayBuffer;
  4914. var ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE];
  4915. var $DataView = global[DATA_VIEW];
  4916. var DataViewPrototype = $DataView && $DataView[PROTOTYPE];
  4917. var ObjectPrototype = Object.prototype;
  4918. var Array = global.Array;
  4919. var RangeError = global.RangeError;
  4920. var fill = uncurryThis(arrayFill);
  4921. var reverse = uncurryThis([].reverse);
  4922. var packIEEE754 = IEEE754.pack;
  4923. var unpackIEEE754 = IEEE754.unpack;
  4924. var packInt8 = function packInt8(number) {
  4925. return [number & 0xFF];
  4926. };
  4927. var packInt16 = function packInt16(number) {
  4928. return [number & 0xFF, number >> 8 & 0xFF];
  4929. };
  4930. var packInt32 = function packInt32(number) {
  4931. return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
  4932. };
  4933. var unpackInt32 = function unpackInt32(buffer) {
  4934. return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
  4935. };
  4936. var packFloat32 = function packFloat32(number) {
  4937. return packIEEE754(number, 23, 4);
  4938. };
  4939. var packFloat64 = function packFloat64(number) {
  4940. return packIEEE754(number, 52, 8);
  4941. };
  4942. var addGetter = function addGetter(Constructor, key) {
  4943. defineProperty(Constructor[PROTOTYPE], key, {
  4944. get: function get() {
  4945. return getInternalState(this)[key];
  4946. }
  4947. });
  4948. };
  4949. var get = function get(view, count, index, isLittleEndian) {
  4950. var intIndex = toIndex(index);
  4951. var store = getInternalState(view);
  4952. if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  4953. var bytes = getInternalState(store.buffer).bytes;
  4954. var start = intIndex + store.byteOffset;
  4955. var pack = arraySlice(bytes, start, start + count);
  4956. return isLittleEndian ? pack : reverse(pack);
  4957. };
  4958. var set = function set(view, count, index, conversion, value, isLittleEndian) {
  4959. var intIndex = toIndex(index);
  4960. var store = getInternalState(view);
  4961. if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
  4962. var bytes = getInternalState(store.buffer).bytes;
  4963. var start = intIndex + store.byteOffset;
  4964. var pack = conversion(+value);
  4965. for (var i = 0; i < count; i++) {
  4966. bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
  4967. }
  4968. };
  4969. if (!NATIVE_ARRAY_BUFFER) {
  4970. $ArrayBuffer = function ArrayBuffer(length) {
  4971. anInstance(this, ArrayBufferPrototype);
  4972. var byteLength = toIndex(length);
  4973. setInternalState(this, {
  4974. bytes: fill(Array(byteLength), 0),
  4975. byteLength: byteLength
  4976. });
  4977. if (!DESCRIPTORS) this.byteLength = byteLength;
  4978. };
  4979. ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE];
  4980. $DataView = function DataView(buffer, byteOffset, byteLength) {
  4981. anInstance(this, DataViewPrototype);
  4982. anInstance(buffer, ArrayBufferPrototype);
  4983. var bufferLength = getInternalState(buffer).byteLength;
  4984. var offset = toIntegerOrInfinity(byteOffset);
  4985. if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
  4986. byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
  4987. if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
  4988. setInternalState(this, {
  4989. buffer: buffer,
  4990. byteLength: byteLength,
  4991. byteOffset: offset
  4992. });
  4993. if (!DESCRIPTORS) {
  4994. this.buffer = buffer;
  4995. this.byteLength = byteLength;
  4996. this.byteOffset = offset;
  4997. }
  4998. };
  4999. DataViewPrototype = $DataView[PROTOTYPE];
  5000. if (DESCRIPTORS) {
  5001. addGetter($ArrayBuffer, 'byteLength');
  5002. addGetter($DataView, 'buffer');
  5003. addGetter($DataView, 'byteLength');
  5004. addGetter($DataView, 'byteOffset');
  5005. }
  5006. redefineAll(DataViewPrototype, {
  5007. getInt8: function getInt8(byteOffset) {
  5008. return get(this, 1, byteOffset)[0] << 24 >> 24;
  5009. },
  5010. getUint8: function getUint8(byteOffset) {
  5011. return get(this, 1, byteOffset)[0];
  5012. },
  5013. getInt16: function getInt16(byteOffset
  5014. /* , littleEndian */
  5015. ) {
  5016. var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
  5017. return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
  5018. },
  5019. getUint16: function getUint16(byteOffset
  5020. /* , littleEndian */
  5021. ) {
  5022. var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
  5023. return bytes[1] << 8 | bytes[0];
  5024. },
  5025. getInt32: function getInt32(byteOffset
  5026. /* , littleEndian */
  5027. ) {
  5028. return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
  5029. },
  5030. getUint32: function getUint32(byteOffset
  5031. /* , littleEndian */
  5032. ) {
  5033. return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
  5034. },
  5035. getFloat32: function getFloat32(byteOffset
  5036. /* , littleEndian */
  5037. ) {
  5038. return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
  5039. },
  5040. getFloat64: function getFloat64(byteOffset
  5041. /* , littleEndian */
  5042. ) {
  5043. return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
  5044. },
  5045. setInt8: function setInt8(byteOffset, value) {
  5046. set(this, 1, byteOffset, packInt8, value);
  5047. },
  5048. setUint8: function setUint8(byteOffset, value) {
  5049. set(this, 1, byteOffset, packInt8, value);
  5050. },
  5051. setInt16: function setInt16(byteOffset, value
  5052. /* , littleEndian */
  5053. ) {
  5054. set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
  5055. },
  5056. setUint16: function setUint16(byteOffset, value
  5057. /* , littleEndian */
  5058. ) {
  5059. set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
  5060. },
  5061. setInt32: function setInt32(byteOffset, value
  5062. /* , littleEndian */
  5063. ) {
  5064. set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
  5065. },
  5066. setUint32: function setUint32(byteOffset, value
  5067. /* , littleEndian */
  5068. ) {
  5069. set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
  5070. },
  5071. setFloat32: function setFloat32(byteOffset, value
  5072. /* , littleEndian */
  5073. ) {
  5074. set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
  5075. },
  5076. setFloat64: function setFloat64(byteOffset, value
  5077. /* , littleEndian */
  5078. ) {
  5079. set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
  5080. }
  5081. });
  5082. } else {
  5083. var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER;
  5084. /* eslint-disable no-new -- required for testing */
  5085. if (!fails(function () {
  5086. NativeArrayBuffer(1);
  5087. }) || !fails(function () {
  5088. new NativeArrayBuffer(-1);
  5089. }) || fails(function () {
  5090. new NativeArrayBuffer();
  5091. new NativeArrayBuffer(1.5);
  5092. new NativeArrayBuffer(NaN);
  5093. return INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME;
  5094. })) {
  5095. /* eslint-enable no-new -- required for testing */
  5096. $ArrayBuffer = function ArrayBuffer(length) {
  5097. anInstance(this, ArrayBufferPrototype);
  5098. return new NativeArrayBuffer(toIndex(length));
  5099. };
  5100. $ArrayBuffer[PROTOTYPE] = ArrayBufferPrototype;
  5101. for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
  5102. if (!((key = keys[j++]) in $ArrayBuffer)) {
  5103. createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
  5104. }
  5105. }
  5106. ArrayBufferPrototype.constructor = $ArrayBuffer;
  5107. } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {
  5108. createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER);
  5109. } // WebKit bug - the same parent prototype for typed arrays and data view
  5110. if (setPrototypeOf && getPrototypeOf(DataViewPrototype) !== ObjectPrototype) {
  5111. setPrototypeOf(DataViewPrototype, ObjectPrototype);
  5112. } // iOS Safari 7.x bug
  5113. var testView = new $DataView(new $ArrayBuffer(2));
  5114. var $setInt8 = uncurryThis(DataViewPrototype.setInt8);
  5115. testView.setInt8(0, 2147483648);
  5116. testView.setInt8(1, 2147483649);
  5117. if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll(DataViewPrototype, {
  5118. setInt8: function setInt8(byteOffset, value) {
  5119. $setInt8(this, byteOffset, value << 24 >> 24);
  5120. },
  5121. setUint8: function setUint8(byteOffset, value) {
  5122. $setInt8(this, byteOffset, value << 24 >> 24);
  5123. }
  5124. }, {
  5125. unsafe: true
  5126. });
  5127. }
  5128. setToStringTag($ArrayBuffer, ARRAY_BUFFER);
  5129. setToStringTag($DataView, DATA_VIEW);
  5130. module.exports = {
  5131. ArrayBuffer: $ArrayBuffer,
  5132. DataView: $DataView
  5133. };
  5134. /***/ }),
  5135. /***/ 7803:
  5136. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  5137. "use strict";
  5138. var $ = __webpack_require__(2109);
  5139. var global = __webpack_require__(7854);
  5140. var arrayBufferModule = __webpack_require__(2091);
  5141. var setSpecies = __webpack_require__(6340);
  5142. var ARRAY_BUFFER = 'ArrayBuffer';
  5143. var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER];
  5144. var NativeArrayBuffer = global[ARRAY_BUFFER]; // `ArrayBuffer` constructor
  5145. // https://tc39.es/ecma262/#sec-arraybuffer-constructor
  5146. $({
  5147. global: true,
  5148. forced: NativeArrayBuffer !== ArrayBuffer
  5149. }, {
  5150. ArrayBuffer: ArrayBuffer
  5151. });
  5152. setSpecies(ARRAY_BUFFER);
  5153. /***/ }),
  5154. /***/ 194:
  5155. /***/ (function(module, exports, __webpack_require__) {
  5156. "use strict";
  5157. ;
  5158. (function (root, factory, undef) {
  5159. if (true) {
  5160. // CommonJS
  5161. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582));
  5162. } else {}
  5163. })(void 0, function (CryptoJS) {
  5164. (function () {
  5165. // Shortcuts
  5166. var C = CryptoJS;
  5167. var C_lib = C.lib;
  5168. var BlockCipher = C_lib.BlockCipher;
  5169. var C_algo = C.algo; // Lookup tables
  5170. var SBOX = [];
  5171. var INV_SBOX = [];
  5172. var SUB_MIX_0 = [];
  5173. var SUB_MIX_1 = [];
  5174. var SUB_MIX_2 = [];
  5175. var SUB_MIX_3 = [];
  5176. var INV_SUB_MIX_0 = [];
  5177. var INV_SUB_MIX_1 = [];
  5178. var INV_SUB_MIX_2 = [];
  5179. var INV_SUB_MIX_3 = []; // Compute lookup tables
  5180. (function () {
  5181. // Compute double table
  5182. var d = [];
  5183. for (var i = 0; i < 256; i++) {
  5184. if (i < 128) {
  5185. d[i] = i << 1;
  5186. } else {
  5187. d[i] = i << 1 ^ 0x11b;
  5188. }
  5189. } // Walk GF(2^8)
  5190. var x = 0;
  5191. var xi = 0;
  5192. for (var i = 0; i < 256; i++) {
  5193. // Compute sbox
  5194. var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4;
  5195. sx = sx >>> 8 ^ sx & 0xff ^ 0x63;
  5196. SBOX[x] = sx;
  5197. INV_SBOX[sx] = x; // Compute multiplication
  5198. var x2 = d[x];
  5199. var x4 = d[x2];
  5200. var x8 = d[x4]; // Compute sub bytes, mix columns tables
  5201. var t = d[sx] * 0x101 ^ sx * 0x1010100;
  5202. SUB_MIX_0[x] = t << 24 | t >>> 8;
  5203. SUB_MIX_1[x] = t << 16 | t >>> 16;
  5204. SUB_MIX_2[x] = t << 8 | t >>> 24;
  5205. SUB_MIX_3[x] = t; // Compute inv sub bytes, inv mix columns tables
  5206. var t = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100;
  5207. INV_SUB_MIX_0[sx] = t << 24 | t >>> 8;
  5208. INV_SUB_MIX_1[sx] = t << 16 | t >>> 16;
  5209. INV_SUB_MIX_2[sx] = t << 8 | t >>> 24;
  5210. INV_SUB_MIX_3[sx] = t; // Compute next counter
  5211. if (!x) {
  5212. x = xi = 1;
  5213. } else {
  5214. x = x2 ^ d[d[d[x8 ^ x2]]];
  5215. xi ^= d[d[xi]];
  5216. }
  5217. }
  5218. })(); // Precomputed Rcon lookup
  5219. var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36];
  5220. /**
  5221. * AES block cipher algorithm.
  5222. */
  5223. var AES = C_algo.AES = BlockCipher.extend({
  5224. _doReset: function _doReset() {
  5225. var t; // Skip reset of nRounds has been set before and key did not change
  5226. if (this._nRounds && this._keyPriorReset === this._key) {
  5227. return;
  5228. } // Shortcuts
  5229. var key = this._keyPriorReset = this._key;
  5230. var keyWords = key.words;
  5231. var keySize = key.sigBytes / 4; // Compute number of rounds
  5232. var nRounds = this._nRounds = keySize + 6; // Compute number of key schedule rows
  5233. var ksRows = (nRounds + 1) * 4; // Compute key schedule
  5234. var keySchedule = this._keySchedule = [];
  5235. for (var ksRow = 0; ksRow < ksRows; ksRow++) {
  5236. if (ksRow < keySize) {
  5237. keySchedule[ksRow] = keyWords[ksRow];
  5238. } else {
  5239. t = keySchedule[ksRow - 1];
  5240. if (!(ksRow % keySize)) {
  5241. // Rot word
  5242. t = t << 8 | t >>> 24; // Sub word
  5243. t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 0xff] << 16 | SBOX[t >>> 8 & 0xff] << 8 | SBOX[t & 0xff]; // Mix Rcon
  5244. t ^= RCON[ksRow / keySize | 0] << 24;
  5245. } else if (keySize > 6 && ksRow % keySize == 4) {
  5246. // Sub word
  5247. t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 0xff] << 16 | SBOX[t >>> 8 & 0xff] << 8 | SBOX[t & 0xff];
  5248. }
  5249. keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
  5250. }
  5251. } // Compute inv key schedule
  5252. var invKeySchedule = this._invKeySchedule = [];
  5253. for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) {
  5254. var ksRow = ksRows - invKsRow;
  5255. if (invKsRow % 4) {
  5256. var t = keySchedule[ksRow];
  5257. } else {
  5258. var t = keySchedule[ksRow - 4];
  5259. }
  5260. if (invKsRow < 4 || ksRow <= 4) {
  5261. invKeySchedule[invKsRow] = t;
  5262. } else {
  5263. invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[t >>> 16 & 0xff]] ^ INV_SUB_MIX_2[SBOX[t >>> 8 & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
  5264. }
  5265. }
  5266. },
  5267. encryptBlock: function encryptBlock(M, offset) {
  5268. this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX);
  5269. },
  5270. decryptBlock: function decryptBlock(M, offset) {
  5271. // Swap 2nd and 4th rows
  5272. var t = M[offset + 1];
  5273. M[offset + 1] = M[offset + 3];
  5274. M[offset + 3] = t;
  5275. this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); // Inv swap 2nd and 4th rows
  5276. var t = M[offset + 1];
  5277. M[offset + 1] = M[offset + 3];
  5278. M[offset + 3] = t;
  5279. },
  5280. _doCryptBlock: function _doCryptBlock(M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) {
  5281. // Shortcut
  5282. var nRounds = this._nRounds; // Get input, add round key
  5283. var s0 = M[offset] ^ keySchedule[0];
  5284. var s1 = M[offset + 1] ^ keySchedule[1];
  5285. var s2 = M[offset + 2] ^ keySchedule[2];
  5286. var s3 = M[offset + 3] ^ keySchedule[3]; // Key schedule row counter
  5287. var ksRow = 4; // Rounds
  5288. for (var round = 1; round < nRounds; round++) {
  5289. // Shift rows, sub bytes, mix columns, add round key
  5290. var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[s1 >>> 16 & 0xff] ^ SUB_MIX_2[s2 >>> 8 & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++];
  5291. var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[s2 >>> 16 & 0xff] ^ SUB_MIX_2[s3 >>> 8 & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++];
  5292. var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[s3 >>> 16 & 0xff] ^ SUB_MIX_2[s0 >>> 8 & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++];
  5293. var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[s0 >>> 16 & 0xff] ^ SUB_MIX_2[s1 >>> 8 & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; // Update state
  5294. s0 = t0;
  5295. s1 = t1;
  5296. s2 = t2;
  5297. s3 = t3;
  5298. } // Shift rows, sub bytes, add round key
  5299. var t0 = (SBOX[s0 >>> 24] << 24 | SBOX[s1 >>> 16 & 0xff] << 16 | SBOX[s2 >>> 8 & 0xff] << 8 | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++];
  5300. var t1 = (SBOX[s1 >>> 24] << 24 | SBOX[s2 >>> 16 & 0xff] << 16 | SBOX[s3 >>> 8 & 0xff] << 8 | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++];
  5301. var t2 = (SBOX[s2 >>> 24] << 24 | SBOX[s3 >>> 16 & 0xff] << 16 | SBOX[s0 >>> 8 & 0xff] << 8 | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++];
  5302. var t3 = (SBOX[s3 >>> 24] << 24 | SBOX[s0 >>> 16 & 0xff] << 16 | SBOX[s1 >>> 8 & 0xff] << 8 | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; // Set output
  5303. M[offset] = t0;
  5304. M[offset + 1] = t1;
  5305. M[offset + 2] = t2;
  5306. M[offset + 3] = t3;
  5307. },
  5308. keySize: 256 / 32
  5309. });
  5310. /**
  5311. * Shortcut functions to the cipher's object interface.
  5312. *
  5313. * @example
  5314. *
  5315. * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg);
  5316. * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg);
  5317. */
  5318. C.AES = BlockCipher._createHelper(AES);
  5319. })();
  5320. return CryptoJS.AES;
  5321. });
  5322. /***/ }),
  5323. /***/ 1582:
  5324. /***/ (function(module, exports, __webpack_require__) {
  5325. "use strict";
  5326. __webpack_require__(7042);
  5327. __webpack_require__(2222);
  5328. __webpack_require__(1539);
  5329. __webpack_require__(9714);
  5330. __webpack_require__(561);
  5331. ;
  5332. (function (root, factory, undef) {
  5333. if (true) {
  5334. // CommonJS
  5335. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(3839));
  5336. } else {}
  5337. })(void 0, function (CryptoJS) {
  5338. /**
  5339. * Cipher core components.
  5340. */
  5341. CryptoJS.lib.Cipher || function (undefined) {
  5342. // Shortcuts
  5343. var C = CryptoJS;
  5344. var C_lib = C.lib;
  5345. var Base = C_lib.Base;
  5346. var WordArray = C_lib.WordArray;
  5347. var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm;
  5348. var C_enc = C.enc;
  5349. var Utf8 = C_enc.Utf8;
  5350. var Base64 = C_enc.Base64;
  5351. var C_algo = C.algo;
  5352. var EvpKDF = C_algo.EvpKDF;
  5353. /**
  5354. * Abstract base cipher template.
  5355. *
  5356. * @property {number} keySize This cipher's key size. Default: 4 (128 bits)
  5357. * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits)
  5358. * @property {number} _ENC_XFORM_MODE A constant representing encryption mode.
  5359. * @property {number} _DEC_XFORM_MODE A constant representing decryption mode.
  5360. */
  5361. var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({
  5362. /**
  5363. * Configuration options.
  5364. *
  5365. * @property {WordArray} iv The IV to use for this operation.
  5366. */
  5367. cfg: Base.extend(),
  5368. /**
  5369. * Creates this cipher in encryption mode.
  5370. *
  5371. * @param {WordArray} key The key.
  5372. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  5373. *
  5374. * @return {Cipher} A cipher instance.
  5375. *
  5376. * @static
  5377. *
  5378. * @example
  5379. *
  5380. * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray });
  5381. */
  5382. createEncryptor: function createEncryptor(key, cfg) {
  5383. return this.create(this._ENC_XFORM_MODE, key, cfg);
  5384. },
  5385. /**
  5386. * Creates this cipher in decryption mode.
  5387. *
  5388. * @param {WordArray} key The key.
  5389. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  5390. *
  5391. * @return {Cipher} A cipher instance.
  5392. *
  5393. * @static
  5394. *
  5395. * @example
  5396. *
  5397. * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray });
  5398. */
  5399. createDecryptor: function createDecryptor(key, cfg) {
  5400. return this.create(this._DEC_XFORM_MODE, key, cfg);
  5401. },
  5402. /**
  5403. * Initializes a newly created cipher.
  5404. *
  5405. * @param {number} xformMode Either the encryption or decryption transormation mode constant.
  5406. * @param {WordArray} key The key.
  5407. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  5408. *
  5409. * @example
  5410. *
  5411. * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray });
  5412. */
  5413. init: function init(xformMode, key, cfg) {
  5414. // Apply config defaults
  5415. this.cfg = this.cfg.extend(cfg); // Store transform mode and key
  5416. this._xformMode = xformMode;
  5417. this._key = key; // Set initial values
  5418. this.reset();
  5419. },
  5420. /**
  5421. * Resets this cipher to its initial state.
  5422. *
  5423. * @example
  5424. *
  5425. * cipher.reset();
  5426. */
  5427. reset: function reset() {
  5428. // Reset data buffer
  5429. BufferedBlockAlgorithm.reset.call(this); // Perform concrete-cipher logic
  5430. this._doReset();
  5431. },
  5432. /**
  5433. * Adds data to be encrypted or decrypted.
  5434. *
  5435. * @param {WordArray|string} dataUpdate The data to encrypt or decrypt.
  5436. *
  5437. * @return {WordArray} The data after processing.
  5438. *
  5439. * @example
  5440. *
  5441. * var encrypted = cipher.process('data');
  5442. * var encrypted = cipher.process(wordArray);
  5443. */
  5444. process: function process(dataUpdate) {
  5445. // Append
  5446. this._append(dataUpdate); // Process available blocks
  5447. return this._process();
  5448. },
  5449. /**
  5450. * Finalizes the encryption or decryption process.
  5451. * Note that the finalize operation is effectively a destructive, read-once operation.
  5452. *
  5453. * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt.
  5454. *
  5455. * @return {WordArray} The data after final processing.
  5456. *
  5457. * @example
  5458. *
  5459. * var encrypted = cipher.finalize();
  5460. * var encrypted = cipher.finalize('data');
  5461. * var encrypted = cipher.finalize(wordArray);
  5462. */
  5463. finalize: function finalize(dataUpdate) {
  5464. // Final data update
  5465. if (dataUpdate) {
  5466. this._append(dataUpdate);
  5467. } // Perform concrete-cipher logic
  5468. var finalProcessedData = this._doFinalize();
  5469. return finalProcessedData;
  5470. },
  5471. keySize: 128 / 32,
  5472. ivSize: 128 / 32,
  5473. _ENC_XFORM_MODE: 1,
  5474. _DEC_XFORM_MODE: 2,
  5475. /**
  5476. * Creates shortcut functions to a cipher's object interface.
  5477. *
  5478. * @param {Cipher} cipher The cipher to create a helper for.
  5479. *
  5480. * @return {Object} An object with encrypt and decrypt shortcut functions.
  5481. *
  5482. * @static
  5483. *
  5484. * @example
  5485. *
  5486. * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES);
  5487. */
  5488. _createHelper: function () {
  5489. function selectCipherStrategy(key) {
  5490. if (typeof key == 'string') {
  5491. return PasswordBasedCipher;
  5492. } else {
  5493. return SerializableCipher;
  5494. }
  5495. }
  5496. return function (cipher) {
  5497. return {
  5498. encrypt: function encrypt(message, key, cfg) {
  5499. return selectCipherStrategy(key).encrypt(cipher, message, key, cfg);
  5500. },
  5501. decrypt: function decrypt(ciphertext, key, cfg) {
  5502. return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg);
  5503. }
  5504. };
  5505. };
  5506. }()
  5507. });
  5508. /**
  5509. * Abstract base stream cipher template.
  5510. *
  5511. * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits)
  5512. */
  5513. var StreamCipher = C_lib.StreamCipher = Cipher.extend({
  5514. _doFinalize: function _doFinalize() {
  5515. // Process partial blocks
  5516. var finalProcessedBlocks = this._process(!!'flush');
  5517. return finalProcessedBlocks;
  5518. },
  5519. blockSize: 1
  5520. });
  5521. /**
  5522. * Mode namespace.
  5523. */
  5524. var C_mode = C.mode = {};
  5525. /**
  5526. * Abstract base block cipher mode template.
  5527. */
  5528. var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({
  5529. /**
  5530. * Creates this mode for encryption.
  5531. *
  5532. * @param {Cipher} cipher A block cipher instance.
  5533. * @param {Array} iv The IV words.
  5534. *
  5535. * @static
  5536. *
  5537. * @example
  5538. *
  5539. * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words);
  5540. */
  5541. createEncryptor: function createEncryptor(cipher, iv) {
  5542. return this.Encryptor.create(cipher, iv);
  5543. },
  5544. /**
  5545. * Creates this mode for decryption.
  5546. *
  5547. * @param {Cipher} cipher A block cipher instance.
  5548. * @param {Array} iv The IV words.
  5549. *
  5550. * @static
  5551. *
  5552. * @example
  5553. *
  5554. * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words);
  5555. */
  5556. createDecryptor: function createDecryptor(cipher, iv) {
  5557. return this.Decryptor.create(cipher, iv);
  5558. },
  5559. /**
  5560. * Initializes a newly created mode.
  5561. *
  5562. * @param {Cipher} cipher A block cipher instance.
  5563. * @param {Array} iv The IV words.
  5564. *
  5565. * @example
  5566. *
  5567. * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words);
  5568. */
  5569. init: function init(cipher, iv) {
  5570. this._cipher = cipher;
  5571. this._iv = iv;
  5572. }
  5573. });
  5574. /**
  5575. * Cipher Block Chaining mode.
  5576. */
  5577. var CBC = C_mode.CBC = function () {
  5578. /**
  5579. * Abstract base CBC mode.
  5580. */
  5581. var CBC = BlockCipherMode.extend();
  5582. /**
  5583. * CBC encryptor.
  5584. */
  5585. CBC.Encryptor = CBC.extend({
  5586. /**
  5587. * Processes the data block at offset.
  5588. *
  5589. * @param {Array} words The data words to operate on.
  5590. * @param {number} offset The offset where the block starts.
  5591. *
  5592. * @example
  5593. *
  5594. * mode.processBlock(data.words, offset);
  5595. */
  5596. processBlock: function processBlock(words, offset) {
  5597. // Shortcuts
  5598. var cipher = this._cipher;
  5599. var blockSize = cipher.blockSize; // XOR and encrypt
  5600. xorBlock.call(this, words, offset, blockSize);
  5601. cipher.encryptBlock(words, offset); // Remember this block to use with next block
  5602. this._prevBlock = words.slice(offset, offset + blockSize);
  5603. }
  5604. });
  5605. /**
  5606. * CBC decryptor.
  5607. */
  5608. CBC.Decryptor = CBC.extend({
  5609. /**
  5610. * Processes the data block at offset.
  5611. *
  5612. * @param {Array} words The data words to operate on.
  5613. * @param {number} offset The offset where the block starts.
  5614. *
  5615. * @example
  5616. *
  5617. * mode.processBlock(data.words, offset);
  5618. */
  5619. processBlock: function processBlock(words, offset) {
  5620. // Shortcuts
  5621. var cipher = this._cipher;
  5622. var blockSize = cipher.blockSize; // Remember this block to use with next block
  5623. var thisBlock = words.slice(offset, offset + blockSize); // Decrypt and XOR
  5624. cipher.decryptBlock(words, offset);
  5625. xorBlock.call(this, words, offset, blockSize); // This block becomes the previous block
  5626. this._prevBlock = thisBlock;
  5627. }
  5628. });
  5629. function xorBlock(words, offset, blockSize) {
  5630. var block; // Shortcut
  5631. var iv = this._iv; // Choose mixing block
  5632. if (iv) {
  5633. block = iv; // Remove IV for subsequent blocks
  5634. this._iv = undefined;
  5635. } else {
  5636. block = this._prevBlock;
  5637. } // XOR blocks
  5638. for (var i = 0; i < blockSize; i++) {
  5639. words[offset + i] ^= block[i];
  5640. }
  5641. }
  5642. return CBC;
  5643. }();
  5644. /**
  5645. * Padding namespace.
  5646. */
  5647. var C_pad = C.pad = {};
  5648. /**
  5649. * PKCS #5/7 padding strategy.
  5650. */
  5651. var Pkcs7 = C_pad.Pkcs7 = {
  5652. /**
  5653. * Pads data using the algorithm defined in PKCS #5/7.
  5654. *
  5655. * @param {WordArray} data The data to pad.
  5656. * @param {number} blockSize The multiple that the data should be padded to.
  5657. *
  5658. * @static
  5659. *
  5660. * @example
  5661. *
  5662. * CryptoJS.pad.Pkcs7.pad(wordArray, 4);
  5663. */
  5664. pad: function pad(data, blockSize) {
  5665. // Shortcut
  5666. var blockSizeBytes = blockSize * 4; // Count padding bytes
  5667. var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; // Create padding word
  5668. var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes; // Create padding
  5669. var paddingWords = [];
  5670. for (var i = 0; i < nPaddingBytes; i += 4) {
  5671. paddingWords.push(paddingWord);
  5672. }
  5673. var padding = WordArray.create(paddingWords, nPaddingBytes); // Add padding
  5674. data.concat(padding);
  5675. },
  5676. /**
  5677. * Unpads data that had been padded using the algorithm defined in PKCS #5/7.
  5678. *
  5679. * @param {WordArray} data The data to unpad.
  5680. *
  5681. * @static
  5682. *
  5683. * @example
  5684. *
  5685. * CryptoJS.pad.Pkcs7.unpad(wordArray);
  5686. */
  5687. unpad: function unpad(data) {
  5688. // Get number of padding bytes from last byte
  5689. var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff; // Remove padding
  5690. data.sigBytes -= nPaddingBytes;
  5691. }
  5692. };
  5693. /**
  5694. * Abstract base block cipher template.
  5695. *
  5696. * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits)
  5697. */
  5698. var BlockCipher = C_lib.BlockCipher = Cipher.extend({
  5699. /**
  5700. * Configuration options.
  5701. *
  5702. * @property {Mode} mode The block mode to use. Default: CBC
  5703. * @property {Padding} padding The padding strategy to use. Default: Pkcs7
  5704. */
  5705. cfg: Cipher.cfg.extend({
  5706. mode: CBC,
  5707. padding: Pkcs7
  5708. }),
  5709. reset: function reset() {
  5710. var modeCreator; // Reset cipher
  5711. Cipher.reset.call(this); // Shortcuts
  5712. var cfg = this.cfg;
  5713. var iv = cfg.iv;
  5714. var mode = cfg.mode; // Reset block mode
  5715. if (this._xformMode == this._ENC_XFORM_MODE) {
  5716. modeCreator = mode.createEncryptor;
  5717. } else
  5718. /* if (this._xformMode == this._DEC_XFORM_MODE) */
  5719. {
  5720. modeCreator = mode.createDecryptor; // Keep at least one block in the buffer for unpadding
  5721. this._minBufferSize = 1;
  5722. }
  5723. if (this._mode && this._mode.__creator == modeCreator) {
  5724. this._mode.init(this, iv && iv.words);
  5725. } else {
  5726. this._mode = modeCreator.call(mode, this, iv && iv.words);
  5727. this._mode.__creator = modeCreator;
  5728. }
  5729. },
  5730. _doProcessBlock: function _doProcessBlock(words, offset) {
  5731. this._mode.processBlock(words, offset);
  5732. },
  5733. _doFinalize: function _doFinalize() {
  5734. var finalProcessedBlocks; // Shortcut
  5735. var padding = this.cfg.padding; // Finalize
  5736. if (this._xformMode == this._ENC_XFORM_MODE) {
  5737. // Pad data
  5738. padding.pad(this._data, this.blockSize); // Process final blocks
  5739. finalProcessedBlocks = this._process(!!'flush');
  5740. } else
  5741. /* if (this._xformMode == this._DEC_XFORM_MODE) */
  5742. {
  5743. // Process final blocks
  5744. finalProcessedBlocks = this._process(!!'flush'); // Unpad data
  5745. padding.unpad(finalProcessedBlocks);
  5746. }
  5747. return finalProcessedBlocks;
  5748. },
  5749. blockSize: 128 / 32
  5750. });
  5751. /**
  5752. * A collection of cipher parameters.
  5753. *
  5754. * @property {WordArray} ciphertext The raw ciphertext.
  5755. * @property {WordArray} key The key to this ciphertext.
  5756. * @property {WordArray} iv The IV used in the ciphering operation.
  5757. * @property {WordArray} salt The salt used with a key derivation function.
  5758. * @property {Cipher} algorithm The cipher algorithm.
  5759. * @property {Mode} mode The block mode used in the ciphering operation.
  5760. * @property {Padding} padding The padding scheme used in the ciphering operation.
  5761. * @property {number} blockSize The block size of the cipher.
  5762. * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string.
  5763. */
  5764. var CipherParams = C_lib.CipherParams = Base.extend({
  5765. /**
  5766. * Initializes a newly created cipher params object.
  5767. *
  5768. * @param {Object} cipherParams An object with any of the possible cipher parameters.
  5769. *
  5770. * @example
  5771. *
  5772. * var cipherParams = CryptoJS.lib.CipherParams.create({
  5773. * ciphertext: ciphertextWordArray,
  5774. * key: keyWordArray,
  5775. * iv: ivWordArray,
  5776. * salt: saltWordArray,
  5777. * algorithm: CryptoJS.algo.AES,
  5778. * mode: CryptoJS.mode.CBC,
  5779. * padding: CryptoJS.pad.PKCS7,
  5780. * blockSize: 4,
  5781. * formatter: CryptoJS.format.OpenSSL
  5782. * });
  5783. */
  5784. init: function init(cipherParams) {
  5785. this.mixIn(cipherParams);
  5786. },
  5787. /**
  5788. * Converts this cipher params object to a string.
  5789. *
  5790. * @param {Format} formatter (Optional) The formatting strategy to use.
  5791. *
  5792. * @return {string} The stringified cipher params.
  5793. *
  5794. * @throws Error If neither the formatter nor the default formatter is set.
  5795. *
  5796. * @example
  5797. *
  5798. * var string = cipherParams + '';
  5799. * var string = cipherParams.toString();
  5800. * var string = cipherParams.toString(CryptoJS.format.OpenSSL);
  5801. */
  5802. toString: function toString(formatter) {
  5803. return (formatter || this.formatter).stringify(this);
  5804. }
  5805. });
  5806. /**
  5807. * Format namespace.
  5808. */
  5809. var C_format = C.format = {};
  5810. /**
  5811. * OpenSSL formatting strategy.
  5812. */
  5813. var OpenSSLFormatter = C_format.OpenSSL = {
  5814. /**
  5815. * Converts a cipher params object to an OpenSSL-compatible string.
  5816. *
  5817. * @param {CipherParams} cipherParams The cipher params object.
  5818. *
  5819. * @return {string} The OpenSSL-compatible string.
  5820. *
  5821. * @static
  5822. *
  5823. * @example
  5824. *
  5825. * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams);
  5826. */
  5827. stringify: function stringify(cipherParams) {
  5828. var wordArray; // Shortcuts
  5829. var ciphertext = cipherParams.ciphertext;
  5830. var salt = cipherParams.salt; // Format
  5831. if (salt) {
  5832. wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext);
  5833. } else {
  5834. wordArray = ciphertext;
  5835. }
  5836. return wordArray.toString(Base64);
  5837. },
  5838. /**
  5839. * Converts an OpenSSL-compatible string to a cipher params object.
  5840. *
  5841. * @param {string} openSSLStr The OpenSSL-compatible string.
  5842. *
  5843. * @return {CipherParams} The cipher params object.
  5844. *
  5845. * @static
  5846. *
  5847. * @example
  5848. *
  5849. * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString);
  5850. */
  5851. parse: function parse(openSSLStr) {
  5852. var salt; // Parse base64
  5853. var ciphertext = Base64.parse(openSSLStr); // Shortcut
  5854. var ciphertextWords = ciphertext.words; // Test for salt
  5855. if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) {
  5856. // Extract salt
  5857. salt = WordArray.create(ciphertextWords.slice(2, 4)); // Remove salt from ciphertext
  5858. ciphertextWords.splice(0, 4);
  5859. ciphertext.sigBytes -= 16;
  5860. }
  5861. return CipherParams.create({
  5862. ciphertext: ciphertext,
  5863. salt: salt
  5864. });
  5865. }
  5866. };
  5867. /**
  5868. * A cipher wrapper that returns ciphertext as a serializable cipher params object.
  5869. */
  5870. var SerializableCipher = C_lib.SerializableCipher = Base.extend({
  5871. /**
  5872. * Configuration options.
  5873. *
  5874. * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL
  5875. */
  5876. cfg: Base.extend({
  5877. format: OpenSSLFormatter
  5878. }),
  5879. /**
  5880. * Encrypts a message.
  5881. *
  5882. * @param {Cipher} cipher The cipher algorithm to use.
  5883. * @param {WordArray|string} message The message to encrypt.
  5884. * @param {WordArray} key The key.
  5885. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  5886. *
  5887. * @return {CipherParams} A cipher params object.
  5888. *
  5889. * @static
  5890. *
  5891. * @example
  5892. *
  5893. * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key);
  5894. * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv });
  5895. * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL });
  5896. */
  5897. encrypt: function encrypt(cipher, message, key, cfg) {
  5898. // Apply config defaults
  5899. cfg = this.cfg.extend(cfg); // Encrypt
  5900. var encryptor = cipher.createEncryptor(key, cfg);
  5901. var ciphertext = encryptor.finalize(message); // Shortcut
  5902. var cipherCfg = encryptor.cfg; // Create and return serializable cipher params
  5903. return CipherParams.create({
  5904. ciphertext: ciphertext,
  5905. key: key,
  5906. iv: cipherCfg.iv,
  5907. algorithm: cipher,
  5908. mode: cipherCfg.mode,
  5909. padding: cipherCfg.padding,
  5910. blockSize: cipher.blockSize,
  5911. formatter: cfg.format
  5912. });
  5913. },
  5914. /**
  5915. * Decrypts serialized ciphertext.
  5916. *
  5917. * @param {Cipher} cipher The cipher algorithm to use.
  5918. * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
  5919. * @param {WordArray} key The key.
  5920. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  5921. *
  5922. * @return {WordArray} The plaintext.
  5923. *
  5924. * @static
  5925. *
  5926. * @example
  5927. *
  5928. * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL });
  5929. * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL });
  5930. */
  5931. decrypt: function decrypt(cipher, ciphertext, key, cfg) {
  5932. // Apply config defaults
  5933. cfg = this.cfg.extend(cfg); // Convert string to CipherParams
  5934. ciphertext = this._parse(ciphertext, cfg.format); // Decrypt
  5935. var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext);
  5936. return plaintext;
  5937. },
  5938. /**
  5939. * Converts serialized ciphertext to CipherParams,
  5940. * else assumed CipherParams already and returns ciphertext unchanged.
  5941. *
  5942. * @param {CipherParams|string} ciphertext The ciphertext.
  5943. * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext.
  5944. *
  5945. * @return {CipherParams} The unserialized ciphertext.
  5946. *
  5947. * @static
  5948. *
  5949. * @example
  5950. *
  5951. * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format);
  5952. */
  5953. _parse: function _parse(ciphertext, format) {
  5954. if (typeof ciphertext == 'string') {
  5955. return format.parse(ciphertext, this);
  5956. } else {
  5957. return ciphertext;
  5958. }
  5959. }
  5960. });
  5961. /**
  5962. * Key derivation function namespace.
  5963. */
  5964. var C_kdf = C.kdf = {};
  5965. /**
  5966. * OpenSSL key derivation function.
  5967. */
  5968. var OpenSSLKdf = C_kdf.OpenSSL = {
  5969. /**
  5970. * Derives a key and IV from a password.
  5971. *
  5972. * @param {string} password The password to derive from.
  5973. * @param {number} keySize The size in words of the key to generate.
  5974. * @param {number} ivSize The size in words of the IV to generate.
  5975. * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly.
  5976. *
  5977. * @return {CipherParams} A cipher params object with the key, IV, and salt.
  5978. *
  5979. * @static
  5980. *
  5981. * @example
  5982. *
  5983. * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32);
  5984. * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt');
  5985. */
  5986. execute: function execute(password, keySize, ivSize, salt) {
  5987. // Generate random salt
  5988. if (!salt) {
  5989. salt = WordArray.random(64 / 8);
  5990. } // Derive key and IV
  5991. var key = EvpKDF.create({
  5992. keySize: keySize + ivSize
  5993. }).compute(password, salt); // Separate key and IV
  5994. var iv = WordArray.create(key.words.slice(keySize), ivSize * 4);
  5995. key.sigBytes = keySize * 4; // Return params
  5996. return CipherParams.create({
  5997. key: key,
  5998. iv: iv,
  5999. salt: salt
  6000. });
  6001. }
  6002. };
  6003. /**
  6004. * A serializable cipher wrapper that derives the key from a password,
  6005. * and returns ciphertext as a serializable cipher params object.
  6006. */
  6007. var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({
  6008. /**
  6009. * Configuration options.
  6010. *
  6011. * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL
  6012. */
  6013. cfg: SerializableCipher.cfg.extend({
  6014. kdf: OpenSSLKdf
  6015. }),
  6016. /**
  6017. * Encrypts a message using a password.
  6018. *
  6019. * @param {Cipher} cipher The cipher algorithm to use.
  6020. * @param {WordArray|string} message The message to encrypt.
  6021. * @param {string} password The password.
  6022. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  6023. *
  6024. * @return {CipherParams} A cipher params object.
  6025. *
  6026. * @static
  6027. *
  6028. * @example
  6029. *
  6030. * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password');
  6031. * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL });
  6032. */
  6033. encrypt: function encrypt(cipher, message, password, cfg) {
  6034. // Apply config defaults
  6035. cfg = this.cfg.extend(cfg); // Derive key and other params
  6036. var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); // Add IV to config
  6037. cfg.iv = derivedParams.iv; // Encrypt
  6038. var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); // Mix in derived params
  6039. ciphertext.mixIn(derivedParams);
  6040. return ciphertext;
  6041. },
  6042. /**
  6043. * Decrypts serialized ciphertext using a password.
  6044. *
  6045. * @param {Cipher} cipher The cipher algorithm to use.
  6046. * @param {CipherParams|string} ciphertext The ciphertext to decrypt.
  6047. * @param {string} password The password.
  6048. * @param {Object} cfg (Optional) The configuration options to use for this operation.
  6049. *
  6050. * @return {WordArray} The plaintext.
  6051. *
  6052. * @static
  6053. *
  6054. * @example
  6055. *
  6056. * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL });
  6057. * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL });
  6058. */
  6059. decrypt: function decrypt(cipher, ciphertext, password, cfg) {
  6060. // Apply config defaults
  6061. cfg = this.cfg.extend(cfg); // Convert string to CipherParams
  6062. ciphertext = this._parse(ciphertext, cfg.format); // Derive key and other params
  6063. var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); // Add IV to config
  6064. cfg.iv = derivedParams.iv; // Decrypt
  6065. var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg);
  6066. return plaintext;
  6067. }
  6068. });
  6069. }();
  6070. });
  6071. /***/ }),
  6072. /***/ 757:
  6073. /***/ (function(module, exports, __webpack_require__) {
  6074. "use strict";
  6075. __webpack_require__(5743);
  6076. __webpack_require__(6992);
  6077. __webpack_require__(1539);
  6078. __webpack_require__(9135);
  6079. __webpack_require__(2990);
  6080. __webpack_require__(8927);
  6081. __webpack_require__(3105);
  6082. __webpack_require__(5035);
  6083. __webpack_require__(4345);
  6084. __webpack_require__(7174);
  6085. __webpack_require__(2846);
  6086. __webpack_require__(4731);
  6087. __webpack_require__(7209);
  6088. __webpack_require__(6319);
  6089. __webpack_require__(8867);
  6090. __webpack_require__(7789);
  6091. __webpack_require__(3739);
  6092. __webpack_require__(9368);
  6093. __webpack_require__(4483);
  6094. __webpack_require__(2056);
  6095. __webpack_require__(3462);
  6096. __webpack_require__(678);
  6097. __webpack_require__(7462);
  6098. __webpack_require__(3824);
  6099. __webpack_require__(5021);
  6100. __webpack_require__(2974);
  6101. __webpack_require__(5016);
  6102. __webpack_require__(9714);
  6103. __webpack_require__(7042);
  6104. __webpack_require__(9600);
  6105. __webpack_require__(2222);
  6106. __webpack_require__(561);
  6107. ;
  6108. (function (root, factory) {
  6109. if (true) {
  6110. // CommonJS
  6111. module.exports = exports = factory();
  6112. } else {}
  6113. })(void 0, function () {
  6114. /*globals window, global, require*/
  6115. /**
  6116. * CryptoJS core components.
  6117. */
  6118. var CryptoJS = CryptoJS || function (Math, undefined) {
  6119. var crypto; // Native crypto from window (Browser)
  6120. if (typeof window !== 'undefined' && window.crypto) {
  6121. crypto = window.crypto;
  6122. } // Native crypto in web worker (Browser)
  6123. if (typeof self !== 'undefined' && self.crypto) {
  6124. crypto = self.crypto;
  6125. } // Native crypto from worker
  6126. if (typeof globalThis !== 'undefined' && globalThis.crypto) {
  6127. crypto = globalThis.crypto;
  6128. } // Native (experimental IE 11) crypto from window (Browser)
  6129. if (!crypto && typeof window !== 'undefined' && window.msCrypto) {
  6130. crypto = window.msCrypto;
  6131. } // Native crypto from global (NodeJS)
  6132. if (!crypto && typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.crypto) {
  6133. crypto = __webpack_require__.g.crypto;
  6134. } // Native crypto import via require (NodeJS)
  6135. if (!crypto && "function" === 'function') {
  6136. try {
  6137. crypto = __webpack_require__(2480);
  6138. } catch (err) {}
  6139. }
  6140. /*
  6141. * Cryptographically secure pseudorandom number generator
  6142. *
  6143. * As Math.random() is cryptographically not safe to use
  6144. */
  6145. var cryptoSecureRandomInt = function cryptoSecureRandomInt() {
  6146. if (crypto) {
  6147. // Use getRandomValues method (Browser)
  6148. if (typeof crypto.getRandomValues === 'function') {
  6149. try {
  6150. return crypto.getRandomValues(new Uint32Array(1))[0];
  6151. } catch (err) {}
  6152. } // Use randomBytes method (NodeJS)
  6153. if (typeof crypto.randomBytes === 'function') {
  6154. try {
  6155. return crypto.randomBytes(4).readInt32LE();
  6156. } catch (err) {}
  6157. }
  6158. }
  6159. throw new Error('Native crypto module could not be used to get secure random number.');
  6160. };
  6161. /*
  6162. * Local polyfill of Object.create
  6163. */
  6164. var create = Object.create || function () {
  6165. function F() {}
  6166. return function (obj) {
  6167. var subtype;
  6168. F.prototype = obj;
  6169. subtype = new F();
  6170. F.prototype = null;
  6171. return subtype;
  6172. };
  6173. }();
  6174. /**
  6175. * CryptoJS namespace.
  6176. */
  6177. var C = {};
  6178. /**
  6179. * Library namespace.
  6180. */
  6181. var C_lib = C.lib = {};
  6182. /**
  6183. * Base object for prototypal inheritance.
  6184. */
  6185. var Base = C_lib.Base = function () {
  6186. return {
  6187. /**
  6188. * Creates a new object that inherits from this object.
  6189. *
  6190. * @param {Object} overrides Properties to copy into the new object.
  6191. *
  6192. * @return {Object} The new object.
  6193. *
  6194. * @static
  6195. *
  6196. * @example
  6197. *
  6198. * var MyType = CryptoJS.lib.Base.extend({
  6199. * field: 'value',
  6200. *
  6201. * method: function () {
  6202. * }
  6203. * });
  6204. */
  6205. extend: function extend(overrides) {
  6206. // Spawn
  6207. var subtype = create(this); // Augment
  6208. if (overrides) {
  6209. subtype.mixIn(overrides);
  6210. } // Create default initializer
  6211. if (!subtype.hasOwnProperty('init') || this.init === subtype.init) {
  6212. subtype.init = function () {
  6213. subtype.$super.init.apply(this, arguments);
  6214. };
  6215. } // Initializer's prototype is the subtype object
  6216. subtype.init.prototype = subtype; // Reference supertype
  6217. subtype.$super = this;
  6218. return subtype;
  6219. },
  6220. /**
  6221. * Extends this object and runs the init method.
  6222. * Arguments to create() will be passed to init().
  6223. *
  6224. * @return {Object} The new object.
  6225. *
  6226. * @static
  6227. *
  6228. * @example
  6229. *
  6230. * var instance = MyType.create();
  6231. */
  6232. create: function create() {
  6233. var instance = this.extend();
  6234. instance.init.apply(instance, arguments);
  6235. return instance;
  6236. },
  6237. /**
  6238. * Initializes a newly created object.
  6239. * Override this method to add some logic when your objects are created.
  6240. *
  6241. * @example
  6242. *
  6243. * var MyType = CryptoJS.lib.Base.extend({
  6244. * init: function () {
  6245. * // ...
  6246. * }
  6247. * });
  6248. */
  6249. init: function init() {},
  6250. /**
  6251. * Copies properties into this object.
  6252. *
  6253. * @param {Object} properties The properties to mix in.
  6254. *
  6255. * @example
  6256. *
  6257. * MyType.mixIn({
  6258. * field: 'value'
  6259. * });
  6260. */
  6261. mixIn: function mixIn(properties) {
  6262. for (var propertyName in properties) {
  6263. if (properties.hasOwnProperty(propertyName)) {
  6264. this[propertyName] = properties[propertyName];
  6265. }
  6266. } // IE won't copy toString using the loop above
  6267. if (properties.hasOwnProperty('toString')) {
  6268. this.toString = properties.toString;
  6269. }
  6270. },
  6271. /**
  6272. * Creates a copy of this object.
  6273. *
  6274. * @return {Object} The clone.
  6275. *
  6276. * @example
  6277. *
  6278. * var clone = instance.clone();
  6279. */
  6280. clone: function clone() {
  6281. return this.init.prototype.extend(this);
  6282. }
  6283. };
  6284. }();
  6285. /**
  6286. * An array of 32-bit words.
  6287. *
  6288. * @property {Array} words The array of 32-bit words.
  6289. * @property {number} sigBytes The number of significant bytes in this word array.
  6290. */
  6291. var WordArray = C_lib.WordArray = Base.extend({
  6292. /**
  6293. * Initializes a newly created word array.
  6294. *
  6295. * @param {Array} words (Optional) An array of 32-bit words.
  6296. * @param {number} sigBytes (Optional) The number of significant bytes in the words.
  6297. *
  6298. * @example
  6299. *
  6300. * var wordArray = CryptoJS.lib.WordArray.create();
  6301. * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
  6302. * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
  6303. */
  6304. init: function init(words, sigBytes) {
  6305. words = this.words = words || [];
  6306. if (sigBytes != undefined) {
  6307. this.sigBytes = sigBytes;
  6308. } else {
  6309. this.sigBytes = words.length * 4;
  6310. }
  6311. },
  6312. /**
  6313. * Converts this word array to a string.
  6314. *
  6315. * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex
  6316. *
  6317. * @return {string} The stringified word array.
  6318. *
  6319. * @example
  6320. *
  6321. * var string = wordArray + '';
  6322. * var string = wordArray.toString();
  6323. * var string = wordArray.toString(CryptoJS.enc.Utf8);
  6324. */
  6325. toString: function toString(encoder) {
  6326. return (encoder || Hex).stringify(this);
  6327. },
  6328. /**
  6329. * Concatenates a word array to this word array.
  6330. *
  6331. * @param {WordArray} wordArray The word array to append.
  6332. *
  6333. * @return {WordArray} This word array.
  6334. *
  6335. * @example
  6336. *
  6337. * wordArray1.concat(wordArray2);
  6338. */
  6339. concat: function concat(wordArray) {
  6340. // Shortcuts
  6341. var thisWords = this.words;
  6342. var thatWords = wordArray.words;
  6343. var thisSigBytes = this.sigBytes;
  6344. var thatSigBytes = wordArray.sigBytes; // Clamp excess bits
  6345. this.clamp(); // Concat
  6346. if (thisSigBytes % 4) {
  6347. // Copy one byte at a time
  6348. for (var i = 0; i < thatSigBytes; i++) {
  6349. var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
  6350. thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
  6351. }
  6352. } else {
  6353. // Copy one word at a time
  6354. for (var j = 0; j < thatSigBytes; j += 4) {
  6355. thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2];
  6356. }
  6357. }
  6358. this.sigBytes += thatSigBytes; // Chainable
  6359. return this;
  6360. },
  6361. /**
  6362. * Removes insignificant bits.
  6363. *
  6364. * @example
  6365. *
  6366. * wordArray.clamp();
  6367. */
  6368. clamp: function clamp() {
  6369. // Shortcuts
  6370. var words = this.words;
  6371. var sigBytes = this.sigBytes; // Clamp
  6372. words[sigBytes >>> 2] &= 0xffffffff << 32 - sigBytes % 4 * 8;
  6373. words.length = Math.ceil(sigBytes / 4);
  6374. },
  6375. /**
  6376. * Creates a copy of this word array.
  6377. *
  6378. * @return {WordArray} The clone.
  6379. *
  6380. * @example
  6381. *
  6382. * var clone = wordArray.clone();
  6383. */
  6384. clone: function clone() {
  6385. var clone = Base.clone.call(this);
  6386. clone.words = this.words.slice(0);
  6387. return clone;
  6388. },
  6389. /**
  6390. * Creates a word array filled with random bytes.
  6391. *
  6392. * @param {number} nBytes The number of random bytes to generate.
  6393. *
  6394. * @return {WordArray} The random word array.
  6395. *
  6396. * @static
  6397. *
  6398. * @example
  6399. *
  6400. * var wordArray = CryptoJS.lib.WordArray.random(16);
  6401. */
  6402. random: function random(nBytes) {
  6403. var words = [];
  6404. for (var i = 0; i < nBytes; i += 4) {
  6405. words.push(cryptoSecureRandomInt());
  6406. }
  6407. return new WordArray.init(words, nBytes);
  6408. }
  6409. });
  6410. /**
  6411. * Encoder namespace.
  6412. */
  6413. var C_enc = C.enc = {};
  6414. /**
  6415. * Hex encoding strategy.
  6416. */
  6417. var Hex = C_enc.Hex = {
  6418. /**
  6419. * Converts a word array to a hex string.
  6420. *
  6421. * @param {WordArray} wordArray The word array.
  6422. *
  6423. * @return {string} The hex string.
  6424. *
  6425. * @static
  6426. *
  6427. * @example
  6428. *
  6429. * var hexString = CryptoJS.enc.Hex.stringify(wordArray);
  6430. */
  6431. stringify: function stringify(wordArray) {
  6432. // Shortcuts
  6433. var words = wordArray.words;
  6434. var sigBytes = wordArray.sigBytes; // Convert
  6435. var hexChars = [];
  6436. for (var i = 0; i < sigBytes; i++) {
  6437. var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
  6438. hexChars.push((bite >>> 4).toString(16));
  6439. hexChars.push((bite & 0x0f).toString(16));
  6440. }
  6441. return hexChars.join('');
  6442. },
  6443. /**
  6444. * Converts a hex string to a word array.
  6445. *
  6446. * @param {string} hexStr The hex string.
  6447. *
  6448. * @return {WordArray} The word array.
  6449. *
  6450. * @static
  6451. *
  6452. * @example
  6453. *
  6454. * var wordArray = CryptoJS.enc.Hex.parse(hexString);
  6455. */
  6456. parse: function parse(hexStr) {
  6457. // Shortcut
  6458. var hexStrLength = hexStr.length; // Convert
  6459. var words = [];
  6460. for (var i = 0; i < hexStrLength; i += 2) {
  6461. words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
  6462. }
  6463. return new WordArray.init(words, hexStrLength / 2);
  6464. }
  6465. };
  6466. /**
  6467. * Latin1 encoding strategy.
  6468. */
  6469. var Latin1 = C_enc.Latin1 = {
  6470. /**
  6471. * Converts a word array to a Latin1 string.
  6472. *
  6473. * @param {WordArray} wordArray The word array.
  6474. *
  6475. * @return {string} The Latin1 string.
  6476. *
  6477. * @static
  6478. *
  6479. * @example
  6480. *
  6481. * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
  6482. */
  6483. stringify: function stringify(wordArray) {
  6484. // Shortcuts
  6485. var words = wordArray.words;
  6486. var sigBytes = wordArray.sigBytes; // Convert
  6487. var latin1Chars = [];
  6488. for (var i = 0; i < sigBytes; i++) {
  6489. var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
  6490. latin1Chars.push(String.fromCharCode(bite));
  6491. }
  6492. return latin1Chars.join('');
  6493. },
  6494. /**
  6495. * Converts a Latin1 string to a word array.
  6496. *
  6497. * @param {string} latin1Str The Latin1 string.
  6498. *
  6499. * @return {WordArray} The word array.
  6500. *
  6501. * @static
  6502. *
  6503. * @example
  6504. *
  6505. * var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
  6506. */
  6507. parse: function parse(latin1Str) {
  6508. // Shortcut
  6509. var latin1StrLength = latin1Str.length; // Convert
  6510. var words = [];
  6511. for (var i = 0; i < latin1StrLength; i++) {
  6512. words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << 24 - i % 4 * 8;
  6513. }
  6514. return new WordArray.init(words, latin1StrLength);
  6515. }
  6516. };
  6517. /**
  6518. * UTF-8 encoding strategy.
  6519. */
  6520. var Utf8 = C_enc.Utf8 = {
  6521. /**
  6522. * Converts a word array to a UTF-8 string.
  6523. *
  6524. * @param {WordArray} wordArray The word array.
  6525. *
  6526. * @return {string} The UTF-8 string.
  6527. *
  6528. * @static
  6529. *
  6530. * @example
  6531. *
  6532. * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
  6533. */
  6534. stringify: function stringify(wordArray) {
  6535. try {
  6536. return decodeURIComponent(escape(Latin1.stringify(wordArray)));
  6537. } catch (e) {
  6538. throw new Error('Malformed UTF-8 data');
  6539. }
  6540. },
  6541. /**
  6542. * Converts a UTF-8 string to a word array.
  6543. *
  6544. * @param {string} utf8Str The UTF-8 string.
  6545. *
  6546. * @return {WordArray} The word array.
  6547. *
  6548. * @static
  6549. *
  6550. * @example
  6551. *
  6552. * var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
  6553. */
  6554. parse: function parse(utf8Str) {
  6555. return Latin1.parse(unescape(encodeURIComponent(utf8Str)));
  6556. }
  6557. };
  6558. /**
  6559. * Abstract buffered block algorithm template.
  6560. *
  6561. * The property blockSize must be implemented in a concrete subtype.
  6562. *
  6563. * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0
  6564. */
  6565. var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({
  6566. /**
  6567. * Resets this block algorithm's data buffer to its initial state.
  6568. *
  6569. * @example
  6570. *
  6571. * bufferedBlockAlgorithm.reset();
  6572. */
  6573. reset: function reset() {
  6574. // Initial values
  6575. this._data = new WordArray.init();
  6576. this._nDataBytes = 0;
  6577. },
  6578. /**
  6579. * Adds new data to this block algorithm's buffer.
  6580. *
  6581. * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
  6582. *
  6583. * @example
  6584. *
  6585. * bufferedBlockAlgorithm._append('data');
  6586. * bufferedBlockAlgorithm._append(wordArray);
  6587. */
  6588. _append: function _append(data) {
  6589. // Convert string to WordArray, else assume WordArray already
  6590. if (typeof data == 'string') {
  6591. data = Utf8.parse(data);
  6592. } // Append
  6593. this._data.concat(data);
  6594. this._nDataBytes += data.sigBytes;
  6595. },
  6596. /**
  6597. * Processes available data blocks.
  6598. *
  6599. * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype.
  6600. *
  6601. * @param {boolean} doFlush Whether all blocks and partial blocks should be processed.
  6602. *
  6603. * @return {WordArray} The processed data.
  6604. *
  6605. * @example
  6606. *
  6607. * var processedData = bufferedBlockAlgorithm._process();
  6608. * var processedData = bufferedBlockAlgorithm._process(!!'flush');
  6609. */
  6610. _process: function _process(doFlush) {
  6611. var processedWords; // Shortcuts
  6612. var data = this._data;
  6613. var dataWords = data.words;
  6614. var dataSigBytes = data.sigBytes;
  6615. var blockSize = this.blockSize;
  6616. var blockSizeBytes = blockSize * 4; // Count blocks ready
  6617. var nBlocksReady = dataSigBytes / blockSizeBytes;
  6618. if (doFlush) {
  6619. // Round up to include partial blocks
  6620. nBlocksReady = Math.ceil(nBlocksReady);
  6621. } else {
  6622. // Round down to include only full blocks,
  6623. // less the number of blocks that must remain in the buffer
  6624. nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
  6625. } // Count words ready
  6626. var nWordsReady = nBlocksReady * blockSize; // Count bytes ready
  6627. var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); // Process blocks
  6628. if (nWordsReady) {
  6629. for (var offset = 0; offset < nWordsReady; offset += blockSize) {
  6630. // Perform concrete-algorithm logic
  6631. this._doProcessBlock(dataWords, offset);
  6632. } // Remove processed words
  6633. processedWords = dataWords.splice(0, nWordsReady);
  6634. data.sigBytes -= nBytesReady;
  6635. } // Return processed words
  6636. return new WordArray.init(processedWords, nBytesReady);
  6637. },
  6638. /**
  6639. * Creates a copy of this object.
  6640. *
  6641. * @return {Object} The clone.
  6642. *
  6643. * @example
  6644. *
  6645. * var clone = bufferedBlockAlgorithm.clone();
  6646. */
  6647. clone: function clone() {
  6648. var clone = Base.clone.call(this);
  6649. clone._data = this._data.clone();
  6650. return clone;
  6651. },
  6652. _minBufferSize: 0
  6653. });
  6654. /**
  6655. * Abstract hasher template.
  6656. *
  6657. * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits)
  6658. */
  6659. var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({
  6660. /**
  6661. * Configuration options.
  6662. */
  6663. cfg: Base.extend(),
  6664. /**
  6665. * Initializes a newly created hasher.
  6666. *
  6667. * @param {Object} cfg (Optional) The configuration options to use for this hash computation.
  6668. *
  6669. * @example
  6670. *
  6671. * var hasher = CryptoJS.algo.SHA256.create();
  6672. */
  6673. init: function init(cfg) {
  6674. // Apply config defaults
  6675. this.cfg = this.cfg.extend(cfg); // Set initial values
  6676. this.reset();
  6677. },
  6678. /**
  6679. * Resets this hasher to its initial state.
  6680. *
  6681. * @example
  6682. *
  6683. * hasher.reset();
  6684. */
  6685. reset: function reset() {
  6686. // Reset data buffer
  6687. BufferedBlockAlgorithm.reset.call(this); // Perform concrete-hasher logic
  6688. this._doReset();
  6689. },
  6690. /**
  6691. * Updates this hasher with a message.
  6692. *
  6693. * @param {WordArray|string} messageUpdate The message to append.
  6694. *
  6695. * @return {Hasher} This hasher.
  6696. *
  6697. * @example
  6698. *
  6699. * hasher.update('message');
  6700. * hasher.update(wordArray);
  6701. */
  6702. update: function update(messageUpdate) {
  6703. // Append
  6704. this._append(messageUpdate); // Update the hash
  6705. this._process(); // Chainable
  6706. return this;
  6707. },
  6708. /**
  6709. * Finalizes the hash computation.
  6710. * Note that the finalize operation is effectively a destructive, read-once operation.
  6711. *
  6712. * @param {WordArray|string} messageUpdate (Optional) A final message update.
  6713. *
  6714. * @return {WordArray} The hash.
  6715. *
  6716. * @example
  6717. *
  6718. * var hash = hasher.finalize();
  6719. * var hash = hasher.finalize('message');
  6720. * var hash = hasher.finalize(wordArray);
  6721. */
  6722. finalize: function finalize(messageUpdate) {
  6723. // Final message update
  6724. if (messageUpdate) {
  6725. this._append(messageUpdate);
  6726. } // Perform concrete-hasher logic
  6727. var hash = this._doFinalize();
  6728. return hash;
  6729. },
  6730. blockSize: 512 / 32,
  6731. /**
  6732. * Creates a shortcut function to a hasher's object interface.
  6733. *
  6734. * @param {Hasher} hasher The hasher to create a helper for.
  6735. *
  6736. * @return {Function} The shortcut function.
  6737. *
  6738. * @static
  6739. *
  6740. * @example
  6741. *
  6742. * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
  6743. */
  6744. _createHelper: function _createHelper(hasher) {
  6745. return function (message, cfg) {
  6746. return new hasher.init(cfg).finalize(message);
  6747. };
  6748. },
  6749. /**
  6750. * Creates a shortcut function to the HMAC's object interface.
  6751. *
  6752. * @param {Hasher} hasher The hasher to use in this HMAC helper.
  6753. *
  6754. * @return {Function} The shortcut function.
  6755. *
  6756. * @static
  6757. *
  6758. * @example
  6759. *
  6760. * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
  6761. */
  6762. _createHmacHelper: function _createHmacHelper(hasher) {
  6763. return function (message, key) {
  6764. return new C_algo.HMAC.init(hasher, key).finalize(message);
  6765. };
  6766. }
  6767. });
  6768. /**
  6769. * Algorithm namespace.
  6770. */
  6771. var C_algo = C.algo = {};
  6772. return C;
  6773. }(Math);
  6774. return CryptoJS;
  6775. });
  6776. /***/ }),
  6777. /***/ 7508:
  6778. /***/ (function(module, exports, __webpack_require__) {
  6779. "use strict";
  6780. __webpack_require__(9600);
  6781. ;
  6782. (function (root, factory) {
  6783. if (true) {
  6784. // CommonJS
  6785. module.exports = exports = factory(__webpack_require__(757));
  6786. } else {}
  6787. })(void 0, function (CryptoJS) {
  6788. (function () {
  6789. // Shortcuts
  6790. var C = CryptoJS;
  6791. var C_lib = C.lib;
  6792. var WordArray = C_lib.WordArray;
  6793. var C_enc = C.enc;
  6794. /**
  6795. * Base64 encoding strategy.
  6796. */
  6797. var Base64 = C_enc.Base64 = {
  6798. /**
  6799. * Converts a word array to a Base64 string.
  6800. *
  6801. * @param {WordArray} wordArray The word array.
  6802. *
  6803. * @return {string} The Base64 string.
  6804. *
  6805. * @static
  6806. *
  6807. * @example
  6808. *
  6809. * var base64String = CryptoJS.enc.Base64.stringify(wordArray);
  6810. */
  6811. stringify: function stringify(wordArray) {
  6812. // Shortcuts
  6813. var words = wordArray.words;
  6814. var sigBytes = wordArray.sigBytes;
  6815. var map = this._map; // Clamp excess bits
  6816. wordArray.clamp(); // Convert
  6817. var base64Chars = [];
  6818. for (var i = 0; i < sigBytes; i += 3) {
  6819. var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
  6820. var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;
  6821. var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;
  6822. var triplet = byte1 << 16 | byte2 << 8 | byte3;
  6823. for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
  6824. base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));
  6825. }
  6826. } // Add padding
  6827. var paddingChar = map.charAt(64);
  6828. if (paddingChar) {
  6829. while (base64Chars.length % 4) {
  6830. base64Chars.push(paddingChar);
  6831. }
  6832. }
  6833. return base64Chars.join('');
  6834. },
  6835. /**
  6836. * Converts a Base64 string to a word array.
  6837. *
  6838. * @param {string} base64Str The Base64 string.
  6839. *
  6840. * @return {WordArray} The word array.
  6841. *
  6842. * @static
  6843. *
  6844. * @example
  6845. *
  6846. * var wordArray = CryptoJS.enc.Base64.parse(base64String);
  6847. */
  6848. parse: function parse(base64Str) {
  6849. // Shortcuts
  6850. var base64StrLength = base64Str.length;
  6851. var map = this._map;
  6852. var reverseMap = this._reverseMap;
  6853. if (!reverseMap) {
  6854. reverseMap = this._reverseMap = [];
  6855. for (var j = 0; j < map.length; j++) {
  6856. reverseMap[map.charCodeAt(j)] = j;
  6857. }
  6858. } // Ignore padding
  6859. var paddingChar = map.charAt(64);
  6860. if (paddingChar) {
  6861. var paddingIndex = base64Str.indexOf(paddingChar);
  6862. if (paddingIndex !== -1) {
  6863. base64StrLength = paddingIndex;
  6864. }
  6865. } // Convert
  6866. return parseLoop(base64Str, base64StrLength, reverseMap);
  6867. },
  6868. _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='
  6869. };
  6870. function parseLoop(base64Str, base64StrLength, reverseMap) {
  6871. var words = [];
  6872. var nBytes = 0;
  6873. for (var i = 0; i < base64StrLength; i++) {
  6874. if (i % 4) {
  6875. var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
  6876. var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
  6877. var bitsCombined = bits1 | bits2;
  6878. words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
  6879. nBytes++;
  6880. }
  6881. }
  6882. return WordArray.create(words, nBytes);
  6883. }
  6884. })();
  6885. return CryptoJS.enc.Base64;
  6886. });
  6887. /***/ }),
  6888. /***/ 7590:
  6889. /***/ (function(module, exports, __webpack_require__) {
  6890. "use strict";
  6891. __webpack_require__(9600);
  6892. ;
  6893. (function (root, factory) {
  6894. if (true) {
  6895. // CommonJS
  6896. module.exports = exports = factory(__webpack_require__(757));
  6897. } else {}
  6898. })(void 0, function (CryptoJS) {
  6899. (function () {
  6900. // Shortcuts
  6901. var C = CryptoJS;
  6902. var C_lib = C.lib;
  6903. var WordArray = C_lib.WordArray;
  6904. var C_enc = C.enc;
  6905. /**
  6906. * Base64url encoding strategy.
  6907. */
  6908. var Base64url = C_enc.Base64url = {
  6909. /**
  6910. * Converts a word array to a Base64url string.
  6911. *
  6912. * @param {WordArray} wordArray The word array.
  6913. *
  6914. * @param {boolean} urlSafe Whether to use url safe
  6915. *
  6916. * @return {string} The Base64url string.
  6917. *
  6918. * @static
  6919. *
  6920. * @example
  6921. *
  6922. * var base64String = CryptoJS.enc.Base64url.stringify(wordArray);
  6923. */
  6924. stringify: function stringify(wordArray, urlSafe) {
  6925. if (urlSafe === void 0) {
  6926. urlSafe = true;
  6927. }
  6928. // Shortcuts
  6929. var words = wordArray.words;
  6930. var sigBytes = wordArray.sigBytes;
  6931. var map = urlSafe ? this._safe_map : this._map; // Clamp excess bits
  6932. wordArray.clamp(); // Convert
  6933. var base64Chars = [];
  6934. for (var i = 0; i < sigBytes; i += 3) {
  6935. var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
  6936. var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;
  6937. var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;
  6938. var triplet = byte1 << 16 | byte2 << 8 | byte3;
  6939. for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) {
  6940. base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));
  6941. }
  6942. } // Add padding
  6943. var paddingChar = map.charAt(64);
  6944. if (paddingChar) {
  6945. while (base64Chars.length % 4) {
  6946. base64Chars.push(paddingChar);
  6947. }
  6948. }
  6949. return base64Chars.join('');
  6950. },
  6951. /**
  6952. * Converts a Base64url string to a word array.
  6953. *
  6954. * @param {string} base64Str The Base64url string.
  6955. *
  6956. * @param {boolean} urlSafe Whether to use url safe
  6957. *
  6958. * @return {WordArray} The word array.
  6959. *
  6960. * @static
  6961. *
  6962. * @example
  6963. *
  6964. * var wordArray = CryptoJS.enc.Base64url.parse(base64String);
  6965. */
  6966. parse: function parse(base64Str, urlSafe) {
  6967. if (urlSafe === void 0) {
  6968. urlSafe = true;
  6969. }
  6970. // Shortcuts
  6971. var base64StrLength = base64Str.length;
  6972. var map = urlSafe ? this._safe_map : this._map;
  6973. var reverseMap = this._reverseMap;
  6974. if (!reverseMap) {
  6975. reverseMap = this._reverseMap = [];
  6976. for (var j = 0; j < map.length; j++) {
  6977. reverseMap[map.charCodeAt(j)] = j;
  6978. }
  6979. } // Ignore padding
  6980. var paddingChar = map.charAt(64);
  6981. if (paddingChar) {
  6982. var paddingIndex = base64Str.indexOf(paddingChar);
  6983. if (paddingIndex !== -1) {
  6984. base64StrLength = paddingIndex;
  6985. }
  6986. } // Convert
  6987. return parseLoop(base64Str, base64StrLength, reverseMap);
  6988. },
  6989. _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
  6990. _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'
  6991. };
  6992. function parseLoop(base64Str, base64StrLength, reverseMap) {
  6993. var words = [];
  6994. var nBytes = 0;
  6995. for (var i = 0; i < base64StrLength; i++) {
  6996. if (i % 4) {
  6997. var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
  6998. var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
  6999. var bitsCombined = bits1 | bits2;
  7000. words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
  7001. nBytes++;
  7002. }
  7003. }
  7004. return WordArray.create(words, nBytes);
  7005. }
  7006. })();
  7007. return CryptoJS.enc.Base64url;
  7008. });
  7009. /***/ }),
  7010. /***/ 4978:
  7011. /***/ (function(module, exports, __webpack_require__) {
  7012. "use strict";
  7013. __webpack_require__(9600);
  7014. ;
  7015. (function (root, factory) {
  7016. if (true) {
  7017. // CommonJS
  7018. module.exports = exports = factory(__webpack_require__(757));
  7019. } else {}
  7020. })(void 0, function (CryptoJS) {
  7021. (function () {
  7022. // Shortcuts
  7023. var C = CryptoJS;
  7024. var C_lib = C.lib;
  7025. var WordArray = C_lib.WordArray;
  7026. var C_enc = C.enc;
  7027. /**
  7028. * UTF-16 BE encoding strategy.
  7029. */
  7030. var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = {
  7031. /**
  7032. * Converts a word array to a UTF-16 BE string.
  7033. *
  7034. * @param {WordArray} wordArray The word array.
  7035. *
  7036. * @return {string} The UTF-16 BE string.
  7037. *
  7038. * @static
  7039. *
  7040. * @example
  7041. *
  7042. * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray);
  7043. */
  7044. stringify: function stringify(wordArray) {
  7045. // Shortcuts
  7046. var words = wordArray.words;
  7047. var sigBytes = wordArray.sigBytes; // Convert
  7048. var utf16Chars = [];
  7049. for (var i = 0; i < sigBytes; i += 2) {
  7050. var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 0xffff;
  7051. utf16Chars.push(String.fromCharCode(codePoint));
  7052. }
  7053. return utf16Chars.join('');
  7054. },
  7055. /**
  7056. * Converts a UTF-16 BE string to a word array.
  7057. *
  7058. * @param {string} utf16Str The UTF-16 BE string.
  7059. *
  7060. * @return {WordArray} The word array.
  7061. *
  7062. * @static
  7063. *
  7064. * @example
  7065. *
  7066. * var wordArray = CryptoJS.enc.Utf16.parse(utf16String);
  7067. */
  7068. parse: function parse(utf16Str) {
  7069. // Shortcut
  7070. var utf16StrLength = utf16Str.length; // Convert
  7071. var words = [];
  7072. for (var i = 0; i < utf16StrLength; i++) {
  7073. words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
  7074. }
  7075. return WordArray.create(words, utf16StrLength * 2);
  7076. }
  7077. };
  7078. /**
  7079. * UTF-16 LE encoding strategy.
  7080. */
  7081. C_enc.Utf16LE = {
  7082. /**
  7083. * Converts a word array to a UTF-16 LE string.
  7084. *
  7085. * @param {WordArray} wordArray The word array.
  7086. *
  7087. * @return {string} The UTF-16 LE string.
  7088. *
  7089. * @static
  7090. *
  7091. * @example
  7092. *
  7093. * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray);
  7094. */
  7095. stringify: function stringify(wordArray) {
  7096. // Shortcuts
  7097. var words = wordArray.words;
  7098. var sigBytes = wordArray.sigBytes; // Convert
  7099. var utf16Chars = [];
  7100. for (var i = 0; i < sigBytes; i += 2) {
  7101. var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 0xffff);
  7102. utf16Chars.push(String.fromCharCode(codePoint));
  7103. }
  7104. return utf16Chars.join('');
  7105. },
  7106. /**
  7107. * Converts a UTF-16 LE string to a word array.
  7108. *
  7109. * @param {string} utf16Str The UTF-16 LE string.
  7110. *
  7111. * @return {WordArray} The word array.
  7112. *
  7113. * @static
  7114. *
  7115. * @example
  7116. *
  7117. * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str);
  7118. */
  7119. parse: function parse(utf16Str) {
  7120. // Shortcut
  7121. var utf16StrLength = utf16Str.length; // Convert
  7122. var words = [];
  7123. for (var i = 0; i < utf16StrLength; i++) {
  7124. words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
  7125. }
  7126. return WordArray.create(words, utf16StrLength * 2);
  7127. }
  7128. };
  7129. function swapEndian(word) {
  7130. return word << 8 & 0xff00ff00 | word >>> 8 & 0x00ff00ff;
  7131. }
  7132. })();
  7133. return CryptoJS.enc.Utf16;
  7134. });
  7135. /***/ }),
  7136. /***/ 3839:
  7137. /***/ (function(module, exports, __webpack_require__) {
  7138. "use strict";
  7139. __webpack_require__(2222);
  7140. ;
  7141. (function (root, factory, undef) {
  7142. if (true) {
  7143. // CommonJS
  7144. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(9865), __webpack_require__(6727));
  7145. } else {}
  7146. })(void 0, function (CryptoJS) {
  7147. (function () {
  7148. // Shortcuts
  7149. var C = CryptoJS;
  7150. var C_lib = C.lib;
  7151. var Base = C_lib.Base;
  7152. var WordArray = C_lib.WordArray;
  7153. var C_algo = C.algo;
  7154. var MD5 = C_algo.MD5;
  7155. /**
  7156. * This key derivation function is meant to conform with EVP_BytesToKey.
  7157. * www.openssl.org/docs/crypto/EVP_BytesToKey.html
  7158. */
  7159. var EvpKDF = C_algo.EvpKDF = Base.extend({
  7160. /**
  7161. * Configuration options.
  7162. *
  7163. * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
  7164. * @property {Hasher} hasher The hash algorithm to use. Default: MD5
  7165. * @property {number} iterations The number of iterations to perform. Default: 1
  7166. */
  7167. cfg: Base.extend({
  7168. keySize: 128 / 32,
  7169. hasher: MD5,
  7170. iterations: 1
  7171. }),
  7172. /**
  7173. * Initializes a newly created key derivation function.
  7174. *
  7175. * @param {Object} cfg (Optional) The configuration options to use for the derivation.
  7176. *
  7177. * @example
  7178. *
  7179. * var kdf = CryptoJS.algo.EvpKDF.create();
  7180. * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 });
  7181. * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 });
  7182. */
  7183. init: function init(cfg) {
  7184. this.cfg = this.cfg.extend(cfg);
  7185. },
  7186. /**
  7187. * Derives a key from a password.
  7188. *
  7189. * @param {WordArray|string} password The password.
  7190. * @param {WordArray|string} salt A salt.
  7191. *
  7192. * @return {WordArray} The derived key.
  7193. *
  7194. * @example
  7195. *
  7196. * var key = kdf.compute(password, salt);
  7197. */
  7198. compute: function compute(password, salt) {
  7199. var block; // Shortcut
  7200. var cfg = this.cfg; // Init hasher
  7201. var hasher = cfg.hasher.create(); // Initial values
  7202. var derivedKey = WordArray.create(); // Shortcuts
  7203. var derivedKeyWords = derivedKey.words;
  7204. var keySize = cfg.keySize;
  7205. var iterations = cfg.iterations; // Generate key
  7206. while (derivedKeyWords.length < keySize) {
  7207. if (block) {
  7208. hasher.update(block);
  7209. }
  7210. block = hasher.update(password).finalize(salt);
  7211. hasher.reset(); // Iterations
  7212. for (var i = 1; i < iterations; i++) {
  7213. block = hasher.finalize(block);
  7214. hasher.reset();
  7215. }
  7216. derivedKey.concat(block);
  7217. }
  7218. derivedKey.sigBytes = keySize * 4;
  7219. return derivedKey;
  7220. }
  7221. });
  7222. /**
  7223. * Derives a key from a password.
  7224. *
  7225. * @param {WordArray|string} password The password.
  7226. * @param {WordArray|string} salt A salt.
  7227. * @param {Object} cfg (Optional) The configuration options to use for this computation.
  7228. *
  7229. * @return {WordArray} The derived key.
  7230. *
  7231. * @static
  7232. *
  7233. * @example
  7234. *
  7235. * var key = CryptoJS.EvpKDF(password, salt);
  7236. * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 });
  7237. * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 });
  7238. */
  7239. C.EvpKDF = function (password, salt, cfg) {
  7240. return EvpKDF.create(cfg).compute(password, salt);
  7241. };
  7242. })();
  7243. return CryptoJS.EvpKDF;
  7244. });
  7245. /***/ }),
  7246. /***/ 8942:
  7247. /***/ (function(module, exports, __webpack_require__) {
  7248. "use strict";
  7249. __webpack_require__(1539);
  7250. __webpack_require__(9714);
  7251. ;
  7252. (function (root, factory, undef) {
  7253. if (true) {
  7254. // CommonJS
  7255. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  7256. } else {}
  7257. })(void 0, function (CryptoJS) {
  7258. (function (undefined) {
  7259. // Shortcuts
  7260. var C = CryptoJS;
  7261. var C_lib = C.lib;
  7262. var CipherParams = C_lib.CipherParams;
  7263. var C_enc = C.enc;
  7264. var Hex = C_enc.Hex;
  7265. var C_format = C.format;
  7266. var HexFormatter = C_format.Hex = {
  7267. /**
  7268. * Converts the ciphertext of a cipher params object to a hexadecimally encoded string.
  7269. *
  7270. * @param {CipherParams} cipherParams The cipher params object.
  7271. *
  7272. * @return {string} The hexadecimally encoded string.
  7273. *
  7274. * @static
  7275. *
  7276. * @example
  7277. *
  7278. * var hexString = CryptoJS.format.Hex.stringify(cipherParams);
  7279. */
  7280. stringify: function stringify(cipherParams) {
  7281. return cipherParams.ciphertext.toString(Hex);
  7282. },
  7283. /**
  7284. * Converts a hexadecimally encoded ciphertext string to a cipher params object.
  7285. *
  7286. * @param {string} input The hexadecimally encoded string.
  7287. *
  7288. * @return {CipherParams} The cipher params object.
  7289. *
  7290. * @static
  7291. *
  7292. * @example
  7293. *
  7294. * var cipherParams = CryptoJS.format.Hex.parse(hexString);
  7295. */
  7296. parse: function parse(input) {
  7297. var ciphertext = Hex.parse(input);
  7298. return CipherParams.create({
  7299. ciphertext: ciphertext
  7300. });
  7301. }
  7302. };
  7303. })();
  7304. return CryptoJS.format.Hex;
  7305. });
  7306. /***/ }),
  7307. /***/ 6727:
  7308. /***/ (function(module, exports, __webpack_require__) {
  7309. "use strict";
  7310. __webpack_require__(2222);
  7311. ;
  7312. (function (root, factory) {
  7313. if (true) {
  7314. // CommonJS
  7315. module.exports = exports = factory(__webpack_require__(757));
  7316. } else {}
  7317. })(void 0, function (CryptoJS) {
  7318. (function () {
  7319. // Shortcuts
  7320. var C = CryptoJS;
  7321. var C_lib = C.lib;
  7322. var Base = C_lib.Base;
  7323. var C_enc = C.enc;
  7324. var Utf8 = C_enc.Utf8;
  7325. var C_algo = C.algo;
  7326. /**
  7327. * HMAC algorithm.
  7328. */
  7329. var HMAC = C_algo.HMAC = Base.extend({
  7330. /**
  7331. * Initializes a newly created HMAC.
  7332. *
  7333. * @param {Hasher} hasher The hash algorithm to use.
  7334. * @param {WordArray|string} key The secret key.
  7335. *
  7336. * @example
  7337. *
  7338. * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key);
  7339. */
  7340. init: function init(hasher, key) {
  7341. // Init hasher
  7342. hasher = this._hasher = new hasher.init(); // Convert string to WordArray, else assume WordArray already
  7343. if (typeof key == 'string') {
  7344. key = Utf8.parse(key);
  7345. } // Shortcuts
  7346. var hasherBlockSize = hasher.blockSize;
  7347. var hasherBlockSizeBytes = hasherBlockSize * 4; // Allow arbitrary length keys
  7348. if (key.sigBytes > hasherBlockSizeBytes) {
  7349. key = hasher.finalize(key);
  7350. } // Clamp excess bits
  7351. key.clamp(); // Clone key for inner and outer pads
  7352. var oKey = this._oKey = key.clone();
  7353. var iKey = this._iKey = key.clone(); // Shortcuts
  7354. var oKeyWords = oKey.words;
  7355. var iKeyWords = iKey.words; // XOR keys with pad constants
  7356. for (var i = 0; i < hasherBlockSize; i++) {
  7357. oKeyWords[i] ^= 0x5c5c5c5c;
  7358. iKeyWords[i] ^= 0x36363636;
  7359. }
  7360. oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; // Set initial values
  7361. this.reset();
  7362. },
  7363. /**
  7364. * Resets this HMAC to its initial state.
  7365. *
  7366. * @example
  7367. *
  7368. * hmacHasher.reset();
  7369. */
  7370. reset: function reset() {
  7371. // Shortcut
  7372. var hasher = this._hasher; // Reset
  7373. hasher.reset();
  7374. hasher.update(this._iKey);
  7375. },
  7376. /**
  7377. * Updates this HMAC with a message.
  7378. *
  7379. * @param {WordArray|string} messageUpdate The message to append.
  7380. *
  7381. * @return {HMAC} This HMAC instance.
  7382. *
  7383. * @example
  7384. *
  7385. * hmacHasher.update('message');
  7386. * hmacHasher.update(wordArray);
  7387. */
  7388. update: function update(messageUpdate) {
  7389. this._hasher.update(messageUpdate); // Chainable
  7390. return this;
  7391. },
  7392. /**
  7393. * Finalizes the HMAC computation.
  7394. * Note that the finalize operation is effectively a destructive, read-once operation.
  7395. *
  7396. * @param {WordArray|string} messageUpdate (Optional) A final message update.
  7397. *
  7398. * @return {WordArray} The HMAC.
  7399. *
  7400. * @example
  7401. *
  7402. * var hmac = hmacHasher.finalize();
  7403. * var hmac = hmacHasher.finalize('message');
  7404. * var hmac = hmacHasher.finalize(wordArray);
  7405. */
  7406. finalize: function finalize(messageUpdate) {
  7407. // Shortcut
  7408. var hasher = this._hasher; // Compute HMAC
  7409. var innerHash = hasher.finalize(messageUpdate);
  7410. hasher.reset();
  7411. var hmac = hasher.finalize(this._oKey.clone().concat(innerHash));
  7412. return hmac;
  7413. }
  7414. });
  7415. })();
  7416. });
  7417. /***/ }),
  7418. /***/ 5153:
  7419. /***/ (function(module, exports, __webpack_require__) {
  7420. "use strict";
  7421. ;
  7422. (function (root, factory, undef) {
  7423. if (true) {
  7424. // CommonJS
  7425. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(2601), __webpack_require__(1947), __webpack_require__(4978), __webpack_require__(7508), __webpack_require__(7590), __webpack_require__(3440), __webpack_require__(9865), __webpack_require__(8921), __webpack_require__(6876), __webpack_require__(7991), __webpack_require__(8122), __webpack_require__(8342), __webpack_require__(8714), __webpack_require__(6727), __webpack_require__(3486), __webpack_require__(3839), __webpack_require__(1582), __webpack_require__(702), __webpack_require__(2362), __webpack_require__(4412), __webpack_require__(5720), __webpack_require__(3518), __webpack_require__(6362), __webpack_require__(4431), __webpack_require__(8800), __webpack_require__(3992), __webpack_require__(649), __webpack_require__(8942), __webpack_require__(194), __webpack_require__(8437), __webpack_require__(4640), __webpack_require__(5323), __webpack_require__(4363));
  7426. } else {}
  7427. })(void 0, function (CryptoJS) {
  7428. return CryptoJS;
  7429. });
  7430. /***/ }),
  7431. /***/ 1947:
  7432. /***/ (function(module, exports, __webpack_require__) {
  7433. "use strict";
  7434. __webpack_require__(7803);
  7435. __webpack_require__(1539);
  7436. __webpack_require__(6992);
  7437. __webpack_require__(2472);
  7438. __webpack_require__(2990);
  7439. __webpack_require__(8927);
  7440. __webpack_require__(3105);
  7441. __webpack_require__(5035);
  7442. __webpack_require__(4345);
  7443. __webpack_require__(7174);
  7444. __webpack_require__(2846);
  7445. __webpack_require__(4731);
  7446. __webpack_require__(7209);
  7447. __webpack_require__(6319);
  7448. __webpack_require__(8867);
  7449. __webpack_require__(7789);
  7450. __webpack_require__(3739);
  7451. __webpack_require__(9368);
  7452. __webpack_require__(4483);
  7453. __webpack_require__(2056);
  7454. __webpack_require__(3462);
  7455. __webpack_require__(678);
  7456. __webpack_require__(7462);
  7457. __webpack_require__(3824);
  7458. __webpack_require__(5021);
  7459. __webpack_require__(2974);
  7460. __webpack_require__(5016);
  7461. __webpack_require__(7145);
  7462. __webpack_require__(9743);
  7463. __webpack_require__(5109);
  7464. __webpack_require__(8255);
  7465. __webpack_require__(5125);
  7466. __webpack_require__(9135);
  7467. __webpack_require__(4197);
  7468. __webpack_require__(6495);
  7469. ;
  7470. (function (root, factory) {
  7471. if (true) {
  7472. // CommonJS
  7473. module.exports = exports = factory(__webpack_require__(757));
  7474. } else {}
  7475. })(void 0, function (CryptoJS) {
  7476. (function () {
  7477. // Check if typed arrays are supported
  7478. if (typeof ArrayBuffer != 'function') {
  7479. return;
  7480. } // Shortcuts
  7481. var C = CryptoJS;
  7482. var C_lib = C.lib;
  7483. var WordArray = C_lib.WordArray; // Reference original init
  7484. var superInit = WordArray.init; // Augment WordArray.init to handle typed arrays
  7485. var subInit = WordArray.init = function (typedArray) {
  7486. // Convert buffers to uint8
  7487. if (typedArray instanceof ArrayBuffer) {
  7488. typedArray = new Uint8Array(typedArray);
  7489. } // Convert other array views to uint8
  7490. if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) {
  7491. typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
  7492. } // Handle Uint8Array
  7493. if (typedArray instanceof Uint8Array) {
  7494. // Shortcut
  7495. var typedArrayByteLength = typedArray.byteLength; // Extract bytes
  7496. var words = [];
  7497. for (var i = 0; i < typedArrayByteLength; i++) {
  7498. words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
  7499. } // Initialize this word array
  7500. superInit.call(this, words, typedArrayByteLength);
  7501. } else {
  7502. // Else call normal init
  7503. superInit.apply(this, arguments);
  7504. }
  7505. };
  7506. subInit.prototype = WordArray;
  7507. })();
  7508. return CryptoJS.lib.WordArray;
  7509. });
  7510. /***/ }),
  7511. /***/ 3440:
  7512. /***/ (function(module, exports, __webpack_require__) {
  7513. "use strict";
  7514. ;
  7515. (function (root, factory) {
  7516. if (true) {
  7517. // CommonJS
  7518. module.exports = exports = factory(__webpack_require__(757));
  7519. } else {}
  7520. })(void 0, function (CryptoJS) {
  7521. (function (Math) {
  7522. // Shortcuts
  7523. var C = CryptoJS;
  7524. var C_lib = C.lib;
  7525. var WordArray = C_lib.WordArray;
  7526. var Hasher = C_lib.Hasher;
  7527. var C_algo = C.algo; // Constants table
  7528. var T = []; // Compute constants
  7529. (function () {
  7530. for (var i = 0; i < 64; i++) {
  7531. T[i] = Math.abs(Math.sin(i + 1)) * 0x100000000 | 0;
  7532. }
  7533. })();
  7534. /**
  7535. * MD5 hash algorithm.
  7536. */
  7537. var MD5 = C_algo.MD5 = Hasher.extend({
  7538. _doReset: function _doReset() {
  7539. this._hash = new WordArray.init([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476]);
  7540. },
  7541. _doProcessBlock: function _doProcessBlock(M, offset) {
  7542. // Swap endian
  7543. for (var i = 0; i < 16; i++) {
  7544. // Shortcuts
  7545. var offset_i = offset + i;
  7546. var M_offset_i = M[offset_i];
  7547. M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 0x00ff00ff | (M_offset_i << 24 | M_offset_i >>> 8) & 0xff00ff00;
  7548. } // Shortcuts
  7549. var H = this._hash.words;
  7550. var M_offset_0 = M[offset + 0];
  7551. var M_offset_1 = M[offset + 1];
  7552. var M_offset_2 = M[offset + 2];
  7553. var M_offset_3 = M[offset + 3];
  7554. var M_offset_4 = M[offset + 4];
  7555. var M_offset_5 = M[offset + 5];
  7556. var M_offset_6 = M[offset + 6];
  7557. var M_offset_7 = M[offset + 7];
  7558. var M_offset_8 = M[offset + 8];
  7559. var M_offset_9 = M[offset + 9];
  7560. var M_offset_10 = M[offset + 10];
  7561. var M_offset_11 = M[offset + 11];
  7562. var M_offset_12 = M[offset + 12];
  7563. var M_offset_13 = M[offset + 13];
  7564. var M_offset_14 = M[offset + 14];
  7565. var M_offset_15 = M[offset + 15]; // Working varialbes
  7566. var a = H[0];
  7567. var b = H[1];
  7568. var c = H[2];
  7569. var d = H[3]; // Computation
  7570. a = FF(a, b, c, d, M_offset_0, 7, T[0]);
  7571. d = FF(d, a, b, c, M_offset_1, 12, T[1]);
  7572. c = FF(c, d, a, b, M_offset_2, 17, T[2]);
  7573. b = FF(b, c, d, a, M_offset_3, 22, T[3]);
  7574. a = FF(a, b, c, d, M_offset_4, 7, T[4]);
  7575. d = FF(d, a, b, c, M_offset_5, 12, T[5]);
  7576. c = FF(c, d, a, b, M_offset_6, 17, T[6]);
  7577. b = FF(b, c, d, a, M_offset_7, 22, T[7]);
  7578. a = FF(a, b, c, d, M_offset_8, 7, T[8]);
  7579. d = FF(d, a, b, c, M_offset_9, 12, T[9]);
  7580. c = FF(c, d, a, b, M_offset_10, 17, T[10]);
  7581. b = FF(b, c, d, a, M_offset_11, 22, T[11]);
  7582. a = FF(a, b, c, d, M_offset_12, 7, T[12]);
  7583. d = FF(d, a, b, c, M_offset_13, 12, T[13]);
  7584. c = FF(c, d, a, b, M_offset_14, 17, T[14]);
  7585. b = FF(b, c, d, a, M_offset_15, 22, T[15]);
  7586. a = GG(a, b, c, d, M_offset_1, 5, T[16]);
  7587. d = GG(d, a, b, c, M_offset_6, 9, T[17]);
  7588. c = GG(c, d, a, b, M_offset_11, 14, T[18]);
  7589. b = GG(b, c, d, a, M_offset_0, 20, T[19]);
  7590. a = GG(a, b, c, d, M_offset_5, 5, T[20]);
  7591. d = GG(d, a, b, c, M_offset_10, 9, T[21]);
  7592. c = GG(c, d, a, b, M_offset_15, 14, T[22]);
  7593. b = GG(b, c, d, a, M_offset_4, 20, T[23]);
  7594. a = GG(a, b, c, d, M_offset_9, 5, T[24]);
  7595. d = GG(d, a, b, c, M_offset_14, 9, T[25]);
  7596. c = GG(c, d, a, b, M_offset_3, 14, T[26]);
  7597. b = GG(b, c, d, a, M_offset_8, 20, T[27]);
  7598. a = GG(a, b, c, d, M_offset_13, 5, T[28]);
  7599. d = GG(d, a, b, c, M_offset_2, 9, T[29]);
  7600. c = GG(c, d, a, b, M_offset_7, 14, T[30]);
  7601. b = GG(b, c, d, a, M_offset_12, 20, T[31]);
  7602. a = HH(a, b, c, d, M_offset_5, 4, T[32]);
  7603. d = HH(d, a, b, c, M_offset_8, 11, T[33]);
  7604. c = HH(c, d, a, b, M_offset_11, 16, T[34]);
  7605. b = HH(b, c, d, a, M_offset_14, 23, T[35]);
  7606. a = HH(a, b, c, d, M_offset_1, 4, T[36]);
  7607. d = HH(d, a, b, c, M_offset_4, 11, T[37]);
  7608. c = HH(c, d, a, b, M_offset_7, 16, T[38]);
  7609. b = HH(b, c, d, a, M_offset_10, 23, T[39]);
  7610. a = HH(a, b, c, d, M_offset_13, 4, T[40]);
  7611. d = HH(d, a, b, c, M_offset_0, 11, T[41]);
  7612. c = HH(c, d, a, b, M_offset_3, 16, T[42]);
  7613. b = HH(b, c, d, a, M_offset_6, 23, T[43]);
  7614. a = HH(a, b, c, d, M_offset_9, 4, T[44]);
  7615. d = HH(d, a, b, c, M_offset_12, 11, T[45]);
  7616. c = HH(c, d, a, b, M_offset_15, 16, T[46]);
  7617. b = HH(b, c, d, a, M_offset_2, 23, T[47]);
  7618. a = II(a, b, c, d, M_offset_0, 6, T[48]);
  7619. d = II(d, a, b, c, M_offset_7, 10, T[49]);
  7620. c = II(c, d, a, b, M_offset_14, 15, T[50]);
  7621. b = II(b, c, d, a, M_offset_5, 21, T[51]);
  7622. a = II(a, b, c, d, M_offset_12, 6, T[52]);
  7623. d = II(d, a, b, c, M_offset_3, 10, T[53]);
  7624. c = II(c, d, a, b, M_offset_10, 15, T[54]);
  7625. b = II(b, c, d, a, M_offset_1, 21, T[55]);
  7626. a = II(a, b, c, d, M_offset_8, 6, T[56]);
  7627. d = II(d, a, b, c, M_offset_15, 10, T[57]);
  7628. c = II(c, d, a, b, M_offset_6, 15, T[58]);
  7629. b = II(b, c, d, a, M_offset_13, 21, T[59]);
  7630. a = II(a, b, c, d, M_offset_4, 6, T[60]);
  7631. d = II(d, a, b, c, M_offset_11, 10, T[61]);
  7632. c = II(c, d, a, b, M_offset_2, 15, T[62]);
  7633. b = II(b, c, d, a, M_offset_9, 21, T[63]); // Intermediate hash value
  7634. H[0] = H[0] + a | 0;
  7635. H[1] = H[1] + b | 0;
  7636. H[2] = H[2] + c | 0;
  7637. H[3] = H[3] + d | 0;
  7638. },
  7639. _doFinalize: function _doFinalize() {
  7640. // Shortcuts
  7641. var data = this._data;
  7642. var dataWords = data.words;
  7643. var nBitsTotal = this._nDataBytes * 8;
  7644. var nBitsLeft = data.sigBytes * 8; // Add padding
  7645. dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
  7646. var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
  7647. var nBitsTotalL = nBitsTotal;
  7648. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 0x00ff00ff | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 0xff00ff00;
  7649. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 0x00ff00ff | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 0xff00ff00;
  7650. data.sigBytes = (dataWords.length + 1) * 4; // Hash final blocks
  7651. this._process(); // Shortcuts
  7652. var hash = this._hash;
  7653. var H = hash.words; // Swap endian
  7654. for (var i = 0; i < 4; i++) {
  7655. // Shortcut
  7656. var H_i = H[i];
  7657. H[i] = (H_i << 8 | H_i >>> 24) & 0x00ff00ff | (H_i << 24 | H_i >>> 8) & 0xff00ff00;
  7658. } // Return final computed hash
  7659. return hash;
  7660. },
  7661. clone: function clone() {
  7662. var clone = Hasher.clone.call(this);
  7663. clone._hash = this._hash.clone();
  7664. return clone;
  7665. }
  7666. });
  7667. function FF(a, b, c, d, x, s, t) {
  7668. var n = a + (b & c | ~b & d) + x + t;
  7669. return (n << s | n >>> 32 - s) + b;
  7670. }
  7671. function GG(a, b, c, d, x, s, t) {
  7672. var n = a + (b & d | c & ~d) + x + t;
  7673. return (n << s | n >>> 32 - s) + b;
  7674. }
  7675. function HH(a, b, c, d, x, s, t) {
  7676. var n = a + (b ^ c ^ d) + x + t;
  7677. return (n << s | n >>> 32 - s) + b;
  7678. }
  7679. function II(a, b, c, d, x, s, t) {
  7680. var n = a + (c ^ (b | ~d)) + x + t;
  7681. return (n << s | n >>> 32 - s) + b;
  7682. }
  7683. /**
  7684. * Shortcut function to the hasher's object interface.
  7685. *
  7686. * @param {WordArray|string} message The message to hash.
  7687. *
  7688. * @return {WordArray} The hash.
  7689. *
  7690. * @static
  7691. *
  7692. * @example
  7693. *
  7694. * var hash = CryptoJS.MD5('message');
  7695. * var hash = CryptoJS.MD5(wordArray);
  7696. */
  7697. C.MD5 = Hasher._createHelper(MD5);
  7698. /**
  7699. * Shortcut function to the HMAC's object interface.
  7700. *
  7701. * @param {WordArray|string} message The message to hash.
  7702. * @param {WordArray|string} key The secret key.
  7703. *
  7704. * @return {WordArray} The HMAC.
  7705. *
  7706. * @static
  7707. *
  7708. * @example
  7709. *
  7710. * var hmac = CryptoJS.HmacMD5(message, key);
  7711. */
  7712. C.HmacMD5 = Hasher._createHmacHelper(MD5);
  7713. })(Math);
  7714. return CryptoJS.MD5;
  7715. });
  7716. /***/ }),
  7717. /***/ 702:
  7718. /***/ (function(module, exports, __webpack_require__) {
  7719. "use strict";
  7720. __webpack_require__(7042);
  7721. ;
  7722. (function (root, factory, undef) {
  7723. if (true) {
  7724. // CommonJS
  7725. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  7726. } else {}
  7727. })(void 0, function (CryptoJS) {
  7728. /**
  7729. * Cipher Feedback block mode.
  7730. */
  7731. CryptoJS.mode.CFB = function () {
  7732. var CFB = CryptoJS.lib.BlockCipherMode.extend();
  7733. CFB.Encryptor = CFB.extend({
  7734. processBlock: function processBlock(words, offset) {
  7735. // Shortcuts
  7736. var cipher = this._cipher;
  7737. var blockSize = cipher.blockSize;
  7738. generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); // Remember this block to use with next block
  7739. this._prevBlock = words.slice(offset, offset + blockSize);
  7740. }
  7741. });
  7742. CFB.Decryptor = CFB.extend({
  7743. processBlock: function processBlock(words, offset) {
  7744. // Shortcuts
  7745. var cipher = this._cipher;
  7746. var blockSize = cipher.blockSize; // Remember this block to use with next block
  7747. var thisBlock = words.slice(offset, offset + blockSize);
  7748. generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); // This block becomes the previous block
  7749. this._prevBlock = thisBlock;
  7750. }
  7751. });
  7752. function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) {
  7753. var keystream; // Shortcut
  7754. var iv = this._iv; // Generate keystream
  7755. if (iv) {
  7756. keystream = iv.slice(0); // Remove IV for subsequent blocks
  7757. this._iv = undefined;
  7758. } else {
  7759. keystream = this._prevBlock;
  7760. }
  7761. cipher.encryptBlock(keystream, 0); // Encrypt
  7762. for (var i = 0; i < blockSize; i++) {
  7763. words[offset + i] ^= keystream[i];
  7764. }
  7765. }
  7766. return CFB;
  7767. }();
  7768. return CryptoJS.mode.CFB;
  7769. });
  7770. /***/ }),
  7771. /***/ 4412:
  7772. /***/ (function(module, exports, __webpack_require__) {
  7773. "use strict";
  7774. __webpack_require__(7042);
  7775. ;
  7776. (function (root, factory, undef) {
  7777. if (true) {
  7778. // CommonJS
  7779. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  7780. } else {}
  7781. })(void 0, function (CryptoJS) {
  7782. /** @preserve
  7783. * Counter block mode compatible with Dr Brian Gladman fileenc.c
  7784. * derived from CryptoJS.mode.CTR
  7785. * Jan Hruby jhruby.web@gmail.com
  7786. */
  7787. CryptoJS.mode.CTRGladman = function () {
  7788. var CTRGladman = CryptoJS.lib.BlockCipherMode.extend();
  7789. function incWord(word) {
  7790. if ((word >> 24 & 0xff) === 0xff) {
  7791. //overflow
  7792. var b1 = word >> 16 & 0xff;
  7793. var b2 = word >> 8 & 0xff;
  7794. var b3 = word & 0xff;
  7795. if (b1 === 0xff) // overflow b1
  7796. {
  7797. b1 = 0;
  7798. if (b2 === 0xff) {
  7799. b2 = 0;
  7800. if (b3 === 0xff) {
  7801. b3 = 0;
  7802. } else {
  7803. ++b3;
  7804. }
  7805. } else {
  7806. ++b2;
  7807. }
  7808. } else {
  7809. ++b1;
  7810. }
  7811. word = 0;
  7812. word += b1 << 16;
  7813. word += b2 << 8;
  7814. word += b3;
  7815. } else {
  7816. word += 0x01 << 24;
  7817. }
  7818. return word;
  7819. }
  7820. function incCounter(counter) {
  7821. if ((counter[0] = incWord(counter[0])) === 0) {
  7822. // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8
  7823. counter[1] = incWord(counter[1]);
  7824. }
  7825. return counter;
  7826. }
  7827. var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({
  7828. processBlock: function processBlock(words, offset) {
  7829. // Shortcuts
  7830. var cipher = this._cipher;
  7831. var blockSize = cipher.blockSize;
  7832. var iv = this._iv;
  7833. var counter = this._counter; // Generate keystream
  7834. if (iv) {
  7835. counter = this._counter = iv.slice(0); // Remove IV for subsequent blocks
  7836. this._iv = undefined;
  7837. }
  7838. incCounter(counter);
  7839. var keystream = counter.slice(0);
  7840. cipher.encryptBlock(keystream, 0); // Encrypt
  7841. for (var i = 0; i < blockSize; i++) {
  7842. words[offset + i] ^= keystream[i];
  7843. }
  7844. }
  7845. });
  7846. CTRGladman.Decryptor = Encryptor;
  7847. return CTRGladman;
  7848. }();
  7849. return CryptoJS.mode.CTRGladman;
  7850. });
  7851. /***/ }),
  7852. /***/ 2362:
  7853. /***/ (function(module, exports, __webpack_require__) {
  7854. "use strict";
  7855. __webpack_require__(7042);
  7856. ;
  7857. (function (root, factory, undef) {
  7858. if (true) {
  7859. // CommonJS
  7860. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  7861. } else {}
  7862. })(void 0, function (CryptoJS) {
  7863. /**
  7864. * Counter block mode.
  7865. */
  7866. CryptoJS.mode.CTR = function () {
  7867. var CTR = CryptoJS.lib.BlockCipherMode.extend();
  7868. var Encryptor = CTR.Encryptor = CTR.extend({
  7869. processBlock: function processBlock(words, offset) {
  7870. // Shortcuts
  7871. var cipher = this._cipher;
  7872. var blockSize = cipher.blockSize;
  7873. var iv = this._iv;
  7874. var counter = this._counter; // Generate keystream
  7875. if (iv) {
  7876. counter = this._counter = iv.slice(0); // Remove IV for subsequent blocks
  7877. this._iv = undefined;
  7878. }
  7879. var keystream = counter.slice(0);
  7880. cipher.encryptBlock(keystream, 0); // Increment counter
  7881. counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0; // Encrypt
  7882. for (var i = 0; i < blockSize; i++) {
  7883. words[offset + i] ^= keystream[i];
  7884. }
  7885. }
  7886. });
  7887. CTR.Decryptor = Encryptor;
  7888. return CTR;
  7889. }();
  7890. return CryptoJS.mode.CTR;
  7891. });
  7892. /***/ }),
  7893. /***/ 3518:
  7894. /***/ (function(module, exports, __webpack_require__) {
  7895. "use strict";
  7896. ;
  7897. (function (root, factory, undef) {
  7898. if (true) {
  7899. // CommonJS
  7900. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  7901. } else {}
  7902. })(void 0, function (CryptoJS) {
  7903. /**
  7904. * Electronic Codebook block mode.
  7905. */
  7906. CryptoJS.mode.ECB = function () {
  7907. var ECB = CryptoJS.lib.BlockCipherMode.extend();
  7908. ECB.Encryptor = ECB.extend({
  7909. processBlock: function processBlock(words, offset) {
  7910. this._cipher.encryptBlock(words, offset);
  7911. }
  7912. });
  7913. ECB.Decryptor = ECB.extend({
  7914. processBlock: function processBlock(words, offset) {
  7915. this._cipher.decryptBlock(words, offset);
  7916. }
  7917. });
  7918. return ECB;
  7919. }();
  7920. return CryptoJS.mode.ECB;
  7921. });
  7922. /***/ }),
  7923. /***/ 5720:
  7924. /***/ (function(module, exports, __webpack_require__) {
  7925. "use strict";
  7926. __webpack_require__(7042);
  7927. ;
  7928. (function (root, factory, undef) {
  7929. if (true) {
  7930. // CommonJS
  7931. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  7932. } else {}
  7933. })(void 0, function (CryptoJS) {
  7934. /**
  7935. * Output Feedback block mode.
  7936. */
  7937. CryptoJS.mode.OFB = function () {
  7938. var OFB = CryptoJS.lib.BlockCipherMode.extend();
  7939. var Encryptor = OFB.Encryptor = OFB.extend({
  7940. processBlock: function processBlock(words, offset) {
  7941. // Shortcuts
  7942. var cipher = this._cipher;
  7943. var blockSize = cipher.blockSize;
  7944. var iv = this._iv;
  7945. var keystream = this._keystream; // Generate keystream
  7946. if (iv) {
  7947. keystream = this._keystream = iv.slice(0); // Remove IV for subsequent blocks
  7948. this._iv = undefined;
  7949. }
  7950. cipher.encryptBlock(keystream, 0); // Encrypt
  7951. for (var i = 0; i < blockSize; i++) {
  7952. words[offset + i] ^= keystream[i];
  7953. }
  7954. }
  7955. });
  7956. OFB.Decryptor = Encryptor;
  7957. return OFB;
  7958. }();
  7959. return CryptoJS.mode.OFB;
  7960. });
  7961. /***/ }),
  7962. /***/ 6362:
  7963. /***/ (function(module, exports, __webpack_require__) {
  7964. "use strict";
  7965. ;
  7966. (function (root, factory, undef) {
  7967. if (true) {
  7968. // CommonJS
  7969. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  7970. } else {}
  7971. })(void 0, function (CryptoJS) {
  7972. /**
  7973. * ANSI X.923 padding strategy.
  7974. */
  7975. CryptoJS.pad.AnsiX923 = {
  7976. pad: function pad(data, blockSize) {
  7977. // Shortcuts
  7978. var dataSigBytes = data.sigBytes;
  7979. var blockSizeBytes = blockSize * 4; // Count padding bytes
  7980. var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; // Compute last byte position
  7981. var lastBytePos = dataSigBytes + nPaddingBytes - 1; // Pad
  7982. data.clamp();
  7983. data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8;
  7984. data.sigBytes += nPaddingBytes;
  7985. },
  7986. unpad: function unpad(data) {
  7987. // Get number of padding bytes from last byte
  7988. var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff; // Remove padding
  7989. data.sigBytes -= nPaddingBytes;
  7990. }
  7991. };
  7992. return CryptoJS.pad.Ansix923;
  7993. });
  7994. /***/ }),
  7995. /***/ 4431:
  7996. /***/ (function(module, exports, __webpack_require__) {
  7997. "use strict";
  7998. __webpack_require__(2222);
  7999. ;
  8000. (function (root, factory, undef) {
  8001. if (true) {
  8002. // CommonJS
  8003. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  8004. } else {}
  8005. })(void 0, function (CryptoJS) {
  8006. /**
  8007. * ISO 10126 padding strategy.
  8008. */
  8009. CryptoJS.pad.Iso10126 = {
  8010. pad: function pad(data, blockSize) {
  8011. // Shortcut
  8012. var blockSizeBytes = blockSize * 4; // Count padding bytes
  8013. var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; // Pad
  8014. data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1));
  8015. },
  8016. unpad: function unpad(data) {
  8017. // Get number of padding bytes from last byte
  8018. var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff; // Remove padding
  8019. data.sigBytes -= nPaddingBytes;
  8020. }
  8021. };
  8022. return CryptoJS.pad.Iso10126;
  8023. });
  8024. /***/ }),
  8025. /***/ 8800:
  8026. /***/ (function(module, exports, __webpack_require__) {
  8027. "use strict";
  8028. __webpack_require__(2222);
  8029. ;
  8030. (function (root, factory, undef) {
  8031. if (true) {
  8032. // CommonJS
  8033. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  8034. } else {}
  8035. })(void 0, function (CryptoJS) {
  8036. /**
  8037. * ISO/IEC 9797-1 Padding Method 2.
  8038. */
  8039. CryptoJS.pad.Iso97971 = {
  8040. pad: function pad(data, blockSize) {
  8041. // Add 0x80 byte
  8042. data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); // Zero pad the rest
  8043. CryptoJS.pad.ZeroPadding.pad(data, blockSize);
  8044. },
  8045. unpad: function unpad(data) {
  8046. // Remove zero padding
  8047. CryptoJS.pad.ZeroPadding.unpad(data); // Remove one more byte -- the 0x80 byte
  8048. data.sigBytes--;
  8049. }
  8050. };
  8051. return CryptoJS.pad.Iso97971;
  8052. });
  8053. /***/ }),
  8054. /***/ 649:
  8055. /***/ (function(module, exports, __webpack_require__) {
  8056. "use strict";
  8057. ;
  8058. (function (root, factory, undef) {
  8059. if (true) {
  8060. // CommonJS
  8061. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  8062. } else {}
  8063. })(void 0, function (CryptoJS) {
  8064. /**
  8065. * A noop padding strategy.
  8066. */
  8067. CryptoJS.pad.NoPadding = {
  8068. pad: function pad() {},
  8069. unpad: function unpad() {}
  8070. };
  8071. return CryptoJS.pad.NoPadding;
  8072. });
  8073. /***/ }),
  8074. /***/ 3992:
  8075. /***/ (function(module, exports, __webpack_require__) {
  8076. "use strict";
  8077. ;
  8078. (function (root, factory, undef) {
  8079. if (true) {
  8080. // CommonJS
  8081. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582));
  8082. } else {}
  8083. })(void 0, function (CryptoJS) {
  8084. /**
  8085. * Zero padding strategy.
  8086. */
  8087. CryptoJS.pad.ZeroPadding = {
  8088. pad: function pad(data, blockSize) {
  8089. // Shortcut
  8090. var blockSizeBytes = blockSize * 4; // Pad
  8091. data.clamp();
  8092. data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes);
  8093. },
  8094. unpad: function unpad(data) {
  8095. // Shortcut
  8096. var dataWords = data.words; // Unpad
  8097. var i = data.sigBytes - 1;
  8098. for (var i = data.sigBytes - 1; i >= 0; i--) {
  8099. if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff) {
  8100. data.sigBytes = i + 1;
  8101. break;
  8102. }
  8103. }
  8104. }
  8105. };
  8106. return CryptoJS.pad.ZeroPadding;
  8107. });
  8108. /***/ }),
  8109. /***/ 3486:
  8110. /***/ (function(module, exports, __webpack_require__) {
  8111. "use strict";
  8112. __webpack_require__(2222);
  8113. ;
  8114. (function (root, factory, undef) {
  8115. if (true) {
  8116. // CommonJS
  8117. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(9865), __webpack_require__(6727));
  8118. } else {}
  8119. })(void 0, function (CryptoJS) {
  8120. (function () {
  8121. // Shortcuts
  8122. var C = CryptoJS;
  8123. var C_lib = C.lib;
  8124. var Base = C_lib.Base;
  8125. var WordArray = C_lib.WordArray;
  8126. var C_algo = C.algo;
  8127. var SHA1 = C_algo.SHA1;
  8128. var HMAC = C_algo.HMAC;
  8129. /**
  8130. * Password-Based Key Derivation Function 2 algorithm.
  8131. */
  8132. var PBKDF2 = C_algo.PBKDF2 = Base.extend({
  8133. /**
  8134. * Configuration options.
  8135. *
  8136. * @property {number} keySize The key size in words to generate. Default: 4 (128 bits)
  8137. * @property {Hasher} hasher The hasher to use. Default: SHA1
  8138. * @property {number} iterations The number of iterations to perform. Default: 1
  8139. */
  8140. cfg: Base.extend({
  8141. keySize: 128 / 32,
  8142. hasher: SHA1,
  8143. iterations: 1
  8144. }),
  8145. /**
  8146. * Initializes a newly created key derivation function.
  8147. *
  8148. * @param {Object} cfg (Optional) The configuration options to use for the derivation.
  8149. *
  8150. * @example
  8151. *
  8152. * var kdf = CryptoJS.algo.PBKDF2.create();
  8153. * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 });
  8154. * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 });
  8155. */
  8156. init: function init(cfg) {
  8157. this.cfg = this.cfg.extend(cfg);
  8158. },
  8159. /**
  8160. * Computes the Password-Based Key Derivation Function 2.
  8161. *
  8162. * @param {WordArray|string} password The password.
  8163. * @param {WordArray|string} salt A salt.
  8164. *
  8165. * @return {WordArray} The derived key.
  8166. *
  8167. * @example
  8168. *
  8169. * var key = kdf.compute(password, salt);
  8170. */
  8171. compute: function compute(password, salt) {
  8172. // Shortcut
  8173. var cfg = this.cfg; // Init HMAC
  8174. var hmac = HMAC.create(cfg.hasher, password); // Initial values
  8175. var derivedKey = WordArray.create();
  8176. var blockIndex = WordArray.create([0x00000001]); // Shortcuts
  8177. var derivedKeyWords = derivedKey.words;
  8178. var blockIndexWords = blockIndex.words;
  8179. var keySize = cfg.keySize;
  8180. var iterations = cfg.iterations; // Generate key
  8181. while (derivedKeyWords.length < keySize) {
  8182. var block = hmac.update(salt).finalize(blockIndex);
  8183. hmac.reset(); // Shortcuts
  8184. var blockWords = block.words;
  8185. var blockWordsLength = blockWords.length; // Iterations
  8186. var intermediate = block;
  8187. for (var i = 1; i < iterations; i++) {
  8188. intermediate = hmac.finalize(intermediate);
  8189. hmac.reset(); // Shortcut
  8190. var intermediateWords = intermediate.words; // XOR intermediate with block
  8191. for (var j = 0; j < blockWordsLength; j++) {
  8192. blockWords[j] ^= intermediateWords[j];
  8193. }
  8194. }
  8195. derivedKey.concat(block);
  8196. blockIndexWords[0]++;
  8197. }
  8198. derivedKey.sigBytes = keySize * 4;
  8199. return derivedKey;
  8200. }
  8201. });
  8202. /**
  8203. * Computes the Password-Based Key Derivation Function 2.
  8204. *
  8205. * @param {WordArray|string} password The password.
  8206. * @param {WordArray|string} salt A salt.
  8207. * @param {Object} cfg (Optional) The configuration options to use for this computation.
  8208. *
  8209. * @return {WordArray} The derived key.
  8210. *
  8211. * @static
  8212. *
  8213. * @example
  8214. *
  8215. * var key = CryptoJS.PBKDF2(password, salt);
  8216. * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 });
  8217. * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 });
  8218. */
  8219. C.PBKDF2 = function (password, salt, cfg) {
  8220. return PBKDF2.create(cfg).compute(password, salt);
  8221. };
  8222. })();
  8223. return CryptoJS.PBKDF2;
  8224. });
  8225. /***/ }),
  8226. /***/ 4363:
  8227. /***/ (function(module, exports, __webpack_require__) {
  8228. "use strict";
  8229. ;
  8230. (function (root, factory, undef) {
  8231. if (true) {
  8232. // CommonJS
  8233. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582));
  8234. } else {}
  8235. })(void 0, function (CryptoJS) {
  8236. (function () {
  8237. // Shortcuts
  8238. var C = CryptoJS;
  8239. var C_lib = C.lib;
  8240. var StreamCipher = C_lib.StreamCipher;
  8241. var C_algo = C.algo; // Reusable objects
  8242. var S = [];
  8243. var C_ = [];
  8244. var G = [];
  8245. /**
  8246. * Rabbit stream cipher algorithm.
  8247. *
  8248. * This is a legacy version that neglected to convert the key to little-endian.
  8249. * This error doesn't affect the cipher's security,
  8250. * but it does affect its compatibility with other implementations.
  8251. */
  8252. var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({
  8253. _doReset: function _doReset() {
  8254. // Shortcuts
  8255. var K = this._key.words;
  8256. var iv = this.cfg.iv; // Generate initial state values
  8257. var X = this._X = [K[0], K[3] << 16 | K[2] >>> 16, K[1], K[0] << 16 | K[3] >>> 16, K[2], K[1] << 16 | K[0] >>> 16, K[3], K[2] << 16 | K[1] >>> 16]; // Generate initial counter values
  8258. var C = this._C = [K[2] << 16 | K[2] >>> 16, K[0] & 0xffff0000 | K[1] & 0x0000ffff, K[3] << 16 | K[3] >>> 16, K[1] & 0xffff0000 | K[2] & 0x0000ffff, K[0] << 16 | K[0] >>> 16, K[2] & 0xffff0000 | K[3] & 0x0000ffff, K[1] << 16 | K[1] >>> 16, K[3] & 0xffff0000 | K[0] & 0x0000ffff]; // Carry bit
  8259. this._b = 0; // Iterate the system four times
  8260. for (var i = 0; i < 4; i++) {
  8261. nextState.call(this);
  8262. } // Modify the counters
  8263. for (var i = 0; i < 8; i++) {
  8264. C[i] ^= X[i + 4 & 7];
  8265. } // IV setup
  8266. if (iv) {
  8267. // Shortcuts
  8268. var IV = iv.words;
  8269. var IV_0 = IV[0];
  8270. var IV_1 = IV[1]; // Generate four subvectors
  8271. var i0 = (IV_0 << 8 | IV_0 >>> 24) & 0x00ff00ff | (IV_0 << 24 | IV_0 >>> 8) & 0xff00ff00;
  8272. var i2 = (IV_1 << 8 | IV_1 >>> 24) & 0x00ff00ff | (IV_1 << 24 | IV_1 >>> 8) & 0xff00ff00;
  8273. var i1 = i0 >>> 16 | i2 & 0xffff0000;
  8274. var i3 = i2 << 16 | i0 & 0x0000ffff; // Modify counter values
  8275. C[0] ^= i0;
  8276. C[1] ^= i1;
  8277. C[2] ^= i2;
  8278. C[3] ^= i3;
  8279. C[4] ^= i0;
  8280. C[5] ^= i1;
  8281. C[6] ^= i2;
  8282. C[7] ^= i3; // Iterate the system four times
  8283. for (var i = 0; i < 4; i++) {
  8284. nextState.call(this);
  8285. }
  8286. }
  8287. },
  8288. _doProcessBlock: function _doProcessBlock(M, offset) {
  8289. // Shortcut
  8290. var X = this._X; // Iterate the system
  8291. nextState.call(this); // Generate four keystream words
  8292. S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
  8293. S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
  8294. S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
  8295. S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
  8296. for (var i = 0; i < 4; i++) {
  8297. // Swap endian
  8298. S[i] = (S[i] << 8 | S[i] >>> 24) & 0x00ff00ff | (S[i] << 24 | S[i] >>> 8) & 0xff00ff00; // Encrypt
  8299. M[offset + i] ^= S[i];
  8300. }
  8301. },
  8302. blockSize: 128 / 32,
  8303. ivSize: 64 / 32
  8304. });
  8305. function nextState() {
  8306. // Shortcuts
  8307. var X = this._X;
  8308. var C = this._C; // Save old counter values
  8309. for (var i = 0; i < 8; i++) {
  8310. C_[i] = C[i];
  8311. } // Calculate new counter values
  8312. C[0] = C[0] + 0x4d34d34d + this._b | 0;
  8313. C[1] = C[1] + 0xd34d34d3 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
  8314. C[2] = C[2] + 0x34d34d34 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
  8315. C[3] = C[3] + 0x4d34d34d + (C[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
  8316. C[4] = C[4] + 0xd34d34d3 + (C[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
  8317. C[5] = C[5] + 0x34d34d34 + (C[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
  8318. C[6] = C[6] + 0x4d34d34d + (C[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
  8319. C[7] = C[7] + 0xd34d34d3 + (C[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
  8320. this._b = C[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; // Calculate the g-values
  8321. for (var i = 0; i < 8; i++) {
  8322. var gx = X[i] + C[i]; // Construct high and low argument for squaring
  8323. var ga = gx & 0xffff;
  8324. var gb = gx >>> 16; // Calculate high and low result of squaring
  8325. var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
  8326. var gl = ((gx & 0xffff0000) * gx | 0) + ((gx & 0x0000ffff) * gx | 0); // High XOR low
  8327. G[i] = gh ^ gl;
  8328. } // Calculate new state values
  8329. X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
  8330. X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
  8331. X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
  8332. X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
  8333. X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
  8334. X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
  8335. X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
  8336. X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
  8337. }
  8338. /**
  8339. * Shortcut functions to the cipher's object interface.
  8340. *
  8341. * @example
  8342. *
  8343. * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg);
  8344. * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg);
  8345. */
  8346. C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy);
  8347. })();
  8348. return CryptoJS.RabbitLegacy;
  8349. });
  8350. /***/ }),
  8351. /***/ 5323:
  8352. /***/ (function(module, exports, __webpack_require__) {
  8353. "use strict";
  8354. ;
  8355. (function (root, factory, undef) {
  8356. if (true) {
  8357. // CommonJS
  8358. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582));
  8359. } else {}
  8360. })(void 0, function (CryptoJS) {
  8361. (function () {
  8362. // Shortcuts
  8363. var C = CryptoJS;
  8364. var C_lib = C.lib;
  8365. var StreamCipher = C_lib.StreamCipher;
  8366. var C_algo = C.algo; // Reusable objects
  8367. var S = [];
  8368. var C_ = [];
  8369. var G = [];
  8370. /**
  8371. * Rabbit stream cipher algorithm
  8372. */
  8373. var Rabbit = C_algo.Rabbit = StreamCipher.extend({
  8374. _doReset: function _doReset() {
  8375. // Shortcuts
  8376. var K = this._key.words;
  8377. var iv = this.cfg.iv; // Swap endian
  8378. for (var i = 0; i < 4; i++) {
  8379. K[i] = (K[i] << 8 | K[i] >>> 24) & 0x00ff00ff | (K[i] << 24 | K[i] >>> 8) & 0xff00ff00;
  8380. } // Generate initial state values
  8381. var X = this._X = [K[0], K[3] << 16 | K[2] >>> 16, K[1], K[0] << 16 | K[3] >>> 16, K[2], K[1] << 16 | K[0] >>> 16, K[3], K[2] << 16 | K[1] >>> 16]; // Generate initial counter values
  8382. var C = this._C = [K[2] << 16 | K[2] >>> 16, K[0] & 0xffff0000 | K[1] & 0x0000ffff, K[3] << 16 | K[3] >>> 16, K[1] & 0xffff0000 | K[2] & 0x0000ffff, K[0] << 16 | K[0] >>> 16, K[2] & 0xffff0000 | K[3] & 0x0000ffff, K[1] << 16 | K[1] >>> 16, K[3] & 0xffff0000 | K[0] & 0x0000ffff]; // Carry bit
  8383. this._b = 0; // Iterate the system four times
  8384. for (var i = 0; i < 4; i++) {
  8385. nextState.call(this);
  8386. } // Modify the counters
  8387. for (var i = 0; i < 8; i++) {
  8388. C[i] ^= X[i + 4 & 7];
  8389. } // IV setup
  8390. if (iv) {
  8391. // Shortcuts
  8392. var IV = iv.words;
  8393. var IV_0 = IV[0];
  8394. var IV_1 = IV[1]; // Generate four subvectors
  8395. var i0 = (IV_0 << 8 | IV_0 >>> 24) & 0x00ff00ff | (IV_0 << 24 | IV_0 >>> 8) & 0xff00ff00;
  8396. var i2 = (IV_1 << 8 | IV_1 >>> 24) & 0x00ff00ff | (IV_1 << 24 | IV_1 >>> 8) & 0xff00ff00;
  8397. var i1 = i0 >>> 16 | i2 & 0xffff0000;
  8398. var i3 = i2 << 16 | i0 & 0x0000ffff; // Modify counter values
  8399. C[0] ^= i0;
  8400. C[1] ^= i1;
  8401. C[2] ^= i2;
  8402. C[3] ^= i3;
  8403. C[4] ^= i0;
  8404. C[5] ^= i1;
  8405. C[6] ^= i2;
  8406. C[7] ^= i3; // Iterate the system four times
  8407. for (var i = 0; i < 4; i++) {
  8408. nextState.call(this);
  8409. }
  8410. }
  8411. },
  8412. _doProcessBlock: function _doProcessBlock(M, offset) {
  8413. // Shortcut
  8414. var X = this._X; // Iterate the system
  8415. nextState.call(this); // Generate four keystream words
  8416. S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16;
  8417. S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16;
  8418. S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16;
  8419. S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16;
  8420. for (var i = 0; i < 4; i++) {
  8421. // Swap endian
  8422. S[i] = (S[i] << 8 | S[i] >>> 24) & 0x00ff00ff | (S[i] << 24 | S[i] >>> 8) & 0xff00ff00; // Encrypt
  8423. M[offset + i] ^= S[i];
  8424. }
  8425. },
  8426. blockSize: 128 / 32,
  8427. ivSize: 64 / 32
  8428. });
  8429. function nextState() {
  8430. // Shortcuts
  8431. var X = this._X;
  8432. var C = this._C; // Save old counter values
  8433. for (var i = 0; i < 8; i++) {
  8434. C_[i] = C[i];
  8435. } // Calculate new counter values
  8436. C[0] = C[0] + 0x4d34d34d + this._b | 0;
  8437. C[1] = C[1] + 0xd34d34d3 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0;
  8438. C[2] = C[2] + 0x34d34d34 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0;
  8439. C[3] = C[3] + 0x4d34d34d + (C[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0;
  8440. C[4] = C[4] + 0xd34d34d3 + (C[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0;
  8441. C[5] = C[5] + 0x34d34d34 + (C[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0;
  8442. C[6] = C[6] + 0x4d34d34d + (C[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0;
  8443. C[7] = C[7] + 0xd34d34d3 + (C[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0;
  8444. this._b = C[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; // Calculate the g-values
  8445. for (var i = 0; i < 8; i++) {
  8446. var gx = X[i] + C[i]; // Construct high and low argument for squaring
  8447. var ga = gx & 0xffff;
  8448. var gb = gx >>> 16; // Calculate high and low result of squaring
  8449. var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb;
  8450. var gl = ((gx & 0xffff0000) * gx | 0) + ((gx & 0x0000ffff) * gx | 0); // High XOR low
  8451. G[i] = gh ^ gl;
  8452. } // Calculate new state values
  8453. X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0;
  8454. X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0;
  8455. X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0;
  8456. X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0;
  8457. X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0;
  8458. X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0;
  8459. X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0;
  8460. X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0;
  8461. }
  8462. /**
  8463. * Shortcut functions to the cipher's object interface.
  8464. *
  8465. * @example
  8466. *
  8467. * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg);
  8468. * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg);
  8469. */
  8470. C.Rabbit = StreamCipher._createHelper(Rabbit);
  8471. })();
  8472. return CryptoJS.Rabbit;
  8473. });
  8474. /***/ }),
  8475. /***/ 4640:
  8476. /***/ (function(module, exports, __webpack_require__) {
  8477. "use strict";
  8478. __webpack_require__(1539);
  8479. __webpack_require__(8674);
  8480. ;
  8481. (function (root, factory, undef) {
  8482. if (true) {
  8483. // CommonJS
  8484. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582));
  8485. } else {}
  8486. })(void 0, function (CryptoJS) {
  8487. (function () {
  8488. // Shortcuts
  8489. var C = CryptoJS;
  8490. var C_lib = C.lib;
  8491. var StreamCipher = C_lib.StreamCipher;
  8492. var C_algo = C.algo;
  8493. /**
  8494. * RC4 stream cipher algorithm.
  8495. */
  8496. var RC4 = C_algo.RC4 = StreamCipher.extend({
  8497. _doReset: function _doReset() {
  8498. // Shortcuts
  8499. var key = this._key;
  8500. var keyWords = key.words;
  8501. var keySigBytes = key.sigBytes; // Init sbox
  8502. var S = this._S = [];
  8503. for (var i = 0; i < 256; i++) {
  8504. S[i] = i;
  8505. } // Key setup
  8506. for (var i = 0, j = 0; i < 256; i++) {
  8507. var keyByteIndex = i % keySigBytes;
  8508. var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 0xff;
  8509. j = (j + S[i] + keyByte) % 256; // Swap
  8510. var t = S[i];
  8511. S[i] = S[j];
  8512. S[j] = t;
  8513. } // Counters
  8514. this._i = this._j = 0;
  8515. },
  8516. _doProcessBlock: function _doProcessBlock(M, offset) {
  8517. M[offset] ^= generateKeystreamWord.call(this);
  8518. },
  8519. keySize: 256 / 32,
  8520. ivSize: 0
  8521. });
  8522. function generateKeystreamWord() {
  8523. // Shortcuts
  8524. var S = this._S;
  8525. var i = this._i;
  8526. var j = this._j; // Generate keystream word
  8527. var keystreamWord = 0;
  8528. for (var n = 0; n < 4; n++) {
  8529. i = (i + 1) % 256;
  8530. j = (j + S[i]) % 256; // Swap
  8531. var t = S[i];
  8532. S[i] = S[j];
  8533. S[j] = t;
  8534. keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8;
  8535. } // Update counters
  8536. this._i = i;
  8537. this._j = j;
  8538. return keystreamWord;
  8539. }
  8540. /**
  8541. * Shortcut functions to the cipher's object interface.
  8542. *
  8543. * @example
  8544. *
  8545. * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg);
  8546. * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg);
  8547. */
  8548. C.RC4 = StreamCipher._createHelper(RC4);
  8549. /**
  8550. * Modified RC4 stream cipher algorithm.
  8551. */
  8552. var RC4Drop = C_algo.RC4Drop = RC4.extend({
  8553. /**
  8554. * Configuration options.
  8555. *
  8556. * @property {number} drop The number of keystream words to drop. Default 192
  8557. */
  8558. cfg: RC4.cfg.extend({
  8559. drop: 192
  8560. }),
  8561. _doReset: function _doReset() {
  8562. RC4._doReset.call(this); // Drop
  8563. for (var i = this.cfg.drop; i > 0; i--) {
  8564. generateKeystreamWord.call(this);
  8565. }
  8566. }
  8567. });
  8568. /**
  8569. * Shortcut functions to the cipher's object interface.
  8570. *
  8571. * @example
  8572. *
  8573. * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg);
  8574. * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg);
  8575. */
  8576. C.RC4Drop = StreamCipher._createHelper(RC4Drop);
  8577. })();
  8578. return CryptoJS.RC4;
  8579. });
  8580. /***/ }),
  8581. /***/ 8714:
  8582. /***/ (function(module, exports, __webpack_require__) {
  8583. "use strict";
  8584. ;
  8585. (function (root, factory) {
  8586. if (true) {
  8587. // CommonJS
  8588. module.exports = exports = factory(__webpack_require__(757));
  8589. } else {}
  8590. })(void 0, function (CryptoJS) {
  8591. /** @preserve
  8592. (c) 2012 by Cédric Mesnil. All rights reserved.
  8593. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  8594. - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  8595. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  8596. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  8597. */
  8598. (function (Math) {
  8599. // Shortcuts
  8600. var C = CryptoJS;
  8601. var C_lib = C.lib;
  8602. var WordArray = C_lib.WordArray;
  8603. var Hasher = C_lib.Hasher;
  8604. var C_algo = C.algo; // Constants table
  8605. var _zl = WordArray.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]);
  8606. var _zr = WordArray.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]);
  8607. var _sl = WordArray.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]);
  8608. var _sr = WordArray.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]);
  8609. var _hl = WordArray.create([0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
  8610. var _hr = WordArray.create([0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
  8611. /**
  8612. * RIPEMD160 hash algorithm.
  8613. */
  8614. var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({
  8615. _doReset: function _doReset() {
  8616. this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]);
  8617. },
  8618. _doProcessBlock: function _doProcessBlock(M, offset) {
  8619. // Swap endian
  8620. for (var i = 0; i < 16; i++) {
  8621. // Shortcuts
  8622. var offset_i = offset + i;
  8623. var M_offset_i = M[offset_i]; // Swap
  8624. M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 0x00ff00ff | (M_offset_i << 24 | M_offset_i >>> 8) & 0xff00ff00;
  8625. } // Shortcut
  8626. var H = this._hash.words;
  8627. var hl = _hl.words;
  8628. var hr = _hr.words;
  8629. var zl = _zl.words;
  8630. var zr = _zr.words;
  8631. var sl = _sl.words;
  8632. var sr = _sr.words; // Working variables
  8633. var al, bl, cl, dl, el;
  8634. var ar, br, cr, dr, er;
  8635. ar = al = H[0];
  8636. br = bl = H[1];
  8637. cr = cl = H[2];
  8638. dr = dl = H[3];
  8639. er = el = H[4]; // Computation
  8640. var t;
  8641. for (var i = 0; i < 80; i += 1) {
  8642. t = al + M[offset + zl[i]] | 0;
  8643. if (i < 16) {
  8644. t += f1(bl, cl, dl) + hl[0];
  8645. } else if (i < 32) {
  8646. t += f2(bl, cl, dl) + hl[1];
  8647. } else if (i < 48) {
  8648. t += f3(bl, cl, dl) + hl[2];
  8649. } else if (i < 64) {
  8650. t += f4(bl, cl, dl) + hl[3];
  8651. } else {
  8652. // if (i<80) {
  8653. t += f5(bl, cl, dl) + hl[4];
  8654. }
  8655. t = t | 0;
  8656. t = rotl(t, sl[i]);
  8657. t = t + el | 0;
  8658. al = el;
  8659. el = dl;
  8660. dl = rotl(cl, 10);
  8661. cl = bl;
  8662. bl = t;
  8663. t = ar + M[offset + zr[i]] | 0;
  8664. if (i < 16) {
  8665. t += f5(br, cr, dr) + hr[0];
  8666. } else if (i < 32) {
  8667. t += f4(br, cr, dr) + hr[1];
  8668. } else if (i < 48) {
  8669. t += f3(br, cr, dr) + hr[2];
  8670. } else if (i < 64) {
  8671. t += f2(br, cr, dr) + hr[3];
  8672. } else {
  8673. // if (i<80) {
  8674. t += f1(br, cr, dr) + hr[4];
  8675. }
  8676. t = t | 0;
  8677. t = rotl(t, sr[i]);
  8678. t = t + er | 0;
  8679. ar = er;
  8680. er = dr;
  8681. dr = rotl(cr, 10);
  8682. cr = br;
  8683. br = t;
  8684. } // Intermediate hash value
  8685. t = H[1] + cl + dr | 0;
  8686. H[1] = H[2] + dl + er | 0;
  8687. H[2] = H[3] + el + ar | 0;
  8688. H[3] = H[4] + al + br | 0;
  8689. H[4] = H[0] + bl + cr | 0;
  8690. H[0] = t;
  8691. },
  8692. _doFinalize: function _doFinalize() {
  8693. // Shortcuts
  8694. var data = this._data;
  8695. var dataWords = data.words;
  8696. var nBitsTotal = this._nDataBytes * 8;
  8697. var nBitsLeft = data.sigBytes * 8; // Add padding
  8698. dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
  8699. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 0x00ff00ff | (nBitsTotal << 24 | nBitsTotal >>> 8) & 0xff00ff00;
  8700. data.sigBytes = (dataWords.length + 1) * 4; // Hash final blocks
  8701. this._process(); // Shortcuts
  8702. var hash = this._hash;
  8703. var H = hash.words; // Swap endian
  8704. for (var i = 0; i < 5; i++) {
  8705. // Shortcut
  8706. var H_i = H[i]; // Swap
  8707. H[i] = (H_i << 8 | H_i >>> 24) & 0x00ff00ff | (H_i << 24 | H_i >>> 8) & 0xff00ff00;
  8708. } // Return final computed hash
  8709. return hash;
  8710. },
  8711. clone: function clone() {
  8712. var clone = Hasher.clone.call(this);
  8713. clone._hash = this._hash.clone();
  8714. return clone;
  8715. }
  8716. });
  8717. function f1(x, y, z) {
  8718. return x ^ y ^ z;
  8719. }
  8720. function f2(x, y, z) {
  8721. return x & y | ~x & z;
  8722. }
  8723. function f3(x, y, z) {
  8724. return (x | ~y) ^ z;
  8725. }
  8726. function f4(x, y, z) {
  8727. return x & z | y & ~z;
  8728. }
  8729. function f5(x, y, z) {
  8730. return x ^ (y | ~z);
  8731. }
  8732. function rotl(x, n) {
  8733. return x << n | x >>> 32 - n;
  8734. }
  8735. /**
  8736. * Shortcut function to the hasher's object interface.
  8737. *
  8738. * @param {WordArray|string} message The message to hash.
  8739. *
  8740. * @return {WordArray} The hash.
  8741. *
  8742. * @static
  8743. *
  8744. * @example
  8745. *
  8746. * var hash = CryptoJS.RIPEMD160('message');
  8747. * var hash = CryptoJS.RIPEMD160(wordArray);
  8748. */
  8749. C.RIPEMD160 = Hasher._createHelper(RIPEMD160);
  8750. /**
  8751. * Shortcut function to the HMAC's object interface.
  8752. *
  8753. * @param {WordArray|string} message The message to hash.
  8754. * @param {WordArray|string} key The secret key.
  8755. *
  8756. * @return {WordArray} The HMAC.
  8757. *
  8758. * @static
  8759. *
  8760. * @example
  8761. *
  8762. * var hmac = CryptoJS.HmacRIPEMD160(message, key);
  8763. */
  8764. C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160);
  8765. })(Math);
  8766. return CryptoJS.RIPEMD160;
  8767. });
  8768. /***/ }),
  8769. /***/ 9865:
  8770. /***/ (function(module, exports, __webpack_require__) {
  8771. "use strict";
  8772. ;
  8773. (function (root, factory) {
  8774. if (true) {
  8775. // CommonJS
  8776. module.exports = exports = factory(__webpack_require__(757));
  8777. } else {}
  8778. })(void 0, function (CryptoJS) {
  8779. (function () {
  8780. // Shortcuts
  8781. var C = CryptoJS;
  8782. var C_lib = C.lib;
  8783. var WordArray = C_lib.WordArray;
  8784. var Hasher = C_lib.Hasher;
  8785. var C_algo = C.algo; // Reusable object
  8786. var W = [];
  8787. /**
  8788. * SHA-1 hash algorithm.
  8789. */
  8790. var SHA1 = C_algo.SHA1 = Hasher.extend({
  8791. _doReset: function _doReset() {
  8792. this._hash = new WordArray.init([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]);
  8793. },
  8794. _doProcessBlock: function _doProcessBlock(M, offset) {
  8795. // Shortcut
  8796. var H = this._hash.words; // Working variables
  8797. var a = H[0];
  8798. var b = H[1];
  8799. var c = H[2];
  8800. var d = H[3];
  8801. var e = H[4]; // Computation
  8802. for (var i = 0; i < 80; i++) {
  8803. if (i < 16) {
  8804. W[i] = M[offset + i] | 0;
  8805. } else {
  8806. var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
  8807. W[i] = n << 1 | n >>> 31;
  8808. }
  8809. var t = (a << 5 | a >>> 27) + e + W[i];
  8810. if (i < 20) {
  8811. t += (b & c | ~b & d) + 0x5a827999;
  8812. } else if (i < 40) {
  8813. t += (b ^ c ^ d) + 0x6ed9eba1;
  8814. } else if (i < 60) {
  8815. t += (b & c | b & d | c & d) - 0x70e44324;
  8816. } else
  8817. /* if (i < 80) */
  8818. {
  8819. t += (b ^ c ^ d) - 0x359d3e2a;
  8820. }
  8821. e = d;
  8822. d = c;
  8823. c = b << 30 | b >>> 2;
  8824. b = a;
  8825. a = t;
  8826. } // Intermediate hash value
  8827. H[0] = H[0] + a | 0;
  8828. H[1] = H[1] + b | 0;
  8829. H[2] = H[2] + c | 0;
  8830. H[3] = H[3] + d | 0;
  8831. H[4] = H[4] + e | 0;
  8832. },
  8833. _doFinalize: function _doFinalize() {
  8834. // Shortcuts
  8835. var data = this._data;
  8836. var dataWords = data.words;
  8837. var nBitsTotal = this._nDataBytes * 8;
  8838. var nBitsLeft = data.sigBytes * 8; // Add padding
  8839. dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
  8840. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
  8841. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
  8842. data.sigBytes = dataWords.length * 4; // Hash final blocks
  8843. this._process(); // Return final computed hash
  8844. return this._hash;
  8845. },
  8846. clone: function clone() {
  8847. var clone = Hasher.clone.call(this);
  8848. clone._hash = this._hash.clone();
  8849. return clone;
  8850. }
  8851. });
  8852. /**
  8853. * Shortcut function to the hasher's object interface.
  8854. *
  8855. * @param {WordArray|string} message The message to hash.
  8856. *
  8857. * @return {WordArray} The hash.
  8858. *
  8859. * @static
  8860. *
  8861. * @example
  8862. *
  8863. * var hash = CryptoJS.SHA1('message');
  8864. * var hash = CryptoJS.SHA1(wordArray);
  8865. */
  8866. C.SHA1 = Hasher._createHelper(SHA1);
  8867. /**
  8868. * Shortcut function to the HMAC's object interface.
  8869. *
  8870. * @param {WordArray|string} message The message to hash.
  8871. * @param {WordArray|string} key The secret key.
  8872. *
  8873. * @return {WordArray} The HMAC.
  8874. *
  8875. * @static
  8876. *
  8877. * @example
  8878. *
  8879. * var hmac = CryptoJS.HmacSHA1(message, key);
  8880. */
  8881. C.HmacSHA1 = Hasher._createHmacHelper(SHA1);
  8882. })();
  8883. return CryptoJS.SHA1;
  8884. });
  8885. /***/ }),
  8886. /***/ 6876:
  8887. /***/ (function(module, exports, __webpack_require__) {
  8888. "use strict";
  8889. ;
  8890. (function (root, factory, undef) {
  8891. if (true) {
  8892. // CommonJS
  8893. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(8921));
  8894. } else {}
  8895. })(void 0, function (CryptoJS) {
  8896. (function () {
  8897. // Shortcuts
  8898. var C = CryptoJS;
  8899. var C_lib = C.lib;
  8900. var WordArray = C_lib.WordArray;
  8901. var C_algo = C.algo;
  8902. var SHA256 = C_algo.SHA256;
  8903. /**
  8904. * SHA-224 hash algorithm.
  8905. */
  8906. var SHA224 = C_algo.SHA224 = SHA256.extend({
  8907. _doReset: function _doReset() {
  8908. this._hash = new WordArray.init([0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4]);
  8909. },
  8910. _doFinalize: function _doFinalize() {
  8911. var hash = SHA256._doFinalize.call(this);
  8912. hash.sigBytes -= 4;
  8913. return hash;
  8914. }
  8915. });
  8916. /**
  8917. * Shortcut function to the hasher's object interface.
  8918. *
  8919. * @param {WordArray|string} message The message to hash.
  8920. *
  8921. * @return {WordArray} The hash.
  8922. *
  8923. * @static
  8924. *
  8925. * @example
  8926. *
  8927. * var hash = CryptoJS.SHA224('message');
  8928. * var hash = CryptoJS.SHA224(wordArray);
  8929. */
  8930. C.SHA224 = SHA256._createHelper(SHA224);
  8931. /**
  8932. * Shortcut function to the HMAC's object interface.
  8933. *
  8934. * @param {WordArray|string} message The message to hash.
  8935. * @param {WordArray|string} key The secret key.
  8936. *
  8937. * @return {WordArray} The HMAC.
  8938. *
  8939. * @static
  8940. *
  8941. * @example
  8942. *
  8943. * var hmac = CryptoJS.HmacSHA224(message, key);
  8944. */
  8945. C.HmacSHA224 = SHA256._createHmacHelper(SHA224);
  8946. })();
  8947. return CryptoJS.SHA224;
  8948. });
  8949. /***/ }),
  8950. /***/ 8921:
  8951. /***/ (function(module, exports, __webpack_require__) {
  8952. "use strict";
  8953. __webpack_require__(7042);
  8954. ;
  8955. (function (root, factory) {
  8956. if (true) {
  8957. // CommonJS
  8958. module.exports = exports = factory(__webpack_require__(757));
  8959. } else {}
  8960. })(void 0, function (CryptoJS) {
  8961. (function (Math) {
  8962. // Shortcuts
  8963. var C = CryptoJS;
  8964. var C_lib = C.lib;
  8965. var WordArray = C_lib.WordArray;
  8966. var Hasher = C_lib.Hasher;
  8967. var C_algo = C.algo; // Initialization and round constants tables
  8968. var H = [];
  8969. var K = []; // Compute constants
  8970. (function () {
  8971. function isPrime(n) {
  8972. var sqrtN = Math.sqrt(n);
  8973. for (var factor = 2; factor <= sqrtN; factor++) {
  8974. if (!(n % factor)) {
  8975. return false;
  8976. }
  8977. }
  8978. return true;
  8979. }
  8980. function getFractionalBits(n) {
  8981. return (n - (n | 0)) * 0x100000000 | 0;
  8982. }
  8983. var n = 2;
  8984. var nPrime = 0;
  8985. while (nPrime < 64) {
  8986. if (isPrime(n)) {
  8987. if (nPrime < 8) {
  8988. H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2));
  8989. }
  8990. K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
  8991. nPrime++;
  8992. }
  8993. n++;
  8994. }
  8995. })(); // Reusable object
  8996. var W = [];
  8997. /**
  8998. * SHA-256 hash algorithm.
  8999. */
  9000. var SHA256 = C_algo.SHA256 = Hasher.extend({
  9001. _doReset: function _doReset() {
  9002. this._hash = new WordArray.init(H.slice(0));
  9003. },
  9004. _doProcessBlock: function _doProcessBlock(M, offset) {
  9005. // Shortcut
  9006. var H = this._hash.words; // Working variables
  9007. var a = H[0];
  9008. var b = H[1];
  9009. var c = H[2];
  9010. var d = H[3];
  9011. var e = H[4];
  9012. var f = H[5];
  9013. var g = H[6];
  9014. var h = H[7]; // Computation
  9015. for (var i = 0; i < 64; i++) {
  9016. if (i < 16) {
  9017. W[i] = M[offset + i] | 0;
  9018. } else {
  9019. var gamma0x = W[i - 15];
  9020. var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3;
  9021. var gamma1x = W[i - 2];
  9022. var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10;
  9023. W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
  9024. }
  9025. var ch = e & f ^ ~e & g;
  9026. var maj = a & b ^ a & c ^ b & c;
  9027. var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22);
  9028. var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25);
  9029. var t1 = h + sigma1 + ch + K[i] + W[i];
  9030. var t2 = sigma0 + maj;
  9031. h = g;
  9032. g = f;
  9033. f = e;
  9034. e = d + t1 | 0;
  9035. d = c;
  9036. c = b;
  9037. b = a;
  9038. a = t1 + t2 | 0;
  9039. } // Intermediate hash value
  9040. H[0] = H[0] + a | 0;
  9041. H[1] = H[1] + b | 0;
  9042. H[2] = H[2] + c | 0;
  9043. H[3] = H[3] + d | 0;
  9044. H[4] = H[4] + e | 0;
  9045. H[5] = H[5] + f | 0;
  9046. H[6] = H[6] + g | 0;
  9047. H[7] = H[7] + h | 0;
  9048. },
  9049. _doFinalize: function _doFinalize() {
  9050. // Shortcuts
  9051. var data = this._data;
  9052. var dataWords = data.words;
  9053. var nBitsTotal = this._nDataBytes * 8;
  9054. var nBitsLeft = data.sigBytes * 8; // Add padding
  9055. dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
  9056. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000);
  9057. dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal;
  9058. data.sigBytes = dataWords.length * 4; // Hash final blocks
  9059. this._process(); // Return final computed hash
  9060. return this._hash;
  9061. },
  9062. clone: function clone() {
  9063. var clone = Hasher.clone.call(this);
  9064. clone._hash = this._hash.clone();
  9065. return clone;
  9066. }
  9067. });
  9068. /**
  9069. * Shortcut function to the hasher's object interface.
  9070. *
  9071. * @param {WordArray|string} message The message to hash.
  9072. *
  9073. * @return {WordArray} The hash.
  9074. *
  9075. * @static
  9076. *
  9077. * @example
  9078. *
  9079. * var hash = CryptoJS.SHA256('message');
  9080. * var hash = CryptoJS.SHA256(wordArray);
  9081. */
  9082. C.SHA256 = Hasher._createHelper(SHA256);
  9083. /**
  9084. * Shortcut function to the HMAC's object interface.
  9085. *
  9086. * @param {WordArray|string} message The message to hash.
  9087. * @param {WordArray|string} key The secret key.
  9088. *
  9089. * @return {WordArray} The HMAC.
  9090. *
  9091. * @static
  9092. *
  9093. * @example
  9094. *
  9095. * var hmac = CryptoJS.HmacSHA256(message, key);
  9096. */
  9097. C.HmacSHA256 = Hasher._createHmacHelper(SHA256);
  9098. })(Math);
  9099. return CryptoJS.SHA256;
  9100. });
  9101. /***/ }),
  9102. /***/ 8342:
  9103. /***/ (function(module, exports, __webpack_require__) {
  9104. "use strict";
  9105. __webpack_require__(7042);
  9106. ;
  9107. (function (root, factory, undef) {
  9108. if (true) {
  9109. // CommonJS
  9110. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(2601));
  9111. } else {}
  9112. })(void 0, function (CryptoJS) {
  9113. (function (Math) {
  9114. // Shortcuts
  9115. var C = CryptoJS;
  9116. var C_lib = C.lib;
  9117. var WordArray = C_lib.WordArray;
  9118. var Hasher = C_lib.Hasher;
  9119. var C_x64 = C.x64;
  9120. var X64Word = C_x64.Word;
  9121. var C_algo = C.algo; // Constants tables
  9122. var RHO_OFFSETS = [];
  9123. var PI_INDEXES = [];
  9124. var ROUND_CONSTANTS = []; // Compute Constants
  9125. (function () {
  9126. // Compute rho offset constants
  9127. var x = 1,
  9128. y = 0;
  9129. for (var t = 0; t < 24; t++) {
  9130. RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64;
  9131. var newX = y % 5;
  9132. var newY = (2 * x + 3 * y) % 5;
  9133. x = newX;
  9134. y = newY;
  9135. } // Compute pi index constants
  9136. for (var x = 0; x < 5; x++) {
  9137. for (var y = 0; y < 5; y++) {
  9138. PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5;
  9139. }
  9140. } // Compute round constants
  9141. var LFSR = 0x01;
  9142. for (var i = 0; i < 24; i++) {
  9143. var roundConstantMsw = 0;
  9144. var roundConstantLsw = 0;
  9145. for (var j = 0; j < 7; j++) {
  9146. if (LFSR & 0x01) {
  9147. var bitPosition = (1 << j) - 1;
  9148. if (bitPosition < 32) {
  9149. roundConstantLsw ^= 1 << bitPosition;
  9150. } else
  9151. /* if (bitPosition >= 32) */
  9152. {
  9153. roundConstantMsw ^= 1 << bitPosition - 32;
  9154. }
  9155. } // Compute next LFSR
  9156. if (LFSR & 0x80) {
  9157. // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1
  9158. LFSR = LFSR << 1 ^ 0x71;
  9159. } else {
  9160. LFSR <<= 1;
  9161. }
  9162. }
  9163. ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw);
  9164. }
  9165. })(); // Reusable objects for temporary values
  9166. var T = [];
  9167. (function () {
  9168. for (var i = 0; i < 25; i++) {
  9169. T[i] = X64Word.create();
  9170. }
  9171. })();
  9172. /**
  9173. * SHA-3 hash algorithm.
  9174. */
  9175. var SHA3 = C_algo.SHA3 = Hasher.extend({
  9176. /**
  9177. * Configuration options.
  9178. *
  9179. * @property {number} outputLength
  9180. * The desired number of bits in the output hash.
  9181. * Only values permitted are: 224, 256, 384, 512.
  9182. * Default: 512
  9183. */
  9184. cfg: Hasher.cfg.extend({
  9185. outputLength: 512
  9186. }),
  9187. _doReset: function _doReset() {
  9188. var state = this._state = [];
  9189. for (var i = 0; i < 25; i++) {
  9190. state[i] = new X64Word.init();
  9191. }
  9192. this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
  9193. },
  9194. _doProcessBlock: function _doProcessBlock(M, offset) {
  9195. // Shortcuts
  9196. var state = this._state;
  9197. var nBlockSizeLanes = this.blockSize / 2; // Absorb
  9198. for (var i = 0; i < nBlockSizeLanes; i++) {
  9199. // Shortcuts
  9200. var M2i = M[offset + 2 * i];
  9201. var M2i1 = M[offset + 2 * i + 1]; // Swap endian
  9202. M2i = (M2i << 8 | M2i >>> 24) & 0x00ff00ff | (M2i << 24 | M2i >>> 8) & 0xff00ff00;
  9203. M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 0x00ff00ff | (M2i1 << 24 | M2i1 >>> 8) & 0xff00ff00; // Absorb message into state
  9204. var lane = state[i];
  9205. lane.high ^= M2i1;
  9206. lane.low ^= M2i;
  9207. } // Rounds
  9208. for (var round = 0; round < 24; round++) {
  9209. // Theta
  9210. for (var x = 0; x < 5; x++) {
  9211. // Mix column lanes
  9212. var tMsw = 0,
  9213. tLsw = 0;
  9214. for (var y = 0; y < 5; y++) {
  9215. var lane = state[x + 5 * y];
  9216. tMsw ^= lane.high;
  9217. tLsw ^= lane.low;
  9218. } // Temporary values
  9219. var Tx = T[x];
  9220. Tx.high = tMsw;
  9221. Tx.low = tLsw;
  9222. }
  9223. for (var x = 0; x < 5; x++) {
  9224. // Shortcuts
  9225. var Tx4 = T[(x + 4) % 5];
  9226. var Tx1 = T[(x + 1) % 5];
  9227. var Tx1Msw = Tx1.high;
  9228. var Tx1Lsw = Tx1.low; // Mix surrounding columns
  9229. var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31);
  9230. var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31);
  9231. for (var y = 0; y < 5; y++) {
  9232. var lane = state[x + 5 * y];
  9233. lane.high ^= tMsw;
  9234. lane.low ^= tLsw;
  9235. }
  9236. } // Rho Pi
  9237. for (var laneIndex = 1; laneIndex < 25; laneIndex++) {
  9238. var tMsw;
  9239. var tLsw; // Shortcuts
  9240. var lane = state[laneIndex];
  9241. var laneMsw = lane.high;
  9242. var laneLsw = lane.low;
  9243. var rhoOffset = RHO_OFFSETS[laneIndex]; // Rotate lanes
  9244. if (rhoOffset < 32) {
  9245. tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset;
  9246. tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset;
  9247. } else
  9248. /* if (rhoOffset >= 32) */
  9249. {
  9250. tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset;
  9251. tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset;
  9252. } // Transpose lanes
  9253. var TPiLane = T[PI_INDEXES[laneIndex]];
  9254. TPiLane.high = tMsw;
  9255. TPiLane.low = tLsw;
  9256. } // Rho pi at x = y = 0
  9257. var T0 = T[0];
  9258. var state0 = state[0];
  9259. T0.high = state0.high;
  9260. T0.low = state0.low; // Chi
  9261. for (var x = 0; x < 5; x++) {
  9262. for (var y = 0; y < 5; y++) {
  9263. // Shortcuts
  9264. var laneIndex = x + 5 * y;
  9265. var lane = state[laneIndex];
  9266. var TLane = T[laneIndex];
  9267. var Tx1Lane = T[(x + 1) % 5 + 5 * y];
  9268. var Tx2Lane = T[(x + 2) % 5 + 5 * y]; // Mix rows
  9269. lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high;
  9270. lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low;
  9271. }
  9272. } // Iota
  9273. var lane = state[0];
  9274. var roundConstant = ROUND_CONSTANTS[round];
  9275. lane.high ^= roundConstant.high;
  9276. lane.low ^= roundConstant.low;
  9277. }
  9278. },
  9279. _doFinalize: function _doFinalize() {
  9280. // Shortcuts
  9281. var data = this._data;
  9282. var dataWords = data.words;
  9283. var nBitsTotal = this._nDataBytes * 8;
  9284. var nBitsLeft = data.sigBytes * 8;
  9285. var blockSizeBits = this.blockSize * 32; // Add padding
  9286. dataWords[nBitsLeft >>> 5] |= 0x1 << 24 - nBitsLeft % 32;
  9287. dataWords[(Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 0x80;
  9288. data.sigBytes = dataWords.length * 4; // Hash final blocks
  9289. this._process(); // Shortcuts
  9290. var state = this._state;
  9291. var outputLengthBytes = this.cfg.outputLength / 8;
  9292. var outputLengthLanes = outputLengthBytes / 8; // Squeeze
  9293. var hashWords = [];
  9294. for (var i = 0; i < outputLengthLanes; i++) {
  9295. // Shortcuts
  9296. var lane = state[i];
  9297. var laneMsw = lane.high;
  9298. var laneLsw = lane.low; // Swap endian
  9299. laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 0x00ff00ff | (laneMsw << 24 | laneMsw >>> 8) & 0xff00ff00;
  9300. laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 0x00ff00ff | (laneLsw << 24 | laneLsw >>> 8) & 0xff00ff00; // Squeeze state to retrieve hash
  9301. hashWords.push(laneLsw);
  9302. hashWords.push(laneMsw);
  9303. } // Return final computed hash
  9304. return new WordArray.init(hashWords, outputLengthBytes);
  9305. },
  9306. clone: function clone() {
  9307. var clone = Hasher.clone.call(this);
  9308. var state = clone._state = this._state.slice(0);
  9309. for (var i = 0; i < 25; i++) {
  9310. state[i] = state[i].clone();
  9311. }
  9312. return clone;
  9313. }
  9314. });
  9315. /**
  9316. * Shortcut function to the hasher's object interface.
  9317. *
  9318. * @param {WordArray|string} message The message to hash.
  9319. *
  9320. * @return {WordArray} The hash.
  9321. *
  9322. * @static
  9323. *
  9324. * @example
  9325. *
  9326. * var hash = CryptoJS.SHA3('message');
  9327. * var hash = CryptoJS.SHA3(wordArray);
  9328. */
  9329. C.SHA3 = Hasher._createHelper(SHA3);
  9330. /**
  9331. * Shortcut function to the HMAC's object interface.
  9332. *
  9333. * @param {WordArray|string} message The message to hash.
  9334. * @param {WordArray|string} key The secret key.
  9335. *
  9336. * @return {WordArray} The HMAC.
  9337. *
  9338. * @static
  9339. *
  9340. * @example
  9341. *
  9342. * var hmac = CryptoJS.HmacSHA3(message, key);
  9343. */
  9344. C.HmacSHA3 = Hasher._createHmacHelper(SHA3);
  9345. })(Math);
  9346. return CryptoJS.SHA3;
  9347. });
  9348. /***/ }),
  9349. /***/ 8122:
  9350. /***/ (function(module, exports, __webpack_require__) {
  9351. "use strict";
  9352. ;
  9353. (function (root, factory, undef) {
  9354. if (true) {
  9355. // CommonJS
  9356. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(2601), __webpack_require__(7991));
  9357. } else {}
  9358. })(void 0, function (CryptoJS) {
  9359. (function () {
  9360. // Shortcuts
  9361. var C = CryptoJS;
  9362. var C_x64 = C.x64;
  9363. var X64Word = C_x64.Word;
  9364. var X64WordArray = C_x64.WordArray;
  9365. var C_algo = C.algo;
  9366. var SHA512 = C_algo.SHA512;
  9367. /**
  9368. * SHA-384 hash algorithm.
  9369. */
  9370. var SHA384 = C_algo.SHA384 = SHA512.extend({
  9371. _doReset: function _doReset() {
  9372. this._hash = new X64WordArray.init([new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)]);
  9373. },
  9374. _doFinalize: function _doFinalize() {
  9375. var hash = SHA512._doFinalize.call(this);
  9376. hash.sigBytes -= 16;
  9377. return hash;
  9378. }
  9379. });
  9380. /**
  9381. * Shortcut function to the hasher's object interface.
  9382. *
  9383. * @param {WordArray|string} message The message to hash.
  9384. *
  9385. * @return {WordArray} The hash.
  9386. *
  9387. * @static
  9388. *
  9389. * @example
  9390. *
  9391. * var hash = CryptoJS.SHA384('message');
  9392. * var hash = CryptoJS.SHA384(wordArray);
  9393. */
  9394. C.SHA384 = SHA512._createHelper(SHA384);
  9395. /**
  9396. * Shortcut function to the HMAC's object interface.
  9397. *
  9398. * @param {WordArray|string} message The message to hash.
  9399. * @param {WordArray|string} key The secret key.
  9400. *
  9401. * @return {WordArray} The HMAC.
  9402. *
  9403. * @static
  9404. *
  9405. * @example
  9406. *
  9407. * var hmac = CryptoJS.HmacSHA384(message, key);
  9408. */
  9409. C.HmacSHA384 = SHA512._createHmacHelper(SHA384);
  9410. })();
  9411. return CryptoJS.SHA384;
  9412. });
  9413. /***/ }),
  9414. /***/ 7991:
  9415. /***/ (function(module, exports, __webpack_require__) {
  9416. "use strict";
  9417. ;
  9418. (function (root, factory, undef) {
  9419. if (true) {
  9420. // CommonJS
  9421. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(2601));
  9422. } else {}
  9423. })(void 0, function (CryptoJS) {
  9424. (function () {
  9425. // Shortcuts
  9426. var C = CryptoJS;
  9427. var C_lib = C.lib;
  9428. var Hasher = C_lib.Hasher;
  9429. var C_x64 = C.x64;
  9430. var X64Word = C_x64.Word;
  9431. var X64WordArray = C_x64.WordArray;
  9432. var C_algo = C.algo;
  9433. function X64Word_create() {
  9434. return X64Word.create.apply(X64Word, arguments);
  9435. } // Constants
  9436. var K = [X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)]; // Reusable objects
  9437. var W = [];
  9438. (function () {
  9439. for (var i = 0; i < 80; i++) {
  9440. W[i] = X64Word_create();
  9441. }
  9442. })();
  9443. /**
  9444. * SHA-512 hash algorithm.
  9445. */
  9446. var SHA512 = C_algo.SHA512 = Hasher.extend({
  9447. _doReset: function _doReset() {
  9448. this._hash = new X64WordArray.init([new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)]);
  9449. },
  9450. _doProcessBlock: function _doProcessBlock(M, offset) {
  9451. // Shortcuts
  9452. var H = this._hash.words;
  9453. var H0 = H[0];
  9454. var H1 = H[1];
  9455. var H2 = H[2];
  9456. var H3 = H[3];
  9457. var H4 = H[4];
  9458. var H5 = H[5];
  9459. var H6 = H[6];
  9460. var H7 = H[7];
  9461. var H0h = H0.high;
  9462. var H0l = H0.low;
  9463. var H1h = H1.high;
  9464. var H1l = H1.low;
  9465. var H2h = H2.high;
  9466. var H2l = H2.low;
  9467. var H3h = H3.high;
  9468. var H3l = H3.low;
  9469. var H4h = H4.high;
  9470. var H4l = H4.low;
  9471. var H5h = H5.high;
  9472. var H5l = H5.low;
  9473. var H6h = H6.high;
  9474. var H6l = H6.low;
  9475. var H7h = H7.high;
  9476. var H7l = H7.low; // Working variables
  9477. var ah = H0h;
  9478. var al = H0l;
  9479. var bh = H1h;
  9480. var bl = H1l;
  9481. var ch = H2h;
  9482. var cl = H2l;
  9483. var dh = H3h;
  9484. var dl = H3l;
  9485. var eh = H4h;
  9486. var el = H4l;
  9487. var fh = H5h;
  9488. var fl = H5l;
  9489. var gh = H6h;
  9490. var gl = H6l;
  9491. var hh = H7h;
  9492. var hl = H7l; // Rounds
  9493. for (var i = 0; i < 80; i++) {
  9494. var Wil;
  9495. var Wih; // Shortcut
  9496. var Wi = W[i]; // Extend message
  9497. if (i < 16) {
  9498. Wih = Wi.high = M[offset + i * 2] | 0;
  9499. Wil = Wi.low = M[offset + i * 2 + 1] | 0;
  9500. } else {
  9501. // Gamma0
  9502. var gamma0x = W[i - 15];
  9503. var gamma0xh = gamma0x.high;
  9504. var gamma0xl = gamma0x.low;
  9505. var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7;
  9506. var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25); // Gamma1
  9507. var gamma1x = W[i - 2];
  9508. var gamma1xh = gamma1x.high;
  9509. var gamma1xl = gamma1x.low;
  9510. var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6;
  9511. var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26); // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
  9512. var Wi7 = W[i - 7];
  9513. var Wi7h = Wi7.high;
  9514. var Wi7l = Wi7.low;
  9515. var Wi16 = W[i - 16];
  9516. var Wi16h = Wi16.high;
  9517. var Wi16l = Wi16.low;
  9518. Wil = gamma0l + Wi7l;
  9519. Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0);
  9520. Wil = Wil + gamma1l;
  9521. Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0);
  9522. Wil = Wil + Wi16l;
  9523. Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0);
  9524. Wi.high = Wih;
  9525. Wi.low = Wil;
  9526. }
  9527. var chh = eh & fh ^ ~eh & gh;
  9528. var chl = el & fl ^ ~el & gl;
  9529. var majh = ah & bh ^ ah & ch ^ bh & ch;
  9530. var majl = al & bl ^ al & cl ^ bl & cl;
  9531. var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7);
  9532. var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7);
  9533. var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9);
  9534. var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9); // t1 = h + sigma1 + ch + K[i] + W[i]
  9535. var Ki = K[i];
  9536. var Kih = Ki.high;
  9537. var Kil = Ki.low;
  9538. var t1l = hl + sigma1l;
  9539. var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0);
  9540. var t1l = t1l + chl;
  9541. var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0);
  9542. var t1l = t1l + Kil;
  9543. var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0);
  9544. var t1l = t1l + Wil;
  9545. var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0); // t2 = sigma0 + maj
  9546. var t2l = sigma0l + majl;
  9547. var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0); // Update working variables
  9548. hh = gh;
  9549. hl = gl;
  9550. gh = fh;
  9551. gl = fl;
  9552. fh = eh;
  9553. fl = el;
  9554. el = dl + t1l | 0;
  9555. eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0;
  9556. dh = ch;
  9557. dl = cl;
  9558. ch = bh;
  9559. cl = bl;
  9560. bh = ah;
  9561. bl = al;
  9562. al = t1l + t2l | 0;
  9563. ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0;
  9564. } // Intermediate hash value
  9565. H0l = H0.low = H0l + al;
  9566. H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0);
  9567. H1l = H1.low = H1l + bl;
  9568. H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0);
  9569. H2l = H2.low = H2l + cl;
  9570. H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0);
  9571. H3l = H3.low = H3l + dl;
  9572. H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0);
  9573. H4l = H4.low = H4l + el;
  9574. H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0);
  9575. H5l = H5.low = H5l + fl;
  9576. H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0);
  9577. H6l = H6.low = H6l + gl;
  9578. H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0);
  9579. H7l = H7.low = H7l + hl;
  9580. H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0);
  9581. },
  9582. _doFinalize: function _doFinalize() {
  9583. // Shortcuts
  9584. var data = this._data;
  9585. var dataWords = data.words;
  9586. var nBitsTotal = this._nDataBytes * 8;
  9587. var nBitsLeft = data.sigBytes * 8; // Add padding
  9588. dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
  9589. dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 0x100000000);
  9590. dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal;
  9591. data.sigBytes = dataWords.length * 4; // Hash final blocks
  9592. this._process(); // Convert hash to 32-bit word array before returning
  9593. var hash = this._hash.toX32(); // Return final computed hash
  9594. return hash;
  9595. },
  9596. clone: function clone() {
  9597. var clone = Hasher.clone.call(this);
  9598. clone._hash = this._hash.clone();
  9599. return clone;
  9600. },
  9601. blockSize: 1024 / 32
  9602. });
  9603. /**
  9604. * Shortcut function to the hasher's object interface.
  9605. *
  9606. * @param {WordArray|string} message The message to hash.
  9607. *
  9608. * @return {WordArray} The hash.
  9609. *
  9610. * @static
  9611. *
  9612. * @example
  9613. *
  9614. * var hash = CryptoJS.SHA512('message');
  9615. * var hash = CryptoJS.SHA512(wordArray);
  9616. */
  9617. C.SHA512 = Hasher._createHelper(SHA512);
  9618. /**
  9619. * Shortcut function to the HMAC's object interface.
  9620. *
  9621. * @param {WordArray|string} message The message to hash.
  9622. * @param {WordArray|string} key The secret key.
  9623. *
  9624. * @return {WordArray} The HMAC.
  9625. *
  9626. * @static
  9627. *
  9628. * @example
  9629. *
  9630. * var hmac = CryptoJS.HmacSHA512(message, key);
  9631. */
  9632. C.HmacSHA512 = Hasher._createHmacHelper(SHA512);
  9633. })();
  9634. return CryptoJS.SHA512;
  9635. });
  9636. /***/ }),
  9637. /***/ 8437:
  9638. /***/ (function(module, exports, __webpack_require__) {
  9639. "use strict";
  9640. __webpack_require__(7042);
  9641. ;
  9642. (function (root, factory, undef) {
  9643. if (true) {
  9644. // CommonJS
  9645. module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582));
  9646. } else {}
  9647. })(void 0, function (CryptoJS) {
  9648. (function () {
  9649. // Shortcuts
  9650. var C = CryptoJS;
  9651. var C_lib = C.lib;
  9652. var WordArray = C_lib.WordArray;
  9653. var BlockCipher = C_lib.BlockCipher;
  9654. var C_algo = C.algo; // Permuted Choice 1 constants
  9655. var PC1 = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4]; // Permuted Choice 2 constants
  9656. var PC2 = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32]; // Cumulative bit shift constants
  9657. var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; // SBOXes and round permutation constants
  9658. var SBOX_P = [{
  9659. 0x0: 0x808200,
  9660. 0x10000000: 0x8000,
  9661. 0x20000000: 0x808002,
  9662. 0x30000000: 0x2,
  9663. 0x40000000: 0x200,
  9664. 0x50000000: 0x808202,
  9665. 0x60000000: 0x800202,
  9666. 0x70000000: 0x800000,
  9667. 0x80000000: 0x202,
  9668. 0x90000000: 0x800200,
  9669. 0xa0000000: 0x8200,
  9670. 0xb0000000: 0x808000,
  9671. 0xc0000000: 0x8002,
  9672. 0xd0000000: 0x800002,
  9673. 0xe0000000: 0x0,
  9674. 0xf0000000: 0x8202,
  9675. 0x8000000: 0x0,
  9676. 0x18000000: 0x808202,
  9677. 0x28000000: 0x8202,
  9678. 0x38000000: 0x8000,
  9679. 0x48000000: 0x808200,
  9680. 0x58000000: 0x200,
  9681. 0x68000000: 0x808002,
  9682. 0x78000000: 0x2,
  9683. 0x88000000: 0x800200,
  9684. 0x98000000: 0x8200,
  9685. 0xa8000000: 0x808000,
  9686. 0xb8000000: 0x800202,
  9687. 0xc8000000: 0x800002,
  9688. 0xd8000000: 0x8002,
  9689. 0xe8000000: 0x202,
  9690. 0xf8000000: 0x800000,
  9691. 0x1: 0x8000,
  9692. 0x10000001: 0x2,
  9693. 0x20000001: 0x808200,
  9694. 0x30000001: 0x800000,
  9695. 0x40000001: 0x808002,
  9696. 0x50000001: 0x8200,
  9697. 0x60000001: 0x200,
  9698. 0x70000001: 0x800202,
  9699. 0x80000001: 0x808202,
  9700. 0x90000001: 0x808000,
  9701. 0xa0000001: 0x800002,
  9702. 0xb0000001: 0x8202,
  9703. 0xc0000001: 0x202,
  9704. 0xd0000001: 0x800200,
  9705. 0xe0000001: 0x8002,
  9706. 0xf0000001: 0x0,
  9707. 0x8000001: 0x808202,
  9708. 0x18000001: 0x808000,
  9709. 0x28000001: 0x800000,
  9710. 0x38000001: 0x200,
  9711. 0x48000001: 0x8000,
  9712. 0x58000001: 0x800002,
  9713. 0x68000001: 0x2,
  9714. 0x78000001: 0x8202,
  9715. 0x88000001: 0x8002,
  9716. 0x98000001: 0x800202,
  9717. 0xa8000001: 0x202,
  9718. 0xb8000001: 0x808200,
  9719. 0xc8000001: 0x800200,
  9720. 0xd8000001: 0x0,
  9721. 0xe8000001: 0x8200,
  9722. 0xf8000001: 0x808002
  9723. }, {
  9724. 0x0: 0x40084010,
  9725. 0x1000000: 0x4000,
  9726. 0x2000000: 0x80000,
  9727. 0x3000000: 0x40080010,
  9728. 0x4000000: 0x40000010,
  9729. 0x5000000: 0x40084000,
  9730. 0x6000000: 0x40004000,
  9731. 0x7000000: 0x10,
  9732. 0x8000000: 0x84000,
  9733. 0x9000000: 0x40004010,
  9734. 0xa000000: 0x40000000,
  9735. 0xb000000: 0x84010,
  9736. 0xc000000: 0x80010,
  9737. 0xd000000: 0x0,
  9738. 0xe000000: 0x4010,
  9739. 0xf000000: 0x40080000,
  9740. 0x800000: 0x40004000,
  9741. 0x1800000: 0x84010,
  9742. 0x2800000: 0x10,
  9743. 0x3800000: 0x40004010,
  9744. 0x4800000: 0x40084010,
  9745. 0x5800000: 0x40000000,
  9746. 0x6800000: 0x80000,
  9747. 0x7800000: 0x40080010,
  9748. 0x8800000: 0x80010,
  9749. 0x9800000: 0x0,
  9750. 0xa800000: 0x4000,
  9751. 0xb800000: 0x40080000,
  9752. 0xc800000: 0x40000010,
  9753. 0xd800000: 0x84000,
  9754. 0xe800000: 0x40084000,
  9755. 0xf800000: 0x4010,
  9756. 0x10000000: 0x0,
  9757. 0x11000000: 0x40080010,
  9758. 0x12000000: 0x40004010,
  9759. 0x13000000: 0x40084000,
  9760. 0x14000000: 0x40080000,
  9761. 0x15000000: 0x10,
  9762. 0x16000000: 0x84010,
  9763. 0x17000000: 0x4000,
  9764. 0x18000000: 0x4010,
  9765. 0x19000000: 0x80000,
  9766. 0x1a000000: 0x80010,
  9767. 0x1b000000: 0x40000010,
  9768. 0x1c000000: 0x84000,
  9769. 0x1d000000: 0x40004000,
  9770. 0x1e000000: 0x40000000,
  9771. 0x1f000000: 0x40084010,
  9772. 0x10800000: 0x84010,
  9773. 0x11800000: 0x80000,
  9774. 0x12800000: 0x40080000,
  9775. 0x13800000: 0x4000,
  9776. 0x14800000: 0x40004000,
  9777. 0x15800000: 0x40084010,
  9778. 0x16800000: 0x10,
  9779. 0x17800000: 0x40000000,
  9780. 0x18800000: 0x40084000,
  9781. 0x19800000: 0x40000010,
  9782. 0x1a800000: 0x40004010,
  9783. 0x1b800000: 0x80010,
  9784. 0x1c800000: 0x0,
  9785. 0x1d800000: 0x4010,
  9786. 0x1e800000: 0x40080010,
  9787. 0x1f800000: 0x84000
  9788. }, {
  9789. 0x0: 0x104,
  9790. 0x100000: 0x0,
  9791. 0x200000: 0x4000100,
  9792. 0x300000: 0x10104,
  9793. 0x400000: 0x10004,
  9794. 0x500000: 0x4000004,
  9795. 0x600000: 0x4010104,
  9796. 0x700000: 0x4010000,
  9797. 0x800000: 0x4000000,
  9798. 0x900000: 0x4010100,
  9799. 0xa00000: 0x10100,
  9800. 0xb00000: 0x4010004,
  9801. 0xc00000: 0x4000104,
  9802. 0xd00000: 0x10000,
  9803. 0xe00000: 0x4,
  9804. 0xf00000: 0x100,
  9805. 0x80000: 0x4010100,
  9806. 0x180000: 0x4010004,
  9807. 0x280000: 0x0,
  9808. 0x380000: 0x4000100,
  9809. 0x480000: 0x4000004,
  9810. 0x580000: 0x10000,
  9811. 0x680000: 0x10004,
  9812. 0x780000: 0x104,
  9813. 0x880000: 0x4,
  9814. 0x980000: 0x100,
  9815. 0xa80000: 0x4010000,
  9816. 0xb80000: 0x10104,
  9817. 0xc80000: 0x10100,
  9818. 0xd80000: 0x4000104,
  9819. 0xe80000: 0x4010104,
  9820. 0xf80000: 0x4000000,
  9821. 0x1000000: 0x4010100,
  9822. 0x1100000: 0x10004,
  9823. 0x1200000: 0x10000,
  9824. 0x1300000: 0x4000100,
  9825. 0x1400000: 0x100,
  9826. 0x1500000: 0x4010104,
  9827. 0x1600000: 0x4000004,
  9828. 0x1700000: 0x0,
  9829. 0x1800000: 0x4000104,
  9830. 0x1900000: 0x4000000,
  9831. 0x1a00000: 0x4,
  9832. 0x1b00000: 0x10100,
  9833. 0x1c00000: 0x4010000,
  9834. 0x1d00000: 0x104,
  9835. 0x1e00000: 0x10104,
  9836. 0x1f00000: 0x4010004,
  9837. 0x1080000: 0x4000000,
  9838. 0x1180000: 0x104,
  9839. 0x1280000: 0x4010100,
  9840. 0x1380000: 0x0,
  9841. 0x1480000: 0x10004,
  9842. 0x1580000: 0x4000100,
  9843. 0x1680000: 0x100,
  9844. 0x1780000: 0x4010004,
  9845. 0x1880000: 0x10000,
  9846. 0x1980000: 0x4010104,
  9847. 0x1a80000: 0x10104,
  9848. 0x1b80000: 0x4000004,
  9849. 0x1c80000: 0x4000104,
  9850. 0x1d80000: 0x4010000,
  9851. 0x1e80000: 0x4,
  9852. 0x1f80000: 0x10100
  9853. }, {
  9854. 0x0: 0x80401000,
  9855. 0x10000: 0x80001040,
  9856. 0x20000: 0x401040,
  9857. 0x30000: 0x80400000,
  9858. 0x40000: 0x0,
  9859. 0x50000: 0x401000,
  9860. 0x60000: 0x80000040,
  9861. 0x70000: 0x400040,
  9862. 0x80000: 0x80000000,
  9863. 0x90000: 0x400000,
  9864. 0xa0000: 0x40,
  9865. 0xb0000: 0x80001000,
  9866. 0xc0000: 0x80400040,
  9867. 0xd0000: 0x1040,
  9868. 0xe0000: 0x1000,
  9869. 0xf0000: 0x80401040,
  9870. 0x8000: 0x80001040,
  9871. 0x18000: 0x40,
  9872. 0x28000: 0x80400040,
  9873. 0x38000: 0x80001000,
  9874. 0x48000: 0x401000,
  9875. 0x58000: 0x80401040,
  9876. 0x68000: 0x0,
  9877. 0x78000: 0x80400000,
  9878. 0x88000: 0x1000,
  9879. 0x98000: 0x80401000,
  9880. 0xa8000: 0x400000,
  9881. 0xb8000: 0x1040,
  9882. 0xc8000: 0x80000000,
  9883. 0xd8000: 0x400040,
  9884. 0xe8000: 0x401040,
  9885. 0xf8000: 0x80000040,
  9886. 0x100000: 0x400040,
  9887. 0x110000: 0x401000,
  9888. 0x120000: 0x80000040,
  9889. 0x130000: 0x0,
  9890. 0x140000: 0x1040,
  9891. 0x150000: 0x80400040,
  9892. 0x160000: 0x80401000,
  9893. 0x170000: 0x80001040,
  9894. 0x180000: 0x80401040,
  9895. 0x190000: 0x80000000,
  9896. 0x1a0000: 0x80400000,
  9897. 0x1b0000: 0x401040,
  9898. 0x1c0000: 0x80001000,
  9899. 0x1d0000: 0x400000,
  9900. 0x1e0000: 0x40,
  9901. 0x1f0000: 0x1000,
  9902. 0x108000: 0x80400000,
  9903. 0x118000: 0x80401040,
  9904. 0x128000: 0x0,
  9905. 0x138000: 0x401000,
  9906. 0x148000: 0x400040,
  9907. 0x158000: 0x80000000,
  9908. 0x168000: 0x80001040,
  9909. 0x178000: 0x40,
  9910. 0x188000: 0x80000040,
  9911. 0x198000: 0x1000,
  9912. 0x1a8000: 0x80001000,
  9913. 0x1b8000: 0x80400040,
  9914. 0x1c8000: 0x1040,
  9915. 0x1d8000: 0x80401000,
  9916. 0x1e8000: 0x400000,
  9917. 0x1f8000: 0x401040
  9918. }, {
  9919. 0x0: 0x80,
  9920. 0x1000: 0x1040000,
  9921. 0x2000: 0x40000,
  9922. 0x3000: 0x20000000,
  9923. 0x4000: 0x20040080,
  9924. 0x5000: 0x1000080,
  9925. 0x6000: 0x21000080,
  9926. 0x7000: 0x40080,
  9927. 0x8000: 0x1000000,
  9928. 0x9000: 0x20040000,
  9929. 0xa000: 0x20000080,
  9930. 0xb000: 0x21040080,
  9931. 0xc000: 0x21040000,
  9932. 0xd000: 0x0,
  9933. 0xe000: 0x1040080,
  9934. 0xf000: 0x21000000,
  9935. 0x800: 0x1040080,
  9936. 0x1800: 0x21000080,
  9937. 0x2800: 0x80,
  9938. 0x3800: 0x1040000,
  9939. 0x4800: 0x40000,
  9940. 0x5800: 0x20040080,
  9941. 0x6800: 0x21040000,
  9942. 0x7800: 0x20000000,
  9943. 0x8800: 0x20040000,
  9944. 0x9800: 0x0,
  9945. 0xa800: 0x21040080,
  9946. 0xb800: 0x1000080,
  9947. 0xc800: 0x20000080,
  9948. 0xd800: 0x21000000,
  9949. 0xe800: 0x1000000,
  9950. 0xf800: 0x40080,
  9951. 0x10000: 0x40000,
  9952. 0x11000: 0x80,
  9953. 0x12000: 0x20000000,
  9954. 0x13000: 0x21000080,
  9955. 0x14000: 0x1000080,
  9956. 0x15000: 0x21040000,
  9957. 0x16000: 0x20040080,
  9958. 0x17000: 0x1000000,
  9959. 0x18000: 0x21040080,
  9960. 0x19000: 0x21000000,
  9961. 0x1a000: 0x1040000,
  9962. 0x1b000: 0x20040000,
  9963. 0x1c000: 0x40080,
  9964. 0x1d000: 0x20000080,
  9965. 0x1e000: 0x0,
  9966. 0x1f000: 0x1040080,
  9967. 0x10800: 0x21000080,
  9968. 0x11800: 0x1000000,
  9969. 0x12800: 0x1040000,
  9970. 0x13800: 0x20040080,
  9971. 0x14800: 0x20000000,
  9972. 0x15800: 0x1040080,
  9973. 0x16800: 0x80,
  9974. 0x17800: 0x21040000,
  9975. 0x18800: 0x40080,
  9976. 0x19800: 0x21040080,
  9977. 0x1a800: 0x0,
  9978. 0x1b800: 0x21000000,
  9979. 0x1c800: 0x1000080,
  9980. 0x1d800: 0x40000,
  9981. 0x1e800: 0x20040000,
  9982. 0x1f800: 0x20000080
  9983. }, {
  9984. 0x0: 0x10000008,
  9985. 0x100: 0x2000,
  9986. 0x200: 0x10200000,
  9987. 0x300: 0x10202008,
  9988. 0x400: 0x10002000,
  9989. 0x500: 0x200000,
  9990. 0x600: 0x200008,
  9991. 0x700: 0x10000000,
  9992. 0x800: 0x0,
  9993. 0x900: 0x10002008,
  9994. 0xa00: 0x202000,
  9995. 0xb00: 0x8,
  9996. 0xc00: 0x10200008,
  9997. 0xd00: 0x202008,
  9998. 0xe00: 0x2008,
  9999. 0xf00: 0x10202000,
  10000. 0x80: 0x10200000,
  10001. 0x180: 0x10202008,
  10002. 0x280: 0x8,
  10003. 0x380: 0x200000,
  10004. 0x480: 0x202008,
  10005. 0x580: 0x10000008,
  10006. 0x680: 0x10002000,
  10007. 0x780: 0x2008,
  10008. 0x880: 0x200008,
  10009. 0x980: 0x2000,
  10010. 0xa80: 0x10002008,
  10011. 0xb80: 0x10200008,
  10012. 0xc80: 0x0,
  10013. 0xd80: 0x10202000,
  10014. 0xe80: 0x202000,
  10015. 0xf80: 0x10000000,
  10016. 0x1000: 0x10002000,
  10017. 0x1100: 0x10200008,
  10018. 0x1200: 0x10202008,
  10019. 0x1300: 0x2008,
  10020. 0x1400: 0x200000,
  10021. 0x1500: 0x10000000,
  10022. 0x1600: 0x10000008,
  10023. 0x1700: 0x202000,
  10024. 0x1800: 0x202008,
  10025. 0x1900: 0x0,
  10026. 0x1a00: 0x8,
  10027. 0x1b00: 0x10200000,
  10028. 0x1c00: 0x2000,
  10029. 0x1d00: 0x10002008,
  10030. 0x1e00: 0x10202000,
  10031. 0x1f00: 0x200008,
  10032. 0x1080: 0x8,
  10033. 0x1180: 0x202000,
  10034. 0x1280: 0x200000,
  10035. 0x1380: 0x10000008,
  10036. 0x1480: 0x10002000,
  10037. 0x1580: 0x2008,
  10038. 0x1680: 0x10202008,
  10039. 0x1780: 0x10200000,
  10040. 0x1880: 0x10202000,
  10041. 0x1980: 0x10200008,
  10042. 0x1a80: 0x2000,
  10043. 0x1b80: 0x202008,
  10044. 0x1c80: 0x200008,
  10045. 0x1d80: 0x0,
  10046. 0x1e80: 0x10000000,
  10047. 0x1f80: 0x10002008
  10048. }, {
  10049. 0x0: 0x100000,
  10050. 0x10: 0x2000401,
  10051. 0x20: 0x400,
  10052. 0x30: 0x100401,
  10053. 0x40: 0x2100401,
  10054. 0x50: 0x0,
  10055. 0x60: 0x1,
  10056. 0x70: 0x2100001,
  10057. 0x80: 0x2000400,
  10058. 0x90: 0x100001,
  10059. 0xa0: 0x2000001,
  10060. 0xb0: 0x2100400,
  10061. 0xc0: 0x2100000,
  10062. 0xd0: 0x401,
  10063. 0xe0: 0x100400,
  10064. 0xf0: 0x2000000,
  10065. 0x8: 0x2100001,
  10066. 0x18: 0x0,
  10067. 0x28: 0x2000401,
  10068. 0x38: 0x2100400,
  10069. 0x48: 0x100000,
  10070. 0x58: 0x2000001,
  10071. 0x68: 0x2000000,
  10072. 0x78: 0x401,
  10073. 0x88: 0x100401,
  10074. 0x98: 0x2000400,
  10075. 0xa8: 0x2100000,
  10076. 0xb8: 0x100001,
  10077. 0xc8: 0x400,
  10078. 0xd8: 0x2100401,
  10079. 0xe8: 0x1,
  10080. 0xf8: 0x100400,
  10081. 0x100: 0x2000000,
  10082. 0x110: 0x100000,
  10083. 0x120: 0x2000401,
  10084. 0x130: 0x2100001,
  10085. 0x140: 0x100001,
  10086. 0x150: 0x2000400,
  10087. 0x160: 0x2100400,
  10088. 0x170: 0x100401,
  10089. 0x180: 0x401,
  10090. 0x190: 0x2100401,
  10091. 0x1a0: 0x100400,
  10092. 0x1b0: 0x1,
  10093. 0x1c0: 0x0,
  10094. 0x1d0: 0x2100000,
  10095. 0x1e0: 0x2000001,
  10096. 0x1f0: 0x400,
  10097. 0x108: 0x100400,
  10098. 0x118: 0x2000401,
  10099. 0x128: 0x2100001,
  10100. 0x138: 0x1,
  10101. 0x148: 0x2000000,
  10102. 0x158: 0x100000,
  10103. 0x168: 0x401,
  10104. 0x178: 0x2100400,
  10105. 0x188: 0x2000001,
  10106. 0x198: 0x2100000,
  10107. 0x1a8: 0x0,
  10108. 0x1b8: 0x2100401,
  10109. 0x1c8: 0x100401,
  10110. 0x1d8: 0x400,
  10111. 0x1e8: 0x2000400,
  10112. 0x1f8: 0x100001
  10113. }, {
  10114. 0x0: 0x8000820,
  10115. 0x1: 0x20000,
  10116. 0x2: 0x8000000,
  10117. 0x3: 0x20,
  10118. 0x4: 0x20020,
  10119. 0x5: 0x8020820,
  10120. 0x6: 0x8020800,
  10121. 0x7: 0x800,
  10122. 0x8: 0x8020000,
  10123. 0x9: 0x8000800,
  10124. 0xa: 0x20800,
  10125. 0xb: 0x8020020,
  10126. 0xc: 0x820,
  10127. 0xd: 0x0,
  10128. 0xe: 0x8000020,
  10129. 0xf: 0x20820,
  10130. 0x80000000: 0x800,
  10131. 0x80000001: 0x8020820,
  10132. 0x80000002: 0x8000820,
  10133. 0x80000003: 0x8000000,
  10134. 0x80000004: 0x8020000,
  10135. 0x80000005: 0x20800,
  10136. 0x80000006: 0x20820,
  10137. 0x80000007: 0x20,
  10138. 0x80000008: 0x8000020,
  10139. 0x80000009: 0x820,
  10140. 0x8000000a: 0x20020,
  10141. 0x8000000b: 0x8020800,
  10142. 0x8000000c: 0x0,
  10143. 0x8000000d: 0x8020020,
  10144. 0x8000000e: 0x8000800,
  10145. 0x8000000f: 0x20000,
  10146. 0x10: 0x20820,
  10147. 0x11: 0x8020800,
  10148. 0x12: 0x20,
  10149. 0x13: 0x800,
  10150. 0x14: 0x8000800,
  10151. 0x15: 0x8000020,
  10152. 0x16: 0x8020020,
  10153. 0x17: 0x20000,
  10154. 0x18: 0x0,
  10155. 0x19: 0x20020,
  10156. 0x1a: 0x8020000,
  10157. 0x1b: 0x8000820,
  10158. 0x1c: 0x8020820,
  10159. 0x1d: 0x20800,
  10160. 0x1e: 0x820,
  10161. 0x1f: 0x8000000,
  10162. 0x80000010: 0x20000,
  10163. 0x80000011: 0x800,
  10164. 0x80000012: 0x8020020,
  10165. 0x80000013: 0x20820,
  10166. 0x80000014: 0x20,
  10167. 0x80000015: 0x8020000,
  10168. 0x80000016: 0x8000000,
  10169. 0x80000017: 0x8000820,
  10170. 0x80000018: 0x8020820,
  10171. 0x80000019: 0x8000020,
  10172. 0x8000001a: 0x8000800,
  10173. 0x8000001b: 0x0,
  10174. 0x8000001c: 0x20800,
  10175. 0x8000001d: 0x820,
  10176. 0x8000001e: 0x20020,
  10177. 0x8000001f: 0x8020800
  10178. }]; // Masks that select the SBOX input
  10179. var SBOX_MASK = [0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f];
  10180. /**
  10181. * DES block cipher algorithm.
  10182. */
  10183. var DES = C_algo.DES = BlockCipher.extend({
  10184. _doReset: function _doReset() {
  10185. // Shortcuts
  10186. var key = this._key;
  10187. var keyWords = key.words; // Select 56 bits according to PC1
  10188. var keyBits = [];
  10189. for (var i = 0; i < 56; i++) {
  10190. var keyBitPos = PC1[i] - 1;
  10191. keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1;
  10192. } // Assemble 16 subkeys
  10193. var subKeys = this._subKeys = [];
  10194. for (var nSubKey = 0; nSubKey < 16; nSubKey++) {
  10195. // Create subkey
  10196. var subKey = subKeys[nSubKey] = []; // Shortcut
  10197. var bitShift = BIT_SHIFTS[nSubKey]; // Select 48 bits according to PC2
  10198. for (var i = 0; i < 24; i++) {
  10199. // Select from the left 28 key bits
  10200. subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6; // Select from the right 28 key bits
  10201. subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
  10202. } // Since each subkey is applied to an expanded 32-bit input,
  10203. // the subkey can be broken into 8 values scaled to 32-bits,
  10204. // which allows the key to be used without expansion
  10205. subKey[0] = subKey[0] << 1 | subKey[0] >>> 31;
  10206. for (var i = 1; i < 7; i++) {
  10207. subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
  10208. }
  10209. subKey[7] = subKey[7] << 5 | subKey[7] >>> 27;
  10210. } // Compute inverse subkeys
  10211. var invSubKeys = this._invSubKeys = [];
  10212. for (var i = 0; i < 16; i++) {
  10213. invSubKeys[i] = subKeys[15 - i];
  10214. }
  10215. },
  10216. encryptBlock: function encryptBlock(M, offset) {
  10217. this._doCryptBlock(M, offset, this._subKeys);
  10218. },
  10219. decryptBlock: function decryptBlock(M, offset) {
  10220. this._doCryptBlock(M, offset, this._invSubKeys);
  10221. },
  10222. _doCryptBlock: function _doCryptBlock(M, offset, subKeys) {
  10223. // Get input
  10224. this._lBlock = M[offset];
  10225. this._rBlock = M[offset + 1]; // Initial permutation
  10226. exchangeLR.call(this, 4, 0x0f0f0f0f);
  10227. exchangeLR.call(this, 16, 0x0000ffff);
  10228. exchangeRL.call(this, 2, 0x33333333);
  10229. exchangeRL.call(this, 8, 0x00ff00ff);
  10230. exchangeLR.call(this, 1, 0x55555555); // Rounds
  10231. for (var round = 0; round < 16; round++) {
  10232. // Shortcuts
  10233. var subKey = subKeys[round];
  10234. var lBlock = this._lBlock;
  10235. var rBlock = this._rBlock; // Feistel function
  10236. var f = 0;
  10237. for (var i = 0; i < 8; i++) {
  10238. f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0];
  10239. }
  10240. this._lBlock = rBlock;
  10241. this._rBlock = lBlock ^ f;
  10242. } // Undo swap from last round
  10243. var t = this._lBlock;
  10244. this._lBlock = this._rBlock;
  10245. this._rBlock = t; // Final permutation
  10246. exchangeLR.call(this, 1, 0x55555555);
  10247. exchangeRL.call(this, 8, 0x00ff00ff);
  10248. exchangeRL.call(this, 2, 0x33333333);
  10249. exchangeLR.call(this, 16, 0x0000ffff);
  10250. exchangeLR.call(this, 4, 0x0f0f0f0f); // Set output
  10251. M[offset] = this._lBlock;
  10252. M[offset + 1] = this._rBlock;
  10253. },
  10254. keySize: 64 / 32,
  10255. ivSize: 64 / 32,
  10256. blockSize: 64 / 32
  10257. }); // Swap bits across the left and right words
  10258. function exchangeLR(offset, mask) {
  10259. var t = (this._lBlock >>> offset ^ this._rBlock) & mask;
  10260. this._rBlock ^= t;
  10261. this._lBlock ^= t << offset;
  10262. }
  10263. function exchangeRL(offset, mask) {
  10264. var t = (this._rBlock >>> offset ^ this._lBlock) & mask;
  10265. this._lBlock ^= t;
  10266. this._rBlock ^= t << offset;
  10267. }
  10268. /**
  10269. * Shortcut functions to the cipher's object interface.
  10270. *
  10271. * @example
  10272. *
  10273. * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg);
  10274. * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg);
  10275. */
  10276. C.DES = BlockCipher._createHelper(DES);
  10277. /**
  10278. * Triple-DES block cipher algorithm.
  10279. */
  10280. var TripleDES = C_algo.TripleDES = BlockCipher.extend({
  10281. _doReset: function _doReset() {
  10282. // Shortcuts
  10283. var key = this._key;
  10284. var keyWords = key.words; // Make sure the key length is valid (64, 128 or >= 192 bit)
  10285. if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) {
  10286. throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');
  10287. } // Extend the key according to the keying options defined in 3DES standard
  10288. var key1 = keyWords.slice(0, 2);
  10289. var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4);
  10290. var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); // Create DES instances
  10291. this._des1 = DES.createEncryptor(WordArray.create(key1));
  10292. this._des2 = DES.createEncryptor(WordArray.create(key2));
  10293. this._des3 = DES.createEncryptor(WordArray.create(key3));
  10294. },
  10295. encryptBlock: function encryptBlock(M, offset) {
  10296. this._des1.encryptBlock(M, offset);
  10297. this._des2.decryptBlock(M, offset);
  10298. this._des3.encryptBlock(M, offset);
  10299. },
  10300. decryptBlock: function decryptBlock(M, offset) {
  10301. this._des3.decryptBlock(M, offset);
  10302. this._des2.encryptBlock(M, offset);
  10303. this._des1.decryptBlock(M, offset);
  10304. },
  10305. keySize: 192 / 32,
  10306. ivSize: 64 / 32,
  10307. blockSize: 64 / 32
  10308. });
  10309. /**
  10310. * Shortcut functions to the cipher's object interface.
  10311. *
  10312. * @example
  10313. *
  10314. * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg);
  10315. * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg);
  10316. */
  10317. C.TripleDES = BlockCipher._createHelper(TripleDES);
  10318. })();
  10319. return CryptoJS.TripleDES;
  10320. });
  10321. /***/ }),
  10322. /***/ 2601:
  10323. /***/ (function(module, exports, __webpack_require__) {
  10324. "use strict";
  10325. __webpack_require__(7042);
  10326. ;
  10327. (function (root, factory) {
  10328. if (true) {
  10329. // CommonJS
  10330. module.exports = exports = factory(__webpack_require__(757));
  10331. } else {}
  10332. })(void 0, function (CryptoJS) {
  10333. (function (undefined) {
  10334. // Shortcuts
  10335. var C = CryptoJS;
  10336. var C_lib = C.lib;
  10337. var Base = C_lib.Base;
  10338. var X32WordArray = C_lib.WordArray;
  10339. /**
  10340. * x64 namespace.
  10341. */
  10342. var C_x64 = C.x64 = {};
  10343. /**
  10344. * A 64-bit word.
  10345. */
  10346. var X64Word = C_x64.Word = Base.extend({
  10347. /**
  10348. * Initializes a newly created 64-bit word.
  10349. *
  10350. * @param {number} high The high 32 bits.
  10351. * @param {number} low The low 32 bits.
  10352. *
  10353. * @example
  10354. *
  10355. * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607);
  10356. */
  10357. init: function init(high, low) {
  10358. this.high = high;
  10359. this.low = low;
  10360. }
  10361. /**
  10362. * Bitwise NOTs this word.
  10363. *
  10364. * @return {X64Word} A new x64-Word object after negating.
  10365. *
  10366. * @example
  10367. *
  10368. * var negated = x64Word.not();
  10369. */
  10370. // not: function () {
  10371. // var high = ~this.high;
  10372. // var low = ~this.low;
  10373. // return X64Word.create(high, low);
  10374. // },
  10375. /**
  10376. * Bitwise ANDs this word with the passed word.
  10377. *
  10378. * @param {X64Word} word The x64-Word to AND with this word.
  10379. *
  10380. * @return {X64Word} A new x64-Word object after ANDing.
  10381. *
  10382. * @example
  10383. *
  10384. * var anded = x64Word.and(anotherX64Word);
  10385. */
  10386. // and: function (word) {
  10387. // var high = this.high & word.high;
  10388. // var low = this.low & word.low;
  10389. // return X64Word.create(high, low);
  10390. // },
  10391. /**
  10392. * Bitwise ORs this word with the passed word.
  10393. *
  10394. * @param {X64Word} word The x64-Word to OR with this word.
  10395. *
  10396. * @return {X64Word} A new x64-Word object after ORing.
  10397. *
  10398. * @example
  10399. *
  10400. * var ored = x64Word.or(anotherX64Word);
  10401. */
  10402. // or: function (word) {
  10403. // var high = this.high | word.high;
  10404. // var low = this.low | word.low;
  10405. // return X64Word.create(high, low);
  10406. // },
  10407. /**
  10408. * Bitwise XORs this word with the passed word.
  10409. *
  10410. * @param {X64Word} word The x64-Word to XOR with this word.
  10411. *
  10412. * @return {X64Word} A new x64-Word object after XORing.
  10413. *
  10414. * @example
  10415. *
  10416. * var xored = x64Word.xor(anotherX64Word);
  10417. */
  10418. // xor: function (word) {
  10419. // var high = this.high ^ word.high;
  10420. // var low = this.low ^ word.low;
  10421. // return X64Word.create(high, low);
  10422. // },
  10423. /**
  10424. * Shifts this word n bits to the left.
  10425. *
  10426. * @param {number} n The number of bits to shift.
  10427. *
  10428. * @return {X64Word} A new x64-Word object after shifting.
  10429. *
  10430. * @example
  10431. *
  10432. * var shifted = x64Word.shiftL(25);
  10433. */
  10434. // shiftL: function (n) {
  10435. // if (n < 32) {
  10436. // var high = (this.high << n) | (this.low >>> (32 - n));
  10437. // var low = this.low << n;
  10438. // } else {
  10439. // var high = this.low << (n - 32);
  10440. // var low = 0;
  10441. // }
  10442. // return X64Word.create(high, low);
  10443. // },
  10444. /**
  10445. * Shifts this word n bits to the right.
  10446. *
  10447. * @param {number} n The number of bits to shift.
  10448. *
  10449. * @return {X64Word} A new x64-Word object after shifting.
  10450. *
  10451. * @example
  10452. *
  10453. * var shifted = x64Word.shiftR(7);
  10454. */
  10455. // shiftR: function (n) {
  10456. // if (n < 32) {
  10457. // var low = (this.low >>> n) | (this.high << (32 - n));
  10458. // var high = this.high >>> n;
  10459. // } else {
  10460. // var low = this.high >>> (n - 32);
  10461. // var high = 0;
  10462. // }
  10463. // return X64Word.create(high, low);
  10464. // },
  10465. /**
  10466. * Rotates this word n bits to the left.
  10467. *
  10468. * @param {number} n The number of bits to rotate.
  10469. *
  10470. * @return {X64Word} A new x64-Word object after rotating.
  10471. *
  10472. * @example
  10473. *
  10474. * var rotated = x64Word.rotL(25);
  10475. */
  10476. // rotL: function (n) {
  10477. // return this.shiftL(n).or(this.shiftR(64 - n));
  10478. // },
  10479. /**
  10480. * Rotates this word n bits to the right.
  10481. *
  10482. * @param {number} n The number of bits to rotate.
  10483. *
  10484. * @return {X64Word} A new x64-Word object after rotating.
  10485. *
  10486. * @example
  10487. *
  10488. * var rotated = x64Word.rotR(7);
  10489. */
  10490. // rotR: function (n) {
  10491. // return this.shiftR(n).or(this.shiftL(64 - n));
  10492. // },
  10493. /**
  10494. * Adds this word with the passed word.
  10495. *
  10496. * @param {X64Word} word The x64-Word to add with this word.
  10497. *
  10498. * @return {X64Word} A new x64-Word object after adding.
  10499. *
  10500. * @example
  10501. *
  10502. * var added = x64Word.add(anotherX64Word);
  10503. */
  10504. // add: function (word) {
  10505. // var low = (this.low + word.low) | 0;
  10506. // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0;
  10507. // var high = (this.high + word.high + carry) | 0;
  10508. // return X64Word.create(high, low);
  10509. // }
  10510. });
  10511. /**
  10512. * An array of 64-bit words.
  10513. *
  10514. * @property {Array} words The array of CryptoJS.x64.Word objects.
  10515. * @property {number} sigBytes The number of significant bytes in this word array.
  10516. */
  10517. var X64WordArray = C_x64.WordArray = Base.extend({
  10518. /**
  10519. * Initializes a newly created word array.
  10520. *
  10521. * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects.
  10522. * @param {number} sigBytes (Optional) The number of significant bytes in the words.
  10523. *
  10524. * @example
  10525. *
  10526. * var wordArray = CryptoJS.x64.WordArray.create();
  10527. *
  10528. * var wordArray = CryptoJS.x64.WordArray.create([
  10529. * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
  10530. * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
  10531. * ]);
  10532. *
  10533. * var wordArray = CryptoJS.x64.WordArray.create([
  10534. * CryptoJS.x64.Word.create(0x00010203, 0x04050607),
  10535. * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f)
  10536. * ], 10);
  10537. */
  10538. init: function init(words, sigBytes) {
  10539. words = this.words = words || [];
  10540. if (sigBytes != undefined) {
  10541. this.sigBytes = sigBytes;
  10542. } else {
  10543. this.sigBytes = words.length * 8;
  10544. }
  10545. },
  10546. /**
  10547. * Converts this 64-bit word array to a 32-bit word array.
  10548. *
  10549. * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
  10550. *
  10551. * @example
  10552. *
  10553. * var x32WordArray = x64WordArray.toX32();
  10554. */
  10555. toX32: function toX32() {
  10556. // Shortcuts
  10557. var x64Words = this.words;
  10558. var x64WordsLength = x64Words.length; // Convert
  10559. var x32Words = [];
  10560. for (var i = 0; i < x64WordsLength; i++) {
  10561. var x64Word = x64Words[i];
  10562. x32Words.push(x64Word.high);
  10563. x32Words.push(x64Word.low);
  10564. }
  10565. return X32WordArray.create(x32Words, this.sigBytes);
  10566. },
  10567. /**
  10568. * Creates a copy of this word array.
  10569. *
  10570. * @return {X64WordArray} The clone.
  10571. *
  10572. * @example
  10573. *
  10574. * var clone = x64WordArray.clone();
  10575. */
  10576. clone: function clone() {
  10577. var clone = Base.clone.call(this); // Clone "words" array
  10578. var words = clone.words = this.words.slice(0); // Clone each X64Word object
  10579. var wordsLength = words.length;
  10580. for (var i = 0; i < wordsLength; i++) {
  10581. words[i] = words[i].clone();
  10582. }
  10583. return clone;
  10584. }
  10585. });
  10586. })();
  10587. return CryptoJS;
  10588. });
  10589. /***/ }),
  10590. /***/ 9811:
  10591. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  10592. "use strict";
  10593. __webpack_require__(8309);
  10594. __webpack_require__(1038);
  10595. __webpack_require__(5666);
  10596. __webpack_require__(4916);
  10597. __webpack_require__(4723);
  10598. __webpack_require__(2165);
  10599. __webpack_require__(6992);
  10600. __webpack_require__(1539);
  10601. __webpack_require__(8783);
  10602. __webpack_require__(3948);
  10603. __webpack_require__(2526);
  10604. __webpack_require__(1817);
  10605. __webpack_require__(7042);
  10606. 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."); }
  10607. 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); }
  10608. 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; }
  10609. var INITIAL_STATE = 1;
  10610. var FAIL_STATE = 0;
  10611. /**
  10612. * A StateMachine represents a deterministic finite automaton.
  10613. * It can perform matches over a sequence of values, similar to a regular expression.
  10614. */
  10615. var StateMachine = /*#__PURE__*/function () {
  10616. function StateMachine(dfa) {
  10617. this.stateTable = dfa.stateTable;
  10618. this.accepting = dfa.accepting;
  10619. this.tags = dfa.tags;
  10620. }
  10621. /**
  10622. * Returns an iterable object that yields pattern matches over the input sequence.
  10623. * Matches are of the form [startIndex, endIndex, tags].
  10624. */
  10625. var _proto = StateMachine.prototype;
  10626. _proto.match = function match(str) {
  10627. var _ref;
  10628. var self = this;
  10629. return _ref = {}, _ref[Symbol.iterator] = /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
  10630. var state, startRun, lastAccepting, lastState, p, c;
  10631. return regeneratorRuntime.wrap(function _callee$(_context) {
  10632. while (1) {
  10633. switch (_context.prev = _context.next) {
  10634. case 0:
  10635. state = INITIAL_STATE;
  10636. startRun = null;
  10637. lastAccepting = null;
  10638. lastState = null;
  10639. p = 0;
  10640. case 5:
  10641. if (!(p < str.length)) {
  10642. _context.next = 21;
  10643. break;
  10644. }
  10645. c = str[p];
  10646. lastState = state;
  10647. state = self.stateTable[state][c];
  10648. if (!(state === FAIL_STATE)) {
  10649. _context.next = 15;
  10650. break;
  10651. }
  10652. if (!(startRun != null && lastAccepting != null && lastAccepting >= startRun)) {
  10653. _context.next = 13;
  10654. break;
  10655. }
  10656. _context.next = 13;
  10657. return [startRun, lastAccepting, self.tags[lastState]];
  10658. case 13:
  10659. // reset the state as if we started over from the initial state
  10660. state = self.stateTable[INITIAL_STATE][c];
  10661. startRun = null;
  10662. case 15:
  10663. // start a run if not in the failure state
  10664. if (state !== FAIL_STATE && startRun == null) {
  10665. startRun = p;
  10666. } // if accepting, mark the potential match end
  10667. if (self.accepting[state]) {
  10668. lastAccepting = p;
  10669. } // reset the state to the initial state if we get into the failure state
  10670. if (state === FAIL_STATE) {
  10671. state = INITIAL_STATE;
  10672. }
  10673. case 18:
  10674. p++;
  10675. _context.next = 5;
  10676. break;
  10677. case 21:
  10678. if (!(startRun != null && lastAccepting != null && lastAccepting >= startRun)) {
  10679. _context.next = 24;
  10680. break;
  10681. }
  10682. _context.next = 24;
  10683. return [startRun, lastAccepting, self.tags[state]];
  10684. case 24:
  10685. case "end":
  10686. return _context.stop();
  10687. }
  10688. }
  10689. }, _callee);
  10690. }), _ref;
  10691. }
  10692. /**
  10693. * For each match over the input sequence, action functions matching
  10694. * the tag definitions in the input pattern are called with the startIndex,
  10695. * endIndex, and sub-match sequence.
  10696. */
  10697. ;
  10698. _proto.apply = function apply(str, actions) {
  10699. for (var _iterator = _createForOfIteratorHelperLoose(this.match(str)), _step; !(_step = _iterator()).done;) {
  10700. var _step$value = _step.value,
  10701. start = _step$value[0],
  10702. end = _step$value[1],
  10703. tags = _step$value[2];
  10704. for (var _iterator2 = _createForOfIteratorHelperLoose(tags), _step2; !(_step2 = _iterator2()).done;) {
  10705. var tag = _step2.value;
  10706. if (typeof actions[tag] === 'function') {
  10707. actions[tag](start, end, str.slice(start, end + 1));
  10708. }
  10709. }
  10710. }
  10711. };
  10712. return StateMachine;
  10713. }();
  10714. module.exports = StateMachine;
  10715. /***/ }),
  10716. /***/ 8478:
  10717. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  10718. "use strict";
  10719. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  10720. __webpack_require__(7042);
  10721. __webpack_require__(6699);
  10722. /*
  10723. * MIT LICENSE
  10724. * Copyright (c) 2011 Devon Govett
  10725. *
  10726. * Permission is hereby granted, free of charge, to any person obtaining a copy of this
  10727. * software and associated documentation files (the "Software"), to deal in the Software
  10728. * without restriction, including without limitation the rights to use, copy, modify, merge,
  10729. * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
  10730. * to whom the Software is furnished to do so, subject to the following conditions:
  10731. *
  10732. * The above copyright notice and this permission notice shall be included in all copies or
  10733. * substantial portions of the Software.
  10734. *
  10735. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
  10736. * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  10737. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  10738. * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  10739. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  10740. */
  10741. var fs = __webpack_require__(3857);
  10742. var zlib = __webpack_require__(2635);
  10743. module.exports = /*#__PURE__*/function () {
  10744. PNG.decode = function decode(path, fn) {
  10745. return fs.readFile(path, function (err, file) {
  10746. var png = new PNG(file);
  10747. return png.decode(function (pixels) {
  10748. return fn(pixels);
  10749. });
  10750. });
  10751. };
  10752. PNG.load = function load(path) {
  10753. var file = fs.readFileSync(path);
  10754. return new PNG(file);
  10755. };
  10756. function PNG(data) {
  10757. var i;
  10758. this.data = data;
  10759. this.pos = 8; // Skip the default header
  10760. this.palette = [];
  10761. this.imgData = [];
  10762. this.transparency = {};
  10763. this.text = {};
  10764. while (true) {
  10765. var chunkSize = this.readUInt32();
  10766. var section = '';
  10767. for (i = 0; i < 4; i++) {
  10768. section += String.fromCharCode(this.data[this.pos++]);
  10769. }
  10770. switch (section) {
  10771. case 'IHDR':
  10772. // we can grab interesting values from here (like width, height, etc)
  10773. this.width = this.readUInt32();
  10774. this.height = this.readUInt32();
  10775. this.bits = this.data[this.pos++];
  10776. this.colorType = this.data[this.pos++];
  10777. this.compressionMethod = this.data[this.pos++];
  10778. this.filterMethod = this.data[this.pos++];
  10779. this.interlaceMethod = this.data[this.pos++];
  10780. break;
  10781. case 'PLTE':
  10782. this.palette = this.read(chunkSize);
  10783. break;
  10784. case 'IDAT':
  10785. for (i = 0; i < chunkSize; i++) {
  10786. this.imgData.push(this.data[this.pos++]);
  10787. }
  10788. break;
  10789. case 'tRNS':
  10790. // This chunk can only occur once and it must occur after the
  10791. // PLTE chunk and before the IDAT chunk.
  10792. this.transparency = {};
  10793. switch (this.colorType) {
  10794. case 3:
  10795. // Indexed color, RGB. Each byte in this chunk is an alpha for
  10796. // the palette index in the PLTE ("palette") chunk up until the
  10797. // last non-opaque entry. Set up an array, stretching over all
  10798. // palette entries which will be 0 (opaque) or 1 (transparent).
  10799. this.transparency.indexed = this.read(chunkSize);
  10800. var short = 255 - this.transparency.indexed.length;
  10801. if (short > 0) {
  10802. for (i = 0; i < short; i++) {
  10803. this.transparency.indexed.push(255);
  10804. }
  10805. }
  10806. break;
  10807. case 0:
  10808. // Greyscale. Corresponding to entries in the PLTE chunk.
  10809. // Grey is two bytes, range 0 .. (2 ^ bit-depth) - 1
  10810. this.transparency.grayscale = this.read(chunkSize)[0];
  10811. break;
  10812. case 2:
  10813. // True color with proper alpha channel.
  10814. this.transparency.rgb = this.read(chunkSize);
  10815. break;
  10816. }
  10817. break;
  10818. case 'tEXt':
  10819. var text = this.read(chunkSize);
  10820. var index = text.indexOf(0);
  10821. var key = String.fromCharCode.apply(String, text.slice(0, index));
  10822. this.text[key] = String.fromCharCode.apply(String, text.slice(index + 1));
  10823. break;
  10824. case 'IEND':
  10825. // we've got everything we need!
  10826. switch (this.colorType) {
  10827. case 0:
  10828. case 3:
  10829. case 4:
  10830. this.colors = 1;
  10831. break;
  10832. case 2:
  10833. case 6:
  10834. this.colors = 3;
  10835. break;
  10836. }
  10837. this.hasAlphaChannel = [4, 6].includes(this.colorType);
  10838. var colors = this.colors + (this.hasAlphaChannel ? 1 : 0);
  10839. this.pixelBitlength = this.bits * colors;
  10840. switch (this.colors) {
  10841. case 1:
  10842. this.colorSpace = 'DeviceGray';
  10843. break;
  10844. case 3:
  10845. this.colorSpace = 'DeviceRGB';
  10846. break;
  10847. }
  10848. this.imgData = new Buffer(this.imgData);
  10849. return;
  10850. break;
  10851. default:
  10852. // unknown (or unimportant) section, skip it
  10853. this.pos += chunkSize;
  10854. }
  10855. this.pos += 4; // Skip the CRC
  10856. if (this.pos > this.data.length) {
  10857. throw new Error('Incomplete or corrupt PNG file');
  10858. }
  10859. }
  10860. }
  10861. var _proto = PNG.prototype;
  10862. _proto.read = function read(bytes) {
  10863. var result = new Array(bytes);
  10864. for (var i = 0; i < bytes; i++) {
  10865. result[i] = this.data[this.pos++];
  10866. }
  10867. return result;
  10868. };
  10869. _proto.readUInt32 = function readUInt32() {
  10870. var b1 = this.data[this.pos++] << 24;
  10871. var b2 = this.data[this.pos++] << 16;
  10872. var b3 = this.data[this.pos++] << 8;
  10873. var b4 = this.data[this.pos++];
  10874. return b1 | b2 | b3 | b4;
  10875. };
  10876. _proto.readUInt16 = function readUInt16() {
  10877. var b1 = this.data[this.pos++] << 8;
  10878. var b2 = this.data[this.pos++];
  10879. return b1 | b2;
  10880. };
  10881. _proto.decodePixels = function decodePixels(fn) {
  10882. var _this = this;
  10883. return zlib.inflate(this.imgData, function (err, data) {
  10884. if (err) {
  10885. throw err;
  10886. }
  10887. var width = _this.width,
  10888. height = _this.height;
  10889. var pixelBytes = _this.pixelBitlength / 8;
  10890. var pixels = new Buffer(width * height * pixelBytes);
  10891. var length = data.length;
  10892. var pos = 0;
  10893. function pass(x0, y0, dx, dy, singlePass) {
  10894. if (singlePass === void 0) {
  10895. singlePass = false;
  10896. }
  10897. var w = Math.ceil((width - x0) / dx);
  10898. var h = Math.ceil((height - y0) / dy);
  10899. var scanlineLength = pixelBytes * w;
  10900. var buffer = singlePass ? pixels : new Buffer(scanlineLength * h);
  10901. var row = 0;
  10902. var c = 0;
  10903. while (row < h && pos < length) {
  10904. var byte, col, i, left, upper;
  10905. switch (data[pos++]) {
  10906. case 0:
  10907. // None
  10908. for (i = 0; i < scanlineLength; i++) {
  10909. buffer[c++] = data[pos++];
  10910. }
  10911. break;
  10912. case 1:
  10913. // Sub
  10914. for (i = 0; i < scanlineLength; i++) {
  10915. byte = data[pos++];
  10916. left = i < pixelBytes ? 0 : buffer[c - pixelBytes];
  10917. buffer[c++] = (byte + left) % 256;
  10918. }
  10919. break;
  10920. case 2:
  10921. // Up
  10922. for (i = 0; i < scanlineLength; i++) {
  10923. byte = data[pos++];
  10924. col = (i - i % pixelBytes) / pixelBytes;
  10925. upper = row && buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
  10926. buffer[c++] = (upper + byte) % 256;
  10927. }
  10928. break;
  10929. case 3:
  10930. // Average
  10931. for (i = 0; i < scanlineLength; i++) {
  10932. byte = data[pos++];
  10933. col = (i - i % pixelBytes) / pixelBytes;
  10934. left = i < pixelBytes ? 0 : buffer[c - pixelBytes];
  10935. upper = row && buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
  10936. buffer[c++] = (byte + Math.floor((left + upper) / 2)) % 256;
  10937. }
  10938. break;
  10939. case 4:
  10940. // Paeth
  10941. for (i = 0; i < scanlineLength; i++) {
  10942. var paeth, upperLeft;
  10943. byte = data[pos++];
  10944. col = (i - i % pixelBytes) / pixelBytes;
  10945. left = i < pixelBytes ? 0 : buffer[c - pixelBytes];
  10946. if (row === 0) {
  10947. upper = upperLeft = 0;
  10948. } else {
  10949. upper = buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
  10950. upperLeft = col && buffer[(row - 1) * scanlineLength + (col - 1) * pixelBytes + i % pixelBytes];
  10951. }
  10952. var p = left + upper - upperLeft;
  10953. var pa = Math.abs(p - left);
  10954. var pb = Math.abs(p - upper);
  10955. var pc = Math.abs(p - upperLeft);
  10956. if (pa <= pb && pa <= pc) {
  10957. paeth = left;
  10958. } else if (pb <= pc) {
  10959. paeth = upper;
  10960. } else {
  10961. paeth = upperLeft;
  10962. }
  10963. buffer[c++] = (byte + paeth) % 256;
  10964. }
  10965. break;
  10966. default:
  10967. throw new Error("Invalid filter algorithm: " + data[pos - 1]);
  10968. }
  10969. if (!singlePass) {
  10970. var pixelsPos = ((y0 + row * dy) * width + x0) * pixelBytes;
  10971. var bufferPos = row * scanlineLength;
  10972. for (i = 0; i < w; i++) {
  10973. for (var j = 0; j < pixelBytes; j++) {
  10974. pixels[pixelsPos++] = buffer[bufferPos++];
  10975. }
  10976. pixelsPos += (dx - 1) * pixelBytes;
  10977. }
  10978. }
  10979. row++;
  10980. }
  10981. }
  10982. if (_this.interlaceMethod === 1) {
  10983. /*
  10984. 1 6 4 6 2 6 4 6
  10985. 7 7 7 7 7 7 7 7
  10986. 5 6 5 6 5 6 5 6
  10987. 7 7 7 7 7 7 7 7
  10988. 3 6 4 6 3 6 4 6
  10989. 7 7 7 7 7 7 7 7
  10990. 5 6 5 6 5 6 5 6
  10991. 7 7 7 7 7 7 7 7
  10992. */
  10993. pass(0, 0, 8, 8); // 1
  10994. pass(4, 0, 8, 8); // 2
  10995. pass(0, 4, 4, 8); // 3
  10996. pass(2, 0, 4, 4); // 4
  10997. pass(0, 2, 2, 4); // 5
  10998. pass(1, 0, 2, 2); // 6
  10999. pass(0, 1, 1, 2); // 7
  11000. } else {
  11001. pass(0, 0, 1, 1, true);
  11002. }
  11003. return fn(pixels);
  11004. });
  11005. };
  11006. _proto.decodePalette = function decodePalette() {
  11007. var palette = this.palette;
  11008. var length = palette.length;
  11009. var transparency = this.transparency.indexed || [];
  11010. var ret = new Buffer(transparency.length + length);
  11011. var pos = 0;
  11012. var c = 0;
  11013. for (var i = 0; i < length; i += 3) {
  11014. var left;
  11015. ret[pos++] = palette[i];
  11016. ret[pos++] = palette[i + 1];
  11017. ret[pos++] = palette[i + 2];
  11018. ret[pos++] = (left = transparency[c++]) != null ? left : 255;
  11019. }
  11020. return ret;
  11021. };
  11022. _proto.copyToImageData = function copyToImageData(imageData, pixels) {
  11023. var j, k;
  11024. var colors = this.colors;
  11025. var palette = null;
  11026. var alpha = this.hasAlphaChannel;
  11027. if (this.palette.length) {
  11028. palette = this._decodedPalette || (this._decodedPalette = this.decodePalette());
  11029. colors = 4;
  11030. alpha = true;
  11031. }
  11032. var data = imageData.data || imageData;
  11033. var length = data.length;
  11034. var input = palette || pixels;
  11035. var i = j = 0;
  11036. if (colors === 1) {
  11037. while (i < length) {
  11038. k = palette ? pixels[i / 4] * 4 : j;
  11039. var v = input[k++];
  11040. data[i++] = v;
  11041. data[i++] = v;
  11042. data[i++] = v;
  11043. data[i++] = alpha ? input[k++] : 255;
  11044. j = k;
  11045. }
  11046. } else {
  11047. while (i < length) {
  11048. k = palette ? pixels[i / 4] * 4 : j;
  11049. data[i++] = input[k++];
  11050. data[i++] = input[k++];
  11051. data[i++] = input[k++];
  11052. data[i++] = alpha ? input[k++] : 255;
  11053. j = k;
  11054. }
  11055. }
  11056. };
  11057. _proto.decode = function decode(fn) {
  11058. var _this2 = this;
  11059. var ret = new Buffer(this.width * this.height * 4);
  11060. return this.decodePixels(function (pixels) {
  11061. _this2.copyToImageData(ret, pixels);
  11062. return fn(ret);
  11063. });
  11064. };
  11065. return PNG;
  11066. }();
  11067. /***/ }),
  11068. /***/ 1750:
  11069. /***/ (function(module, exports, __webpack_require__) {
  11070. "use strict";
  11071. __webpack_require__(3290);
  11072. /* eslint-disable node/no-deprecated-api */
  11073. var buffer = __webpack_require__(8823);
  11074. var Buffer = buffer.Buffer; // alternative to using Object.keys for old browsers
  11075. function copyProps(src, dst) {
  11076. for (var key in src) {
  11077. dst[key] = src[key];
  11078. }
  11079. }
  11080. if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {
  11081. module.exports = buffer;
  11082. } else {
  11083. // Copy properties from require('buffer')
  11084. copyProps(buffer, exports);
  11085. exports.Buffer = SafeBuffer;
  11086. }
  11087. function SafeBuffer(arg, encodingOrOffset, length) {
  11088. return Buffer(arg, encodingOrOffset, length);
  11089. } // Copy static methods from Buffer
  11090. copyProps(Buffer, SafeBuffer);
  11091. SafeBuffer.from = function (arg, encodingOrOffset, length) {
  11092. if (typeof arg === 'number') {
  11093. throw new TypeError('Argument must not be a number');
  11094. }
  11095. return Buffer(arg, encodingOrOffset, length);
  11096. };
  11097. SafeBuffer.alloc = function (size, fill, encoding) {
  11098. if (typeof size !== 'number') {
  11099. throw new TypeError('Argument must be a number');
  11100. }
  11101. var buf = Buffer(size);
  11102. if (fill !== undefined) {
  11103. if (typeof encoding === 'string') {
  11104. buf.fill(fill, encoding);
  11105. } else {
  11106. buf.fill(fill);
  11107. }
  11108. } else {
  11109. buf.fill(0);
  11110. }
  11111. return buf;
  11112. };
  11113. SafeBuffer.allocUnsafe = function (size) {
  11114. if (typeof size !== 'number') {
  11115. throw new TypeError('Argument must be a number');
  11116. }
  11117. return Buffer(size);
  11118. };
  11119. SafeBuffer.allocUnsafeSlow = function (size) {
  11120. if (typeof size !== 'number') {
  11121. throw new TypeError('Argument must be a number');
  11122. }
  11123. return buffer.SlowBuffer(size);
  11124. };
  11125. /***/ }),
  11126. /***/ 7103:
  11127. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  11128. "use strict";
  11129. /* provided dependency */ var process = __webpack_require__(4155);
  11130. /* eslint-disable node/no-deprecated-api */
  11131. __webpack_require__(8145);
  11132. __webpack_require__(6992);
  11133. __webpack_require__(1539);
  11134. __webpack_require__(2472);
  11135. __webpack_require__(2990);
  11136. __webpack_require__(8927);
  11137. __webpack_require__(3105);
  11138. __webpack_require__(5035);
  11139. __webpack_require__(4345);
  11140. __webpack_require__(7174);
  11141. __webpack_require__(2846);
  11142. __webpack_require__(4731);
  11143. __webpack_require__(7209);
  11144. __webpack_require__(6319);
  11145. __webpack_require__(8867);
  11146. __webpack_require__(7789);
  11147. __webpack_require__(3739);
  11148. __webpack_require__(9368);
  11149. __webpack_require__(4483);
  11150. __webpack_require__(2056);
  11151. __webpack_require__(3462);
  11152. __webpack_require__(678);
  11153. __webpack_require__(7462);
  11154. __webpack_require__(3824);
  11155. __webpack_require__(5021);
  11156. __webpack_require__(2974);
  11157. __webpack_require__(5016);
  11158. __webpack_require__(3290);
  11159. var buffer = __webpack_require__(8823);
  11160. var Buffer = buffer.Buffer;
  11161. var safer = {};
  11162. var key;
  11163. for (key in buffer) {
  11164. if (!buffer.hasOwnProperty(key)) continue;
  11165. if (key === 'SlowBuffer' || key === 'Buffer') continue;
  11166. safer[key] = buffer[key];
  11167. }
  11168. var Safer = safer.Buffer = {};
  11169. for (key in Buffer) {
  11170. if (!Buffer.hasOwnProperty(key)) continue;
  11171. if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue;
  11172. Safer[key] = Buffer[key];
  11173. }
  11174. safer.Buffer.prototype = Buffer.prototype;
  11175. if (!Safer.from || Safer.from === Uint8Array.from) {
  11176. Safer.from = function (value, encodingOrOffset, length) {
  11177. if (typeof value === 'number') {
  11178. throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value);
  11179. }
  11180. if (value && typeof value.length === 'undefined') {
  11181. throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value);
  11182. }
  11183. return Buffer(value, encodingOrOffset, length);
  11184. };
  11185. }
  11186. if (!Safer.alloc) {
  11187. Safer.alloc = function (size, fill, encoding) {
  11188. if (typeof size !== 'number') {
  11189. throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size);
  11190. }
  11191. if (size < 0 || size >= 2 * (1 << 30)) {
  11192. throw new RangeError('The value "' + size + '" is invalid for option "size"');
  11193. }
  11194. var buf = Buffer(size);
  11195. if (!fill || fill.length === 0) {
  11196. buf.fill(0);
  11197. } else if (typeof encoding === 'string') {
  11198. buf.fill(fill, encoding);
  11199. } else {
  11200. buf.fill(fill);
  11201. }
  11202. return buf;
  11203. };
  11204. }
  11205. if (!safer.kStringMaxLength) {
  11206. try {
  11207. safer.kStringMaxLength = process.binding('buffer').kStringMaxLength;
  11208. } catch (e) {// we can't determine kStringMaxLength in environments where process.binding
  11209. // is unsupported, so let's not set it
  11210. }
  11211. }
  11212. if (!safer.constants) {
  11213. safer.constants = {
  11214. MAX_LENGTH: safer.kMaxLength
  11215. };
  11216. if (safer.kStringMaxLength) {
  11217. safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength;
  11218. }
  11219. }
  11220. module.exports = safer;
  11221. /***/ }),
  11222. /***/ 3361:
  11223. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  11224. "use strict";
  11225. __webpack_require__(7941);
  11226. __webpack_require__(2526);
  11227. __webpack_require__(7327);
  11228. __webpack_require__(1539);
  11229. __webpack_require__(5003);
  11230. __webpack_require__(4747);
  11231. __webpack_require__(9337);
  11232. __webpack_require__(7042);
  11233. function ownKeys(object, enumerableOnly) {
  11234. var keys = Object.keys(object);
  11235. if (Object.getOwnPropertySymbols) {
  11236. var symbols = Object.getOwnPropertySymbols(object);
  11237. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  11238. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  11239. });
  11240. keys.push.apply(keys, symbols);
  11241. }
  11242. return keys;
  11243. }
  11244. function _objectSpread(target) {
  11245. for (var i = 1; i < arguments.length; i++) {
  11246. var source = arguments[i] != null ? arguments[i] : {};
  11247. if (i % 2) {
  11248. ownKeys(Object(source), true).forEach(function (key) {
  11249. _defineProperty(target, key, source[key]);
  11250. });
  11251. } else if (Object.getOwnPropertyDescriptors) {
  11252. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  11253. } else {
  11254. ownKeys(Object(source)).forEach(function (key) {
  11255. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  11256. });
  11257. }
  11258. }
  11259. return target;
  11260. }
  11261. function _defineProperty(obj, key, value) {
  11262. if (key in obj) {
  11263. Object.defineProperty(obj, key, {
  11264. value: value,
  11265. enumerable: true,
  11266. configurable: true,
  11267. writable: true
  11268. });
  11269. } else {
  11270. obj[key] = value;
  11271. }
  11272. return obj;
  11273. }
  11274. function _classCallCheck(instance, Constructor) {
  11275. if (!(instance instanceof Constructor)) {
  11276. throw new TypeError("Cannot call a class as a function");
  11277. }
  11278. }
  11279. function _defineProperties(target, props) {
  11280. for (var i = 0; i < props.length; i++) {
  11281. var descriptor = props[i];
  11282. descriptor.enumerable = descriptor.enumerable || false;
  11283. descriptor.configurable = true;
  11284. if ("value" in descriptor) descriptor.writable = true;
  11285. Object.defineProperty(target, descriptor.key, descriptor);
  11286. }
  11287. }
  11288. function _createClass(Constructor, protoProps, staticProps) {
  11289. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  11290. if (staticProps) _defineProperties(Constructor, staticProps);
  11291. return Constructor;
  11292. }
  11293. var _require = __webpack_require__(8823),
  11294. Buffer = _require.Buffer;
  11295. var _require2 = __webpack_require__(9862),
  11296. inspect = _require2.inspect;
  11297. var custom = inspect && inspect.custom || 'inspect';
  11298. function copyBuffer(src, target, offset) {
  11299. Buffer.prototype.copy.call(src, target, offset);
  11300. }
  11301. module.exports = /*#__PURE__*/function () {
  11302. function BufferList() {
  11303. _classCallCheck(this, BufferList);
  11304. this.head = null;
  11305. this.tail = null;
  11306. this.length = 0;
  11307. }
  11308. _createClass(BufferList, [{
  11309. key: "push",
  11310. value: function push(v) {
  11311. var entry = {
  11312. data: v,
  11313. next: null
  11314. };
  11315. if (this.length > 0) this.tail.next = entry;else this.head = entry;
  11316. this.tail = entry;
  11317. ++this.length;
  11318. }
  11319. }, {
  11320. key: "unshift",
  11321. value: function unshift(v) {
  11322. var entry = {
  11323. data: v,
  11324. next: this.head
  11325. };
  11326. if (this.length === 0) this.tail = entry;
  11327. this.head = entry;
  11328. ++this.length;
  11329. }
  11330. }, {
  11331. key: "shift",
  11332. value: function shift() {
  11333. if (this.length === 0) return;
  11334. var ret = this.head.data;
  11335. if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
  11336. --this.length;
  11337. return ret;
  11338. }
  11339. }, {
  11340. key: "clear",
  11341. value: function clear() {
  11342. this.head = this.tail = null;
  11343. this.length = 0;
  11344. }
  11345. }, {
  11346. key: "join",
  11347. value: function join(s) {
  11348. if (this.length === 0) return '';
  11349. var p = this.head;
  11350. var ret = '' + p.data;
  11351. while (p = p.next) {
  11352. ret += s + p.data;
  11353. }
  11354. return ret;
  11355. }
  11356. }, {
  11357. key: "concat",
  11358. value: function concat(n) {
  11359. if (this.length === 0) return Buffer.alloc(0);
  11360. var ret = Buffer.allocUnsafe(n >>> 0);
  11361. var p = this.head;
  11362. var i = 0;
  11363. while (p) {
  11364. copyBuffer(p.data, ret, i);
  11365. i += p.data.length;
  11366. p = p.next;
  11367. }
  11368. return ret;
  11369. } // Consumes a specified amount of bytes or characters from the buffered data.
  11370. }, {
  11371. key: "consume",
  11372. value: function consume(n, hasStrings) {
  11373. var ret;
  11374. if (n < this.head.data.length) {
  11375. // `slice` is the same for buffers and strings.
  11376. ret = this.head.data.slice(0, n);
  11377. this.head.data = this.head.data.slice(n);
  11378. } else if (n === this.head.data.length) {
  11379. // First chunk is a perfect match.
  11380. ret = this.shift();
  11381. } else {
  11382. // Result spans more than one buffer.
  11383. ret = hasStrings ? this._getString(n) : this._getBuffer(n);
  11384. }
  11385. return ret;
  11386. }
  11387. }, {
  11388. key: "first",
  11389. value: function first() {
  11390. return this.head.data;
  11391. } // Consumes a specified amount of characters from the buffered data.
  11392. }, {
  11393. key: "_getString",
  11394. value: function _getString(n) {
  11395. var p = this.head;
  11396. var c = 1;
  11397. var ret = p.data;
  11398. n -= ret.length;
  11399. while (p = p.next) {
  11400. var str = p.data;
  11401. var nb = n > str.length ? str.length : n;
  11402. if (nb === str.length) ret += str;else ret += str.slice(0, n);
  11403. n -= nb;
  11404. if (n === 0) {
  11405. if (nb === str.length) {
  11406. ++c;
  11407. if (p.next) this.head = p.next;else this.head = this.tail = null;
  11408. } else {
  11409. this.head = p;
  11410. p.data = str.slice(nb);
  11411. }
  11412. break;
  11413. }
  11414. ++c;
  11415. }
  11416. this.length -= c;
  11417. return ret;
  11418. } // Consumes a specified amount of bytes from the buffered data.
  11419. }, {
  11420. key: "_getBuffer",
  11421. value: function _getBuffer(n) {
  11422. var ret = Buffer.allocUnsafe(n);
  11423. var p = this.head;
  11424. var c = 1;
  11425. p.data.copy(ret);
  11426. n -= p.data.length;
  11427. while (p = p.next) {
  11428. var buf = p.data;
  11429. var nb = n > buf.length ? buf.length : n;
  11430. buf.copy(ret, ret.length - n, 0, nb);
  11431. n -= nb;
  11432. if (n === 0) {
  11433. if (nb === buf.length) {
  11434. ++c;
  11435. if (p.next) this.head = p.next;else this.head = this.tail = null;
  11436. } else {
  11437. this.head = p;
  11438. p.data = buf.slice(nb);
  11439. }
  11440. break;
  11441. }
  11442. ++c;
  11443. }
  11444. this.length -= c;
  11445. return ret;
  11446. } // Make sure the linked list only shows the minimal necessary information.
  11447. }, {
  11448. key: custom,
  11449. value: function value(_, options) {
  11450. return inspect(this, _objectSpread({}, options, {
  11451. // Only inspect one level.
  11452. depth: 0,
  11453. // It should not recurse.
  11454. customInspect: false
  11455. }));
  11456. }
  11457. }]);
  11458. return BufferList;
  11459. }();
  11460. /***/ }),
  11461. /***/ 4872:
  11462. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  11463. "use strict";
  11464. var __dirname = "/";
  11465. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  11466. Object.defineProperty(exports, "__esModule", ({
  11467. value: true
  11468. }));
  11469. exports["default"] = void 0;
  11470. __webpack_require__(7941);
  11471. __webpack_require__(2526);
  11472. __webpack_require__(7327);
  11473. __webpack_require__(1539);
  11474. __webpack_require__(5003);
  11475. __webpack_require__(4747);
  11476. __webpack_require__(9337);
  11477. __webpack_require__(489);
  11478. __webpack_require__(2419);
  11479. __webpack_require__(1817);
  11480. __webpack_require__(2165);
  11481. __webpack_require__(6992);
  11482. __webpack_require__(8783);
  11483. __webpack_require__(3948);
  11484. __webpack_require__(1038);
  11485. __webpack_require__(7042);
  11486. __webpack_require__(8309);
  11487. __webpack_require__(4916);
  11488. __webpack_require__(2707);
  11489. __webpack_require__(2222);
  11490. __webpack_require__(9600);
  11491. __webpack_require__(9714);
  11492. __webpack_require__(5306);
  11493. __webpack_require__(1249);
  11494. __webpack_require__(9841);
  11495. __webpack_require__(4953);
  11496. __webpack_require__(6977);
  11497. __webpack_require__(6699);
  11498. __webpack_require__(5192);
  11499. __webpack_require__(9653);
  11500. __webpack_require__(3123);
  11501. __webpack_require__(4723);
  11502. __webpack_require__(8734);
  11503. __webpack_require__(2472);
  11504. __webpack_require__(2990);
  11505. __webpack_require__(8927);
  11506. __webpack_require__(3105);
  11507. __webpack_require__(5035);
  11508. __webpack_require__(4345);
  11509. __webpack_require__(7174);
  11510. __webpack_require__(2846);
  11511. __webpack_require__(4731);
  11512. __webpack_require__(7209);
  11513. __webpack_require__(6319);
  11514. __webpack_require__(8867);
  11515. __webpack_require__(7789);
  11516. __webpack_require__(3739);
  11517. __webpack_require__(9368);
  11518. __webpack_require__(4483);
  11519. __webpack_require__(2056);
  11520. __webpack_require__(3462);
  11521. __webpack_require__(678);
  11522. __webpack_require__(7462);
  11523. __webpack_require__(3824);
  11524. __webpack_require__(5021);
  11525. __webpack_require__(2974);
  11526. __webpack_require__(5016);
  11527. __webpack_require__(7803);
  11528. __webpack_require__(3290);
  11529. __webpack_require__(9601);
  11530. __webpack_require__(3210);
  11531. __webpack_require__(9254);
  11532. __webpack_require__(7397);
  11533. var _stream = _interopRequireDefault(__webpack_require__(2830));
  11534. var _zlib = _interopRequireDefault(__webpack_require__(2635));
  11535. var _cryptoJs = _interopRequireDefault(__webpack_require__(5153));
  11536. var _fontkit = _interopRequireDefault(__webpack_require__(1917));
  11537. var _events = __webpack_require__(7187);
  11538. var _linebreak = _interopRequireDefault(__webpack_require__(7337));
  11539. var _pngJs = _interopRequireDefault(__webpack_require__(8478));
  11540. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  11541. var fs = __webpack_require__(3857);
  11542. function _classCallCheck(instance, Constructor) {
  11543. if (!(instance instanceof Constructor)) {
  11544. throw new TypeError("Cannot call a class as a function");
  11545. }
  11546. }
  11547. function _defineProperties(target, props) {
  11548. for (var i = 0; i < props.length; i++) {
  11549. var descriptor = props[i];
  11550. descriptor.enumerable = descriptor.enumerable || false;
  11551. descriptor.configurable = true;
  11552. if ("value" in descriptor) descriptor.writable = true;
  11553. Object.defineProperty(target, descriptor.key, descriptor);
  11554. }
  11555. }
  11556. function _createClass(Constructor, protoProps, staticProps) {
  11557. if (protoProps) _defineProperties(Constructor.prototype, protoProps);
  11558. if (staticProps) _defineProperties(Constructor, staticProps);
  11559. return Constructor;
  11560. }
  11561. function _defineProperty(obj, key, value) {
  11562. if (key in obj) {
  11563. Object.defineProperty(obj, key, {
  11564. value: value,
  11565. enumerable: true,
  11566. configurable: true,
  11567. writable: true
  11568. });
  11569. } else {
  11570. obj[key] = value;
  11571. }
  11572. return obj;
  11573. }
  11574. function ownKeys(object, enumerableOnly) {
  11575. var keys = Object.keys(object);
  11576. if (Object.getOwnPropertySymbols) {
  11577. var symbols = Object.getOwnPropertySymbols(object);
  11578. if (enumerableOnly) symbols = symbols.filter(function (sym) {
  11579. return Object.getOwnPropertyDescriptor(object, sym).enumerable;
  11580. });
  11581. keys.push.apply(keys, symbols);
  11582. }
  11583. return keys;
  11584. }
  11585. function _objectSpread2(target) {
  11586. for (var i = 1; i < arguments.length; i++) {
  11587. var source = arguments[i] != null ? arguments[i] : {};
  11588. if (i % 2) {
  11589. ownKeys(Object(source), true).forEach(function (key) {
  11590. _defineProperty(target, key, source[key]);
  11591. });
  11592. } else if (Object.getOwnPropertyDescriptors) {
  11593. Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
  11594. } else {
  11595. ownKeys(Object(source)).forEach(function (key) {
  11596. Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
  11597. });
  11598. }
  11599. }
  11600. return target;
  11601. }
  11602. function _inherits(subClass, superClass) {
  11603. if (typeof superClass !== "function" && superClass !== null) {
  11604. throw new TypeError("Super expression must either be null or a function");
  11605. }
  11606. subClass.prototype = Object.create(superClass && superClass.prototype, {
  11607. constructor: {
  11608. value: subClass,
  11609. writable: true,
  11610. configurable: true
  11611. }
  11612. });
  11613. if (superClass) _setPrototypeOf(subClass, superClass);
  11614. }
  11615. function _getPrototypeOf(o) {
  11616. _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
  11617. return o.__proto__ || Object.getPrototypeOf(o);
  11618. };
  11619. return _getPrototypeOf(o);
  11620. }
  11621. function _setPrototypeOf(o, p) {
  11622. _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
  11623. o.__proto__ = p;
  11624. return o;
  11625. };
  11626. return _setPrototypeOf(o, p);
  11627. }
  11628. function _isNativeReflectConstruct() {
  11629. if (typeof Reflect === "undefined" || !Reflect.construct) return false;
  11630. if (Reflect.construct.sham) return false;
  11631. if (typeof Proxy === "function") return true;
  11632. try {
  11633. Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
  11634. return true;
  11635. } catch (e) {
  11636. return false;
  11637. }
  11638. }
  11639. function _assertThisInitialized(self) {
  11640. if (self === void 0) {
  11641. throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
  11642. }
  11643. return self;
  11644. }
  11645. function _possibleConstructorReturn(self, call) {
  11646. if (call && (typeof call === "object" || typeof call === "function")) {
  11647. return call;
  11648. }
  11649. return _assertThisInitialized(self);
  11650. }
  11651. function _createSuper(Derived) {
  11652. var hasNativeReflectConstruct = _isNativeReflectConstruct();
  11653. return function _createSuperInternal() {
  11654. var Super = _getPrototypeOf(Derived),
  11655. result;
  11656. if (hasNativeReflectConstruct) {
  11657. var NewTarget = _getPrototypeOf(this).constructor;
  11658. result = Reflect.construct(Super, arguments, NewTarget);
  11659. } else {
  11660. result = Super.apply(this, arguments);
  11661. }
  11662. return _possibleConstructorReturn(this, result);
  11663. };
  11664. }
  11665. function _slicedToArray(arr, i) {
  11666. return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
  11667. }
  11668. function _toConsumableArray(arr) {
  11669. return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
  11670. }
  11671. function _arrayWithoutHoles(arr) {
  11672. if (Array.isArray(arr)) return _arrayLikeToArray(arr);
  11673. }
  11674. function _arrayWithHoles(arr) {
  11675. if (Array.isArray(arr)) return arr;
  11676. }
  11677. function _iterableToArray(iter) {
  11678. if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
  11679. }
  11680. function _iterableToArrayLimit(arr, i) {
  11681. if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
  11682. var _arr = [];
  11683. var _n = true;
  11684. var _d = false;
  11685. var _e = undefined;
  11686. try {
  11687. for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
  11688. _arr.push(_s.value);
  11689. if (i && _arr.length === i) break;
  11690. }
  11691. } catch (err) {
  11692. _d = true;
  11693. _e = err;
  11694. } finally {
  11695. try {
  11696. if (!_n && _i["return"] != null) _i["return"]();
  11697. } finally {
  11698. if (_d) throw _e;
  11699. }
  11700. }
  11701. return _arr;
  11702. }
  11703. function _unsupportedIterableToArray(o, minLen) {
  11704. if (!o) return;
  11705. if (typeof o === "string") return _arrayLikeToArray(o, minLen);
  11706. var n = Object.prototype.toString.call(o).slice(8, -1);
  11707. if (n === "Object" && o.constructor) n = o.constructor.name;
  11708. if (n === "Map" || n === "Set") return Array.from(o);
  11709. if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
  11710. }
  11711. function _arrayLikeToArray(arr, len) {
  11712. if (len == null || len > arr.length) len = arr.length;
  11713. for (var i = 0, arr2 = new Array(len); i < len; i++) {
  11714. arr2[i] = arr[i];
  11715. }
  11716. return arr2;
  11717. }
  11718. function _nonIterableSpread() {
  11719. throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  11720. }
  11721. function _nonIterableRest() {
  11722. throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  11723. }
  11724. function _createForOfIteratorHelper(o, allowArrayLike) {
  11725. var it;
  11726. if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
  11727. if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
  11728. if (it) o = it;
  11729. var i = 0;
  11730. var F = function F() {};
  11731. return {
  11732. s: F,
  11733. n: function n() {
  11734. if (i >= o.length) return {
  11735. done: true
  11736. };
  11737. return {
  11738. done: false,
  11739. value: o[i++]
  11740. };
  11741. },
  11742. e: function e(_e2) {
  11743. throw _e2;
  11744. },
  11745. f: F
  11746. };
  11747. }
  11748. throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
  11749. }
  11750. var normalCompletion = true,
  11751. didErr = false,
  11752. err;
  11753. return {
  11754. s: function s() {
  11755. it = o[Symbol.iterator]();
  11756. },
  11757. n: function n() {
  11758. var step = it.next();
  11759. normalCompletion = step.done;
  11760. return step;
  11761. },
  11762. e: function e(_e3) {
  11763. didErr = true;
  11764. err = _e3;
  11765. },
  11766. f: function f() {
  11767. try {
  11768. if (!normalCompletion && it.return != null) it.return();
  11769. } finally {
  11770. if (didErr) throw err;
  11771. }
  11772. }
  11773. };
  11774. }
  11775. /*
  11776. PDFAbstractReference - abstract class for PDF reference
  11777. */
  11778. var PDFAbstractReference = /*#__PURE__*/function () {
  11779. function PDFAbstractReference() {
  11780. _classCallCheck(this, PDFAbstractReference);
  11781. }
  11782. _createClass(PDFAbstractReference, [{
  11783. key: "toString",
  11784. value: function toString() {
  11785. throw new Error('Must be implemented by subclasses');
  11786. }
  11787. }]);
  11788. return PDFAbstractReference;
  11789. }();
  11790. var PDFTree = /*#__PURE__*/function () {
  11791. function PDFTree() {
  11792. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  11793. _classCallCheck(this, PDFTree);
  11794. this._items = {}; // disable /Limits output for this tree
  11795. this.limits = typeof options.limits === 'boolean' ? options.limits : true;
  11796. }
  11797. _createClass(PDFTree, [{
  11798. key: "add",
  11799. value: function add(key, val) {
  11800. return this._items[key] = val;
  11801. }
  11802. }, {
  11803. key: "get",
  11804. value: function get(key) {
  11805. return this._items[key];
  11806. }
  11807. }, {
  11808. key: "toString",
  11809. value: function toString() {
  11810. var _this = this; // Needs to be sorted by key
  11811. var sortedKeys = Object.keys(this._items).sort(function (a, b) {
  11812. return _this._compareKeys(a, b);
  11813. });
  11814. var out = ['<<'];
  11815. if (this.limits && sortedKeys.length > 1) {
  11816. var first = sortedKeys[0],
  11817. last = sortedKeys[sortedKeys.length - 1];
  11818. out.push(" /Limits ".concat(PDFObject.convert([this._dataForKey(first), this._dataForKey(last)])));
  11819. }
  11820. out.push(" /".concat(this._keysName(), " ["));
  11821. var _iterator = _createForOfIteratorHelper(sortedKeys),
  11822. _step;
  11823. try {
  11824. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  11825. var key = _step.value;
  11826. out.push(" ".concat(PDFObject.convert(this._dataForKey(key)), " ").concat(PDFObject.convert(this._items[key])));
  11827. }
  11828. } catch (err) {
  11829. _iterator.e(err);
  11830. } finally {
  11831. _iterator.f();
  11832. }
  11833. out.push(']');
  11834. out.push('>>');
  11835. return out.join('\n');
  11836. }
  11837. }, {
  11838. key: "_compareKeys",
  11839. value: function _compareKeys()
  11840. /*a, b*/
  11841. {
  11842. throw new Error('Must be implemented by subclasses');
  11843. }
  11844. }, {
  11845. key: "_keysName",
  11846. value: function _keysName() {
  11847. throw new Error('Must be implemented by subclasses');
  11848. }
  11849. }, {
  11850. key: "_dataForKey",
  11851. value: function _dataForKey()
  11852. /*k*/
  11853. {
  11854. throw new Error('Must be implemented by subclasses');
  11855. }
  11856. }]);
  11857. return PDFTree;
  11858. }();
  11859. var pad = function pad(str, length) {
  11860. return (Array(length + 1).join('0') + str).slice(-length);
  11861. };
  11862. var escapableRe = /[\n\r\t\b\f()\\]/g;
  11863. var escapable = {
  11864. '\n': '\\n',
  11865. '\r': '\\r',
  11866. '\t': '\\t',
  11867. '\b': '\\b',
  11868. '\f': '\\f',
  11869. '\\': '\\\\',
  11870. '(': '\\(',
  11871. ')': '\\)'
  11872. }; // Convert little endian UTF-16 to big endian
  11873. var swapBytes = function swapBytes(buff) {
  11874. var l = buff.length;
  11875. if (l & 0x01) {
  11876. throw new Error('Buffer length must be even');
  11877. } else {
  11878. for (var i = 0, end = l - 1; i < end; i += 2) {
  11879. var a = buff[i];
  11880. buff[i] = buff[i + 1];
  11881. buff[i + 1] = a;
  11882. }
  11883. }
  11884. return buff;
  11885. };
  11886. var PDFObject = /*#__PURE__*/function () {
  11887. function PDFObject() {
  11888. _classCallCheck(this, PDFObject);
  11889. }
  11890. _createClass(PDFObject, null, [{
  11891. key: "convert",
  11892. value: function convert(object) {
  11893. var encryptFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; // String literals are converted to the PDF name type
  11894. if (typeof object === 'string') {
  11895. return "/".concat(object); // String objects are converted to PDF strings (UTF-16)
  11896. } else if (object instanceof String) {
  11897. var string = object; // Detect if this is a unicode string
  11898. var isUnicode = false;
  11899. for (var i = 0, end = string.length; i < end; i++) {
  11900. if (string.charCodeAt(i) > 0x7f) {
  11901. isUnicode = true;
  11902. break;
  11903. }
  11904. } // If so, encode it as big endian UTF-16
  11905. var stringBuffer;
  11906. if (isUnicode) {
  11907. stringBuffer = swapBytes(Buffer.from("\uFEFF".concat(string), 'utf16le'));
  11908. } else {
  11909. stringBuffer = Buffer.from(string.valueOf(), 'ascii');
  11910. } // Encrypt the string when necessary
  11911. if (encryptFn) {
  11912. string = encryptFn(stringBuffer).toString('binary');
  11913. } else {
  11914. string = stringBuffer.toString('binary');
  11915. } // Escape characters as required by the spec
  11916. string = string.replace(escapableRe, function (c) {
  11917. return escapable[c];
  11918. });
  11919. return "(".concat(string, ")"); // Buffers are converted to PDF hex strings
  11920. } else if (Buffer.isBuffer(object)) {
  11921. return "<".concat(object.toString('hex'), ">");
  11922. } else if (object instanceof PDFAbstractReference || object instanceof PDFTree) {
  11923. return object.toString();
  11924. } else if (object instanceof Date) {
  11925. var _string = "D:".concat(pad(object.getUTCFullYear(), 4)) + pad(object.getUTCMonth() + 1, 2) + pad(object.getUTCDate(), 2) + pad(object.getUTCHours(), 2) + pad(object.getUTCMinutes(), 2) + pad(object.getUTCSeconds(), 2) + 'Z'; // Encrypt the string when necessary
  11926. if (encryptFn) {
  11927. _string = encryptFn(Buffer.from(_string, 'ascii')).toString('binary'); // Escape characters as required by the spec
  11928. _string = _string.replace(escapableRe, function (c) {
  11929. return escapable[c];
  11930. });
  11931. }
  11932. return "(".concat(_string, ")");
  11933. } else if (Array.isArray(object)) {
  11934. var items = object.map(function (e) {
  11935. return PDFObject.convert(e, encryptFn);
  11936. }).join(' ');
  11937. return "[".concat(items, "]");
  11938. } else if ({}.toString.call(object) === '[object Object]') {
  11939. var out = ['<<'];
  11940. for (var key in object) {
  11941. var val = object[key];
  11942. out.push("/".concat(key, " ").concat(PDFObject.convert(val, encryptFn)));
  11943. }
  11944. out.push('>>');
  11945. return out.join('\n');
  11946. } else if (typeof object === 'number') {
  11947. return PDFObject.number(object);
  11948. } else {
  11949. return "".concat(object);
  11950. }
  11951. }
  11952. }, {
  11953. key: "number",
  11954. value: function number(n) {
  11955. if (n > -1e21 && n < 1e21) {
  11956. return Math.round(n * 1e6) / 1e6;
  11957. }
  11958. throw new Error("unsupported number: ".concat(n));
  11959. }
  11960. }]);
  11961. return PDFObject;
  11962. }();
  11963. var PDFReference = /*#__PURE__*/function (_PDFAbstractReference) {
  11964. _inherits(PDFReference, _PDFAbstractReference);
  11965. var _super = _createSuper(PDFReference);
  11966. function PDFReference(document, id) {
  11967. var _this;
  11968. var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  11969. _classCallCheck(this, PDFReference);
  11970. _this = _super.call(this);
  11971. _this.document = document;
  11972. _this.id = id;
  11973. _this.data = data;
  11974. _this.gen = 0;
  11975. _this.compress = _this.document.compress && !_this.data.Filter;
  11976. _this.uncompressedLength = 0;
  11977. _this.buffer = [];
  11978. return _this;
  11979. }
  11980. _createClass(PDFReference, [{
  11981. key: "write",
  11982. value: function write(chunk) {
  11983. if (!Buffer.isBuffer(chunk)) {
  11984. chunk = Buffer.from(chunk + '\n', 'binary');
  11985. }
  11986. this.uncompressedLength += chunk.length;
  11987. if (this.data.Length == null) {
  11988. this.data.Length = 0;
  11989. }
  11990. this.buffer.push(chunk);
  11991. this.data.Length += chunk.length;
  11992. if (this.compress) {
  11993. return this.data.Filter = 'FlateDecode';
  11994. }
  11995. }
  11996. }, {
  11997. key: "end",
  11998. value: function end(chunk) {
  11999. if (chunk) {
  12000. this.write(chunk);
  12001. }
  12002. return this.finalize();
  12003. }
  12004. }, {
  12005. key: "finalize",
  12006. value: function finalize() {
  12007. this.offset = this.document._offset;
  12008. var encryptFn = this.document._security ? this.document._security.getEncryptFn(this.id, this.gen) : null;
  12009. if (this.buffer.length) {
  12010. this.buffer = Buffer.concat(this.buffer);
  12011. if (this.compress) {
  12012. this.buffer = _zlib.default.deflateSync(this.buffer);
  12013. }
  12014. if (encryptFn) {
  12015. this.buffer = encryptFn(this.buffer);
  12016. }
  12017. this.data.Length = this.buffer.length;
  12018. }
  12019. this.document._write("".concat(this.id, " ").concat(this.gen, " obj"));
  12020. this.document._write(PDFObject.convert(this.data, encryptFn));
  12021. if (this.buffer.length) {
  12022. this.document._write('stream');
  12023. this.document._write(this.buffer);
  12024. this.buffer = []; // free up memory
  12025. this.document._write('\nendstream');
  12026. }
  12027. this.document._write('endobj');
  12028. this.document._refEnd(this);
  12029. }
  12030. }, {
  12031. key: "toString",
  12032. value: function toString() {
  12033. return "".concat(this.id, " ").concat(this.gen, " R");
  12034. }
  12035. }]);
  12036. return PDFReference;
  12037. }(PDFAbstractReference);
  12038. /*
  12039. PDFPage - represents a single page in the PDF document
  12040. By Devon Govett
  12041. */
  12042. var DEFAULT_MARGINS = {
  12043. top: 72,
  12044. left: 72,
  12045. bottom: 72,
  12046. right: 72
  12047. };
  12048. var SIZES = {
  12049. '4A0': [4767.87, 6740.79],
  12050. '2A0': [3370.39, 4767.87],
  12051. A0: [2383.94, 3370.39],
  12052. A1: [1683.78, 2383.94],
  12053. A2: [1190.55, 1683.78],
  12054. A3: [841.89, 1190.55],
  12055. A4: [595.28, 841.89],
  12056. A5: [419.53, 595.28],
  12057. A6: [297.64, 419.53],
  12058. A7: [209.76, 297.64],
  12059. A8: [147.4, 209.76],
  12060. A9: [104.88, 147.4],
  12061. A10: [73.7, 104.88],
  12062. B0: [2834.65, 4008.19],
  12063. B1: [2004.09, 2834.65],
  12064. B2: [1417.32, 2004.09],
  12065. B3: [1000.63, 1417.32],
  12066. B4: [708.66, 1000.63],
  12067. B5: [498.9, 708.66],
  12068. B6: [354.33, 498.9],
  12069. B7: [249.45, 354.33],
  12070. B8: [175.75, 249.45],
  12071. B9: [124.72, 175.75],
  12072. B10: [87.87, 124.72],
  12073. C0: [2599.37, 3676.54],
  12074. C1: [1836.85, 2599.37],
  12075. C2: [1298.27, 1836.85],
  12076. C3: [918.43, 1298.27],
  12077. C4: [649.13, 918.43],
  12078. C5: [459.21, 649.13],
  12079. C6: [323.15, 459.21],
  12080. C7: [229.61, 323.15],
  12081. C8: [161.57, 229.61],
  12082. C9: [113.39, 161.57],
  12083. C10: [79.37, 113.39],
  12084. RA0: [2437.8, 3458.27],
  12085. RA1: [1729.13, 2437.8],
  12086. RA2: [1218.9, 1729.13],
  12087. RA3: [864.57, 1218.9],
  12088. RA4: [609.45, 864.57],
  12089. SRA0: [2551.18, 3628.35],
  12090. SRA1: [1814.17, 2551.18],
  12091. SRA2: [1275.59, 1814.17],
  12092. SRA3: [907.09, 1275.59],
  12093. SRA4: [637.8, 907.09],
  12094. EXECUTIVE: [521.86, 756.0],
  12095. FOLIO: [612.0, 936.0],
  12096. LEGAL: [612.0, 1008.0],
  12097. LETTER: [612.0, 792.0],
  12098. TABLOID: [792.0, 1224.0]
  12099. };
  12100. var PDFPage = /*#__PURE__*/function () {
  12101. function PDFPage(document) {
  12102. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12103. _classCallCheck(this, PDFPage);
  12104. this.document = document;
  12105. this.size = options.size || 'letter';
  12106. this.layout = options.layout || 'portrait'; // process margins
  12107. if (typeof options.margin === 'number') {
  12108. this.margins = {
  12109. top: options.margin,
  12110. left: options.margin,
  12111. bottom: options.margin,
  12112. right: options.margin
  12113. }; // default to 1 inch margins
  12114. } else {
  12115. this.margins = options.margins || DEFAULT_MARGINS;
  12116. } // calculate page dimensions
  12117. var dimensions = Array.isArray(this.size) ? this.size : SIZES[this.size.toUpperCase()];
  12118. this.width = dimensions[this.layout === 'portrait' ? 0 : 1];
  12119. this.height = dimensions[this.layout === 'portrait' ? 1 : 0];
  12120. this.content = this.document.ref(); // Initialize the Font, XObject, and ExtGState dictionaries
  12121. this.resources = this.document.ref({
  12122. ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI']
  12123. }); // The page dictionary
  12124. this.dictionary = this.document.ref({
  12125. Type: 'Page',
  12126. Parent: this.document._root.data.Pages,
  12127. MediaBox: [0, 0, this.width, this.height],
  12128. Contents: this.content,
  12129. Resources: this.resources
  12130. });
  12131. this.markings = [];
  12132. } // Lazily create these objects
  12133. _createClass(PDFPage, [{
  12134. key: "maxY",
  12135. value: function maxY() {
  12136. return this.height - this.margins.bottom;
  12137. }
  12138. }, {
  12139. key: "write",
  12140. value: function write(chunk) {
  12141. return this.content.write(chunk);
  12142. }
  12143. }, {
  12144. key: "end",
  12145. value: function end() {
  12146. this.dictionary.end();
  12147. this.resources.end();
  12148. return this.content.end();
  12149. }
  12150. }, {
  12151. key: "fonts",
  12152. get: function get() {
  12153. var data = this.resources.data;
  12154. return data.Font != null ? data.Font : data.Font = {};
  12155. }
  12156. }, {
  12157. key: "xobjects",
  12158. get: function get() {
  12159. var data = this.resources.data;
  12160. return data.XObject != null ? data.XObject : data.XObject = {};
  12161. }
  12162. }, {
  12163. key: "ext_gstates",
  12164. get: function get() {
  12165. var data = this.resources.data;
  12166. return data.ExtGState != null ? data.ExtGState : data.ExtGState = {};
  12167. }
  12168. }, {
  12169. key: "patterns",
  12170. get: function get() {
  12171. var data = this.resources.data;
  12172. return data.Pattern != null ? data.Pattern : data.Pattern = {};
  12173. }
  12174. }, {
  12175. key: "colorSpaces",
  12176. get: function get() {
  12177. var data = this.resources.data;
  12178. return data.ColorSpace || (data.ColorSpace = {});
  12179. }
  12180. }, {
  12181. key: "annotations",
  12182. get: function get() {
  12183. var data = this.dictionary.data;
  12184. return data.Annots != null ? data.Annots : data.Annots = [];
  12185. }
  12186. }, {
  12187. key: "structParentTreeKey",
  12188. get: function get() {
  12189. var data = this.dictionary.data;
  12190. return data.StructParents != null ? data.StructParents : data.StructParents = this.document.createStructParentTreeNextKey();
  12191. }
  12192. }]);
  12193. return PDFPage;
  12194. }();
  12195. var PDFNameTree = /*#__PURE__*/function (_PDFTree) {
  12196. _inherits(PDFNameTree, _PDFTree);
  12197. var _super = _createSuper(PDFNameTree);
  12198. function PDFNameTree() {
  12199. _classCallCheck(this, PDFNameTree);
  12200. return _super.apply(this, arguments);
  12201. }
  12202. _createClass(PDFNameTree, [{
  12203. key: "_compareKeys",
  12204. value: function _compareKeys(a, b) {
  12205. return a.localeCompare(b);
  12206. }
  12207. }, {
  12208. key: "_keysName",
  12209. value: function _keysName() {
  12210. return "Names";
  12211. }
  12212. }, {
  12213. key: "_dataForKey",
  12214. value: function _dataForKey(k) {
  12215. return new String(k);
  12216. }
  12217. }]);
  12218. return PDFNameTree;
  12219. }(PDFTree);
  12220. /**
  12221. * Check if value is in a range group.
  12222. * @param {number} value
  12223. * @param {number[]} rangeGroup
  12224. * @returns {boolean}
  12225. */
  12226. function inRange(value, rangeGroup) {
  12227. if (value < rangeGroup[0]) return false;
  12228. var startRange = 0;
  12229. var endRange = rangeGroup.length / 2;
  12230. while (startRange <= endRange) {
  12231. var middleRange = Math.floor((startRange + endRange) / 2); // actual array index
  12232. var arrayIndex = middleRange * 2; // Check if value is in range pointed by actual index
  12233. if (value >= rangeGroup[arrayIndex] && value <= rangeGroup[arrayIndex + 1]) {
  12234. return true;
  12235. }
  12236. if (value > rangeGroup[arrayIndex + 1]) {
  12237. // Search Right Side Of Array
  12238. startRange = middleRange + 1;
  12239. } else {
  12240. // Search Left Side Of Array
  12241. endRange = middleRange - 1;
  12242. }
  12243. }
  12244. return false;
  12245. }
  12246. /**
  12247. * A.1 Unassigned code points in Unicode 3.2
  12248. * @link https://tools.ietf.org/html/rfc3454#appendix-A.1
  12249. */
  12250. var unassigned_code_points = [0x0221, 0x0221, 0x0234, 0x024f, 0x02ae, 0x02af, 0x02ef, 0x02ff, 0x0350, 0x035f, 0x0370, 0x0373, 0x0376, 0x0379, 0x037b, 0x037d, 0x037f, 0x0383, 0x038b, 0x038b, 0x038d, 0x038d, 0x03a2, 0x03a2, 0x03cf, 0x03cf, 0x03f7, 0x03ff, 0x0487, 0x0487, 0x04cf, 0x04cf, 0x04f6, 0x04f7, 0x04fa, 0x04ff, 0x0510, 0x0530, 0x0557, 0x0558, 0x0560, 0x0560, 0x0588, 0x0588, 0x058b, 0x0590, 0x05a2, 0x05a2, 0x05ba, 0x05ba, 0x05c5, 0x05cf, 0x05eb, 0x05ef, 0x05f5, 0x060b, 0x060d, 0x061a, 0x061c, 0x061e, 0x0620, 0x0620, 0x063b, 0x063f, 0x0656, 0x065f, 0x06ee, 0x06ef, 0x06ff, 0x06ff, 0x070e, 0x070e, 0x072d, 0x072f, 0x074b, 0x077f, 0x07b2, 0x0900, 0x0904, 0x0904, 0x093a, 0x093b, 0x094e, 0x094f, 0x0955, 0x0957, 0x0971, 0x0980, 0x0984, 0x0984, 0x098d, 0x098e, 0x0991, 0x0992, 0x09a9, 0x09a9, 0x09b1, 0x09b1, 0x09b3, 0x09b5, 0x09ba, 0x09bb, 0x09bd, 0x09bd, 0x09c5, 0x09c6, 0x09c9, 0x09ca, 0x09ce, 0x09d6, 0x09d8, 0x09db, 0x09de, 0x09de, 0x09e4, 0x09e5, 0x09fb, 0x0a01, 0x0a03, 0x0a04, 0x0a0b, 0x0a0e, 0x0a11, 0x0a12, 0x0a29, 0x0a29, 0x0a31, 0x0a31, 0x0a34, 0x0a34, 0x0a37, 0x0a37, 0x0a3a, 0x0a3b, 0x0a3d, 0x0a3d, 0x0a43, 0x0a46, 0x0a49, 0x0a4a, 0x0a4e, 0x0a58, 0x0a5d, 0x0a5d, 0x0a5f, 0x0a65, 0x0a75, 0x0a80, 0x0a84, 0x0a84, 0x0a8c, 0x0a8c, 0x0a8e, 0x0a8e, 0x0a92, 0x0a92, 0x0aa9, 0x0aa9, 0x0ab1, 0x0ab1, 0x0ab4, 0x0ab4, 0x0aba, 0x0abb, 0x0ac6, 0x0ac6, 0x0aca, 0x0aca, 0x0ace, 0x0acf, 0x0ad1, 0x0adf, 0x0ae1, 0x0ae5, 0x0af0, 0x0b00, 0x0b04, 0x0b04, 0x0b0d, 0x0b0e, 0x0b11, 0x0b12, 0x0b29, 0x0b29, 0x0b31, 0x0b31, 0x0b34, 0x0b35, 0x0b3a, 0x0b3b, 0x0b44, 0x0b46, 0x0b49, 0x0b4a, 0x0b4e, 0x0b55, 0x0b58, 0x0b5b, 0x0b5e, 0x0b5e, 0x0b62, 0x0b65, 0x0b71, 0x0b81, 0x0b84, 0x0b84, 0x0b8b, 0x0b8d, 0x0b91, 0x0b91, 0x0b96, 0x0b98, 0x0b9b, 0x0b9b, 0x0b9d, 0x0b9d, 0x0ba0, 0x0ba2, 0x0ba5, 0x0ba7, 0x0bab, 0x0bad, 0x0bb6, 0x0bb6, 0x0bba, 0x0bbd, 0x0bc3, 0x0bc5, 0x0bc9, 0x0bc9, 0x0bce, 0x0bd6, 0x0bd8, 0x0be6, 0x0bf3, 0x0c00, 0x0c04, 0x0c04, 0x0c0d, 0x0c0d, 0x0c11, 0x0c11, 0x0c29, 0x0c29, 0x0c34, 0x0c34, 0x0c3a, 0x0c3d, 0x0c45, 0x0c45, 0x0c49, 0x0c49, 0x0c4e, 0x0c54, 0x0c57, 0x0c5f, 0x0c62, 0x0c65, 0x0c70, 0x0c81, 0x0c84, 0x0c84, 0x0c8d, 0x0c8d, 0x0c91, 0x0c91, 0x0ca9, 0x0ca9, 0x0cb4, 0x0cb4, 0x0cba, 0x0cbd, 0x0cc5, 0x0cc5, 0x0cc9, 0x0cc9, 0x0cce, 0x0cd4, 0x0cd7, 0x0cdd, 0x0cdf, 0x0cdf, 0x0ce2, 0x0ce5, 0x0cf0, 0x0d01, 0x0d04, 0x0d04, 0x0d0d, 0x0d0d, 0x0d11, 0x0d11, 0x0d29, 0x0d29, 0x0d3a, 0x0d3d, 0x0d44, 0x0d45, 0x0d49, 0x0d49, 0x0d4e, 0x0d56, 0x0d58, 0x0d5f, 0x0d62, 0x0d65, 0x0d70, 0x0d81, 0x0d84, 0x0d84, 0x0d97, 0x0d99, 0x0db2, 0x0db2, 0x0dbc, 0x0dbc, 0x0dbe, 0x0dbf, 0x0dc7, 0x0dc9, 0x0dcb, 0x0dce, 0x0dd5, 0x0dd5, 0x0dd7, 0x0dd7, 0x0de0, 0x0df1, 0x0df5, 0x0e00, 0x0e3b, 0x0e3e, 0x0e5c, 0x0e80, 0x0e83, 0x0e83, 0x0e85, 0x0e86, 0x0e89, 0x0e89, 0x0e8b, 0x0e8c, 0x0e8e, 0x0e93, 0x0e98, 0x0e98, 0x0ea0, 0x0ea0, 0x0ea4, 0x0ea4, 0x0ea6, 0x0ea6, 0x0ea8, 0x0ea9, 0x0eac, 0x0eac, 0x0eba, 0x0eba, 0x0ebe, 0x0ebf, 0x0ec5, 0x0ec5, 0x0ec7, 0x0ec7, 0x0ece, 0x0ecf, 0x0eda, 0x0edb, 0x0ede, 0x0eff, 0x0f48, 0x0f48, 0x0f6b, 0x0f70, 0x0f8c, 0x0f8f, 0x0f98, 0x0f98, 0x0fbd, 0x0fbd, 0x0fcd, 0x0fce, 0x0fd0, 0x0fff, 0x1022, 0x1022, 0x1028, 0x1028, 0x102b, 0x102b, 0x1033, 0x1035, 0x103a, 0x103f, 0x105a, 0x109f, 0x10c6, 0x10cf, 0x10f9, 0x10fa, 0x10fc, 0x10ff, 0x115a, 0x115e, 0x11a3, 0x11a7, 0x11fa, 0x11ff, 0x1207, 0x1207, 0x1247, 0x1247, 0x1249, 0x1249, 0x124e, 0x124f, 0x1257, 0x1257, 0x1259, 0x1259, 0x125e, 0x125f, 0x1287, 0x1287, 0x1289, 0x1289, 0x128e, 0x128f, 0x12af, 0x12af, 0x12b1, 0x12b1, 0x12b6, 0x12b7, 0x12bf, 0x12bf, 0x12c1, 0x12c1, 0x12c6, 0x12c7, 0x12cf, 0x12cf, 0x12d7, 0x12d7, 0x12ef, 0x12ef, 0x130f, 0x130f, 0x1311, 0x1311, 0x1316, 0x1317, 0x131f, 0x131f, 0x1347, 0x1347, 0x135b, 0x1360, 0x137d, 0x139f, 0x13f5, 0x1400, 0x1677, 0x167f, 0x169d, 0x169f, 0x16f1, 0x16ff, 0x170d, 0x170d, 0x1715, 0x171f, 0x1737, 0x173f, 0x1754, 0x175f, 0x176d, 0x176d, 0x1771, 0x1771, 0x1774, 0x177f, 0x17dd, 0x17df, 0x17ea, 0x17ff, 0x180f, 0x180f, 0x181a, 0x181f, 0x1878, 0x187f, 0x18aa, 0x1dff, 0x1e9c, 0x1e9f, 0x1efa, 0x1eff, 0x1f16, 0x1f17, 0x1f1e, 0x1f1f, 0x1f46, 0x1f47, 0x1f4e, 0x1f4f, 0x1f58, 0x1f58, 0x1f5a, 0x1f5a, 0x1f5c, 0x1f5c, 0x1f5e, 0x1f5e, 0x1f7e, 0x1f7f, 0x1fb5, 0x1fb5, 0x1fc5, 0x1fc5, 0x1fd4, 0x1fd5, 0x1fdc, 0x1fdc, 0x1ff0, 0x1ff1, 0x1ff5, 0x1ff5, 0x1fff, 0x1fff, 0x2053, 0x2056, 0x2058, 0x205e, 0x2064, 0x2069, 0x2072, 0x2073, 0x208f, 0x209f, 0x20b2, 0x20cf, 0x20eb, 0x20ff, 0x213b, 0x213c, 0x214c, 0x2152, 0x2184, 0x218f, 0x23cf, 0x23ff, 0x2427, 0x243f, 0x244b, 0x245f, 0x24ff, 0x24ff, 0x2614, 0x2615, 0x2618, 0x2618, 0x267e, 0x267f, 0x268a, 0x2700, 0x2705, 0x2705, 0x270a, 0x270b, 0x2728, 0x2728, 0x274c, 0x274c, 0x274e, 0x274e, 0x2753, 0x2755, 0x2757, 0x2757, 0x275f, 0x2760, 0x2795, 0x2797, 0x27b0, 0x27b0, 0x27bf, 0x27cf, 0x27ec, 0x27ef, 0x2b00, 0x2e7f, 0x2e9a, 0x2e9a, 0x2ef4, 0x2eff, 0x2fd6, 0x2fef, 0x2ffc, 0x2fff, 0x3040, 0x3040, 0x3097, 0x3098, 0x3100, 0x3104, 0x312d, 0x3130, 0x318f, 0x318f, 0x31b8, 0x31ef, 0x321d, 0x321f, 0x3244, 0x3250, 0x327c, 0x327e, 0x32cc, 0x32cf, 0x32ff, 0x32ff, 0x3377, 0x337a, 0x33de, 0x33df, 0x33ff, 0x33ff, 0x4db6, 0x4dff, 0x9fa6, 0x9fff, 0xa48d, 0xa48f, 0xa4c7, 0xabff, 0xd7a4, 0xd7ff, 0xfa2e, 0xfa2f, 0xfa6b, 0xfaff, 0xfb07, 0xfb12, 0xfb18, 0xfb1c, 0xfb37, 0xfb37, 0xfb3d, 0xfb3d, 0xfb3f, 0xfb3f, 0xfb42, 0xfb42, 0xfb45, 0xfb45, 0xfbb2, 0xfbd2, 0xfd40, 0xfd4f, 0xfd90, 0xfd91, 0xfdc8, 0xfdcf, 0xfdfd, 0xfdff, 0xfe10, 0xfe1f, 0xfe24, 0xfe2f, 0xfe47, 0xfe48, 0xfe53, 0xfe53, 0xfe67, 0xfe67, 0xfe6c, 0xfe6f, 0xfe75, 0xfe75, 0xfefd, 0xfefe, 0xff00, 0xff00, 0xffbf, 0xffc1, 0xffc8, 0xffc9, 0xffd0, 0xffd1, 0xffd8, 0xffd9, 0xffdd, 0xffdf, 0xffe7, 0xffe7, 0xffef, 0xfff8, 0x10000, 0x102ff, 0x1031f, 0x1031f, 0x10324, 0x1032f, 0x1034b, 0x103ff, 0x10426, 0x10427, 0x1044e, 0x1cfff, 0x1d0f6, 0x1d0ff, 0x1d127, 0x1d129, 0x1d1de, 0x1d3ff, 0x1d455, 0x1d455, 0x1d49d, 0x1d49d, 0x1d4a0, 0x1d4a1, 0x1d4a3, 0x1d4a4, 0x1d4a7, 0x1d4a8, 0x1d4ad, 0x1d4ad, 0x1d4ba, 0x1d4ba, 0x1d4bc, 0x1d4bc, 0x1d4c1, 0x1d4c1, 0x1d4c4, 0x1d4c4, 0x1d506, 0x1d506, 0x1d50b, 0x1d50c, 0x1d515, 0x1d515, 0x1d51d, 0x1d51d, 0x1d53a, 0x1d53a, 0x1d53f, 0x1d53f, 0x1d545, 0x1d545, 0x1d547, 0x1d549, 0x1d551, 0x1d551, 0x1d6a4, 0x1d6a7, 0x1d7ca, 0x1d7cd, 0x1d800, 0x1fffd, 0x2a6d7, 0x2f7ff, 0x2fa1e, 0x2fffd, 0x30000, 0x3fffd, 0x40000, 0x4fffd, 0x50000, 0x5fffd, 0x60000, 0x6fffd, 0x70000, 0x7fffd, 0x80000, 0x8fffd, 0x90000, 0x9fffd, 0xa0000, 0xafffd, 0xb0000, 0xbfffd, 0xc0000, 0xcfffd, 0xd0000, 0xdfffd, 0xe0000, 0xe0000, 0xe0002, 0xe001f, 0xe0080, 0xefffd]; // prettier-ignore-end
  12251. var isUnassignedCodePoint = function isUnassignedCodePoint(character) {
  12252. return inRange(character, unassigned_code_points);
  12253. }; // prettier-ignore-start
  12254. /**
  12255. * B.1 Commonly mapped to nothing
  12256. * @link https://tools.ietf.org/html/rfc3454#appendix-B.1
  12257. */
  12258. var commonly_mapped_to_nothing = [0x00ad, 0x00ad, 0x034f, 0x034f, 0x1806, 0x1806, 0x180b, 0x180b, 0x180c, 0x180c, 0x180d, 0x180d, 0x200b, 0x200b, 0x200c, 0x200c, 0x200d, 0x200d, 0x2060, 0x2060, 0xfe00, 0xfe00, 0xfe01, 0xfe01, 0xfe02, 0xfe02, 0xfe03, 0xfe03, 0xfe04, 0xfe04, 0xfe05, 0xfe05, 0xfe06, 0xfe06, 0xfe07, 0xfe07, 0xfe08, 0xfe08, 0xfe09, 0xfe09, 0xfe0a, 0xfe0a, 0xfe0b, 0xfe0b, 0xfe0c, 0xfe0c, 0xfe0d, 0xfe0d, 0xfe0e, 0xfe0e, 0xfe0f, 0xfe0f, 0xfeff, 0xfeff]; // prettier-ignore-end
  12259. var isCommonlyMappedToNothing = function isCommonlyMappedToNothing(character) {
  12260. return inRange(character, commonly_mapped_to_nothing);
  12261. }; // prettier-ignore-start
  12262. /**
  12263. * C.1.2 Non-ASCII space characters
  12264. * @link https://tools.ietf.org/html/rfc3454#appendix-C.1.2
  12265. */
  12266. var non_ASCII_space_characters = [0x00a0, 0x00a0
  12267. /* NO-BREAK SPACE */
  12268. , 0x1680, 0x1680
  12269. /* OGHAM SPACE MARK */
  12270. , 0x2000, 0x2000
  12271. /* EN QUAD */
  12272. , 0x2001, 0x2001
  12273. /* EM QUAD */
  12274. , 0x2002, 0x2002
  12275. /* EN SPACE */
  12276. , 0x2003, 0x2003
  12277. /* EM SPACE */
  12278. , 0x2004, 0x2004
  12279. /* THREE-PER-EM SPACE */
  12280. , 0x2005, 0x2005
  12281. /* FOUR-PER-EM SPACE */
  12282. , 0x2006, 0x2006
  12283. /* SIX-PER-EM SPACE */
  12284. , 0x2007, 0x2007
  12285. /* FIGURE SPACE */
  12286. , 0x2008, 0x2008
  12287. /* PUNCTUATION SPACE */
  12288. , 0x2009, 0x2009
  12289. /* THIN SPACE */
  12290. , 0x200a, 0x200a
  12291. /* HAIR SPACE */
  12292. , 0x200b, 0x200b
  12293. /* ZERO WIDTH SPACE */
  12294. , 0x202f, 0x202f
  12295. /* NARROW NO-BREAK SPACE */
  12296. , 0x205f, 0x205f
  12297. /* MEDIUM MATHEMATICAL SPACE */
  12298. , 0x3000, 0x3000
  12299. /* IDEOGRAPHIC SPACE */
  12300. ]; // prettier-ignore-end
  12301. var isNonASCIISpaceCharacter = function isNonASCIISpaceCharacter(character) {
  12302. return inRange(character, non_ASCII_space_characters);
  12303. }; // prettier-ignore-start
  12304. var non_ASCII_controls_characters = [
  12305. /**
  12306. * C.2.2 Non-ASCII control characters
  12307. * @link https://tools.ietf.org/html/rfc3454#appendix-C.2.2
  12308. */
  12309. 0x0080, 0x009f
  12310. /* [CONTROL CHARACTERS] */
  12311. , 0x06dd, 0x06dd
  12312. /* ARABIC END OF AYAH */
  12313. , 0x070f, 0x070f
  12314. /* SYRIAC ABBREVIATION MARK */
  12315. , 0x180e, 0x180e
  12316. /* MONGOLIAN VOWEL SEPARATOR */
  12317. , 0x200c, 0x200c
  12318. /* ZERO WIDTH NON-JOINER */
  12319. , 0x200d, 0x200d
  12320. /* ZERO WIDTH JOINER */
  12321. , 0x2028, 0x2028
  12322. /* LINE SEPARATOR */
  12323. , 0x2029, 0x2029
  12324. /* PARAGRAPH SEPARATOR */
  12325. , 0x2060, 0x2060
  12326. /* WORD JOINER */
  12327. , 0x2061, 0x2061
  12328. /* FUNCTION APPLICATION */
  12329. , 0x2062, 0x2062
  12330. /* INVISIBLE TIMES */
  12331. , 0x2063, 0x2063
  12332. /* INVISIBLE SEPARATOR */
  12333. , 0x206a, 0x206f
  12334. /* [CONTROL CHARACTERS] */
  12335. , 0xfeff, 0xfeff
  12336. /* ZERO WIDTH NO-BREAK SPACE */
  12337. , 0xfff9, 0xfffc
  12338. /* [CONTROL CHARACTERS] */
  12339. , 0x1d173, 0x1d17a
  12340. /* [MUSICAL CONTROL CHARACTERS] */
  12341. ];
  12342. var non_character_codepoints = [
  12343. /**
  12344. * C.4 Non-character code points
  12345. * @link https://tools.ietf.org/html/rfc3454#appendix-C.4
  12346. */
  12347. 0xfdd0, 0xfdef
  12348. /* [NONCHARACTER CODE POINTS] */
  12349. , 0xfffe, 0xffff
  12350. /* [NONCHARACTER CODE POINTS] */
  12351. , 0x1fffe, 0x1ffff
  12352. /* [NONCHARACTER CODE POINTS] */
  12353. , 0x2fffe, 0x2ffff
  12354. /* [NONCHARACTER CODE POINTS] */
  12355. , 0x3fffe, 0x3ffff
  12356. /* [NONCHARACTER CODE POINTS] */
  12357. , 0x4fffe, 0x4ffff
  12358. /* [NONCHARACTER CODE POINTS] */
  12359. , 0x5fffe, 0x5ffff
  12360. /* [NONCHARACTER CODE POINTS] */
  12361. , 0x6fffe, 0x6ffff
  12362. /* [NONCHARACTER CODE POINTS] */
  12363. , 0x7fffe, 0x7ffff
  12364. /* [NONCHARACTER CODE POINTS] */
  12365. , 0x8fffe, 0x8ffff
  12366. /* [NONCHARACTER CODE POINTS] */
  12367. , 0x9fffe, 0x9ffff
  12368. /* [NONCHARACTER CODE POINTS] */
  12369. , 0xafffe, 0xaffff
  12370. /* [NONCHARACTER CODE POINTS] */
  12371. , 0xbfffe, 0xbffff
  12372. /* [NONCHARACTER CODE POINTS] */
  12373. , 0xcfffe, 0xcffff
  12374. /* [NONCHARACTER CODE POINTS] */
  12375. , 0xdfffe, 0xdffff
  12376. /* [NONCHARACTER CODE POINTS] */
  12377. , 0xefffe, 0xeffff
  12378. /* [NONCHARACTER CODE POINTS] */
  12379. , 0x10fffe, 0x10ffff
  12380. /* [NONCHARACTER CODE POINTS] */
  12381. ];
  12382. /**
  12383. * 2.3. Prohibited Output
  12384. */
  12385. var prohibited_characters = [
  12386. /**
  12387. * C.2.1 ASCII control characters
  12388. * @link https://tools.ietf.org/html/rfc3454#appendix-C.2.1
  12389. */
  12390. 0, 0x001f
  12391. /* [CONTROL CHARACTERS] */
  12392. , 0x007f, 0x007f
  12393. /* DELETE */
  12394. ,
  12395. /**
  12396. * C.8 Change display properties or are deprecated
  12397. * @link https://tools.ietf.org/html/rfc3454#appendix-C.8
  12398. */
  12399. 0x0340, 0x0340
  12400. /* COMBINING GRAVE TONE MARK */
  12401. , 0x0341, 0x0341
  12402. /* COMBINING ACUTE TONE MARK */
  12403. , 0x200e, 0x200e
  12404. /* LEFT-TO-RIGHT MARK */
  12405. , 0x200f, 0x200f
  12406. /* RIGHT-TO-LEFT MARK */
  12407. , 0x202a, 0x202a
  12408. /* LEFT-TO-RIGHT EMBEDDING */
  12409. , 0x202b, 0x202b
  12410. /* RIGHT-TO-LEFT EMBEDDING */
  12411. , 0x202c, 0x202c
  12412. /* POP DIRECTIONAL FORMATTING */
  12413. , 0x202d, 0x202d
  12414. /* LEFT-TO-RIGHT OVERRIDE */
  12415. , 0x202e, 0x202e
  12416. /* RIGHT-TO-LEFT OVERRIDE */
  12417. , 0x206a, 0x206a
  12418. /* INHIBIT SYMMETRIC SWAPPING */
  12419. , 0x206b, 0x206b
  12420. /* ACTIVATE SYMMETRIC SWAPPING */
  12421. , 0x206c, 0x206c
  12422. /* INHIBIT ARABIC FORM SHAPING */
  12423. , 0x206d, 0x206d
  12424. /* ACTIVATE ARABIC FORM SHAPING */
  12425. , 0x206e, 0x206e
  12426. /* NATIONAL DIGIT SHAPES */
  12427. , 0x206f, 0x206f
  12428. /* NOMINAL DIGIT SHAPES */
  12429. ,
  12430. /**
  12431. * C.7 Inappropriate for canonical representation
  12432. * @link https://tools.ietf.org/html/rfc3454#appendix-C.7
  12433. */
  12434. 0x2ff0, 0x2ffb
  12435. /* [IDEOGRAPHIC DESCRIPTION CHARACTERS] */
  12436. ,
  12437. /**
  12438. * C.5 Surrogate codes
  12439. * @link https://tools.ietf.org/html/rfc3454#appendix-C.5
  12440. */
  12441. 0xd800, 0xdfff,
  12442. /**
  12443. * C.3 Private use
  12444. * @link https://tools.ietf.org/html/rfc3454#appendix-C.3
  12445. */
  12446. 0xe000, 0xf8ff
  12447. /* [PRIVATE USE, PLANE 0] */
  12448. ,
  12449. /**
  12450. * C.6 Inappropriate for plain text
  12451. * @link https://tools.ietf.org/html/rfc3454#appendix-C.6
  12452. */
  12453. 0xfff9, 0xfff9
  12454. /* INTERLINEAR ANNOTATION ANCHOR */
  12455. , 0xfffa, 0xfffa
  12456. /* INTERLINEAR ANNOTATION SEPARATOR */
  12457. , 0xfffb, 0xfffb
  12458. /* INTERLINEAR ANNOTATION TERMINATOR */
  12459. , 0xfffc, 0xfffc
  12460. /* OBJECT REPLACEMENT CHARACTER */
  12461. , 0xfffd, 0xfffd
  12462. /* REPLACEMENT CHARACTER */
  12463. ,
  12464. /**
  12465. * C.9 Tagging characters
  12466. * @link https://tools.ietf.org/html/rfc3454#appendix-C.9
  12467. */
  12468. 0xe0001, 0xe0001
  12469. /* LANGUAGE TAG */
  12470. , 0xe0020, 0xe007f
  12471. /* [TAGGING CHARACTERS] */
  12472. ,
  12473. /**
  12474. * C.3 Private use
  12475. * @link https://tools.ietf.org/html/rfc3454#appendix-C.3
  12476. */
  12477. 0xf0000, 0xffffd
  12478. /* [PRIVATE USE, PLANE 15] */
  12479. , 0x100000, 0x10fffd
  12480. /* [PRIVATE USE, PLANE 16] */
  12481. ]; // prettier-ignore-end
  12482. var isProhibitedCharacter = function isProhibitedCharacter(character) {
  12483. return inRange(character, non_ASCII_space_characters) || inRange(character, prohibited_characters) || inRange(character, non_ASCII_controls_characters) || inRange(character, non_character_codepoints);
  12484. }; // prettier-ignore-start
  12485. /**
  12486. * D.1 Characters with bidirectional property "R" or "AL"
  12487. * @link https://tools.ietf.org/html/rfc3454#appendix-D.1
  12488. */
  12489. var bidirectional_r_al = [0x05be, 0x05be, 0x05c0, 0x05c0, 0x05c3, 0x05c3, 0x05d0, 0x05ea, 0x05f0, 0x05f4, 0x061b, 0x061b, 0x061f, 0x061f, 0x0621, 0x063a, 0x0640, 0x064a, 0x066d, 0x066f, 0x0671, 0x06d5, 0x06dd, 0x06dd, 0x06e5, 0x06e6, 0x06fa, 0x06fe, 0x0700, 0x070d, 0x0710, 0x0710, 0x0712, 0x072c, 0x0780, 0x07a5, 0x07b1, 0x07b1, 0x200f, 0x200f, 0xfb1d, 0xfb1d, 0xfb1f, 0xfb28, 0xfb2a, 0xfb36, 0xfb38, 0xfb3c, 0xfb3e, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44, 0xfb46, 0xfbb1, 0xfbd3, 0xfd3d, 0xfd50, 0xfd8f, 0xfd92, 0xfdc7, 0xfdf0, 0xfdfc, 0xfe70, 0xfe74, 0xfe76, 0xfefc]; // prettier-ignore-end
  12490. var isBidirectionalRAL = function isBidirectionalRAL(character) {
  12491. return inRange(character, bidirectional_r_al);
  12492. }; // prettier-ignore-start
  12493. /**
  12494. * D.2 Characters with bidirectional property "L"
  12495. * @link https://tools.ietf.org/html/rfc3454#appendix-D.2
  12496. */
  12497. var bidirectional_l = [0x0041, 0x005a, 0x0061, 0x007a, 0x00aa, 0x00aa, 0x00b5, 0x00b5, 0x00ba, 0x00ba, 0x00c0, 0x00d6, 0x00d8, 0x00f6, 0x00f8, 0x0220, 0x0222, 0x0233, 0x0250, 0x02ad, 0x02b0, 0x02b8, 0x02bb, 0x02c1, 0x02d0, 0x02d1, 0x02e0, 0x02e4, 0x02ee, 0x02ee, 0x037a, 0x037a, 0x0386, 0x0386, 0x0388, 0x038a, 0x038c, 0x038c, 0x038e, 0x03a1, 0x03a3, 0x03ce, 0x03d0, 0x03f5, 0x0400, 0x0482, 0x048a, 0x04ce, 0x04d0, 0x04f5, 0x04f8, 0x04f9, 0x0500, 0x050f, 0x0531, 0x0556, 0x0559, 0x055f, 0x0561, 0x0587, 0x0589, 0x0589, 0x0903, 0x0903, 0x0905, 0x0939, 0x093d, 0x0940, 0x0949, 0x094c, 0x0950, 0x0950, 0x0958, 0x0961, 0x0964, 0x0970, 0x0982, 0x0983, 0x0985, 0x098c, 0x098f, 0x0990, 0x0993, 0x09a8, 0x09aa, 0x09b0, 0x09b2, 0x09b2, 0x09b6, 0x09b9, 0x09be, 0x09c0, 0x09c7, 0x09c8, 0x09cb, 0x09cc, 0x09d7, 0x09d7, 0x09dc, 0x09dd, 0x09df, 0x09e1, 0x09e6, 0x09f1, 0x09f4, 0x09fa, 0x0a05, 0x0a0a, 0x0a0f, 0x0a10, 0x0a13, 0x0a28, 0x0a2a, 0x0a30, 0x0a32, 0x0a33, 0x0a35, 0x0a36, 0x0a38, 0x0a39, 0x0a3e, 0x0a40, 0x0a59, 0x0a5c, 0x0a5e, 0x0a5e, 0x0a66, 0x0a6f, 0x0a72, 0x0a74, 0x0a83, 0x0a83, 0x0a85, 0x0a8b, 0x0a8d, 0x0a8d, 0x0a8f, 0x0a91, 0x0a93, 0x0aa8, 0x0aaa, 0x0ab0, 0x0ab2, 0x0ab3, 0x0ab5, 0x0ab9, 0x0abd, 0x0ac0, 0x0ac9, 0x0ac9, 0x0acb, 0x0acc, 0x0ad0, 0x0ad0, 0x0ae0, 0x0ae0, 0x0ae6, 0x0aef, 0x0b02, 0x0b03, 0x0b05, 0x0b0c, 0x0b0f, 0x0b10, 0x0b13, 0x0b28, 0x0b2a, 0x0b30, 0x0b32, 0x0b33, 0x0b36, 0x0b39, 0x0b3d, 0x0b3e, 0x0b40, 0x0b40, 0x0b47, 0x0b48, 0x0b4b, 0x0b4c, 0x0b57, 0x0b57, 0x0b5c, 0x0b5d, 0x0b5f, 0x0b61, 0x0b66, 0x0b70, 0x0b83, 0x0b83, 0x0b85, 0x0b8a, 0x0b8e, 0x0b90, 0x0b92, 0x0b95, 0x0b99, 0x0b9a, 0x0b9c, 0x0b9c, 0x0b9e, 0x0b9f, 0x0ba3, 0x0ba4, 0x0ba8, 0x0baa, 0x0bae, 0x0bb5, 0x0bb7, 0x0bb9, 0x0bbe, 0x0bbf, 0x0bc1, 0x0bc2, 0x0bc6, 0x0bc8, 0x0bca, 0x0bcc, 0x0bd7, 0x0bd7, 0x0be7, 0x0bf2, 0x0c01, 0x0c03, 0x0c05, 0x0c0c, 0x0c0e, 0x0c10, 0x0c12, 0x0c28, 0x0c2a, 0x0c33, 0x0c35, 0x0c39, 0x0c41, 0x0c44, 0x0c60, 0x0c61, 0x0c66, 0x0c6f, 0x0c82, 0x0c83, 0x0c85, 0x0c8c, 0x0c8e, 0x0c90, 0x0c92, 0x0ca8, 0x0caa, 0x0cb3, 0x0cb5, 0x0cb9, 0x0cbe, 0x0cbe, 0x0cc0, 0x0cc4, 0x0cc7, 0x0cc8, 0x0cca, 0x0ccb, 0x0cd5, 0x0cd6, 0x0cde, 0x0cde, 0x0ce0, 0x0ce1, 0x0ce6, 0x0cef, 0x0d02, 0x0d03, 0x0d05, 0x0d0c, 0x0d0e, 0x0d10, 0x0d12, 0x0d28, 0x0d2a, 0x0d39, 0x0d3e, 0x0d40, 0x0d46, 0x0d48, 0x0d4a, 0x0d4c, 0x0d57, 0x0d57, 0x0d60, 0x0d61, 0x0d66, 0x0d6f, 0x0d82, 0x0d83, 0x0d85, 0x0d96, 0x0d9a, 0x0db1, 0x0db3, 0x0dbb, 0x0dbd, 0x0dbd, 0x0dc0, 0x0dc6, 0x0dcf, 0x0dd1, 0x0dd8, 0x0ddf, 0x0df2, 0x0df4, 0x0e01, 0x0e30, 0x0e32, 0x0e33, 0x0e40, 0x0e46, 0x0e4f, 0x0e5b, 0x0e81, 0x0e82, 0x0e84, 0x0e84, 0x0e87, 0x0e88, 0x0e8a, 0x0e8a, 0x0e8d, 0x0e8d, 0x0e94, 0x0e97, 0x0e99, 0x0e9f, 0x0ea1, 0x0ea3, 0x0ea5, 0x0ea5, 0x0ea7, 0x0ea7, 0x0eaa, 0x0eab, 0x0ead, 0x0eb0, 0x0eb2, 0x0eb3, 0x0ebd, 0x0ebd, 0x0ec0, 0x0ec4, 0x0ec6, 0x0ec6, 0x0ed0, 0x0ed9, 0x0edc, 0x0edd, 0x0f00, 0x0f17, 0x0f1a, 0x0f34, 0x0f36, 0x0f36, 0x0f38, 0x0f38, 0x0f3e, 0x0f47, 0x0f49, 0x0f6a, 0x0f7f, 0x0f7f, 0x0f85, 0x0f85, 0x0f88, 0x0f8b, 0x0fbe, 0x0fc5, 0x0fc7, 0x0fcc, 0x0fcf, 0x0fcf, 0x1000, 0x1021, 0x1023, 0x1027, 0x1029, 0x102a, 0x102c, 0x102c, 0x1031, 0x1031, 0x1038, 0x1038, 0x1040, 0x1057, 0x10a0, 0x10c5, 0x10d0, 0x10f8, 0x10fb, 0x10fb, 0x1100, 0x1159, 0x115f, 0x11a2, 0x11a8, 0x11f9, 0x1200, 0x1206, 0x1208, 0x1246, 0x1248, 0x1248, 0x124a, 0x124d, 0x1250, 0x1256, 0x1258, 0x1258, 0x125a, 0x125d, 0x1260, 0x1286, 0x1288, 0x1288, 0x128a, 0x128d, 0x1290, 0x12ae, 0x12b0, 0x12b0, 0x12b2, 0x12b5, 0x12b8, 0x12be, 0x12c0, 0x12c0, 0x12c2, 0x12c5, 0x12c8, 0x12ce, 0x12d0, 0x12d6, 0x12d8, 0x12ee, 0x12f0, 0x130e, 0x1310, 0x1310, 0x1312, 0x1315, 0x1318, 0x131e, 0x1320, 0x1346, 0x1348, 0x135a, 0x1361, 0x137c, 0x13a0, 0x13f4, 0x1401, 0x1676, 0x1681, 0x169a, 0x16a0, 0x16f0, 0x1700, 0x170c, 0x170e, 0x1711, 0x1720, 0x1731, 0x1735, 0x1736, 0x1740, 0x1751, 0x1760, 0x176c, 0x176e, 0x1770, 0x1780, 0x17b6, 0x17be, 0x17c5, 0x17c7, 0x17c8, 0x17d4, 0x17da, 0x17dc, 0x17dc, 0x17e0, 0x17e9, 0x1810, 0x1819, 0x1820, 0x1877, 0x1880, 0x18a8, 0x1e00, 0x1e9b, 0x1ea0, 0x1ef9, 0x1f00, 0x1f15, 0x1f18, 0x1f1d, 0x1f20, 0x1f45, 0x1f48, 0x1f4d, 0x1f50, 0x1f57, 0x1f59, 0x1f59, 0x1f5b, 0x1f5b, 0x1f5d, 0x1f5d, 0x1f5f, 0x1f7d, 0x1f80, 0x1fb4, 0x1fb6, 0x1fbc, 0x1fbe, 0x1fbe, 0x1fc2, 0x1fc4, 0x1fc6, 0x1fcc, 0x1fd0, 0x1fd3, 0x1fd6, 0x1fdb, 0x1fe0, 0x1fec, 0x1ff2, 0x1ff4, 0x1ff6, 0x1ffc, 0x200e, 0x200e, 0x2071, 0x2071, 0x207f, 0x207f, 0x2102, 0x2102, 0x2107, 0x2107, 0x210a, 0x2113, 0x2115, 0x2115, 0x2119, 0x211d, 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, 0x212a, 0x212d, 0x212f, 0x2131, 0x2133, 0x2139, 0x213d, 0x213f, 0x2145, 0x2149, 0x2160, 0x2183, 0x2336, 0x237a, 0x2395, 0x2395, 0x249c, 0x24e9, 0x3005, 0x3007, 0x3021, 0x3029, 0x3031, 0x3035, 0x3038, 0x303c, 0x3041, 0x3096, 0x309d, 0x309f, 0x30a1, 0x30fa, 0x30fc, 0x30ff, 0x3105, 0x312c, 0x3131, 0x318e, 0x3190, 0x31b7, 0x31f0, 0x321c, 0x3220, 0x3243, 0x3260, 0x327b, 0x327f, 0x32b0, 0x32c0, 0x32cb, 0x32d0, 0x32fe, 0x3300, 0x3376, 0x337b, 0x33dd, 0x33e0, 0x33fe, 0x3400, 0x4db5, 0x4e00, 0x9fa5, 0xa000, 0xa48c, 0xac00, 0xd7a3, 0xd800, 0xfa2d, 0xfa30, 0xfa6a, 0xfb00, 0xfb06, 0xfb13, 0xfb17, 0xff21, 0xff3a, 0xff41, 0xff5a, 0xff66, 0xffbe, 0xffc2, 0xffc7, 0xffca, 0xffcf, 0xffd2, 0xffd7, 0xffda, 0xffdc, 0x10300, 0x1031e, 0x10320, 0x10323, 0x10330, 0x1034a, 0x10400, 0x10425, 0x10428, 0x1044d, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, 0x1d12a, 0x1d166, 0x1d16a, 0x1d172, 0x1d183, 0x1d184, 0x1d18c, 0x1d1a9, 0x1d1ae, 0x1d1dd, 0x1d400, 0x1d454, 0x1d456, 0x1d49c, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4a9, 0x1d4ac, 0x1d4ae, 0x1d4b9, 0x1d4bb, 0x1d4bb, 0x1d4bd, 0x1d4c0, 0x1d4c2, 0x1d4c3, 0x1d4c5, 0x1d505, 0x1d507, 0x1d50a, 0x1d50d, 0x1d514, 0x1d516, 0x1d51c, 0x1d51e, 0x1d539, 0x1d53b, 0x1d53e, 0x1d540, 0x1d544, 0x1d546, 0x1d546, 0x1d54a, 0x1d550, 0x1d552, 0x1d6a3, 0x1d6a8, 0x1d7c9, 0x20000, 0x2a6d6, 0x2f800, 0x2fa1d, 0xf0000, 0xffffd, 0x100000, 0x10fffd]; // prettier-ignore-end
  12498. var isBidirectionalL = function isBidirectionalL(character) {
  12499. return inRange(character, bidirectional_l);
  12500. };
  12501. /**
  12502. * non-ASCII space characters [StringPrep, C.1.2] that can be
  12503. * mapped to SPACE (U+0020)
  12504. */
  12505. var mapping2space = isNonASCIISpaceCharacter;
  12506. /**
  12507. * the "commonly mapped to nothing" characters [StringPrep, B.1]
  12508. * that can be mapped to nothing.
  12509. */
  12510. var mapping2nothing = isCommonlyMappedToNothing; // utils
  12511. var getCodePoint = function getCodePoint(character) {
  12512. return character.codePointAt(0);
  12513. };
  12514. var first = function first(x) {
  12515. return x[0];
  12516. };
  12517. var last = function last(x) {
  12518. return x[x.length - 1];
  12519. };
  12520. /**
  12521. * Convert provided string into an array of Unicode Code Points.
  12522. * Based on https://stackoverflow.com/a/21409165/1556249
  12523. * and https://www.npmjs.com/package/code-point-at.
  12524. * @param {string} input
  12525. * @returns {number[]}
  12526. */
  12527. function toCodePoints(input) {
  12528. var codepoints = [];
  12529. var size = input.length;
  12530. for (var i = 0; i < size; i += 1) {
  12531. var before = input.charCodeAt(i);
  12532. if (before >= 0xd800 && before <= 0xdbff && size > i + 1) {
  12533. var next = input.charCodeAt(i + 1);
  12534. if (next >= 0xdc00 && next <= 0xdfff) {
  12535. codepoints.push((before - 0xd800) * 0x400 + next - 0xdc00 + 0x10000);
  12536. i += 1;
  12537. continue;
  12538. }
  12539. }
  12540. codepoints.push(before);
  12541. }
  12542. return codepoints;
  12543. }
  12544. /**
  12545. * SASLprep.
  12546. * @param {string} input
  12547. * @param {Object} opts
  12548. * @param {boolean} opts.allowUnassigned
  12549. * @returns {string}
  12550. */
  12551. function saslprep(input) {
  12552. var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12553. if (typeof input !== 'string') {
  12554. throw new TypeError('Expected string.');
  12555. }
  12556. if (input.length === 0) {
  12557. return '';
  12558. } // 1. Map
  12559. var mapped_input = toCodePoints(input) // 1.1 mapping to space
  12560. .map(function (character) {
  12561. return mapping2space(character) ? 0x20 : character;
  12562. }) // 1.2 mapping to nothing
  12563. .filter(function (character) {
  12564. return !mapping2nothing(character);
  12565. }); // 2. Normalize
  12566. var normalized_input = String.fromCodePoint.apply(null, mapped_input).normalize('NFKC');
  12567. var normalized_map = toCodePoints(normalized_input); // 3. Prohibit
  12568. var hasProhibited = normalized_map.some(isProhibitedCharacter);
  12569. if (hasProhibited) {
  12570. throw new Error('Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3');
  12571. } // Unassigned Code Points
  12572. if (opts.allowUnassigned !== true) {
  12573. var hasUnassigned = normalized_map.some(isUnassignedCodePoint);
  12574. if (hasUnassigned) {
  12575. throw new Error('Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5');
  12576. }
  12577. } // 4. check bidi
  12578. var hasBidiRAL = normalized_map.some(isBidirectionalRAL);
  12579. var hasBidiL = normalized_map.some(isBidirectionalL); // 4.1 If a string contains any RandALCat character, the string MUST NOT
  12580. // contain any LCat character.
  12581. if (hasBidiRAL && hasBidiL) {
  12582. throw new Error('String must not contain RandALCat and LCat at the same time,' + ' see https://tools.ietf.org/html/rfc3454#section-6');
  12583. }
  12584. /**
  12585. * 4.2 If a string contains any RandALCat character, a RandALCat
  12586. * character MUST be the first character of the string, and a
  12587. * RandALCat character MUST be the last character of the string.
  12588. */
  12589. var isFirstBidiRAL = isBidirectionalRAL(getCodePoint(first(normalized_input)));
  12590. var isLastBidiRAL = isBidirectionalRAL(getCodePoint(last(normalized_input)));
  12591. if (hasBidiRAL && !(isFirstBidiRAL && isLastBidiRAL)) {
  12592. throw new Error('Bidirectional RandALCat character must be the first and the last' + ' character of the string, see https://tools.ietf.org/html/rfc3454#section-6');
  12593. }
  12594. return normalized_input;
  12595. }
  12596. var PDFSecurity = /*#__PURE__*/function () {
  12597. _createClass(PDFSecurity, null, [{
  12598. key: "generateFileID",
  12599. value: function generateFileID() {
  12600. var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  12601. var infoStr = "".concat(info.CreationDate.getTime(), "\n");
  12602. for (var key in info) {
  12603. // eslint-disable-next-line no-prototype-builtins
  12604. if (!info.hasOwnProperty(key)) {
  12605. continue;
  12606. }
  12607. infoStr += "".concat(key, ": ").concat(info[key].valueOf(), "\n");
  12608. }
  12609. return wordArrayToBuffer(_cryptoJs.default.MD5(infoStr));
  12610. }
  12611. }, {
  12612. key: "generateRandomWordArray",
  12613. value: function generateRandomWordArray(bytes) {
  12614. return _cryptoJs.default.lib.WordArray.random(bytes);
  12615. }
  12616. }, {
  12617. key: "create",
  12618. value: function create(document) {
  12619. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12620. if (!options.ownerPassword && !options.userPassword) {
  12621. return null;
  12622. }
  12623. return new PDFSecurity(document, options);
  12624. }
  12625. }]);
  12626. function PDFSecurity(document) {
  12627. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  12628. _classCallCheck(this, PDFSecurity);
  12629. if (!options.ownerPassword && !options.userPassword) {
  12630. throw new Error('None of owner password and user password is defined.');
  12631. }
  12632. this.document = document;
  12633. this._setupEncryption(options);
  12634. }
  12635. _createClass(PDFSecurity, [{
  12636. key: "_setupEncryption",
  12637. value: function _setupEncryption(options) {
  12638. switch (options.pdfVersion) {
  12639. case '1.4':
  12640. case '1.5':
  12641. this.version = 2;
  12642. break;
  12643. case '1.6':
  12644. case '1.7':
  12645. this.version = 4;
  12646. break;
  12647. case '1.7ext3':
  12648. this.version = 5;
  12649. break;
  12650. default:
  12651. this.version = 1;
  12652. break;
  12653. }
  12654. var encDict = {
  12655. Filter: 'Standard'
  12656. };
  12657. switch (this.version) {
  12658. case 1:
  12659. case 2:
  12660. case 4:
  12661. this._setupEncryptionV1V2V4(this.version, encDict, options);
  12662. break;
  12663. case 5:
  12664. this._setupEncryptionV5(encDict, options);
  12665. break;
  12666. }
  12667. this.dictionary = this.document.ref(encDict);
  12668. }
  12669. }, {
  12670. key: "_setupEncryptionV1V2V4",
  12671. value: function _setupEncryptionV1V2V4(v, encDict, options) {
  12672. var r, permissions;
  12673. switch (v) {
  12674. case 1:
  12675. r = 2;
  12676. this.keyBits = 40;
  12677. permissions = getPermissionsR2(options.permissions);
  12678. break;
  12679. case 2:
  12680. r = 3;
  12681. this.keyBits = 128;
  12682. permissions = getPermissionsR3(options.permissions);
  12683. break;
  12684. case 4:
  12685. r = 4;
  12686. this.keyBits = 128;
  12687. permissions = getPermissionsR3(options.permissions);
  12688. break;
  12689. }
  12690. var paddedUserPassword = processPasswordR2R3R4(options.userPassword);
  12691. var paddedOwnerPassword = options.ownerPassword ? processPasswordR2R3R4(options.ownerPassword) : paddedUserPassword;
  12692. var ownerPasswordEntry = getOwnerPasswordR2R3R4(r, this.keyBits, paddedUserPassword, paddedOwnerPassword);
  12693. this.encryptionKey = getEncryptionKeyR2R3R4(r, this.keyBits, this.document._id, paddedUserPassword, ownerPasswordEntry, permissions);
  12694. var userPasswordEntry;
  12695. if (r === 2) {
  12696. userPasswordEntry = getUserPasswordR2(this.encryptionKey);
  12697. } else {
  12698. userPasswordEntry = getUserPasswordR3R4(this.document._id, this.encryptionKey);
  12699. }
  12700. encDict.V = v;
  12701. if (v >= 2) {
  12702. encDict.Length = this.keyBits;
  12703. }
  12704. if (v === 4) {
  12705. encDict.CF = {
  12706. StdCF: {
  12707. AuthEvent: 'DocOpen',
  12708. CFM: 'AESV2',
  12709. Length: this.keyBits / 8
  12710. }
  12711. };
  12712. encDict.StmF = 'StdCF';
  12713. encDict.StrF = 'StdCF';
  12714. }
  12715. encDict.R = r;
  12716. encDict.O = wordArrayToBuffer(ownerPasswordEntry);
  12717. encDict.U = wordArrayToBuffer(userPasswordEntry);
  12718. encDict.P = permissions;
  12719. }
  12720. }, {
  12721. key: "_setupEncryptionV5",
  12722. value: function _setupEncryptionV5(encDict, options) {
  12723. this.keyBits = 256;
  12724. var permissions = getPermissionsR3(options.permissions);
  12725. var processedUserPassword = processPasswordR5(options.userPassword);
  12726. var processedOwnerPassword = options.ownerPassword ? processPasswordR5(options.ownerPassword) : processedUserPassword;
  12727. this.encryptionKey = getEncryptionKeyR5(PDFSecurity.generateRandomWordArray);
  12728. var userPasswordEntry = getUserPasswordR5(processedUserPassword, PDFSecurity.generateRandomWordArray);
  12729. var userKeySalt = _cryptoJs.default.lib.WordArray.create(userPasswordEntry.words.slice(10, 12), 8);
  12730. var userEncryptionKeyEntry = getUserEncryptionKeyR5(processedUserPassword, userKeySalt, this.encryptionKey);
  12731. var ownerPasswordEntry = getOwnerPasswordR5(processedOwnerPassword, userPasswordEntry, PDFSecurity.generateRandomWordArray);
  12732. var ownerKeySalt = _cryptoJs.default.lib.WordArray.create(ownerPasswordEntry.words.slice(10, 12), 8);
  12733. var ownerEncryptionKeyEntry = getOwnerEncryptionKeyR5(processedOwnerPassword, ownerKeySalt, userPasswordEntry, this.encryptionKey);
  12734. var permsEntry = getEncryptedPermissionsR5(permissions, this.encryptionKey, PDFSecurity.generateRandomWordArray);
  12735. encDict.V = 5;
  12736. encDict.Length = this.keyBits;
  12737. encDict.CF = {
  12738. StdCF: {
  12739. AuthEvent: 'DocOpen',
  12740. CFM: 'AESV3',
  12741. Length: this.keyBits / 8
  12742. }
  12743. };
  12744. encDict.StmF = 'StdCF';
  12745. encDict.StrF = 'StdCF';
  12746. encDict.R = 5;
  12747. encDict.O = wordArrayToBuffer(ownerPasswordEntry);
  12748. encDict.OE = wordArrayToBuffer(ownerEncryptionKeyEntry);
  12749. encDict.U = wordArrayToBuffer(userPasswordEntry);
  12750. encDict.UE = wordArrayToBuffer(userEncryptionKeyEntry);
  12751. encDict.P = permissions;
  12752. encDict.Perms = wordArrayToBuffer(permsEntry);
  12753. }
  12754. }, {
  12755. key: "getEncryptFn",
  12756. value: function getEncryptFn(obj, gen) {
  12757. var digest;
  12758. if (this.version < 5) {
  12759. digest = this.encryptionKey.clone().concat(_cryptoJs.default.lib.WordArray.create([(obj & 0xff) << 24 | (obj & 0xff00) << 8 | obj >> 8 & 0xff00 | gen & 0xff, (gen & 0xff00) << 16], 5));
  12760. }
  12761. if (this.version === 1 || this.version === 2) {
  12762. var _key = _cryptoJs.default.MD5(digest);
  12763. _key.sigBytes = Math.min(16, this.keyBits / 8 + 5);
  12764. return function (buffer) {
  12765. return wordArrayToBuffer(_cryptoJs.default.RC4.encrypt(_cryptoJs.default.lib.WordArray.create(buffer), _key).ciphertext);
  12766. };
  12767. }
  12768. var key;
  12769. if (this.version === 4) {
  12770. key = _cryptoJs.default.MD5(digest.concat(_cryptoJs.default.lib.WordArray.create([0x73416c54], 4)));
  12771. } else {
  12772. key = this.encryptionKey;
  12773. }
  12774. var iv = PDFSecurity.generateRandomWordArray(16);
  12775. var options = {
  12776. mode: _cryptoJs.default.mode.CBC,
  12777. padding: _cryptoJs.default.pad.Pkcs7,
  12778. iv: iv
  12779. };
  12780. return function (buffer) {
  12781. return wordArrayToBuffer(iv.clone().concat(_cryptoJs.default.AES.encrypt(_cryptoJs.default.lib.WordArray.create(buffer), key, options).ciphertext));
  12782. };
  12783. }
  12784. }, {
  12785. key: "end",
  12786. value: function end() {
  12787. this.dictionary.end();
  12788. }
  12789. }]);
  12790. return PDFSecurity;
  12791. }();
  12792. function getPermissionsR2() {
  12793. var permissionObject = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  12794. var permissions = 0xffffffc0 >> 0;
  12795. if (permissionObject.printing) {
  12796. permissions |= 4;
  12797. }
  12798. if (permissionObject.modifying) {
  12799. permissions |= 8;
  12800. }
  12801. if (permissionObject.copying) {
  12802. permissions |= 16;
  12803. }
  12804. if (permissionObject.annotating) {
  12805. permissions |= 32;
  12806. }
  12807. return permissions;
  12808. }
  12809. function getPermissionsR3() {
  12810. var permissionObject = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  12811. var permissions = 0xfffff0c0 >> 0;
  12812. if (permissionObject.printing === 'lowResolution') {
  12813. permissions |= 4;
  12814. }
  12815. if (permissionObject.printing === 'highResolution') {
  12816. permissions |= 2052;
  12817. }
  12818. if (permissionObject.modifying) {
  12819. permissions |= 8;
  12820. }
  12821. if (permissionObject.copying) {
  12822. permissions |= 16;
  12823. }
  12824. if (permissionObject.annotating) {
  12825. permissions |= 32;
  12826. }
  12827. if (permissionObject.fillingForms) {
  12828. permissions |= 256;
  12829. }
  12830. if (permissionObject.contentAccessibility) {
  12831. permissions |= 512;
  12832. }
  12833. if (permissionObject.documentAssembly) {
  12834. permissions |= 1024;
  12835. }
  12836. return permissions;
  12837. }
  12838. function getUserPasswordR2(encryptionKey) {
  12839. return _cryptoJs.default.RC4.encrypt(processPasswordR2R3R4(), encryptionKey).ciphertext;
  12840. }
  12841. function getUserPasswordR3R4(documentId, encryptionKey) {
  12842. var key = encryptionKey.clone();
  12843. var cipher = _cryptoJs.default.MD5(processPasswordR2R3R4().concat(_cryptoJs.default.lib.WordArray.create(documentId)));
  12844. for (var i = 0; i < 20; i++) {
  12845. var xorRound = Math.ceil(key.sigBytes / 4);
  12846. for (var j = 0; j < xorRound; j++) {
  12847. key.words[j] = encryptionKey.words[j] ^ (i | i << 8 | i << 16 | i << 24);
  12848. }
  12849. cipher = _cryptoJs.default.RC4.encrypt(cipher, key).ciphertext;
  12850. }
  12851. return cipher.concat(_cryptoJs.default.lib.WordArray.create(null, 16));
  12852. }
  12853. function getOwnerPasswordR2R3R4(r, keyBits, paddedUserPassword, paddedOwnerPassword) {
  12854. var digest = paddedOwnerPassword;
  12855. var round = r >= 3 ? 51 : 1;
  12856. for (var i = 0; i < round; i++) {
  12857. digest = _cryptoJs.default.MD5(digest);
  12858. }
  12859. var key = digest.clone();
  12860. key.sigBytes = keyBits / 8;
  12861. var cipher = paddedUserPassword;
  12862. round = r >= 3 ? 20 : 1;
  12863. for (var _i = 0; _i < round; _i++) {
  12864. var xorRound = Math.ceil(key.sigBytes / 4);
  12865. for (var j = 0; j < xorRound; j++) {
  12866. key.words[j] = digest.words[j] ^ (_i | _i << 8 | _i << 16 | _i << 24);
  12867. }
  12868. cipher = _cryptoJs.default.RC4.encrypt(cipher, key).ciphertext;
  12869. }
  12870. return cipher;
  12871. }
  12872. function getEncryptionKeyR2R3R4(r, keyBits, documentId, paddedUserPassword, ownerPasswordEntry, permissions) {
  12873. var key = paddedUserPassword.clone().concat(ownerPasswordEntry).concat(_cryptoJs.default.lib.WordArray.create([lsbFirstWord(permissions)], 4)).concat(_cryptoJs.default.lib.WordArray.create(documentId));
  12874. var round = r >= 3 ? 51 : 1;
  12875. for (var i = 0; i < round; i++) {
  12876. key = _cryptoJs.default.MD5(key);
  12877. key.sigBytes = keyBits / 8;
  12878. }
  12879. return key;
  12880. }
  12881. function getUserPasswordR5(processedUserPassword, generateRandomWordArray) {
  12882. var validationSalt = generateRandomWordArray(8);
  12883. var keySalt = generateRandomWordArray(8);
  12884. return _cryptoJs.default.SHA256(processedUserPassword.clone().concat(validationSalt)).concat(validationSalt).concat(keySalt);
  12885. }
  12886. function getUserEncryptionKeyR5(processedUserPassword, userKeySalt, encryptionKey) {
  12887. var key = _cryptoJs.default.SHA256(processedUserPassword.clone().concat(userKeySalt));
  12888. var options = {
  12889. mode: _cryptoJs.default.mode.CBC,
  12890. padding: _cryptoJs.default.pad.NoPadding,
  12891. iv: _cryptoJs.default.lib.WordArray.create(null, 16)
  12892. };
  12893. return _cryptoJs.default.AES.encrypt(encryptionKey, key, options).ciphertext;
  12894. }
  12895. function getOwnerPasswordR5(processedOwnerPassword, userPasswordEntry, generateRandomWordArray) {
  12896. var validationSalt = generateRandomWordArray(8);
  12897. var keySalt = generateRandomWordArray(8);
  12898. return _cryptoJs.default.SHA256(processedOwnerPassword.clone().concat(validationSalt).concat(userPasswordEntry)).concat(validationSalt).concat(keySalt);
  12899. }
  12900. function getOwnerEncryptionKeyR5(processedOwnerPassword, ownerKeySalt, userPasswordEntry, encryptionKey) {
  12901. var key = _cryptoJs.default.SHA256(processedOwnerPassword.clone().concat(ownerKeySalt).concat(userPasswordEntry));
  12902. var options = {
  12903. mode: _cryptoJs.default.mode.CBC,
  12904. padding: _cryptoJs.default.pad.NoPadding,
  12905. iv: _cryptoJs.default.lib.WordArray.create(null, 16)
  12906. };
  12907. return _cryptoJs.default.AES.encrypt(encryptionKey, key, options).ciphertext;
  12908. }
  12909. function getEncryptionKeyR5(generateRandomWordArray) {
  12910. return generateRandomWordArray(32);
  12911. }
  12912. function getEncryptedPermissionsR5(permissions, encryptionKey, generateRandomWordArray) {
  12913. var cipher = _cryptoJs.default.lib.WordArray.create([lsbFirstWord(permissions), 0xffffffff, 0x54616462], 12).concat(generateRandomWordArray(4));
  12914. var options = {
  12915. mode: _cryptoJs.default.mode.ECB,
  12916. padding: _cryptoJs.default.pad.NoPadding
  12917. };
  12918. return _cryptoJs.default.AES.encrypt(cipher, encryptionKey, options).ciphertext;
  12919. }
  12920. function processPasswordR2R3R4() {
  12921. var password = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  12922. var out = Buffer.alloc(32);
  12923. var length = password.length;
  12924. var index = 0;
  12925. while (index < length && index < 32) {
  12926. var code = password.charCodeAt(index);
  12927. if (code > 0xff) {
  12928. throw new Error('Password contains one or more invalid characters.');
  12929. }
  12930. out[index] = code;
  12931. index++;
  12932. }
  12933. while (index < 32) {
  12934. out[index] = PASSWORD_PADDING[index - length];
  12935. index++;
  12936. }
  12937. return _cryptoJs.default.lib.WordArray.create(out);
  12938. }
  12939. function processPasswordR5() {
  12940. var password = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
  12941. password = unescape(encodeURIComponent(saslprep(password)));
  12942. var length = Math.min(127, password.length);
  12943. var out = Buffer.alloc(length);
  12944. for (var i = 0; i < length; i++) {
  12945. out[i] = password.charCodeAt(i);
  12946. }
  12947. return _cryptoJs.default.lib.WordArray.create(out);
  12948. }
  12949. function lsbFirstWord(data) {
  12950. return (data & 0xff) << 24 | (data & 0xff00) << 8 | data >> 8 & 0xff00 | data >> 24 & 0xff;
  12951. }
  12952. function wordArrayToBuffer(wordArray) {
  12953. var byteArray = [];
  12954. for (var i = 0; i < wordArray.sigBytes; i++) {
  12955. byteArray.push(wordArray.words[Math.floor(i / 4)] >> 8 * (3 - i % 4) & 0xff);
  12956. }
  12957. return Buffer.from(byteArray);
  12958. }
  12959. var PASSWORD_PADDING = [0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a];
  12960. var number = PDFObject.number;
  12961. var PDFGradient = /*#__PURE__*/function () {
  12962. function PDFGradient(doc) {
  12963. _classCallCheck(this, PDFGradient);
  12964. this.doc = doc;
  12965. this.stops = [];
  12966. this.embedded = false;
  12967. this.transform = [1, 0, 0, 1, 0, 0];
  12968. }
  12969. _createClass(PDFGradient, [{
  12970. key: "stop",
  12971. value: function stop(pos, color, opacity) {
  12972. if (opacity == null) {
  12973. opacity = 1;
  12974. }
  12975. color = this.doc._normalizeColor(color);
  12976. if (this.stops.length === 0) {
  12977. if (color.length === 3) {
  12978. this._colorSpace = 'DeviceRGB';
  12979. } else if (color.length === 4) {
  12980. this._colorSpace = 'DeviceCMYK';
  12981. } else if (color.length === 1) {
  12982. this._colorSpace = 'DeviceGray';
  12983. } else {
  12984. throw new Error('Unknown color space');
  12985. }
  12986. } else if (this._colorSpace === 'DeviceRGB' && color.length !== 3 || this._colorSpace === 'DeviceCMYK' && color.length !== 4 || this._colorSpace === 'DeviceGray' && color.length !== 1) {
  12987. throw new Error('All gradient stops must use the same color space');
  12988. }
  12989. opacity = Math.max(0, Math.min(1, opacity));
  12990. this.stops.push([pos, color, opacity]);
  12991. return this;
  12992. }
  12993. }, {
  12994. key: "setTransform",
  12995. value: function setTransform(m11, m12, m21, m22, dx, dy) {
  12996. this.transform = [m11, m12, m21, m22, dx, dy];
  12997. return this;
  12998. }
  12999. }, {
  13000. key: "embed",
  13001. value: function embed(m) {
  13002. var fn;
  13003. var stopsLength = this.stops.length;
  13004. if (stopsLength === 0) {
  13005. return;
  13006. }
  13007. this.embedded = true;
  13008. this.matrix = m; // if the last stop comes before 100%, add a copy at 100%
  13009. var last = this.stops[stopsLength - 1];
  13010. if (last[0] < 1) {
  13011. this.stops.push([1, last[1], last[2]]);
  13012. }
  13013. var bounds = [];
  13014. var encode = [];
  13015. var stops = [];
  13016. for (var i = 0; i < stopsLength - 1; i++) {
  13017. encode.push(0, 1);
  13018. if (i + 2 !== stopsLength) {
  13019. bounds.push(this.stops[i + 1][0]);
  13020. }
  13021. fn = this.doc.ref({
  13022. FunctionType: 2,
  13023. Domain: [0, 1],
  13024. C0: this.stops[i + 0][1],
  13025. C1: this.stops[i + 1][1],
  13026. N: 1
  13027. });
  13028. stops.push(fn);
  13029. fn.end();
  13030. } // if there are only two stops, we don't need a stitching function
  13031. if (stopsLength === 1) {
  13032. fn = stops[0];
  13033. } else {
  13034. fn = this.doc.ref({
  13035. FunctionType: 3,
  13036. // stitching function
  13037. Domain: [0, 1],
  13038. Functions: stops,
  13039. Bounds: bounds,
  13040. Encode: encode
  13041. });
  13042. fn.end();
  13043. }
  13044. this.id = "Sh".concat(++this.doc._gradCount);
  13045. var shader = this.shader(fn);
  13046. shader.end();
  13047. var pattern = this.doc.ref({
  13048. Type: 'Pattern',
  13049. PatternType: 2,
  13050. Shading: shader,
  13051. Matrix: this.matrix.map(number)
  13052. });
  13053. pattern.end();
  13054. if (this.stops.some(function (stop) {
  13055. return stop[2] < 1;
  13056. })) {
  13057. var grad = this.opacityGradient();
  13058. grad._colorSpace = 'DeviceGray';
  13059. var _iterator = _createForOfIteratorHelper(this.stops),
  13060. _step;
  13061. try {
  13062. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  13063. var stop = _step.value;
  13064. grad.stop(stop[0], [stop[2]]);
  13065. }
  13066. } catch (err) {
  13067. _iterator.e(err);
  13068. } finally {
  13069. _iterator.f();
  13070. }
  13071. grad = grad.embed(this.matrix);
  13072. var pageBBox = [0, 0, this.doc.page.width, this.doc.page.height];
  13073. var form = this.doc.ref({
  13074. Type: 'XObject',
  13075. Subtype: 'Form',
  13076. FormType: 1,
  13077. BBox: pageBBox,
  13078. Group: {
  13079. Type: 'Group',
  13080. S: 'Transparency',
  13081. CS: 'DeviceGray'
  13082. },
  13083. Resources: {
  13084. ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'],
  13085. Pattern: {
  13086. Sh1: grad
  13087. }
  13088. }
  13089. });
  13090. form.write('/Pattern cs /Sh1 scn');
  13091. form.end("".concat(pageBBox.join(' '), " re f"));
  13092. var gstate = this.doc.ref({
  13093. Type: 'ExtGState',
  13094. SMask: {
  13095. Type: 'Mask',
  13096. S: 'Luminosity',
  13097. G: form
  13098. }
  13099. });
  13100. gstate.end();
  13101. var opacityPattern = this.doc.ref({
  13102. Type: 'Pattern',
  13103. PatternType: 1,
  13104. PaintType: 1,
  13105. TilingType: 2,
  13106. BBox: pageBBox,
  13107. XStep: pageBBox[2],
  13108. YStep: pageBBox[3],
  13109. Resources: {
  13110. ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'],
  13111. Pattern: {
  13112. Sh1: pattern
  13113. },
  13114. ExtGState: {
  13115. Gs1: gstate
  13116. }
  13117. }
  13118. });
  13119. opacityPattern.write('/Gs1 gs /Pattern cs /Sh1 scn');
  13120. opacityPattern.end("".concat(pageBBox.join(' '), " re f"));
  13121. this.doc.page.patterns[this.id] = opacityPattern;
  13122. } else {
  13123. this.doc.page.patterns[this.id] = pattern;
  13124. }
  13125. return pattern;
  13126. }
  13127. }, {
  13128. key: "apply",
  13129. value: function apply(stroke) {
  13130. // apply gradient transform to existing document ctm
  13131. var _this$doc$_ctm = _slicedToArray(this.doc._ctm, 6),
  13132. m0 = _this$doc$_ctm[0],
  13133. m1 = _this$doc$_ctm[1],
  13134. m2 = _this$doc$_ctm[2],
  13135. m3 = _this$doc$_ctm[3],
  13136. m4 = _this$doc$_ctm[4],
  13137. m5 = _this$doc$_ctm[5];
  13138. var _this$transform = _slicedToArray(this.transform, 6),
  13139. m11 = _this$transform[0],
  13140. m12 = _this$transform[1],
  13141. m21 = _this$transform[2],
  13142. m22 = _this$transform[3],
  13143. dx = _this$transform[4],
  13144. dy = _this$transform[5];
  13145. var m = [m0 * m11 + m2 * m12, m1 * m11 + m3 * m12, m0 * m21 + m2 * m22, m1 * m21 + m3 * m22, m0 * dx + m2 * dy + m4, m1 * dx + m3 * dy + m5];
  13146. if (!this.embedded || m.join(' ') !== this.matrix.join(' ')) {
  13147. this.embed(m);
  13148. }
  13149. this.doc._setColorSpace('Pattern', stroke);
  13150. var op = stroke ? 'SCN' : 'scn';
  13151. return this.doc.addContent("/".concat(this.id, " ").concat(op));
  13152. }
  13153. }]);
  13154. return PDFGradient;
  13155. }();
  13156. var PDFLinearGradient = /*#__PURE__*/function (_PDFGradient) {
  13157. _inherits(PDFLinearGradient, _PDFGradient);
  13158. var _super = _createSuper(PDFLinearGradient);
  13159. function PDFLinearGradient(doc, x1, y1, x2, y2) {
  13160. var _this;
  13161. _classCallCheck(this, PDFLinearGradient);
  13162. _this = _super.call(this, doc);
  13163. _this.x1 = x1;
  13164. _this.y1 = y1;
  13165. _this.x2 = x2;
  13166. _this.y2 = y2;
  13167. return _this;
  13168. }
  13169. _createClass(PDFLinearGradient, [{
  13170. key: "shader",
  13171. value: function shader(fn) {
  13172. return this.doc.ref({
  13173. ShadingType: 2,
  13174. ColorSpace: this._colorSpace,
  13175. Coords: [this.x1, this.y1, this.x2, this.y2],
  13176. Function: fn,
  13177. Extend: [true, true]
  13178. });
  13179. }
  13180. }, {
  13181. key: "opacityGradient",
  13182. value: function opacityGradient() {
  13183. return new PDFLinearGradient(this.doc, this.x1, this.y1, this.x2, this.y2);
  13184. }
  13185. }]);
  13186. return PDFLinearGradient;
  13187. }(PDFGradient);
  13188. var PDFRadialGradient = /*#__PURE__*/function (_PDFGradient2) {
  13189. _inherits(PDFRadialGradient, _PDFGradient2);
  13190. var _super2 = _createSuper(PDFRadialGradient);
  13191. function PDFRadialGradient(doc, x1, y1, r1, x2, y2, r2) {
  13192. var _this2;
  13193. _classCallCheck(this, PDFRadialGradient);
  13194. _this2 = _super2.call(this, doc);
  13195. _this2.doc = doc;
  13196. _this2.x1 = x1;
  13197. _this2.y1 = y1;
  13198. _this2.r1 = r1;
  13199. _this2.x2 = x2;
  13200. _this2.y2 = y2;
  13201. _this2.r2 = r2;
  13202. return _this2;
  13203. }
  13204. _createClass(PDFRadialGradient, [{
  13205. key: "shader",
  13206. value: function shader(fn) {
  13207. return this.doc.ref({
  13208. ShadingType: 3,
  13209. ColorSpace: this._colorSpace,
  13210. Coords: [this.x1, this.y1, this.r1, this.x2, this.y2, this.r2],
  13211. Function: fn,
  13212. Extend: [true, true]
  13213. });
  13214. }
  13215. }, {
  13216. key: "opacityGradient",
  13217. value: function opacityGradient() {
  13218. return new PDFRadialGradient(this.doc, this.x1, this.y1, this.r1, this.x2, this.y2, this.r2);
  13219. }
  13220. }]);
  13221. return PDFRadialGradient;
  13222. }(PDFGradient);
  13223. var Gradient = {
  13224. PDFGradient: PDFGradient,
  13225. PDFLinearGradient: PDFLinearGradient,
  13226. PDFRadialGradient: PDFRadialGradient
  13227. };
  13228. /*
  13229. PDF tiling pattern support. Uncolored only.
  13230. */
  13231. var underlyingColorSpaces = ['DeviceCMYK', 'DeviceRGB'];
  13232. var PDFTilingPattern = /*#__PURE__*/function () {
  13233. function PDFTilingPattern(doc, bBox, xStep, yStep, stream) {
  13234. _classCallCheck(this, PDFTilingPattern);
  13235. this.doc = doc;
  13236. this.bBox = bBox;
  13237. this.xStep = xStep;
  13238. this.yStep = yStep;
  13239. this.stream = stream;
  13240. }
  13241. _createClass(PDFTilingPattern, [{
  13242. key: "createPattern",
  13243. value: function createPattern() {
  13244. // no resources needed for our current usage
  13245. // required entry
  13246. var resources = this.doc.ref();
  13247. resources.end(); // apply default transform matrix (flipped in the default doc._ctm)
  13248. // see document.js & gradient.js
  13249. var _this$doc$_ctm = _slicedToArray(this.doc._ctm, 6),
  13250. m0 = _this$doc$_ctm[0],
  13251. m1 = _this$doc$_ctm[1],
  13252. m2 = _this$doc$_ctm[2],
  13253. m3 = _this$doc$_ctm[3],
  13254. m4 = _this$doc$_ctm[4],
  13255. m5 = _this$doc$_ctm[5];
  13256. var m11 = 1,
  13257. m12 = 0,
  13258. m21 = 0,
  13259. m22 = 1,
  13260. dx = 0,
  13261. dy = 0;
  13262. var m = [m0 * m11 + m2 * m12, m1 * m11 + m3 * m12, m0 * m21 + m2 * m22, m1 * m21 + m3 * m22, m0 * dx + m2 * dy + m4, m1 * dx + m3 * dy + m5];
  13263. var pattern = this.doc.ref({
  13264. Type: 'Pattern',
  13265. PatternType: 1,
  13266. // tiling
  13267. PaintType: 2,
  13268. // 1-colored, 2-uncolored
  13269. TilingType: 2,
  13270. // 2-no distortion
  13271. BBox: this.bBox,
  13272. XStep: this.xStep,
  13273. YStep: this.yStep,
  13274. Matrix: m.map(function (v) {
  13275. return +v.toFixed(5);
  13276. }),
  13277. Resources: resources
  13278. });
  13279. pattern.end(this.stream);
  13280. return pattern;
  13281. }
  13282. }, {
  13283. key: "embedPatternColorSpaces",
  13284. value: function embedPatternColorSpaces() {
  13285. var _this = this; // map each pattern to an underlying color space
  13286. // and embed on each page
  13287. underlyingColorSpaces.forEach(function (csName) {
  13288. var csId = _this.getPatternColorSpaceId(csName);
  13289. if (_this.doc.page.colorSpaces[csId]) return;
  13290. var cs = _this.doc.ref(['Pattern', csName]);
  13291. cs.end();
  13292. _this.doc.page.colorSpaces[csId] = cs;
  13293. });
  13294. }
  13295. }, {
  13296. key: "getPatternColorSpaceId",
  13297. value: function getPatternColorSpaceId(underlyingColorspace) {
  13298. return "CsP".concat(underlyingColorspace);
  13299. }
  13300. }, {
  13301. key: "embed",
  13302. value: function embed() {
  13303. if (!this.id) {
  13304. this.doc._patternCount = this.doc._patternCount + 1;
  13305. this.id = 'P' + this.doc._patternCount;
  13306. this.pattern = this.createPattern();
  13307. } // patterns are embedded in each page
  13308. if (!this.doc.page.patterns[this.id]) {
  13309. this.doc.page.patterns[this.id] = this.pattern;
  13310. }
  13311. }
  13312. }, {
  13313. key: "apply",
  13314. value: function apply(stroke, patternColor) {
  13315. // do any embedding/creating that might be needed
  13316. this.embedPatternColorSpaces();
  13317. this.embed();
  13318. var normalizedColor = this.doc._normalizeColor(patternColor);
  13319. if (!normalizedColor) throw Error("invalid pattern color. (value: ".concat(patternColor, ")")); // select one of the pattern color spaces
  13320. var csId = this.getPatternColorSpaceId(this.doc._getColorSpace(normalizedColor));
  13321. this.doc._setColorSpace(csId, stroke); // stroke/fill using the pattern and color (in the above underlying color space)
  13322. var op = stroke ? 'SCN' : 'scn';
  13323. return this.doc.addContent("".concat(normalizedColor.join(' '), " /").concat(this.id, " ").concat(op));
  13324. }
  13325. }]);
  13326. return PDFTilingPattern;
  13327. }();
  13328. var pattern = {
  13329. PDFTilingPattern: PDFTilingPattern
  13330. };
  13331. var PDFGradient$1 = Gradient.PDFGradient,
  13332. PDFLinearGradient$1 = Gradient.PDFLinearGradient,
  13333. PDFRadialGradient$1 = Gradient.PDFRadialGradient;
  13334. var PDFTilingPattern$1 = pattern.PDFTilingPattern;
  13335. var ColorMixin = {
  13336. initColor: function initColor() {
  13337. // The opacity dictionaries
  13338. this._opacityRegistry = {};
  13339. this._opacityCount = 0;
  13340. this._patternCount = 0;
  13341. return this._gradCount = 0;
  13342. },
  13343. _normalizeColor: function _normalizeColor(color) {
  13344. if (typeof color === 'string') {
  13345. if (color.charAt(0) === '#') {
  13346. if (color.length === 4) {
  13347. color = color.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i, '#$1$1$2$2$3$3');
  13348. }
  13349. var hex = parseInt(color.slice(1), 16);
  13350. color = [hex >> 16, hex >> 8 & 0xff, hex & 0xff];
  13351. } else if (namedColors[color]) {
  13352. color = namedColors[color];
  13353. }
  13354. }
  13355. if (Array.isArray(color)) {
  13356. // RGB
  13357. if (color.length === 3) {
  13358. color = color.map(function (part) {
  13359. return part / 255;
  13360. }); // CMYK
  13361. } else if (color.length === 4) {
  13362. color = color.map(function (part) {
  13363. return part / 100;
  13364. });
  13365. }
  13366. return color;
  13367. }
  13368. return null;
  13369. },
  13370. _setColor: function _setColor(color, stroke) {
  13371. if (color instanceof PDFGradient$1) {
  13372. color.apply(stroke);
  13373. return true; // see if tiling pattern, decode & apply it it
  13374. } else if (Array.isArray(color) && color[0] instanceof PDFTilingPattern$1) {
  13375. color[0].apply(stroke, color[1]);
  13376. return true;
  13377. } // any other case should be a normal color and not a pattern
  13378. return this._setColorCore(color, stroke);
  13379. },
  13380. _setColorCore: function _setColorCore(color, stroke) {
  13381. color = this._normalizeColor(color);
  13382. if (!color) {
  13383. return false;
  13384. }
  13385. var op = stroke ? 'SCN' : 'scn';
  13386. var space = this._getColorSpace(color);
  13387. this._setColorSpace(space, stroke);
  13388. color = color.join(' ');
  13389. this.addContent("".concat(color, " ").concat(op));
  13390. return true;
  13391. },
  13392. _setColorSpace: function _setColorSpace(space, stroke) {
  13393. var op = stroke ? 'CS' : 'cs';
  13394. return this.addContent("/".concat(space, " ").concat(op));
  13395. },
  13396. _getColorSpace: function _getColorSpace(color) {
  13397. return color.length === 4 ? 'DeviceCMYK' : 'DeviceRGB';
  13398. },
  13399. fillColor: function fillColor(color, opacity) {
  13400. var set = this._setColor(color, false);
  13401. if (set) {
  13402. this.fillOpacity(opacity);
  13403. } // save this for text wrapper, which needs to reset
  13404. // the fill color on new pages
  13405. this._fillColor = [color, opacity];
  13406. return this;
  13407. },
  13408. strokeColor: function strokeColor(color, opacity) {
  13409. var set = this._setColor(color, true);
  13410. if (set) {
  13411. this.strokeOpacity(opacity);
  13412. }
  13413. return this;
  13414. },
  13415. opacity: function opacity(_opacity) {
  13416. this._doOpacity(_opacity, _opacity);
  13417. return this;
  13418. },
  13419. fillOpacity: function fillOpacity(opacity) {
  13420. this._doOpacity(opacity, null);
  13421. return this;
  13422. },
  13423. strokeOpacity: function strokeOpacity(opacity) {
  13424. this._doOpacity(null, opacity);
  13425. return this;
  13426. },
  13427. _doOpacity: function _doOpacity(fillOpacity, strokeOpacity) {
  13428. var dictionary, name;
  13429. if (fillOpacity == null && strokeOpacity == null) {
  13430. return;
  13431. }
  13432. if (fillOpacity != null) {
  13433. fillOpacity = Math.max(0, Math.min(1, fillOpacity));
  13434. }
  13435. if (strokeOpacity != null) {
  13436. strokeOpacity = Math.max(0, Math.min(1, strokeOpacity));
  13437. }
  13438. var key = "".concat(fillOpacity, "_").concat(strokeOpacity);
  13439. if (this._opacityRegistry[key]) {
  13440. var _this$_opacityRegistr = _slicedToArray(this._opacityRegistry[key], 2);
  13441. dictionary = _this$_opacityRegistr[0];
  13442. name = _this$_opacityRegistr[1];
  13443. } else {
  13444. dictionary = {
  13445. Type: 'ExtGState'
  13446. };
  13447. if (fillOpacity != null) {
  13448. dictionary.ca = fillOpacity;
  13449. }
  13450. if (strokeOpacity != null) {
  13451. dictionary.CA = strokeOpacity;
  13452. }
  13453. dictionary = this.ref(dictionary);
  13454. dictionary.end();
  13455. var id = ++this._opacityCount;
  13456. name = "Gs".concat(id);
  13457. this._opacityRegistry[key] = [dictionary, name];
  13458. }
  13459. this.page.ext_gstates[name] = dictionary;
  13460. return this.addContent("/".concat(name, " gs"));
  13461. },
  13462. linearGradient: function linearGradient(x1, y1, x2, y2) {
  13463. return new PDFLinearGradient$1(this, x1, y1, x2, y2);
  13464. },
  13465. radialGradient: function radialGradient(x1, y1, r1, x2, y2, r2) {
  13466. return new PDFRadialGradient$1(this, x1, y1, r1, x2, y2, r2);
  13467. },
  13468. pattern: function pattern(bbox, xStep, yStep, stream) {
  13469. return new PDFTilingPattern$1(this, bbox, xStep, yStep, stream);
  13470. }
  13471. };
  13472. var namedColors = {
  13473. aliceblue: [240, 248, 255],
  13474. antiquewhite: [250, 235, 215],
  13475. aqua: [0, 255, 255],
  13476. aquamarine: [127, 255, 212],
  13477. azure: [240, 255, 255],
  13478. beige: [245, 245, 220],
  13479. bisque: [255, 228, 196],
  13480. black: [0, 0, 0],
  13481. blanchedalmond: [255, 235, 205],
  13482. blue: [0, 0, 255],
  13483. blueviolet: [138, 43, 226],
  13484. brown: [165, 42, 42],
  13485. burlywood: [222, 184, 135],
  13486. cadetblue: [95, 158, 160],
  13487. chartreuse: [127, 255, 0],
  13488. chocolate: [210, 105, 30],
  13489. coral: [255, 127, 80],
  13490. cornflowerblue: [100, 149, 237],
  13491. cornsilk: [255, 248, 220],
  13492. crimson: [220, 20, 60],
  13493. cyan: [0, 255, 255],
  13494. darkblue: [0, 0, 139],
  13495. darkcyan: [0, 139, 139],
  13496. darkgoldenrod: [184, 134, 11],
  13497. darkgray: [169, 169, 169],
  13498. darkgreen: [0, 100, 0],
  13499. darkgrey: [169, 169, 169],
  13500. darkkhaki: [189, 183, 107],
  13501. darkmagenta: [139, 0, 139],
  13502. darkolivegreen: [85, 107, 47],
  13503. darkorange: [255, 140, 0],
  13504. darkorchid: [153, 50, 204],
  13505. darkred: [139, 0, 0],
  13506. darksalmon: [233, 150, 122],
  13507. darkseagreen: [143, 188, 143],
  13508. darkslateblue: [72, 61, 139],
  13509. darkslategray: [47, 79, 79],
  13510. darkslategrey: [47, 79, 79],
  13511. darkturquoise: [0, 206, 209],
  13512. darkviolet: [148, 0, 211],
  13513. deeppink: [255, 20, 147],
  13514. deepskyblue: [0, 191, 255],
  13515. dimgray: [105, 105, 105],
  13516. dimgrey: [105, 105, 105],
  13517. dodgerblue: [30, 144, 255],
  13518. firebrick: [178, 34, 34],
  13519. floralwhite: [255, 250, 240],
  13520. forestgreen: [34, 139, 34],
  13521. fuchsia: [255, 0, 255],
  13522. gainsboro: [220, 220, 220],
  13523. ghostwhite: [248, 248, 255],
  13524. gold: [255, 215, 0],
  13525. goldenrod: [218, 165, 32],
  13526. gray: [128, 128, 128],
  13527. grey: [128, 128, 128],
  13528. green: [0, 128, 0],
  13529. greenyellow: [173, 255, 47],
  13530. honeydew: [240, 255, 240],
  13531. hotpink: [255, 105, 180],
  13532. indianred: [205, 92, 92],
  13533. indigo: [75, 0, 130],
  13534. ivory: [255, 255, 240],
  13535. khaki: [240, 230, 140],
  13536. lavender: [230, 230, 250],
  13537. lavenderblush: [255, 240, 245],
  13538. lawngreen: [124, 252, 0],
  13539. lemonchiffon: [255, 250, 205],
  13540. lightblue: [173, 216, 230],
  13541. lightcoral: [240, 128, 128],
  13542. lightcyan: [224, 255, 255],
  13543. lightgoldenrodyellow: [250, 250, 210],
  13544. lightgray: [211, 211, 211],
  13545. lightgreen: [144, 238, 144],
  13546. lightgrey: [211, 211, 211],
  13547. lightpink: [255, 182, 193],
  13548. lightsalmon: [255, 160, 122],
  13549. lightseagreen: [32, 178, 170],
  13550. lightskyblue: [135, 206, 250],
  13551. lightslategray: [119, 136, 153],
  13552. lightslategrey: [119, 136, 153],
  13553. lightsteelblue: [176, 196, 222],
  13554. lightyellow: [255, 255, 224],
  13555. lime: [0, 255, 0],
  13556. limegreen: [50, 205, 50],
  13557. linen: [250, 240, 230],
  13558. magenta: [255, 0, 255],
  13559. maroon: [128, 0, 0],
  13560. mediumaquamarine: [102, 205, 170],
  13561. mediumblue: [0, 0, 205],
  13562. mediumorchid: [186, 85, 211],
  13563. mediumpurple: [147, 112, 219],
  13564. mediumseagreen: [60, 179, 113],
  13565. mediumslateblue: [123, 104, 238],
  13566. mediumspringgreen: [0, 250, 154],
  13567. mediumturquoise: [72, 209, 204],
  13568. mediumvioletred: [199, 21, 133],
  13569. midnightblue: [25, 25, 112],
  13570. mintcream: [245, 255, 250],
  13571. mistyrose: [255, 228, 225],
  13572. moccasin: [255, 228, 181],
  13573. navajowhite: [255, 222, 173],
  13574. navy: [0, 0, 128],
  13575. oldlace: [253, 245, 230],
  13576. olive: [128, 128, 0],
  13577. olivedrab: [107, 142, 35],
  13578. orange: [255, 165, 0],
  13579. orangered: [255, 69, 0],
  13580. orchid: [218, 112, 214],
  13581. palegoldenrod: [238, 232, 170],
  13582. palegreen: [152, 251, 152],
  13583. paleturquoise: [175, 238, 238],
  13584. palevioletred: [219, 112, 147],
  13585. papayawhip: [255, 239, 213],
  13586. peachpuff: [255, 218, 185],
  13587. peru: [205, 133, 63],
  13588. pink: [255, 192, 203],
  13589. plum: [221, 160, 221],
  13590. powderblue: [176, 224, 230],
  13591. purple: [128, 0, 128],
  13592. red: [255, 0, 0],
  13593. rosybrown: [188, 143, 143],
  13594. royalblue: [65, 105, 225],
  13595. saddlebrown: [139, 69, 19],
  13596. salmon: [250, 128, 114],
  13597. sandybrown: [244, 164, 96],
  13598. seagreen: [46, 139, 87],
  13599. seashell: [255, 245, 238],
  13600. sienna: [160, 82, 45],
  13601. silver: [192, 192, 192],
  13602. skyblue: [135, 206, 235],
  13603. slateblue: [106, 90, 205],
  13604. slategray: [112, 128, 144],
  13605. slategrey: [112, 128, 144],
  13606. snow: [255, 250, 250],
  13607. springgreen: [0, 255, 127],
  13608. steelblue: [70, 130, 180],
  13609. tan: [210, 180, 140],
  13610. teal: [0, 128, 128],
  13611. thistle: [216, 191, 216],
  13612. tomato: [255, 99, 71],
  13613. turquoise: [64, 224, 208],
  13614. violet: [238, 130, 238],
  13615. wheat: [245, 222, 179],
  13616. white: [255, 255, 255],
  13617. whitesmoke: [245, 245, 245],
  13618. yellow: [255, 255, 0],
  13619. yellowgreen: [154, 205, 50]
  13620. };
  13621. var cx, cy, px, py, sx, sy;
  13622. cx = cy = px = py = sx = sy = 0;
  13623. var parameters = {
  13624. A: 7,
  13625. a: 7,
  13626. C: 6,
  13627. c: 6,
  13628. H: 1,
  13629. h: 1,
  13630. L: 2,
  13631. l: 2,
  13632. M: 2,
  13633. m: 2,
  13634. Q: 4,
  13635. q: 4,
  13636. S: 4,
  13637. s: 4,
  13638. T: 2,
  13639. t: 2,
  13640. V: 1,
  13641. v: 1,
  13642. Z: 0,
  13643. z: 0
  13644. };
  13645. var parse = function parse(path) {
  13646. var cmd;
  13647. var ret = [];
  13648. var args = [];
  13649. var curArg = '';
  13650. var foundDecimal = false;
  13651. var params = 0;
  13652. var _iterator = _createForOfIteratorHelper(path),
  13653. _step;
  13654. try {
  13655. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  13656. var c = _step.value;
  13657. if (parameters[c] != null) {
  13658. params = parameters[c];
  13659. if (cmd) {
  13660. // save existing command
  13661. if (curArg.length > 0) {
  13662. args[args.length] = +curArg;
  13663. }
  13664. ret[ret.length] = {
  13665. cmd: cmd,
  13666. args: args
  13667. };
  13668. args = [];
  13669. curArg = '';
  13670. foundDecimal = false;
  13671. }
  13672. cmd = c;
  13673. } else if ([' ', ','].includes(c) || c === '-' && curArg.length > 0 && curArg[curArg.length - 1] !== 'e' || c === '.' && foundDecimal) {
  13674. if (curArg.length === 0) {
  13675. continue;
  13676. }
  13677. if (args.length === params) {
  13678. // handle reused commands
  13679. ret[ret.length] = {
  13680. cmd: cmd,
  13681. args: args
  13682. };
  13683. args = [+curArg]; // handle assumed commands
  13684. if (cmd === 'M') {
  13685. cmd = 'L';
  13686. }
  13687. if (cmd === 'm') {
  13688. cmd = 'l';
  13689. }
  13690. } else {
  13691. args[args.length] = +curArg;
  13692. }
  13693. foundDecimal = c === '.'; // fix for negative numbers or repeated decimals with no delimeter between commands
  13694. curArg = ['-', '.'].includes(c) ? c : '';
  13695. } else {
  13696. curArg += c;
  13697. if (c === '.') {
  13698. foundDecimal = true;
  13699. }
  13700. }
  13701. } // add the last command
  13702. } catch (err) {
  13703. _iterator.e(err);
  13704. } finally {
  13705. _iterator.f();
  13706. }
  13707. if (curArg.length > 0) {
  13708. if (args.length === params) {
  13709. // handle reused commands
  13710. ret[ret.length] = {
  13711. cmd: cmd,
  13712. args: args
  13713. };
  13714. args = [+curArg]; // handle assumed commands
  13715. if (cmd === 'M') {
  13716. cmd = 'L';
  13717. }
  13718. if (cmd === 'm') {
  13719. cmd = 'l';
  13720. }
  13721. } else {
  13722. args[args.length] = +curArg;
  13723. }
  13724. }
  13725. ret[ret.length] = {
  13726. cmd: cmd,
  13727. args: args
  13728. };
  13729. return ret;
  13730. };
  13731. var _apply = function apply(commands, doc) {
  13732. // current point, control point, and subpath starting point
  13733. cx = cy = px = py = sx = sy = 0; // run the commands
  13734. for (var i = 0; i < commands.length; i++) {
  13735. var c = commands[i];
  13736. if (typeof runners[c.cmd] === 'function') {
  13737. runners[c.cmd](doc, c.args);
  13738. }
  13739. }
  13740. };
  13741. var runners = {
  13742. M: function M(doc, a) {
  13743. cx = a[0];
  13744. cy = a[1];
  13745. px = py = null;
  13746. sx = cx;
  13747. sy = cy;
  13748. return doc.moveTo(cx, cy);
  13749. },
  13750. m: function m(doc, a) {
  13751. cx += a[0];
  13752. cy += a[1];
  13753. px = py = null;
  13754. sx = cx;
  13755. sy = cy;
  13756. return doc.moveTo(cx, cy);
  13757. },
  13758. C: function C(doc, a) {
  13759. cx = a[4];
  13760. cy = a[5];
  13761. px = a[2];
  13762. py = a[3];
  13763. return doc.bezierCurveTo.apply(doc, _toConsumableArray(a));
  13764. },
  13765. c: function c(doc, a) {
  13766. doc.bezierCurveTo(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy, a[4] + cx, a[5] + cy);
  13767. px = cx + a[2];
  13768. py = cy + a[3];
  13769. cx += a[4];
  13770. return cy += a[5];
  13771. },
  13772. S: function S(doc, a) {
  13773. if (px === null) {
  13774. px = cx;
  13775. py = cy;
  13776. }
  13777. doc.bezierCurveTo(cx - (px - cx), cy - (py - cy), a[0], a[1], a[2], a[3]);
  13778. px = a[0];
  13779. py = a[1];
  13780. cx = a[2];
  13781. return cy = a[3];
  13782. },
  13783. s: function s(doc, a) {
  13784. if (px === null) {
  13785. px = cx;
  13786. py = cy;
  13787. }
  13788. doc.bezierCurveTo(cx - (px - cx), cy - (py - cy), cx + a[0], cy + a[1], cx + a[2], cy + a[3]);
  13789. px = cx + a[0];
  13790. py = cy + a[1];
  13791. cx += a[2];
  13792. return cy += a[3];
  13793. },
  13794. Q: function Q(doc, a) {
  13795. px = a[0];
  13796. py = a[1];
  13797. cx = a[2];
  13798. cy = a[3];
  13799. return doc.quadraticCurveTo(a[0], a[1], cx, cy);
  13800. },
  13801. q: function q(doc, a) {
  13802. doc.quadraticCurveTo(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy);
  13803. px = cx + a[0];
  13804. py = cy + a[1];
  13805. cx += a[2];
  13806. return cy += a[3];
  13807. },
  13808. T: function T(doc, a) {
  13809. if (px === null) {
  13810. px = cx;
  13811. py = cy;
  13812. } else {
  13813. px = cx - (px - cx);
  13814. py = cy - (py - cy);
  13815. }
  13816. doc.quadraticCurveTo(px, py, a[0], a[1]);
  13817. px = cx - (px - cx);
  13818. py = cy - (py - cy);
  13819. cx = a[0];
  13820. return cy = a[1];
  13821. },
  13822. t: function t(doc, a) {
  13823. if (px === null) {
  13824. px = cx;
  13825. py = cy;
  13826. } else {
  13827. px = cx - (px - cx);
  13828. py = cy - (py - cy);
  13829. }
  13830. doc.quadraticCurveTo(px, py, cx + a[0], cy + a[1]);
  13831. cx += a[0];
  13832. return cy += a[1];
  13833. },
  13834. A: function A(doc, a) {
  13835. solveArc(doc, cx, cy, a);
  13836. cx = a[5];
  13837. return cy = a[6];
  13838. },
  13839. a: function a(doc, _a) {
  13840. _a[5] += cx;
  13841. _a[6] += cy;
  13842. solveArc(doc, cx, cy, _a);
  13843. cx = _a[5];
  13844. return cy = _a[6];
  13845. },
  13846. L: function L(doc, a) {
  13847. cx = a[0];
  13848. cy = a[1];
  13849. px = py = null;
  13850. return doc.lineTo(cx, cy);
  13851. },
  13852. l: function l(doc, a) {
  13853. cx += a[0];
  13854. cy += a[1];
  13855. px = py = null;
  13856. return doc.lineTo(cx, cy);
  13857. },
  13858. H: function H(doc, a) {
  13859. cx = a[0];
  13860. px = py = null;
  13861. return doc.lineTo(cx, cy);
  13862. },
  13863. h: function h(doc, a) {
  13864. cx += a[0];
  13865. px = py = null;
  13866. return doc.lineTo(cx, cy);
  13867. },
  13868. V: function V(doc, a) {
  13869. cy = a[0];
  13870. px = py = null;
  13871. return doc.lineTo(cx, cy);
  13872. },
  13873. v: function v(doc, a) {
  13874. cy += a[0];
  13875. px = py = null;
  13876. return doc.lineTo(cx, cy);
  13877. },
  13878. Z: function Z(doc) {
  13879. doc.closePath();
  13880. cx = sx;
  13881. return cy = sy;
  13882. },
  13883. z: function z(doc) {
  13884. doc.closePath();
  13885. cx = sx;
  13886. return cy = sy;
  13887. }
  13888. };
  13889. var solveArc = function solveArc(doc, x, y, coords) {
  13890. var _coords = _slicedToArray(coords, 7),
  13891. rx = _coords[0],
  13892. ry = _coords[1],
  13893. rot = _coords[2],
  13894. large = _coords[3],
  13895. sweep = _coords[4],
  13896. ex = _coords[5],
  13897. ey = _coords[6];
  13898. var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y);
  13899. var _iterator2 = _createForOfIteratorHelper(segs),
  13900. _step2;
  13901. try {
  13902. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  13903. var seg = _step2.value;
  13904. var bez = segmentToBezier.apply(void 0, _toConsumableArray(seg));
  13905. doc.bezierCurveTo.apply(doc, _toConsumableArray(bez));
  13906. }
  13907. } catch (err) {
  13908. _iterator2.e(err);
  13909. } finally {
  13910. _iterator2.f();
  13911. }
  13912. }; // from Inkscape svgtopdf, thanks!
  13913. var arcToSegments = function arcToSegments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
  13914. var th = rotateX * (Math.PI / 180);
  13915. var sin_th = Math.sin(th);
  13916. var cos_th = Math.cos(th);
  13917. rx = Math.abs(rx);
  13918. ry = Math.abs(ry);
  13919. px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5;
  13920. py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5;
  13921. var pl = px * px / (rx * rx) + py * py / (ry * ry);
  13922. if (pl > 1) {
  13923. pl = Math.sqrt(pl);
  13924. rx *= pl;
  13925. ry *= pl;
  13926. }
  13927. var a00 = cos_th / rx;
  13928. var a01 = sin_th / rx;
  13929. var a10 = -sin_th / ry;
  13930. var a11 = cos_th / ry;
  13931. var x0 = a00 * ox + a01 * oy;
  13932. var y0 = a10 * ox + a11 * oy;
  13933. var x1 = a00 * x + a01 * y;
  13934. var y1 = a10 * x + a11 * y;
  13935. var d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
  13936. var sfactor_sq = 1 / d - 0.25;
  13937. if (sfactor_sq < 0) {
  13938. sfactor_sq = 0;
  13939. }
  13940. var sfactor = Math.sqrt(sfactor_sq);
  13941. if (sweep === large) {
  13942. sfactor = -sfactor;
  13943. }
  13944. var xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);
  13945. var yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);
  13946. var th0 = Math.atan2(y0 - yc, x0 - xc);
  13947. var th1 = Math.atan2(y1 - yc, x1 - xc);
  13948. var th_arc = th1 - th0;
  13949. if (th_arc < 0 && sweep === 1) {
  13950. th_arc += 2 * Math.PI;
  13951. } else if (th_arc > 0 && sweep === 0) {
  13952. th_arc -= 2 * Math.PI;
  13953. }
  13954. var segments = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001)));
  13955. var result = [];
  13956. for (var i = 0; i < segments; i++) {
  13957. var th2 = th0 + i * th_arc / segments;
  13958. var th3 = th0 + (i + 1) * th_arc / segments;
  13959. result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th];
  13960. }
  13961. return result;
  13962. };
  13963. var segmentToBezier = function segmentToBezier(cx, cy, th0, th1, rx, ry, sin_th, cos_th) {
  13964. var a00 = cos_th * rx;
  13965. var a01 = -sin_th * ry;
  13966. var a10 = sin_th * rx;
  13967. var a11 = cos_th * ry;
  13968. var th_half = 0.5 * (th1 - th0);
  13969. var t = 8 / 3 * Math.sin(th_half * 0.5) * Math.sin(th_half * 0.5) / Math.sin(th_half);
  13970. var x1 = cx + Math.cos(th0) - t * Math.sin(th0);
  13971. var y1 = cy + Math.sin(th0) + t * Math.cos(th0);
  13972. var x3 = cx + Math.cos(th1);
  13973. var y3 = cy + Math.sin(th1);
  13974. var x2 = x3 + t * Math.sin(th1);
  13975. var y2 = y3 - t * Math.cos(th1);
  13976. return [a00 * x1 + a01 * y1, a10 * x1 + a11 * y1, a00 * x2 + a01 * y2, a10 * x2 + a11 * y2, a00 * x3 + a01 * y3, a10 * x3 + a11 * y3];
  13977. };
  13978. var SVGPath = /*#__PURE__*/function () {
  13979. function SVGPath() {
  13980. _classCallCheck(this, SVGPath);
  13981. }
  13982. _createClass(SVGPath, null, [{
  13983. key: "apply",
  13984. value: function apply(doc, path) {
  13985. var commands = parse(path);
  13986. _apply(commands, doc);
  13987. }
  13988. }]);
  13989. return SVGPath;
  13990. }();
  13991. var number$1 = PDFObject.number; // This constant is used to approximate a symmetrical arc using a cubic
  13992. // Bezier curve.
  13993. var KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);
  13994. var VectorMixin = {
  13995. initVector: function initVector() {
  13996. this._ctm = [1, 0, 0, 1, 0, 0]; // current transformation matrix
  13997. return this._ctmStack = [];
  13998. },
  13999. save: function save() {
  14000. this._ctmStack.push(this._ctm.slice()); // TODO: save/restore colorspace and styles so not setting it unnessesarily all the time?
  14001. return this.addContent('q');
  14002. },
  14003. restore: function restore() {
  14004. this._ctm = this._ctmStack.pop() || [1, 0, 0, 1, 0, 0];
  14005. return this.addContent('Q');
  14006. },
  14007. closePath: function closePath() {
  14008. return this.addContent('h');
  14009. },
  14010. lineWidth: function lineWidth(w) {
  14011. return this.addContent("".concat(number$1(w), " w"));
  14012. },
  14013. _CAP_STYLES: {
  14014. BUTT: 0,
  14015. ROUND: 1,
  14016. SQUARE: 2
  14017. },
  14018. lineCap: function lineCap(c) {
  14019. if (typeof c === 'string') {
  14020. c = this._CAP_STYLES[c.toUpperCase()];
  14021. }
  14022. return this.addContent("".concat(c, " J"));
  14023. },
  14024. _JOIN_STYLES: {
  14025. MITER: 0,
  14026. ROUND: 1,
  14027. BEVEL: 2
  14028. },
  14029. lineJoin: function lineJoin(j) {
  14030. if (typeof j === 'string') {
  14031. j = this._JOIN_STYLES[j.toUpperCase()];
  14032. }
  14033. return this.addContent("".concat(j, " j"));
  14034. },
  14035. miterLimit: function miterLimit(m) {
  14036. return this.addContent("".concat(number$1(m), " M"));
  14037. },
  14038. dash: function dash(length) {
  14039. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14040. var originalLength = length;
  14041. if (!Array.isArray(length)) {
  14042. length = [length, options.space || length];
  14043. }
  14044. var valid = length.every(function (x) {
  14045. return Number.isFinite(x) && x > 0;
  14046. });
  14047. if (!valid) {
  14048. throw new Error("dash(".concat(JSON.stringify(originalLength), ", ").concat(JSON.stringify(options), ") invalid, lengths must be numeric and greater than zero"));
  14049. }
  14050. length = length.map(number$1).join(' ');
  14051. return this.addContent("[".concat(length, "] ").concat(number$1(options.phase || 0), " d"));
  14052. },
  14053. undash: function undash() {
  14054. return this.addContent('[] 0 d');
  14055. },
  14056. moveTo: function moveTo(x, y) {
  14057. return this.addContent("".concat(number$1(x), " ").concat(number$1(y), " m"));
  14058. },
  14059. lineTo: function lineTo(x, y) {
  14060. return this.addContent("".concat(number$1(x), " ").concat(number$1(y), " l"));
  14061. },
  14062. bezierCurveTo: function bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) {
  14063. return this.addContent("".concat(number$1(cp1x), " ").concat(number$1(cp1y), " ").concat(number$1(cp2x), " ").concat(number$1(cp2y), " ").concat(number$1(x), " ").concat(number$1(y), " c"));
  14064. },
  14065. quadraticCurveTo: function quadraticCurveTo(cpx, cpy, x, y) {
  14066. return this.addContent("".concat(number$1(cpx), " ").concat(number$1(cpy), " ").concat(number$1(x), " ").concat(number$1(y), " v"));
  14067. },
  14068. rect: function rect(x, y, w, h) {
  14069. return this.addContent("".concat(number$1(x), " ").concat(number$1(y), " ").concat(number$1(w), " ").concat(number$1(h), " re"));
  14070. },
  14071. roundedRect: function roundedRect(x, y, w, h, r) {
  14072. if (r == null) {
  14073. r = 0;
  14074. }
  14075. r = Math.min(r, 0.5 * w, 0.5 * h); // amount to inset control points from corners (see `ellipse`)
  14076. var c = r * (1.0 - KAPPA);
  14077. this.moveTo(x + r, y);
  14078. this.lineTo(x + w - r, y);
  14079. this.bezierCurveTo(x + w - c, y, x + w, y + c, x + w, y + r);
  14080. this.lineTo(x + w, y + h - r);
  14081. this.bezierCurveTo(x + w, y + h - c, x + w - c, y + h, x + w - r, y + h);
  14082. this.lineTo(x + r, y + h);
  14083. this.bezierCurveTo(x + c, y + h, x, y + h - c, x, y + h - r);
  14084. this.lineTo(x, y + r);
  14085. this.bezierCurveTo(x, y + c, x + c, y, x + r, y);
  14086. return this.closePath();
  14087. },
  14088. ellipse: function ellipse(x, y, r1, r2) {
  14089. // based on http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas/2173084#2173084
  14090. if (r2 == null) {
  14091. r2 = r1;
  14092. }
  14093. x -= r1;
  14094. y -= r2;
  14095. var ox = r1 * KAPPA;
  14096. var oy = r2 * KAPPA;
  14097. var xe = x + r1 * 2;
  14098. var ye = y + r2 * 2;
  14099. var xm = x + r1;
  14100. var ym = y + r2;
  14101. this.moveTo(x, ym);
  14102. this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);
  14103. this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);
  14104. this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye);
  14105. this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);
  14106. return this.closePath();
  14107. },
  14108. circle: function circle(x, y, radius) {
  14109. return this.ellipse(x, y, radius);
  14110. },
  14111. arc: function arc(x, y, radius, startAngle, endAngle, anticlockwise) {
  14112. if (anticlockwise == null) {
  14113. anticlockwise = false;
  14114. }
  14115. var TWO_PI = 2.0 * Math.PI;
  14116. var HALF_PI = 0.5 * Math.PI;
  14117. var deltaAng = endAngle - startAngle;
  14118. if (Math.abs(deltaAng) > TWO_PI) {
  14119. // draw only full circle if more than that is specified
  14120. deltaAng = TWO_PI;
  14121. } else if (deltaAng !== 0 && anticlockwise !== deltaAng < 0) {
  14122. // necessary to flip direction of rendering
  14123. var dir = anticlockwise ? -1 : 1;
  14124. deltaAng = dir * TWO_PI + deltaAng;
  14125. }
  14126. var numSegs = Math.ceil(Math.abs(deltaAng) / HALF_PI);
  14127. var segAng = deltaAng / numSegs;
  14128. var handleLen = segAng / HALF_PI * KAPPA * radius;
  14129. var curAng = startAngle; // component distances between anchor point and control point
  14130. var deltaCx = -Math.sin(curAng) * handleLen;
  14131. var deltaCy = Math.cos(curAng) * handleLen; // anchor point
  14132. var ax = x + Math.cos(curAng) * radius;
  14133. var ay = y + Math.sin(curAng) * radius; // calculate and render segments
  14134. this.moveTo(ax, ay);
  14135. for (var segIdx = 0; segIdx < numSegs; segIdx++) {
  14136. // starting control point
  14137. var cp1x = ax + deltaCx;
  14138. var cp1y = ay + deltaCy; // step angle
  14139. curAng += segAng; // next anchor point
  14140. ax = x + Math.cos(curAng) * radius;
  14141. ay = y + Math.sin(curAng) * radius; // next control point delta
  14142. deltaCx = -Math.sin(curAng) * handleLen;
  14143. deltaCy = Math.cos(curAng) * handleLen; // ending control point
  14144. var cp2x = ax - deltaCx;
  14145. var cp2y = ay - deltaCy; // render segment
  14146. this.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, ax, ay);
  14147. }
  14148. return this;
  14149. },
  14150. polygon: function polygon() {
  14151. for (var _len = arguments.length, points = new Array(_len), _key = 0; _key < _len; _key++) {
  14152. points[_key] = arguments[_key];
  14153. }
  14154. this.moveTo.apply(this, _toConsumableArray(points.shift() || []));
  14155. for (var _i = 0, _points = points; _i < _points.length; _i++) {
  14156. var point = _points[_i];
  14157. this.lineTo.apply(this, _toConsumableArray(point || []));
  14158. }
  14159. return this.closePath();
  14160. },
  14161. path: function path(_path) {
  14162. SVGPath.apply(this, _path);
  14163. return this;
  14164. },
  14165. _windingRule: function _windingRule(rule) {
  14166. if (/even-?odd/.test(rule)) {
  14167. return '*';
  14168. }
  14169. return '';
  14170. },
  14171. fill: function fill(color, rule) {
  14172. if (/(even-?odd)|(non-?zero)/.test(color)) {
  14173. rule = color;
  14174. color = null;
  14175. }
  14176. if (color) {
  14177. this.fillColor(color);
  14178. }
  14179. return this.addContent("f".concat(this._windingRule(rule)));
  14180. },
  14181. stroke: function stroke(color) {
  14182. if (color) {
  14183. this.strokeColor(color);
  14184. }
  14185. return this.addContent('S');
  14186. },
  14187. fillAndStroke: function fillAndStroke(fillColor, strokeColor, rule) {
  14188. if (strokeColor == null) {
  14189. strokeColor = fillColor;
  14190. }
  14191. var isFillRule = /(even-?odd)|(non-?zero)/;
  14192. if (isFillRule.test(fillColor)) {
  14193. rule = fillColor;
  14194. fillColor = null;
  14195. }
  14196. if (isFillRule.test(strokeColor)) {
  14197. rule = strokeColor;
  14198. strokeColor = fillColor;
  14199. }
  14200. if (fillColor) {
  14201. this.fillColor(fillColor);
  14202. this.strokeColor(strokeColor);
  14203. }
  14204. return this.addContent("B".concat(this._windingRule(rule)));
  14205. },
  14206. clip: function clip(rule) {
  14207. return this.addContent("W".concat(this._windingRule(rule), " n"));
  14208. },
  14209. transform: function transform(m11, m12, m21, m22, dx, dy) {
  14210. // keep track of the current transformation matrix
  14211. var m = this._ctm;
  14212. var _m = _slicedToArray(m, 6),
  14213. m0 = _m[0],
  14214. m1 = _m[1],
  14215. m2 = _m[2],
  14216. m3 = _m[3],
  14217. m4 = _m[4],
  14218. m5 = _m[5];
  14219. m[0] = m0 * m11 + m2 * m12;
  14220. m[1] = m1 * m11 + m3 * m12;
  14221. m[2] = m0 * m21 + m2 * m22;
  14222. m[3] = m1 * m21 + m3 * m22;
  14223. m[4] = m0 * dx + m2 * dy + m4;
  14224. m[5] = m1 * dx + m3 * dy + m5;
  14225. var values = [m11, m12, m21, m22, dx, dy].map(function (v) {
  14226. return number$1(v);
  14227. }).join(' ');
  14228. return this.addContent("".concat(values, " cm"));
  14229. },
  14230. translate: function translate(x, y) {
  14231. return this.transform(1, 0, 0, 1, x, y);
  14232. },
  14233. rotate: function rotate(angle) {
  14234. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  14235. var y;
  14236. var rad = angle * Math.PI / 180;
  14237. var cos = Math.cos(rad);
  14238. var sin = Math.sin(rad);
  14239. var x = y = 0;
  14240. if (options.origin != null) {
  14241. var _options$origin = _slicedToArray(options.origin, 2);
  14242. x = _options$origin[0];
  14243. y = _options$origin[1];
  14244. var x1 = x * cos - y * sin;
  14245. var y1 = x * sin + y * cos;
  14246. x -= x1;
  14247. y -= y1;
  14248. }
  14249. return this.transform(cos, sin, -sin, cos, x, y);
  14250. },
  14251. scale: function scale(xFactor, yFactor) {
  14252. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  14253. var y;
  14254. if (yFactor == null) {
  14255. yFactor = xFactor;
  14256. }
  14257. if (typeof yFactor === 'object') {
  14258. options = yFactor;
  14259. yFactor = xFactor;
  14260. }
  14261. var x = y = 0;
  14262. if (options.origin != null) {
  14263. var _options$origin2 = _slicedToArray(options.origin, 2);
  14264. x = _options$origin2[0];
  14265. y = _options$origin2[1];
  14266. x -= xFactor * x;
  14267. y -= yFactor * y;
  14268. }
  14269. return this.transform(xFactor, 0, 0, yFactor, x, y);
  14270. }
  14271. };
  14272. var WIN_ANSI_MAP = {
  14273. 402: 131,
  14274. 8211: 150,
  14275. 8212: 151,
  14276. 8216: 145,
  14277. 8217: 146,
  14278. 8218: 130,
  14279. 8220: 147,
  14280. 8221: 148,
  14281. 8222: 132,
  14282. 8224: 134,
  14283. 8225: 135,
  14284. 8226: 149,
  14285. 8230: 133,
  14286. 8364: 128,
  14287. 8240: 137,
  14288. 8249: 139,
  14289. 8250: 155,
  14290. 710: 136,
  14291. 8482: 153,
  14292. 338: 140,
  14293. 339: 156,
  14294. 732: 152,
  14295. 352: 138,
  14296. 353: 154,
  14297. 376: 159,
  14298. 381: 142,
  14299. 382: 158
  14300. };
  14301. var characters = ".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n \nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n \nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n \ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n \nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n \nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n \nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n \nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/);
  14302. var AFMFont = /*#__PURE__*/function () {
  14303. _createClass(AFMFont, null, [{
  14304. key: "open",
  14305. value: function open(filename) {
  14306. return new AFMFont(fs.readFileSync(filename, 'utf8'));
  14307. }
  14308. }]);
  14309. function AFMFont(contents) {
  14310. _classCallCheck(this, AFMFont);
  14311. this.contents = contents;
  14312. this.attributes = {};
  14313. this.glyphWidths = {};
  14314. this.boundingBoxes = {};
  14315. this.kernPairs = {};
  14316. this.parse(); // todo: remove charWidths since appears to not be used
  14317. this.charWidths = new Array(256);
  14318. for (var char = 0; char <= 255; char++) {
  14319. this.charWidths[char] = this.glyphWidths[characters[char]];
  14320. }
  14321. this.bbox = this.attributes['FontBBox'].split(/\s+/).map(function (e) {
  14322. return +e;
  14323. });
  14324. this.ascender = +(this.attributes['Ascender'] || 0);
  14325. this.descender = +(this.attributes['Descender'] || 0);
  14326. this.xHeight = +(this.attributes['XHeight'] || 0);
  14327. this.capHeight = +(this.attributes['CapHeight'] || 0);
  14328. this.lineGap = this.bbox[3] - this.bbox[1] - (this.ascender - this.descender);
  14329. }
  14330. _createClass(AFMFont, [{
  14331. key: "parse",
  14332. value: function parse() {
  14333. var section = '';
  14334. var _iterator = _createForOfIteratorHelper(this.contents.split('\n')),
  14335. _step;
  14336. try {
  14337. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  14338. var line = _step.value;
  14339. var match;
  14340. var a;
  14341. if (match = line.match(/^Start(\w+)/)) {
  14342. section = match[1];
  14343. continue;
  14344. } else if (match = line.match(/^End(\w+)/)) {
  14345. section = '';
  14346. continue;
  14347. }
  14348. switch (section) {
  14349. case 'FontMetrics':
  14350. match = line.match(/(^\w+)\s+(.*)/);
  14351. var key = match[1];
  14352. var value = match[2];
  14353. if (a = this.attributes[key]) {
  14354. if (!Array.isArray(a)) {
  14355. a = this.attributes[key] = [a];
  14356. }
  14357. a.push(value);
  14358. } else {
  14359. this.attributes[key] = value;
  14360. }
  14361. break;
  14362. case 'CharMetrics':
  14363. if (!/^CH?\s/.test(line)) {
  14364. continue;
  14365. }
  14366. var name = line.match(/\bN\s+(\.?\w+)\s*;/)[1];
  14367. this.glyphWidths[name] = +line.match(/\bWX\s+(\d+)\s*;/)[1];
  14368. break;
  14369. case 'KernPairs':
  14370. match = line.match(/^KPX\s+(\.?\w+)\s+(\.?\w+)\s+(-?\d+)/);
  14371. if (match) {
  14372. this.kernPairs[match[1] + '\0' + match[2]] = parseInt(match[3]);
  14373. }
  14374. break;
  14375. }
  14376. }
  14377. } catch (err) {
  14378. _iterator.e(err);
  14379. } finally {
  14380. _iterator.f();
  14381. }
  14382. }
  14383. }, {
  14384. key: "encodeText",
  14385. value: function encodeText(text) {
  14386. var res = [];
  14387. for (var i = 0, len = text.length; i < len; i++) {
  14388. var char = text.charCodeAt(i);
  14389. char = WIN_ANSI_MAP[char] || char;
  14390. res.push(char.toString(16));
  14391. }
  14392. return res;
  14393. }
  14394. }, {
  14395. key: "glyphsForString",
  14396. value: function glyphsForString(string) {
  14397. var glyphs = [];
  14398. for (var i = 0, len = string.length; i < len; i++) {
  14399. var charCode = string.charCodeAt(i);
  14400. glyphs.push(this.characterToGlyph(charCode));
  14401. }
  14402. return glyphs;
  14403. }
  14404. }, {
  14405. key: "characterToGlyph",
  14406. value: function characterToGlyph(character) {
  14407. return characters[WIN_ANSI_MAP[character] || character] || '.notdef';
  14408. }
  14409. }, {
  14410. key: "widthOfGlyph",
  14411. value: function widthOfGlyph(glyph) {
  14412. return this.glyphWidths[glyph] || 0;
  14413. }
  14414. }, {
  14415. key: "getKernPair",
  14416. value: function getKernPair(left, right) {
  14417. return this.kernPairs[left + '\0' + right] || 0;
  14418. }
  14419. }, {
  14420. key: "advancesForGlyphs",
  14421. value: function advancesForGlyphs(glyphs) {
  14422. var advances = [];
  14423. for (var index = 0; index < glyphs.length; index++) {
  14424. var left = glyphs[index];
  14425. var right = glyphs[index + 1];
  14426. advances.push(this.widthOfGlyph(left) + this.getKernPair(left, right));
  14427. }
  14428. return advances;
  14429. }
  14430. }]);
  14431. return AFMFont;
  14432. }();
  14433. var PDFFont = /*#__PURE__*/function () {
  14434. function PDFFont() {
  14435. _classCallCheck(this, PDFFont);
  14436. }
  14437. _createClass(PDFFont, [{
  14438. key: "encode",
  14439. value: function encode() {
  14440. throw new Error('Must be implemented by subclasses');
  14441. }
  14442. }, {
  14443. key: "widthOfString",
  14444. value: function widthOfString() {
  14445. throw new Error('Must be implemented by subclasses');
  14446. }
  14447. }, {
  14448. key: "ref",
  14449. value: function ref() {
  14450. return this.dictionary != null ? this.dictionary : this.dictionary = this.document.ref();
  14451. }
  14452. }, {
  14453. key: "finalize",
  14454. value: function finalize() {
  14455. if (this.embedded || this.dictionary == null) {
  14456. return;
  14457. }
  14458. this.embed();
  14459. return this.embedded = true;
  14460. }
  14461. }, {
  14462. key: "embed",
  14463. value: function embed() {
  14464. throw new Error('Must be implemented by subclasses');
  14465. }
  14466. }, {
  14467. key: "lineHeight",
  14468. value: function lineHeight(size, includeGap) {
  14469. if (includeGap == null) {
  14470. includeGap = false;
  14471. }
  14472. var gap = includeGap ? this.lineGap : 0;
  14473. return (this.ascender + gap - this.descender) / 1000 * size;
  14474. }
  14475. }]);
  14476. return PDFFont;
  14477. }();
  14478. var STANDARD_FONTS = {
  14479. Courier: function Courier() {
  14480. return fs.readFileSync(__dirname + '/data/Courier.afm', 'utf8');
  14481. },
  14482. 'Courier-Bold': function CourierBold() {
  14483. return fs.readFileSync(__dirname + '/data/Courier-Bold.afm', 'utf8');
  14484. },
  14485. 'Courier-Oblique': function CourierOblique() {
  14486. return fs.readFileSync(__dirname + '/data/Courier-Oblique.afm', 'utf8');
  14487. },
  14488. 'Courier-BoldOblique': function CourierBoldOblique() {
  14489. return fs.readFileSync(__dirname + '/data/Courier-BoldOblique.afm', 'utf8');
  14490. },
  14491. Helvetica: function Helvetica() {
  14492. return fs.readFileSync(__dirname + '/data/Helvetica.afm', 'utf8');
  14493. },
  14494. 'Helvetica-Bold': function HelveticaBold() {
  14495. return fs.readFileSync(__dirname + '/data/Helvetica-Bold.afm', 'utf8');
  14496. },
  14497. 'Helvetica-Oblique': function HelveticaOblique() {
  14498. return fs.readFileSync(__dirname + '/data/Helvetica-Oblique.afm', 'utf8');
  14499. },
  14500. 'Helvetica-BoldOblique': function HelveticaBoldOblique() {
  14501. return fs.readFileSync(__dirname + '/data/Helvetica-BoldOblique.afm', 'utf8');
  14502. },
  14503. 'Times-Roman': function TimesRoman() {
  14504. return fs.readFileSync(__dirname + '/data/Times-Roman.afm', 'utf8');
  14505. },
  14506. 'Times-Bold': function TimesBold() {
  14507. return fs.readFileSync(__dirname + '/data/Times-Bold.afm', 'utf8');
  14508. },
  14509. 'Times-Italic': function TimesItalic() {
  14510. return fs.readFileSync(__dirname + '/data/Times-Italic.afm', 'utf8');
  14511. },
  14512. 'Times-BoldItalic': function TimesBoldItalic() {
  14513. return fs.readFileSync(__dirname + '/data/Times-BoldItalic.afm', 'utf8');
  14514. },
  14515. Symbol: function Symbol() {
  14516. return fs.readFileSync(__dirname + '/data/Symbol.afm', 'utf8');
  14517. },
  14518. ZapfDingbats: function ZapfDingbats() {
  14519. return fs.readFileSync(__dirname + '/data/ZapfDingbats.afm', 'utf8');
  14520. }
  14521. };
  14522. var StandardFont = /*#__PURE__*/function (_PDFFont) {
  14523. _inherits(StandardFont, _PDFFont);
  14524. var _super = _createSuper(StandardFont);
  14525. function StandardFont(document, name, id) {
  14526. var _this;
  14527. _classCallCheck(this, StandardFont);
  14528. _this = _super.call(this);
  14529. _this.document = document;
  14530. _this.name = name;
  14531. _this.id = id;
  14532. _this.font = new AFMFont(STANDARD_FONTS[_this.name]());
  14533. var _this$font = _this.font;
  14534. _this.ascender = _this$font.ascender;
  14535. _this.descender = _this$font.descender;
  14536. _this.bbox = _this$font.bbox;
  14537. _this.lineGap = _this$font.lineGap;
  14538. _this.xHeight = _this$font.xHeight;
  14539. _this.capHeight = _this$font.capHeight;
  14540. return _this;
  14541. }
  14542. _createClass(StandardFont, [{
  14543. key: "embed",
  14544. value: function embed() {
  14545. this.dictionary.data = {
  14546. Type: 'Font',
  14547. BaseFont: this.name,
  14548. Subtype: 'Type1',
  14549. Encoding: 'WinAnsiEncoding'
  14550. };
  14551. return this.dictionary.end();
  14552. }
  14553. }, {
  14554. key: "encode",
  14555. value: function encode(text) {
  14556. var encoded = this.font.encodeText(text);
  14557. var glyphs = this.font.glyphsForString("".concat(text));
  14558. var advances = this.font.advancesForGlyphs(glyphs);
  14559. var positions = [];
  14560. for (var i = 0; i < glyphs.length; i++) {
  14561. var glyph = glyphs[i];
  14562. positions.push({
  14563. xAdvance: advances[i],
  14564. yAdvance: 0,
  14565. xOffset: 0,
  14566. yOffset: 0,
  14567. advanceWidth: this.font.widthOfGlyph(glyph)
  14568. });
  14569. }
  14570. return [encoded, positions];
  14571. }
  14572. }, {
  14573. key: "widthOfString",
  14574. value: function widthOfString(string, size) {
  14575. var glyphs = this.font.glyphsForString("".concat(string));
  14576. var advances = this.font.advancesForGlyphs(glyphs);
  14577. var width = 0;
  14578. var _iterator = _createForOfIteratorHelper(advances),
  14579. _step;
  14580. try {
  14581. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  14582. var advance = _step.value;
  14583. width += advance;
  14584. }
  14585. } catch (err) {
  14586. _iterator.e(err);
  14587. } finally {
  14588. _iterator.f();
  14589. }
  14590. var scale = size / 1000;
  14591. return width * scale;
  14592. }
  14593. }], [{
  14594. key: "isStandardFont",
  14595. value: function isStandardFont(name) {
  14596. return name in STANDARD_FONTS;
  14597. }
  14598. }]);
  14599. return StandardFont;
  14600. }(PDFFont);
  14601. var toHex = function toHex(num) {
  14602. return "0000".concat(num.toString(16)).slice(-4);
  14603. };
  14604. var EmbeddedFont = /*#__PURE__*/function (_PDFFont) {
  14605. _inherits(EmbeddedFont, _PDFFont);
  14606. var _super = _createSuper(EmbeddedFont);
  14607. function EmbeddedFont(document, font, id) {
  14608. var _this;
  14609. _classCallCheck(this, EmbeddedFont);
  14610. _this = _super.call(this);
  14611. _this.document = document;
  14612. _this.font = font;
  14613. _this.id = id;
  14614. _this.subset = _this.font.createSubset();
  14615. _this.unicode = [[0]];
  14616. _this.widths = [_this.font.getGlyph(0).advanceWidth];
  14617. _this.name = _this.font.postscriptName;
  14618. _this.scale = 1000 / _this.font.unitsPerEm;
  14619. _this.ascender = _this.font.ascent * _this.scale;
  14620. _this.descender = _this.font.descent * _this.scale;
  14621. _this.xHeight = _this.font.xHeight * _this.scale;
  14622. _this.capHeight = _this.font.capHeight * _this.scale;
  14623. _this.lineGap = _this.font.lineGap * _this.scale;
  14624. _this.bbox = _this.font.bbox;
  14625. if (document.options.fontLayoutCache !== false) {
  14626. _this.layoutCache = Object.create(null);
  14627. }
  14628. return _this;
  14629. }
  14630. _createClass(EmbeddedFont, [{
  14631. key: "layoutRun",
  14632. value: function layoutRun(text, features) {
  14633. var run = this.font.layout(text, features); // Normalize position values
  14634. for (var i = 0; i < run.positions.length; i++) {
  14635. var position = run.positions[i];
  14636. for (var key in position) {
  14637. position[key] *= this.scale;
  14638. }
  14639. position.advanceWidth = run.glyphs[i].advanceWidth * this.scale;
  14640. }
  14641. return run;
  14642. }
  14643. }, {
  14644. key: "layoutCached",
  14645. value: function layoutCached(text) {
  14646. if (!this.layoutCache) {
  14647. return this.layoutRun(text);
  14648. }
  14649. var cached;
  14650. if (cached = this.layoutCache[text]) {
  14651. return cached;
  14652. }
  14653. var run = this.layoutRun(text);
  14654. this.layoutCache[text] = run;
  14655. return run;
  14656. }
  14657. }, {
  14658. key: "layout",
  14659. value: function layout(text, features, onlyWidth) {
  14660. // Skip the cache if any user defined features are applied
  14661. if (features) {
  14662. return this.layoutRun(text, features);
  14663. }
  14664. var glyphs = onlyWidth ? null : [];
  14665. var positions = onlyWidth ? null : [];
  14666. var advanceWidth = 0; // Split the string by words to increase cache efficiency.
  14667. // For this purpose, spaces and tabs are a good enough delimeter.
  14668. var last = 0;
  14669. var index = 0;
  14670. while (index <= text.length) {
  14671. var needle;
  14672. if (index === text.length && last < index || (needle = text.charAt(index), [' ', '\t'].includes(needle))) {
  14673. var run = this.layoutCached(text.slice(last, ++index));
  14674. if (!onlyWidth) {
  14675. glyphs = glyphs.concat(run.glyphs);
  14676. positions = positions.concat(run.positions);
  14677. }
  14678. advanceWidth += run.advanceWidth;
  14679. last = index;
  14680. } else {
  14681. index++;
  14682. }
  14683. }
  14684. return {
  14685. glyphs: glyphs,
  14686. positions: positions,
  14687. advanceWidth: advanceWidth
  14688. };
  14689. }
  14690. }, {
  14691. key: "encode",
  14692. value: function encode(text, features) {
  14693. var _this$layout = this.layout(text, features),
  14694. glyphs = _this$layout.glyphs,
  14695. positions = _this$layout.positions;
  14696. var res = [];
  14697. for (var i = 0; i < glyphs.length; i++) {
  14698. var glyph = glyphs[i];
  14699. var gid = this.subset.includeGlyph(glyph.id);
  14700. res.push("0000".concat(gid.toString(16)).slice(-4));
  14701. if (this.widths[gid] == null) {
  14702. this.widths[gid] = glyph.advanceWidth * this.scale;
  14703. }
  14704. if (this.unicode[gid] == null) {
  14705. this.unicode[gid] = glyph.codePoints;
  14706. }
  14707. }
  14708. return [res, positions];
  14709. }
  14710. }, {
  14711. key: "widthOfString",
  14712. value: function widthOfString(string, size, features) {
  14713. var width = this.layout(string, features, true).advanceWidth;
  14714. var scale = size / 1000;
  14715. return width * scale;
  14716. }
  14717. }, {
  14718. key: "embed",
  14719. value: function embed() {
  14720. var _this2 = this;
  14721. var isCFF = this.subset.cff != null;
  14722. var fontFile = this.document.ref();
  14723. if (isCFF) {
  14724. fontFile.data.Subtype = 'CIDFontType0C';
  14725. }
  14726. this.subset.encodeStream().on('data', function (data) {
  14727. return fontFile.write(data);
  14728. }).on('end', function () {
  14729. return fontFile.end();
  14730. });
  14731. var familyClass = ((this.font['OS/2'] != null ? this.font['OS/2'].sFamilyClass : undefined) || 0) >> 8;
  14732. var flags = 0;
  14733. if (this.font.post.isFixedPitch) {
  14734. flags |= 1 << 0;
  14735. }
  14736. if (1 <= familyClass && familyClass <= 7) {
  14737. flags |= 1 << 1;
  14738. }
  14739. flags |= 1 << 2; // assume the font uses non-latin characters
  14740. if (familyClass === 10) {
  14741. flags |= 1 << 3;
  14742. }
  14743. if (this.font.head.macStyle.italic) {
  14744. flags |= 1 << 6;
  14745. } // generate a tag (6 uppercase letters. 17 is the char code offset from '0' to 'A'. 73 will map to 'Z')
  14746. var tag = [1, 2, 3, 4, 5, 6].map(function (i) {
  14747. return String.fromCharCode((_this2.id.charCodeAt(i) || 73) + 17);
  14748. }).join('');
  14749. var name = tag + '+' + this.font.postscriptName;
  14750. var bbox = this.font.bbox;
  14751. var descriptor = this.document.ref({
  14752. Type: 'FontDescriptor',
  14753. FontName: name,
  14754. Flags: flags,
  14755. FontBBox: [bbox.minX * this.scale, bbox.minY * this.scale, bbox.maxX * this.scale, bbox.maxY * this.scale],
  14756. ItalicAngle: this.font.italicAngle,
  14757. Ascent: this.ascender,
  14758. Descent: this.descender,
  14759. CapHeight: (this.font.capHeight || this.font.ascent) * this.scale,
  14760. XHeight: (this.font.xHeight || 0) * this.scale,
  14761. StemV: 0
  14762. }); // not sure how to calculate this
  14763. if (isCFF) {
  14764. descriptor.data.FontFile3 = fontFile;
  14765. } else {
  14766. descriptor.data.FontFile2 = fontFile;
  14767. }
  14768. descriptor.end();
  14769. var descendantFontData = {
  14770. Type: 'Font',
  14771. Subtype: 'CIDFontType0',
  14772. BaseFont: name,
  14773. CIDSystemInfo: {
  14774. Registry: new String('Adobe'),
  14775. Ordering: new String('Identity'),
  14776. Supplement: 0
  14777. },
  14778. FontDescriptor: descriptor,
  14779. W: [0, this.widths]
  14780. };
  14781. if (!isCFF) {
  14782. descendantFontData.Subtype = 'CIDFontType2';
  14783. descendantFontData.CIDToGIDMap = 'Identity';
  14784. }
  14785. var descendantFont = this.document.ref(descendantFontData);
  14786. descendantFont.end();
  14787. this.dictionary.data = {
  14788. Type: 'Font',
  14789. Subtype: 'Type0',
  14790. BaseFont: name,
  14791. Encoding: 'Identity-H',
  14792. DescendantFonts: [descendantFont],
  14793. ToUnicode: this.toUnicodeCmap()
  14794. };
  14795. return this.dictionary.end();
  14796. } // Maps the glyph ids encoded in the PDF back to unicode strings
  14797. // Because of ligature substitutions and the like, there may be one or more
  14798. // unicode characters represented by each glyph.
  14799. }, {
  14800. key: "toUnicodeCmap",
  14801. value: function toUnicodeCmap() {
  14802. var cmap = this.document.ref();
  14803. var entries = [];
  14804. var _iterator = _createForOfIteratorHelper(this.unicode),
  14805. _step;
  14806. try {
  14807. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  14808. var codePoints = _step.value;
  14809. var encoded = []; // encode codePoints to utf16
  14810. var _iterator2 = _createForOfIteratorHelper(codePoints),
  14811. _step2;
  14812. try {
  14813. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  14814. var value = _step2.value;
  14815. if (value > 0xffff) {
  14816. value -= 0x10000;
  14817. encoded.push(toHex(value >>> 10 & 0x3ff | 0xd800));
  14818. value = 0xdc00 | value & 0x3ff;
  14819. }
  14820. encoded.push(toHex(value));
  14821. }
  14822. } catch (err) {
  14823. _iterator2.e(err);
  14824. } finally {
  14825. _iterator2.f();
  14826. }
  14827. entries.push("<".concat(encoded.join(' '), ">"));
  14828. }
  14829. } catch (err) {
  14830. _iterator.e(err);
  14831. } finally {
  14832. _iterator.f();
  14833. }
  14834. cmap.end("/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange\n1 beginbfrange\n<0000> <".concat(toHex(entries.length - 1), "> [").concat(entries.join(' '), "]\nendbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"));
  14835. return cmap;
  14836. }
  14837. }]);
  14838. return EmbeddedFont;
  14839. }(PDFFont);
  14840. var PDFFontFactory = /*#__PURE__*/function () {
  14841. function PDFFontFactory() {
  14842. _classCallCheck(this, PDFFontFactory);
  14843. }
  14844. _createClass(PDFFontFactory, null, [{
  14845. key: "open",
  14846. value: function open(document, src, family, id) {
  14847. var font;
  14848. if (typeof src === 'string') {
  14849. if (StandardFont.isStandardFont(src)) {
  14850. return new StandardFont(document, src, id);
  14851. }
  14852. src = fs.readFileSync(src);
  14853. }
  14854. if (Buffer.isBuffer(src)) {
  14855. font = _fontkit.default.create(src, family);
  14856. } else if (src instanceof Uint8Array) {
  14857. font = _fontkit.default.create(Buffer.from(src), family);
  14858. } else if (src instanceof ArrayBuffer) {
  14859. font = _fontkit.default.create(Buffer.from(new Uint8Array(src)), family);
  14860. }
  14861. if (font == null) {
  14862. throw new Error('Not a supported font format or standard PDF font.');
  14863. }
  14864. return new EmbeddedFont(document, font, id);
  14865. }
  14866. }]);
  14867. return PDFFontFactory;
  14868. }();
  14869. var FontsMixin = {
  14870. initFonts: function initFonts() {
  14871. var defaultFont = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Helvetica'; // Lookup table for embedded fonts
  14872. this._fontFamilies = {};
  14873. this._fontCount = 0; // Font state
  14874. this._fontSize = 12;
  14875. this._font = null;
  14876. this._registeredFonts = {}; // Set the default font
  14877. if (defaultFont) {
  14878. this.font(defaultFont);
  14879. }
  14880. },
  14881. font: function font(src, family, size) {
  14882. var cacheKey, font;
  14883. if (typeof family === 'number') {
  14884. size = family;
  14885. family = null;
  14886. } // check registered fonts if src is a string
  14887. if (typeof src === 'string' && this._registeredFonts[src]) {
  14888. cacheKey = src;
  14889. var _this$_registeredFont = this._registeredFonts[src];
  14890. src = _this$_registeredFont.src;
  14891. family = _this$_registeredFont.family;
  14892. } else {
  14893. cacheKey = family || src;
  14894. if (typeof cacheKey !== 'string') {
  14895. cacheKey = null;
  14896. }
  14897. }
  14898. if (size != null) {
  14899. this.fontSize(size);
  14900. } // fast path: check if the font is already in the PDF
  14901. if (font = this._fontFamilies[cacheKey]) {
  14902. this._font = font;
  14903. return this;
  14904. } // load the font
  14905. var id = "F".concat(++this._fontCount);
  14906. this._font = PDFFontFactory.open(this, src, family, id); // check for existing font familes with the same name already in the PDF
  14907. // useful if the font was passed as a buffer
  14908. if (font = this._fontFamilies[this._font.name]) {
  14909. this._font = font;
  14910. return this;
  14911. } // save the font for reuse later
  14912. if (cacheKey) {
  14913. this._fontFamilies[cacheKey] = this._font;
  14914. }
  14915. if (this._font.name) {
  14916. this._fontFamilies[this._font.name] = this._font;
  14917. }
  14918. return this;
  14919. },
  14920. fontSize: function fontSize(_fontSize) {
  14921. this._fontSize = _fontSize;
  14922. return this;
  14923. },
  14924. currentLineHeight: function currentLineHeight(includeGap) {
  14925. if (includeGap == null) {
  14926. includeGap = false;
  14927. }
  14928. return this._font.lineHeight(this._fontSize, includeGap);
  14929. },
  14930. registerFont: function registerFont(name, src, family) {
  14931. this._registeredFonts[name] = {
  14932. src: src,
  14933. family: family
  14934. };
  14935. return this;
  14936. }
  14937. };
  14938. var LineWrapper = /*#__PURE__*/function (_EventEmitter) {
  14939. _inherits(LineWrapper, _EventEmitter);
  14940. var _super = _createSuper(LineWrapper);
  14941. function LineWrapper(document, options) {
  14942. var _this;
  14943. _classCallCheck(this, LineWrapper);
  14944. _this = _super.call(this);
  14945. _this.document = document;
  14946. _this.indent = options.indent || 0;
  14947. _this.characterSpacing = options.characterSpacing || 0;
  14948. _this.wordSpacing = options.wordSpacing === 0;
  14949. _this.columns = options.columns || 1;
  14950. _this.columnGap = options.columnGap != null ? options.columnGap : 18; // 1/4 inch
  14951. _this.lineWidth = (options.width - _this.columnGap * (_this.columns - 1)) / _this.columns;
  14952. _this.spaceLeft = _this.lineWidth;
  14953. _this.startX = _this.document.x;
  14954. _this.startY = _this.document.y;
  14955. _this.column = 1;
  14956. _this.ellipsis = options.ellipsis;
  14957. _this.continuedX = 0;
  14958. _this.features = options.features; // calculate the maximum Y position the text can appear at
  14959. if (options.height != null) {
  14960. _this.height = options.height;
  14961. _this.maxY = _this.startY + options.height;
  14962. } else {
  14963. _this.maxY = _this.document.page.maxY();
  14964. } // handle paragraph indents
  14965. _this.on('firstLine', function (options) {
  14966. // if this is the first line of the text segment, and
  14967. // we're continuing where we left off, indent that much
  14968. // otherwise use the user specified indent option
  14969. var indent = _this.continuedX || _this.indent;
  14970. _this.document.x += indent;
  14971. _this.lineWidth -= indent;
  14972. return _this.once('line', function () {
  14973. _this.document.x -= indent;
  14974. _this.lineWidth += indent;
  14975. if (options.continued && !_this.continuedX) {
  14976. _this.continuedX = _this.indent;
  14977. }
  14978. if (!options.continued) {
  14979. return _this.continuedX = 0;
  14980. }
  14981. });
  14982. }); // handle left aligning last lines of paragraphs
  14983. _this.on('lastLine', function (options) {
  14984. var align = options.align;
  14985. if (align === 'justify') {
  14986. options.align = 'left';
  14987. }
  14988. _this.lastLine = true;
  14989. return _this.once('line', function () {
  14990. _this.document.y += options.paragraphGap || 0;
  14991. options.align = align;
  14992. return _this.lastLine = false;
  14993. });
  14994. });
  14995. return _this;
  14996. }
  14997. _createClass(LineWrapper, [{
  14998. key: "wordWidth",
  14999. value: function wordWidth(word) {
  15000. return this.document.widthOfString(word, this) + this.characterSpacing + this.wordSpacing;
  15001. }
  15002. }, {
  15003. key: "eachWord",
  15004. value: function eachWord(text, fn) {
  15005. // setup a unicode line breaker
  15006. var bk;
  15007. var breaker = new _linebreak.default(text);
  15008. var last = null;
  15009. var wordWidths = Object.create(null);
  15010. while (bk = breaker.nextBreak()) {
  15011. var shouldContinue;
  15012. var word = text.slice((last != null ? last.position : undefined) || 0, bk.position);
  15013. var w = wordWidths[word] != null ? wordWidths[word] : wordWidths[word] = this.wordWidth(word); // if the word is longer than the whole line, chop it up
  15014. // TODO: break by grapheme clusters, not JS string characters
  15015. if (w > this.lineWidth + this.continuedX) {
  15016. // make some fake break objects
  15017. var lbk = last;
  15018. var fbk = {};
  15019. while (word.length) {
  15020. // fit as much of the word as possible into the space we have
  15021. var l, mightGrow;
  15022. if (w > this.spaceLeft) {
  15023. // start our check at the end of our available space - this method is faster than a loop of each character and it resolves
  15024. // an issue with long loops when processing massive words, such as a huge number of spaces
  15025. l = Math.ceil(this.spaceLeft / (w / word.length));
  15026. w = this.wordWidth(word.slice(0, l));
  15027. mightGrow = w <= this.spaceLeft && l < word.length;
  15028. } else {
  15029. l = word.length;
  15030. }
  15031. var mustShrink = w > this.spaceLeft && l > 0; // shrink or grow word as necessary after our near-guess above
  15032. while (mustShrink || mightGrow) {
  15033. if (mustShrink) {
  15034. w = this.wordWidth(word.slice(0, --l));
  15035. mustShrink = w > this.spaceLeft && l > 0;
  15036. } else {
  15037. w = this.wordWidth(word.slice(0, ++l));
  15038. mustShrink = w > this.spaceLeft && l > 0;
  15039. mightGrow = w <= this.spaceLeft && l < word.length;
  15040. }
  15041. } // check for the edge case where a single character cannot fit into a line.
  15042. if (l === 0 && this.spaceLeft === this.lineWidth) {
  15043. l = 1;
  15044. } // send a required break unless this is the last piece and a linebreak is not specified
  15045. fbk.required = bk.required || l < word.length;
  15046. shouldContinue = fn(word.slice(0, l), w, fbk, lbk);
  15047. lbk = {
  15048. required: false
  15049. }; // get the remaining piece of the word
  15050. word = word.slice(l);
  15051. w = this.wordWidth(word);
  15052. if (shouldContinue === false) {
  15053. break;
  15054. }
  15055. }
  15056. } else {
  15057. // otherwise just emit the break as it was given to us
  15058. shouldContinue = fn(word, w, bk, last);
  15059. }
  15060. if (shouldContinue === false) {
  15061. break;
  15062. }
  15063. last = bk;
  15064. }
  15065. }
  15066. }, {
  15067. key: "wrap",
  15068. value: function wrap(text, options) {
  15069. var _this2 = this; // override options from previous continued fragments
  15070. if (options.indent != null) {
  15071. this.indent = options.indent;
  15072. }
  15073. if (options.characterSpacing != null) {
  15074. this.characterSpacing = options.characterSpacing;
  15075. }
  15076. if (options.wordSpacing != null) {
  15077. this.wordSpacing = options.wordSpacing;
  15078. }
  15079. if (options.ellipsis != null) {
  15080. this.ellipsis = options.ellipsis;
  15081. } // make sure we're actually on the page
  15082. // and that the first line of is never by
  15083. // itself at the bottom of a page (orphans)
  15084. var nextY = this.document.y + this.document.currentLineHeight(true);
  15085. if (this.document.y > this.maxY || nextY > this.maxY) {
  15086. this.nextSection();
  15087. }
  15088. var buffer = '';
  15089. var textWidth = 0;
  15090. var wc = 0;
  15091. var lc = 0;
  15092. var y = this.document.y; // used to reset Y pos if options.continued (below)
  15093. var emitLine = function emitLine() {
  15094. options.textWidth = textWidth + _this2.wordSpacing * (wc - 1);
  15095. options.wordCount = wc;
  15096. options.lineWidth = _this2.lineWidth;
  15097. y = _this2.document.y;
  15098. _this2.emit('line', buffer, options, _this2);
  15099. return lc++;
  15100. };
  15101. this.emit('sectionStart', options, this);
  15102. this.eachWord(text, function (word, w, bk, last) {
  15103. if (last == null || last.required) {
  15104. _this2.emit('firstLine', options, _this2);
  15105. _this2.spaceLeft = _this2.lineWidth;
  15106. }
  15107. if (w <= _this2.spaceLeft) {
  15108. buffer += word;
  15109. textWidth += w;
  15110. wc++;
  15111. }
  15112. if (bk.required || w > _this2.spaceLeft) {
  15113. // if the user specified a max height and an ellipsis, and is about to pass the
  15114. // max height and max columns after the next line, append the ellipsis
  15115. var lh = _this2.document.currentLineHeight(true);
  15116. if (_this2.height != null && _this2.ellipsis && _this2.document.y + lh * 2 > _this2.maxY && _this2.column >= _this2.columns) {
  15117. if (_this2.ellipsis === true) {
  15118. _this2.ellipsis = '…';
  15119. } // map default ellipsis character
  15120. buffer = buffer.replace(/\s+$/, '');
  15121. textWidth = _this2.wordWidth(buffer + _this2.ellipsis); // remove characters from the buffer until the ellipsis fits
  15122. // to avoid infinite loop need to stop while-loop if buffer is empty string
  15123. while (buffer && textWidth > _this2.lineWidth) {
  15124. buffer = buffer.slice(0, -1).replace(/\s+$/, '');
  15125. textWidth = _this2.wordWidth(buffer + _this2.ellipsis);
  15126. } // need to add ellipsis only if there is enough space for it
  15127. if (textWidth <= _this2.lineWidth) {
  15128. buffer = buffer + _this2.ellipsis;
  15129. }
  15130. textWidth = _this2.wordWidth(buffer);
  15131. }
  15132. if (bk.required) {
  15133. if (w > _this2.spaceLeft) {
  15134. emitLine();
  15135. buffer = word;
  15136. textWidth = w;
  15137. wc = 1;
  15138. }
  15139. _this2.emit('lastLine', options, _this2);
  15140. }
  15141. emitLine(); // if we've reached the edge of the page,
  15142. // continue on a new page or column
  15143. if (_this2.document.y + lh > _this2.maxY) {
  15144. var shouldContinue = _this2.nextSection(); // stop if we reached the maximum height
  15145. if (!shouldContinue) {
  15146. wc = 0;
  15147. buffer = '';
  15148. return false;
  15149. }
  15150. } // reset the space left and buffer
  15151. if (bk.required) {
  15152. _this2.spaceLeft = _this2.lineWidth;
  15153. buffer = '';
  15154. textWidth = 0;
  15155. return wc = 0;
  15156. } else {
  15157. // reset the space left and buffer
  15158. _this2.spaceLeft = _this2.lineWidth - w;
  15159. buffer = word;
  15160. textWidth = w;
  15161. return wc = 1;
  15162. }
  15163. } else {
  15164. return _this2.spaceLeft -= w;
  15165. }
  15166. });
  15167. if (wc > 0) {
  15168. this.emit('lastLine', options, this);
  15169. emitLine();
  15170. }
  15171. this.emit('sectionEnd', options, this); // if the wrap is set to be continued, save the X position
  15172. // to start the first line of the next segment at, and reset
  15173. // the y position
  15174. if (options.continued === true) {
  15175. if (lc > 1) {
  15176. this.continuedX = 0;
  15177. }
  15178. this.continuedX += options.textWidth || 0;
  15179. return this.document.y = y;
  15180. } else {
  15181. return this.document.x = this.startX;
  15182. }
  15183. }
  15184. }, {
  15185. key: "nextSection",
  15186. value: function nextSection(options) {
  15187. this.emit('sectionEnd', options, this);
  15188. if (++this.column > this.columns) {
  15189. // if a max height was specified by the user, we're done.
  15190. // otherwise, the default is to make a new page at the bottom.
  15191. if (this.height != null) {
  15192. return false;
  15193. }
  15194. this.document.continueOnNewPage();
  15195. this.column = 1;
  15196. this.startY = this.document.page.margins.top;
  15197. this.maxY = this.document.page.maxY();
  15198. this.document.x = this.startX;
  15199. if (this.document._fillColor) {
  15200. var _this$document;
  15201. (_this$document = this.document).fillColor.apply(_this$document, _toConsumableArray(this.document._fillColor));
  15202. }
  15203. this.emit('pageBreak', options, this);
  15204. } else {
  15205. this.document.x += this.lineWidth + this.columnGap;
  15206. this.document.y = this.startY;
  15207. this.emit('columnBreak', options, this);
  15208. }
  15209. this.emit('sectionStart', options, this);
  15210. return true;
  15211. }
  15212. }]);
  15213. return LineWrapper;
  15214. }(_events.EventEmitter);
  15215. var number$2 = PDFObject.number;
  15216. var TextMixin = {
  15217. initText: function initText() {
  15218. this._line = this._line.bind(this); // Current coordinates
  15219. this.x = 0;
  15220. this.y = 0;
  15221. return this._lineGap = 0;
  15222. },
  15223. lineGap: function lineGap(_lineGap) {
  15224. this._lineGap = _lineGap;
  15225. return this;
  15226. },
  15227. moveDown: function moveDown(lines) {
  15228. if (lines == null) {
  15229. lines = 1;
  15230. }
  15231. this.y += this.currentLineHeight(true) * lines + this._lineGap;
  15232. return this;
  15233. },
  15234. moveUp: function moveUp(lines) {
  15235. if (lines == null) {
  15236. lines = 1;
  15237. }
  15238. this.y -= this.currentLineHeight(true) * lines + this._lineGap;
  15239. return this;
  15240. },
  15241. _text: function _text(text, x, y, options, lineCallback) {
  15242. var _this = this;
  15243. options = this._initOptions(x, y, options); // Convert text to a string
  15244. text = text == null ? '' : "".concat(text); // if the wordSpacing option is specified, remove multiple consecutive spaces
  15245. if (options.wordSpacing) {
  15246. text = text.replace(/\s{2,}/g, ' ');
  15247. }
  15248. var addStructure = function addStructure() {
  15249. if (options.structParent) {
  15250. options.structParent.add(_this.struct(options.structType || 'P', [_this.markStructureContent(options.structType || 'P')]));
  15251. }
  15252. }; // word wrapping
  15253. if (options.width) {
  15254. var wrapper = this._wrapper;
  15255. if (!wrapper) {
  15256. wrapper = new LineWrapper(this, options);
  15257. wrapper.on('line', lineCallback);
  15258. wrapper.on('firstLine', addStructure);
  15259. }
  15260. this._wrapper = options.continued ? wrapper : null;
  15261. this._textOptions = options.continued ? options : null;
  15262. wrapper.wrap(text, options); // render paragraphs as single lines
  15263. } else {
  15264. var _iterator = _createForOfIteratorHelper(text.split('\n')),
  15265. _step;
  15266. try {
  15267. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  15268. var line = _step.value;
  15269. addStructure();
  15270. lineCallback(line, options);
  15271. }
  15272. } catch (err) {
  15273. _iterator.e(err);
  15274. } finally {
  15275. _iterator.f();
  15276. }
  15277. }
  15278. return this;
  15279. },
  15280. text: function text(_text2, x, y, options) {
  15281. return this._text(_text2, x, y, options, this._line);
  15282. },
  15283. widthOfString: function widthOfString(string) {
  15284. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15285. return this._font.widthOfString(string, this._fontSize, options.features) + (options.characterSpacing || 0) * (string.length - 1);
  15286. },
  15287. heightOfString: function heightOfString(text, options) {
  15288. var _this2 = this;
  15289. var x = this.x,
  15290. y = this.y;
  15291. options = this._initOptions(options);
  15292. options.height = Infinity; // don't break pages
  15293. var lineGap = options.lineGap || this._lineGap || 0;
  15294. this._text(text, this.x, this.y, options, function () {
  15295. return _this2.y += _this2.currentLineHeight(true) + lineGap;
  15296. });
  15297. var height = this.y - y;
  15298. this.x = x;
  15299. this.y = y;
  15300. return height;
  15301. },
  15302. list: function list(_list, x, y, options, wrapper) {
  15303. var _this3 = this;
  15304. options = this._initOptions(x, y, options);
  15305. var listType = options.listType || 'bullet';
  15306. var unit = Math.round(this._font.ascender / 1000 * this._fontSize);
  15307. var midLine = unit / 2;
  15308. var r = options.bulletRadius || unit / 3;
  15309. var indent = options.textIndent || (listType === 'bullet' ? r * 5 : unit * 2);
  15310. var itemIndent = options.bulletIndent || (listType === 'bullet' ? r * 8 : unit * 2);
  15311. var level = 1;
  15312. var items = [];
  15313. var levels = [];
  15314. var numbers = [];
  15315. var flatten = function flatten(list) {
  15316. var n = 1;
  15317. for (var _i = 0; _i < list.length; _i++) {
  15318. var item = list[_i];
  15319. if (Array.isArray(item)) {
  15320. level++;
  15321. flatten(item);
  15322. level--;
  15323. } else {
  15324. items.push(item);
  15325. levels.push(level);
  15326. if (listType !== 'bullet') {
  15327. numbers.push(n++);
  15328. }
  15329. }
  15330. }
  15331. };
  15332. flatten(_list);
  15333. var label = function label(n) {
  15334. switch (listType) {
  15335. case 'numbered':
  15336. return "".concat(n, ".");
  15337. case 'lettered':
  15338. var letter = String.fromCharCode((n - 1) % 26 + 65);
  15339. var times = Math.floor((n - 1) / 26 + 1);
  15340. var text = Array(times + 1).join(letter);
  15341. return "".concat(text, ".");
  15342. }
  15343. };
  15344. wrapper = new LineWrapper(this, options);
  15345. wrapper.on('line', this._line);
  15346. level = 1;
  15347. var i = 0;
  15348. wrapper.on('firstLine', function () {
  15349. var item, itemType, labelType, bodyType;
  15350. if (options.structParent) {
  15351. if (options.structTypes) {
  15352. var _options$structTypes = _slicedToArray(options.structTypes, 3);
  15353. itemType = _options$structTypes[0];
  15354. labelType = _options$structTypes[1];
  15355. bodyType = _options$structTypes[2];
  15356. } else {
  15357. itemType = 'LI';
  15358. labelType = 'Lbl';
  15359. bodyType = 'LBody';
  15360. }
  15361. }
  15362. if (itemType) {
  15363. item = _this3.struct(itemType);
  15364. options.structParent.add(item);
  15365. } else if (options.structParent) {
  15366. item = options.structParent;
  15367. }
  15368. var l;
  15369. if ((l = levels[i++]) !== level) {
  15370. var diff = itemIndent * (l - level);
  15371. _this3.x += diff;
  15372. wrapper.lineWidth -= diff;
  15373. level = l;
  15374. }
  15375. if (item && (labelType || bodyType)) {
  15376. item.add(_this3.struct(labelType || bodyType, [_this3.markStructureContent(labelType || bodyType)]));
  15377. }
  15378. switch (listType) {
  15379. case 'bullet':
  15380. _this3.circle(_this3.x - indent + r, _this3.y + midLine, r);
  15381. _this3.fill();
  15382. break;
  15383. case 'numbered':
  15384. case 'lettered':
  15385. var text = label(numbers[i - 1]);
  15386. _this3._fragment(text, _this3.x - indent, _this3.y, options);
  15387. break;
  15388. }
  15389. if (item && labelType && bodyType) {
  15390. item.add(_this3.struct(bodyType, [_this3.markStructureContent(bodyType)]));
  15391. }
  15392. if (item && item !== options.structParent) {
  15393. item.end();
  15394. }
  15395. });
  15396. wrapper.on('sectionStart', function () {
  15397. var pos = indent + itemIndent * (level - 1);
  15398. _this3.x += pos;
  15399. return wrapper.lineWidth -= pos;
  15400. });
  15401. wrapper.on('sectionEnd', function () {
  15402. var pos = indent + itemIndent * (level - 1);
  15403. _this3.x -= pos;
  15404. return wrapper.lineWidth += pos;
  15405. });
  15406. wrapper.wrap(items.join('\n'), options);
  15407. return this;
  15408. },
  15409. _initOptions: function _initOptions() {
  15410. var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  15411. var y = arguments.length > 1 ? arguments[1] : undefined;
  15412. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  15413. if (typeof x === 'object') {
  15414. options = x;
  15415. x = null;
  15416. } // clone options object
  15417. var result = Object.assign({}, options); // extend options with previous values for continued text
  15418. if (this._textOptions) {
  15419. for (var key in this._textOptions) {
  15420. var val = this._textOptions[key];
  15421. if (key !== 'continued') {
  15422. if (result[key] === undefined) {
  15423. result[key] = val;
  15424. }
  15425. }
  15426. }
  15427. } // Update the current position
  15428. if (x != null) {
  15429. this.x = x;
  15430. }
  15431. if (y != null) {
  15432. this.y = y;
  15433. } // wrap to margins if no x or y position passed
  15434. if (result.lineBreak !== false) {
  15435. if (result.width == null) {
  15436. result.width = this.page.width - this.x - this.page.margins.right;
  15437. }
  15438. result.width = Math.max(result.width, 0);
  15439. }
  15440. if (!result.columns) {
  15441. result.columns = 0;
  15442. }
  15443. if (result.columnGap == null) {
  15444. result.columnGap = 18;
  15445. } // 1/4 inch
  15446. return result;
  15447. },
  15448. _line: function _line(text) {
  15449. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  15450. var wrapper = arguments.length > 2 ? arguments[2] : undefined;
  15451. this._fragment(text, this.x, this.y, options);
  15452. var lineGap = options.lineGap || this._lineGap || 0;
  15453. if (!wrapper) {
  15454. return this.x += this.widthOfString(text);
  15455. } else {
  15456. return this.y += this.currentLineHeight(true) + lineGap;
  15457. }
  15458. },
  15459. _fragment: function _fragment(text, x, y, options) {
  15460. var _this4 = this;
  15461. var dy, encoded, i, positions, textWidth, words;
  15462. text = "".concat(text).replace(/\n/g, '');
  15463. if (text.length === 0) {
  15464. return;
  15465. } // handle options
  15466. var align = options.align || 'left';
  15467. var wordSpacing = options.wordSpacing || 0;
  15468. var characterSpacing = options.characterSpacing || 0; // text alignments
  15469. if (options.width) {
  15470. switch (align) {
  15471. case 'right':
  15472. textWidth = this.widthOfString(text.replace(/\s+$/, ''), options);
  15473. x += options.lineWidth - textWidth;
  15474. break;
  15475. case 'center':
  15476. x += options.lineWidth / 2 - options.textWidth / 2;
  15477. break;
  15478. case 'justify':
  15479. // calculate the word spacing value
  15480. words = text.trim().split(/\s+/);
  15481. textWidth = this.widthOfString(text.replace(/\s+/g, ''), options);
  15482. var spaceWidth = this.widthOfString(' ') + characterSpacing;
  15483. wordSpacing = Math.max(0, (options.lineWidth - textWidth) / Math.max(1, words.length - 1) - spaceWidth);
  15484. break;
  15485. }
  15486. } // text baseline alignments based on http://wiki.apache.org/xmlgraphics-fop/LineLayout/AlignmentHandling
  15487. if (typeof options.baseline === 'number') {
  15488. dy = -options.baseline;
  15489. } else {
  15490. switch (options.baseline) {
  15491. case 'svg-middle':
  15492. dy = 0.5 * this._font.xHeight;
  15493. break;
  15494. case 'middle':
  15495. case 'svg-central':
  15496. dy = 0.5 * (this._font.descender + this._font.ascender);
  15497. break;
  15498. case 'bottom':
  15499. case 'ideographic':
  15500. dy = this._font.descender;
  15501. break;
  15502. case 'alphabetic':
  15503. dy = 0;
  15504. break;
  15505. case 'mathematical':
  15506. dy = 0.5 * this._font.ascender;
  15507. break;
  15508. case 'hanging':
  15509. dy = 0.8 * this._font.ascender;
  15510. break;
  15511. case 'top':
  15512. dy = this._font.ascender;
  15513. break;
  15514. default:
  15515. dy = this._font.ascender;
  15516. }
  15517. dy = dy / 1000 * this._fontSize;
  15518. } // calculate the actual rendered width of the string after word and character spacing
  15519. var renderedWidth = options.textWidth + wordSpacing * (options.wordCount - 1) + characterSpacing * (text.length - 1); // create link annotations if the link option is given
  15520. if (options.link != null) {
  15521. this.link(x, y, renderedWidth, this.currentLineHeight(), options.link);
  15522. }
  15523. if (options.goTo != null) {
  15524. this.goTo(x, y, renderedWidth, this.currentLineHeight(), options.goTo);
  15525. }
  15526. if (options.destination != null) {
  15527. this.addNamedDestination(options.destination, 'XYZ', x, y, null);
  15528. } // create underline
  15529. if (options.underline) {
  15530. this.save();
  15531. if (!options.stroke) {
  15532. this.strokeColor.apply(this, _toConsumableArray(this._fillColor || []));
  15533. }
  15534. var lineWidth = this._fontSize < 10 ? 0.5 : Math.floor(this._fontSize / 10);
  15535. this.lineWidth(lineWidth);
  15536. var lineY = y + this.currentLineHeight() - lineWidth;
  15537. this.moveTo(x, lineY);
  15538. this.lineTo(x + renderedWidth, lineY);
  15539. this.stroke();
  15540. this.restore();
  15541. } // create strikethrough line
  15542. if (options.strike) {
  15543. this.save();
  15544. if (!options.stroke) {
  15545. this.strokeColor.apply(this, _toConsumableArray(this._fillColor || []));
  15546. }
  15547. var _lineWidth = this._fontSize < 10 ? 0.5 : Math.floor(this._fontSize / 10);
  15548. this.lineWidth(_lineWidth);
  15549. var _lineY = y + this.currentLineHeight() / 2;
  15550. this.moveTo(x, _lineY);
  15551. this.lineTo(x + renderedWidth, _lineY);
  15552. this.stroke();
  15553. this.restore();
  15554. }
  15555. this.save(); // oblique (angle in degrees or boolean)
  15556. if (options.oblique) {
  15557. var skew;
  15558. if (typeof options.oblique === 'number') {
  15559. skew = -Math.tan(options.oblique * Math.PI / 180);
  15560. } else {
  15561. skew = -0.25;
  15562. }
  15563. this.transform(1, 0, 0, 1, x, y);
  15564. this.transform(1, 0, skew, 1, -skew * dy, 0);
  15565. this.transform(1, 0, 0, 1, -x, -y);
  15566. } // flip coordinate system
  15567. this.transform(1, 0, 0, -1, 0, this.page.height);
  15568. y = this.page.height - y - dy; // add current font to page if necessary
  15569. if (this.page.fonts[this._font.id] == null) {
  15570. this.page.fonts[this._font.id] = this._font.ref();
  15571. } // begin the text object
  15572. this.addContent('BT'); // text position
  15573. this.addContent("1 0 0 1 ".concat(number$2(x), " ").concat(number$2(y), " Tm")); // font and font size
  15574. this.addContent("/".concat(this._font.id, " ").concat(number$2(this._fontSize), " Tf")); // rendering mode
  15575. var mode = options.fill && options.stroke ? 2 : options.stroke ? 1 : 0;
  15576. if (mode) {
  15577. this.addContent("".concat(mode, " Tr"));
  15578. } // Character spacing
  15579. if (characterSpacing) {
  15580. this.addContent("".concat(number$2(characterSpacing), " Tc"));
  15581. } // Add the actual text
  15582. // If we have a word spacing value, we need to encode each word separately
  15583. // since the normal Tw operator only works on character code 32, which isn't
  15584. // used for embedded fonts.
  15585. if (wordSpacing) {
  15586. words = text.trim().split(/\s+/);
  15587. wordSpacing += this.widthOfString(' ') + characterSpacing;
  15588. wordSpacing *= 1000 / this._fontSize;
  15589. encoded = [];
  15590. positions = [];
  15591. var _iterator2 = _createForOfIteratorHelper(words),
  15592. _step2;
  15593. try {
  15594. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  15595. var word = _step2.value;
  15596. var _this$_font$encode = this._font.encode(word, options.features),
  15597. _this$_font$encode2 = _slicedToArray(_this$_font$encode, 2),
  15598. encodedWord = _this$_font$encode2[0],
  15599. positionsWord = _this$_font$encode2[1];
  15600. encoded = encoded.concat(encodedWord);
  15601. positions = positions.concat(positionsWord); // add the word spacing to the end of the word
  15602. // clone object because of cache
  15603. var space = {};
  15604. var object = positions[positions.length - 1];
  15605. for (var key in object) {
  15606. var val = object[key];
  15607. space[key] = val;
  15608. }
  15609. space.xAdvance += wordSpacing;
  15610. positions[positions.length - 1] = space;
  15611. }
  15612. } catch (err) {
  15613. _iterator2.e(err);
  15614. } finally {
  15615. _iterator2.f();
  15616. }
  15617. } else {
  15618. var _this$_font$encode3 = this._font.encode(text, options.features);
  15619. var _this$_font$encode4 = _slicedToArray(_this$_font$encode3, 2);
  15620. encoded = _this$_font$encode4[0];
  15621. positions = _this$_font$encode4[1];
  15622. }
  15623. var scale = this._fontSize / 1000;
  15624. var commands = [];
  15625. var last = 0;
  15626. var hadOffset = false; // Adds a segment of text to the TJ command buffer
  15627. var addSegment = function addSegment(cur) {
  15628. if (last < cur) {
  15629. var hex = encoded.slice(last, cur).join('');
  15630. var advance = positions[cur - 1].xAdvance - positions[cur - 1].advanceWidth;
  15631. commands.push("<".concat(hex, "> ").concat(number$2(-advance)));
  15632. }
  15633. return last = cur;
  15634. }; // Flushes the current TJ commands to the output stream
  15635. var flush = function flush(i) {
  15636. addSegment(i);
  15637. if (commands.length > 0) {
  15638. _this4.addContent("[".concat(commands.join(' '), "] TJ"));
  15639. return commands.length = 0;
  15640. }
  15641. };
  15642. for (i = 0; i < positions.length; i++) {
  15643. // If we have an x or y offset, we have to break out of the current TJ command
  15644. // so we can move the text position.
  15645. var pos = positions[i];
  15646. if (pos.xOffset || pos.yOffset) {
  15647. // Flush the current buffer
  15648. flush(i); // Move the text position and flush just the current character
  15649. this.addContent("1 0 0 1 ".concat(number$2(x + pos.xOffset * scale), " ").concat(number$2(y + pos.yOffset * scale), " Tm"));
  15650. flush(i + 1);
  15651. hadOffset = true;
  15652. } else {
  15653. // If the last character had an offset, reset the text position
  15654. if (hadOffset) {
  15655. this.addContent("1 0 0 1 ".concat(number$2(x), " ").concat(number$2(y), " Tm"));
  15656. hadOffset = false;
  15657. } // Group segments that don't have any advance adjustments
  15658. if (pos.xAdvance - pos.advanceWidth !== 0) {
  15659. addSegment(i + 1);
  15660. }
  15661. }
  15662. x += pos.xAdvance * scale;
  15663. } // Flush any remaining commands
  15664. flush(i); // end the text object
  15665. this.addContent('ET'); // restore flipped coordinate system
  15666. return this.restore();
  15667. }
  15668. };
  15669. var MARKERS = [0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc5, 0xffc6, 0xffc7, 0xffc8, 0xffc9, 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf];
  15670. var COLOR_SPACE_MAP = {
  15671. 1: 'DeviceGray',
  15672. 3: 'DeviceRGB',
  15673. 4: 'DeviceCMYK'
  15674. };
  15675. var JPEG = /*#__PURE__*/function () {
  15676. function JPEG(data, label) {
  15677. _classCallCheck(this, JPEG);
  15678. var marker;
  15679. this.data = data;
  15680. this.label = label;
  15681. if (this.data.readUInt16BE(0) !== 0xffd8) {
  15682. throw 'SOI not found in JPEG';
  15683. }
  15684. var pos = 2;
  15685. while (pos < this.data.length) {
  15686. marker = this.data.readUInt16BE(pos);
  15687. pos += 2;
  15688. if (MARKERS.includes(marker)) {
  15689. break;
  15690. }
  15691. pos += this.data.readUInt16BE(pos);
  15692. }
  15693. if (!MARKERS.includes(marker)) {
  15694. throw 'Invalid JPEG.';
  15695. }
  15696. pos += 2;
  15697. this.bits = this.data[pos++];
  15698. this.height = this.data.readUInt16BE(pos);
  15699. pos += 2;
  15700. this.width = this.data.readUInt16BE(pos);
  15701. pos += 2;
  15702. var channels = this.data[pos++];
  15703. this.colorSpace = COLOR_SPACE_MAP[channels];
  15704. this.obj = null;
  15705. }
  15706. _createClass(JPEG, [{
  15707. key: "embed",
  15708. value: function embed(document) {
  15709. if (this.obj) {
  15710. return;
  15711. }
  15712. this.obj = document.ref({
  15713. Type: 'XObject',
  15714. Subtype: 'Image',
  15715. BitsPerComponent: this.bits,
  15716. Width: this.width,
  15717. Height: this.height,
  15718. ColorSpace: this.colorSpace,
  15719. Filter: 'DCTDecode'
  15720. }); // add extra decode params for CMYK images. By swapping the
  15721. // min and max values from the default, we invert the colors. See
  15722. // section 4.8.4 of the spec.
  15723. if (this.colorSpace === 'DeviceCMYK') {
  15724. this.obj.data['Decode'] = [1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0];
  15725. }
  15726. this.obj.end(this.data); // free memory
  15727. return this.data = null;
  15728. }
  15729. }]);
  15730. return JPEG;
  15731. }();
  15732. var PNGImage = /*#__PURE__*/function () {
  15733. function PNGImage(data, label) {
  15734. _classCallCheck(this, PNGImage);
  15735. this.label = label;
  15736. this.image = new _pngJs.default(data);
  15737. this.width = this.image.width;
  15738. this.height = this.image.height;
  15739. this.imgData = this.image.imgData;
  15740. this.obj = null;
  15741. }
  15742. _createClass(PNGImage, [{
  15743. key: "embed",
  15744. value: function embed(document) {
  15745. var dataDecoded = false;
  15746. this.document = document;
  15747. if (this.obj) {
  15748. return;
  15749. }
  15750. var hasAlphaChannel = this.image.hasAlphaChannel;
  15751. var isInterlaced = this.image.interlaceMethod === 1;
  15752. this.obj = this.document.ref({
  15753. Type: 'XObject',
  15754. Subtype: 'Image',
  15755. BitsPerComponent: hasAlphaChannel ? 8 : this.image.bits,
  15756. Width: this.width,
  15757. Height: this.height,
  15758. Filter: 'FlateDecode'
  15759. });
  15760. if (!hasAlphaChannel) {
  15761. var params = this.document.ref({
  15762. Predictor: isInterlaced ? 1 : 15,
  15763. Colors: this.image.colors,
  15764. BitsPerComponent: this.image.bits,
  15765. Columns: this.width
  15766. });
  15767. this.obj.data['DecodeParms'] = params;
  15768. params.end();
  15769. }
  15770. if (this.image.palette.length === 0) {
  15771. this.obj.data['ColorSpace'] = this.image.colorSpace;
  15772. } else {
  15773. // embed the color palette in the PDF as an object stream
  15774. var palette = this.document.ref();
  15775. palette.end(Buffer.from(this.image.palette)); // build the color space array for the image
  15776. this.obj.data['ColorSpace'] = ['Indexed', 'DeviceRGB', this.image.palette.length / 3 - 1, palette];
  15777. } // For PNG color types 0, 2 and 3, the transparency data is stored in
  15778. // a dedicated PNG chunk.
  15779. if (this.image.transparency.grayscale != null) {
  15780. // Use Color Key Masking (spec section 4.8.5)
  15781. // An array with N elements, where N is two times the number of color components.
  15782. var val = this.image.transparency.grayscale;
  15783. this.obj.data['Mask'] = [val, val];
  15784. } else if (this.image.transparency.rgb) {
  15785. // Use Color Key Masking (spec section 4.8.5)
  15786. // An array with N elements, where N is two times the number of color components.
  15787. var rgb = this.image.transparency.rgb;
  15788. var mask = [];
  15789. var _iterator = _createForOfIteratorHelper(rgb),
  15790. _step;
  15791. try {
  15792. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  15793. var x = _step.value;
  15794. mask.push(x, x);
  15795. }
  15796. } catch (err) {
  15797. _iterator.e(err);
  15798. } finally {
  15799. _iterator.f();
  15800. }
  15801. this.obj.data['Mask'] = mask;
  15802. } else if (this.image.transparency.indexed) {
  15803. // Create a transparency SMask for the image based on the data
  15804. // in the PLTE and tRNS sections. See below for details on SMasks.
  15805. dataDecoded = true;
  15806. return this.loadIndexedAlphaChannel();
  15807. } else if (hasAlphaChannel) {
  15808. // For PNG color types 4 and 6, the transparency data is stored as a alpha
  15809. // channel mixed in with the main image data. Separate this data out into an
  15810. // SMask object and store it separately in the PDF.
  15811. dataDecoded = true;
  15812. return this.splitAlphaChannel();
  15813. }
  15814. if (isInterlaced && !dataDecoded) {
  15815. return this.decodeData();
  15816. }
  15817. this.finalize();
  15818. }
  15819. }, {
  15820. key: "finalize",
  15821. value: function finalize() {
  15822. if (this.alphaChannel) {
  15823. var sMask = this.document.ref({
  15824. Type: 'XObject',
  15825. Subtype: 'Image',
  15826. Height: this.height,
  15827. Width: this.width,
  15828. BitsPerComponent: 8,
  15829. Filter: 'FlateDecode',
  15830. ColorSpace: 'DeviceGray',
  15831. Decode: [0, 1]
  15832. });
  15833. sMask.end(this.alphaChannel);
  15834. this.obj.data['SMask'] = sMask;
  15835. } // add the actual image data
  15836. this.obj.end(this.imgData); // free memory
  15837. this.image = null;
  15838. return this.imgData = null;
  15839. }
  15840. }, {
  15841. key: "splitAlphaChannel",
  15842. value: function splitAlphaChannel() {
  15843. var _this = this;
  15844. return this.image.decodePixels(function (pixels) {
  15845. var a, p;
  15846. var colorCount = _this.image.colors;
  15847. var pixelCount = _this.width * _this.height;
  15848. var imgData = Buffer.alloc(pixelCount * colorCount);
  15849. var alphaChannel = Buffer.alloc(pixelCount);
  15850. var i = p = a = 0;
  15851. var len = pixels.length; // For 16bit images copy only most significant byte (MSB) - PNG data is always stored in network byte order (MSB first)
  15852. var skipByteCount = _this.image.bits === 16 ? 1 : 0;
  15853. while (i < len) {
  15854. for (var colorIndex = 0; colorIndex < colorCount; colorIndex++) {
  15855. imgData[p++] = pixels[i++];
  15856. i += skipByteCount;
  15857. }
  15858. alphaChannel[a++] = pixels[i++];
  15859. i += skipByteCount;
  15860. }
  15861. _this.imgData = _zlib.default.deflateSync(imgData);
  15862. _this.alphaChannel = _zlib.default.deflateSync(alphaChannel);
  15863. return _this.finalize();
  15864. });
  15865. }
  15866. }, {
  15867. key: "loadIndexedAlphaChannel",
  15868. value: function loadIndexedAlphaChannel() {
  15869. var _this2 = this;
  15870. var transparency = this.image.transparency.indexed;
  15871. return this.image.decodePixels(function (pixels) {
  15872. var alphaChannel = Buffer.alloc(_this2.width * _this2.height);
  15873. var i = 0;
  15874. for (var j = 0, end = pixels.length; j < end; j++) {
  15875. alphaChannel[i++] = transparency[pixels[j]];
  15876. }
  15877. _this2.alphaChannel = _zlib.default.deflateSync(alphaChannel);
  15878. return _this2.finalize();
  15879. });
  15880. }
  15881. }, {
  15882. key: "decodeData",
  15883. value: function decodeData() {
  15884. var _this3 = this;
  15885. this.image.decodePixels(function (pixels) {
  15886. _this3.imgData = _zlib.default.deflateSync(pixels);
  15887. _this3.finalize();
  15888. });
  15889. }
  15890. }]);
  15891. return PNGImage;
  15892. }();
  15893. var PDFImage = /*#__PURE__*/function () {
  15894. function PDFImage() {
  15895. _classCallCheck(this, PDFImage);
  15896. }
  15897. _createClass(PDFImage, null, [{
  15898. key: "open",
  15899. value: function open(src, label) {
  15900. var data;
  15901. if (Buffer.isBuffer(src)) {
  15902. data = src;
  15903. } else if (src instanceof ArrayBuffer) {
  15904. data = Buffer.from(new Uint8Array(src));
  15905. } else {
  15906. var match;
  15907. if (match = /^data:.+;base64,(.*)$/.exec(src)) {
  15908. data = Buffer.from(match[1], 'base64');
  15909. } else {
  15910. data = fs.readFileSync(src);
  15911. if (!data) {
  15912. return;
  15913. }
  15914. }
  15915. }
  15916. if (data[0] === 0xff && data[1] === 0xd8) {
  15917. return new JPEG(data, label);
  15918. } else if (data[0] === 0x89 && data.toString('ascii', 1, 4) === 'PNG') {
  15919. return new PNGImage(data, label);
  15920. } else {
  15921. throw new Error('Unknown image format.');
  15922. }
  15923. }
  15924. }]);
  15925. return PDFImage;
  15926. }();
  15927. var ImagesMixin = {
  15928. initImages: function initImages() {
  15929. this._imageRegistry = {};
  15930. return this._imageCount = 0;
  15931. },
  15932. image: function image(src, x, y) {
  15933. var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
  15934. var bh, bp, bw, image, ip, left, left1;
  15935. if (typeof x === 'object') {
  15936. options = x;
  15937. x = null;
  15938. }
  15939. x = (left = x != null ? x : options.x) != null ? left : this.x;
  15940. y = (left1 = y != null ? y : options.y) != null ? left1 : this.y;
  15941. if (typeof src === 'string') {
  15942. image = this._imageRegistry[src];
  15943. }
  15944. if (!image) {
  15945. if (src.width && src.height) {
  15946. image = src;
  15947. } else {
  15948. image = this.openImage(src);
  15949. }
  15950. }
  15951. if (!image.obj) {
  15952. image.embed(this);
  15953. }
  15954. if (this.page.xobjects[image.label] == null) {
  15955. this.page.xobjects[image.label] = image.obj;
  15956. }
  15957. var w = options.width || image.width;
  15958. var h = options.height || image.height;
  15959. if (options.width && !options.height) {
  15960. var wp = w / image.width;
  15961. w = image.width * wp;
  15962. h = image.height * wp;
  15963. } else if (options.height && !options.width) {
  15964. var hp = h / image.height;
  15965. w = image.width * hp;
  15966. h = image.height * hp;
  15967. } else if (options.scale) {
  15968. w = image.width * options.scale;
  15969. h = image.height * options.scale;
  15970. } else if (options.fit) {
  15971. var _options$fit = _slicedToArray(options.fit, 2);
  15972. bw = _options$fit[0];
  15973. bh = _options$fit[1];
  15974. bp = bw / bh;
  15975. ip = image.width / image.height;
  15976. if (ip > bp) {
  15977. w = bw;
  15978. h = bw / ip;
  15979. } else {
  15980. h = bh;
  15981. w = bh * ip;
  15982. }
  15983. } else if (options.cover) {
  15984. var _options$cover = _slicedToArray(options.cover, 2);
  15985. bw = _options$cover[0];
  15986. bh = _options$cover[1];
  15987. bp = bw / bh;
  15988. ip = image.width / image.height;
  15989. if (ip > bp) {
  15990. h = bh;
  15991. w = bh * ip;
  15992. } else {
  15993. w = bw;
  15994. h = bw / ip;
  15995. }
  15996. }
  15997. if (options.fit || options.cover) {
  15998. if (options.align === 'center') {
  15999. x = x + bw / 2 - w / 2;
  16000. } else if (options.align === 'right') {
  16001. x = x + bw - w;
  16002. }
  16003. if (options.valign === 'center') {
  16004. y = y + bh / 2 - h / 2;
  16005. } else if (options.valign === 'bottom') {
  16006. y = y + bh - h;
  16007. }
  16008. } // create link annotations if the link option is given
  16009. if (options.link != null) {
  16010. this.link(x, y, w, h, options.link);
  16011. }
  16012. if (options.goTo != null) {
  16013. this.goTo(x, y, w, h, options.goTo);
  16014. }
  16015. if (options.destination != null) {
  16016. this.addNamedDestination(options.destination, 'XYZ', x, y, null);
  16017. } // Set the current y position to below the image if it is in the document flow
  16018. if (this.y === y) {
  16019. this.y += h;
  16020. }
  16021. this.save();
  16022. this.transform(w, 0, 0, -h, x, y + h);
  16023. this.addContent("/".concat(image.label, " Do"));
  16024. this.restore();
  16025. return this;
  16026. },
  16027. openImage: function openImage(src) {
  16028. var image;
  16029. if (typeof src === 'string') {
  16030. image = this._imageRegistry[src];
  16031. }
  16032. if (!image) {
  16033. image = PDFImage.open(src, "I".concat(++this._imageCount));
  16034. if (typeof src === 'string') {
  16035. this._imageRegistry[src] = image;
  16036. }
  16037. }
  16038. return image;
  16039. }
  16040. };
  16041. var AnnotationsMixin = {
  16042. annotate: function annotate(x, y, w, h, options) {
  16043. options.Type = 'Annot';
  16044. options.Rect = this._convertRect(x, y, w, h);
  16045. options.Border = [0, 0, 0];
  16046. if (options.Subtype === 'Link' && typeof options.F === 'undefined') {
  16047. options.F = 1 << 2; // Print Annotation Flag
  16048. }
  16049. if (options.Subtype !== 'Link') {
  16050. if (options.C == null) {
  16051. options.C = this._normalizeColor(options.color || [0, 0, 0]);
  16052. }
  16053. } // convert colors
  16054. delete options.color;
  16055. if (typeof options.Dest === 'string') {
  16056. options.Dest = new String(options.Dest);
  16057. } // Capitalize keys
  16058. for (var key in options) {
  16059. var val = options[key];
  16060. options[key[0].toUpperCase() + key.slice(1)] = val;
  16061. }
  16062. var ref = this.ref(options);
  16063. this.page.annotations.push(ref);
  16064. ref.end();
  16065. return this;
  16066. },
  16067. note: function note(x, y, w, h, contents) {
  16068. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16069. options.Subtype = 'Text';
  16070. options.Contents = new String(contents);
  16071. options.Name = 'Comment';
  16072. if (options.color == null) {
  16073. options.color = [243, 223, 92];
  16074. }
  16075. return this.annotate(x, y, w, h, options);
  16076. },
  16077. goTo: function goTo(x, y, w, h, name) {
  16078. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16079. options.Subtype = 'Link';
  16080. options.A = this.ref({
  16081. S: 'GoTo',
  16082. D: new String(name)
  16083. });
  16084. options.A.end();
  16085. return this.annotate(x, y, w, h, options);
  16086. },
  16087. link: function link(x, y, w, h, url) {
  16088. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16089. options.Subtype = 'Link';
  16090. if (typeof url === 'number') {
  16091. // Link to a page in the document (the page must already exist)
  16092. var pages = this._root.data.Pages.data;
  16093. if (url >= 0 && url < pages.Kids.length) {
  16094. options.A = this.ref({
  16095. S: 'GoTo',
  16096. D: [pages.Kids[url], 'XYZ', null, null, null]
  16097. });
  16098. options.A.end();
  16099. } else {
  16100. throw new Error("The document has no page ".concat(url));
  16101. }
  16102. } else {
  16103. // Link to an external url
  16104. options.A = this.ref({
  16105. S: 'URI',
  16106. URI: new String(url)
  16107. });
  16108. options.A.end();
  16109. }
  16110. return this.annotate(x, y, w, h, options);
  16111. },
  16112. _markup: function _markup(x, y, w, h) {
  16113. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  16114. var _this$_convertRect = this._convertRect(x, y, w, h),
  16115. _this$_convertRect2 = _slicedToArray(_this$_convertRect, 4),
  16116. x1 = _this$_convertRect2[0],
  16117. y1 = _this$_convertRect2[1],
  16118. x2 = _this$_convertRect2[2],
  16119. y2 = _this$_convertRect2[3];
  16120. options.QuadPoints = [x1, y2, x2, y2, x1, y1, x2, y1];
  16121. options.Contents = new String();
  16122. return this.annotate(x, y, w, h, options);
  16123. },
  16124. highlight: function highlight(x, y, w, h) {
  16125. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  16126. options.Subtype = 'Highlight';
  16127. if (options.color == null) {
  16128. options.color = [241, 238, 148];
  16129. }
  16130. return this._markup(x, y, w, h, options);
  16131. },
  16132. underline: function underline(x, y, w, h) {
  16133. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  16134. options.Subtype = 'Underline';
  16135. return this._markup(x, y, w, h, options);
  16136. },
  16137. strike: function strike(x, y, w, h) {
  16138. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  16139. options.Subtype = 'StrikeOut';
  16140. return this._markup(x, y, w, h, options);
  16141. },
  16142. lineAnnotation: function lineAnnotation(x1, y1, x2, y2) {
  16143. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  16144. options.Subtype = 'Line';
  16145. options.Contents = new String();
  16146. options.L = [x1, this.page.height - y1, x2, this.page.height - y2];
  16147. return this.annotate(x1, y1, x2, y2, options);
  16148. },
  16149. rectAnnotation: function rectAnnotation(x, y, w, h) {
  16150. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  16151. options.Subtype = 'Square';
  16152. options.Contents = new String();
  16153. return this.annotate(x, y, w, h, options);
  16154. },
  16155. ellipseAnnotation: function ellipseAnnotation(x, y, w, h) {
  16156. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  16157. options.Subtype = 'Circle';
  16158. options.Contents = new String();
  16159. return this.annotate(x, y, w, h, options);
  16160. },
  16161. textAnnotation: function textAnnotation(x, y, w, h, text) {
  16162. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16163. options.Subtype = 'FreeText';
  16164. options.Contents = new String(text);
  16165. options.DA = new String();
  16166. return this.annotate(x, y, w, h, options);
  16167. },
  16168. fileAnnotation: function fileAnnotation(x, y, w, h) {
  16169. var file = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
  16170. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; // create hidden file
  16171. var filespec = this.file(file.src, Object.assign({
  16172. hidden: true
  16173. }, file));
  16174. options.Subtype = 'FileAttachment';
  16175. options.FS = filespec; // add description from filespec unless description (Contents) has already been set
  16176. if (options.Contents) {
  16177. options.Contents = new String(options.Contents);
  16178. } else if (filespec.data.Desc) {
  16179. options.Contents = filespec.data.Desc;
  16180. }
  16181. return this.annotate(x, y, w, h, options);
  16182. },
  16183. _convertRect: function _convertRect(x1, y1, w, h) {
  16184. // flip y1 and y2
  16185. var y2 = y1;
  16186. y1 += h; // make x2
  16187. var x2 = x1 + w; // apply current transformation matrix to points
  16188. var _this$_ctm = _slicedToArray(this._ctm, 6),
  16189. m0 = _this$_ctm[0],
  16190. m1 = _this$_ctm[1],
  16191. m2 = _this$_ctm[2],
  16192. m3 = _this$_ctm[3],
  16193. m4 = _this$_ctm[4],
  16194. m5 = _this$_ctm[5];
  16195. x1 = m0 * x1 + m2 * y1 + m4;
  16196. y1 = m1 * x1 + m3 * y1 + m5;
  16197. x2 = m0 * x2 + m2 * y2 + m4;
  16198. y2 = m1 * x2 + m3 * y2 + m5;
  16199. return [x1, y1, x2, y2];
  16200. }
  16201. };
  16202. var PDFOutline = /*#__PURE__*/function () {
  16203. function PDFOutline(document, parent, title, dest) {
  16204. var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {
  16205. expanded: false
  16206. };
  16207. _classCallCheck(this, PDFOutline);
  16208. this.document = document;
  16209. this.options = options;
  16210. this.outlineData = {};
  16211. if (dest !== null) {
  16212. this.outlineData['Dest'] = [dest.dictionary, 'Fit'];
  16213. }
  16214. if (parent !== null) {
  16215. this.outlineData['Parent'] = parent;
  16216. }
  16217. if (title !== null) {
  16218. this.outlineData['Title'] = new String(title);
  16219. }
  16220. this.dictionary = this.document.ref(this.outlineData);
  16221. this.children = [];
  16222. }
  16223. _createClass(PDFOutline, [{
  16224. key: "addItem",
  16225. value: function addItem(title) {
  16226. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
  16227. expanded: false
  16228. };
  16229. var result = new PDFOutline(this.document, this.dictionary, title, this.document.page, options);
  16230. this.children.push(result);
  16231. return result;
  16232. }
  16233. }, {
  16234. key: "endOutline",
  16235. value: function endOutline() {
  16236. if (this.children.length > 0) {
  16237. if (this.options.expanded) {
  16238. this.outlineData.Count = this.children.length;
  16239. }
  16240. var first = this.children[0],
  16241. last = this.children[this.children.length - 1];
  16242. this.outlineData.First = first.dictionary;
  16243. this.outlineData.Last = last.dictionary;
  16244. for (var i = 0, len = this.children.length; i < len; i++) {
  16245. var child = this.children[i];
  16246. if (i > 0) {
  16247. child.outlineData.Prev = this.children[i - 1].dictionary;
  16248. }
  16249. if (i < this.children.length - 1) {
  16250. child.outlineData.Next = this.children[i + 1].dictionary;
  16251. }
  16252. child.endOutline();
  16253. }
  16254. }
  16255. return this.dictionary.end();
  16256. }
  16257. }]);
  16258. return PDFOutline;
  16259. }();
  16260. var OutlineMixin = {
  16261. initOutline: function initOutline() {
  16262. return this.outline = new PDFOutline(this, null, null, null);
  16263. },
  16264. endOutline: function endOutline() {
  16265. this.outline.endOutline();
  16266. if (this.outline.children.length > 0) {
  16267. this._root.data.Outlines = this.outline.dictionary;
  16268. return this._root.data.PageMode = 'UseOutlines';
  16269. }
  16270. }
  16271. };
  16272. /*
  16273. PDFStructureContent - a reference to a marked structure content
  16274. By Ben Schmidt
  16275. */
  16276. var PDFStructureContent = /*#__PURE__*/function () {
  16277. function PDFStructureContent(pageRef, mcid) {
  16278. _classCallCheck(this, PDFStructureContent);
  16279. this.refs = [{
  16280. pageRef: pageRef,
  16281. mcid: mcid
  16282. }];
  16283. }
  16284. _createClass(PDFStructureContent, [{
  16285. key: "push",
  16286. value: function push(structContent) {
  16287. var _this = this;
  16288. structContent.refs.forEach(function (ref) {
  16289. return _this.refs.push(ref);
  16290. });
  16291. }
  16292. }]);
  16293. return PDFStructureContent;
  16294. }();
  16295. var PDFStructureElement = /*#__PURE__*/function () {
  16296. function PDFStructureElement(document, type) {
  16297. var _this = this;
  16298. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  16299. var children = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
  16300. _classCallCheck(this, PDFStructureElement);
  16301. this.document = document;
  16302. this._attached = false;
  16303. this._ended = false;
  16304. this._flushed = false;
  16305. this.dictionary = document.ref({
  16306. // Type: "StructElem",
  16307. S: type
  16308. });
  16309. var data = this.dictionary.data;
  16310. if (Array.isArray(options) || this._isValidChild(options)) {
  16311. children = options;
  16312. options = {};
  16313. }
  16314. if (typeof options.title !== 'undefined') {
  16315. data.T = new String(options.title);
  16316. }
  16317. if (typeof options.lang !== 'undefined') {
  16318. data.Lang = new String(options.lang);
  16319. }
  16320. if (typeof options.alt !== 'undefined') {
  16321. data.Alt = new String(options.alt);
  16322. }
  16323. if (typeof options.expanded !== 'undefined') {
  16324. data.E = new String(options.expanded);
  16325. }
  16326. if (typeof options.actual !== 'undefined') {
  16327. data.ActualText = new String(options.actual);
  16328. }
  16329. this._children = [];
  16330. if (children) {
  16331. if (!Array.isArray(children)) {
  16332. children = [children];
  16333. }
  16334. children.forEach(function (child) {
  16335. return _this.add(child);
  16336. });
  16337. this.end();
  16338. }
  16339. }
  16340. _createClass(PDFStructureElement, [{
  16341. key: "add",
  16342. value: function add(child) {
  16343. if (this._ended) {
  16344. throw new Error("Cannot add child to already-ended structure element");
  16345. }
  16346. if (!this._isValidChild(child)) {
  16347. throw new Error("Invalid structure element child");
  16348. }
  16349. if (child instanceof PDFStructureElement) {
  16350. child.setParent(this.dictionary);
  16351. if (this._attached) {
  16352. child.setAttached();
  16353. }
  16354. }
  16355. if (child instanceof PDFStructureContent) {
  16356. this._addContentToParentTree(child);
  16357. }
  16358. if (typeof child === 'function' && this._attached) {
  16359. // _contentForClosure() adds the content to the parent tree
  16360. child = this._contentForClosure(child);
  16361. }
  16362. this._children.push(child);
  16363. return this;
  16364. }
  16365. }, {
  16366. key: "_addContentToParentTree",
  16367. value: function _addContentToParentTree(content) {
  16368. var _this2 = this;
  16369. content.refs.forEach(function (_ref) {
  16370. var pageRef = _ref.pageRef,
  16371. mcid = _ref.mcid;
  16372. var pageStructParents = _this2.document.getStructParentTree().get(pageRef.data.StructParents);
  16373. pageStructParents[mcid] = _this2.dictionary;
  16374. });
  16375. }
  16376. }, {
  16377. key: "setParent",
  16378. value: function setParent(parentRef) {
  16379. if (this.dictionary.data.P) {
  16380. throw new Error("Structure element added to more than one parent");
  16381. }
  16382. this.dictionary.data.P = parentRef;
  16383. this._flush();
  16384. }
  16385. }, {
  16386. key: "setAttached",
  16387. value: function setAttached() {
  16388. var _this3 = this;
  16389. if (this._attached) {
  16390. return;
  16391. }
  16392. this._children.forEach(function (child, index) {
  16393. if (child instanceof PDFStructureElement) {
  16394. child.setAttached();
  16395. }
  16396. if (typeof child === 'function') {
  16397. _this3._children[index] = _this3._contentForClosure(child);
  16398. }
  16399. });
  16400. this._attached = true;
  16401. this._flush();
  16402. }
  16403. }, {
  16404. key: "end",
  16405. value: function end() {
  16406. if (this._ended) {
  16407. return;
  16408. }
  16409. this._children.filter(function (child) {
  16410. return child instanceof PDFStructureElement;
  16411. }).forEach(function (child) {
  16412. return child.end();
  16413. });
  16414. this._ended = true;
  16415. this._flush();
  16416. }
  16417. }, {
  16418. key: "_isValidChild",
  16419. value: function _isValidChild(child) {
  16420. return child instanceof PDFStructureElement || child instanceof PDFStructureContent || typeof child === 'function';
  16421. }
  16422. }, {
  16423. key: "_contentForClosure",
  16424. value: function _contentForClosure(closure) {
  16425. var content = this.document.markStructureContent(this.dictionary.data.S);
  16426. closure();
  16427. this.document.endMarkedContent();
  16428. this._addContentToParentTree(content);
  16429. return content;
  16430. }
  16431. }, {
  16432. key: "_isFlushable",
  16433. value: function _isFlushable() {
  16434. if (!this.dictionary.data.P || !this._ended) {
  16435. return false;
  16436. }
  16437. return this._children.every(function (child) {
  16438. if (typeof child === 'function') {
  16439. return false;
  16440. }
  16441. if (child instanceof PDFStructureElement) {
  16442. return child._isFlushable();
  16443. }
  16444. return true;
  16445. });
  16446. }
  16447. }, {
  16448. key: "_flush",
  16449. value: function _flush() {
  16450. var _this4 = this;
  16451. if (this._flushed || !this._isFlushable()) {
  16452. return;
  16453. }
  16454. this.dictionary.data.K = [];
  16455. this._children.forEach(function (child) {
  16456. return _this4._flushChild(child);
  16457. });
  16458. this.dictionary.end(); // free memory used by children; the dictionary itself may still be
  16459. // referenced by a parent structure element or root, but we can
  16460. // at least trim the tree here
  16461. this._children = [];
  16462. this.dictionary.data.K = null;
  16463. this._flushed = true;
  16464. }
  16465. }, {
  16466. key: "_flushChild",
  16467. value: function _flushChild(child) {
  16468. var _this5 = this;
  16469. if (child instanceof PDFStructureElement) {
  16470. this.dictionary.data.K.push(child.dictionary);
  16471. }
  16472. if (child instanceof PDFStructureContent) {
  16473. child.refs.forEach(function (_ref2) {
  16474. var pageRef = _ref2.pageRef,
  16475. mcid = _ref2.mcid;
  16476. if (!_this5.dictionary.data.Pg) {
  16477. _this5.dictionary.data.Pg = pageRef;
  16478. }
  16479. if (_this5.dictionary.data.Pg === pageRef) {
  16480. _this5.dictionary.data.K.push(mcid);
  16481. } else {
  16482. _this5.dictionary.data.K.push({
  16483. Type: "MCR",
  16484. Pg: pageRef,
  16485. MCID: mcid
  16486. });
  16487. }
  16488. });
  16489. }
  16490. }
  16491. }]);
  16492. return PDFStructureElement;
  16493. }();
  16494. var PDFNumberTree = /*#__PURE__*/function (_PDFTree) {
  16495. _inherits(PDFNumberTree, _PDFTree);
  16496. var _super = _createSuper(PDFNumberTree);
  16497. function PDFNumberTree() {
  16498. _classCallCheck(this, PDFNumberTree);
  16499. return _super.apply(this, arguments);
  16500. }
  16501. _createClass(PDFNumberTree, [{
  16502. key: "_compareKeys",
  16503. value: function _compareKeys(a, b) {
  16504. return parseInt(a) - parseInt(b);
  16505. }
  16506. }, {
  16507. key: "_keysName",
  16508. value: function _keysName() {
  16509. return "Nums";
  16510. }
  16511. }, {
  16512. key: "_dataForKey",
  16513. value: function _dataForKey(k) {
  16514. return parseInt(k);
  16515. }
  16516. }]);
  16517. return PDFNumberTree;
  16518. }(PDFTree);
  16519. var MarkingsMixin = {
  16520. initMarkings: function initMarkings(options) {
  16521. this.structChildren = [];
  16522. if (options.tagged) {
  16523. this.getMarkInfoDictionary().data.Marked = true;
  16524. this.getStructTreeRoot();
  16525. }
  16526. },
  16527. markContent: function markContent(tag) {
  16528. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
  16529. if (tag === 'Artifact' || options && options.mcid) {
  16530. var toClose = 0;
  16531. this.page.markings.forEach(function (marking) {
  16532. if (toClose || marking.structContent || marking.tag === 'Artifact') {
  16533. toClose++;
  16534. }
  16535. });
  16536. while (toClose--) {
  16537. this.endMarkedContent();
  16538. }
  16539. }
  16540. if (!options) {
  16541. this.page.markings.push({
  16542. tag: tag
  16543. });
  16544. this.addContent("/".concat(tag, " BMC"));
  16545. return this;
  16546. }
  16547. this.page.markings.push({
  16548. tag: tag,
  16549. options: options
  16550. });
  16551. var dictionary = {};
  16552. if (typeof options.mcid !== 'undefined') {
  16553. dictionary.MCID = options.mcid;
  16554. }
  16555. if (tag === 'Artifact') {
  16556. if (typeof options.type === 'string') {
  16557. dictionary.Type = options.type;
  16558. }
  16559. if (Array.isArray(options.bbox)) {
  16560. dictionary.BBox = [options.bbox[0], this.page.height - options.bbox[3], options.bbox[2], this.page.height - options.bbox[1]];
  16561. }
  16562. if (Array.isArray(options.attached) && options.attached.every(function (val) {
  16563. return typeof val === 'string';
  16564. })) {
  16565. dictionary.Attached = options.attached;
  16566. }
  16567. }
  16568. if (tag === 'Span') {
  16569. if (options.lang) {
  16570. dictionary.Lang = new String(options.lang);
  16571. }
  16572. if (options.alt) {
  16573. dictionary.Alt = new String(options.alt);
  16574. }
  16575. if (options.expanded) {
  16576. dictionary.E = new String(options.expanded);
  16577. }
  16578. if (options.actual) {
  16579. dictionary.ActualText = new String(options.actual);
  16580. }
  16581. }
  16582. this.addContent("/".concat(tag, " ").concat(PDFObject.convert(dictionary), " BDC"));
  16583. return this;
  16584. },
  16585. markStructureContent: function markStructureContent(tag) {
  16586. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16587. var pageStructParents = this.getStructParentTree().get(this.page.structParentTreeKey);
  16588. var mcid = pageStructParents.length;
  16589. pageStructParents.push(null);
  16590. this.markContent(tag, _objectSpread2(_objectSpread2({}, options), {}, {
  16591. mcid: mcid
  16592. }));
  16593. var structContent = new PDFStructureContent(this.page.dictionary, mcid);
  16594. this.page.markings.slice(-1)[0].structContent = structContent;
  16595. return structContent;
  16596. },
  16597. endMarkedContent: function endMarkedContent() {
  16598. this.page.markings.pop();
  16599. this.addContent('EMC');
  16600. return this;
  16601. },
  16602. struct: function struct(type) {
  16603. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16604. var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
  16605. return new PDFStructureElement(this, type, options, children);
  16606. },
  16607. addStructure: function addStructure(structElem) {
  16608. var structTreeRoot = this.getStructTreeRoot();
  16609. structElem.setParent(structTreeRoot);
  16610. structElem.setAttached();
  16611. this.structChildren.push(structElem);
  16612. if (!structTreeRoot.data.K) {
  16613. structTreeRoot.data.K = [];
  16614. }
  16615. structTreeRoot.data.K.push(structElem.dictionary);
  16616. return this;
  16617. },
  16618. initPageMarkings: function initPageMarkings(pageMarkings) {
  16619. var _this = this;
  16620. pageMarkings.forEach(function (marking) {
  16621. if (marking.structContent) {
  16622. var structContent = marking.structContent;
  16623. var newStructContent = _this.markStructureContent(marking.tag, marking.options);
  16624. structContent.push(newStructContent);
  16625. _this.page.markings.slice(-1)[0].structContent = structContent;
  16626. } else {
  16627. _this.markContent(marking.tag, marking.options);
  16628. }
  16629. });
  16630. },
  16631. endPageMarkings: function endPageMarkings(page) {
  16632. var pageMarkings = page.markings;
  16633. pageMarkings.forEach(function () {
  16634. return page.write('EMC');
  16635. });
  16636. page.markings = [];
  16637. return pageMarkings;
  16638. },
  16639. getMarkInfoDictionary: function getMarkInfoDictionary() {
  16640. if (!this._root.data.MarkInfo) {
  16641. this._root.data.MarkInfo = this.ref({});
  16642. }
  16643. return this._root.data.MarkInfo;
  16644. },
  16645. getStructTreeRoot: function getStructTreeRoot() {
  16646. if (!this._root.data.StructTreeRoot) {
  16647. this._root.data.StructTreeRoot = this.ref({
  16648. Type: 'StructTreeRoot',
  16649. ParentTree: new PDFNumberTree(),
  16650. ParentTreeNextKey: 0
  16651. });
  16652. }
  16653. return this._root.data.StructTreeRoot;
  16654. },
  16655. getStructParentTree: function getStructParentTree() {
  16656. return this.getStructTreeRoot().data.ParentTree;
  16657. },
  16658. createStructParentTreeNextKey: function createStructParentTreeNextKey() {
  16659. // initialise the MarkInfo dictionary
  16660. this.getMarkInfoDictionary();
  16661. var structTreeRoot = this.getStructTreeRoot();
  16662. var key = structTreeRoot.data.ParentTreeNextKey++;
  16663. structTreeRoot.data.ParentTree.add(key, []);
  16664. return key;
  16665. },
  16666. endMarkings: function endMarkings() {
  16667. var structTreeRoot = this._root.data.StructTreeRoot;
  16668. if (structTreeRoot) {
  16669. structTreeRoot.end();
  16670. this.structChildren.forEach(function (structElem) {
  16671. return structElem.end();
  16672. });
  16673. }
  16674. if (this._root.data.MarkInfo) {
  16675. this._root.data.MarkInfo.end();
  16676. }
  16677. }
  16678. };
  16679. var FIELD_FLAGS = {
  16680. readOnly: 1,
  16681. required: 2,
  16682. noExport: 4,
  16683. multiline: 0x1000,
  16684. password: 0x2000,
  16685. toggleToOffButton: 0x4000,
  16686. radioButton: 0x8000,
  16687. pushButton: 0x10000,
  16688. combo: 0x20000,
  16689. edit: 0x40000,
  16690. sort: 0x80000,
  16691. multiSelect: 0x200000,
  16692. noSpell: 0x400000
  16693. };
  16694. var FIELD_JUSTIFY = {
  16695. left: 0,
  16696. center: 1,
  16697. right: 2
  16698. };
  16699. var VALUE_MAP = {
  16700. value: 'V',
  16701. defaultValue: 'DV'
  16702. };
  16703. var FORMAT_SPECIAL = {
  16704. zip: '0',
  16705. zipPlus4: '1',
  16706. zip4: '1',
  16707. phone: '2',
  16708. ssn: '3'
  16709. };
  16710. var FORMAT_DEFAULT = {
  16711. number: {
  16712. nDec: 0,
  16713. sepComma: false,
  16714. negStyle: 'MinusBlack',
  16715. currency: '',
  16716. currencyPrepend: true
  16717. },
  16718. percent: {
  16719. nDec: 0,
  16720. sepComma: false
  16721. }
  16722. };
  16723. var AcroFormMixin = {
  16724. /**
  16725. * Must call if adding AcroForms to a document. Must also call font() before
  16726. * this method to set the default font.
  16727. */
  16728. initForm: function initForm() {
  16729. if (!this._font) {
  16730. throw new Error('Must set a font before calling initForm method');
  16731. }
  16732. this._acroform = {
  16733. fonts: {},
  16734. defaultFont: this._font.name
  16735. };
  16736. this._acroform.fonts[this._font.id] = this._font.ref();
  16737. var data = {
  16738. Fields: [],
  16739. NeedAppearances: true,
  16740. DA: new String("/".concat(this._font.id, " 0 Tf 0 g")),
  16741. DR: {
  16742. Font: {}
  16743. }
  16744. };
  16745. data.DR.Font[this._font.id] = this._font.ref();
  16746. var AcroForm = this.ref(data);
  16747. this._root.data.AcroForm = AcroForm;
  16748. return this;
  16749. },
  16750. /**
  16751. * Called automatically by document.js
  16752. */
  16753. endAcroForm: function endAcroForm() {
  16754. var _this = this;
  16755. if (this._root.data.AcroForm) {
  16756. if (!Object.keys(this._acroform.fonts).length && !this._acroform.defaultFont) {
  16757. throw new Error('No fonts specified for PDF form');
  16758. }
  16759. var fontDict = this._root.data.AcroForm.data.DR.Font;
  16760. Object.keys(this._acroform.fonts).forEach(function (name) {
  16761. fontDict[name] = _this._acroform.fonts[name];
  16762. });
  16763. this._root.data.AcroForm.data.Fields.forEach(function (fieldRef) {
  16764. _this._endChild(fieldRef);
  16765. });
  16766. this._root.data.AcroForm.end();
  16767. }
  16768. return this;
  16769. },
  16770. _endChild: function _endChild(ref) {
  16771. var _this2 = this;
  16772. if (Array.isArray(ref.data.Kids)) {
  16773. ref.data.Kids.forEach(function (childRef) {
  16774. _this2._endChild(childRef);
  16775. });
  16776. ref.end();
  16777. }
  16778. return this;
  16779. },
  16780. /**
  16781. * Creates and adds a form field to the document. Form fields are intermediate
  16782. * nodes in a PDF form that are used to specify form name heirarchy and form
  16783. * value defaults.
  16784. * @param {string} name - field name (T attribute in field dictionary)
  16785. * @param {object} options - other attributes to include in field dictionary
  16786. */
  16787. formField: function formField(name) {
  16788. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  16789. var fieldDict = this._fieldDict(name, null, options);
  16790. var fieldRef = this.ref(fieldDict);
  16791. this._addToParent(fieldRef);
  16792. return fieldRef;
  16793. },
  16794. /**
  16795. * Creates and adds a Form Annotation to the document. Form annotations are
  16796. * called Widget annotations internally within a PDF file.
  16797. * @param {string} name - form field name (T attribute of widget annotation
  16798. * dictionary)
  16799. * @param {number} x
  16800. * @param {number} y
  16801. * @param {number} w
  16802. * @param {number} h
  16803. * @param {object} options
  16804. */
  16805. formAnnotation: function formAnnotation(name, type, x, y, w, h) {
  16806. var options = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
  16807. var fieldDict = this._fieldDict(name, type, options);
  16808. fieldDict.Subtype = 'Widget';
  16809. if (fieldDict.F === undefined) {
  16810. fieldDict.F = 4; // print the annotation
  16811. } // Add Field annot to page, and get it's ref
  16812. this.annotate(x, y, w, h, fieldDict);
  16813. var annotRef = this.page.annotations[this.page.annotations.length - 1];
  16814. return this._addToParent(annotRef);
  16815. },
  16816. formText: function formText(name, x, y, w, h) {
  16817. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16818. return this.formAnnotation(name, 'text', x, y, w, h, options);
  16819. },
  16820. formPushButton: function formPushButton(name, x, y, w, h) {
  16821. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16822. return this.formAnnotation(name, 'pushButton', x, y, w, h, options);
  16823. },
  16824. formCombo: function formCombo(name, x, y, w, h) {
  16825. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16826. return this.formAnnotation(name, 'combo', x, y, w, h, options);
  16827. },
  16828. formList: function formList(name, x, y, w, h) {
  16829. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16830. return this.formAnnotation(name, 'list', x, y, w, h, options);
  16831. },
  16832. formRadioButton: function formRadioButton(name, x, y, w, h) {
  16833. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16834. return this.formAnnotation(name, 'radioButton', x, y, w, h, options);
  16835. },
  16836. formCheckbox: function formCheckbox(name, x, y, w, h) {
  16837. var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
  16838. return this.formAnnotation(name, 'checkbox', x, y, w, h, options);
  16839. },
  16840. _addToParent: function _addToParent(fieldRef) {
  16841. var parent = fieldRef.data.Parent;
  16842. if (parent) {
  16843. if (!parent.data.Kids) {
  16844. parent.data.Kids = [];
  16845. }
  16846. parent.data.Kids.push(fieldRef);
  16847. } else {
  16848. this._root.data.AcroForm.data.Fields.push(fieldRef);
  16849. }
  16850. return this;
  16851. },
  16852. _fieldDict: function _fieldDict(name, type) {
  16853. var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  16854. if (!this._acroform) {
  16855. throw new Error('Call document.initForms() method before adding form elements to document');
  16856. }
  16857. var opts = Object.assign({}, options);
  16858. if (type !== null) {
  16859. opts = this._resolveType(type, options);
  16860. }
  16861. opts = this._resolveFlags(opts);
  16862. opts = this._resolveJustify(opts);
  16863. opts = this._resolveFont(opts);
  16864. opts = this._resolveStrings(opts);
  16865. opts = this._resolveColors(opts);
  16866. opts = this._resolveFormat(opts);
  16867. opts.T = new String(name);
  16868. if (opts.parent) {
  16869. opts.Parent = opts.parent;
  16870. delete opts.parent;
  16871. }
  16872. return opts;
  16873. },
  16874. _resolveType: function _resolveType(type, opts) {
  16875. if (type === 'text') {
  16876. opts.FT = 'Tx';
  16877. } else if (type === 'pushButton') {
  16878. opts.FT = 'Btn';
  16879. opts.pushButton = true;
  16880. } else if (type === 'radioButton') {
  16881. opts.FT = 'Btn';
  16882. opts.radioButton = true;
  16883. } else if (type === 'checkbox') {
  16884. opts.FT = 'Btn';
  16885. } else if (type === 'combo') {
  16886. opts.FT = 'Ch';
  16887. opts.combo = true;
  16888. } else if (type === 'list') {
  16889. opts.FT = 'Ch';
  16890. } else {
  16891. throw new Error("Invalid form annotation type '".concat(type, "'"));
  16892. }
  16893. return opts;
  16894. },
  16895. _resolveFormat: function _resolveFormat(opts) {
  16896. var f = opts.format;
  16897. if (f && f.type) {
  16898. var fnKeystroke;
  16899. var fnFormat;
  16900. var params = '';
  16901. if (FORMAT_SPECIAL[f.type] !== undefined) {
  16902. fnKeystroke = "AFSpecial_Keystroke";
  16903. fnFormat = "AFSpecial_Format";
  16904. params = FORMAT_SPECIAL[f.type];
  16905. } else {
  16906. var format = f.type.charAt(0).toUpperCase() + f.type.slice(1);
  16907. fnKeystroke = "AF".concat(format, "_Keystroke");
  16908. fnFormat = "AF".concat(format, "_Format");
  16909. if (f.type === 'date') {
  16910. fnKeystroke += 'Ex';
  16911. params = String(f.param);
  16912. } else if (f.type === 'time') {
  16913. params = String(f.param);
  16914. } else if (f.type === 'number') {
  16915. var p = Object.assign({}, FORMAT_DEFAULT.number, f);
  16916. params = String([String(p.nDec), p.sepComma ? '0' : '1', '"' + p.negStyle + '"', 'null', '"' + p.currency + '"', String(p.currencyPrepend)].join(','));
  16917. } else if (f.type === 'percent') {
  16918. var _p = Object.assign({}, FORMAT_DEFAULT.percent, f);
  16919. params = String([String(_p.nDec), _p.sepComma ? '0' : '1'].join(','));
  16920. }
  16921. }
  16922. opts.AA = opts.AA ? opts.AA : {};
  16923. opts.AA.K = {
  16924. S: 'JavaScript',
  16925. JS: new String("".concat(fnKeystroke, "(").concat(params, ");"))
  16926. };
  16927. opts.AA.F = {
  16928. S: 'JavaScript',
  16929. JS: new String("".concat(fnFormat, "(").concat(params, ");"))
  16930. };
  16931. }
  16932. delete opts.format;
  16933. return opts;
  16934. },
  16935. _resolveColors: function _resolveColors(opts) {
  16936. var color = this._normalizeColor(opts.backgroundColor);
  16937. if (color) {
  16938. if (!opts.MK) {
  16939. opts.MK = {};
  16940. }
  16941. opts.MK.BG = color;
  16942. }
  16943. color = this._normalizeColor(opts.borderColor);
  16944. if (color) {
  16945. if (!opts.MK) {
  16946. opts.MK = {};
  16947. }
  16948. opts.MK.BC = color;
  16949. }
  16950. delete opts.backgroundColor;
  16951. delete opts.borderColor;
  16952. return opts;
  16953. },
  16954. _resolveFlags: function _resolveFlags(options) {
  16955. var result = 0;
  16956. Object.keys(options).forEach(function (key) {
  16957. if (FIELD_FLAGS[key]) {
  16958. result |= FIELD_FLAGS[key];
  16959. delete options[key];
  16960. }
  16961. });
  16962. if (result !== 0) {
  16963. options.Ff = options.Ff ? options.Ff : 0;
  16964. options.Ff |= result;
  16965. }
  16966. return options;
  16967. },
  16968. _resolveJustify: function _resolveJustify(options) {
  16969. var result = 0;
  16970. if (options.align !== undefined) {
  16971. if (typeof FIELD_JUSTIFY[options.align] === 'number') {
  16972. result = FIELD_JUSTIFY[options.align];
  16973. }
  16974. delete options.align;
  16975. }
  16976. if (result !== 0) {
  16977. options.Q = result; // default
  16978. }
  16979. return options;
  16980. },
  16981. _resolveFont: function _resolveFont(options) {
  16982. // add current font to document-level AcroForm dict if necessary
  16983. if (this._acroform.fonts[this._font.id] === null) {
  16984. this._acroform.fonts[this._font.id] = this._font.ref();
  16985. } // add current font to field's resource dict (RD) if not the default acroform font
  16986. if (this._acroform.defaultFont !== this._font.name) {
  16987. options.DR = {
  16988. Font: {}
  16989. }; // Get the fontSize option. If not set use auto sizing
  16990. var fontSize = options.fontSize || 0;
  16991. options.DR.Font[this._font.id] = this._font.ref();
  16992. options.DA = new String("/".concat(this._font.id, " ").concat(fontSize, " Tf 0 g"));
  16993. }
  16994. return options;
  16995. },
  16996. _resolveStrings: function _resolveStrings(options) {
  16997. var select = [];
  16998. function appendChoices(a) {
  16999. if (Array.isArray(a)) {
  17000. for (var idx = 0; idx < a.length; idx++) {
  17001. if (typeof a[idx] === 'string') {
  17002. select.push(new String(a[idx]));
  17003. } else {
  17004. select.push(a[idx]);
  17005. }
  17006. }
  17007. }
  17008. }
  17009. appendChoices(options.Opt);
  17010. if (options.select) {
  17011. appendChoices(options.select);
  17012. delete options.select;
  17013. }
  17014. if (select.length) {
  17015. options.Opt = select;
  17016. }
  17017. Object.keys(VALUE_MAP).forEach(function (key) {
  17018. if (options[key] !== undefined) {
  17019. options[VALUE_MAP[key]] = options[key];
  17020. delete options[key];
  17021. }
  17022. });
  17023. ['V', 'DV'].forEach(function (key) {
  17024. if (typeof options[key] === 'string') {
  17025. options[key] = new String(options[key]);
  17026. }
  17027. });
  17028. if (options.MK && options.MK.CA) {
  17029. options.MK.CA = new String(options.MK.CA);
  17030. }
  17031. if (options.label) {
  17032. options.MK = options.MK ? options.MK : {};
  17033. options.MK.CA = new String(options.label);
  17034. delete options.label;
  17035. }
  17036. return options;
  17037. }
  17038. };
  17039. var AttachmentsMixin = {
  17040. /**
  17041. * Embed contents of `src` in PDF
  17042. * @param {Buffer | ArrayBuffer | string} src input Buffer, ArrayBuffer, base64 encoded string or path to file
  17043. * @param {object} options
  17044. * * options.name: filename to be shown in PDF, will use `src` if none set
  17045. * * options.type: filetype to be shown in PDF
  17046. * * options.description: description to be shown in PDF
  17047. * * options.hidden: if true, do not add attachment to EmbeddedFiles dictionary. Useful for file attachment annotations
  17048. * * options.creationDate: override creation date
  17049. * * options.modifiedDate: override modified date
  17050. * @returns filespec reference
  17051. */
  17052. file: function file(src) {
  17053. var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
  17054. options.name = options.name || src;
  17055. var refBody = {
  17056. Type: 'EmbeddedFile',
  17057. Params: {}
  17058. };
  17059. var data;
  17060. if (!src) {
  17061. throw new Error('No src specified');
  17062. }
  17063. if (Buffer.isBuffer(src)) {
  17064. data = src;
  17065. } else if (src instanceof ArrayBuffer) {
  17066. data = Buffer.from(new Uint8Array(src));
  17067. } else {
  17068. var match;
  17069. if (match = /^data:(.*);base64,(.*)$/.exec(src)) {
  17070. if (match[1]) {
  17071. refBody.Subtype = match[1].replace('/', '#2F');
  17072. }
  17073. data = Buffer.from(match[2], 'base64');
  17074. } else {
  17075. data = fs.readFileSync(src);
  17076. if (!data) {
  17077. throw new Error("Could not read contents of file at filepath ".concat(src));
  17078. } // update CreationDate and ModDate
  17079. var _fs$statSync = fs.statSync(src),
  17080. birthtime = _fs$statSync.birthtime,
  17081. ctime = _fs$statSync.ctime;
  17082. refBody.Params.CreationDate = birthtime;
  17083. refBody.Params.ModDate = ctime;
  17084. }
  17085. } // override creation date and modified date
  17086. if (options.creationDate instanceof Date) {
  17087. refBody.Params.CreationDate = options.creationDate;
  17088. }
  17089. if (options.modifiedDate instanceof Date) {
  17090. refBody.Params.ModDate = options.modifiedDate;
  17091. } // add optional subtype
  17092. if (options.type) {
  17093. refBody.Subtype = options.type.replace('/', '#2F');
  17094. } // add checksum and size information
  17095. var checksum = _cryptoJs.default.MD5(_cryptoJs.default.lib.WordArray.create(new Uint8Array(data)));
  17096. refBody.Params.CheckSum = new String(checksum);
  17097. refBody.Params.Size = data.byteLength; // save some space when embedding the same file again
  17098. // if a file with the same name and metadata exists, reuse its reference
  17099. var ref;
  17100. if (!this._fileRegistry) this._fileRegistry = {};
  17101. var file = this._fileRegistry[options.name];
  17102. if (file && isEqual(refBody, file)) {
  17103. ref = file.ref;
  17104. } else {
  17105. ref = this.ref(refBody);
  17106. ref.end(data);
  17107. this._fileRegistry[options.name] = _objectSpread2(_objectSpread2({}, refBody), {}, {
  17108. ref: ref
  17109. });
  17110. } // add filespec for embedded file
  17111. var fileSpecBody = {
  17112. Type: 'Filespec',
  17113. F: new String(options.name),
  17114. EF: {
  17115. F: ref
  17116. },
  17117. UF: new String(options.name)
  17118. };
  17119. if (options.description) {
  17120. fileSpecBody.Desc = new String(options.description);
  17121. }
  17122. var filespec = this.ref(fileSpecBody);
  17123. filespec.end();
  17124. if (!options.hidden) {
  17125. this.addNamedEmbeddedFile(options.name, filespec);
  17126. }
  17127. return filespec;
  17128. }
  17129. };
  17130. /** check two embedded file metadata objects for equality */
  17131. function isEqual(a, b) {
  17132. return a.Subtype === b.Subtype && a.Params.CheckSum.toString() === b.Params.CheckSum.toString() && a.Params.Size === b.Params.Size && a.Params.CreationDate === b.Params.CreationDate && a.Params.ModDate === b.Params.ModDate;
  17133. }
  17134. var PDFDocument = /*#__PURE__*/function (_stream$Readable) {
  17135. _inherits(PDFDocument, _stream$Readable);
  17136. var _super = _createSuper(PDFDocument);
  17137. function PDFDocument() {
  17138. var _this;
  17139. var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
  17140. _classCallCheck(this, PDFDocument);
  17141. _this = _super.call(this, options);
  17142. _this.options = options; // PDF version
  17143. switch (options.pdfVersion) {
  17144. case '1.4':
  17145. _this.version = 1.4;
  17146. break;
  17147. case '1.5':
  17148. _this.version = 1.5;
  17149. break;
  17150. case '1.6':
  17151. _this.version = 1.6;
  17152. break;
  17153. case '1.7':
  17154. case '1.7ext3':
  17155. _this.version = 1.7;
  17156. break;
  17157. default:
  17158. _this.version = 1.3;
  17159. break;
  17160. } // Whether streams should be compressed
  17161. _this.compress = _this.options.compress != null ? _this.options.compress : true;
  17162. _this._pageBuffer = [];
  17163. _this._pageBufferStart = 0; // The PDF object store
  17164. _this._offsets = [];
  17165. _this._waiting = 0;
  17166. _this._ended = false;
  17167. _this._offset = 0;
  17168. var Pages = _this.ref({
  17169. Type: 'Pages',
  17170. Count: 0,
  17171. Kids: []
  17172. });
  17173. var Names = _this.ref({
  17174. Dests: new PDFNameTree()
  17175. });
  17176. _this._root = _this.ref({
  17177. Type: 'Catalog',
  17178. Pages: Pages,
  17179. Names: Names
  17180. });
  17181. if (_this.options.lang) {
  17182. _this._root.data.Lang = new String(_this.options.lang);
  17183. } // The current page
  17184. _this.page = null; // Initialize mixins
  17185. _this.initColor();
  17186. _this.initVector();
  17187. _this.initFonts(options.font);
  17188. _this.initText();
  17189. _this.initImages();
  17190. _this.initOutline();
  17191. _this.initMarkings(options); // Initialize the metadata
  17192. _this.info = {
  17193. Producer: 'PDFKit',
  17194. Creator: 'PDFKit',
  17195. CreationDate: new Date()
  17196. };
  17197. if (_this.options.info) {
  17198. for (var key in _this.options.info) {
  17199. var val = _this.options.info[key];
  17200. _this.info[key] = val;
  17201. }
  17202. }
  17203. if (_this.options.displayTitle) {
  17204. _this._root.data.ViewerPreferences = _this.ref({
  17205. DisplayDocTitle: true
  17206. });
  17207. } // Generate file ID
  17208. _this._id = PDFSecurity.generateFileID(_this.info); // Initialize security settings
  17209. _this._security = PDFSecurity.create(_assertThisInitialized(_this), options); // Write the header
  17210. // PDF version
  17211. _this._write("%PDF-".concat(_this.version)); // 4 binary chars, as recommended by the spec
  17212. _this._write('%\xFF\xFF\xFF\xFF'); // Add the first page
  17213. if (_this.options.autoFirstPage !== false) {
  17214. _this.addPage();
  17215. }
  17216. return _this;
  17217. }
  17218. _createClass(PDFDocument, [{
  17219. key: "addPage",
  17220. value: function addPage(options) {
  17221. if (options == null) {
  17222. options = this.options;
  17223. } // end the current page if needed
  17224. if (!this.options.bufferPages) {
  17225. this.flushPages();
  17226. } // create a page object
  17227. this.page = new PDFPage(this, options);
  17228. this._pageBuffer.push(this.page); // add the page to the object store
  17229. var pages = this._root.data.Pages.data;
  17230. pages.Kids.push(this.page.dictionary);
  17231. pages.Count++; // reset x and y coordinates
  17232. this.x = this.page.margins.left;
  17233. this.y = this.page.margins.top; // flip PDF coordinate system so that the origin is in
  17234. // the top left rather than the bottom left
  17235. this._ctm = [1, 0, 0, 1, 0, 0];
  17236. this.transform(1, 0, 0, -1, 0, this.page.height);
  17237. this.emit('pageAdded');
  17238. return this;
  17239. }
  17240. }, {
  17241. key: "continueOnNewPage",
  17242. value: function continueOnNewPage(options) {
  17243. var pageMarkings = this.endPageMarkings(this.page);
  17244. this.addPage(options);
  17245. this.initPageMarkings(pageMarkings);
  17246. return this;
  17247. }
  17248. }, {
  17249. key: "bufferedPageRange",
  17250. value: function bufferedPageRange() {
  17251. return {
  17252. start: this._pageBufferStart,
  17253. count: this._pageBuffer.length
  17254. };
  17255. }
  17256. }, {
  17257. key: "switchToPage",
  17258. value: function switchToPage(n) {
  17259. var page;
  17260. if (!(page = this._pageBuffer[n - this._pageBufferStart])) {
  17261. throw new Error("switchToPage(".concat(n, ") out of bounds, current buffer covers pages ").concat(this._pageBufferStart, " to ").concat(this._pageBufferStart + this._pageBuffer.length - 1));
  17262. }
  17263. return this.page = page;
  17264. }
  17265. }, {
  17266. key: "flushPages",
  17267. value: function flushPages() {
  17268. // this local variable exists so we're future-proof against
  17269. // reentrant calls to flushPages.
  17270. var pages = this._pageBuffer;
  17271. this._pageBuffer = [];
  17272. this._pageBufferStart += pages.length;
  17273. var _iterator = _createForOfIteratorHelper(pages),
  17274. _step;
  17275. try {
  17276. for (_iterator.s(); !(_step = _iterator.n()).done;) {
  17277. var page = _step.value;
  17278. this.endPageMarkings(page);
  17279. page.end();
  17280. }
  17281. } catch (err) {
  17282. _iterator.e(err);
  17283. } finally {
  17284. _iterator.f();
  17285. }
  17286. }
  17287. }, {
  17288. key: "addNamedDestination",
  17289. value: function addNamedDestination(name) {
  17290. for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
  17291. args[_key - 1] = arguments[_key];
  17292. }
  17293. if (args.length === 0) {
  17294. args = ['XYZ', null, null, null];
  17295. }
  17296. if (args[0] === 'XYZ' && args[2] !== null) {
  17297. args[2] = this.page.height - args[2];
  17298. }
  17299. args.unshift(this.page.dictionary);
  17300. this._root.data.Names.data.Dests.add(name, args);
  17301. }
  17302. }, {
  17303. key: "addNamedEmbeddedFile",
  17304. value: function addNamedEmbeddedFile(name, ref) {
  17305. if (!this._root.data.Names.data.EmbeddedFiles) {
  17306. // disabling /Limits for this tree fixes attachments not showing in Adobe Reader
  17307. this._root.data.Names.data.EmbeddedFiles = new PDFNameTree({
  17308. limits: false
  17309. });
  17310. } // add filespec to EmbeddedFiles
  17311. this._root.data.Names.data.EmbeddedFiles.add(name, ref);
  17312. }
  17313. }, {
  17314. key: "addNamedJavaScript",
  17315. value: function addNamedJavaScript(name, js) {
  17316. if (!this._root.data.Names.data.JavaScript) {
  17317. this._root.data.Names.data.JavaScript = new PDFNameTree();
  17318. }
  17319. var data = {
  17320. JS: new String(js),
  17321. S: 'JavaScript'
  17322. };
  17323. this._root.data.Names.data.JavaScript.add(name, data);
  17324. }
  17325. }, {
  17326. key: "ref",
  17327. value: function ref(data) {
  17328. var ref = new PDFReference(this, this._offsets.length + 1, data);
  17329. this._offsets.push(null); // placeholder for this object's offset once it is finalized
  17330. this._waiting++;
  17331. return ref;
  17332. }
  17333. }, {
  17334. key: "_read",
  17335. value: function _read() {} // do nothing, but this method is required by node
  17336. }, {
  17337. key: "_write",
  17338. value: function _write(data) {
  17339. if (!Buffer.isBuffer(data)) {
  17340. data = Buffer.from(data + '\n', 'binary');
  17341. }
  17342. this.push(data);
  17343. return this._offset += data.length;
  17344. }
  17345. }, {
  17346. key: "addContent",
  17347. value: function addContent(data) {
  17348. this.page.write(data);
  17349. return this;
  17350. }
  17351. }, {
  17352. key: "_refEnd",
  17353. value: function _refEnd(ref) {
  17354. this._offsets[ref.id - 1] = ref.offset;
  17355. if (--this._waiting === 0 && this._ended) {
  17356. this._finalize();
  17357. return this._ended = false;
  17358. }
  17359. }
  17360. }, {
  17361. key: "write",
  17362. value: function write(filename, fn) {
  17363. // print a deprecation warning with a stacktrace
  17364. var err = new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream.");
  17365. console.warn(err.stack);
  17366. this.pipe(fs.createWriteStream(filename));
  17367. this.end();
  17368. return this.once('end', fn);
  17369. }
  17370. }, {
  17371. key: "end",
  17372. value: function end() {
  17373. this.flushPages();
  17374. this._info = this.ref();
  17375. for (var key in this.info) {
  17376. var val = this.info[key];
  17377. if (typeof val === 'string') {
  17378. val = new String(val);
  17379. }
  17380. var entry = this.ref(val);
  17381. entry.end();
  17382. this._info.data[key] = entry;
  17383. }
  17384. this._info.end();
  17385. for (var name in this._fontFamilies) {
  17386. var font = this._fontFamilies[name];
  17387. font.finalize();
  17388. }
  17389. this.endOutline();
  17390. this.endMarkings();
  17391. this._root.end();
  17392. this._root.data.Pages.end();
  17393. this._root.data.Names.end();
  17394. this.endAcroForm();
  17395. if (this._root.data.ViewerPreferences) {
  17396. this._root.data.ViewerPreferences.end();
  17397. }
  17398. if (this._security) {
  17399. this._security.end();
  17400. }
  17401. if (this._waiting === 0) {
  17402. return this._finalize();
  17403. } else {
  17404. return this._ended = true;
  17405. }
  17406. }
  17407. }, {
  17408. key: "_finalize",
  17409. value: function _finalize() {
  17410. // generate xref
  17411. var xRefOffset = this._offset;
  17412. this._write('xref');
  17413. this._write("0 ".concat(this._offsets.length + 1));
  17414. this._write('0000000000 65535 f ');
  17415. var _iterator2 = _createForOfIteratorHelper(this._offsets),
  17416. _step2;
  17417. try {
  17418. for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
  17419. var offset = _step2.value;
  17420. offset = "0000000000".concat(offset).slice(-10);
  17421. this._write(offset + ' 00000 n ');
  17422. } // trailer
  17423. } catch (err) {
  17424. _iterator2.e(err);
  17425. } finally {
  17426. _iterator2.f();
  17427. }
  17428. var trailer = {
  17429. Size: this._offsets.length + 1,
  17430. Root: this._root,
  17431. Info: this._info,
  17432. ID: [this._id, this._id]
  17433. };
  17434. if (this._security) {
  17435. trailer.Encrypt = this._security.dictionary;
  17436. }
  17437. this._write('trailer');
  17438. this._write(PDFObject.convert(trailer));
  17439. this._write('startxref');
  17440. this._write("".concat(xRefOffset));
  17441. this._write('%%EOF'); // end the stream
  17442. return this.push(null);
  17443. }
  17444. }, {
  17445. key: "toString",
  17446. value: function toString() {
  17447. return '[object PDFDocument]';
  17448. }
  17449. }]);
  17450. return PDFDocument;
  17451. }(_stream.default.Readable);
  17452. var mixin = function mixin(methods) {
  17453. Object.assign(PDFDocument.prototype, methods);
  17454. };
  17455. mixin(ColorMixin);
  17456. mixin(VectorMixin);
  17457. mixin(FontsMixin);
  17458. mixin(TextMixin);
  17459. mixin(ImagesMixin);
  17460. mixin(AnnotationsMixin);
  17461. mixin(OutlineMixin);
  17462. mixin(MarkingsMixin);
  17463. mixin(AcroFormMixin);
  17464. mixin(AttachmentsMixin);
  17465. PDFDocument.LineWrapper = LineWrapper;
  17466. var _default = PDFDocument;
  17467. exports["default"] = _default;
  17468. /***/ }),
  17469. /***/ 9160:
  17470. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  17471. "use strict";
  17472. Object.defineProperty(exports, "__esModule", ({
  17473. value: true
  17474. }));
  17475. exports["default"] = void 0;
  17476. __webpack_require__(4256);
  17477. var _unicodeTrie = _interopRequireDefault(__webpack_require__(4781));
  17478. var _base64Js = _interopRequireDefault(__webpack_require__(9742));
  17479. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  17480. 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"];
  17481. 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"];
  17482. 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"];
  17483. var eaw = ["N", "Na", "A", "W", "H", "F"];
  17484. var data = {
  17485. categories: categories,
  17486. combiningClasses: combiningClasses,
  17487. scripts: scripts,
  17488. eaw: eaw
  17489. };
  17490. var data$1 = "AAARAAAAAADwfAEAZXl5ONRt+/5bPVFZimRfKoTQJNm37CGE7Iw0j3UsTWKsoyI7kwyyTiEUzSD7NiEzhWYijH0wMVkHE4Mx49fzfo+3nuP4/fdZjvv+XNd5n/d9nef1WZvmKhTxiZndzDQBSEYQqxqKwnsKvGQucFh+6t6cJ792ePQBZv5S9yXSwkyjf/P4T7mTNnIAv1dOVhMlR9lflbUL9JeJguqsjvG9NTj/wLb566VAURnLo2vvRi89S3gW/33ihh2eXpDn40BIW7REl/7coRKIhAFlAiOtbLDTt6mMb4GzMF1gNnvX/sBxtbsAIjfztCNcQjcNDtLThRvuXu5M5g/CBjaLBE4lJm4qy/oZD97+IJryApcXfgWYlkvWbhfXgujOJKVu8B+ozqTLbxyJ5kNiR75CxDqfBM9eOlDMmGeoZ0iQbbS5VUplIwI+ZNXEKQVJxlwqjhOY7w3XwPesbLK5JZE+Tt4X8q8km0dzInsPPzbscrjBMVjF5mOHSeRdJVgKUjLTHiHqXSPkep8N/zFk8167KLp75f6RndkvzdfB6Uz3MmqvRArzdCbs1/iRZjYPLLF3U8Qs+H+Rb8iK51a6NIV2V9+07uJsTGFWpPz8J++7iRu2B6eAKlK/kujrLthwaD/7a6J5w90TusnH1JMAc+gNrql4aspOUG/RrsxUKmPzhHgP4Bleru+6Vfc/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";
  17491. var trieData = {
  17492. data: data$1
  17493. };
  17494. var log2 = Math.log2 || function (n) {
  17495. return Math.log(n) / Math.LN2;
  17496. };
  17497. var bits = function bits(n) {
  17498. return log2(n) + 1 | 0;
  17499. };
  17500. var buildUnicodeProperties = function buildUnicodeProperties(data, trie) {
  17501. // compute the number of bits stored for each field
  17502. var CATEGORY_BITS = bits(data.categories.length - 1);
  17503. var COMBINING_BITS = bits(data.combiningClasses.length - 1);
  17504. var SCRIPT_BITS = bits(data.scripts.length - 1);
  17505. var EAW_BITS = bits(data.eaw.length - 1);
  17506. var NUMBER_BITS = 10; // compute shift and mask values for each field
  17507. var CATEGORY_SHIFT = COMBINING_BITS + SCRIPT_BITS + EAW_BITS + NUMBER_BITS;
  17508. var COMBINING_SHIFT = SCRIPT_BITS + EAW_BITS + NUMBER_BITS;
  17509. var SCRIPT_SHIFT = EAW_BITS + NUMBER_BITS;
  17510. var EAW_SHIFT = NUMBER_BITS;
  17511. var CATEGORY_MASK = (1 << CATEGORY_BITS) - 1;
  17512. var COMBINING_MASK = (1 << COMBINING_BITS) - 1;
  17513. var SCRIPT_MASK = (1 << SCRIPT_BITS) - 1;
  17514. var EAW_MASK = (1 << EAW_BITS) - 1;
  17515. var NUMBER_MASK = (1 << NUMBER_BITS) - 1;
  17516. var getCategory = function getCategory(codePoint) {
  17517. var val = trie.get(codePoint);
  17518. return data.categories[val >> CATEGORY_SHIFT & CATEGORY_MASK];
  17519. };
  17520. var getCombiningClass = function getCombiningClass(codePoint) {
  17521. var val = trie.get(codePoint);
  17522. return data.combiningClasses[val >> COMBINING_SHIFT & COMBINING_MASK];
  17523. };
  17524. var getScript = function getScript(codePoint) {
  17525. var val = trie.get(codePoint);
  17526. return data.scripts[val >> SCRIPT_SHIFT & SCRIPT_MASK];
  17527. };
  17528. var getEastAsianWidth = function getEastAsianWidth(codePoint) {
  17529. var val = trie.get(codePoint);
  17530. return data.eaw[val >> EAW_SHIFT & EAW_MASK];
  17531. };
  17532. var getNumericValue = function getNumericValue(codePoint) {
  17533. var val = trie.get(codePoint);
  17534. var num = val & NUMBER_MASK;
  17535. if (num === 0) {
  17536. return null;
  17537. } else if (num <= 50) {
  17538. return num - 1;
  17539. } else if (num < 0x1e0) {
  17540. var numerator = (num >> 4) - 12;
  17541. var denominator = (num & 0xf) + 1;
  17542. return numerator / denominator;
  17543. } else if (num < 0x300) {
  17544. val = (num >> 5) - 14;
  17545. var exp = (num & 0x1f) + 2;
  17546. while (exp > 0) {
  17547. val *= 10;
  17548. exp--;
  17549. }
  17550. return val;
  17551. } else {
  17552. val = (num >> 2) - 0xbf;
  17553. var _exp = (num & 3) + 1;
  17554. while (_exp > 0) {
  17555. val *= 60;
  17556. _exp--;
  17557. }
  17558. return val;
  17559. }
  17560. };
  17561. var isAlphabetic = function isAlphabetic(codePoint) {
  17562. var category = getCategory(codePoint);
  17563. return category === 'Lu' || category === 'Ll' || category === 'Lt' || category === 'Lm' || category === 'Lo' || category === 'Nl';
  17564. };
  17565. var isDigit = function isDigit(codePoint) {
  17566. return getCategory(codePoint) === 'Nd';
  17567. };
  17568. var isPunctuation = function isPunctuation(codePoint) {
  17569. var category = getCategory(codePoint);
  17570. return category === 'Pc' || category === 'Pd' || category === 'Pe' || category === 'Pf' || category === 'Pi' || category === 'Po' || category === 'Ps';
  17571. };
  17572. var isLowerCase = function isLowerCase(codePoint) {
  17573. return getCategory(codePoint) === 'Ll';
  17574. };
  17575. var isUpperCase = function isUpperCase(codePoint) {
  17576. return getCategory(codePoint) === 'Lu';
  17577. };
  17578. var isTitleCase = function isTitleCase(codePoint) {
  17579. return getCategory(codePoint) === 'Lt';
  17580. };
  17581. var isWhiteSpace = function isWhiteSpace(codePoint) {
  17582. var category = getCategory(codePoint);
  17583. return category === 'Zs' || category === 'Zl' || category === 'Zp';
  17584. };
  17585. var isBaseForm = function isBaseForm(codePoint) {
  17586. var category = getCategory(codePoint);
  17587. return category === 'Nd' || category === 'No' || category === 'Nl' || category === 'Lu' || category === 'Ll' || category === 'Lt' || category === 'Lm' || category === 'Lo' || category === 'Me' || category === 'Mc';
  17588. };
  17589. var isMark = function isMark(codePoint) {
  17590. var category = getCategory(codePoint);
  17591. return category === 'Mn' || category === 'Me' || category === 'Mc';
  17592. };
  17593. return {
  17594. getCategory: getCategory,
  17595. getCombiningClass: getCombiningClass,
  17596. getScript: getScript,
  17597. getEastAsianWidth: getEastAsianWidth,
  17598. getNumericValue: getNumericValue,
  17599. isAlphabetic: isAlphabetic,
  17600. isDigit: isDigit,
  17601. isPunctuation: isPunctuation,
  17602. isLowerCase: isLowerCase,
  17603. isUpperCase: isUpperCase,
  17604. isTitleCase: isTitleCase,
  17605. isWhiteSpace: isWhiteSpace,
  17606. isBaseForm: isBaseForm,
  17607. isMark: isMark
  17608. };
  17609. };
  17610. var trie = new _unicodeTrie.default(_base64Js.default.toByteArray(trieData.data));
  17611. var unicodeProperties = buildUnicodeProperties(data, trie);
  17612. var _default = unicodeProperties;
  17613. exports["default"] = _default;
  17614. /***/ }),
  17615. /***/ 4781:
  17616. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  17617. "use strict";
  17618. __webpack_require__(7042);
  17619. __webpack_require__(6992);
  17620. __webpack_require__(1539);
  17621. __webpack_require__(2472);
  17622. __webpack_require__(2990);
  17623. __webpack_require__(8927);
  17624. __webpack_require__(3105);
  17625. __webpack_require__(5035);
  17626. __webpack_require__(4345);
  17627. __webpack_require__(7174);
  17628. __webpack_require__(2846);
  17629. __webpack_require__(4731);
  17630. __webpack_require__(7209);
  17631. __webpack_require__(6319);
  17632. __webpack_require__(8867);
  17633. __webpack_require__(7789);
  17634. __webpack_require__(3739);
  17635. __webpack_require__(9368);
  17636. __webpack_require__(4483);
  17637. __webpack_require__(2056);
  17638. __webpack_require__(3462);
  17639. __webpack_require__(678);
  17640. __webpack_require__(7462);
  17641. __webpack_require__(3824);
  17642. __webpack_require__(5021);
  17643. __webpack_require__(2974);
  17644. __webpack_require__(5016);
  17645. __webpack_require__(9135);
  17646. var inflate = __webpack_require__(311);
  17647. var _require = __webpack_require__(1753),
  17648. swap32LE = _require.swap32LE; // Shift size for getting the index-1 table offset.
  17649. var SHIFT_1 = 6 + 5; // Shift size for getting the index-2 table offset.
  17650. var SHIFT_2 = 5; // Difference between the two shift sizes,
  17651. // for getting an index-1 offset from an index-2 offset. 6=11-5
  17652. var SHIFT_1_2 = SHIFT_1 - SHIFT_2; // Number of index-1 entries for the BMP. 32=0x20
  17653. // This part of the index-1 table is omitted from the serialized form.
  17654. var OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> SHIFT_1; // Number of entries in an index-2 block. 64=0x40
  17655. var INDEX_2_BLOCK_LENGTH = 1 << SHIFT_1_2; // Mask for getting the lower bits for the in-index-2-block offset. */
  17656. var INDEX_2_MASK = INDEX_2_BLOCK_LENGTH - 1; // Shift size for shifting left the index array values.
  17657. // Increases possible data size with 16-bit index values at the cost
  17658. // of compactability.
  17659. // This requires data blocks to be aligned by DATA_GRANULARITY.
  17660. var INDEX_SHIFT = 2; // Number of entries in a data block. 32=0x20
  17661. var DATA_BLOCK_LENGTH = 1 << SHIFT_2; // Mask for getting the lower bits for the in-data-block offset.
  17662. var DATA_MASK = DATA_BLOCK_LENGTH - 1; // The part of the index-2 table for U+D800..U+DBFF stores values for
  17663. // lead surrogate code _units_ not code _points_.
  17664. // Values for lead surrogate code _points_ are indexed with this portion of the table.
  17665. // Length=32=0x20=0x400>>SHIFT_2. (There are 1024=0x400 lead surrogates.)
  17666. var LSCP_INDEX_2_OFFSET = 0x10000 >> SHIFT_2;
  17667. var LSCP_INDEX_2_LENGTH = 0x400 >> SHIFT_2; // Count the lengths of both BMP pieces. 2080=0x820
  17668. var INDEX_2_BMP_LENGTH = LSCP_INDEX_2_OFFSET + LSCP_INDEX_2_LENGTH; // The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
  17669. // Length 32=0x20 for lead bytes C0..DF, regardless of SHIFT_2.
  17670. var UTF8_2B_INDEX_2_OFFSET = INDEX_2_BMP_LENGTH;
  17671. var UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; // U+0800 is the first code point after 2-byte UTF-8
  17672. // The index-1 table, only used for supplementary code points, at offset 2112=0x840.
  17673. // Variable length, for code points up to highStart, where the last single-value range starts.
  17674. // Maximum length 512=0x200=0x100000>>SHIFT_1.
  17675. // (For 0x100000 supplementary code points U+10000..U+10ffff.)
  17676. //
  17677. // The part of the index-2 table for supplementary code points starts
  17678. // after this index-1 table.
  17679. //
  17680. // Both the index-1 table and the following part of the index-2 table
  17681. // are omitted completely if there is only BMP data.
  17682. var INDEX_1_OFFSET = UTF8_2B_INDEX_2_OFFSET + UTF8_2B_INDEX_2_LENGTH; // The alignment size of a data block. Also the granularity for compaction.
  17683. var DATA_GRANULARITY = 1 << INDEX_SHIFT;
  17684. var UnicodeTrie = /*#__PURE__*/function () {
  17685. function UnicodeTrie(data) {
  17686. var isBuffer = typeof data.readUInt32BE === 'function' && typeof data.slice === 'function';
  17687. if (isBuffer || data instanceof Uint8Array) {
  17688. // read binary format
  17689. var uncompressedLength;
  17690. if (isBuffer) {
  17691. this.highStart = data.readUInt32LE(0);
  17692. this.errorValue = data.readUInt32LE(4);
  17693. uncompressedLength = data.readUInt32LE(8);
  17694. data = data.slice(12);
  17695. } else {
  17696. var view = new DataView(data.buffer);
  17697. this.highStart = view.getUint32(0, true);
  17698. this.errorValue = view.getUint32(4, true);
  17699. uncompressedLength = view.getUint32(8, true);
  17700. data = data.subarray(12);
  17701. } // double inflate the actual trie data
  17702. data = inflate(data, new Uint8Array(uncompressedLength));
  17703. data = inflate(data, new Uint8Array(uncompressedLength)); // swap bytes from little-endian
  17704. swap32LE(data);
  17705. this.data = new Uint32Array(data.buffer);
  17706. } else {
  17707. // pre-parsed data
  17708. var _data = data;
  17709. this.data = _data.data;
  17710. this.highStart = _data.highStart;
  17711. this.errorValue = _data.errorValue;
  17712. }
  17713. }
  17714. var _proto = UnicodeTrie.prototype;
  17715. _proto.get = function get(codePoint) {
  17716. var index;
  17717. if (codePoint < 0 || codePoint > 0x10ffff) {
  17718. return this.errorValue;
  17719. }
  17720. if (codePoint < 0xd800 || codePoint > 0xdbff && codePoint <= 0xffff) {
  17721. // Ordinary BMP code point, excluding leading surrogates.
  17722. // BMP uses a single level lookup. BMP index starts at offset 0 in the index.
  17723. // data is stored in the index array itself.
  17724. index = (this.data[codePoint >> SHIFT_2] << INDEX_SHIFT) + (codePoint & DATA_MASK);
  17725. return this.data[index];
  17726. }
  17727. if (codePoint <= 0xffff) {
  17728. // Lead Surrogate Code Point. A Separate index section is stored for
  17729. // lead surrogate code units and code points.
  17730. // The main index has the code unit data.
  17731. // For this function, we need the code point data.
  17732. index = (this.data[LSCP_INDEX_2_OFFSET + (codePoint - 0xd800 >> SHIFT_2)] << INDEX_SHIFT) + (codePoint & DATA_MASK);
  17733. return this.data[index];
  17734. }
  17735. if (codePoint < this.highStart) {
  17736. // Supplemental code point, use two-level lookup.
  17737. index = this.data[INDEX_1_OFFSET - OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> SHIFT_1)];
  17738. index = this.data[index + (codePoint >> SHIFT_2 & INDEX_2_MASK)];
  17739. index = (index << INDEX_SHIFT) + (codePoint & DATA_MASK);
  17740. return this.data[index];
  17741. }
  17742. return this.data[this.data.length - DATA_GRANULARITY];
  17743. };
  17744. return UnicodeTrie;
  17745. }();
  17746. module.exports = UnicodeTrie;
  17747. /***/ }),
  17748. /***/ 1753:
  17749. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  17750. "use strict";
  17751. __webpack_require__(6992);
  17752. __webpack_require__(1539);
  17753. __webpack_require__(2472);
  17754. __webpack_require__(2990);
  17755. __webpack_require__(8927);
  17756. __webpack_require__(3105);
  17757. __webpack_require__(5035);
  17758. __webpack_require__(4345);
  17759. __webpack_require__(7174);
  17760. __webpack_require__(2846);
  17761. __webpack_require__(4731);
  17762. __webpack_require__(7209);
  17763. __webpack_require__(6319);
  17764. __webpack_require__(8867);
  17765. __webpack_require__(7789);
  17766. __webpack_require__(3739);
  17767. __webpack_require__(9368);
  17768. __webpack_require__(4483);
  17769. __webpack_require__(2056);
  17770. __webpack_require__(3462);
  17771. __webpack_require__(678);
  17772. __webpack_require__(7462);
  17773. __webpack_require__(3824);
  17774. __webpack_require__(5021);
  17775. __webpack_require__(2974);
  17776. __webpack_require__(5016);
  17777. __webpack_require__(9135);
  17778. var isBigEndian = new Uint8Array(new Uint32Array([0x12345678]).buffer)[0] === 0x12;
  17779. var swap = function swap(b, n, m) {
  17780. var i = b[n];
  17781. b[n] = b[m];
  17782. b[m] = i;
  17783. };
  17784. var swap32 = function swap32(array) {
  17785. var len = array.length;
  17786. for (var i = 0; i < len; i += 4) {
  17787. swap(array, i, i + 3);
  17788. swap(array, i + 1, i + 2);
  17789. }
  17790. };
  17791. var swap32LE = function swap32LE(array) {
  17792. if (isBigEndian) {
  17793. swap32(array);
  17794. }
  17795. };
  17796. module.exports = {
  17797. swap32LE: swap32LE
  17798. };
  17799. /***/ }),
  17800. /***/ 8071:
  17801. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  17802. "use strict";
  17803. var SVGtoPDF = __webpack_require__(8519);
  17804. module.exports = SVGtoPDF;
  17805. /***/ }),
  17806. /***/ 8519:
  17807. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  17808. "use strict";
  17809. /* module decorator */ module = __webpack_require__.nmd(module);
  17810. __webpack_require__(8309);
  17811. __webpack_require__(7941);
  17812. __webpack_require__(3210);
  17813. __webpack_require__(4916);
  17814. __webpack_require__(4723);
  17815. __webpack_require__(3123);
  17816. __webpack_require__(3728);
  17817. __webpack_require__(5306);
  17818. __webpack_require__(7042);
  17819. __webpack_require__(9653);
  17820. __webpack_require__(2222);
  17821. __webpack_require__(6992);
  17822. __webpack_require__(1539);
  17823. __webpack_require__(3948);
  17824. __webpack_require__(9254);
  17825. __webpack_require__(3290);
  17826. var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) {
  17827. "use strict";
  17828. var NamedColors = {
  17829. aliceblue: [240, 248, 255],
  17830. antiquewhite: [250, 235, 215],
  17831. aqua: [0, 255, 255],
  17832. aquamarine: [127, 255, 212],
  17833. azure: [240, 255, 255],
  17834. beige: [245, 245, 220],
  17835. bisque: [255, 228, 196],
  17836. black: [0, 0, 0],
  17837. blanchedalmond: [255, 235, 205],
  17838. blue: [0, 0, 255],
  17839. blueviolet: [138, 43, 226],
  17840. brown: [165, 42, 42],
  17841. burlywood: [222, 184, 135],
  17842. cadetblue: [95, 158, 160],
  17843. chartreuse: [127, 255, 0],
  17844. chocolate: [210, 105, 30],
  17845. coral: [255, 127, 80],
  17846. cornflowerblue: [100, 149, 237],
  17847. cornsilk: [255, 248, 220],
  17848. crimson: [220, 20, 60],
  17849. cyan: [0, 255, 255],
  17850. darkblue: [0, 0, 139],
  17851. darkcyan: [0, 139, 139],
  17852. darkgoldenrod: [184, 134, 11],
  17853. darkgray: [169, 169, 169],
  17854. darkgrey: [169, 169, 169],
  17855. darkgreen: [0, 100, 0],
  17856. darkkhaki: [189, 183, 107],
  17857. darkmagenta: [139, 0, 139],
  17858. darkolivegreen: [85, 107, 47],
  17859. darkorange: [255, 140, 0],
  17860. darkorchid: [153, 50, 204],
  17861. darkred: [139, 0, 0],
  17862. darksalmon: [233, 150, 122],
  17863. darkseagreen: [143, 188, 143],
  17864. darkslateblue: [72, 61, 139],
  17865. darkslategray: [47, 79, 79],
  17866. darkslategrey: [47, 79, 79],
  17867. darkturquoise: [0, 206, 209],
  17868. darkviolet: [148, 0, 211],
  17869. deeppink: [255, 20, 147],
  17870. deepskyblue: [0, 191, 255],
  17871. dimgray: [105, 105, 105],
  17872. dimgrey: [105, 105, 105],
  17873. dodgerblue: [30, 144, 255],
  17874. firebrick: [178, 34, 34],
  17875. floralwhite: [255, 250, 240],
  17876. forestgreen: [34, 139, 34],
  17877. fuchsia: [255, 0, 255],
  17878. gainsboro: [220, 220, 220],
  17879. ghostwhite: [248, 248, 255],
  17880. gold: [255, 215, 0],
  17881. goldenrod: [218, 165, 32],
  17882. gray: [128, 128, 128],
  17883. grey: [128, 128, 128],
  17884. green: [0, 128, 0],
  17885. greenyellow: [173, 255, 47],
  17886. honeydew: [240, 255, 240],
  17887. hotpink: [255, 105, 180],
  17888. indianred: [205, 92, 92],
  17889. indigo: [75, 0, 130],
  17890. ivory: [255, 255, 240],
  17891. khaki: [240, 230, 140],
  17892. lavender: [230, 230, 250],
  17893. lavenderblush: [255, 240, 245],
  17894. lawngreen: [124, 252, 0],
  17895. lemonchiffon: [255, 250, 205],
  17896. lightblue: [173, 216, 230],
  17897. lightcoral: [240, 128, 128],
  17898. lightcyan: [224, 255, 255],
  17899. lightgoldenrodyellow: [250, 250, 210],
  17900. lightgray: [211, 211, 211],
  17901. lightgrey: [211, 211, 211],
  17902. lightgreen: [144, 238, 144],
  17903. lightpink: [255, 182, 193],
  17904. lightsalmon: [255, 160, 122],
  17905. lightseagreen: [32, 178, 170],
  17906. lightskyblue: [135, 206, 250],
  17907. lightslategray: [119, 136, 153],
  17908. lightslategrey: [119, 136, 153],
  17909. lightsteelblue: [176, 196, 222],
  17910. lightyellow: [255, 255, 224],
  17911. lime: [0, 255, 0],
  17912. limegreen: [50, 205, 50],
  17913. linen: [250, 240, 230],
  17914. magenta: [255, 0, 255],
  17915. maroon: [128, 0, 0],
  17916. mediumaquamarine: [102, 205, 170],
  17917. mediumblue: [0, 0, 205],
  17918. mediumorchid: [186, 85, 211],
  17919. mediumpurple: [147, 112, 219],
  17920. mediumseagreen: [60, 179, 113],
  17921. mediumslateblue: [123, 104, 238],
  17922. mediumspringgreen: [0, 250, 154],
  17923. mediumturquoise: [72, 209, 204],
  17924. mediumvioletred: [199, 21, 133],
  17925. midnightblue: [25, 25, 112],
  17926. mintcream: [245, 255, 250],
  17927. mistyrose: [255, 228, 225],
  17928. moccasin: [255, 228, 181],
  17929. navajowhite: [255, 222, 173],
  17930. navy: [0, 0, 128],
  17931. oldlace: [253, 245, 230],
  17932. olive: [128, 128, 0],
  17933. olivedrab: [107, 142, 35],
  17934. orange: [255, 165, 0],
  17935. orangered: [255, 69, 0],
  17936. orchid: [218, 112, 214],
  17937. palegoldenrod: [238, 232, 170],
  17938. palegreen: [152, 251, 152],
  17939. paleturquoise: [175, 238, 238],
  17940. palevioletred: [219, 112, 147],
  17941. papayawhip: [255, 239, 213],
  17942. peachpuff: [255, 218, 185],
  17943. peru: [205, 133, 63],
  17944. pink: [255, 192, 203],
  17945. plum: [221, 160, 221],
  17946. powderblue: [176, 224, 230],
  17947. purple: [128, 0, 128],
  17948. rebeccapurple: [102, 51, 153],
  17949. red: [255, 0, 0],
  17950. rosybrown: [188, 143, 143],
  17951. royalblue: [65, 105, 225],
  17952. saddlebrown: [139, 69, 19],
  17953. salmon: [250, 128, 114],
  17954. sandybrown: [244, 164, 96],
  17955. seagreen: [46, 139, 87],
  17956. seashell: [255, 245, 238],
  17957. sienna: [160, 82, 45],
  17958. silver: [192, 192, 192],
  17959. skyblue: [135, 206, 235],
  17960. slateblue: [106, 90, 205],
  17961. slategray: [112, 128, 144],
  17962. slategrey: [112, 128, 144],
  17963. snow: [255, 250, 250],
  17964. springgreen: [0, 255, 127],
  17965. steelblue: [70, 130, 180],
  17966. tan: [210, 180, 140],
  17967. teal: [0, 128, 128],
  17968. thistle: [216, 191, 216],
  17969. tomato: [255, 99, 71],
  17970. turquoise: [64, 224, 208],
  17971. violet: [238, 130, 238],
  17972. wheat: [245, 222, 179],
  17973. white: [255, 255, 255],
  17974. whitesmoke: [245, 245, 245],
  17975. yellow: [255, 255, 0]
  17976. };
  17977. var DefaultColors = {
  17978. black: [NamedColors.black, 1],
  17979. white: [NamedColors.white, 1],
  17980. transparent: [NamedColors.black, 0]
  17981. };
  17982. var Entities = {
  17983. quot: 34,
  17984. amp: 38,
  17985. lt: 60,
  17986. gt: 62,
  17987. apos: 39,
  17988. OElig: 338,
  17989. oelig: 339,
  17990. Scaron: 352,
  17991. scaron: 353,
  17992. Yuml: 376,
  17993. circ: 710,
  17994. tilde: 732,
  17995. ensp: 8194,
  17996. emsp: 8195,
  17997. thinsp: 8201,
  17998. zwnj: 8204,
  17999. zwj: 8205,
  18000. lrm: 8206,
  18001. rlm: 8207,
  18002. ndash: 8211,
  18003. mdash: 8212,
  18004. lsquo: 8216,
  18005. rsquo: 8217,
  18006. sbquo: 8218,
  18007. ldquo: 8220,
  18008. rdquo: 8221,
  18009. bdquo: 8222,
  18010. dagger: 8224,
  18011. Dagger: 8225,
  18012. permil: 8240,
  18013. lsaquo: 8249,
  18014. rsaquo: 8250,
  18015. euro: 8364,
  18016. nbsp: 160,
  18017. iexcl: 161,
  18018. cent: 162,
  18019. pound: 163,
  18020. curren: 164,
  18021. yen: 165,
  18022. brvbar: 166,
  18023. sect: 167,
  18024. uml: 168,
  18025. copy: 169,
  18026. ordf: 170,
  18027. laquo: 171,
  18028. not: 172,
  18029. shy: 173,
  18030. reg: 174,
  18031. macr: 175,
  18032. deg: 176,
  18033. plusmn: 177,
  18034. sup2: 178,
  18035. sup3: 179,
  18036. acute: 180,
  18037. micro: 181,
  18038. para: 182,
  18039. middot: 183,
  18040. cedil: 184,
  18041. sup1: 185,
  18042. ordm: 186,
  18043. raquo: 187,
  18044. frac14: 188,
  18045. frac12: 189,
  18046. frac34: 190,
  18047. iquest: 191,
  18048. Agrave: 192,
  18049. Aacute: 193,
  18050. Acirc: 194,
  18051. Atilde: 195,
  18052. Auml: 196,
  18053. Aring: 197,
  18054. AElig: 198,
  18055. Ccedil: 199,
  18056. Egrave: 200,
  18057. Eacute: 201,
  18058. Ecirc: 202,
  18059. Euml: 203,
  18060. Igrave: 204,
  18061. Iacute: 205,
  18062. Icirc: 206,
  18063. Iuml: 207,
  18064. ETH: 208,
  18065. Ntilde: 209,
  18066. Ograve: 210,
  18067. Oacute: 211,
  18068. Ocirc: 212,
  18069. Otilde: 213,
  18070. Ouml: 214,
  18071. times: 215,
  18072. Oslash: 216,
  18073. Ugrave: 217,
  18074. Uacute: 218,
  18075. Ucirc: 219,
  18076. Uuml: 220,
  18077. Yacute: 221,
  18078. THORN: 222,
  18079. szlig: 223,
  18080. agrave: 224,
  18081. aacute: 225,
  18082. acirc: 226,
  18083. atilde: 227,
  18084. auml: 228,
  18085. aring: 229,
  18086. aelig: 230,
  18087. ccedil: 231,
  18088. egrave: 232,
  18089. eacute: 233,
  18090. ecirc: 234,
  18091. euml: 235,
  18092. igrave: 236,
  18093. iacute: 237,
  18094. icirc: 238,
  18095. iuml: 239,
  18096. eth: 240,
  18097. ntilde: 241,
  18098. ograve: 242,
  18099. oacute: 243,
  18100. ocirc: 244,
  18101. otilde: 245,
  18102. ouml: 246,
  18103. divide: 247,
  18104. oslash: 248,
  18105. ugrave: 249,
  18106. uacute: 250,
  18107. ucirc: 251,
  18108. uuml: 252,
  18109. yacute: 253,
  18110. thorn: 254,
  18111. yuml: 255,
  18112. fnof: 402,
  18113. Alpha: 913,
  18114. Beta: 914,
  18115. Gamma: 915,
  18116. Delta: 916,
  18117. Epsilon: 917,
  18118. Zeta: 918,
  18119. Eta: 919,
  18120. Theta: 920,
  18121. Iota: 921,
  18122. Kappa: 922,
  18123. Lambda: 923,
  18124. Mu: 924,
  18125. Nu: 925,
  18126. Xi: 926,
  18127. Omicron: 927,
  18128. Pi: 928,
  18129. Rho: 929,
  18130. Sigma: 931,
  18131. Tau: 932,
  18132. Upsilon: 933,
  18133. Phi: 934,
  18134. Chi: 935,
  18135. Psi: 936,
  18136. Omega: 937,
  18137. alpha: 945,
  18138. beta: 946,
  18139. gamma: 947,
  18140. delta: 948,
  18141. epsilon: 949,
  18142. zeta: 950,
  18143. eta: 951,
  18144. theta: 952,
  18145. iota: 953,
  18146. kappa: 954,
  18147. lambda: 955,
  18148. mu: 956,
  18149. nu: 957,
  18150. xi: 958,
  18151. omicron: 959,
  18152. pi: 960,
  18153. rho: 961,
  18154. sigmaf: 962,
  18155. sigma: 963,
  18156. tau: 964,
  18157. upsilon: 965,
  18158. phi: 966,
  18159. chi: 967,
  18160. psi: 968,
  18161. omega: 969,
  18162. thetasym: 977,
  18163. upsih: 978,
  18164. piv: 982,
  18165. bull: 8226,
  18166. hellip: 8230,
  18167. prime: 8242,
  18168. Prime: 8243,
  18169. oline: 8254,
  18170. frasl: 8260,
  18171. weierp: 8472,
  18172. image: 8465,
  18173. real: 8476,
  18174. trade: 8482,
  18175. alefsym: 8501,
  18176. larr: 8592,
  18177. uarr: 8593,
  18178. rarr: 8594,
  18179. darr: 8595,
  18180. harr: 8596,
  18181. crarr: 8629,
  18182. lArr: 8656,
  18183. uArr: 8657,
  18184. rArr: 8658,
  18185. dArr: 8659,
  18186. hArr: 8660,
  18187. forall: 8704,
  18188. part: 8706,
  18189. exist: 8707,
  18190. empty: 8709,
  18191. nabla: 8711,
  18192. isin: 8712,
  18193. notin: 8713,
  18194. ni: 8715,
  18195. prod: 8719,
  18196. sum: 8721,
  18197. minus: 8722,
  18198. lowast: 8727,
  18199. radic: 8730,
  18200. prop: 8733,
  18201. infin: 8734,
  18202. ang: 8736,
  18203. and: 8743,
  18204. or: 8744,
  18205. cap: 8745,
  18206. cup: 8746,
  18207. int: 8747,
  18208. there4: 8756,
  18209. sim: 8764,
  18210. cong: 8773,
  18211. asymp: 8776,
  18212. ne: 8800,
  18213. equiv: 8801,
  18214. le: 8804,
  18215. ge: 8805,
  18216. sub: 8834,
  18217. sup: 8835,
  18218. nsub: 8836,
  18219. sube: 8838,
  18220. supe: 8839,
  18221. oplus: 8853,
  18222. otimes: 8855,
  18223. perp: 8869,
  18224. sdot: 8901,
  18225. lceil: 8968,
  18226. rceil: 8969,
  18227. lfloor: 8970,
  18228. rfloor: 8971,
  18229. lang: 9001,
  18230. rang: 9002,
  18231. loz: 9674,
  18232. spades: 9824,
  18233. clubs: 9827,
  18234. hearts: 9829,
  18235. diams: 9830
  18236. };
  18237. var PathArguments = {
  18238. A: 7,
  18239. a: 7,
  18240. C: 6,
  18241. c: 6,
  18242. H: 1,
  18243. h: 1,
  18244. L: 2,
  18245. l: 2,
  18246. M: 2,
  18247. m: 2,
  18248. Q: 4,
  18249. q: 4,
  18250. S: 4,
  18251. s: 4,
  18252. T: 2,
  18253. t: 2,
  18254. V: 1,
  18255. v: 1,
  18256. Z: 0,
  18257. z: 0
  18258. };
  18259. var PathFlags = {
  18260. A3: true,
  18261. A4: true,
  18262. a3: true,
  18263. a4: true
  18264. };
  18265. var Properties = {
  18266. 'color': {
  18267. inherit: true,
  18268. initial: undefined
  18269. },
  18270. 'visibility': {
  18271. inherit: true,
  18272. initial: 'visible',
  18273. values: {
  18274. 'hidden': 'hidden',
  18275. 'collapse': 'hidden',
  18276. 'visible': 'visible'
  18277. }
  18278. },
  18279. 'fill': {
  18280. inherit: true,
  18281. initial: DefaultColors.black
  18282. },
  18283. 'stroke': {
  18284. inherit: true,
  18285. initial: 'none'
  18286. },
  18287. 'stop-color': {
  18288. inherit: false,
  18289. initial: DefaultColors.black
  18290. },
  18291. 'fill-opacity': {
  18292. inherit: true,
  18293. initial: 1
  18294. },
  18295. 'stroke-opacity': {
  18296. inherit: true,
  18297. initial: 1
  18298. },
  18299. 'stop-opacity': {
  18300. inherit: false,
  18301. initial: 1
  18302. },
  18303. 'fill-rule': {
  18304. inherit: true,
  18305. initial: 'nonzero',
  18306. values: {
  18307. 'nonzero': 'nonzero',
  18308. 'evenodd': 'evenodd'
  18309. }
  18310. },
  18311. 'clip-rule': {
  18312. inherit: true,
  18313. initial: 'nonzero',
  18314. values: {
  18315. 'nonzero': 'nonzero',
  18316. 'evenodd': 'evenodd'
  18317. }
  18318. },
  18319. 'stroke-width': {
  18320. inherit: true,
  18321. initial: 1
  18322. },
  18323. 'stroke-dasharray': {
  18324. inherit: true,
  18325. initial: []
  18326. },
  18327. 'stroke-dashoffset': {
  18328. inherit: true,
  18329. initial: 0
  18330. },
  18331. 'stroke-miterlimit': {
  18332. inherit: true,
  18333. initial: 4
  18334. },
  18335. 'stroke-linejoin': {
  18336. inherit: true,
  18337. initial: 'miter',
  18338. values: {
  18339. 'miter': 'miter',
  18340. 'round': 'round',
  18341. 'bevel': 'bevel'
  18342. }
  18343. },
  18344. 'stroke-linecap': {
  18345. inherit: true,
  18346. initial: 'butt',
  18347. values: {
  18348. 'butt': 'butt',
  18349. 'round': 'round',
  18350. 'square': 'square'
  18351. }
  18352. },
  18353. 'font-size': {
  18354. inherit: true,
  18355. initial: 16,
  18356. values: {
  18357. 'xx-small': 9,
  18358. 'x-small': 10,
  18359. 'small': 13,
  18360. 'medium': 16,
  18361. 'large': 18,
  18362. 'x-large': 24,
  18363. 'xx-large': 32
  18364. }
  18365. },
  18366. 'font-family': {
  18367. inherit: true,
  18368. initial: 'sans-serif'
  18369. },
  18370. 'font-weight': {
  18371. inherit: true,
  18372. initial: 'normal',
  18373. values: {
  18374. '600': 'bold',
  18375. '700': 'bold',
  18376. '800': 'bold',
  18377. '900': 'bold',
  18378. 'bold': 'bold',
  18379. 'bolder': 'bold',
  18380. '500': 'normal',
  18381. '400': 'normal',
  18382. '300': 'normal',
  18383. '200': 'normal',
  18384. '100': 'normal',
  18385. 'normal': 'normal',
  18386. 'lighter': 'normal'
  18387. }
  18388. },
  18389. 'font-style': {
  18390. inherit: true,
  18391. initial: 'normal',
  18392. values: {
  18393. 'italic': 'italic',
  18394. 'oblique': 'italic',
  18395. 'normal': 'normal'
  18396. }
  18397. },
  18398. 'text-anchor': {
  18399. inherit: true,
  18400. initial: 'start',
  18401. values: {
  18402. 'start': 'start',
  18403. 'middle': 'middle',
  18404. 'end': 'end'
  18405. }
  18406. },
  18407. 'direction': {
  18408. inherit: true,
  18409. initial: 'ltr',
  18410. values: {
  18411. 'ltr': 'ltr',
  18412. 'rtl': 'rtl'
  18413. }
  18414. },
  18415. 'dominant-baseline': {
  18416. inherit: true,
  18417. initial: 'baseline',
  18418. values: {
  18419. 'auto': 'baseline',
  18420. 'baseline': 'baseline',
  18421. 'before-edge': 'before-edge',
  18422. 'text-before-edge': 'before-edge',
  18423. 'middle': 'middle',
  18424. 'central': 'central',
  18425. 'after-edge': 'after-edge',
  18426. 'text-after-edge': 'after-edge',
  18427. 'ideographic': 'ideographic',
  18428. 'alphabetic': 'alphabetic',
  18429. 'hanging': 'hanging',
  18430. 'mathematical': 'mathematical'
  18431. }
  18432. },
  18433. 'alignment-baseline': {
  18434. inherit: false,
  18435. initial: undefined,
  18436. values: {
  18437. 'auto': 'baseline',
  18438. 'baseline': 'baseline',
  18439. 'before-edge': 'before-edge',
  18440. 'text-before-edge': 'before-edge',
  18441. 'middle': 'middle',
  18442. 'central': 'central',
  18443. 'after-edge': 'after-edge',
  18444. 'text-after-edge': 'after-edge',
  18445. 'ideographic': 'ideographic',
  18446. 'alphabetic': 'alphabetic',
  18447. 'hanging': 'hanging',
  18448. 'mathematical': 'mathematical'
  18449. }
  18450. },
  18451. 'baseline-shift': {
  18452. inherit: true,
  18453. initial: 'baseline',
  18454. values: {
  18455. 'baseline': 'baseline',
  18456. 'sub': 'sub',
  18457. 'super': 'super'
  18458. }
  18459. },
  18460. 'word-spacing': {
  18461. inherit: true,
  18462. initial: 0,
  18463. values: {
  18464. normal: 0
  18465. }
  18466. },
  18467. 'letter-spacing': {
  18468. inherit: true,
  18469. initial: 0,
  18470. values: {
  18471. normal: 0
  18472. }
  18473. },
  18474. 'text-decoration': {
  18475. inherit: false,
  18476. initial: 'none',
  18477. values: {
  18478. 'none': 'none',
  18479. 'underline': 'underline',
  18480. 'overline': 'overline',
  18481. 'line-through': 'line-through'
  18482. }
  18483. },
  18484. 'xml:space': {
  18485. inherit: true,
  18486. initial: 'default',
  18487. css: 'white-space',
  18488. values: {
  18489. 'preserve': 'preserve',
  18490. 'default': 'default',
  18491. 'pre': 'preserve',
  18492. 'pre-line': 'preserve',
  18493. 'pre-wrap': 'preserve',
  18494. 'nowrap': 'default'
  18495. }
  18496. },
  18497. 'marker-start': {
  18498. inherit: true,
  18499. initial: 'none'
  18500. },
  18501. 'marker-mid': {
  18502. inherit: true,
  18503. initial: 'none'
  18504. },
  18505. 'marker-end': {
  18506. inherit: true,
  18507. initial: 'none'
  18508. },
  18509. 'opacity': {
  18510. inherit: false,
  18511. initial: 1
  18512. },
  18513. 'transform': {
  18514. inherit: false,
  18515. initial: [1, 0, 0, 1, 0, 0]
  18516. },
  18517. 'display': {
  18518. inherit: false,
  18519. initial: 'inline',
  18520. values: {
  18521. 'none': 'none',
  18522. 'inline': 'inline',
  18523. 'block': 'inline'
  18524. }
  18525. },
  18526. 'clip-path': {
  18527. inherit: false,
  18528. initial: 'none'
  18529. },
  18530. 'mask': {
  18531. inherit: false,
  18532. initial: 'none'
  18533. },
  18534. 'overflow': {
  18535. inherit: false,
  18536. initial: 'hidden',
  18537. values: {
  18538. 'hidden': 'hidden',
  18539. 'scroll': 'hidden',
  18540. 'visible': 'visible'
  18541. }
  18542. }
  18543. };
  18544. function docBeginGroup(bbox) {
  18545. var group = new function PDFGroup() {}();
  18546. group.name = 'G' + (doc._groupCount = (doc._groupCount || 0) + 1);
  18547. group.resources = doc.ref();
  18548. group.xobj = doc.ref({
  18549. Type: 'XObject',
  18550. Subtype: 'Form',
  18551. FormType: 1,
  18552. BBox: bbox,
  18553. Group: {
  18554. S: 'Transparency',
  18555. CS: 'DeviceRGB',
  18556. I: true,
  18557. K: false
  18558. },
  18559. Resources: group.resources
  18560. });
  18561. group.xobj.write('');
  18562. group.savedMatrix = doc._ctm;
  18563. group.savedPage = doc.page;
  18564. groupStack.push(group);
  18565. doc._ctm = [1, 0, 0, 1, 0, 0];
  18566. doc.page = {
  18567. width: doc.page.width,
  18568. height: doc.page.height,
  18569. write: function write(data) {
  18570. group.xobj.write(data);
  18571. },
  18572. fonts: {},
  18573. xobjects: {},
  18574. ext_gstates: {},
  18575. patterns: {}
  18576. };
  18577. return group;
  18578. }
  18579. function docEndGroup(group) {
  18580. if (group !== groupStack.pop()) {
  18581. throw 'Group not matching';
  18582. }
  18583. if (Object.keys(doc.page.fonts).length) {
  18584. group.resources.data.Font = doc.page.fonts;
  18585. }
  18586. if (Object.keys(doc.page.xobjects).length) {
  18587. group.resources.data.XObject = doc.page.xobjects;
  18588. }
  18589. if (Object.keys(doc.page.ext_gstates).length) {
  18590. group.resources.data.ExtGState = doc.page.ext_gstates;
  18591. }
  18592. if (Object.keys(doc.page.patterns).length) {
  18593. group.resources.data.Pattern = doc.page.patterns;
  18594. }
  18595. group.resources.end();
  18596. group.xobj.end();
  18597. doc._ctm = group.savedMatrix;
  18598. doc.page = group.savedPage;
  18599. }
  18600. function docInsertGroup(group) {
  18601. doc.page.xobjects[group.name] = group.xobj;
  18602. doc.addContent('/' + group.name + ' Do');
  18603. }
  18604. function docApplyMask(group, clip) {
  18605. var name = 'M' + (doc._maskCount = (doc._maskCount || 0) + 1);
  18606. var gstate = doc.ref({
  18607. Type: 'ExtGState',
  18608. CA: 1,
  18609. ca: 1,
  18610. BM: 'Normal',
  18611. SMask: {
  18612. S: 'Luminosity',
  18613. G: group.xobj,
  18614. BC: clip ? [0, 0, 0] : [1, 1, 1]
  18615. }
  18616. });
  18617. gstate.end();
  18618. doc.page.ext_gstates[name] = gstate;
  18619. doc.addContent('/' + name + ' gs');
  18620. }
  18621. function docCreatePattern(group, dx, dy, matrix) {
  18622. var pattern = new function PDFPattern() {}();
  18623. pattern.group = group;
  18624. pattern.dx = dx;
  18625. pattern.dy = dy;
  18626. pattern.matrix = matrix || [1, 0, 0, 1, 0, 0];
  18627. return pattern;
  18628. }
  18629. function docUsePattern(pattern, stroke) {
  18630. var name = 'P' + (doc._patternCount = (doc._patternCount || 0) + 1);
  18631. var ref = doc.ref({
  18632. Type: 'Pattern',
  18633. PatternType: 1,
  18634. PaintType: 1,
  18635. TilingType: 2,
  18636. BBox: [0, 0, pattern.dx, pattern.dy],
  18637. XStep: pattern.dx,
  18638. YStep: pattern.dy,
  18639. Matrix: multiplyMatrix(doc._ctm, pattern.matrix),
  18640. Resources: {
  18641. ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'],
  18642. XObject: function () {
  18643. var temp = {};
  18644. temp[pattern.group.name] = pattern.group.xobj;
  18645. return temp;
  18646. }()
  18647. }
  18648. });
  18649. ref.write('/' + pattern.group.name + ' Do');
  18650. ref.end();
  18651. doc.page.patterns[name] = ref;
  18652. if (stroke) {
  18653. doc.addContent('/Pattern CS');
  18654. doc.addContent('/' + name + ' SCN');
  18655. } else {
  18656. doc.addContent('/Pattern cs');
  18657. doc.addContent('/' + name + ' scn');
  18658. }
  18659. }
  18660. function docBeginText(font, size) {
  18661. if (!doc.page.fonts[font.id]) {
  18662. doc.page.fonts[font.id] = font.ref();
  18663. }
  18664. doc.addContent('BT').addContent('/' + font.id + ' ' + size + ' Tf');
  18665. }
  18666. function docSetTextMatrix(a, b, c, d, e, f) {
  18667. doc.addContent(validateNumber(a) + ' ' + validateNumber(b) + ' ' + validateNumber(-c) + ' ' + validateNumber(-d) + ' ' + validateNumber(e) + ' ' + validateNumber(f) + ' Tm');
  18668. }
  18669. function docSetTextMode(fill, stroke) {
  18670. var mode = fill && stroke ? 2 : stroke ? 1 : fill ? 0 : 3;
  18671. doc.addContent(mode + ' Tr');
  18672. }
  18673. function docWriteGlyph(glyph) {
  18674. doc.addContent('<' + glyph + '> Tj');
  18675. }
  18676. function docEndText() {
  18677. doc.addContent('ET');
  18678. }
  18679. function docFillColor(color) {
  18680. if (color[0].constructor.name === 'PDFPattern') {
  18681. doc.fillOpacity(color[1]);
  18682. docUsePattern(color[0], false);
  18683. } else {
  18684. doc.fillColor(color[0], color[1]);
  18685. }
  18686. }
  18687. function docStrokeColor(color) {
  18688. if (color[0].constructor.name === 'PDFPattern') {
  18689. doc.strokeOpacity(color[1]);
  18690. docUsePattern(color[0], true);
  18691. } else {
  18692. doc.strokeColor(color[0], color[1]);
  18693. }
  18694. }
  18695. function docInsertLink(x, y, w, h, url) {
  18696. var ref = doc.ref({
  18697. Type: 'Annot',
  18698. Subtype: 'Link',
  18699. Rect: [x, y, w, h],
  18700. Border: [0, 0, 0],
  18701. A: {
  18702. S: 'URI',
  18703. URI: new String(url)
  18704. }
  18705. });
  18706. ref.end();
  18707. links.push(ref);
  18708. }
  18709. function parseXml(xml) {
  18710. var SvgNode = function SvgNode(tag, type, value, error) {
  18711. this.error = error;
  18712. this.nodeName = tag;
  18713. this.nodeValue = value;
  18714. this.nodeType = type;
  18715. this.attributes = Object.create(null);
  18716. this.childNodes = [];
  18717. this.parentNode = null;
  18718. this.id = '';
  18719. this.textContent = '';
  18720. this.classList = [];
  18721. };
  18722. SvgNode.prototype.getAttribute = function (attr) {
  18723. return this.attributes[attr] != null ? this.attributes[attr] : null;
  18724. };
  18725. SvgNode.prototype.getElementById = function (id) {
  18726. var result = null;
  18727. (function recursive(node) {
  18728. if (result) {
  18729. return;
  18730. }
  18731. if (node.nodeType === 1) {
  18732. if (node.id === id) {
  18733. result = node;
  18734. }
  18735. for (var i = 0; i < node.childNodes.length; i++) {
  18736. recursive(node.childNodes[i]);
  18737. }
  18738. }
  18739. })(this);
  18740. return result;
  18741. };
  18742. SvgNode.prototype.getElementsByTagName = function (tag) {
  18743. var result = [];
  18744. (function recursive(node) {
  18745. if (node.nodeType === 1) {
  18746. if (node.nodeName === tag) {
  18747. result.push(node);
  18748. }
  18749. for (var i = 0; i < node.childNodes.length; i++) {
  18750. recursive(node.childNodes[i]);
  18751. }
  18752. }
  18753. })(this);
  18754. return result;
  18755. };
  18756. var parser = new StringParser(xml.trim()),
  18757. result,
  18758. child,
  18759. error = false;
  18760. var recursive = function recursive() {
  18761. var temp, child;
  18762. if (temp = parser.match(/^<([\w:.-]+)\s*/, true)) {
  18763. // Opening tag
  18764. var node = new SvgNode(temp[1], 1, null, error);
  18765. while (temp = parser.match(/^([\w:.-]+)(?:\s*=\s*"([^"]*)"|\s*=\s*'([^']*)')?\s*/, true)) {
  18766. // Attribute
  18767. var attr = temp[1],
  18768. value = decodeEntities(temp[2] || temp[3] || '');
  18769. if (!node.attributes[attr]) {
  18770. node.attributes[attr] = value;
  18771. if (attr === 'id') {
  18772. node.id = value;
  18773. }
  18774. if (attr === 'class') {
  18775. node.classList = value.split(' ');
  18776. }
  18777. } else {
  18778. warningCallback('parseXml: duplicate attribute "' + attr + '"');
  18779. error = true;
  18780. }
  18781. }
  18782. if (parser.match(/^>/)) {
  18783. // End of opening tag
  18784. while (child = recursive()) {
  18785. node.childNodes.push(child);
  18786. child.parentNode = node;
  18787. node.textContent += child.nodeType === 3 || child.nodeType === 4 ? child.nodeValue : child.textContent;
  18788. }
  18789. if (temp = parser.match(/^<\/([\w:.-]+)\s*>/, true)) {
  18790. // Closing tag
  18791. if (temp[1] === node.nodeName) {
  18792. return node;
  18793. } else {
  18794. warningCallback('parseXml: tag not matching, opening "' + node.nodeName + '" & closing "' + temp[1] + '"');
  18795. error = true;
  18796. return node;
  18797. }
  18798. } else {
  18799. warningCallback('parseXml: tag not matching, opening "' + node.nodeName + '" & not closing');
  18800. error = true;
  18801. return node;
  18802. }
  18803. } else if (parser.match(/^\/>/)) {
  18804. // Self-closing tag
  18805. return node;
  18806. } else {
  18807. warningCallback('parseXml: tag could not be parsed "' + node.nodeName + '"');
  18808. error = true;
  18809. }
  18810. } else if (temp = parser.match(/^<!--[\s\S]*?-->/)) {
  18811. // Comment
  18812. return new SvgNode(null, 8, temp, error);
  18813. } else if (temp = parser.match(/^<\?[\s\S]*?\?>/)) {
  18814. // Processing instructions
  18815. return new SvgNode(null, 7, temp, error);
  18816. } else if (temp = parser.match(/^<!DOCTYPE\s*([\s\S]*?)>/)) {
  18817. // Doctype
  18818. return new SvgNode(null, 10, temp, error);
  18819. } else if (temp = parser.match(/^<!\[CDATA\[([\s\S]*?)\]\]>/, true)) {
  18820. // Cdata node
  18821. return new SvgNode('#cdata-section', 4, temp[1], error);
  18822. } else if (temp = parser.match(/^([^<]+)/, true)) {
  18823. // Text node
  18824. return new SvgNode('#text', 3, decodeEntities(temp[1]), error);
  18825. }
  18826. };
  18827. while (child = recursive()) {
  18828. if (child.nodeType === 1 && !result) {
  18829. result = child;
  18830. } else if (child.nodeType === 1 || child.nodeType === 3 && child.nodeValue.trim() !== '') {
  18831. warningCallback('parseXml: data after document end has been discarded');
  18832. }
  18833. }
  18834. if (parser.matchAll()) {
  18835. warningCallback('parseXml: parsing error');
  18836. }
  18837. return result;
  18838. }
  18839. ;
  18840. function decodeEntities(str) {
  18841. return str.replace(/&(?:#([0-9]+)|#[xX]([0-9A-Fa-f]+)|([0-9A-Za-z]+));/g, function (mt, m0, m1, m2) {
  18842. if (m0) {
  18843. return String.fromCharCode(parseInt(m0, 10));
  18844. } else if (m1) {
  18845. return String.fromCharCode(parseInt(m1, 16));
  18846. } else if (m2 && Entities[m2]) {
  18847. return String.fromCharCode(Entities[m2]);
  18848. } else {
  18849. return mt;
  18850. }
  18851. });
  18852. }
  18853. function parseColor(raw) {
  18854. var temp, result;
  18855. raw = (raw || '').trim();
  18856. if (temp = NamedColors[raw]) {
  18857. result = [temp.slice(), 1];
  18858. } else if (temp = raw.match(/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)$/i)) {
  18859. temp[1] = parseInt(temp[1]);
  18860. temp[2] = parseInt(temp[2]);
  18861. temp[3] = parseInt(temp[3]);
  18862. temp[4] = parseFloat(temp[4]);
  18863. if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256 && temp[4] <= 1) {
  18864. result = [temp.slice(1, 4), temp[4]];
  18865. }
  18866. } else if (temp = raw.match(/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/i)) {
  18867. temp[1] = parseInt(temp[1]);
  18868. temp[2] = parseInt(temp[2]);
  18869. temp[3] = parseInt(temp[3]);
  18870. if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256) {
  18871. result = [temp.slice(1, 4), 1];
  18872. }
  18873. } else if (temp = raw.match(/^rgb\(\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/i)) {
  18874. temp[1] = 2.55 * parseFloat(temp[1]);
  18875. temp[2] = 2.55 * parseFloat(temp[2]);
  18876. temp[3] = 2.55 * parseFloat(temp[3]);
  18877. if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256) {
  18878. result = [temp.slice(1, 4), 1];
  18879. }
  18880. } else if (temp = raw.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)) {
  18881. result = [[parseInt(temp[1], 16), parseInt(temp[2], 16), parseInt(temp[3], 16)], 1];
  18882. } else if (temp = raw.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i)) {
  18883. result = [[0x11 * parseInt(temp[1], 16), 0x11 * parseInt(temp[2], 16), 0x11 * parseInt(temp[3], 16)], 1];
  18884. }
  18885. return colorCallback ? colorCallback(result, raw) : result;
  18886. }
  18887. function opacityToColor(color, opacity, isMask) {
  18888. var newColor = color[0].slice(),
  18889. newOpacity = color[1] * opacity;
  18890. if (isMask) {
  18891. for (var i = 0; i < color.length; i++) {
  18892. newColor[i] *= newOpacity;
  18893. }
  18894. return [newColor, 1];
  18895. } else {
  18896. return [newColor, newOpacity];
  18897. }
  18898. }
  18899. function multiplyMatrix() {
  18900. function multiply(a, b) {
  18901. return [a[0] * b[0] + a[2] * b[1], a[1] * b[0] + a[3] * b[1], a[0] * b[2] + a[2] * b[3], a[1] * b[2] + a[3] * b[3], a[0] * b[4] + a[2] * b[5] + a[4], a[1] * b[4] + a[3] * b[5] + a[5]];
  18902. }
  18903. var result = arguments[0];
  18904. for (var i = 1; i < arguments.length; i++) {
  18905. result = multiply(result, arguments[i]);
  18906. }
  18907. return result;
  18908. }
  18909. function transformPoint(p, m) {
  18910. return [m[0] * p[0] + m[2] * p[1] + m[4], m[1] * p[0] + m[3] * p[1] + m[5]];
  18911. }
  18912. function getGlobalMatrix() {
  18913. var ctm = doc._ctm;
  18914. for (var i = groupStack.length - 1; i >= 0; i--) {
  18915. ctm = multiplyMatrix(groupStack[i].savedMatrix, ctm);
  18916. }
  18917. return ctm;
  18918. }
  18919. function getPageBBox() {
  18920. return new SvgShape().M(0, 0).L(doc.page.width, 0).L(doc.page.width, doc.page.height).L(0, doc.page.height).transform(inverseMatrix(getGlobalMatrix())).getBoundingBox();
  18921. }
  18922. function inverseMatrix(m) {
  18923. var dt = m[0] * m[3] - m[1] * m[2];
  18924. return [m[3] / dt, -m[1] / dt, -m[2] / dt, m[0] / dt, (m[2] * m[5] - m[3] * m[4]) / dt, (m[1] * m[4] - m[0] * m[5]) / dt];
  18925. }
  18926. function validateMatrix(m) {
  18927. var m0 = validateNumber(m[0]),
  18928. m1 = validateNumber(m[1]),
  18929. m2 = validateNumber(m[2]),
  18930. m3 = validateNumber(m[3]),
  18931. m4 = validateNumber(m[4]),
  18932. m5 = validateNumber(m[5]);
  18933. if (isNotEqual(m0 * m3 - m1 * m2, 0)) {
  18934. return [m0, m1, m2, m3, m4, m5];
  18935. }
  18936. }
  18937. function solveEquation(curve) {
  18938. var a = curve[2] || 0,
  18939. b = curve[1] || 0,
  18940. c = curve[0] || 0;
  18941. if (isEqual(a, 0) && isEqual(b, 0)) {
  18942. return [];
  18943. } else if (isEqual(a, 0)) {
  18944. return [-c / b];
  18945. } else {
  18946. var d = b * b - 4 * a * c;
  18947. if (isNotEqual(d, 0) && d > 0) {
  18948. return [(-b + Math.sqrt(d)) / (2 * a), (-b - Math.sqrt(d)) / (2 * a)];
  18949. } else if (isEqual(d, 0)) {
  18950. return [-b / (2 * a)];
  18951. } else {
  18952. return [];
  18953. }
  18954. }
  18955. }
  18956. function getCurveValue(t, curve) {
  18957. return (curve[0] || 0) + (curve[1] || 0) * t + (curve[2] || 0) * t * t + (curve[3] || 0) * t * t * t;
  18958. }
  18959. function isEqual(number, ref) {
  18960. return Math.abs(number - ref) < 1e-10;
  18961. }
  18962. function isNotEqual(number, ref) {
  18963. return Math.abs(number - ref) >= 1e-10;
  18964. }
  18965. function validateNumber(n) {
  18966. return n > -1e21 && n < 1e21 ? Math.round(n * 1e6) / 1e6 : 0;
  18967. }
  18968. function isArrayLike(v) {
  18969. return typeof v === 'object' && v !== null && typeof v.length === 'number';
  18970. }
  18971. function parseTranform(v) {
  18972. var parser = new StringParser((v || '').trim()),
  18973. result = [1, 0, 0, 1, 0, 0],
  18974. temp;
  18975. while (temp = parser.match(/^([A-Za-z]+)\s*[(]([^(]+)[)]/, true)) {
  18976. var func = temp[1],
  18977. nums = [],
  18978. parser2 = new StringParser(temp[2].trim()),
  18979. temp2 = void 0;
  18980. while (temp2 = parser2.matchNumber()) {
  18981. nums.push(Number(temp2));
  18982. parser2.matchSeparator();
  18983. }
  18984. if (func === 'matrix' && nums.length === 6) {
  18985. result = multiplyMatrix(result, [nums[0], nums[1], nums[2], nums[3], nums[4], nums[5]]);
  18986. } else if (func === 'translate' && nums.length === 2) {
  18987. result = multiplyMatrix(result, [1, 0, 0, 1, nums[0], nums[1]]);
  18988. } else if (func === 'translate' && nums.length === 1) {
  18989. result = multiplyMatrix(result, [1, 0, 0, 1, nums[0], 0]);
  18990. } else if (func === 'scale' && nums.length === 2) {
  18991. result = multiplyMatrix(result, [nums[0], 0, 0, nums[1], 0, 0]);
  18992. } else if (func === 'scale' && nums.length === 1) {
  18993. result = multiplyMatrix(result, [nums[0], 0, 0, nums[0], 0, 0]);
  18994. } else if (func === 'rotate' && nums.length === 3) {
  18995. var a = nums[0] * Math.PI / 180;
  18996. result = multiplyMatrix(result, [1, 0, 0, 1, nums[1], nums[2]], [Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0], [1, 0, 0, 1, -nums[1], -nums[2]]);
  18997. } else if (func === 'rotate' && nums.length === 1) {
  18998. var _a = nums[0] * Math.PI / 180;
  18999. result = multiplyMatrix(result, [Math.cos(_a), Math.sin(_a), -Math.sin(_a), Math.cos(_a), 0, 0]);
  19000. } else if (func === 'skewX' && nums.length === 1) {
  19001. var _a2 = nums[0] * Math.PI / 180;
  19002. result = multiplyMatrix(result, [1, 0, Math.tan(_a2), 1, 0, 0]);
  19003. } else if (func === 'skewY' && nums.length === 1) {
  19004. var _a3 = nums[0] * Math.PI / 180;
  19005. result = multiplyMatrix(result, [1, Math.tan(_a3), 0, 1, 0, 0]);
  19006. } else {
  19007. return;
  19008. }
  19009. parser.matchSeparator();
  19010. }
  19011. if (parser.matchAll()) {
  19012. return;
  19013. }
  19014. return result;
  19015. }
  19016. function parseAspectRatio(aspectRatio, availWidth, availHeight, elemWidth, elemHeight, initAlign) {
  19017. var temp = (aspectRatio || '').trim().match(/^(none)$|^x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?$/) || [],
  19018. ratioType = temp[1] || temp[4] || 'meet',
  19019. xAlign = temp[2] || 'Mid',
  19020. yAlign = temp[3] || 'Mid',
  19021. scaleX = availWidth / elemWidth,
  19022. scaleY = availHeight / elemHeight,
  19023. dx = {
  19024. 'Min': 0,
  19025. 'Mid': 0.5,
  19026. 'Max': 1
  19027. }[xAlign] - (initAlign || 0),
  19028. dy = {
  19029. 'Min': 0,
  19030. 'Mid': 0.5,
  19031. 'Max': 1
  19032. }[yAlign] - (initAlign || 0);
  19033. if (ratioType === 'slice') {
  19034. scaleY = scaleX = Math.max(scaleX, scaleY);
  19035. } else if (ratioType === 'meet') {
  19036. scaleY = scaleX = Math.min(scaleX, scaleY);
  19037. }
  19038. return [scaleX, 0, 0, scaleY, dx * (availWidth - elemWidth * scaleX), dy * (availHeight - elemHeight * scaleY)];
  19039. }
  19040. function parseStyleAttr(v) {
  19041. var result = Object.create(null);
  19042. v = (v || '').trim().split(/;/);
  19043. for (var i = 0; i < v.length; i++) {
  19044. var key = (v[i].split(':')[0] || '').trim(),
  19045. value = (v[i].split(':')[1] || '').trim();
  19046. if (key) {
  19047. result[key] = value;
  19048. }
  19049. }
  19050. if (result['marker']) {
  19051. if (!result['marker-start']) {
  19052. result['marker-start'] = result['marker'];
  19053. }
  19054. if (!result['marker-mid']) {
  19055. result['marker-mid'] = result['marker'];
  19056. }
  19057. if (!result['marker-end']) {
  19058. result['marker-end'] = result['marker'];
  19059. }
  19060. }
  19061. if (result['font']) {
  19062. var fontFamily = null,
  19063. fontSize = null,
  19064. fontStyle = "normal",
  19065. fontWeight = "normal",
  19066. fontVariant = "normal";
  19067. var parts = result['font'].split(/\s+/);
  19068. for (var _i = 0; _i < parts.length; _i++) {
  19069. switch (parts[_i]) {
  19070. case "normal":
  19071. break;
  19072. case "italic":
  19073. case "oblique":
  19074. fontStyle = parts[_i];
  19075. break;
  19076. case "small-caps":
  19077. fontVariant = parts[_i];
  19078. break;
  19079. case "bold":
  19080. case "bolder":
  19081. case "lighter":
  19082. case "100":
  19083. case "200":
  19084. case "300":
  19085. case "400":
  19086. case "500":
  19087. case "600":
  19088. case "700":
  19089. case "800":
  19090. case "900":
  19091. fontWeight = parts[_i];
  19092. break;
  19093. default:
  19094. if (!fontSize) {
  19095. fontSize = parts[_i].split('/')[0];
  19096. } else {
  19097. if (!fontFamily) {
  19098. fontFamily = parts[_i];
  19099. } else {
  19100. fontFamily += ' ' + parts[_i];
  19101. }
  19102. }
  19103. break;
  19104. }
  19105. }
  19106. if (!result['font-style']) {
  19107. result['font-style'] = fontStyle;
  19108. }
  19109. if (!result['font-variant']) {
  19110. result['font-variant'] = fontVariant;
  19111. }
  19112. if (!result['font-weight']) {
  19113. result['font-weight'] = fontWeight;
  19114. }
  19115. if (!result['font-size']) {
  19116. result['font-size'] = fontSize;
  19117. }
  19118. if (!result['font-family']) {
  19119. result['font-family'] = fontFamily;
  19120. }
  19121. }
  19122. return result;
  19123. }
  19124. function parseSelector(v) {
  19125. var parts = v.split(/(?=[.#])/g),
  19126. ids = [],
  19127. classes = [],
  19128. tags = [],
  19129. temp;
  19130. for (var i = 0; i < parts.length; i++) {
  19131. if (temp = parts[i].match(/^[#]([_A-Za-z0-9-]+)$/)) {
  19132. ids.push(temp[1]);
  19133. } else if (temp = parts[i].match(/^[.]([_A-Za-z0-9-]+)$/)) {
  19134. classes.push(temp[1]);
  19135. } else if (temp = parts[i].match(/^([_A-Za-z0-9-]+)$/)) {
  19136. tags.push(temp[1]);
  19137. } else if (parts[i] !== '*') {
  19138. return;
  19139. }
  19140. }
  19141. return {
  19142. tags: tags,
  19143. ids: ids,
  19144. classes: classes,
  19145. specificity: ids.length * 10000 + classes.length * 100 + tags.length
  19146. };
  19147. }
  19148. function parseStyleSheet(v) {
  19149. var parser = new StringParser(v.trim()),
  19150. rules = [],
  19151. rule;
  19152. while (rule = parser.match(/^\s*([^\{\}]*?)\s*\{([^\{\}]*?)\}/, true)) {
  19153. var selectors = rule[1].split(/\s*,\s*/g),
  19154. css = parseStyleAttr(rule[2]);
  19155. for (var i = 0; i < selectors.length; i++) {
  19156. var selector = parseSelector(selectors[i]);
  19157. if (selector) {
  19158. rules.push({
  19159. selector: selector,
  19160. css: css
  19161. });
  19162. }
  19163. }
  19164. }
  19165. return rules;
  19166. }
  19167. function matchesSelector(elem, selector) {
  19168. if (elem.nodeType !== 1) {
  19169. return false;
  19170. }
  19171. for (var i = 0; i < selector.tags.length; i++) {
  19172. if (selector.tags[i] !== elem.nodeName) {
  19173. return false;
  19174. }
  19175. }
  19176. for (var _i2 = 0; _i2 < selector.ids.length; _i2++) {
  19177. if (selector.ids[_i2] !== elem.id) {
  19178. return false;
  19179. }
  19180. }
  19181. for (var _i3 = 0; _i3 < selector.classes.length; _i3++) {
  19182. if (elem.classList.indexOf(selector.classes[_i3]) === -1) {
  19183. return false;
  19184. }
  19185. }
  19186. return true;
  19187. }
  19188. function getStyle(elem) {
  19189. var result = Object.create(null);
  19190. var specificities = Object.create(null);
  19191. for (var i = 0; i < styleRules.length; i++) {
  19192. var rule = styleRules[i];
  19193. if (matchesSelector(elem, rule.selector)) {
  19194. for (var key in rule.css) {
  19195. if (!(specificities[key] > rule.selector.specificity)) {
  19196. result[key] = rule.css[key];
  19197. specificities[key] = rule.selector.specificity;
  19198. }
  19199. }
  19200. }
  19201. }
  19202. return result;
  19203. }
  19204. function combineArrays(array1, array2) {
  19205. return array1.concat(array2.slice(array1.length));
  19206. }
  19207. function getAscent(font, size) {
  19208. return Math.max(font.ascender, (font.bbox[3] || font.bbox.maxY) * (font.scale || 1)) * size / 1000;
  19209. }
  19210. function getDescent(font, size) {
  19211. return Math.min(font.descender, (font.bbox[1] || font.bbox.minY) * (font.scale || 1)) * size / 1000;
  19212. }
  19213. function getXHeight(font, size) {
  19214. return (font.xHeight || 0.5 * (font.ascender - font.descender)) * size / 1000;
  19215. }
  19216. function getBaseline(font, size, baseline, shift) {
  19217. var dy1, dy2;
  19218. switch (baseline) {
  19219. case 'middle':
  19220. dy1 = 0.5 * getXHeight(font, size);
  19221. break;
  19222. case 'central':
  19223. dy1 = 0.5 * (getDescent(font, size) + getAscent(font, size));
  19224. break;
  19225. case 'after-edge':
  19226. case 'text-after-edge':
  19227. dy1 = getDescent(font, size);
  19228. break;
  19229. case 'alphabetic':
  19230. case 'auto':
  19231. case 'baseline':
  19232. dy1 = 0;
  19233. break;
  19234. case 'mathematical':
  19235. dy1 = 0.5 * getAscent(font, size);
  19236. break;
  19237. case 'hanging':
  19238. dy1 = 0.8 * getAscent(font, size);
  19239. break;
  19240. case 'before-edge':
  19241. case 'text-before-edge':
  19242. dy1 = getAscent(font, size);
  19243. break;
  19244. default:
  19245. dy1 = 0;
  19246. break;
  19247. }
  19248. switch (shift) {
  19249. case 'baseline':
  19250. dy2 = 0;
  19251. break;
  19252. case 'super':
  19253. dy2 = 0.6 * size;
  19254. break;
  19255. case 'sub':
  19256. dy2 = -0.6 * size;
  19257. break;
  19258. default:
  19259. dy2 = shift;
  19260. break;
  19261. }
  19262. return dy1 - dy2;
  19263. }
  19264. function getTextPos(font, size, text) {
  19265. var encoded = font.encode('' + text),
  19266. hex = encoded[0],
  19267. pos = encoded[1],
  19268. data = [];
  19269. for (var i = 0; i < hex.length; i++) {
  19270. var unicode = font.unicode ? font.unicode[parseInt(hex[i], 16)] : [text.charCodeAt(i)];
  19271. data.push({
  19272. glyph: hex[i],
  19273. unicode: unicode,
  19274. width: pos[i].advanceWidth * size / 1000,
  19275. xOffset: pos[i].xOffset * size / 1000,
  19276. yOffset: pos[i].yOffset * size / 1000,
  19277. xAdvance: pos[i].xAdvance * size / 1000,
  19278. yAdvance: pos[i].yAdvance * size / 1000
  19279. });
  19280. }
  19281. return data;
  19282. }
  19283. function createSVGElement(obj, inherits) {
  19284. switch (obj.nodeName) {
  19285. case 'use':
  19286. return new SvgElemUse(obj, inherits);
  19287. case 'symbol':
  19288. return new SvgElemSymbol(obj, inherits);
  19289. case 'g':
  19290. return new SvgElemGroup(obj, inherits);
  19291. case 'a':
  19292. return new SvgElemLink(obj, inherits);
  19293. case 'svg':
  19294. return new SvgElemSvg(obj, inherits);
  19295. case 'image':
  19296. return new SVGElemImage(obj, inherits);
  19297. case 'rect':
  19298. return new SvgElemRect(obj, inherits);
  19299. case 'circle':
  19300. return new SvgElemCircle(obj, inherits);
  19301. case 'ellipse':
  19302. return new SvgElemEllipse(obj, inherits);
  19303. case 'line':
  19304. return new SvgElemLine(obj, inherits);
  19305. case 'polyline':
  19306. return new SvgElemPolyline(obj, inherits);
  19307. case 'polygon':
  19308. return new SvgElemPolygon(obj, inherits);
  19309. case 'path':
  19310. return new SvgElemPath(obj, inherits);
  19311. case 'text':
  19312. return new SvgElemText(obj, inherits);
  19313. case 'tspan':
  19314. return new SvgElemTspan(obj, inherits);
  19315. case 'textPath':
  19316. return new SvgElemTextPath(obj, inherits);
  19317. case '#text':
  19318. case '#cdata-section':
  19319. return new SvgElemTextNode(obj, inherits);
  19320. default:
  19321. return new SvgElem(obj, inherits);
  19322. }
  19323. }
  19324. var StringParser = function StringParser(str) {
  19325. this.match = function (exp, all) {
  19326. var temp = str.match(exp);
  19327. if (!temp || temp.index !== 0) {
  19328. return;
  19329. }
  19330. str = str.substring(temp[0].length);
  19331. return all ? temp : temp[0];
  19332. };
  19333. this.matchSeparator = function () {
  19334. return this.match(/^(?:\s*,\s*|\s*|)/);
  19335. };
  19336. this.matchSpace = function () {
  19337. return this.match(/^(?:\s*)/);
  19338. };
  19339. this.matchLengthUnit = function () {
  19340. return this.match(/^(?:px|pt|cm|mm|in|pc|em|ex|%|)/);
  19341. };
  19342. this.matchNumber = function () {
  19343. return this.match(/^(?:[-+]?(?:[0-9]+[.][0-9]+|[0-9]+[.]|[.][0-9]+|[0-9]+)(?:[eE][-+]?[0-9]+)?)/);
  19344. };
  19345. this.matchAll = function () {
  19346. return this.match(/^[\s\S]+/);
  19347. };
  19348. };
  19349. var BezierSegment = function BezierSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
  19350. var divisions = 6 * precision;
  19351. var equationX = [p1x, -3 * p1x + 3 * c1x, 3 * p1x - 6 * c1x + 3 * c2x, -p1x + 3 * c1x - 3 * c2x + p2x];
  19352. var equationY = [p1y, -3 * p1y + 3 * c1y, 3 * p1y - 6 * c1y + 3 * c2y, -p1y + 3 * c1y - 3 * c2y + p2y];
  19353. var derivativeX = [-3 * p1x + 3 * c1x, 6 * p1x - 12 * c1x + 6 * c2x, -3 * p1x + 9 * c1x - 9 * c2x + 3 * p2x];
  19354. var derivativeY = [-3 * p1y + 3 * c1y, 6 * p1y - 12 * c1y + 6 * c2y, -3 * p1y + 9 * c1y - 9 * c2y + 3 * p2y];
  19355. var lengthMap = [0];
  19356. for (var i = 1; i <= divisions; i++) {
  19357. var t = (i - 0.5) / divisions;
  19358. var dx = getCurveValue(t, derivativeX) / divisions,
  19359. dy = getCurveValue(t, derivativeY) / divisions,
  19360. l = Math.sqrt(dx * dx + dy * dy);
  19361. lengthMap[i] = lengthMap[i - 1] + l;
  19362. }
  19363. this.totalLength = lengthMap[divisions];
  19364. this.startPoint = [p1x, p1y, isEqual(p1x, c1x) && isEqual(p1y, c1y) ? Math.atan2(c2y - c1y, c2x - c1x) : Math.atan2(c1y - p1y, c1x - p1x)];
  19365. this.endPoint = [p2x, p2y, isEqual(c2x, p2x) && isEqual(c2y, p2y) ? Math.atan2(c2y - c1y, c2x - c1x) : Math.atan2(p2y - c2y, p2x - c2x)];
  19366. this.getBoundingBox = function () {
  19367. var temp;
  19368. var minX = getCurveValue(0, equationX),
  19369. minY = getCurveValue(0, equationY),
  19370. maxX = getCurveValue(1, equationX),
  19371. maxY = getCurveValue(1, equationY);
  19372. if (minX > maxX) {
  19373. temp = maxX;
  19374. maxX = minX;
  19375. minX = temp;
  19376. }
  19377. if (minY > maxY) {
  19378. temp = maxY;
  19379. maxY = minY;
  19380. minY = temp;
  19381. }
  19382. var rootsX = solveEquation(derivativeX);
  19383. for (var _i4 = 0; _i4 < rootsX.length; _i4++) {
  19384. if (rootsX[_i4] >= 0 && rootsX[_i4] <= 1) {
  19385. var _x = getCurveValue(rootsX[_i4], equationX);
  19386. if (_x < minX) {
  19387. minX = _x;
  19388. }
  19389. if (_x > maxX) {
  19390. maxX = _x;
  19391. }
  19392. }
  19393. }
  19394. var rootsY = solveEquation(derivativeY);
  19395. for (var _i5 = 0; _i5 < rootsY.length; _i5++) {
  19396. if (rootsY[_i5] >= 0 && rootsY[_i5] <= 1) {
  19397. var _y = getCurveValue(rootsY[_i5], equationY);
  19398. if (_y < minY) {
  19399. minY = _y;
  19400. }
  19401. if (_y > maxY) {
  19402. maxY = _y;
  19403. }
  19404. }
  19405. }
  19406. return [minX, minY, maxX, maxY];
  19407. };
  19408. this.getPointAtLength = function (l) {
  19409. if (isEqual(l, 0)) {
  19410. return this.startPoint;
  19411. }
  19412. if (isEqual(l, this.totalLength)) {
  19413. return this.endPoint;
  19414. }
  19415. if (l < 0 || l > this.totalLength) {
  19416. return;
  19417. }
  19418. for (var _i6 = 1; _i6 <= divisions; _i6++) {
  19419. var l1 = lengthMap[_i6 - 1],
  19420. l2 = lengthMap[_i6];
  19421. if (l1 <= l && l <= l2) {
  19422. var _t = (_i6 - (l2 - l) / (l2 - l1)) / divisions,
  19423. _x2 = getCurveValue(_t, equationX),
  19424. _y2 = getCurveValue(_t, equationY),
  19425. _dx = getCurveValue(_t, derivativeX),
  19426. _dy = getCurveValue(_t, derivativeY);
  19427. return [_x2, _y2, Math.atan2(_dy, _dx)];
  19428. }
  19429. }
  19430. };
  19431. };
  19432. var LineSegment = function LineSegment(p1x, p1y, p2x, p2y) {
  19433. this.totalLength = Math.sqrt((p2x - p1x) * (p2x - p1x) + (p2y - p1y) * (p2y - p1y));
  19434. this.startPoint = [p1x, p1y, Math.atan2(p2y - p1y, p2x - p1x)];
  19435. this.endPoint = [p2x, p2y, Math.atan2(p2y - p1y, p2x - p1x)];
  19436. this.getBoundingBox = function () {
  19437. return [Math.min(this.startPoint[0], this.endPoint[0]), Math.min(this.startPoint[1], this.endPoint[1]), Math.max(this.startPoint[0], this.endPoint[0]), Math.max(this.startPoint[1], this.endPoint[1])];
  19438. };
  19439. this.getPointAtLength = function (l) {
  19440. if (l >= 0 && l <= this.totalLength) {
  19441. var r = l / this.totalLength || 0,
  19442. _x3 = this.startPoint[0] + r * (this.endPoint[0] - this.startPoint[0]),
  19443. _y3 = this.startPoint[1] + r * (this.endPoint[1] - this.startPoint[1]);
  19444. return [_x3, _y3, this.startPoint[2]];
  19445. }
  19446. };
  19447. };
  19448. var SvgShape = function SvgShape() {
  19449. this.pathCommands = [];
  19450. this.pathSegments = [];
  19451. this.startPoint = null;
  19452. this.endPoint = null;
  19453. this.totalLength = 0;
  19454. var startX = 0,
  19455. startY = 0,
  19456. currX = 0,
  19457. currY = 0,
  19458. lastCom,
  19459. lastCtrlX,
  19460. lastCtrlY;
  19461. this.move = function (x, y) {
  19462. startX = currX = x;
  19463. startY = currY = y;
  19464. return null;
  19465. };
  19466. this.line = function (x, y) {
  19467. var segment = new LineSegment(currX, currY, x, y);
  19468. currX = x;
  19469. currY = y;
  19470. return segment;
  19471. };
  19472. this.curve = function (c1x, c1y, c2x, c2y, x, y) {
  19473. var segment = new BezierSegment(currX, currY, c1x, c1y, c2x, c2y, x, y);
  19474. currX = x;
  19475. currY = y;
  19476. return segment;
  19477. };
  19478. this.close = function () {
  19479. var segment = new LineSegment(currX, currY, startX, startY);
  19480. currX = startX;
  19481. currY = startY;
  19482. return segment;
  19483. };
  19484. this.addCommand = function (data) {
  19485. this.pathCommands.push(data);
  19486. var segment = this[data[0]].apply(this, data.slice(3));
  19487. if (segment) {
  19488. segment.hasStart = data[1];
  19489. segment.hasEnd = data[2];
  19490. this.startPoint = this.startPoint || segment.startPoint;
  19491. this.endPoint = segment.endPoint;
  19492. this.pathSegments.push(segment);
  19493. this.totalLength += segment.totalLength;
  19494. }
  19495. };
  19496. this.M = function (x, y) {
  19497. this.addCommand(['move', true, true, x, y]);
  19498. lastCom = 'M';
  19499. return this;
  19500. };
  19501. this.m = function (x, y) {
  19502. return this.M(currX + x, currY + y);
  19503. };
  19504. this.Z = this.z = function () {
  19505. this.addCommand(['close', true, true]);
  19506. lastCom = 'Z';
  19507. return this;
  19508. };
  19509. this.L = function (x, y) {
  19510. this.addCommand(['line', true, true, x, y]);
  19511. lastCom = 'L';
  19512. return this;
  19513. };
  19514. this.l = function (x, y) {
  19515. return this.L(currX + x, currY + y);
  19516. };
  19517. this.H = function (x) {
  19518. return this.L(x, currY);
  19519. };
  19520. this.h = function (x) {
  19521. return this.L(currX + x, currY);
  19522. };
  19523. this.V = function (y) {
  19524. return this.L(currX, y);
  19525. };
  19526. this.v = function (y) {
  19527. return this.L(currX, currY + y);
  19528. };
  19529. this.C = function (c1x, c1y, c2x, c2y, x, y) {
  19530. this.addCommand(['curve', true, true, c1x, c1y, c2x, c2y, x, y]);
  19531. lastCom = 'C';
  19532. lastCtrlX = c2x;
  19533. lastCtrlY = c2y;
  19534. return this;
  19535. };
  19536. this.c = function (c1x, c1y, c2x, c2y, x, y) {
  19537. return this.C(currX + c1x, currY + c1y, currX + c2x, currY + c2y, currX + x, currY + y);
  19538. };
  19539. this.S = function (c1x, c1y, x, y) {
  19540. return this.C(currX + (lastCom === 'C' ? currX - lastCtrlX : 0), currY + (lastCom === 'C' ? currY - lastCtrlY : 0), c1x, c1y, x, y);
  19541. };
  19542. this.s = function (c1x, c1y, x, y) {
  19543. return this.C(currX + (lastCom === 'C' ? currX - lastCtrlX : 0), currY + (lastCom === 'C' ? currY - lastCtrlY : 0), currX + c1x, currY + c1y, currX + x, currY + y);
  19544. };
  19545. this.Q = function (cx, cy, x, y) {
  19546. var c1x = currX + 2 / 3 * (cx - currX),
  19547. c1y = currY + 2 / 3 * (cy - currY),
  19548. c2x = x + 2 / 3 * (cx - x),
  19549. c2y = y + 2 / 3 * (cy - y);
  19550. this.addCommand(['curve', true, true, c1x, c1y, c2x, c2y, x, y]);
  19551. lastCom = 'Q';
  19552. lastCtrlX = cx;
  19553. lastCtrlY = cy;
  19554. return this;
  19555. };
  19556. this.q = function (c1x, c1y, x, y) {
  19557. return this.Q(currX + c1x, currY + c1y, currX + x, currY + y);
  19558. };
  19559. this.T = function (x, y) {
  19560. return this.Q(currX + (lastCom === 'Q' ? currX - lastCtrlX : 0), currY + (lastCom === 'Q' ? currY - lastCtrlY : 0), x, y);
  19561. };
  19562. this.t = function (x, y) {
  19563. return this.Q(currX + (lastCom === 'Q' ? currX - lastCtrlX : 0), currY + (lastCom === 'Q' ? currY - lastCtrlY : 0), currX + x, currY + y);
  19564. };
  19565. this.A = function (rx, ry, fi, fa, fs, x, y) {
  19566. if (isEqual(rx, 0) || isEqual(ry, 0)) {
  19567. this.addCommand(['line', true, true, x, y]);
  19568. } else {
  19569. fi = fi * (Math.PI / 180);
  19570. rx = Math.abs(rx);
  19571. ry = Math.abs(ry);
  19572. fa = 1 * !!fa;
  19573. fs = 1 * !!fs;
  19574. var x1 = Math.cos(fi) * (currX - x) / 2 + Math.sin(fi) * (currY - y) / 2,
  19575. y1 = Math.cos(fi) * (currY - y) / 2 - Math.sin(fi) * (currX - x) / 2,
  19576. lambda = x1 * x1 / (rx * rx) + y1 * y1 / (ry * ry);
  19577. if (lambda > 1) {
  19578. rx *= Math.sqrt(lambda);
  19579. ry *= Math.sqrt(lambda);
  19580. }
  19581. var r = Math.sqrt(Math.max(0, rx * rx * ry * ry - rx * rx * y1 * y1 - ry * ry * x1 * x1) / (rx * rx * y1 * y1 + ry * ry * x1 * x1)),
  19582. x2 = (fa === fs ? -1 : 1) * r * rx * y1 / ry,
  19583. y2 = (fa === fs ? 1 : -1) * r * ry * x1 / rx;
  19584. var cx = Math.cos(fi) * x2 - Math.sin(fi) * y2 + (currX + x) / 2,
  19585. cy = Math.sin(fi) * x2 + Math.cos(fi) * y2 + (currY + y) / 2,
  19586. th1 = Math.atan2((y1 - y2) / ry, (x1 - x2) / rx),
  19587. th2 = Math.atan2((-y1 - y2) / ry, (-x1 - x2) / rx);
  19588. if (fs === 0 && th2 - th1 > 0) {
  19589. th2 -= 2 * Math.PI;
  19590. } else if (fs === 1 && th2 - th1 < 0) {
  19591. th2 += 2 * Math.PI;
  19592. }
  19593. var segms = Math.ceil(Math.abs(th2 - th1) / (Math.PI / precision));
  19594. for (var i = 0; i < segms; i++) {
  19595. var th3 = th1 + i * (th2 - th1) / segms,
  19596. th4 = th1 + (i + 1) * (th2 - th1) / segms,
  19597. t = 4 / 3 * Math.tan((th4 - th3) / 4);
  19598. var c1x = cx + Math.cos(fi) * rx * (Math.cos(th3) - t * Math.sin(th3)) - Math.sin(fi) * ry * (Math.sin(th3) + t * Math.cos(th3)),
  19599. c1y = cy + Math.sin(fi) * rx * (Math.cos(th3) - t * Math.sin(th3)) + Math.cos(fi) * ry * (Math.sin(th3) + t * Math.cos(th3)),
  19600. c2x = cx + Math.cos(fi) * rx * (Math.cos(th4) + t * Math.sin(th4)) - Math.sin(fi) * ry * (Math.sin(th4) - t * Math.cos(th4)),
  19601. c2y = cy + Math.sin(fi) * rx * (Math.cos(th4) + t * Math.sin(th4)) + Math.cos(fi) * ry * (Math.sin(th4) - t * Math.cos(th4)),
  19602. endX = cx + Math.cos(fi) * rx * Math.cos(th4) - Math.sin(fi) * ry * Math.sin(th4),
  19603. endY = cy + Math.sin(fi) * rx * Math.cos(th4) + Math.cos(fi) * ry * Math.sin(th4);
  19604. this.addCommand(['curve', i === 0, i === segms - 1, c1x, c1y, c2x, c2y, endX, endY]);
  19605. }
  19606. }
  19607. lastCom = 'A';
  19608. return this;
  19609. };
  19610. this.a = function (rx, ry, fi, fa, fs, x, y) {
  19611. return this.A(rx, ry, fi, fa, fs, currX + x, currY + y);
  19612. };
  19613. this.path = function (d) {
  19614. var command,
  19615. value,
  19616. temp,
  19617. parser = new StringParser((d || '').trim());
  19618. while (command = parser.match(/^[astvzqmhlcASTVZQMHLC]/)) {
  19619. parser.matchSeparator();
  19620. var values = [];
  19621. while (value = PathFlags[command + values.length] ? parser.match(/^[01]/) : parser.matchNumber()) {
  19622. parser.matchSeparator();
  19623. if (values.length === PathArguments[command]) {
  19624. this[command].apply(this, values);
  19625. values = [];
  19626. if (command === 'M') {
  19627. command = 'L';
  19628. } else if (command === 'm') {
  19629. command = 'l';
  19630. }
  19631. }
  19632. values.push(Number(value));
  19633. }
  19634. if (values.length === PathArguments[command]) {
  19635. this[command].apply(this, values);
  19636. } else {
  19637. warningCallback('SvgPath: command ' + command + ' with ' + values.length + ' numbers');
  19638. return;
  19639. }
  19640. }
  19641. if (temp = parser.matchAll()) {
  19642. warningCallback('SvgPath: unexpected string ' + temp);
  19643. }
  19644. return this;
  19645. };
  19646. this.getBoundingBox = function () {
  19647. var bbox = [Infinity, Infinity, -Infinity, -Infinity];
  19648. function addBounds(bbox1) {
  19649. if (bbox1[0] < bbox[0]) {
  19650. bbox[0] = bbox1[0];
  19651. }
  19652. if (bbox1[2] > bbox[2]) {
  19653. bbox[2] = bbox1[2];
  19654. }
  19655. if (bbox1[1] < bbox[1]) {
  19656. bbox[1] = bbox1[1];
  19657. }
  19658. if (bbox1[3] > bbox[3]) {
  19659. bbox[3] = bbox1[3];
  19660. }
  19661. }
  19662. for (var i = 0; i < this.pathSegments.length; i++) {
  19663. addBounds(this.pathSegments[i].getBoundingBox());
  19664. }
  19665. if (bbox[0] === Infinity) {
  19666. bbox[0] = 0;
  19667. }
  19668. if (bbox[1] === Infinity) {
  19669. bbox[1] = 0;
  19670. }
  19671. if (bbox[2] === -Infinity) {
  19672. bbox[2] = 0;
  19673. }
  19674. if (bbox[3] === -Infinity) {
  19675. bbox[3] = 0;
  19676. }
  19677. return bbox;
  19678. };
  19679. this.getPointAtLength = function (l) {
  19680. if (l >= 0 && l <= this.totalLength) {
  19681. var temp;
  19682. for (var i = 0; i < this.pathSegments.length; i++) {
  19683. if (temp = this.pathSegments[i].getPointAtLength(l)) {
  19684. return temp;
  19685. }
  19686. l -= this.pathSegments[i].totalLength;
  19687. }
  19688. return this.endPoint;
  19689. }
  19690. };
  19691. this.transform = function (m) {
  19692. this.pathSegments = [];
  19693. this.startPoint = null;
  19694. this.endPoint = null;
  19695. this.totalLength = 0;
  19696. for (var i = 0; i < this.pathCommands.length; i++) {
  19697. var data = this.pathCommands.shift();
  19698. for (var j = 3; j < data.length; j += 2) {
  19699. var p = transformPoint([data[j], data[j + 1]], m);
  19700. data[j] = p[0];
  19701. data[j + 1] = p[1];
  19702. }
  19703. this.addCommand(data);
  19704. }
  19705. return this;
  19706. };
  19707. this.mergeShape = function (shape) {
  19708. for (var i = 0; i < shape.pathCommands.length; i++) {
  19709. this.addCommand(shape.pathCommands[i].slice());
  19710. }
  19711. return this;
  19712. };
  19713. this.clone = function () {
  19714. return new SvgShape().mergeShape(this);
  19715. };
  19716. this.insertInDocument = function () {
  19717. for (var i = 0; i < this.pathCommands.length; i++) {
  19718. var command = this.pathCommands[i][0],
  19719. values = this.pathCommands[i].slice(3);
  19720. switch (command) {
  19721. case 'move':
  19722. doc.moveTo(values[0], values[1]);
  19723. break;
  19724. case 'line':
  19725. doc.lineTo(values[0], values[1]);
  19726. break;
  19727. case 'curve':
  19728. doc.bezierCurveTo(values[0], values[1], values[2], values[3], values[4], values[5]);
  19729. break;
  19730. case 'close':
  19731. doc.closePath();
  19732. break;
  19733. }
  19734. }
  19735. };
  19736. this.getSubPaths = function () {
  19737. var subPaths = [],
  19738. shape = new SvgShape();
  19739. for (var i = 0; i < this.pathCommands.length; i++) {
  19740. var data = this.pathCommands[i],
  19741. command = this.pathCommands[i][0];
  19742. if (command === 'move' && i !== 0) {
  19743. subPaths.push(shape);
  19744. shape = new SvgShape();
  19745. }
  19746. shape.addCommand(data);
  19747. }
  19748. subPaths.push(shape);
  19749. return subPaths;
  19750. };
  19751. this.getMarkers = function () {
  19752. var markers = [],
  19753. subPaths = this.getSubPaths();
  19754. for (var i = 0; i < subPaths.length; i++) {
  19755. var subPath = subPaths[i],
  19756. subPathMarkers = [];
  19757. for (var j = 0; j < subPath.pathSegments.length; j++) {
  19758. var segment = subPath.pathSegments[j];
  19759. if (isNotEqual(segment.totalLength, 0) || j === 0 || j === subPath.pathSegments.length - 1) {
  19760. if (segment.hasStart) {
  19761. var startMarker = segment.getPointAtLength(0),
  19762. prevEndMarker = subPathMarkers.pop();
  19763. if (prevEndMarker) {
  19764. startMarker[2] = 0.5 * (prevEndMarker[2] + startMarker[2]);
  19765. }
  19766. subPathMarkers.push(startMarker);
  19767. }
  19768. if (segment.hasEnd) {
  19769. var endMarker = segment.getPointAtLength(segment.totalLength);
  19770. subPathMarkers.push(endMarker);
  19771. }
  19772. }
  19773. }
  19774. markers = markers.concat(subPathMarkers);
  19775. }
  19776. return markers;
  19777. };
  19778. };
  19779. var SvgElem = function SvgElem(obj, inherits) {
  19780. var styleCache = Object.create(null);
  19781. var childrenCache = null;
  19782. this.name = obj.nodeName;
  19783. this.isOuterElement = obj === svg || !obj.parentNode;
  19784. this.inherits = inherits || (!this.isOuterElement ? createSVGElement(obj.parentNode, null) : null);
  19785. this.stack = this.inherits ? this.inherits.stack.concat(obj) : [obj];
  19786. this.style = parseStyleAttr(typeof obj.getAttribute === 'function' && obj.getAttribute('style'));
  19787. this.css = useCSS ? getComputedStyle(obj) : getStyle(obj);
  19788. this.allowedChildren = [];
  19789. this.attr = function (key) {
  19790. if (typeof obj.getAttribute === 'function') {
  19791. return obj.getAttribute(key);
  19792. }
  19793. };
  19794. this.resolveUrl = function (value) {
  19795. var temp = (value || '').match(/^\s*(?:url\("(.*)#(.*)"\)|url\('(.*)#(.*)'\)|url\((.*)#(.*)\)|(.*)#(.*))\s*$/) || [];
  19796. var file = temp[1] || temp[3] || temp[5] || temp[7],
  19797. id = temp[2] || temp[4] || temp[6] || temp[8];
  19798. if (id) {
  19799. if (!file) {
  19800. var svgObj = svg.getElementById(id);
  19801. if (svgObj) {
  19802. if (this.stack.indexOf(svgObj) === -1) {
  19803. return svgObj;
  19804. } else {
  19805. warningCallback('SVGtoPDF: loop of circular references for id "' + id + '"');
  19806. return;
  19807. }
  19808. }
  19809. }
  19810. if (documentCallback) {
  19811. var svgs = documentCache[file];
  19812. if (!svgs) {
  19813. svgs = documentCallback(file);
  19814. if (!isArrayLike(svgs)) {
  19815. svgs = [svgs];
  19816. }
  19817. for (var i = 0; i < svgs.length; i++) {
  19818. if (typeof svgs[i] === 'string') {
  19819. svgs[i] = parseXml(svgs[i]);
  19820. }
  19821. }
  19822. documentCache[file] = svgs;
  19823. }
  19824. for (var _i7 = 0; _i7 < svgs.length; _i7++) {
  19825. var _svgObj = svgs[_i7].getElementById(id);
  19826. if (_svgObj) {
  19827. if (this.stack.indexOf(_svgObj) === -1) {
  19828. return _svgObj;
  19829. } else {
  19830. warningCallback('SVGtoPDF: loop of circular references for id "' + file + '#' + id + '"');
  19831. return;
  19832. }
  19833. }
  19834. }
  19835. }
  19836. }
  19837. };
  19838. this.computeUnits = function (value, unit, percent, isFontSize) {
  19839. if (unit === '%') {
  19840. return parseFloat(value) / 100 * (isFontSize || percent != null ? percent : this.getViewport());
  19841. } else if (unit === 'ex' || unit === 'em') {
  19842. return value * {
  19843. 'em': 1,
  19844. 'ex': 0.5
  19845. }[unit] * (isFontSize ? percent : this.get('font-size'));
  19846. } else {
  19847. return value * {
  19848. '': 1,
  19849. 'px': 1,
  19850. 'pt': 96 / 72,
  19851. 'cm': 96 / 2.54,
  19852. 'mm': 96 / 25.4,
  19853. 'in': 96,
  19854. 'pc': 96 / 6
  19855. }[unit];
  19856. }
  19857. };
  19858. this.computeLength = function (value, percent, initial, isFontSize) {
  19859. var parser = new StringParser((value || '').trim()),
  19860. temp1,
  19861. temp2;
  19862. if (typeof (temp1 = parser.matchNumber()) === 'string' && typeof (temp2 = parser.matchLengthUnit()) === 'string' && !parser.matchAll()) {
  19863. return this.computeUnits(temp1, temp2, percent, isFontSize);
  19864. }
  19865. return initial;
  19866. };
  19867. this.computeLengthList = function (value, percent, strict) {
  19868. var parser = new StringParser((value || '').trim()),
  19869. result = [],
  19870. temp1,
  19871. temp2;
  19872. while (typeof (temp1 = parser.matchNumber()) === 'string' && typeof (temp2 = parser.matchLengthUnit()) === 'string') {
  19873. result.push(this.computeUnits(temp1, temp2, percent));
  19874. parser.matchSeparator();
  19875. }
  19876. if (strict && parser.matchAll()) {
  19877. return;
  19878. }
  19879. return result;
  19880. };
  19881. this.getLength = function (key, percent, initial) {
  19882. return this.computeLength(this.attr(key), percent, initial);
  19883. };
  19884. this.getLengthList = function (key, percent) {
  19885. return this.computeLengthList(this.attr(key), percent);
  19886. };
  19887. this.getUrl = function (key) {
  19888. return this.resolveUrl(this.attr(key));
  19889. };
  19890. this.getNumberList = function (key) {
  19891. var parser = new StringParser((this.attr(key) || '').trim()),
  19892. result = [],
  19893. temp;
  19894. while (temp = parser.matchNumber()) {
  19895. result.push(Number(temp));
  19896. parser.matchSeparator();
  19897. }
  19898. result.error = parser.matchAll();
  19899. return result;
  19900. };
  19901. this.getViewbox = function (key, initial) {
  19902. var viewBox = this.getNumberList(key);
  19903. if (viewBox.length === 4 && viewBox[2] >= 0 && viewBox[3] >= 0) {
  19904. return viewBox;
  19905. }
  19906. return initial;
  19907. };
  19908. this.getPercent = function (key, initial) {
  19909. var value = this.attr(key);
  19910. var parser = new StringParser((value || '').trim()),
  19911. temp1,
  19912. temp2;
  19913. var number = parser.matchNumber();
  19914. if (!number) {
  19915. return initial;
  19916. }
  19917. if (parser.match('%')) {
  19918. number *= 0.01;
  19919. }
  19920. if (parser.matchAll()) {
  19921. return initial;
  19922. }
  19923. return Math.max(0, Math.min(1, number));
  19924. };
  19925. this.chooseValue = function (args) {
  19926. for (var i = 0; i < arguments.length; i++) {
  19927. if (arguments[i] != null && arguments[i] === arguments[i]) {
  19928. return arguments[i];
  19929. }
  19930. }
  19931. return arguments[arguments.length - 1];
  19932. };
  19933. this.get = function (key) {
  19934. if (styleCache[key] !== undefined) {
  19935. return styleCache[key];
  19936. }
  19937. var keyInfo = Properties[key] || {},
  19938. value,
  19939. result;
  19940. for (var i = 0; i < 3; i++) {
  19941. switch (i) {
  19942. case 0:
  19943. if (key !== 'transform') {
  19944. // the CSS transform behaves strangely
  19945. value = this.css[keyInfo.css || key];
  19946. }
  19947. break;
  19948. case 1:
  19949. value = this.style[key];
  19950. break;
  19951. case 2:
  19952. value = this.attr(key);
  19953. break;
  19954. }
  19955. if (value === 'inherit') {
  19956. result = this.inherits ? this.inherits.get(key) : keyInfo.initial;
  19957. if (result != null) {
  19958. return styleCache[key] = result;
  19959. }
  19960. }
  19961. if (keyInfo.values != null) {
  19962. result = keyInfo.values[value];
  19963. if (result != null) {
  19964. return styleCache[key] = result;
  19965. }
  19966. }
  19967. if (value != null) {
  19968. var parsed = void 0;
  19969. switch (key) {
  19970. case 'font-size':
  19971. result = this.computeLength(value, this.inherits ? this.inherits.get(key) : keyInfo.initial, undefined, true);
  19972. break;
  19973. case 'baseline-shift':
  19974. result = this.computeLength(value, this.get('font-size'));
  19975. break;
  19976. case 'font-family':
  19977. result = value || undefined;
  19978. break;
  19979. case 'opacity':
  19980. case 'stroke-opacity':
  19981. case 'fill-opacity':
  19982. case 'stop-opacity':
  19983. parsed = parseFloat(value);
  19984. if (!isNaN(parsed)) {
  19985. result = Math.max(0, Math.min(1, parsed));
  19986. }
  19987. break;
  19988. case 'transform':
  19989. result = parseTranform(value);
  19990. break;
  19991. case 'stroke-dasharray':
  19992. if (value === 'none') {
  19993. result = [];
  19994. } else if (parsed = this.computeLengthList(value, this.getViewport(), true)) {
  19995. var sum = 0,
  19996. error = false;
  19997. for (var j = 0; j < parsed.length; j++) {
  19998. if (parsed[j] < 0) {
  19999. error = true;
  20000. }
  20001. sum += parsed[j];
  20002. }
  20003. if (!error) {
  20004. if (parsed.length % 2 === 1) {
  20005. parsed = parsed.concat(parsed);
  20006. }
  20007. result = sum === 0 ? [] : parsed;
  20008. }
  20009. }
  20010. break;
  20011. case 'color':
  20012. if (value === 'none' || value === 'transparent') {
  20013. result = 'none';
  20014. } else {
  20015. result = parseColor(value);
  20016. }
  20017. break;
  20018. case 'fill':
  20019. case 'stroke':
  20020. if (value === 'none' || value === 'transparent') {
  20021. result = 'none';
  20022. } else if (value === 'currentColor') {
  20023. result = this.get('color');
  20024. } else if (parsed = parseColor(value)) {
  20025. return parsed;
  20026. } else if (parsed = (value || '').split(' ')) {
  20027. var object = this.resolveUrl(parsed[0]),
  20028. fallbackColor = parseColor(parsed[1]);
  20029. if (object == null) {
  20030. result = fallbackColor;
  20031. } else if (object.nodeName === 'linearGradient' || object.nodeName === 'radialGradient') {
  20032. result = new SvgElemGradient(object, null, fallbackColor);
  20033. } else if (object.nodeName === 'pattern') {
  20034. result = new SvgElemPattern(object, null, fallbackColor);
  20035. } else {
  20036. result = fallbackColor;
  20037. }
  20038. }
  20039. break;
  20040. case 'stop-color':
  20041. if (value === 'none' || value === 'transparent') {
  20042. result = 'none';
  20043. } else if (value === 'currentColor') {
  20044. result = this.get('color');
  20045. } else {
  20046. result = parseColor(value);
  20047. }
  20048. break;
  20049. case 'marker-start':
  20050. case 'marker-mid':
  20051. case 'marker-end':
  20052. case 'clip-path':
  20053. case 'mask':
  20054. if (value === 'none') {
  20055. result = 'none';
  20056. } else {
  20057. result = this.resolveUrl(value);
  20058. }
  20059. break;
  20060. case 'stroke-width':
  20061. parsed = this.computeLength(value, this.getViewport());
  20062. if (parsed != null && parsed >= 0) {
  20063. result = parsed;
  20064. }
  20065. break;
  20066. case 'stroke-miterlimit':
  20067. parsed = parseFloat(value);
  20068. if (parsed != null && parsed >= 1) {
  20069. result = parsed;
  20070. }
  20071. break;
  20072. case 'word-spacing':
  20073. case 'letter-spacing':
  20074. result = this.computeLength(value, this.getViewport());
  20075. break;
  20076. case 'stroke-dashoffset':
  20077. result = this.computeLength(value, this.getViewport());
  20078. if (result != null) {
  20079. if (result < 0) {
  20080. // fix for crbug.com/660850
  20081. var dasharray = this.get('stroke-dasharray');
  20082. for (var _j = 0; _j < dasharray.length; _j++) {
  20083. result += dasharray[_j];
  20084. }
  20085. }
  20086. }
  20087. break;
  20088. }
  20089. if (result != null) {
  20090. return styleCache[key] = result;
  20091. }
  20092. }
  20093. }
  20094. return styleCache[key] = keyInfo.inherit && this.inherits ? this.inherits.get(key) : keyInfo.initial;
  20095. };
  20096. this.getChildren = function () {
  20097. if (childrenCache != null) {
  20098. return childrenCache;
  20099. }
  20100. var children = [];
  20101. for (var i = 0; i < obj.childNodes.length; i++) {
  20102. var child = obj.childNodes[i];
  20103. if (!child.error && this.allowedChildren.indexOf(child.nodeName) !== -1) {
  20104. children.push(createSVGElement(child, this));
  20105. }
  20106. }
  20107. return childrenCache = children;
  20108. };
  20109. this.getParentVWidth = function () {
  20110. return this.inherits ? this.inherits.getVWidth() : viewportWidth;
  20111. };
  20112. this.getParentVHeight = function () {
  20113. return this.inherits ? this.inherits.getVHeight() : viewportHeight;
  20114. };
  20115. this.getParentViewport = function () {
  20116. return Math.sqrt(0.5 * this.getParentVWidth() * this.getParentVWidth() + 0.5 * this.getParentVHeight() * this.getParentVHeight());
  20117. };
  20118. this.getVWidth = function () {
  20119. return this.getParentVWidth();
  20120. };
  20121. this.getVHeight = function () {
  20122. return this.getParentVHeight();
  20123. };
  20124. this.getViewport = function () {
  20125. return Math.sqrt(0.5 * this.getVWidth() * this.getVWidth() + 0.5 * this.getVHeight() * this.getVHeight());
  20126. };
  20127. this.getBoundingBox = function () {
  20128. var shape = this.getBoundingShape();
  20129. return shape.getBoundingBox();
  20130. };
  20131. };
  20132. var SvgElemStylable = function SvgElemStylable(obj, inherits) {
  20133. SvgElem.call(this, obj, inherits);
  20134. this.transform = function () {
  20135. doc.transform.apply(doc, this.getTransformation());
  20136. };
  20137. this.clip = function () {
  20138. if (this.get('clip-path') !== 'none') {
  20139. var clipPath = new SvgElemClipPath(this.get('clip-path'), null);
  20140. clipPath.useMask(this.getBoundingBox());
  20141. return true;
  20142. }
  20143. };
  20144. this.mask = function () {
  20145. if (this.get('mask') !== 'none') {
  20146. var mask = new SvgElemMask(this.get('mask'), null);
  20147. mask.useMask(this.getBoundingBox());
  20148. return true;
  20149. }
  20150. };
  20151. this.getFill = function (isClip, isMask) {
  20152. var opacity = this.get('opacity'),
  20153. fill = this.get('fill'),
  20154. fillOpacity = this.get('fill-opacity');
  20155. if (isClip) {
  20156. return DefaultColors.white;
  20157. }
  20158. if (fill !== 'none' && opacity && fillOpacity) {
  20159. if (fill instanceof SvgElemGradient || fill instanceof SvgElemPattern) {
  20160. return fill.getPaint(this.getBoundingBox(), fillOpacity * opacity, isClip, isMask);
  20161. }
  20162. return opacityToColor(fill, fillOpacity * opacity, isMask);
  20163. }
  20164. };
  20165. this.getStroke = function (isClip, isMask) {
  20166. var opacity = this.get('opacity'),
  20167. stroke = this.get('stroke'),
  20168. strokeOpacity = this.get('stroke-opacity');
  20169. if (isClip || isEqual(this.get('stroke-width'), 0)) {
  20170. return;
  20171. }
  20172. if (stroke !== 'none' && opacity && strokeOpacity) {
  20173. if (stroke instanceof SvgElemGradient || stroke instanceof SvgElemPattern) {
  20174. return stroke.getPaint(this.getBoundingBox(), strokeOpacity * opacity, isClip, isMask);
  20175. }
  20176. return opacityToColor(stroke, strokeOpacity * opacity, isMask);
  20177. }
  20178. };
  20179. };
  20180. var SvgElemHasChildren = function SvgElemHasChildren(obj, inherits) {
  20181. SvgElemStylable.call(this, obj, inherits);
  20182. this.allowedChildren = ['use', 'g', 'a', 'svg', 'image', 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon', 'path', 'text'];
  20183. this.getBoundingShape = function () {
  20184. var shape = new SvgShape(),
  20185. children = this.getChildren();
  20186. for (var i = 0; i < children.length; i++) {
  20187. if (children[i].get('display') !== 'none') {
  20188. if (typeof children[i].getBoundingShape === 'function') {
  20189. var childShape = children[i].getBoundingShape().clone();
  20190. if (typeof children[i].getTransformation === 'function') {
  20191. childShape.transform(children[i].getTransformation());
  20192. }
  20193. shape.mergeShape(childShape);
  20194. }
  20195. }
  20196. }
  20197. return shape;
  20198. };
  20199. this.drawChildren = function (isClip, isMask) {
  20200. var children = this.getChildren();
  20201. for (var i = 0; i < children.length; i++) {
  20202. if (children[i].get('display') !== 'none') {
  20203. if (typeof children[i].drawInDocument === 'function') {
  20204. children[i].drawInDocument(isClip, isMask);
  20205. }
  20206. }
  20207. }
  20208. };
  20209. };
  20210. var SvgElemContainer = function SvgElemContainer(obj, inherits) {
  20211. SvgElemHasChildren.call(this, obj, inherits);
  20212. this.drawContent = function (isClip, isMask) {
  20213. this.transform();
  20214. var clipped = this.clip(),
  20215. masked = this.mask(),
  20216. group;
  20217. if ((this.get('opacity') < 1 || clipped || masked) && !isClip) {
  20218. group = docBeginGroup(getPageBBox());
  20219. }
  20220. this.drawChildren(isClip, isMask);
  20221. if (group) {
  20222. docEndGroup(group);
  20223. doc.fillOpacity(this.get('opacity'));
  20224. docInsertGroup(group);
  20225. }
  20226. };
  20227. };
  20228. var SvgElemUse = function SvgElemUse(obj, inherits) {
  20229. SvgElemContainer.call(this, obj, inherits);
  20230. var x = this.getLength('x', this.getVWidth(), 0),
  20231. y = this.getLength('y', this.getVHeight(), 0),
  20232. child = this.getUrl('href') || this.getUrl('xlink:href');
  20233. if (child) {
  20234. child = createSVGElement(child, this);
  20235. }
  20236. this.getChildren = function () {
  20237. return child ? [child] : [];
  20238. };
  20239. this.drawInDocument = function (isClip, isMask) {
  20240. doc.save();
  20241. this.drawContent(isClip, isMask);
  20242. doc.restore();
  20243. };
  20244. this.getTransformation = function () {
  20245. return multiplyMatrix(this.get('transform'), [1, 0, 0, 1, x, y]);
  20246. };
  20247. };
  20248. var SvgElemSymbol = function SvgElemSymbol(obj, inherits) {
  20249. SvgElemContainer.call(this, obj, inherits);
  20250. var width = this.getLength('width', this.getParentVWidth(), this.getParentVWidth()),
  20251. height = this.getLength('height', this.getParentVHeight(), this.getParentVHeight());
  20252. if (inherits instanceof SvgElemUse) {
  20253. width = inherits.getLength('width', inherits.getParentVWidth(), width);
  20254. height = inherits.getLength('height', inherits.getParentVHeight(), height);
  20255. }
  20256. var aspectRatio = (this.attr('preserveAspectRatio') || '').trim(),
  20257. viewBox = this.getViewbox('viewBox', [0, 0, width, height]);
  20258. this.getVWidth = function () {
  20259. return viewBox[2];
  20260. };
  20261. this.getVHeight = function () {
  20262. return viewBox[3];
  20263. };
  20264. this.drawInDocument = function (isClip, isMask) {
  20265. doc.save();
  20266. this.drawContent(isClip, isMask);
  20267. doc.restore();
  20268. };
  20269. this.getTransformation = function () {
  20270. return multiplyMatrix(parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3]), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]);
  20271. };
  20272. };
  20273. var SvgElemGroup = function SvgElemGroup(obj, inherits) {
  20274. SvgElemContainer.call(this, obj, inherits);
  20275. this.drawInDocument = function (isClip, isMask) {
  20276. doc.save();
  20277. if (this.link && !isClip && !isMask) {
  20278. this.addLink();
  20279. }
  20280. this.drawContent(isClip, isMask);
  20281. doc.restore();
  20282. };
  20283. this.getTransformation = function () {
  20284. return this.get('transform');
  20285. };
  20286. };
  20287. var SvgElemLink = function SvgElemLink(obj, inherits) {
  20288. if (inherits && inherits.isText) {
  20289. SvgElemTspan.call(this, obj, inherits);
  20290. this.allowedChildren = ['textPath', 'tspan', '#text', '#cdata-section', 'a'];
  20291. } else {
  20292. SvgElemGroup.call(this, obj, inherits);
  20293. }
  20294. this.link = this.attr('href') || this.attr('xlink:href');
  20295. this.addLink = function () {
  20296. if (this.link.match(/^(?:[a-z][a-z0-9+.-]*:|\/\/)?/i) && this.getChildren().length) {
  20297. var bbox = this.getBoundingShape().transform(getGlobalMatrix()).getBoundingBox();
  20298. docInsertLink(bbox[0], bbox[1], bbox[2], bbox[3], this.link);
  20299. }
  20300. };
  20301. };
  20302. var SvgElemSvg = function SvgElemSvg(obj, inherits) {
  20303. SvgElemContainer.call(this, obj, inherits);
  20304. var width = this.getLength('width', this.getParentVWidth(), this.getParentVWidth()),
  20305. height = this.getLength('height', this.getParentVHeight(), this.getParentVHeight()),
  20306. x = this.getLength('x', this.getParentVWidth(), 0),
  20307. y = this.getLength('y', this.getParentVHeight(), 0);
  20308. if (inherits instanceof SvgElemUse) {
  20309. width = inherits.getLength('width', inherits.getParentVWidth(), width);
  20310. height = inherits.getLength('height', inherits.getParentVHeight(), height);
  20311. }
  20312. var aspectRatio = this.attr('preserveAspectRatio'),
  20313. viewBox = this.getViewbox('viewBox', [0, 0, width, height]);
  20314. if (this.isOuterElement && preserveAspectRatio) {
  20315. x = y = 0;
  20316. width = viewportWidth;
  20317. height = viewportHeight;
  20318. aspectRatio = preserveAspectRatio;
  20319. }
  20320. this.getVWidth = function () {
  20321. return viewBox[2];
  20322. };
  20323. this.getVHeight = function () {
  20324. return viewBox[3];
  20325. };
  20326. this.drawInDocument = function (isClip, isMask) {
  20327. doc.save();
  20328. if (this.get('overflow') === 'hidden') {
  20329. new SvgShape().M(x, y).L(x + width, y).L(x + width, y + height).L(x, y + height).Z().transform(this.get('transform')).insertInDocument();
  20330. doc.clip();
  20331. }
  20332. this.drawContent(isClip, isMask);
  20333. doc.restore();
  20334. };
  20335. this.getTransformation = function () {
  20336. return multiplyMatrix(this.get('transform'), [1, 0, 0, 1, x, y], parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3]), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]);
  20337. };
  20338. };
  20339. var SVGElemImage = function SVGElemImage(obj, inherits) {
  20340. SvgElemStylable.call(this, obj, inherits);
  20341. var link = imageCallback(this.attr('href') || this.attr('xlink:href') || ''),
  20342. x = this.getLength('x', this.getVWidth(), 0),
  20343. y = this.getLength('y', this.getVHeight(), 0),
  20344. width = this.getLength('width', this.getVWidth(), 'auto'),
  20345. height = this.getLength('height', this.getVHeight(), 'auto'),
  20346. image;
  20347. try {
  20348. image = doc.openImage(link);
  20349. } catch (e) {
  20350. warningCallback('SVGElemImage: failed to open image "' + link + '" in PDFKit');
  20351. }
  20352. if (image) {
  20353. if (width === 'auto' && height !== 'auto') {
  20354. width = height * image.width / image.height;
  20355. } else if (height === 'auto' && width !== 'auto') {
  20356. height = width * image.height / image.width;
  20357. } else if (width === 'auto' && height === 'auto') {
  20358. width = image.width;
  20359. height = image.height;
  20360. }
  20361. }
  20362. if (width === 'auto' || width < 0) {
  20363. width = 0;
  20364. }
  20365. if (height === 'auto' || height < 0) {
  20366. height = 0;
  20367. }
  20368. this.getTransformation = function () {
  20369. return this.get('transform');
  20370. };
  20371. this.getBoundingShape = function () {
  20372. return new SvgShape().M(x, y).L(x + width, y).M(x + width, y + height).L(x, y + height);
  20373. };
  20374. this.drawInDocument = function (isClip, isMask) {
  20375. if (this.get('visibility') === 'hidden' || !image) {
  20376. return;
  20377. }
  20378. doc.save();
  20379. this.transform();
  20380. if (this.get('overflow') === 'hidden') {
  20381. doc.rect(x, y, width, height).clip();
  20382. }
  20383. this.clip();
  20384. this.mask();
  20385. doc.translate(x, y);
  20386. doc.transform.apply(doc, parseAspectRatio(this.attr('preserveAspectRatio'), width, height, image ? image.width : width, image ? image.height : height));
  20387. if (!isClip) {
  20388. doc.fillOpacity(this.get('opacity'));
  20389. doc.image(image, 0, 0);
  20390. } else {
  20391. doc.rect(0, 0, image.width, image.height);
  20392. docFillColor(DefaultColors.white).fill();
  20393. }
  20394. doc.restore();
  20395. };
  20396. };
  20397. var SvgElemPattern = function SvgElemPattern(obj, inherits, fallback) {
  20398. SvgElemHasChildren.call(this, obj, inherits);
  20399. this.ref = function () {
  20400. var ref = this.getUrl('href') || this.getUrl('xlink:href');
  20401. if (ref && ref.nodeName === obj.nodeName) {
  20402. return new SvgElemPattern(ref, inherits, fallback);
  20403. }
  20404. }.call(this);
  20405. var _attr = this.attr;
  20406. this.attr = function (key) {
  20407. var attr = _attr.call(this, key);
  20408. if (attr != null || key === 'href' || key === 'xlink:href') {
  20409. return attr;
  20410. }
  20411. return this.ref ? this.ref.attr(key) : null;
  20412. };
  20413. var _getChildren = this.getChildren;
  20414. this.getChildren = function () {
  20415. var children = _getChildren.call(this);
  20416. if (children.length > 0) {
  20417. return children;
  20418. }
  20419. return this.ref ? this.ref.getChildren() : [];
  20420. };
  20421. this.getPaint = function (bBox, gOpacity, isClip, isMask) {
  20422. var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse',
  20423. bBoxUnitsContent = this.attr('patternContentUnits') === 'objectBoundingBox',
  20424. x = this.getLength('x', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0),
  20425. y = this.getLength('y', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0),
  20426. width = this.getLength('width', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0),
  20427. height = this.getLength('height', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0);
  20428. if (bBoxUnitsContent && !bBoxUnitsPattern) {
  20429. // Use the same units for pattern & pattern content
  20430. x = (x - bBox[0]) / (bBox[2] - bBox[0]) || 0;
  20431. y = (y - bBox[1]) / (bBox[3] - bBox[1]) || 0;
  20432. width = width / (bBox[2] - bBox[0]) || 0;
  20433. height = height / (bBox[3] - bBox[1]) || 0;
  20434. } else if (!bBoxUnitsContent && bBoxUnitsPattern) {
  20435. x = bBox[0] + x * (bBox[2] - bBox[0]);
  20436. y = bBox[1] + y * (bBox[3] - bBox[1]);
  20437. width = width * (bBox[2] - bBox[0]);
  20438. height = height * (bBox[3] - bBox[1]);
  20439. }
  20440. var viewBox = this.getViewbox('viewBox', [0, 0, width, height]),
  20441. aspectRatio = (this.attr('preserveAspectRatio') || '').trim(),
  20442. aspectRatioMatrix = multiplyMatrix(parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3], 0), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]),
  20443. matrix = parseTranform(this.attr('patternTransform'));
  20444. if (bBoxUnitsContent) {
  20445. matrix = multiplyMatrix([bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]], matrix);
  20446. }
  20447. matrix = multiplyMatrix(matrix, [1, 0, 0, 1, x, y]);
  20448. if ((matrix = validateMatrix(matrix)) && (aspectRatioMatrix = validateMatrix(aspectRatioMatrix)) && (width = validateNumber(width)) && (height = validateNumber(height))) {
  20449. var group = docBeginGroup([0, 0, width, height]);
  20450. doc.transform.apply(doc, aspectRatioMatrix);
  20451. this.drawChildren(isClip, isMask);
  20452. docEndGroup(group);
  20453. return [docCreatePattern(group, width, height, matrix), gOpacity];
  20454. } else {
  20455. return fallback ? [fallback[0], fallback[1] * gOpacity] : undefined;
  20456. }
  20457. };
  20458. this.getVWidth = function () {
  20459. var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse',
  20460. width = this.getLength('width', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0);
  20461. return this.getViewbox('viewBox', [0, 0, width, 0])[2];
  20462. };
  20463. this.getVHeight = function () {
  20464. var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse',
  20465. height = this.getLength('height', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0);
  20466. return this.getViewbox('viewBox', [0, 0, 0, height])[3];
  20467. };
  20468. };
  20469. var SvgElemGradient = function SvgElemGradient(obj, inherits, fallback) {
  20470. SvgElem.call(this, obj, inherits);
  20471. this.allowedChildren = ['stop'];
  20472. this.ref = function () {
  20473. var ref = this.getUrl('href') || this.getUrl('xlink:href');
  20474. if (ref && ref.nodeName === obj.nodeName) {
  20475. return new SvgElemGradient(ref, inherits, fallback);
  20476. }
  20477. }.call(this);
  20478. var _attr = this.attr;
  20479. this.attr = function (key) {
  20480. var attr = _attr.call(this, key);
  20481. if (attr != null || key === 'href' || key === 'xlink:href') {
  20482. return attr;
  20483. }
  20484. return this.ref ? this.ref.attr(key) : null;
  20485. };
  20486. var _getChildren = this.getChildren;
  20487. this.getChildren = function () {
  20488. var children = _getChildren.call(this);
  20489. if (children.length > 0) {
  20490. return children;
  20491. }
  20492. return this.ref ? this.ref.getChildren() : [];
  20493. };
  20494. this.getPaint = function (bBox, gOpacity, isClip, isMask) {
  20495. var children = this.getChildren();
  20496. if (children.length === 0) {
  20497. return;
  20498. }
  20499. if (children.length === 1) {
  20500. var child = children[0],
  20501. stopColor = child.get('stop-color');
  20502. if (stopColor === 'none') {
  20503. return;
  20504. }
  20505. return opacityToColor(stopColor, child.get('stop-opacity') * gOpacity, isMask);
  20506. }
  20507. var bBoxUnits = this.attr('gradientUnits') !== 'userSpaceOnUse',
  20508. matrix = parseTranform(this.attr('gradientTransform')),
  20509. spread = this.attr('spreadMethod'),
  20510. grad,
  20511. x1,
  20512. x2,
  20513. y1,
  20514. y2,
  20515. r2,
  20516. nAfter = 0,
  20517. nBefore = 0,
  20518. nTotal = 1;
  20519. if (bBoxUnits) {
  20520. matrix = multiplyMatrix([bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]], matrix);
  20521. }
  20522. if (matrix = validateMatrix(matrix)) {
  20523. if (this.name === 'linearGradient') {
  20524. x1 = this.getLength('x1', bBoxUnits ? 1 : this.getVWidth(), 0);
  20525. x2 = this.getLength('x2', bBoxUnits ? 1 : this.getVWidth(), bBoxUnits ? 1 : this.getVWidth());
  20526. y1 = this.getLength('y1', bBoxUnits ? 1 : this.getVHeight(), 0);
  20527. y2 = this.getLength('y2', bBoxUnits ? 1 : this.getVHeight(), 0);
  20528. } else {
  20529. x2 = this.getLength('cx', bBoxUnits ? 1 : this.getVWidth(), bBoxUnits ? 0.5 : 0.5 * this.getVWidth());
  20530. y2 = this.getLength('cy', bBoxUnits ? 1 : this.getVHeight(), bBoxUnits ? 0.5 : 0.5 * this.getVHeight());
  20531. r2 = this.getLength('r', bBoxUnits ? 1 : this.getViewport(), bBoxUnits ? 0.5 : 0.5 * this.getViewport());
  20532. x1 = this.getLength('fx', bBoxUnits ? 1 : this.getVWidth(), x2);
  20533. y1 = this.getLength('fy', bBoxUnits ? 1 : this.getVHeight(), y2);
  20534. if (r2 < 0) {
  20535. warningCallback('SvgElemGradient: negative r value');
  20536. }
  20537. var d = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)),
  20538. multiplier = 1;
  20539. if (d > r2) {
  20540. // according to specification
  20541. multiplier = r2 / d;
  20542. x1 = x2 + (x1 - x2) * multiplier;
  20543. y1 = y2 + (y1 - y2) * multiplier;
  20544. }
  20545. r2 = Math.max(r2, d * multiplier * (1 + 1e-6)); // fix for edge-case gradients see issue #84
  20546. }
  20547. if (spread === 'reflect' || spread === 'repeat') {
  20548. var inv = inverseMatrix(matrix),
  20549. corner1 = transformPoint([bBox[0], bBox[1]], inv),
  20550. corner2 = transformPoint([bBox[2], bBox[1]], inv),
  20551. corner3 = transformPoint([bBox[2], bBox[3]], inv),
  20552. corner4 = transformPoint([bBox[0], bBox[3]], inv);
  20553. if (this.name === 'linearGradient') {
  20554. // See file 'gradient-repeat-maths.png'
  20555. nAfter = Math.max((corner1[0] - x2) * (x2 - x1) + (corner1[1] - y2) * (y2 - y1), (corner2[0] - x2) * (x2 - x1) + (corner2[1] - y2) * (y2 - y1), (corner3[0] - x2) * (x2 - x1) + (corner3[1] - y2) * (y2 - y1), (corner4[0] - x2) * (x2 - x1) + (corner4[1] - y2) * (y2 - y1)) / (Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
  20556. nBefore = Math.max((corner1[0] - x1) * (x1 - x2) + (corner1[1] - y1) * (y1 - y2), (corner2[0] - x1) * (x1 - x2) + (corner2[1] - y1) * (y1 - y2), (corner3[0] - x1) * (x1 - x2) + (corner3[1] - y1) * (y1 - y2), (corner4[0] - x1) * (x1 - x2) + (corner4[1] - y1) * (y1 - y2)) / (Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
  20557. } else {
  20558. nAfter = Math.sqrt(Math.max(Math.pow(corner1[0] - x2, 2) + Math.pow(corner1[1] - y2, 2), Math.pow(corner2[0] - x2, 2) + Math.pow(corner2[1] - y2, 2), Math.pow(corner3[0] - x2, 2) + Math.pow(corner3[1] - y2, 2), Math.pow(corner4[0] - x2, 2) + Math.pow(corner4[1] - y2, 2))) / r2 - 1;
  20559. }
  20560. nAfter = Math.ceil(nAfter + 0.5); // Add a little more because the stroke can extend outside of the bounding box
  20561. nBefore = Math.ceil(nBefore + 0.5);
  20562. nTotal = nBefore + 1 + nAfter; // How many times the gradient needs to be repeated to fill the object bounding box
  20563. }
  20564. if (this.name === 'linearGradient') {
  20565. grad = doc.linearGradient(x1 - nBefore * (x2 - x1), y1 - nBefore * (y2 - y1), x2 + nAfter * (x2 - x1), y2 + nAfter * (y2 - y1));
  20566. } else {
  20567. grad = doc.radialGradient(x1, y1, 0, x2, y2, r2 + nAfter * r2);
  20568. }
  20569. for (var n = 0; n < nTotal; n++) {
  20570. var offset = 0,
  20571. inOrder = spread !== 'reflect' || (n - nBefore) % 2 === 0;
  20572. for (var i = 0; i < children.length; i++) {
  20573. var _child = children[inOrder ? i : children.length - 1 - i],
  20574. _stopColor = _child.get('stop-color');
  20575. if (_stopColor === 'none') {
  20576. _stopColor = DefaultColors.transparent;
  20577. }
  20578. _stopColor = opacityToColor(_stopColor, _child.get('stop-opacity') * gOpacity, isMask);
  20579. offset = Math.max(offset, inOrder ? _child.getPercent('offset', 0) : 1 - _child.getPercent('offset', 0));
  20580. if (i === 0 && _stopColor[0].length === 4) {
  20581. grad._colorSpace = 'DeviceCMYK';
  20582. } // Fix until PR #763 is merged into PDFKit
  20583. if (i === 0 && offset > 0) {
  20584. grad.stop((n + 0) / nTotal, _stopColor[0], _stopColor[1]);
  20585. }
  20586. grad.stop((n + offset) / (nAfter + nBefore + 1), _stopColor[0], _stopColor[1]);
  20587. if (i === children.length - 1 && offset < 1) {
  20588. grad.stop((n + 1) / nTotal, _stopColor[0], _stopColor[1]);
  20589. }
  20590. }
  20591. }
  20592. grad.setTransform.apply(grad, matrix);
  20593. return [grad, 1];
  20594. } else {
  20595. return fallback ? [fallback[0], fallback[1] * gOpacity] : undefined;
  20596. }
  20597. };
  20598. };
  20599. var SvgElemBasicShape = function SvgElemBasicShape(obj, inherits) {
  20600. SvgElemStylable.call(this, obj, inherits);
  20601. this.dashScale = 1;
  20602. this.getBoundingShape = function () {
  20603. return this.shape;
  20604. };
  20605. this.getTransformation = function () {
  20606. return this.get('transform');
  20607. };
  20608. this.drawInDocument = function (isClip, isMask) {
  20609. if (this.get('visibility') === 'hidden' || !this.shape) {
  20610. return;
  20611. }
  20612. doc.save();
  20613. this.transform();
  20614. this.clip();
  20615. if (!isClip) {
  20616. var masked = this.mask(),
  20617. group;
  20618. if (masked) {
  20619. group = docBeginGroup(getPageBBox());
  20620. }
  20621. var subPaths = this.shape.getSubPaths(),
  20622. fill = this.getFill(isClip, isMask),
  20623. stroke = this.getStroke(isClip, isMask),
  20624. lineWidth = this.get('stroke-width'),
  20625. lineCap = this.get('stroke-linecap');
  20626. if (fill || stroke) {
  20627. if (fill) {
  20628. docFillColor(fill);
  20629. }
  20630. if (stroke) {
  20631. for (var j = 0; j < subPaths.length; j++) {
  20632. if (isEqual(subPaths[j].totalLength, 0)) {
  20633. if ((lineCap === 'square' || lineCap === 'round') && lineWidth > 0) {
  20634. if (subPaths[j].startPoint && subPaths[j].startPoint.length > 1) {
  20635. var _x4 = subPaths[j].startPoint[0],
  20636. _y4 = subPaths[j].startPoint[1];
  20637. docFillColor(stroke);
  20638. if (lineCap === 'square') {
  20639. doc.rect(_x4 - 0.5 * lineWidth, _y4 - 0.5 * lineWidth, lineWidth, lineWidth);
  20640. } else if (lineCap === 'round') {
  20641. doc.circle(_x4, _y4, 0.5 * lineWidth);
  20642. }
  20643. doc.fill();
  20644. }
  20645. }
  20646. }
  20647. }
  20648. var dashArray = this.get('stroke-dasharray'),
  20649. dashOffset = this.get('stroke-dashoffset');
  20650. if (isNotEqual(this.dashScale, 1)) {
  20651. for (var _j2 = 0; _j2 < dashArray.length; _j2++) {
  20652. dashArray[_j2] *= this.dashScale;
  20653. }
  20654. dashOffset *= this.dashScale;
  20655. }
  20656. docStrokeColor(stroke);
  20657. doc.lineWidth(lineWidth).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(lineCap).dash(dashArray, {
  20658. phase: dashOffset
  20659. });
  20660. }
  20661. for (var _j3 = 0; _j3 < subPaths.length; _j3++) {
  20662. if (subPaths[_j3].totalLength > 0) {
  20663. subPaths[_j3].insertInDocument();
  20664. }
  20665. }
  20666. if (fill && stroke) {
  20667. doc.fillAndStroke(this.get('fill-rule'));
  20668. } else if (fill) {
  20669. doc.fill(this.get('fill-rule'));
  20670. } else if (stroke) {
  20671. doc.stroke();
  20672. }
  20673. }
  20674. var markerStart = this.get('marker-start'),
  20675. markerMid = this.get('marker-mid'),
  20676. markerEnd = this.get('marker-end');
  20677. if (markerStart !== 'none' || markerMid !== 'none' || markerEnd !== 'none') {
  20678. var markersPos = this.shape.getMarkers();
  20679. if (markerStart !== 'none') {
  20680. var marker = new SvgElemMarker(markerStart, null);
  20681. marker.drawMarker(false, isMask, markersPos[0], lineWidth);
  20682. }
  20683. if (markerMid !== 'none') {
  20684. for (var i = 1; i < markersPos.length - 1; i++) {
  20685. var _marker = new SvgElemMarker(markerMid, null);
  20686. _marker.drawMarker(false, isMask, markersPos[i], lineWidth);
  20687. }
  20688. }
  20689. if (markerEnd !== 'none') {
  20690. var _marker2 = new SvgElemMarker(markerEnd, null);
  20691. _marker2.drawMarker(false, isMask, markersPos[markersPos.length - 1], lineWidth);
  20692. }
  20693. }
  20694. if (group) {
  20695. docEndGroup(group);
  20696. docInsertGroup(group);
  20697. }
  20698. } else {
  20699. this.shape.insertInDocument();
  20700. docFillColor(DefaultColors.white);
  20701. doc.fill(this.get('clip-rule'));
  20702. }
  20703. doc.restore();
  20704. };
  20705. };
  20706. var SvgElemRect = function SvgElemRect(obj, inherits) {
  20707. SvgElemBasicShape.call(this, obj, inherits);
  20708. var x = this.getLength('x', this.getVWidth(), 0),
  20709. y = this.getLength('y', this.getVHeight(), 0),
  20710. w = this.getLength('width', this.getVWidth(), 0),
  20711. h = this.getLength('height', this.getVHeight(), 0),
  20712. rx = this.getLength('rx', this.getVWidth()),
  20713. ry = this.getLength('ry', this.getVHeight());
  20714. if (rx === undefined && ry === undefined) {
  20715. rx = ry = 0;
  20716. } else if (rx === undefined && ry !== undefined) {
  20717. rx = ry;
  20718. } else if (rx !== undefined && ry === undefined) {
  20719. ry = rx;
  20720. }
  20721. if (w > 0 && h > 0) {
  20722. if (rx && ry) {
  20723. rx = Math.min(rx, 0.5 * w);
  20724. ry = Math.min(ry, 0.5 * h);
  20725. this.shape = new SvgShape().M(x + rx, y).L(x + w - rx, y).A(rx, ry, 0, 0, 1, x + w, y + ry).L(x + w, y + h - ry).A(rx, ry, 0, 0, 1, x + w - rx, y + h).L(x + rx, y + h).A(rx, ry, 0, 0, 1, x, y + h - ry).L(x, y + ry).A(rx, ry, 0, 0, 1, x + rx, y).Z();
  20726. } else {
  20727. this.shape = new SvgShape().M(x, y).L(x + w, y).L(x + w, y + h).L(x, y + h).Z();
  20728. }
  20729. } else {
  20730. this.shape = new SvgShape();
  20731. }
  20732. };
  20733. var SvgElemCircle = function SvgElemCircle(obj, inherits) {
  20734. SvgElemBasicShape.call(this, obj, inherits);
  20735. var cx = this.getLength('cx', this.getVWidth(), 0),
  20736. cy = this.getLength('cy', this.getVHeight(), 0),
  20737. r = this.getLength('r', this.getViewport(), 0);
  20738. if (r > 0) {
  20739. this.shape = new SvgShape().M(cx + r, cy).A(r, r, 0, 0, 1, cx - r, cy).A(r, r, 0, 0, 1, cx + r, cy).Z();
  20740. } else {
  20741. this.shape = new SvgShape();
  20742. }
  20743. };
  20744. var SvgElemEllipse = function SvgElemEllipse(obj, inherits) {
  20745. SvgElemBasicShape.call(this, obj, inherits);
  20746. var cx = this.getLength('cx', this.getVWidth(), 0),
  20747. cy = this.getLength('cy', this.getVHeight(), 0),
  20748. rx = this.getLength('rx', this.getVWidth(), 0),
  20749. ry = this.getLength('ry', this.getVHeight(), 0);
  20750. if (rx > 0 && ry > 0) {
  20751. this.shape = new SvgShape().M(cx + rx, cy).A(rx, ry, 0, 0, 1, cx - rx, cy).A(rx, ry, 0, 0, 1, cx + rx, cy).Z();
  20752. } else {
  20753. this.shape = new SvgShape();
  20754. }
  20755. };
  20756. var SvgElemLine = function SvgElemLine(obj, inherits) {
  20757. SvgElemBasicShape.call(this, obj, inherits);
  20758. var x1 = this.getLength('x1', this.getVWidth(), 0),
  20759. y1 = this.getLength('y1', this.getVHeight(), 0),
  20760. x2 = this.getLength('x2', this.getVWidth(), 0),
  20761. y2 = this.getLength('y2', this.getVHeight(), 0);
  20762. this.shape = new SvgShape().M(x1, y1).L(x2, y2);
  20763. };
  20764. var SvgElemPolyline = function SvgElemPolyline(obj, inherits) {
  20765. SvgElemBasicShape.call(this, obj, inherits);
  20766. var points = this.getNumberList('points');
  20767. this.shape = new SvgShape();
  20768. for (var i = 0; i < points.length - 1; i += 2) {
  20769. if (i === 0) {
  20770. this.shape.M(points[i], points[i + 1]);
  20771. } else {
  20772. this.shape.L(points[i], points[i + 1]);
  20773. }
  20774. }
  20775. if (points.error) {
  20776. warningCallback('SvgElemPolygon: unexpected string ' + points.error);
  20777. }
  20778. if (points.length % 2 === 1) {
  20779. warningCallback('SvgElemPolyline: uneven number of coordinates');
  20780. }
  20781. };
  20782. var SvgElemPolygon = function SvgElemPolygon(obj, inherits) {
  20783. SvgElemBasicShape.call(this, obj, inherits);
  20784. var points = this.getNumberList('points');
  20785. this.shape = new SvgShape();
  20786. for (var i = 0; i < points.length - 1; i += 2) {
  20787. if (i === 0) {
  20788. this.shape.M(points[i], points[i + 1]);
  20789. } else {
  20790. this.shape.L(points[i], points[i + 1]);
  20791. }
  20792. }
  20793. this.shape.Z();
  20794. if (points.error) {
  20795. warningCallback('SvgElemPolygon: unexpected string ' + points.error);
  20796. }
  20797. if (points.length % 2 === 1) {
  20798. warningCallback('SvgElemPolygon: uneven number of coordinates');
  20799. }
  20800. };
  20801. var SvgElemPath = function SvgElemPath(obj, inherits) {
  20802. SvgElemBasicShape.call(this, obj, inherits);
  20803. this.shape = new SvgShape().path(this.attr('d'));
  20804. var pathLength = this.getLength('pathLength', this.getViewport());
  20805. this.pathLength = pathLength > 0 ? pathLength : undefined;
  20806. this.dashScale = this.pathLength !== undefined ? this.shape.totalLength / this.pathLength : 1;
  20807. };
  20808. var SvgElemMarker = function SvgElemMarker(obj, inherits) {
  20809. SvgElemHasChildren.call(this, obj, inherits);
  20810. var width = this.getLength('markerWidth', this.getParentVWidth(), 3),
  20811. height = this.getLength('markerHeight', this.getParentVHeight(), 3),
  20812. viewBox = this.getViewbox('viewBox', [0, 0, width, height]);
  20813. this.getVWidth = function () {
  20814. return viewBox[2];
  20815. };
  20816. this.getVHeight = function () {
  20817. return viewBox[3];
  20818. };
  20819. this.drawMarker = function (isClip, isMask, posArray, strokeWidth) {
  20820. doc.save();
  20821. var orient = this.attr('orient'),
  20822. units = this.attr('markerUnits'),
  20823. rotate = orient === 'auto' ? posArray[2] : (parseFloat(orient) || 0) * Math.PI / 180,
  20824. scale = units === 'userSpaceOnUse' ? 1 : strokeWidth;
  20825. doc.transform(Math.cos(rotate) * scale, Math.sin(rotate) * scale, -Math.sin(rotate) * scale, Math.cos(rotate) * scale, posArray[0], posArray[1]);
  20826. var refX = this.getLength('refX', this.getVWidth(), 0),
  20827. refY = this.getLength('refY', this.getVHeight(), 0),
  20828. aspectRatioMatrix = parseAspectRatio(this.attr('preserveAspectRatio'), width, height, viewBox[2], viewBox[3], 0.5);
  20829. if (this.get('overflow') === 'hidden') {
  20830. doc.rect(aspectRatioMatrix[0] * (viewBox[0] + viewBox[2] / 2 - refX) - width / 2, aspectRatioMatrix[3] * (viewBox[1] + viewBox[3] / 2 - refY) - height / 2, width, height).clip();
  20831. }
  20832. doc.transform.apply(doc, aspectRatioMatrix);
  20833. doc.translate(-refX, -refY);
  20834. var group;
  20835. if (this.get('opacity') < 1 && !isClip) {
  20836. group = docBeginGroup(getPageBBox());
  20837. }
  20838. this.drawChildren(isClip, isMask);
  20839. if (group) {
  20840. docEndGroup(group);
  20841. doc.fillOpacity(this.get('opacity'));
  20842. docInsertGroup(group);
  20843. }
  20844. doc.restore();
  20845. };
  20846. };
  20847. var SvgElemClipPath = function SvgElemClipPath(obj, inherits) {
  20848. SvgElemHasChildren.call(this, obj, inherits);
  20849. this.useMask = function (bBox) {
  20850. var group = docBeginGroup(getPageBBox());
  20851. doc.save();
  20852. if (this.attr('clipPathUnits') === 'objectBoundingBox') {
  20853. doc.transform(bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]);
  20854. }
  20855. this.clip();
  20856. this.drawChildren(true, false);
  20857. doc.restore();
  20858. docEndGroup(group);
  20859. docApplyMask(group, true);
  20860. };
  20861. };
  20862. var SvgElemMask = function SvgElemMask(obj, inherits) {
  20863. SvgElemHasChildren.call(this, obj, inherits);
  20864. this.useMask = function (bBox) {
  20865. var group = docBeginGroup(getPageBBox());
  20866. doc.save();
  20867. var x, y, w, h;
  20868. if (this.attr('maskUnits') === 'userSpaceOnUse') {
  20869. x = this.getLength('x', this.getVWidth(), -0.1 * (bBox[2] - bBox[0]) + bBox[0]);
  20870. y = this.getLength('y', this.getVHeight(), -0.1 * (bBox[3] - bBox[1]) + bBox[1]);
  20871. w = this.getLength('width', this.getVWidth(), 1.2 * (bBox[2] - bBox[0]));
  20872. h = this.getLength('height', this.getVHeight(), 1.2 * (bBox[3] - bBox[1]));
  20873. } else {
  20874. x = this.getLength('x', this.getVWidth(), -0.1) * (bBox[2] - bBox[0]) + bBox[0];
  20875. y = this.getLength('y', this.getVHeight(), -0.1) * (bBox[3] - bBox[1]) + bBox[1];
  20876. w = this.getLength('width', this.getVWidth(), 1.2) * (bBox[2] - bBox[0]);
  20877. h = this.getLength('height', this.getVHeight(), 1.2) * (bBox[3] - bBox[1]);
  20878. }
  20879. doc.rect(x, y, w, h).clip();
  20880. if (this.attr('maskContentUnits') === 'objectBoundingBox') {
  20881. doc.transform(bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]);
  20882. }
  20883. this.clip();
  20884. this.drawChildren(false, true);
  20885. doc.restore();
  20886. docEndGroup(group);
  20887. docApplyMask(group, true);
  20888. };
  20889. };
  20890. var SvgElemTextContainer = function SvgElemTextContainer(obj, inherits) {
  20891. SvgElemStylable.call(this, obj, inherits);
  20892. this.allowedChildren = ['tspan', '#text', '#cdata-section', 'a'];
  20893. this.isText = true;
  20894. this.getBoundingShape = function () {
  20895. var shape = new SvgShape();
  20896. for (var i = 0; i < this._pos.length; i++) {
  20897. var pos = this._pos[i];
  20898. if (!pos.hidden) {
  20899. var dx0 = pos.ascent * Math.sin(pos.rotate),
  20900. dy0 = -pos.ascent * Math.cos(pos.rotate),
  20901. dx1 = pos.descent * Math.sin(pos.rotate),
  20902. dy1 = -pos.descent * Math.cos(pos.rotate),
  20903. dx2 = pos.width * Math.cos(pos.rotate),
  20904. dy2 = pos.width * Math.sin(pos.rotate);
  20905. shape.M(pos.x + dx0, pos.y + dy0).L(pos.x + dx0 + dx2, pos.y + dy0 + dy2).M(pos.x + dx1 + dx2, pos.y + dy1 + dy2).L(pos.x + dx1, pos.y + dy1);
  20906. }
  20907. }
  20908. return shape;
  20909. };
  20910. this.drawTextInDocument = function (isClip, isMask) {
  20911. if (this.link && !isClip && !isMask) {
  20912. this.addLink();
  20913. }
  20914. if (this.get('text-decoration') === 'underline') {
  20915. this.decorate(0.05 * this._font.size, -0.075 * this._font.size, isClip, isMask);
  20916. }
  20917. if (this.get('text-decoration') === 'overline') {
  20918. this.decorate(0.05 * this._font.size, getAscent(this._font.font, this._font.size) + 0.075 * this._font.size, isClip, isMask);
  20919. }
  20920. var fill = this.getFill(isClip, isMask),
  20921. stroke = this.getStroke(isClip, isMask),
  20922. strokeWidth = this.get('stroke-width');
  20923. if (this._font.fauxBold) {
  20924. if (!stroke) {
  20925. stroke = fill;
  20926. strokeWidth = this._font.size * 0.03;
  20927. } else {
  20928. strokeWidth += this._font.size * 0.03;
  20929. }
  20930. }
  20931. var children = this.getChildren();
  20932. for (var i = 0; i < children.length; i++) {
  20933. var childElem = children[i];
  20934. switch (childElem.name) {
  20935. case 'tspan':
  20936. case 'textPath':
  20937. case 'a':
  20938. if (childElem.get('display') !== 'none') {
  20939. childElem.drawTextInDocument(isClip, isMask);
  20940. }
  20941. break;
  20942. case '#text':
  20943. case '#cdata-section':
  20944. if (this.get('visibility') === 'hidden') {
  20945. continue;
  20946. }
  20947. if (fill || stroke || isClip) {
  20948. if (fill) {
  20949. docFillColor(fill);
  20950. }
  20951. if (stroke && strokeWidth) {
  20952. docStrokeColor(stroke);
  20953. doc.lineWidth(strokeWidth).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(this.get('stroke-linecap')).dash(this.get('stroke-dasharray'), {
  20954. phase: this.get('stroke-dashoffset')
  20955. });
  20956. }
  20957. docBeginText(this._font.font, this._font.size);
  20958. docSetTextMode(!!fill, !!stroke);
  20959. for (var j = 0, pos = childElem._pos; j < pos.length; j++) {
  20960. if (!pos[j].hidden && isNotEqual(pos[j].width, 0)) {
  20961. var cos = Math.cos(pos[j].rotate),
  20962. sin = Math.sin(pos[j].rotate),
  20963. skew = this._font.fauxItalic ? -0.25 : 0;
  20964. docSetTextMatrix(cos * pos[j].scale, sin * pos[j].scale, cos * skew - sin, sin * skew + cos, pos[j].x, pos[j].y);
  20965. docWriteGlyph(pos[j].glyph);
  20966. }
  20967. }
  20968. docEndText();
  20969. }
  20970. break;
  20971. }
  20972. }
  20973. if (this.get('text-decoration') === 'line-through') {
  20974. this.decorate(0.05 * this._font.size, 0.5 * (getAscent(this._font.font, this._font.size) + getDescent(this._font.font, this._font.size)), isClip, isMask);
  20975. }
  20976. };
  20977. this.decorate = function (lineWidth, linePosition, isClip, isMask) {
  20978. var fill = this.getFill(isClip, isMask),
  20979. stroke = this.getStroke(isClip, isMask);
  20980. if (fill) {
  20981. docFillColor(fill);
  20982. }
  20983. if (stroke) {
  20984. docStrokeColor(stroke);
  20985. doc.lineWidth(this.get('stroke-width')).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(this.get('stroke-linecap')).dash(this.get('stroke-dasharray'), {
  20986. phase: this.get('stroke-dashoffset')
  20987. });
  20988. }
  20989. for (var j = 0, pos = this._pos; j < pos.length; j++) {
  20990. if (!pos[j].hidden && isNotEqual(pos[j].width, 0)) {
  20991. var dx0 = (linePosition + lineWidth / 2) * Math.sin(pos[j].rotate),
  20992. dy0 = -(linePosition + lineWidth / 2) * Math.cos(pos[j].rotate),
  20993. dx1 = (linePosition - lineWidth / 2) * Math.sin(pos[j].rotate),
  20994. dy1 = -(linePosition - lineWidth / 2) * Math.cos(pos[j].rotate),
  20995. dx2 = pos[j].width * Math.cos(pos[j].rotate),
  20996. dy2 = pos[j].width * Math.sin(pos[j].rotate);
  20997. new SvgShape().M(pos[j].x + dx0, pos[j].y + dy0).L(pos[j].x + dx0 + dx2, pos[j].y + dy0 + dy2).L(pos[j].x + dx1 + dx2, pos[j].y + dy1 + dy2).L(pos[j].x + dx1, pos[j].y + dy1).Z().insertInDocument();
  20998. if (fill && stroke) {
  20999. doc.fillAndStroke();
  21000. } else if (fill) {
  21001. doc.fill();
  21002. } else if (stroke) {
  21003. doc.stroke();
  21004. }
  21005. }
  21006. }
  21007. };
  21008. };
  21009. var SvgElemTextNode = function SvgElemTextNode(obj, inherits) {
  21010. this.name = obj.nodeName;
  21011. this.textContent = obj.nodeValue;
  21012. };
  21013. var SvgElemTspan = function SvgElemTspan(obj, inherits) {
  21014. SvgElemTextContainer.call(this, obj, inherits);
  21015. };
  21016. var SvgElemTextPath = function SvgElemTextPath(obj, inherits) {
  21017. SvgElemTextContainer.call(this, obj, inherits);
  21018. var pathObject, pathLength, temp;
  21019. if ((temp = this.attr('path')) && temp.trim() !== '') {
  21020. var _pathLength = this.getLength('pathLength', this.getViewport());
  21021. this.pathObject = new SvgShape().path(temp);
  21022. this.pathLength = _pathLength > 0 ? _pathLength : this.pathObject.totalLength;
  21023. this.pathScale = this.pathObject.totalLength / this.pathLength;
  21024. } else if ((temp = this.getUrl('href') || this.getUrl('xlink:href')) && temp.nodeName === 'path') {
  21025. var pathElem = new SvgElemPath(temp, this);
  21026. this.pathObject = pathElem.shape.clone().transform(pathElem.get('transform'));
  21027. this.pathLength = this.chooseValue(pathElem.pathLength, this.pathObject.totalLength);
  21028. this.pathScale = this.pathObject.totalLength / this.pathLength;
  21029. }
  21030. };
  21031. var SvgElemText = function SvgElemText(obj, inherits) {
  21032. SvgElemTextContainer.call(this, obj, inherits);
  21033. this.allowedChildren = ['textPath', 'tspan', '#text', '#cdata-section', 'a'];
  21034. (function (textParentElem) {
  21035. var processedText = '',
  21036. remainingText = obj.textContent,
  21037. textPaths = [],
  21038. currentChunk = [],
  21039. currentAnchor,
  21040. currentDirection,
  21041. currentX = 0,
  21042. currentY = 0;
  21043. function doAnchoring() {
  21044. if (currentChunk.length) {
  21045. var last = currentChunk[currentChunk.length - 1];
  21046. var first = currentChunk[0];
  21047. var width = last.x + last.width - first.x;
  21048. var anchordx = {
  21049. 'startltr': 0,
  21050. 'middleltr': 0.5,
  21051. 'endltr': 1,
  21052. 'startrtl': 1,
  21053. 'middlertl': 0.5,
  21054. 'endrtl': 0
  21055. }[currentAnchor + currentDirection] * width || 0;
  21056. for (var i = 0; i < currentChunk.length; i++) {
  21057. currentChunk[i].x -= anchordx;
  21058. }
  21059. }
  21060. currentChunk = [];
  21061. }
  21062. function adjustLength(pos, length, spacingAndGlyphs) {
  21063. var firstChar = pos[0],
  21064. lastChar = pos[pos.length - 1],
  21065. startX = firstChar.x,
  21066. endX = lastChar.x + lastChar.width;
  21067. if (spacingAndGlyphs) {
  21068. var textScale = length / (endX - startX);
  21069. if (textScale > 0 && textScale < Infinity) {
  21070. for (var j = 0; j < pos.length; j++) {
  21071. pos[j].x = startX + textScale * (pos[j].x - startX);
  21072. pos[j].scale *= textScale;
  21073. pos[j].width *= textScale;
  21074. }
  21075. }
  21076. } else {
  21077. if (pos.length >= 2) {
  21078. var spaceDiff = (length - (endX - startX)) / (pos.length - 1);
  21079. for (var _j4 = 0; _j4 < pos.length; _j4++) {
  21080. pos[_j4].x += _j4 * spaceDiff;
  21081. }
  21082. }
  21083. }
  21084. currentX += length - (endX - startX);
  21085. }
  21086. function recursive(currentElem, parentElem) {
  21087. currentElem._x = combineArrays(currentElem.getLengthList('x', currentElem.getVWidth()), parentElem ? parentElem._x.slice(parentElem._pos.length) : []);
  21088. currentElem._y = combineArrays(currentElem.getLengthList('y', currentElem.getVHeight()), parentElem ? parentElem._y.slice(parentElem._pos.length) : []);
  21089. currentElem._dx = combineArrays(currentElem.getLengthList('dx', currentElem.getVWidth()), parentElem ? parentElem._dx.slice(parentElem._pos.length) : []);
  21090. currentElem._dy = combineArrays(currentElem.getLengthList('dy', currentElem.getVHeight()), parentElem ? parentElem._dy.slice(parentElem._pos.length) : []);
  21091. currentElem._rot = combineArrays(currentElem.getNumberList('rotate'), parentElem ? parentElem._rot.slice(parentElem._pos.length) : []);
  21092. currentElem._defRot = currentElem.chooseValue(currentElem._rot[currentElem._rot.length - 1], parentElem && parentElem._defRot, 0);
  21093. if (currentElem.name === 'textPath') {
  21094. currentElem._y = [];
  21095. }
  21096. var fontOptions = {
  21097. fauxItalic: false,
  21098. fauxBold: false
  21099. },
  21100. fontNameorLink = fontCallback(currentElem.get('font-family'), currentElem.get('font-weight') === 'bold', currentElem.get('font-style') === 'italic', fontOptions);
  21101. try {
  21102. doc.font(fontNameorLink);
  21103. } catch (e) {
  21104. warningCallback('SVGElemText: failed to open font "' + fontNameorLink + '" in PDFKit');
  21105. }
  21106. currentElem._pos = [];
  21107. currentElem._index = 0;
  21108. currentElem._font = {
  21109. font: doc._font,
  21110. size: currentElem.get('font-size'),
  21111. fauxItalic: fontOptions.fauxItalic,
  21112. fauxBold: fontOptions.fauxBold
  21113. };
  21114. var textLength = currentElem.getLength('textLength', currentElem.getVWidth(), undefined),
  21115. spacingAndGlyphs = currentElem.attr('lengthAdjust') === 'spacingAndGlyphs',
  21116. wordSpacing = currentElem.get('word-spacing'),
  21117. letterSpacing = currentElem.get('letter-spacing'),
  21118. textAnchor = currentElem.get('text-anchor'),
  21119. textDirection = currentElem.get('direction'),
  21120. baseline = getBaseline(currentElem._font.font, currentElem._font.size, currentElem.get('alignment-baseline') || currentElem.get('dominant-baseline'), currentElem.get('baseline-shift'));
  21121. if (currentElem.name === 'textPath') {
  21122. doAnchoring();
  21123. currentX = currentY = 0;
  21124. }
  21125. var children = currentElem.getChildren();
  21126. for (var i = 0; i < children.length; i++) {
  21127. var childElem = children[i];
  21128. switch (childElem.name) {
  21129. case 'tspan':
  21130. case 'textPath':
  21131. case 'a':
  21132. recursive(childElem, currentElem);
  21133. break;
  21134. case '#text':
  21135. case '#cdata-section':
  21136. var rawText = childElem.textContent,
  21137. renderedText = rawText,
  21138. words = void 0;
  21139. childElem._font = currentElem._font;
  21140. childElem._pos = [];
  21141. remainingText = remainingText.substring(rawText.length);
  21142. if (currentElem.get('xml:space') === 'preserve') {
  21143. renderedText = renderedText.replace(/[\s]/g, ' ');
  21144. } else {
  21145. renderedText = renderedText.replace(/[\s]+/g, ' ');
  21146. if (processedText.match(/[\s]$|^$/)) {
  21147. renderedText = renderedText.replace(/^[\s]/, '');
  21148. }
  21149. if (remainingText.match(/^[\s]*$/)) {
  21150. renderedText = renderedText.replace(/[\s]$/, '');
  21151. }
  21152. }
  21153. processedText += rawText;
  21154. if (wordSpacing === 0) {
  21155. words = [renderedText];
  21156. } else {
  21157. words = renderedText.split(/(\s)/);
  21158. }
  21159. for (var w = 0; w < words.length; w++) {
  21160. var pos = getTextPos(currentElem._font.font, currentElem._font.size, words[w]);
  21161. for (var j = 0; j < pos.length; j++) {
  21162. var index = currentElem._index,
  21163. xAttr = currentElem._x[index],
  21164. yAttr = currentElem._y[index],
  21165. dxAttr = currentElem._dx[index],
  21166. dyAttr = currentElem._dy[index],
  21167. rotAttr = currentElem._rot[index],
  21168. continuous = !(w === 0 && j === 0);
  21169. if (xAttr !== undefined) {
  21170. continuous = false;
  21171. doAnchoring();
  21172. currentX = xAttr;
  21173. }
  21174. if (yAttr !== undefined) {
  21175. continuous = false;
  21176. doAnchoring();
  21177. currentY = yAttr;
  21178. }
  21179. if (dxAttr !== undefined) {
  21180. continuous = false;
  21181. currentX += dxAttr;
  21182. }
  21183. if (dyAttr !== undefined) {
  21184. continuous = false;
  21185. currentY += dyAttr;
  21186. }
  21187. if (rotAttr !== undefined || currentElem._defRot !== 0) {
  21188. continuous = false;
  21189. }
  21190. var position = {
  21191. glyph: pos[j].glyph,
  21192. rotate: Math.PI / 180 * currentElem.chooseValue(rotAttr, currentElem._defRot),
  21193. x: currentX + pos[j].xOffset,
  21194. y: currentY + baseline + pos[j].yOffset,
  21195. width: pos[j].width,
  21196. ascent: getAscent(currentElem._font.font, currentElem._font.size),
  21197. descent: getDescent(currentElem._font.font, currentElem._font.size),
  21198. scale: 1,
  21199. hidden: false,
  21200. continuous: continuous
  21201. };
  21202. currentChunk.push(position);
  21203. childElem._pos.push(position);
  21204. currentElem._pos.push(position);
  21205. currentElem._index += pos[j].unicode.length;
  21206. if (currentChunk.length === 1) {
  21207. currentAnchor = textAnchor;
  21208. currentDirection = textDirection;
  21209. }
  21210. currentX += pos[j].xAdvance + letterSpacing;
  21211. currentY += pos[j].yAdvance;
  21212. }
  21213. if (words[w] === ' ') {
  21214. currentX += wordSpacing;
  21215. }
  21216. }
  21217. break;
  21218. default:
  21219. remainingText = remainingText.substring(childElem.textContent.length);
  21220. }
  21221. }
  21222. if (textLength && currentElem._pos.length) {
  21223. adjustLength(currentElem._pos, textLength, spacingAndGlyphs);
  21224. }
  21225. if (currentElem.name === 'textPath' || currentElem.name === 'text') {
  21226. doAnchoring();
  21227. }
  21228. if (currentElem.name === 'textPath') {
  21229. textPaths.push(currentElem);
  21230. var pathObject = currentElem.pathObject;
  21231. if (pathObject) {
  21232. currentX = pathObject.endPoint[0];
  21233. currentY = pathObject.endPoint[1];
  21234. }
  21235. }
  21236. if (parentElem) {
  21237. parentElem._pos = parentElem._pos.concat(currentElem._pos);
  21238. parentElem._index += currentElem._index;
  21239. }
  21240. }
  21241. function textOnPath(currentElem) {
  21242. var pathObject = currentElem.pathObject,
  21243. pathLength = currentElem.pathLength,
  21244. pathScale = currentElem.pathScale;
  21245. if (pathObject) {
  21246. var textOffset = currentElem.getLength('startOffset', pathLength, 0);
  21247. for (var j = 0; j < currentElem._pos.length; j++) {
  21248. var charMidX = textOffset + currentElem._pos[j].x + 0.5 * currentElem._pos[j].width;
  21249. if (charMidX > pathLength || charMidX < 0) {
  21250. currentElem._pos[j].hidden = true;
  21251. } else {
  21252. var pointOnPath = pathObject.getPointAtLength(charMidX * pathScale);
  21253. if (isNotEqual(pathScale, 1)) {
  21254. currentElem._pos[j].scale *= pathScale;
  21255. currentElem._pos[j].width *= pathScale;
  21256. }
  21257. currentElem._pos[j].x = pointOnPath[0] - 0.5 * currentElem._pos[j].width * Math.cos(pointOnPath[2]) - currentElem._pos[j].y * Math.sin(pointOnPath[2]);
  21258. currentElem._pos[j].y = pointOnPath[1] - 0.5 * currentElem._pos[j].width * Math.sin(pointOnPath[2]) + currentElem._pos[j].y * Math.cos(pointOnPath[2]);
  21259. currentElem._pos[j].rotate = pointOnPath[2] + currentElem._pos[j].rotate;
  21260. currentElem._pos[j].continuous = false;
  21261. }
  21262. }
  21263. } else {
  21264. for (var _j5 = 0; _j5 < currentElem._pos.length; _j5++) {
  21265. currentElem._pos[_j5].hidden = true;
  21266. }
  21267. }
  21268. }
  21269. recursive(textParentElem, null);
  21270. for (var i = 0; i < textPaths.length; i++) {
  21271. textOnPath(textPaths[i]);
  21272. }
  21273. })(this);
  21274. this.getTransformation = function () {
  21275. return this.get('transform');
  21276. };
  21277. this.drawInDocument = function (isClip, isMask) {
  21278. doc.save();
  21279. this.transform();
  21280. this.clip();
  21281. var masked = this.mask(),
  21282. group;
  21283. if (masked) {
  21284. group = docBeginGroup(getPageBBox());
  21285. }
  21286. this.drawTextInDocument(isClip, isMask);
  21287. if (group) {
  21288. docEndGroup(group);
  21289. docInsertGroup(group);
  21290. }
  21291. doc.restore();
  21292. };
  21293. };
  21294. options = options || {};
  21295. var pxToPt = options.assumePt ? 1 : 72 / 96,
  21296. // 1px = 72/96pt, but only if assumePt is false
  21297. viewportWidth = (options.width || doc.page.width) / pxToPt,
  21298. viewportHeight = (options.height || doc.page.height) / pxToPt,
  21299. preserveAspectRatio = options.preserveAspectRatio || null,
  21300. // default to null so that the attr can override if not passed
  21301. useCSS = options.useCSS && typeof SVGElement !== 'undefined' && svg instanceof SVGElement && typeof getComputedStyle === 'function',
  21302. warningCallback = options.warningCallback,
  21303. fontCallback = options.fontCallback,
  21304. imageCallback = options.imageCallback,
  21305. colorCallback = options.colorCallback,
  21306. documentCallback = options.documentCallback,
  21307. precision = Math.ceil(Math.max(1, options.precision)) || 3,
  21308. groupStack = [],
  21309. documentCache = {},
  21310. links = [],
  21311. styleRules = [];
  21312. if (typeof warningCallback !== 'function') {
  21313. warningCallback = function warningCallback(str) {
  21314. if (typeof console !== undefined && typeof console.warn === 'function') {
  21315. console.warn(str);
  21316. }
  21317. };
  21318. }
  21319. if (typeof fontCallback !== 'function') {
  21320. fontCallback = function fontCallback(family, bold, italic, fontOptions) {
  21321. // Check if the font is already registered in the document
  21322. if (bold && italic) {
  21323. if (doc._registeredFonts.hasOwnProperty(family + '-BoldItalic')) {
  21324. return family + '-BoldItalic';
  21325. } else if (doc._registeredFonts.hasOwnProperty(family + '-Italic')) {
  21326. fontOptions.fauxBold = true;
  21327. return family + '-Italic';
  21328. } else if (doc._registeredFonts.hasOwnProperty(family + '-Bold')) {
  21329. fontOptions.fauxItalic = true;
  21330. return family + '-Bold';
  21331. } else if (doc._registeredFonts.hasOwnProperty(family)) {
  21332. fontOptions.fauxBold = true;
  21333. fontOptions.fauxItalic = true;
  21334. return family;
  21335. }
  21336. }
  21337. if (bold && !italic) {
  21338. if (doc._registeredFonts.hasOwnProperty(family + '-Bold')) {
  21339. return family + '-Bold';
  21340. } else if (doc._registeredFonts.hasOwnProperty(family)) {
  21341. fontOptions.fauxBold = true;
  21342. return family;
  21343. }
  21344. }
  21345. if (!bold && italic) {
  21346. if (doc._registeredFonts.hasOwnProperty(family + '-Italic')) {
  21347. return family + '-Italic';
  21348. } else if (doc._registeredFonts.hasOwnProperty(family)) {
  21349. fontOptions.fauxItalic = true;
  21350. return family;
  21351. }
  21352. }
  21353. if (!bold && !italic) {
  21354. if (doc._registeredFonts.hasOwnProperty(family)) {
  21355. return family;
  21356. }
  21357. } // Use standard fonts as fallback
  21358. if (family.match(/(?:^|,)\s*serif\s*$/)) {
  21359. if (bold && italic) {
  21360. return 'Times-BoldItalic';
  21361. }
  21362. if (bold && !italic) {
  21363. return 'Times-Bold';
  21364. }
  21365. if (!bold && italic) {
  21366. return 'Times-Italic';
  21367. }
  21368. if (!bold && !italic) {
  21369. return 'Times-Roman';
  21370. }
  21371. } else if (family.match(/(?:^|,)\s*monospace\s*$/)) {
  21372. if (bold && italic) {
  21373. return 'Courier-BoldOblique';
  21374. }
  21375. if (bold && !italic) {
  21376. return 'Courier-Bold';
  21377. }
  21378. if (!bold && italic) {
  21379. return 'Courier-Oblique';
  21380. }
  21381. if (!bold && !italic) {
  21382. return 'Courier';
  21383. }
  21384. } else if (family.match(/(?:^|,)\s*sans-serif\s*$/) || true) {
  21385. if (bold && italic) {
  21386. return 'Helvetica-BoldOblique';
  21387. }
  21388. if (bold && !italic) {
  21389. return 'Helvetica-Bold';
  21390. }
  21391. if (!bold && italic) {
  21392. return 'Helvetica-Oblique';
  21393. }
  21394. if (!bold && !italic) {
  21395. return 'Helvetica';
  21396. }
  21397. }
  21398. };
  21399. }
  21400. if (typeof imageCallback !== 'function') {
  21401. imageCallback = function imageCallback(link) {
  21402. return link.replace(/\s+/g, '');
  21403. };
  21404. }
  21405. if (typeof colorCallback !== 'function') {
  21406. colorCallback = null;
  21407. } else {
  21408. for (var color in DefaultColors) {
  21409. var newColor = colorCallback(DefaultColors[color]);
  21410. DefaultColors[color][0] = newColor[0];
  21411. DefaultColors[color][1] = newColor[1];
  21412. }
  21413. }
  21414. if (typeof documentCallback !== 'function') {
  21415. documentCallback = null;
  21416. }
  21417. if (typeof svg === 'string') {
  21418. svg = parseXml(svg);
  21419. }
  21420. if (svg) {
  21421. var styles = svg.getElementsByTagName('style');
  21422. for (var i = 0; i < styles.length; i++) {
  21423. styleRules = styleRules.concat(parseStyleSheet(styles[i].textContent));
  21424. }
  21425. var elem = createSVGElement(svg, null);
  21426. if (typeof elem.drawInDocument === 'function') {
  21427. if (options.useCSS && !useCSS) {
  21428. warningCallback('SVGtoPDF: useCSS option can only be used for SVG *elements* in compatible browsers');
  21429. }
  21430. var savedFillColor = doc._fillColor;
  21431. doc.save().translate(x || 0, y || 0).scale(pxToPt);
  21432. elem.drawInDocument();
  21433. for (var _i8 = 0; _i8 < links.length; _i8++) {
  21434. doc.page.annotations.push(links[_i8]);
  21435. }
  21436. doc.restore();
  21437. doc._fillColor = savedFillColor;
  21438. } else {
  21439. warningCallback('SVGtoPDF: this element can\'t be rendered directly: ' + svg.nodeName);
  21440. }
  21441. } else {
  21442. warningCallback('SVGtoPDF: the input does not look like a valid SVG');
  21443. }
  21444. };
  21445. if ( true && module && typeof module.exports !== 'undefined') {
  21446. module.exports = SVGtoPDF;
  21447. }
  21448. /***/ }),
  21449. /***/ 9742:
  21450. /***/ (function(__unused_webpack_module, exports) {
  21451. "use strict";
  21452. exports.byteLength = byteLength
  21453. exports.toByteArray = toByteArray
  21454. exports.fromByteArray = fromByteArray
  21455. var lookup = []
  21456. var revLookup = []
  21457. var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
  21458. var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
  21459. for (var i = 0, len = code.length; i < len; ++i) {
  21460. lookup[i] = code[i]
  21461. revLookup[code.charCodeAt(i)] = i
  21462. }
  21463. // Support decoding URL-safe base64 strings, as Node.js does.
  21464. // See: https://en.wikipedia.org/wiki/Base64#URL_applications
  21465. revLookup['-'.charCodeAt(0)] = 62
  21466. revLookup['_'.charCodeAt(0)] = 63
  21467. function getLens (b64) {
  21468. var len = b64.length
  21469. if (len % 4 > 0) {
  21470. throw new Error('Invalid string. Length must be a multiple of 4')
  21471. }
  21472. // Trim off extra bytes after placeholder bytes are found
  21473. // See: https://github.com/beatgammit/base64-js/issues/42
  21474. var validLen = b64.indexOf('=')
  21475. if (validLen === -1) validLen = len
  21476. var placeHoldersLen = validLen === len
  21477. ? 0
  21478. : 4 - (validLen % 4)
  21479. return [validLen, placeHoldersLen]
  21480. }
  21481. // base64 is 4/3 + up to two characters of the original data
  21482. function byteLength (b64) {
  21483. var lens = getLens(b64)
  21484. var validLen = lens[0]
  21485. var placeHoldersLen = lens[1]
  21486. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  21487. }
  21488. function _byteLength (b64, validLen, placeHoldersLen) {
  21489. return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
  21490. }
  21491. function toByteArray (b64) {
  21492. var tmp
  21493. var lens = getLens(b64)
  21494. var validLen = lens[0]
  21495. var placeHoldersLen = lens[1]
  21496. var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
  21497. var curByte = 0
  21498. // if there are placeholders, only get up to the last complete 4 chars
  21499. var len = placeHoldersLen > 0
  21500. ? validLen - 4
  21501. : validLen
  21502. var i
  21503. for (i = 0; i < len; i += 4) {
  21504. tmp =
  21505. (revLookup[b64.charCodeAt(i)] << 18) |
  21506. (revLookup[b64.charCodeAt(i + 1)] << 12) |
  21507. (revLookup[b64.charCodeAt(i + 2)] << 6) |
  21508. revLookup[b64.charCodeAt(i + 3)]
  21509. arr[curByte++] = (tmp >> 16) & 0xFF
  21510. arr[curByte++] = (tmp >> 8) & 0xFF
  21511. arr[curByte++] = tmp & 0xFF
  21512. }
  21513. if (placeHoldersLen === 2) {
  21514. tmp =
  21515. (revLookup[b64.charCodeAt(i)] << 2) |
  21516. (revLookup[b64.charCodeAt(i + 1)] >> 4)
  21517. arr[curByte++] = tmp & 0xFF
  21518. }
  21519. if (placeHoldersLen === 1) {
  21520. tmp =
  21521. (revLookup[b64.charCodeAt(i)] << 10) |
  21522. (revLookup[b64.charCodeAt(i + 1)] << 4) |
  21523. (revLookup[b64.charCodeAt(i + 2)] >> 2)
  21524. arr[curByte++] = (tmp >> 8) & 0xFF
  21525. arr[curByte++] = tmp & 0xFF
  21526. }
  21527. return arr
  21528. }
  21529. function tripletToBase64 (num) {
  21530. return lookup[num >> 18 & 0x3F] +
  21531. lookup[num >> 12 & 0x3F] +
  21532. lookup[num >> 6 & 0x3F] +
  21533. lookup[num & 0x3F]
  21534. }
  21535. function encodeChunk (uint8, start, end) {
  21536. var tmp
  21537. var output = []
  21538. for (var i = start; i < end; i += 3) {
  21539. tmp =
  21540. ((uint8[i] << 16) & 0xFF0000) +
  21541. ((uint8[i + 1] << 8) & 0xFF00) +
  21542. (uint8[i + 2] & 0xFF)
  21543. output.push(tripletToBase64(tmp))
  21544. }
  21545. return output.join('')
  21546. }
  21547. function fromByteArray (uint8) {
  21548. var tmp
  21549. var len = uint8.length
  21550. var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
  21551. var parts = []
  21552. var maxChunkLength = 16383 // must be multiple of 3
  21553. // go through the array every three bytes, we'll deal with trailing stuff later
  21554. for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
  21555. parts.push(encodeChunk(
  21556. uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)
  21557. ))
  21558. }
  21559. // pad the end with zeros, but make sure to not forget the extra bytes
  21560. if (extraBytes === 1) {
  21561. tmp = uint8[len - 1]
  21562. parts.push(
  21563. lookup[tmp >> 2] +
  21564. lookup[(tmp << 4) & 0x3F] +
  21565. '=='
  21566. )
  21567. } else if (extraBytes === 2) {
  21568. tmp = (uint8[len - 2] << 8) + uint8[len - 1]
  21569. parts.push(
  21570. lookup[tmp >> 10] +
  21571. lookup[(tmp >> 4) & 0x3F] +
  21572. lookup[(tmp << 2) & 0x3F] +
  21573. '='
  21574. )
  21575. }
  21576. return parts.join('')
  21577. }
  21578. /***/ }),
  21579. /***/ 4181:
  21580. /***/ (function(module) {
  21581. /* Copyright 2013 Google Inc. All Rights Reserved.
  21582. Licensed under the Apache License, Version 2.0 (the "License");
  21583. you may not use this file except in compliance with the License.
  21584. You may obtain a copy of the License at
  21585. http://www.apache.org/licenses/LICENSE-2.0
  21586. Unless required by applicable law or agreed to in writing, software
  21587. distributed under the License is distributed on an "AS IS" BASIS,
  21588. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21589. See the License for the specific language governing permissions and
  21590. limitations under the License.
  21591. Bit reading helpers
  21592. */
  21593. var BROTLI_READ_SIZE = 4096;
  21594. var BROTLI_IBUF_SIZE = (2 * BROTLI_READ_SIZE + 32);
  21595. var BROTLI_IBUF_MASK = (2 * BROTLI_READ_SIZE - 1);
  21596. var kBitMask = new Uint32Array([
  21597. 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767,
  21598. 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215
  21599. ]);
  21600. /* Input byte buffer, consist of a ringbuffer and a "slack" region where */
  21601. /* bytes from the start of the ringbuffer are copied. */
  21602. function BrotliBitReader(input) {
  21603. this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE);
  21604. this.input_ = input; /* input callback */
  21605. this.reset();
  21606. }
  21607. BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE;
  21608. BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK;
  21609. BrotliBitReader.prototype.reset = function() {
  21610. this.buf_ptr_ = 0; /* next input will write here */
  21611. this.val_ = 0; /* pre-fetched bits */
  21612. this.pos_ = 0; /* byte position in stream */
  21613. this.bit_pos_ = 0; /* current bit-reading position in val_ */
  21614. this.bit_end_pos_ = 0; /* bit-reading end position from LSB of val_ */
  21615. this.eos_ = 0; /* input stream is finished */
  21616. this.readMoreInput();
  21617. for (var i = 0; i < 4; i++) {
  21618. this.val_ |= this.buf_[this.pos_] << (8 * i);
  21619. ++this.pos_;
  21620. }
  21621. return this.bit_end_pos_ > 0;
  21622. };
  21623. /* Fills up the input ringbuffer by calling the input callback.
  21624. Does nothing if there are at least 32 bytes present after current position.
  21625. Returns 0 if either:
  21626. - the input callback returned an error, or
  21627. - there is no more input and the position is past the end of the stream.
  21628. After encountering the end of the input stream, 32 additional zero bytes are
  21629. copied to the ringbuffer, therefore it is safe to call this function after
  21630. every 32 bytes of input is read.
  21631. */
  21632. BrotliBitReader.prototype.readMoreInput = function() {
  21633. if (this.bit_end_pos_ > 256) {
  21634. return;
  21635. } else if (this.eos_) {
  21636. if (this.bit_pos_ > this.bit_end_pos_)
  21637. throw new Error('Unexpected end of input ' + this.bit_pos_ + ' ' + this.bit_end_pos_);
  21638. } else {
  21639. var dst = this.buf_ptr_;
  21640. var bytes_read = this.input_.read(this.buf_, dst, BROTLI_READ_SIZE);
  21641. if (bytes_read < 0) {
  21642. throw new Error('Unexpected end of input');
  21643. }
  21644. if (bytes_read < BROTLI_READ_SIZE) {
  21645. this.eos_ = 1;
  21646. /* Store 32 bytes of zero after the stream end. */
  21647. for (var p = 0; p < 32; p++)
  21648. this.buf_[dst + bytes_read + p] = 0;
  21649. }
  21650. if (dst === 0) {
  21651. /* Copy the head of the ringbuffer to the slack region. */
  21652. for (var p = 0; p < 32; p++)
  21653. this.buf_[(BROTLI_READ_SIZE << 1) + p] = this.buf_[p];
  21654. this.buf_ptr_ = BROTLI_READ_SIZE;
  21655. } else {
  21656. this.buf_ptr_ = 0;
  21657. }
  21658. this.bit_end_pos_ += bytes_read << 3;
  21659. }
  21660. };
  21661. /* Guarantees that there are at least 24 bits in the buffer. */
  21662. BrotliBitReader.prototype.fillBitWindow = function() {
  21663. while (this.bit_pos_ >= 8) {
  21664. this.val_ >>>= 8;
  21665. this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24;
  21666. ++this.pos_;
  21667. this.bit_pos_ = this.bit_pos_ - 8 >>> 0;
  21668. this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;
  21669. }
  21670. };
  21671. /* Reads the specified number of bits from Read Buffer. */
  21672. BrotliBitReader.prototype.readBits = function(n_bits) {
  21673. if (32 - this.bit_pos_ < n_bits) {
  21674. this.fillBitWindow();
  21675. }
  21676. var val = ((this.val_ >>> this.bit_pos_) & kBitMask[n_bits]);
  21677. this.bit_pos_ += n_bits;
  21678. return val;
  21679. };
  21680. module.exports = BrotliBitReader;
  21681. /***/ }),
  21682. /***/ 7080:
  21683. /***/ (function(__unused_webpack_module, exports) {
  21684. /* Copyright 2013 Google Inc. All Rights Reserved.
  21685. Licensed under the Apache License, Version 2.0 (the "License");
  21686. you may not use this file except in compliance with the License.
  21687. You may obtain a copy of the License at
  21688. http://www.apache.org/licenses/LICENSE-2.0
  21689. Unless required by applicable law or agreed to in writing, software
  21690. distributed under the License is distributed on an "AS IS" BASIS,
  21691. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21692. See the License for the specific language governing permissions and
  21693. limitations under the License.
  21694. Lookup table to map the previous two bytes to a context id.
  21695. There are four different context modeling modes defined here:
  21696. CONTEXT_LSB6: context id is the least significant 6 bits of the last byte,
  21697. CONTEXT_MSB6: context id is the most significant 6 bits of the last byte,
  21698. CONTEXT_UTF8: second-order context model tuned for UTF8-encoded text,
  21699. CONTEXT_SIGNED: second-order context model tuned for signed integers.
  21700. The context id for the UTF8 context model is calculated as follows. If p1
  21701. and p2 are the previous two bytes, we calcualte the context as
  21702. context = kContextLookup[p1] | kContextLookup[p2 + 256].
  21703. If the previous two bytes are ASCII characters (i.e. < 128), this will be
  21704. equivalent to
  21705. context = 4 * context1(p1) + context2(p2),
  21706. where context1 is based on the previous byte in the following way:
  21707. 0 : non-ASCII control
  21708. 1 : \t, \n, \r
  21709. 2 : space
  21710. 3 : other punctuation
  21711. 4 : " '
  21712. 5 : %
  21713. 6 : ( < [ {
  21714. 7 : ) > ] }
  21715. 8 : , ; :
  21716. 9 : .
  21717. 10 : =
  21718. 11 : number
  21719. 12 : upper-case vowel
  21720. 13 : upper-case consonant
  21721. 14 : lower-case vowel
  21722. 15 : lower-case consonant
  21723. and context2 is based on the second last byte:
  21724. 0 : control, space
  21725. 1 : punctuation
  21726. 2 : upper-case letter, number
  21727. 3 : lower-case letter
  21728. If the last byte is ASCII, and the second last byte is not (in a valid UTF8
  21729. stream it will be a continuation byte, value between 128 and 191), the
  21730. context is the same as if the second last byte was an ASCII control or space.
  21731. If the last byte is a UTF8 lead byte (value >= 192), then the next byte will
  21732. be a continuation byte and the context id is 2 or 3 depending on the LSB of
  21733. the last byte and to a lesser extent on the second last byte if it is ASCII.
  21734. If the last byte is a UTF8 continuation byte, the second last byte can be:
  21735. - continuation byte: the next byte is probably ASCII or lead byte (assuming
  21736. 4-byte UTF8 characters are rare) and the context id is 0 or 1.
  21737. - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1
  21738. - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3
  21739. The possible value combinations of the previous two bytes, the range of
  21740. context ids and the type of the next byte is summarized in the table below:
  21741. |--------\-----------------------------------------------------------------|
  21742. | \ Last byte |
  21743. | Second \---------------------------------------------------------------|
  21744. | last byte \ ASCII | cont. byte | lead byte |
  21745. | \ (0-127) | (128-191) | (192-) |
  21746. |=============|===================|=====================|==================|
  21747. | ASCII | next: ASCII/lead | not valid | next: cont. |
  21748. | (0-127) | context: 4 - 63 | | context: 2 - 3 |
  21749. |-------------|-------------------|---------------------|------------------|
  21750. | cont. byte | next: ASCII/lead | next: ASCII/lead | next: cont. |
  21751. | (128-191) | context: 4 - 63 | context: 0 - 1 | context: 2 - 3 |
  21752. |-------------|-------------------|---------------------|------------------|
  21753. | lead byte | not valid | next: ASCII/lead | not valid |
  21754. | (192-207) | | context: 0 - 1 | |
  21755. |-------------|-------------------|---------------------|------------------|
  21756. | lead byte | not valid | next: cont. | not valid |
  21757. | (208-) | | context: 2 - 3 | |
  21758. |-------------|-------------------|---------------------|------------------|
  21759. The context id for the signed context mode is calculated as:
  21760. context = (kContextLookup[512 + p1] << 3) | kContextLookup[512 + p2].
  21761. For any context modeling modes, the context ids can be calculated by |-ing
  21762. together two lookups from one table using context model dependent offsets:
  21763. context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2].
  21764. where offset1 and offset2 are dependent on the context mode.
  21765. */
  21766. var CONTEXT_LSB6 = 0;
  21767. var CONTEXT_MSB6 = 1;
  21768. var CONTEXT_UTF8 = 2;
  21769. var CONTEXT_SIGNED = 3;
  21770. /* Common context lookup table for all context modes. */
  21771. exports.lookup = new Uint8Array([
  21772. /* CONTEXT_UTF8, last byte. */
  21773. /* ASCII range. */
  21774. 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0,
  21775. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21776. 8, 12, 16, 12, 12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12,
  21777. 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12,
  21778. 12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52, 52, 48,
  21779. 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24, 12, 28, 12, 12,
  21780. 12, 56, 60, 60, 60, 56, 60, 60, 60, 56, 60, 60, 60, 60, 60, 56,
  21781. 60, 60, 60, 60, 60, 56, 60, 60, 60, 60, 60, 24, 12, 28, 12, 0,
  21782. /* UTF8 continuation byte range. */
  21783. 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
  21784. 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
  21785. 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
  21786. 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1,
  21787. /* UTF8 lead byte range. */
  21788. 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
  21789. 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
  21790. 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
  21791. 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3, 2, 3,
  21792. /* CONTEXT_UTF8 second last byte. */
  21793. /* ASCII range. */
  21794. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21795. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21796. 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  21797. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1,
  21798. 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  21799. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1,
  21800. 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  21801. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 1, 1, 1, 1, 0,
  21802. /* UTF8 continuation byte range. */
  21803. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21804. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21805. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21806. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21807. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21808. /* UTF8 lead byte range. */
  21809. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21810. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  21811. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  21812. /* CONTEXT_SIGNED, second last byte. */
  21813. 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
  21814. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  21815. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  21816. 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
  21817. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  21818. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  21819. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  21820. 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
  21821. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  21822. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  21823. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  21824. 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
  21825. 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  21826. 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  21827. 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
  21828. 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7,
  21829. /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */
  21830. 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
  21831. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  21832. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  21833. 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16,
  21834. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  21835. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  21836. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  21837. 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
  21838. 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
  21839. 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
  21840. 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
  21841. 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32,
  21842. 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
  21843. 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
  21844. 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40,
  21845. 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56,
  21846. /* CONTEXT_LSB6, last byte. */
  21847. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  21848. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  21849. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  21850. 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  21851. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  21852. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  21853. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  21854. 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  21855. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  21856. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  21857. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  21858. 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  21859. 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  21860. 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
  21861. 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
  21862. 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
  21863. /* CONTEXT_MSB6, last byte. */
  21864. 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3,
  21865. 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7,
  21866. 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11,
  21867. 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15,
  21868. 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19,
  21869. 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23,
  21870. 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27,
  21871. 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31,
  21872. 32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35,
  21873. 36, 36, 36, 36, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39,
  21874. 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43,
  21875. 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47,
  21876. 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 51,
  21877. 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 55, 55, 55, 55,
  21878. 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59,
  21879. 60, 60, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63,
  21880. /* CONTEXT_{M,L}SB6, second last byte, */
  21881. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21882. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21883. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21884. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21885. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21886. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21887. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21888. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21889. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21890. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21891. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21892. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21893. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21894. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21895. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21896. 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
  21897. ]);
  21898. exports.lookupOffsets = new Uint16Array([
  21899. /* CONTEXT_LSB6 */
  21900. 1024, 1536,
  21901. /* CONTEXT_MSB6 */
  21902. 1280, 1536,
  21903. /* CONTEXT_UTF8 */
  21904. 0, 256,
  21905. /* CONTEXT_SIGNED */
  21906. 768, 512,
  21907. ]);
  21908. /***/ }),
  21909. /***/ 6450:
  21910. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  21911. var __webpack_unused_export__;
  21912. /* Copyright 2013 Google Inc. All Rights Reserved.
  21913. Licensed under the Apache License, Version 2.0 (the "License");
  21914. you may not use this file except in compliance with the License.
  21915. You may obtain a copy of the License at
  21916. http://www.apache.org/licenses/LICENSE-2.0
  21917. Unless required by applicable law or agreed to in writing, software
  21918. distributed under the License is distributed on an "AS IS" BASIS,
  21919. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  21920. See the License for the specific language governing permissions and
  21921. limitations under the License.
  21922. */
  21923. var BrotliInput = (__webpack_require__(6154)/* .BrotliInput */ .g);
  21924. var BrotliOutput = (__webpack_require__(6154)/* .BrotliOutput */ .j);
  21925. var BrotliBitReader = __webpack_require__(4181);
  21926. var BrotliDictionary = __webpack_require__(5139);
  21927. var HuffmanCode = (__webpack_require__(966)/* .HuffmanCode */ .h);
  21928. var BrotliBuildHuffmanTable = (__webpack_require__(966)/* .BrotliBuildHuffmanTable */ .g);
  21929. var Context = __webpack_require__(7080);
  21930. var Prefix = __webpack_require__(8435);
  21931. var Transform = __webpack_require__(2973);
  21932. var kDefaultCodeLength = 8;
  21933. var kCodeLengthRepeatCode = 16;
  21934. var kNumLiteralCodes = 256;
  21935. var kNumInsertAndCopyCodes = 704;
  21936. var kNumBlockLengthCodes = 26;
  21937. var kLiteralContextBits = 6;
  21938. var kDistanceContextBits = 2;
  21939. var HUFFMAN_TABLE_BITS = 8;
  21940. var HUFFMAN_TABLE_MASK = 0xff;
  21941. /* Maximum possible Huffman table size for an alphabet size of 704, max code
  21942. * length 15 and root table bits 8. */
  21943. var HUFFMAN_MAX_TABLE_SIZE = 1080;
  21944. var CODE_LENGTH_CODES = 18;
  21945. var kCodeLengthCodeOrder = new Uint8Array([
  21946. 1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15,
  21947. ]);
  21948. var NUM_DISTANCE_SHORT_CODES = 16;
  21949. var kDistanceShortCodeIndexOffset = new Uint8Array([
  21950. 3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2
  21951. ]);
  21952. var kDistanceShortCodeValueOffset = new Int8Array([
  21953. 0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3
  21954. ]);
  21955. var kMaxHuffmanTableSize = new Uint16Array([
  21956. 256, 402, 436, 468, 500, 534, 566, 598, 630, 662, 694, 726, 758, 790, 822,
  21957. 854, 886, 920, 952, 984, 1016, 1048, 1080
  21958. ]);
  21959. function DecodeWindowBits(br) {
  21960. var n;
  21961. if (br.readBits(1) === 0) {
  21962. return 16;
  21963. }
  21964. n = br.readBits(3);
  21965. if (n > 0) {
  21966. return 17 + n;
  21967. }
  21968. n = br.readBits(3);
  21969. if (n > 0) {
  21970. return 8 + n;
  21971. }
  21972. return 17;
  21973. }
  21974. /* Decodes a number in the range [0..255], by reading 1 - 11 bits. */
  21975. function DecodeVarLenUint8(br) {
  21976. if (br.readBits(1)) {
  21977. var nbits = br.readBits(3);
  21978. if (nbits === 0) {
  21979. return 1;
  21980. } else {
  21981. return br.readBits(nbits) + (1 << nbits);
  21982. }
  21983. }
  21984. return 0;
  21985. }
  21986. function MetaBlockLength() {
  21987. this.meta_block_length = 0;
  21988. this.input_end = 0;
  21989. this.is_uncompressed = 0;
  21990. this.is_metadata = false;
  21991. }
  21992. function DecodeMetaBlockLength(br) {
  21993. var out = new MetaBlockLength;
  21994. var size_nibbles;
  21995. var size_bytes;
  21996. var i;
  21997. out.input_end = br.readBits(1);
  21998. if (out.input_end && br.readBits(1)) {
  21999. return out;
  22000. }
  22001. size_nibbles = br.readBits(2) + 4;
  22002. if (size_nibbles === 7) {
  22003. out.is_metadata = true;
  22004. if (br.readBits(1) !== 0)
  22005. throw new Error('Invalid reserved bit');
  22006. size_bytes = br.readBits(2);
  22007. if (size_bytes === 0)
  22008. return out;
  22009. for (i = 0; i < size_bytes; i++) {
  22010. var next_byte = br.readBits(8);
  22011. if (i + 1 === size_bytes && size_bytes > 1 && next_byte === 0)
  22012. throw new Error('Invalid size byte');
  22013. out.meta_block_length |= next_byte << (i * 8);
  22014. }
  22015. } else {
  22016. for (i = 0; i < size_nibbles; ++i) {
  22017. var next_nibble = br.readBits(4);
  22018. if (i + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0)
  22019. throw new Error('Invalid size nibble');
  22020. out.meta_block_length |= next_nibble << (i * 4);
  22021. }
  22022. }
  22023. ++out.meta_block_length;
  22024. if (!out.input_end && !out.is_metadata) {
  22025. out.is_uncompressed = br.readBits(1);
  22026. }
  22027. return out;
  22028. }
  22029. /* Decodes the next Huffman code from bit-stream. */
  22030. function ReadSymbol(table, index, br) {
  22031. var start_index = index;
  22032. var nbits;
  22033. br.fillBitWindow();
  22034. index += (br.val_ >>> br.bit_pos_) & HUFFMAN_TABLE_MASK;
  22035. nbits = table[index].bits - HUFFMAN_TABLE_BITS;
  22036. if (nbits > 0) {
  22037. br.bit_pos_ += HUFFMAN_TABLE_BITS;
  22038. index += table[index].value;
  22039. index += (br.val_ >>> br.bit_pos_) & ((1 << nbits) - 1);
  22040. }
  22041. br.bit_pos_ += table[index].bits;
  22042. return table[index].value;
  22043. }
  22044. function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) {
  22045. var symbol = 0;
  22046. var prev_code_len = kDefaultCodeLength;
  22047. var repeat = 0;
  22048. var repeat_code_len = 0;
  22049. var space = 32768;
  22050. var table = [];
  22051. for (var i = 0; i < 32; i++)
  22052. table.push(new HuffmanCode(0, 0));
  22053. BrotliBuildHuffmanTable(table, 0, 5, code_length_code_lengths, CODE_LENGTH_CODES);
  22054. while (symbol < num_symbols && space > 0) {
  22055. var p = 0;
  22056. var code_len;
  22057. br.readMoreInput();
  22058. br.fillBitWindow();
  22059. p += (br.val_ >>> br.bit_pos_) & 31;
  22060. br.bit_pos_ += table[p].bits;
  22061. code_len = table[p].value & 0xff;
  22062. if (code_len < kCodeLengthRepeatCode) {
  22063. repeat = 0;
  22064. code_lengths[symbol++] = code_len;
  22065. if (code_len !== 0) {
  22066. prev_code_len = code_len;
  22067. space -= 32768 >> code_len;
  22068. }
  22069. } else {
  22070. var extra_bits = code_len - 14;
  22071. var old_repeat;
  22072. var repeat_delta;
  22073. var new_len = 0;
  22074. if (code_len === kCodeLengthRepeatCode) {
  22075. new_len = prev_code_len;
  22076. }
  22077. if (repeat_code_len !== new_len) {
  22078. repeat = 0;
  22079. repeat_code_len = new_len;
  22080. }
  22081. old_repeat = repeat;
  22082. if (repeat > 0) {
  22083. repeat -= 2;
  22084. repeat <<= extra_bits;
  22085. }
  22086. repeat += br.readBits(extra_bits) + 3;
  22087. repeat_delta = repeat - old_repeat;
  22088. if (symbol + repeat_delta > num_symbols) {
  22089. throw new Error('[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols');
  22090. }
  22091. for (var x = 0; x < repeat_delta; x++)
  22092. code_lengths[symbol + x] = repeat_code_len;
  22093. symbol += repeat_delta;
  22094. if (repeat_code_len !== 0) {
  22095. space -= repeat_delta << (15 - repeat_code_len);
  22096. }
  22097. }
  22098. }
  22099. if (space !== 0) {
  22100. throw new Error("[ReadHuffmanCodeLengths] space = " + space);
  22101. }
  22102. for (; symbol < num_symbols; symbol++)
  22103. code_lengths[symbol] = 0;
  22104. }
  22105. function ReadHuffmanCode(alphabet_size, tables, table, br) {
  22106. var table_size = 0;
  22107. var simple_code_or_skip;
  22108. var code_lengths = new Uint8Array(alphabet_size);
  22109. br.readMoreInput();
  22110. /* simple_code_or_skip is used as follows:
  22111. 1 for simple code;
  22112. 0 for no skipping, 2 skips 2 code lengths, 3 skips 3 code lengths */
  22113. simple_code_or_skip = br.readBits(2);
  22114. if (simple_code_or_skip === 1) {
  22115. /* Read symbols, codes & code lengths directly. */
  22116. var i;
  22117. var max_bits_counter = alphabet_size - 1;
  22118. var max_bits = 0;
  22119. var symbols = new Int32Array(4);
  22120. var num_symbols = br.readBits(2) + 1;
  22121. while (max_bits_counter) {
  22122. max_bits_counter >>= 1;
  22123. ++max_bits;
  22124. }
  22125. for (i = 0; i < num_symbols; ++i) {
  22126. symbols[i] = br.readBits(max_bits) % alphabet_size;
  22127. code_lengths[symbols[i]] = 2;
  22128. }
  22129. code_lengths[symbols[0]] = 1;
  22130. switch (num_symbols) {
  22131. case 1:
  22132. break;
  22133. case 3:
  22134. if ((symbols[0] === symbols[1]) ||
  22135. (symbols[0] === symbols[2]) ||
  22136. (symbols[1] === symbols[2])) {
  22137. throw new Error('[ReadHuffmanCode] invalid symbols');
  22138. }
  22139. break;
  22140. case 2:
  22141. if (symbols[0] === symbols[1]) {
  22142. throw new Error('[ReadHuffmanCode] invalid symbols');
  22143. }
  22144. code_lengths[symbols[1]] = 1;
  22145. break;
  22146. case 4:
  22147. if ((symbols[0] === symbols[1]) ||
  22148. (symbols[0] === symbols[2]) ||
  22149. (symbols[0] === symbols[3]) ||
  22150. (symbols[1] === symbols[2]) ||
  22151. (symbols[1] === symbols[3]) ||
  22152. (symbols[2] === symbols[3])) {
  22153. throw new Error('[ReadHuffmanCode] invalid symbols');
  22154. }
  22155. if (br.readBits(1)) {
  22156. code_lengths[symbols[2]] = 3;
  22157. code_lengths[symbols[3]] = 3;
  22158. } else {
  22159. code_lengths[symbols[0]] = 2;
  22160. }
  22161. break;
  22162. }
  22163. } else { /* Decode Huffman-coded code lengths. */
  22164. var i;
  22165. var code_length_code_lengths = new Uint8Array(CODE_LENGTH_CODES);
  22166. var space = 32;
  22167. var num_codes = 0;
  22168. /* Static Huffman code for the code length code lengths */
  22169. var huff = [
  22170. new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2),
  22171. new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 1),
  22172. new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2),
  22173. new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 5)
  22174. ];
  22175. for (i = simple_code_or_skip; i < CODE_LENGTH_CODES && space > 0; ++i) {
  22176. var code_len_idx = kCodeLengthCodeOrder[i];
  22177. var p = 0;
  22178. var v;
  22179. br.fillBitWindow();
  22180. p += (br.val_ >>> br.bit_pos_) & 15;
  22181. br.bit_pos_ += huff[p].bits;
  22182. v = huff[p].value;
  22183. code_length_code_lengths[code_len_idx] = v;
  22184. if (v !== 0) {
  22185. space -= (32 >> v);
  22186. ++num_codes;
  22187. }
  22188. }
  22189. if (!(num_codes === 1 || space === 0))
  22190. throw new Error('[ReadHuffmanCode] invalid num_codes or space');
  22191. ReadHuffmanCodeLengths(code_length_code_lengths, alphabet_size, code_lengths, br);
  22192. }
  22193. table_size = BrotliBuildHuffmanTable(tables, table, HUFFMAN_TABLE_BITS, code_lengths, alphabet_size);
  22194. if (table_size === 0) {
  22195. throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: ");
  22196. }
  22197. return table_size;
  22198. }
  22199. function ReadBlockLength(table, index, br) {
  22200. var code;
  22201. var nbits;
  22202. code = ReadSymbol(table, index, br);
  22203. nbits = Prefix.kBlockLengthPrefixCode[code].nbits;
  22204. return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits);
  22205. }
  22206. function TranslateShortCodes(code, ringbuffer, index) {
  22207. var val;
  22208. if (code < NUM_DISTANCE_SHORT_CODES) {
  22209. index += kDistanceShortCodeIndexOffset[code];
  22210. index &= 3;
  22211. val = ringbuffer[index] + kDistanceShortCodeValueOffset[code];
  22212. } else {
  22213. val = code - NUM_DISTANCE_SHORT_CODES + 1;
  22214. }
  22215. return val;
  22216. }
  22217. function MoveToFront(v, index) {
  22218. var value = v[index];
  22219. var i = index;
  22220. for (; i; --i) v[i] = v[i - 1];
  22221. v[0] = value;
  22222. }
  22223. function InverseMoveToFrontTransform(v, v_len) {
  22224. var mtf = new Uint8Array(256);
  22225. var i;
  22226. for (i = 0; i < 256; ++i) {
  22227. mtf[i] = i;
  22228. }
  22229. for (i = 0; i < v_len; ++i) {
  22230. var index = v[i];
  22231. v[i] = mtf[index];
  22232. if (index) MoveToFront(mtf, index);
  22233. }
  22234. }
  22235. /* Contains a collection of huffman trees with the same alphabet size. */
  22236. function HuffmanTreeGroup(alphabet_size, num_htrees) {
  22237. this.alphabet_size = alphabet_size;
  22238. this.num_htrees = num_htrees;
  22239. this.codes = new Array(num_htrees + num_htrees * kMaxHuffmanTableSize[(alphabet_size + 31) >>> 5]);
  22240. this.htrees = new Uint32Array(num_htrees);
  22241. }
  22242. HuffmanTreeGroup.prototype.decode = function(br) {
  22243. var i;
  22244. var table_size;
  22245. var next = 0;
  22246. for (i = 0; i < this.num_htrees; ++i) {
  22247. this.htrees[i] = next;
  22248. table_size = ReadHuffmanCode(this.alphabet_size, this.codes, next, br);
  22249. next += table_size;
  22250. }
  22251. };
  22252. function DecodeContextMap(context_map_size, br) {
  22253. var out = { num_htrees: null, context_map: null };
  22254. var use_rle_for_zeros;
  22255. var max_run_length_prefix = 0;
  22256. var table;
  22257. var i;
  22258. br.readMoreInput();
  22259. var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1;
  22260. var context_map = out.context_map = new Uint8Array(context_map_size);
  22261. if (num_htrees <= 1) {
  22262. return out;
  22263. }
  22264. use_rle_for_zeros = br.readBits(1);
  22265. if (use_rle_for_zeros) {
  22266. max_run_length_prefix = br.readBits(4) + 1;
  22267. }
  22268. table = [];
  22269. for (i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++) {
  22270. table[i] = new HuffmanCode(0, 0);
  22271. }
  22272. ReadHuffmanCode(num_htrees + max_run_length_prefix, table, 0, br);
  22273. for (i = 0; i < context_map_size;) {
  22274. var code;
  22275. br.readMoreInput();
  22276. code = ReadSymbol(table, 0, br);
  22277. if (code === 0) {
  22278. context_map[i] = 0;
  22279. ++i;
  22280. } else if (code <= max_run_length_prefix) {
  22281. var reps = 1 + (1 << code) + br.readBits(code);
  22282. while (--reps) {
  22283. if (i >= context_map_size) {
  22284. throw new Error("[DecodeContextMap] i >= context_map_size");
  22285. }
  22286. context_map[i] = 0;
  22287. ++i;
  22288. }
  22289. } else {
  22290. context_map[i] = code - max_run_length_prefix;
  22291. ++i;
  22292. }
  22293. }
  22294. if (br.readBits(1)) {
  22295. InverseMoveToFrontTransform(context_map, context_map_size);
  22296. }
  22297. return out;
  22298. }
  22299. function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) {
  22300. var ringbuffer = tree_type * 2;
  22301. var index = tree_type;
  22302. var type_code = ReadSymbol(trees, tree_type * HUFFMAN_MAX_TABLE_SIZE, br);
  22303. var block_type;
  22304. if (type_code === 0) {
  22305. block_type = ringbuffers[ringbuffer + (indexes[index] & 1)];
  22306. } else if (type_code === 1) {
  22307. block_type = ringbuffers[ringbuffer + ((indexes[index] - 1) & 1)] + 1;
  22308. } else {
  22309. block_type = type_code - 2;
  22310. }
  22311. if (block_type >= max_block_type) {
  22312. block_type -= max_block_type;
  22313. }
  22314. block_types[tree_type] = block_type;
  22315. ringbuffers[ringbuffer + (indexes[index] & 1)] = block_type;
  22316. ++indexes[index];
  22317. }
  22318. function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) {
  22319. var rb_size = ringbuffer_mask + 1;
  22320. var rb_pos = pos & ringbuffer_mask;
  22321. var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK;
  22322. var nbytes;
  22323. /* For short lengths copy byte-by-byte */
  22324. if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) {
  22325. while (len-- > 0) {
  22326. br.readMoreInput();
  22327. ringbuffer[rb_pos++] = br.readBits(8);
  22328. if (rb_pos === rb_size) {
  22329. output.write(ringbuffer, rb_size);
  22330. rb_pos = 0;
  22331. }
  22332. }
  22333. return;
  22334. }
  22335. if (br.bit_end_pos_ < 32) {
  22336. throw new Error('[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32');
  22337. }
  22338. /* Copy remaining 0-4 bytes from br.val_ to ringbuffer. */
  22339. while (br.bit_pos_ < 32) {
  22340. ringbuffer[rb_pos] = (br.val_ >>> br.bit_pos_);
  22341. br.bit_pos_ += 8;
  22342. ++rb_pos;
  22343. --len;
  22344. }
  22345. /* Copy remaining bytes from br.buf_ to ringbuffer. */
  22346. nbytes = (br.bit_end_pos_ - br.bit_pos_) >> 3;
  22347. if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) {
  22348. var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;
  22349. for (var x = 0; x < tail; x++)
  22350. ringbuffer[rb_pos + x] = br.buf_[br_pos + x];
  22351. nbytes -= tail;
  22352. rb_pos += tail;
  22353. len -= tail;
  22354. br_pos = 0;
  22355. }
  22356. for (var x = 0; x < nbytes; x++)
  22357. ringbuffer[rb_pos + x] = br.buf_[br_pos + x];
  22358. rb_pos += nbytes;
  22359. len -= nbytes;
  22360. /* If we wrote past the logical end of the ringbuffer, copy the tail of the
  22361. ringbuffer to its beginning and flush the ringbuffer to the output. */
  22362. if (rb_pos >= rb_size) {
  22363. output.write(ringbuffer, rb_size);
  22364. rb_pos -= rb_size;
  22365. for (var x = 0; x < rb_pos; x++)
  22366. ringbuffer[x] = ringbuffer[rb_size + x];
  22367. }
  22368. /* If we have more to copy than the remaining size of the ringbuffer, then we
  22369. first fill the ringbuffer from the input and then flush the ringbuffer to
  22370. the output */
  22371. while (rb_pos + len >= rb_size) {
  22372. nbytes = rb_size - rb_pos;
  22373. if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) {
  22374. throw new Error('[CopyUncompressedBlockToOutput] not enough bytes');
  22375. }
  22376. output.write(ringbuffer, rb_size);
  22377. len -= nbytes;
  22378. rb_pos = 0;
  22379. }
  22380. /* Copy straight from the input onto the ringbuffer. The ringbuffer will be
  22381. flushed to the output at a later time. */
  22382. if (br.input_.read(ringbuffer, rb_pos, len) < len) {
  22383. throw new Error('[CopyUncompressedBlockToOutput] not enough bytes');
  22384. }
  22385. /* Restore the state of the bit reader. */
  22386. br.reset();
  22387. }
  22388. /* Advances the bit reader position to the next byte boundary and verifies
  22389. that any skipped bits are set to zero. */
  22390. function JumpToByteBoundary(br) {
  22391. var new_bit_pos = (br.bit_pos_ + 7) & ~7;
  22392. var pad_bits = br.readBits(new_bit_pos - br.bit_pos_);
  22393. return pad_bits == 0;
  22394. }
  22395. function BrotliDecompressedSize(buffer) {
  22396. var input = new BrotliInput(buffer);
  22397. var br = new BrotliBitReader(input);
  22398. DecodeWindowBits(br);
  22399. var out = DecodeMetaBlockLength(br);
  22400. return out.meta_block_length;
  22401. }
  22402. __webpack_unused_export__ = BrotliDecompressedSize;
  22403. function BrotliDecompressBuffer(buffer, output_size) {
  22404. var input = new BrotliInput(buffer);
  22405. if (output_size == null) {
  22406. output_size = BrotliDecompressedSize(buffer);
  22407. }
  22408. var output_buffer = new Uint8Array(output_size);
  22409. var output = new BrotliOutput(output_buffer);
  22410. BrotliDecompress(input, output);
  22411. if (output.pos < output.buffer.length) {
  22412. output.buffer = output.buffer.subarray(0, output.pos);
  22413. }
  22414. return output.buffer;
  22415. }
  22416. exports.BrotliDecompressBuffer = BrotliDecompressBuffer;
  22417. function BrotliDecompress(input, output) {
  22418. var i;
  22419. var pos = 0;
  22420. var input_end = 0;
  22421. var window_bits = 0;
  22422. var max_backward_distance;
  22423. var max_distance = 0;
  22424. var ringbuffer_size;
  22425. var ringbuffer_mask;
  22426. var ringbuffer;
  22427. var ringbuffer_end;
  22428. /* This ring buffer holds a few past copy distances that will be used by */
  22429. /* some special distance codes. */
  22430. var dist_rb = [ 16, 15, 11, 4 ];
  22431. var dist_rb_idx = 0;
  22432. /* The previous 2 bytes used for context. */
  22433. var prev_byte1 = 0;
  22434. var prev_byte2 = 0;
  22435. var hgroup = [new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0)];
  22436. var block_type_trees;
  22437. var block_len_trees;
  22438. var br;
  22439. /* We need the slack region for the following reasons:
  22440. - always doing two 8-byte copies for fast backward copying
  22441. - transforms
  22442. - flushing the input ringbuffer when decoding uncompressed blocks */
  22443. var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE;
  22444. br = new BrotliBitReader(input);
  22445. /* Decode window size. */
  22446. window_bits = DecodeWindowBits(br);
  22447. max_backward_distance = (1 << window_bits) - 16;
  22448. ringbuffer_size = 1 << window_bits;
  22449. ringbuffer_mask = ringbuffer_size - 1;
  22450. ringbuffer = new Uint8Array(ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength);
  22451. ringbuffer_end = ringbuffer_size;
  22452. block_type_trees = [];
  22453. block_len_trees = [];
  22454. for (var x = 0; x < 3 * HUFFMAN_MAX_TABLE_SIZE; x++) {
  22455. block_type_trees[x] = new HuffmanCode(0, 0);
  22456. block_len_trees[x] = new HuffmanCode(0, 0);
  22457. }
  22458. while (!input_end) {
  22459. var meta_block_remaining_len = 0;
  22460. var is_uncompressed;
  22461. var block_length = [ 1 << 28, 1 << 28, 1 << 28 ];
  22462. var block_type = [ 0 ];
  22463. var num_block_types = [ 1, 1, 1 ];
  22464. var block_type_rb = [ 0, 1, 0, 1, 0, 1 ];
  22465. var block_type_rb_index = [ 0 ];
  22466. var distance_postfix_bits;
  22467. var num_direct_distance_codes;
  22468. var distance_postfix_mask;
  22469. var num_distance_codes;
  22470. var context_map = null;
  22471. var context_modes = null;
  22472. var num_literal_htrees;
  22473. var dist_context_map = null;
  22474. var num_dist_htrees;
  22475. var context_offset = 0;
  22476. var context_map_slice = null;
  22477. var literal_htree_index = 0;
  22478. var dist_context_offset = 0;
  22479. var dist_context_map_slice = null;
  22480. var dist_htree_index = 0;
  22481. var context_lookup_offset1 = 0;
  22482. var context_lookup_offset2 = 0;
  22483. var context_mode;
  22484. var htree_command;
  22485. for (i = 0; i < 3; ++i) {
  22486. hgroup[i].codes = null;
  22487. hgroup[i].htrees = null;
  22488. }
  22489. br.readMoreInput();
  22490. var _out = DecodeMetaBlockLength(br);
  22491. meta_block_remaining_len = _out.meta_block_length;
  22492. if (pos + meta_block_remaining_len > output.buffer.length) {
  22493. /* We need to grow the output buffer to fit the additional data. */
  22494. var tmp = new Uint8Array( pos + meta_block_remaining_len );
  22495. tmp.set( output.buffer );
  22496. output.buffer = tmp;
  22497. }
  22498. input_end = _out.input_end;
  22499. is_uncompressed = _out.is_uncompressed;
  22500. if (_out.is_metadata) {
  22501. JumpToByteBoundary(br);
  22502. for (; meta_block_remaining_len > 0; --meta_block_remaining_len) {
  22503. br.readMoreInput();
  22504. /* Read one byte and ignore it. */
  22505. br.readBits(8);
  22506. }
  22507. continue;
  22508. }
  22509. if (meta_block_remaining_len === 0) {
  22510. continue;
  22511. }
  22512. if (is_uncompressed) {
  22513. br.bit_pos_ = (br.bit_pos_ + 7) & ~7;
  22514. CopyUncompressedBlockToOutput(output, meta_block_remaining_len, pos,
  22515. ringbuffer, ringbuffer_mask, br);
  22516. pos += meta_block_remaining_len;
  22517. continue;
  22518. }
  22519. for (i = 0; i < 3; ++i) {
  22520. num_block_types[i] = DecodeVarLenUint8(br) + 1;
  22521. if (num_block_types[i] >= 2) {
  22522. ReadHuffmanCode(num_block_types[i] + 2, block_type_trees, i * HUFFMAN_MAX_TABLE_SIZE, br);
  22523. ReadHuffmanCode(kNumBlockLengthCodes, block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br);
  22524. block_length[i] = ReadBlockLength(block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br);
  22525. block_type_rb_index[i] = 1;
  22526. }
  22527. }
  22528. br.readMoreInput();
  22529. distance_postfix_bits = br.readBits(2);
  22530. num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits);
  22531. distance_postfix_mask = (1 << distance_postfix_bits) - 1;
  22532. num_distance_codes = (num_direct_distance_codes + (48 << distance_postfix_bits));
  22533. context_modes = new Uint8Array(num_block_types[0]);
  22534. for (i = 0; i < num_block_types[0]; ++i) {
  22535. br.readMoreInput();
  22536. context_modes[i] = (br.readBits(2) << 1);
  22537. }
  22538. var _o1 = DecodeContextMap(num_block_types[0] << kLiteralContextBits, br);
  22539. num_literal_htrees = _o1.num_htrees;
  22540. context_map = _o1.context_map;
  22541. var _o2 = DecodeContextMap(num_block_types[2] << kDistanceContextBits, br);
  22542. num_dist_htrees = _o2.num_htrees;
  22543. dist_context_map = _o2.context_map;
  22544. hgroup[0] = new HuffmanTreeGroup(kNumLiteralCodes, num_literal_htrees);
  22545. hgroup[1] = new HuffmanTreeGroup(kNumInsertAndCopyCodes, num_block_types[1]);
  22546. hgroup[2] = new HuffmanTreeGroup(num_distance_codes, num_dist_htrees);
  22547. for (i = 0; i < 3; ++i) {
  22548. hgroup[i].decode(br);
  22549. }
  22550. context_map_slice = 0;
  22551. dist_context_map_slice = 0;
  22552. context_mode = context_modes[block_type[0]];
  22553. context_lookup_offset1 = Context.lookupOffsets[context_mode];
  22554. context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
  22555. htree_command = hgroup[1].htrees[0];
  22556. while (meta_block_remaining_len > 0) {
  22557. var cmd_code;
  22558. var range_idx;
  22559. var insert_code;
  22560. var copy_code;
  22561. var insert_length;
  22562. var copy_length;
  22563. var distance_code;
  22564. var distance;
  22565. var context;
  22566. var j;
  22567. var copy_dst;
  22568. br.readMoreInput();
  22569. if (block_length[1] === 0) {
  22570. DecodeBlockType(num_block_types[1],
  22571. block_type_trees, 1, block_type, block_type_rb,
  22572. block_type_rb_index, br);
  22573. block_length[1] = ReadBlockLength(block_len_trees, HUFFMAN_MAX_TABLE_SIZE, br);
  22574. htree_command = hgroup[1].htrees[block_type[1]];
  22575. }
  22576. --block_length[1];
  22577. cmd_code = ReadSymbol(hgroup[1].codes, htree_command, br);
  22578. range_idx = cmd_code >> 6;
  22579. if (range_idx >= 2) {
  22580. range_idx -= 2;
  22581. distance_code = -1;
  22582. } else {
  22583. distance_code = 0;
  22584. }
  22585. insert_code = Prefix.kInsertRangeLut[range_idx] + ((cmd_code >> 3) & 7);
  22586. copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7);
  22587. insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset +
  22588. br.readBits(Prefix.kInsertLengthPrefixCode[insert_code].nbits);
  22589. copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset +
  22590. br.readBits(Prefix.kCopyLengthPrefixCode[copy_code].nbits);
  22591. prev_byte1 = ringbuffer[pos-1 & ringbuffer_mask];
  22592. prev_byte2 = ringbuffer[pos-2 & ringbuffer_mask];
  22593. for (j = 0; j < insert_length; ++j) {
  22594. br.readMoreInput();
  22595. if (block_length[0] === 0) {
  22596. DecodeBlockType(num_block_types[0],
  22597. block_type_trees, 0, block_type, block_type_rb,
  22598. block_type_rb_index, br);
  22599. block_length[0] = ReadBlockLength(block_len_trees, 0, br);
  22600. context_offset = block_type[0] << kLiteralContextBits;
  22601. context_map_slice = context_offset;
  22602. context_mode = context_modes[block_type[0]];
  22603. context_lookup_offset1 = Context.lookupOffsets[context_mode];
  22604. context_lookup_offset2 = Context.lookupOffsets[context_mode + 1];
  22605. }
  22606. context = (Context.lookup[context_lookup_offset1 + prev_byte1] |
  22607. Context.lookup[context_lookup_offset2 + prev_byte2]);
  22608. literal_htree_index = context_map[context_map_slice + context];
  22609. --block_length[0];
  22610. prev_byte2 = prev_byte1;
  22611. prev_byte1 = ReadSymbol(hgroup[0].codes, hgroup[0].htrees[literal_htree_index], br);
  22612. ringbuffer[pos & ringbuffer_mask] = prev_byte1;
  22613. if ((pos & ringbuffer_mask) === ringbuffer_mask) {
  22614. output.write(ringbuffer, ringbuffer_size);
  22615. }
  22616. ++pos;
  22617. }
  22618. meta_block_remaining_len -= insert_length;
  22619. if (meta_block_remaining_len <= 0) break;
  22620. if (distance_code < 0) {
  22621. var context;
  22622. br.readMoreInput();
  22623. if (block_length[2] === 0) {
  22624. DecodeBlockType(num_block_types[2],
  22625. block_type_trees, 2, block_type, block_type_rb,
  22626. block_type_rb_index, br);
  22627. block_length[2] = ReadBlockLength(block_len_trees, 2 * HUFFMAN_MAX_TABLE_SIZE, br);
  22628. dist_context_offset = block_type[2] << kDistanceContextBits;
  22629. dist_context_map_slice = dist_context_offset;
  22630. }
  22631. --block_length[2];
  22632. context = (copy_length > 4 ? 3 : copy_length - 2) & 0xff;
  22633. dist_htree_index = dist_context_map[dist_context_map_slice + context];
  22634. distance_code = ReadSymbol(hgroup[2].codes, hgroup[2].htrees[dist_htree_index], br);
  22635. if (distance_code >= num_direct_distance_codes) {
  22636. var nbits;
  22637. var postfix;
  22638. var offset;
  22639. distance_code -= num_direct_distance_codes;
  22640. postfix = distance_code & distance_postfix_mask;
  22641. distance_code >>= distance_postfix_bits;
  22642. nbits = (distance_code >> 1) + 1;
  22643. offset = ((2 + (distance_code & 1)) << nbits) - 4;
  22644. distance_code = num_direct_distance_codes +
  22645. ((offset + br.readBits(nbits)) <<
  22646. distance_postfix_bits) + postfix;
  22647. }
  22648. }
  22649. /* Convert the distance code to the actual distance by possibly looking */
  22650. /* up past distnaces from the ringbuffer. */
  22651. distance = TranslateShortCodes(distance_code, dist_rb, dist_rb_idx);
  22652. if (distance < 0) {
  22653. throw new Error('[BrotliDecompress] invalid distance');
  22654. }
  22655. if (pos < max_backward_distance &&
  22656. max_distance !== max_backward_distance) {
  22657. max_distance = pos;
  22658. } else {
  22659. max_distance = max_backward_distance;
  22660. }
  22661. copy_dst = pos & ringbuffer_mask;
  22662. if (distance > max_distance) {
  22663. if (copy_length >= BrotliDictionary.minDictionaryWordLength &&
  22664. copy_length <= BrotliDictionary.maxDictionaryWordLength) {
  22665. var offset = BrotliDictionary.offsetsByLength[copy_length];
  22666. var word_id = distance - max_distance - 1;
  22667. var shift = BrotliDictionary.sizeBitsByLength[copy_length];
  22668. var mask = (1 << shift) - 1;
  22669. var word_idx = word_id & mask;
  22670. var transform_idx = word_id >> shift;
  22671. offset += word_idx * copy_length;
  22672. if (transform_idx < Transform.kNumTransforms) {
  22673. var len = Transform.transformDictionaryWord(ringbuffer, copy_dst, offset, copy_length, transform_idx);
  22674. copy_dst += len;
  22675. pos += len;
  22676. meta_block_remaining_len -= len;
  22677. if (copy_dst >= ringbuffer_end) {
  22678. output.write(ringbuffer, ringbuffer_size);
  22679. for (var _x = 0; _x < (copy_dst - ringbuffer_end); _x++)
  22680. ringbuffer[_x] = ringbuffer[ringbuffer_end + _x];
  22681. }
  22682. } else {
  22683. throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance +
  22684. " len: " + copy_length + " bytes left: " + meta_block_remaining_len);
  22685. }
  22686. } else {
  22687. throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance +
  22688. " len: " + copy_length + " bytes left: " + meta_block_remaining_len);
  22689. }
  22690. } else {
  22691. if (distance_code > 0) {
  22692. dist_rb[dist_rb_idx & 3] = distance;
  22693. ++dist_rb_idx;
  22694. }
  22695. if (copy_length > meta_block_remaining_len) {
  22696. throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance +
  22697. " len: " + copy_length + " bytes left: " + meta_block_remaining_len);
  22698. }
  22699. for (j = 0; j < copy_length; ++j) {
  22700. ringbuffer[pos & ringbuffer_mask] = ringbuffer[(pos - distance) & ringbuffer_mask];
  22701. if ((pos & ringbuffer_mask) === ringbuffer_mask) {
  22702. output.write(ringbuffer, ringbuffer_size);
  22703. }
  22704. ++pos;
  22705. --meta_block_remaining_len;
  22706. }
  22707. }
  22708. /* When we get here, we must have inserted at least one literal and */
  22709. /* made a copy of at least length two, therefore accessing the last 2 */
  22710. /* bytes is valid. */
  22711. prev_byte1 = ringbuffer[(pos - 1) & ringbuffer_mask];
  22712. prev_byte2 = ringbuffer[(pos - 2) & ringbuffer_mask];
  22713. }
  22714. /* Protect pos from overflow, wrap it around at every GB of input data */
  22715. pos &= 0x3fffffff;
  22716. }
  22717. output.write(ringbuffer, pos & ringbuffer_mask);
  22718. }
  22719. __webpack_unused_export__ = BrotliDecompress;
  22720. BrotliDictionary.init();
  22721. /***/ }),
  22722. /***/ 5340:
  22723. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  22724. var base64 = __webpack_require__(9742);
  22725. var fs = __webpack_require__(3857);
  22726. /**
  22727. * The normal dictionary-data.js is quite large, which makes it
  22728. * unsuitable for browser usage. In order to make it smaller,
  22729. * we read dictionary.bin, which is a compressed version of
  22730. * the dictionary, and on initial load, Brotli decompresses
  22731. * it's own dictionary. 😜
  22732. */
  22733. exports.init = function() {
  22734. var BrotliDecompressBuffer = (__webpack_require__(6450).BrotliDecompressBuffer);
  22735. var compressed = base64.toByteArray(__webpack_require__(2722));
  22736. return BrotliDecompressBuffer(compressed);
  22737. };
  22738. /***/ }),
  22739. /***/ 2722:
  22740. /***/ (function(module) {
  22741. module.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6CusgFdBPE40r0rvqXV7tksKO2DrHYXBTv8P5ysqxEx8VDXUDDqkPH6NNOV/a2WH8zlkXRELSa8P+heNyJBBP7PgsG1EtWtNef6/i+lcayzQwQCsduidpbKfhWUDgAEmyhGu/zVTacI6RS0zTABrOYueemnVa19u9fT23N/Ta6RvTpof5DWygqreCqrDAgM4LID1+1T/taU6yTFVLqXOv+/MuQOFnaF8vLMKD7tKWDoBdALgxF33zQccCcdHx8fKIVdW69O7qHtXpeGr9jbbpFA+qRMWr5hp0s67FPc7HAiLV0g0/peZlW7hJPYEhZyhpSwahnf93/tZgfqZWXFdmdXBzqxGHLrQKxoAY6fRoBhgCRPmmGueYZ5JexTVDKUIXzkG/fqp/0U3hAgQdJ9zumutK6nqWbaqvm1pgu03IYR+G+8s0jDBBz8cApZFSBeuWasyqo2OMDKAZCozS+GWSvL/HsE9rHxooe17U3s/lTE+VZAk4j3dp6uIGaC0JMiqR5CUsabPyM0dOYDR7Ea7ip4USZlya38YfPtvrX/tBlhHilj55nZ1nfN24AOAi9BVtz/Mbn8AEDJCqJgsVUa6nQnSxv2Fs7l/NlCzpfYEjmPrNyib/+t0ei2eEMjvNhLkHCZlci4WhBe7ePZTmzYqlY9+1pxtS4GB+5lM1BHT9tS270EWUDYFq1I0yY/fNiAk4bk9yBgmef/f2k6AlYQZHsNFnW8wBQxCd68iWv7/35bXfz3JZmfGligWAKRjIs3IpzxQ27vAglHSiOzCYzJ9L9A1CdiyFvyR66ucA4jKifu5ehwER26yV7HjKqn5Mfozo7Coxxt8LWWPT47BeMxX8p0Pjb7hZn+6bw7z3Lw+7653j5sI8CLu5kThpMlj1m4c2ch3jGcP1FsT13vuK3qjecKTZk2kHcOZY40UX+qdaxstZqsqQqgXz+QGF99ZJLqr3VYu4aecl1Ab5GmqS8k/GV5b95zxQ5d4EfXUJ6kTS/CXF/aiqKDOT1T7Jz5z0PwDUcwr9clLN1OJGCiKfqvah+h3XzrBOiLOW8wvn8gW6qE8vPxi+Efv+UH55T7PQFVMh6cZ1pZQlzJpKZ7P7uWvwPGJ6DTlR6wbyj3Iv2HyefnRo/dv7dNx+qaa0N38iBsR++Uil7Wd4afwDNsrzDAK4fXZwvEY/jdKuIKXlfrQd2C39dW7ntnRbIp9OtGy9pPBn/V2ASoi/2UJZfS+xuGLH8bnLuPlzdTNS6zdyk8Dt/h6sfOW5myxh1f+zf3zZ3MX/mO9cQPp5pOx967ZA6/pqHvclNfnUFF+rq+Vd7alKr6KWPcIDhpn6v2K6NlUu6LrKo8b/pYpU/Gazfvtwhn7tEOUuXht5rUJdSf6sLjYf0VTYDgwJ81yaqKTUYej/tbHckSRb/HZicwGJqh1mAHB/IuNs9dc9yuvF3D5Xocm3elWFdq5oEy70dYFit79yaLiNjPj5UUcVmZUVhQEhW5V2Z6Cm4HVH/R8qlamRYwBileuh07CbEce3TXa2JmXWBf+ozt319psboobeZhVnwhMZzOeQJzhpTDbP71Tv8HuZxxUI/+ma3XW6DFDDs4+qmpERwHGBd2edxwUKlODRdUWZ/g0GOezrbzOZauFMai4QU6GVHV6aPNBiBndHSsV4IzpvUiiYyg6OyyrL4Dj5q/Lw3N5kAwftEVl9rNd7Jk5PDij2hTH6wIXnsyXkKePxbmHYgC8A6an5Fob/KH5GtC0l4eFso+VpxedtJHdHpNm+Bvy4C79yVOkrZsLrQ3OHCeB0Ra+kBIRldUGlDCEmq2RwXnfyh6Dz+alk6eftI2n6sastRrGwbwszBeDRS/Fa/KwRJkCzTsLr/JCs5hOPE/MPLYdZ1F1fv7D+VmysX6NpOC8aU9F4Qs6HvDyUy9PvFGDKZ/P5101TYHFl8pjj6wm/qyS75etZhhfg0UEL4OYmHk6m6dO192AzoIyPSV9QedDA4Ml23rRbqxMPMxf7FJnDc5FTElVS/PyqgePzmwVZ26NWhRDQ+oaT7ly7ell4s3DypS1s0g+tOr7XHrrkZj9+x/mJBttrLx98lFIaRZzHz4aC7r52/JQ4VjHahY2/YVXZn/QC2ztQb/sY3uRlyc5vQS8nLPGT/n27495i8HPA152z7Fh5aFpyn1GPJKHuPL8Iw94DuW3KjkURAWZXn4EQy89xiKEHN1mk/tkM4gYDBxwNoYvRfE6LFqsxWJtPrDGbsnLMap3Ka3MUoytW0cvieozOmdERmhcqzG+3HmZv2yZeiIeQTKGdRT4HHNxekm1tY+/n06rGmFleqLscSERzctTKM6G9P0Pc1RmVvrascIxaO1CQCiYPE15bD7c3xSeW7gXxYjgxcrUlcbIvO0r+Yplhx0kTt3qafDOmFyMjgGxXu73rddMHpV1wMubyAGcf/v5dLr5P72Ta9lBF+fzMJrMycwv+9vnU3ANIl1cH9tfW7af8u0/HG0vV47jNFXzFTtaha1xvze/s8KMtCYucXc1nzfd/MQydUXn/b72RBt5wO/3jRcMH9BdhC/yctKBIveRYPrNpDWqBsO8VMmP+WvRaOcA4zRMR1PvSoO92rS7pYEv+fZfEfTMzEdM+6X5tLlyxExhqLRkms5EuLovLfx66de5fL2/yX02H52FPVwahrPqmN/E0oVXnsCKhbi/yRxX83nRbUKWhzYceXOntfuXn51NszJ6MO73pQf5Pl4in3ec4JU8hF7ppV34+mm9r1LY0ee/i1O1wpd8+zfLztE0cqBxggiBi5Bu95v9l3r9r/U5hweLn+TbfxowrWDqdJauKd8+q/dH8sbPkc9ttuyO94f7/XK/nHX46MPFLEb5qQlNPvhJ50/59t9ft3LXu7uVaWaO2bDrDCnRSzZyWvFKxO1+vT8MwwunR3bX0CkfPjqb4K9O19tn5X50PvmYpEwHtiW9WtzuV/s76B1zvLLNkViNd8ySxIl/3orfqP90TyTGaf7/rx8jQzeHJXdmh/N6YDvbvmTBwCdxfEQ1NcL6wNMdSIXNq7b1EUzRy1/Axsyk5p22GMG1b+GxFgbHErZh92wuvco0AuOLXct9hvw2nw/LqIcDRRmJmmZzcgUa7JpM/WV/S9IUfbF56TL2orzqwebdRD8nIYNJ41D/hz37Fo11p2Y21wzPcn713qVGhqtevStYfGH4n69OEJtPvbbLYWvscDqc3Hgnu166+tAyLnxrX0Y5zoYjV++1sI7t5kMr02KT/+uwtkc+rZLOf/qn/s3nYCf13Dg8/sB2diJgjGqjQ+TLhxbzyue2Ob7X6/9lUwW7a+lbznHzOYy8LKW1C/uRPbQY3KW/0gO9LXunHLvPL97afba9bFtc9hmz7GAttjVYlCvQAiOwAk/gC5+hkLEs6tr3AZKxLJtOEwk2dLxTYWsIB/j/ToWtIWzo906FrSG8iaqqqqqqiIiIiAgzMzMzNz+AyK+01/zi8n8S+Y1MjoRaQ80WU/G8MBlO+53VPXANrWm4wzGUVZUjjBJZVdhpcfkjsmcWaO+UEldXi1e+zq+HOsCpknYshuh8pOLISJun7TN0EIGW2xTnlOImeecnoGW4raxe2G1T3HEvfYUYMhG+gAFOAwh5nK8mZhwJMmN7r224QVsNFvZ87Z0qatvknklyPDK3Hy45PgVKXji52Wen4d4PlFVVYGnNap+fSpFbK90rYnhUc6n91Q3AY9E0tJOFrcfZtm/491XbcG/jsViUPPX76qmeuiz+qY1Hk7/1VPM405zWVuoheLUimpWYdVzCmUdKHebMdzgrYrb8mL2eeLSnRWHdonfZa8RsOU9F37w+591l5FLYHiOqWeHtE/lWrBHcRKp3uhtr8yXm8LU/5ms+NM6ZKsqu90cFZ4o58+k4rdrtB97NADFbwmEG7lXqvirhOTOqU14xuUF2myIjURcPHrPOQ4lmM3PeMg7bUuk0nnZi67bXsU6H8lhqIo8TaOrEafCO1ARK9PjC0QOoq2BxmMdgYB9G/lIb9++fqNJ2s7BHGFyBNmZAR8J3KCo012ikaSP8BCrf6VI0X5xdnbhHIO+B5rbOyB54zXkzfObyJ4ecwxfqBJMLFc7m59rNcw7hoHnFZ0b00zee+gTqvjm61Pb4xn0kcDX4jvHM0rBXZypG3DCKnD/Waa/ZtHmtFPgO5eETx+k7RrVg3aSwm2YoNXnCs3XPQDhNn+Fia6IlOOuIG6VJH7TP6ava26ehKHQa2T4N0tcZ9dPCGo3ZdnNltsHQbeYt5vPnJezV/cAeNypdml1vCHI8M81nSRP5Qi2+mI8v/sxiZru9187nRtp3f/42NemcONa+4eVC3PCZzc88aZh851CqSsshe70uPxeN/dmYwlwb3trwMrN1Gq8jbnApcVDx/yDPeYs5/7r62tsQ6lLg+DiFXTEhzR9dHqv0iT4tgj825W+H3XiRUNUZT2kR9Ri0+lp+UM3iQtS8uOE23Ly4KYtvqH13jghUntJRAewuzNLDXp8RxdcaA3cMY6TO2IeSFRXezeWIjCqyhsUdMYuCgYTZSKpBype1zRfq8FshvfBPc6BAQWl7/QxIDp3VGo1J3vn42OEs3qznws+YLRXbymyB19a9XBx6n/owcyxlEYyFWCi+kG9F+EyD/4yn80+agaZ9P7ay2Dny99aK2o91FkfEOY8hBwyfi5uwx2y5SaHmG+oq/zl1FX/8irOf8Y3vAcX/6uLP6A6nvMO24edSGPjQc827Rw2atX+z2bKq0CmW9mOtYnr5/AfDa1ZfPaXnKtlWborup7QYx+Or2uWb+N3N//2+yDcXMqIJdf55xl7/vsj4WoPPlxLxtVrkJ4w/tTe3mLdATOOYwxcq52w5Wxz5MbPdVs5O8/lhfE7dPj0bIiPQ3QV0iqm4m3YX8hRfc6jQ3fWepevMqUDJd86Z4vwM40CWHnn+WphsGHfieF02D3tmZvpWD+kBpNCFcLnZhcmmrhpGzzbdA+sQ1ar18OJD87IOKOFoRNznaHPNHUfUNhvY1iU+uhvEvpKHaUn3qK3exVVyX4joipp3um7FmYJWmA+WbIDshRpbVRx5/nqstCgy87FGbfVB8yDGCqS+2qCsnRwnSAN6zgzxfdB2nBT/vZ4/6uxb6oH8b4VBRxiIB93wLa47hG3w2SL/2Z27yOXJFwZpSJaBYyvajA7vRRYNKqljXKpt/CFD/tSMr18DKKbwB0xggBePatl1nki0yvqW5zchlyZmJ0OTxJ3D+fsYJs/mxYN5+Le5oagtcl+YsVvy8kSjI2YGvGjvmpkRS9W2dtXqWnVuxUhURm1lKtou/hdEq19VBp9OjGvHEQSmrpuf2R24mXGheil8KeiANY8fW1VERUfBImb64j12caBZmRViZHbeVMjCrPDg9A90IXrtnsYCuZtRQ0PyrKDjBNOsPfKsg1pA02gHlVr0OXiFhtp6nJqXVzcbfM0KnzC3ggOENPE9VBdmHKN6LYaijb4wXxJn5A0FSDF5j+h1ooZx885Jt3ZKzO5n7Z5WfNEOtyyPqQEnn7WLv5Fis3PdgMshjF1FRydbNyeBbyKI1oN1TRVrVK7kgsb/zjX4NDPIRMctVeaxVB38Vh1x5KbeJbU138AM5KzmZu3uny0ErygxiJF7GVXUrPzFxrlx1uFdAaZFDN9cvIb74qD9tzBMo7L7WIEYK+sla1DVMHpF0F7b3+Y6S+zjvLeDMCpapmJo1weBWuxKF3rOocih1gun4BoJh1kWnV/Jmiq6uOhK3VfKxEHEkafjLgK3oujaPzY6SXg8phhL4TNR1xvJd1Wa0aYFfPUMLrNBDCh4AuGRTbtKMc6Z1Udj8evY/ZpCuMAUefdo69DZUngoqE1P9A3PJfOf7WixCEj+Y6t7fYeHbbxUAoFV3M89cCKfma3fc1+jKRe7MFWEbQqEfyzO2x/wrO2VYH7iYdQ9BkPyI8/3kXBpLaCpU7eC0Yv/am/tEDu7HZpqg0EvHo0nf/R/gRzUWy33/HXMJQeu1GylKmOkXzlCfGFruAcPPhaGqZOtu19zsJ1SO2Jz4Ztth5cBX6mRQwWmDwryG9FUMlZzNckMdK+IoMJv1rOWnBamS2w2KHiaPMPLC15hCZm4KTpoZyj4E2TqC/P6r7/EhnDMhKicZZ1ZwxuC7DPzDGs53q8gXaI9kFTK+2LTq7bhwsTbrMV8Rsfua5lMS0FwbTitUVnVa1yTb5IX51mmYnUcP9wPr8Ji1tiYJeJV9GZTrQhF7vvdU2OTU42ogJ9FDwhmycI2LIg++03C6scYhUyUuMV5tkw6kGUoL+mjNC38+wMdWNljn6tGPpRES7veqrSn5TRuv+dh6JVL/iDHU1db4c9WK3++OrH3PqziF916UMUKn8G67nN60GfWiHrXYhUG3yVWmyYak59NHj8t1smG4UDiWz2rPHNrKnN4Zo1LBbr2/eF9YZ0n0blx2nG4X+EKFxvS3W28JESD+FWk61VCD3z/URGHiJl++7TdBwkCj6tGOH3qDb0QqcOF9Kzpj0HUb/KyFW3Yhj2VMKJqGZleFBH7vqvf7WqLC3XMuHV8q8a4sTFuxUtkD/6JIBvKaVjv96ndgruKZ1k/BHzqf2K9fLk7HGXANyLDd1vxkK/i055pnzl+zw6zLnwXlVYVtfmacJgEpRP1hbGgrYPVN6v2lG+idQNGmwcKXu/8xEj/P6qe/sB2WmwNp6pp8jaISMkwdleFXYK55NHWLTTbutSUqjBfDGWo/Yg918qQ+8BRZSAHZbfuNZz2O0sov1Ue4CWlVg3rFhM3Kljj9ksGd/NUhk4nH+a5UN2+1i8+NM3vRNp7uQ6sqexSCukEVlVZriHNqFi5rLm9TMWa4qm3idJqppQACol2l4VSuvWLfta4JcXy3bROPNbXOgdOhG47LC0CwW/dMlSx4Jf17aEU3yA1x9p+Yc0jupXgcMuYNku64iYOkGToVDuJvlbEKlJqsmiHbvNrIVZEH+yFdF8DbleZ6iNiWwMqvtMp/mSpwx5KxRrT9p3MAPTHGtMbfvdFhyj9vhaKcn3At8Lc16Ai+vBcSp1ztXi7rCJZx/ql7TXcclq6Q76UeKWDy9boS0WHIjUuWhPG8LBmW5y2rhuTpM5vsLt+HOLh1Yf0DqXa9tsfC+kaKt2htA0ai/L2i7RKoNjEwztkmRU0GfgW1TxUvPFhg0V7DdfWJk5gfrccpYv+MA9M0dkGTLECeYwUixRzjRFdmjG7zdZIl3XKB9YliNKI31lfa7i2JG5C8Ss+rHe0D7Z696/V3DEAOWHnQ9yNahMUl5kENWS6pHKKp2D1BaSrrHdE1w2qNxIztpXgUIrF0bm15YML4b6V1k+GpNysTahKMVrrS85lTVo9OGJ96I47eAy5rYWpRf/mIzeoYU1DKaQCTUVwrhHeyNoDqHel+lLxr9WKzhSYw7vrR6+V5q0pfi2k3L1zqkubY6rrd9ZLvSuWNf0uqnkY+FpTvFzSW9Fp0b9l8JA7THV9eCi/PY/SCZIUYx3BU2alj7Cm3VV6eYpios4b6WuNOJdYXUK3zTqj5CVG2FqYM4Z7CuIU0qO05XR0d71FHM0YhZmJmTRfLlXEumN82BGtzdX0S19t1e+bUieK8zRmqpa4Qc5TSjifmaQsY2ETLjhI36gMR1+7qpjdXXHiceUekfBaucHShAOiFXmv3sNmGQyU5iVgnoocuonQXEPTFwslHtS8R+A47StI9wj0iSrtbi5rMysczFiImsQ+bdFClnFjjpXXwMy6O7qfjOr8Fb0a7ODItisjnn3EQO16+ypd1cwyaAW5Yzxz5QknfMO7643fXW/I9y3U2xH27Oapqr56Z/tEzglj6IbT6HEHjopiXqeRbe5mQQvxtcbDOVverN0ZgMdzqRYRjaXtMRd56Q4cZSmdPvZJdSrhJ1D9zNXPqAEqPIavPdfubt5oke2kmv0dztIszSv2VYuoyf1UuopbsYb+uX9h6WpwjpgtZ6fNNawNJ4q8O3CFoSbioAaOSZMx2GYaPYB+rEb6qjQiNRFQ76TvwNFVKD+BhH9VhcKGsXzmMI7BptU/CNWolM7YzROvpFAntsiWJp6eR2d3GarcYShVYSUqhmYOWj5E96NK2WvmYNTeY7Zs4RUEdv9h9QT4EseKt6LzLrqEOs3hxAY1MaNWpSa6zZx8F3YOVeCYMS88W+CYHDuWe4yoc6YK+djDuEOrBR5lvh0r+Q9uM88lrjx9x9AtgpQVNE8r+3O6Gvw59D+kBF/UMXyhliYUtPjmvXGY6Dk3x+kEOW+GtdMVC4EZTqoS/jmR0P0LS75DOc/w2vnri97M4SdbZ8qeU7gg8DVbERkU5geaMQO3mYrSYyAngeUQqrN0C0/vsFmcgWNXNeidsTAj7/4MncJR0caaBUpbLK1yBCBNRjEv6KvuVSdpPnEMJdsRRtqJ+U8tN1gXA4ePHc6ZT0eviI73UOJF0fEZ8YaneAQqQdGphNvwM4nIqPnXxV0xA0fnCT+oAhJuyw/q8jO0y8CjSteZExwBpIN6SvNp6A5G/abi6egeND/1GTguhuNjaUbbnSbGd4L8937Ezm34Eyi6n1maeOBxh3PI0jzJDf5mh/BsLD7F2GOKvlA/5gtvxI3/eV4sLfKW5Wy+oio+es/u6T8UU+nsofy57Icb/JlZHPFtCgd/x+bwt3ZT+xXTtTtTrGAb4QehC6X9G+8YT+ozcLxDsdCjsuOqwPFnrdLYaFc92Ui0m4fr39lYmlCaqTit7G6O/3kWDkgtXjNH4BiEm/+jegQnihOtfffn33WxsFjhfMd48HT+f6o6X65j7XR8WLSHMFkxbvOYsrRsF1bowDuSQ18Mkxk4qz2zoGPL5fu9h2Hqmt1asl3Q3Yu3szOc+spiCmX4AETBM3pLoTYSp3sVxahyhL8eC4mPN9k2x3o0xkiixIzM3CZFzf5oR4mecQ5+ax2wCah3/crmnHoqR0+KMaOPxRif1oEFRFOO/kTPPmtww+NfMXxEK6gn6iU32U6fFruIz8Q4WgljtnaCVTBgWx7diUdshC9ZEa5yKpRBBeW12r/iNc/+EgNqmhswNB8SBoihHXeDF7rrWDLcmt3V8GYYN7pXRy4DZjj4DJuUBL5iC3DQAaoo4vkftqVTYRGLS3mHZ7gdmdTTqbgNN/PTdTCOTgXolc88MhXAEUMdX0iy1JMuk5wLsgeu0QUYlz2S4skTWwJz6pOm/8ihrmgGfFgri+ZWUK2gAPHgbWa8jaocdSuM4FJYoKicYX/ZSENkg9Q1ZzJfwScfVnR2DegOGwCvmogaWJCLQepv9WNlU6QgsmOwICquU28Mlk3d9W5E81lU/5Ez0LcX6lwKMWDNluNKfBDUy/phJgBcMnfkh9iRxrdOzgs08JdPB85Lwo+GUSb4t3nC+0byqMZtO2fQJ4U2zGIr49t/28qmmGv2RanDD7a3FEcdtutkW8twwwlUSpb8QalodddbBfNHKDQ828BdE7OBgFdiKYohLawFYqpybQoxATZrheLhdI7+0Zlu9Q1myRcd15r9UIm8K2LGJxqTegntqNVMKnf1a8zQiyUR1rxoqjiFxeHxqFcYUTHfDu7rhbWng6qOxOsI+5A1p9mRyEPdVkTlE24vY54W7bWc6jMgZvNXdfC9/9q7408KDsbdL7Utz7QFSDetz2picArzrdpL8OaCHC9V26RroemtDZ5yNM/KGkWMyTmfnInEvwtSD23UcFcjhaE3VKzkoaEMKGBft4XbIO6forTY1lmGQwVmKicBCiArDzE+1oIxE08fWeviIOD5TznqH+OoHadvoOP20drMPe5Irg3XBQziW2XDuHYzjqQQ4wySssjXUs5H+t3FWYMHppUnBHMx/nYIT5d7OmjDbgD9F6na3m4l7KdkeSO3kTEPXafiWinogag7b52taiZhL1TSvBFmEZafFq2H8khQaZXuitCewT5FBgVtPK0j4xUHPfUz3Q28eac1Z139DAP23dgki94EC8vbDPTQC97HPPSWjUNG5tWKMsaxAEMKC0665Xvo1Ntd07wCLNf8Q56mrEPVpCxlIMVlQlWRxM3oAfpgIc+8KC3rEXUog5g06vt7zgXY8grH7hhwVSaeuvC06YYRAwpbyk/Unzj9hLEZNs2oxPQB9yc+GnL6zTgq7rI++KDJwX2SP8Sd6YzTuw5lV/kU6eQxRD12omfQAW6caTR4LikYkBB1CMOrvgRr/VY75+NSB40Cni6bADAtaK+vyxVWpf9NeKJxN2KYQ8Q2xPB3K1s7fuhvWbr2XpgW044VD6DRs0qXoqKf1NFsaGvKJc47leUV3pppP/5VTKFhaGuol4Esfjf5zyCyUHmHthChcYh4hYLQF+AFWsuq4t0wJyWgdwQVOZiV0efRHPoK5+E1vjz9wTJmVkITC9oEstAsyZSgE/dbicwKr89YUxKZI+owD205Tm5lnnmDRuP/JnzxX3gMtlrcX0UesZdxyQqYQuEW4R51vmQ5xOZteUd8SJruMlTUzhtVw/Nq7eUBcqN2/HVotgfngif60yKEtoUx3WYOZlVJuJOh8u59fzSDPFYtQgqDUAGyGhQOAvKroXMcOYY0qjnStJR/G3aP+Jt1sLVlGV8POwr/6OGsqetnyF3TmTqZjENfnXh51oxe9qVUw2M78EzAJ+IM8lZ1MBPQ9ZWSVc4J3mWSrLKrMHReA5qdGoz0ODRsaA+vwxXA2cAM4qlfzBJA6581m4hzxItQw5dxrrBL3Y6kCbUcFxo1S8jyV44q//+7ASNNudZ6xeaNOSIUffqMn4A9lIjFctYn2gpEPAb3f7p3iIBN8H14FUGQ9ct2hPsL+cEsTgUrR47uJVN4n4wt/wgfwwHuOnLd4yobkofy8JvxSQTA7rMpDIc608SlZFJfZYcmbT0tAHpPE8MrtQ42siTUNWxqvWZOmvu9f0JPoQmg+6l7sZWwyfi6PXkxJnwBraUG0MYG4zYHQz3igy/XsFkx5tNQxw43qvI9dU3f0DdhOUlHKjmi1VAr2Kiy0HZwD8VeEbhh0OiDdMYspolQsYdSwjCcjeowIXNZVUPmL2wwIkYhmXKhGozdCJ4lRKbsf4NBh/XnQoS92NJEWOVOFs2YhN8c5QZFeK0pRdAG40hqvLbmoSA8xQmzOOEc7wLcme9JOsjPCEgpCwUs9E2DohMHRhUeyGIN6TFvrbny8nDuilsDpzrH5mS76APoIEJmItS67sQJ+nfwddzmjPxcBEBBCw0kWDwd0EZCkNeOD7NNQhtBm7KHL9mRxj6U1yWU2puzlIDtpYxdH4ZPeXBJkTGAJfUr/oTCz/iypY6uXaR2V1doPxJYlrw2ghH0D5gbrhFcIxzYwi4a/4hqVdf2DdxBp6vGYDjavxMAAoy+1+3aiO6S3W/QAKNVXagDtvsNtx7Ks+HKgo6U21B+QSZgIogV5Bt+BnXisdVfy9VyXV+2P5fMuvdpAjM1o/K9Z+XnE4EOCrue+kcdYHqAQ0/Y/OmNlQ6OI33jH/uD1RalPaHpJAm2av0/xtpqdXVKNDrc9F2izo23Wu7firgbURFDNX9eGGeYBhiypyXZft2j3hTvzE6PMWKsod//rEILDkzBXfi7xh0eFkfb3/1zzPK/PI5Nk3FbZyTl4mq5BfBoVoqiPHO4Q4QKZAlrQ3MdNfi3oxIjvsM3kAFv3fdufurqYR3PSwX/mpGy/GFI/B2MNPiNdOppWVbs/gjF3YH+QA9jMhlAbhvasAHstB0IJew09iAkmXHl1/TEj+jvHOpOGrPRQXbPADM+Ig2/OEcUcpgPTItMtW4DdqgfYVI/+4hAFWYjUGpOP/UwNuB7+BbKOcALbjobdgzeBQfjgNSp2GOpxzGLj70Vvq5cw2AoYENwKLUtJUX8sGRox4dVa/TN4xKwaKcl9XawQR/uNus700Hf17pyNnezrUgaY9e4MADhEDBpsJT6y1gDJs1q6wlwGhuUzGR7C8kgpjPyHWwsvrf3yn1zJEIRa5eSxoLAZOCR9xbuztxFRJW9ZmMYfCFJ0evm9F2fVnuje92Rc4Pl6A8bluN8MZyyJGZ0+sNSb//DvAFxC2BqlEsFwccWeAl6CyBcQV1bx4mQMBP1Jxqk1EUADNLeieS2dUFbQ/c/kvwItbZ7tx0st16viqd53WsRmPTKv2AD8CUnhtPWg5aUegNpsYgasaw2+EVooeNKmrW3MFtj76bYHJm5K9gpAXZXsE5U8DM8XmVOSJ1F1WnLy6nQup+jx52bAb+rCq6y9WXl2B2oZDhfDkW7H3oYfT/4xx5VncBuxMXP2lNfhUVQjSSzSRbuZFE4vFawlzveXxaYKVs8LpvAb8IRYF3ZHiRnm0ADeNPWocwxSzNseG7NrSEVZoHdKWqaGEBz1N8Pt7kFbqh3LYmAbm9i1IChIpLpM5AS6mr6OAPHMwwznVy61YpBYX8xZDN/a+lt7n+x5j4bNOVteZ8lj3hpAHSx1VR8vZHec4AHO9XFCdjZ9eRkSV65ljMmZVzaej2qFn/qt1lvWzNZEfHxK3qOJrHL6crr0CRzMox5f2e8ALBB4UGFZKA3tN6F6IXd32GTJXGQ7DTi9j/dNcLF9jCbDcWGKxoKTYblIwbLDReL00LRcDPMcQuXLMh5YzgtfjkFK1DP1iDzzYYVZz5M/kWYRlRpig1htVRjVCknm+h1M5LiEDXOyHREhvzCGpFZjHS0RsK27o2avgdilrJkalWqPW3D9gmwV37HKmfM3F8YZj2ar+vHFvf3B8CRoH4kDHIK9mrAg+owiEwNjjd9V+FsQKYR8czJrUkf7Qoi2YaW6EVDZp5zYlqiYtuXOTHk4fAcZ7qBbdLDiJq0WNV1l2+Hntk1mMWvxrYmc8kIx8G3rW36J6Ra4lLrTOCgiOihmow+YnzUT19jbV2B3RWqSHyxkhmgsBqMYWvOcUom1jDQ436+fcbu3xf2bbeqU/ca+C4DOKE+e3qvmeMqW3AxejfzBRFVcwVYPq4L0APSWWoJu+5UYX4qg5U6YTioqQGPG9XrnuZ/BkxuYpe6Li87+18EskyQW/uA+uk2rpHpr6hut2TlVbKgWkFpx+AZffweiw2+VittkEyf/ifinS/0ItRL2Jq3tQOcxPaWO2xrG68GdFoUpZgFXaP2wYVtRc6xYCfI1CaBqyWpg4bx8OHBQwsV4XWMibZZ0LYjWEy2IxQ1mZrf1/UNbYCJplWu3nZ4WpodIGVA05d+RWSS+ET9tH3RfGGmNI1cIY7evZZq7o+a0bjjygpmR3mVfalkT/SZGT27Q8QGalwGlDOS9VHCyFAIL0a1Q7JiW3saz9gqY8lqKynFrPCzxkU4SIfLc9VfCI5edgRhDXs0edO992nhTKHriREP1NJC6SROMgQ0xO5kNNZOhMOIT99AUElbxqeZF8A3xrfDJsWtDnUenAHdYWSwAbYjFqQZ+D5gi3hNK8CSxU9i6f6ClL9IGlj1OPMQAsr84YG6ijsJpCaGWj75c3yOZKBB9mNpQNPUKkK0D6wgLH8MGoyRxTX6Y05Q4AnYNXMZwXM4eij/9WpsM/9CoRnFQXGR6MEaY+FXvXEO3RO0JaStk6OXuHVATHJE+1W+TU3bSZ2ksMtqjO0zfSJCdBv7y2d8DMx6TfVme3q0ZpTKMMu4YL/t7ciTNtdDkwPogh3Cnjx7qk08SHwf+dksZ7M2vCOlfsF0hQ6J4ehPCaHTNrM/zBSOqD83dBEBCW/F/LEmeh0nOHd7oVl3/Qo/9GUDkkbj7yz+9cvvu+dDAtx8NzCDTP4iKdZvk9MWiizvtILLepysflSvTLFBZ37RLwiriqyRxYv/zrgFd/9XVHh/OmzBvDX4mitMR/lUavs2Vx6cR94lzAkplm3IRNy4TFfu47tuYs9EQPIPVta4P64tV+sZ7n3ued3cgEx2YK+QL5+xms6osk8qQbTyuKVGdaX9FQqk6qfDnT5ykxk0VK7KZ62b6DNDUfQlqGHxSMKv1P0XN5BqMeKG1P4Wp5QfZDUCEldppoX0U6ss2jIko2XpURKCIhfaOqLPfShdtS37ZrT+jFRSH2xYVV1rmT/MBtRQhxiO4MQ3iAGlaZi+9PWBEIXOVnu9jN1f921lWLZky9bqbM3J2MAAI9jmuAx3gyoEUa6P2ivs0EeNv/OR+AX6q5SW6l5HaoFuS6jr6yg9limu+P0KYKzfMXWcQSfTXzpOzKEKpwI3YGXZpSSy2LTlMgfmFA3CF6R5c9xWEtRuCg2ZPUQ2Nb6dRFTNd4TfGHrnEWSKHPuRyiJSDAZ+KX0VxmSHjGPbQTLVpqixia2uyhQ394gBMt7C3ZAmxn/DJS+l1fBsAo2Eir/C0jG9csd4+/tp12pPc/BVJGaK9mfvr7M/CeztrmCO5qY06Edi4xAGtiEhnWAbzLy2VEyazE1J5nPmgU4RpW4Sa0TnOT6w5lgt3/tMpROigHHmexBGAMY0mdcDbDxWIz41NgdD6oxgHsJRgr5RnT6wZAkTOcStU4NMOQNemSO7gxGahdEsC+NRVGxMUhQmmM0llWRbbmFGHzEqLM4Iw0H7577Kyo+Zf+2cUFIOw93gEY171vQaM0HLwpjpdRR6Jz7V0ckE7XzYJ0TmY9znLdzkva0vNrAGGT5SUZ5uaHDkcGvI0ySpwkasEgZPMseYcu85w8HPdSNi+4T6A83iAwDbxgeFcB1ZM2iGXzFcEOUlYVrEckaOyodfvaYSQ7GuB4ISE0nYJc15X/1ciDTPbPCgYJK55VkEor4LvzL9S2WDy4xj+6FOqVyTAC2ZNowheeeSI5hA/02l8UYkv4nk9iaVn+kCVEUstgk5Hyq+gJm6R9vG3rhuM904he/hFmNQaUIATB1y3vw+OmxP4X5Yi6A5I5jJufHCjF9+AGNwnEllZjUco6XhsO5T5+R3yxz5yLVOnAn0zuS+6zdj0nTJbEZCbXJdtpfYZfCeCOqJHoE2vPPFS6eRLjIJlG69X93nfR0mxSFXzp1Zc0lt/VafDaImhUMtbnqWVb9M4nGNQLN68BHP7AR8Il9dkcxzmBv8PCZlw9guY0lurbBsmNYlwJZsA/B15/HfkbjbwPddaVecls/elmDHNW2r4crAx43feNkfRwsaNq/yyJ0d/p5hZ6AZajz7DBfUok0ZU62gCzz7x8eVfJTKA8IWn45vINLSM1q+HF9CV9qF3zP6Ml21kPPL3CXzkuYUlnSqT+Ij4tI/od5KwIs+tDajDs64owN7tOAd6eucGz+KfO26iNcBFpbWA5732bBNWO4kHNpr9D955L61bvHCF/mwSrz6eQaDjfDEANqGMkFc+NGxpKZzCD2sj/JrHd+zlPQ8Iz7Q+2JVIiVCuCKoK/hlAEHzvk/Piq3mRL1rT/fEh9hoT5GJmeYswg1otiKydizJ/fS2SeKHVu6Z3JEHjiW8NaTQgP5xdBli8nC57XiN9hrquBu99hn9zqwo92+PM2JXtpeVZS0PdqR5mDyDreMMtEws+CpwaRyyzoYtfcvt9PJIW0fJVNNi/FFyRsea7peLvJrL+5b4GOXJ8tAr+ATk9f8KmiIsRhqRy0vFzwRV3Z5dZ3QqIU8JQ/uQpkJbjMUMFj2F9sCFeaBjI4+fL/oN3+LQgjI4zuAfQ+3IPIPFQBccf0clJpsfpnBxD84atwtupkGqKvrH7cGNl/QcWcSi6wcVDML6ljOgYbo+2BOAWNNjlUBPiyitUAwbnhFvLbnqw42kR3Yp2kv2dMeDdcGOX5kT4S6M44KHEB/SpCfl7xgsUvs+JNY9G3O2X/6FEt9FyAn57lrbiu+tl83sCymSvq9eZbe9mchL7MTf/Ta78e80zSf0hYY5eUU7+ff14jv7Xy8qjzfzzzvaJnrIdvFb5BLWKcWGy5/w7+vV2cvIfwHqdTB+RuJK5oj9mbt0Hy94AmjMjjwYNZlNS6uiyxNnwNyt3gdreLb64p/3+08nXkb92LTkkRgFOwk1oGEVllcOj5lv1hfAZywDows0944U8vUFw+A/nuVq/UCygsrmWIBnHyU01d0XJPwriEOvx/ISK6Pk4y2w0gmojZs7lU8TtakBAdne4v/aNxmMpK4VcGMp7si0yqsiolXRuOi1Z1P7SqD3Zmp0CWcyK4Ubmp2SXiXuI5nGLCieFHKHNRIlcY3Pys2dwMTYCaqlyWSITwr2oGXvyU3h1Pf8eQ3w1bnD7ilocVjYDkcXR3Oo1BXgMLTUjNw2xMVwjtp99NhSVc5aIWrDQT5DHPKtCtheBP4zHcw4dz2eRdTMamhlHhtfgqJJHI7NGDUw1XL8vsSeSHyKqDtqoAmrQqsYwvwi7HW3ojWyhIa5oz5xJTaq14NAzFLjVLR12rRNUQ6xohDnrWFb5bG9yf8aCD8d5phoackcNJp+Dw3Due3RM+5Rid7EuIgsnwgpX0rUWh/nqPtByMhMZZ69NpgvRTKZ62ViZ+Q7Dp5r4K0d7EfJuiy06KuIYauRh5Ecrhdt2QpTS1k1AscEHvapNbU3HL1F2TFyR33Wxb5MvH5iZsrn3SDcsxlnnshO8PLwmdGN+paWnQuORtZGX37uhFT64SeuPsx8UOokY6ON85WdQ1dki5zErsJGazcBOddWJEKqNPiJpsMD1GrVLrVY+AOdPWQneTyyP1hRX/lMM4ZogGGOhYuAdr7F/DOiAoc++cn5vlf0zkMUJ40Z1rlgv9BelPqVOpxKeOpzKdF8maK+1Vv23MO9k/8+qpLoxrIGH2EDQlnGmH8CD31G8QqlyQIcpmR5bwmSVw9/Ns6IHgulCRehvZ/+VrM60Cu/r3AontFfrljew74skYe2uyn7JKQtFQBQRJ9ryGic/zQOsbS4scUBctA8cPToQ3x6ZBQu6DPu5m1bnCtP8TllLYA0UTQNVqza5nfew3Mopy1GPUwG5jsl0OVXniPmAcmLqO5HG8Hv3nSLecE9oOjPDXcsTxoCBxYyzBdj4wmnyEV4kvFDunipS8SSkvdaMnTBN9brHUR8xdmmEAp/Pdqk9uextp1t+JrtXwpN/MG2w/qhRMpSNxQ1uhg/kKO30eQ/FyHUDkWHT8V6gGRU4DhDMxZu7xXij9Ui6jlpWmQCqJg3FkOTq3WKneCRYZxBXMNAVLQgHXSCGSqNdjebY94oyIpVjMYehAiFx/tqzBXFHZaL5PeeD74rW5OysFoUXY8sebUZleFTUa/+zBKVTFDopTReXNuZq47QjkWnxjirCommO4L/GrFtVV21EpMyw8wyThL5Y59d88xtlx1g1ttSICDwnof6lt/6zliPzgVUL8jWBjC0o2D6Kg+jNuThkAlaDJsq/AG2aKA//A76avw2KNqtv223P+Wq3StRDDNKFFgtsFukYt1GFDWooFVXitaNhb3RCyJi4cMeNjROiPEDb4k+G3+hD8tsg+5hhmSc/8t2JTSwYoCzAI75doq8QTHe+E/Tw0RQSUDlU+6uBeNN3h6jJGX/mH8oj0i3caCNsjvTnoh73BtyZpsflHLq6AfwJNCDX4S98h4+pCOhGKDhV3rtkKHMa3EG4J9y8zFWI4UsfNzC/Rl5midNn7gwoN9j23HGCQQ+OAZpTTPMdiVow740gIyuEtd0qVxMyNXhHcnuXRKdw5wDUSL358ktjMXmAkvIB73BLa1vfF9BAUZInPYJiwxqFWQQBVk7gQH4ojfUQ/KEjn+A/WR6EEe4CtbpoLe1mzHkajgTIoE0SLDHVauKhrq12zrAXBGbPPWKCt4DGedq3JyGRbmPFW32bE7T20+73BatV/qQhhBWfWBFHfhYWXjALts38FemnoT+9bn1jDBMcUMmYgSc0e7GQjv2MUBwLU8ionCpgV+Qrhg7iUIfUY6JFxR0Y+ZTCPM+rVuq0GNLyJXX6nrUTt8HzFBRY1E/FIm2EeVA9NcXrj7S6YYIChVQCWr/m2fYUjC4j0XLkzZ8GCSLfmkW3PB/xq+nlXsKVBOj7vTvqKCOMq7Ztqr3cQ+N8gBnPaAps+oGwWOkbuxnRYj/x/WjiDclVrs22xMK4qArE1Ztk1456kiJriw6abkNeRHogaPRBgbgF9Z8i/tbzWELN4CvbqtrqV9TtGSnmPS2F9kqOIBaazHYaJ9bi3AoDBvlZasMluxt0BDXfhp02Jn411aVt6S4TUB8ZgFDkI6TP6gwPY85w+oUQSsjIeXVminrwIdK2ZAawb8Se6XOJbOaliQxHSrnAeONDLuCnFejIbp4YDtBcQCwMsYiRZfHefuEJqJcwKTTJ8sx5hjHmJI1sPFHOr6W9AhZ2NAod38mnLQk1gOz2LCAohoQbgMbUK9RMEA3LkiF7Sr9tLZp6lkciIGhE2V546w3Mam53VtVkGbB9w0Yk2XiRnCmbpxmHr2k4eSC0RuNbjNsUfDIfc8DZvRvgUDe1IlKdZTzcT4ZGEb53dp8VtsoZlyXzLHOdAbsp1LPTVaHvLA0GYDFMbAW/WUBfUAdHwqLFAV+3uHvYWrCfhUOR2i89qvCBoOb48usAGdcF2M4aKn79k/43WzBZ+xR1L0uZfia70XP9soQReeuhZiUnXFDG1T8/OXNmssTSnYO+3kVLAgeiY719uDwL9FQycgLPessNihMZbAKG7qwPZyG11G1+ZA3jAX2yddpYfmaKBlmfcK/V0mwIRUDC0nJSOPUl2KB8h13F4dlVZiRhdGY5farwN+f9hEb1cRi41ZcGDn6Xe9MMSTOY81ULJyXIHSWFIQHstVYLiJEiUjktlHiGjntN5/btB8Fu+vp28zl2fZXN+dJDyN6EXhS+0yzqpl/LSJNEUVxmu7BsNdjAY0jVsAhkNuuY0E1G48ej25mSt+00yPbQ4SRCVkIwb6ISvYtmJRPz9Zt5dk76blf+lJwAPH5KDF+vHAmACLoCdG2Adii6dOHnNJnTmZtoOGO8Q1jy1veMw6gbLFToQmfJa7nT7Al89mRbRkZZQxJTKgK5Kc9INzmTJFp0tpAPzNmyL/F08bX3nhCumM/cR/2RPn9emZ3VljokttZD1zVWXlUIqEU7SLk5I0lFRU0AcENXBYazNaVzsVHA/sD3o9hm42wbHIRb/BBQTKzAi8s3+bMtpOOZgLdQzCYPfX3UUxKd1WYVkGH7lh/RBBgMZZwXzU9+GYxdBqlGs0LP+DZ5g2BWNh6FAcR944B+K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2tK4X0CgVNYhmkqqQysRNtKuPdCJqK3WW57kaV17vXgiyPrl4KEEWgiGF1euI4QkSFHFf0TDroQiLNKJiLbdhH0YBhriRNCHPxSqJmNNoketaioohqMglh6wLtEGWSM1EZbQg72h0UJAIPVFCAJOThpQGGdKfFovcwEeiBuZHN2Ob4uVM7+gwZLz1D9E7ta4RmMZ24OBBAg7Eh6dLXGofZ4U2TFOCQMKjwhVckjrydRS+YaqCw1kYt6UexuzbNEDyYLTZnrY1PzsHZJT4U+awO2xlqTSYu6n/U29O2wPXgGOEKDMSq+zTUtyc8+6iLp0ivav4FKx+xxVy4FxhIF/pucVDqpsVe2jFOfdZhTzLz2QjtzvsTCvDPU7bzDH2eXVKUV9TZ+qFtaSSxnYgYdXKwVreIgvWhT9eGDB2OvnWyPLfIIIfNnfIxU8nW7MbcH05nhlsYtaW9EZRsxWcKdEqInq1DiZPKCz7iGmAU9/ccnnQud2pNgIGFYOTAWjhIrd63aPDgfj8/sdlD4l+UTlcxTI9jbaMqqN0gQxSHs60IAcW3cH4p3V1aSciTKB29L1tz2eUQhRiTgTvmqc+sGtBNh4ky0mQJGsdycBREP+fAaSs1EREDVo5gvgi5+aCN7NECw30owbCc1mSpjiahyNVwJd1jiGgzSwfTpzf2c5XJvG/g1n0fH88KHNnf+u7ZiRMlXueSIsloJBUtW9ezvsx9grfsX/FNxnbxU1Lvg0hLxixypHKGFAaPu0xCD8oDTeFSyfRT6s8109GMUZL8m2xXp8X2dpPCWWdX84iga4BrTlOfqox4shqEgh/Ht4qRst52cA1xOIUuOxgfUivp6v5f8IVyaryEdpVk72ERAwdT4aoY1usBgmP+0m06Q216H/nubtNYxHaOIYjcach3A8Ez/zc0KcShhel0HCYjFsA0FjYqyJ5ZUH1aZw3+zWC0hLpM6GDfcAdn9fq2orPmZbW6XXrf+Krc9RtvII5jeD3dFoT1KwZJwxfUMvc5KLfn8rROW23Jw89sJ2a5dpB3qWDUBWF2iX8OCuKprHosJ2mflBR+Wqs86VvgI/XMnsqb97+VlKdPVysczPj8Jhzf+WCvGBHijAqYlavbF60soMWlHbvKT+ScvhprgeTln51xX0sF+Eadc/l2s2a5BgkVbHYyz0E85p0LstqH+gEGiR84nBRRFIn8hLSZrGwqjZ3E29cuGi+5Z5bp7EM8MWFa9ssS/vy4VrDfECSv7DSU84DaP0sXI3Ap4lWznQ65nQoTKRWU30gd7Nn8ZowUvGIx4aqyXGwmA/PB4qN8msJUODezUHEl0VP9uo+cZ8vPFodSIB4C7lQYjEFj8yu49C2KIV3qxMFYTevG8KqAr0TPlkbzHHnTpDpvpzziAiNFh8xiT7C/TiyH0EguUw4vxAgpnE27WIypV+uFN2zW7xniF/n75trs9IJ5amB1zXXZ1LFkJ6GbS/dFokzl4cc2mamVwhL4XU0Av5gDWAl+aEWhAP7t2VIwU+EpvfOPDcLASX7H7lZpXA2XQfbSlD4qU18NffNPoAKMNSccBfO9YVVgmlW4RydBqfHAV7+hrZ84WJGho6bNT0YMhxxLdOx/dwGj0oyak9aAkNJ8lRJzUuA8sR+fPyiyTgUHio5+Pp+YaKlHrhR41jY5NESPS3x+zTMe0S2HnLOKCOQPpdxKyviBvdHrCDRqO+l96HhhNBLXWv4yEMuEUYo8kXnYJM8oIgVM4XJ+xXOev4YbWeqsvgq0lmw4/PiYr9sYLt+W5EAuYSFnJEan8CwJwbtASBfLBBpJZiRPor/aCJBZsM+MhvS7ZepyHvU8m5WSmaZnxuLts8ojl6KkS8oSAHkq5GWlCB/NgJ5W3rO2Cj1MK7ahxsCrbTT3a0V/QQH+sErxV4XUWDHx0kkFy25bPmBMBQ6BU3HoHhhYcJB9JhP6NXUWKxnE0raXHB6U9KHpWdQCQI72qevp5fMzcm+AvC85rsynVQhruDA9fp9COe7N56cg1UKGSas89vrN+WlGLYTwi5W+0xYdKEGtGCeNJwXKDU0XqU5uQYnWsMwTENLGtbQMvoGjIFIEMzCRal4rnBAg7D/CSn8MsCvS+FDJJAzoiioJEhZJgAp9n2+1Yznr7H+6eT4YkJ9Mpj60ImcW4i4iHDLn9RydB8dx3QYm3rsX6n4VRrZDsYK6DCGwkwd5n3/INFEpk16fYpP6JtMQpqEMzcOfQGAHXBTEGzuLJ03GYQL9bmV2/7ExDlRf+Uvf1sM2frRtCWmal12pMgtonvSCtR4n1CLUZRdTHDHP1Otwqd+rcdlavnKjUB/OYXQHUJzpNyFoKpQK+2OgrEKpGyIgIBgn2y9QHnTJihZOpEvOKIoHAMGAXHmj21Lym39Mbiow4IF+77xNuewziNVBxr6KD5e+9HzZSBIlUa/AmsDFJFXeyrQakR3FwowTGcADJHcEfhGkXYNGSYo4dh4bxwLM+28xjiqkdn0/3R4UEkvcBrBfn/SzBc1XhKM2VPlJgKSorjDac96V2UnQYXl1/yZPT4DVelgO+soMjexXwYO58VLl5xInQUZI8jc3H2CPnCNb9X05nOxIy4MlecasTqGK6s2az4RjpF2cQP2G28R+7wDPsZDZC/kWtjdoHC7SpdPmqQrUAhMwKVuxCmYTiD9q/O7GHtZvPSN0CAUQN/rymXZNniYLlJDE70bsk6Xxsh4kDOdxe7A2wo7P9F5YvqqRDI6brf79yPCSp4I0jVoO4YnLYtX5nzspR5WB4AKOYtR1ujXbOQpPyYDvfRE3FN5zw0i7reehdi7yV0YDRKRllGCGRk5Yz+Uv1fYl2ZwrnGsqsjgAVo0xEUba8ohjaNMJNwTwZA/wBDWFSCpg1eUH8MYL2zdioxRTqgGQrDZxQyNzyBJPXZF0+oxITJAbj7oNC5JwgDMUJaM5GqlGCWc//KCIrI+aclEe4IA0uzv7cuj6GCdaJONpi13O544vbtIHBF+A+JeDFUQNy61Gki3rtyQ4aUywn6ru314/dkGiP8Iwjo0J/2Txs49ZkwEl4mx+iYUUO55I6pJzU4P+7RRs+DXZkyKUYZqVWrPF4I94m4Wx1tXeE74o9GuX977yvJ/jkdak8+AmoHVjI15V+WwBdARFV2IPirJgVMdsg1Pez2VNHqa7EHWdTkl3XTcyjG9BiueWFvQfXI8aWSkuuRmqi/HUuzqyvLJfNfs0txMqldYYflWB1BS31WkuPJGGwXUCpjiQSktkuBMWwHjSkQxeehqw1Kgz0Trzm7QbtgxiEPDVmWCNCAeCfROTphd1ZNOhzLy6XfJyG6Xgd5MCAZw4xie0Sj5AnY1/akDgNS9YFl3Y06vd6FAsg2gVQJtzG7LVq1OH2frbXNHWH/NY89NNZ4QUSJqL2yEcGADbT38X0bGdukqYlSoliKOcsSTuqhcaemUeYLLoI8+MZor2RxXTRThF1LrHfqf/5LcLAjdl4EERgUysYS2geE+yFdasU91UgUDsc2cSQ1ZoT9+uLOwdgAmifwQqF028INc2IQEDfTmUw3eZxvz7Ud1z3xc1PQfeCvfKsB9jOhRj7rFyb9XcDWLcYj0bByosychMezMLVkFiYcdBBQtvI6K0KRuOZQH2kBsYHJaXTkup8F0eIhO1/GcIwWKpr2mouB7g5TUDJNvORXPXa/mU8bh27TAZYBe2sKx4NSv5OjnHIWD2RuysCzBlUfeNXhDd2jxnHoUlheJ3jBApzURy0fwm2FwwsSU0caQGl0Kv8hopRQE211NnvtLRsmCNrhhpEDoNiZEzD2QdJWKbRRWnaFedXHAELSN0t0bfsCsMf0ktfBoXBoNA+nZN9+pSlmuzspFevmsqqcMllzzvkyXrzoA+Ryo1ePXpdGOoJvhyru+EBRsmOp7MXZ0vNUMUqHLUoKglg1p73sWeZmPc+KAw0pE2zIsFFE5H4192KwDvDxdxEYoDBDNZjbg2bmADTeUKK57IPD4fTYF4c6EnXx/teYMORBDtIhPJneiZny7Nv/zG+YmekIKCoxr6kauE2bZtBLufetNG0BtBY7f+/ImUypMBvdWu/Q7vTMRzw5aQGZWuc1V0HEsItFYMIBnoKGZ0xcarba/TYZq50kCaflFysYjA4EDKHqGdpYWdKYmm+a7TADmW35yfnOYpZYrkpVEtiqF0EujI00aeplNs2k+qyFZNeE3CDPL9P6b4PQ/kataHkVpLSEVGK7EX6rAa7IVNrvZtFvOA6okKvBgMtFDAGZOx88MeBcJ8AR3AgUUeIznAN6tjCUipGDZONm1FjWJp4A3QIzSaIOmZ7DvF/ysYYbM/fFDOV0jntAjRdapxJxL0eThpEhKOjCDDq2ks+3GrwxqIFKLe1WdOzII8XIOPGnwy6LKXVfpSDOTEfaRsGujhpS4hBIsMOqHbl16PJxc4EkaVu9wpEYlF/84NSv5Zum4drMfp9yXbzzAOJqqS4YkI4cBrFrC7bMPiCfgI3nNZAqkk3QOZqR+yyqx+nDQKBBBZ7QKrfGMCL+XpqFaBJU0wpkBdAhbR4hJsmT5aynlvkouoxm/NjD5oe6BzVIO9uktM+/5dEC5P7vZvarmuO/lKXz4sBabVPIATuKTrwbJP8XUkdM6uEctHKXICUJGjaZIWRbZp8czquQYfY6ynBUCfIU+gG6wqSIBmYIm9pZpXdaL121V7q0VjDjmQnXvMe7ysoEZnZL15B0SpxS1jjd83uNIOKZwu5MPzg2NhOx3xMOPYwEn2CUzbSrwAs5OAtrz3GAaUkJOU74XwjaYUmGJdZBS1NJVkGYrToINLKDjxcuIlyfVsKQSG/G4DyiO2SlQvJ0d0Ot1uOG5IFSAkq+PRVMgVMDvOIJMdqjeCFKUGRWBW9wigYvcbU7CQL/7meF2KZAaWl+4y9uhowAX7elogAvItAAxo2+SFxGRsHGEW9BnhlTuWigYxRcnVUBRQHV41LV+Fr5CJYV7sHfeywswx4XMtUx6EkBhR+q8AXXUA8uPJ73Pb49i9KG9fOljvXeyFj9ixgbo6CcbAJ7WHWqKHy/h+YjBwp6VcN7M89FGzQ04qbrQtgrOFybg3gQRTYG5xn73ArkfQWjCJROwy3J38Dx/D7jOa6BBNsitEw1wGq780EEioOeD+ZGp2J66ADiVGMayiHYucMk8nTK2zzT9CnEraAk95kQjy4k0GRElLL5YAKLQErJ5rp1eay9O4Fb6yJGm9U4FaMwPGxtKD6odIIHKoWnhKo1U8KIpFC+MVn59ZXmc7ZTBZfsg6FQ8W10YfTr4u0nYrpHZbZ1jXiLmooF0cOm0+mPnJBXQtepc7n0BqOipNCqI6yyloTeRShNKH04FIo0gcMk0H/xThyN4pPAWjDDkEp3lNNPRNVfpMI44CWRlRgViP64eK0JSRp0WUvCWYumlW/c58Vcz/yMwVcW5oYb9+26TEhwvbxiNg48hl1VI1UXTU//Eta+BMKnGUivctfL5wINDD0giQL1ipt6U7C9cd4+lgqY2lMUZ02Uv6Prs+ZEZer7ZfWBXVghlfOOrClwsoOFKzWEfz6RZu1eCs+K8fLvkts5+BX0gyrFYve0C3qHrn5U/Oh6D/CihmWIrY7HUZRhJaxde+tldu6adYJ+LeXupQw0XExC36RETdNFxcq9glMu4cNQSX9cqR/GQYp+IxUkIcNGWVU7ZtGa6P3XAyodRt0XeS3Tp01AnCh0ZbUh4VrSZeV9RWfSoWyxnY3hzcZ30G/InDq4wxRrEejreBxnhIQbkxenxkaxl+k7eLUQkUR6vKJ2iDFNGX3WmVA1yaOH+mvhBd+sE6vacQzFobwY5BqEAFmejwW5ne7HtVNolOUgJc8CsUxmc/LBi8N5mu9VsIA5HyErnS6zeCz7VLI9+n/hbT6hTokMXTVyXJRKSG2hd2labXTbtmK4fNH3IZBPreSA4FMeVouVN3zG5x9CiGpLw/3pceo4qGqp+rVp+z+7yQ98oEf+nyH4F3+J9IheDBa94Wi63zJbLBCIZm7P0asHGpIJt3PzE3m0S4YIWyXBCVXGikj8MudDPB/6Nm2v4IxJ5gU0ii0guy5SUHqGUYzTP0jIJU5E82RHUXtX4lDdrihBLdP1YaG1AGUC12rQKuIaGvCpMjZC9bWSCYnjDlvpWbkdXMTNeBHLKiuoozMGIvkczmP0aRJSJ8PYnLCVNhKHXBNckH79e8Z8Kc2wUej4sQZoH8qDRGkg86maW/ZQWGNnLcXmq3FlXM6ssR/3P6E/bHMvm6HLrv1yRixit25JsH3/IOr2UV4BWJhxXW5BJ6Xdr07n9kF3ZNAk6/Xpc5MSFmYJ2R7bdL8Kk7q1OU9Elg/tCxJ8giT27wSTySF0GOxg4PbYJdi/Nyia9Nn89CGDulfJemm1aiEr/eleGSN+5MRrVJ4K6lgyTTIW3i9cQ0dAi6FHt0YMbH3wDSAtGLSAccezzxHitt1QdhW36CQgPcA8vIIBh3/JNjf/Obmc2yzpk8edSlS4lVdwgW5vzbYEyFoF4GCBBby1keVNueHAH+evi+H7oOVfS3XuPQSNTXOONAbzJeSb5stwdQHl1ZjrGoE49I8+A9j3t+ahhQj74FCSWpZrj7wRSFJJnnwi1T9HL5qrCFW/JZq6P62XkMWTb+u4lGpKfmmwiJWx178GOG7KbrZGqyWwmuyKWPkNswkZ1q8uptUlviIi+AXh2bOOTOLsrtNkfqbQJeh24reebkINLkjut5r4d9GR/r8CBa9SU0UQhsnZp5cP+RqWCixRm7i4YRFbtZ4EAkhtNa6jHb6gPYQv7MKqkPLRmX3dFsK8XsRLVZ6IEVrCbmNDc8o5mqsogjAQfoC9Bc7R6gfw03m+lQpv6kTfhxscDIX6s0w+fBxtkhjXAXr10UouWCx3C/p/FYwJRS/AXRKkjOb5CLmK4XRe0+xeDDwVkJPZau52bzLEDHCqV0f44pPgKOkYKgTZJ33fmk3Tu8SdxJ02SHM8Fem5SMsWqRyi2F1ynfRJszcFKykdWlNqgDA/L9lKYBmc7Zu/q9ii1FPF47VJkqhirUob53zoiJtVVRVwMR34gV9iqcBaHbRu9kkvqk3yMpfRFG49pKKjIiq7h/VpRwPGTHoY4cg05X5028iHsLvUW/uz+kjPyIEhhcKUwCkJAwbR9pIEGOn8z6svAO8i89sJ3dL5qDWFYbS+HGPRMxYwJItFQN86YESeJQhn2urGiLRffQeLptDl8dAgb+Tp47UQPxWOw17OeChLN1WnzlkPL1T5O+O3Menpn4C3IY5LEepHpnPeZHbvuWfeVtPlkH4LZjPbBrkJT3NoRJzBt86CO0Xq59oQ+8dsm0ymRcmQyn8w71mhmcuEI5byuF+C88VPYly2sEzjlzAQ3vdn/1+Hzguw6qFNNbqenhZGbdiG6RwZaTG7jTA2X9RdXjDN9yj1uQpyO4Lx8KRAcZcbZMafp4wPOd5MdXoFY52V1A8M9hi3sso93+uprE0qYNMjkE22CvK4HuUxqN7oIz5pWuETq1lQAjqlSlqdD2Rnr/ggp/TVkQYjn9lMfYelk2sH5HPdopYo7MHwlV1or9Bxf+QCyLzm92vzG2wjiIjC/ZHEJzeroJl6bdFPTpZho5MV2U86fLQqxNlGIMqCGy+9WYhJ8ob1r0+Whxde9L2PdysETv97O+xVw+VNN1TZSQN5I6l9m5Ip6pLIqLm4a1B1ffH6gHyqT9p82NOjntRWGIofO3bJz5GhkvSWbsXueTAMaJDou99kGLqDlhwBZNEQ4mKPuDvVwSK4WmLluHyhA97pZiVe8g+JxmnJF8IkV/tCs4Jq/HgOoAEGR9tCDsDbDmi3OviUQpG5D8XmKcSAUaFLRXb2lmJTNYdhtYyfjBYZQmN5qT5CNuaD3BVnlkCk7bsMW3AtXkNMMTuW4HjUERSJnVQ0vsBGa1wo3Qh7115XGeTF3NTz8w0440AgU7c3bSXO/KMINaIWXd0oLpoq/0/QJxCQSJ9XnYy1W7TYLBJpHsVWD1ahsA7FjNvRd6mxCiHsm8g6Z0pnzqIpF1dHUtP2ITU5Z1hZHbu+L3BEEStBbL9XYvGfEakv1bmf+bOZGnoiuHEdlBnaChxYKNzB23b8sw8YyT7Ajxfk49eJIAvdbVkdFCe2J0gMefhQ0bIZxhx3fzMIysQNiN8PgOUKxOMur10LduigREDRMZyP4oGWrP1GFY4t6groASsZ421os48wAdnrbovNhLt7ScNULkwZ5AIZJTrbaKYTLjA1oJ3sIuN/aYocm/9uoQHEIlacF1s/TM1fLcPTL38O9fOsjMEIwoPKfvt7opuI9G2Hf/PR4aCLDQ7wNmIdEuXJ/QNL72k5q4NejAldPfe3UVVqzkys8YZ/jYOGOp6c+YzRCrCuq0M11y7TiN6qk7YXRMn/gukxrEimbMQjr3jwRM6dKVZ4RUfWQr8noPXLJq6yh5R3EH1IVOHESst/LItbG2D2vRsZRkAObzvQAAD3mb3/G4NzopI0FAiHfbpq0X72adg6SRj+8OHMShtFxxLZlf/nLgRLbClwl5WmaYSs+yEjkq48tY7Z2bE0N91mJwt+ua0NlRJIDh0HikF4UvSVorFj2YVu9YeS5tfvlVjPSoNu/Zu6dEUfBOT555hahBdN3Sa5Xuj2Rvau1lQNIaC944y0RWj9UiNDskAK1WoL+EfXcC6IbBXFRyVfX/WKXxPAwUyIAGW8ggZ08hcijKTt1YKnUO6QPvcrmDVAb0FCLIXn5id4fD/Jx4tw/gbXs7WF9b2RgXtPhLBG9vF5FEkdHAKrQHZAJC/HWvk7nvzzDzIXZlfFTJoC3JpGgLPBY7SQTjGlUvG577yNutZ1hTfs9/1nkSXK9zzKLRZ3VODeKUovJe0WCq1zVMYxCJMenmNzPIU2S8TA4E7wWmbNkxq9rI2dd6v0VpcAPVMxnDsvWTWFayyqvKZO7Z08a62i/oH2/jxf8rpmfO64in3FLiL1GX8IGtVE9M23yGsIqJbxDTy+LtaMWDaPqkymb5VrQdzOvqldeU0SUi6IirG8UZ3jcpRbwHa1C0Dww9G/SFX3gPvTJQE+kyz+g1BeMILKKO+olcHzctOWgzxYHnOD7dpCRtuZEXACjgqesZMasoPgnuDC4nUviAAxDc5pngjoAITIkvhKwg5d608pdrZcA+qn5TMT6Uo/QzBaOxBCLTJX3Mgk85rMfsnWx86oLxf7p2PX5ONqieTa/qM3tPw4ZXvlAp83NSD8F7+ZgctK1TpoYwtiU2h02HCGioH5tkVCqNVTMH5p00sRy2JU1qyDBP2CII/Dg4WDsIl+zgeX7589srx6YORRQMBfKbodbB743Tl4WLKOEnwWUVBsm94SOlCracU72MSyj068wdpYjyz1FwC2bjQnxnB6Mp/pZ+yyZXtguEaYB+kqhjQ6UUmwSFazOb+rhYjLaoiM+aN9/8KKn0zaCTFpN9eKwWy7/u4EHzO46TdFSNjMfn2iPSJwDPCFHc0I1+vjdAZw5ZjqR/uzi9Zn20oAa5JnLEk/EA3VRWE7J/XrupfFJPtCUuqHPpnlL7ISJtRpSVcB8qsZCm2QEkWoROtCKKxUh3yEcMbWYJwk6DlEBG0bZP6eg06FL3v6RPb7odGuwm7FN8fG4woqtB8e7M5klPpo97GoObNwt+ludTAmxyC5hmcFx+dIvEZKI6igFKHqLH01iY1o7903VzG9QGetyVx5RNmBYUU+zIuSva/yIcECUi4pRmE3VkF2avqulQEUY4yZ/wmNboBzPmAPey3+dSYtBZUjeWWT0pPwCz4Vozxp9xeClIU60qvEFMQCaPvPaA70WlOP9f/ey39macvpGCVa+zfa8gO44wbxpJUlC8GN/pRMTQtzY8Z8/hiNrU+Zq64ZfFGIkdj7m7abcK1EBtws1X4J/hnqvasPvvDSDYWN+QcQVGMqXalkDtTad5rYY0TIR1Eqox3czwPMjKPvF5sFv17Thujr1IZ1Ytl4VX1J0vjXKmLY4lmXipRAro0qVGEcXxEVMMEl54jQMd4J7RjgomU0j1ptjyxY+cLiSyXPfiEcIS2lWDK3ISAy6UZ3Hb5vnPncA94411jcy75ay6B6DSTzK6UTCZR9uDANtPBrvIDgjsfarMiwoax2OlLxaSoYn4iRgkpEGqEkwox5tyI8aKkLlfZ12lO11TxsqRMY89j5JaO55XfPJPDL1LGSnC88Re9Ai+Nu5bZjtwRrvFITUFHPR4ZmxGslQMecgbZO7nHk32qHxYkdvWpup07ojcMCaVrpFAyFZJJbNvBpZfdf39Hdo2kPtT7v0/f8R/B5Nz4f1t9/3zNM/7n6SUHfcWk5dfQFJvcJMgPolGCpOFb/WC0FGWU2asuQyT+rm88ZKZ78Cei/CAh939CH0JYbpZIPtxc2ufXqjS3pHH9lnWK4iJ7OjR/EESpCo2R3MYKyE7rHfhTvWho4cL1QdN4jFTyR6syMwFm124TVDDRXMNveI1Dp/ntwdz8k8kxw7iFSx6+Yx6O+1LzMVrN0BBzziZi9kneZSzgollBnVwBh6oSOPHXrglrOj+QmR/AESrhDpKrWT+8/AiMDxS/5wwRNuGQPLlJ9ovomhJWn8sMLVItQ8N/7IXvtD8kdOoHaw+vBSbFImQsv/OCAIui99E+YSIOMlMvBXkAt+NAZK8wB9Jf8CPtB+TOUOR+z71d/AFXpPBT6+A5FLjxMjLIEoJzrQfquvxEIi+WoUzGR1IzQFNvbYOnxb2PyQ0kGdyXKzW2axQL8lNAXPk6NEjqrRD1oZtKLlFoofrXw0dCNWASHzy+7PSzOUJ3XtaPZsxLDjr+o41fKuKWNmjiZtfkOzItvlV2MDGSheGF0ma04qE3TUEfqJMrXFm7DpK+27DSvCUVf7rbNoljPhha5W7KBqVq0ShUSTbRmuqPtQreVWH4JET5yMhuqMoSd4r/N8sDmeQiQQvi1tcZv7Moc7dT5X5AtCD6kNEGZOzVcNYlpX4AbTsLgSYYliiPyVoniuYYySxsBy5cgb3pD+EK0Gpb0wJg031dPgaL8JZt6sIvzNPEHfVPOjXmaXj4bd4voXzpZ5GApMhILgMbCEWZ2zwgdeQgjNHLbPIt+KqxRwWPLTN6HwZ0Ouijj4UF+Sg0Au8XuIKW0WxlexdrFrDcZJ8Shauat3X0XmHygqgL1nAu2hrJFb4wZXkcS+i36KMyU1yFvYv23bQUJi/3yQpqr/naUOoiEWOxckyq/gq43dFou1DVDaYMZK9tho7+IXXokBCs5GRfOcBK7g3A+jXQ39K4YA8PBRW4m5+yR0ZAxWJncjRVbITvIAPHYRt1EJ3YLiUbqIvoKHtzHKtUy1ddRUQ0AUO41vonZDUOW+mrszw+SW/6Q/IUgNpcXFjkM7F4CSSQ2ExZg85otsMs7kqsQD4OxYeBNDcSpifjMoLb7GEbGWTwasVObmB/bfPcUlq0wYhXCYEDWRW02TP5bBrYsKTGWjnWDDJ1F7zWai0zW/2XsCuvBQjPFcTYaQX3tSXRSm8hsAoDdjArK/OFp6vcWYOE7lizP0Yc+8p16i7/NiXIiiQTp7c7Xus925VEtlKAjUdFhyaiLT7VxDagprMFwix4wZ05u0qj7cDWFd0W9OYHIu3JbJKMXRJ1aYNovugg+QqRN7fNHSi26VSgBpn+JfMuPo3aeqPWik/wI5Rz3BWarPQX4i5+dM0npwVOsX+KsOhC7vDg+OJsz4Q5zlnIeflUWL6QYMbf9WDfLmosLF4Qev3mJiOuHjoor/dMeBpA9iKDkMjYBNbRo414HCxjsHrB4EXNbHzNMDHCLuNBG6Sf+J4MZ/ElVsDSLxjIiGsTPhw8BPjxbfQtskj+dyNMKOOcUYIRBEIqbazz3lmjlRQhplxq673VklMMY6597vu+d89ec/zq7Mi4gQvh87ehYbpOuZEXj5g/Q7S7BFDAAB9DzG35SC853xtWVcnZQoH54jeOqYLR9NDuwxsVthTV7V99n/B7HSbAytbEyVTz/5NhJ8gGIjG0E5j3griULUd5Rg7tQR+90hJgNQKQH2btbSfPcaTOfIexc1db1BxUOhM1vWCpLaYuKr3FdNTt/T3PWCpEUWDKEtzYrjpzlL/wri3MITKsFvtF8QVV/NhVo97aKIBgdliNc10dWdXVDpVtsNn+2UIolrgqdWA4EY8so0YvB4a+aLzMXiMAuOHQrXY0tr+CL10JbvZzgjJJuB1cRkdT7DUqTvnswVUp5kkUSFVtIIFYK05+tQxT6992HHNWVhWxUsD1PkceIrlXuUVRogwmfdhyrf6zzaL8+c0L7GXMZOteAhAVQVwdJh+7nrX7x4LaIIfz2F2v7Dg/uDfz2Fa+4gFm2zHAor8UqimJG3VTJtZEoFXhnDYXvxMJFc6ku2bhbCxzij2z5UNuK0jmp1mnvkVNUfR+SEmj1Lr94Lym75PO7Fs0MIr3GdsWXRXSfgLTVY0FLqba97u1In8NAcY7IC6TjWLigwKEIm43NxTdaVTv9mcKkzuzBkKd8x/xt1p/9BbP7Wyb4bpo1K1gnOpbLvKz58pWl3B55RJ/Z5mRDLPtNQg14jdOEs9+h/V5UVpwrAI8kGbX8KPVPDIMfIqKDjJD9UyDOPhjZ3vFAyecwyq4akUE9mDOtJEK1hpDyi6Ae87sWAClXGTiwPwN7PXWwjxaR79ArHRIPeYKTunVW24sPr/3HPz2IwH8oKH4OlWEmt4BLM6W5g4kMcYbLwj2usodD1088stZA7VOsUSpEVl4w7NMb1EUHMRxAxLF0CIV+0L3iZb+ekB1vSDSFjAZ3hfLJf7gFaXrOKn+mhR+rWw/eTXIcAgl4HvFuBg1LOmOAwJH3eoVEjjwheKA4icbrQCmvAtpQ0mXG0agYp5mj4Rb6mdQ+RV4QBPbxMqh9C7o8nP0Wko2ocnCHeRGhN1XVyT2b9ACsL+6ylUy+yC3QEnaKRIJK91YtaoSrcWZMMwxuM0E9J68Z+YyjA0g8p1PfHAAIROy6Sa04VXOuT6A351FOWhKfTGsFJ3RTJGWYPoLk5FVK4OaYR9hkJvezwF9vQN1126r6isMGXWTqFW+3HL3I/jurlIdDWIVvYY+s6yq7lrFSPAGRdnU7PVwY/SvWbZGpXzy3BQ2LmAJlrONUsZs4oGkly0V267xbD5KMY8woNNsmWG1VVgLCra8aQBBcI4DP2BlNwxhiCtHlaz6OWFoCW0vMR3ErrG7JyMjTSCnvRcsEHgmPnwA6iNpJ2DrFb4gLlhKJyZGaWkA97H6FFdwEcLT6DRQQL++fOkVC4cYGW1TG/3iK5dShRSuiBulmihqgjR45Vi03o2RbQbP3sxt90VxQ6vzdlGfkXmmKmjOi080JSHkLntjvsBJnv7gKscOaTOkEaRQqAnCA4HWtB4XnMtOhpRmH2FH8tTXrIjAGNWEmudQLCkcVlGTQ965Kh0H6ixXbgImQP6b42B49sO5C8pc7iRlgyvSYvcnH9FgQ3azLbQG2cUW96SDojTQStxkOJyOuDGTHAnnWkz29aEwN9FT8EJ4yhXOg+jLTrCPKeEoJ9a7lDXOjEr8AgX4BmnMQ668oW0zYPyQiVMPxKRHtpfnEEyaKhdzNVThlxxDQNdrHeZiUFb6NoY2KwvSb7BnRcpJy+/g/zAYx3fYSN5QEaVD2Y1VsNWxB0BSO12MRsRY8JLfAezRMz5lURuLUnG1ToKk6Q30FughqWN6gBNcFxP/nY/iv+iaUQOa+2Nuym46wtI/DvSfzSp1jEi4SdYBE7YhTiVV5cX9gwboVDMVgZp5YBQlHOQvaDNfcCoCJuYhf5kz5kwiIKPjzgpcRJHPbOhJajeoeRL53cuMahhV8Z7IRr6M4hW0JzT7mzaMUzQpm866zwM7Cs07fJYXuWvjAMkbe5O6V4bu71sOG6JQ4oL8zIeXHheFVavzxmlIyBkgc9IZlEDplMPr8xlcyss4pVUdwK1e7CK2kTsSdq7g5SHRAl3pYUB9Ko4fsh4qleOyJv1z3KFSTSvwEcRO/Ew8ozEDYZSqpfoVW9uhJfYrNAXR0Z3VmeoAD+rVWtwP/13sE/3ICX3HhDG3CMc476dEEC0K3umSAD4j+ZQLVdFOsWL2C1TH5+4KiSWH+lMibo+B55hR3Gq40G1n25sGcN0mEcoU2wN9FCVyQLBhYOu9aHVLWjEKx2JIUZi5ySoHUAI9b8hGzaLMxCZDMLhv8MkcpTqEwz9KFDpCpqQhVmsGQN8m24wyB82FAKNmjgfKRsXRmsSESovAwXjBIoMKSG51p6Um8b3i7GISs7kjTq/PZoioCfJzfKdJTN0Q45kQEQuh9H88M3yEs3DbtRTKALraM0YC8laiMiOOe6ADmTcCiREeAWZelBaEXRaSuj2lx0xHaRYqF65O0Lo5OCFU18A8cMDE4MLYm9w2QSr9NgQAIcRxZsNpA7UJR0e71JL+VU+ISWFk5I97lra8uGg7GlQYhGd4Gc6rxsLFRiIeGO4abP4S4ekQ1fiqDCy87GZHd52fn5aaDGuvOmIofrzpVwMvtbreZ/855OaXTRcNiNE0wzGZSxbjg26v8ko8L537v/XCCWP2MFaArJpvnkep0pA+O86MWjRAZPQRfznZiSIaTppy6m3p6HrNSsY7fDtz7Cl4V/DJAjQDoyiL2uwf1UHVd2AIrzBUSlJaTj4k6NL97a/GqhWKU9RUmjnYKpm2r+JYUcrkCuZKvcYvrg8pDoUKQywY9GDWg03DUFSirlUXBS5SWn/KAntnf0IdHGL/7mwXqDG+LZYjbEdQmqUqq4y54TNmWUP7IgcAw5816YBzwiNIJiE9M4lPCzeI/FGBeYy3p6IAmH4AjXXmvQ4Iy0Y82NTobcAggT2Cdqz6Mx4TdGoq9fn2etrWKUNFyatAHydQTVUQ2S5OWVUlugcNvoUrlA8cJJz9MqOa/W3iVno4zDHfE7zhoY5f5lRTVZDhrQbR8LS4eRLz8iPMyBL6o4PiLlp89FjdokQLaSBmKHUwWp0na5fE3v9zny2YcDXG/jfI9sctulHRbdkI5a4GOPJx4oAJQzVZ/yYAado8KNZUdEFs9ZPiBsausotXMNebEgr0dyopuqfScFJ3ODNPHgclACPdccwv0YJGQdsN2lhoV4HVGBxcEUeUX/alr4nqpcc1CCR3vR7g40zteQg/JvWmFlUE4mAiTpHlYGrB7w+U2KdSwQz2QJKBe/5eiixWipmfP15AFWrK8Sh1GBBYLgzki1wTMhGQmagXqJ2+FuqJ8f0XzXCVJFHQdMAw8xco11HhM347alrAu+wmX3pDFABOvkC+WPX0Uhg1Z5MVHKNROxaR84YV3s12UcM+70cJ460SzEaKLyh472vOMD3XnaK7zxZcXlWqenEvcjmgGNR2OKbI1s8U+iwiW+HotHalp3e1MGDy6BMVIvajnAzkFHbeVsgjmJUkrP9OAwnEHYXVBqYx3q7LvXjoVR0mY8h+ZaOnh053pdsGkmbqhyryN01eVHySr+CkDYkSMeZ1xjPNVM+gVLTDKu2VGsMUJqWO4TwPDP0VOg2/8ITbAUaMGb4LjL7L+Pi11lEVMXTYIlAZ/QHmTENjyx3kDkBdfcvvQt6tKk6jYFM4EG5UXDTaF5+1ZjRz6W7MdJPC+wTkbDUim4p5QQH3b9kGk2Bkilyeur8Bc20wm5uJSBO95GfYDI1EZipoRaH7uVveneqz43tlTZGRQ4a7CNmMHgXyOQQOL6WQkgMUTQDT8vh21aSdz7ERiZT1jK9F+v6wgFvuEmGngSvIUR2CJkc5tx1QygfZnAruONobB1idCLB1FCfO7N1ZdRocT8/Wye+EnDiO9pzqIpnLDl4bkaRKW+ekBVwHn46Shw1X0tclt/0ROijuUB4kIInrVJU4buWf4YITJtjOJ6iKdr1u+flgQeFH70GxKjhdgt/MrwfB4K/sXczQ+9zYcrD4dhY6qZhZ010rrxggWA8JaZyg2pYij8ieYEg1aZJkZK9O1Re7sB0iouf60rK0Gd+AYlp7soqCBCDGwfKeUQhCBn0E0o0GS6PdmjLi0TtCYZeqazqwN+yNINIA8Lk3iPDnWUiIPLGNcHmZDxfeK0iAdxm/T7LnN+gemRL61hHIc0NCAZaiYJR+OHnLWSe8sLrK905B5eEJHNlWq4RmEXIaFTmo49f8w61+NwfEUyuJAwVqZCLFcyHBKAcIVj3sNzfEOXzVKIndxHw+AR93owhbCxUZf6Gs8cz6/1VdrFEPrv330+9s6BtMVPJ3zl/Uf9rUi0Z/opexfdL3ykF76e999GPfVv8fJv/Y/+/5hEMon1tqNFyVRevV9y9/uIvsG3dbB8GRRrgaEXfhx+2xeOFt+cEn3RZanNxdEe2+B6MHpNbrRE53PlDifPvFcp4kO78ILR0T4xyW/WGPyBsqGdoA7zJJCu1TKbGfhnqgnRbxbB2B3UZoeQ2bz2sTVnUwokTcTU21RxN1PYPS3Sar7T0eRIsyCNowr9amwoMU/od9s2APtiKNL6ENOlyKADstAEWKA+sdKDhrJ6BOhRJmZ+QJbAaZ3/5Fq0/lumCgEzGEbu3yi0Y4I4EgVAjqxh4HbuQn0GrRhOWyAfsglQJAVL1y/6yezS2k8RE2MstJLh92NOB3GCYgFXznF4d25qiP4ZCyI4RYGesut6FXK6GwPpKK8WHEkhYui0AyEmr5Ml3uBFtPFdnioI8RiCooa7Z1G1WuyIi3nSNglutc+xY8BkeW3JJXPK6jd2VIMpaSxpVtFq+R+ySK9J6WG5Qvt+C+QH1hyYUOVK7857nFmyDBYgZ/o+AnibzNVqyYCJQvyDXDTK+iXdkA71bY7TL3bvuLxLBQ8kbTvTEY9aqkQ3+MiLWbEgjLzOH+lXgco1ERgzd80rDCymlpaRQbOYnKG/ODoFl46lzT0cjM5FYVvv0qLUbD5lyJtMUaC1pFlTkNONx6lliaX9o0i/1vws5bNKn5OuENQEKmLlcP4o2ZmJjD4zzd3Fk32uQ4uRWkPSUqb4LBe3EXHdORNB2BWsws5daRnMfNVX7isPSb1hMQdAJi1/qmDMfRUlCU74pmnzjbXfL8PVG8NsW6IQM2Ne23iCPIpryJjYbVnm5hCvKpMa7HLViNiNc+xTfDIaKm3jctViD8A1M9YPJNk003VVr4Zo2MuGW8vil8SLaGpPXqG7I4DLdtl8a4Rbx1Lt4w5Huqaa1XzZBtj208EJVGcmKYEuaeN27zT9EE6a09JerXdEbpaNgNqYJdhP1NdqiPKsbDRUi86XvvNC7rME5mrSQtrzAZVndtSjCMqd8BmaeGR4l4YFULGRBeXIV9Y4yxLFdyoUNpiy2IhePSWzBofYPP0eIa2q5JP4j9G8at/AqoSsLAUuRXtvgsqX/zYwsE+of6oSDbUOo4RMJw+DOUTJq+hnqwKim9Yy/napyZNTc2rCq6V9jHtJbxGPDwlzWj/Sk3zF/BHOlT/fSjSq7FqlPI1q6J+ru8Aku008SFINXZfOfnZNOvGPMtEmn2gLPt+H4QLA+/SYe4j398auzhKIp2Pok3mPC5q1IN1HgR+mnEfc4NeeHYwd2/kpszR3cBn7ni9NbIqhtSWFW8xbUJuUPVOeeXu3j0IGZmFNiwaNZ6rH4/zQ2ODz6tFxRLsUYZu1bfd1uIvfQDt4YD/efKYv8VF8bHGDgK22w2Wqwpi43vNCOXFJZCGMqWiPbL8mil6tsmOTXAWCyMCw73e2rADZj2IK6rqksM3EXF2cbLb4vjB14wa/yXK5vwU+05MzERJ5nXsXsW21o7M+gO0js2OyKciP5uF2iXyb2DiptwQeHeqygkrNsqVCSlldxBMpwHi1vfc8RKpP/4L3Lmpq6DZcvhDDfxTCE3splacTcOtXdK2g303dIWBVe2wD/Gvja1cClFQ67gw0t1ZUttsUgQ1Veky8oOpS6ksYEc4bqseCbZy766SvL3FodmnahlWJRgVCNjPxhL/fk2wyvlKhITH/VQCipOI0dNcRa5B1M5HmOBjTLeZQJy237e2mobwmDyJNHePhdDmiknvLKaDbShL+Is1XTCJuLQd2wmdJL7+mKvs294whXQD+vtd88KKk0DXP8B1Xu9J+xo69VOuFgexgTrcvI6SyltuLix9OPuE6/iRJYoBMEXxU4shQMf4Fjqwf1PtnJ/wWSZd29rhZjRmTGgiGTAUQqRz+nCdjeMfYhsBD5Lv60KILWEvNEHfmsDs2L0A252351eUoYxAysVaCJVLdH9QFWAmqJDCODUcdoo12+gd6bW2boY0pBVHWL6LQDK5bYWh1V8vFvi0cRpfwv7cJiMX3AZNJuTddHehTIdU0YQ/sQ1dLoF2xQPcCuHKiuCWOY30DHe1OwcClLAhqAKyqlnIbH/8u9ScJpcS4kgp6HKDUdiOgRaRGSiUCRBjzI5gSksMZKqy7Sd51aeg0tgJ+x0TH9YH2Mgsap9N7ENZdEB0bey2DMTrBA1hn56SErNHf3tKtqyL9b6yXEP97/rc+jgD2N1LNUH6RM9AzP3kSipr06RkKOolR7HO768jjWiH1X92jA7dkg7gcNcjqsZCgfqWw0tPXdLg20cF6vnQypg7gLtkazrHAodyYfENPQZsdfnjMZiNu4nJO97D1/sQE+3vNFzrSDOKw+keLECYf7RJwVHeP/j79833oZ0egonYB2FlFE5qj02B/LVOMJQlsB8uNg3Leg4qtZwntsOSNidR0abbZmAK4sCzvt8Yiuz2yrNCJoH5O8XvX/vLeR/BBYTWj0sOPYM/jyxRd5+/JziKAABaPcw/34UA3aj/gLZxZgRCWN6m4m3demanNgsx0P237/Q+Ew5VYnJPkyCY0cIVHoFn2Ay/e7U4P19APbPFXEHX94N6KhEMPG7iwB3+I+O1jd5n6VSgHegxgaSawO6iQCYFgDsPSMsNOcUj4q3sF6KzGaH/0u5PQoAj/8zq6Uc9MoNrGqhYeb2jQo0WlGlXjxtanZLS24/OIN5Gx/2g684BPDQpwlqnkFcxpmP/osnOXrFuu4PqifouQH0eF5qCkvITQbJw/Zvy5mAHWC9oU+cTiYhJmSfKsCyt1cGVxisKu+NymEQIAyaCgud/V09qT3nk/9s/SWsYtha7yNpzBIMM40rCSGaJ9u6lEkl00vXBiEt7p9P5IBCiavynEOv7FgLqPdeqxRiCwuFVMolSIUBcoyfUC2e2FJSAUgYdVGFf0b0Kn2EZlK97yyxrT2MVgvtRikfdaAW8RwEEfN+B7/eK8bBdp7URpbqn1xcrC6d2UjdsKbzCjBFqkKkoZt7Mrhg6YagE7spkqj0jOrWM+UGQ0MUlG2evP1uE1p2xSv4dMK0dna6ENcNUF+xkaJ7B764NdxLCpuvhblltVRAf7vK5qPttJ/9RYFUUSGcLdibnz6mf7WkPO3MkUUhR2mAOuGv8IWw5XG1ZvoVMnjSAZe6T7WYA99GENxoHkMiKxHlCuK5Gd0INrISImHQrQmv6F4mqU/TTQ8nHMDzCRivKySQ8dqkpQgnUMnwIkaAuc6/FGq1hw3b2Sba398BhUwUZSAIO8XZvnuLdY2n6hOXws+gq9BHUKcKFA6kz6FDnpxLPICa3qGhnc97bo1FT/XJk48LrkHJ2CAtBv0RtN97N21plfpXHvZ8gMJb7Zc4cfI6MbPwsW7AilCSXMFIEUEmir8XLEklA0ztYbGpTTGqttp5hpFTTIqUyaAIqvMT9A/x+Ji5ejA4Bhxb/cl1pUdOD6epd3yilIdO6j297xInoiBPuEDW2/UfslDyhGkQs7Wy253bVnlT+SWg89zYIK/9KXFl5fe+jow2rd5FXv8zDPrmfMXiUPt9QBO/iK4QGbX5j/7Rx1c1vzsY8ONbP3lVIaPrhL4+1QrECTN3nyKavGG0gBBtHvTKhGoBHgMXHStFowN+HKrPriYu+OZ05Frn8okQrPaaxoKP1ULCS/cmKFN3gcH7HQlVjraCeQmtjg1pSQxeuqXiSKgLpxc/1OiZsU4+n4lz4hpahGyWBURLi4642n1gn9qz9bIsaCeEPJ0uJmenMWp2tJmIwLQ6VSgDYErOeBCfSj9P4G/vI7oIF+l/n5fp956QgxGvur77ynawAu3G9MdFbJbu49NZnWnnFcQHjxRuhUYvg1U/e84N4JTecciDAKb/KYIFXzloyuE1eYXf54MmhjTq7B/yBToDzzpx3tJCTo3HCmVPYfmtBRe3mPYEE/6RlTIxbf4fSOcaKFGk4gbaUWe44hVk9SZzhW80yfW5QWBHxmtUzvMhfVQli4gZTktIOZd9mjJ5hsbmzttaHQB29Am3dZkmx3g/qvYocyhZ2PXAWsNQiIaf+Q8W/MWPIK7/TjvCx5q2XRp4lVWydMc2wIQkhadDB0xsnw/kSEyGjLKjI4coVIwtubTF3E7MJ6LS6UOsJKj82XVAVPJJcepfewbzE91ivXZvOvYfsmMevwtPpfMzGmC7WJlyW2j0jh7AF1JLmwEJSKYwIvu6DHc3YnyLH9ZdIBnQ+nOVDRiP+REpqv++typYHIvoJyICGA40d8bR7HR2k7do6UQTHF4oriYeIQbxKe4Th6+/l1BjUtS9hqORh3MbgvYrStXTfSwaBOmAVQZzpYNqsAmQyjY56MUqty3c/xH6GuhNvNaG9vGbG6cPtBM8UA3e8r51D0AR9kozKuGGSMgLz3nAHxDNnc7GTwpLj7/6HeWp1iksDeTjwCLpxejuMtpMnGJgsiku1sOACwQ9ukzESiDRN77YNESxR5LphOlcASXA5uIts1LnBIcn1J7BLWs49DMALSnuz95gdOrTZr0u1SeYHinno/pE58xYoXbVO/S+FEMMs5qyWkMnp8Q3ClyTlZP52Y9nq7b8fITPuVXUk9ohG5EFHw4gAEcjFxfKb3xuAsEjx2z1wxNbSZMcgS9GKyW3R6KwJONgtA64LTyxWm8Bvudp0M1FdJPEGopM4Fvg7G/hsptkhCfHFegv4ENwxPeXmYhxwZy7js+BeM27t9ODBMynVCLJ7RWcBMteZJtvjOYHb5lOnCLYWNEMKC59BA7covu1cANa2PXL05iGdufOzkgFqqHBOrgQVUmLEc+Mkz4Rq8O6WkNr7atNkH4M8d+SD1t/tSzt3oFql+neVs+AwEI5JaBJaxARtY2Z4mKoUqxds4UpZ0sv3zIbNoo0J4fihldQTX3XNcuNcZmcrB5LTWMdzeRuAtBk3cZHYQF6gTi3PNuDJ0nmR+4LPLoHvxQIxRgJ9iNNXqf2SYJhcvCtJiVWo85TsyFOuq7EyBPJrAdhEgE0cTq16FQXhYPJFqSfiVn0IQnPOy0LbU4BeG94QjdYNB0CiQ3QaxQqD2ebSMiNjaVaw8WaM4Z5WnzcVDsr4eGweSLa2DE3BWViaxhZFIcSTjgxNCAfelg+hznVOYoe5VqTYs1g7WtfTm3e4/WduC6p+qqAM8H4ZyrJCGpewThTDPe6H7CzX/zQ8Tm+r65HeZn+MsmxUciEWPlAVaK/VBaQBWfoG/aRL/jSZIQfep/89GjasWmbaWzeEZ2R1FOjvyJT37O9B8046SRSKVEnXWlBqbkb5XCS3qFeuE9xb9+frEknxWB5h1D/hruz2iVDEAS7+qkEz5Ot5agHJc7WCdY94Ws61sURcX5nG8UELGBAHZ3i+3VulAyT0nKNNz4K2LBHBWJcTBX1wzf+//u/j/9+//v87+9/l9Lbh/L/uyNYiTsWV2LwsjaA6MxTuzFMqmxW8Jw/+IppdX8t/Clgi1rI1SN0UC/r6tX/4lUc2VV1OQReSeCsjUpKZchw4XUcjHfw6ryCV3R8s6VXm67vp4n+lcPV9gJwmbKQEsmrJi9c2vkwrm8HFbVYNTaRGq8D91t9n5+U+aD/hNtN3HjC/nC/vUoGFSCkXP+NlRcmLUqLbiUBl4LYf1U/CCvwtd3ryCH8gUmGITAxiH1O5rnGTz7y1LuFjmnFGQ1UWuM7HwfXtWl2fPFKklYwNUpF2IL/TmaRETjQiM5SJacI+3Gv5MBU8lP5Io6gWkawpyzNEVGqOdx4YlO1dCvjbWFZWbCmeiFKPSlMKtKcMFLs/KQxtgAHi7NZNCQ32bBAW2mbHflVZ8wXKi1JKVHkW20bnYnl3dKWJeWJOiX3oKPBD6Zbi0ZvSIuWktUHB8qDR8DMMh1ZfkBL9FS9x5r0hBGLJ8pUCJv3NYH+Ae8p40mZWd5m5fhobFjQeQvqTT4VKWIYfRL0tfaXKiVl75hHReuTJEcqVlug+eOIIc4bdIydtn2K0iNZPsYWQvQio2qbO3OqAlPHDDOB7DfjGEfVF51FqqNacd6QmgFKJpMfLp5DHTv4wXlONKVXF9zTJpDV4m1sYZqJPhotcsliZM8yksKkCkzpiXt+EcRQvSQqmBS9WdWkxMTJXPSw94jqI3varCjQxTazjlMH8jTS8ilaW8014/vwA/LNa+YiFoyyx3s/KswP3O8QW1jtq45yTM/DX9a8M4voTVaO2ebvw1EooDw/yg6Y1faY+WwrdVs5Yt0hQ5EwRfYXSFxray1YvSM+kYmlpLG2/9mm1MfmbKHXr44Ih8nVKb1M537ZANUkCtdsPZ80JVKVKabVHCadaLXg+IV8i5GSwpZti0h6diTaKs9sdpUKEpd7jDUpYmHtiX33SKiO3tuydkaxA7pEc9XIQEOfWJlszj5YpL5bKeQyT7aZSBOamvSHl8xsWvgo26IP/bqk+0EJUz+gkkcvlUlyPp2kdKFtt7y5aCdks9ZJJcFp5ZWeaWKgtnXMN3ORwGLBE0PtkEIek5FY2aVssUZHtsWIvnljMVJtuVIjpZup/5VL1yPOHWWHkOMc6YySWMckczD5jUj2mlLVquFaMU8leGVaqeXis+aRRL8zm4WuBk6cyWfGMxgtr8useQEx7k/PvRoZyd9nde1GUCV84gMX8Ogu/BWezYPSR27llzQnA97oo0pYyxobYUJfsj+ysTm9zJ+S4pk0TGo9VTG0KjqYhTmALfoDZVKla2b5yhv241PxFaLJs3i05K0AAIdcGxCJZmT3ZdT7CliR7q+kur7WdQjygYtOWRL9B8E4s4LI8KpAj7bE0dg7DLOaX+MGeAi0hMMSSWZEz+RudXbZCsGYS0QqiXjH9XQbd8sCB+nIVTq7/T/FDS+zWY9q7Z2fdq1tdLb6v3hKKVDAw5gjj6o9r1wHFROdHc18MJp4SJ2Ucvu+iQ9EgkekW8VCM+psM6y+/2SBy8tNN4a3L1MzP+OLsyvESo5gS7IQOnIqMmviJBVc6zbVG1n8eXiA3j46kmvvtJlewwNDrxk4SbJOtP/TV/lIVK9ueShNbbMHfwnLTLLhbZuO79ec5XvfgRwLFK+w1r5ZWW15rVFZrE+wKqNRv5KqsLNfpGgnoUU6Y71NxEmN7MyqwqAQqoIULOw/LbuUB2+uE75gJt+kq1qY4LoxV+qR/zalupea3D5+WMeaRIn0sAI6DDWDh158fqUb4YhAxhREbUN0qyyJYkBU4V2KARXDT65gW3gRsiv7xSPYEKLwzgriWcWgPr0sbZnv7m1XHNFW6xPdGNZUdxFiUYlmXNjDVWuu7LCkX/nVkrXaJhiYktBISC2xgBXQnNEP+cptWl1eG62a7CPXrnrkTQ5BQASbEqUZWMDiZUisKyHDeLFOaJILUo5f6iDt4ZO8MlqaKLto0AmTHVVbkGuyPa1R/ywZsWRoRDoRdNMMHwYTsklMVnlAd2S0282bgMI8fiJpDh69OSL6K3qbo20KfpNMurnYGQSr/stFqZ7hYsxKlLnKAKhsmB8AIpEQ4bd/NrTLTXefsE6ChRmKWjXKVgpGoPs8GAicgKVw4K0qgDgy1A6hFq1WRat3fHF+FkU+b6H4NWpOU3KXTxrIb2qSHAb+qhm8hiSROi/9ofapjxhyKxxntPpge6KL5Z4+WBMYkAcE6+0Hd3Yh2zBsK2MV3iW0Y6cvOCroXlRb2MMJtdWx+3dkFzGh2Pe3DZ9QpSqpaR/rE1ImOrHqYYyccpiLC22amJIjRWVAherTfpQLmo6/K2pna85GrDuQPlH1Tsar8isAJbXLafSwOof4gg9RkAGm/oYpBQQiPUoyDk2BCQ1k+KILq48ErFo4WSRhHLq/y7mgw3+L85PpP6xWr6cgp9sOjYjKagOrxF148uhuaWtjet953fh1IQiEzgC+d2IgBCcUZqgTAICm2bR8oCjDLBsmg+ThyhfD+zBalsKBY1Ce54Y/t9cwfbLu9SFwEgphfopNA3yNxgyDafUM3mYTovZNgPGdd4ZFFOj1vtfFW3u7N+iHEN1HkeesDMXKPyoCDCGVMo4GCCD6PBhQ3dRZIHy0Y/3MaE5zU9mTCrwwnZojtE+qNpMSkJSpmGe0EzLyFelMJqhfFQ7a50uXxZ8pCc2wxtAKWgHoeamR2O7R+bq7IbPYItO0esdRgoTaY38hZLJ5y02oIVwoPokGIzxAMDuanQ1vn2WDQ00Rh6o5QOaCRu99fwDbQcN0XAuqkFpxT/cfz3slGRVokrNU0iqiMAJFEbKScZdmSkTUznC0U+MfwFOGdLgsewRyPKwBZYSmy6U325iUhBQNxbAC3FLKDV9VSOuQpOOukJ/GAmu/tyEbX9DgEp6dv1zoU0IqzpG6gssSjIYRVPGgU1QAQYRgIT8gEV0EXr1sqeh2I6rXjtmoCYyEDCe/PkFEi/Q48FuT29p557iN+LCwk5CK/CZ2WdAdfQZh2Z9QGrzPLSNRj5igUWzl9Vi0rCqH8G1Kp4QMLkuwMCAypdviDXyOIk0AHTM8HBYKh3b0/F+DxoNj4ZdoZfCpQVdnZarqoMaHWnMLNVcyevytGsrXQEoIbubqWYNo7NRHzdc0zvT21fWVirj7g36iy6pxogfvgHp1xH1Turbz8QyyHnXeBJicpYUctbzApwzZ1HT+FPEXMAgUZetgeGMwt4G+DHiDT2Lu+PT21fjJCAfV16a/Wu1PqOkUHSTKYhWW6PhhHUlNtWzFnA7MbY+r64vkwdpfNB2JfWgWXAvkzd42K4lN9x7Wrg4kIKgXCb4mcW595MCPJ/cTfPAMQMFWwnqwde4w8HZYJFpQwcSMhjVz4B8p6ncSCN1X4klxoIH4BN2J6taBMj6lHkAOs8JJAmXq5xsQtrPIPIIp/HG6i21xMGcFgqDXSRF0xQg14d2uy6HgKE13LSvQe52oShF5Jx1R6avyL4thhXQZHfC94oZzuPUBKFYf1VvDaxIrtV6dNGSx7DO0i1p6CzBkuAmEqyWceQY7F9+U0ObYDzoa1iKao/cOD/v6Q9gHrrr1uCeOk8fST9MG23Ul0KmM3r+Wn6Hi6WAcL7gEeaykicvgjzkjSwFsAXIR81Zx4QJ6oosVyJkCcT+4xAldCcihqvTf94HHUPXYp3REIaR4dhpQF6+FK1H0i9i7Pvh8owu3lO4PT1iuqu+DkL2Bj9+kdfGAg2TXw03iNHyobxofLE2ibjsYDPgeEQlRMR7afXbSGQcnPjI2D+sdtmuQ771dbASUsDndU7t58jrrNGRzISvwioAlHs5FA+cBE5Ccznkd8NMV6BR6ksnKLPZnMUawRDU1MZ/ib3xCdkTblHKu4blNiylH5n213yM0zubEie0o4JhzcfAy3H5qh2l17uLooBNLaO+gzonTH2uF8PQu9EyH+pjGsACTMy4cHzsPdymUSXYJOMP3yTkXqvO/lpvt0cX5ekDEu9PUfBeZODkFuAjXCaGdi6ew4qxJ8PmFfwmPpkgQjQlWqomFY6UkjmcnAtJG75EVR+NpzGpP1Ef5qUUbfowrC3zcSLX3BxgWEgEx/v9cP8H8u1Mvt9/rMDYf6sjwU1xSOPBgzFEeJLMRVFtKo5QHsUYT8ZRLCah27599EuqoC9PYjYO6aoAMHB8X1OHwEAYouHfHB3nyb2B+SnZxM/vw/bCtORjLMSy5aZoEpvgdGvlJfNPFUu/p7Z4VVK1hiI0/UTuB3ZPq4ohEbm7Mntgc1evEtknaosgZSwnDC2BdMmibpeg48X8Ixl+/8+xXdbshQXUPPvx8jT3fkELivHSmqbhblfNFShWAyQnJ3WBU6SMYSIpTDmHjdLVAdlADdz9gCplZw6mTiHqDwIsxbm9ErGusiVpg2w8Q3khKV/R9Oj8PFeF43hmW/nSd99nZzhyjCX3QOZkkB6BsH4H866WGyv9E0hVAzPYah2tkRfQZMmP2rinfOeQalge0ovhduBjJs9a1GBwReerceify49ctOh5/65ATYuMsAkVltmvTLBk4oHpdl6i+p8DoNj4Fb2vhdFYer2JSEilEwPd5n5zNoGBXEjreg/wh2NFnNRaIUHSOXa4eJRwygZoX6vnWnqVdCRT1ARxeFrNBJ+tsdooMwqnYhE7zIxnD8pZH+P0Nu1wWxCPTADfNWmqx626IBJJq6NeapcGeOmbtXvl0TeWG0Y7OGGV4+EHTtNBIT5Wd0Bujl7inXgZgfXTM5efD3qDTJ54O9v3Bkv+tdIRlq1kXcVD0BEMirmFxglNPt5pedb1AnxuCYMChUykwsTIWqT23XDpvTiKEru1cTcEMeniB+HQDehxPXNmkotFdwUPnilB/u4Nx5Xc6l8J9jH1EgKZUUt8t8cyoZleDBEt8oibDmJRAoMKJ5Oe9CSWS5ZMEJvacsGVdXDWjp/Ype5x0p9PXB2PAwt2LRD3d+ftNgpuyvxlP8pB84oB1i73vAVpwyrmXW72hfW6Dzn9Jkj4++0VQ4d0KSx1AsDA4OtXXDo63/w+GD+zC7w5SJaxsmnlYRQ4dgdjA7tTl2KNLnpJ+mvkoDxtt1a4oPaX3EVqj96o9sRKBQqU7ZOiupeAIyLMD+Y3YwHx30XWHB5CQiw7q3mj1EDlP2eBsZbz79ayUMbyHQ7s8gu4Lgip1LiGJj7NQj905/+rgUYKAA5qdrlHKIknWmqfuR+PB8RdBkDg/NgnlT89G72h2NvySnj7UyBwD+mi/IWs1xWbxuVwUIVXun5cMqBtFbrccI+DILjsVQg6eeq0itiRfedn89CvyFtpkxaauEvSANuZmB1p8FGPbU94J9medwsZ9HkUYjmI7OH5HuxendLbxTaYrPuIfE2ffXFKhoNBUp33HsFAXmCV/Vxpq5AYgFoRr5Ay93ZLRlgaIPjhZjXZZChT+aE5iWAXMX0oSFQEtwjiuhQQItTQX5IYrKfKB+queTNplR1Hoflo5/I6aPPmACwQCE2jTOYo5Dz1cs7Sod0KTG/3kEDGk3kUaUCON19xSJCab3kNpWZhSWkO8l+SpW70Wn3g0ciOIJO5JXma6dbos6jyisuxXwUUhj2+1uGhcvuliKtWwsUTw4gi1c/diEEpZHoKoxTBeMDmhPhKTx7TXWRakV8imJR355DcIHkR9IREHxohP4TbyR5LtFU24umRPRmEYHbpe1LghyxPx7YgUHjNbbQFRQhh4KeU1EabXx8FS3JAxp2rwRDoeWkJgWRUSKw6gGP5U2PuO9V4ZuiKXGGzFQuRuf+tkSSsbBtRJKhCi3ENuLlXhPbjTKD4djXVnfXFds6Zb+1XiUrRfyayGxJq1+SYBEfbKlgjiSmk0orgTqzSS+DZ5rTqsJbttiNtp+KMqGE2AHGFw6jQqM5vD6vMptmXV9OAjq49Uf/Lx9Opam+Hn5O9p8qoBBAQixzQZ4eNVkO9sPzJAMyR1y4/RCQQ1s0pV5KAU5sKLw3tkcFbI/JqrjCsK4Mw+W8aod4lioYuawUiCyVWBE/qPaFi5bnkgpfu/ae47174rI1fqQoTbW0HrU6FAejq7ByM0V4zkZTg02/YJK2N7hUQRCeZ4BIgSEqgD8XsjzG6LIsSbuHoIdz/LhFzbNn1clci1NHWJ0/6/O8HJMdIpEZbqi1RrrFfoo/rI/7ufm2MPG5lUI0IYJ4MAiHRTSOFJ2oTverFHYXThkYFIoyFx6rMYFgaOKM4xNWdlOnIcKb/suptptgTOTdVIf4YgdaAjJnIAm4qNNHNQqqAzvi53GkyRCEoseUBrHohZsjUbkR8gfKtc/+Oa72lwxJ8Mq6HDfDATbfbJhzeIuFQJSiw1uZprHlzUf90WgqG76zO0eCB1WdPv1IT6sNxxh91GEL2YpgC97ikFHyoaH92ndwduqZ6IYjkg20DX33MWdoZk7QkcKUCgisIYslOaaLyvIIqRKWQj16jE1DlQWJJaPopWTJjXfixEjRJJo8g4++wuQjbq+WVYjsqCuNIQW3YjnxKe2M5ZKEqq+cX7ZVgnkbsU3RWIyXA1rxv4kGersYJjD//auldXGmcEbcfTeF16Y1708FB1HIfmWv6dSFi6oD4E+RIjCsEZ+kY7dKnwReJJw3xCjKvi3kGN42rvyhUlIz0Bp+fNSV5xwFiuBzG296e5s/oHoFtUyUplmPulIPl+e1CQIQVtjlzLzzzbV+D/OVQtYzo5ixtMi5BmHuG4N/uKfJk5UIREp7+12oZlKtPBomXSzAY0KgtbPzzZoHQxujnREUgBU+O/jKKhgxVhRPtbqyHiUaRwRpHv7pgRPyUrnE7fYkVblGmfTY28tFCvlILC04Tz3ivkNWVazA+OsYrxvRM/hiNn8Fc4bQBeUZABGx5S/xFf9Lbbmk298X7iFg2yeimvsQqqJ+hYbt6uq+Zf9jC+Jcwiccd61NKQtFvGWrgJiHB5lwi6fR8KzYS7EaEHf/ka9EC7H8D+WEa3TEACHBkNSj/cXxFeq4RllC+fUFm2xtstYLL2nos1DfzsC9vqDDdRVcPA3Ho95aEQHvExVThXPqym65llkKlfRXbPTRiDepdylHjmV9YTWAEjlD9DdQnCem7Aj/ml58On366392214B5zrmQz/9ySG2mFqEwjq5sFl5tYJPw5hNz8lyZPUTsr5E0F2C9VMPnZckWP7+mbwp/BiN7f4kf7vtGnZF2JGvjK/sDX1RtcFY5oPQnE4lIAYV49U3C9SP0LCY/9i/WIFK9ORjzM9kG/KGrAuwFmgdEpdLaiqQNpCTGZVuAO65afkY1h33hrqyLjZy92JK3/twdj9pafFcwfXONmPQWldPlMe7jlP24Js0v9m8bIJ9TgS2IuRvE9ZVRaCwSJYOtAfL5H/YS4FfzKWKbek+GFulheyKtDNlBtrdmr+KU+ibHTdalzFUmMfxw3f36x+3cQbJLItSilW9cuvZEMjKw987jykZRlsH/UI+HlKfo2tLwemBEeBFtmxF2xmItA/dAIfQ+rXnm88dqvXa+GapOYVt/2waFimXFx3TC2MUiOi5/Ml+3rj/YU6Ihx2hXgiDXFsUeQkRAD6wF3SCPi2flk7XwKAA4zboqynuELD312EJ88lmDEVOMa1W/K/a8tGylZRMrMoILyoMQzzbDJHNZrhH77L9qSC42HVmKiZ5S0016UTp83gOhCwz9XItK9fgXfK3F5d7nZCBUekoLxrutQaPHa16Rjsa0gTrzyjqTnmcIcrxg6X6dkKiucudc0DD5W4pJPf0vuDW8r5/uw24YfMuxFRpD2ovT2mFX79xH6Jf+MVdv2TYqR6/955QgVPe3JCD/WjAYcLA9tpXgFiEjge2J5ljeI/iUzg91KQuHkII4mmHZxC3XQORLAC6G7uFn5LOmlnXkjFdoO976moNTxElS8HdxWoPAkjjocDR136m2l+f5t6xaaNgdodOvTu0rievnhNAB79WNrVs6EsPgkgfahF9gSFzzAd+rJSraw5Mllit7vUP5YxA843lUpu6/5jAR0RvH4rRXkSg3nE+O5GFyfe+L0s5r3k05FyghSFnKo4TTgs07qj4nTLqOYj6qaW9knJTDkF5OFMYbmCP+8H16Ty482OjvERV6OFyw043L9w3hoJi408sR+SGo1WviXUu8d7qS+ehKjpKwxeCthsm2LBFSFeetx0x4AaKPxtp3CxdWqCsLrB1s/j5TAhc1jNZsXWl6tjo/WDoewxzg8T8NnhZ1niUwL/nhfygLanCnRwaFGDyLw+sfZhyZ1UtYTp8TYB6dE7R3VsKKH95CUxJ8u8N+9u2/9HUNKHW3x3w5GQrfOPafk2w5qZq8MaHT0ebeY3wIsp3rN9lrpIsW9c1ws3VNV+JwNz0Lo9+V7zZr6GD56We6gWVIvtmam5GPPkVAbr74r6SwhuL+TRXtW/0pgyX16VNl4/EAD50TnUPuwrW6OcUO2VlWXS0inq872kk7GUlW6o/ozFKq+Sip6LcTtSDfDrPTcCHhx75H8BeRon+KG2wRwzfDgWhALmiWOMO6h3pm1UCZEPEjScyk7tdLx6WrdA2N1QTPENvNnhCQjW6kl057/qv7IwRryHrZBCwVSbLLnFRiHdTwk8mlYixFt1slEcPD7FVht13HyqVeyD55HOXrh2ElAxJyinGeoFzwKA91zfrdLvDxJSjzmImfvTisreI25EDcVfGsmxLVbfU8PGe/7NmWWKjXcdTJ11jAlVIY/Bv/mcxg/Q10vCHwKG1GW/XbJq5nxDhyLqiorn7Wd7VEVL8UgVzpHMjQ+Z8DUgSukiVwWAKkeTlVVeZ7t1DGnCgJVIdBPZAEK5f8CDyDNo7tK4/5DBjdD5MPV86TaEhGsLVFPQSI68KlBYy84FievdU9gWh6XZrugvtCZmi9vfd6db6V7FmoEcRHnG36VZH8N4aZaldq9zZawt1uBFgxYYx+Gs/qW1jwANeFy+LCoymyM6zgG7j8bGzUyLhvrbJkTYAEdICEb4kMKusKT9V3eIwMLsjdUdgijMc+7iKrr+TxrVWG0U+W95SGrxnxGrE4eaJFfgvAjUM4SAy8UaRwE9j6ZQH5qYAWGtXByvDiLSDfOD0yFA3UCMKSyQ30fyy1mIRg4ZcgZHLNHWl+c9SeijOvbOJxoQy7lTN2r3Y8p6ovxvUY74aOYbuVezryqXA6U+fcp6wSV9X5/OZKP18tB56Ua0gMyxJI7XyNT7IrqN8GsB9rL/kP5KMrjXxgqKLDa+V5OCH6a5hmOWemMUsea9vQl9t5Oce76PrTyTv50ExOqngE3PHPfSL//AItPdB7kGnyTRhVUUFNdJJ2z7RtktZwgmQzhBG/G7QsjZmJfCE7k75EmdIKH7xlnmDrNM/XbTT6FzldcH/rcRGxlPrv4qDScqE7JSmQABJWqRT/TUcJSwoQM+1jvDigvrjjH8oeK2in1S+/yO1j8xAws/T5u0VnIvAPqaE1atNuN0cuRliLcH2j0nTL4JpcR7w9Qya0JoaHgsOiALLCCzRkl1UUESz+ze/gIXHGtDwgYrK6pCFKJ1webSDog4zTlPkgXZqxlQDiYMjhDpwTtBW2WxthWbov9dt2X9XFLFmcF+eEc1UaQ74gqZiZsdj63pH1qcv3Vy8JYciogIVKsJ8Yy3J9w/GhjWVSQAmrS0BPOWK+RKV+0lWqXgYMnIFwpcZVD7zPSp547i9HlflB8gVnSTGmmq1ClO081OW/UH11pEQMfkEdDFzjLC1Cdo/BdL3s7cXb8J++Hzz1rhOUVZFIPehRiZ8VYu6+7Er7j5PSZu9g/GBdmNzJmyCD9wiswj9BZw+T3iBrg81re36ihMLjoVLoWc+62a1U/7qVX5CpvTVF7rocSAKwv4cBVqZm7lLDS/qoXs4fMs/VQi6BtVbNA3uSzKpQfjH1o3x4LrvkOn40zhm6hjduDglzJUwA0POabgdXIndp9fzhOo23Pe+Rk9GSLX0d71Poqry8NQDTzNlsa+JTNG9+UrEf+ngxCjGEsDCc0bz+udVRyHQI1jmEO3S+IOQycEq7XwB6z3wfMfa73m8PVRp+iOgtZfeSBl01xn03vMaQJkyj7vnhGCklsCWVRUl4y+5oNUzQ63B2dbjDF3vikd/3RUMifPYnX5Glfuk2FsV/7RqjI9yKTbE8wJY+74p7qXO8+dIYgjtLD/N8TJtRh04N9tXJA4H59IkMmLElgvr0Q5OCeVfdAt+5hkh4pQgfRMHpL74XatLQpPiOyHRs/OdmHtBf8nOZcxVKzdGclIN16lE7kJ+pVMjspOI+5+TqLRO6m0ZpNXJoZRv9MPDRcAfJUtNZHyig/s2wwReakFgPPJwCQmu1I30/tcBbji+Na53i1W1N+BqoY7Zxo+U/M9XyJ4Ok2SSkBtoOrwuhAY3a03Eu6l8wFdIG1cN+e8hopTkiKF093KuH/BcB39rMiGDLn6XVhGKEaaT/vqb/lufuAdpGExevF1+J9itkFhCfymWr9vGb3BTK4j598zRH7+e+MU9maruZqb0pkGxRDRE1CD4Z8LV4vhgPidk5w2Bq816g3nHw1//j3JStz7NR9HIWELO8TMn3QrP/zZp//+Dv9p429/ogv+GATR+n/UdF+ns9xNkXZQJXY4t9jMkJNUFygAtzndXwjss+yWH9HAnLQQfhAskdZS2l01HLWv7L7us5uTH409pqitvfSOQg/c+Zt7k879P3K9+WV68n7+3cZfuRd/dDPP/03rn+d+/nBvWfgDlt8+LzjqJ/vx3CnNOwiXhho778C96iD+1TBvRZYeP+EH81LE0vVwOOrmCLB3iKzI1x+vJEsrPH4uF0UB4TJ4X3uDfOCo3PYpYe0MF4bouh0DQ/l43fxUF7Y+dpWuvTSffB0yO2UQUETI/LwCZE3BvnevJ7c9zUlY3H58xzke6DNFDQG8n0WtDN4LAYN4nogKav1ezOfK/z+t6tsCTp+dhx4ymjWuCJk1dEUifDP+HyS4iP/Vg9B2jTo9L4NbiBuDS4nuuHW6H+JDQn2JtqRKGkEQPEYE7uzazXIkcxIAqUq1esasZBETlEZY7y7Jo+RoV/IsjY9eIMkUvr42Hc0xqtsavZvhz1OLwSxMOTuqzlhb0WbdOwBH9EYiyBjatz40bUxTHbiWxqJ0uma19qhPruvcWJlbiSSH48OLDDpaHPszvyct41ZfTu10+vjox6kOqK6v0K/gEPphEvMl/vwSv+A4Hhm36JSP9IXTyCZDm4kKsqD5ay8b1Sad/vaiyO5N/sDfEV6Z4q95E+yfjxpqBoBETW2C7xl4pIO2bDODDFurUPwE7EWC2Uplq+AHmBHvir2PSgkR12/Ry65O0aZtQPeXi9mTlF/Wj5GQ+vFkYyhXsLTjrBSP9hwk4GPqDP5rBn5/l8b0mLRAvRSzXHc293bs3s8EsdE3m2exxidWVB4joHR+S+dz5/W+v00K3TqN14CDBth8eWcsTbiwXPsygHdGid0PEdy6HHm2v/IUuV5RVapYmzGsX90mpnIdNGcOOq64Dbc5GUbYpD9M7S+6cLY//QmjxFLP5cuTFRm3vA5rkFZroFnO3bjHF35uU3s8mvL7Tp9nyTc4mymTJ5sLIp7umSnGkO23faehtz3mmTS7fbVx5rP7x3HXIjRNeq/A3xCs9JNB08c9S9BF2O3bOur0ItslFxXgRPdaapBIi4dRpKGxVz7ir69t/bc9qTxjvtOyGOfiLGDhR4fYywHv1WdOplxIV87TpLBy3Wc0QP0P9s4G7FBNOdITS/tep3o3h1TEa5XDDii7fWtqRzUEReP2fbxz7bHWWJdbIOxOUJZtItNZpTFRfj6vm9sYjRxQVO+WTdiOhdPeTJ+8YirPvoeL88l5iLYOHd3b/Imkq+1ZN1El3UikhftuteEYxf1Wujof8Pr4ICTu5ezZyZ4tHQMxlzUHLYO2VMOoNMGL/20S5i2o2obfk+8qqdR7xzbRDbgU0lnuIgz4LelQ5XS7xbLuSQtNS95v3ZUOdaUx/Qd8qxCt6xf2E62yb/HukLO6RyorV8KgYl5YNc75y+KvefrxY+lc/64y9kvWP0a0bDz/rojq+RWjO06WeruWqNFU7r3HPIcLWRql8ICZsz2Ls/qOm/CLn6++X+Qf7mGspYCrZod/lpl6Rw4xN/yuq8gqV4B6aHk1hVE1SfILxWu5gvXqbfARYQpspcxKp1F/c8XOPzkZvmoSw+vEqBLdrq1fr3wAPv5NnM9i8F+jdAuxkP5Z71c6uhK3enlnGymr7UsWZKC12qgUiG8XXGQ9mxnqz4GSIlybF9eXmbqj2sHX+a1jf0gRoONHRdRSrIq03Ty89eQ1GbV/Bk+du4+V15zls+vvERvZ4E7ZbnxWTVjDjb4o/k8jlw44pTIrUGxxuJvBeO+heuhOjpFsO6lVJ/aXnJDa/bM0Ql1cLbXE/Pbv3EZ3vj3iVrB5irjupZTzlnv677NrI9UNYNqbPgp/HZXS+lJmk87wec+7YOxTDo2aw2l3NfDr34VNlvqWJBknuK7oSlZ6/T10zuOoPZOeoIk81N+sL843WJ2Q4Z0fZ3scsqC/JV2fuhWi1jGURSKZV637lf53Xnnx16/vKEXY89aVJ0fv91jGdfG+G4+sniwHes4hS+udOr4RfhFhG/F5gUG35QaU+McuLmclb5ZWmR+sG5V6nf+PxYzlrnFGxpZaK8eqqVo0NfmAWoGfXDiT/FnUbWvzGDOTr8aktOZWg4BYvz5YH12ZbfCcGtNk+dDAZNGWvHov+PIOnY9Prjg8h/wLRrT69suaMVZ5bNuK00lSVpnqSX1NON/81FoP92rYndionwgOiA8WMf4vc8l15KqEEG4yAm2+WAN5Brfu1sq9suWYqgoajgOYt/JCk1gC8wPkK+XKCtRX6TAtgvrnuBgNRmn6I8lVDipOVB9kX6Oxkp4ZKyd1M6Gj8/v2U7k+YQBL95Kb9PQENucJb0JlW3b5tObN7m/Z1j1ev388d7o15zgXsI9CikAGAViR6lkJv7nb4Ak40M2G8TJ447kN+pvfHiOFjSUSP6PM+QfbAywKJCBaxSVxpizHseZUyUBhq59vFwrkyGoRiHbo0apweEZeSLuNiQ+HAekOnarFg00dZNXaPeoHPTRR0FmEyqYExOVaaaO8c0uFUh7U4e/UxdBmthlBDgg257Q33j1hA7HTxSeTTSuVnPZbgW1nodwmG16aKBDKxEetv7D9OjO0JhrbJTnoe+kcGoDJazFSO8/fUN9Jy/g4XK5PUkw2dgPDGpJqBfhe7GA+cjzfE/EGsMM+FV9nj9IAhrSfT/J3QE5TEIYyk5UjsI6ZZcCPr6A8FZUF4g9nnpVmjX90MLSQysIPD0nFzqwCcSJmIb5mYv2Cmk+C1MDFkZQyCBq4c/Yai9LJ6xYkGS/x2s5/frIW2vmG2Wrv0APpCdgCA9snFvfpe8uc0OwdRs4G9973PGEBnQB5qKrCQ6m6X/H7NInZ7y/1674/ZXOVp7OeuCRk8JFS516VHrnH1HkIUIlTIljjHaQtEtkJtosYul77cVwjk3gW1Ajaa6zWeyHGLlpk3VHE2VFzT2yI/EvlGUSz2H9zYE1s4nsKMtMqNyKNtL/59CpFJki5Fou6VXGm8vWATEPwrUVOLvoA8jLuwOzVBCgHB2Cr5V6OwEWtJEKokJkfc87h+sNHTvMb0KVTp5284QTPupoWvQVUwUeogZR3kBMESYo0mfukewRVPKh5+rzLQb7HKjFFIgWhj1w3yN/qCNoPI8XFiUgBNT1hCHBsAz8L7Oyt8wQWUFj92ONn/APyJFg8hzueqoJdNj57ROrFbffuS/XxrSXLTRgj5uxZjpgQYceeMc2wJrahReSKpm3QjHfqExTLAB2ipVumE8pqcZv8LYXQiPHHsgb5BMW8zM5pvQit+mQx8XGaVDcfVbLyMTlY8xcfmm/RSAT/H09UQol5gIz7rESDmnrQ4bURIB4iRXMDQwxgex1GgtDxKp2HayIkR+E/aDmCttNm2C6lytWdfOVzD6X2SpDWjQDlMRvAp1symWv4my1bPCD+E1EmGnMGWhNwmycJnDV2WrQNxO45ukEb08AAffizYKVULp15I4vbNK5DzWwCSUADfmKhfGSUqii1L2UsE8rB7mLuHuUJZOx4+WiizHBJ/hwboaBzhpNOVvgFTf5cJsHef7L1HCI9dOUUbb+YxUJWn6dYOLz+THi91kzY5dtO5c+grX7v0jEbsuoOGnoIreDIg/sFMyG+TyCLIcAWd1IZ1UNFxE8Uie13ucm40U2fcxC0u3WLvLOxwu+F7MWUsHsdtFQZ7W+nlfCASiAKyh8rnP3EyDByvtJb6Kax6/HkLzT9SyEyTMVM1zPtM0MJY14DmsWh4MgD15Ea9Hd00AdkTZ0EiG5NAGuIBzQJJ0JR0na+OB7lQA6UKxMfihIQ7GCCnVz694QvykWXTxpS2soDu+smru1UdIxSvAszBFD1c8c6ZOobA8bJiJIvuycgIXBQIXWwhyTgZDQxJTRXgEwRNAawGSXO0a1DKjdihLVNp/taE/xYhsgwe+VpKEEB4LlraQyE84gEihxCnbfoyOuJIEXy2FIYw+JjRusybKlU2g/vhTSGTydvCvXhYBdtAXtS2v7LkHtmXh/8fly1do8FI/D0f8UbzVb5h+KRhMGSAmR2mhi0YG/uj7wgxcfzCrMvdjitUIpXDX8ae2JcF/36qUWIMwN6JsjaRGNj+jEteGDcFyTUb8X/NHSucKMJp7pduxtD6KuxVlyxxwaeiC1FbGBESO84lbyrAugYxdl+2N8/6AgWpo/IeoAOcsG35IA/b3AuSyoa55L7llBLlaWlEWvuCFd8f8NfcTUgzJv6CbB+6ohWwodlk9nGWFpBAOaz5uEW5xBvmjnHFeDsb0mXwayj3mdYq5gxxNf3H3/tnCgHwjSrpSgVxLmiTtuszdRUFIsn6LiMPjL808vL1uQhDbM7aA43mISXReqjSskynIRcHCJ9qeFopJfx9tqyUoGbSwJex/0aDE3plBPGtNBYgWbdLom3+Q/bjdizR2/AS/c/dH/d3G7pyl1qDXgtOFtEqidwLqxPYtrNEveasWq3vPUUtqTeu8gpov4bdOQRI2kneFvRNMrShyVeEupK1PoLDPMSfWMIJcs267mGB8X9CehQCF0gIyhpP10mbyM7lwW1e6TGvHBV1sg/UyTghHPGRqMyaebC6pbB1WKNCQtlai1GGvmq9zUKaUzLaXsXEBYtHxmFbEZ2kJhR164LhWW2Tlp1dhsGE7ZgIWRBOx3Zcu2DxgH+G83WTPceKG0TgQKKiiNNOlWgvqNEbnrk6fVD+AqRam2OguZb0YWSTX88N+i/ELSxbaUUpPx4vJUzYg/WonSeA8xUK6u7DPHgpqWpEe6D4cXg5uK9FIYVba47V/nb+wyOtk+zG8RrS4EA0ouwa04iByRLSvoJA2FzaobbZtXnq8GdbfqEp5I2dpfpj59TCVif6+E75p665faiX8gS213RqBxTZqfHP46nF6NSenOneuT+vgbLUbdTH2/t0REFXZJOEB6DHvx6N6g9956CYrY/AYcm9gELJXYkrSi+0F0geKDZgOCIYkLU/+GOW5aGj8mvLFgtFH5+XC8hvAE3CvHRfl4ofM/Qwk4x2A+R+nyc9gNu/9Tem7XW4XRnyRymf52z09cTOdr+PG6+P/Vb4QiXlwauc5WB1z3o+IJjlbxI8MyWtSzT+k4sKVbhF3xa+vDts3NxXa87iiu+xRH9cAprnOL2h6vV54iQRXuOAj1s8nLFK8gZ70ThIQcWdF19/2xaJmT0efrkNDkWbpAQPdo92Z8+Hn/aLjbOzB9AI/k12fPs9HhUNDJ1u6ax2VxD3R6PywN7BrLJ26z6s3QoMp76qzzwetrDABKSGkfW5PwS1GvYNUbK6uRqxfyVGNyFB0E+OugMM8kKwmJmupuRWO8XkXXXQECyRVw9UyIrtCtcc4oNqXqr7AURBmKn6Khz3eBN96LwIJrAGP9mr/59uTOSx631suyT+QujDd4beUFpZ0kJEEnjlP+X/Kr2kCKhnENTg4BsMTOmMqlj2WMFLRUlVG0fzdCBgUta9odrJfpVdFomTi6ak0tFjXTcdqqvWBAzjY6hVrH9sbt3Z9gn+AVDpTcQImefbB4edirjzrsNievve4ZT4EUZWV3TxEsIW+9MT/RJoKfZZYSRGfC1CwPG/9rdMOM8qR/LUYvw5f/emUSoD7YSFuOoqchdUg2UePd1eCtFSKgxLSZ764oy4lvRCIH6bowPxZWwxNFctksLeil47pfevcBipkkBIc4ngZG+kxGZ71a72KQ7VaZ6MZOZkQJZXM6kb/Ac0/XkJx8dvyfJcWbI3zONEaEPIW8GbkYjsZcwy+eMoKrYjDmvEEixHzkCSCRPRzhOfJZuLdcbx19EL23MA8rnjTZZ787FGMnkqnpuzB5/90w1gtUSRaWcb0eta8198VEeZMUSfIhyuc4/nywFQ9uqn7jdqXh+5wwv+RK9XouNPbYdoEelNGo34KyySwigsrfCe0v/PlWPvQvQg8R0KgHO18mTVThhQrlbEQ0Kp/JxPdjHyR7E1QPw/ut0r+HDDG7BwZFm9IqEUZRpv2WpzlMkOemeLcAt5CsrzskLGaVOAxyySzZV/D2EY7ydNZMf8e8VhHcKGHAWNszf1EOq8fNstijMY4JXyATwTdncFFqcNDfDo+mWFvxJJpc4sEZtjXyBdoFcxbUmniCoKq5jydUHNjYJxMqN1KzYV62MugcELVhS3Bnd+TLLOh7dws/zSXWzxEb4Nj4aFun5x4kDWLK5TUF/yCXB/cZYvI9kPgVsG2jShtXkxfgT+xzjJofXqPEnIXIQ1lnIdmVzBOM90EXvJUW6a0nZ/7XjJGl8ToO3H/fdxnxmTNKBZxnkpXLVgLXCZywGT3YyS75w/PAH5I/jMuRspej8xZObU9kREbRA+kqjmKRFaKGWAmFQspC+QLbKPf0RaK3OXvBSWqo46p70ws/eZpu6jCtZUgQy6r4tHMPUdAgWGGUYNbuv/1a6K+MVFsd3T183+T8capSo6m0+Sh57fEeG/95dykGJBQMj09DSW2bY0mUonDy9a8trLnnL5B5LW3Nl8rJZNysO8Zb+80zXxqUGFpud3Qzwb7bf+8mq6x0TAnJU9pDQR9YQmZhlna2xuxJt0aCO/f1SU8gblOrbIyMsxTlVUW69VJPzYU2HlRXcqE2lLLxnObZuz2tT9CivfTAUYfmzJlt/lOPgsR6VN64/xQd4Jlk/RV7UKVv2Gx/AWsmTAuCWKhdwC+4HmKEKYZh2Xis4KsUR1BeObs1c13wqFRnocdmuheaTV30gvVXZcouzHKK5zwrN52jXJEuX6dGx3BCpV/++4f3hyaW/cQJLFKqasjsMuO3B3WlMq2gyYfdK1e7L2pO/tRye2mwzwZPfdUMrl5wdLqdd2Kv/wVtnpyWYhd49L6rsOV+8HXPrWH2Kup89l2tz6bf80iYSd+V4LROSOHeamvexR524q4r43rTmtFzQvArpvWfLYFZrbFspBsXNUqqenjxNNsFXatZvlIhk7teUPfK+YL32F8McTnjv0BZNppb+vshoCrtLXjIWq3EJXpVXIlG6ZNL0dh6qEm2WMwDjD3LfOfkGh1/czYc/0qhiD2ozNnH4882MVVt3JbVFkbwowNCO3KL5IoYW5wlVeGCViOuv1svZx7FbzxKzA4zGqBlRRaRWCobXaVq4yYCWbZf8eiJwt3OY+MFiSJengcFP2t0JMfzOiJ7cECvpx7neg1Rc5x+7myPJOXt2FohVRyXtD+/rDoTOyGYInJelZMjolecVHUhUNqvdZWg2J2t0jPmiLFeRD/8fOT4o+NGILb+TufCo9ceBBm3JLVn+MO2675n7qiEX/6W+188cYg3Zn5NSTjgOKfWFSAANa6raCxSoVU851oJLY11WIoYK0du0ec5E4tCnAPoKh71riTsjVIp3gKvBbEYQiNYrmH22oLQWA2AdwMnID6PX9b58dR2QKo4qag1D1Z+L/FwEKTR7osOZPWECPJIHQqPUsM5i/CH5YupVPfFA5pHUBcsesh8eO5YhyWnaVRPZn/BmdXVumZWPxMP5e28zm2uqHgFoT9CymHYNNrzrrjlXZM06HnzDxYNlI5b/QosxLmmrqDFqmogQdqk0WLkUceoAvQxHgkIyvWU69BPFr24VB6+lx75Rna6dGtrmOxDnvBojvi1/4dHjVeg8owofPe1cOnxU1ioh016s/Vudv9mhV9f35At+Sh28h1bpp8xhr09+vf47Elx3Ms6hyp6QvB3t0vnLbOhwo660cp7K0vvepabK7YJfxEWWfrC2YzJfYOjygPwfwd/1amTqa0hZ5ueebhWYVMubRTwIjj+0Oq0ohU3zfRfuL8gt59XsHdwKtxTQQ4Y2qz6gisxnm2UdlmpEkgOsZz7iEk6QOt8BuPwr+NR01LTqXmJo1C76o1N274twJvl+I069TiLpenK/miRxhyY8jvYV6W1WuSwhH9q7kuwnJMtm7IWcqs7HsnyHSqWXLSpYtZGaR1V3t0gauninFPZGtWskF65rtti48UV9uV9KM8kfDYs0pgB00S+TlzTXV6P8mxq15b9En8sz3jWSszcifZa/NuufPNnNTb031pptt0+sRSH/7UG8pzbsgtt3OG3ut7B9JzDMt2mTZuyRNIV8D54TuTrpNcHtgmMlYJeiY9XS83NYJicjRjtJSf9BZLsQv629QdDsKQhTK5CnXhpk7vMNkHzPhm0ExW/VCGApHfPyBagtZQTQmPHx7g5IXXsrQDPzIVhv2LB6Ih138iSDww1JNHrDvzUxvp73MsQBVhW8EbrReaVUcLB1R3PUXyaYG4HpJUcLVxMgDxcPkVRQpL7VTAGabDzbKcvg12t5P8TSGQkrj/gOrpnbiDHwluA73xbXts/L7u468cRWSWRtgTwlQnA47EKg0OiZDgFxAKQQUcsbGomITgeXUAAyKe03eA7Mp4gnyKQmm0LXJtEk6ddksMJCuxDmmHzmVhO+XaN2A54MIh3niw5CF7PwiXFZrnA8wOdeHLvvhdoqIDG9PDI7UnWWHq526T8y6ixJPhkuVKZnoUruOpUgOOp3iIKBjk+yi1vHo5cItHXb1PIKzGaZlRS0g5d3MV2pD8FQdGYLZ73aae/eEIUePMc4NFz8pIUfLCrrF4jVWH5gQneN3S8vANBmUXrEcKGn6hIUN95y1vpsvLwbGpzV9L0ZKTan6TDXM05236uLJcIEMKVAxKNT0K8WljuwNny3BNQRfzovA85beI9zr1AGNYnYCVkR1aGngWURUrgqR+gRrQhxW81l3CHevjvGEPzPMTxdsIfB9dfGRbZU0cg/1mcubtECX4tvaedmNAvTxCJtc2QaoUalGfENCGK7IS/O8CRpdOVca8EWCRwv2sSWE8CJPW5PCugjCXPd3h6U60cPD+bdhtXZuYB6stcoveE7Sm5MM2yvfUHXFSW7KzLmi7/EeEWL0wqcOH9MOSKjhCHHmw+JGLcYE/7SBZQCRggox0ZZTAxrlzNNXYXL5fNIjkdT4YMqVUz6p8YDt049v4OXGdg3qTrtLBUXOZf7ahPlZAY/O+7Sp0bvGSHdyQ8B1LOsplqMb9Se8VAE7gIdSZvxbRSrfl+Lk5Qaqi5QJceqjitdErcHXg/3MryljPSIAMaaloFm1cVwBJ8DNmkDqoGROSHFetrgjQ5CahuKkdH5pRPigMrgTtlFI8ufJPJSUlGgTjbBSvpRc0zypiUn6U5KZqcRoyrtzhmJ7/caeZkmVRwJQeLOG8LY6vP5ChpKhc8Js0El+n6FXqbx9ItdtLtYP92kKfaTLtCi8StLZdENJa9Ex1nOoz1kQ7qxoiZFKRyLf4O4CHRT0T/0W9F8epNKVoeyxUXhy3sQMMsJjQJEyMOjmOhMFgOmmlscV4eFi1CldU92yjwleirEKPW3bPAuEhRZV7JsKV3Lr5cETAiFuX5Nw5UlF7d2HZ96Bh0sgFIL5KGaKSoVYVlvdKpZJVP5+NZ7xDEkQhmDgsDKciazJCXJ6ZN2B3FY2f6VZyGl/t4aunGIAk/BHaS+i+SpdRfnB/OktOvyjinWNfM9Ksr6WwtCa1hCmeRI6icpFM4o8quCLsikU0tMoZI/9EqXRMpKGaWzofl4nQuVQm17d5fU5qXCQeCDqVaL9XJ9qJ08n3G3EFZS28SHEb3cdRBdtO0YcTzil3QknNKEe/smQ1fTb0XbpyNB5xAeuIlf+5KWlEY0DqJbsnzJlQxJPOVyHiKMx5Xu9FcEv1Fbg6Fhm4t+Jyy5JC1W3YO8dYLsO0PXPbxodBgttTbH3rt9Cp1lJIk2r3O1Zqu94eRbnIz2f50lWolYzuKsj4PMok4abHLO8NAC884hiXx5Fy5pWKO0bWL7uEGXaJCtznhP67SlQ4xjWIfgq6EpZ28QMtuZK7JC0RGbl9nA4XtFLug/NLMoH1pGt9IonAJqcEDLyH6TDROcbsmGPaGIxMo41IUAnQVPMPGByp4mOmh9ZQMkBAcksUK55LsZj7E5z5XuZoyWCKu6nHmDq22xI/9Z8YdxJy4kWpD16jLVrpwGLWfyOD0Wd+cBzFBxVaGv7S5k9qwh/5t/LQEXsRqI3Q9Rm3QIoaZW9GlsDaKOUyykyWuhNOprSEi0s1G4rgoiX1V743EELti+pJu5og6X0g6oTynUqlhH9k6ezyRi05NGZHz0nvp3HOJr7ebrAUFrDjbkFBObEvdQWkkUbL0pEvMU46X58vF9j9F3j6kpyetNUBItrEubW9ZvMPM4qNqLlsSBJqOH3XbNwv/cXDXNxN8iFLzUhteisYY+RlHYOuP29/Cb+L+xv+35Rv7xudnZ6ohK4cMPfCG8KI7dNmjNk/H4e84pOxn/sZHK9psfvj8ncA8qJz7O8xqbxESDivGJOZzF7o5PJLQ7g34qAWoyuA+x3btU98LT6ZyGyceIXjrqob2CAVql4VOTQPUQYvHV/g4zAuCZGvYQBtf0wmd5lilrvuEn1BXLny01B4h4SMDlYsnNpm9d7m9h578ufpef9Z4WplqWQvqo52fyUA7J24eZD5av6SyGIV9kpmHNqyvdfzcpEMw97BvknV2fq+MFHun9BT3Lsf8pbzvisWiIQvYkng+8Vxk1V+dli1u56kY50LRjaPdotvT5BwqtwyF+emo/z9J3yVUVGfKrxQtJMOAQWoQii/4dp9wgybSa5mkucmRLtEQZ/pz0tL/NVcgWAd95nEQ3Tg6tNbuyn3Iepz65L3huMUUBntllWuu4DbtOFSMSbpILV4fy6wlM0SOvi6CpLh81c1LreIvKd61uEWBcDw1lUBUW1I0Z+m/PaRlX+PQ/oxg0Ye6KUiIiTF4ADNk59Ydpt5/rkxmq9tV5Kcp/eQLUVVmBzQNVuytQCP6Ezd0G8eLxWyHpmZWJ3bAzkWTtg4lZlw42SQezEmiUPaJUuR/qklVA/87S4ArFCpALdY3QRdUw3G3XbWUp6aq9z0zUizcPa7351p9JXOZyfdZBFnqt90VzQndXB/mwf8LC9STj5kenVpNuqOQQP3mIRJj7eV21FxG8VAxKrEn3c+XfmZ800EPb9/5lIlijscUbB6da0RQaMook0zug1G0tKi/JBC4rw7/D3m4ARzAkzMcVrDcT2SyFtUdWAsFlsPDFqV3N+EjyXaoEePwroaZCiLqEzb8MW+PNE9TmTC01EzWli51PzZvUqkmyuROU+V6ik+Le/9qT6nwzUzf9tP68tYei0YaDGx6kAd7jn1cKqOCuYbiELH9zYqcc4MnRJjkeGiqaGwLImhyeKs+xKJMBlOJ05ow9gGCKZ1VpnMKoSCTbMS+X+23y042zOb5MtcY/6oBeAo1Vy89OTyhpavFP78jXCcFH0t7Gx24hMEOm2gsEfGabVpQgvFqbQKMsknFRRmuPHcZu0Su/WMFphZvB2r/EGbG72rpGGho3h+Msz0uGzJ7hNK2uqQiE1qmn0zgacKYYZBCqsxV+sjbpoVdSilW/b94n2xNb648VmNIoizqEWhBnsen+d0kbCPmRItfWqSBeOd9Wne3c6bcd6uvXOJ6WdiSsuXq0ndhqrQ4QoWUjCjYtZ0EAhnSOP1m44xkf0O7jXghrzSJWxP4a/t72jU29Vu2rvu4n7HfHkkmQOMGSS+NPeLGO5I73mC2B7+lMiBQQZRM9/9liLIfowupUFAbPBbR+lxDM6M8Ptgh1paJq5Rvs7yEuLQv/7d1oU2woFSb3FMPWQOKMuCuJ7pDDjpIclus5TeEoMBy2YdVB4fxmesaCeMNsEgTHKS5WDSGyNUOoEpcC2OFWtIRf0w27ck34/DjxRTVIcc9+kqZE6iMSiVDsiKdP/Xz5XfEhm/sBhO50p1rvJDlkyyxuJ9SPgs7YeUJBjXdeAkE+P9OQJm6SZnn1svcduI78dYmbkE2mtziPrcjVisXG78spLvbZaSFx/Rks9zP4LKn0Cdz/3JsetkT06A8f/yCgMO6Mb1Hme0JJ7b2wZz1qleqTuKBGokhPVUZ0dVu+tnQYNEY1fmkZSz6+EGZ5EzL7657mreZGR3jUfaEk458PDniBzsSmBKhDRzfXameryJv9/D5m6HIqZ0R+ouCE54Dzp4IJuuD1e4Dc5i+PpSORJfG23uVgqixAMDvchMR0nZdH5brclYwRoJRWv/rlxGRI5ffD5NPGmIDt7vDE1434pYdVZIFh89Bs94HGGJbTwrN8T6lh1HZFTOB4lWzWj6EVqxSMvC0/ljWBQ3F2kc/mO2b6tWonT2JEqEwFts8rz2h+oWNds9ceR2cb7zZvJTDppHaEhK5avWqsseWa2Dt5BBhabdWSktS80oMQrL4TvAM9b5HMmyDnO+OkkbMXfUJG7eXqTIG6lqSOEbqVR+qYdP7uWb57WEJqzyh411GAVsDinPs7KvUeXItlcMdOUWzXBH6zscymV1LLVCtc8IePojzXHF9m5b5zGwBRdzcyUJkiu938ApmAayRdJrX1PmVguWUvt2ThQ62czItTyWJMW2An/hdDfMK7SiFQlGIdAbltHz3ycoh7j9V7GxNWBpbtcSdqm4XxRwTawc3cbZ+xfSv9qQfEkDKfZTwCkqWGI/ur250ItXlMlh6vUNWEYIg9A3GzbgmbqvTN8js2YMo87CU5y6nZ4dbJLDQJj9fc7yM7tZzJDZFtqOcU8+mZjYlq4VmifI23iHb1ZoT9E+kT2dolnP1AfiOkt7PQCSykBiXy5mv637IegWSKj9IKrYZf4Lu9+I7ub+mkRdlvYzehh/jaJ9n7HUH5b2IbgeNdkY7wx1yVzxS7pbvky6+nmVUtRllEFfweUQ0/nG017WoUYSxs+j2B4FV/F62EtHlMWZXYrjGHpthnNb1x66LKZ0Qe92INWHdfR/vqp02wMS8r1G4dJqHok8KmQ7947G13a4YXbsGgHcBvRuVu1eAi4/A5+ZixmdSXM73LupB/LH7O9yxLTVXJTyBbI1S49TIROrfVCOb/czZ9pM4JsZx8kUz8dQGv7gUWKxXvTH7QM/3J2OuXXgciUhqY+cgtaOliQQVOYthBLV3xpESZT3rmfEYNZxmpBbb24CRao86prn+i9TNOh8VxRJGXJfXHATJHs1T5txgc/opYrY8XjlGQQbRcoxIBcnVsMjmU1ymmIUL4dviJXndMAJ0Yet+c7O52/p98ytlmAsGBaTAmMhimAnvp1TWNGM9BpuitGj+t810CU2UhorrjPKGtThVC8WaXw04WFnT5fTjqmPyrQ0tN3CkLsctVy2xr0ZWgiWVZ1OrlFjjxJYsOiZv2cAoOvE+7sY0I/TwWcZqMoyIKNOftwP7w++Rfg67ljfovKYa50if3fzE/8aPYVey/Nq35+nH2sLPh/fP5TsylSKGOZ4k69d2PnH43+kq++sRXHQqGArWdwhx+hpwQC6JgT2uxehYU4Zbw7oNb6/HLikPyJROGK2ouyr+vzseESp9G50T4AyFrSqOQ0rroCYP4sMDFBrHn342EyZTMlSyk47rHSq89Y9/nI3zG5lX16Z5lxphguLOcZUndL8wNcrkyjH82jqg8Bo8OYkynrxZvbFno5lUS3OPr8Ko3mX9NoRPdYOKKjD07bvgFgpZ/RF+YzkWvJ/Hs/tUbfeGzGWLxNAjfDzHHMVSDwB5SabQLsIZHiBp43FjGkaienYoDd18hu2BGwOK7U3o70K/WY/kuuKdmdrykIBUdG2mvE91L1JtTbh20mOLbk1vCAamu7utlXeGU2ooVikbU/actcgmsC1FKk2qmj3GWeIWbj4tGIxE7BLcBWUvvcnd/lYxsMV4F917fWeFB/XbINN3qGvIyTpCalz1lVewdIGqeAS/gB8Mi+sA+BqDiX3VGD2eUunTRbSY+AuDy4E3Qx3hAhwnSXX+B0zuj3eQ1miS8Vux2z/l6/BkWtjKGU72aJkOCWhGcSf3+kFkkB15vGOsQrSdFr6qTj0gBYiOlnBO41170gOWHSUoBVRU2JjwppYdhIFDfu7tIRHccSNM5KZOFDPz0TGMAjzzEpeLwTWp+kn201kU6NjbiMQJx83+LX1e1tZ10kuChJZ/XBUQ1dwaBHjTDJDqOympEk8X2M3VtVw21JksChA8w1tTefO3RJ1FMbqZ01bHHkudDB/OhLfe7P5GOHaI28ZXKTMuqo0hLWQ4HabBsGG7NbP1RiXtETz074er6w/OerJWEqjmkq2y51q1BVI+JUudnVa3ogBpzdhFE7fC7kybrAt2Z6RqDjATAUEYeYK45WMupBKQRtQlU+uNsjnzj6ZmGrezA+ASrWxQ6LMkHRXqXwNq7ftv28dUx/ZSJciDXP2SWJsWaN0FjPX9Yko6LobZ7aYW/IdUktI9apTLyHS8DyWPyuoZyxN1TK/vtfxk3HwWh6JczZC8Ftn0bIJay2g+n5wd7lm9rEsKO+svqVmi+c1j88hSCxbzrg4+HEP0Nt1/B6YW1XVm09T1CpAKjc9n18hjqsaFGdfyva1ZG0Xu3ip6N6JGpyTSqY5h4BOlpLPaOnyw45PdXTN+DtAKg7DLrLFTnWusoSBHk3s0d7YouJHq85/R09Tfc37ENXZF48eAYLnq9GLioNcwDZrC6FW6godB8JnqYUPvn0pWLfQz0lM0Yy8Mybgn84Ds3Q9bDP10bLyOV+qzxa4Rd9Dhu7cju8mMaONXK3UqmBQ9qIg7etIwEqM/kECk/Dzja4Bs1xR+Q/tCbc8IKrSGsTdJJ0vge7IG20W687uVmK6icWQ6cD3lwFzgNMGtFvO5qyJeKflGLAAcQZOrkxVwy3cWvqlGpvjmf9Qe6Ap20MPbV92DPV0OhFM4kz8Yr0ffC2zLWSQ1kqY6QdQrttR3kh1YLtQd1kCEv5hVoPIRWl5ERcUTttBIrWp6Xs5Ehh5OUUwI5aEBvuiDmUoENmnVw1FohCrbRp1A1E+XSlWVOTi7ADW+5Ohb9z1vK4qx5R5lPdGCPBJZ00mC+Ssp8VUbgpGAvXWMuWQQRbCqI6Rr2jtxZxtfP7W/8onz+yz0Gs76LaT5HX9ecyiZCB/ZR/gFtMxPsDwohoeCRtiuLxE1GM1vUEUgBv86+eehL58/P56QFGQ/MqOe/vC76L63jzmeax4exd/OKTUvkXg+fOJUHych9xt/9goJMrapSgvXrj8+8vk/N80f22Sewj6cyGqt1B6mztoeklVHHraouhvHJaG/OuBz6DHKMpFmQULU1bRWlyYE0RPXYYkUycIemN7TLtgNCJX6BqdyxDKkegO7nJK5xQ7OVYDZTMf9bVHidtk6DQX9Et+V9M7esgbsYBdEeUpsB0Xvw2kd9+rI7V+m47u+O/tq7mw7262HU1WlS9uFzsV6JxIHNmUCy0QS9e077JGRFbG65z3/dOKB/Zk+yDdKpUmdXjn/aS3N5nv4fK7bMHHmPlHd4E2+iTbV5rpzScRnxk6KARuDTJ8Q1LpK2mP8gj1EbuJ9RIyY+EWK4hCiIDBAS1Tm2IEXAFfgKPgdL9O6mAa06wjCcUAL6EsxPQWO9VNegBPm/0GgkZbDxCynxujX/92vmGcjZRMAY45puak2sFLCLSwXpEsyy5fnF0jGJBhm+fNSHKKUUfy+276A7/feLOFxxUuHRNJI2Osenxyvf8DAGObT60pfTTlhEg9u/KKkhJqm5U1/+BEcSkpFDA5XeCqxwXmPac1jcuZ3JWQ+p0NdWzb/5v1ZvF8GtMTFFEdQjpLO0bwPb0BHNWnip3liDXI2fXf05jjvfJ0NpjLCUgfTh9CMFYVFKEd4Z/OG/2C+N435mnK+9t1gvCiVcaaH7rK4+PjCvpVNiz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg=";
  22742. /***/ }),
  22743. /***/ 5139:
  22744. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  22745. /* Copyright 2013 Google Inc. All Rights Reserved.
  22746. Licensed under the Apache License, Version 2.0 (the "License");
  22747. you may not use this file except in compliance with the License.
  22748. You may obtain a copy of the License at
  22749. http://www.apache.org/licenses/LICENSE-2.0
  22750. Unless required by applicable law or agreed to in writing, software
  22751. distributed under the License is distributed on an "AS IS" BASIS,
  22752. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22753. See the License for the specific language governing permissions and
  22754. limitations under the License.
  22755. Collection of static dictionary words.
  22756. */
  22757. var data = __webpack_require__(5340);
  22758. exports.init = function() {
  22759. exports.dictionary = data.init();
  22760. };
  22761. exports.offsetsByLength = new Uint32Array([
  22762. 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032,
  22763. 53248, 63488, 74752, 87040, 93696, 100864, 104704, 106752, 108928, 113536,
  22764. 115968, 118528, 119872, 121280, 122016,
  22765. ]);
  22766. exports.sizeBitsByLength = new Uint8Array([
  22767. 0, 0, 0, 0, 10, 10, 11, 11, 10, 10,
  22768. 10, 10, 10, 9, 9, 8, 7, 7, 8, 7,
  22769. 7, 6, 6, 5, 5,
  22770. ]);
  22771. exports.minDictionaryWordLength = 4;
  22772. exports.maxDictionaryWordLength = 24;
  22773. /***/ }),
  22774. /***/ 966:
  22775. /***/ (function(__unused_webpack_module, exports) {
  22776. function HuffmanCode(bits, value) {
  22777. this.bits = bits; /* number of bits used for this symbol */
  22778. this.value = value; /* symbol value or table offset */
  22779. }
  22780. exports.h = HuffmanCode;
  22781. var MAX_LENGTH = 15;
  22782. /* Returns reverse(reverse(key, len) + 1, len), where reverse(key, len) is the
  22783. bit-wise reversal of the len least significant bits of key. */
  22784. function GetNextKey(key, len) {
  22785. var step = 1 << (len - 1);
  22786. while (key & step) {
  22787. step >>= 1;
  22788. }
  22789. return (key & (step - 1)) + step;
  22790. }
  22791. /* Stores code in table[0], table[step], table[2*step], ..., table[end] */
  22792. /* Assumes that end is an integer multiple of step */
  22793. function ReplicateValue(table, i, step, end, code) {
  22794. do {
  22795. end -= step;
  22796. table[i + end] = new HuffmanCode(code.bits, code.value);
  22797. } while (end > 0);
  22798. }
  22799. /* Returns the table width of the next 2nd level table. count is the histogram
  22800. of bit lengths for the remaining symbols, len is the code length of the next
  22801. processed symbol */
  22802. function NextTableBitSize(count, len, root_bits) {
  22803. var left = 1 << (len - root_bits);
  22804. while (len < MAX_LENGTH) {
  22805. left -= count[len];
  22806. if (left <= 0) break;
  22807. ++len;
  22808. left <<= 1;
  22809. }
  22810. return len - root_bits;
  22811. }
  22812. exports.g = function(root_table, table, root_bits, code_lengths, code_lengths_size) {
  22813. var start_table = table;
  22814. var code; /* current table entry */
  22815. var len; /* current code length */
  22816. var symbol; /* symbol index in original or sorted table */
  22817. var key; /* reversed prefix code */
  22818. var step; /* step size to replicate values in current table */
  22819. var low; /* low bits for current root entry */
  22820. var mask; /* mask for low bits */
  22821. var table_bits; /* key length of current table */
  22822. var table_size; /* size of current table */
  22823. var total_size; /* sum of root table size and 2nd level table sizes */
  22824. var sorted; /* symbols sorted by code length */
  22825. var count = new Int32Array(MAX_LENGTH + 1); /* number of codes of each length */
  22826. var offset = new Int32Array(MAX_LENGTH + 1); /* offsets in sorted table for each length */
  22827. sorted = new Int32Array(code_lengths_size);
  22828. /* build histogram of code lengths */
  22829. for (symbol = 0; symbol < code_lengths_size; symbol++) {
  22830. count[code_lengths[symbol]]++;
  22831. }
  22832. /* generate offsets into sorted symbol table by code length */
  22833. offset[1] = 0;
  22834. for (len = 1; len < MAX_LENGTH; len++) {
  22835. offset[len + 1] = offset[len] + count[len];
  22836. }
  22837. /* sort symbols by length, by symbol order within each length */
  22838. for (symbol = 0; symbol < code_lengths_size; symbol++) {
  22839. if (code_lengths[symbol] !== 0) {
  22840. sorted[offset[code_lengths[symbol]]++] = symbol;
  22841. }
  22842. }
  22843. table_bits = root_bits;
  22844. table_size = 1 << table_bits;
  22845. total_size = table_size;
  22846. /* special case code with only one value */
  22847. if (offset[MAX_LENGTH] === 1) {
  22848. for (key = 0; key < total_size; ++key) {
  22849. root_table[table + key] = new HuffmanCode(0, sorted[0] & 0xffff);
  22850. }
  22851. return total_size;
  22852. }
  22853. /* fill in root table */
  22854. key = 0;
  22855. symbol = 0;
  22856. for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) {
  22857. for (; count[len] > 0; --count[len]) {
  22858. code = new HuffmanCode(len & 0xff, sorted[symbol++] & 0xffff);
  22859. ReplicateValue(root_table, table + key, step, table_size, code);
  22860. key = GetNextKey(key, len);
  22861. }
  22862. }
  22863. /* fill in 2nd level tables and add pointers to root table */
  22864. mask = total_size - 1;
  22865. low = -1;
  22866. for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) {
  22867. for (; count[len] > 0; --count[len]) {
  22868. if ((key & mask) !== low) {
  22869. table += table_size;
  22870. table_bits = NextTableBitSize(count, len, root_bits);
  22871. table_size = 1 << table_bits;
  22872. total_size += table_size;
  22873. low = key & mask;
  22874. root_table[start_table + low] = new HuffmanCode((table_bits + root_bits) & 0xff, ((table - start_table) - low) & 0xffff);
  22875. }
  22876. code = new HuffmanCode((len - root_bits) & 0xff, sorted[symbol++] & 0xffff);
  22877. ReplicateValue(root_table, table + (key >> root_bits), step, table_size, code);
  22878. key = GetNextKey(key, len);
  22879. }
  22880. }
  22881. return total_size;
  22882. }
  22883. /***/ }),
  22884. /***/ 8435:
  22885. /***/ (function(__unused_webpack_module, exports) {
  22886. /* Copyright 2013 Google Inc. All Rights Reserved.
  22887. Licensed under the Apache License, Version 2.0 (the "License");
  22888. you may not use this file except in compliance with the License.
  22889. You may obtain a copy of the License at
  22890. http://www.apache.org/licenses/LICENSE-2.0
  22891. Unless required by applicable law or agreed to in writing, software
  22892. distributed under the License is distributed on an "AS IS" BASIS,
  22893. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22894. See the License for the specific language governing permissions and
  22895. limitations under the License.
  22896. Lookup tables to map prefix codes to value ranges. This is used during
  22897. decoding of the block lengths, literal insertion lengths and copy lengths.
  22898. */
  22899. /* Represents the range of values belonging to a prefix code: */
  22900. /* [offset, offset + 2^nbits) */
  22901. function PrefixCodeRange(offset, nbits) {
  22902. this.offset = offset;
  22903. this.nbits = nbits;
  22904. }
  22905. exports.kBlockLengthPrefixCode = [
  22906. new PrefixCodeRange(1, 2), new PrefixCodeRange(5, 2), new PrefixCodeRange(9, 2), new PrefixCodeRange(13, 2),
  22907. new PrefixCodeRange(17, 3), new PrefixCodeRange(25, 3), new PrefixCodeRange(33, 3), new PrefixCodeRange(41, 3),
  22908. new PrefixCodeRange(49, 4), new PrefixCodeRange(65, 4), new PrefixCodeRange(81, 4), new PrefixCodeRange(97, 4),
  22909. new PrefixCodeRange(113, 5), new PrefixCodeRange(145, 5), new PrefixCodeRange(177, 5), new PrefixCodeRange(209, 5),
  22910. new PrefixCodeRange(241, 6), new PrefixCodeRange(305, 6), new PrefixCodeRange(369, 7), new PrefixCodeRange(497, 8),
  22911. new PrefixCodeRange(753, 9), new PrefixCodeRange(1265, 10), new PrefixCodeRange(2289, 11), new PrefixCodeRange(4337, 12),
  22912. new PrefixCodeRange(8433, 13), new PrefixCodeRange(16625, 24)
  22913. ];
  22914. exports.kInsertLengthPrefixCode = [
  22915. new PrefixCodeRange(0, 0), new PrefixCodeRange(1, 0), new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0),
  22916. new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0), new PrefixCodeRange(6, 1), new PrefixCodeRange(8, 1),
  22917. new PrefixCodeRange(10, 2), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 3), new PrefixCodeRange(26, 3),
  22918. new PrefixCodeRange(34, 4), new PrefixCodeRange(50, 4), new PrefixCodeRange(66, 5), new PrefixCodeRange(98, 5),
  22919. new PrefixCodeRange(130, 6), new PrefixCodeRange(194, 7), new PrefixCodeRange(322, 8), new PrefixCodeRange(578, 9),
  22920. new PrefixCodeRange(1090, 10), new PrefixCodeRange(2114, 12), new PrefixCodeRange(6210, 14), new PrefixCodeRange(22594, 24),
  22921. ];
  22922. exports.kCopyLengthPrefixCode = [
  22923. new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0), new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0),
  22924. new PrefixCodeRange(6, 0), new PrefixCodeRange(7, 0), new PrefixCodeRange(8, 0), new PrefixCodeRange(9, 0),
  22925. new PrefixCodeRange(10, 1), new PrefixCodeRange(12, 1), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 2),
  22926. new PrefixCodeRange(22, 3), new PrefixCodeRange(30, 3), new PrefixCodeRange(38, 4), new PrefixCodeRange(54, 4),
  22927. new PrefixCodeRange(70, 5), new PrefixCodeRange(102, 5), new PrefixCodeRange(134, 6), new PrefixCodeRange(198, 7),
  22928. new PrefixCodeRange(326, 8), new PrefixCodeRange(582, 9), new PrefixCodeRange(1094, 10), new PrefixCodeRange(2118, 24),
  22929. ];
  22930. exports.kInsertRangeLut = [
  22931. 0, 0, 8, 8, 0, 16, 8, 16, 16,
  22932. ];
  22933. exports.kCopyRangeLut = [
  22934. 0, 8, 0, 8, 16, 0, 16, 8, 16,
  22935. ];
  22936. /***/ }),
  22937. /***/ 6154:
  22938. /***/ (function(__unused_webpack_module, exports) {
  22939. function BrotliInput(buffer) {
  22940. this.buffer = buffer;
  22941. this.pos = 0;
  22942. }
  22943. BrotliInput.prototype.read = function(buf, i, count) {
  22944. if (this.pos + count > this.buffer.length) {
  22945. count = this.buffer.length - this.pos;
  22946. }
  22947. for (var p = 0; p < count; p++)
  22948. buf[i + p] = this.buffer[this.pos + p];
  22949. this.pos += count;
  22950. return count;
  22951. }
  22952. exports.g = BrotliInput;
  22953. function BrotliOutput(buf) {
  22954. this.buffer = buf;
  22955. this.pos = 0;
  22956. }
  22957. BrotliOutput.prototype.write = function(buf, count) {
  22958. if (this.pos + count > this.buffer.length)
  22959. throw new Error('Output buffer is not large enough');
  22960. this.buffer.set(buf.subarray(0, count), this.pos);
  22961. this.pos += count;
  22962. return count;
  22963. };
  22964. exports.j = BrotliOutput;
  22965. /***/ }),
  22966. /***/ 2973:
  22967. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  22968. /* Copyright 2013 Google Inc. All Rights Reserved.
  22969. Licensed under the Apache License, Version 2.0 (the "License");
  22970. you may not use this file except in compliance with the License.
  22971. You may obtain a copy of the License at
  22972. http://www.apache.org/licenses/LICENSE-2.0
  22973. Unless required by applicable law or agreed to in writing, software
  22974. distributed under the License is distributed on an "AS IS" BASIS,
  22975. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  22976. See the License for the specific language governing permissions and
  22977. limitations under the License.
  22978. Transformations on dictionary words.
  22979. */
  22980. var BrotliDictionary = __webpack_require__(5139);
  22981. var kIdentity = 0;
  22982. var kOmitLast1 = 1;
  22983. var kOmitLast2 = 2;
  22984. var kOmitLast3 = 3;
  22985. var kOmitLast4 = 4;
  22986. var kOmitLast5 = 5;
  22987. var kOmitLast6 = 6;
  22988. var kOmitLast7 = 7;
  22989. var kOmitLast8 = 8;
  22990. var kOmitLast9 = 9;
  22991. var kUppercaseFirst = 10;
  22992. var kUppercaseAll = 11;
  22993. var kOmitFirst1 = 12;
  22994. var kOmitFirst2 = 13;
  22995. var kOmitFirst3 = 14;
  22996. var kOmitFirst4 = 15;
  22997. var kOmitFirst5 = 16;
  22998. var kOmitFirst6 = 17;
  22999. var kOmitFirst7 = 18;
  23000. var kOmitFirst8 = 19;
  23001. var kOmitFirst9 = 20;
  23002. function Transform(prefix, transform, suffix) {
  23003. this.prefix = new Uint8Array(prefix.length);
  23004. this.transform = transform;
  23005. this.suffix = new Uint8Array(suffix.length);
  23006. for (var i = 0; i < prefix.length; i++)
  23007. this.prefix[i] = prefix.charCodeAt(i);
  23008. for (var i = 0; i < suffix.length; i++)
  23009. this.suffix[i] = suffix.charCodeAt(i);
  23010. }
  23011. var kTransforms = [
  23012. new Transform( "", kIdentity, "" ),
  23013. new Transform( "", kIdentity, " " ),
  23014. new Transform( " ", kIdentity, " " ),
  23015. new Transform( "", kOmitFirst1, "" ),
  23016. new Transform( "", kUppercaseFirst, " " ),
  23017. new Transform( "", kIdentity, " the " ),
  23018. new Transform( " ", kIdentity, "" ),
  23019. new Transform( "s ", kIdentity, " " ),
  23020. new Transform( "", kIdentity, " of " ),
  23021. new Transform( "", kUppercaseFirst, "" ),
  23022. new Transform( "", kIdentity, " and " ),
  23023. new Transform( "", kOmitFirst2, "" ),
  23024. new Transform( "", kOmitLast1, "" ),
  23025. new Transform( ", ", kIdentity, " " ),
  23026. new Transform( "", kIdentity, ", " ),
  23027. new Transform( " ", kUppercaseFirst, " " ),
  23028. new Transform( "", kIdentity, " in " ),
  23029. new Transform( "", kIdentity, " to " ),
  23030. new Transform( "e ", kIdentity, " " ),
  23031. new Transform( "", kIdentity, "\"" ),
  23032. new Transform( "", kIdentity, "." ),
  23033. new Transform( "", kIdentity, "\">" ),
  23034. new Transform( "", kIdentity, "\n" ),
  23035. new Transform( "", kOmitLast3, "" ),
  23036. new Transform( "", kIdentity, "]" ),
  23037. new Transform( "", kIdentity, " for " ),
  23038. new Transform( "", kOmitFirst3, "" ),
  23039. new Transform( "", kOmitLast2, "" ),
  23040. new Transform( "", kIdentity, " a " ),
  23041. new Transform( "", kIdentity, " that " ),
  23042. new Transform( " ", kUppercaseFirst, "" ),
  23043. new Transform( "", kIdentity, ". " ),
  23044. new Transform( ".", kIdentity, "" ),
  23045. new Transform( " ", kIdentity, ", " ),
  23046. new Transform( "", kOmitFirst4, "" ),
  23047. new Transform( "", kIdentity, " with " ),
  23048. new Transform( "", kIdentity, "'" ),
  23049. new Transform( "", kIdentity, " from " ),
  23050. new Transform( "", kIdentity, " by " ),
  23051. new Transform( "", kOmitFirst5, "" ),
  23052. new Transform( "", kOmitFirst6, "" ),
  23053. new Transform( " the ", kIdentity, "" ),
  23054. new Transform( "", kOmitLast4, "" ),
  23055. new Transform( "", kIdentity, ". The " ),
  23056. new Transform( "", kUppercaseAll, "" ),
  23057. new Transform( "", kIdentity, " on " ),
  23058. new Transform( "", kIdentity, " as " ),
  23059. new Transform( "", kIdentity, " is " ),
  23060. new Transform( "", kOmitLast7, "" ),
  23061. new Transform( "", kOmitLast1, "ing " ),
  23062. new Transform( "", kIdentity, "\n\t" ),
  23063. new Transform( "", kIdentity, ":" ),
  23064. new Transform( " ", kIdentity, ". " ),
  23065. new Transform( "", kIdentity, "ed " ),
  23066. new Transform( "", kOmitFirst9, "" ),
  23067. new Transform( "", kOmitFirst7, "" ),
  23068. new Transform( "", kOmitLast6, "" ),
  23069. new Transform( "", kIdentity, "(" ),
  23070. new Transform( "", kUppercaseFirst, ", " ),
  23071. new Transform( "", kOmitLast8, "" ),
  23072. new Transform( "", kIdentity, " at " ),
  23073. new Transform( "", kIdentity, "ly " ),
  23074. new Transform( " the ", kIdentity, " of " ),
  23075. new Transform( "", kOmitLast5, "" ),
  23076. new Transform( "", kOmitLast9, "" ),
  23077. new Transform( " ", kUppercaseFirst, ", " ),
  23078. new Transform( "", kUppercaseFirst, "\"" ),
  23079. new Transform( ".", kIdentity, "(" ),
  23080. new Transform( "", kUppercaseAll, " " ),
  23081. new Transform( "", kUppercaseFirst, "\">" ),
  23082. new Transform( "", kIdentity, "=\"" ),
  23083. new Transform( " ", kIdentity, "." ),
  23084. new Transform( ".com/", kIdentity, "" ),
  23085. new Transform( " the ", kIdentity, " of the " ),
  23086. new Transform( "", kUppercaseFirst, "'" ),
  23087. new Transform( "", kIdentity, ". This " ),
  23088. new Transform( "", kIdentity, "," ),
  23089. new Transform( ".", kIdentity, " " ),
  23090. new Transform( "", kUppercaseFirst, "(" ),
  23091. new Transform( "", kUppercaseFirst, "." ),
  23092. new Transform( "", kIdentity, " not " ),
  23093. new Transform( " ", kIdentity, "=\"" ),
  23094. new Transform( "", kIdentity, "er " ),
  23095. new Transform( " ", kUppercaseAll, " " ),
  23096. new Transform( "", kIdentity, "al " ),
  23097. new Transform( " ", kUppercaseAll, "" ),
  23098. new Transform( "", kIdentity, "='" ),
  23099. new Transform( "", kUppercaseAll, "\"" ),
  23100. new Transform( "", kUppercaseFirst, ". " ),
  23101. new Transform( " ", kIdentity, "(" ),
  23102. new Transform( "", kIdentity, "ful " ),
  23103. new Transform( " ", kUppercaseFirst, ". " ),
  23104. new Transform( "", kIdentity, "ive " ),
  23105. new Transform( "", kIdentity, "less " ),
  23106. new Transform( "", kUppercaseAll, "'" ),
  23107. new Transform( "", kIdentity, "est " ),
  23108. new Transform( " ", kUppercaseFirst, "." ),
  23109. new Transform( "", kUppercaseAll, "\">" ),
  23110. new Transform( " ", kIdentity, "='" ),
  23111. new Transform( "", kUppercaseFirst, "," ),
  23112. new Transform( "", kIdentity, "ize " ),
  23113. new Transform( "", kUppercaseAll, "." ),
  23114. new Transform( "\xc2\xa0", kIdentity, "" ),
  23115. new Transform( " ", kIdentity, "," ),
  23116. new Transform( "", kUppercaseFirst, "=\"" ),
  23117. new Transform( "", kUppercaseAll, "=\"" ),
  23118. new Transform( "", kIdentity, "ous " ),
  23119. new Transform( "", kUppercaseAll, ", " ),
  23120. new Transform( "", kUppercaseFirst, "='" ),
  23121. new Transform( " ", kUppercaseFirst, "," ),
  23122. new Transform( " ", kUppercaseAll, "=\"" ),
  23123. new Transform( " ", kUppercaseAll, ", " ),
  23124. new Transform( "", kUppercaseAll, "," ),
  23125. new Transform( "", kUppercaseAll, "(" ),
  23126. new Transform( "", kUppercaseAll, ". " ),
  23127. new Transform( " ", kUppercaseAll, "." ),
  23128. new Transform( "", kUppercaseAll, "='" ),
  23129. new Transform( " ", kUppercaseAll, ". " ),
  23130. new Transform( " ", kUppercaseFirst, "=\"" ),
  23131. new Transform( " ", kUppercaseAll, "='" ),
  23132. new Transform( " ", kUppercaseFirst, "='" )
  23133. ];
  23134. exports.kTransforms = kTransforms;
  23135. exports.kNumTransforms = kTransforms.length;
  23136. function ToUpperCase(p, i) {
  23137. if (p[i] < 0xc0) {
  23138. if (p[i] >= 97 && p[i] <= 122) {
  23139. p[i] ^= 32;
  23140. }
  23141. return 1;
  23142. }
  23143. /* An overly simplified uppercasing model for utf-8. */
  23144. if (p[i] < 0xe0) {
  23145. p[i + 1] ^= 32;
  23146. return 2;
  23147. }
  23148. /* An arbitrary transform for three byte characters. */
  23149. p[i + 2] ^= 5;
  23150. return 3;
  23151. }
  23152. exports.transformDictionaryWord = function(dst, idx, word, len, transform) {
  23153. var prefix = kTransforms[transform].prefix;
  23154. var suffix = kTransforms[transform].suffix;
  23155. var t = kTransforms[transform].transform;
  23156. var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1);
  23157. var i = 0;
  23158. var start_idx = idx;
  23159. var uppercase;
  23160. if (skip > len) {
  23161. skip = len;
  23162. }
  23163. var prefix_pos = 0;
  23164. while (prefix_pos < prefix.length) {
  23165. dst[idx++] = prefix[prefix_pos++];
  23166. }
  23167. word += skip;
  23168. len -= skip;
  23169. if (t <= kOmitLast9) {
  23170. len -= t;
  23171. }
  23172. for (i = 0; i < len; i++) {
  23173. dst[idx++] = BrotliDictionary.dictionary[word + i];
  23174. }
  23175. uppercase = idx - len;
  23176. if (t === kUppercaseFirst) {
  23177. ToUpperCase(dst, uppercase);
  23178. } else if (t === kUppercaseAll) {
  23179. while (len > 0) {
  23180. var step = ToUpperCase(dst, uppercase);
  23181. uppercase += step;
  23182. len -= step;
  23183. }
  23184. }
  23185. var suffix_pos = 0;
  23186. while (suffix_pos < suffix.length) {
  23187. dst[idx++] = suffix[suffix_pos++];
  23188. }
  23189. return idx - start_idx;
  23190. }
  23191. /***/ }),
  23192. /***/ 7709:
  23193. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  23194. module.exports = __webpack_require__(6450).BrotliDecompressBuffer;
  23195. /***/ }),
  23196. /***/ 4505:
  23197. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  23198. "use strict";
  23199. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  23200. /* provided dependency */ var process = __webpack_require__(4155);
  23201. /* eslint camelcase: "off" */
  23202. var assert = __webpack_require__(9282);
  23203. var Zstream = __webpack_require__(4860);
  23204. var zlib_deflate = __webpack_require__(2233);
  23205. var zlib_inflate = __webpack_require__(3001);
  23206. var constants = __webpack_require__(7162);
  23207. for (var key in constants) {
  23208. exports[key] = constants[key];
  23209. }
  23210. // zlib modes
  23211. exports.NONE = 0;
  23212. exports.DEFLATE = 1;
  23213. exports.INFLATE = 2;
  23214. exports.GZIP = 3;
  23215. exports.GUNZIP = 4;
  23216. exports.DEFLATERAW = 5;
  23217. exports.INFLATERAW = 6;
  23218. exports.UNZIP = 7;
  23219. var GZIP_HEADER_ID1 = 0x1f;
  23220. var GZIP_HEADER_ID2 = 0x8b;
  23221. /**
  23222. * Emulate Node's zlib C++ layer for use by the JS layer in index.js
  23223. */
  23224. function Zlib(mode) {
  23225. if (typeof mode !== 'number' || mode < exports.DEFLATE || mode > exports.UNZIP) {
  23226. throw new TypeError('Bad argument');
  23227. }
  23228. this.dictionary = null;
  23229. this.err = 0;
  23230. this.flush = 0;
  23231. this.init_done = false;
  23232. this.level = 0;
  23233. this.memLevel = 0;
  23234. this.mode = mode;
  23235. this.strategy = 0;
  23236. this.windowBits = 0;
  23237. this.write_in_progress = false;
  23238. this.pending_close = false;
  23239. this.gzip_id_bytes_read = 0;
  23240. }
  23241. Zlib.prototype.close = function () {
  23242. if (this.write_in_progress) {
  23243. this.pending_close = true;
  23244. return;
  23245. }
  23246. this.pending_close = false;
  23247. assert(this.init_done, 'close before init');
  23248. assert(this.mode <= exports.UNZIP);
  23249. if (this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW) {
  23250. zlib_deflate.deflateEnd(this.strm);
  23251. } else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP) {
  23252. zlib_inflate.inflateEnd(this.strm);
  23253. }
  23254. this.mode = exports.NONE;
  23255. this.dictionary = null;
  23256. };
  23257. Zlib.prototype.write = function (flush, input, in_off, in_len, out, out_off, out_len) {
  23258. return this._write(true, flush, input, in_off, in_len, out, out_off, out_len);
  23259. };
  23260. Zlib.prototype.writeSync = function (flush, input, in_off, in_len, out, out_off, out_len) {
  23261. return this._write(false, flush, input, in_off, in_len, out, out_off, out_len);
  23262. };
  23263. Zlib.prototype._write = function (async, flush, input, in_off, in_len, out, out_off, out_len) {
  23264. assert.equal(arguments.length, 8);
  23265. assert(this.init_done, 'write before init');
  23266. assert(this.mode !== exports.NONE, 'already finalized');
  23267. assert.equal(false, this.write_in_progress, 'write already in progress');
  23268. assert.equal(false, this.pending_close, 'close is pending');
  23269. this.write_in_progress = true;
  23270. assert.equal(false, flush === undefined, 'must provide flush value');
  23271. this.write_in_progress = true;
  23272. if (flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK) {
  23273. throw new Error('Invalid flush value');
  23274. }
  23275. if (input == null) {
  23276. input = Buffer.alloc(0);
  23277. in_len = 0;
  23278. in_off = 0;
  23279. }
  23280. this.strm.avail_in = in_len;
  23281. this.strm.input = input;
  23282. this.strm.next_in = in_off;
  23283. this.strm.avail_out = out_len;
  23284. this.strm.output = out;
  23285. this.strm.next_out = out_off;
  23286. this.flush = flush;
  23287. if (!async) {
  23288. // sync version
  23289. this._process();
  23290. if (this._checkError()) {
  23291. return this._afterSync();
  23292. }
  23293. return;
  23294. }
  23295. // async version
  23296. var self = this;
  23297. process.nextTick(function () {
  23298. self._process();
  23299. self._after();
  23300. });
  23301. return this;
  23302. };
  23303. Zlib.prototype._afterSync = function () {
  23304. var avail_out = this.strm.avail_out;
  23305. var avail_in = this.strm.avail_in;
  23306. this.write_in_progress = false;
  23307. return [avail_in, avail_out];
  23308. };
  23309. Zlib.prototype._process = function () {
  23310. var next_expected_header_byte = null;
  23311. // If the avail_out is left at 0, then it means that it ran out
  23312. // of room. If there was avail_out left over, then it means
  23313. // that all of the input was consumed.
  23314. switch (this.mode) {
  23315. case exports.DEFLATE:
  23316. case exports.GZIP:
  23317. case exports.DEFLATERAW:
  23318. this.err = zlib_deflate.deflate(this.strm, this.flush);
  23319. break;
  23320. case exports.UNZIP:
  23321. if (this.strm.avail_in > 0) {
  23322. next_expected_header_byte = this.strm.next_in;
  23323. }
  23324. switch (this.gzip_id_bytes_read) {
  23325. case 0:
  23326. if (next_expected_header_byte === null) {
  23327. break;
  23328. }
  23329. if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) {
  23330. this.gzip_id_bytes_read = 1;
  23331. next_expected_header_byte++;
  23332. if (this.strm.avail_in === 1) {
  23333. // The only available byte was already read.
  23334. break;
  23335. }
  23336. } else {
  23337. this.mode = exports.INFLATE;
  23338. break;
  23339. }
  23340. // fallthrough
  23341. case 1:
  23342. if (next_expected_header_byte === null) {
  23343. break;
  23344. }
  23345. if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2) {
  23346. this.gzip_id_bytes_read = 2;
  23347. this.mode = exports.GUNZIP;
  23348. } else {
  23349. // There is no actual difference between INFLATE and INFLATERAW
  23350. // (after initialization).
  23351. this.mode = exports.INFLATE;
  23352. }
  23353. break;
  23354. default:
  23355. throw new Error('invalid number of gzip magic number bytes read');
  23356. }
  23357. // fallthrough
  23358. case exports.INFLATE:
  23359. case exports.GUNZIP:
  23360. case exports.INFLATERAW:
  23361. this.err = zlib_inflate.inflate(this.strm, this.flush
  23362. // If data was encoded with dictionary
  23363. );if (this.err === exports.Z_NEED_DICT && this.dictionary) {
  23364. // Load it
  23365. this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary);
  23366. if (this.err === exports.Z_OK) {
  23367. // And try to decode again
  23368. this.err = zlib_inflate.inflate(this.strm, this.flush);
  23369. } else if (this.err === exports.Z_DATA_ERROR) {
  23370. // Both inflateSetDictionary() and inflate() return Z_DATA_ERROR.
  23371. // Make it possible for After() to tell a bad dictionary from bad
  23372. // input.
  23373. this.err = exports.Z_NEED_DICT;
  23374. }
  23375. }
  23376. while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0x00) {
  23377. // Bytes remain in input buffer. Perhaps this is another compressed
  23378. // member in the same archive, or just trailing garbage.
  23379. // Trailing zero bytes are okay, though, since they are frequently
  23380. // used for padding.
  23381. this.reset();
  23382. this.err = zlib_inflate.inflate(this.strm, this.flush);
  23383. }
  23384. break;
  23385. default:
  23386. throw new Error('Unknown mode ' + this.mode);
  23387. }
  23388. };
  23389. Zlib.prototype._checkError = function () {
  23390. // Acceptable error states depend on the type of zlib stream.
  23391. switch (this.err) {
  23392. case exports.Z_OK:
  23393. case exports.Z_BUF_ERROR:
  23394. if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH) {
  23395. this._error('unexpected end of file');
  23396. return false;
  23397. }
  23398. break;
  23399. case exports.Z_STREAM_END:
  23400. // normal statuses, not fatal
  23401. break;
  23402. case exports.Z_NEED_DICT:
  23403. if (this.dictionary == null) {
  23404. this._error('Missing dictionary');
  23405. } else {
  23406. this._error('Bad dictionary');
  23407. }
  23408. return false;
  23409. default:
  23410. // something else.
  23411. this._error('Zlib error');
  23412. return false;
  23413. }
  23414. return true;
  23415. };
  23416. Zlib.prototype._after = function () {
  23417. if (!this._checkError()) {
  23418. return;
  23419. }
  23420. var avail_out = this.strm.avail_out;
  23421. var avail_in = this.strm.avail_in;
  23422. this.write_in_progress = false;
  23423. // call the write() cb
  23424. this.callback(avail_in, avail_out);
  23425. if (this.pending_close) {
  23426. this.close();
  23427. }
  23428. };
  23429. Zlib.prototype._error = function (message) {
  23430. if (this.strm.msg) {
  23431. message = this.strm.msg;
  23432. }
  23433. this.onerror(message, this.err
  23434. // no hope of rescue.
  23435. );this.write_in_progress = false;
  23436. if (this.pending_close) {
  23437. this.close();
  23438. }
  23439. };
  23440. Zlib.prototype.init = function (windowBits, level, memLevel, strategy, dictionary) {
  23441. assert(arguments.length === 4 || arguments.length === 5, 'init(windowBits, level, memLevel, strategy, [dictionary])');
  23442. assert(windowBits >= 8 && windowBits <= 15, 'invalid windowBits');
  23443. assert(level >= -1 && level <= 9, 'invalid compression level');
  23444. assert(memLevel >= 1 && memLevel <= 9, 'invalid memlevel');
  23445. assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, 'invalid strategy');
  23446. this._init(level, windowBits, memLevel, strategy, dictionary);
  23447. this._setDictionary();
  23448. };
  23449. Zlib.prototype.params = function () {
  23450. throw new Error('deflateParams Not supported');
  23451. };
  23452. Zlib.prototype.reset = function () {
  23453. this._reset();
  23454. this._setDictionary();
  23455. };
  23456. Zlib.prototype._init = function (level, windowBits, memLevel, strategy, dictionary) {
  23457. this.level = level;
  23458. this.windowBits = windowBits;
  23459. this.memLevel = memLevel;
  23460. this.strategy = strategy;
  23461. this.flush = exports.Z_NO_FLUSH;
  23462. this.err = exports.Z_OK;
  23463. if (this.mode === exports.GZIP || this.mode === exports.GUNZIP) {
  23464. this.windowBits += 16;
  23465. }
  23466. if (this.mode === exports.UNZIP) {
  23467. this.windowBits += 32;
  23468. }
  23469. if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW) {
  23470. this.windowBits = -1 * this.windowBits;
  23471. }
  23472. this.strm = new Zstream();
  23473. switch (this.mode) {
  23474. case exports.DEFLATE:
  23475. case exports.GZIP:
  23476. case exports.DEFLATERAW:
  23477. this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy);
  23478. break;
  23479. case exports.INFLATE:
  23480. case exports.GUNZIP:
  23481. case exports.INFLATERAW:
  23482. case exports.UNZIP:
  23483. this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits);
  23484. break;
  23485. default:
  23486. throw new Error('Unknown mode ' + this.mode);
  23487. }
  23488. if (this.err !== exports.Z_OK) {
  23489. this._error('Init error');
  23490. }
  23491. this.dictionary = dictionary;
  23492. this.write_in_progress = false;
  23493. this.init_done = true;
  23494. };
  23495. Zlib.prototype._setDictionary = function () {
  23496. if (this.dictionary == null) {
  23497. return;
  23498. }
  23499. this.err = exports.Z_OK;
  23500. switch (this.mode) {
  23501. case exports.DEFLATE:
  23502. case exports.DEFLATERAW:
  23503. this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary);
  23504. break;
  23505. default:
  23506. break;
  23507. }
  23508. if (this.err !== exports.Z_OK) {
  23509. this._error('Failed to set dictionary');
  23510. }
  23511. };
  23512. Zlib.prototype._reset = function () {
  23513. this.err = exports.Z_OK;
  23514. switch (this.mode) {
  23515. case exports.DEFLATE:
  23516. case exports.DEFLATERAW:
  23517. case exports.GZIP:
  23518. this.err = zlib_deflate.deflateReset(this.strm);
  23519. break;
  23520. case exports.INFLATE:
  23521. case exports.INFLATERAW:
  23522. case exports.GUNZIP:
  23523. this.err = zlib_inflate.inflateReset(this.strm);
  23524. break;
  23525. default:
  23526. break;
  23527. }
  23528. if (this.err !== exports.Z_OK) {
  23529. this._error('Failed to reset stream');
  23530. }
  23531. };
  23532. exports.Zlib = Zlib;
  23533. /***/ }),
  23534. /***/ 2635:
  23535. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  23536. "use strict";
  23537. /* provided dependency */ var process = __webpack_require__(4155);
  23538. var Buffer = (__webpack_require__(8823).Buffer);
  23539. var Transform = (__webpack_require__(2830).Transform);
  23540. var binding = __webpack_require__(4505);
  23541. var util = __webpack_require__(9539);
  23542. var assert = (__webpack_require__(9282).ok);
  23543. var kMaxLength = (__webpack_require__(8823).kMaxLength);
  23544. var kRangeErrorMessage = 'Cannot create final Buffer. It would be larger ' + 'than 0x' + kMaxLength.toString(16) + ' bytes';
  23545. // zlib doesn't provide these, so kludge them in following the same
  23546. // const naming scheme zlib uses.
  23547. binding.Z_MIN_WINDOWBITS = 8;
  23548. binding.Z_MAX_WINDOWBITS = 15;
  23549. binding.Z_DEFAULT_WINDOWBITS = 15;
  23550. // fewer than 64 bytes per chunk is stupid.
  23551. // technically it could work with as few as 8, but even 64 bytes
  23552. // is absurdly low. Usually a MB or more is best.
  23553. binding.Z_MIN_CHUNK = 64;
  23554. binding.Z_MAX_CHUNK = Infinity;
  23555. binding.Z_DEFAULT_CHUNK = 16 * 1024;
  23556. binding.Z_MIN_MEMLEVEL = 1;
  23557. binding.Z_MAX_MEMLEVEL = 9;
  23558. binding.Z_DEFAULT_MEMLEVEL = 8;
  23559. binding.Z_MIN_LEVEL = -1;
  23560. binding.Z_MAX_LEVEL = 9;
  23561. binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION;
  23562. // expose all the zlib constants
  23563. var bkeys = Object.keys(binding);
  23564. for (var bk = 0; bk < bkeys.length; bk++) {
  23565. var bkey = bkeys[bk];
  23566. if (bkey.match(/^Z/)) {
  23567. Object.defineProperty(exports, bkey, {
  23568. enumerable: true, value: binding[bkey], writable: false
  23569. });
  23570. }
  23571. }
  23572. // translation table for return codes.
  23573. var codes = {
  23574. Z_OK: binding.Z_OK,
  23575. Z_STREAM_END: binding.Z_STREAM_END,
  23576. Z_NEED_DICT: binding.Z_NEED_DICT,
  23577. Z_ERRNO: binding.Z_ERRNO,
  23578. Z_STREAM_ERROR: binding.Z_STREAM_ERROR,
  23579. Z_DATA_ERROR: binding.Z_DATA_ERROR,
  23580. Z_MEM_ERROR: binding.Z_MEM_ERROR,
  23581. Z_BUF_ERROR: binding.Z_BUF_ERROR,
  23582. Z_VERSION_ERROR: binding.Z_VERSION_ERROR
  23583. };
  23584. var ckeys = Object.keys(codes);
  23585. for (var ck = 0; ck < ckeys.length; ck++) {
  23586. var ckey = ckeys[ck];
  23587. codes[codes[ckey]] = ckey;
  23588. }
  23589. Object.defineProperty(exports, "codes", ({
  23590. enumerable: true, value: Object.freeze(codes), writable: false
  23591. }));
  23592. exports.Deflate = Deflate;
  23593. exports.Inflate = Inflate;
  23594. exports.Gzip = Gzip;
  23595. exports.Gunzip = Gunzip;
  23596. exports.DeflateRaw = DeflateRaw;
  23597. exports.InflateRaw = InflateRaw;
  23598. exports.Unzip = Unzip;
  23599. exports.createDeflate = function (o) {
  23600. return new Deflate(o);
  23601. };
  23602. exports.createInflate = function (o) {
  23603. return new Inflate(o);
  23604. };
  23605. exports.createDeflateRaw = function (o) {
  23606. return new DeflateRaw(o);
  23607. };
  23608. exports.createInflateRaw = function (o) {
  23609. return new InflateRaw(o);
  23610. };
  23611. exports.createGzip = function (o) {
  23612. return new Gzip(o);
  23613. };
  23614. exports.createGunzip = function (o) {
  23615. return new Gunzip(o);
  23616. };
  23617. exports.createUnzip = function (o) {
  23618. return new Unzip(o);
  23619. };
  23620. // Convenience methods.
  23621. // compress/decompress a string or buffer in one step.
  23622. exports.deflate = function (buffer, opts, callback) {
  23623. if (typeof opts === 'function') {
  23624. callback = opts;
  23625. opts = {};
  23626. }
  23627. return zlibBuffer(new Deflate(opts), buffer, callback);
  23628. };
  23629. exports.deflateSync = function (buffer, opts) {
  23630. return zlibBufferSync(new Deflate(opts), buffer);
  23631. };
  23632. exports.gzip = function (buffer, opts, callback) {
  23633. if (typeof opts === 'function') {
  23634. callback = opts;
  23635. opts = {};
  23636. }
  23637. return zlibBuffer(new Gzip(opts), buffer, callback);
  23638. };
  23639. exports.gzipSync = function (buffer, opts) {
  23640. return zlibBufferSync(new Gzip(opts), buffer);
  23641. };
  23642. exports.deflateRaw = function (buffer, opts, callback) {
  23643. if (typeof opts === 'function') {
  23644. callback = opts;
  23645. opts = {};
  23646. }
  23647. return zlibBuffer(new DeflateRaw(opts), buffer, callback);
  23648. };
  23649. exports.deflateRawSync = function (buffer, opts) {
  23650. return zlibBufferSync(new DeflateRaw(opts), buffer);
  23651. };
  23652. exports.unzip = function (buffer, opts, callback) {
  23653. if (typeof opts === 'function') {
  23654. callback = opts;
  23655. opts = {};
  23656. }
  23657. return zlibBuffer(new Unzip(opts), buffer, callback);
  23658. };
  23659. exports.unzipSync = function (buffer, opts) {
  23660. return zlibBufferSync(new Unzip(opts), buffer);
  23661. };
  23662. exports.inflate = function (buffer, opts, callback) {
  23663. if (typeof opts === 'function') {
  23664. callback = opts;
  23665. opts = {};
  23666. }
  23667. return zlibBuffer(new Inflate(opts), buffer, callback);
  23668. };
  23669. exports.inflateSync = function (buffer, opts) {
  23670. return zlibBufferSync(new Inflate(opts), buffer);
  23671. };
  23672. exports.gunzip = function (buffer, opts, callback) {
  23673. if (typeof opts === 'function') {
  23674. callback = opts;
  23675. opts = {};
  23676. }
  23677. return zlibBuffer(new Gunzip(opts), buffer, callback);
  23678. };
  23679. exports.gunzipSync = function (buffer, opts) {
  23680. return zlibBufferSync(new Gunzip(opts), buffer);
  23681. };
  23682. exports.inflateRaw = function (buffer, opts, callback) {
  23683. if (typeof opts === 'function') {
  23684. callback = opts;
  23685. opts = {};
  23686. }
  23687. return zlibBuffer(new InflateRaw(opts), buffer, callback);
  23688. };
  23689. exports.inflateRawSync = function (buffer, opts) {
  23690. return zlibBufferSync(new InflateRaw(opts), buffer);
  23691. };
  23692. function zlibBuffer(engine, buffer, callback) {
  23693. var buffers = [];
  23694. var nread = 0;
  23695. engine.on('error', onError);
  23696. engine.on('end', onEnd);
  23697. engine.end(buffer);
  23698. flow();
  23699. function flow() {
  23700. var chunk;
  23701. while (null !== (chunk = engine.read())) {
  23702. buffers.push(chunk);
  23703. nread += chunk.length;
  23704. }
  23705. engine.once('readable', flow);
  23706. }
  23707. function onError(err) {
  23708. engine.removeListener('end', onEnd);
  23709. engine.removeListener('readable', flow);
  23710. callback(err);
  23711. }
  23712. function onEnd() {
  23713. var buf;
  23714. var err = null;
  23715. if (nread >= kMaxLength) {
  23716. err = new RangeError(kRangeErrorMessage);
  23717. } else {
  23718. buf = Buffer.concat(buffers, nread);
  23719. }
  23720. buffers = [];
  23721. engine.close();
  23722. callback(err, buf);
  23723. }
  23724. }
  23725. function zlibBufferSync(engine, buffer) {
  23726. if (typeof buffer === 'string') buffer = Buffer.from(buffer);
  23727. if (!Buffer.isBuffer(buffer)) throw new TypeError('Not a string or buffer');
  23728. var flushFlag = engine._finishFlushFlag;
  23729. return engine._processChunk(buffer, flushFlag);
  23730. }
  23731. // generic zlib
  23732. // minimal 2-byte header
  23733. function Deflate(opts) {
  23734. if (!(this instanceof Deflate)) return new Deflate(opts);
  23735. Zlib.call(this, opts, binding.DEFLATE);
  23736. }
  23737. function Inflate(opts) {
  23738. if (!(this instanceof Inflate)) return new Inflate(opts);
  23739. Zlib.call(this, opts, binding.INFLATE);
  23740. }
  23741. // gzip - bigger header, same deflate compression
  23742. function Gzip(opts) {
  23743. if (!(this instanceof Gzip)) return new Gzip(opts);
  23744. Zlib.call(this, opts, binding.GZIP);
  23745. }
  23746. function Gunzip(opts) {
  23747. if (!(this instanceof Gunzip)) return new Gunzip(opts);
  23748. Zlib.call(this, opts, binding.GUNZIP);
  23749. }
  23750. // raw - no header
  23751. function DeflateRaw(opts) {
  23752. if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts);
  23753. Zlib.call(this, opts, binding.DEFLATERAW);
  23754. }
  23755. function InflateRaw(opts) {
  23756. if (!(this instanceof InflateRaw)) return new InflateRaw(opts);
  23757. Zlib.call(this, opts, binding.INFLATERAW);
  23758. }
  23759. // auto-detect header.
  23760. function Unzip(opts) {
  23761. if (!(this instanceof Unzip)) return new Unzip(opts);
  23762. Zlib.call(this, opts, binding.UNZIP);
  23763. }
  23764. function isValidFlushFlag(flag) {
  23765. return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK;
  23766. }
  23767. // the Zlib class they all inherit from
  23768. // This thing manages the queue of requests, and returns
  23769. // true or false if there is anything in the queue when
  23770. // you call the .write() method.
  23771. function Zlib(opts, mode) {
  23772. var _this = this;
  23773. this._opts = opts = opts || {};
  23774. this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK;
  23775. Transform.call(this, opts);
  23776. if (opts.flush && !isValidFlushFlag(opts.flush)) {
  23777. throw new Error('Invalid flush flag: ' + opts.flush);
  23778. }
  23779. if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) {
  23780. throw new Error('Invalid flush flag: ' + opts.finishFlush);
  23781. }
  23782. this._flushFlag = opts.flush || binding.Z_NO_FLUSH;
  23783. this._finishFlushFlag = typeof opts.finishFlush !== 'undefined' ? opts.finishFlush : binding.Z_FINISH;
  23784. if (opts.chunkSize) {
  23785. if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK) {
  23786. throw new Error('Invalid chunk size: ' + opts.chunkSize);
  23787. }
  23788. }
  23789. if (opts.windowBits) {
  23790. if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS) {
  23791. throw new Error('Invalid windowBits: ' + opts.windowBits);
  23792. }
  23793. }
  23794. if (opts.level) {
  23795. if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL) {
  23796. throw new Error('Invalid compression level: ' + opts.level);
  23797. }
  23798. }
  23799. if (opts.memLevel) {
  23800. if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL) {
  23801. throw new Error('Invalid memLevel: ' + opts.memLevel);
  23802. }
  23803. }
  23804. if (opts.strategy) {
  23805. if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY) {
  23806. throw new Error('Invalid strategy: ' + opts.strategy);
  23807. }
  23808. }
  23809. if (opts.dictionary) {
  23810. if (!Buffer.isBuffer(opts.dictionary)) {
  23811. throw new Error('Invalid dictionary: it should be a Buffer instance');
  23812. }
  23813. }
  23814. this._handle = new binding.Zlib(mode);
  23815. var self = this;
  23816. this._hadError = false;
  23817. this._handle.onerror = function (message, errno) {
  23818. // there is no way to cleanly recover.
  23819. // continuing only obscures problems.
  23820. _close(self);
  23821. self._hadError = true;
  23822. var error = new Error(message);
  23823. error.errno = errno;
  23824. error.code = exports.codes[errno];
  23825. self.emit('error', error);
  23826. };
  23827. var level = exports.Z_DEFAULT_COMPRESSION;
  23828. if (typeof opts.level === 'number') level = opts.level;
  23829. var strategy = exports.Z_DEFAULT_STRATEGY;
  23830. if (typeof opts.strategy === 'number') strategy = opts.strategy;
  23831. this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary);
  23832. this._buffer = Buffer.allocUnsafe(this._chunkSize);
  23833. this._offset = 0;
  23834. this._level = level;
  23835. this._strategy = strategy;
  23836. this.once('end', this.close);
  23837. Object.defineProperty(this, '_closed', {
  23838. get: function () {
  23839. return !_this._handle;
  23840. },
  23841. configurable: true,
  23842. enumerable: true
  23843. });
  23844. }
  23845. util.inherits(Zlib, Transform);
  23846. Zlib.prototype.params = function (level, strategy, callback) {
  23847. if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL) {
  23848. throw new RangeError('Invalid compression level: ' + level);
  23849. }
  23850. if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY) {
  23851. throw new TypeError('Invalid strategy: ' + strategy);
  23852. }
  23853. if (this._level !== level || this._strategy !== strategy) {
  23854. var self = this;
  23855. this.flush(binding.Z_SYNC_FLUSH, function () {
  23856. assert(self._handle, 'zlib binding closed');
  23857. self._handle.params(level, strategy);
  23858. if (!self._hadError) {
  23859. self._level = level;
  23860. self._strategy = strategy;
  23861. if (callback) callback();
  23862. }
  23863. });
  23864. } else {
  23865. process.nextTick(callback);
  23866. }
  23867. };
  23868. Zlib.prototype.reset = function () {
  23869. assert(this._handle, 'zlib binding closed');
  23870. return this._handle.reset();
  23871. };
  23872. // This is the _flush function called by the transform class,
  23873. // internally, when the last chunk has been written.
  23874. Zlib.prototype._flush = function (callback) {
  23875. this._transform(Buffer.alloc(0), '', callback);
  23876. };
  23877. Zlib.prototype.flush = function (kind, callback) {
  23878. var _this2 = this;
  23879. var ws = this._writableState;
  23880. if (typeof kind === 'function' || kind === undefined && !callback) {
  23881. callback = kind;
  23882. kind = binding.Z_FULL_FLUSH;
  23883. }
  23884. if (ws.ended) {
  23885. if (callback) process.nextTick(callback);
  23886. } else if (ws.ending) {
  23887. if (callback) this.once('end', callback);
  23888. } else if (ws.needDrain) {
  23889. if (callback) {
  23890. this.once('drain', function () {
  23891. return _this2.flush(kind, callback);
  23892. });
  23893. }
  23894. } else {
  23895. this._flushFlag = kind;
  23896. this.write(Buffer.alloc(0), '', callback);
  23897. }
  23898. };
  23899. Zlib.prototype.close = function (callback) {
  23900. _close(this, callback);
  23901. process.nextTick(emitCloseNT, this);
  23902. };
  23903. function _close(engine, callback) {
  23904. if (callback) process.nextTick(callback);
  23905. // Caller may invoke .close after a zlib error (which will null _handle).
  23906. if (!engine._handle) return;
  23907. engine._handle.close();
  23908. engine._handle = null;
  23909. }
  23910. function emitCloseNT(self) {
  23911. self.emit('close');
  23912. }
  23913. Zlib.prototype._transform = function (chunk, encoding, cb) {
  23914. var flushFlag;
  23915. var ws = this._writableState;
  23916. var ending = ws.ending || ws.ended;
  23917. var last = ending && (!chunk || ws.length === chunk.length);
  23918. if (chunk !== null && !Buffer.isBuffer(chunk)) return cb(new Error('invalid input'));
  23919. if (!this._handle) return cb(new Error('zlib binding closed'));
  23920. // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag
  23921. // (or whatever flag was provided using opts.finishFlush).
  23922. // If it's explicitly flushing at some other time, then we use
  23923. // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression
  23924. // goodness.
  23925. if (last) flushFlag = this._finishFlushFlag;else {
  23926. flushFlag = this._flushFlag;
  23927. // once we've flushed the last of the queue, stop flushing and
  23928. // go back to the normal behavior.
  23929. if (chunk.length >= ws.length) {
  23930. this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH;
  23931. }
  23932. }
  23933. this._processChunk(chunk, flushFlag, cb);
  23934. };
  23935. Zlib.prototype._processChunk = function (chunk, flushFlag, cb) {
  23936. var availInBefore = chunk && chunk.length;
  23937. var availOutBefore = this._chunkSize - this._offset;
  23938. var inOff = 0;
  23939. var self = this;
  23940. var async = typeof cb === 'function';
  23941. if (!async) {
  23942. var buffers = [];
  23943. var nread = 0;
  23944. var error;
  23945. this.on('error', function (er) {
  23946. error = er;
  23947. });
  23948. assert(this._handle, 'zlib binding closed');
  23949. do {
  23950. var res = this._handle.writeSync(flushFlag, chunk, // in
  23951. inOff, // in_off
  23952. availInBefore, // in_len
  23953. this._buffer, // out
  23954. this._offset, //out_off
  23955. availOutBefore); // out_len
  23956. } while (!this._hadError && callback(res[0], res[1]));
  23957. if (this._hadError) {
  23958. throw error;
  23959. }
  23960. if (nread >= kMaxLength) {
  23961. _close(this);
  23962. throw new RangeError(kRangeErrorMessage);
  23963. }
  23964. var buf = Buffer.concat(buffers, nread);
  23965. _close(this);
  23966. return buf;
  23967. }
  23968. assert(this._handle, 'zlib binding closed');
  23969. var req = this._handle.write(flushFlag, chunk, // in
  23970. inOff, // in_off
  23971. availInBefore, // in_len
  23972. this._buffer, // out
  23973. this._offset, //out_off
  23974. availOutBefore); // out_len
  23975. req.buffer = chunk;
  23976. req.callback = callback;
  23977. function callback(availInAfter, availOutAfter) {
  23978. // When the callback is used in an async write, the callback's
  23979. // context is the `req` object that was created. The req object
  23980. // is === this._handle, and that's why it's important to null
  23981. // out the values after they are done being used. `this._handle`
  23982. // can stay in memory longer than the callback and buffer are needed.
  23983. if (this) {
  23984. this.buffer = null;
  23985. this.callback = null;
  23986. }
  23987. if (self._hadError) return;
  23988. var have = availOutBefore - availOutAfter;
  23989. assert(have >= 0, 'have should not go down');
  23990. if (have > 0) {
  23991. var out = self._buffer.slice(self._offset, self._offset + have);
  23992. self._offset += have;
  23993. // serve some output to the consumer.
  23994. if (async) {
  23995. self.push(out);
  23996. } else {
  23997. buffers.push(out);
  23998. nread += out.length;
  23999. }
  24000. }
  24001. // exhausted the output buffer, or used all the input create a new one.
  24002. if (availOutAfter === 0 || self._offset >= self._chunkSize) {
  24003. availOutBefore = self._chunkSize;
  24004. self._offset = 0;
  24005. self._buffer = Buffer.allocUnsafe(self._chunkSize);
  24006. }
  24007. if (availOutAfter === 0) {
  24008. // Not actually done. Need to reprocess.
  24009. // Also, update the availInBefore to the availInAfter value,
  24010. // so that if we have to hit it a third (fourth, etc.) time,
  24011. // it'll have the correct byte counts.
  24012. inOff += availInBefore - availInAfter;
  24013. availInBefore = availInAfter;
  24014. if (!async) return true;
  24015. var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize);
  24016. newReq.callback = callback; // this same function
  24017. newReq.buffer = chunk;
  24018. return;
  24019. }
  24020. if (!async) return false;
  24021. // finished with the chunk.
  24022. cb();
  24023. }
  24024. };
  24025. util.inherits(Deflate, Zlib);
  24026. util.inherits(Inflate, Zlib);
  24027. util.inherits(Gzip, Zlib);
  24028. util.inherits(Gunzip, Zlib);
  24029. util.inherits(DeflateRaw, Zlib);
  24030. util.inherits(InflateRaw, Zlib);
  24031. util.inherits(Unzip, Zlib);
  24032. /***/ }),
  24033. /***/ 6907:
  24034. /***/ (function(__unused_webpack_module, exports) {
  24035. "use strict";
  24036. var TYPED_OK = (typeof Uint8Array !== 'undefined') &&
  24037. (typeof Uint16Array !== 'undefined') &&
  24038. (typeof Int32Array !== 'undefined');
  24039. function _has(obj, key) {
  24040. return Object.prototype.hasOwnProperty.call(obj, key);
  24041. }
  24042. exports.assign = function (obj /*from1, from2, from3, ...*/) {
  24043. var sources = Array.prototype.slice.call(arguments, 1);
  24044. while (sources.length) {
  24045. var source = sources.shift();
  24046. if (!source) { continue; }
  24047. if (typeof source !== 'object') {
  24048. throw new TypeError(source + 'must be non-object');
  24049. }
  24050. for (var p in source) {
  24051. if (_has(source, p)) {
  24052. obj[p] = source[p];
  24053. }
  24054. }
  24055. }
  24056. return obj;
  24057. };
  24058. // reduce buffer size, avoiding mem copy
  24059. exports.shrinkBuf = function (buf, size) {
  24060. if (buf.length === size) { return buf; }
  24061. if (buf.subarray) { return buf.subarray(0, size); }
  24062. buf.length = size;
  24063. return buf;
  24064. };
  24065. var fnTyped = {
  24066. arraySet: function (dest, src, src_offs, len, dest_offs) {
  24067. if (src.subarray && dest.subarray) {
  24068. dest.set(src.subarray(src_offs, src_offs + len), dest_offs);
  24069. return;
  24070. }
  24071. // Fallback to ordinary array
  24072. for (var i = 0; i < len; i++) {
  24073. dest[dest_offs + i] = src[src_offs + i];
  24074. }
  24075. },
  24076. // Join array of chunks to single array.
  24077. flattenChunks: function (chunks) {
  24078. var i, l, len, pos, chunk, result;
  24079. // calculate data length
  24080. len = 0;
  24081. for (i = 0, l = chunks.length; i < l; i++) {
  24082. len += chunks[i].length;
  24083. }
  24084. // join chunks
  24085. result = new Uint8Array(len);
  24086. pos = 0;
  24087. for (i = 0, l = chunks.length; i < l; i++) {
  24088. chunk = chunks[i];
  24089. result.set(chunk, pos);
  24090. pos += chunk.length;
  24091. }
  24092. return result;
  24093. }
  24094. };
  24095. var fnUntyped = {
  24096. arraySet: function (dest, src, src_offs, len, dest_offs) {
  24097. for (var i = 0; i < len; i++) {
  24098. dest[dest_offs + i] = src[src_offs + i];
  24099. }
  24100. },
  24101. // Join array of chunks to single array.
  24102. flattenChunks: function (chunks) {
  24103. return [].concat.apply([], chunks);
  24104. }
  24105. };
  24106. // Enable/Disable typed arrays use, for testing
  24107. //
  24108. exports.setTyped = function (on) {
  24109. if (on) {
  24110. exports.Buf8 = Uint8Array;
  24111. exports.Buf16 = Uint16Array;
  24112. exports.Buf32 = Int32Array;
  24113. exports.assign(exports, fnTyped);
  24114. } else {
  24115. exports.Buf8 = Array;
  24116. exports.Buf16 = Array;
  24117. exports.Buf32 = Array;
  24118. exports.assign(exports, fnUntyped);
  24119. }
  24120. };
  24121. exports.setTyped(TYPED_OK);
  24122. /***/ }),
  24123. /***/ 7575:
  24124. /***/ (function(module) {
  24125. "use strict";
  24126. // Note: adler32 takes 12% for level 0 and 2% for level 6.
  24127. // It isn't worth it to make additional optimizations as in original.
  24128. // Small size is preferable.
  24129. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  24130. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  24131. //
  24132. // This software is provided 'as-is', without any express or implied
  24133. // warranty. In no event will the authors be held liable for any damages
  24134. // arising from the use of this software.
  24135. //
  24136. // Permission is granted to anyone to use this software for any purpose,
  24137. // including commercial applications, and to alter it and redistribute it
  24138. // freely, subject to the following restrictions:
  24139. //
  24140. // 1. The origin of this software must not be misrepresented; you must not
  24141. // claim that you wrote the original software. If you use this software
  24142. // in a product, an acknowledgment in the product documentation would be
  24143. // appreciated but is not required.
  24144. // 2. Altered source versions must be plainly marked as such, and must not be
  24145. // misrepresented as being the original software.
  24146. // 3. This notice may not be removed or altered from any source distribution.
  24147. function adler32(adler, buf, len, pos) {
  24148. var s1 = (adler & 0xffff) |0,
  24149. s2 = ((adler >>> 16) & 0xffff) |0,
  24150. n = 0;
  24151. while (len !== 0) {
  24152. // Set limit ~ twice less than 5552, to keep
  24153. // s2 in 31-bits, because we force signed ints.
  24154. // in other case %= will fail.
  24155. n = len > 2000 ? 2000 : len;
  24156. len -= n;
  24157. do {
  24158. s1 = (s1 + buf[pos++]) |0;
  24159. s2 = (s2 + s1) |0;
  24160. } while (--n);
  24161. s1 %= 65521;
  24162. s2 %= 65521;
  24163. }
  24164. return (s1 | (s2 << 16)) |0;
  24165. }
  24166. module.exports = adler32;
  24167. /***/ }),
  24168. /***/ 7162:
  24169. /***/ (function(module) {
  24170. "use strict";
  24171. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  24172. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  24173. //
  24174. // This software is provided 'as-is', without any express or implied
  24175. // warranty. In no event will the authors be held liable for any damages
  24176. // arising from the use of this software.
  24177. //
  24178. // Permission is granted to anyone to use this software for any purpose,
  24179. // including commercial applications, and to alter it and redistribute it
  24180. // freely, subject to the following restrictions:
  24181. //
  24182. // 1. The origin of this software must not be misrepresented; you must not
  24183. // claim that you wrote the original software. If you use this software
  24184. // in a product, an acknowledgment in the product documentation would be
  24185. // appreciated but is not required.
  24186. // 2. Altered source versions must be plainly marked as such, and must not be
  24187. // misrepresented as being the original software.
  24188. // 3. This notice may not be removed or altered from any source distribution.
  24189. module.exports = {
  24190. /* Allowed flush values; see deflate() and inflate() below for details */
  24191. Z_NO_FLUSH: 0,
  24192. Z_PARTIAL_FLUSH: 1,
  24193. Z_SYNC_FLUSH: 2,
  24194. Z_FULL_FLUSH: 3,
  24195. Z_FINISH: 4,
  24196. Z_BLOCK: 5,
  24197. Z_TREES: 6,
  24198. /* Return codes for the compression/decompression functions. Negative values
  24199. * are errors, positive values are used for special but normal events.
  24200. */
  24201. Z_OK: 0,
  24202. Z_STREAM_END: 1,
  24203. Z_NEED_DICT: 2,
  24204. Z_ERRNO: -1,
  24205. Z_STREAM_ERROR: -2,
  24206. Z_DATA_ERROR: -3,
  24207. //Z_MEM_ERROR: -4,
  24208. Z_BUF_ERROR: -5,
  24209. //Z_VERSION_ERROR: -6,
  24210. /* compression levels */
  24211. Z_NO_COMPRESSION: 0,
  24212. Z_BEST_SPEED: 1,
  24213. Z_BEST_COMPRESSION: 9,
  24214. Z_DEFAULT_COMPRESSION: -1,
  24215. Z_FILTERED: 1,
  24216. Z_HUFFMAN_ONLY: 2,
  24217. Z_RLE: 3,
  24218. Z_FIXED: 4,
  24219. Z_DEFAULT_STRATEGY: 0,
  24220. /* Possible values of the data_type field (though see inflate()) */
  24221. Z_BINARY: 0,
  24222. Z_TEXT: 1,
  24223. //Z_ASCII: 1, // = Z_TEXT (deprecated)
  24224. Z_UNKNOWN: 2,
  24225. /* The deflate compression method */
  24226. Z_DEFLATED: 8
  24227. //Z_NULL: null // Use -1 or null inline, depending on var type
  24228. };
  24229. /***/ }),
  24230. /***/ 3415:
  24231. /***/ (function(module) {
  24232. "use strict";
  24233. // Note: we can't get significant speed boost here.
  24234. // So write code to minimize size - no pregenerated tables
  24235. // and array tools dependencies.
  24236. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  24237. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  24238. //
  24239. // This software is provided 'as-is', without any express or implied
  24240. // warranty. In no event will the authors be held liable for any damages
  24241. // arising from the use of this software.
  24242. //
  24243. // Permission is granted to anyone to use this software for any purpose,
  24244. // including commercial applications, and to alter it and redistribute it
  24245. // freely, subject to the following restrictions:
  24246. //
  24247. // 1. The origin of this software must not be misrepresented; you must not
  24248. // claim that you wrote the original software. If you use this software
  24249. // in a product, an acknowledgment in the product documentation would be
  24250. // appreciated but is not required.
  24251. // 2. Altered source versions must be plainly marked as such, and must not be
  24252. // misrepresented as being the original software.
  24253. // 3. This notice may not be removed or altered from any source distribution.
  24254. // Use ordinary array, since untyped makes no boost here
  24255. function makeTable() {
  24256. var c, table = [];
  24257. for (var n = 0; n < 256; n++) {
  24258. c = n;
  24259. for (var k = 0; k < 8; k++) {
  24260. c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1));
  24261. }
  24262. table[n] = c;
  24263. }
  24264. return table;
  24265. }
  24266. // Create table on load. Just 255 signed longs. Not a problem.
  24267. var crcTable = makeTable();
  24268. function crc32(crc, buf, len, pos) {
  24269. var t = crcTable,
  24270. end = pos + len;
  24271. crc ^= -1;
  24272. for (var i = pos; i < end; i++) {
  24273. crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF];
  24274. }
  24275. return (crc ^ (-1)); // >>> 0;
  24276. }
  24277. module.exports = crc32;
  24278. /***/ }),
  24279. /***/ 2233:
  24280. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  24281. "use strict";
  24282. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  24283. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  24284. //
  24285. // This software is provided 'as-is', without any express or implied
  24286. // warranty. In no event will the authors be held liable for any damages
  24287. // arising from the use of this software.
  24288. //
  24289. // Permission is granted to anyone to use this software for any purpose,
  24290. // including commercial applications, and to alter it and redistribute it
  24291. // freely, subject to the following restrictions:
  24292. //
  24293. // 1. The origin of this software must not be misrepresented; you must not
  24294. // claim that you wrote the original software. If you use this software
  24295. // in a product, an acknowledgment in the product documentation would be
  24296. // appreciated but is not required.
  24297. // 2. Altered source versions must be plainly marked as such, and must not be
  24298. // misrepresented as being the original software.
  24299. // 3. This notice may not be removed or altered from any source distribution.
  24300. var utils = __webpack_require__(6907);
  24301. var trees = __webpack_require__(1339);
  24302. var adler32 = __webpack_require__(7575);
  24303. var crc32 = __webpack_require__(3415);
  24304. var msg = __webpack_require__(9364);
  24305. /* Public constants ==========================================================*/
  24306. /* ===========================================================================*/
  24307. /* Allowed flush values; see deflate() and inflate() below for details */
  24308. var Z_NO_FLUSH = 0;
  24309. var Z_PARTIAL_FLUSH = 1;
  24310. //var Z_SYNC_FLUSH = 2;
  24311. var Z_FULL_FLUSH = 3;
  24312. var Z_FINISH = 4;
  24313. var Z_BLOCK = 5;
  24314. //var Z_TREES = 6;
  24315. /* Return codes for the compression/decompression functions. Negative values
  24316. * are errors, positive values are used for special but normal events.
  24317. */
  24318. var Z_OK = 0;
  24319. var Z_STREAM_END = 1;
  24320. //var Z_NEED_DICT = 2;
  24321. //var Z_ERRNO = -1;
  24322. var Z_STREAM_ERROR = -2;
  24323. var Z_DATA_ERROR = -3;
  24324. //var Z_MEM_ERROR = -4;
  24325. var Z_BUF_ERROR = -5;
  24326. //var Z_VERSION_ERROR = -6;
  24327. /* compression levels */
  24328. //var Z_NO_COMPRESSION = 0;
  24329. //var Z_BEST_SPEED = 1;
  24330. //var Z_BEST_COMPRESSION = 9;
  24331. var Z_DEFAULT_COMPRESSION = -1;
  24332. var Z_FILTERED = 1;
  24333. var Z_HUFFMAN_ONLY = 2;
  24334. var Z_RLE = 3;
  24335. var Z_FIXED = 4;
  24336. var Z_DEFAULT_STRATEGY = 0;
  24337. /* Possible values of the data_type field (though see inflate()) */
  24338. //var Z_BINARY = 0;
  24339. //var Z_TEXT = 1;
  24340. //var Z_ASCII = 1; // = Z_TEXT
  24341. var Z_UNKNOWN = 2;
  24342. /* The deflate compression method */
  24343. var Z_DEFLATED = 8;
  24344. /*============================================================================*/
  24345. var MAX_MEM_LEVEL = 9;
  24346. /* Maximum value for memLevel in deflateInit2 */
  24347. var MAX_WBITS = 15;
  24348. /* 32K LZ77 window */
  24349. var DEF_MEM_LEVEL = 8;
  24350. var LENGTH_CODES = 29;
  24351. /* number of length codes, not counting the special END_BLOCK code */
  24352. var LITERALS = 256;
  24353. /* number of literal bytes 0..255 */
  24354. var L_CODES = LITERALS + 1 + LENGTH_CODES;
  24355. /* number of Literal or Length codes, including the END_BLOCK code */
  24356. var D_CODES = 30;
  24357. /* number of distance codes */
  24358. var BL_CODES = 19;
  24359. /* number of codes used to transfer the bit lengths */
  24360. var HEAP_SIZE = 2 * L_CODES + 1;
  24361. /* maximum heap size */
  24362. var MAX_BITS = 15;
  24363. /* All codes must not exceed MAX_BITS bits */
  24364. var MIN_MATCH = 3;
  24365. var MAX_MATCH = 258;
  24366. var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1);
  24367. var PRESET_DICT = 0x20;
  24368. var INIT_STATE = 42;
  24369. var EXTRA_STATE = 69;
  24370. var NAME_STATE = 73;
  24371. var COMMENT_STATE = 91;
  24372. var HCRC_STATE = 103;
  24373. var BUSY_STATE = 113;
  24374. var FINISH_STATE = 666;
  24375. var BS_NEED_MORE = 1; /* block not completed, need more input or more output */
  24376. var BS_BLOCK_DONE = 2; /* block flush performed */
  24377. var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */
  24378. var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */
  24379. var OS_CODE = 0x03; // Unix :) . Don't detect, use this default.
  24380. function err(strm, errorCode) {
  24381. strm.msg = msg[errorCode];
  24382. return errorCode;
  24383. }
  24384. function rank(f) {
  24385. return ((f) << 1) - ((f) > 4 ? 9 : 0);
  24386. }
  24387. function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
  24388. /* =========================================================================
  24389. * Flush as much pending output as possible. All deflate() output goes
  24390. * through this function so some applications may wish to modify it
  24391. * to avoid allocating a large strm->output buffer and copying into it.
  24392. * (See also read_buf()).
  24393. */
  24394. function flush_pending(strm) {
  24395. var s = strm.state;
  24396. //_tr_flush_bits(s);
  24397. var len = s.pending;
  24398. if (len > strm.avail_out) {
  24399. len = strm.avail_out;
  24400. }
  24401. if (len === 0) { return; }
  24402. utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out);
  24403. strm.next_out += len;
  24404. s.pending_out += len;
  24405. strm.total_out += len;
  24406. strm.avail_out -= len;
  24407. s.pending -= len;
  24408. if (s.pending === 0) {
  24409. s.pending_out = 0;
  24410. }
  24411. }
  24412. function flush_block_only(s, last) {
  24413. trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last);
  24414. s.block_start = s.strstart;
  24415. flush_pending(s.strm);
  24416. }
  24417. function put_byte(s, b) {
  24418. s.pending_buf[s.pending++] = b;
  24419. }
  24420. /* =========================================================================
  24421. * Put a short in the pending buffer. The 16-bit value is put in MSB order.
  24422. * IN assertion: the stream state is correct and there is enough room in
  24423. * pending_buf.
  24424. */
  24425. function putShortMSB(s, b) {
  24426. // put_byte(s, (Byte)(b >> 8));
  24427. // put_byte(s, (Byte)(b & 0xff));
  24428. s.pending_buf[s.pending++] = (b >>> 8) & 0xff;
  24429. s.pending_buf[s.pending++] = b & 0xff;
  24430. }
  24431. /* ===========================================================================
  24432. * Read a new buffer from the current input stream, update the adler32
  24433. * and total number of bytes read. All deflate() input goes through
  24434. * this function so some applications may wish to modify it to avoid
  24435. * allocating a large strm->input buffer and copying from it.
  24436. * (See also flush_pending()).
  24437. */
  24438. function read_buf(strm, buf, start, size) {
  24439. var len = strm.avail_in;
  24440. if (len > size) { len = size; }
  24441. if (len === 0) { return 0; }
  24442. strm.avail_in -= len;
  24443. // zmemcpy(buf, strm->next_in, len);
  24444. utils.arraySet(buf, strm.input, strm.next_in, len, start);
  24445. if (strm.state.wrap === 1) {
  24446. strm.adler = adler32(strm.adler, buf, len, start);
  24447. }
  24448. else if (strm.state.wrap === 2) {
  24449. strm.adler = crc32(strm.adler, buf, len, start);
  24450. }
  24451. strm.next_in += len;
  24452. strm.total_in += len;
  24453. return len;
  24454. }
  24455. /* ===========================================================================
  24456. * Set match_start to the longest match starting at the given string and
  24457. * return its length. Matches shorter or equal to prev_length are discarded,
  24458. * in which case the result is equal to prev_length and match_start is
  24459. * garbage.
  24460. * IN assertions: cur_match is the head of the hash chain for the current
  24461. * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1
  24462. * OUT assertion: the match length is not greater than s->lookahead.
  24463. */
  24464. function longest_match(s, cur_match) {
  24465. var chain_length = s.max_chain_length; /* max hash chain length */
  24466. var scan = s.strstart; /* current string */
  24467. var match; /* matched string */
  24468. var len; /* length of current match */
  24469. var best_len = s.prev_length; /* best match length so far */
  24470. var nice_match = s.nice_match; /* stop if match long enough */
  24471. var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
  24472. s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;
  24473. var _win = s.window; // shortcut
  24474. var wmask = s.w_mask;
  24475. var prev = s.prev;
  24476. /* Stop when cur_match becomes <= limit. To simplify the code,
  24477. * we prevent matches with the string of window index 0.
  24478. */
  24479. var strend = s.strstart + MAX_MATCH;
  24480. var scan_end1 = _win[scan + best_len - 1];
  24481. var scan_end = _win[scan + best_len];
  24482. /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
  24483. * It is easy to get rid of this optimization if necessary.
  24484. */
  24485. // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
  24486. /* Do not waste too much time if we already have a good match: */
  24487. if (s.prev_length >= s.good_match) {
  24488. chain_length >>= 2;
  24489. }
  24490. /* Do not look for matches beyond the end of the input. This is necessary
  24491. * to make deflate deterministic.
  24492. */
  24493. if (nice_match > s.lookahead) { nice_match = s.lookahead; }
  24494. // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
  24495. do {
  24496. // Assert(cur_match < s->strstart, "no future");
  24497. match = cur_match;
  24498. /* Skip to next match if the match length cannot increase
  24499. * or if the match length is less than 2. Note that the checks below
  24500. * for insufficient lookahead only occur occasionally for performance
  24501. * reasons. Therefore uninitialized memory will be accessed, and
  24502. * conditional jumps will be made that depend on those values.
  24503. * However the length of the match is limited to the lookahead, so
  24504. * the output of deflate is not affected by the uninitialized values.
  24505. */
  24506. if (_win[match + best_len] !== scan_end ||
  24507. _win[match + best_len - 1] !== scan_end1 ||
  24508. _win[match] !== _win[scan] ||
  24509. _win[++match] !== _win[scan + 1]) {
  24510. continue;
  24511. }
  24512. /* The check at best_len-1 can be removed because it will be made
  24513. * again later. (This heuristic is not always a win.)
  24514. * It is not necessary to compare scan[2] and match[2] since they
  24515. * are always equal when the other bytes match, given that
  24516. * the hash keys are equal and that HASH_BITS >= 8.
  24517. */
  24518. scan += 2;
  24519. match++;
  24520. // Assert(*scan == *match, "match[2]?");
  24521. /* We check for insufficient lookahead only every 8th comparison;
  24522. * the 256th check will be made at strstart+258.
  24523. */
  24524. do {
  24525. /*jshint noempty:false*/
  24526. } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
  24527. _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
  24528. _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
  24529. _win[++scan] === _win[++match] && _win[++scan] === _win[++match] &&
  24530. scan < strend);
  24531. // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
  24532. len = MAX_MATCH - (strend - scan);
  24533. scan = strend - MAX_MATCH;
  24534. if (len > best_len) {
  24535. s.match_start = cur_match;
  24536. best_len = len;
  24537. if (len >= nice_match) {
  24538. break;
  24539. }
  24540. scan_end1 = _win[scan + best_len - 1];
  24541. scan_end = _win[scan + best_len];
  24542. }
  24543. } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);
  24544. if (best_len <= s.lookahead) {
  24545. return best_len;
  24546. }
  24547. return s.lookahead;
  24548. }
  24549. /* ===========================================================================
  24550. * Fill the window when the lookahead becomes insufficient.
  24551. * Updates strstart and lookahead.
  24552. *
  24553. * IN assertion: lookahead < MIN_LOOKAHEAD
  24554. * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
  24555. * At least one byte has been read, or avail_in == 0; reads are
  24556. * performed for at least two bytes (required for the zip translate_eol
  24557. * option -- not supported here).
  24558. */
  24559. function fill_window(s) {
  24560. var _w_size = s.w_size;
  24561. var p, n, m, more, str;
  24562. //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
  24563. do {
  24564. more = s.window_size - s.lookahead - s.strstart;
  24565. // JS ints have 32 bit, block below not needed
  24566. /* Deal with !@#$% 64K limit: */
  24567. //if (sizeof(int) <= 2) {
  24568. // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
  24569. // more = wsize;
  24570. //
  24571. // } else if (more == (unsigned)(-1)) {
  24572. // /* Very unlikely, but possible on 16 bit machine if
  24573. // * strstart == 0 && lookahead == 1 (input done a byte at time)
  24574. // */
  24575. // more--;
  24576. // }
  24577. //}
  24578. /* If the window is almost full and there is insufficient lookahead,
  24579. * move the upper half to the lower one to make room in the upper half.
  24580. */
  24581. if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
  24582. utils.arraySet(s.window, s.window, _w_size, _w_size, 0);
  24583. s.match_start -= _w_size;
  24584. s.strstart -= _w_size;
  24585. /* we now have strstart >= MAX_DIST */
  24586. s.block_start -= _w_size;
  24587. /* Slide the hash table (could be avoided with 32 bit values
  24588. at the expense of memory usage). We slide even when level == 0
  24589. to keep the hash table consistent if we switch back to level > 0
  24590. later. (Using level 0 permanently is not an optimal usage of
  24591. zlib, so we don't care about this pathological case.)
  24592. */
  24593. n = s.hash_size;
  24594. p = n;
  24595. do {
  24596. m = s.head[--p];
  24597. s.head[p] = (m >= _w_size ? m - _w_size : 0);
  24598. } while (--n);
  24599. n = _w_size;
  24600. p = n;
  24601. do {
  24602. m = s.prev[--p];
  24603. s.prev[p] = (m >= _w_size ? m - _w_size : 0);
  24604. /* If n is not on any hash chain, prev[n] is garbage but
  24605. * its value will never be used.
  24606. */
  24607. } while (--n);
  24608. more += _w_size;
  24609. }
  24610. if (s.strm.avail_in === 0) {
  24611. break;
  24612. }
  24613. /* If there was no sliding:
  24614. * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
  24615. * more == window_size - lookahead - strstart
  24616. * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
  24617. * => more >= window_size - 2*WSIZE + 2
  24618. * In the BIG_MEM or MMAP case (not yet supported),
  24619. * window_size == input_size + MIN_LOOKAHEAD &&
  24620. * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
  24621. * Otherwise, window_size == 2*WSIZE so more >= 2.
  24622. * If there was sliding, more >= WSIZE. So in all cases, more >= 2.
  24623. */
  24624. //Assert(more >= 2, "more < 2");
  24625. n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more);
  24626. s.lookahead += n;
  24627. /* Initialize the hash value now that we have some input: */
  24628. if (s.lookahead + s.insert >= MIN_MATCH) {
  24629. str = s.strstart - s.insert;
  24630. s.ins_h = s.window[str];
  24631. /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
  24632. s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask;
  24633. //#if MIN_MATCH != 3
  24634. // Call update_hash() MIN_MATCH-3 more times
  24635. //#endif
  24636. while (s.insert) {
  24637. /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
  24638. s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;
  24639. s.prev[str & s.w_mask] = s.head[s.ins_h];
  24640. s.head[s.ins_h] = str;
  24641. str++;
  24642. s.insert--;
  24643. if (s.lookahead + s.insert < MIN_MATCH) {
  24644. break;
  24645. }
  24646. }
  24647. }
  24648. /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage,
  24649. * but this is not important since only literal bytes will be emitted.
  24650. */
  24651. } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0);
  24652. /* If the WIN_INIT bytes after the end of the current data have never been
  24653. * written, then zero those bytes in order to avoid memory check reports of
  24654. * the use of uninitialized (or uninitialised as Julian writes) bytes by
  24655. * the longest match routines. Update the high water mark for the next
  24656. * time through here. WIN_INIT is set to MAX_MATCH since the longest match
  24657. * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
  24658. */
  24659. // if (s.high_water < s.window_size) {
  24660. // var curr = s.strstart + s.lookahead;
  24661. // var init = 0;
  24662. //
  24663. // if (s.high_water < curr) {
  24664. // /* Previous high water mark below current data -- zero WIN_INIT
  24665. // * bytes or up to end of window, whichever is less.
  24666. // */
  24667. // init = s.window_size - curr;
  24668. // if (init > WIN_INIT)
  24669. // init = WIN_INIT;
  24670. // zmemzero(s->window + curr, (unsigned)init);
  24671. // s->high_water = curr + init;
  24672. // }
  24673. // else if (s->high_water < (ulg)curr + WIN_INIT) {
  24674. // /* High water mark at or above current data, but below current data
  24675. // * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
  24676. // * to end of window, whichever is less.
  24677. // */
  24678. // init = (ulg)curr + WIN_INIT - s->high_water;
  24679. // if (init > s->window_size - s->high_water)
  24680. // init = s->window_size - s->high_water;
  24681. // zmemzero(s->window + s->high_water, (unsigned)init);
  24682. // s->high_water += init;
  24683. // }
  24684. // }
  24685. //
  24686. // Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
  24687. // "not enough room for search");
  24688. }
  24689. /* ===========================================================================
  24690. * Copy without compression as much as possible from the input stream, return
  24691. * the current block state.
  24692. * This function does not insert new strings in the dictionary since
  24693. * uncompressible data is probably not useful. This function is used
  24694. * only for the level=0 compression option.
  24695. * NOTE: this function should be optimized to avoid extra copying from
  24696. * window to pending_buf.
  24697. */
  24698. function deflate_stored(s, flush) {
  24699. /* Stored blocks are limited to 0xffff bytes, pending_buf is limited
  24700. * to pending_buf_size, and each stored block has a 5 byte header:
  24701. */
  24702. var max_block_size = 0xffff;
  24703. if (max_block_size > s.pending_buf_size - 5) {
  24704. max_block_size = s.pending_buf_size - 5;
  24705. }
  24706. /* Copy as much as possible from input to output: */
  24707. for (;;) {
  24708. /* Fill the window as much as possible: */
  24709. if (s.lookahead <= 1) {
  24710. //Assert(s->strstart < s->w_size+MAX_DIST(s) ||
  24711. // s->block_start >= (long)s->w_size, "slide too late");
  24712. // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||
  24713. // s.block_start >= s.w_size)) {
  24714. // throw new Error("slide too late");
  24715. // }
  24716. fill_window(s);
  24717. if (s.lookahead === 0 && flush === Z_NO_FLUSH) {
  24718. return BS_NEED_MORE;
  24719. }
  24720. if (s.lookahead === 0) {
  24721. break;
  24722. }
  24723. /* flush the current block */
  24724. }
  24725. //Assert(s->block_start >= 0L, "block gone");
  24726. // if (s.block_start < 0) throw new Error("block gone");
  24727. s.strstart += s.lookahead;
  24728. s.lookahead = 0;
  24729. /* Emit a stored block if pending_buf will be full: */
  24730. var max_start = s.block_start + max_block_size;
  24731. if (s.strstart === 0 || s.strstart >= max_start) {
  24732. /* strstart == 0 is possible when wraparound on 16-bit machine */
  24733. s.lookahead = s.strstart - max_start;
  24734. s.strstart = max_start;
  24735. /*** FLUSH_BLOCK(s, 0); ***/
  24736. flush_block_only(s, false);
  24737. if (s.strm.avail_out === 0) {
  24738. return BS_NEED_MORE;
  24739. }
  24740. /***/
  24741. }
  24742. /* Flush if we may have to slide, otherwise block_start may become
  24743. * negative and the data will be gone:
  24744. */
  24745. if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {
  24746. /*** FLUSH_BLOCK(s, 0); ***/
  24747. flush_block_only(s, false);
  24748. if (s.strm.avail_out === 0) {
  24749. return BS_NEED_MORE;
  24750. }
  24751. /***/
  24752. }
  24753. }
  24754. s.insert = 0;
  24755. if (flush === Z_FINISH) {
  24756. /*** FLUSH_BLOCK(s, 1); ***/
  24757. flush_block_only(s, true);
  24758. if (s.strm.avail_out === 0) {
  24759. return BS_FINISH_STARTED;
  24760. }
  24761. /***/
  24762. return BS_FINISH_DONE;
  24763. }
  24764. if (s.strstart > s.block_start) {
  24765. /*** FLUSH_BLOCK(s, 0); ***/
  24766. flush_block_only(s, false);
  24767. if (s.strm.avail_out === 0) {
  24768. return BS_NEED_MORE;
  24769. }
  24770. /***/
  24771. }
  24772. return BS_NEED_MORE;
  24773. }
  24774. /* ===========================================================================
  24775. * Compress as much as possible from the input stream, return the current
  24776. * block state.
  24777. * This function does not perform lazy evaluation of matches and inserts
  24778. * new strings in the dictionary only for unmatched strings or for short
  24779. * matches. It is used only for the fast compression options.
  24780. */
  24781. function deflate_fast(s, flush) {
  24782. var hash_head; /* head of the hash chain */
  24783. var bflush; /* set if current block must be flushed */
  24784. for (;;) {
  24785. /* Make sure that we always have enough lookahead, except
  24786. * at the end of the input file. We need MAX_MATCH bytes
  24787. * for the next match, plus MIN_MATCH bytes to insert the
  24788. * string following the next match.
  24789. */
  24790. if (s.lookahead < MIN_LOOKAHEAD) {
  24791. fill_window(s);
  24792. if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
  24793. return BS_NEED_MORE;
  24794. }
  24795. if (s.lookahead === 0) {
  24796. break; /* flush the current block */
  24797. }
  24798. }
  24799. /* Insert the string window[strstart .. strstart+2] in the
  24800. * dictionary, and set hash_head to the head of the hash chain:
  24801. */
  24802. hash_head = 0/*NIL*/;
  24803. if (s.lookahead >= MIN_MATCH) {
  24804. /*** INSERT_STRING(s, s.strstart, hash_head); ***/
  24805. s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
  24806. hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
  24807. s.head[s.ins_h] = s.strstart;
  24808. /***/
  24809. }
  24810. /* Find the longest match, discarding those <= prev_length.
  24811. * At this point we have always match_length < MIN_MATCH
  24812. */
  24813. if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
  24814. /* To simplify the code, we prevent matches with the string
  24815. * of window index 0 (in particular we have to avoid a match
  24816. * of the string with itself at the start of the input file).
  24817. */
  24818. s.match_length = longest_match(s, hash_head);
  24819. /* longest_match() sets match_start */
  24820. }
  24821. if (s.match_length >= MIN_MATCH) {
  24822. // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only
  24823. /*** _tr_tally_dist(s, s.strstart - s.match_start,
  24824. s.match_length - MIN_MATCH, bflush); ***/
  24825. bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);
  24826. s.lookahead -= s.match_length;
  24827. /* Insert new strings in the hash table only if the match length
  24828. * is not too large. This saves time but degrades compression.
  24829. */
  24830. if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) {
  24831. s.match_length--; /* string at strstart already in table */
  24832. do {
  24833. s.strstart++;
  24834. /*** INSERT_STRING(s, s.strstart, hash_head); ***/
  24835. s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
  24836. hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
  24837. s.head[s.ins_h] = s.strstart;
  24838. /***/
  24839. /* strstart never exceeds WSIZE-MAX_MATCH, so there are
  24840. * always MIN_MATCH bytes ahead.
  24841. */
  24842. } while (--s.match_length !== 0);
  24843. s.strstart++;
  24844. } else
  24845. {
  24846. s.strstart += s.match_length;
  24847. s.match_length = 0;
  24848. s.ins_h = s.window[s.strstart];
  24849. /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */
  24850. s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask;
  24851. //#if MIN_MATCH != 3
  24852. // Call UPDATE_HASH() MIN_MATCH-3 more times
  24853. //#endif
  24854. /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not
  24855. * matter since it will be recomputed at next deflate call.
  24856. */
  24857. }
  24858. } else {
  24859. /* No match, output a literal byte */
  24860. //Tracevv((stderr,"%c", s.window[s.strstart]));
  24861. /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
  24862. bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
  24863. s.lookahead--;
  24864. s.strstart++;
  24865. }
  24866. if (bflush) {
  24867. /*** FLUSH_BLOCK(s, 0); ***/
  24868. flush_block_only(s, false);
  24869. if (s.strm.avail_out === 0) {
  24870. return BS_NEED_MORE;
  24871. }
  24872. /***/
  24873. }
  24874. }
  24875. s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);
  24876. if (flush === Z_FINISH) {
  24877. /*** FLUSH_BLOCK(s, 1); ***/
  24878. flush_block_only(s, true);
  24879. if (s.strm.avail_out === 0) {
  24880. return BS_FINISH_STARTED;
  24881. }
  24882. /***/
  24883. return BS_FINISH_DONE;
  24884. }
  24885. if (s.last_lit) {
  24886. /*** FLUSH_BLOCK(s, 0); ***/
  24887. flush_block_only(s, false);
  24888. if (s.strm.avail_out === 0) {
  24889. return BS_NEED_MORE;
  24890. }
  24891. /***/
  24892. }
  24893. return BS_BLOCK_DONE;
  24894. }
  24895. /* ===========================================================================
  24896. * Same as above, but achieves better compression. We use a lazy
  24897. * evaluation for matches: a match is finally adopted only if there is
  24898. * no better match at the next window position.
  24899. */
  24900. function deflate_slow(s, flush) {
  24901. var hash_head; /* head of hash chain */
  24902. var bflush; /* set if current block must be flushed */
  24903. var max_insert;
  24904. /* Process the input block. */
  24905. for (;;) {
  24906. /* Make sure that we always have enough lookahead, except
  24907. * at the end of the input file. We need MAX_MATCH bytes
  24908. * for the next match, plus MIN_MATCH bytes to insert the
  24909. * string following the next match.
  24910. */
  24911. if (s.lookahead < MIN_LOOKAHEAD) {
  24912. fill_window(s);
  24913. if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) {
  24914. return BS_NEED_MORE;
  24915. }
  24916. if (s.lookahead === 0) { break; } /* flush the current block */
  24917. }
  24918. /* Insert the string window[strstart .. strstart+2] in the
  24919. * dictionary, and set hash_head to the head of the hash chain:
  24920. */
  24921. hash_head = 0/*NIL*/;
  24922. if (s.lookahead >= MIN_MATCH) {
  24923. /*** INSERT_STRING(s, s.strstart, hash_head); ***/
  24924. s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
  24925. hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
  24926. s.head[s.ins_h] = s.strstart;
  24927. /***/
  24928. }
  24929. /* Find the longest match, discarding those <= prev_length.
  24930. */
  24931. s.prev_length = s.match_length;
  24932. s.prev_match = s.match_start;
  24933. s.match_length = MIN_MATCH - 1;
  24934. if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match &&
  24935. s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
  24936. /* To simplify the code, we prevent matches with the string
  24937. * of window index 0 (in particular we have to avoid a match
  24938. * of the string with itself at the start of the input file).
  24939. */
  24940. s.match_length = longest_match(s, hash_head);
  24941. /* longest_match() sets match_start */
  24942. if (s.match_length <= 5 &&
  24943. (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) {
  24944. /* If prev_match is also MIN_MATCH, match_start is garbage
  24945. * but we will ignore the current match anyway.
  24946. */
  24947. s.match_length = MIN_MATCH - 1;
  24948. }
  24949. }
  24950. /* If there was a match at the previous step and the current
  24951. * match is not better, output the previous match:
  24952. */
  24953. if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) {
  24954. max_insert = s.strstart + s.lookahead - MIN_MATCH;
  24955. /* Do not insert strings in hash table beyond this. */
  24956. //check_match(s, s.strstart-1, s.prev_match, s.prev_length);
  24957. /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
  24958. s.prev_length - MIN_MATCH, bflush);***/
  24959. bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);
  24960. /* Insert in hash table all strings up to the end of the match.
  24961. * strstart-1 and strstart are already inserted. If there is not
  24962. * enough lookahead, the last two strings are not inserted in
  24963. * the hash table.
  24964. */
  24965. s.lookahead -= s.prev_length - 1;
  24966. s.prev_length -= 2;
  24967. do {
  24968. if (++s.strstart <= max_insert) {
  24969. /*** INSERT_STRING(s, s.strstart, hash_head); ***/
  24970. s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
  24971. hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h];
  24972. s.head[s.ins_h] = s.strstart;
  24973. /***/
  24974. }
  24975. } while (--s.prev_length !== 0);
  24976. s.match_available = 0;
  24977. s.match_length = MIN_MATCH - 1;
  24978. s.strstart++;
  24979. if (bflush) {
  24980. /*** FLUSH_BLOCK(s, 0); ***/
  24981. flush_block_only(s, false);
  24982. if (s.strm.avail_out === 0) {
  24983. return BS_NEED_MORE;
  24984. }
  24985. /***/
  24986. }
  24987. } else if (s.match_available) {
  24988. /* If there was no match at the previous position, output a
  24989. * single literal. If there was a match but the current match
  24990. * is longer, truncate the previous match to a single literal.
  24991. */
  24992. //Tracevv((stderr,"%c", s->window[s->strstart-1]));
  24993. /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
  24994. bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);
  24995. if (bflush) {
  24996. /*** FLUSH_BLOCK_ONLY(s, 0) ***/
  24997. flush_block_only(s, false);
  24998. /***/
  24999. }
  25000. s.strstart++;
  25001. s.lookahead--;
  25002. if (s.strm.avail_out === 0) {
  25003. return BS_NEED_MORE;
  25004. }
  25005. } else {
  25006. /* There is no previous match to compare with, wait for
  25007. * the next step to decide.
  25008. */
  25009. s.match_available = 1;
  25010. s.strstart++;
  25011. s.lookahead--;
  25012. }
  25013. }
  25014. //Assert (flush != Z_NO_FLUSH, "no flush?");
  25015. if (s.match_available) {
  25016. //Tracevv((stderr,"%c", s->window[s->strstart-1]));
  25017. /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
  25018. bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);
  25019. s.match_available = 0;
  25020. }
  25021. s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;
  25022. if (flush === Z_FINISH) {
  25023. /*** FLUSH_BLOCK(s, 1); ***/
  25024. flush_block_only(s, true);
  25025. if (s.strm.avail_out === 0) {
  25026. return BS_FINISH_STARTED;
  25027. }
  25028. /***/
  25029. return BS_FINISH_DONE;
  25030. }
  25031. if (s.last_lit) {
  25032. /*** FLUSH_BLOCK(s, 0); ***/
  25033. flush_block_only(s, false);
  25034. if (s.strm.avail_out === 0) {
  25035. return BS_NEED_MORE;
  25036. }
  25037. /***/
  25038. }
  25039. return BS_BLOCK_DONE;
  25040. }
  25041. /* ===========================================================================
  25042. * For Z_RLE, simply look for runs of bytes, generate matches only of distance
  25043. * one. Do not maintain a hash table. (It will be regenerated if this run of
  25044. * deflate switches away from Z_RLE.)
  25045. */
  25046. function deflate_rle(s, flush) {
  25047. var bflush; /* set if current block must be flushed */
  25048. var prev; /* byte at distance one to match */
  25049. var scan, strend; /* scan goes up to strend for length of run */
  25050. var _win = s.window;
  25051. for (;;) {
  25052. /* Make sure that we always have enough lookahead, except
  25053. * at the end of the input file. We need MAX_MATCH bytes
  25054. * for the longest run, plus one for the unrolled loop.
  25055. */
  25056. if (s.lookahead <= MAX_MATCH) {
  25057. fill_window(s);
  25058. if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) {
  25059. return BS_NEED_MORE;
  25060. }
  25061. if (s.lookahead === 0) { break; } /* flush the current block */
  25062. }
  25063. /* See how many times the previous byte repeats */
  25064. s.match_length = 0;
  25065. if (s.lookahead >= MIN_MATCH && s.strstart > 0) {
  25066. scan = s.strstart - 1;
  25067. prev = _win[scan];
  25068. if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) {
  25069. strend = s.strstart + MAX_MATCH;
  25070. do {
  25071. /*jshint noempty:false*/
  25072. } while (prev === _win[++scan] && prev === _win[++scan] &&
  25073. prev === _win[++scan] && prev === _win[++scan] &&
  25074. prev === _win[++scan] && prev === _win[++scan] &&
  25075. prev === _win[++scan] && prev === _win[++scan] &&
  25076. scan < strend);
  25077. s.match_length = MAX_MATCH - (strend - scan);
  25078. if (s.match_length > s.lookahead) {
  25079. s.match_length = s.lookahead;
  25080. }
  25081. }
  25082. //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
  25083. }
  25084. /* Emit match if have run of MIN_MATCH or longer, else emit literal */
  25085. if (s.match_length >= MIN_MATCH) {
  25086. //check_match(s, s.strstart, s.strstart - 1, s.match_length);
  25087. /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
  25088. bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);
  25089. s.lookahead -= s.match_length;
  25090. s.strstart += s.match_length;
  25091. s.match_length = 0;
  25092. } else {
  25093. /* No match, output a literal byte */
  25094. //Tracevv((stderr,"%c", s->window[s->strstart]));
  25095. /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
  25096. bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
  25097. s.lookahead--;
  25098. s.strstart++;
  25099. }
  25100. if (bflush) {
  25101. /*** FLUSH_BLOCK(s, 0); ***/
  25102. flush_block_only(s, false);
  25103. if (s.strm.avail_out === 0) {
  25104. return BS_NEED_MORE;
  25105. }
  25106. /***/
  25107. }
  25108. }
  25109. s.insert = 0;
  25110. if (flush === Z_FINISH) {
  25111. /*** FLUSH_BLOCK(s, 1); ***/
  25112. flush_block_only(s, true);
  25113. if (s.strm.avail_out === 0) {
  25114. return BS_FINISH_STARTED;
  25115. }
  25116. /***/
  25117. return BS_FINISH_DONE;
  25118. }
  25119. if (s.last_lit) {
  25120. /*** FLUSH_BLOCK(s, 0); ***/
  25121. flush_block_only(s, false);
  25122. if (s.strm.avail_out === 0) {
  25123. return BS_NEED_MORE;
  25124. }
  25125. /***/
  25126. }
  25127. return BS_BLOCK_DONE;
  25128. }
  25129. /* ===========================================================================
  25130. * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.
  25131. * (It will be regenerated if this run of deflate switches away from Huffman.)
  25132. */
  25133. function deflate_huff(s, flush) {
  25134. var bflush; /* set if current block must be flushed */
  25135. for (;;) {
  25136. /* Make sure that we have a literal to write. */
  25137. if (s.lookahead === 0) {
  25138. fill_window(s);
  25139. if (s.lookahead === 0) {
  25140. if (flush === Z_NO_FLUSH) {
  25141. return BS_NEED_MORE;
  25142. }
  25143. break; /* flush the current block */
  25144. }
  25145. }
  25146. /* Output a literal byte */
  25147. s.match_length = 0;
  25148. //Tracevv((stderr,"%c", s->window[s->strstart]));
  25149. /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/
  25150. bflush = trees._tr_tally(s, 0, s.window[s.strstart]);
  25151. s.lookahead--;
  25152. s.strstart++;
  25153. if (bflush) {
  25154. /*** FLUSH_BLOCK(s, 0); ***/
  25155. flush_block_only(s, false);
  25156. if (s.strm.avail_out === 0) {
  25157. return BS_NEED_MORE;
  25158. }
  25159. /***/
  25160. }
  25161. }
  25162. s.insert = 0;
  25163. if (flush === Z_FINISH) {
  25164. /*** FLUSH_BLOCK(s, 1); ***/
  25165. flush_block_only(s, true);
  25166. if (s.strm.avail_out === 0) {
  25167. return BS_FINISH_STARTED;
  25168. }
  25169. /***/
  25170. return BS_FINISH_DONE;
  25171. }
  25172. if (s.last_lit) {
  25173. /*** FLUSH_BLOCK(s, 0); ***/
  25174. flush_block_only(s, false);
  25175. if (s.strm.avail_out === 0) {
  25176. return BS_NEED_MORE;
  25177. }
  25178. /***/
  25179. }
  25180. return BS_BLOCK_DONE;
  25181. }
  25182. /* Values for max_lazy_match, good_match and max_chain_length, depending on
  25183. * the desired pack level (0..9). The values given below have been tuned to
  25184. * exclude worst case performance for pathological files. Better values may be
  25185. * found for specific files.
  25186. */
  25187. function Config(good_length, max_lazy, nice_length, max_chain, func) {
  25188. this.good_length = good_length;
  25189. this.max_lazy = max_lazy;
  25190. this.nice_length = nice_length;
  25191. this.max_chain = max_chain;
  25192. this.func = func;
  25193. }
  25194. var configuration_table;
  25195. configuration_table = [
  25196. /* good lazy nice chain */
  25197. new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */
  25198. new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */
  25199. new Config(4, 5, 16, 8, deflate_fast), /* 2 */
  25200. new Config(4, 6, 32, 32, deflate_fast), /* 3 */
  25201. new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */
  25202. new Config(8, 16, 32, 32, deflate_slow), /* 5 */
  25203. new Config(8, 16, 128, 128, deflate_slow), /* 6 */
  25204. new Config(8, 32, 128, 256, deflate_slow), /* 7 */
  25205. new Config(32, 128, 258, 1024, deflate_slow), /* 8 */
  25206. new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */
  25207. ];
  25208. /* ===========================================================================
  25209. * Initialize the "longest match" routines for a new zlib stream
  25210. */
  25211. function lm_init(s) {
  25212. s.window_size = 2 * s.w_size;
  25213. /*** CLEAR_HASH(s); ***/
  25214. zero(s.head); // Fill with NIL (= 0);
  25215. /* Set the default configuration parameters:
  25216. */
  25217. s.max_lazy_match = configuration_table[s.level].max_lazy;
  25218. s.good_match = configuration_table[s.level].good_length;
  25219. s.nice_match = configuration_table[s.level].nice_length;
  25220. s.max_chain_length = configuration_table[s.level].max_chain;
  25221. s.strstart = 0;
  25222. s.block_start = 0;
  25223. s.lookahead = 0;
  25224. s.insert = 0;
  25225. s.match_length = s.prev_length = MIN_MATCH - 1;
  25226. s.match_available = 0;
  25227. s.ins_h = 0;
  25228. }
  25229. function DeflateState() {
  25230. this.strm = null; /* pointer back to this zlib stream */
  25231. this.status = 0; /* as the name implies */
  25232. this.pending_buf = null; /* output still pending */
  25233. this.pending_buf_size = 0; /* size of pending_buf */
  25234. this.pending_out = 0; /* next pending byte to output to the stream */
  25235. this.pending = 0; /* nb of bytes in the pending buffer */
  25236. this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
  25237. this.gzhead = null; /* gzip header information to write */
  25238. this.gzindex = 0; /* where in extra, name, or comment */
  25239. this.method = Z_DEFLATED; /* can only be DEFLATED */
  25240. this.last_flush = -1; /* value of flush param for previous deflate call */
  25241. this.w_size = 0; /* LZ77 window size (32K by default) */
  25242. this.w_bits = 0; /* log2(w_size) (8..16) */
  25243. this.w_mask = 0; /* w_size - 1 */
  25244. this.window = null;
  25245. /* Sliding window. Input bytes are read into the second half of the window,
  25246. * and move to the first half later to keep a dictionary of at least wSize
  25247. * bytes. With this organization, matches are limited to a distance of
  25248. * wSize-MAX_MATCH bytes, but this ensures that IO is always
  25249. * performed with a length multiple of the block size.
  25250. */
  25251. this.window_size = 0;
  25252. /* Actual size of window: 2*wSize, except when the user input buffer
  25253. * is directly used as sliding window.
  25254. */
  25255. this.prev = null;
  25256. /* Link to older string with same hash index. To limit the size of this
  25257. * array to 64K, this link is maintained only for the last 32K strings.
  25258. * An index in this array is thus a window index modulo 32K.
  25259. */
  25260. this.head = null; /* Heads of the hash chains or NIL. */
  25261. this.ins_h = 0; /* hash index of string to be inserted */
  25262. this.hash_size = 0; /* number of elements in hash table */
  25263. this.hash_bits = 0; /* log2(hash_size) */
  25264. this.hash_mask = 0; /* hash_size-1 */
  25265. this.hash_shift = 0;
  25266. /* Number of bits by which ins_h must be shifted at each input
  25267. * step. It must be such that after MIN_MATCH steps, the oldest
  25268. * byte no longer takes part in the hash key, that is:
  25269. * hash_shift * MIN_MATCH >= hash_bits
  25270. */
  25271. this.block_start = 0;
  25272. /* Window position at the beginning of the current output block. Gets
  25273. * negative when the window is moved backwards.
  25274. */
  25275. this.match_length = 0; /* length of best match */
  25276. this.prev_match = 0; /* previous match */
  25277. this.match_available = 0; /* set if previous match exists */
  25278. this.strstart = 0; /* start of string to insert */
  25279. this.match_start = 0; /* start of matching string */
  25280. this.lookahead = 0; /* number of valid bytes ahead in window */
  25281. this.prev_length = 0;
  25282. /* Length of the best match at previous step. Matches not greater than this
  25283. * are discarded. This is used in the lazy match evaluation.
  25284. */
  25285. this.max_chain_length = 0;
  25286. /* To speed up deflation, hash chains are never searched beyond this
  25287. * length. A higher limit improves compression ratio but degrades the
  25288. * speed.
  25289. */
  25290. this.max_lazy_match = 0;
  25291. /* Attempt to find a better match only when the current match is strictly
  25292. * smaller than this value. This mechanism is used only for compression
  25293. * levels >= 4.
  25294. */
  25295. // That's alias to max_lazy_match, don't use directly
  25296. //this.max_insert_length = 0;
  25297. /* Insert new strings in the hash table only if the match length is not
  25298. * greater than this length. This saves time but degrades compression.
  25299. * max_insert_length is used only for compression levels <= 3.
  25300. */
  25301. this.level = 0; /* compression level (1..9) */
  25302. this.strategy = 0; /* favor or force Huffman coding*/
  25303. this.good_match = 0;
  25304. /* Use a faster search when the previous match is longer than this */
  25305. this.nice_match = 0; /* Stop searching when current match exceeds this */
  25306. /* used by trees.c: */
  25307. /* Didn't use ct_data typedef below to suppress compiler warning */
  25308. // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */
  25309. // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */
  25310. // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */
  25311. // Use flat array of DOUBLE size, with interleaved fata,
  25312. // because JS does not support effective
  25313. this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2);
  25314. this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2);
  25315. this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2);
  25316. zero(this.dyn_ltree);
  25317. zero(this.dyn_dtree);
  25318. zero(this.bl_tree);
  25319. this.l_desc = null; /* desc. for literal tree */
  25320. this.d_desc = null; /* desc. for distance tree */
  25321. this.bl_desc = null; /* desc. for bit length tree */
  25322. //ush bl_count[MAX_BITS+1];
  25323. this.bl_count = new utils.Buf16(MAX_BITS + 1);
  25324. /* number of codes at each bit length for an optimal tree */
  25325. //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */
  25326. this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */
  25327. zero(this.heap);
  25328. this.heap_len = 0; /* number of elements in the heap */
  25329. this.heap_max = 0; /* element of largest frequency */
  25330. /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used.
  25331. * The same heap array is used to build all trees.
  25332. */
  25333. this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1];
  25334. zero(this.depth);
  25335. /* Depth of each subtree used as tie breaker for trees of equal frequency
  25336. */
  25337. this.l_buf = 0; /* buffer index for literals or lengths */
  25338. this.lit_bufsize = 0;
  25339. /* Size of match buffer for literals/lengths. There are 4 reasons for
  25340. * limiting lit_bufsize to 64K:
  25341. * - frequencies can be kept in 16 bit counters
  25342. * - if compression is not successful for the first block, all input
  25343. * data is still in the window so we can still emit a stored block even
  25344. * when input comes from standard input. (This can also be done for
  25345. * all blocks if lit_bufsize is not greater than 32K.)
  25346. * - if compression is not successful for a file smaller than 64K, we can
  25347. * even emit a stored file instead of a stored block (saving 5 bytes).
  25348. * This is applicable only for zip (not gzip or zlib).
  25349. * - creating new Huffman trees less frequently may not provide fast
  25350. * adaptation to changes in the input data statistics. (Take for
  25351. * example a binary file with poorly compressible code followed by
  25352. * a highly compressible string table.) Smaller buffer sizes give
  25353. * fast adaptation but have of course the overhead of transmitting
  25354. * trees more frequently.
  25355. * - I can't count above 4
  25356. */
  25357. this.last_lit = 0; /* running index in l_buf */
  25358. this.d_buf = 0;
  25359. /* Buffer index for distances. To simplify the code, d_buf and l_buf have
  25360. * the same number of elements. To use different lengths, an extra flag
  25361. * array would be necessary.
  25362. */
  25363. this.opt_len = 0; /* bit length of current block with optimal trees */
  25364. this.static_len = 0; /* bit length of current block with static trees */
  25365. this.matches = 0; /* number of string matches in current block */
  25366. this.insert = 0; /* bytes at end of window left to insert */
  25367. this.bi_buf = 0;
  25368. /* Output buffer. bits are inserted starting at the bottom (least
  25369. * significant bits).
  25370. */
  25371. this.bi_valid = 0;
  25372. /* Number of valid bits in bi_buf. All bits above the last valid bit
  25373. * are always zero.
  25374. */
  25375. // Used for window memory init. We safely ignore it for JS. That makes
  25376. // sense only for pointers and memory check tools.
  25377. //this.high_water = 0;
  25378. /* High water mark offset in window for initialized bytes -- bytes above
  25379. * this are set to zero in order to avoid memory check warnings when
  25380. * longest match routines access bytes past the input. This is then
  25381. * updated to the new high water mark.
  25382. */
  25383. }
  25384. function deflateResetKeep(strm) {
  25385. var s;
  25386. if (!strm || !strm.state) {
  25387. return err(strm, Z_STREAM_ERROR);
  25388. }
  25389. strm.total_in = strm.total_out = 0;
  25390. strm.data_type = Z_UNKNOWN;
  25391. s = strm.state;
  25392. s.pending = 0;
  25393. s.pending_out = 0;
  25394. if (s.wrap < 0) {
  25395. s.wrap = -s.wrap;
  25396. /* was made negative by deflate(..., Z_FINISH); */
  25397. }
  25398. s.status = (s.wrap ? INIT_STATE : BUSY_STATE);
  25399. strm.adler = (s.wrap === 2) ?
  25400. 0 // crc32(0, Z_NULL, 0)
  25401. :
  25402. 1; // adler32(0, Z_NULL, 0)
  25403. s.last_flush = Z_NO_FLUSH;
  25404. trees._tr_init(s);
  25405. return Z_OK;
  25406. }
  25407. function deflateReset(strm) {
  25408. var ret = deflateResetKeep(strm);
  25409. if (ret === Z_OK) {
  25410. lm_init(strm.state);
  25411. }
  25412. return ret;
  25413. }
  25414. function deflateSetHeader(strm, head) {
  25415. if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  25416. if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; }
  25417. strm.state.gzhead = head;
  25418. return Z_OK;
  25419. }
  25420. function deflateInit2(strm, level, method, windowBits, memLevel, strategy) {
  25421. if (!strm) { // === Z_NULL
  25422. return Z_STREAM_ERROR;
  25423. }
  25424. var wrap = 1;
  25425. if (level === Z_DEFAULT_COMPRESSION) {
  25426. level = 6;
  25427. }
  25428. if (windowBits < 0) { /* suppress zlib wrapper */
  25429. wrap = 0;
  25430. windowBits = -windowBits;
  25431. }
  25432. else if (windowBits > 15) {
  25433. wrap = 2; /* write gzip wrapper instead */
  25434. windowBits -= 16;
  25435. }
  25436. if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED ||
  25437. windowBits < 8 || windowBits > 15 || level < 0 || level > 9 ||
  25438. strategy < 0 || strategy > Z_FIXED) {
  25439. return err(strm, Z_STREAM_ERROR);
  25440. }
  25441. if (windowBits === 8) {
  25442. windowBits = 9;
  25443. }
  25444. /* until 256-byte window bug fixed */
  25445. var s = new DeflateState();
  25446. strm.state = s;
  25447. s.strm = strm;
  25448. s.wrap = wrap;
  25449. s.gzhead = null;
  25450. s.w_bits = windowBits;
  25451. s.w_size = 1 << s.w_bits;
  25452. s.w_mask = s.w_size - 1;
  25453. s.hash_bits = memLevel + 7;
  25454. s.hash_size = 1 << s.hash_bits;
  25455. s.hash_mask = s.hash_size - 1;
  25456. s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
  25457. s.window = new utils.Buf8(s.w_size * 2);
  25458. s.head = new utils.Buf16(s.hash_size);
  25459. s.prev = new utils.Buf16(s.w_size);
  25460. // Don't need mem init magic for JS.
  25461. //s.high_water = 0; /* nothing written to s->window yet */
  25462. s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
  25463. s.pending_buf_size = s.lit_bufsize * 4;
  25464. //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
  25465. //s->pending_buf = (uchf *) overlay;
  25466. s.pending_buf = new utils.Buf8(s.pending_buf_size);
  25467. // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`)
  25468. //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
  25469. s.d_buf = 1 * s.lit_bufsize;
  25470. //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
  25471. s.l_buf = (1 + 2) * s.lit_bufsize;
  25472. s.level = level;
  25473. s.strategy = strategy;
  25474. s.method = method;
  25475. return deflateReset(strm);
  25476. }
  25477. function deflateInit(strm, level) {
  25478. return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);
  25479. }
  25480. function deflate(strm, flush) {
  25481. var old_flush, s;
  25482. var beg, val; // for gzip header write only
  25483. if (!strm || !strm.state ||
  25484. flush > Z_BLOCK || flush < 0) {
  25485. return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR;
  25486. }
  25487. s = strm.state;
  25488. if (!strm.output ||
  25489. (!strm.input && strm.avail_in !== 0) ||
  25490. (s.status === FINISH_STATE && flush !== Z_FINISH)) {
  25491. return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR);
  25492. }
  25493. s.strm = strm; /* just in case */
  25494. old_flush = s.last_flush;
  25495. s.last_flush = flush;
  25496. /* Write the header */
  25497. if (s.status === INIT_STATE) {
  25498. if (s.wrap === 2) { // GZIP header
  25499. strm.adler = 0; //crc32(0L, Z_NULL, 0);
  25500. put_byte(s, 31);
  25501. put_byte(s, 139);
  25502. put_byte(s, 8);
  25503. if (!s.gzhead) { // s->gzhead == Z_NULL
  25504. put_byte(s, 0);
  25505. put_byte(s, 0);
  25506. put_byte(s, 0);
  25507. put_byte(s, 0);
  25508. put_byte(s, 0);
  25509. put_byte(s, s.level === 9 ? 2 :
  25510. (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
  25511. 4 : 0));
  25512. put_byte(s, OS_CODE);
  25513. s.status = BUSY_STATE;
  25514. }
  25515. else {
  25516. put_byte(s, (s.gzhead.text ? 1 : 0) +
  25517. (s.gzhead.hcrc ? 2 : 0) +
  25518. (!s.gzhead.extra ? 0 : 4) +
  25519. (!s.gzhead.name ? 0 : 8) +
  25520. (!s.gzhead.comment ? 0 : 16)
  25521. );
  25522. put_byte(s, s.gzhead.time & 0xff);
  25523. put_byte(s, (s.gzhead.time >> 8) & 0xff);
  25524. put_byte(s, (s.gzhead.time >> 16) & 0xff);
  25525. put_byte(s, (s.gzhead.time >> 24) & 0xff);
  25526. put_byte(s, s.level === 9 ? 2 :
  25527. (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ?
  25528. 4 : 0));
  25529. put_byte(s, s.gzhead.os & 0xff);
  25530. if (s.gzhead.extra && s.gzhead.extra.length) {
  25531. put_byte(s, s.gzhead.extra.length & 0xff);
  25532. put_byte(s, (s.gzhead.extra.length >> 8) & 0xff);
  25533. }
  25534. if (s.gzhead.hcrc) {
  25535. strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0);
  25536. }
  25537. s.gzindex = 0;
  25538. s.status = EXTRA_STATE;
  25539. }
  25540. }
  25541. else // DEFLATE header
  25542. {
  25543. var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;
  25544. var level_flags = -1;
  25545. if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) {
  25546. level_flags = 0;
  25547. } else if (s.level < 6) {
  25548. level_flags = 1;
  25549. } else if (s.level === 6) {
  25550. level_flags = 2;
  25551. } else {
  25552. level_flags = 3;
  25553. }
  25554. header |= (level_flags << 6);
  25555. if (s.strstart !== 0) { header |= PRESET_DICT; }
  25556. header += 31 - (header % 31);
  25557. s.status = BUSY_STATE;
  25558. putShortMSB(s, header);
  25559. /* Save the adler32 of the preset dictionary: */
  25560. if (s.strstart !== 0) {
  25561. putShortMSB(s, strm.adler >>> 16);
  25562. putShortMSB(s, strm.adler & 0xffff);
  25563. }
  25564. strm.adler = 1; // adler32(0L, Z_NULL, 0);
  25565. }
  25566. }
  25567. //#ifdef GZIP
  25568. if (s.status === EXTRA_STATE) {
  25569. if (s.gzhead.extra/* != Z_NULL*/) {
  25570. beg = s.pending; /* start of bytes to update crc */
  25571. while (s.gzindex < (s.gzhead.extra.length & 0xffff)) {
  25572. if (s.pending === s.pending_buf_size) {
  25573. if (s.gzhead.hcrc && s.pending > beg) {
  25574. strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
  25575. }
  25576. flush_pending(strm);
  25577. beg = s.pending;
  25578. if (s.pending === s.pending_buf_size) {
  25579. break;
  25580. }
  25581. }
  25582. put_byte(s, s.gzhead.extra[s.gzindex] & 0xff);
  25583. s.gzindex++;
  25584. }
  25585. if (s.gzhead.hcrc && s.pending > beg) {
  25586. strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
  25587. }
  25588. if (s.gzindex === s.gzhead.extra.length) {
  25589. s.gzindex = 0;
  25590. s.status = NAME_STATE;
  25591. }
  25592. }
  25593. else {
  25594. s.status = NAME_STATE;
  25595. }
  25596. }
  25597. if (s.status === NAME_STATE) {
  25598. if (s.gzhead.name/* != Z_NULL*/) {
  25599. beg = s.pending; /* start of bytes to update crc */
  25600. //int val;
  25601. do {
  25602. if (s.pending === s.pending_buf_size) {
  25603. if (s.gzhead.hcrc && s.pending > beg) {
  25604. strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
  25605. }
  25606. flush_pending(strm);
  25607. beg = s.pending;
  25608. if (s.pending === s.pending_buf_size) {
  25609. val = 1;
  25610. break;
  25611. }
  25612. }
  25613. // JS specific: little magic to add zero terminator to end of string
  25614. if (s.gzindex < s.gzhead.name.length) {
  25615. val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff;
  25616. } else {
  25617. val = 0;
  25618. }
  25619. put_byte(s, val);
  25620. } while (val !== 0);
  25621. if (s.gzhead.hcrc && s.pending > beg) {
  25622. strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
  25623. }
  25624. if (val === 0) {
  25625. s.gzindex = 0;
  25626. s.status = COMMENT_STATE;
  25627. }
  25628. }
  25629. else {
  25630. s.status = COMMENT_STATE;
  25631. }
  25632. }
  25633. if (s.status === COMMENT_STATE) {
  25634. if (s.gzhead.comment/* != Z_NULL*/) {
  25635. beg = s.pending; /* start of bytes to update crc */
  25636. //int val;
  25637. do {
  25638. if (s.pending === s.pending_buf_size) {
  25639. if (s.gzhead.hcrc && s.pending > beg) {
  25640. strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
  25641. }
  25642. flush_pending(strm);
  25643. beg = s.pending;
  25644. if (s.pending === s.pending_buf_size) {
  25645. val = 1;
  25646. break;
  25647. }
  25648. }
  25649. // JS specific: little magic to add zero terminator to end of string
  25650. if (s.gzindex < s.gzhead.comment.length) {
  25651. val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff;
  25652. } else {
  25653. val = 0;
  25654. }
  25655. put_byte(s, val);
  25656. } while (val !== 0);
  25657. if (s.gzhead.hcrc && s.pending > beg) {
  25658. strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
  25659. }
  25660. if (val === 0) {
  25661. s.status = HCRC_STATE;
  25662. }
  25663. }
  25664. else {
  25665. s.status = HCRC_STATE;
  25666. }
  25667. }
  25668. if (s.status === HCRC_STATE) {
  25669. if (s.gzhead.hcrc) {
  25670. if (s.pending + 2 > s.pending_buf_size) {
  25671. flush_pending(strm);
  25672. }
  25673. if (s.pending + 2 <= s.pending_buf_size) {
  25674. put_byte(s, strm.adler & 0xff);
  25675. put_byte(s, (strm.adler >> 8) & 0xff);
  25676. strm.adler = 0; //crc32(0L, Z_NULL, 0);
  25677. s.status = BUSY_STATE;
  25678. }
  25679. }
  25680. else {
  25681. s.status = BUSY_STATE;
  25682. }
  25683. }
  25684. //#endif
  25685. /* Flush as much pending output as possible */
  25686. if (s.pending !== 0) {
  25687. flush_pending(strm);
  25688. if (strm.avail_out === 0) {
  25689. /* Since avail_out is 0, deflate will be called again with
  25690. * more output space, but possibly with both pending and
  25691. * avail_in equal to zero. There won't be anything to do,
  25692. * but this is not an error situation so make sure we
  25693. * return OK instead of BUF_ERROR at next call of deflate:
  25694. */
  25695. s.last_flush = -1;
  25696. return Z_OK;
  25697. }
  25698. /* Make sure there is something to do and avoid duplicate consecutive
  25699. * flushes. For repeated and useless calls with Z_FINISH, we keep
  25700. * returning Z_STREAM_END instead of Z_BUF_ERROR.
  25701. */
  25702. } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) &&
  25703. flush !== Z_FINISH) {
  25704. return err(strm, Z_BUF_ERROR);
  25705. }
  25706. /* User must not provide more input after the first FINISH: */
  25707. if (s.status === FINISH_STATE && strm.avail_in !== 0) {
  25708. return err(strm, Z_BUF_ERROR);
  25709. }
  25710. /* Start a new block or continue the current one.
  25711. */
  25712. if (strm.avail_in !== 0 || s.lookahead !== 0 ||
  25713. (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) {
  25714. var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) :
  25715. (s.strategy === Z_RLE ? deflate_rle(s, flush) :
  25716. configuration_table[s.level].func(s, flush));
  25717. if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) {
  25718. s.status = FINISH_STATE;
  25719. }
  25720. if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) {
  25721. if (strm.avail_out === 0) {
  25722. s.last_flush = -1;
  25723. /* avoid BUF_ERROR next call, see above */
  25724. }
  25725. return Z_OK;
  25726. /* If flush != Z_NO_FLUSH && avail_out == 0, the next call
  25727. * of deflate should use the same flush parameter to make sure
  25728. * that the flush is complete. So we don't have to output an
  25729. * empty block here, this will be done at next call. This also
  25730. * ensures that for a very small output buffer, we emit at most
  25731. * one empty block.
  25732. */
  25733. }
  25734. if (bstate === BS_BLOCK_DONE) {
  25735. if (flush === Z_PARTIAL_FLUSH) {
  25736. trees._tr_align(s);
  25737. }
  25738. else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
  25739. trees._tr_stored_block(s, 0, 0, false);
  25740. /* For a full flush, this empty block will be recognized
  25741. * as a special marker by inflate_sync().
  25742. */
  25743. if (flush === Z_FULL_FLUSH) {
  25744. /*** CLEAR_HASH(s); ***/ /* forget history */
  25745. zero(s.head); // Fill with NIL (= 0);
  25746. if (s.lookahead === 0) {
  25747. s.strstart = 0;
  25748. s.block_start = 0;
  25749. s.insert = 0;
  25750. }
  25751. }
  25752. }
  25753. flush_pending(strm);
  25754. if (strm.avail_out === 0) {
  25755. s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
  25756. return Z_OK;
  25757. }
  25758. }
  25759. }
  25760. //Assert(strm->avail_out > 0, "bug2");
  25761. //if (strm.avail_out <= 0) { throw new Error("bug2");}
  25762. if (flush !== Z_FINISH) { return Z_OK; }
  25763. if (s.wrap <= 0) { return Z_STREAM_END; }
  25764. /* Write the trailer */
  25765. if (s.wrap === 2) {
  25766. put_byte(s, strm.adler & 0xff);
  25767. put_byte(s, (strm.adler >> 8) & 0xff);
  25768. put_byte(s, (strm.adler >> 16) & 0xff);
  25769. put_byte(s, (strm.adler >> 24) & 0xff);
  25770. put_byte(s, strm.total_in & 0xff);
  25771. put_byte(s, (strm.total_in >> 8) & 0xff);
  25772. put_byte(s, (strm.total_in >> 16) & 0xff);
  25773. put_byte(s, (strm.total_in >> 24) & 0xff);
  25774. }
  25775. else
  25776. {
  25777. putShortMSB(s, strm.adler >>> 16);
  25778. putShortMSB(s, strm.adler & 0xffff);
  25779. }
  25780. flush_pending(strm);
  25781. /* If avail_out is zero, the application will call deflate again
  25782. * to flush the rest.
  25783. */
  25784. if (s.wrap > 0) { s.wrap = -s.wrap; }
  25785. /* write the trailer only once! */
  25786. return s.pending !== 0 ? Z_OK : Z_STREAM_END;
  25787. }
  25788. function deflateEnd(strm) {
  25789. var status;
  25790. if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
  25791. return Z_STREAM_ERROR;
  25792. }
  25793. status = strm.state.status;
  25794. if (status !== INIT_STATE &&
  25795. status !== EXTRA_STATE &&
  25796. status !== NAME_STATE &&
  25797. status !== COMMENT_STATE &&
  25798. status !== HCRC_STATE &&
  25799. status !== BUSY_STATE &&
  25800. status !== FINISH_STATE
  25801. ) {
  25802. return err(strm, Z_STREAM_ERROR);
  25803. }
  25804. strm.state = null;
  25805. return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK;
  25806. }
  25807. /* =========================================================================
  25808. * Initializes the compression dictionary from the given byte
  25809. * sequence without producing any compressed output.
  25810. */
  25811. function deflateSetDictionary(strm, dictionary) {
  25812. var dictLength = dictionary.length;
  25813. var s;
  25814. var str, n;
  25815. var wrap;
  25816. var avail;
  25817. var next;
  25818. var input;
  25819. var tmpDict;
  25820. if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) {
  25821. return Z_STREAM_ERROR;
  25822. }
  25823. s = strm.state;
  25824. wrap = s.wrap;
  25825. if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) {
  25826. return Z_STREAM_ERROR;
  25827. }
  25828. /* when using zlib wrappers, compute Adler-32 for provided dictionary */
  25829. if (wrap === 1) {
  25830. /* adler32(strm->adler, dictionary, dictLength); */
  25831. strm.adler = adler32(strm.adler, dictionary, dictLength, 0);
  25832. }
  25833. s.wrap = 0; /* avoid computing Adler-32 in read_buf */
  25834. /* if dictionary would fill window, just replace the history */
  25835. if (dictLength >= s.w_size) {
  25836. if (wrap === 0) { /* already empty otherwise */
  25837. /*** CLEAR_HASH(s); ***/
  25838. zero(s.head); // Fill with NIL (= 0);
  25839. s.strstart = 0;
  25840. s.block_start = 0;
  25841. s.insert = 0;
  25842. }
  25843. /* use the tail */
  25844. // dictionary = dictionary.slice(dictLength - s.w_size);
  25845. tmpDict = new utils.Buf8(s.w_size);
  25846. utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);
  25847. dictionary = tmpDict;
  25848. dictLength = s.w_size;
  25849. }
  25850. /* insert dictionary into window and hash */
  25851. avail = strm.avail_in;
  25852. next = strm.next_in;
  25853. input = strm.input;
  25854. strm.avail_in = dictLength;
  25855. strm.next_in = 0;
  25856. strm.input = dictionary;
  25857. fill_window(s);
  25858. while (s.lookahead >= MIN_MATCH) {
  25859. str = s.strstart;
  25860. n = s.lookahead - (MIN_MATCH - 1);
  25861. do {
  25862. /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
  25863. s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;
  25864. s.prev[str & s.w_mask] = s.head[s.ins_h];
  25865. s.head[s.ins_h] = str;
  25866. str++;
  25867. } while (--n);
  25868. s.strstart = str;
  25869. s.lookahead = MIN_MATCH - 1;
  25870. fill_window(s);
  25871. }
  25872. s.strstart += s.lookahead;
  25873. s.block_start = s.strstart;
  25874. s.insert = s.lookahead;
  25875. s.lookahead = 0;
  25876. s.match_length = s.prev_length = MIN_MATCH - 1;
  25877. s.match_available = 0;
  25878. strm.next_in = next;
  25879. strm.input = input;
  25880. strm.avail_in = avail;
  25881. s.wrap = wrap;
  25882. return Z_OK;
  25883. }
  25884. exports.deflateInit = deflateInit;
  25885. exports.deflateInit2 = deflateInit2;
  25886. exports.deflateReset = deflateReset;
  25887. exports.deflateResetKeep = deflateResetKeep;
  25888. exports.deflateSetHeader = deflateSetHeader;
  25889. exports.deflate = deflate;
  25890. exports.deflateEnd = deflateEnd;
  25891. exports.deflateSetDictionary = deflateSetDictionary;
  25892. exports.deflateInfo = 'pako deflate (from Nodeca project)';
  25893. /* Not implemented
  25894. exports.deflateBound = deflateBound;
  25895. exports.deflateCopy = deflateCopy;
  25896. exports.deflateParams = deflateParams;
  25897. exports.deflatePending = deflatePending;
  25898. exports.deflatePrime = deflatePrime;
  25899. exports.deflateTune = deflateTune;
  25900. */
  25901. /***/ }),
  25902. /***/ 6438:
  25903. /***/ (function(module) {
  25904. "use strict";
  25905. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  25906. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  25907. //
  25908. // This software is provided 'as-is', without any express or implied
  25909. // warranty. In no event will the authors be held liable for any damages
  25910. // arising from the use of this software.
  25911. //
  25912. // Permission is granted to anyone to use this software for any purpose,
  25913. // including commercial applications, and to alter it and redistribute it
  25914. // freely, subject to the following restrictions:
  25915. //
  25916. // 1. The origin of this software must not be misrepresented; you must not
  25917. // claim that you wrote the original software. If you use this software
  25918. // in a product, an acknowledgment in the product documentation would be
  25919. // appreciated but is not required.
  25920. // 2. Altered source versions must be plainly marked as such, and must not be
  25921. // misrepresented as being the original software.
  25922. // 3. This notice may not be removed or altered from any source distribution.
  25923. // See state defs from inflate.js
  25924. var BAD = 30; /* got a data error -- remain here until reset */
  25925. var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
  25926. /*
  25927. Decode literal, length, and distance codes and write out the resulting
  25928. literal and match bytes until either not enough input or output is
  25929. available, an end-of-block is encountered, or a data error is encountered.
  25930. When large enough input and output buffers are supplied to inflate(), for
  25931. example, a 16K input buffer and a 64K output buffer, more than 95% of the
  25932. inflate execution time is spent in this routine.
  25933. Entry assumptions:
  25934. state.mode === LEN
  25935. strm.avail_in >= 6
  25936. strm.avail_out >= 258
  25937. start >= strm.avail_out
  25938. state.bits < 8
  25939. On return, state.mode is one of:
  25940. LEN -- ran out of enough output space or enough available input
  25941. TYPE -- reached end of block code, inflate() to interpret next block
  25942. BAD -- error in block data
  25943. Notes:
  25944. - The maximum input bits used by a length/distance pair is 15 bits for the
  25945. length code, 5 bits for the length extra, 15 bits for the distance code,
  25946. and 13 bits for the distance extra. This totals 48 bits, or six bytes.
  25947. Therefore if strm.avail_in >= 6, then there is enough input to avoid
  25948. checking for available input while decoding.
  25949. - The maximum bytes that a single length/distance pair can output is 258
  25950. bytes, which is the maximum length that can be coded. inflate_fast()
  25951. requires strm.avail_out >= 258 for each loop to avoid checking for
  25952. output space.
  25953. */
  25954. module.exports = function inflate_fast(strm, start) {
  25955. var state;
  25956. var _in; /* local strm.input */
  25957. var last; /* have enough input while in < last */
  25958. var _out; /* local strm.output */
  25959. var beg; /* inflate()'s initial strm.output */
  25960. var end; /* while out < end, enough space available */
  25961. //#ifdef INFLATE_STRICT
  25962. var dmax; /* maximum distance from zlib header */
  25963. //#endif
  25964. var wsize; /* window size or zero if not using window */
  25965. var whave; /* valid bytes in the window */
  25966. var wnext; /* window write index */
  25967. // Use `s_window` instead `window`, avoid conflict with instrumentation tools
  25968. var s_window; /* allocated sliding window, if wsize != 0 */
  25969. var hold; /* local strm.hold */
  25970. var bits; /* local strm.bits */
  25971. var lcode; /* local strm.lencode */
  25972. var dcode; /* local strm.distcode */
  25973. var lmask; /* mask for first level of length codes */
  25974. var dmask; /* mask for first level of distance codes */
  25975. var here; /* retrieved table entry */
  25976. var op; /* code bits, operation, extra bits, or */
  25977. /* window position, window bytes to copy */
  25978. var len; /* match length, unused bytes */
  25979. var dist; /* match distance */
  25980. var from; /* where to copy match from */
  25981. var from_source;
  25982. var input, output; // JS specific, because we have no pointers
  25983. /* copy state to local variables */
  25984. state = strm.state;
  25985. //here = state.here;
  25986. _in = strm.next_in;
  25987. input = strm.input;
  25988. last = _in + (strm.avail_in - 5);
  25989. _out = strm.next_out;
  25990. output = strm.output;
  25991. beg = _out - (start - strm.avail_out);
  25992. end = _out + (strm.avail_out - 257);
  25993. //#ifdef INFLATE_STRICT
  25994. dmax = state.dmax;
  25995. //#endif
  25996. wsize = state.wsize;
  25997. whave = state.whave;
  25998. wnext = state.wnext;
  25999. s_window = state.window;
  26000. hold = state.hold;
  26001. bits = state.bits;
  26002. lcode = state.lencode;
  26003. dcode = state.distcode;
  26004. lmask = (1 << state.lenbits) - 1;
  26005. dmask = (1 << state.distbits) - 1;
  26006. /* decode literals and length/distances until end-of-block or not enough
  26007. input data or output space */
  26008. top:
  26009. do {
  26010. if (bits < 15) {
  26011. hold += input[_in++] << bits;
  26012. bits += 8;
  26013. hold += input[_in++] << bits;
  26014. bits += 8;
  26015. }
  26016. here = lcode[hold & lmask];
  26017. dolen:
  26018. for (;;) { // Goto emulation
  26019. op = here >>> 24/*here.bits*/;
  26020. hold >>>= op;
  26021. bits -= op;
  26022. op = (here >>> 16) & 0xff/*here.op*/;
  26023. if (op === 0) { /* literal */
  26024. //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
  26025. // "inflate: literal '%c'\n" :
  26026. // "inflate: literal 0x%02x\n", here.val));
  26027. output[_out++] = here & 0xffff/*here.val*/;
  26028. }
  26029. else if (op & 16) { /* length base */
  26030. len = here & 0xffff/*here.val*/;
  26031. op &= 15; /* number of extra bits */
  26032. if (op) {
  26033. if (bits < op) {
  26034. hold += input[_in++] << bits;
  26035. bits += 8;
  26036. }
  26037. len += hold & ((1 << op) - 1);
  26038. hold >>>= op;
  26039. bits -= op;
  26040. }
  26041. //Tracevv((stderr, "inflate: length %u\n", len));
  26042. if (bits < 15) {
  26043. hold += input[_in++] << bits;
  26044. bits += 8;
  26045. hold += input[_in++] << bits;
  26046. bits += 8;
  26047. }
  26048. here = dcode[hold & dmask];
  26049. dodist:
  26050. for (;;) { // goto emulation
  26051. op = here >>> 24/*here.bits*/;
  26052. hold >>>= op;
  26053. bits -= op;
  26054. op = (here >>> 16) & 0xff/*here.op*/;
  26055. if (op & 16) { /* distance base */
  26056. dist = here & 0xffff/*here.val*/;
  26057. op &= 15; /* number of extra bits */
  26058. if (bits < op) {
  26059. hold += input[_in++] << bits;
  26060. bits += 8;
  26061. if (bits < op) {
  26062. hold += input[_in++] << bits;
  26063. bits += 8;
  26064. }
  26065. }
  26066. dist += hold & ((1 << op) - 1);
  26067. //#ifdef INFLATE_STRICT
  26068. if (dist > dmax) {
  26069. strm.msg = 'invalid distance too far back';
  26070. state.mode = BAD;
  26071. break top;
  26072. }
  26073. //#endif
  26074. hold >>>= op;
  26075. bits -= op;
  26076. //Tracevv((stderr, "inflate: distance %u\n", dist));
  26077. op = _out - beg; /* max distance in output */
  26078. if (dist > op) { /* see if copy from window */
  26079. op = dist - op; /* distance back in window */
  26080. if (op > whave) {
  26081. if (state.sane) {
  26082. strm.msg = 'invalid distance too far back';
  26083. state.mode = BAD;
  26084. break top;
  26085. }
  26086. // (!) This block is disabled in zlib defaults,
  26087. // don't enable it for binary compatibility
  26088. //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
  26089. // if (len <= op - whave) {
  26090. // do {
  26091. // output[_out++] = 0;
  26092. // } while (--len);
  26093. // continue top;
  26094. // }
  26095. // len -= op - whave;
  26096. // do {
  26097. // output[_out++] = 0;
  26098. // } while (--op > whave);
  26099. // if (op === 0) {
  26100. // from = _out - dist;
  26101. // do {
  26102. // output[_out++] = output[from++];
  26103. // } while (--len);
  26104. // continue top;
  26105. // }
  26106. //#endif
  26107. }
  26108. from = 0; // window index
  26109. from_source = s_window;
  26110. if (wnext === 0) { /* very common case */
  26111. from += wsize - op;
  26112. if (op < len) { /* some from window */
  26113. len -= op;
  26114. do {
  26115. output[_out++] = s_window[from++];
  26116. } while (--op);
  26117. from = _out - dist; /* rest from output */
  26118. from_source = output;
  26119. }
  26120. }
  26121. else if (wnext < op) { /* wrap around window */
  26122. from += wsize + wnext - op;
  26123. op -= wnext;
  26124. if (op < len) { /* some from end of window */
  26125. len -= op;
  26126. do {
  26127. output[_out++] = s_window[from++];
  26128. } while (--op);
  26129. from = 0;
  26130. if (wnext < len) { /* some from start of window */
  26131. op = wnext;
  26132. len -= op;
  26133. do {
  26134. output[_out++] = s_window[from++];
  26135. } while (--op);
  26136. from = _out - dist; /* rest from output */
  26137. from_source = output;
  26138. }
  26139. }
  26140. }
  26141. else { /* contiguous in window */
  26142. from += wnext - op;
  26143. if (op < len) { /* some from window */
  26144. len -= op;
  26145. do {
  26146. output[_out++] = s_window[from++];
  26147. } while (--op);
  26148. from = _out - dist; /* rest from output */
  26149. from_source = output;
  26150. }
  26151. }
  26152. while (len > 2) {
  26153. output[_out++] = from_source[from++];
  26154. output[_out++] = from_source[from++];
  26155. output[_out++] = from_source[from++];
  26156. len -= 3;
  26157. }
  26158. if (len) {
  26159. output[_out++] = from_source[from++];
  26160. if (len > 1) {
  26161. output[_out++] = from_source[from++];
  26162. }
  26163. }
  26164. }
  26165. else {
  26166. from = _out - dist; /* copy direct from output */
  26167. do { /* minimum length is three */
  26168. output[_out++] = output[from++];
  26169. output[_out++] = output[from++];
  26170. output[_out++] = output[from++];
  26171. len -= 3;
  26172. } while (len > 2);
  26173. if (len) {
  26174. output[_out++] = output[from++];
  26175. if (len > 1) {
  26176. output[_out++] = output[from++];
  26177. }
  26178. }
  26179. }
  26180. }
  26181. else if ((op & 64) === 0) { /* 2nd level distance code */
  26182. here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
  26183. continue dodist;
  26184. }
  26185. else {
  26186. strm.msg = 'invalid distance code';
  26187. state.mode = BAD;
  26188. break top;
  26189. }
  26190. break; // need to emulate goto via "continue"
  26191. }
  26192. }
  26193. else if ((op & 64) === 0) { /* 2nd level length code */
  26194. here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
  26195. continue dolen;
  26196. }
  26197. else if (op & 32) { /* end-of-block */
  26198. //Tracevv((stderr, "inflate: end of block\n"));
  26199. state.mode = TYPE;
  26200. break top;
  26201. }
  26202. else {
  26203. strm.msg = 'invalid literal/length code';
  26204. state.mode = BAD;
  26205. break top;
  26206. }
  26207. break; // need to emulate goto via "continue"
  26208. }
  26209. } while (_in < last && _out < end);
  26210. /* return unused bytes (on entry, bits < 8, so in won't go too far back) */
  26211. len = bits >> 3;
  26212. _in -= len;
  26213. bits -= len << 3;
  26214. hold &= (1 << bits) - 1;
  26215. /* update state and return */
  26216. strm.next_in = _in;
  26217. strm.next_out = _out;
  26218. strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
  26219. strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
  26220. state.hold = hold;
  26221. state.bits = bits;
  26222. return;
  26223. };
  26224. /***/ }),
  26225. /***/ 3001:
  26226. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  26227. "use strict";
  26228. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  26229. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  26230. //
  26231. // This software is provided 'as-is', without any express or implied
  26232. // warranty. In no event will the authors be held liable for any damages
  26233. // arising from the use of this software.
  26234. //
  26235. // Permission is granted to anyone to use this software for any purpose,
  26236. // including commercial applications, and to alter it and redistribute it
  26237. // freely, subject to the following restrictions:
  26238. //
  26239. // 1. The origin of this software must not be misrepresented; you must not
  26240. // claim that you wrote the original software. If you use this software
  26241. // in a product, an acknowledgment in the product documentation would be
  26242. // appreciated but is not required.
  26243. // 2. Altered source versions must be plainly marked as such, and must not be
  26244. // misrepresented as being the original software.
  26245. // 3. This notice may not be removed or altered from any source distribution.
  26246. var utils = __webpack_require__(6907);
  26247. var adler32 = __webpack_require__(7575);
  26248. var crc32 = __webpack_require__(3415);
  26249. var inflate_fast = __webpack_require__(6438);
  26250. var inflate_table = __webpack_require__(1375);
  26251. var CODES = 0;
  26252. var LENS = 1;
  26253. var DISTS = 2;
  26254. /* Public constants ==========================================================*/
  26255. /* ===========================================================================*/
  26256. /* Allowed flush values; see deflate() and inflate() below for details */
  26257. //var Z_NO_FLUSH = 0;
  26258. //var Z_PARTIAL_FLUSH = 1;
  26259. //var Z_SYNC_FLUSH = 2;
  26260. //var Z_FULL_FLUSH = 3;
  26261. var Z_FINISH = 4;
  26262. var Z_BLOCK = 5;
  26263. var Z_TREES = 6;
  26264. /* Return codes for the compression/decompression functions. Negative values
  26265. * are errors, positive values are used for special but normal events.
  26266. */
  26267. var Z_OK = 0;
  26268. var Z_STREAM_END = 1;
  26269. var Z_NEED_DICT = 2;
  26270. //var Z_ERRNO = -1;
  26271. var Z_STREAM_ERROR = -2;
  26272. var Z_DATA_ERROR = -3;
  26273. var Z_MEM_ERROR = -4;
  26274. var Z_BUF_ERROR = -5;
  26275. //var Z_VERSION_ERROR = -6;
  26276. /* The deflate compression method */
  26277. var Z_DEFLATED = 8;
  26278. /* STATES ====================================================================*/
  26279. /* ===========================================================================*/
  26280. var HEAD = 1; /* i: waiting for magic header */
  26281. var FLAGS = 2; /* i: waiting for method and flags (gzip) */
  26282. var TIME = 3; /* i: waiting for modification time (gzip) */
  26283. var OS = 4; /* i: waiting for extra flags and operating system (gzip) */
  26284. var EXLEN = 5; /* i: waiting for extra length (gzip) */
  26285. var EXTRA = 6; /* i: waiting for extra bytes (gzip) */
  26286. var NAME = 7; /* i: waiting for end of file name (gzip) */
  26287. var COMMENT = 8; /* i: waiting for end of comment (gzip) */
  26288. var HCRC = 9; /* i: waiting for header crc (gzip) */
  26289. var DICTID = 10; /* i: waiting for dictionary check value */
  26290. var DICT = 11; /* waiting for inflateSetDictionary() call */
  26291. var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
  26292. var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */
  26293. var STORED = 14; /* i: waiting for stored size (length and complement) */
  26294. var COPY_ = 15; /* i/o: same as COPY below, but only first time in */
  26295. var COPY = 16; /* i/o: waiting for input or output to copy stored block */
  26296. var TABLE = 17; /* i: waiting for dynamic block table lengths */
  26297. var LENLENS = 18; /* i: waiting for code length code lengths */
  26298. var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */
  26299. var LEN_ = 20; /* i: same as LEN below, but only first time in */
  26300. var LEN = 21; /* i: waiting for length/lit/eob code */
  26301. var LENEXT = 22; /* i: waiting for length extra bits */
  26302. var DIST = 23; /* i: waiting for distance code */
  26303. var DISTEXT = 24; /* i: waiting for distance extra bits */
  26304. var MATCH = 25; /* o: waiting for output space to copy string */
  26305. var LIT = 26; /* o: waiting for output space to write literal */
  26306. var CHECK = 27; /* i: waiting for 32-bit check value */
  26307. var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */
  26308. var DONE = 29; /* finished check, done -- remain here until reset */
  26309. var BAD = 30; /* got a data error -- remain here until reset */
  26310. var MEM = 31; /* got an inflate() memory error -- remain here until reset */
  26311. var SYNC = 32; /* looking for synchronization bytes to restart inflate() */
  26312. /* ===========================================================================*/
  26313. var ENOUGH_LENS = 852;
  26314. var ENOUGH_DISTS = 592;
  26315. //var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
  26316. var MAX_WBITS = 15;
  26317. /* 32K LZ77 window */
  26318. var DEF_WBITS = MAX_WBITS;
  26319. function zswap32(q) {
  26320. return (((q >>> 24) & 0xff) +
  26321. ((q >>> 8) & 0xff00) +
  26322. ((q & 0xff00) << 8) +
  26323. ((q & 0xff) << 24));
  26324. }
  26325. function InflateState() {
  26326. this.mode = 0; /* current inflate mode */
  26327. this.last = false; /* true if processing last block */
  26328. this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */
  26329. this.havedict = false; /* true if dictionary provided */
  26330. this.flags = 0; /* gzip header method and flags (0 if zlib) */
  26331. this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */
  26332. this.check = 0; /* protected copy of check value */
  26333. this.total = 0; /* protected copy of output count */
  26334. // TODO: may be {}
  26335. this.head = null; /* where to save gzip header information */
  26336. /* sliding window */
  26337. this.wbits = 0; /* log base 2 of requested window size */
  26338. this.wsize = 0; /* window size or zero if not using window */
  26339. this.whave = 0; /* valid bytes in the window */
  26340. this.wnext = 0; /* window write index */
  26341. this.window = null; /* allocated sliding window, if needed */
  26342. /* bit accumulator */
  26343. this.hold = 0; /* input bit accumulator */
  26344. this.bits = 0; /* number of bits in "in" */
  26345. /* for string and stored block copying */
  26346. this.length = 0; /* literal or length of data to copy */
  26347. this.offset = 0; /* distance back to copy string from */
  26348. /* for table and code decoding */
  26349. this.extra = 0; /* extra bits needed */
  26350. /* fixed and dynamic code tables */
  26351. this.lencode = null; /* starting table for length/literal codes */
  26352. this.distcode = null; /* starting table for distance codes */
  26353. this.lenbits = 0; /* index bits for lencode */
  26354. this.distbits = 0; /* index bits for distcode */
  26355. /* dynamic table building */
  26356. this.ncode = 0; /* number of code length code lengths */
  26357. this.nlen = 0; /* number of length code lengths */
  26358. this.ndist = 0; /* number of distance code lengths */
  26359. this.have = 0; /* number of code lengths in lens[] */
  26360. this.next = null; /* next available space in codes[] */
  26361. this.lens = new utils.Buf16(320); /* temporary storage for code lengths */
  26362. this.work = new utils.Buf16(288); /* work area for code table building */
  26363. /*
  26364. because we don't have pointers in js, we use lencode and distcode directly
  26365. as buffers so we don't need codes
  26366. */
  26367. //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */
  26368. this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */
  26369. this.distdyn = null; /* dynamic table for distance codes (JS specific) */
  26370. this.sane = 0; /* if false, allow invalid distance too far */
  26371. this.back = 0; /* bits back of last unprocessed length/lit */
  26372. this.was = 0; /* initial length of match */
  26373. }
  26374. function inflateResetKeep(strm) {
  26375. var state;
  26376. if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  26377. state = strm.state;
  26378. strm.total_in = strm.total_out = state.total = 0;
  26379. strm.msg = ''; /*Z_NULL*/
  26380. if (state.wrap) { /* to support ill-conceived Java test suite */
  26381. strm.adler = state.wrap & 1;
  26382. }
  26383. state.mode = HEAD;
  26384. state.last = 0;
  26385. state.havedict = 0;
  26386. state.dmax = 32768;
  26387. state.head = null/*Z_NULL*/;
  26388. state.hold = 0;
  26389. state.bits = 0;
  26390. //state.lencode = state.distcode = state.next = state.codes;
  26391. state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS);
  26392. state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS);
  26393. state.sane = 1;
  26394. state.back = -1;
  26395. //Tracev((stderr, "inflate: reset\n"));
  26396. return Z_OK;
  26397. }
  26398. function inflateReset(strm) {
  26399. var state;
  26400. if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  26401. state = strm.state;
  26402. state.wsize = 0;
  26403. state.whave = 0;
  26404. state.wnext = 0;
  26405. return inflateResetKeep(strm);
  26406. }
  26407. function inflateReset2(strm, windowBits) {
  26408. var wrap;
  26409. var state;
  26410. /* get the state */
  26411. if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  26412. state = strm.state;
  26413. /* extract wrap request from windowBits parameter */
  26414. if (windowBits < 0) {
  26415. wrap = 0;
  26416. windowBits = -windowBits;
  26417. }
  26418. else {
  26419. wrap = (windowBits >> 4) + 1;
  26420. if (windowBits < 48) {
  26421. windowBits &= 15;
  26422. }
  26423. }
  26424. /* set number of window bits, free window if different */
  26425. if (windowBits && (windowBits < 8 || windowBits > 15)) {
  26426. return Z_STREAM_ERROR;
  26427. }
  26428. if (state.window !== null && state.wbits !== windowBits) {
  26429. state.window = null;
  26430. }
  26431. /* update state and reset the rest of it */
  26432. state.wrap = wrap;
  26433. state.wbits = windowBits;
  26434. return inflateReset(strm);
  26435. }
  26436. function inflateInit2(strm, windowBits) {
  26437. var ret;
  26438. var state;
  26439. if (!strm) { return Z_STREAM_ERROR; }
  26440. //strm.msg = Z_NULL; /* in case we return an error */
  26441. state = new InflateState();
  26442. //if (state === Z_NULL) return Z_MEM_ERROR;
  26443. //Tracev((stderr, "inflate: allocated\n"));
  26444. strm.state = state;
  26445. state.window = null/*Z_NULL*/;
  26446. ret = inflateReset2(strm, windowBits);
  26447. if (ret !== Z_OK) {
  26448. strm.state = null/*Z_NULL*/;
  26449. }
  26450. return ret;
  26451. }
  26452. function inflateInit(strm) {
  26453. return inflateInit2(strm, DEF_WBITS);
  26454. }
  26455. /*
  26456. Return state with length and distance decoding tables and index sizes set to
  26457. fixed code decoding. Normally this returns fixed tables from inffixed.h.
  26458. If BUILDFIXED is defined, then instead this routine builds the tables the
  26459. first time it's called, and returns those tables the first time and
  26460. thereafter. This reduces the size of the code by about 2K bytes, in
  26461. exchange for a little execution time. However, BUILDFIXED should not be
  26462. used for threaded applications, since the rewriting of the tables and virgin
  26463. may not be thread-safe.
  26464. */
  26465. var virgin = true;
  26466. var lenfix, distfix; // We have no pointers in JS, so keep tables separate
  26467. function fixedtables(state) {
  26468. /* build fixed huffman tables if first call (may not be thread safe) */
  26469. if (virgin) {
  26470. var sym;
  26471. lenfix = new utils.Buf32(512);
  26472. distfix = new utils.Buf32(32);
  26473. /* literal/length table */
  26474. sym = 0;
  26475. while (sym < 144) { state.lens[sym++] = 8; }
  26476. while (sym < 256) { state.lens[sym++] = 9; }
  26477. while (sym < 280) { state.lens[sym++] = 7; }
  26478. while (sym < 288) { state.lens[sym++] = 8; }
  26479. inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 });
  26480. /* distance table */
  26481. sym = 0;
  26482. while (sym < 32) { state.lens[sym++] = 5; }
  26483. inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 });
  26484. /* do this just once */
  26485. virgin = false;
  26486. }
  26487. state.lencode = lenfix;
  26488. state.lenbits = 9;
  26489. state.distcode = distfix;
  26490. state.distbits = 5;
  26491. }
  26492. /*
  26493. Update the window with the last wsize (normally 32K) bytes written before
  26494. returning. If window does not exist yet, create it. This is only called
  26495. when a window is already in use, or when output has been written during this
  26496. inflate call, but the end of the deflate stream has not been reached yet.
  26497. It is also called to create a window for dictionary data when a dictionary
  26498. is loaded.
  26499. Providing output buffers larger than 32K to inflate() should provide a speed
  26500. advantage, since only the last 32K of output is copied to the sliding window
  26501. upon return from inflate(), and since all distances after the first 32K of
  26502. output will fall in the output data, making match copies simpler and faster.
  26503. The advantage may be dependent on the size of the processor's data caches.
  26504. */
  26505. function updatewindow(strm, src, end, copy) {
  26506. var dist;
  26507. var state = strm.state;
  26508. /* if it hasn't been done already, allocate space for the window */
  26509. if (state.window === null) {
  26510. state.wsize = 1 << state.wbits;
  26511. state.wnext = 0;
  26512. state.whave = 0;
  26513. state.window = new utils.Buf8(state.wsize);
  26514. }
  26515. /* copy state->wsize or less output bytes into the circular window */
  26516. if (copy >= state.wsize) {
  26517. utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);
  26518. state.wnext = 0;
  26519. state.whave = state.wsize;
  26520. }
  26521. else {
  26522. dist = state.wsize - state.wnext;
  26523. if (dist > copy) {
  26524. dist = copy;
  26525. }
  26526. //zmemcpy(state->window + state->wnext, end - copy, dist);
  26527. utils.arraySet(state.window, src, end - copy, dist, state.wnext);
  26528. copy -= dist;
  26529. if (copy) {
  26530. //zmemcpy(state->window, end - copy, copy);
  26531. utils.arraySet(state.window, src, end - copy, copy, 0);
  26532. state.wnext = copy;
  26533. state.whave = state.wsize;
  26534. }
  26535. else {
  26536. state.wnext += dist;
  26537. if (state.wnext === state.wsize) { state.wnext = 0; }
  26538. if (state.whave < state.wsize) { state.whave += dist; }
  26539. }
  26540. }
  26541. return 0;
  26542. }
  26543. function inflate(strm, flush) {
  26544. var state;
  26545. var input, output; // input/output buffers
  26546. var next; /* next input INDEX */
  26547. var put; /* next output INDEX */
  26548. var have, left; /* available input and output */
  26549. var hold; /* bit buffer */
  26550. var bits; /* bits in bit buffer */
  26551. var _in, _out; /* save starting available input and output */
  26552. var copy; /* number of stored or match bytes to copy */
  26553. var from; /* where to copy match bytes from */
  26554. var from_source;
  26555. var here = 0; /* current decoding table entry */
  26556. var here_bits, here_op, here_val; // paked "here" denormalized (JS specific)
  26557. //var last; /* parent table entry */
  26558. var last_bits, last_op, last_val; // paked "last" denormalized (JS specific)
  26559. var len; /* length to copy for repeats, bits to drop */
  26560. var ret; /* return code */
  26561. var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */
  26562. var opts;
  26563. var n; // temporary var for NEED_BITS
  26564. var order = /* permutation of code lengths */
  26565. [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ];
  26566. if (!strm || !strm.state || !strm.output ||
  26567. (!strm.input && strm.avail_in !== 0)) {
  26568. return Z_STREAM_ERROR;
  26569. }
  26570. state = strm.state;
  26571. if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */
  26572. //--- LOAD() ---
  26573. put = strm.next_out;
  26574. output = strm.output;
  26575. left = strm.avail_out;
  26576. next = strm.next_in;
  26577. input = strm.input;
  26578. have = strm.avail_in;
  26579. hold = state.hold;
  26580. bits = state.bits;
  26581. //---
  26582. _in = have;
  26583. _out = left;
  26584. ret = Z_OK;
  26585. inf_leave: // goto emulation
  26586. for (;;) {
  26587. switch (state.mode) {
  26588. case HEAD:
  26589. if (state.wrap === 0) {
  26590. state.mode = TYPEDO;
  26591. break;
  26592. }
  26593. //=== NEEDBITS(16);
  26594. while (bits < 16) {
  26595. if (have === 0) { break inf_leave; }
  26596. have--;
  26597. hold += input[next++] << bits;
  26598. bits += 8;
  26599. }
  26600. //===//
  26601. if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */
  26602. state.check = 0/*crc32(0L, Z_NULL, 0)*/;
  26603. //=== CRC2(state.check, hold);
  26604. hbuf[0] = hold & 0xff;
  26605. hbuf[1] = (hold >>> 8) & 0xff;
  26606. state.check = crc32(state.check, hbuf, 2, 0);
  26607. //===//
  26608. //=== INITBITS();
  26609. hold = 0;
  26610. bits = 0;
  26611. //===//
  26612. state.mode = FLAGS;
  26613. break;
  26614. }
  26615. state.flags = 0; /* expect zlib header */
  26616. if (state.head) {
  26617. state.head.done = false;
  26618. }
  26619. if (!(state.wrap & 1) || /* check if zlib header allowed */
  26620. (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) {
  26621. strm.msg = 'incorrect header check';
  26622. state.mode = BAD;
  26623. break;
  26624. }
  26625. if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) {
  26626. strm.msg = 'unknown compression method';
  26627. state.mode = BAD;
  26628. break;
  26629. }
  26630. //--- DROPBITS(4) ---//
  26631. hold >>>= 4;
  26632. bits -= 4;
  26633. //---//
  26634. len = (hold & 0x0f)/*BITS(4)*/ + 8;
  26635. if (state.wbits === 0) {
  26636. state.wbits = len;
  26637. }
  26638. else if (len > state.wbits) {
  26639. strm.msg = 'invalid window size';
  26640. state.mode = BAD;
  26641. break;
  26642. }
  26643. state.dmax = 1 << len;
  26644. //Tracev((stderr, "inflate: zlib header ok\n"));
  26645. strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
  26646. state.mode = hold & 0x200 ? DICTID : TYPE;
  26647. //=== INITBITS();
  26648. hold = 0;
  26649. bits = 0;
  26650. //===//
  26651. break;
  26652. case FLAGS:
  26653. //=== NEEDBITS(16); */
  26654. while (bits < 16) {
  26655. if (have === 0) { break inf_leave; }
  26656. have--;
  26657. hold += input[next++] << bits;
  26658. bits += 8;
  26659. }
  26660. //===//
  26661. state.flags = hold;
  26662. if ((state.flags & 0xff) !== Z_DEFLATED) {
  26663. strm.msg = 'unknown compression method';
  26664. state.mode = BAD;
  26665. break;
  26666. }
  26667. if (state.flags & 0xe000) {
  26668. strm.msg = 'unknown header flags set';
  26669. state.mode = BAD;
  26670. break;
  26671. }
  26672. if (state.head) {
  26673. state.head.text = ((hold >> 8) & 1);
  26674. }
  26675. if (state.flags & 0x0200) {
  26676. //=== CRC2(state.check, hold);
  26677. hbuf[0] = hold & 0xff;
  26678. hbuf[1] = (hold >>> 8) & 0xff;
  26679. state.check = crc32(state.check, hbuf, 2, 0);
  26680. //===//
  26681. }
  26682. //=== INITBITS();
  26683. hold = 0;
  26684. bits = 0;
  26685. //===//
  26686. state.mode = TIME;
  26687. /* falls through */
  26688. case TIME:
  26689. //=== NEEDBITS(32); */
  26690. while (bits < 32) {
  26691. if (have === 0) { break inf_leave; }
  26692. have--;
  26693. hold += input[next++] << bits;
  26694. bits += 8;
  26695. }
  26696. //===//
  26697. if (state.head) {
  26698. state.head.time = hold;
  26699. }
  26700. if (state.flags & 0x0200) {
  26701. //=== CRC4(state.check, hold)
  26702. hbuf[0] = hold & 0xff;
  26703. hbuf[1] = (hold >>> 8) & 0xff;
  26704. hbuf[2] = (hold >>> 16) & 0xff;
  26705. hbuf[3] = (hold >>> 24) & 0xff;
  26706. state.check = crc32(state.check, hbuf, 4, 0);
  26707. //===
  26708. }
  26709. //=== INITBITS();
  26710. hold = 0;
  26711. bits = 0;
  26712. //===//
  26713. state.mode = OS;
  26714. /* falls through */
  26715. case OS:
  26716. //=== NEEDBITS(16); */
  26717. while (bits < 16) {
  26718. if (have === 0) { break inf_leave; }
  26719. have--;
  26720. hold += input[next++] << bits;
  26721. bits += 8;
  26722. }
  26723. //===//
  26724. if (state.head) {
  26725. state.head.xflags = (hold & 0xff);
  26726. state.head.os = (hold >> 8);
  26727. }
  26728. if (state.flags & 0x0200) {
  26729. //=== CRC2(state.check, hold);
  26730. hbuf[0] = hold & 0xff;
  26731. hbuf[1] = (hold >>> 8) & 0xff;
  26732. state.check = crc32(state.check, hbuf, 2, 0);
  26733. //===//
  26734. }
  26735. //=== INITBITS();
  26736. hold = 0;
  26737. bits = 0;
  26738. //===//
  26739. state.mode = EXLEN;
  26740. /* falls through */
  26741. case EXLEN:
  26742. if (state.flags & 0x0400) {
  26743. //=== NEEDBITS(16); */
  26744. while (bits < 16) {
  26745. if (have === 0) { break inf_leave; }
  26746. have--;
  26747. hold += input[next++] << bits;
  26748. bits += 8;
  26749. }
  26750. //===//
  26751. state.length = hold;
  26752. if (state.head) {
  26753. state.head.extra_len = hold;
  26754. }
  26755. if (state.flags & 0x0200) {
  26756. //=== CRC2(state.check, hold);
  26757. hbuf[0] = hold & 0xff;
  26758. hbuf[1] = (hold >>> 8) & 0xff;
  26759. state.check = crc32(state.check, hbuf, 2, 0);
  26760. //===//
  26761. }
  26762. //=== INITBITS();
  26763. hold = 0;
  26764. bits = 0;
  26765. //===//
  26766. }
  26767. else if (state.head) {
  26768. state.head.extra = null/*Z_NULL*/;
  26769. }
  26770. state.mode = EXTRA;
  26771. /* falls through */
  26772. case EXTRA:
  26773. if (state.flags & 0x0400) {
  26774. copy = state.length;
  26775. if (copy > have) { copy = have; }
  26776. if (copy) {
  26777. if (state.head) {
  26778. len = state.head.extra_len - state.length;
  26779. if (!state.head.extra) {
  26780. // Use untyped array for more convenient processing later
  26781. state.head.extra = new Array(state.head.extra_len);
  26782. }
  26783. utils.arraySet(
  26784. state.head.extra,
  26785. input,
  26786. next,
  26787. // extra field is limited to 65536 bytes
  26788. // - no need for additional size check
  26789. copy,
  26790. /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
  26791. len
  26792. );
  26793. //zmemcpy(state.head.extra + len, next,
  26794. // len + copy > state.head.extra_max ?
  26795. // state.head.extra_max - len : copy);
  26796. }
  26797. if (state.flags & 0x0200) {
  26798. state.check = crc32(state.check, input, copy, next);
  26799. }
  26800. have -= copy;
  26801. next += copy;
  26802. state.length -= copy;
  26803. }
  26804. if (state.length) { break inf_leave; }
  26805. }
  26806. state.length = 0;
  26807. state.mode = NAME;
  26808. /* falls through */
  26809. case NAME:
  26810. if (state.flags & 0x0800) {
  26811. if (have === 0) { break inf_leave; }
  26812. copy = 0;
  26813. do {
  26814. // TODO: 2 or 1 bytes?
  26815. len = input[next + copy++];
  26816. /* use constant limit because in js we should not preallocate memory */
  26817. if (state.head && len &&
  26818. (state.length < 65536 /*state.head.name_max*/)) {
  26819. state.head.name += String.fromCharCode(len);
  26820. }
  26821. } while (len && copy < have);
  26822. if (state.flags & 0x0200) {
  26823. state.check = crc32(state.check, input, copy, next);
  26824. }
  26825. have -= copy;
  26826. next += copy;
  26827. if (len) { break inf_leave; }
  26828. }
  26829. else if (state.head) {
  26830. state.head.name = null;
  26831. }
  26832. state.length = 0;
  26833. state.mode = COMMENT;
  26834. /* falls through */
  26835. case COMMENT:
  26836. if (state.flags & 0x1000) {
  26837. if (have === 0) { break inf_leave; }
  26838. copy = 0;
  26839. do {
  26840. len = input[next + copy++];
  26841. /* use constant limit because in js we should not preallocate memory */
  26842. if (state.head && len &&
  26843. (state.length < 65536 /*state.head.comm_max*/)) {
  26844. state.head.comment += String.fromCharCode(len);
  26845. }
  26846. } while (len && copy < have);
  26847. if (state.flags & 0x0200) {
  26848. state.check = crc32(state.check, input, copy, next);
  26849. }
  26850. have -= copy;
  26851. next += copy;
  26852. if (len) { break inf_leave; }
  26853. }
  26854. else if (state.head) {
  26855. state.head.comment = null;
  26856. }
  26857. state.mode = HCRC;
  26858. /* falls through */
  26859. case HCRC:
  26860. if (state.flags & 0x0200) {
  26861. //=== NEEDBITS(16); */
  26862. while (bits < 16) {
  26863. if (have === 0) { break inf_leave; }
  26864. have--;
  26865. hold += input[next++] << bits;
  26866. bits += 8;
  26867. }
  26868. //===//
  26869. if (hold !== (state.check & 0xffff)) {
  26870. strm.msg = 'header crc mismatch';
  26871. state.mode = BAD;
  26872. break;
  26873. }
  26874. //=== INITBITS();
  26875. hold = 0;
  26876. bits = 0;
  26877. //===//
  26878. }
  26879. if (state.head) {
  26880. state.head.hcrc = ((state.flags >> 9) & 1);
  26881. state.head.done = true;
  26882. }
  26883. strm.adler = state.check = 0;
  26884. state.mode = TYPE;
  26885. break;
  26886. case DICTID:
  26887. //=== NEEDBITS(32); */
  26888. while (bits < 32) {
  26889. if (have === 0) { break inf_leave; }
  26890. have--;
  26891. hold += input[next++] << bits;
  26892. bits += 8;
  26893. }
  26894. //===//
  26895. strm.adler = state.check = zswap32(hold);
  26896. //=== INITBITS();
  26897. hold = 0;
  26898. bits = 0;
  26899. //===//
  26900. state.mode = DICT;
  26901. /* falls through */
  26902. case DICT:
  26903. if (state.havedict === 0) {
  26904. //--- RESTORE() ---
  26905. strm.next_out = put;
  26906. strm.avail_out = left;
  26907. strm.next_in = next;
  26908. strm.avail_in = have;
  26909. state.hold = hold;
  26910. state.bits = bits;
  26911. //---
  26912. return Z_NEED_DICT;
  26913. }
  26914. strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/;
  26915. state.mode = TYPE;
  26916. /* falls through */
  26917. case TYPE:
  26918. if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; }
  26919. /* falls through */
  26920. case TYPEDO:
  26921. if (state.last) {
  26922. //--- BYTEBITS() ---//
  26923. hold >>>= bits & 7;
  26924. bits -= bits & 7;
  26925. //---//
  26926. state.mode = CHECK;
  26927. break;
  26928. }
  26929. //=== NEEDBITS(3); */
  26930. while (bits < 3) {
  26931. if (have === 0) { break inf_leave; }
  26932. have--;
  26933. hold += input[next++] << bits;
  26934. bits += 8;
  26935. }
  26936. //===//
  26937. state.last = (hold & 0x01)/*BITS(1)*/;
  26938. //--- DROPBITS(1) ---//
  26939. hold >>>= 1;
  26940. bits -= 1;
  26941. //---//
  26942. switch ((hold & 0x03)/*BITS(2)*/) {
  26943. case 0: /* stored block */
  26944. //Tracev((stderr, "inflate: stored block%s\n",
  26945. // state.last ? " (last)" : ""));
  26946. state.mode = STORED;
  26947. break;
  26948. case 1: /* fixed block */
  26949. fixedtables(state);
  26950. //Tracev((stderr, "inflate: fixed codes block%s\n",
  26951. // state.last ? " (last)" : ""));
  26952. state.mode = LEN_; /* decode codes */
  26953. if (flush === Z_TREES) {
  26954. //--- DROPBITS(2) ---//
  26955. hold >>>= 2;
  26956. bits -= 2;
  26957. //---//
  26958. break inf_leave;
  26959. }
  26960. break;
  26961. case 2: /* dynamic block */
  26962. //Tracev((stderr, "inflate: dynamic codes block%s\n",
  26963. // state.last ? " (last)" : ""));
  26964. state.mode = TABLE;
  26965. break;
  26966. case 3:
  26967. strm.msg = 'invalid block type';
  26968. state.mode = BAD;
  26969. }
  26970. //--- DROPBITS(2) ---//
  26971. hold >>>= 2;
  26972. bits -= 2;
  26973. //---//
  26974. break;
  26975. case STORED:
  26976. //--- BYTEBITS() ---// /* go to byte boundary */
  26977. hold >>>= bits & 7;
  26978. bits -= bits & 7;
  26979. //---//
  26980. //=== NEEDBITS(32); */
  26981. while (bits < 32) {
  26982. if (have === 0) { break inf_leave; }
  26983. have--;
  26984. hold += input[next++] << bits;
  26985. bits += 8;
  26986. }
  26987. //===//
  26988. if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) {
  26989. strm.msg = 'invalid stored block lengths';
  26990. state.mode = BAD;
  26991. break;
  26992. }
  26993. state.length = hold & 0xffff;
  26994. //Tracev((stderr, "inflate: stored length %u\n",
  26995. // state.length));
  26996. //=== INITBITS();
  26997. hold = 0;
  26998. bits = 0;
  26999. //===//
  27000. state.mode = COPY_;
  27001. if (flush === Z_TREES) { break inf_leave; }
  27002. /* falls through */
  27003. case COPY_:
  27004. state.mode = COPY;
  27005. /* falls through */
  27006. case COPY:
  27007. copy = state.length;
  27008. if (copy) {
  27009. if (copy > have) { copy = have; }
  27010. if (copy > left) { copy = left; }
  27011. if (copy === 0) { break inf_leave; }
  27012. //--- zmemcpy(put, next, copy); ---
  27013. utils.arraySet(output, input, next, copy, put);
  27014. //---//
  27015. have -= copy;
  27016. next += copy;
  27017. left -= copy;
  27018. put += copy;
  27019. state.length -= copy;
  27020. break;
  27021. }
  27022. //Tracev((stderr, "inflate: stored end\n"));
  27023. state.mode = TYPE;
  27024. break;
  27025. case TABLE:
  27026. //=== NEEDBITS(14); */
  27027. while (bits < 14) {
  27028. if (have === 0) { break inf_leave; }
  27029. have--;
  27030. hold += input[next++] << bits;
  27031. bits += 8;
  27032. }
  27033. //===//
  27034. state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257;
  27035. //--- DROPBITS(5) ---//
  27036. hold >>>= 5;
  27037. bits -= 5;
  27038. //---//
  27039. state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1;
  27040. //--- DROPBITS(5) ---//
  27041. hold >>>= 5;
  27042. bits -= 5;
  27043. //---//
  27044. state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4;
  27045. //--- DROPBITS(4) ---//
  27046. hold >>>= 4;
  27047. bits -= 4;
  27048. //---//
  27049. //#ifndef PKZIP_BUG_WORKAROUND
  27050. if (state.nlen > 286 || state.ndist > 30) {
  27051. strm.msg = 'too many length or distance symbols';
  27052. state.mode = BAD;
  27053. break;
  27054. }
  27055. //#endif
  27056. //Tracev((stderr, "inflate: table sizes ok\n"));
  27057. state.have = 0;
  27058. state.mode = LENLENS;
  27059. /* falls through */
  27060. case LENLENS:
  27061. while (state.have < state.ncode) {
  27062. //=== NEEDBITS(3);
  27063. while (bits < 3) {
  27064. if (have === 0) { break inf_leave; }
  27065. have--;
  27066. hold += input[next++] << bits;
  27067. bits += 8;
  27068. }
  27069. //===//
  27070. state.lens[order[state.have++]] = (hold & 0x07);//BITS(3);
  27071. //--- DROPBITS(3) ---//
  27072. hold >>>= 3;
  27073. bits -= 3;
  27074. //---//
  27075. }
  27076. while (state.have < 19) {
  27077. state.lens[order[state.have++]] = 0;
  27078. }
  27079. // We have separate tables & no pointers. 2 commented lines below not needed.
  27080. //state.next = state.codes;
  27081. //state.lencode = state.next;
  27082. // Switch to use dynamic table
  27083. state.lencode = state.lendyn;
  27084. state.lenbits = 7;
  27085. opts = { bits: state.lenbits };
  27086. ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts);
  27087. state.lenbits = opts.bits;
  27088. if (ret) {
  27089. strm.msg = 'invalid code lengths set';
  27090. state.mode = BAD;
  27091. break;
  27092. }
  27093. //Tracev((stderr, "inflate: code lengths ok\n"));
  27094. state.have = 0;
  27095. state.mode = CODELENS;
  27096. /* falls through */
  27097. case CODELENS:
  27098. while (state.have < state.nlen + state.ndist) {
  27099. for (;;) {
  27100. here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
  27101. here_bits = here >>> 24;
  27102. here_op = (here >>> 16) & 0xff;
  27103. here_val = here & 0xffff;
  27104. if ((here_bits) <= bits) { break; }
  27105. //--- PULLBYTE() ---//
  27106. if (have === 0) { break inf_leave; }
  27107. have--;
  27108. hold += input[next++] << bits;
  27109. bits += 8;
  27110. //---//
  27111. }
  27112. if (here_val < 16) {
  27113. //--- DROPBITS(here.bits) ---//
  27114. hold >>>= here_bits;
  27115. bits -= here_bits;
  27116. //---//
  27117. state.lens[state.have++] = here_val;
  27118. }
  27119. else {
  27120. if (here_val === 16) {
  27121. //=== NEEDBITS(here.bits + 2);
  27122. n = here_bits + 2;
  27123. while (bits < n) {
  27124. if (have === 0) { break inf_leave; }
  27125. have--;
  27126. hold += input[next++] << bits;
  27127. bits += 8;
  27128. }
  27129. //===//
  27130. //--- DROPBITS(here.bits) ---//
  27131. hold >>>= here_bits;
  27132. bits -= here_bits;
  27133. //---//
  27134. if (state.have === 0) {
  27135. strm.msg = 'invalid bit length repeat';
  27136. state.mode = BAD;
  27137. break;
  27138. }
  27139. len = state.lens[state.have - 1];
  27140. copy = 3 + (hold & 0x03);//BITS(2);
  27141. //--- DROPBITS(2) ---//
  27142. hold >>>= 2;
  27143. bits -= 2;
  27144. //---//
  27145. }
  27146. else if (here_val === 17) {
  27147. //=== NEEDBITS(here.bits + 3);
  27148. n = here_bits + 3;
  27149. while (bits < n) {
  27150. if (have === 0) { break inf_leave; }
  27151. have--;
  27152. hold += input[next++] << bits;
  27153. bits += 8;
  27154. }
  27155. //===//
  27156. //--- DROPBITS(here.bits) ---//
  27157. hold >>>= here_bits;
  27158. bits -= here_bits;
  27159. //---//
  27160. len = 0;
  27161. copy = 3 + (hold & 0x07);//BITS(3);
  27162. //--- DROPBITS(3) ---//
  27163. hold >>>= 3;
  27164. bits -= 3;
  27165. //---//
  27166. }
  27167. else {
  27168. //=== NEEDBITS(here.bits + 7);
  27169. n = here_bits + 7;
  27170. while (bits < n) {
  27171. if (have === 0) { break inf_leave; }
  27172. have--;
  27173. hold += input[next++] << bits;
  27174. bits += 8;
  27175. }
  27176. //===//
  27177. //--- DROPBITS(here.bits) ---//
  27178. hold >>>= here_bits;
  27179. bits -= here_bits;
  27180. //---//
  27181. len = 0;
  27182. copy = 11 + (hold & 0x7f);//BITS(7);
  27183. //--- DROPBITS(7) ---//
  27184. hold >>>= 7;
  27185. bits -= 7;
  27186. //---//
  27187. }
  27188. if (state.have + copy > state.nlen + state.ndist) {
  27189. strm.msg = 'invalid bit length repeat';
  27190. state.mode = BAD;
  27191. break;
  27192. }
  27193. while (copy--) {
  27194. state.lens[state.have++] = len;
  27195. }
  27196. }
  27197. }
  27198. /* handle error breaks in while */
  27199. if (state.mode === BAD) { break; }
  27200. /* check for end-of-block code (better have one) */
  27201. if (state.lens[256] === 0) {
  27202. strm.msg = 'invalid code -- missing end-of-block';
  27203. state.mode = BAD;
  27204. break;
  27205. }
  27206. /* build code tables -- note: do not change the lenbits or distbits
  27207. values here (9 and 6) without reading the comments in inftrees.h
  27208. concerning the ENOUGH constants, which depend on those values */
  27209. state.lenbits = 9;
  27210. opts = { bits: state.lenbits };
  27211. ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts);
  27212. // We have separate tables & no pointers. 2 commented lines below not needed.
  27213. // state.next_index = opts.table_index;
  27214. state.lenbits = opts.bits;
  27215. // state.lencode = state.next;
  27216. if (ret) {
  27217. strm.msg = 'invalid literal/lengths set';
  27218. state.mode = BAD;
  27219. break;
  27220. }
  27221. state.distbits = 6;
  27222. //state.distcode.copy(state.codes);
  27223. // Switch to use dynamic table
  27224. state.distcode = state.distdyn;
  27225. opts = { bits: state.distbits };
  27226. ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts);
  27227. // We have separate tables & no pointers. 2 commented lines below not needed.
  27228. // state.next_index = opts.table_index;
  27229. state.distbits = opts.bits;
  27230. // state.distcode = state.next;
  27231. if (ret) {
  27232. strm.msg = 'invalid distances set';
  27233. state.mode = BAD;
  27234. break;
  27235. }
  27236. //Tracev((stderr, 'inflate: codes ok\n'));
  27237. state.mode = LEN_;
  27238. if (flush === Z_TREES) { break inf_leave; }
  27239. /* falls through */
  27240. case LEN_:
  27241. state.mode = LEN;
  27242. /* falls through */
  27243. case LEN:
  27244. if (have >= 6 && left >= 258) {
  27245. //--- RESTORE() ---
  27246. strm.next_out = put;
  27247. strm.avail_out = left;
  27248. strm.next_in = next;
  27249. strm.avail_in = have;
  27250. state.hold = hold;
  27251. state.bits = bits;
  27252. //---
  27253. inflate_fast(strm, _out);
  27254. //--- LOAD() ---
  27255. put = strm.next_out;
  27256. output = strm.output;
  27257. left = strm.avail_out;
  27258. next = strm.next_in;
  27259. input = strm.input;
  27260. have = strm.avail_in;
  27261. hold = state.hold;
  27262. bits = state.bits;
  27263. //---
  27264. if (state.mode === TYPE) {
  27265. state.back = -1;
  27266. }
  27267. break;
  27268. }
  27269. state.back = 0;
  27270. for (;;) {
  27271. here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/
  27272. here_bits = here >>> 24;
  27273. here_op = (here >>> 16) & 0xff;
  27274. here_val = here & 0xffff;
  27275. if (here_bits <= bits) { break; }
  27276. //--- PULLBYTE() ---//
  27277. if (have === 0) { break inf_leave; }
  27278. have--;
  27279. hold += input[next++] << bits;
  27280. bits += 8;
  27281. //---//
  27282. }
  27283. if (here_op && (here_op & 0xf0) === 0) {
  27284. last_bits = here_bits;
  27285. last_op = here_op;
  27286. last_val = here_val;
  27287. for (;;) {
  27288. here = state.lencode[last_val +
  27289. ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
  27290. here_bits = here >>> 24;
  27291. here_op = (here >>> 16) & 0xff;
  27292. here_val = here & 0xffff;
  27293. if ((last_bits + here_bits) <= bits) { break; }
  27294. //--- PULLBYTE() ---//
  27295. if (have === 0) { break inf_leave; }
  27296. have--;
  27297. hold += input[next++] << bits;
  27298. bits += 8;
  27299. //---//
  27300. }
  27301. //--- DROPBITS(last.bits) ---//
  27302. hold >>>= last_bits;
  27303. bits -= last_bits;
  27304. //---//
  27305. state.back += last_bits;
  27306. }
  27307. //--- DROPBITS(here.bits) ---//
  27308. hold >>>= here_bits;
  27309. bits -= here_bits;
  27310. //---//
  27311. state.back += here_bits;
  27312. state.length = here_val;
  27313. if (here_op === 0) {
  27314. //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
  27315. // "inflate: literal '%c'\n" :
  27316. // "inflate: literal 0x%02x\n", here.val));
  27317. state.mode = LIT;
  27318. break;
  27319. }
  27320. if (here_op & 32) {
  27321. //Tracevv((stderr, "inflate: end of block\n"));
  27322. state.back = -1;
  27323. state.mode = TYPE;
  27324. break;
  27325. }
  27326. if (here_op & 64) {
  27327. strm.msg = 'invalid literal/length code';
  27328. state.mode = BAD;
  27329. break;
  27330. }
  27331. state.extra = here_op & 15;
  27332. state.mode = LENEXT;
  27333. /* falls through */
  27334. case LENEXT:
  27335. if (state.extra) {
  27336. //=== NEEDBITS(state.extra);
  27337. n = state.extra;
  27338. while (bits < n) {
  27339. if (have === 0) { break inf_leave; }
  27340. have--;
  27341. hold += input[next++] << bits;
  27342. bits += 8;
  27343. }
  27344. //===//
  27345. state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
  27346. //--- DROPBITS(state.extra) ---//
  27347. hold >>>= state.extra;
  27348. bits -= state.extra;
  27349. //---//
  27350. state.back += state.extra;
  27351. }
  27352. //Tracevv((stderr, "inflate: length %u\n", state.length));
  27353. state.was = state.length;
  27354. state.mode = DIST;
  27355. /* falls through */
  27356. case DIST:
  27357. for (;;) {
  27358. here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
  27359. here_bits = here >>> 24;
  27360. here_op = (here >>> 16) & 0xff;
  27361. here_val = here & 0xffff;
  27362. if ((here_bits) <= bits) { break; }
  27363. //--- PULLBYTE() ---//
  27364. if (have === 0) { break inf_leave; }
  27365. have--;
  27366. hold += input[next++] << bits;
  27367. bits += 8;
  27368. //---//
  27369. }
  27370. if ((here_op & 0xf0) === 0) {
  27371. last_bits = here_bits;
  27372. last_op = here_op;
  27373. last_val = here_val;
  27374. for (;;) {
  27375. here = state.distcode[last_val +
  27376. ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
  27377. here_bits = here >>> 24;
  27378. here_op = (here >>> 16) & 0xff;
  27379. here_val = here & 0xffff;
  27380. if ((last_bits + here_bits) <= bits) { break; }
  27381. //--- PULLBYTE() ---//
  27382. if (have === 0) { break inf_leave; }
  27383. have--;
  27384. hold += input[next++] << bits;
  27385. bits += 8;
  27386. //---//
  27387. }
  27388. //--- DROPBITS(last.bits) ---//
  27389. hold >>>= last_bits;
  27390. bits -= last_bits;
  27391. //---//
  27392. state.back += last_bits;
  27393. }
  27394. //--- DROPBITS(here.bits) ---//
  27395. hold >>>= here_bits;
  27396. bits -= here_bits;
  27397. //---//
  27398. state.back += here_bits;
  27399. if (here_op & 64) {
  27400. strm.msg = 'invalid distance code';
  27401. state.mode = BAD;
  27402. break;
  27403. }
  27404. state.offset = here_val;
  27405. state.extra = (here_op) & 15;
  27406. state.mode = DISTEXT;
  27407. /* falls through */
  27408. case DISTEXT:
  27409. if (state.extra) {
  27410. //=== NEEDBITS(state.extra);
  27411. n = state.extra;
  27412. while (bits < n) {
  27413. if (have === 0) { break inf_leave; }
  27414. have--;
  27415. hold += input[next++] << bits;
  27416. bits += 8;
  27417. }
  27418. //===//
  27419. state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
  27420. //--- DROPBITS(state.extra) ---//
  27421. hold >>>= state.extra;
  27422. bits -= state.extra;
  27423. //---//
  27424. state.back += state.extra;
  27425. }
  27426. //#ifdef INFLATE_STRICT
  27427. if (state.offset > state.dmax) {
  27428. strm.msg = 'invalid distance too far back';
  27429. state.mode = BAD;
  27430. break;
  27431. }
  27432. //#endif
  27433. //Tracevv((stderr, "inflate: distance %u\n", state.offset));
  27434. state.mode = MATCH;
  27435. /* falls through */
  27436. case MATCH:
  27437. if (left === 0) { break inf_leave; }
  27438. copy = _out - left;
  27439. if (state.offset > copy) { /* copy from window */
  27440. copy = state.offset - copy;
  27441. if (copy > state.whave) {
  27442. if (state.sane) {
  27443. strm.msg = 'invalid distance too far back';
  27444. state.mode = BAD;
  27445. break;
  27446. }
  27447. // (!) This block is disabled in zlib defaults,
  27448. // don't enable it for binary compatibility
  27449. //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
  27450. // Trace((stderr, "inflate.c too far\n"));
  27451. // copy -= state.whave;
  27452. // if (copy > state.length) { copy = state.length; }
  27453. // if (copy > left) { copy = left; }
  27454. // left -= copy;
  27455. // state.length -= copy;
  27456. // do {
  27457. // output[put++] = 0;
  27458. // } while (--copy);
  27459. // if (state.length === 0) { state.mode = LEN; }
  27460. // break;
  27461. //#endif
  27462. }
  27463. if (copy > state.wnext) {
  27464. copy -= state.wnext;
  27465. from = state.wsize - copy;
  27466. }
  27467. else {
  27468. from = state.wnext - copy;
  27469. }
  27470. if (copy > state.length) { copy = state.length; }
  27471. from_source = state.window;
  27472. }
  27473. else { /* copy from output */
  27474. from_source = output;
  27475. from = put - state.offset;
  27476. copy = state.length;
  27477. }
  27478. if (copy > left) { copy = left; }
  27479. left -= copy;
  27480. state.length -= copy;
  27481. do {
  27482. output[put++] = from_source[from++];
  27483. } while (--copy);
  27484. if (state.length === 0) { state.mode = LEN; }
  27485. break;
  27486. case LIT:
  27487. if (left === 0) { break inf_leave; }
  27488. output[put++] = state.length;
  27489. left--;
  27490. state.mode = LEN;
  27491. break;
  27492. case CHECK:
  27493. if (state.wrap) {
  27494. //=== NEEDBITS(32);
  27495. while (bits < 32) {
  27496. if (have === 0) { break inf_leave; }
  27497. have--;
  27498. // Use '|' instead of '+' to make sure that result is signed
  27499. hold |= input[next++] << bits;
  27500. bits += 8;
  27501. }
  27502. //===//
  27503. _out -= left;
  27504. strm.total_out += _out;
  27505. state.total += _out;
  27506. if (_out) {
  27507. strm.adler = state.check =
  27508. /*UPDATE(state.check, put - _out, _out);*/
  27509. (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out));
  27510. }
  27511. _out = left;
  27512. // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
  27513. if ((state.flags ? hold : zswap32(hold)) !== state.check) {
  27514. strm.msg = 'incorrect data check';
  27515. state.mode = BAD;
  27516. break;
  27517. }
  27518. //=== INITBITS();
  27519. hold = 0;
  27520. bits = 0;
  27521. //===//
  27522. //Tracev((stderr, "inflate: check matches trailer\n"));
  27523. }
  27524. state.mode = LENGTH;
  27525. /* falls through */
  27526. case LENGTH:
  27527. if (state.wrap && state.flags) {
  27528. //=== NEEDBITS(32);
  27529. while (bits < 32) {
  27530. if (have === 0) { break inf_leave; }
  27531. have--;
  27532. hold += input[next++] << bits;
  27533. bits += 8;
  27534. }
  27535. //===//
  27536. if (hold !== (state.total & 0xffffffff)) {
  27537. strm.msg = 'incorrect length check';
  27538. state.mode = BAD;
  27539. break;
  27540. }
  27541. //=== INITBITS();
  27542. hold = 0;
  27543. bits = 0;
  27544. //===//
  27545. //Tracev((stderr, "inflate: length matches trailer\n"));
  27546. }
  27547. state.mode = DONE;
  27548. /* falls through */
  27549. case DONE:
  27550. ret = Z_STREAM_END;
  27551. break inf_leave;
  27552. case BAD:
  27553. ret = Z_DATA_ERROR;
  27554. break inf_leave;
  27555. case MEM:
  27556. return Z_MEM_ERROR;
  27557. case SYNC:
  27558. /* falls through */
  27559. default:
  27560. return Z_STREAM_ERROR;
  27561. }
  27562. }
  27563. // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
  27564. /*
  27565. Return from inflate(), updating the total counts and the check value.
  27566. If there was no progress during the inflate() call, return a buffer
  27567. error. Call updatewindow() to create and/or update the window state.
  27568. Note: a memory error from inflate() is non-recoverable.
  27569. */
  27570. //--- RESTORE() ---
  27571. strm.next_out = put;
  27572. strm.avail_out = left;
  27573. strm.next_in = next;
  27574. strm.avail_in = have;
  27575. state.hold = hold;
  27576. state.bits = bits;
  27577. //---
  27578. if (state.wsize || (_out !== strm.avail_out && state.mode < BAD &&
  27579. (state.mode < CHECK || flush !== Z_FINISH))) {
  27580. if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
  27581. state.mode = MEM;
  27582. return Z_MEM_ERROR;
  27583. }
  27584. }
  27585. _in -= strm.avail_in;
  27586. _out -= strm.avail_out;
  27587. strm.total_in += _in;
  27588. strm.total_out += _out;
  27589. state.total += _out;
  27590. if (state.wrap && _out) {
  27591. strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
  27592. (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out));
  27593. }
  27594. strm.data_type = state.bits + (state.last ? 64 : 0) +
  27595. (state.mode === TYPE ? 128 : 0) +
  27596. (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0);
  27597. if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) {
  27598. ret = Z_BUF_ERROR;
  27599. }
  27600. return ret;
  27601. }
  27602. function inflateEnd(strm) {
  27603. if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
  27604. return Z_STREAM_ERROR;
  27605. }
  27606. var state = strm.state;
  27607. if (state.window) {
  27608. state.window = null;
  27609. }
  27610. strm.state = null;
  27611. return Z_OK;
  27612. }
  27613. function inflateGetHeader(strm, head) {
  27614. var state;
  27615. /* check state */
  27616. if (!strm || !strm.state) { return Z_STREAM_ERROR; }
  27617. state = strm.state;
  27618. if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; }
  27619. /* save header structure */
  27620. state.head = head;
  27621. head.done = false;
  27622. return Z_OK;
  27623. }
  27624. function inflateSetDictionary(strm, dictionary) {
  27625. var dictLength = dictionary.length;
  27626. var state;
  27627. var dictid;
  27628. var ret;
  27629. /* check state */
  27630. if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; }
  27631. state = strm.state;
  27632. if (state.wrap !== 0 && state.mode !== DICT) {
  27633. return Z_STREAM_ERROR;
  27634. }
  27635. /* check for correct dictionary identifier */
  27636. if (state.mode === DICT) {
  27637. dictid = 1; /* adler32(0, null, 0)*/
  27638. /* dictid = adler32(dictid, dictionary, dictLength); */
  27639. dictid = adler32(dictid, dictionary, dictLength, 0);
  27640. if (dictid !== state.check) {
  27641. return Z_DATA_ERROR;
  27642. }
  27643. }
  27644. /* copy dictionary to window using updatewindow(), which will amend the
  27645. existing dictionary if appropriate */
  27646. ret = updatewindow(strm, dictionary, dictLength, dictLength);
  27647. if (ret) {
  27648. state.mode = MEM;
  27649. return Z_MEM_ERROR;
  27650. }
  27651. state.havedict = 1;
  27652. // Tracev((stderr, "inflate: dictionary set\n"));
  27653. return Z_OK;
  27654. }
  27655. exports.inflateReset = inflateReset;
  27656. exports.inflateReset2 = inflateReset2;
  27657. exports.inflateResetKeep = inflateResetKeep;
  27658. exports.inflateInit = inflateInit;
  27659. exports.inflateInit2 = inflateInit2;
  27660. exports.inflate = inflate;
  27661. exports.inflateEnd = inflateEnd;
  27662. exports.inflateGetHeader = inflateGetHeader;
  27663. exports.inflateSetDictionary = inflateSetDictionary;
  27664. exports.inflateInfo = 'pako inflate (from Nodeca project)';
  27665. /* Not implemented
  27666. exports.inflateCopy = inflateCopy;
  27667. exports.inflateGetDictionary = inflateGetDictionary;
  27668. exports.inflateMark = inflateMark;
  27669. exports.inflatePrime = inflatePrime;
  27670. exports.inflateSync = inflateSync;
  27671. exports.inflateSyncPoint = inflateSyncPoint;
  27672. exports.inflateUndermine = inflateUndermine;
  27673. */
  27674. /***/ }),
  27675. /***/ 1375:
  27676. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  27677. "use strict";
  27678. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  27679. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  27680. //
  27681. // This software is provided 'as-is', without any express or implied
  27682. // warranty. In no event will the authors be held liable for any damages
  27683. // arising from the use of this software.
  27684. //
  27685. // Permission is granted to anyone to use this software for any purpose,
  27686. // including commercial applications, and to alter it and redistribute it
  27687. // freely, subject to the following restrictions:
  27688. //
  27689. // 1. The origin of this software must not be misrepresented; you must not
  27690. // claim that you wrote the original software. If you use this software
  27691. // in a product, an acknowledgment in the product documentation would be
  27692. // appreciated but is not required.
  27693. // 2. Altered source versions must be plainly marked as such, and must not be
  27694. // misrepresented as being the original software.
  27695. // 3. This notice may not be removed or altered from any source distribution.
  27696. var utils = __webpack_require__(6907);
  27697. var MAXBITS = 15;
  27698. var ENOUGH_LENS = 852;
  27699. var ENOUGH_DISTS = 592;
  27700. //var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS);
  27701. var CODES = 0;
  27702. var LENS = 1;
  27703. var DISTS = 2;
  27704. var lbase = [ /* Length codes 257..285 base */
  27705. 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
  27706. 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0
  27707. ];
  27708. var lext = [ /* Length codes 257..285 extra */
  27709. 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
  27710. 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78
  27711. ];
  27712. var dbase = [ /* Distance codes 0..29 base */
  27713. 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
  27714. 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
  27715. 8193, 12289, 16385, 24577, 0, 0
  27716. ];
  27717. var dext = [ /* Distance codes 0..29 extra */
  27718. 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22,
  27719. 23, 23, 24, 24, 25, 25, 26, 26, 27, 27,
  27720. 28, 28, 29, 29, 64, 64
  27721. ];
  27722. module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts)
  27723. {
  27724. var bits = opts.bits;
  27725. //here = opts.here; /* table entry for duplication */
  27726. var len = 0; /* a code's length in bits */
  27727. var sym = 0; /* index of code symbols */
  27728. var min = 0, max = 0; /* minimum and maximum code lengths */
  27729. var root = 0; /* number of index bits for root table */
  27730. var curr = 0; /* number of index bits for current table */
  27731. var drop = 0; /* code bits to drop for sub-table */
  27732. var left = 0; /* number of prefix codes available */
  27733. var used = 0; /* code entries in table used */
  27734. var huff = 0; /* Huffman code */
  27735. var incr; /* for incrementing code, index */
  27736. var fill; /* index for replicating entries */
  27737. var low; /* low bits for current root entry */
  27738. var mask; /* mask for low root bits */
  27739. var next; /* next available space in table */
  27740. var base = null; /* base value table to use */
  27741. var base_index = 0;
  27742. // var shoextra; /* extra bits table to use */
  27743. var end; /* use base and extra for symbol > end */
  27744. var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */
  27745. var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */
  27746. var extra = null;
  27747. var extra_index = 0;
  27748. var here_bits, here_op, here_val;
  27749. /*
  27750. Process a set of code lengths to create a canonical Huffman code. The
  27751. code lengths are lens[0..codes-1]. Each length corresponds to the
  27752. symbols 0..codes-1. The Huffman code is generated by first sorting the
  27753. symbols by length from short to long, and retaining the symbol order
  27754. for codes with equal lengths. Then the code starts with all zero bits
  27755. for the first code of the shortest length, and the codes are integer
  27756. increments for the same length, and zeros are appended as the length
  27757. increases. For the deflate format, these bits are stored backwards
  27758. from their more natural integer increment ordering, and so when the
  27759. decoding tables are built in the large loop below, the integer codes
  27760. are incremented backwards.
  27761. This routine assumes, but does not check, that all of the entries in
  27762. lens[] are in the range 0..MAXBITS. The caller must assure this.
  27763. 1..MAXBITS is interpreted as that code length. zero means that that
  27764. symbol does not occur in this code.
  27765. The codes are sorted by computing a count of codes for each length,
  27766. creating from that a table of starting indices for each length in the
  27767. sorted table, and then entering the symbols in order in the sorted
  27768. table. The sorted table is work[], with that space being provided by
  27769. the caller.
  27770. The length counts are used for other purposes as well, i.e. finding
  27771. the minimum and maximum length codes, determining if there are any
  27772. codes at all, checking for a valid set of lengths, and looking ahead
  27773. at length counts to determine sub-table sizes when building the
  27774. decoding tables.
  27775. */
  27776. /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */
  27777. for (len = 0; len <= MAXBITS; len++) {
  27778. count[len] = 0;
  27779. }
  27780. for (sym = 0; sym < codes; sym++) {
  27781. count[lens[lens_index + sym]]++;
  27782. }
  27783. /* bound code lengths, force root to be within code lengths */
  27784. root = bits;
  27785. for (max = MAXBITS; max >= 1; max--) {
  27786. if (count[max] !== 0) { break; }
  27787. }
  27788. if (root > max) {
  27789. root = max;
  27790. }
  27791. if (max === 0) { /* no symbols to code at all */
  27792. //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */
  27793. //table.bits[opts.table_index] = 1; //here.bits = (var char)1;
  27794. //table.val[opts.table_index++] = 0; //here.val = (var short)0;
  27795. table[table_index++] = (1 << 24) | (64 << 16) | 0;
  27796. //table.op[opts.table_index] = 64;
  27797. //table.bits[opts.table_index] = 1;
  27798. //table.val[opts.table_index++] = 0;
  27799. table[table_index++] = (1 << 24) | (64 << 16) | 0;
  27800. opts.bits = 1;
  27801. return 0; /* no symbols, but wait for decoding to report error */
  27802. }
  27803. for (min = 1; min < max; min++) {
  27804. if (count[min] !== 0) { break; }
  27805. }
  27806. if (root < min) {
  27807. root = min;
  27808. }
  27809. /* check for an over-subscribed or incomplete set of lengths */
  27810. left = 1;
  27811. for (len = 1; len <= MAXBITS; len++) {
  27812. left <<= 1;
  27813. left -= count[len];
  27814. if (left < 0) {
  27815. return -1;
  27816. } /* over-subscribed */
  27817. }
  27818. if (left > 0 && (type === CODES || max !== 1)) {
  27819. return -1; /* incomplete set */
  27820. }
  27821. /* generate offsets into symbol table for each length for sorting */
  27822. offs[1] = 0;
  27823. for (len = 1; len < MAXBITS; len++) {
  27824. offs[len + 1] = offs[len] + count[len];
  27825. }
  27826. /* sort symbols by length, by symbol order within each length */
  27827. for (sym = 0; sym < codes; sym++) {
  27828. if (lens[lens_index + sym] !== 0) {
  27829. work[offs[lens[lens_index + sym]]++] = sym;
  27830. }
  27831. }
  27832. /*
  27833. Create and fill in decoding tables. In this loop, the table being
  27834. filled is at next and has curr index bits. The code being used is huff
  27835. with length len. That code is converted to an index by dropping drop
  27836. bits off of the bottom. For codes where len is less than drop + curr,
  27837. those top drop + curr - len bits are incremented through all values to
  27838. fill the table with replicated entries.
  27839. root is the number of index bits for the root table. When len exceeds
  27840. root, sub-tables are created pointed to by the root entry with an index
  27841. of the low root bits of huff. This is saved in low to check for when a
  27842. new sub-table should be started. drop is zero when the root table is
  27843. being filled, and drop is root when sub-tables are being filled.
  27844. When a new sub-table is needed, it is necessary to look ahead in the
  27845. code lengths to determine what size sub-table is needed. The length
  27846. counts are used for this, and so count[] is decremented as codes are
  27847. entered in the tables.
  27848. used keeps track of how many table entries have been allocated from the
  27849. provided *table space. It is checked for LENS and DIST tables against
  27850. the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
  27851. the initial root table size constants. See the comments in inftrees.h
  27852. for more information.
  27853. sym increments through all symbols, and the loop terminates when
  27854. all codes of length max, i.e. all codes, have been processed. This
  27855. routine permits incomplete codes, so another loop after this one fills
  27856. in the rest of the decoding tables with invalid code markers.
  27857. */
  27858. /* set up for code type */
  27859. // poor man optimization - use if-else instead of switch,
  27860. // to avoid deopts in old v8
  27861. if (type === CODES) {
  27862. base = extra = work; /* dummy value--not used */
  27863. end = 19;
  27864. } else if (type === LENS) {
  27865. base = lbase;
  27866. base_index -= 257;
  27867. extra = lext;
  27868. extra_index -= 257;
  27869. end = 256;
  27870. } else { /* DISTS */
  27871. base = dbase;
  27872. extra = dext;
  27873. end = -1;
  27874. }
  27875. /* initialize opts for loop */
  27876. huff = 0; /* starting code */
  27877. sym = 0; /* starting code symbol */
  27878. len = min; /* starting code length */
  27879. next = table_index; /* current table to fill in */
  27880. curr = root; /* current table index bits */
  27881. drop = 0; /* current bits to drop from code for index */
  27882. low = -1; /* trigger new sub-table when len > root */
  27883. used = 1 << root; /* use root table entries */
  27884. mask = used - 1; /* mask for comparing low */
  27885. /* check available table space */
  27886. if ((type === LENS && used > ENOUGH_LENS) ||
  27887. (type === DISTS && used > ENOUGH_DISTS)) {
  27888. return 1;
  27889. }
  27890. /* process all codes and make table entries */
  27891. for (;;) {
  27892. /* create table entry */
  27893. here_bits = len - drop;
  27894. if (work[sym] < end) {
  27895. here_op = 0;
  27896. here_val = work[sym];
  27897. }
  27898. else if (work[sym] > end) {
  27899. here_op = extra[extra_index + work[sym]];
  27900. here_val = base[base_index + work[sym]];
  27901. }
  27902. else {
  27903. here_op = 32 + 64; /* end of block */
  27904. here_val = 0;
  27905. }
  27906. /* replicate for those indices with low len bits equal to huff */
  27907. incr = 1 << (len - drop);
  27908. fill = 1 << curr;
  27909. min = fill; /* save offset to next table */
  27910. do {
  27911. fill -= incr;
  27912. table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0;
  27913. } while (fill !== 0);
  27914. /* backwards increment the len-bit code huff */
  27915. incr = 1 << (len - 1);
  27916. while (huff & incr) {
  27917. incr >>= 1;
  27918. }
  27919. if (incr !== 0) {
  27920. huff &= incr - 1;
  27921. huff += incr;
  27922. } else {
  27923. huff = 0;
  27924. }
  27925. /* go to next symbol, update count, len */
  27926. sym++;
  27927. if (--count[len] === 0) {
  27928. if (len === max) { break; }
  27929. len = lens[lens_index + work[sym]];
  27930. }
  27931. /* create new sub-table if needed */
  27932. if (len > root && (huff & mask) !== low) {
  27933. /* if first time, transition to sub-tables */
  27934. if (drop === 0) {
  27935. drop = root;
  27936. }
  27937. /* increment past last table */
  27938. next += min; /* here min is 1 << curr */
  27939. /* determine length of next table */
  27940. curr = len - drop;
  27941. left = 1 << curr;
  27942. while (curr + drop < max) {
  27943. left -= count[curr + drop];
  27944. if (left <= 0) { break; }
  27945. curr++;
  27946. left <<= 1;
  27947. }
  27948. /* check for enough space */
  27949. used += 1 << curr;
  27950. if ((type === LENS && used > ENOUGH_LENS) ||
  27951. (type === DISTS && used > ENOUGH_DISTS)) {
  27952. return 1;
  27953. }
  27954. /* point entry in root table to sub-table */
  27955. low = huff & mask;
  27956. /*table.op[low] = curr;
  27957. table.bits[low] = root;
  27958. table.val[low] = next - opts.table_index;*/
  27959. table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
  27960. }
  27961. }
  27962. /* fill in remaining table entry if code is incomplete (guaranteed to have
  27963. at most one remaining entry, since if the code is incomplete, the
  27964. maximum code length that was allowed to get this far is one bit) */
  27965. if (huff !== 0) {
  27966. //table.op[next + huff] = 64; /* invalid code marker */
  27967. //table.bits[next + huff] = len - drop;
  27968. //table.val[next + huff] = 0;
  27969. table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
  27970. }
  27971. /* set return parameters */
  27972. //opts.table_index += used;
  27973. opts.bits = root;
  27974. return 0;
  27975. };
  27976. /***/ }),
  27977. /***/ 9364:
  27978. /***/ (function(module) {
  27979. "use strict";
  27980. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  27981. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  27982. //
  27983. // This software is provided 'as-is', without any express or implied
  27984. // warranty. In no event will the authors be held liable for any damages
  27985. // arising from the use of this software.
  27986. //
  27987. // Permission is granted to anyone to use this software for any purpose,
  27988. // including commercial applications, and to alter it and redistribute it
  27989. // freely, subject to the following restrictions:
  27990. //
  27991. // 1. The origin of this software must not be misrepresented; you must not
  27992. // claim that you wrote the original software. If you use this software
  27993. // in a product, an acknowledgment in the product documentation would be
  27994. // appreciated but is not required.
  27995. // 2. Altered source versions must be plainly marked as such, and must not be
  27996. // misrepresented as being the original software.
  27997. // 3. This notice may not be removed or altered from any source distribution.
  27998. module.exports = {
  27999. 2: 'need dictionary', /* Z_NEED_DICT 2 */
  28000. 1: 'stream end', /* Z_STREAM_END 1 */
  28001. 0: '', /* Z_OK 0 */
  28002. '-1': 'file error', /* Z_ERRNO (-1) */
  28003. '-2': 'stream error', /* Z_STREAM_ERROR (-2) */
  28004. '-3': 'data error', /* Z_DATA_ERROR (-3) */
  28005. '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */
  28006. '-5': 'buffer error', /* Z_BUF_ERROR (-5) */
  28007. '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
  28008. };
  28009. /***/ }),
  28010. /***/ 1339:
  28011. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  28012. "use strict";
  28013. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  28014. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  28015. //
  28016. // This software is provided 'as-is', without any express or implied
  28017. // warranty. In no event will the authors be held liable for any damages
  28018. // arising from the use of this software.
  28019. //
  28020. // Permission is granted to anyone to use this software for any purpose,
  28021. // including commercial applications, and to alter it and redistribute it
  28022. // freely, subject to the following restrictions:
  28023. //
  28024. // 1. The origin of this software must not be misrepresented; you must not
  28025. // claim that you wrote the original software. If you use this software
  28026. // in a product, an acknowledgment in the product documentation would be
  28027. // appreciated but is not required.
  28028. // 2. Altered source versions must be plainly marked as such, and must not be
  28029. // misrepresented as being the original software.
  28030. // 3. This notice may not be removed or altered from any source distribution.
  28031. /* eslint-disable space-unary-ops */
  28032. var utils = __webpack_require__(6907);
  28033. /* Public constants ==========================================================*/
  28034. /* ===========================================================================*/
  28035. //var Z_FILTERED = 1;
  28036. //var Z_HUFFMAN_ONLY = 2;
  28037. //var Z_RLE = 3;
  28038. var Z_FIXED = 4;
  28039. //var Z_DEFAULT_STRATEGY = 0;
  28040. /* Possible values of the data_type field (though see inflate()) */
  28041. var Z_BINARY = 0;
  28042. var Z_TEXT = 1;
  28043. //var Z_ASCII = 1; // = Z_TEXT
  28044. var Z_UNKNOWN = 2;
  28045. /*============================================================================*/
  28046. function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
  28047. // From zutil.h
  28048. var STORED_BLOCK = 0;
  28049. var STATIC_TREES = 1;
  28050. var DYN_TREES = 2;
  28051. /* The three kinds of block type */
  28052. var MIN_MATCH = 3;
  28053. var MAX_MATCH = 258;
  28054. /* The minimum and maximum match lengths */
  28055. // From deflate.h
  28056. /* ===========================================================================
  28057. * Internal compression state.
  28058. */
  28059. var LENGTH_CODES = 29;
  28060. /* number of length codes, not counting the special END_BLOCK code */
  28061. var LITERALS = 256;
  28062. /* number of literal bytes 0..255 */
  28063. var L_CODES = LITERALS + 1 + LENGTH_CODES;
  28064. /* number of Literal or Length codes, including the END_BLOCK code */
  28065. var D_CODES = 30;
  28066. /* number of distance codes */
  28067. var BL_CODES = 19;
  28068. /* number of codes used to transfer the bit lengths */
  28069. var HEAP_SIZE = 2 * L_CODES + 1;
  28070. /* maximum heap size */
  28071. var MAX_BITS = 15;
  28072. /* All codes must not exceed MAX_BITS bits */
  28073. var Buf_size = 16;
  28074. /* size of bit buffer in bi_buf */
  28075. /* ===========================================================================
  28076. * Constants
  28077. */
  28078. var MAX_BL_BITS = 7;
  28079. /* Bit length codes must not exceed MAX_BL_BITS bits */
  28080. var END_BLOCK = 256;
  28081. /* end of block literal code */
  28082. var REP_3_6 = 16;
  28083. /* repeat previous bit length 3-6 times (2 bits of repeat count) */
  28084. var REPZ_3_10 = 17;
  28085. /* repeat a zero length 3-10 times (3 bits of repeat count) */
  28086. var REPZ_11_138 = 18;
  28087. /* repeat a zero length 11-138 times (7 bits of repeat count) */
  28088. /* eslint-disable comma-spacing,array-bracket-spacing */
  28089. var extra_lbits = /* extra bits for each length code */
  28090. [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];
  28091. var extra_dbits = /* extra bits for each distance code */
  28092. [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];
  28093. var extra_blbits = /* extra bits for each bit length code */
  28094. [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7];
  28095. var bl_order =
  28096. [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];
  28097. /* eslint-enable comma-spacing,array-bracket-spacing */
  28098. /* The lengths of the bit length codes are sent in order of decreasing
  28099. * probability, to avoid transmitting the lengths for unused bit length codes.
  28100. */
  28101. /* ===========================================================================
  28102. * Local data. These are initialized only once.
  28103. */
  28104. // We pre-fill arrays with 0 to avoid uninitialized gaps
  28105. var DIST_CODE_LEN = 512; /* see definition of array dist_code below */
  28106. // !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1
  28107. var static_ltree = new Array((L_CODES + 2) * 2);
  28108. zero(static_ltree);
  28109. /* The static literal tree. Since the bit lengths are imposed, there is no
  28110. * need for the L_CODES extra codes used during heap construction. However
  28111. * The codes 286 and 287 are needed to build a canonical tree (see _tr_init
  28112. * below).
  28113. */
  28114. var static_dtree = new Array(D_CODES * 2);
  28115. zero(static_dtree);
  28116. /* The static distance tree. (Actually a trivial tree since all codes use
  28117. * 5 bits.)
  28118. */
  28119. var _dist_code = new Array(DIST_CODE_LEN);
  28120. zero(_dist_code);
  28121. /* Distance codes. The first 256 values correspond to the distances
  28122. * 3 .. 258, the last 256 values correspond to the top 8 bits of
  28123. * the 15 bit distances.
  28124. */
  28125. var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);
  28126. zero(_length_code);
  28127. /* length code for each normalized match length (0 == MIN_MATCH) */
  28128. var base_length = new Array(LENGTH_CODES);
  28129. zero(base_length);
  28130. /* First normalized length for each code (0 = MIN_MATCH) */
  28131. var base_dist = new Array(D_CODES);
  28132. zero(base_dist);
  28133. /* First normalized distance for each code (0 = distance of 1) */
  28134. function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) {
  28135. this.static_tree = static_tree; /* static tree or NULL */
  28136. this.extra_bits = extra_bits; /* extra bits for each code or NULL */
  28137. this.extra_base = extra_base; /* base index for extra_bits */
  28138. this.elems = elems; /* max number of elements in the tree */
  28139. this.max_length = max_length; /* max bit length for the codes */
  28140. // show if `static_tree` has data or dummy - needed for monomorphic objects
  28141. this.has_stree = static_tree && static_tree.length;
  28142. }
  28143. var static_l_desc;
  28144. var static_d_desc;
  28145. var static_bl_desc;
  28146. function TreeDesc(dyn_tree, stat_desc) {
  28147. this.dyn_tree = dyn_tree; /* the dynamic tree */
  28148. this.max_code = 0; /* largest code with non zero frequency */
  28149. this.stat_desc = stat_desc; /* the corresponding static tree */
  28150. }
  28151. function d_code(dist) {
  28152. return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)];
  28153. }
  28154. /* ===========================================================================
  28155. * Output a short LSB first on the stream.
  28156. * IN assertion: there is enough room in pendingBuf.
  28157. */
  28158. function put_short(s, w) {
  28159. // put_byte(s, (uch)((w) & 0xff));
  28160. // put_byte(s, (uch)((ush)(w) >> 8));
  28161. s.pending_buf[s.pending++] = (w) & 0xff;
  28162. s.pending_buf[s.pending++] = (w >>> 8) & 0xff;
  28163. }
  28164. /* ===========================================================================
  28165. * Send a value on a given number of bits.
  28166. * IN assertion: length <= 16 and value fits in length bits.
  28167. */
  28168. function send_bits(s, value, length) {
  28169. if (s.bi_valid > (Buf_size - length)) {
  28170. s.bi_buf |= (value << s.bi_valid) & 0xffff;
  28171. put_short(s, s.bi_buf);
  28172. s.bi_buf = value >> (Buf_size - s.bi_valid);
  28173. s.bi_valid += length - Buf_size;
  28174. } else {
  28175. s.bi_buf |= (value << s.bi_valid) & 0xffff;
  28176. s.bi_valid += length;
  28177. }
  28178. }
  28179. function send_code(s, c, tree) {
  28180. send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/);
  28181. }
  28182. /* ===========================================================================
  28183. * Reverse the first len bits of a code, using straightforward code (a faster
  28184. * method would use a table)
  28185. * IN assertion: 1 <= len <= 15
  28186. */
  28187. function bi_reverse(code, len) {
  28188. var res = 0;
  28189. do {
  28190. res |= code & 1;
  28191. code >>>= 1;
  28192. res <<= 1;
  28193. } while (--len > 0);
  28194. return res >>> 1;
  28195. }
  28196. /* ===========================================================================
  28197. * Flush the bit buffer, keeping at most 7 bits in it.
  28198. */
  28199. function bi_flush(s) {
  28200. if (s.bi_valid === 16) {
  28201. put_short(s, s.bi_buf);
  28202. s.bi_buf = 0;
  28203. s.bi_valid = 0;
  28204. } else if (s.bi_valid >= 8) {
  28205. s.pending_buf[s.pending++] = s.bi_buf & 0xff;
  28206. s.bi_buf >>= 8;
  28207. s.bi_valid -= 8;
  28208. }
  28209. }
  28210. /* ===========================================================================
  28211. * Compute the optimal bit lengths for a tree and update the total bit length
  28212. * for the current block.
  28213. * IN assertion: the fields freq and dad are set, heap[heap_max] and
  28214. * above are the tree nodes sorted by increasing frequency.
  28215. * OUT assertions: the field len is set to the optimal bit length, the
  28216. * array bl_count contains the frequencies for each bit length.
  28217. * The length opt_len is updated; static_len is also updated if stree is
  28218. * not null.
  28219. */
  28220. function gen_bitlen(s, desc)
  28221. // deflate_state *s;
  28222. // tree_desc *desc; /* the tree descriptor */
  28223. {
  28224. var tree = desc.dyn_tree;
  28225. var max_code = desc.max_code;
  28226. var stree = desc.stat_desc.static_tree;
  28227. var has_stree = desc.stat_desc.has_stree;
  28228. var extra = desc.stat_desc.extra_bits;
  28229. var base = desc.stat_desc.extra_base;
  28230. var max_length = desc.stat_desc.max_length;
  28231. var h; /* heap index */
  28232. var n, m; /* iterate over the tree elements */
  28233. var bits; /* bit length */
  28234. var xbits; /* extra bits */
  28235. var f; /* frequency */
  28236. var overflow = 0; /* number of elements with bit length too large */
  28237. for (bits = 0; bits <= MAX_BITS; bits++) {
  28238. s.bl_count[bits] = 0;
  28239. }
  28240. /* In a first pass, compute the optimal bit lengths (which may
  28241. * overflow in the case of the bit length tree).
  28242. */
  28243. tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */
  28244. for (h = s.heap_max + 1; h < HEAP_SIZE; h++) {
  28245. n = s.heap[h];
  28246. bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1;
  28247. if (bits > max_length) {
  28248. bits = max_length;
  28249. overflow++;
  28250. }
  28251. tree[n * 2 + 1]/*.Len*/ = bits;
  28252. /* We overwrite tree[n].Dad which is no longer needed */
  28253. if (n > max_code) { continue; } /* not a leaf node */
  28254. s.bl_count[bits]++;
  28255. xbits = 0;
  28256. if (n >= base) {
  28257. xbits = extra[n - base];
  28258. }
  28259. f = tree[n * 2]/*.Freq*/;
  28260. s.opt_len += f * (bits + xbits);
  28261. if (has_stree) {
  28262. s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits);
  28263. }
  28264. }
  28265. if (overflow === 0) { return; }
  28266. // Trace((stderr,"\nbit length overflow\n"));
  28267. /* This happens for example on obj2 and pic of the Calgary corpus */
  28268. /* Find the first bit length which could increase: */
  28269. do {
  28270. bits = max_length - 1;
  28271. while (s.bl_count[bits] === 0) { bits--; }
  28272. s.bl_count[bits]--; /* move one leaf down the tree */
  28273. s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */
  28274. s.bl_count[max_length]--;
  28275. /* The brother of the overflow item also moves one step up,
  28276. * but this does not affect bl_count[max_length]
  28277. */
  28278. overflow -= 2;
  28279. } while (overflow > 0);
  28280. /* Now recompute all bit lengths, scanning in increasing frequency.
  28281. * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all
  28282. * lengths instead of fixing only the wrong ones. This idea is taken
  28283. * from 'ar' written by Haruhiko Okumura.)
  28284. */
  28285. for (bits = max_length; bits !== 0; bits--) {
  28286. n = s.bl_count[bits];
  28287. while (n !== 0) {
  28288. m = s.heap[--h];
  28289. if (m > max_code) { continue; }
  28290. if (tree[m * 2 + 1]/*.Len*/ !== bits) {
  28291. // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
  28292. s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;
  28293. tree[m * 2 + 1]/*.Len*/ = bits;
  28294. }
  28295. n--;
  28296. }
  28297. }
  28298. }
  28299. /* ===========================================================================
  28300. * Generate the codes for a given tree and bit counts (which need not be
  28301. * optimal).
  28302. * IN assertion: the array bl_count contains the bit length statistics for
  28303. * the given tree and the field len is set for all tree elements.
  28304. * OUT assertion: the field code is set for all tree elements of non
  28305. * zero code length.
  28306. */
  28307. function gen_codes(tree, max_code, bl_count)
  28308. // ct_data *tree; /* the tree to decorate */
  28309. // int max_code; /* largest code with non zero frequency */
  28310. // ushf *bl_count; /* number of codes at each bit length */
  28311. {
  28312. var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */
  28313. var code = 0; /* running code value */
  28314. var bits; /* bit index */
  28315. var n; /* code index */
  28316. /* The distribution counts are first used to generate the code values
  28317. * without bit reversal.
  28318. */
  28319. for (bits = 1; bits <= MAX_BITS; bits++) {
  28320. next_code[bits] = code = (code + bl_count[bits - 1]) << 1;
  28321. }
  28322. /* Check that the bit counts in bl_count are consistent. The last code
  28323. * must be all ones.
  28324. */
  28325. //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
  28326. // "inconsistent bit counts");
  28327. //Tracev((stderr,"\ngen_codes: max_code %d ", max_code));
  28328. for (n = 0; n <= max_code; n++) {
  28329. var len = tree[n * 2 + 1]/*.Len*/;
  28330. if (len === 0) { continue; }
  28331. /* Now reverse the bits */
  28332. tree[n * 2]/*.Code*/ = bi_reverse(next_code[len]++, len);
  28333. //Tracecv(tree != static_ltree, (stderr,"\nn %3d %c l %2d c %4x (%x) ",
  28334. // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
  28335. }
  28336. }
  28337. /* ===========================================================================
  28338. * Initialize the various 'constant' tables.
  28339. */
  28340. function tr_static_init() {
  28341. var n; /* iterates over tree elements */
  28342. var bits; /* bit counter */
  28343. var length; /* length value */
  28344. var code; /* code value */
  28345. var dist; /* distance index */
  28346. var bl_count = new Array(MAX_BITS + 1);
  28347. /* number of codes at each bit length for an optimal tree */
  28348. // do check in _tr_init()
  28349. //if (static_init_done) return;
  28350. /* For some embedded targets, global variables are not initialized: */
  28351. /*#ifdef NO_INIT_GLOBAL_POINTERS
  28352. static_l_desc.static_tree = static_ltree;
  28353. static_l_desc.extra_bits = extra_lbits;
  28354. static_d_desc.static_tree = static_dtree;
  28355. static_d_desc.extra_bits = extra_dbits;
  28356. static_bl_desc.extra_bits = extra_blbits;
  28357. #endif*/
  28358. /* Initialize the mapping length (0..255) -> length code (0..28) */
  28359. length = 0;
  28360. for (code = 0; code < LENGTH_CODES - 1; code++) {
  28361. base_length[code] = length;
  28362. for (n = 0; n < (1 << extra_lbits[code]); n++) {
  28363. _length_code[length++] = code;
  28364. }
  28365. }
  28366. //Assert (length == 256, "tr_static_init: length != 256");
  28367. /* Note that the length 255 (match length 258) can be represented
  28368. * in two different ways: code 284 + 5 bits or code 285, so we
  28369. * overwrite length_code[255] to use the best encoding:
  28370. */
  28371. _length_code[length - 1] = code;
  28372. /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
  28373. dist = 0;
  28374. for (code = 0; code < 16; code++) {
  28375. base_dist[code] = dist;
  28376. for (n = 0; n < (1 << extra_dbits[code]); n++) {
  28377. _dist_code[dist++] = code;
  28378. }
  28379. }
  28380. //Assert (dist == 256, "tr_static_init: dist != 256");
  28381. dist >>= 7; /* from now on, all distances are divided by 128 */
  28382. for (; code < D_CODES; code++) {
  28383. base_dist[code] = dist << 7;
  28384. for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
  28385. _dist_code[256 + dist++] = code;
  28386. }
  28387. }
  28388. //Assert (dist == 256, "tr_static_init: 256+dist != 512");
  28389. /* Construct the codes of the static literal tree */
  28390. for (bits = 0; bits <= MAX_BITS; bits++) {
  28391. bl_count[bits] = 0;
  28392. }
  28393. n = 0;
  28394. while (n <= 143) {
  28395. static_ltree[n * 2 + 1]/*.Len*/ = 8;
  28396. n++;
  28397. bl_count[8]++;
  28398. }
  28399. while (n <= 255) {
  28400. static_ltree[n * 2 + 1]/*.Len*/ = 9;
  28401. n++;
  28402. bl_count[9]++;
  28403. }
  28404. while (n <= 279) {
  28405. static_ltree[n * 2 + 1]/*.Len*/ = 7;
  28406. n++;
  28407. bl_count[7]++;
  28408. }
  28409. while (n <= 287) {
  28410. static_ltree[n * 2 + 1]/*.Len*/ = 8;
  28411. n++;
  28412. bl_count[8]++;
  28413. }
  28414. /* Codes 286 and 287 do not exist, but we must include them in the
  28415. * tree construction to get a canonical Huffman tree (longest code
  28416. * all ones)
  28417. */
  28418. gen_codes(static_ltree, L_CODES + 1, bl_count);
  28419. /* The static distance tree is trivial: */
  28420. for (n = 0; n < D_CODES; n++) {
  28421. static_dtree[n * 2 + 1]/*.Len*/ = 5;
  28422. static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5);
  28423. }
  28424. // Now data ready and we can init static trees
  28425. static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS);
  28426. static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS);
  28427. static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS);
  28428. //static_init_done = true;
  28429. }
  28430. /* ===========================================================================
  28431. * Initialize a new block.
  28432. */
  28433. function init_block(s) {
  28434. var n; /* iterates over tree elements */
  28435. /* Initialize the trees. */
  28436. for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; }
  28437. for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; }
  28438. for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; }
  28439. s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1;
  28440. s.opt_len = s.static_len = 0;
  28441. s.last_lit = s.matches = 0;
  28442. }
  28443. /* ===========================================================================
  28444. * Flush the bit buffer and align the output on a byte boundary
  28445. */
  28446. function bi_windup(s)
  28447. {
  28448. if (s.bi_valid > 8) {
  28449. put_short(s, s.bi_buf);
  28450. } else if (s.bi_valid > 0) {
  28451. //put_byte(s, (Byte)s->bi_buf);
  28452. s.pending_buf[s.pending++] = s.bi_buf;
  28453. }
  28454. s.bi_buf = 0;
  28455. s.bi_valid = 0;
  28456. }
  28457. /* ===========================================================================
  28458. * Copy a stored block, storing first the length and its
  28459. * one's complement if requested.
  28460. */
  28461. function copy_block(s, buf, len, header)
  28462. //DeflateState *s;
  28463. //charf *buf; /* the input data */
  28464. //unsigned len; /* its length */
  28465. //int header; /* true if block header must be written */
  28466. {
  28467. bi_windup(s); /* align on byte boundary */
  28468. if (header) {
  28469. put_short(s, len);
  28470. put_short(s, ~len);
  28471. }
  28472. // while (len--) {
  28473. // put_byte(s, *buf++);
  28474. // }
  28475. utils.arraySet(s.pending_buf, s.window, buf, len, s.pending);
  28476. s.pending += len;
  28477. }
  28478. /* ===========================================================================
  28479. * Compares to subtrees, using the tree depth as tie breaker when
  28480. * the subtrees have equal frequency. This minimizes the worst case length.
  28481. */
  28482. function smaller(tree, n, m, depth) {
  28483. var _n2 = n * 2;
  28484. var _m2 = m * 2;
  28485. return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ ||
  28486. (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m]));
  28487. }
  28488. /* ===========================================================================
  28489. * Restore the heap property by moving down the tree starting at node k,
  28490. * exchanging a node with the smallest of its two sons if necessary, stopping
  28491. * when the heap property is re-established (each father smaller than its
  28492. * two sons).
  28493. */
  28494. function pqdownheap(s, tree, k)
  28495. // deflate_state *s;
  28496. // ct_data *tree; /* the tree to restore */
  28497. // int k; /* node to move down */
  28498. {
  28499. var v = s.heap[k];
  28500. var j = k << 1; /* left son of k */
  28501. while (j <= s.heap_len) {
  28502. /* Set j to the smallest of the two sons: */
  28503. if (j < s.heap_len &&
  28504. smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) {
  28505. j++;
  28506. }
  28507. /* Exit if v is smaller than both sons */
  28508. if (smaller(tree, v, s.heap[j], s.depth)) { break; }
  28509. /* Exchange v with the smallest son */
  28510. s.heap[k] = s.heap[j];
  28511. k = j;
  28512. /* And continue down the tree, setting j to the left son of k */
  28513. j <<= 1;
  28514. }
  28515. s.heap[k] = v;
  28516. }
  28517. // inlined manually
  28518. // var SMALLEST = 1;
  28519. /* ===========================================================================
  28520. * Send the block data compressed using the given Huffman trees
  28521. */
  28522. function compress_block(s, ltree, dtree)
  28523. // deflate_state *s;
  28524. // const ct_data *ltree; /* literal tree */
  28525. // const ct_data *dtree; /* distance tree */
  28526. {
  28527. var dist; /* distance of matched string */
  28528. var lc; /* match length or unmatched char (if dist == 0) */
  28529. var lx = 0; /* running index in l_buf */
  28530. var code; /* the code to send */
  28531. var extra; /* number of extra bits to send */
  28532. if (s.last_lit !== 0) {
  28533. do {
  28534. dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]);
  28535. lc = s.pending_buf[s.l_buf + lx];
  28536. lx++;
  28537. if (dist === 0) {
  28538. send_code(s, lc, ltree); /* send a literal byte */
  28539. //Tracecv(isgraph(lc), (stderr," '%c' ", lc));
  28540. } else {
  28541. /* Here, lc is the match length - MIN_MATCH */
  28542. code = _length_code[lc];
  28543. send_code(s, code + LITERALS + 1, ltree); /* send the length code */
  28544. extra = extra_lbits[code];
  28545. if (extra !== 0) {
  28546. lc -= base_length[code];
  28547. send_bits(s, lc, extra); /* send the extra length bits */
  28548. }
  28549. dist--; /* dist is now the match distance - 1 */
  28550. code = d_code(dist);
  28551. //Assert (code < D_CODES, "bad d_code");
  28552. send_code(s, code, dtree); /* send the distance code */
  28553. extra = extra_dbits[code];
  28554. if (extra !== 0) {
  28555. dist -= base_dist[code];
  28556. send_bits(s, dist, extra); /* send the extra distance bits */
  28557. }
  28558. } /* literal or match pair ? */
  28559. /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */
  28560. //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
  28561. // "pendingBuf overflow");
  28562. } while (lx < s.last_lit);
  28563. }
  28564. send_code(s, END_BLOCK, ltree);
  28565. }
  28566. /* ===========================================================================
  28567. * Construct one Huffman tree and assigns the code bit strings and lengths.
  28568. * Update the total bit length for the current block.
  28569. * IN assertion: the field freq is set for all tree elements.
  28570. * OUT assertions: the fields len and code are set to the optimal bit length
  28571. * and corresponding code. The length opt_len is updated; static_len is
  28572. * also updated if stree is not null. The field max_code is set.
  28573. */
  28574. function build_tree(s, desc)
  28575. // deflate_state *s;
  28576. // tree_desc *desc; /* the tree descriptor */
  28577. {
  28578. var tree = desc.dyn_tree;
  28579. var stree = desc.stat_desc.static_tree;
  28580. var has_stree = desc.stat_desc.has_stree;
  28581. var elems = desc.stat_desc.elems;
  28582. var n, m; /* iterate over heap elements */
  28583. var max_code = -1; /* largest code with non zero frequency */
  28584. var node; /* new node being created */
  28585. /* Construct the initial heap, with least frequent element in
  28586. * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1].
  28587. * heap[0] is not used.
  28588. */
  28589. s.heap_len = 0;
  28590. s.heap_max = HEAP_SIZE;
  28591. for (n = 0; n < elems; n++) {
  28592. if (tree[n * 2]/*.Freq*/ !== 0) {
  28593. s.heap[++s.heap_len] = max_code = n;
  28594. s.depth[n] = 0;
  28595. } else {
  28596. tree[n * 2 + 1]/*.Len*/ = 0;
  28597. }
  28598. }
  28599. /* The pkzip format requires that at least one distance code exists,
  28600. * and that at least one bit should be sent even if there is only one
  28601. * possible code. So to avoid special checks later on we force at least
  28602. * two codes of non zero frequency.
  28603. */
  28604. while (s.heap_len < 2) {
  28605. node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0);
  28606. tree[node * 2]/*.Freq*/ = 1;
  28607. s.depth[node] = 0;
  28608. s.opt_len--;
  28609. if (has_stree) {
  28610. s.static_len -= stree[node * 2 + 1]/*.Len*/;
  28611. }
  28612. /* node is 0 or 1 so it does not have extra bits */
  28613. }
  28614. desc.max_code = max_code;
  28615. /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree,
  28616. * establish sub-heaps of increasing lengths:
  28617. */
  28618. for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }
  28619. /* Construct the Huffman tree by repeatedly combining the least two
  28620. * frequent nodes.
  28621. */
  28622. node = elems; /* next internal node of the tree */
  28623. do {
  28624. //pqremove(s, tree, n); /* n = node of least frequency */
  28625. /*** pqremove ***/
  28626. n = s.heap[1/*SMALLEST*/];
  28627. s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
  28628. pqdownheap(s, tree, 1/*SMALLEST*/);
  28629. /***/
  28630. m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */
  28631. s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
  28632. s.heap[--s.heap_max] = m;
  28633. /* Create a new node father of n and m */
  28634. tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/;
  28635. s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1;
  28636. tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node;
  28637. /* and insert the new node in the heap */
  28638. s.heap[1/*SMALLEST*/] = node++;
  28639. pqdownheap(s, tree, 1/*SMALLEST*/);
  28640. } while (s.heap_len >= 2);
  28641. s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];
  28642. /* At this point, the fields freq and dad are set. We can now
  28643. * generate the bit lengths.
  28644. */
  28645. gen_bitlen(s, desc);
  28646. /* The field len is now set, we can generate the bit codes */
  28647. gen_codes(tree, max_code, s.bl_count);
  28648. }
  28649. /* ===========================================================================
  28650. * Scan a literal or distance tree to determine the frequencies of the codes
  28651. * in the bit length tree.
  28652. */
  28653. function scan_tree(s, tree, max_code)
  28654. // deflate_state *s;
  28655. // ct_data *tree; /* the tree to be scanned */
  28656. // int max_code; /* and its largest code of non zero frequency */
  28657. {
  28658. var n; /* iterates over all tree elements */
  28659. var prevlen = -1; /* last emitted length */
  28660. var curlen; /* length of current code */
  28661. var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */
  28662. var count = 0; /* repeat count of the current code */
  28663. var max_count = 7; /* max repeat count */
  28664. var min_count = 4; /* min repeat count */
  28665. if (nextlen === 0) {
  28666. max_count = 138;
  28667. min_count = 3;
  28668. }
  28669. tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */
  28670. for (n = 0; n <= max_code; n++) {
  28671. curlen = nextlen;
  28672. nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;
  28673. if (++count < max_count && curlen === nextlen) {
  28674. continue;
  28675. } else if (count < min_count) {
  28676. s.bl_tree[curlen * 2]/*.Freq*/ += count;
  28677. } else if (curlen !== 0) {
  28678. if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; }
  28679. s.bl_tree[REP_3_6 * 2]/*.Freq*/++;
  28680. } else if (count <= 10) {
  28681. s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++;
  28682. } else {
  28683. s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++;
  28684. }
  28685. count = 0;
  28686. prevlen = curlen;
  28687. if (nextlen === 0) {
  28688. max_count = 138;
  28689. min_count = 3;
  28690. } else if (curlen === nextlen) {
  28691. max_count = 6;
  28692. min_count = 3;
  28693. } else {
  28694. max_count = 7;
  28695. min_count = 4;
  28696. }
  28697. }
  28698. }
  28699. /* ===========================================================================
  28700. * Send a literal or distance tree in compressed form, using the codes in
  28701. * bl_tree.
  28702. */
  28703. function send_tree(s, tree, max_code)
  28704. // deflate_state *s;
  28705. // ct_data *tree; /* the tree to be scanned */
  28706. // int max_code; /* and its largest code of non zero frequency */
  28707. {
  28708. var n; /* iterates over all tree elements */
  28709. var prevlen = -1; /* last emitted length */
  28710. var curlen; /* length of current code */
  28711. var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */
  28712. var count = 0; /* repeat count of the current code */
  28713. var max_count = 7; /* max repeat count */
  28714. var min_count = 4; /* min repeat count */
  28715. /* tree[max_code+1].Len = -1; */ /* guard already set */
  28716. if (nextlen === 0) {
  28717. max_count = 138;
  28718. min_count = 3;
  28719. }
  28720. for (n = 0; n <= max_code; n++) {
  28721. curlen = nextlen;
  28722. nextlen = tree[(n + 1) * 2 + 1]/*.Len*/;
  28723. if (++count < max_count && curlen === nextlen) {
  28724. continue;
  28725. } else if (count < min_count) {
  28726. do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);
  28727. } else if (curlen !== 0) {
  28728. if (curlen !== prevlen) {
  28729. send_code(s, curlen, s.bl_tree);
  28730. count--;
  28731. }
  28732. //Assert(count >= 3 && count <= 6, " 3_6?");
  28733. send_code(s, REP_3_6, s.bl_tree);
  28734. send_bits(s, count - 3, 2);
  28735. } else if (count <= 10) {
  28736. send_code(s, REPZ_3_10, s.bl_tree);
  28737. send_bits(s, count - 3, 3);
  28738. } else {
  28739. send_code(s, REPZ_11_138, s.bl_tree);
  28740. send_bits(s, count - 11, 7);
  28741. }
  28742. count = 0;
  28743. prevlen = curlen;
  28744. if (nextlen === 0) {
  28745. max_count = 138;
  28746. min_count = 3;
  28747. } else if (curlen === nextlen) {
  28748. max_count = 6;
  28749. min_count = 3;
  28750. } else {
  28751. max_count = 7;
  28752. min_count = 4;
  28753. }
  28754. }
  28755. }
  28756. /* ===========================================================================
  28757. * Construct the Huffman tree for the bit lengths and return the index in
  28758. * bl_order of the last bit length code to send.
  28759. */
  28760. function build_bl_tree(s) {
  28761. var max_blindex; /* index of last bit length code of non zero freq */
  28762. /* Determine the bit length frequencies for literal and distance trees */
  28763. scan_tree(s, s.dyn_ltree, s.l_desc.max_code);
  28764. scan_tree(s, s.dyn_dtree, s.d_desc.max_code);
  28765. /* Build the bit length tree: */
  28766. build_tree(s, s.bl_desc);
  28767. /* opt_len now includes the length of the tree representations, except
  28768. * the lengths of the bit lengths codes and the 5+5+4 bits for the counts.
  28769. */
  28770. /* Determine the number of bit length codes to send. The pkzip format
  28771. * requires that at least 4 bit length codes be sent. (appnote.txt says
  28772. * 3 but the actual value used is 4.)
  28773. */
  28774. for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {
  28775. if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) {
  28776. break;
  28777. }
  28778. }
  28779. /* Update opt_len to include the bit length tree and counts */
  28780. s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4;
  28781. //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
  28782. // s->opt_len, s->static_len));
  28783. return max_blindex;
  28784. }
  28785. /* ===========================================================================
  28786. * Send the header for a block using dynamic Huffman trees: the counts, the
  28787. * lengths of the bit length codes, the literal tree and the distance tree.
  28788. * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4.
  28789. */
  28790. function send_all_trees(s, lcodes, dcodes, blcodes)
  28791. // deflate_state *s;
  28792. // int lcodes, dcodes, blcodes; /* number of codes for each tree */
  28793. {
  28794. var rank; /* index in bl_order */
  28795. //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes");
  28796. //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES,
  28797. // "too many codes");
  28798. //Tracev((stderr, "\nbl counts: "));
  28799. send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */
  28800. send_bits(s, dcodes - 1, 5);
  28801. send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */
  28802. for (rank = 0; rank < blcodes; rank++) {
  28803. //Tracev((stderr, "\nbl code %2d ", bl_order[rank]));
  28804. send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3);
  28805. }
  28806. //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
  28807. send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */
  28808. //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
  28809. send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */
  28810. //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
  28811. }
  28812. /* ===========================================================================
  28813. * Check if the data type is TEXT or BINARY, using the following algorithm:
  28814. * - TEXT if the two conditions below are satisfied:
  28815. * a) There are no non-portable control characters belonging to the
  28816. * "black list" (0..6, 14..25, 28..31).
  28817. * b) There is at least one printable character belonging to the
  28818. * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
  28819. * - BINARY otherwise.
  28820. * - The following partially-portable control characters form a
  28821. * "gray list" that is ignored in this detection algorithm:
  28822. * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
  28823. * IN assertion: the fields Freq of dyn_ltree are set.
  28824. */
  28825. function detect_data_type(s) {
  28826. /* black_mask is the bit mask of black-listed bytes
  28827. * set bits 0..6, 14..25, and 28..31
  28828. * 0xf3ffc07f = binary 11110011111111111100000001111111
  28829. */
  28830. var black_mask = 0xf3ffc07f;
  28831. var n;
  28832. /* Check for non-textual ("black-listed") bytes. */
  28833. for (n = 0; n <= 31; n++, black_mask >>>= 1) {
  28834. if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) {
  28835. return Z_BINARY;
  28836. }
  28837. }
  28838. /* Check for textual ("white-listed") bytes. */
  28839. if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 ||
  28840. s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) {
  28841. return Z_TEXT;
  28842. }
  28843. for (n = 32; n < LITERALS; n++) {
  28844. if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) {
  28845. return Z_TEXT;
  28846. }
  28847. }
  28848. /* There are no "black-listed" or "white-listed" bytes:
  28849. * this stream either is empty or has tolerated ("gray-listed") bytes only.
  28850. */
  28851. return Z_BINARY;
  28852. }
  28853. var static_init_done = false;
  28854. /* ===========================================================================
  28855. * Initialize the tree data structures for a new zlib stream.
  28856. */
  28857. function _tr_init(s)
  28858. {
  28859. if (!static_init_done) {
  28860. tr_static_init();
  28861. static_init_done = true;
  28862. }
  28863. s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc);
  28864. s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc);
  28865. s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc);
  28866. s.bi_buf = 0;
  28867. s.bi_valid = 0;
  28868. /* Initialize the first block of the first file: */
  28869. init_block(s);
  28870. }
  28871. /* ===========================================================================
  28872. * Send a stored block
  28873. */
  28874. function _tr_stored_block(s, buf, stored_len, last)
  28875. //DeflateState *s;
  28876. //charf *buf; /* input block */
  28877. //ulg stored_len; /* length of input block */
  28878. //int last; /* one if this is the last block for a file */
  28879. {
  28880. send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */
  28881. copy_block(s, buf, stored_len, true); /* with header */
  28882. }
  28883. /* ===========================================================================
  28884. * Send one empty static block to give enough lookahead for inflate.
  28885. * This takes 10 bits, of which 7 may remain in the bit buffer.
  28886. */
  28887. function _tr_align(s) {
  28888. send_bits(s, STATIC_TREES << 1, 3);
  28889. send_code(s, END_BLOCK, static_ltree);
  28890. bi_flush(s);
  28891. }
  28892. /* ===========================================================================
  28893. * Determine the best encoding for the current block: dynamic trees, static
  28894. * trees or store, and output the encoded block to the zip file.
  28895. */
  28896. function _tr_flush_block(s, buf, stored_len, last)
  28897. //DeflateState *s;
  28898. //charf *buf; /* input block, or NULL if too old */
  28899. //ulg stored_len; /* length of input block */
  28900. //int last; /* one if this is the last block for a file */
  28901. {
  28902. var opt_lenb, static_lenb; /* opt_len and static_len in bytes */
  28903. var max_blindex = 0; /* index of last bit length code of non zero freq */
  28904. /* Build the Huffman trees unless a stored block is forced */
  28905. if (s.level > 0) {
  28906. /* Check if the file is binary or text */
  28907. if (s.strm.data_type === Z_UNKNOWN) {
  28908. s.strm.data_type = detect_data_type(s);
  28909. }
  28910. /* Construct the literal and distance trees */
  28911. build_tree(s, s.l_desc);
  28912. // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
  28913. // s->static_len));
  28914. build_tree(s, s.d_desc);
  28915. // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
  28916. // s->static_len));
  28917. /* At this point, opt_len and static_len are the total bit lengths of
  28918. * the compressed block data, excluding the tree representations.
  28919. */
  28920. /* Build the bit length tree for the above two trees, and get the index
  28921. * in bl_order of the last bit length code to send.
  28922. */
  28923. max_blindex = build_bl_tree(s);
  28924. /* Determine the best encoding. Compute the block lengths in bytes. */
  28925. opt_lenb = (s.opt_len + 3 + 7) >>> 3;
  28926. static_lenb = (s.static_len + 3 + 7) >>> 3;
  28927. // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ",
  28928. // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
  28929. // s->last_lit));
  28930. if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; }
  28931. } else {
  28932. // Assert(buf != (char*)0, "lost buf");
  28933. opt_lenb = static_lenb = stored_len + 5; /* force a stored block */
  28934. }
  28935. if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {
  28936. /* 4: two words for the lengths */
  28937. /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE.
  28938. * Otherwise we can't have processed more than WSIZE input bytes since
  28939. * the last block flush, because compression would have been
  28940. * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
  28941. * transform a block into a stored block.
  28942. */
  28943. _tr_stored_block(s, buf, stored_len, last);
  28944. } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) {
  28945. send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3);
  28946. compress_block(s, static_ltree, static_dtree);
  28947. } else {
  28948. send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3);
  28949. send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1);
  28950. compress_block(s, s.dyn_ltree, s.dyn_dtree);
  28951. }
  28952. // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
  28953. /* The above check is made mod 2^32, for files larger than 512 MB
  28954. * and uLong implemented on 32 bits.
  28955. */
  28956. init_block(s);
  28957. if (last) {
  28958. bi_windup(s);
  28959. }
  28960. // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
  28961. // s->compressed_len-7*last));
  28962. }
  28963. /* ===========================================================================
  28964. * Save the match info and tally the frequency counts. Return true if
  28965. * the current block must be flushed.
  28966. */
  28967. function _tr_tally(s, dist, lc)
  28968. // deflate_state *s;
  28969. // unsigned dist; /* distance of matched string */
  28970. // unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
  28971. {
  28972. //var out_length, in_length, dcode;
  28973. s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff;
  28974. s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff;
  28975. s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff;
  28976. s.last_lit++;
  28977. if (dist === 0) {
  28978. /* lc is the unmatched char */
  28979. s.dyn_ltree[lc * 2]/*.Freq*/++;
  28980. } else {
  28981. s.matches++;
  28982. /* Here, lc is the match length - MIN_MATCH */
  28983. dist--; /* dist = match distance - 1 */
  28984. //Assert((ush)dist < (ush)MAX_DIST(s) &&
  28985. // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
  28986. // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match");
  28987. s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++;
  28988. s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++;
  28989. }
  28990. // (!) This block is disabled in zlib defaults,
  28991. // don't enable it for binary compatibility
  28992. //#ifdef TRUNCATE_BLOCK
  28993. // /* Try to guess if it is profitable to stop the current block here */
  28994. // if ((s.last_lit & 0x1fff) === 0 && s.level > 2) {
  28995. // /* Compute an upper bound for the compressed length */
  28996. // out_length = s.last_lit*8;
  28997. // in_length = s.strstart - s.block_start;
  28998. //
  28999. // for (dcode = 0; dcode < D_CODES; dcode++) {
  29000. // out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]);
  29001. // }
  29002. // out_length >>>= 3;
  29003. // //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
  29004. // // s->last_lit, in_length, out_length,
  29005. // // 100L - out_length*100L/in_length));
  29006. // if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) {
  29007. // return true;
  29008. // }
  29009. // }
  29010. //#endif
  29011. return (s.last_lit === s.lit_bufsize - 1);
  29012. /* We avoid equality with lit_bufsize because of wraparound at 64K
  29013. * on 16 bit machines and because stored blocks are restricted to
  29014. * 64K-1 bytes.
  29015. */
  29016. }
  29017. exports._tr_init = _tr_init;
  29018. exports._tr_stored_block = _tr_stored_block;
  29019. exports._tr_flush_block = _tr_flush_block;
  29020. exports._tr_tally = _tr_tally;
  29021. exports._tr_align = _tr_align;
  29022. /***/ }),
  29023. /***/ 4860:
  29024. /***/ (function(module) {
  29025. "use strict";
  29026. // (C) 1995-2013 Jean-loup Gailly and Mark Adler
  29027. // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
  29028. //
  29029. // This software is provided 'as-is', without any express or implied
  29030. // warranty. In no event will the authors be held liable for any damages
  29031. // arising from the use of this software.
  29032. //
  29033. // Permission is granted to anyone to use this software for any purpose,
  29034. // including commercial applications, and to alter it and redistribute it
  29035. // freely, subject to the following restrictions:
  29036. //
  29037. // 1. The origin of this software must not be misrepresented; you must not
  29038. // claim that you wrote the original software. If you use this software
  29039. // in a product, an acknowledgment in the product documentation would be
  29040. // appreciated but is not required.
  29041. // 2. Altered source versions must be plainly marked as such, and must not be
  29042. // misrepresented as being the original software.
  29043. // 3. This notice may not be removed or altered from any source distribution.
  29044. function ZStream() {
  29045. /* next input byte */
  29046. this.input = null; // JS specific, because we have no pointers
  29047. this.next_in = 0;
  29048. /* number of bytes available at input */
  29049. this.avail_in = 0;
  29050. /* total number of input bytes read so far */
  29051. this.total_in = 0;
  29052. /* next output byte should be put there */
  29053. this.output = null; // JS specific, because we have no pointers
  29054. this.next_out = 0;
  29055. /* remaining free space at output */
  29056. this.avail_out = 0;
  29057. /* total number of bytes output so far */
  29058. this.total_out = 0;
  29059. /* last error message, NULL if no error */
  29060. this.msg = ''/*Z_NULL*/;
  29061. /* not visible by applications */
  29062. this.state = null;
  29063. /* best guess about the data type: binary or text */
  29064. this.data_type = 2/*Z_UNKNOWN*/;
  29065. /* adler32 value of the uncompressed data */
  29066. this.adler = 0;
  29067. }
  29068. module.exports = ZStream;
  29069. /***/ }),
  29070. /***/ 1924:
  29071. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29072. "use strict";
  29073. var GetIntrinsic = __webpack_require__(210);
  29074. var callBind = __webpack_require__(5559);
  29075. var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
  29076. module.exports = function callBoundIntrinsic(name, allowMissing) {
  29077. var intrinsic = GetIntrinsic(name, !!allowMissing);
  29078. if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
  29079. return callBind(intrinsic);
  29080. }
  29081. return intrinsic;
  29082. };
  29083. /***/ }),
  29084. /***/ 5559:
  29085. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29086. "use strict";
  29087. var bind = __webpack_require__(8612);
  29088. var GetIntrinsic = __webpack_require__(210);
  29089. var $apply = GetIntrinsic('%Function.prototype.apply%');
  29090. var $call = GetIntrinsic('%Function.prototype.call%');
  29091. var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
  29092. var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
  29093. var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
  29094. var $max = GetIntrinsic('%Math.max%');
  29095. if ($defineProperty) {
  29096. try {
  29097. $defineProperty({}, 'a', { value: 1 });
  29098. } catch (e) {
  29099. // IE 8 has a broken defineProperty
  29100. $defineProperty = null;
  29101. }
  29102. }
  29103. module.exports = function callBind(originalFunction) {
  29104. var func = $reflectApply(bind, $call, arguments);
  29105. if ($gOPD && $defineProperty) {
  29106. var desc = $gOPD(func, 'length');
  29107. if (desc.configurable) {
  29108. // original length, plus the receiver, minus any additional arguments (after the receiver)
  29109. $defineProperty(
  29110. func,
  29111. 'length',
  29112. { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
  29113. );
  29114. }
  29115. }
  29116. return func;
  29117. };
  29118. var applyBind = function applyBind() {
  29119. return $reflectApply(bind, $apply, arguments);
  29120. };
  29121. if ($defineProperty) {
  29122. $defineProperty(module.exports, 'apply', { value: applyBind });
  29123. } else {
  29124. module.exports.apply = applyBind;
  29125. }
  29126. /***/ }),
  29127. /***/ 6313:
  29128. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29129. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  29130. var clone = (function() {
  29131. 'use strict';
  29132. /**
  29133. * Clones (copies) an Object using deep copying.
  29134. *
  29135. * This function supports circular references by default, but if you are certain
  29136. * there are no circular references in your object, you can save some CPU time
  29137. * by calling clone(obj, false).
  29138. *
  29139. * Caution: if `circular` is false and `parent` contains circular references,
  29140. * your program may enter an infinite loop and crash.
  29141. *
  29142. * @param `parent` - the object to be cloned
  29143. * @param `circular` - set to true if the object to be cloned may contain
  29144. * circular references. (optional - true by default)
  29145. * @param `depth` - set to a number if the object is only to be cloned to
  29146. * a particular depth. (optional - defaults to Infinity)
  29147. * @param `prototype` - sets the prototype to be used when cloning an object.
  29148. * (optional - defaults to parent prototype).
  29149. */
  29150. function clone(parent, circular, depth, prototype) {
  29151. var filter;
  29152. if (typeof circular === 'object') {
  29153. depth = circular.depth;
  29154. prototype = circular.prototype;
  29155. filter = circular.filter;
  29156. circular = circular.circular
  29157. }
  29158. // maintain two arrays for circular references, where corresponding parents
  29159. // and children have the same index
  29160. var allParents = [];
  29161. var allChildren = [];
  29162. var useBuffer = typeof Buffer != 'undefined';
  29163. if (typeof circular == 'undefined')
  29164. circular = true;
  29165. if (typeof depth == 'undefined')
  29166. depth = Infinity;
  29167. // recurse this function so we don't reset allParents and allChildren
  29168. function _clone(parent, depth) {
  29169. // cloning null always returns null
  29170. if (parent === null)
  29171. return null;
  29172. if (depth == 0)
  29173. return parent;
  29174. var child;
  29175. var proto;
  29176. if (typeof parent != 'object') {
  29177. return parent;
  29178. }
  29179. if (clone.__isArray(parent)) {
  29180. child = [];
  29181. } else if (clone.__isRegExp(parent)) {
  29182. child = new RegExp(parent.source, __getRegExpFlags(parent));
  29183. if (parent.lastIndex) child.lastIndex = parent.lastIndex;
  29184. } else if (clone.__isDate(parent)) {
  29185. child = new Date(parent.getTime());
  29186. } else if (useBuffer && Buffer.isBuffer(parent)) {
  29187. if (Buffer.allocUnsafe) {
  29188. // Node.js >= 4.5.0
  29189. child = Buffer.allocUnsafe(parent.length);
  29190. } else {
  29191. // Older Node.js versions
  29192. child = new Buffer(parent.length);
  29193. }
  29194. parent.copy(child);
  29195. return child;
  29196. } else {
  29197. if (typeof prototype == 'undefined') {
  29198. proto = Object.getPrototypeOf(parent);
  29199. child = Object.create(proto);
  29200. }
  29201. else {
  29202. child = Object.create(prototype);
  29203. proto = prototype;
  29204. }
  29205. }
  29206. if (circular) {
  29207. var index = allParents.indexOf(parent);
  29208. if (index != -1) {
  29209. return allChildren[index];
  29210. }
  29211. allParents.push(parent);
  29212. allChildren.push(child);
  29213. }
  29214. for (var i in parent) {
  29215. var attrs;
  29216. if (proto) {
  29217. attrs = Object.getOwnPropertyDescriptor(proto, i);
  29218. }
  29219. if (attrs && attrs.set == null) {
  29220. continue;
  29221. }
  29222. child[i] = _clone(parent[i], depth - 1);
  29223. }
  29224. return child;
  29225. }
  29226. return _clone(parent, depth);
  29227. }
  29228. /**
  29229. * Simple flat clone using prototype, accepts only objects, usefull for property
  29230. * override on FLAT configuration object (no nested props).
  29231. *
  29232. * USE WITH CAUTION! This may not behave as you wish if you do not know how this
  29233. * works.
  29234. */
  29235. clone.clonePrototype = function clonePrototype(parent) {
  29236. if (parent === null)
  29237. return null;
  29238. var c = function () {};
  29239. c.prototype = parent;
  29240. return new c();
  29241. };
  29242. // private utility functions
  29243. function __objToStr(o) {
  29244. return Object.prototype.toString.call(o);
  29245. };
  29246. clone.__objToStr = __objToStr;
  29247. function __isDate(o) {
  29248. return typeof o === 'object' && __objToStr(o) === '[object Date]';
  29249. };
  29250. clone.__isDate = __isDate;
  29251. function __isArray(o) {
  29252. return typeof o === 'object' && __objToStr(o) === '[object Array]';
  29253. };
  29254. clone.__isArray = __isArray;
  29255. function __isRegExp(o) {
  29256. return typeof o === 'object' && __objToStr(o) === '[object RegExp]';
  29257. };
  29258. clone.__isRegExp = __isRegExp;
  29259. function __getRegExpFlags(re) {
  29260. var flags = '';
  29261. if (re.global) flags += 'g';
  29262. if (re.ignoreCase) flags += 'i';
  29263. if (re.multiline) flags += 'm';
  29264. return flags;
  29265. };
  29266. clone.__getRegExpFlags = __getRegExpFlags;
  29267. return clone;
  29268. })();
  29269. if ( true && module.exports) {
  29270. module.exports = clone;
  29271. }
  29272. /***/ }),
  29273. /***/ 4667:
  29274. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29275. __webpack_require__(2479);
  29276. var path = __webpack_require__(857);
  29277. module.exports = path.Object.values;
  29278. /***/ }),
  29279. /***/ 7633:
  29280. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29281. __webpack_require__(9170);
  29282. __webpack_require__(6992);
  29283. __webpack_require__(1539);
  29284. __webpack_require__(8674);
  29285. __webpack_require__(7922);
  29286. __webpack_require__(4668);
  29287. __webpack_require__(7727);
  29288. __webpack_require__(8783);
  29289. var path = __webpack_require__(857);
  29290. module.exports = path.Promise;
  29291. /***/ }),
  29292. /***/ 3867:
  29293. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29294. var parent = __webpack_require__(1150);
  29295. __webpack_require__(8628);
  29296. // TODO: Remove from `core-js@4`
  29297. __webpack_require__(7314);
  29298. __webpack_require__(7479);
  29299. __webpack_require__(6290);
  29300. module.exports = parent;
  29301. /***/ }),
  29302. /***/ 9662:
  29303. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29304. var global = __webpack_require__(7854);
  29305. var isCallable = __webpack_require__(614);
  29306. var tryToString = __webpack_require__(6330);
  29307. var TypeError = global.TypeError;
  29308. // `Assert: IsCallable(argument) is true`
  29309. module.exports = function (argument) {
  29310. if (isCallable(argument)) return argument;
  29311. throw TypeError(tryToString(argument) + ' is not a function');
  29312. };
  29313. /***/ }),
  29314. /***/ 9483:
  29315. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29316. var global = __webpack_require__(7854);
  29317. var isConstructor = __webpack_require__(4411);
  29318. var tryToString = __webpack_require__(6330);
  29319. var TypeError = global.TypeError;
  29320. // `Assert: IsConstructor(argument) is true`
  29321. module.exports = function (argument) {
  29322. if (isConstructor(argument)) return argument;
  29323. throw TypeError(tryToString(argument) + ' is not a constructor');
  29324. };
  29325. /***/ }),
  29326. /***/ 6077:
  29327. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29328. var global = __webpack_require__(7854);
  29329. var isCallable = __webpack_require__(614);
  29330. var String = global.String;
  29331. var TypeError = global.TypeError;
  29332. module.exports = function (argument) {
  29333. if (typeof argument == 'object' || isCallable(argument)) return argument;
  29334. throw TypeError("Can't set " + String(argument) + ' as a prototype');
  29335. };
  29336. /***/ }),
  29337. /***/ 1223:
  29338. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29339. var wellKnownSymbol = __webpack_require__(5112);
  29340. var create = __webpack_require__(30);
  29341. var definePropertyModule = __webpack_require__(3070);
  29342. var UNSCOPABLES = wellKnownSymbol('unscopables');
  29343. var ArrayPrototype = Array.prototype;
  29344. // Array.prototype[@@unscopables]
  29345. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  29346. if (ArrayPrototype[UNSCOPABLES] == undefined) {
  29347. definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
  29348. configurable: true,
  29349. value: create(null)
  29350. });
  29351. }
  29352. // add a key to Array.prototype[@@unscopables]
  29353. module.exports = function (key) {
  29354. ArrayPrototype[UNSCOPABLES][key] = true;
  29355. };
  29356. /***/ }),
  29357. /***/ 1530:
  29358. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29359. "use strict";
  29360. var charAt = (__webpack_require__(8710).charAt);
  29361. // `AdvanceStringIndex` abstract operation
  29362. // https://tc39.es/ecma262/#sec-advancestringindex
  29363. module.exports = function (S, index, unicode) {
  29364. return index + (unicode ? charAt(S, index).length : 1);
  29365. };
  29366. /***/ }),
  29367. /***/ 5787:
  29368. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29369. var global = __webpack_require__(7854);
  29370. var isPrototypeOf = __webpack_require__(7976);
  29371. var TypeError = global.TypeError;
  29372. module.exports = function (it, Prototype) {
  29373. if (isPrototypeOf(Prototype, it)) return it;
  29374. throw TypeError('Incorrect invocation');
  29375. };
  29376. /***/ }),
  29377. /***/ 9670:
  29378. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29379. var global = __webpack_require__(7854);
  29380. var isObject = __webpack_require__(111);
  29381. var String = global.String;
  29382. var TypeError = global.TypeError;
  29383. // `Assert: Type(argument) is Object`
  29384. module.exports = function (argument) {
  29385. if (isObject(argument)) return argument;
  29386. throw TypeError(String(argument) + ' is not an object');
  29387. };
  29388. /***/ }),
  29389. /***/ 1048:
  29390. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29391. "use strict";
  29392. var toObject = __webpack_require__(7908);
  29393. var toAbsoluteIndex = __webpack_require__(1400);
  29394. var lengthOfArrayLike = __webpack_require__(6244);
  29395. var min = Math.min;
  29396. // `Array.prototype.copyWithin` method implementation
  29397. // https://tc39.es/ecma262/#sec-array.prototype.copywithin
  29398. // eslint-disable-next-line es/no-array-prototype-copywithin -- safe
  29399. module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
  29400. var O = toObject(this);
  29401. var len = lengthOfArrayLike(O);
  29402. var to = toAbsoluteIndex(target, len);
  29403. var from = toAbsoluteIndex(start, len);
  29404. var end = arguments.length > 2 ? arguments[2] : undefined;
  29405. var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
  29406. var inc = 1;
  29407. if (from < to && to < from + count) {
  29408. inc = -1;
  29409. from += count - 1;
  29410. to += count - 1;
  29411. }
  29412. while (count-- > 0) {
  29413. if (from in O) O[to] = O[from];
  29414. else delete O[to];
  29415. to += inc;
  29416. from += inc;
  29417. } return O;
  29418. };
  29419. /***/ }),
  29420. /***/ 1285:
  29421. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29422. "use strict";
  29423. var toObject = __webpack_require__(7908);
  29424. var toAbsoluteIndex = __webpack_require__(1400);
  29425. var lengthOfArrayLike = __webpack_require__(6244);
  29426. // `Array.prototype.fill` method implementation
  29427. // https://tc39.es/ecma262/#sec-array.prototype.fill
  29428. module.exports = function fill(value /* , start = 0, end = @length */) {
  29429. var O = toObject(this);
  29430. var length = lengthOfArrayLike(O);
  29431. var argumentsLength = arguments.length;
  29432. var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
  29433. var end = argumentsLength > 2 ? arguments[2] : undefined;
  29434. var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
  29435. while (endPos > index) O[index++] = value;
  29436. return O;
  29437. };
  29438. /***/ }),
  29439. /***/ 8533:
  29440. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29441. "use strict";
  29442. var $forEach = (__webpack_require__(2092).forEach);
  29443. var arrayMethodIsStrict = __webpack_require__(9341);
  29444. var STRICT_METHOD = arrayMethodIsStrict('forEach');
  29445. // `Array.prototype.forEach` method implementation
  29446. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  29447. module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
  29448. return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  29449. // eslint-disable-next-line es/no-array-prototype-foreach -- safe
  29450. } : [].forEach;
  29451. /***/ }),
  29452. /***/ 7745:
  29453. /***/ (function(module) {
  29454. module.exports = function (Constructor, list) {
  29455. var index = 0;
  29456. var length = list.length;
  29457. var result = new Constructor(length);
  29458. while (length > index) result[index] = list[index++];
  29459. return result;
  29460. };
  29461. /***/ }),
  29462. /***/ 8457:
  29463. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29464. "use strict";
  29465. var global = __webpack_require__(7854);
  29466. var bind = __webpack_require__(9974);
  29467. var call = __webpack_require__(6916);
  29468. var toObject = __webpack_require__(7908);
  29469. var callWithSafeIterationClosing = __webpack_require__(3411);
  29470. var isArrayIteratorMethod = __webpack_require__(7659);
  29471. var isConstructor = __webpack_require__(4411);
  29472. var lengthOfArrayLike = __webpack_require__(6244);
  29473. var createProperty = __webpack_require__(6135);
  29474. var getIterator = __webpack_require__(8554);
  29475. var getIteratorMethod = __webpack_require__(1246);
  29476. var Array = global.Array;
  29477. // `Array.from` method implementation
  29478. // https://tc39.es/ecma262/#sec-array.from
  29479. module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
  29480. var O = toObject(arrayLike);
  29481. var IS_CONSTRUCTOR = isConstructor(this);
  29482. var argumentsLength = arguments.length;
  29483. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  29484. var mapping = mapfn !== undefined;
  29485. if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
  29486. var iteratorMethod = getIteratorMethod(O);
  29487. var index = 0;
  29488. var length, result, step, iterator, next, value;
  29489. // if the target is not iterable or it's an array with the default iterator - use a simple case
  29490. if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {
  29491. iterator = getIterator(O, iteratorMethod);
  29492. next = iterator.next;
  29493. result = IS_CONSTRUCTOR ? new this() : [];
  29494. for (;!(step = call(next, iterator)).done; index++) {
  29495. value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
  29496. createProperty(result, index, value);
  29497. }
  29498. } else {
  29499. length = lengthOfArrayLike(O);
  29500. result = IS_CONSTRUCTOR ? new this(length) : Array(length);
  29501. for (;length > index; index++) {
  29502. value = mapping ? mapfn(O[index], index) : O[index];
  29503. createProperty(result, index, value);
  29504. }
  29505. }
  29506. result.length = index;
  29507. return result;
  29508. };
  29509. /***/ }),
  29510. /***/ 1318:
  29511. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29512. var toIndexedObject = __webpack_require__(5656);
  29513. var toAbsoluteIndex = __webpack_require__(1400);
  29514. var lengthOfArrayLike = __webpack_require__(6244);
  29515. // `Array.prototype.{ indexOf, includes }` methods implementation
  29516. var createMethod = function (IS_INCLUDES) {
  29517. return function ($this, el, fromIndex) {
  29518. var O = toIndexedObject($this);
  29519. var length = lengthOfArrayLike(O);
  29520. var index = toAbsoluteIndex(fromIndex, length);
  29521. var value;
  29522. // Array#includes uses SameValueZero equality algorithm
  29523. // eslint-disable-next-line no-self-compare -- NaN check
  29524. if (IS_INCLUDES && el != el) while (length > index) {
  29525. value = O[index++];
  29526. // eslint-disable-next-line no-self-compare -- NaN check
  29527. if (value != value) return true;
  29528. // Array#indexOf ignores holes, Array#includes - not
  29529. } else for (;length > index; index++) {
  29530. if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
  29531. } return !IS_INCLUDES && -1;
  29532. };
  29533. };
  29534. module.exports = {
  29535. // `Array.prototype.includes` method
  29536. // https://tc39.es/ecma262/#sec-array.prototype.includes
  29537. includes: createMethod(true),
  29538. // `Array.prototype.indexOf` method
  29539. // https://tc39.es/ecma262/#sec-array.prototype.indexof
  29540. indexOf: createMethod(false)
  29541. };
  29542. /***/ }),
  29543. /***/ 2092:
  29544. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29545. var bind = __webpack_require__(9974);
  29546. var uncurryThis = __webpack_require__(1702);
  29547. var IndexedObject = __webpack_require__(8361);
  29548. var toObject = __webpack_require__(7908);
  29549. var lengthOfArrayLike = __webpack_require__(6244);
  29550. var arraySpeciesCreate = __webpack_require__(5417);
  29551. var push = uncurryThis([].push);
  29552. // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
  29553. var createMethod = function (TYPE) {
  29554. var IS_MAP = TYPE == 1;
  29555. var IS_FILTER = TYPE == 2;
  29556. var IS_SOME = TYPE == 3;
  29557. var IS_EVERY = TYPE == 4;
  29558. var IS_FIND_INDEX = TYPE == 6;
  29559. var IS_FILTER_REJECT = TYPE == 7;
  29560. var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
  29561. return function ($this, callbackfn, that, specificCreate) {
  29562. var O = toObject($this);
  29563. var self = IndexedObject(O);
  29564. var boundFunction = bind(callbackfn, that);
  29565. var length = lengthOfArrayLike(self);
  29566. var index = 0;
  29567. var create = specificCreate || arraySpeciesCreate;
  29568. var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
  29569. var value, result;
  29570. for (;length > index; index++) if (NO_HOLES || index in self) {
  29571. value = self[index];
  29572. result = boundFunction(value, index, O);
  29573. if (TYPE) {
  29574. if (IS_MAP) target[index] = result; // map
  29575. else if (result) switch (TYPE) {
  29576. case 3: return true; // some
  29577. case 5: return value; // find
  29578. case 6: return index; // findIndex
  29579. case 2: push(target, value); // filter
  29580. } else switch (TYPE) {
  29581. case 4: return false; // every
  29582. case 7: push(target, value); // filterReject
  29583. }
  29584. }
  29585. }
  29586. return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
  29587. };
  29588. };
  29589. module.exports = {
  29590. // `Array.prototype.forEach` method
  29591. // https://tc39.es/ecma262/#sec-array.prototype.foreach
  29592. forEach: createMethod(0),
  29593. // `Array.prototype.map` method
  29594. // https://tc39.es/ecma262/#sec-array.prototype.map
  29595. map: createMethod(1),
  29596. // `Array.prototype.filter` method
  29597. // https://tc39.es/ecma262/#sec-array.prototype.filter
  29598. filter: createMethod(2),
  29599. // `Array.prototype.some` method
  29600. // https://tc39.es/ecma262/#sec-array.prototype.some
  29601. some: createMethod(3),
  29602. // `Array.prototype.every` method
  29603. // https://tc39.es/ecma262/#sec-array.prototype.every
  29604. every: createMethod(4),
  29605. // `Array.prototype.find` method
  29606. // https://tc39.es/ecma262/#sec-array.prototype.find
  29607. find: createMethod(5),
  29608. // `Array.prototype.findIndex` method
  29609. // https://tc39.es/ecma262/#sec-array.prototype.findIndex
  29610. findIndex: createMethod(6),
  29611. // `Array.prototype.filterReject` method
  29612. // https://github.com/tc39/proposal-array-filtering
  29613. filterReject: createMethod(7)
  29614. };
  29615. /***/ }),
  29616. /***/ 6583:
  29617. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29618. "use strict";
  29619. /* eslint-disable es/no-array-prototype-lastindexof -- safe */
  29620. var apply = __webpack_require__(2104);
  29621. var toIndexedObject = __webpack_require__(5656);
  29622. var toIntegerOrInfinity = __webpack_require__(9303);
  29623. var lengthOfArrayLike = __webpack_require__(6244);
  29624. var arrayMethodIsStrict = __webpack_require__(9341);
  29625. var min = Math.min;
  29626. var $lastIndexOf = [].lastIndexOf;
  29627. var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
  29628. var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
  29629. var FORCED = NEGATIVE_ZERO || !STRICT_METHOD;
  29630. // `Array.prototype.lastIndexOf` method implementation
  29631. // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
  29632. module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
  29633. // convert -0 to +0
  29634. if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0;
  29635. var O = toIndexedObject(this);
  29636. var length = lengthOfArrayLike(O);
  29637. var index = length - 1;
  29638. if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1]));
  29639. if (index < 0) index = length + index;
  29640. for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
  29641. return -1;
  29642. } : $lastIndexOf;
  29643. /***/ }),
  29644. /***/ 1194:
  29645. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29646. var fails = __webpack_require__(7293);
  29647. var wellKnownSymbol = __webpack_require__(5112);
  29648. var V8_VERSION = __webpack_require__(7392);
  29649. var SPECIES = wellKnownSymbol('species');
  29650. module.exports = function (METHOD_NAME) {
  29651. // We can't use this feature detection in V8 since it causes
  29652. // deoptimization and serious performance degradation
  29653. // https://github.com/zloirock/core-js/issues/677
  29654. return V8_VERSION >= 51 || !fails(function () {
  29655. var array = [];
  29656. var constructor = array.constructor = {};
  29657. constructor[SPECIES] = function () {
  29658. return { foo: 1 };
  29659. };
  29660. return array[METHOD_NAME](Boolean).foo !== 1;
  29661. });
  29662. };
  29663. /***/ }),
  29664. /***/ 9341:
  29665. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29666. "use strict";
  29667. var fails = __webpack_require__(7293);
  29668. module.exports = function (METHOD_NAME, argument) {
  29669. var method = [][METHOD_NAME];
  29670. return !!method && fails(function () {
  29671. // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
  29672. method.call(null, argument || function () { throw 1; }, 1);
  29673. });
  29674. };
  29675. /***/ }),
  29676. /***/ 3671:
  29677. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29678. var global = __webpack_require__(7854);
  29679. var aCallable = __webpack_require__(9662);
  29680. var toObject = __webpack_require__(7908);
  29681. var IndexedObject = __webpack_require__(8361);
  29682. var lengthOfArrayLike = __webpack_require__(6244);
  29683. var TypeError = global.TypeError;
  29684. // `Array.prototype.{ reduce, reduceRight }` methods implementation
  29685. var createMethod = function (IS_RIGHT) {
  29686. return function (that, callbackfn, argumentsLength, memo) {
  29687. aCallable(callbackfn);
  29688. var O = toObject(that);
  29689. var self = IndexedObject(O);
  29690. var length = lengthOfArrayLike(O);
  29691. var index = IS_RIGHT ? length - 1 : 0;
  29692. var i = IS_RIGHT ? -1 : 1;
  29693. if (argumentsLength < 2) while (true) {
  29694. if (index in self) {
  29695. memo = self[index];
  29696. index += i;
  29697. break;
  29698. }
  29699. index += i;
  29700. if (IS_RIGHT ? index < 0 : length <= index) {
  29701. throw TypeError('Reduce of empty array with no initial value');
  29702. }
  29703. }
  29704. for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
  29705. memo = callbackfn(memo, self[index], index, O);
  29706. }
  29707. return memo;
  29708. };
  29709. };
  29710. module.exports = {
  29711. // `Array.prototype.reduce` method
  29712. // https://tc39.es/ecma262/#sec-array.prototype.reduce
  29713. left: createMethod(false),
  29714. // `Array.prototype.reduceRight` method
  29715. // https://tc39.es/ecma262/#sec-array.prototype.reduceright
  29716. right: createMethod(true)
  29717. };
  29718. /***/ }),
  29719. /***/ 206:
  29720. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29721. var uncurryThis = __webpack_require__(1702);
  29722. module.exports = uncurryThis([].slice);
  29723. /***/ }),
  29724. /***/ 4362:
  29725. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29726. var arraySlice = __webpack_require__(206);
  29727. var floor = Math.floor;
  29728. var mergeSort = function (array, comparefn) {
  29729. var length = array.length;
  29730. var middle = floor(length / 2);
  29731. return length < 8 ? insertionSort(array, comparefn) : merge(
  29732. array,
  29733. mergeSort(arraySlice(array, 0, middle), comparefn),
  29734. mergeSort(arraySlice(array, middle), comparefn),
  29735. comparefn
  29736. );
  29737. };
  29738. var insertionSort = function (array, comparefn) {
  29739. var length = array.length;
  29740. var i = 1;
  29741. var element, j;
  29742. while (i < length) {
  29743. j = i;
  29744. element = array[i];
  29745. while (j && comparefn(array[j - 1], element) > 0) {
  29746. array[j] = array[--j];
  29747. }
  29748. if (j !== i++) array[j] = element;
  29749. } return array;
  29750. };
  29751. var merge = function (array, left, right, comparefn) {
  29752. var llength = left.length;
  29753. var rlength = right.length;
  29754. var lindex = 0;
  29755. var rindex = 0;
  29756. while (lindex < llength || rindex < rlength) {
  29757. array[lindex + rindex] = (lindex < llength && rindex < rlength)
  29758. ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
  29759. : lindex < llength ? left[lindex++] : right[rindex++];
  29760. } return array;
  29761. };
  29762. module.exports = mergeSort;
  29763. /***/ }),
  29764. /***/ 7475:
  29765. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29766. var global = __webpack_require__(7854);
  29767. var isArray = __webpack_require__(3157);
  29768. var isConstructor = __webpack_require__(4411);
  29769. var isObject = __webpack_require__(111);
  29770. var wellKnownSymbol = __webpack_require__(5112);
  29771. var SPECIES = wellKnownSymbol('species');
  29772. var Array = global.Array;
  29773. // a part of `ArraySpeciesCreate` abstract operation
  29774. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  29775. module.exports = function (originalArray) {
  29776. var C;
  29777. if (isArray(originalArray)) {
  29778. C = originalArray.constructor;
  29779. // cross-realm fallback
  29780. if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined;
  29781. else if (isObject(C)) {
  29782. C = C[SPECIES];
  29783. if (C === null) C = undefined;
  29784. }
  29785. } return C === undefined ? Array : C;
  29786. };
  29787. /***/ }),
  29788. /***/ 5417:
  29789. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29790. var arraySpeciesConstructor = __webpack_require__(7475);
  29791. // `ArraySpeciesCreate` abstract operation
  29792. // https://tc39.es/ecma262/#sec-arrayspeciescreate
  29793. module.exports = function (originalArray, length) {
  29794. return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
  29795. };
  29796. /***/ }),
  29797. /***/ 3411:
  29798. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29799. var anObject = __webpack_require__(9670);
  29800. var iteratorClose = __webpack_require__(9212);
  29801. // call something on iterator step with safe closing on error
  29802. module.exports = function (iterator, fn, value, ENTRIES) {
  29803. try {
  29804. return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
  29805. } catch (error) {
  29806. iteratorClose(iterator, 'throw', error);
  29807. }
  29808. };
  29809. /***/ }),
  29810. /***/ 7072:
  29811. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29812. var wellKnownSymbol = __webpack_require__(5112);
  29813. var ITERATOR = wellKnownSymbol('iterator');
  29814. var SAFE_CLOSING = false;
  29815. try {
  29816. var called = 0;
  29817. var iteratorWithReturn = {
  29818. next: function () {
  29819. return { done: !!called++ };
  29820. },
  29821. 'return': function () {
  29822. SAFE_CLOSING = true;
  29823. }
  29824. };
  29825. iteratorWithReturn[ITERATOR] = function () {
  29826. return this;
  29827. };
  29828. // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
  29829. Array.from(iteratorWithReturn, function () { throw 2; });
  29830. } catch (error) { /* empty */ }
  29831. module.exports = function (exec, SKIP_CLOSING) {
  29832. if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
  29833. var ITERATION_SUPPORT = false;
  29834. try {
  29835. var object = {};
  29836. object[ITERATOR] = function () {
  29837. return {
  29838. next: function () {
  29839. return { done: ITERATION_SUPPORT = true };
  29840. }
  29841. };
  29842. };
  29843. exec(object);
  29844. } catch (error) { /* empty */ }
  29845. return ITERATION_SUPPORT;
  29846. };
  29847. /***/ }),
  29848. /***/ 4326:
  29849. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29850. var uncurryThis = __webpack_require__(1702);
  29851. var toString = uncurryThis({}.toString);
  29852. var stringSlice = uncurryThis(''.slice);
  29853. module.exports = function (it) {
  29854. return stringSlice(toString(it), 8, -1);
  29855. };
  29856. /***/ }),
  29857. /***/ 648:
  29858. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29859. var global = __webpack_require__(7854);
  29860. var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
  29861. var isCallable = __webpack_require__(614);
  29862. var classofRaw = __webpack_require__(4326);
  29863. var wellKnownSymbol = __webpack_require__(5112);
  29864. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  29865. var Object = global.Object;
  29866. // ES3 wrong here
  29867. var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
  29868. // fallback for IE11 Script Access Denied error
  29869. var tryGet = function (it, key) {
  29870. try {
  29871. return it[key];
  29872. } catch (error) { /* empty */ }
  29873. };
  29874. // getting tag from ES6+ `Object.prototype.toString`
  29875. module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
  29876. var O, tag, result;
  29877. return it === undefined ? 'Undefined' : it === null ? 'Null'
  29878. // @@toStringTag case
  29879. : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
  29880. // builtinTag case
  29881. : CORRECT_ARGUMENTS ? classofRaw(O)
  29882. // ES3 arguments fallback
  29883. : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
  29884. };
  29885. /***/ }),
  29886. /***/ 7741:
  29887. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29888. var uncurryThis = __webpack_require__(1702);
  29889. var arraySlice = __webpack_require__(206);
  29890. var replace = uncurryThis(''.replace);
  29891. var split = uncurryThis(''.split);
  29892. var join = uncurryThis([].join);
  29893. var TEST = (function (arg) { return String(Error(arg).stack); })('zxcasd');
  29894. var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
  29895. var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
  29896. var IS_FIREFOX_OR_SAFARI_STACK = /@[^\n]*\n/.test(TEST) && !/zxcasd/.test(TEST);
  29897. module.exports = function (stack, dropEntries) {
  29898. if (typeof stack != 'string') return stack;
  29899. if (IS_V8_OR_CHAKRA_STACK) {
  29900. while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
  29901. } else if (IS_FIREFOX_OR_SAFARI_STACK) {
  29902. return join(arraySlice(split(stack, '\n'), dropEntries), '\n');
  29903. } return stack;
  29904. };
  29905. /***/ }),
  29906. /***/ 5631:
  29907. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  29908. "use strict";
  29909. var defineProperty = (__webpack_require__(3070).f);
  29910. var create = __webpack_require__(30);
  29911. var redefineAll = __webpack_require__(2248);
  29912. var bind = __webpack_require__(9974);
  29913. var anInstance = __webpack_require__(5787);
  29914. var iterate = __webpack_require__(408);
  29915. var defineIterator = __webpack_require__(654);
  29916. var setSpecies = __webpack_require__(6340);
  29917. var DESCRIPTORS = __webpack_require__(9781);
  29918. var fastKey = (__webpack_require__(2423).fastKey);
  29919. var InternalStateModule = __webpack_require__(9909);
  29920. var setInternalState = InternalStateModule.set;
  29921. var internalStateGetterFor = InternalStateModule.getterFor;
  29922. module.exports = {
  29923. getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
  29924. var Constructor = wrapper(function (that, iterable) {
  29925. anInstance(that, Prototype);
  29926. setInternalState(that, {
  29927. type: CONSTRUCTOR_NAME,
  29928. index: create(null),
  29929. first: undefined,
  29930. last: undefined,
  29931. size: 0
  29932. });
  29933. if (!DESCRIPTORS) that.size = 0;
  29934. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  29935. });
  29936. var Prototype = Constructor.prototype;
  29937. var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
  29938. var define = function (that, key, value) {
  29939. var state = getInternalState(that);
  29940. var entry = getEntry(that, key);
  29941. var previous, index;
  29942. // change existing entry
  29943. if (entry) {
  29944. entry.value = value;
  29945. // create new entry
  29946. } else {
  29947. state.last = entry = {
  29948. index: index = fastKey(key, true),
  29949. key: key,
  29950. value: value,
  29951. previous: previous = state.last,
  29952. next: undefined,
  29953. removed: false
  29954. };
  29955. if (!state.first) state.first = entry;
  29956. if (previous) previous.next = entry;
  29957. if (DESCRIPTORS) state.size++;
  29958. else that.size++;
  29959. // add to index
  29960. if (index !== 'F') state.index[index] = entry;
  29961. } return that;
  29962. };
  29963. var getEntry = function (that, key) {
  29964. var state = getInternalState(that);
  29965. // fast case
  29966. var index = fastKey(key);
  29967. var entry;
  29968. if (index !== 'F') return state.index[index];
  29969. // frozen object case
  29970. for (entry = state.first; entry; entry = entry.next) {
  29971. if (entry.key == key) return entry;
  29972. }
  29973. };
  29974. redefineAll(Prototype, {
  29975. // `{ Map, Set }.prototype.clear()` methods
  29976. // https://tc39.es/ecma262/#sec-map.prototype.clear
  29977. // https://tc39.es/ecma262/#sec-set.prototype.clear
  29978. clear: function clear() {
  29979. var that = this;
  29980. var state = getInternalState(that);
  29981. var data = state.index;
  29982. var entry = state.first;
  29983. while (entry) {
  29984. entry.removed = true;
  29985. if (entry.previous) entry.previous = entry.previous.next = undefined;
  29986. delete data[entry.index];
  29987. entry = entry.next;
  29988. }
  29989. state.first = state.last = undefined;
  29990. if (DESCRIPTORS) state.size = 0;
  29991. else that.size = 0;
  29992. },
  29993. // `{ Map, Set }.prototype.delete(key)` methods
  29994. // https://tc39.es/ecma262/#sec-map.prototype.delete
  29995. // https://tc39.es/ecma262/#sec-set.prototype.delete
  29996. 'delete': function (key) {
  29997. var that = this;
  29998. var state = getInternalState(that);
  29999. var entry = getEntry(that, key);
  30000. if (entry) {
  30001. var next = entry.next;
  30002. var prev = entry.previous;
  30003. delete state.index[entry.index];
  30004. entry.removed = true;
  30005. if (prev) prev.next = next;
  30006. if (next) next.previous = prev;
  30007. if (state.first == entry) state.first = next;
  30008. if (state.last == entry) state.last = prev;
  30009. if (DESCRIPTORS) state.size--;
  30010. else that.size--;
  30011. } return !!entry;
  30012. },
  30013. // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods
  30014. // https://tc39.es/ecma262/#sec-map.prototype.foreach
  30015. // https://tc39.es/ecma262/#sec-set.prototype.foreach
  30016. forEach: function forEach(callbackfn /* , that = undefined */) {
  30017. var state = getInternalState(this);
  30018. var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  30019. var entry;
  30020. while (entry = entry ? entry.next : state.first) {
  30021. boundFunction(entry.value, entry.key, this);
  30022. // revert to the last existing entry
  30023. while (entry && entry.removed) entry = entry.previous;
  30024. }
  30025. },
  30026. // `{ Map, Set}.prototype.has(key)` methods
  30027. // https://tc39.es/ecma262/#sec-map.prototype.has
  30028. // https://tc39.es/ecma262/#sec-set.prototype.has
  30029. has: function has(key) {
  30030. return !!getEntry(this, key);
  30031. }
  30032. });
  30033. redefineAll(Prototype, IS_MAP ? {
  30034. // `Map.prototype.get(key)` method
  30035. // https://tc39.es/ecma262/#sec-map.prototype.get
  30036. get: function get(key) {
  30037. var entry = getEntry(this, key);
  30038. return entry && entry.value;
  30039. },
  30040. // `Map.prototype.set(key, value)` method
  30041. // https://tc39.es/ecma262/#sec-map.prototype.set
  30042. set: function set(key, value) {
  30043. return define(this, key === 0 ? 0 : key, value);
  30044. }
  30045. } : {
  30046. // `Set.prototype.add(value)` method
  30047. // https://tc39.es/ecma262/#sec-set.prototype.add
  30048. add: function add(value) {
  30049. return define(this, value = value === 0 ? 0 : value, value);
  30050. }
  30051. });
  30052. if (DESCRIPTORS) defineProperty(Prototype, 'size', {
  30053. get: function () {
  30054. return getInternalState(this).size;
  30055. }
  30056. });
  30057. return Constructor;
  30058. },
  30059. setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
  30060. var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
  30061. var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
  30062. var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
  30063. // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods
  30064. // https://tc39.es/ecma262/#sec-map.prototype.entries
  30065. // https://tc39.es/ecma262/#sec-map.prototype.keys
  30066. // https://tc39.es/ecma262/#sec-map.prototype.values
  30067. // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
  30068. // https://tc39.es/ecma262/#sec-set.prototype.entries
  30069. // https://tc39.es/ecma262/#sec-set.prototype.keys
  30070. // https://tc39.es/ecma262/#sec-set.prototype.values
  30071. // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
  30072. defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
  30073. setInternalState(this, {
  30074. type: ITERATOR_NAME,
  30075. target: iterated,
  30076. state: getInternalCollectionState(iterated),
  30077. kind: kind,
  30078. last: undefined
  30079. });
  30080. }, function () {
  30081. var state = getInternalIteratorState(this);
  30082. var kind = state.kind;
  30083. var entry = state.last;
  30084. // revert to the last existing entry
  30085. while (entry && entry.removed) entry = entry.previous;
  30086. // get next entry
  30087. if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
  30088. // or finish the iteration
  30089. state.target = undefined;
  30090. return { value: undefined, done: true };
  30091. }
  30092. // return step by kind
  30093. if (kind == 'keys') return { value: entry.key, done: false };
  30094. if (kind == 'values') return { value: entry.value, done: false };
  30095. return { value: [entry.key, entry.value], done: false };
  30096. }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
  30097. // `{ Map, Set }.prototype[@@species]` accessors
  30098. // https://tc39.es/ecma262/#sec-get-map-@@species
  30099. // https://tc39.es/ecma262/#sec-get-set-@@species
  30100. setSpecies(CONSTRUCTOR_NAME);
  30101. }
  30102. };
  30103. /***/ }),
  30104. /***/ 7710:
  30105. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30106. "use strict";
  30107. var $ = __webpack_require__(2109);
  30108. var global = __webpack_require__(7854);
  30109. var uncurryThis = __webpack_require__(1702);
  30110. var isForced = __webpack_require__(4705);
  30111. var redefine = __webpack_require__(1320);
  30112. var InternalMetadataModule = __webpack_require__(2423);
  30113. var iterate = __webpack_require__(408);
  30114. var anInstance = __webpack_require__(5787);
  30115. var isCallable = __webpack_require__(614);
  30116. var isObject = __webpack_require__(111);
  30117. var fails = __webpack_require__(7293);
  30118. var checkCorrectnessOfIteration = __webpack_require__(7072);
  30119. var setToStringTag = __webpack_require__(8003);
  30120. var inheritIfRequired = __webpack_require__(9587);
  30121. module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
  30122. var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
  30123. var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
  30124. var ADDER = IS_MAP ? 'set' : 'add';
  30125. var NativeConstructor = global[CONSTRUCTOR_NAME];
  30126. var NativePrototype = NativeConstructor && NativeConstructor.prototype;
  30127. var Constructor = NativeConstructor;
  30128. var exported = {};
  30129. var fixMethod = function (KEY) {
  30130. var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]);
  30131. redefine(NativePrototype, KEY,
  30132. KEY == 'add' ? function add(value) {
  30133. uncurriedNativeMethod(this, value === 0 ? 0 : value);
  30134. return this;
  30135. } : KEY == 'delete' ? function (key) {
  30136. return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
  30137. } : KEY == 'get' ? function get(key) {
  30138. return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
  30139. } : KEY == 'has' ? function has(key) {
  30140. return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
  30141. } : function set(key, value) {
  30142. uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
  30143. return this;
  30144. }
  30145. );
  30146. };
  30147. var REPLACE = isForced(
  30148. CONSTRUCTOR_NAME,
  30149. !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
  30150. new NativeConstructor().entries().next();
  30151. }))
  30152. );
  30153. if (REPLACE) {
  30154. // create collection constructor
  30155. Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
  30156. InternalMetadataModule.enable();
  30157. } else if (isForced(CONSTRUCTOR_NAME, true)) {
  30158. var instance = new Constructor();
  30159. // early implementations not supports chaining
  30160. var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
  30161. // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
  30162. var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
  30163. // most early implementations doesn't supports iterables, most modern - not close it correctly
  30164. // eslint-disable-next-line no-new -- required for testing
  30165. var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
  30166. // for early implementations -0 and +0 not the same
  30167. var BUGGY_ZERO = !IS_WEAK && fails(function () {
  30168. // V8 ~ Chromium 42- fails only with 5+ elements
  30169. var $instance = new NativeConstructor();
  30170. var index = 5;
  30171. while (index--) $instance[ADDER](index, index);
  30172. return !$instance.has(-0);
  30173. });
  30174. if (!ACCEPT_ITERABLES) {
  30175. Constructor = wrapper(function (dummy, iterable) {
  30176. anInstance(dummy, NativePrototype);
  30177. var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
  30178. if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
  30179. return that;
  30180. });
  30181. Constructor.prototype = NativePrototype;
  30182. NativePrototype.constructor = Constructor;
  30183. }
  30184. if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
  30185. fixMethod('delete');
  30186. fixMethod('has');
  30187. IS_MAP && fixMethod('get');
  30188. }
  30189. if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
  30190. // weak collections should not contains .clear method
  30191. if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
  30192. }
  30193. exported[CONSTRUCTOR_NAME] = Constructor;
  30194. $({ global: true, forced: Constructor != NativeConstructor }, exported);
  30195. setToStringTag(Constructor, CONSTRUCTOR_NAME);
  30196. if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
  30197. return Constructor;
  30198. };
  30199. /***/ }),
  30200. /***/ 9920:
  30201. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30202. var hasOwn = __webpack_require__(2597);
  30203. var ownKeys = __webpack_require__(3887);
  30204. var getOwnPropertyDescriptorModule = __webpack_require__(1236);
  30205. var definePropertyModule = __webpack_require__(3070);
  30206. module.exports = function (target, source) {
  30207. var keys = ownKeys(source);
  30208. var defineProperty = definePropertyModule.f;
  30209. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  30210. for (var i = 0; i < keys.length; i++) {
  30211. var key = keys[i];
  30212. if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
  30213. }
  30214. };
  30215. /***/ }),
  30216. /***/ 4964:
  30217. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30218. var wellKnownSymbol = __webpack_require__(5112);
  30219. var MATCH = wellKnownSymbol('match');
  30220. module.exports = function (METHOD_NAME) {
  30221. var regexp = /./;
  30222. try {
  30223. '/./'[METHOD_NAME](regexp);
  30224. } catch (error1) {
  30225. try {
  30226. regexp[MATCH] = false;
  30227. return '/./'[METHOD_NAME](regexp);
  30228. } catch (error2) { /* empty */ }
  30229. } return false;
  30230. };
  30231. /***/ }),
  30232. /***/ 8544:
  30233. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30234. var fails = __webpack_require__(7293);
  30235. module.exports = !fails(function () {
  30236. function F() { /* empty */ }
  30237. F.prototype.constructor = null;
  30238. // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
  30239. return Object.getPrototypeOf(new F()) !== F.prototype;
  30240. });
  30241. /***/ }),
  30242. /***/ 4230:
  30243. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30244. var uncurryThis = __webpack_require__(1702);
  30245. var requireObjectCoercible = __webpack_require__(4488);
  30246. var toString = __webpack_require__(1340);
  30247. var quot = /"/g;
  30248. var replace = uncurryThis(''.replace);
  30249. // `CreateHTML` abstract operation
  30250. // https://tc39.es/ecma262/#sec-createhtml
  30251. module.exports = function (string, tag, attribute, value) {
  30252. var S = toString(requireObjectCoercible(string));
  30253. var p1 = '<' + tag;
  30254. if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '&quot;') + '"';
  30255. return p1 + '>' + S + '</' + tag + '>';
  30256. };
  30257. /***/ }),
  30258. /***/ 4994:
  30259. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30260. "use strict";
  30261. var IteratorPrototype = (__webpack_require__(3383).IteratorPrototype);
  30262. var create = __webpack_require__(30);
  30263. var createPropertyDescriptor = __webpack_require__(9114);
  30264. var setToStringTag = __webpack_require__(8003);
  30265. var Iterators = __webpack_require__(7497);
  30266. var returnThis = function () { return this; };
  30267. module.exports = function (IteratorConstructor, NAME, next) {
  30268. var TO_STRING_TAG = NAME + ' Iterator';
  30269. IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
  30270. setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
  30271. Iterators[TO_STRING_TAG] = returnThis;
  30272. return IteratorConstructor;
  30273. };
  30274. /***/ }),
  30275. /***/ 8880:
  30276. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30277. var DESCRIPTORS = __webpack_require__(9781);
  30278. var definePropertyModule = __webpack_require__(3070);
  30279. var createPropertyDescriptor = __webpack_require__(9114);
  30280. module.exports = DESCRIPTORS ? function (object, key, value) {
  30281. return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
  30282. } : function (object, key, value) {
  30283. object[key] = value;
  30284. return object;
  30285. };
  30286. /***/ }),
  30287. /***/ 9114:
  30288. /***/ (function(module) {
  30289. module.exports = function (bitmap, value) {
  30290. return {
  30291. enumerable: !(bitmap & 1),
  30292. configurable: !(bitmap & 2),
  30293. writable: !(bitmap & 4),
  30294. value: value
  30295. };
  30296. };
  30297. /***/ }),
  30298. /***/ 6135:
  30299. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30300. "use strict";
  30301. var toPropertyKey = __webpack_require__(4948);
  30302. var definePropertyModule = __webpack_require__(3070);
  30303. var createPropertyDescriptor = __webpack_require__(9114);
  30304. module.exports = function (object, key, value) {
  30305. var propertyKey = toPropertyKey(key);
  30306. if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
  30307. else object[propertyKey] = value;
  30308. };
  30309. /***/ }),
  30310. /***/ 8709:
  30311. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30312. "use strict";
  30313. var global = __webpack_require__(7854);
  30314. var anObject = __webpack_require__(9670);
  30315. var ordinaryToPrimitive = __webpack_require__(2140);
  30316. var TypeError = global.TypeError;
  30317. // `Date.prototype[@@toPrimitive](hint)` method implementation
  30318. // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
  30319. module.exports = function (hint) {
  30320. anObject(this);
  30321. if (hint === 'string' || hint === 'default') hint = 'string';
  30322. else if (hint !== 'number') throw TypeError('Incorrect hint');
  30323. return ordinaryToPrimitive(this, hint);
  30324. };
  30325. /***/ }),
  30326. /***/ 654:
  30327. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30328. "use strict";
  30329. var $ = __webpack_require__(2109);
  30330. var call = __webpack_require__(6916);
  30331. var IS_PURE = __webpack_require__(1913);
  30332. var FunctionName = __webpack_require__(6530);
  30333. var isCallable = __webpack_require__(614);
  30334. var createIteratorConstructor = __webpack_require__(4994);
  30335. var getPrototypeOf = __webpack_require__(9518);
  30336. var setPrototypeOf = __webpack_require__(7674);
  30337. var setToStringTag = __webpack_require__(8003);
  30338. var createNonEnumerableProperty = __webpack_require__(8880);
  30339. var redefine = __webpack_require__(1320);
  30340. var wellKnownSymbol = __webpack_require__(5112);
  30341. var Iterators = __webpack_require__(7497);
  30342. var IteratorsCore = __webpack_require__(3383);
  30343. var PROPER_FUNCTION_NAME = FunctionName.PROPER;
  30344. var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
  30345. var IteratorPrototype = IteratorsCore.IteratorPrototype;
  30346. var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
  30347. var ITERATOR = wellKnownSymbol('iterator');
  30348. var KEYS = 'keys';
  30349. var VALUES = 'values';
  30350. var ENTRIES = 'entries';
  30351. var returnThis = function () { return this; };
  30352. module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
  30353. createIteratorConstructor(IteratorConstructor, NAME, next);
  30354. var getIterationMethod = function (KIND) {
  30355. if (KIND === DEFAULT && defaultIterator) return defaultIterator;
  30356. if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
  30357. switch (KIND) {
  30358. case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
  30359. case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
  30360. case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
  30361. } return function () { return new IteratorConstructor(this); };
  30362. };
  30363. var TO_STRING_TAG = NAME + ' Iterator';
  30364. var INCORRECT_VALUES_NAME = false;
  30365. var IterablePrototype = Iterable.prototype;
  30366. var nativeIterator = IterablePrototype[ITERATOR]
  30367. || IterablePrototype['@@iterator']
  30368. || DEFAULT && IterablePrototype[DEFAULT];
  30369. var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
  30370. var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
  30371. var CurrentIteratorPrototype, methods, KEY;
  30372. // fix native
  30373. if (anyNativeIterator) {
  30374. CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
  30375. if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
  30376. if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
  30377. if (setPrototypeOf) {
  30378. setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
  30379. } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) {
  30380. redefine(CurrentIteratorPrototype, ITERATOR, returnThis);
  30381. }
  30382. }
  30383. // Set @@toStringTag to native iterators
  30384. setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
  30385. if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
  30386. }
  30387. }
  30388. // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
  30389. if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
  30390. if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) {
  30391. createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
  30392. } else {
  30393. INCORRECT_VALUES_NAME = true;
  30394. defaultIterator = function values() { return call(nativeIterator, this); };
  30395. }
  30396. }
  30397. // export additional methods
  30398. if (DEFAULT) {
  30399. methods = {
  30400. values: getIterationMethod(VALUES),
  30401. keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
  30402. entries: getIterationMethod(ENTRIES)
  30403. };
  30404. if (FORCED) for (KEY in methods) {
  30405. if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
  30406. redefine(IterablePrototype, KEY, methods[KEY]);
  30407. }
  30408. } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
  30409. }
  30410. // define iterator
  30411. if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
  30412. redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT });
  30413. }
  30414. Iterators[NAME] = defaultIterator;
  30415. return methods;
  30416. };
  30417. /***/ }),
  30418. /***/ 7235:
  30419. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30420. var path = __webpack_require__(857);
  30421. var hasOwn = __webpack_require__(2597);
  30422. var wrappedWellKnownSymbolModule = __webpack_require__(6061);
  30423. var defineProperty = (__webpack_require__(3070).f);
  30424. module.exports = function (NAME) {
  30425. var Symbol = path.Symbol || (path.Symbol = {});
  30426. if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, {
  30427. value: wrappedWellKnownSymbolModule.f(NAME)
  30428. });
  30429. };
  30430. /***/ }),
  30431. /***/ 9781:
  30432. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30433. var fails = __webpack_require__(7293);
  30434. // Detect IE8's incomplete defineProperty implementation
  30435. module.exports = !fails(function () {
  30436. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  30437. return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
  30438. });
  30439. /***/ }),
  30440. /***/ 317:
  30441. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30442. var global = __webpack_require__(7854);
  30443. var isObject = __webpack_require__(111);
  30444. var document = global.document;
  30445. // typeof document.createElement is 'object' in old IE
  30446. var EXISTS = isObject(document) && isObject(document.createElement);
  30447. module.exports = function (it) {
  30448. return EXISTS ? document.createElement(it) : {};
  30449. };
  30450. /***/ }),
  30451. /***/ 8324:
  30452. /***/ (function(module) {
  30453. // iterable DOM collections
  30454. // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
  30455. module.exports = {
  30456. CSSRuleList: 0,
  30457. CSSStyleDeclaration: 0,
  30458. CSSValueList: 0,
  30459. ClientRectList: 0,
  30460. DOMRectList: 0,
  30461. DOMStringList: 0,
  30462. DOMTokenList: 1,
  30463. DataTransferItemList: 0,
  30464. FileList: 0,
  30465. HTMLAllCollection: 0,
  30466. HTMLCollection: 0,
  30467. HTMLFormElement: 0,
  30468. HTMLSelectElement: 0,
  30469. MediaList: 0,
  30470. MimeTypeArray: 0,
  30471. NamedNodeMap: 0,
  30472. NodeList: 1,
  30473. PaintRequestList: 0,
  30474. Plugin: 0,
  30475. PluginArray: 0,
  30476. SVGLengthList: 0,
  30477. SVGNumberList: 0,
  30478. SVGPathSegList: 0,
  30479. SVGPointList: 0,
  30480. SVGStringList: 0,
  30481. SVGTransformList: 0,
  30482. SourceBufferList: 0,
  30483. StyleSheetList: 0,
  30484. TextTrackCueList: 0,
  30485. TextTrackList: 0,
  30486. TouchList: 0
  30487. };
  30488. /***/ }),
  30489. /***/ 8509:
  30490. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30491. // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
  30492. var documentCreateElement = __webpack_require__(317);
  30493. var classList = documentCreateElement('span').classList;
  30494. var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype;
  30495. module.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
  30496. /***/ }),
  30497. /***/ 8886:
  30498. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30499. var userAgent = __webpack_require__(8113);
  30500. var firefox = userAgent.match(/firefox\/(\d+)/i);
  30501. module.exports = !!firefox && +firefox[1];
  30502. /***/ }),
  30503. /***/ 7871:
  30504. /***/ (function(module) {
  30505. module.exports = typeof window == 'object';
  30506. /***/ }),
  30507. /***/ 256:
  30508. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30509. var UA = __webpack_require__(8113);
  30510. module.exports = /MSIE|Trident/.test(UA);
  30511. /***/ }),
  30512. /***/ 1528:
  30513. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30514. var userAgent = __webpack_require__(8113);
  30515. var global = __webpack_require__(7854);
  30516. module.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined;
  30517. /***/ }),
  30518. /***/ 6833:
  30519. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30520. var userAgent = __webpack_require__(8113);
  30521. module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent);
  30522. /***/ }),
  30523. /***/ 5268:
  30524. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30525. var classof = __webpack_require__(4326);
  30526. var global = __webpack_require__(7854);
  30527. module.exports = classof(global.process) == 'process';
  30528. /***/ }),
  30529. /***/ 1036:
  30530. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30531. var userAgent = __webpack_require__(8113);
  30532. module.exports = /web0s(?!.*chrome)/i.test(userAgent);
  30533. /***/ }),
  30534. /***/ 8113:
  30535. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30536. var getBuiltIn = __webpack_require__(5005);
  30537. module.exports = getBuiltIn('navigator', 'userAgent') || '';
  30538. /***/ }),
  30539. /***/ 7392:
  30540. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30541. var global = __webpack_require__(7854);
  30542. var userAgent = __webpack_require__(8113);
  30543. var process = global.process;
  30544. var Deno = global.Deno;
  30545. var versions = process && process.versions || Deno && Deno.version;
  30546. var v8 = versions && versions.v8;
  30547. var match, version;
  30548. if (v8) {
  30549. match = v8.split('.');
  30550. // in old Chrome, versions of V8 isn't V8 = Chrome / 10
  30551. // but their correct versions are not interesting for us
  30552. version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
  30553. }
  30554. // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
  30555. // so check `userAgent` even if `.v8` exists, but 0
  30556. if (!version && userAgent) {
  30557. match = userAgent.match(/Edge\/(\d+)/);
  30558. if (!match || match[1] >= 74) {
  30559. match = userAgent.match(/Chrome\/(\d+)/);
  30560. if (match) version = +match[1];
  30561. }
  30562. }
  30563. module.exports = version;
  30564. /***/ }),
  30565. /***/ 8008:
  30566. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30567. var userAgent = __webpack_require__(8113);
  30568. var webkit = userAgent.match(/AppleWebKit\/(\d+)\./);
  30569. module.exports = !!webkit && +webkit[1];
  30570. /***/ }),
  30571. /***/ 748:
  30572. /***/ (function(module) {
  30573. // IE8- don't enum bug keys
  30574. module.exports = [
  30575. 'constructor',
  30576. 'hasOwnProperty',
  30577. 'isPrototypeOf',
  30578. 'propertyIsEnumerable',
  30579. 'toLocaleString',
  30580. 'toString',
  30581. 'valueOf'
  30582. ];
  30583. /***/ }),
  30584. /***/ 2914:
  30585. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30586. var fails = __webpack_require__(7293);
  30587. var createPropertyDescriptor = __webpack_require__(9114);
  30588. module.exports = !fails(function () {
  30589. var error = Error('a');
  30590. if (!('stack' in error)) return true;
  30591. // eslint-disable-next-line es/no-object-defineproperty -- safe
  30592. Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7));
  30593. return error.stack !== 7;
  30594. });
  30595. /***/ }),
  30596. /***/ 2109:
  30597. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30598. var global = __webpack_require__(7854);
  30599. var getOwnPropertyDescriptor = (__webpack_require__(1236).f);
  30600. var createNonEnumerableProperty = __webpack_require__(8880);
  30601. var redefine = __webpack_require__(1320);
  30602. var setGlobal = __webpack_require__(3505);
  30603. var copyConstructorProperties = __webpack_require__(9920);
  30604. var isForced = __webpack_require__(4705);
  30605. /*
  30606. options.target - name of the target object
  30607. options.global - target is the global object
  30608. options.stat - export as static methods of target
  30609. options.proto - export as prototype methods of target
  30610. options.real - real prototype method for the `pure` version
  30611. options.forced - export even if the native feature is available
  30612. options.bind - bind methods to the target, required for the `pure` version
  30613. options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
  30614. options.unsafe - use the simple assignment of property instead of delete + defineProperty
  30615. options.sham - add a flag to not completely full polyfills
  30616. options.enumerable - export as enumerable property
  30617. options.noTargetGet - prevent calling a getter on target
  30618. options.name - the .name of the function if it does not match the key
  30619. */
  30620. module.exports = function (options, source) {
  30621. var TARGET = options.target;
  30622. var GLOBAL = options.global;
  30623. var STATIC = options.stat;
  30624. var FORCED, target, key, targetProperty, sourceProperty, descriptor;
  30625. if (GLOBAL) {
  30626. target = global;
  30627. } else if (STATIC) {
  30628. target = global[TARGET] || setGlobal(TARGET, {});
  30629. } else {
  30630. target = (global[TARGET] || {}).prototype;
  30631. }
  30632. if (target) for (key in source) {
  30633. sourceProperty = source[key];
  30634. if (options.noTargetGet) {
  30635. descriptor = getOwnPropertyDescriptor(target, key);
  30636. targetProperty = descriptor && descriptor.value;
  30637. } else targetProperty = target[key];
  30638. FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
  30639. // contained in target
  30640. if (!FORCED && targetProperty !== undefined) {
  30641. if (typeof sourceProperty == typeof targetProperty) continue;
  30642. copyConstructorProperties(sourceProperty, targetProperty);
  30643. }
  30644. // add a flag to not completely full polyfills
  30645. if (options.sham || (targetProperty && targetProperty.sham)) {
  30646. createNonEnumerableProperty(sourceProperty, 'sham', true);
  30647. }
  30648. // extend global
  30649. redefine(target, key, sourceProperty, options);
  30650. }
  30651. };
  30652. /***/ }),
  30653. /***/ 7293:
  30654. /***/ (function(module) {
  30655. module.exports = function (exec) {
  30656. try {
  30657. return !!exec();
  30658. } catch (error) {
  30659. return true;
  30660. }
  30661. };
  30662. /***/ }),
  30663. /***/ 7007:
  30664. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30665. "use strict";
  30666. // TODO: Remove from `core-js@4` since it's moved to entry points
  30667. __webpack_require__(4916);
  30668. var uncurryThis = __webpack_require__(1702);
  30669. var redefine = __webpack_require__(1320);
  30670. var regexpExec = __webpack_require__(2261);
  30671. var fails = __webpack_require__(7293);
  30672. var wellKnownSymbol = __webpack_require__(5112);
  30673. var createNonEnumerableProperty = __webpack_require__(8880);
  30674. var SPECIES = wellKnownSymbol('species');
  30675. var RegExpPrototype = RegExp.prototype;
  30676. module.exports = function (KEY, exec, FORCED, SHAM) {
  30677. var SYMBOL = wellKnownSymbol(KEY);
  30678. var DELEGATES_TO_SYMBOL = !fails(function () {
  30679. // String methods call symbol-named RegEp methods
  30680. var O = {};
  30681. O[SYMBOL] = function () { return 7; };
  30682. return ''[KEY](O) != 7;
  30683. });
  30684. var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
  30685. // Symbol-named RegExp methods call .exec
  30686. var execCalled = false;
  30687. var re = /a/;
  30688. if (KEY === 'split') {
  30689. // We can't use real regex here since it causes deoptimization
  30690. // and serious performance degradation in V8
  30691. // https://github.com/zloirock/core-js/issues/306
  30692. re = {};
  30693. // RegExp[@@split] doesn't call the regex's exec method, but first creates
  30694. // a new one. We need to return the patched regex when creating the new one.
  30695. re.constructor = {};
  30696. re.constructor[SPECIES] = function () { return re; };
  30697. re.flags = '';
  30698. re[SYMBOL] = /./[SYMBOL];
  30699. }
  30700. re.exec = function () { execCalled = true; return null; };
  30701. re[SYMBOL]('');
  30702. return !execCalled;
  30703. });
  30704. if (
  30705. !DELEGATES_TO_SYMBOL ||
  30706. !DELEGATES_TO_EXEC ||
  30707. FORCED
  30708. ) {
  30709. var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);
  30710. var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
  30711. var uncurriedNativeMethod = uncurryThis(nativeMethod);
  30712. var $exec = regexp.exec;
  30713. if ($exec === regexpExec || $exec === RegExpPrototype.exec) {
  30714. if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
  30715. // The native String method already delegates to @@method (this
  30716. // polyfilled function), leasing to infinite recursion.
  30717. // We avoid it by directly calling the native @@method method.
  30718. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
  30719. }
  30720. return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
  30721. }
  30722. return { done: false };
  30723. });
  30724. redefine(String.prototype, KEY, methods[0]);
  30725. redefine(RegExpPrototype, SYMBOL, methods[1]);
  30726. }
  30727. if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
  30728. };
  30729. /***/ }),
  30730. /***/ 6677:
  30731. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30732. var fails = __webpack_require__(7293);
  30733. module.exports = !fails(function () {
  30734. // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
  30735. return Object.isExtensible(Object.preventExtensions({}));
  30736. });
  30737. /***/ }),
  30738. /***/ 2104:
  30739. /***/ (function(module) {
  30740. var FunctionPrototype = Function.prototype;
  30741. var apply = FunctionPrototype.apply;
  30742. var bind = FunctionPrototype.bind;
  30743. var call = FunctionPrototype.call;
  30744. // eslint-disable-next-line es/no-reflect -- safe
  30745. module.exports = typeof Reflect == 'object' && Reflect.apply || (bind ? call.bind(apply) : function () {
  30746. return call.apply(apply, arguments);
  30747. });
  30748. /***/ }),
  30749. /***/ 9974:
  30750. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30751. var uncurryThis = __webpack_require__(1702);
  30752. var aCallable = __webpack_require__(9662);
  30753. var bind = uncurryThis(uncurryThis.bind);
  30754. // optional / simple context binding
  30755. module.exports = function (fn, that) {
  30756. aCallable(fn);
  30757. return that === undefined ? fn : bind ? bind(fn, that) : function (/* ...args */) {
  30758. return fn.apply(that, arguments);
  30759. };
  30760. };
  30761. /***/ }),
  30762. /***/ 7065:
  30763. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30764. "use strict";
  30765. var global = __webpack_require__(7854);
  30766. var uncurryThis = __webpack_require__(1702);
  30767. var aCallable = __webpack_require__(9662);
  30768. var isObject = __webpack_require__(111);
  30769. var hasOwn = __webpack_require__(2597);
  30770. var arraySlice = __webpack_require__(206);
  30771. var Function = global.Function;
  30772. var concat = uncurryThis([].concat);
  30773. var join = uncurryThis([].join);
  30774. var factories = {};
  30775. var construct = function (C, argsLength, args) {
  30776. if (!hasOwn(factories, argsLength)) {
  30777. for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
  30778. factories[argsLength] = Function('C,a', 'return new C(' + join(list, ',') + ')');
  30779. } return factories[argsLength](C, args);
  30780. };
  30781. // `Function.prototype.bind` method implementation
  30782. // https://tc39.es/ecma262/#sec-function.prototype.bind
  30783. module.exports = Function.bind || function bind(that /* , ...args */) {
  30784. var F = aCallable(this);
  30785. var Prototype = F.prototype;
  30786. var partArgs = arraySlice(arguments, 1);
  30787. var boundFunction = function bound(/* args... */) {
  30788. var args = concat(partArgs, arraySlice(arguments));
  30789. return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);
  30790. };
  30791. if (isObject(Prototype)) boundFunction.prototype = Prototype;
  30792. return boundFunction;
  30793. };
  30794. /***/ }),
  30795. /***/ 6916:
  30796. /***/ (function(module) {
  30797. var call = Function.prototype.call;
  30798. module.exports = call.bind ? call.bind(call) : function () {
  30799. return call.apply(call, arguments);
  30800. };
  30801. /***/ }),
  30802. /***/ 6530:
  30803. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30804. var DESCRIPTORS = __webpack_require__(9781);
  30805. var hasOwn = __webpack_require__(2597);
  30806. var FunctionPrototype = Function.prototype;
  30807. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  30808. var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor;
  30809. var EXISTS = hasOwn(FunctionPrototype, 'name');
  30810. // additional protection from minified / mangled / dropped function names
  30811. var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
  30812. var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable));
  30813. module.exports = {
  30814. EXISTS: EXISTS,
  30815. PROPER: PROPER,
  30816. CONFIGURABLE: CONFIGURABLE
  30817. };
  30818. /***/ }),
  30819. /***/ 1702:
  30820. /***/ (function(module) {
  30821. var FunctionPrototype = Function.prototype;
  30822. var bind = FunctionPrototype.bind;
  30823. var call = FunctionPrototype.call;
  30824. var callBind = bind && bind.bind(call);
  30825. module.exports = bind ? function (fn) {
  30826. return fn && callBind(call, fn);
  30827. } : function (fn) {
  30828. return fn && function () {
  30829. return call.apply(fn, arguments);
  30830. };
  30831. };
  30832. /***/ }),
  30833. /***/ 5005:
  30834. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30835. var global = __webpack_require__(7854);
  30836. var isCallable = __webpack_require__(614);
  30837. var aFunction = function (argument) {
  30838. return isCallable(argument) ? argument : undefined;
  30839. };
  30840. module.exports = function (namespace, method) {
  30841. return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method];
  30842. };
  30843. /***/ }),
  30844. /***/ 1246:
  30845. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30846. var classof = __webpack_require__(648);
  30847. var getMethod = __webpack_require__(8173);
  30848. var Iterators = __webpack_require__(7497);
  30849. var wellKnownSymbol = __webpack_require__(5112);
  30850. var ITERATOR = wellKnownSymbol('iterator');
  30851. module.exports = function (it) {
  30852. if (it != undefined) return getMethod(it, ITERATOR)
  30853. || getMethod(it, '@@iterator')
  30854. || Iterators[classof(it)];
  30855. };
  30856. /***/ }),
  30857. /***/ 8554:
  30858. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30859. var global = __webpack_require__(7854);
  30860. var call = __webpack_require__(6916);
  30861. var aCallable = __webpack_require__(9662);
  30862. var anObject = __webpack_require__(9670);
  30863. var tryToString = __webpack_require__(6330);
  30864. var getIteratorMethod = __webpack_require__(1246);
  30865. var TypeError = global.TypeError;
  30866. module.exports = function (argument, usingIterator) {
  30867. var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
  30868. if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument));
  30869. throw TypeError(tryToString(argument) + ' is not iterable');
  30870. };
  30871. /***/ }),
  30872. /***/ 8173:
  30873. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30874. var aCallable = __webpack_require__(9662);
  30875. // `GetMethod` abstract operation
  30876. // https://tc39.es/ecma262/#sec-getmethod
  30877. module.exports = function (V, P) {
  30878. var func = V[P];
  30879. return func == null ? undefined : aCallable(func);
  30880. };
  30881. /***/ }),
  30882. /***/ 647:
  30883. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30884. var uncurryThis = __webpack_require__(1702);
  30885. var toObject = __webpack_require__(7908);
  30886. var floor = Math.floor;
  30887. var charAt = uncurryThis(''.charAt);
  30888. var replace = uncurryThis(''.replace);
  30889. var stringSlice = uncurryThis(''.slice);
  30890. var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
  30891. var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
  30892. // `GetSubstitution` abstract operation
  30893. // https://tc39.es/ecma262/#sec-getsubstitution
  30894. module.exports = function (matched, str, position, captures, namedCaptures, replacement) {
  30895. var tailPos = position + matched.length;
  30896. var m = captures.length;
  30897. var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
  30898. if (namedCaptures !== undefined) {
  30899. namedCaptures = toObject(namedCaptures);
  30900. symbols = SUBSTITUTION_SYMBOLS;
  30901. }
  30902. return replace(replacement, symbols, function (match, ch) {
  30903. var capture;
  30904. switch (charAt(ch, 0)) {
  30905. case '$': return '$';
  30906. case '&': return matched;
  30907. case '`': return stringSlice(str, 0, position);
  30908. case "'": return stringSlice(str, tailPos);
  30909. case '<':
  30910. capture = namedCaptures[stringSlice(ch, 1, -1)];
  30911. break;
  30912. default: // \d\d?
  30913. var n = +ch;
  30914. if (n === 0) return match;
  30915. if (n > m) {
  30916. var f = floor(n / 10);
  30917. if (f === 0) return match;
  30918. if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
  30919. return match;
  30920. }
  30921. capture = captures[n - 1];
  30922. }
  30923. return capture === undefined ? '' : capture;
  30924. });
  30925. };
  30926. /***/ }),
  30927. /***/ 7854:
  30928. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30929. var check = function (it) {
  30930. return it && it.Math == Math && it;
  30931. };
  30932. // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
  30933. module.exports =
  30934. // eslint-disable-next-line es/no-global-this -- safe
  30935. check(typeof globalThis == 'object' && globalThis) ||
  30936. check(typeof window == 'object' && window) ||
  30937. // eslint-disable-next-line no-restricted-globals -- safe
  30938. check(typeof self == 'object' && self) ||
  30939. check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) ||
  30940. // eslint-disable-next-line no-new-func -- fallback
  30941. (function () { return this; })() || Function('return this')();
  30942. /***/ }),
  30943. /***/ 2597:
  30944. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30945. var uncurryThis = __webpack_require__(1702);
  30946. var toObject = __webpack_require__(7908);
  30947. var hasOwnProperty = uncurryThis({}.hasOwnProperty);
  30948. // `HasOwnProperty` abstract operation
  30949. // https://tc39.es/ecma262/#sec-hasownproperty
  30950. module.exports = Object.hasOwn || function hasOwn(it, key) {
  30951. return hasOwnProperty(toObject(it), key);
  30952. };
  30953. /***/ }),
  30954. /***/ 3501:
  30955. /***/ (function(module) {
  30956. module.exports = {};
  30957. /***/ }),
  30958. /***/ 842:
  30959. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30960. var global = __webpack_require__(7854);
  30961. module.exports = function (a, b) {
  30962. var console = global.console;
  30963. if (console && console.error) {
  30964. arguments.length == 1 ? console.error(a) : console.error(a, b);
  30965. }
  30966. };
  30967. /***/ }),
  30968. /***/ 490:
  30969. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30970. var getBuiltIn = __webpack_require__(5005);
  30971. module.exports = getBuiltIn('document', 'documentElement');
  30972. /***/ }),
  30973. /***/ 4664:
  30974. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30975. var DESCRIPTORS = __webpack_require__(9781);
  30976. var fails = __webpack_require__(7293);
  30977. var createElement = __webpack_require__(317);
  30978. // Thank's IE8 for his funny defineProperty
  30979. module.exports = !DESCRIPTORS && !fails(function () {
  30980. // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
  30981. return Object.defineProperty(createElement('div'), 'a', {
  30982. get: function () { return 7; }
  30983. }).a != 7;
  30984. });
  30985. /***/ }),
  30986. /***/ 1179:
  30987. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  30988. // IEEE754 conversions based on https://github.com/feross/ieee754
  30989. var global = __webpack_require__(7854);
  30990. var Array = global.Array;
  30991. var abs = Math.abs;
  30992. var pow = Math.pow;
  30993. var floor = Math.floor;
  30994. var log = Math.log;
  30995. var LN2 = Math.LN2;
  30996. var pack = function (number, mantissaLength, bytes) {
  30997. var buffer = Array(bytes);
  30998. var exponentLength = bytes * 8 - mantissaLength - 1;
  30999. var eMax = (1 << exponentLength) - 1;
  31000. var eBias = eMax >> 1;
  31001. var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
  31002. var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
  31003. var index = 0;
  31004. var exponent, mantissa, c;
  31005. number = abs(number);
  31006. // eslint-disable-next-line no-self-compare -- NaN check
  31007. if (number != number || number === Infinity) {
  31008. // eslint-disable-next-line no-self-compare -- NaN check
  31009. mantissa = number != number ? 1 : 0;
  31010. exponent = eMax;
  31011. } else {
  31012. exponent = floor(log(number) / LN2);
  31013. if (number * (c = pow(2, -exponent)) < 1) {
  31014. exponent--;
  31015. c *= 2;
  31016. }
  31017. if (exponent + eBias >= 1) {
  31018. number += rt / c;
  31019. } else {
  31020. number += rt * pow(2, 1 - eBias);
  31021. }
  31022. if (number * c >= 2) {
  31023. exponent++;
  31024. c /= 2;
  31025. }
  31026. if (exponent + eBias >= eMax) {
  31027. mantissa = 0;
  31028. exponent = eMax;
  31029. } else if (exponent + eBias >= 1) {
  31030. mantissa = (number * c - 1) * pow(2, mantissaLength);
  31031. exponent = exponent + eBias;
  31032. } else {
  31033. mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
  31034. exponent = 0;
  31035. }
  31036. }
  31037. for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
  31038. exponent = exponent << mantissaLength | mantissa;
  31039. exponentLength += mantissaLength;
  31040. for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
  31041. buffer[--index] |= sign * 128;
  31042. return buffer;
  31043. };
  31044. var unpack = function (buffer, mantissaLength) {
  31045. var bytes = buffer.length;
  31046. var exponentLength = bytes * 8 - mantissaLength - 1;
  31047. var eMax = (1 << exponentLength) - 1;
  31048. var eBias = eMax >> 1;
  31049. var nBits = exponentLength - 7;
  31050. var index = bytes - 1;
  31051. var sign = buffer[index--];
  31052. var exponent = sign & 127;
  31053. var mantissa;
  31054. sign >>= 7;
  31055. for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
  31056. mantissa = exponent & (1 << -nBits) - 1;
  31057. exponent >>= -nBits;
  31058. nBits += mantissaLength;
  31059. for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
  31060. if (exponent === 0) {
  31061. exponent = 1 - eBias;
  31062. } else if (exponent === eMax) {
  31063. return mantissa ? NaN : sign ? -Infinity : Infinity;
  31064. } else {
  31065. mantissa = mantissa + pow(2, mantissaLength);
  31066. exponent = exponent - eBias;
  31067. } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
  31068. };
  31069. module.exports = {
  31070. pack: pack,
  31071. unpack: unpack
  31072. };
  31073. /***/ }),
  31074. /***/ 8361:
  31075. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31076. var global = __webpack_require__(7854);
  31077. var uncurryThis = __webpack_require__(1702);
  31078. var fails = __webpack_require__(7293);
  31079. var classof = __webpack_require__(4326);
  31080. var Object = global.Object;
  31081. var split = uncurryThis(''.split);
  31082. // fallback for non-array-like ES3 and non-enumerable old V8 strings
  31083. module.exports = fails(function () {
  31084. // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
  31085. // eslint-disable-next-line no-prototype-builtins -- safe
  31086. return !Object('z').propertyIsEnumerable(0);
  31087. }) ? function (it) {
  31088. return classof(it) == 'String' ? split(it, '') : Object(it);
  31089. } : Object;
  31090. /***/ }),
  31091. /***/ 9587:
  31092. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31093. var isCallable = __webpack_require__(614);
  31094. var isObject = __webpack_require__(111);
  31095. var setPrototypeOf = __webpack_require__(7674);
  31096. // makes subclassing work correct for wrapped built-ins
  31097. module.exports = function ($this, dummy, Wrapper) {
  31098. var NewTarget, NewTargetPrototype;
  31099. if (
  31100. // it can work only with native `setPrototypeOf`
  31101. setPrototypeOf &&
  31102. // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
  31103. isCallable(NewTarget = dummy.constructor) &&
  31104. NewTarget !== Wrapper &&
  31105. isObject(NewTargetPrototype = NewTarget.prototype) &&
  31106. NewTargetPrototype !== Wrapper.prototype
  31107. ) setPrototypeOf($this, NewTargetPrototype);
  31108. return $this;
  31109. };
  31110. /***/ }),
  31111. /***/ 2788:
  31112. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31113. var uncurryThis = __webpack_require__(1702);
  31114. var isCallable = __webpack_require__(614);
  31115. var store = __webpack_require__(5465);
  31116. var functionToString = uncurryThis(Function.toString);
  31117. // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
  31118. if (!isCallable(store.inspectSource)) {
  31119. store.inspectSource = function (it) {
  31120. return functionToString(it);
  31121. };
  31122. }
  31123. module.exports = store.inspectSource;
  31124. /***/ }),
  31125. /***/ 8340:
  31126. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31127. var isObject = __webpack_require__(111);
  31128. var createNonEnumerableProperty = __webpack_require__(8880);
  31129. // `InstallErrorCause` abstract operation
  31130. // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
  31131. module.exports = function (O, options) {
  31132. if (isObject(options) && 'cause' in options) {
  31133. createNonEnumerableProperty(O, 'cause', options.cause);
  31134. }
  31135. };
  31136. /***/ }),
  31137. /***/ 2423:
  31138. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31139. var $ = __webpack_require__(2109);
  31140. var uncurryThis = __webpack_require__(1702);
  31141. var hiddenKeys = __webpack_require__(3501);
  31142. var isObject = __webpack_require__(111);
  31143. var hasOwn = __webpack_require__(2597);
  31144. var defineProperty = (__webpack_require__(3070).f);
  31145. var getOwnPropertyNamesModule = __webpack_require__(8006);
  31146. var getOwnPropertyNamesExternalModule = __webpack_require__(1156);
  31147. var uid = __webpack_require__(9711);
  31148. var FREEZING = __webpack_require__(6677);
  31149. var REQUIRED = false;
  31150. var METADATA = uid('meta');
  31151. var id = 0;
  31152. // eslint-disable-next-line es/no-object-isextensible -- safe
  31153. var isExtensible = Object.isExtensible || function () {
  31154. return true;
  31155. };
  31156. var setMetadata = function (it) {
  31157. defineProperty(it, METADATA, { value: {
  31158. objectID: 'O' + id++, // object ID
  31159. weakData: {} // weak collections IDs
  31160. } });
  31161. };
  31162. var fastKey = function (it, create) {
  31163. // return a primitive with prefix
  31164. if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
  31165. if (!hasOwn(it, METADATA)) {
  31166. // can't set metadata to uncaught frozen object
  31167. if (!isExtensible(it)) return 'F';
  31168. // not necessary to add metadata
  31169. if (!create) return 'E';
  31170. // add missing metadata
  31171. setMetadata(it);
  31172. // return object ID
  31173. } return it[METADATA].objectID;
  31174. };
  31175. var getWeakData = function (it, create) {
  31176. if (!hasOwn(it, METADATA)) {
  31177. // can't set metadata to uncaught frozen object
  31178. if (!isExtensible(it)) return true;
  31179. // not necessary to add metadata
  31180. if (!create) return false;
  31181. // add missing metadata
  31182. setMetadata(it);
  31183. // return the store of weak collections IDs
  31184. } return it[METADATA].weakData;
  31185. };
  31186. // add metadata on freeze-family methods calling
  31187. var onFreeze = function (it) {
  31188. if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it);
  31189. return it;
  31190. };
  31191. var enable = function () {
  31192. meta.enable = function () { /* empty */ };
  31193. REQUIRED = true;
  31194. var getOwnPropertyNames = getOwnPropertyNamesModule.f;
  31195. var splice = uncurryThis([].splice);
  31196. var test = {};
  31197. test[METADATA] = 1;
  31198. // prevent exposing of metadata key
  31199. if (getOwnPropertyNames(test).length) {
  31200. getOwnPropertyNamesModule.f = function (it) {
  31201. var result = getOwnPropertyNames(it);
  31202. for (var i = 0, length = result.length; i < length; i++) {
  31203. if (result[i] === METADATA) {
  31204. splice(result, i, 1);
  31205. break;
  31206. }
  31207. } return result;
  31208. };
  31209. $({ target: 'Object', stat: true, forced: true }, {
  31210. getOwnPropertyNames: getOwnPropertyNamesExternalModule.f
  31211. });
  31212. }
  31213. };
  31214. var meta = module.exports = {
  31215. enable: enable,
  31216. fastKey: fastKey,
  31217. getWeakData: getWeakData,
  31218. onFreeze: onFreeze
  31219. };
  31220. hiddenKeys[METADATA] = true;
  31221. /***/ }),
  31222. /***/ 9909:
  31223. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31224. var NATIVE_WEAK_MAP = __webpack_require__(8536);
  31225. var global = __webpack_require__(7854);
  31226. var uncurryThis = __webpack_require__(1702);
  31227. var isObject = __webpack_require__(111);
  31228. var createNonEnumerableProperty = __webpack_require__(8880);
  31229. var hasOwn = __webpack_require__(2597);
  31230. var shared = __webpack_require__(5465);
  31231. var sharedKey = __webpack_require__(6200);
  31232. var hiddenKeys = __webpack_require__(3501);
  31233. var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
  31234. var TypeError = global.TypeError;
  31235. var WeakMap = global.WeakMap;
  31236. var set, get, has;
  31237. var enforce = function (it) {
  31238. return has(it) ? get(it) : set(it, {});
  31239. };
  31240. var getterFor = function (TYPE) {
  31241. return function (it) {
  31242. var state;
  31243. if (!isObject(it) || (state = get(it)).type !== TYPE) {
  31244. throw TypeError('Incompatible receiver, ' + TYPE + ' required');
  31245. } return state;
  31246. };
  31247. };
  31248. if (NATIVE_WEAK_MAP || shared.state) {
  31249. var store = shared.state || (shared.state = new WeakMap());
  31250. var wmget = uncurryThis(store.get);
  31251. var wmhas = uncurryThis(store.has);
  31252. var wmset = uncurryThis(store.set);
  31253. set = function (it, metadata) {
  31254. if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  31255. metadata.facade = it;
  31256. wmset(store, it, metadata);
  31257. return metadata;
  31258. };
  31259. get = function (it) {
  31260. return wmget(store, it) || {};
  31261. };
  31262. has = function (it) {
  31263. return wmhas(store, it);
  31264. };
  31265. } else {
  31266. var STATE = sharedKey('state');
  31267. hiddenKeys[STATE] = true;
  31268. set = function (it, metadata) {
  31269. if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
  31270. metadata.facade = it;
  31271. createNonEnumerableProperty(it, STATE, metadata);
  31272. return metadata;
  31273. };
  31274. get = function (it) {
  31275. return hasOwn(it, STATE) ? it[STATE] : {};
  31276. };
  31277. has = function (it) {
  31278. return hasOwn(it, STATE);
  31279. };
  31280. }
  31281. module.exports = {
  31282. set: set,
  31283. get: get,
  31284. has: has,
  31285. enforce: enforce,
  31286. getterFor: getterFor
  31287. };
  31288. /***/ }),
  31289. /***/ 7659:
  31290. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31291. var wellKnownSymbol = __webpack_require__(5112);
  31292. var Iterators = __webpack_require__(7497);
  31293. var ITERATOR = wellKnownSymbol('iterator');
  31294. var ArrayPrototype = Array.prototype;
  31295. // check on default Array iterator
  31296. module.exports = function (it) {
  31297. return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
  31298. };
  31299. /***/ }),
  31300. /***/ 3157:
  31301. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31302. var classof = __webpack_require__(4326);
  31303. // `IsArray` abstract operation
  31304. // https://tc39.es/ecma262/#sec-isarray
  31305. // eslint-disable-next-line es/no-array-isarray -- safe
  31306. module.exports = Array.isArray || function isArray(argument) {
  31307. return classof(argument) == 'Array';
  31308. };
  31309. /***/ }),
  31310. /***/ 614:
  31311. /***/ (function(module) {
  31312. // `IsCallable` abstract operation
  31313. // https://tc39.es/ecma262/#sec-iscallable
  31314. module.exports = function (argument) {
  31315. return typeof argument == 'function';
  31316. };
  31317. /***/ }),
  31318. /***/ 4411:
  31319. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31320. var uncurryThis = __webpack_require__(1702);
  31321. var fails = __webpack_require__(7293);
  31322. var isCallable = __webpack_require__(614);
  31323. var classof = __webpack_require__(648);
  31324. var getBuiltIn = __webpack_require__(5005);
  31325. var inspectSource = __webpack_require__(2788);
  31326. var noop = function () { /* empty */ };
  31327. var empty = [];
  31328. var construct = getBuiltIn('Reflect', 'construct');
  31329. var constructorRegExp = /^\s*(?:class|function)\b/;
  31330. var exec = uncurryThis(constructorRegExp.exec);
  31331. var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
  31332. var isConstructorModern = function (argument) {
  31333. if (!isCallable(argument)) return false;
  31334. try {
  31335. construct(noop, empty, argument);
  31336. return true;
  31337. } catch (error) {
  31338. return false;
  31339. }
  31340. };
  31341. var isConstructorLegacy = function (argument) {
  31342. if (!isCallable(argument)) return false;
  31343. switch (classof(argument)) {
  31344. case 'AsyncFunction':
  31345. case 'GeneratorFunction':
  31346. case 'AsyncGeneratorFunction': return false;
  31347. // we can't check .prototype since constructors produced by .bind haven't it
  31348. } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
  31349. };
  31350. // `IsConstructor` abstract operation
  31351. // https://tc39.es/ecma262/#sec-isconstructor
  31352. module.exports = !construct || fails(function () {
  31353. var called;
  31354. return isConstructorModern(isConstructorModern.call)
  31355. || !isConstructorModern(Object)
  31356. || !isConstructorModern(function () { called = true; })
  31357. || called;
  31358. }) ? isConstructorLegacy : isConstructorModern;
  31359. /***/ }),
  31360. /***/ 4705:
  31361. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31362. var fails = __webpack_require__(7293);
  31363. var isCallable = __webpack_require__(614);
  31364. var replacement = /#|\.prototype\./;
  31365. var isForced = function (feature, detection) {
  31366. var value = data[normalize(feature)];
  31367. return value == POLYFILL ? true
  31368. : value == NATIVE ? false
  31369. : isCallable(detection) ? fails(detection)
  31370. : !!detection;
  31371. };
  31372. var normalize = isForced.normalize = function (string) {
  31373. return String(string).replace(replacement, '.').toLowerCase();
  31374. };
  31375. var data = isForced.data = {};
  31376. var NATIVE = isForced.NATIVE = 'N';
  31377. var POLYFILL = isForced.POLYFILL = 'P';
  31378. module.exports = isForced;
  31379. /***/ }),
  31380. /***/ 5988:
  31381. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31382. var isObject = __webpack_require__(111);
  31383. var floor = Math.floor;
  31384. // `IsIntegralNumber` abstract operation
  31385. // https://tc39.es/ecma262/#sec-isintegralnumber
  31386. // eslint-disable-next-line es/no-number-isinteger -- safe
  31387. module.exports = Number.isInteger || function isInteger(it) {
  31388. return !isObject(it) && isFinite(it) && floor(it) === it;
  31389. };
  31390. /***/ }),
  31391. /***/ 111:
  31392. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31393. var isCallable = __webpack_require__(614);
  31394. module.exports = function (it) {
  31395. return typeof it == 'object' ? it !== null : isCallable(it);
  31396. };
  31397. /***/ }),
  31398. /***/ 1913:
  31399. /***/ (function(module) {
  31400. module.exports = false;
  31401. /***/ }),
  31402. /***/ 7850:
  31403. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31404. var isObject = __webpack_require__(111);
  31405. var classof = __webpack_require__(4326);
  31406. var wellKnownSymbol = __webpack_require__(5112);
  31407. var MATCH = wellKnownSymbol('match');
  31408. // `IsRegExp` abstract operation
  31409. // https://tc39.es/ecma262/#sec-isregexp
  31410. module.exports = function (it) {
  31411. var isRegExp;
  31412. return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
  31413. };
  31414. /***/ }),
  31415. /***/ 2190:
  31416. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31417. var global = __webpack_require__(7854);
  31418. var getBuiltIn = __webpack_require__(5005);
  31419. var isCallable = __webpack_require__(614);
  31420. var isPrototypeOf = __webpack_require__(7976);
  31421. var USE_SYMBOL_AS_UID = __webpack_require__(3307);
  31422. var Object = global.Object;
  31423. module.exports = USE_SYMBOL_AS_UID ? function (it) {
  31424. return typeof it == 'symbol';
  31425. } : function (it) {
  31426. var $Symbol = getBuiltIn('Symbol');
  31427. return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it));
  31428. };
  31429. /***/ }),
  31430. /***/ 408:
  31431. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31432. var global = __webpack_require__(7854);
  31433. var bind = __webpack_require__(9974);
  31434. var call = __webpack_require__(6916);
  31435. var anObject = __webpack_require__(9670);
  31436. var tryToString = __webpack_require__(6330);
  31437. var isArrayIteratorMethod = __webpack_require__(7659);
  31438. var lengthOfArrayLike = __webpack_require__(6244);
  31439. var isPrototypeOf = __webpack_require__(7976);
  31440. var getIterator = __webpack_require__(8554);
  31441. var getIteratorMethod = __webpack_require__(1246);
  31442. var iteratorClose = __webpack_require__(9212);
  31443. var TypeError = global.TypeError;
  31444. var Result = function (stopped, result) {
  31445. this.stopped = stopped;
  31446. this.result = result;
  31447. };
  31448. var ResultPrototype = Result.prototype;
  31449. module.exports = function (iterable, unboundFunction, options) {
  31450. var that = options && options.that;
  31451. var AS_ENTRIES = !!(options && options.AS_ENTRIES);
  31452. var IS_ITERATOR = !!(options && options.IS_ITERATOR);
  31453. var INTERRUPTED = !!(options && options.INTERRUPTED);
  31454. var fn = bind(unboundFunction, that);
  31455. var iterator, iterFn, index, length, result, next, step;
  31456. var stop = function (condition) {
  31457. if (iterator) iteratorClose(iterator, 'normal', condition);
  31458. return new Result(true, condition);
  31459. };
  31460. var callFn = function (value) {
  31461. if (AS_ENTRIES) {
  31462. anObject(value);
  31463. return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
  31464. } return INTERRUPTED ? fn(value, stop) : fn(value);
  31465. };
  31466. if (IS_ITERATOR) {
  31467. iterator = iterable;
  31468. } else {
  31469. iterFn = getIteratorMethod(iterable);
  31470. if (!iterFn) throw TypeError(tryToString(iterable) + ' is not iterable');
  31471. // optimisation for array iterators
  31472. if (isArrayIteratorMethod(iterFn)) {
  31473. for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
  31474. result = callFn(iterable[index]);
  31475. if (result && isPrototypeOf(ResultPrototype, result)) return result;
  31476. } return new Result(false);
  31477. }
  31478. iterator = getIterator(iterable, iterFn);
  31479. }
  31480. next = iterator.next;
  31481. while (!(step = call(next, iterator)).done) {
  31482. try {
  31483. result = callFn(step.value);
  31484. } catch (error) {
  31485. iteratorClose(iterator, 'throw', error);
  31486. }
  31487. if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
  31488. } return new Result(false);
  31489. };
  31490. /***/ }),
  31491. /***/ 9212:
  31492. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31493. var call = __webpack_require__(6916);
  31494. var anObject = __webpack_require__(9670);
  31495. var getMethod = __webpack_require__(8173);
  31496. module.exports = function (iterator, kind, value) {
  31497. var innerResult, innerError;
  31498. anObject(iterator);
  31499. try {
  31500. innerResult = getMethod(iterator, 'return');
  31501. if (!innerResult) {
  31502. if (kind === 'throw') throw value;
  31503. return value;
  31504. }
  31505. innerResult = call(innerResult, iterator);
  31506. } catch (error) {
  31507. innerError = true;
  31508. innerResult = error;
  31509. }
  31510. if (kind === 'throw') throw value;
  31511. if (innerError) throw innerResult;
  31512. anObject(innerResult);
  31513. return value;
  31514. };
  31515. /***/ }),
  31516. /***/ 3383:
  31517. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31518. "use strict";
  31519. var fails = __webpack_require__(7293);
  31520. var isCallable = __webpack_require__(614);
  31521. var create = __webpack_require__(30);
  31522. var getPrototypeOf = __webpack_require__(9518);
  31523. var redefine = __webpack_require__(1320);
  31524. var wellKnownSymbol = __webpack_require__(5112);
  31525. var IS_PURE = __webpack_require__(1913);
  31526. var ITERATOR = wellKnownSymbol('iterator');
  31527. var BUGGY_SAFARI_ITERATORS = false;
  31528. // `%IteratorPrototype%` object
  31529. // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
  31530. var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
  31531. /* eslint-disable es/no-array-prototype-keys -- safe */
  31532. if ([].keys) {
  31533. arrayIterator = [].keys();
  31534. // Safari 8 has buggy iterators w/o `next`
  31535. if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
  31536. else {
  31537. PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
  31538. if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
  31539. }
  31540. }
  31541. var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
  31542. var test = {};
  31543. // FF44- legacy iterators case
  31544. return IteratorPrototype[ITERATOR].call(test) !== test;
  31545. });
  31546. if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
  31547. else if (IS_PURE) IteratorPrototype = create(IteratorPrototype);
  31548. // `%IteratorPrototype%[@@iterator]()` method
  31549. // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
  31550. if (!isCallable(IteratorPrototype[ITERATOR])) {
  31551. redefine(IteratorPrototype, ITERATOR, function () {
  31552. return this;
  31553. });
  31554. }
  31555. module.exports = {
  31556. IteratorPrototype: IteratorPrototype,
  31557. BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
  31558. };
  31559. /***/ }),
  31560. /***/ 7497:
  31561. /***/ (function(module) {
  31562. module.exports = {};
  31563. /***/ }),
  31564. /***/ 6244:
  31565. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31566. var toLength = __webpack_require__(7466);
  31567. // `LengthOfArrayLike` abstract operation
  31568. // https://tc39.es/ecma262/#sec-lengthofarraylike
  31569. module.exports = function (obj) {
  31570. return toLength(obj.length);
  31571. };
  31572. /***/ }),
  31573. /***/ 5948:
  31574. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31575. var global = __webpack_require__(7854);
  31576. var bind = __webpack_require__(9974);
  31577. var getOwnPropertyDescriptor = (__webpack_require__(1236).f);
  31578. var macrotask = (__webpack_require__(261).set);
  31579. var IS_IOS = __webpack_require__(6833);
  31580. var IS_IOS_PEBBLE = __webpack_require__(1528);
  31581. var IS_WEBOS_WEBKIT = __webpack_require__(1036);
  31582. var IS_NODE = __webpack_require__(5268);
  31583. var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
  31584. var document = global.document;
  31585. var process = global.process;
  31586. var Promise = global.Promise;
  31587. // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
  31588. var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
  31589. var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
  31590. var flush, head, last, notify, toggle, node, promise, then;
  31591. // modern engines have queueMicrotask method
  31592. if (!queueMicrotask) {
  31593. flush = function () {
  31594. var parent, fn;
  31595. if (IS_NODE && (parent = process.domain)) parent.exit();
  31596. while (head) {
  31597. fn = head.fn;
  31598. head = head.next;
  31599. try {
  31600. fn();
  31601. } catch (error) {
  31602. if (head) notify();
  31603. else last = undefined;
  31604. throw error;
  31605. }
  31606. } last = undefined;
  31607. if (parent) parent.enter();
  31608. };
  31609. // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
  31610. // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
  31611. if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) {
  31612. toggle = true;
  31613. node = document.createTextNode('');
  31614. new MutationObserver(flush).observe(node, { characterData: true });
  31615. notify = function () {
  31616. node.data = toggle = !toggle;
  31617. };
  31618. // environments with maybe non-completely correct, but existent Promise
  31619. } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) {
  31620. // Promise.resolve without an argument throws an error in LG WebOS 2
  31621. promise = Promise.resolve(undefined);
  31622. // workaround of WebKit ~ iOS Safari 10.1 bug
  31623. promise.constructor = Promise;
  31624. then = bind(promise.then, promise);
  31625. notify = function () {
  31626. then(flush);
  31627. };
  31628. // Node.js without promises
  31629. } else if (IS_NODE) {
  31630. notify = function () {
  31631. process.nextTick(flush);
  31632. };
  31633. // for other environments - macrotask based on:
  31634. // - setImmediate
  31635. // - MessageChannel
  31636. // - window.postMessag
  31637. // - onreadystatechange
  31638. // - setTimeout
  31639. } else {
  31640. // strange IE + webpack dev server bug - use .bind(global)
  31641. macrotask = bind(macrotask, global);
  31642. notify = function () {
  31643. macrotask(flush);
  31644. };
  31645. }
  31646. }
  31647. module.exports = queueMicrotask || function (fn) {
  31648. var task = { fn: fn, next: undefined };
  31649. if (last) last.next = task;
  31650. if (!head) {
  31651. head = task;
  31652. notify();
  31653. } last = task;
  31654. };
  31655. /***/ }),
  31656. /***/ 3366:
  31657. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31658. var global = __webpack_require__(7854);
  31659. module.exports = global.Promise;
  31660. /***/ }),
  31661. /***/ 133:
  31662. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31663. /* eslint-disable es/no-symbol -- required for testing */
  31664. var V8_VERSION = __webpack_require__(7392);
  31665. var fails = __webpack_require__(7293);
  31666. // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
  31667. module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
  31668. var symbol = Symbol();
  31669. // Chrome 38 Symbol has incorrect toString conversion
  31670. // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
  31671. return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
  31672. // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
  31673. !Symbol.sham && V8_VERSION && V8_VERSION < 41;
  31674. });
  31675. /***/ }),
  31676. /***/ 8536:
  31677. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31678. var global = __webpack_require__(7854);
  31679. var isCallable = __webpack_require__(614);
  31680. var inspectSource = __webpack_require__(2788);
  31681. var WeakMap = global.WeakMap;
  31682. module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
  31683. /***/ }),
  31684. /***/ 8523:
  31685. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31686. "use strict";
  31687. var aCallable = __webpack_require__(9662);
  31688. var PromiseCapability = function (C) {
  31689. var resolve, reject;
  31690. this.promise = new C(function ($$resolve, $$reject) {
  31691. if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
  31692. resolve = $$resolve;
  31693. reject = $$reject;
  31694. });
  31695. this.resolve = aCallable(resolve);
  31696. this.reject = aCallable(reject);
  31697. };
  31698. // `NewPromiseCapability` abstract operation
  31699. // https://tc39.es/ecma262/#sec-newpromisecapability
  31700. module.exports.f = function (C) {
  31701. return new PromiseCapability(C);
  31702. };
  31703. /***/ }),
  31704. /***/ 6277:
  31705. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31706. var toString = __webpack_require__(1340);
  31707. module.exports = function (argument, $default) {
  31708. return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument);
  31709. };
  31710. /***/ }),
  31711. /***/ 3929:
  31712. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31713. var global = __webpack_require__(7854);
  31714. var isRegExp = __webpack_require__(7850);
  31715. var TypeError = global.TypeError;
  31716. module.exports = function (it) {
  31717. if (isRegExp(it)) {
  31718. throw TypeError("The method doesn't accept regular expressions");
  31719. } return it;
  31720. };
  31721. /***/ }),
  31722. /***/ 7023:
  31723. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31724. var global = __webpack_require__(7854);
  31725. var globalIsFinite = global.isFinite;
  31726. // `Number.isFinite` method
  31727. // https://tc39.es/ecma262/#sec-number.isfinite
  31728. // eslint-disable-next-line es/no-number-isfinite -- safe
  31729. module.exports = Number.isFinite || function isFinite(it) {
  31730. return typeof it == 'number' && globalIsFinite(it);
  31731. };
  31732. /***/ }),
  31733. /***/ 1574:
  31734. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31735. "use strict";
  31736. var DESCRIPTORS = __webpack_require__(9781);
  31737. var uncurryThis = __webpack_require__(1702);
  31738. var call = __webpack_require__(6916);
  31739. var fails = __webpack_require__(7293);
  31740. var objectKeys = __webpack_require__(1956);
  31741. var getOwnPropertySymbolsModule = __webpack_require__(5181);
  31742. var propertyIsEnumerableModule = __webpack_require__(5296);
  31743. var toObject = __webpack_require__(7908);
  31744. var IndexedObject = __webpack_require__(8361);
  31745. // eslint-disable-next-line es/no-object-assign -- safe
  31746. var $assign = Object.assign;
  31747. // eslint-disable-next-line es/no-object-defineproperty -- required for testing
  31748. var defineProperty = Object.defineProperty;
  31749. var concat = uncurryThis([].concat);
  31750. // `Object.assign` method
  31751. // https://tc39.es/ecma262/#sec-object.assign
  31752. module.exports = !$assign || fails(function () {
  31753. // should have correct order of operations (Edge bug)
  31754. if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
  31755. enumerable: true,
  31756. get: function () {
  31757. defineProperty(this, 'b', {
  31758. value: 3,
  31759. enumerable: false
  31760. });
  31761. }
  31762. }), { b: 2 })).b !== 1) return true;
  31763. // should work with symbols and should have deterministic property order (V8 bug)
  31764. var A = {};
  31765. var B = {};
  31766. // eslint-disable-next-line es/no-symbol -- safe
  31767. var symbol = Symbol();
  31768. var alphabet = 'abcdefghijklmnopqrst';
  31769. A[symbol] = 7;
  31770. alphabet.split('').forEach(function (chr) { B[chr] = chr; });
  31771. return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
  31772. }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
  31773. var T = toObject(target);
  31774. var argumentsLength = arguments.length;
  31775. var index = 1;
  31776. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  31777. var propertyIsEnumerable = propertyIsEnumerableModule.f;
  31778. while (argumentsLength > index) {
  31779. var S = IndexedObject(arguments[index++]);
  31780. var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
  31781. var length = keys.length;
  31782. var j = 0;
  31783. var key;
  31784. while (length > j) {
  31785. key = keys[j++];
  31786. if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key];
  31787. }
  31788. } return T;
  31789. } : $assign;
  31790. /***/ }),
  31791. /***/ 30:
  31792. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31793. /* global ActiveXObject -- old IE, WSH */
  31794. var anObject = __webpack_require__(9670);
  31795. var defineProperties = __webpack_require__(6048);
  31796. var enumBugKeys = __webpack_require__(748);
  31797. var hiddenKeys = __webpack_require__(3501);
  31798. var html = __webpack_require__(490);
  31799. var documentCreateElement = __webpack_require__(317);
  31800. var sharedKey = __webpack_require__(6200);
  31801. var GT = '>';
  31802. var LT = '<';
  31803. var PROTOTYPE = 'prototype';
  31804. var SCRIPT = 'script';
  31805. var IE_PROTO = sharedKey('IE_PROTO');
  31806. var EmptyConstructor = function () { /* empty */ };
  31807. var scriptTag = function (content) {
  31808. return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
  31809. };
  31810. // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
  31811. var NullProtoObjectViaActiveX = function (activeXDocument) {
  31812. activeXDocument.write(scriptTag(''));
  31813. activeXDocument.close();
  31814. var temp = activeXDocument.parentWindow.Object;
  31815. activeXDocument = null; // avoid memory leak
  31816. return temp;
  31817. };
  31818. // Create object with fake `null` prototype: use iframe Object with cleared prototype
  31819. var NullProtoObjectViaIFrame = function () {
  31820. // Thrash, waste and sodomy: IE GC bug
  31821. var iframe = documentCreateElement('iframe');
  31822. var JS = 'java' + SCRIPT + ':';
  31823. var iframeDocument;
  31824. iframe.style.display = 'none';
  31825. html.appendChild(iframe);
  31826. // https://github.com/zloirock/core-js/issues/475
  31827. iframe.src = String(JS);
  31828. iframeDocument = iframe.contentWindow.document;
  31829. iframeDocument.open();
  31830. iframeDocument.write(scriptTag('document.F=Object'));
  31831. iframeDocument.close();
  31832. return iframeDocument.F;
  31833. };
  31834. // Check for document.domain and active x support
  31835. // No need to use active x approach when document.domain is not set
  31836. // see https://github.com/es-shims/es5-shim/issues/150
  31837. // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
  31838. // avoid IE GC bug
  31839. var activeXDocument;
  31840. var NullProtoObject = function () {
  31841. try {
  31842. activeXDocument = new ActiveXObject('htmlfile');
  31843. } catch (error) { /* ignore */ }
  31844. NullProtoObject = typeof document != 'undefined'
  31845. ? document.domain && activeXDocument
  31846. ? NullProtoObjectViaActiveX(activeXDocument) // old IE
  31847. : NullProtoObjectViaIFrame()
  31848. : NullProtoObjectViaActiveX(activeXDocument); // WSH
  31849. var length = enumBugKeys.length;
  31850. while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
  31851. return NullProtoObject();
  31852. };
  31853. hiddenKeys[IE_PROTO] = true;
  31854. // `Object.create` method
  31855. // https://tc39.es/ecma262/#sec-object.create
  31856. module.exports = Object.create || function create(O, Properties) {
  31857. var result;
  31858. if (O !== null) {
  31859. EmptyConstructor[PROTOTYPE] = anObject(O);
  31860. result = new EmptyConstructor();
  31861. EmptyConstructor[PROTOTYPE] = null;
  31862. // add "__proto__" for Object.getPrototypeOf polyfill
  31863. result[IE_PROTO] = O;
  31864. } else result = NullProtoObject();
  31865. return Properties === undefined ? result : defineProperties(result, Properties);
  31866. };
  31867. /***/ }),
  31868. /***/ 6048:
  31869. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31870. var DESCRIPTORS = __webpack_require__(9781);
  31871. var definePropertyModule = __webpack_require__(3070);
  31872. var anObject = __webpack_require__(9670);
  31873. var toIndexedObject = __webpack_require__(5656);
  31874. var objectKeys = __webpack_require__(1956);
  31875. // `Object.defineProperties` method
  31876. // https://tc39.es/ecma262/#sec-object.defineproperties
  31877. // eslint-disable-next-line es/no-object-defineproperties -- safe
  31878. module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
  31879. anObject(O);
  31880. var props = toIndexedObject(Properties);
  31881. var keys = objectKeys(Properties);
  31882. var length = keys.length;
  31883. var index = 0;
  31884. var key;
  31885. while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
  31886. return O;
  31887. };
  31888. /***/ }),
  31889. /***/ 3070:
  31890. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  31891. var global = __webpack_require__(7854);
  31892. var DESCRIPTORS = __webpack_require__(9781);
  31893. var IE8_DOM_DEFINE = __webpack_require__(4664);
  31894. var anObject = __webpack_require__(9670);
  31895. var toPropertyKey = __webpack_require__(4948);
  31896. var TypeError = global.TypeError;
  31897. // eslint-disable-next-line es/no-object-defineproperty -- safe
  31898. var $defineProperty = Object.defineProperty;
  31899. // `Object.defineProperty` method
  31900. // https://tc39.es/ecma262/#sec-object.defineproperty
  31901. exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {
  31902. anObject(O);
  31903. P = toPropertyKey(P);
  31904. anObject(Attributes);
  31905. if (IE8_DOM_DEFINE) try {
  31906. return $defineProperty(O, P, Attributes);
  31907. } catch (error) { /* empty */ }
  31908. if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
  31909. if ('value' in Attributes) O[P] = Attributes.value;
  31910. return O;
  31911. };
  31912. /***/ }),
  31913. /***/ 1236:
  31914. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  31915. var DESCRIPTORS = __webpack_require__(9781);
  31916. var call = __webpack_require__(6916);
  31917. var propertyIsEnumerableModule = __webpack_require__(5296);
  31918. var createPropertyDescriptor = __webpack_require__(9114);
  31919. var toIndexedObject = __webpack_require__(5656);
  31920. var toPropertyKey = __webpack_require__(4948);
  31921. var hasOwn = __webpack_require__(2597);
  31922. var IE8_DOM_DEFINE = __webpack_require__(4664);
  31923. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  31924. var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  31925. // `Object.getOwnPropertyDescriptor` method
  31926. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  31927. exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
  31928. O = toIndexedObject(O);
  31929. P = toPropertyKey(P);
  31930. if (IE8_DOM_DEFINE) try {
  31931. return $getOwnPropertyDescriptor(O, P);
  31932. } catch (error) { /* empty */ }
  31933. if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]);
  31934. };
  31935. /***/ }),
  31936. /***/ 1156:
  31937. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31938. /* eslint-disable es/no-object-getownpropertynames -- safe */
  31939. var classof = __webpack_require__(4326);
  31940. var toIndexedObject = __webpack_require__(5656);
  31941. var $getOwnPropertyNames = (__webpack_require__(8006).f);
  31942. var arraySlice = __webpack_require__(206);
  31943. var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
  31944. ? Object.getOwnPropertyNames(window) : [];
  31945. var getWindowNames = function (it) {
  31946. try {
  31947. return $getOwnPropertyNames(it);
  31948. } catch (error) {
  31949. return arraySlice(windowNames);
  31950. }
  31951. };
  31952. // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
  31953. module.exports.f = function getOwnPropertyNames(it) {
  31954. return windowNames && classof(it) == 'Window'
  31955. ? getWindowNames(it)
  31956. : $getOwnPropertyNames(toIndexedObject(it));
  31957. };
  31958. /***/ }),
  31959. /***/ 8006:
  31960. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  31961. var internalObjectKeys = __webpack_require__(6324);
  31962. var enumBugKeys = __webpack_require__(748);
  31963. var hiddenKeys = enumBugKeys.concat('length', 'prototype');
  31964. // `Object.getOwnPropertyNames` method
  31965. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  31966. // eslint-disable-next-line es/no-object-getownpropertynames -- safe
  31967. exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
  31968. return internalObjectKeys(O, hiddenKeys);
  31969. };
  31970. /***/ }),
  31971. /***/ 5181:
  31972. /***/ (function(__unused_webpack_module, exports) {
  31973. // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
  31974. exports.f = Object.getOwnPropertySymbols;
  31975. /***/ }),
  31976. /***/ 9518:
  31977. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  31978. var global = __webpack_require__(7854);
  31979. var hasOwn = __webpack_require__(2597);
  31980. var isCallable = __webpack_require__(614);
  31981. var toObject = __webpack_require__(7908);
  31982. var sharedKey = __webpack_require__(6200);
  31983. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);
  31984. var IE_PROTO = sharedKey('IE_PROTO');
  31985. var Object = global.Object;
  31986. var ObjectPrototype = Object.prototype;
  31987. // `Object.getPrototypeOf` method
  31988. // https://tc39.es/ecma262/#sec-object.getprototypeof
  31989. module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
  31990. var object = toObject(O);
  31991. if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
  31992. var constructor = object.constructor;
  31993. if (isCallable(constructor) && object instanceof constructor) {
  31994. return constructor.prototype;
  31995. } return object instanceof Object ? ObjectPrototype : null;
  31996. };
  31997. /***/ }),
  31998. /***/ 7976:
  31999. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32000. var uncurryThis = __webpack_require__(1702);
  32001. module.exports = uncurryThis({}.isPrototypeOf);
  32002. /***/ }),
  32003. /***/ 6324:
  32004. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32005. var uncurryThis = __webpack_require__(1702);
  32006. var hasOwn = __webpack_require__(2597);
  32007. var toIndexedObject = __webpack_require__(5656);
  32008. var indexOf = (__webpack_require__(1318).indexOf);
  32009. var hiddenKeys = __webpack_require__(3501);
  32010. var push = uncurryThis([].push);
  32011. module.exports = function (object, names) {
  32012. var O = toIndexedObject(object);
  32013. var i = 0;
  32014. var result = [];
  32015. var key;
  32016. for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key);
  32017. // Don't enum bug & hidden keys
  32018. while (names.length > i) if (hasOwn(O, key = names[i++])) {
  32019. ~indexOf(result, key) || push(result, key);
  32020. }
  32021. return result;
  32022. };
  32023. /***/ }),
  32024. /***/ 1956:
  32025. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32026. var internalObjectKeys = __webpack_require__(6324);
  32027. var enumBugKeys = __webpack_require__(748);
  32028. // `Object.keys` method
  32029. // https://tc39.es/ecma262/#sec-object.keys
  32030. // eslint-disable-next-line es/no-object-keys -- safe
  32031. module.exports = Object.keys || function keys(O) {
  32032. return internalObjectKeys(O, enumBugKeys);
  32033. };
  32034. /***/ }),
  32035. /***/ 5296:
  32036. /***/ (function(__unused_webpack_module, exports) {
  32037. "use strict";
  32038. var $propertyIsEnumerable = {}.propertyIsEnumerable;
  32039. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  32040. var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
  32041. // Nashorn ~ JDK8 bug
  32042. var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
  32043. // `Object.prototype.propertyIsEnumerable` method implementation
  32044. // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
  32045. exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
  32046. var descriptor = getOwnPropertyDescriptor(this, V);
  32047. return !!descriptor && descriptor.enumerable;
  32048. } : $propertyIsEnumerable;
  32049. /***/ }),
  32050. /***/ 7674:
  32051. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32052. /* eslint-disable no-proto -- safe */
  32053. var uncurryThis = __webpack_require__(1702);
  32054. var anObject = __webpack_require__(9670);
  32055. var aPossiblePrototype = __webpack_require__(6077);
  32056. // `Object.setPrototypeOf` method
  32057. // https://tc39.es/ecma262/#sec-object.setprototypeof
  32058. // Works with __proto__ only. Old v8 can't work with null proto objects.
  32059. // eslint-disable-next-line es/no-object-setprototypeof -- safe
  32060. module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
  32061. var CORRECT_SETTER = false;
  32062. var test = {};
  32063. var setter;
  32064. try {
  32065. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  32066. setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
  32067. setter(test, []);
  32068. CORRECT_SETTER = test instanceof Array;
  32069. } catch (error) { /* empty */ }
  32070. return function setPrototypeOf(O, proto) {
  32071. anObject(O);
  32072. aPossiblePrototype(proto);
  32073. if (CORRECT_SETTER) setter(O, proto);
  32074. else O.__proto__ = proto;
  32075. return O;
  32076. };
  32077. }() : undefined);
  32078. /***/ }),
  32079. /***/ 4699:
  32080. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32081. var DESCRIPTORS = __webpack_require__(9781);
  32082. var uncurryThis = __webpack_require__(1702);
  32083. var objectKeys = __webpack_require__(1956);
  32084. var toIndexedObject = __webpack_require__(5656);
  32085. var $propertyIsEnumerable = (__webpack_require__(5296).f);
  32086. var propertyIsEnumerable = uncurryThis($propertyIsEnumerable);
  32087. var push = uncurryThis([].push);
  32088. // `Object.{ entries, values }` methods implementation
  32089. var createMethod = function (TO_ENTRIES) {
  32090. return function (it) {
  32091. var O = toIndexedObject(it);
  32092. var keys = objectKeys(O);
  32093. var length = keys.length;
  32094. var i = 0;
  32095. var result = [];
  32096. var key;
  32097. while (length > i) {
  32098. key = keys[i++];
  32099. if (!DESCRIPTORS || propertyIsEnumerable(O, key)) {
  32100. push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
  32101. }
  32102. }
  32103. return result;
  32104. };
  32105. };
  32106. module.exports = {
  32107. // `Object.entries` method
  32108. // https://tc39.es/ecma262/#sec-object.entries
  32109. entries: createMethod(true),
  32110. // `Object.values` method
  32111. // https://tc39.es/ecma262/#sec-object.values
  32112. values: createMethod(false)
  32113. };
  32114. /***/ }),
  32115. /***/ 288:
  32116. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32117. "use strict";
  32118. var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
  32119. var classof = __webpack_require__(648);
  32120. // `Object.prototype.toString` method implementation
  32121. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  32122. module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
  32123. return '[object ' + classof(this) + ']';
  32124. };
  32125. /***/ }),
  32126. /***/ 2140:
  32127. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32128. var global = __webpack_require__(7854);
  32129. var call = __webpack_require__(6916);
  32130. var isCallable = __webpack_require__(614);
  32131. var isObject = __webpack_require__(111);
  32132. var TypeError = global.TypeError;
  32133. // `OrdinaryToPrimitive` abstract operation
  32134. // https://tc39.es/ecma262/#sec-ordinarytoprimitive
  32135. module.exports = function (input, pref) {
  32136. var fn, val;
  32137. if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  32138. if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val;
  32139. if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val;
  32140. throw TypeError("Can't convert object to primitive value");
  32141. };
  32142. /***/ }),
  32143. /***/ 3887:
  32144. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32145. var getBuiltIn = __webpack_require__(5005);
  32146. var uncurryThis = __webpack_require__(1702);
  32147. var getOwnPropertyNamesModule = __webpack_require__(8006);
  32148. var getOwnPropertySymbolsModule = __webpack_require__(5181);
  32149. var anObject = __webpack_require__(9670);
  32150. var concat = uncurryThis([].concat);
  32151. // all object keys, includes non-enumerable and symbols
  32152. module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
  32153. var keys = getOwnPropertyNamesModule.f(anObject(it));
  32154. var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
  32155. return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
  32156. };
  32157. /***/ }),
  32158. /***/ 857:
  32159. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32160. var global = __webpack_require__(7854);
  32161. module.exports = global;
  32162. /***/ }),
  32163. /***/ 2534:
  32164. /***/ (function(module) {
  32165. module.exports = function (exec) {
  32166. try {
  32167. return { error: false, value: exec() };
  32168. } catch (error) {
  32169. return { error: true, value: error };
  32170. }
  32171. };
  32172. /***/ }),
  32173. /***/ 9478:
  32174. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32175. var anObject = __webpack_require__(9670);
  32176. var isObject = __webpack_require__(111);
  32177. var newPromiseCapability = __webpack_require__(8523);
  32178. module.exports = function (C, x) {
  32179. anObject(C);
  32180. if (isObject(x) && x.constructor === C) return x;
  32181. var promiseCapability = newPromiseCapability.f(C);
  32182. var resolve = promiseCapability.resolve;
  32183. resolve(x);
  32184. return promiseCapability.promise;
  32185. };
  32186. /***/ }),
  32187. /***/ 2248:
  32188. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32189. var redefine = __webpack_require__(1320);
  32190. module.exports = function (target, src, options) {
  32191. for (var key in src) redefine(target, key, src[key], options);
  32192. return target;
  32193. };
  32194. /***/ }),
  32195. /***/ 1320:
  32196. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32197. var global = __webpack_require__(7854);
  32198. var isCallable = __webpack_require__(614);
  32199. var hasOwn = __webpack_require__(2597);
  32200. var createNonEnumerableProperty = __webpack_require__(8880);
  32201. var setGlobal = __webpack_require__(3505);
  32202. var inspectSource = __webpack_require__(2788);
  32203. var InternalStateModule = __webpack_require__(9909);
  32204. var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(6530).CONFIGURABLE);
  32205. var getInternalState = InternalStateModule.get;
  32206. var enforceInternalState = InternalStateModule.enforce;
  32207. var TEMPLATE = String(String).split('String');
  32208. (module.exports = function (O, key, value, options) {
  32209. var unsafe = options ? !!options.unsafe : false;
  32210. var simple = options ? !!options.enumerable : false;
  32211. var noTargetGet = options ? !!options.noTargetGet : false;
  32212. var name = options && options.name !== undefined ? options.name : key;
  32213. var state;
  32214. if (isCallable(value)) {
  32215. if (String(name).slice(0, 7) === 'Symbol(') {
  32216. name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
  32217. }
  32218. if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
  32219. createNonEnumerableProperty(value, 'name', name);
  32220. }
  32221. state = enforceInternalState(value);
  32222. if (!state.source) {
  32223. state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
  32224. }
  32225. }
  32226. if (O === global) {
  32227. if (simple) O[key] = value;
  32228. else setGlobal(key, value);
  32229. return;
  32230. } else if (!unsafe) {
  32231. delete O[key];
  32232. } else if (!noTargetGet && O[key]) {
  32233. simple = true;
  32234. }
  32235. if (simple) O[key] = value;
  32236. else createNonEnumerableProperty(O, key, value);
  32237. // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
  32238. })(Function.prototype, 'toString', function toString() {
  32239. return isCallable(this) && getInternalState(this).source || inspectSource(this);
  32240. });
  32241. /***/ }),
  32242. /***/ 7651:
  32243. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32244. var global = __webpack_require__(7854);
  32245. var call = __webpack_require__(6916);
  32246. var anObject = __webpack_require__(9670);
  32247. var isCallable = __webpack_require__(614);
  32248. var classof = __webpack_require__(4326);
  32249. var regexpExec = __webpack_require__(2261);
  32250. var TypeError = global.TypeError;
  32251. // `RegExpExec` abstract operation
  32252. // https://tc39.es/ecma262/#sec-regexpexec
  32253. module.exports = function (R, S) {
  32254. var exec = R.exec;
  32255. if (isCallable(exec)) {
  32256. var result = call(exec, R, S);
  32257. if (result !== null) anObject(result);
  32258. return result;
  32259. }
  32260. if (classof(R) === 'RegExp') return call(regexpExec, R, S);
  32261. throw TypeError('RegExp#exec called on incompatible receiver');
  32262. };
  32263. /***/ }),
  32264. /***/ 2261:
  32265. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32266. "use strict";
  32267. /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
  32268. /* eslint-disable regexp/no-useless-quantifier -- testing */
  32269. var call = __webpack_require__(6916);
  32270. var uncurryThis = __webpack_require__(1702);
  32271. var toString = __webpack_require__(1340);
  32272. var regexpFlags = __webpack_require__(7066);
  32273. var stickyHelpers = __webpack_require__(2999);
  32274. var shared = __webpack_require__(2309);
  32275. var create = __webpack_require__(30);
  32276. var getInternalState = (__webpack_require__(9909).get);
  32277. var UNSUPPORTED_DOT_ALL = __webpack_require__(9441);
  32278. var UNSUPPORTED_NCG = __webpack_require__(7168);
  32279. var nativeReplace = shared('native-string-replace', String.prototype.replace);
  32280. var nativeExec = RegExp.prototype.exec;
  32281. var patchedExec = nativeExec;
  32282. var charAt = uncurryThis(''.charAt);
  32283. var indexOf = uncurryThis(''.indexOf);
  32284. var replace = uncurryThis(''.replace);
  32285. var stringSlice = uncurryThis(''.slice);
  32286. var UPDATES_LAST_INDEX_WRONG = (function () {
  32287. var re1 = /a/;
  32288. var re2 = /b*/g;
  32289. call(nativeExec, re1, 'a');
  32290. call(nativeExec, re2, 'a');
  32291. return re1.lastIndex !== 0 || re2.lastIndex !== 0;
  32292. })();
  32293. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
  32294. // nonparticipating capturing group, copied from es5-shim's String#split patch.
  32295. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
  32296. var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
  32297. if (PATCH) {
  32298. // eslint-disable-next-line max-statements -- TODO
  32299. patchedExec = function exec(string) {
  32300. var re = this;
  32301. var state = getInternalState(re);
  32302. var str = toString(string);
  32303. var raw = state.raw;
  32304. var result, reCopy, lastIndex, match, i, object, group;
  32305. if (raw) {
  32306. raw.lastIndex = re.lastIndex;
  32307. result = call(patchedExec, raw, str);
  32308. re.lastIndex = raw.lastIndex;
  32309. return result;
  32310. }
  32311. var groups = state.groups;
  32312. var sticky = UNSUPPORTED_Y && re.sticky;
  32313. var flags = call(regexpFlags, re);
  32314. var source = re.source;
  32315. var charsAdded = 0;
  32316. var strCopy = str;
  32317. if (sticky) {
  32318. flags = replace(flags, 'y', '');
  32319. if (indexOf(flags, 'g') === -1) {
  32320. flags += 'g';
  32321. }
  32322. strCopy = stringSlice(str, re.lastIndex);
  32323. // Support anchored sticky behavior.
  32324. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
  32325. source = '(?: ' + source + ')';
  32326. strCopy = ' ' + strCopy;
  32327. charsAdded++;
  32328. }
  32329. // ^(? + rx + ) is needed, in combination with some str slicing, to
  32330. // simulate the 'y' flag.
  32331. reCopy = new RegExp('^(?:' + source + ')', flags);
  32332. }
  32333. if (NPCG_INCLUDED) {
  32334. reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
  32335. }
  32336. if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
  32337. match = call(nativeExec, sticky ? reCopy : re, strCopy);
  32338. if (sticky) {
  32339. if (match) {
  32340. match.input = stringSlice(match.input, charsAdded);
  32341. match[0] = stringSlice(match[0], charsAdded);
  32342. match.index = re.lastIndex;
  32343. re.lastIndex += match[0].length;
  32344. } else re.lastIndex = 0;
  32345. } else if (UPDATES_LAST_INDEX_WRONG && match) {
  32346. re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
  32347. }
  32348. if (NPCG_INCLUDED && match && match.length > 1) {
  32349. // Fix browsers whose `exec` methods don't consistently return `undefined`
  32350. // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
  32351. call(nativeReplace, match[0], reCopy, function () {
  32352. for (i = 1; i < arguments.length - 2; i++) {
  32353. if (arguments[i] === undefined) match[i] = undefined;
  32354. }
  32355. });
  32356. }
  32357. if (match && groups) {
  32358. match.groups = object = create(null);
  32359. for (i = 0; i < groups.length; i++) {
  32360. group = groups[i];
  32361. object[group[0]] = match[group[1]];
  32362. }
  32363. }
  32364. return match;
  32365. };
  32366. }
  32367. module.exports = patchedExec;
  32368. /***/ }),
  32369. /***/ 7066:
  32370. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32371. "use strict";
  32372. var anObject = __webpack_require__(9670);
  32373. // `RegExp.prototype.flags` getter implementation
  32374. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  32375. module.exports = function () {
  32376. var that = anObject(this);
  32377. var result = '';
  32378. if (that.global) result += 'g';
  32379. if (that.ignoreCase) result += 'i';
  32380. if (that.multiline) result += 'm';
  32381. if (that.dotAll) result += 's';
  32382. if (that.unicode) result += 'u';
  32383. if (that.sticky) result += 'y';
  32384. return result;
  32385. };
  32386. /***/ }),
  32387. /***/ 2999:
  32388. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  32389. var fails = __webpack_require__(7293);
  32390. var global = __webpack_require__(7854);
  32391. // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
  32392. var $RegExp = global.RegExp;
  32393. exports.UNSUPPORTED_Y = fails(function () {
  32394. var re = $RegExp('a', 'y');
  32395. re.lastIndex = 2;
  32396. return re.exec('abcd') != null;
  32397. });
  32398. exports.BROKEN_CARET = fails(function () {
  32399. // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
  32400. var re = $RegExp('^r', 'gy');
  32401. re.lastIndex = 2;
  32402. return re.exec('str') != null;
  32403. });
  32404. /***/ }),
  32405. /***/ 9441:
  32406. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32407. var fails = __webpack_require__(7293);
  32408. var global = __webpack_require__(7854);
  32409. // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
  32410. var $RegExp = global.RegExp;
  32411. module.exports = fails(function () {
  32412. var re = $RegExp('.', 's');
  32413. return !(re.dotAll && re.exec('\n') && re.flags === 's');
  32414. });
  32415. /***/ }),
  32416. /***/ 7168:
  32417. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32418. var fails = __webpack_require__(7293);
  32419. var global = __webpack_require__(7854);
  32420. // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
  32421. var $RegExp = global.RegExp;
  32422. module.exports = fails(function () {
  32423. var re = $RegExp('(?<a>b)', 'g');
  32424. return re.exec('b').groups.a !== 'b' ||
  32425. 'b'.replace(re, '$<a>c') !== 'bc';
  32426. });
  32427. /***/ }),
  32428. /***/ 4488:
  32429. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32430. var global = __webpack_require__(7854);
  32431. var TypeError = global.TypeError;
  32432. // `RequireObjectCoercible` abstract operation
  32433. // https://tc39.es/ecma262/#sec-requireobjectcoercible
  32434. module.exports = function (it) {
  32435. if (it == undefined) throw TypeError("Can't call method on " + it);
  32436. return it;
  32437. };
  32438. /***/ }),
  32439. /***/ 3505:
  32440. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32441. var global = __webpack_require__(7854);
  32442. // eslint-disable-next-line es/no-object-defineproperty -- safe
  32443. var defineProperty = Object.defineProperty;
  32444. module.exports = function (key, value) {
  32445. try {
  32446. defineProperty(global, key, { value: value, configurable: true, writable: true });
  32447. } catch (error) {
  32448. global[key] = value;
  32449. } return value;
  32450. };
  32451. /***/ }),
  32452. /***/ 6340:
  32453. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32454. "use strict";
  32455. var getBuiltIn = __webpack_require__(5005);
  32456. var definePropertyModule = __webpack_require__(3070);
  32457. var wellKnownSymbol = __webpack_require__(5112);
  32458. var DESCRIPTORS = __webpack_require__(9781);
  32459. var SPECIES = wellKnownSymbol('species');
  32460. module.exports = function (CONSTRUCTOR_NAME) {
  32461. var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
  32462. var defineProperty = definePropertyModule.f;
  32463. if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
  32464. defineProperty(Constructor, SPECIES, {
  32465. configurable: true,
  32466. get: function () { return this; }
  32467. });
  32468. }
  32469. };
  32470. /***/ }),
  32471. /***/ 8003:
  32472. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32473. var defineProperty = (__webpack_require__(3070).f);
  32474. var hasOwn = __webpack_require__(2597);
  32475. var wellKnownSymbol = __webpack_require__(5112);
  32476. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  32477. module.exports = function (it, TAG, STATIC) {
  32478. if (it && !hasOwn(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
  32479. defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
  32480. }
  32481. };
  32482. /***/ }),
  32483. /***/ 6200:
  32484. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32485. var shared = __webpack_require__(2309);
  32486. var uid = __webpack_require__(9711);
  32487. var keys = shared('keys');
  32488. module.exports = function (key) {
  32489. return keys[key] || (keys[key] = uid(key));
  32490. };
  32491. /***/ }),
  32492. /***/ 5465:
  32493. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32494. var global = __webpack_require__(7854);
  32495. var setGlobal = __webpack_require__(3505);
  32496. var SHARED = '__core-js_shared__';
  32497. var store = global[SHARED] || setGlobal(SHARED, {});
  32498. module.exports = store;
  32499. /***/ }),
  32500. /***/ 2309:
  32501. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32502. var IS_PURE = __webpack_require__(1913);
  32503. var store = __webpack_require__(5465);
  32504. (module.exports = function (key, value) {
  32505. return store[key] || (store[key] = value !== undefined ? value : {});
  32506. })('versions', []).push({
  32507. version: '3.19.0',
  32508. mode: IS_PURE ? 'pure' : 'global',
  32509. copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
  32510. });
  32511. /***/ }),
  32512. /***/ 6707:
  32513. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32514. var anObject = __webpack_require__(9670);
  32515. var aConstructor = __webpack_require__(9483);
  32516. var wellKnownSymbol = __webpack_require__(5112);
  32517. var SPECIES = wellKnownSymbol('species');
  32518. // `SpeciesConstructor` abstract operation
  32519. // https://tc39.es/ecma262/#sec-speciesconstructor
  32520. module.exports = function (O, defaultConstructor) {
  32521. var C = anObject(O).constructor;
  32522. var S;
  32523. return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S);
  32524. };
  32525. /***/ }),
  32526. /***/ 3429:
  32527. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32528. var fails = __webpack_require__(7293);
  32529. // check the existence of a method, lowercase
  32530. // of a tag and escaping quotes in arguments
  32531. module.exports = function (METHOD_NAME) {
  32532. return fails(function () {
  32533. var test = ''[METHOD_NAME]('"');
  32534. return test !== test.toLowerCase() || test.split('"').length > 3;
  32535. });
  32536. };
  32537. /***/ }),
  32538. /***/ 8710:
  32539. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32540. var uncurryThis = __webpack_require__(1702);
  32541. var toIntegerOrInfinity = __webpack_require__(9303);
  32542. var toString = __webpack_require__(1340);
  32543. var requireObjectCoercible = __webpack_require__(4488);
  32544. var charAt = uncurryThis(''.charAt);
  32545. var charCodeAt = uncurryThis(''.charCodeAt);
  32546. var stringSlice = uncurryThis(''.slice);
  32547. var createMethod = function (CONVERT_TO_STRING) {
  32548. return function ($this, pos) {
  32549. var S = toString(requireObjectCoercible($this));
  32550. var position = toIntegerOrInfinity(pos);
  32551. var size = S.length;
  32552. var first, second;
  32553. if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
  32554. first = charCodeAt(S, position);
  32555. return first < 0xD800 || first > 0xDBFF || position + 1 === size
  32556. || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
  32557. ? CONVERT_TO_STRING
  32558. ? charAt(S, position)
  32559. : first
  32560. : CONVERT_TO_STRING
  32561. ? stringSlice(S, position, position + 2)
  32562. : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
  32563. };
  32564. };
  32565. module.exports = {
  32566. // `String.prototype.codePointAt` method
  32567. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  32568. codeAt: createMethod(false),
  32569. // `String.prototype.at` method
  32570. // https://github.com/mathiasbynens/String.prototype.at
  32571. charAt: createMethod(true)
  32572. };
  32573. /***/ }),
  32574. /***/ 8415:
  32575. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32576. "use strict";
  32577. var global = __webpack_require__(7854);
  32578. var toIntegerOrInfinity = __webpack_require__(9303);
  32579. var toString = __webpack_require__(1340);
  32580. var requireObjectCoercible = __webpack_require__(4488);
  32581. var RangeError = global.RangeError;
  32582. // `String.prototype.repeat` method implementation
  32583. // https://tc39.es/ecma262/#sec-string.prototype.repeat
  32584. module.exports = function repeat(count) {
  32585. var str = toString(requireObjectCoercible(this));
  32586. var result = '';
  32587. var n = toIntegerOrInfinity(count);
  32588. if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
  32589. for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
  32590. return result;
  32591. };
  32592. /***/ }),
  32593. /***/ 6091:
  32594. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32595. var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER);
  32596. var fails = __webpack_require__(7293);
  32597. var whitespaces = __webpack_require__(1361);
  32598. var non = '\u200B\u0085\u180E';
  32599. // check that a method works with the correct list
  32600. // of whitespaces and has a correct name
  32601. module.exports = function (METHOD_NAME) {
  32602. return fails(function () {
  32603. return !!whitespaces[METHOD_NAME]()
  32604. || non[METHOD_NAME]() !== non
  32605. || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME);
  32606. });
  32607. };
  32608. /***/ }),
  32609. /***/ 3111:
  32610. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32611. var uncurryThis = __webpack_require__(1702);
  32612. var requireObjectCoercible = __webpack_require__(4488);
  32613. var toString = __webpack_require__(1340);
  32614. var whitespaces = __webpack_require__(1361);
  32615. var replace = uncurryThis(''.replace);
  32616. var whitespace = '[' + whitespaces + ']';
  32617. var ltrim = RegExp('^' + whitespace + whitespace + '*');
  32618. var rtrim = RegExp(whitespace + whitespace + '*$');
  32619. // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
  32620. var createMethod = function (TYPE) {
  32621. return function ($this) {
  32622. var string = toString(requireObjectCoercible($this));
  32623. if (TYPE & 1) string = replace(string, ltrim, '');
  32624. if (TYPE & 2) string = replace(string, rtrim, '');
  32625. return string;
  32626. };
  32627. };
  32628. module.exports = {
  32629. // `String.prototype.{ trimLeft, trimStart }` methods
  32630. // https://tc39.es/ecma262/#sec-string.prototype.trimstart
  32631. start: createMethod(1),
  32632. // `String.prototype.{ trimRight, trimEnd }` methods
  32633. // https://tc39.es/ecma262/#sec-string.prototype.trimend
  32634. end: createMethod(2),
  32635. // `String.prototype.trim` method
  32636. // https://tc39.es/ecma262/#sec-string.prototype.trim
  32637. trim: createMethod(3)
  32638. };
  32639. /***/ }),
  32640. /***/ 261:
  32641. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32642. var global = __webpack_require__(7854);
  32643. var apply = __webpack_require__(2104);
  32644. var bind = __webpack_require__(9974);
  32645. var isCallable = __webpack_require__(614);
  32646. var hasOwn = __webpack_require__(2597);
  32647. var fails = __webpack_require__(7293);
  32648. var html = __webpack_require__(490);
  32649. var arraySlice = __webpack_require__(206);
  32650. var createElement = __webpack_require__(317);
  32651. var IS_IOS = __webpack_require__(6833);
  32652. var IS_NODE = __webpack_require__(5268);
  32653. var set = global.setImmediate;
  32654. var clear = global.clearImmediate;
  32655. var process = global.process;
  32656. var Dispatch = global.Dispatch;
  32657. var Function = global.Function;
  32658. var MessageChannel = global.MessageChannel;
  32659. var String = global.String;
  32660. var counter = 0;
  32661. var queue = {};
  32662. var ONREADYSTATECHANGE = 'onreadystatechange';
  32663. var location, defer, channel, port;
  32664. try {
  32665. // Deno throws a ReferenceError on `location` access without `--location` flag
  32666. location = global.location;
  32667. } catch (error) { /* empty */ }
  32668. var run = function (id) {
  32669. if (hasOwn(queue, id)) {
  32670. var fn = queue[id];
  32671. delete queue[id];
  32672. fn();
  32673. }
  32674. };
  32675. var runner = function (id) {
  32676. return function () {
  32677. run(id);
  32678. };
  32679. };
  32680. var listener = function (event) {
  32681. run(event.data);
  32682. };
  32683. var post = function (id) {
  32684. // old engines have not location.origin
  32685. global.postMessage(String(id), location.protocol + '//' + location.host);
  32686. };
  32687. // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
  32688. if (!set || !clear) {
  32689. set = function setImmediate(fn) {
  32690. var args = arraySlice(arguments, 1);
  32691. queue[++counter] = function () {
  32692. apply(isCallable(fn) ? fn : Function(fn), undefined, args);
  32693. };
  32694. defer(counter);
  32695. return counter;
  32696. };
  32697. clear = function clearImmediate(id) {
  32698. delete queue[id];
  32699. };
  32700. // Node.js 0.8-
  32701. if (IS_NODE) {
  32702. defer = function (id) {
  32703. process.nextTick(runner(id));
  32704. };
  32705. // Sphere (JS game engine) Dispatch API
  32706. } else if (Dispatch && Dispatch.now) {
  32707. defer = function (id) {
  32708. Dispatch.now(runner(id));
  32709. };
  32710. // Browsers with MessageChannel, includes WebWorkers
  32711. // except iOS - https://github.com/zloirock/core-js/issues/624
  32712. } else if (MessageChannel && !IS_IOS) {
  32713. channel = new MessageChannel();
  32714. port = channel.port2;
  32715. channel.port1.onmessage = listener;
  32716. defer = bind(port.postMessage, port);
  32717. // Browsers with postMessage, skip WebWorkers
  32718. // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
  32719. } else if (
  32720. global.addEventListener &&
  32721. isCallable(global.postMessage) &&
  32722. !global.importScripts &&
  32723. location && location.protocol !== 'file:' &&
  32724. !fails(post)
  32725. ) {
  32726. defer = post;
  32727. global.addEventListener('message', listener, false);
  32728. // IE8-
  32729. } else if (ONREADYSTATECHANGE in createElement('script')) {
  32730. defer = function (id) {
  32731. html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
  32732. html.removeChild(this);
  32733. run(id);
  32734. };
  32735. };
  32736. // Rest old browsers
  32737. } else {
  32738. defer = function (id) {
  32739. setTimeout(runner(id), 0);
  32740. };
  32741. }
  32742. }
  32743. module.exports = {
  32744. set: set,
  32745. clear: clear
  32746. };
  32747. /***/ }),
  32748. /***/ 863:
  32749. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32750. var uncurryThis = __webpack_require__(1702);
  32751. // `thisNumberValue` abstract operation
  32752. // https://tc39.es/ecma262/#sec-thisnumbervalue
  32753. module.exports = uncurryThis(1.0.valueOf);
  32754. /***/ }),
  32755. /***/ 1400:
  32756. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32757. var toIntegerOrInfinity = __webpack_require__(9303);
  32758. var max = Math.max;
  32759. var min = Math.min;
  32760. // Helper for a popular repeating case of the spec:
  32761. // Let integer be ? ToInteger(index).
  32762. // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
  32763. module.exports = function (index, length) {
  32764. var integer = toIntegerOrInfinity(index);
  32765. return integer < 0 ? max(integer + length, 0) : min(integer, length);
  32766. };
  32767. /***/ }),
  32768. /***/ 7067:
  32769. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32770. var global = __webpack_require__(7854);
  32771. var toIntegerOrInfinity = __webpack_require__(9303);
  32772. var toLength = __webpack_require__(7466);
  32773. var RangeError = global.RangeError;
  32774. // `ToIndex` abstract operation
  32775. // https://tc39.es/ecma262/#sec-toindex
  32776. module.exports = function (it) {
  32777. if (it === undefined) return 0;
  32778. var number = toIntegerOrInfinity(it);
  32779. var length = toLength(number);
  32780. if (number !== length) throw RangeError('Wrong length or index');
  32781. return length;
  32782. };
  32783. /***/ }),
  32784. /***/ 5656:
  32785. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32786. // toObject with fallback for non-array-like ES3 strings
  32787. var IndexedObject = __webpack_require__(8361);
  32788. var requireObjectCoercible = __webpack_require__(4488);
  32789. module.exports = function (it) {
  32790. return IndexedObject(requireObjectCoercible(it));
  32791. };
  32792. /***/ }),
  32793. /***/ 9303:
  32794. /***/ (function(module) {
  32795. var ceil = Math.ceil;
  32796. var floor = Math.floor;
  32797. // `ToIntegerOrInfinity` abstract operation
  32798. // https://tc39.es/ecma262/#sec-tointegerorinfinity
  32799. module.exports = function (argument) {
  32800. var number = +argument;
  32801. // eslint-disable-next-line no-self-compare -- safe
  32802. return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
  32803. };
  32804. /***/ }),
  32805. /***/ 7466:
  32806. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32807. var toIntegerOrInfinity = __webpack_require__(9303);
  32808. var min = Math.min;
  32809. // `ToLength` abstract operation
  32810. // https://tc39.es/ecma262/#sec-tolength
  32811. module.exports = function (argument) {
  32812. return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
  32813. };
  32814. /***/ }),
  32815. /***/ 7908:
  32816. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32817. var global = __webpack_require__(7854);
  32818. var requireObjectCoercible = __webpack_require__(4488);
  32819. var Object = global.Object;
  32820. // `ToObject` abstract operation
  32821. // https://tc39.es/ecma262/#sec-toobject
  32822. module.exports = function (argument) {
  32823. return Object(requireObjectCoercible(argument));
  32824. };
  32825. /***/ }),
  32826. /***/ 4590:
  32827. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32828. var global = __webpack_require__(7854);
  32829. var toPositiveInteger = __webpack_require__(3002);
  32830. var RangeError = global.RangeError;
  32831. module.exports = function (it, BYTES) {
  32832. var offset = toPositiveInteger(it);
  32833. if (offset % BYTES) throw RangeError('Wrong offset');
  32834. return offset;
  32835. };
  32836. /***/ }),
  32837. /***/ 3002:
  32838. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32839. var global = __webpack_require__(7854);
  32840. var toIntegerOrInfinity = __webpack_require__(9303);
  32841. var RangeError = global.RangeError;
  32842. module.exports = function (it) {
  32843. var result = toIntegerOrInfinity(it);
  32844. if (result < 0) throw RangeError("The argument can't be less than 0");
  32845. return result;
  32846. };
  32847. /***/ }),
  32848. /***/ 7593:
  32849. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32850. var global = __webpack_require__(7854);
  32851. var call = __webpack_require__(6916);
  32852. var isObject = __webpack_require__(111);
  32853. var isSymbol = __webpack_require__(2190);
  32854. var getMethod = __webpack_require__(8173);
  32855. var ordinaryToPrimitive = __webpack_require__(2140);
  32856. var wellKnownSymbol = __webpack_require__(5112);
  32857. var TypeError = global.TypeError;
  32858. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  32859. // `ToPrimitive` abstract operation
  32860. // https://tc39.es/ecma262/#sec-toprimitive
  32861. module.exports = function (input, pref) {
  32862. if (!isObject(input) || isSymbol(input)) return input;
  32863. var exoticToPrim = getMethod(input, TO_PRIMITIVE);
  32864. var result;
  32865. if (exoticToPrim) {
  32866. if (pref === undefined) pref = 'default';
  32867. result = call(exoticToPrim, input, pref);
  32868. if (!isObject(result) || isSymbol(result)) return result;
  32869. throw TypeError("Can't convert object to primitive value");
  32870. }
  32871. if (pref === undefined) pref = 'number';
  32872. return ordinaryToPrimitive(input, pref);
  32873. };
  32874. /***/ }),
  32875. /***/ 4948:
  32876. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32877. var toPrimitive = __webpack_require__(7593);
  32878. var isSymbol = __webpack_require__(2190);
  32879. // `ToPropertyKey` abstract operation
  32880. // https://tc39.es/ecma262/#sec-topropertykey
  32881. module.exports = function (argument) {
  32882. var key = toPrimitive(argument, 'string');
  32883. return isSymbol(key) ? key : key + '';
  32884. };
  32885. /***/ }),
  32886. /***/ 1694:
  32887. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32888. var wellKnownSymbol = __webpack_require__(5112);
  32889. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  32890. var test = {};
  32891. test[TO_STRING_TAG] = 'z';
  32892. module.exports = String(test) === '[object z]';
  32893. /***/ }),
  32894. /***/ 1340:
  32895. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32896. var global = __webpack_require__(7854);
  32897. var classof = __webpack_require__(648);
  32898. var String = global.String;
  32899. module.exports = function (argument) {
  32900. if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
  32901. return String(argument);
  32902. };
  32903. /***/ }),
  32904. /***/ 6330:
  32905. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32906. var global = __webpack_require__(7854);
  32907. var String = global.String;
  32908. module.exports = function (argument) {
  32909. try {
  32910. return String(argument);
  32911. } catch (error) {
  32912. return 'Object';
  32913. }
  32914. };
  32915. /***/ }),
  32916. /***/ 9843:
  32917. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  32918. "use strict";
  32919. var $ = __webpack_require__(2109);
  32920. var global = __webpack_require__(7854);
  32921. var call = __webpack_require__(6916);
  32922. var DESCRIPTORS = __webpack_require__(9781);
  32923. var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832);
  32924. var ArrayBufferViewCore = __webpack_require__(2094);
  32925. var ArrayBufferModule = __webpack_require__(2091);
  32926. var anInstance = __webpack_require__(5787);
  32927. var createPropertyDescriptor = __webpack_require__(9114);
  32928. var createNonEnumerableProperty = __webpack_require__(8880);
  32929. var isIntegralNumber = __webpack_require__(5988);
  32930. var toLength = __webpack_require__(7466);
  32931. var toIndex = __webpack_require__(7067);
  32932. var toOffset = __webpack_require__(4590);
  32933. var toPropertyKey = __webpack_require__(4948);
  32934. var hasOwn = __webpack_require__(2597);
  32935. var classof = __webpack_require__(648);
  32936. var isObject = __webpack_require__(111);
  32937. var isSymbol = __webpack_require__(2190);
  32938. var create = __webpack_require__(30);
  32939. var isPrototypeOf = __webpack_require__(7976);
  32940. var setPrototypeOf = __webpack_require__(7674);
  32941. var getOwnPropertyNames = (__webpack_require__(8006).f);
  32942. var typedArrayFrom = __webpack_require__(7321);
  32943. var forEach = (__webpack_require__(2092).forEach);
  32944. var setSpecies = __webpack_require__(6340);
  32945. var definePropertyModule = __webpack_require__(3070);
  32946. var getOwnPropertyDescriptorModule = __webpack_require__(1236);
  32947. var InternalStateModule = __webpack_require__(9909);
  32948. var inheritIfRequired = __webpack_require__(9587);
  32949. var getInternalState = InternalStateModule.get;
  32950. var setInternalState = InternalStateModule.set;
  32951. var nativeDefineProperty = definePropertyModule.f;
  32952. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  32953. var round = Math.round;
  32954. var RangeError = global.RangeError;
  32955. var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
  32956. var ArrayBufferPrototype = ArrayBuffer.prototype;
  32957. var DataView = ArrayBufferModule.DataView;
  32958. var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
  32959. var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
  32960. var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
  32961. var TypedArray = ArrayBufferViewCore.TypedArray;
  32962. var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
  32963. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  32964. var isTypedArray = ArrayBufferViewCore.isTypedArray;
  32965. var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
  32966. var WRONG_LENGTH = 'Wrong length';
  32967. var fromList = function (C, list) {
  32968. aTypedArrayConstructor(C);
  32969. var index = 0;
  32970. var length = list.length;
  32971. var result = new C(length);
  32972. while (length > index) result[index] = list[index++];
  32973. return result;
  32974. };
  32975. var addGetter = function (it, key) {
  32976. nativeDefineProperty(it, key, { get: function () {
  32977. return getInternalState(this)[key];
  32978. } });
  32979. };
  32980. var isArrayBuffer = function (it) {
  32981. var klass;
  32982. return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
  32983. };
  32984. var isTypedArrayIndex = function (target, key) {
  32985. return isTypedArray(target)
  32986. && !isSymbol(key)
  32987. && key in target
  32988. && isIntegralNumber(+key)
  32989. && key >= 0;
  32990. };
  32991. var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
  32992. key = toPropertyKey(key);
  32993. return isTypedArrayIndex(target, key)
  32994. ? createPropertyDescriptor(2, target[key])
  32995. : nativeGetOwnPropertyDescriptor(target, key);
  32996. };
  32997. var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
  32998. key = toPropertyKey(key);
  32999. if (isTypedArrayIndex(target, key)
  33000. && isObject(descriptor)
  33001. && hasOwn(descriptor, 'value')
  33002. && !hasOwn(descriptor, 'get')
  33003. && !hasOwn(descriptor, 'set')
  33004. // TODO: add validation descriptor w/o calling accessors
  33005. && !descriptor.configurable
  33006. && (!hasOwn(descriptor, 'writable') || descriptor.writable)
  33007. && (!hasOwn(descriptor, 'enumerable') || descriptor.enumerable)
  33008. ) {
  33009. target[key] = descriptor.value;
  33010. return target;
  33011. } return nativeDefineProperty(target, key, descriptor);
  33012. };
  33013. if (DESCRIPTORS) {
  33014. if (!NATIVE_ARRAY_BUFFER_VIEWS) {
  33015. getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
  33016. definePropertyModule.f = wrappedDefineProperty;
  33017. addGetter(TypedArrayPrototype, 'buffer');
  33018. addGetter(TypedArrayPrototype, 'byteOffset');
  33019. addGetter(TypedArrayPrototype, 'byteLength');
  33020. addGetter(TypedArrayPrototype, 'length');
  33021. }
  33022. $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
  33023. getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
  33024. defineProperty: wrappedDefineProperty
  33025. });
  33026. module.exports = function (TYPE, wrapper, CLAMPED) {
  33027. var BYTES = TYPE.match(/\d+$/)[0] / 8;
  33028. var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
  33029. var GETTER = 'get' + TYPE;
  33030. var SETTER = 'set' + TYPE;
  33031. var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
  33032. var TypedArrayConstructor = NativeTypedArrayConstructor;
  33033. var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
  33034. var exported = {};
  33035. var getter = function (that, index) {
  33036. var data = getInternalState(that);
  33037. return data.view[GETTER](index * BYTES + data.byteOffset, true);
  33038. };
  33039. var setter = function (that, index, value) {
  33040. var data = getInternalState(that);
  33041. if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
  33042. data.view[SETTER](index * BYTES + data.byteOffset, value, true);
  33043. };
  33044. var addElement = function (that, index) {
  33045. nativeDefineProperty(that, index, {
  33046. get: function () {
  33047. return getter(this, index);
  33048. },
  33049. set: function (value) {
  33050. return setter(this, index, value);
  33051. },
  33052. enumerable: true
  33053. });
  33054. };
  33055. if (!NATIVE_ARRAY_BUFFER_VIEWS) {
  33056. TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
  33057. anInstance(that, TypedArrayConstructorPrototype);
  33058. var index = 0;
  33059. var byteOffset = 0;
  33060. var buffer, byteLength, length;
  33061. if (!isObject(data)) {
  33062. length = toIndex(data);
  33063. byteLength = length * BYTES;
  33064. buffer = new ArrayBuffer(byteLength);
  33065. } else if (isArrayBuffer(data)) {
  33066. buffer = data;
  33067. byteOffset = toOffset(offset, BYTES);
  33068. var $len = data.byteLength;
  33069. if ($length === undefined) {
  33070. if ($len % BYTES) throw RangeError(WRONG_LENGTH);
  33071. byteLength = $len - byteOffset;
  33072. if (byteLength < 0) throw RangeError(WRONG_LENGTH);
  33073. } else {
  33074. byteLength = toLength($length) * BYTES;
  33075. if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
  33076. }
  33077. length = byteLength / BYTES;
  33078. } else if (isTypedArray(data)) {
  33079. return fromList(TypedArrayConstructor, data);
  33080. } else {
  33081. return call(typedArrayFrom, TypedArrayConstructor, data);
  33082. }
  33083. setInternalState(that, {
  33084. buffer: buffer,
  33085. byteOffset: byteOffset,
  33086. byteLength: byteLength,
  33087. length: length,
  33088. view: new DataView(buffer)
  33089. });
  33090. while (index < length) addElement(that, index++);
  33091. });
  33092. if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
  33093. TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
  33094. } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
  33095. TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
  33096. anInstance(dummy, TypedArrayConstructorPrototype);
  33097. return inheritIfRequired(function () {
  33098. if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
  33099. if (isArrayBuffer(data)) return $length !== undefined
  33100. ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
  33101. : typedArrayOffset !== undefined
  33102. ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
  33103. : new NativeTypedArrayConstructor(data);
  33104. if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
  33105. return call(typedArrayFrom, TypedArrayConstructor, data);
  33106. }(), dummy, TypedArrayConstructor);
  33107. });
  33108. if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
  33109. forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
  33110. if (!(key in TypedArrayConstructor)) {
  33111. createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
  33112. }
  33113. });
  33114. TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
  33115. }
  33116. if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
  33117. createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
  33118. }
  33119. createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor);
  33120. if (TYPED_ARRAY_TAG) {
  33121. createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
  33122. }
  33123. exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
  33124. $({
  33125. global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS
  33126. }, exported);
  33127. if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
  33128. createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
  33129. }
  33130. if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
  33131. createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
  33132. }
  33133. setSpecies(CONSTRUCTOR_NAME);
  33134. };
  33135. } else module.exports = function () { /* empty */ };
  33136. /***/ }),
  33137. /***/ 3832:
  33138. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  33139. /* eslint-disable no-new -- required for testing */
  33140. var global = __webpack_require__(7854);
  33141. var fails = __webpack_require__(7293);
  33142. var checkCorrectnessOfIteration = __webpack_require__(7072);
  33143. var NATIVE_ARRAY_BUFFER_VIEWS = (__webpack_require__(2094).NATIVE_ARRAY_BUFFER_VIEWS);
  33144. var ArrayBuffer = global.ArrayBuffer;
  33145. var Int8Array = global.Int8Array;
  33146. module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
  33147. Int8Array(1);
  33148. }) || !fails(function () {
  33149. new Int8Array(-1);
  33150. }) || !checkCorrectnessOfIteration(function (iterable) {
  33151. new Int8Array();
  33152. new Int8Array(null);
  33153. new Int8Array(1.5);
  33154. new Int8Array(iterable);
  33155. }, true) || fails(function () {
  33156. // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
  33157. return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
  33158. });
  33159. /***/ }),
  33160. /***/ 3074:
  33161. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  33162. var arrayFromConstructorAndList = __webpack_require__(7745);
  33163. var typedArraySpeciesConstructor = __webpack_require__(6304);
  33164. module.exports = function (instance, list) {
  33165. return arrayFromConstructorAndList(typedArraySpeciesConstructor(instance), list);
  33166. };
  33167. /***/ }),
  33168. /***/ 7321:
  33169. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  33170. var bind = __webpack_require__(9974);
  33171. var call = __webpack_require__(6916);
  33172. var aConstructor = __webpack_require__(9483);
  33173. var toObject = __webpack_require__(7908);
  33174. var lengthOfArrayLike = __webpack_require__(6244);
  33175. var getIterator = __webpack_require__(8554);
  33176. var getIteratorMethod = __webpack_require__(1246);
  33177. var isArrayIteratorMethod = __webpack_require__(7659);
  33178. var aTypedArrayConstructor = (__webpack_require__(2094).aTypedArrayConstructor);
  33179. module.exports = function from(source /* , mapfn, thisArg */) {
  33180. var C = aConstructor(this);
  33181. var O = toObject(source);
  33182. var argumentsLength = arguments.length;
  33183. var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
  33184. var mapping = mapfn !== undefined;
  33185. var iteratorMethod = getIteratorMethod(O);
  33186. var i, length, result, step, iterator, next;
  33187. if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) {
  33188. iterator = getIterator(O, iteratorMethod);
  33189. next = iterator.next;
  33190. O = [];
  33191. while (!(step = call(next, iterator)).done) {
  33192. O.push(step.value);
  33193. }
  33194. }
  33195. if (mapping && argumentsLength > 2) {
  33196. mapfn = bind(mapfn, arguments[2]);
  33197. }
  33198. length = lengthOfArrayLike(O);
  33199. result = new (aTypedArrayConstructor(C))(length);
  33200. for (i = 0; length > i; i++) {
  33201. result[i] = mapping ? mapfn(O[i], i) : O[i];
  33202. }
  33203. return result;
  33204. };
  33205. /***/ }),
  33206. /***/ 6304:
  33207. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  33208. var ArrayBufferViewCore = __webpack_require__(2094);
  33209. var speciesConstructor = __webpack_require__(6707);
  33210. var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
  33211. var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
  33212. // a part of `TypedArraySpeciesCreate` abstract operation
  33213. // https://tc39.es/ecma262/#typedarray-species-create
  33214. module.exports = function (originalArray) {
  33215. return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR]));
  33216. };
  33217. /***/ }),
  33218. /***/ 9711:
  33219. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  33220. var uncurryThis = __webpack_require__(1702);
  33221. var id = 0;
  33222. var postfix = Math.random();
  33223. var toString = uncurryThis(1.0.toString);
  33224. module.exports = function (key) {
  33225. return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
  33226. };
  33227. /***/ }),
  33228. /***/ 3307:
  33229. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  33230. /* eslint-disable es/no-symbol -- required for testing */
  33231. var NATIVE_SYMBOL = __webpack_require__(133);
  33232. module.exports = NATIVE_SYMBOL
  33233. && !Symbol.sham
  33234. && typeof Symbol.iterator == 'symbol';
  33235. /***/ }),
  33236. /***/ 6061:
  33237. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  33238. var wellKnownSymbol = __webpack_require__(5112);
  33239. exports.f = wellKnownSymbol;
  33240. /***/ }),
  33241. /***/ 5112:
  33242. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  33243. var global = __webpack_require__(7854);
  33244. var shared = __webpack_require__(2309);
  33245. var hasOwn = __webpack_require__(2597);
  33246. var uid = __webpack_require__(9711);
  33247. var NATIVE_SYMBOL = __webpack_require__(133);
  33248. var USE_SYMBOL_AS_UID = __webpack_require__(3307);
  33249. var WellKnownSymbolsStore = shared('wks');
  33250. var Symbol = global.Symbol;
  33251. var symbolFor = Symbol && Symbol['for'];
  33252. var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
  33253. module.exports = function (name) {
  33254. if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
  33255. var description = 'Symbol.' + name;
  33256. if (NATIVE_SYMBOL && hasOwn(Symbol, name)) {
  33257. WellKnownSymbolsStore[name] = Symbol[name];
  33258. } else if (USE_SYMBOL_AS_UID && symbolFor) {
  33259. WellKnownSymbolsStore[name] = symbolFor(description);
  33260. } else {
  33261. WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
  33262. }
  33263. } return WellKnownSymbolsStore[name];
  33264. };
  33265. /***/ }),
  33266. /***/ 1361:
  33267. /***/ (function(module) {
  33268. // a string of all valid unicode whitespaces
  33269. module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
  33270. '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
  33271. /***/ }),
  33272. /***/ 9170:
  33273. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33274. "use strict";
  33275. var $ = __webpack_require__(2109);
  33276. var global = __webpack_require__(7854);
  33277. var isPrototypeOf = __webpack_require__(7976);
  33278. var getPrototypeOf = __webpack_require__(9518);
  33279. var setPrototypeOf = __webpack_require__(7674);
  33280. var copyConstructorProperties = __webpack_require__(9920);
  33281. var create = __webpack_require__(30);
  33282. var createNonEnumerableProperty = __webpack_require__(8880);
  33283. var createPropertyDescriptor = __webpack_require__(9114);
  33284. var clearErrorStack = __webpack_require__(7741);
  33285. var installErrorCause = __webpack_require__(8340);
  33286. var iterate = __webpack_require__(408);
  33287. var normalizeStringArgument = __webpack_require__(6277);
  33288. var ERROR_STACK_INSTALLABLE = __webpack_require__(2914);
  33289. var Error = global.Error;
  33290. var push = [].push;
  33291. var $AggregateError = function AggregateError(errors, message /* , options */) {
  33292. var that = isPrototypeOf(AggregateErrorPrototype, this) ? this : create(AggregateErrorPrototype);
  33293. var options = arguments.length > 2 ? arguments[2] : undefined;
  33294. if (setPrototypeOf) {
  33295. that = setPrototypeOf(new Error(undefined), getPrototypeOf(that));
  33296. }
  33297. createNonEnumerableProperty(that, 'message', normalizeStringArgument(message, ''));
  33298. if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1));
  33299. installErrorCause(that, options);
  33300. var errorsArray = [];
  33301. iterate(errors, push, { that: errorsArray });
  33302. createNonEnumerableProperty(that, 'errors', errorsArray);
  33303. return that;
  33304. };
  33305. if (setPrototypeOf) setPrototypeOf($AggregateError, Error);
  33306. else copyConstructorProperties($AggregateError, Error);
  33307. var AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, {
  33308. constructor: createPropertyDescriptor(1, $AggregateError),
  33309. message: createPropertyDescriptor(1, ''),
  33310. name: createPropertyDescriptor(1, 'AggregateError')
  33311. });
  33312. // `AggregateError` constructor
  33313. // https://tc39.es/ecma262/#sec-aggregate-error-constructor
  33314. $({ global: true }, {
  33315. AggregateError: $AggregateError
  33316. });
  33317. /***/ }),
  33318. /***/ 2222:
  33319. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33320. "use strict";
  33321. var $ = __webpack_require__(2109);
  33322. var global = __webpack_require__(7854);
  33323. var fails = __webpack_require__(7293);
  33324. var isArray = __webpack_require__(3157);
  33325. var isObject = __webpack_require__(111);
  33326. var toObject = __webpack_require__(7908);
  33327. var lengthOfArrayLike = __webpack_require__(6244);
  33328. var createProperty = __webpack_require__(6135);
  33329. var arraySpeciesCreate = __webpack_require__(5417);
  33330. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  33331. var wellKnownSymbol = __webpack_require__(5112);
  33332. var V8_VERSION = __webpack_require__(7392);
  33333. var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
  33334. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  33335. var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
  33336. var TypeError = global.TypeError;
  33337. // We can't use this feature detection in V8 since it causes
  33338. // deoptimization and serious performance degradation
  33339. // https://github.com/zloirock/core-js/issues/679
  33340. var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
  33341. var array = [];
  33342. array[IS_CONCAT_SPREADABLE] = false;
  33343. return array.concat()[0] !== array;
  33344. });
  33345. var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
  33346. var isConcatSpreadable = function (O) {
  33347. if (!isObject(O)) return false;
  33348. var spreadable = O[IS_CONCAT_SPREADABLE];
  33349. return spreadable !== undefined ? !!spreadable : isArray(O);
  33350. };
  33351. var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
  33352. // `Array.prototype.concat` method
  33353. // https://tc39.es/ecma262/#sec-array.prototype.concat
  33354. // with adding support of @@isConcatSpreadable and @@species
  33355. $({ target: 'Array', proto: true, forced: FORCED }, {
  33356. // eslint-disable-next-line no-unused-vars -- required for `.length`
  33357. concat: function concat(arg) {
  33358. var O = toObject(this);
  33359. var A = arraySpeciesCreate(O, 0);
  33360. var n = 0;
  33361. var i, k, length, len, E;
  33362. for (i = -1, length = arguments.length; i < length; i++) {
  33363. E = i === -1 ? O : arguments[i];
  33364. if (isConcatSpreadable(E)) {
  33365. len = lengthOfArrayLike(E);
  33366. if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  33367. for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
  33368. } else {
  33369. if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
  33370. createProperty(A, n++, E);
  33371. }
  33372. }
  33373. A.length = n;
  33374. return A;
  33375. }
  33376. });
  33377. /***/ }),
  33378. /***/ 545:
  33379. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33380. var $ = __webpack_require__(2109);
  33381. var copyWithin = __webpack_require__(1048);
  33382. var addToUnscopables = __webpack_require__(1223);
  33383. // `Array.prototype.copyWithin` method
  33384. // https://tc39.es/ecma262/#sec-array.prototype.copywithin
  33385. $({ target: 'Array', proto: true }, {
  33386. copyWithin: copyWithin
  33387. });
  33388. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  33389. addToUnscopables('copyWithin');
  33390. /***/ }),
  33391. /***/ 3290:
  33392. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33393. var $ = __webpack_require__(2109);
  33394. var fill = __webpack_require__(1285);
  33395. var addToUnscopables = __webpack_require__(1223);
  33396. // `Array.prototype.fill` method
  33397. // https://tc39.es/ecma262/#sec-array.prototype.fill
  33398. $({ target: 'Array', proto: true }, {
  33399. fill: fill
  33400. });
  33401. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  33402. addToUnscopables('fill');
  33403. /***/ }),
  33404. /***/ 7327:
  33405. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33406. "use strict";
  33407. var $ = __webpack_require__(2109);
  33408. var $filter = (__webpack_require__(2092).filter);
  33409. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  33410. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
  33411. // `Array.prototype.filter` method
  33412. // https://tc39.es/ecma262/#sec-array.prototype.filter
  33413. // with adding support of @@species
  33414. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  33415. filter: function filter(callbackfn /* , thisArg */) {
  33416. return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  33417. }
  33418. });
  33419. /***/ }),
  33420. /***/ 1038:
  33421. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33422. var $ = __webpack_require__(2109);
  33423. var from = __webpack_require__(8457);
  33424. var checkCorrectnessOfIteration = __webpack_require__(7072);
  33425. var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
  33426. // eslint-disable-next-line es/no-array-from -- required for testing
  33427. Array.from(iterable);
  33428. });
  33429. // `Array.from` method
  33430. // https://tc39.es/ecma262/#sec-array.from
  33431. $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
  33432. from: from
  33433. });
  33434. /***/ }),
  33435. /***/ 6699:
  33436. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33437. "use strict";
  33438. var $ = __webpack_require__(2109);
  33439. var $includes = (__webpack_require__(1318).includes);
  33440. var addToUnscopables = __webpack_require__(1223);
  33441. // `Array.prototype.includes` method
  33442. // https://tc39.es/ecma262/#sec-array.prototype.includes
  33443. $({ target: 'Array', proto: true }, {
  33444. includes: function includes(el /* , fromIndex = 0 */) {
  33445. return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
  33446. }
  33447. });
  33448. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  33449. addToUnscopables('includes');
  33450. /***/ }),
  33451. /***/ 6992:
  33452. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  33453. "use strict";
  33454. var toIndexedObject = __webpack_require__(5656);
  33455. var addToUnscopables = __webpack_require__(1223);
  33456. var Iterators = __webpack_require__(7497);
  33457. var InternalStateModule = __webpack_require__(9909);
  33458. var defineIterator = __webpack_require__(654);
  33459. var ARRAY_ITERATOR = 'Array Iterator';
  33460. var setInternalState = InternalStateModule.set;
  33461. var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
  33462. // `Array.prototype.entries` method
  33463. // https://tc39.es/ecma262/#sec-array.prototype.entries
  33464. // `Array.prototype.keys` method
  33465. // https://tc39.es/ecma262/#sec-array.prototype.keys
  33466. // `Array.prototype.values` method
  33467. // https://tc39.es/ecma262/#sec-array.prototype.values
  33468. // `Array.prototype[@@iterator]` method
  33469. // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
  33470. // `CreateArrayIterator` internal method
  33471. // https://tc39.es/ecma262/#sec-createarrayiterator
  33472. module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
  33473. setInternalState(this, {
  33474. type: ARRAY_ITERATOR,
  33475. target: toIndexedObject(iterated), // target
  33476. index: 0, // next index
  33477. kind: kind // kind
  33478. });
  33479. // `%ArrayIteratorPrototype%.next` method
  33480. // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
  33481. }, function () {
  33482. var state = getInternalState(this);
  33483. var target = state.target;
  33484. var kind = state.kind;
  33485. var index = state.index++;
  33486. if (!target || index >= target.length) {
  33487. state.target = undefined;
  33488. return { value: undefined, done: true };
  33489. }
  33490. if (kind == 'keys') return { value: index, done: false };
  33491. if (kind == 'values') return { value: target[index], done: false };
  33492. return { value: [index, target[index]], done: false };
  33493. }, 'values');
  33494. // argumentsList[@@iterator] is %ArrayProto_values%
  33495. // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
  33496. // https://tc39.es/ecma262/#sec-createmappedargumentsobject
  33497. Iterators.Arguments = Iterators.Array;
  33498. // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
  33499. addToUnscopables('keys');
  33500. addToUnscopables('values');
  33501. addToUnscopables('entries');
  33502. /***/ }),
  33503. /***/ 9600:
  33504. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33505. "use strict";
  33506. var $ = __webpack_require__(2109);
  33507. var uncurryThis = __webpack_require__(1702);
  33508. var IndexedObject = __webpack_require__(8361);
  33509. var toIndexedObject = __webpack_require__(5656);
  33510. var arrayMethodIsStrict = __webpack_require__(9341);
  33511. var un$Join = uncurryThis([].join);
  33512. var ES3_STRINGS = IndexedObject != Object;
  33513. var STRICT_METHOD = arrayMethodIsStrict('join', ',');
  33514. // `Array.prototype.join` method
  33515. // https://tc39.es/ecma262/#sec-array.prototype.join
  33516. $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
  33517. join: function join(separator) {
  33518. return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
  33519. }
  33520. });
  33521. /***/ }),
  33522. /***/ 1249:
  33523. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33524. "use strict";
  33525. var $ = __webpack_require__(2109);
  33526. var $map = (__webpack_require__(2092).map);
  33527. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  33528. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
  33529. // `Array.prototype.map` method
  33530. // https://tc39.es/ecma262/#sec-array.prototype.map
  33531. // with adding support of @@species
  33532. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  33533. map: function map(callbackfn /* , thisArg */) {
  33534. return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  33535. }
  33536. });
  33537. /***/ }),
  33538. /***/ 7042:
  33539. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33540. "use strict";
  33541. var $ = __webpack_require__(2109);
  33542. var global = __webpack_require__(7854);
  33543. var isArray = __webpack_require__(3157);
  33544. var isConstructor = __webpack_require__(4411);
  33545. var isObject = __webpack_require__(111);
  33546. var toAbsoluteIndex = __webpack_require__(1400);
  33547. var lengthOfArrayLike = __webpack_require__(6244);
  33548. var toIndexedObject = __webpack_require__(5656);
  33549. var createProperty = __webpack_require__(6135);
  33550. var wellKnownSymbol = __webpack_require__(5112);
  33551. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  33552. var un$Slice = __webpack_require__(206);
  33553. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
  33554. var SPECIES = wellKnownSymbol('species');
  33555. var Array = global.Array;
  33556. var max = Math.max;
  33557. // `Array.prototype.slice` method
  33558. // https://tc39.es/ecma262/#sec-array.prototype.slice
  33559. // fallback for not array-like ES3 strings and DOM objects
  33560. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  33561. slice: function slice(start, end) {
  33562. var O = toIndexedObject(this);
  33563. var length = lengthOfArrayLike(O);
  33564. var k = toAbsoluteIndex(start, length);
  33565. var fin = toAbsoluteIndex(end === undefined ? length : end, length);
  33566. // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
  33567. var Constructor, result, n;
  33568. if (isArray(O)) {
  33569. Constructor = O.constructor;
  33570. // cross-realm fallback
  33571. if (isConstructor(Constructor) && (Constructor === Array || isArray(Constructor.prototype))) {
  33572. Constructor = undefined;
  33573. } else if (isObject(Constructor)) {
  33574. Constructor = Constructor[SPECIES];
  33575. if (Constructor === null) Constructor = undefined;
  33576. }
  33577. if (Constructor === Array || Constructor === undefined) {
  33578. return un$Slice(O, k, fin);
  33579. }
  33580. }
  33581. result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
  33582. for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
  33583. result.length = n;
  33584. return result;
  33585. }
  33586. });
  33587. /***/ }),
  33588. /***/ 2707:
  33589. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33590. "use strict";
  33591. var $ = __webpack_require__(2109);
  33592. var uncurryThis = __webpack_require__(1702);
  33593. var aCallable = __webpack_require__(9662);
  33594. var toObject = __webpack_require__(7908);
  33595. var lengthOfArrayLike = __webpack_require__(6244);
  33596. var toString = __webpack_require__(1340);
  33597. var fails = __webpack_require__(7293);
  33598. var internalSort = __webpack_require__(4362);
  33599. var arrayMethodIsStrict = __webpack_require__(9341);
  33600. var FF = __webpack_require__(8886);
  33601. var IE_OR_EDGE = __webpack_require__(256);
  33602. var V8 = __webpack_require__(7392);
  33603. var WEBKIT = __webpack_require__(8008);
  33604. var test = [];
  33605. var un$Sort = uncurryThis(test.sort);
  33606. var push = uncurryThis(test.push);
  33607. // IE8-
  33608. var FAILS_ON_UNDEFINED = fails(function () {
  33609. test.sort(undefined);
  33610. });
  33611. // V8 bug
  33612. var FAILS_ON_NULL = fails(function () {
  33613. test.sort(null);
  33614. });
  33615. // Old WebKit
  33616. var STRICT_METHOD = arrayMethodIsStrict('sort');
  33617. var STABLE_SORT = !fails(function () {
  33618. // feature detection can be too slow, so check engines versions
  33619. if (V8) return V8 < 70;
  33620. if (FF && FF > 3) return;
  33621. if (IE_OR_EDGE) return true;
  33622. if (WEBKIT) return WEBKIT < 603;
  33623. var result = '';
  33624. var code, chr, value, index;
  33625. // generate an array with more 512 elements (Chakra and old V8 fails only in this case)
  33626. for (code = 65; code < 76; code++) {
  33627. chr = String.fromCharCode(code);
  33628. switch (code) {
  33629. case 66: case 69: case 70: case 72: value = 3; break;
  33630. case 68: case 71: value = 4; break;
  33631. default: value = 2;
  33632. }
  33633. for (index = 0; index < 47; index++) {
  33634. test.push({ k: chr + index, v: value });
  33635. }
  33636. }
  33637. test.sort(function (a, b) { return b.v - a.v; });
  33638. for (index = 0; index < test.length; index++) {
  33639. chr = test[index].k.charAt(0);
  33640. if (result.charAt(result.length - 1) !== chr) result += chr;
  33641. }
  33642. return result !== 'DGBEFHACIJK';
  33643. });
  33644. var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;
  33645. var getSortCompare = function (comparefn) {
  33646. return function (x, y) {
  33647. if (y === undefined) return -1;
  33648. if (x === undefined) return 1;
  33649. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  33650. return toString(x) > toString(y) ? 1 : -1;
  33651. };
  33652. };
  33653. // `Array.prototype.sort` method
  33654. // https://tc39.es/ecma262/#sec-array.prototype.sort
  33655. $({ target: 'Array', proto: true, forced: FORCED }, {
  33656. sort: function sort(comparefn) {
  33657. if (comparefn !== undefined) aCallable(comparefn);
  33658. var array = toObject(this);
  33659. if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
  33660. var items = [];
  33661. var arrayLength = lengthOfArrayLike(array);
  33662. var itemsLength, index;
  33663. for (index = 0; index < arrayLength; index++) {
  33664. if (index in array) push(items, array[index]);
  33665. }
  33666. internalSort(items, getSortCompare(comparefn));
  33667. itemsLength = items.length;
  33668. index = 0;
  33669. while (index < itemsLength) array[index] = items[index++];
  33670. while (index < arrayLength) delete array[index++];
  33671. return array;
  33672. }
  33673. });
  33674. /***/ }),
  33675. /***/ 561:
  33676. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33677. "use strict";
  33678. var $ = __webpack_require__(2109);
  33679. var global = __webpack_require__(7854);
  33680. var toAbsoluteIndex = __webpack_require__(1400);
  33681. var toIntegerOrInfinity = __webpack_require__(9303);
  33682. var lengthOfArrayLike = __webpack_require__(6244);
  33683. var toObject = __webpack_require__(7908);
  33684. var arraySpeciesCreate = __webpack_require__(5417);
  33685. var createProperty = __webpack_require__(6135);
  33686. var arrayMethodHasSpeciesSupport = __webpack_require__(1194);
  33687. var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
  33688. var TypeError = global.TypeError;
  33689. var max = Math.max;
  33690. var min = Math.min;
  33691. var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
  33692. var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
  33693. // `Array.prototype.splice` method
  33694. // https://tc39.es/ecma262/#sec-array.prototype.splice
  33695. // with adding support of @@species
  33696. $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
  33697. splice: function splice(start, deleteCount /* , ...items */) {
  33698. var O = toObject(this);
  33699. var len = lengthOfArrayLike(O);
  33700. var actualStart = toAbsoluteIndex(start, len);
  33701. var argumentsLength = arguments.length;
  33702. var insertCount, actualDeleteCount, A, k, from, to;
  33703. if (argumentsLength === 0) {
  33704. insertCount = actualDeleteCount = 0;
  33705. } else if (argumentsLength === 1) {
  33706. insertCount = 0;
  33707. actualDeleteCount = len - actualStart;
  33708. } else {
  33709. insertCount = argumentsLength - 2;
  33710. actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
  33711. }
  33712. if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
  33713. throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
  33714. }
  33715. A = arraySpeciesCreate(O, actualDeleteCount);
  33716. for (k = 0; k < actualDeleteCount; k++) {
  33717. from = actualStart + k;
  33718. if (from in O) createProperty(A, k, O[from]);
  33719. }
  33720. A.length = actualDeleteCount;
  33721. if (insertCount < actualDeleteCount) {
  33722. for (k = actualStart; k < len - actualDeleteCount; k++) {
  33723. from = k + actualDeleteCount;
  33724. to = k + insertCount;
  33725. if (from in O) O[to] = O[from];
  33726. else delete O[to];
  33727. }
  33728. for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
  33729. } else if (insertCount > actualDeleteCount) {
  33730. for (k = len - actualDeleteCount; k > actualStart; k--) {
  33731. from = k + actualDeleteCount - 1;
  33732. to = k + insertCount - 1;
  33733. if (from in O) O[to] = O[from];
  33734. else delete O[to];
  33735. }
  33736. }
  33737. for (k = 0; k < insertCount; k++) {
  33738. O[k + actualStart] = arguments[k + 2];
  33739. }
  33740. O.length = len - actualDeleteCount + insertCount;
  33741. return A;
  33742. }
  33743. });
  33744. /***/ }),
  33745. /***/ 6078:
  33746. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33747. var hasOwn = __webpack_require__(2597);
  33748. var redefine = __webpack_require__(1320);
  33749. var dateToPrimitive = __webpack_require__(8709);
  33750. var wellKnownSymbol = __webpack_require__(5112);
  33751. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  33752. var DatePrototype = Date.prototype;
  33753. // `Date.prototype[@@toPrimitive]` method
  33754. // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
  33755. if (!hasOwn(DatePrototype, TO_PRIMITIVE)) {
  33756. redefine(DatePrototype, TO_PRIMITIVE, dateToPrimitive);
  33757. }
  33758. /***/ }),
  33759. /***/ 8309:
  33760. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33761. var DESCRIPTORS = __webpack_require__(9781);
  33762. var FUNCTION_NAME_EXISTS = (__webpack_require__(6530).EXISTS);
  33763. var uncurryThis = __webpack_require__(1702);
  33764. var defineProperty = (__webpack_require__(3070).f);
  33765. var FunctionPrototype = Function.prototype;
  33766. var functionToString = uncurryThis(FunctionPrototype.toString);
  33767. var nameRE = /^\s*function ([^ (]*)/;
  33768. var regExpExec = uncurryThis(nameRE.exec);
  33769. var NAME = 'name';
  33770. // Function instances `.name` property
  33771. // https://tc39.es/ecma262/#sec-function-instances-name
  33772. if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) {
  33773. defineProperty(FunctionPrototype, NAME, {
  33774. configurable: true,
  33775. get: function () {
  33776. try {
  33777. return regExpExec(nameRE, functionToString(this))[1];
  33778. } catch (error) {
  33779. return '';
  33780. }
  33781. }
  33782. });
  33783. }
  33784. /***/ }),
  33785. /***/ 5837:
  33786. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33787. var $ = __webpack_require__(2109);
  33788. var global = __webpack_require__(7854);
  33789. // `globalThis` object
  33790. // https://tc39.es/ecma262/#sec-globalthis
  33791. $({ global: true }, {
  33792. globalThis: global
  33793. });
  33794. /***/ }),
  33795. /***/ 1532:
  33796. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33797. "use strict";
  33798. var collection = __webpack_require__(7710);
  33799. var collectionStrong = __webpack_require__(5631);
  33800. // `Map` constructor
  33801. // https://tc39.es/ecma262/#sec-map-objects
  33802. collection('Map', function (init) {
  33803. return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
  33804. }, collectionStrong);
  33805. /***/ }),
  33806. /***/ 4256:
  33807. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33808. var $ = __webpack_require__(2109);
  33809. var log = Math.log;
  33810. var LN2 = Math.LN2;
  33811. // `Math.log2` method
  33812. // https://tc39.es/ecma262/#sec-math.log2
  33813. $({ target: 'Math', stat: true }, {
  33814. log2: function log2(x) {
  33815. return log(x) / LN2;
  33816. }
  33817. });
  33818. /***/ }),
  33819. /***/ 9653:
  33820. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33821. "use strict";
  33822. var DESCRIPTORS = __webpack_require__(9781);
  33823. var global = __webpack_require__(7854);
  33824. var uncurryThis = __webpack_require__(1702);
  33825. var isForced = __webpack_require__(4705);
  33826. var redefine = __webpack_require__(1320);
  33827. var hasOwn = __webpack_require__(2597);
  33828. var inheritIfRequired = __webpack_require__(9587);
  33829. var isPrototypeOf = __webpack_require__(7976);
  33830. var isSymbol = __webpack_require__(2190);
  33831. var toPrimitive = __webpack_require__(7593);
  33832. var fails = __webpack_require__(7293);
  33833. var getOwnPropertyNames = (__webpack_require__(8006).f);
  33834. var getOwnPropertyDescriptor = (__webpack_require__(1236).f);
  33835. var defineProperty = (__webpack_require__(3070).f);
  33836. var thisNumberValue = __webpack_require__(863);
  33837. var trim = (__webpack_require__(3111).trim);
  33838. var NUMBER = 'Number';
  33839. var NativeNumber = global[NUMBER];
  33840. var NumberPrototype = NativeNumber.prototype;
  33841. var TypeError = global.TypeError;
  33842. var arraySlice = uncurryThis(''.slice);
  33843. var charCodeAt = uncurryThis(''.charCodeAt);
  33844. // `ToNumeric` abstract operation
  33845. // https://tc39.es/ecma262/#sec-tonumeric
  33846. var toNumeric = function (value) {
  33847. var primValue = toPrimitive(value, 'number');
  33848. return typeof primValue == 'bigint' ? primValue : toNumber(primValue);
  33849. };
  33850. // `ToNumber` abstract operation
  33851. // https://tc39.es/ecma262/#sec-tonumber
  33852. var toNumber = function (argument) {
  33853. var it = toPrimitive(argument, 'number');
  33854. var first, third, radix, maxCode, digits, length, index, code;
  33855. if (isSymbol(it)) throw TypeError('Cannot convert a Symbol value to a number');
  33856. if (typeof it == 'string' && it.length > 2) {
  33857. it = trim(it);
  33858. first = charCodeAt(it, 0);
  33859. if (first === 43 || first === 45) {
  33860. third = charCodeAt(it, 2);
  33861. if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
  33862. } else if (first === 48) {
  33863. switch (charCodeAt(it, 1)) {
  33864. case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
  33865. case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
  33866. default: return +it;
  33867. }
  33868. digits = arraySlice(it, 2);
  33869. length = digits.length;
  33870. for (index = 0; index < length; index++) {
  33871. code = charCodeAt(digits, index);
  33872. // parseInt parses a string to a first unavailable symbol
  33873. // but ToNumber should return NaN if a string contains unavailable symbols
  33874. if (code < 48 || code > maxCode) return NaN;
  33875. } return parseInt(digits, radix);
  33876. }
  33877. } return +it;
  33878. };
  33879. // `Number` constructor
  33880. // https://tc39.es/ecma262/#sec-number-constructor
  33881. if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
  33882. var NumberWrapper = function Number(value) {
  33883. var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));
  33884. var dummy = this;
  33885. // check on 1..constructor(foo) case
  33886. return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); })
  33887. ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n;
  33888. };
  33889. for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : (
  33890. // ES3:
  33891. 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
  33892. // ES2015 (in case, if modules with ES2015 Number statics required before):
  33893. 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +
  33894. // ESNext
  33895. 'fromString,range'
  33896. ).split(','), j = 0, key; keys.length > j; j++) {
  33897. if (hasOwn(NativeNumber, key = keys[j]) && !hasOwn(NumberWrapper, key)) {
  33898. defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key));
  33899. }
  33900. }
  33901. NumberWrapper.prototype = NumberPrototype;
  33902. NumberPrototype.constructor = NumberWrapper;
  33903. redefine(global, NUMBER, NumberWrapper);
  33904. }
  33905. /***/ }),
  33906. /***/ 3299:
  33907. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33908. var $ = __webpack_require__(2109);
  33909. // `Number.EPSILON` constant
  33910. // https://tc39.es/ecma262/#sec-number.epsilon
  33911. $({ target: 'Number', stat: true }, {
  33912. EPSILON: Math.pow(2, -52)
  33913. });
  33914. /***/ }),
  33915. /***/ 5192:
  33916. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33917. var $ = __webpack_require__(2109);
  33918. var numberIsFinite = __webpack_require__(7023);
  33919. // `Number.isFinite` method
  33920. // https://tc39.es/ecma262/#sec-number.isfinite
  33921. $({ target: 'Number', stat: true }, { isFinite: numberIsFinite });
  33922. /***/ }),
  33923. /***/ 3161:
  33924. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33925. var $ = __webpack_require__(2109);
  33926. var isIntegralNumber = __webpack_require__(5988);
  33927. // `Number.isInteger` method
  33928. // https://tc39.es/ecma262/#sec-number.isinteger
  33929. $({ target: 'Number', stat: true }, {
  33930. isInteger: isIntegralNumber
  33931. });
  33932. /***/ }),
  33933. /***/ 6977:
  33934. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  33935. "use strict";
  33936. var $ = __webpack_require__(2109);
  33937. var global = __webpack_require__(7854);
  33938. var uncurryThis = __webpack_require__(1702);
  33939. var toIntegerOrInfinity = __webpack_require__(9303);
  33940. var thisNumberValue = __webpack_require__(863);
  33941. var $repeat = __webpack_require__(8415);
  33942. var fails = __webpack_require__(7293);
  33943. var RangeError = global.RangeError;
  33944. var String = global.String;
  33945. var floor = Math.floor;
  33946. var repeat = uncurryThis($repeat);
  33947. var stringSlice = uncurryThis(''.slice);
  33948. var un$ToFixed = uncurryThis(1.0.toFixed);
  33949. var pow = function (x, n, acc) {
  33950. return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
  33951. };
  33952. var log = function (x) {
  33953. var n = 0;
  33954. var x2 = x;
  33955. while (x2 >= 4096) {
  33956. n += 12;
  33957. x2 /= 4096;
  33958. }
  33959. while (x2 >= 2) {
  33960. n += 1;
  33961. x2 /= 2;
  33962. } return n;
  33963. };
  33964. var multiply = function (data, n, c) {
  33965. var index = -1;
  33966. var c2 = c;
  33967. while (++index < 6) {
  33968. c2 += n * data[index];
  33969. data[index] = c2 % 1e7;
  33970. c2 = floor(c2 / 1e7);
  33971. }
  33972. };
  33973. var divide = function (data, n) {
  33974. var index = 6;
  33975. var c = 0;
  33976. while (--index >= 0) {
  33977. c += data[index];
  33978. data[index] = floor(c / n);
  33979. c = (c % n) * 1e7;
  33980. }
  33981. };
  33982. var dataToString = function (data) {
  33983. var index = 6;
  33984. var s = '';
  33985. while (--index >= 0) {
  33986. if (s !== '' || index === 0 || data[index] !== 0) {
  33987. var t = String(data[index]);
  33988. s = s === '' ? t : s + repeat('0', 7 - t.length) + t;
  33989. }
  33990. } return s;
  33991. };
  33992. var FORCED = fails(function () {
  33993. return un$ToFixed(0.00008, 3) !== '0.000' ||
  33994. un$ToFixed(0.9, 0) !== '1' ||
  33995. un$ToFixed(1.255, 2) !== '1.25' ||
  33996. un$ToFixed(1000000000000000128.0, 0) !== '1000000000000000128';
  33997. }) || !fails(function () {
  33998. // V8 ~ Android 4.3-
  33999. un$ToFixed({});
  34000. });
  34001. // `Number.prototype.toFixed` method
  34002. // https://tc39.es/ecma262/#sec-number.prototype.tofixed
  34003. $({ target: 'Number', proto: true, forced: FORCED }, {
  34004. toFixed: function toFixed(fractionDigits) {
  34005. var number = thisNumberValue(this);
  34006. var fractDigits = toIntegerOrInfinity(fractionDigits);
  34007. var data = [0, 0, 0, 0, 0, 0];
  34008. var sign = '';
  34009. var result = '0';
  34010. var e, z, j, k;
  34011. if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');
  34012. // eslint-disable-next-line no-self-compare -- NaN check
  34013. if (number != number) return 'NaN';
  34014. if (number <= -1e21 || number >= 1e21) return String(number);
  34015. if (number < 0) {
  34016. sign = '-';
  34017. number = -number;
  34018. }
  34019. if (number > 1e-21) {
  34020. e = log(number * pow(2, 69, 1)) - 69;
  34021. z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);
  34022. z *= 0x10000000000000;
  34023. e = 52 - e;
  34024. if (e > 0) {
  34025. multiply(data, 0, z);
  34026. j = fractDigits;
  34027. while (j >= 7) {
  34028. multiply(data, 1e7, 0);
  34029. j -= 7;
  34030. }
  34031. multiply(data, pow(10, j, 1), 0);
  34032. j = e - 1;
  34033. while (j >= 23) {
  34034. divide(data, 1 << 23);
  34035. j -= 23;
  34036. }
  34037. divide(data, 1 << j);
  34038. multiply(data, 1, 1);
  34039. divide(data, 2);
  34040. result = dataToString(data);
  34041. } else {
  34042. multiply(data, 0, z);
  34043. multiply(data, 1 << -e, 0);
  34044. result = dataToString(data) + repeat('0', fractDigits);
  34045. }
  34046. }
  34047. if (fractDigits > 0) {
  34048. k = result.length;
  34049. result = sign + (k <= fractDigits
  34050. ? '0.' + repeat('0', fractDigits - k) + result
  34051. : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));
  34052. } else {
  34053. result = sign + result;
  34054. } return result;
  34055. }
  34056. });
  34057. /***/ }),
  34058. /***/ 9601:
  34059. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34060. var $ = __webpack_require__(2109);
  34061. var assign = __webpack_require__(1574);
  34062. // `Object.assign` method
  34063. // https://tc39.es/ecma262/#sec-object.assign
  34064. // eslint-disable-next-line es/no-object-assign -- required for testing
  34065. $({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
  34066. assign: assign
  34067. });
  34068. /***/ }),
  34069. /***/ 3371:
  34070. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34071. var $ = __webpack_require__(2109);
  34072. var FREEZING = __webpack_require__(6677);
  34073. var fails = __webpack_require__(7293);
  34074. var isObject = __webpack_require__(111);
  34075. var onFreeze = (__webpack_require__(2423).onFreeze);
  34076. // eslint-disable-next-line es/no-object-freeze -- safe
  34077. var $freeze = Object.freeze;
  34078. var FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); });
  34079. // `Object.freeze` method
  34080. // https://tc39.es/ecma262/#sec-object.freeze
  34081. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
  34082. freeze: function freeze(it) {
  34083. return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it;
  34084. }
  34085. });
  34086. /***/ }),
  34087. /***/ 5003:
  34088. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34089. var $ = __webpack_require__(2109);
  34090. var fails = __webpack_require__(7293);
  34091. var toIndexedObject = __webpack_require__(5656);
  34092. var nativeGetOwnPropertyDescriptor = (__webpack_require__(1236).f);
  34093. var DESCRIPTORS = __webpack_require__(9781);
  34094. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
  34095. var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
  34096. // `Object.getOwnPropertyDescriptor` method
  34097. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
  34098. $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
  34099. getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
  34100. return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
  34101. }
  34102. });
  34103. /***/ }),
  34104. /***/ 9337:
  34105. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34106. var $ = __webpack_require__(2109);
  34107. var DESCRIPTORS = __webpack_require__(9781);
  34108. var ownKeys = __webpack_require__(3887);
  34109. var toIndexedObject = __webpack_require__(5656);
  34110. var getOwnPropertyDescriptorModule = __webpack_require__(1236);
  34111. var createProperty = __webpack_require__(6135);
  34112. // `Object.getOwnPropertyDescriptors` method
  34113. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  34114. $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
  34115. getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
  34116. var O = toIndexedObject(object);
  34117. var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  34118. var keys = ownKeys(O);
  34119. var result = {};
  34120. var index = 0;
  34121. var key, descriptor;
  34122. while (keys.length > index) {
  34123. descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
  34124. if (descriptor !== undefined) createProperty(result, key, descriptor);
  34125. }
  34126. return result;
  34127. }
  34128. });
  34129. /***/ }),
  34130. /***/ 489:
  34131. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34132. var $ = __webpack_require__(2109);
  34133. var fails = __webpack_require__(7293);
  34134. var toObject = __webpack_require__(7908);
  34135. var nativeGetPrototypeOf = __webpack_require__(9518);
  34136. var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544);
  34137. var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
  34138. // `Object.getPrototypeOf` method
  34139. // https://tc39.es/ecma262/#sec-object.getprototypeof
  34140. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
  34141. getPrototypeOf: function getPrototypeOf(it) {
  34142. return nativeGetPrototypeOf(toObject(it));
  34143. }
  34144. });
  34145. /***/ }),
  34146. /***/ 7941:
  34147. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34148. var $ = __webpack_require__(2109);
  34149. var toObject = __webpack_require__(7908);
  34150. var nativeKeys = __webpack_require__(1956);
  34151. var fails = __webpack_require__(7293);
  34152. var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
  34153. // `Object.keys` method
  34154. // https://tc39.es/ecma262/#sec-object.keys
  34155. $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
  34156. keys: function keys(it) {
  34157. return nativeKeys(toObject(it));
  34158. }
  34159. });
  34160. /***/ }),
  34161. /***/ 1539:
  34162. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34163. var TO_STRING_TAG_SUPPORT = __webpack_require__(1694);
  34164. var redefine = __webpack_require__(1320);
  34165. var toString = __webpack_require__(288);
  34166. // `Object.prototype.toString` method
  34167. // https://tc39.es/ecma262/#sec-object.prototype.tostring
  34168. if (!TO_STRING_TAG_SUPPORT) {
  34169. redefine(Object.prototype, 'toString', toString, { unsafe: true });
  34170. }
  34171. /***/ }),
  34172. /***/ 2479:
  34173. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34174. var $ = __webpack_require__(2109);
  34175. var $values = (__webpack_require__(4699).values);
  34176. // `Object.values` method
  34177. // https://tc39.es/ecma262/#sec-object.values
  34178. $({ target: 'Object', stat: true }, {
  34179. values: function values(O) {
  34180. return $values(O);
  34181. }
  34182. });
  34183. /***/ }),
  34184. /***/ 7922:
  34185. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34186. "use strict";
  34187. var $ = __webpack_require__(2109);
  34188. var call = __webpack_require__(6916);
  34189. var aCallable = __webpack_require__(9662);
  34190. var newPromiseCapabilityModule = __webpack_require__(8523);
  34191. var perform = __webpack_require__(2534);
  34192. var iterate = __webpack_require__(408);
  34193. // `Promise.allSettled` method
  34194. // https://tc39.es/ecma262/#sec-promise.allsettled
  34195. $({ target: 'Promise', stat: true }, {
  34196. allSettled: function allSettled(iterable) {
  34197. var C = this;
  34198. var capability = newPromiseCapabilityModule.f(C);
  34199. var resolve = capability.resolve;
  34200. var reject = capability.reject;
  34201. var result = perform(function () {
  34202. var promiseResolve = aCallable(C.resolve);
  34203. var values = [];
  34204. var counter = 0;
  34205. var remaining = 1;
  34206. iterate(iterable, function (promise) {
  34207. var index = counter++;
  34208. var alreadyCalled = false;
  34209. remaining++;
  34210. call(promiseResolve, C, promise).then(function (value) {
  34211. if (alreadyCalled) return;
  34212. alreadyCalled = true;
  34213. values[index] = { status: 'fulfilled', value: value };
  34214. --remaining || resolve(values);
  34215. }, function (error) {
  34216. if (alreadyCalled) return;
  34217. alreadyCalled = true;
  34218. values[index] = { status: 'rejected', reason: error };
  34219. --remaining || resolve(values);
  34220. });
  34221. });
  34222. --remaining || resolve(values);
  34223. });
  34224. if (result.error) reject(result.value);
  34225. return capability.promise;
  34226. }
  34227. });
  34228. /***/ }),
  34229. /***/ 4668:
  34230. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34231. "use strict";
  34232. var $ = __webpack_require__(2109);
  34233. var aCallable = __webpack_require__(9662);
  34234. var getBuiltIn = __webpack_require__(5005);
  34235. var call = __webpack_require__(6916);
  34236. var newPromiseCapabilityModule = __webpack_require__(8523);
  34237. var perform = __webpack_require__(2534);
  34238. var iterate = __webpack_require__(408);
  34239. var PROMISE_ANY_ERROR = 'No one promise resolved';
  34240. // `Promise.any` method
  34241. // https://tc39.es/ecma262/#sec-promise.any
  34242. $({ target: 'Promise', stat: true }, {
  34243. any: function any(iterable) {
  34244. var C = this;
  34245. var AggregateError = getBuiltIn('AggregateError');
  34246. var capability = newPromiseCapabilityModule.f(C);
  34247. var resolve = capability.resolve;
  34248. var reject = capability.reject;
  34249. var result = perform(function () {
  34250. var promiseResolve = aCallable(C.resolve);
  34251. var errors = [];
  34252. var counter = 0;
  34253. var remaining = 1;
  34254. var alreadyResolved = false;
  34255. iterate(iterable, function (promise) {
  34256. var index = counter++;
  34257. var alreadyRejected = false;
  34258. remaining++;
  34259. call(promiseResolve, C, promise).then(function (value) {
  34260. if (alreadyRejected || alreadyResolved) return;
  34261. alreadyResolved = true;
  34262. resolve(value);
  34263. }, function (error) {
  34264. if (alreadyRejected || alreadyResolved) return;
  34265. alreadyRejected = true;
  34266. errors[index] = error;
  34267. --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
  34268. });
  34269. });
  34270. --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
  34271. });
  34272. if (result.error) reject(result.value);
  34273. return capability.promise;
  34274. }
  34275. });
  34276. /***/ }),
  34277. /***/ 7727:
  34278. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34279. "use strict";
  34280. var $ = __webpack_require__(2109);
  34281. var IS_PURE = __webpack_require__(1913);
  34282. var NativePromise = __webpack_require__(3366);
  34283. var fails = __webpack_require__(7293);
  34284. var getBuiltIn = __webpack_require__(5005);
  34285. var isCallable = __webpack_require__(614);
  34286. var speciesConstructor = __webpack_require__(6707);
  34287. var promiseResolve = __webpack_require__(9478);
  34288. var redefine = __webpack_require__(1320);
  34289. // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
  34290. var NON_GENERIC = !!NativePromise && fails(function () {
  34291. NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
  34292. });
  34293. // `Promise.prototype.finally` method
  34294. // https://tc39.es/ecma262/#sec-promise.prototype.finally
  34295. $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
  34296. 'finally': function (onFinally) {
  34297. var C = speciesConstructor(this, getBuiltIn('Promise'));
  34298. var isFunction = isCallable(onFinally);
  34299. return this.then(
  34300. isFunction ? function (x) {
  34301. return promiseResolve(C, onFinally()).then(function () { return x; });
  34302. } : onFinally,
  34303. isFunction ? function (e) {
  34304. return promiseResolve(C, onFinally()).then(function () { throw e; });
  34305. } : onFinally
  34306. );
  34307. }
  34308. });
  34309. // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
  34310. if (!IS_PURE && isCallable(NativePromise)) {
  34311. var method = getBuiltIn('Promise').prototype['finally'];
  34312. if (NativePromise.prototype['finally'] !== method) {
  34313. redefine(NativePromise.prototype, 'finally', method, { unsafe: true });
  34314. }
  34315. }
  34316. /***/ }),
  34317. /***/ 8674:
  34318. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34319. "use strict";
  34320. var $ = __webpack_require__(2109);
  34321. var IS_PURE = __webpack_require__(1913);
  34322. var global = __webpack_require__(7854);
  34323. var getBuiltIn = __webpack_require__(5005);
  34324. var call = __webpack_require__(6916);
  34325. var NativePromise = __webpack_require__(3366);
  34326. var redefine = __webpack_require__(1320);
  34327. var redefineAll = __webpack_require__(2248);
  34328. var setPrototypeOf = __webpack_require__(7674);
  34329. var setToStringTag = __webpack_require__(8003);
  34330. var setSpecies = __webpack_require__(6340);
  34331. var aCallable = __webpack_require__(9662);
  34332. var isCallable = __webpack_require__(614);
  34333. var isObject = __webpack_require__(111);
  34334. var anInstance = __webpack_require__(5787);
  34335. var inspectSource = __webpack_require__(2788);
  34336. var iterate = __webpack_require__(408);
  34337. var checkCorrectnessOfIteration = __webpack_require__(7072);
  34338. var speciesConstructor = __webpack_require__(6707);
  34339. var task = (__webpack_require__(261).set);
  34340. var microtask = __webpack_require__(5948);
  34341. var promiseResolve = __webpack_require__(9478);
  34342. var hostReportErrors = __webpack_require__(842);
  34343. var newPromiseCapabilityModule = __webpack_require__(8523);
  34344. var perform = __webpack_require__(2534);
  34345. var InternalStateModule = __webpack_require__(9909);
  34346. var isForced = __webpack_require__(4705);
  34347. var wellKnownSymbol = __webpack_require__(5112);
  34348. var IS_BROWSER = __webpack_require__(7871);
  34349. var IS_NODE = __webpack_require__(5268);
  34350. var V8_VERSION = __webpack_require__(7392);
  34351. var SPECIES = wellKnownSymbol('species');
  34352. var PROMISE = 'Promise';
  34353. var getInternalState = InternalStateModule.get;
  34354. var setInternalState = InternalStateModule.set;
  34355. var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
  34356. var NativePromisePrototype = NativePromise && NativePromise.prototype;
  34357. var PromiseConstructor = NativePromise;
  34358. var PromisePrototype = NativePromisePrototype;
  34359. var TypeError = global.TypeError;
  34360. var document = global.document;
  34361. var process = global.process;
  34362. var newPromiseCapability = newPromiseCapabilityModule.f;
  34363. var newGenericPromiseCapability = newPromiseCapability;
  34364. var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
  34365. var NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent);
  34366. var UNHANDLED_REJECTION = 'unhandledrejection';
  34367. var REJECTION_HANDLED = 'rejectionhandled';
  34368. var PENDING = 0;
  34369. var FULFILLED = 1;
  34370. var REJECTED = 2;
  34371. var HANDLED = 1;
  34372. var UNHANDLED = 2;
  34373. var SUBCLASSING = false;
  34374. var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
  34375. var FORCED = isForced(PROMISE, function () {
  34376. var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor);
  34377. var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor);
  34378. // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
  34379. // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
  34380. // We can't detect it synchronously, so just check versions
  34381. if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
  34382. // We need Promise#finally in the pure version for preventing prototype pollution
  34383. if (IS_PURE && !PromisePrototype['finally']) return true;
  34384. // We can't use @@species feature detection in V8 since it causes
  34385. // deoptimization and performance degradation
  34386. // https://github.com/zloirock/core-js/issues/679
  34387. if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false;
  34388. // Detect correctness of subclassing with @@species support
  34389. var promise = new PromiseConstructor(function (resolve) { resolve(1); });
  34390. var FakePromise = function (exec) {
  34391. exec(function () { /* empty */ }, function () { /* empty */ });
  34392. };
  34393. var constructor = promise.constructor = {};
  34394. constructor[SPECIES] = FakePromise;
  34395. SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
  34396. if (!SUBCLASSING) return true;
  34397. // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
  34398. return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT;
  34399. });
  34400. var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
  34401. PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
  34402. });
  34403. // helpers
  34404. var isThenable = function (it) {
  34405. var then;
  34406. return isObject(it) && isCallable(then = it.then) ? then : false;
  34407. };
  34408. var notify = function (state, isReject) {
  34409. if (state.notified) return;
  34410. state.notified = true;
  34411. var chain = state.reactions;
  34412. microtask(function () {
  34413. var value = state.value;
  34414. var ok = state.state == FULFILLED;
  34415. var index = 0;
  34416. // variable length - can't use forEach
  34417. while (chain.length > index) {
  34418. var reaction = chain[index++];
  34419. var handler = ok ? reaction.ok : reaction.fail;
  34420. var resolve = reaction.resolve;
  34421. var reject = reaction.reject;
  34422. var domain = reaction.domain;
  34423. var result, then, exited;
  34424. try {
  34425. if (handler) {
  34426. if (!ok) {
  34427. if (state.rejection === UNHANDLED) onHandleUnhandled(state);
  34428. state.rejection = HANDLED;
  34429. }
  34430. if (handler === true) result = value;
  34431. else {
  34432. if (domain) domain.enter();
  34433. result = handler(value); // can throw
  34434. if (domain) {
  34435. domain.exit();
  34436. exited = true;
  34437. }
  34438. }
  34439. if (result === reaction.promise) {
  34440. reject(TypeError('Promise-chain cycle'));
  34441. } else if (then = isThenable(result)) {
  34442. call(then, result, resolve, reject);
  34443. } else resolve(result);
  34444. } else reject(value);
  34445. } catch (error) {
  34446. if (domain && !exited) domain.exit();
  34447. reject(error);
  34448. }
  34449. }
  34450. state.reactions = [];
  34451. state.notified = false;
  34452. if (isReject && !state.rejection) onUnhandled(state);
  34453. });
  34454. };
  34455. var dispatchEvent = function (name, promise, reason) {
  34456. var event, handler;
  34457. if (DISPATCH_EVENT) {
  34458. event = document.createEvent('Event');
  34459. event.promise = promise;
  34460. event.reason = reason;
  34461. event.initEvent(name, false, true);
  34462. global.dispatchEvent(event);
  34463. } else event = { promise: promise, reason: reason };
  34464. if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event);
  34465. else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
  34466. };
  34467. var onUnhandled = function (state) {
  34468. call(task, global, function () {
  34469. var promise = state.facade;
  34470. var value = state.value;
  34471. var IS_UNHANDLED = isUnhandled(state);
  34472. var result;
  34473. if (IS_UNHANDLED) {
  34474. result = perform(function () {
  34475. if (IS_NODE) {
  34476. process.emit('unhandledRejection', value, promise);
  34477. } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
  34478. });
  34479. // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
  34480. state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
  34481. if (result.error) throw result.value;
  34482. }
  34483. });
  34484. };
  34485. var isUnhandled = function (state) {
  34486. return state.rejection !== HANDLED && !state.parent;
  34487. };
  34488. var onHandleUnhandled = function (state) {
  34489. call(task, global, function () {
  34490. var promise = state.facade;
  34491. if (IS_NODE) {
  34492. process.emit('rejectionHandled', promise);
  34493. } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
  34494. });
  34495. };
  34496. var bind = function (fn, state, unwrap) {
  34497. return function (value) {
  34498. fn(state, value, unwrap);
  34499. };
  34500. };
  34501. var internalReject = function (state, value, unwrap) {
  34502. if (state.done) return;
  34503. state.done = true;
  34504. if (unwrap) state = unwrap;
  34505. state.value = value;
  34506. state.state = REJECTED;
  34507. notify(state, true);
  34508. };
  34509. var internalResolve = function (state, value, unwrap) {
  34510. if (state.done) return;
  34511. state.done = true;
  34512. if (unwrap) state = unwrap;
  34513. try {
  34514. if (state.facade === value) throw TypeError("Promise can't be resolved itself");
  34515. var then = isThenable(value);
  34516. if (then) {
  34517. microtask(function () {
  34518. var wrapper = { done: false };
  34519. try {
  34520. call(then, value,
  34521. bind(internalResolve, wrapper, state),
  34522. bind(internalReject, wrapper, state)
  34523. );
  34524. } catch (error) {
  34525. internalReject(wrapper, error, state);
  34526. }
  34527. });
  34528. } else {
  34529. state.value = value;
  34530. state.state = FULFILLED;
  34531. notify(state, false);
  34532. }
  34533. } catch (error) {
  34534. internalReject({ done: false }, error, state);
  34535. }
  34536. };
  34537. // constructor polyfill
  34538. if (FORCED) {
  34539. // 25.4.3.1 Promise(executor)
  34540. PromiseConstructor = function Promise(executor) {
  34541. anInstance(this, PromisePrototype);
  34542. aCallable(executor);
  34543. call(Internal, this);
  34544. var state = getInternalState(this);
  34545. try {
  34546. executor(bind(internalResolve, state), bind(internalReject, state));
  34547. } catch (error) {
  34548. internalReject(state, error);
  34549. }
  34550. };
  34551. PromisePrototype = PromiseConstructor.prototype;
  34552. // eslint-disable-next-line no-unused-vars -- required for `.length`
  34553. Internal = function Promise(executor) {
  34554. setInternalState(this, {
  34555. type: PROMISE,
  34556. done: false,
  34557. notified: false,
  34558. parent: false,
  34559. reactions: [],
  34560. rejection: false,
  34561. state: PENDING,
  34562. value: undefined
  34563. });
  34564. };
  34565. Internal.prototype = redefineAll(PromisePrototype, {
  34566. // `Promise.prototype.then` method
  34567. // https://tc39.es/ecma262/#sec-promise.prototype.then
  34568. then: function then(onFulfilled, onRejected) {
  34569. var state = getInternalPromiseState(this);
  34570. var reactions = state.reactions;
  34571. var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
  34572. reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
  34573. reaction.fail = isCallable(onRejected) && onRejected;
  34574. reaction.domain = IS_NODE ? process.domain : undefined;
  34575. state.parent = true;
  34576. reactions[reactions.length] = reaction;
  34577. if (state.state != PENDING) notify(state, false);
  34578. return reaction.promise;
  34579. },
  34580. // `Promise.prototype.catch` method
  34581. // https://tc39.es/ecma262/#sec-promise.prototype.catch
  34582. 'catch': function (onRejected) {
  34583. return this.then(undefined, onRejected);
  34584. }
  34585. });
  34586. OwnPromiseCapability = function () {
  34587. var promise = new Internal();
  34588. var state = getInternalState(promise);
  34589. this.promise = promise;
  34590. this.resolve = bind(internalResolve, state);
  34591. this.reject = bind(internalReject, state);
  34592. };
  34593. newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
  34594. return C === PromiseConstructor || C === PromiseWrapper
  34595. ? new OwnPromiseCapability(C)
  34596. : newGenericPromiseCapability(C);
  34597. };
  34598. if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) {
  34599. nativeThen = NativePromisePrototype.then;
  34600. if (!SUBCLASSING) {
  34601. // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
  34602. redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
  34603. var that = this;
  34604. return new PromiseConstructor(function (resolve, reject) {
  34605. call(nativeThen, that, resolve, reject);
  34606. }).then(onFulfilled, onRejected);
  34607. // https://github.com/zloirock/core-js/issues/640
  34608. }, { unsafe: true });
  34609. // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
  34610. redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
  34611. }
  34612. // make `.constructor === Promise` work for native promise-based APIs
  34613. try {
  34614. delete NativePromisePrototype.constructor;
  34615. } catch (error) { /* empty */ }
  34616. // make `instanceof Promise` work for native promise-based APIs
  34617. if (setPrototypeOf) {
  34618. setPrototypeOf(NativePromisePrototype, PromisePrototype);
  34619. }
  34620. }
  34621. }
  34622. $({ global: true, wrap: true, forced: FORCED }, {
  34623. Promise: PromiseConstructor
  34624. });
  34625. setToStringTag(PromiseConstructor, PROMISE, false, true);
  34626. setSpecies(PROMISE);
  34627. PromiseWrapper = getBuiltIn(PROMISE);
  34628. // statics
  34629. $({ target: PROMISE, stat: true, forced: FORCED }, {
  34630. // `Promise.reject` method
  34631. // https://tc39.es/ecma262/#sec-promise.reject
  34632. reject: function reject(r) {
  34633. var capability = newPromiseCapability(this);
  34634. call(capability.reject, undefined, r);
  34635. return capability.promise;
  34636. }
  34637. });
  34638. $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
  34639. // `Promise.resolve` method
  34640. // https://tc39.es/ecma262/#sec-promise.resolve
  34641. resolve: function resolve(x) {
  34642. return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
  34643. }
  34644. });
  34645. $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
  34646. // `Promise.all` method
  34647. // https://tc39.es/ecma262/#sec-promise.all
  34648. all: function all(iterable) {
  34649. var C = this;
  34650. var capability = newPromiseCapability(C);
  34651. var resolve = capability.resolve;
  34652. var reject = capability.reject;
  34653. var result = perform(function () {
  34654. var $promiseResolve = aCallable(C.resolve);
  34655. var values = [];
  34656. var counter = 0;
  34657. var remaining = 1;
  34658. iterate(iterable, function (promise) {
  34659. var index = counter++;
  34660. var alreadyCalled = false;
  34661. remaining++;
  34662. call($promiseResolve, C, promise).then(function (value) {
  34663. if (alreadyCalled) return;
  34664. alreadyCalled = true;
  34665. values[index] = value;
  34666. --remaining || resolve(values);
  34667. }, reject);
  34668. });
  34669. --remaining || resolve(values);
  34670. });
  34671. if (result.error) reject(result.value);
  34672. return capability.promise;
  34673. },
  34674. // `Promise.race` method
  34675. // https://tc39.es/ecma262/#sec-promise.race
  34676. race: function race(iterable) {
  34677. var C = this;
  34678. var capability = newPromiseCapability(C);
  34679. var reject = capability.reject;
  34680. var result = perform(function () {
  34681. var $promiseResolve = aCallable(C.resolve);
  34682. iterate(iterable, function (promise) {
  34683. call($promiseResolve, C, promise).then(capability.resolve, reject);
  34684. });
  34685. });
  34686. if (result.error) reject(result.value);
  34687. return capability.promise;
  34688. }
  34689. });
  34690. /***/ }),
  34691. /***/ 2419:
  34692. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34693. var $ = __webpack_require__(2109);
  34694. var getBuiltIn = __webpack_require__(5005);
  34695. var apply = __webpack_require__(2104);
  34696. var bind = __webpack_require__(7065);
  34697. var aConstructor = __webpack_require__(9483);
  34698. var anObject = __webpack_require__(9670);
  34699. var isObject = __webpack_require__(111);
  34700. var create = __webpack_require__(30);
  34701. var fails = __webpack_require__(7293);
  34702. var nativeConstruct = getBuiltIn('Reflect', 'construct');
  34703. var ObjectPrototype = Object.prototype;
  34704. var push = [].push;
  34705. // `Reflect.construct` method
  34706. // https://tc39.es/ecma262/#sec-reflect.construct
  34707. // MS Edge supports only 2 arguments and argumentsList argument is optional
  34708. // FF Nightly sets third argument as `new.target`, but does not create `this` from it
  34709. var NEW_TARGET_BUG = fails(function () {
  34710. function F() { /* empty */ }
  34711. return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
  34712. });
  34713. var ARGS_BUG = !fails(function () {
  34714. nativeConstruct(function () { /* empty */ });
  34715. });
  34716. var FORCED = NEW_TARGET_BUG || ARGS_BUG;
  34717. $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
  34718. construct: function construct(Target, args /* , newTarget */) {
  34719. aConstructor(Target);
  34720. anObject(args);
  34721. var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);
  34722. if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
  34723. if (Target == newTarget) {
  34724. // w/o altered newTarget, optimization for 0-4 arguments
  34725. switch (args.length) {
  34726. case 0: return new Target();
  34727. case 1: return new Target(args[0]);
  34728. case 2: return new Target(args[0], args[1]);
  34729. case 3: return new Target(args[0], args[1], args[2]);
  34730. case 4: return new Target(args[0], args[1], args[2], args[3]);
  34731. }
  34732. // w/o altered newTarget, lot of arguments case
  34733. var $args = [null];
  34734. apply(push, $args, args);
  34735. return new (apply(bind, Target, $args))();
  34736. }
  34737. // with altered newTarget, not support built-in constructors
  34738. var proto = newTarget.prototype;
  34739. var instance = create(isObject(proto) ? proto : ObjectPrototype);
  34740. var result = apply(Target, instance, args);
  34741. return isObject(result) ? result : instance;
  34742. }
  34743. });
  34744. /***/ }),
  34745. /***/ 4916:
  34746. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34747. "use strict";
  34748. var $ = __webpack_require__(2109);
  34749. var exec = __webpack_require__(2261);
  34750. // `RegExp.prototype.exec` method
  34751. // https://tc39.es/ecma262/#sec-regexp.prototype.exec
  34752. $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
  34753. exec: exec
  34754. });
  34755. /***/ }),
  34756. /***/ 2087:
  34757. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34758. var DESCRIPTORS = __webpack_require__(9781);
  34759. var objectDefinePropertyModule = __webpack_require__(3070);
  34760. var regExpFlags = __webpack_require__(7066);
  34761. var fails = __webpack_require__(7293);
  34762. var RegExpPrototype = RegExp.prototype;
  34763. var FORCED = DESCRIPTORS && fails(function () {
  34764. // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
  34765. return Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call({ dotAll: true, sticky: true }) !== 'sy';
  34766. });
  34767. // `RegExp.prototype.flags` getter
  34768. // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
  34769. if (FORCED) objectDefinePropertyModule.f(RegExpPrototype, 'flags', {
  34770. configurable: true,
  34771. get: regExpFlags
  34772. });
  34773. /***/ }),
  34774. /***/ 9714:
  34775. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34776. "use strict";
  34777. var uncurryThis = __webpack_require__(1702);
  34778. var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER);
  34779. var redefine = __webpack_require__(1320);
  34780. var anObject = __webpack_require__(9670);
  34781. var isPrototypeOf = __webpack_require__(7976);
  34782. var $toString = __webpack_require__(1340);
  34783. var fails = __webpack_require__(7293);
  34784. var regExpFlags = __webpack_require__(7066);
  34785. var TO_STRING = 'toString';
  34786. var RegExpPrototype = RegExp.prototype;
  34787. var n$ToString = RegExpPrototype[TO_STRING];
  34788. var getFlags = uncurryThis(regExpFlags);
  34789. var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
  34790. // FF44- RegExp#toString has a wrong name
  34791. var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
  34792. // `RegExp.prototype.toString` method
  34793. // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
  34794. if (NOT_GENERIC || INCORRECT_NAME) {
  34795. redefine(RegExp.prototype, TO_STRING, function toString() {
  34796. var R = anObject(this);
  34797. var p = $toString(R.source);
  34798. var rf = R.flags;
  34799. var f = $toString(rf === undefined && isPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf);
  34800. return '/' + p + '/' + f;
  34801. }, { unsafe: true });
  34802. }
  34803. /***/ }),
  34804. /***/ 189:
  34805. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34806. "use strict";
  34807. var collection = __webpack_require__(7710);
  34808. var collectionStrong = __webpack_require__(5631);
  34809. // `Set` constructor
  34810. // https://tc39.es/ecma262/#sec-set-objects
  34811. collection('Set', function (init) {
  34812. return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
  34813. }, collectionStrong);
  34814. /***/ }),
  34815. /***/ 9841:
  34816. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34817. "use strict";
  34818. var $ = __webpack_require__(2109);
  34819. var codeAt = (__webpack_require__(8710).codeAt);
  34820. // `String.prototype.codePointAt` method
  34821. // https://tc39.es/ecma262/#sec-string.prototype.codepointat
  34822. $({ target: 'String', proto: true }, {
  34823. codePointAt: function codePointAt(pos) {
  34824. return codeAt(this, pos);
  34825. }
  34826. });
  34827. /***/ }),
  34828. /***/ 4953:
  34829. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34830. var $ = __webpack_require__(2109);
  34831. var global = __webpack_require__(7854);
  34832. var uncurryThis = __webpack_require__(1702);
  34833. var toAbsoluteIndex = __webpack_require__(1400);
  34834. var RangeError = global.RangeError;
  34835. var fromCharCode = String.fromCharCode;
  34836. // eslint-disable-next-line es/no-string-fromcodepoint -- required for testing
  34837. var $fromCodePoint = String.fromCodePoint;
  34838. var join = uncurryThis([].join);
  34839. // length should be 1, old FF problem
  34840. var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1;
  34841. // `String.fromCodePoint` method
  34842. // https://tc39.es/ecma262/#sec-string.fromcodepoint
  34843. $({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {
  34844. // eslint-disable-next-line no-unused-vars -- required for `.length`
  34845. fromCodePoint: function fromCodePoint(x) {
  34846. var elements = [];
  34847. var length = arguments.length;
  34848. var i = 0;
  34849. var code;
  34850. while (length > i) {
  34851. code = +arguments[i++];
  34852. if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point');
  34853. elements[i] = code < 0x10000
  34854. ? fromCharCode(code)
  34855. : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00);
  34856. } return join(elements, '');
  34857. }
  34858. });
  34859. /***/ }),
  34860. /***/ 2023:
  34861. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34862. "use strict";
  34863. var $ = __webpack_require__(2109);
  34864. var uncurryThis = __webpack_require__(1702);
  34865. var notARegExp = __webpack_require__(3929);
  34866. var requireObjectCoercible = __webpack_require__(4488);
  34867. var toString = __webpack_require__(1340);
  34868. var correctIsRegExpLogic = __webpack_require__(4964);
  34869. var stringIndexOf = uncurryThis(''.indexOf);
  34870. // `String.prototype.includes` method
  34871. // https://tc39.es/ecma262/#sec-string.prototype.includes
  34872. $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
  34873. includes: function includes(searchString /* , position = 0 */) {
  34874. return !!~stringIndexOf(
  34875. toString(requireObjectCoercible(this)),
  34876. toString(notARegExp(searchString)),
  34877. arguments.length > 1 ? arguments[1] : undefined
  34878. );
  34879. }
  34880. });
  34881. /***/ }),
  34882. /***/ 8734:
  34883. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34884. "use strict";
  34885. var $ = __webpack_require__(2109);
  34886. var createHTML = __webpack_require__(4230);
  34887. var forcedStringHTMLMethod = __webpack_require__(3429);
  34888. // `String.prototype.italics` method
  34889. // https://tc39.es/ecma262/#sec-string.prototype.italics
  34890. $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, {
  34891. italics: function italics() {
  34892. return createHTML(this, 'i', '', '');
  34893. }
  34894. });
  34895. /***/ }),
  34896. /***/ 8783:
  34897. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34898. "use strict";
  34899. var charAt = (__webpack_require__(8710).charAt);
  34900. var toString = __webpack_require__(1340);
  34901. var InternalStateModule = __webpack_require__(9909);
  34902. var defineIterator = __webpack_require__(654);
  34903. var STRING_ITERATOR = 'String Iterator';
  34904. var setInternalState = InternalStateModule.set;
  34905. var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
  34906. // `String.prototype[@@iterator]` method
  34907. // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
  34908. defineIterator(String, 'String', function (iterated) {
  34909. setInternalState(this, {
  34910. type: STRING_ITERATOR,
  34911. string: toString(iterated),
  34912. index: 0
  34913. });
  34914. // `%StringIteratorPrototype%.next` method
  34915. // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
  34916. }, function next() {
  34917. var state = getInternalState(this);
  34918. var string = state.string;
  34919. var index = state.index;
  34920. var point;
  34921. if (index >= string.length) return { value: undefined, done: true };
  34922. point = charAt(string, index);
  34923. state.index += point.length;
  34924. return { value: point, done: false };
  34925. });
  34926. /***/ }),
  34927. /***/ 9254:
  34928. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34929. "use strict";
  34930. var $ = __webpack_require__(2109);
  34931. var createHTML = __webpack_require__(4230);
  34932. var forcedStringHTMLMethod = __webpack_require__(3429);
  34933. // `String.prototype.link` method
  34934. // https://tc39.es/ecma262/#sec-string.prototype.link
  34935. $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {
  34936. link: function link(url) {
  34937. return createHTML(this, 'a', 'href', url);
  34938. }
  34939. });
  34940. /***/ }),
  34941. /***/ 6373:
  34942. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  34943. "use strict";
  34944. /* eslint-disable es/no-string-prototype-matchall -- safe */
  34945. var $ = __webpack_require__(2109);
  34946. var global = __webpack_require__(7854);
  34947. var call = __webpack_require__(6916);
  34948. var uncurryThis = __webpack_require__(1702);
  34949. var createIteratorConstructor = __webpack_require__(4994);
  34950. var requireObjectCoercible = __webpack_require__(4488);
  34951. var toLength = __webpack_require__(7466);
  34952. var toString = __webpack_require__(1340);
  34953. var anObject = __webpack_require__(9670);
  34954. var classof = __webpack_require__(4326);
  34955. var isPrototypeOf = __webpack_require__(7976);
  34956. var isRegExp = __webpack_require__(7850);
  34957. var regExpFlags = __webpack_require__(7066);
  34958. var getMethod = __webpack_require__(8173);
  34959. var redefine = __webpack_require__(1320);
  34960. var fails = __webpack_require__(7293);
  34961. var wellKnownSymbol = __webpack_require__(5112);
  34962. var speciesConstructor = __webpack_require__(6707);
  34963. var advanceStringIndex = __webpack_require__(1530);
  34964. var regExpExec = __webpack_require__(7651);
  34965. var InternalStateModule = __webpack_require__(9909);
  34966. var IS_PURE = __webpack_require__(1913);
  34967. var MATCH_ALL = wellKnownSymbol('matchAll');
  34968. var REGEXP_STRING = 'RegExp String';
  34969. var REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator';
  34970. var setInternalState = InternalStateModule.set;
  34971. var getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR);
  34972. var RegExpPrototype = RegExp.prototype;
  34973. var TypeError = global.TypeError;
  34974. var getFlags = uncurryThis(regExpFlags);
  34975. var stringIndexOf = uncurryThis(''.indexOf);
  34976. var un$MatchAll = uncurryThis(''.matchAll);
  34977. var WORKS_WITH_NON_GLOBAL_REGEX = !!un$MatchAll && !fails(function () {
  34978. un$MatchAll('a', /./);
  34979. });
  34980. var $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, $global, fullUnicode) {
  34981. setInternalState(this, {
  34982. type: REGEXP_STRING_ITERATOR,
  34983. regexp: regexp,
  34984. string: string,
  34985. global: $global,
  34986. unicode: fullUnicode,
  34987. done: false
  34988. });
  34989. }, REGEXP_STRING, function next() {
  34990. var state = getInternalState(this);
  34991. if (state.done) return { value: undefined, done: true };
  34992. var R = state.regexp;
  34993. var S = state.string;
  34994. var match = regExpExec(R, S);
  34995. if (match === null) return { value: undefined, done: state.done = true };
  34996. if (state.global) {
  34997. if (toString(match[0]) === '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode);
  34998. return { value: match, done: false };
  34999. }
  35000. state.done = true;
  35001. return { value: match, done: false };
  35002. });
  35003. var $matchAll = function (string) {
  35004. var R = anObject(this);
  35005. var S = toString(string);
  35006. var C, flagsValue, flags, matcher, $global, fullUnicode;
  35007. C = speciesConstructor(R, RegExp);
  35008. flagsValue = R.flags;
  35009. if (flagsValue === undefined && isPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype)) {
  35010. flagsValue = getFlags(R);
  35011. }
  35012. flags = flagsValue === undefined ? '' : toString(flagsValue);
  35013. matcher = new C(C === RegExp ? R.source : R, flags);
  35014. $global = !!~stringIndexOf(flags, 'g');
  35015. fullUnicode = !!~stringIndexOf(flags, 'u');
  35016. matcher.lastIndex = toLength(R.lastIndex);
  35017. return new $RegExpStringIterator(matcher, S, $global, fullUnicode);
  35018. };
  35019. // `String.prototype.matchAll` method
  35020. // https://tc39.es/ecma262/#sec-string.prototype.matchall
  35021. $({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, {
  35022. matchAll: function matchAll(regexp) {
  35023. var O = requireObjectCoercible(this);
  35024. var flags, S, matcher, rx;
  35025. if (regexp != null) {
  35026. if (isRegExp(regexp)) {
  35027. flags = toString(requireObjectCoercible('flags' in RegExpPrototype
  35028. ? regexp.flags
  35029. : getFlags(regexp)
  35030. ));
  35031. if (!~stringIndexOf(flags, 'g')) throw TypeError('`.matchAll` does not allow non-global regexes');
  35032. }
  35033. if (WORKS_WITH_NON_GLOBAL_REGEX) return un$MatchAll(O, regexp);
  35034. matcher = getMethod(regexp, MATCH_ALL);
  35035. if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll;
  35036. if (matcher) return call(matcher, regexp, O);
  35037. } else if (WORKS_WITH_NON_GLOBAL_REGEX) return un$MatchAll(O, regexp);
  35038. S = toString(O);
  35039. rx = new RegExp(regexp, 'g');
  35040. return IS_PURE ? call($matchAll, rx, S) : rx[MATCH_ALL](S);
  35041. }
  35042. });
  35043. IS_PURE || MATCH_ALL in RegExpPrototype || redefine(RegExpPrototype, MATCH_ALL, $matchAll);
  35044. /***/ }),
  35045. /***/ 4723:
  35046. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35047. "use strict";
  35048. var call = __webpack_require__(6916);
  35049. var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
  35050. var anObject = __webpack_require__(9670);
  35051. var toLength = __webpack_require__(7466);
  35052. var toString = __webpack_require__(1340);
  35053. var requireObjectCoercible = __webpack_require__(4488);
  35054. var getMethod = __webpack_require__(8173);
  35055. var advanceStringIndex = __webpack_require__(1530);
  35056. var regExpExec = __webpack_require__(7651);
  35057. // @@match logic
  35058. fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) {
  35059. return [
  35060. // `String.prototype.match` method
  35061. // https://tc39.es/ecma262/#sec-string.prototype.match
  35062. function match(regexp) {
  35063. var O = requireObjectCoercible(this);
  35064. var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);
  35065. return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O));
  35066. },
  35067. // `RegExp.prototype[@@match]` method
  35068. // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
  35069. function (string) {
  35070. var rx = anObject(this);
  35071. var S = toString(string);
  35072. var res = maybeCallNative(nativeMatch, rx, S);
  35073. if (res.done) return res.value;
  35074. if (!rx.global) return regExpExec(rx, S);
  35075. var fullUnicode = rx.unicode;
  35076. rx.lastIndex = 0;
  35077. var A = [];
  35078. var n = 0;
  35079. var result;
  35080. while ((result = regExpExec(rx, S)) !== null) {
  35081. var matchStr = toString(result[0]);
  35082. A[n] = matchStr;
  35083. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  35084. n++;
  35085. }
  35086. return n === 0 ? null : A;
  35087. }
  35088. ];
  35089. });
  35090. /***/ }),
  35091. /***/ 2481:
  35092. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35093. var $ = __webpack_require__(2109);
  35094. var repeat = __webpack_require__(8415);
  35095. // `String.prototype.repeat` method
  35096. // https://tc39.es/ecma262/#sec-string.prototype.repeat
  35097. $({ target: 'String', proto: true }, {
  35098. repeat: repeat
  35099. });
  35100. /***/ }),
  35101. /***/ 5306:
  35102. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35103. "use strict";
  35104. var apply = __webpack_require__(2104);
  35105. var call = __webpack_require__(6916);
  35106. var uncurryThis = __webpack_require__(1702);
  35107. var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
  35108. var fails = __webpack_require__(7293);
  35109. var anObject = __webpack_require__(9670);
  35110. var isCallable = __webpack_require__(614);
  35111. var toIntegerOrInfinity = __webpack_require__(9303);
  35112. var toLength = __webpack_require__(7466);
  35113. var toString = __webpack_require__(1340);
  35114. var requireObjectCoercible = __webpack_require__(4488);
  35115. var advanceStringIndex = __webpack_require__(1530);
  35116. var getMethod = __webpack_require__(8173);
  35117. var getSubstitution = __webpack_require__(647);
  35118. var regExpExec = __webpack_require__(7651);
  35119. var wellKnownSymbol = __webpack_require__(5112);
  35120. var REPLACE = wellKnownSymbol('replace');
  35121. var max = Math.max;
  35122. var min = Math.min;
  35123. var concat = uncurryThis([].concat);
  35124. var push = uncurryThis([].push);
  35125. var stringIndexOf = uncurryThis(''.indexOf);
  35126. var stringSlice = uncurryThis(''.slice);
  35127. var maybeToString = function (it) {
  35128. return it === undefined ? it : String(it);
  35129. };
  35130. // IE <= 11 replaces $0 with the whole match, as if it was $&
  35131. // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
  35132. var REPLACE_KEEPS_$0 = (function () {
  35133. // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
  35134. return 'a'.replace(/./, '$0') === '$0';
  35135. })();
  35136. // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
  35137. var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
  35138. if (/./[REPLACE]) {
  35139. return /./[REPLACE]('a', '$0') === '';
  35140. }
  35141. return false;
  35142. })();
  35143. var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
  35144. var re = /./;
  35145. re.exec = function () {
  35146. var result = [];
  35147. result.groups = { a: '7' };
  35148. return result;
  35149. };
  35150. // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
  35151. return ''.replace(re, '$<a>') !== '7';
  35152. });
  35153. // @@replace logic
  35154. fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
  35155. var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
  35156. return [
  35157. // `String.prototype.replace` method
  35158. // https://tc39.es/ecma262/#sec-string.prototype.replace
  35159. function replace(searchValue, replaceValue) {
  35160. var O = requireObjectCoercible(this);
  35161. var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
  35162. return replacer
  35163. ? call(replacer, searchValue, O, replaceValue)
  35164. : call(nativeReplace, toString(O), searchValue, replaceValue);
  35165. },
  35166. // `RegExp.prototype[@@replace]` method
  35167. // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
  35168. function (string, replaceValue) {
  35169. var rx = anObject(this);
  35170. var S = toString(string);
  35171. if (
  35172. typeof replaceValue == 'string' &&
  35173. stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
  35174. stringIndexOf(replaceValue, '$<') === -1
  35175. ) {
  35176. var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
  35177. if (res.done) return res.value;
  35178. }
  35179. var functionalReplace = isCallable(replaceValue);
  35180. if (!functionalReplace) replaceValue = toString(replaceValue);
  35181. var global = rx.global;
  35182. if (global) {
  35183. var fullUnicode = rx.unicode;
  35184. rx.lastIndex = 0;
  35185. }
  35186. var results = [];
  35187. while (true) {
  35188. var result = regExpExec(rx, S);
  35189. if (result === null) break;
  35190. push(results, result);
  35191. if (!global) break;
  35192. var matchStr = toString(result[0]);
  35193. if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
  35194. }
  35195. var accumulatedResult = '';
  35196. var nextSourcePosition = 0;
  35197. for (var i = 0; i < results.length; i++) {
  35198. result = results[i];
  35199. var matched = toString(result[0]);
  35200. var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
  35201. var captures = [];
  35202. // NOTE: This is equivalent to
  35203. // captures = result.slice(1).map(maybeToString)
  35204. // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
  35205. // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
  35206. // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
  35207. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
  35208. var namedCaptures = result.groups;
  35209. if (functionalReplace) {
  35210. var replacerArgs = concat([matched], captures, position, S);
  35211. if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
  35212. var replacement = toString(apply(replaceValue, undefined, replacerArgs));
  35213. } else {
  35214. replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
  35215. }
  35216. if (position >= nextSourcePosition) {
  35217. accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
  35218. nextSourcePosition = position + matched.length;
  35219. }
  35220. }
  35221. return accumulatedResult + stringSlice(S, nextSourcePosition);
  35222. }
  35223. ];
  35224. }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
  35225. /***/ }),
  35226. /***/ 3123:
  35227. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35228. "use strict";
  35229. var apply = __webpack_require__(2104);
  35230. var call = __webpack_require__(6916);
  35231. var uncurryThis = __webpack_require__(1702);
  35232. var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007);
  35233. var isRegExp = __webpack_require__(7850);
  35234. var anObject = __webpack_require__(9670);
  35235. var requireObjectCoercible = __webpack_require__(4488);
  35236. var speciesConstructor = __webpack_require__(6707);
  35237. var advanceStringIndex = __webpack_require__(1530);
  35238. var toLength = __webpack_require__(7466);
  35239. var toString = __webpack_require__(1340);
  35240. var getMethod = __webpack_require__(8173);
  35241. var arraySlice = __webpack_require__(206);
  35242. var callRegExpExec = __webpack_require__(7651);
  35243. var regexpExec = __webpack_require__(2261);
  35244. var stickyHelpers = __webpack_require__(2999);
  35245. var fails = __webpack_require__(7293);
  35246. var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
  35247. var MAX_UINT32 = 0xFFFFFFFF;
  35248. var min = Math.min;
  35249. var $push = [].push;
  35250. var exec = uncurryThis(/./.exec);
  35251. var push = uncurryThis($push);
  35252. var stringSlice = uncurryThis(''.slice);
  35253. // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
  35254. // Weex JS has frozen built-in prototypes, so use try / catch wrapper
  35255. var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
  35256. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  35257. var re = /(?:)/;
  35258. var originalExec = re.exec;
  35259. re.exec = function () { return originalExec.apply(this, arguments); };
  35260. var result = 'ab'.split(re);
  35261. return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
  35262. });
  35263. // @@split logic
  35264. fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
  35265. var internalSplit;
  35266. if (
  35267. 'abbc'.split(/(b)*/)[1] == 'c' ||
  35268. // eslint-disable-next-line regexp/no-empty-group -- required for testing
  35269. 'test'.split(/(?:)/, -1).length != 4 ||
  35270. 'ab'.split(/(?:ab)*/).length != 2 ||
  35271. '.'.split(/(.?)(.?)/).length != 4 ||
  35272. // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
  35273. '.'.split(/()()/).length > 1 ||
  35274. ''.split(/.?/).length
  35275. ) {
  35276. // based on es5-shim implementation, need to rework it
  35277. internalSplit = function (separator, limit) {
  35278. var string = toString(requireObjectCoercible(this));
  35279. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  35280. if (lim === 0) return [];
  35281. if (separator === undefined) return [string];
  35282. // If `separator` is not a regex, use native split
  35283. if (!isRegExp(separator)) {
  35284. return call(nativeSplit, string, separator, lim);
  35285. }
  35286. var output = [];
  35287. var flags = (separator.ignoreCase ? 'i' : '') +
  35288. (separator.multiline ? 'm' : '') +
  35289. (separator.unicode ? 'u' : '') +
  35290. (separator.sticky ? 'y' : '');
  35291. var lastLastIndex = 0;
  35292. // Make `global` and avoid `lastIndex` issues by working with a copy
  35293. var separatorCopy = new RegExp(separator.source, flags + 'g');
  35294. var match, lastIndex, lastLength;
  35295. while (match = call(regexpExec, separatorCopy, string)) {
  35296. lastIndex = separatorCopy.lastIndex;
  35297. if (lastIndex > lastLastIndex) {
  35298. push(output, stringSlice(string, lastLastIndex, match.index));
  35299. if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1));
  35300. lastLength = match[0].length;
  35301. lastLastIndex = lastIndex;
  35302. if (output.length >= lim) break;
  35303. }
  35304. if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
  35305. }
  35306. if (lastLastIndex === string.length) {
  35307. if (lastLength || !exec(separatorCopy, '')) push(output, '');
  35308. } else push(output, stringSlice(string, lastLastIndex));
  35309. return output.length > lim ? arraySlice(output, 0, lim) : output;
  35310. };
  35311. // Chakra, V8
  35312. } else if ('0'.split(undefined, 0).length) {
  35313. internalSplit = function (separator, limit) {
  35314. return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
  35315. };
  35316. } else internalSplit = nativeSplit;
  35317. return [
  35318. // `String.prototype.split` method
  35319. // https://tc39.es/ecma262/#sec-string.prototype.split
  35320. function split(separator, limit) {
  35321. var O = requireObjectCoercible(this);
  35322. var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);
  35323. return splitter
  35324. ? call(splitter, separator, O, limit)
  35325. : call(internalSplit, toString(O), separator, limit);
  35326. },
  35327. // `RegExp.prototype[@@split]` method
  35328. // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
  35329. //
  35330. // NOTE: This cannot be properly polyfilled in engines that don't support
  35331. // the 'y' flag.
  35332. function (string, limit) {
  35333. var rx = anObject(this);
  35334. var S = toString(string);
  35335. var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
  35336. if (res.done) return res.value;
  35337. var C = speciesConstructor(rx, RegExp);
  35338. var unicodeMatching = rx.unicode;
  35339. var flags = (rx.ignoreCase ? 'i' : '') +
  35340. (rx.multiline ? 'm' : '') +
  35341. (rx.unicode ? 'u' : '') +
  35342. (UNSUPPORTED_Y ? 'g' : 'y');
  35343. // ^(? + rx + ) is needed, in combination with some S slicing, to
  35344. // simulate the 'y' flag.
  35345. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
  35346. var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
  35347. if (lim === 0) return [];
  35348. if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
  35349. var p = 0;
  35350. var q = 0;
  35351. var A = [];
  35352. while (q < S.length) {
  35353. splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
  35354. var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
  35355. var e;
  35356. if (
  35357. z === null ||
  35358. (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
  35359. ) {
  35360. q = advanceStringIndex(S, q, unicodeMatching);
  35361. } else {
  35362. push(A, stringSlice(S, p, q));
  35363. if (A.length === lim) return A;
  35364. for (var i = 1; i <= z.length - 1; i++) {
  35365. push(A, z[i]);
  35366. if (A.length === lim) return A;
  35367. }
  35368. q = p = e;
  35369. }
  35370. }
  35371. push(A, stringSlice(S, p));
  35372. return A;
  35373. }
  35374. ];
  35375. }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
  35376. /***/ }),
  35377. /***/ 7397:
  35378. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35379. "use strict";
  35380. var $ = __webpack_require__(2109);
  35381. var createHTML = __webpack_require__(4230);
  35382. var forcedStringHTMLMethod = __webpack_require__(3429);
  35383. // `String.prototype.strike` method
  35384. // https://tc39.es/ecma262/#sec-string.prototype.strike
  35385. $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {
  35386. strike: function strike() {
  35387. return createHTML(this, 'strike', '', '');
  35388. }
  35389. });
  35390. /***/ }),
  35391. /***/ 3210:
  35392. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35393. "use strict";
  35394. var $ = __webpack_require__(2109);
  35395. var $trim = (__webpack_require__(3111).trim);
  35396. var forcedStringTrimMethod = __webpack_require__(6091);
  35397. // `String.prototype.trim` method
  35398. // https://tc39.es/ecma262/#sec-string.prototype.trim
  35399. $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
  35400. trim: function trim() {
  35401. return $trim(this);
  35402. }
  35403. });
  35404. /***/ }),
  35405. /***/ 1817:
  35406. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35407. "use strict";
  35408. // `Symbol.prototype.description` getter
  35409. // https://tc39.es/ecma262/#sec-symbol.prototype.description
  35410. var $ = __webpack_require__(2109);
  35411. var DESCRIPTORS = __webpack_require__(9781);
  35412. var global = __webpack_require__(7854);
  35413. var uncurryThis = __webpack_require__(1702);
  35414. var hasOwn = __webpack_require__(2597);
  35415. var isCallable = __webpack_require__(614);
  35416. var isPrototypeOf = __webpack_require__(7976);
  35417. var toString = __webpack_require__(1340);
  35418. var defineProperty = (__webpack_require__(3070).f);
  35419. var copyConstructorProperties = __webpack_require__(9920);
  35420. var NativeSymbol = global.Symbol;
  35421. var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
  35422. if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
  35423. // Safari 12 bug
  35424. NativeSymbol().description !== undefined
  35425. )) {
  35426. var EmptyStringDescriptionStore = {};
  35427. // wrap Symbol constructor for correct work with undefined description
  35428. var SymbolWrapper = function Symbol() {
  35429. var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
  35430. var result = isPrototypeOf(SymbolPrototype, this)
  35431. ? new NativeSymbol(description)
  35432. // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
  35433. : description === undefined ? NativeSymbol() : NativeSymbol(description);
  35434. if (description === '') EmptyStringDescriptionStore[result] = true;
  35435. return result;
  35436. };
  35437. copyConstructorProperties(SymbolWrapper, NativeSymbol);
  35438. SymbolWrapper.prototype = SymbolPrototype;
  35439. SymbolPrototype.constructor = SymbolWrapper;
  35440. var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
  35441. var symbolToString = uncurryThis(SymbolPrototype.toString);
  35442. var symbolValueOf = uncurryThis(SymbolPrototype.valueOf);
  35443. var regexp = /^Symbol\((.*)\)[^)]+$/;
  35444. var replace = uncurryThis(''.replace);
  35445. var stringSlice = uncurryThis(''.slice);
  35446. defineProperty(SymbolPrototype, 'description', {
  35447. configurable: true,
  35448. get: function description() {
  35449. var symbol = symbolValueOf(this);
  35450. var string = symbolToString(symbol);
  35451. if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
  35452. var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
  35453. return desc === '' ? undefined : desc;
  35454. }
  35455. });
  35456. $({ global: true, forced: true }, {
  35457. Symbol: SymbolWrapper
  35458. });
  35459. }
  35460. /***/ }),
  35461. /***/ 2165:
  35462. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35463. var defineWellKnownSymbol = __webpack_require__(7235);
  35464. // `Symbol.iterator` well-known symbol
  35465. // https://tc39.es/ecma262/#sec-symbol.iterator
  35466. defineWellKnownSymbol('iterator');
  35467. /***/ }),
  35468. /***/ 2526:
  35469. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35470. "use strict";
  35471. var $ = __webpack_require__(2109);
  35472. var global = __webpack_require__(7854);
  35473. var getBuiltIn = __webpack_require__(5005);
  35474. var apply = __webpack_require__(2104);
  35475. var call = __webpack_require__(6916);
  35476. var uncurryThis = __webpack_require__(1702);
  35477. var IS_PURE = __webpack_require__(1913);
  35478. var DESCRIPTORS = __webpack_require__(9781);
  35479. var NATIVE_SYMBOL = __webpack_require__(133);
  35480. var fails = __webpack_require__(7293);
  35481. var hasOwn = __webpack_require__(2597);
  35482. var isArray = __webpack_require__(3157);
  35483. var isCallable = __webpack_require__(614);
  35484. var isObject = __webpack_require__(111);
  35485. var isPrototypeOf = __webpack_require__(7976);
  35486. var isSymbol = __webpack_require__(2190);
  35487. var anObject = __webpack_require__(9670);
  35488. var toObject = __webpack_require__(7908);
  35489. var toIndexedObject = __webpack_require__(5656);
  35490. var toPropertyKey = __webpack_require__(4948);
  35491. var $toString = __webpack_require__(1340);
  35492. var createPropertyDescriptor = __webpack_require__(9114);
  35493. var nativeObjectCreate = __webpack_require__(30);
  35494. var objectKeys = __webpack_require__(1956);
  35495. var getOwnPropertyNamesModule = __webpack_require__(8006);
  35496. var getOwnPropertyNamesExternal = __webpack_require__(1156);
  35497. var getOwnPropertySymbolsModule = __webpack_require__(5181);
  35498. var getOwnPropertyDescriptorModule = __webpack_require__(1236);
  35499. var definePropertyModule = __webpack_require__(3070);
  35500. var propertyIsEnumerableModule = __webpack_require__(5296);
  35501. var arraySlice = __webpack_require__(206);
  35502. var redefine = __webpack_require__(1320);
  35503. var shared = __webpack_require__(2309);
  35504. var sharedKey = __webpack_require__(6200);
  35505. var hiddenKeys = __webpack_require__(3501);
  35506. var uid = __webpack_require__(9711);
  35507. var wellKnownSymbol = __webpack_require__(5112);
  35508. var wrappedWellKnownSymbolModule = __webpack_require__(6061);
  35509. var defineWellKnownSymbol = __webpack_require__(7235);
  35510. var setToStringTag = __webpack_require__(8003);
  35511. var InternalStateModule = __webpack_require__(9909);
  35512. var $forEach = (__webpack_require__(2092).forEach);
  35513. var HIDDEN = sharedKey('hidden');
  35514. var SYMBOL = 'Symbol';
  35515. var PROTOTYPE = 'prototype';
  35516. var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
  35517. var setInternalState = InternalStateModule.set;
  35518. var getInternalState = InternalStateModule.getterFor(SYMBOL);
  35519. var ObjectPrototype = Object[PROTOTYPE];
  35520. var $Symbol = global.Symbol;
  35521. var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE];
  35522. var TypeError = global.TypeError;
  35523. var QObject = global.QObject;
  35524. var $stringify = getBuiltIn('JSON', 'stringify');
  35525. var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
  35526. var nativeDefineProperty = definePropertyModule.f;
  35527. var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
  35528. var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
  35529. var push = uncurryThis([].push);
  35530. var AllSymbols = shared('symbols');
  35531. var ObjectPrototypeSymbols = shared('op-symbols');
  35532. var StringToSymbolRegistry = shared('string-to-symbol-registry');
  35533. var SymbolToStringRegistry = shared('symbol-to-string-registry');
  35534. var WellKnownSymbolsStore = shared('wks');
  35535. // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
  35536. var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
  35537. // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
  35538. var setSymbolDescriptor = DESCRIPTORS && fails(function () {
  35539. return nativeObjectCreate(nativeDefineProperty({}, 'a', {
  35540. get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
  35541. })).a != 7;
  35542. }) ? function (O, P, Attributes) {
  35543. var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
  35544. if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
  35545. nativeDefineProperty(O, P, Attributes);
  35546. if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
  35547. nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
  35548. }
  35549. } : nativeDefineProperty;
  35550. var wrap = function (tag, description) {
  35551. var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype);
  35552. setInternalState(symbol, {
  35553. type: SYMBOL,
  35554. tag: tag,
  35555. description: description
  35556. });
  35557. if (!DESCRIPTORS) symbol.description = description;
  35558. return symbol;
  35559. };
  35560. var $defineProperty = function defineProperty(O, P, Attributes) {
  35561. if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
  35562. anObject(O);
  35563. var key = toPropertyKey(P);
  35564. anObject(Attributes);
  35565. if (hasOwn(AllSymbols, key)) {
  35566. if (!Attributes.enumerable) {
  35567. if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
  35568. O[HIDDEN][key] = true;
  35569. } else {
  35570. if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
  35571. Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
  35572. } return setSymbolDescriptor(O, key, Attributes);
  35573. } return nativeDefineProperty(O, key, Attributes);
  35574. };
  35575. var $defineProperties = function defineProperties(O, Properties) {
  35576. anObject(O);
  35577. var properties = toIndexedObject(Properties);
  35578. var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
  35579. $forEach(keys, function (key) {
  35580. if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);
  35581. });
  35582. return O;
  35583. };
  35584. var $create = function create(O, Properties) {
  35585. return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
  35586. };
  35587. var $propertyIsEnumerable = function propertyIsEnumerable(V) {
  35588. var P = toPropertyKey(V);
  35589. var enumerable = call(nativePropertyIsEnumerable, this, P);
  35590. if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false;
  35591. return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P]
  35592. ? enumerable : true;
  35593. };
  35594. var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
  35595. var it = toIndexedObject(O);
  35596. var key = toPropertyKey(P);
  35597. if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return;
  35598. var descriptor = nativeGetOwnPropertyDescriptor(it, key);
  35599. if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) {
  35600. descriptor.enumerable = true;
  35601. }
  35602. return descriptor;
  35603. };
  35604. var $getOwnPropertyNames = function getOwnPropertyNames(O) {
  35605. var names = nativeGetOwnPropertyNames(toIndexedObject(O));
  35606. var result = [];
  35607. $forEach(names, function (key) {
  35608. if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key);
  35609. });
  35610. return result;
  35611. };
  35612. var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
  35613. var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
  35614. var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
  35615. var result = [];
  35616. $forEach(names, function (key) {
  35617. if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) {
  35618. push(result, AllSymbols[key]);
  35619. }
  35620. });
  35621. return result;
  35622. };
  35623. // `Symbol` constructor
  35624. // https://tc39.es/ecma262/#sec-symbol-constructor
  35625. if (!NATIVE_SYMBOL) {
  35626. $Symbol = function Symbol() {
  35627. if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor');
  35628. var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]);
  35629. var tag = uid(description);
  35630. var setter = function (value) {
  35631. if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value);
  35632. if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
  35633. setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
  35634. };
  35635. if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
  35636. return wrap(tag, description);
  35637. };
  35638. SymbolPrototype = $Symbol[PROTOTYPE];
  35639. redefine(SymbolPrototype, 'toString', function toString() {
  35640. return getInternalState(this).tag;
  35641. });
  35642. redefine($Symbol, 'withoutSetter', function (description) {
  35643. return wrap(uid(description), description);
  35644. });
  35645. propertyIsEnumerableModule.f = $propertyIsEnumerable;
  35646. definePropertyModule.f = $defineProperty;
  35647. getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
  35648. getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
  35649. getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
  35650. wrappedWellKnownSymbolModule.f = function (name) {
  35651. return wrap(wellKnownSymbol(name), name);
  35652. };
  35653. if (DESCRIPTORS) {
  35654. // https://github.com/tc39/proposal-Symbol-description
  35655. nativeDefineProperty(SymbolPrototype, 'description', {
  35656. configurable: true,
  35657. get: function description() {
  35658. return getInternalState(this).description;
  35659. }
  35660. });
  35661. if (!IS_PURE) {
  35662. redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
  35663. }
  35664. }
  35665. }
  35666. $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
  35667. Symbol: $Symbol
  35668. });
  35669. $forEach(objectKeys(WellKnownSymbolsStore), function (name) {
  35670. defineWellKnownSymbol(name);
  35671. });
  35672. $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
  35673. // `Symbol.for` method
  35674. // https://tc39.es/ecma262/#sec-symbol.for
  35675. 'for': function (key) {
  35676. var string = $toString(key);
  35677. if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
  35678. var symbol = $Symbol(string);
  35679. StringToSymbolRegistry[string] = symbol;
  35680. SymbolToStringRegistry[symbol] = string;
  35681. return symbol;
  35682. },
  35683. // `Symbol.keyFor` method
  35684. // https://tc39.es/ecma262/#sec-symbol.keyfor
  35685. keyFor: function keyFor(sym) {
  35686. if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
  35687. if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
  35688. },
  35689. useSetter: function () { USE_SETTER = true; },
  35690. useSimple: function () { USE_SETTER = false; }
  35691. });
  35692. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
  35693. // `Object.create` method
  35694. // https://tc39.es/ecma262/#sec-object.create
  35695. create: $create,
  35696. // `Object.defineProperty` method
  35697. // https://tc39.es/ecma262/#sec-object.defineproperty
  35698. defineProperty: $defineProperty,
  35699. // `Object.defineProperties` method
  35700. // https://tc39.es/ecma262/#sec-object.defineproperties
  35701. defineProperties: $defineProperties,
  35702. // `Object.getOwnPropertyDescriptor` method
  35703. // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
  35704. getOwnPropertyDescriptor: $getOwnPropertyDescriptor
  35705. });
  35706. $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
  35707. // `Object.getOwnPropertyNames` method
  35708. // https://tc39.es/ecma262/#sec-object.getownpropertynames
  35709. getOwnPropertyNames: $getOwnPropertyNames,
  35710. // `Object.getOwnPropertySymbols` method
  35711. // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
  35712. getOwnPropertySymbols: $getOwnPropertySymbols
  35713. });
  35714. // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
  35715. // https://bugs.chromium.org/p/v8/issues/detail?id=3443
  35716. $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
  35717. getOwnPropertySymbols: function getOwnPropertySymbols(it) {
  35718. return getOwnPropertySymbolsModule.f(toObject(it));
  35719. }
  35720. });
  35721. // `JSON.stringify` method behavior with symbols
  35722. // https://tc39.es/ecma262/#sec-json.stringify
  35723. if ($stringify) {
  35724. var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
  35725. var symbol = $Symbol();
  35726. // MS Edge converts symbol values to JSON as {}
  35727. return $stringify([symbol]) != '[null]'
  35728. // WebKit converts symbol values to JSON as null
  35729. || $stringify({ a: symbol }) != '{}'
  35730. // V8 throws on boxed symbols
  35731. || $stringify(Object(symbol)) != '{}';
  35732. });
  35733. $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
  35734. // eslint-disable-next-line no-unused-vars -- required for `.length`
  35735. stringify: function stringify(it, replacer, space) {
  35736. var args = arraySlice(arguments);
  35737. var $replacer = replacer;
  35738. if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
  35739. if (!isArray(replacer)) replacer = function (key, value) {
  35740. if (isCallable($replacer)) value = call($replacer, this, key, value);
  35741. if (!isSymbol(value)) return value;
  35742. };
  35743. args[1] = replacer;
  35744. return apply($stringify, null, args);
  35745. }
  35746. });
  35747. }
  35748. // `Symbol.prototype[@@toPrimitive]` method
  35749. // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
  35750. if (!SymbolPrototype[TO_PRIMITIVE]) {
  35751. var valueOf = SymbolPrototype.valueOf;
  35752. // eslint-disable-next-line no-unused-vars -- required for .length
  35753. redefine(SymbolPrototype, TO_PRIMITIVE, function (hint) {
  35754. // TODO: improve hint logic
  35755. return call(valueOf, this);
  35756. });
  35757. }
  35758. // `Symbol.prototype[@@toStringTag]` property
  35759. // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
  35760. setToStringTag($Symbol, SYMBOL);
  35761. hiddenKeys[HIDDEN] = true;
  35762. /***/ }),
  35763. /***/ 6649:
  35764. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35765. var defineWellKnownSymbol = __webpack_require__(7235);
  35766. // `Symbol.toPrimitive` well-known symbol
  35767. // https://tc39.es/ecma262/#sec-symbol.toprimitive
  35768. defineWellKnownSymbol('toPrimitive');
  35769. /***/ }),
  35770. /***/ 2990:
  35771. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35772. "use strict";
  35773. var uncurryThis = __webpack_require__(1702);
  35774. var ArrayBufferViewCore = __webpack_require__(2094);
  35775. var $ArrayCopyWithin = __webpack_require__(1048);
  35776. var u$ArrayCopyWithin = uncurryThis($ArrayCopyWithin);
  35777. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35778. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35779. // `%TypedArray%.prototype.copyWithin` method
  35780. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
  35781. exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {
  35782. return u$ArrayCopyWithin(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
  35783. });
  35784. /***/ }),
  35785. /***/ 8927:
  35786. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35787. "use strict";
  35788. var ArrayBufferViewCore = __webpack_require__(2094);
  35789. var $every = (__webpack_require__(2092).every);
  35790. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35791. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35792. // `%TypedArray%.prototype.every` method
  35793. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
  35794. exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {
  35795. return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  35796. });
  35797. /***/ }),
  35798. /***/ 3105:
  35799. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35800. "use strict";
  35801. var ArrayBufferViewCore = __webpack_require__(2094);
  35802. var call = __webpack_require__(6916);
  35803. var $fill = __webpack_require__(1285);
  35804. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35805. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35806. // `%TypedArray%.prototype.fill` method
  35807. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
  35808. exportTypedArrayMethod('fill', function fill(value /* , start, end */) {
  35809. var length = arguments.length;
  35810. return call(
  35811. $fill,
  35812. aTypedArray(this),
  35813. value,
  35814. length > 1 ? arguments[1] : undefined,
  35815. length > 2 ? arguments[2] : undefined
  35816. );
  35817. });
  35818. /***/ }),
  35819. /***/ 5035:
  35820. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35821. "use strict";
  35822. var ArrayBufferViewCore = __webpack_require__(2094);
  35823. var $filter = (__webpack_require__(2092).filter);
  35824. var fromSpeciesAndList = __webpack_require__(3074);
  35825. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35826. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35827. // `%TypedArray%.prototype.filter` method
  35828. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
  35829. exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {
  35830. var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  35831. return fromSpeciesAndList(this, list);
  35832. });
  35833. /***/ }),
  35834. /***/ 7174:
  35835. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35836. "use strict";
  35837. var ArrayBufferViewCore = __webpack_require__(2094);
  35838. var $findIndex = (__webpack_require__(2092).findIndex);
  35839. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35840. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35841. // `%TypedArray%.prototype.findIndex` method
  35842. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
  35843. exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {
  35844. return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  35845. });
  35846. /***/ }),
  35847. /***/ 4345:
  35848. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35849. "use strict";
  35850. var ArrayBufferViewCore = __webpack_require__(2094);
  35851. var $find = (__webpack_require__(2092).find);
  35852. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35853. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35854. // `%TypedArray%.prototype.find` method
  35855. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
  35856. exportTypedArrayMethod('find', function find(predicate /* , thisArg */) {
  35857. return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
  35858. });
  35859. /***/ }),
  35860. /***/ 4197:
  35861. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35862. var createTypedArrayConstructor = __webpack_require__(9843);
  35863. // `Float32Array` constructor
  35864. // https://tc39.es/ecma262/#sec-typedarray-objects
  35865. createTypedArrayConstructor('Float32', function (init) {
  35866. return function Float32Array(data, byteOffset, length) {
  35867. return init(this, data, byteOffset, length);
  35868. };
  35869. });
  35870. /***/ }),
  35871. /***/ 6495:
  35872. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35873. var createTypedArrayConstructor = __webpack_require__(9843);
  35874. // `Float64Array` constructor
  35875. // https://tc39.es/ecma262/#sec-typedarray-objects
  35876. createTypedArrayConstructor('Float64', function (init) {
  35877. return function Float64Array(data, byteOffset, length) {
  35878. return init(this, data, byteOffset, length);
  35879. };
  35880. });
  35881. /***/ }),
  35882. /***/ 2846:
  35883. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35884. "use strict";
  35885. var ArrayBufferViewCore = __webpack_require__(2094);
  35886. var $forEach = (__webpack_require__(2092).forEach);
  35887. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35888. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35889. // `%TypedArray%.prototype.forEach` method
  35890. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
  35891. exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {
  35892. $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  35893. });
  35894. /***/ }),
  35895. /***/ 8145:
  35896. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35897. "use strict";
  35898. var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832);
  35899. var exportTypedArrayStaticMethod = (__webpack_require__(2094).exportTypedArrayStaticMethod);
  35900. var typedArrayFrom = __webpack_require__(7321);
  35901. // `%TypedArray%.from` method
  35902. // https://tc39.es/ecma262/#sec-%typedarray%.from
  35903. exportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);
  35904. /***/ }),
  35905. /***/ 4731:
  35906. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35907. "use strict";
  35908. var ArrayBufferViewCore = __webpack_require__(2094);
  35909. var $includes = (__webpack_require__(1318).includes);
  35910. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35911. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35912. // `%TypedArray%.prototype.includes` method
  35913. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
  35914. exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {
  35915. return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  35916. });
  35917. /***/ }),
  35918. /***/ 7209:
  35919. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35920. "use strict";
  35921. var ArrayBufferViewCore = __webpack_require__(2094);
  35922. var $indexOf = (__webpack_require__(1318).indexOf);
  35923. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35924. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35925. // `%TypedArray%.prototype.indexOf` method
  35926. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
  35927. exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {
  35928. return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
  35929. });
  35930. /***/ }),
  35931. /***/ 5109:
  35932. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35933. var createTypedArrayConstructor = __webpack_require__(9843);
  35934. // `Int16Array` constructor
  35935. // https://tc39.es/ecma262/#sec-typedarray-objects
  35936. createTypedArrayConstructor('Int16', function (init) {
  35937. return function Int16Array(data, byteOffset, length) {
  35938. return init(this, data, byteOffset, length);
  35939. };
  35940. });
  35941. /***/ }),
  35942. /***/ 5125:
  35943. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35944. var createTypedArrayConstructor = __webpack_require__(9843);
  35945. // `Int32Array` constructor
  35946. // https://tc39.es/ecma262/#sec-typedarray-objects
  35947. createTypedArrayConstructor('Int32', function (init) {
  35948. return function Int32Array(data, byteOffset, length) {
  35949. return init(this, data, byteOffset, length);
  35950. };
  35951. });
  35952. /***/ }),
  35953. /***/ 7145:
  35954. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35955. var createTypedArrayConstructor = __webpack_require__(9843);
  35956. // `Int8Array` constructor
  35957. // https://tc39.es/ecma262/#sec-typedarray-objects
  35958. createTypedArrayConstructor('Int8', function (init) {
  35959. return function Int8Array(data, byteOffset, length) {
  35960. return init(this, data, byteOffset, length);
  35961. };
  35962. });
  35963. /***/ }),
  35964. /***/ 6319:
  35965. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  35966. "use strict";
  35967. var global = __webpack_require__(7854);
  35968. var uncurryThis = __webpack_require__(1702);
  35969. var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER);
  35970. var ArrayBufferViewCore = __webpack_require__(2094);
  35971. var ArrayIterators = __webpack_require__(6992);
  35972. var wellKnownSymbol = __webpack_require__(5112);
  35973. var ITERATOR = wellKnownSymbol('iterator');
  35974. var Uint8Array = global.Uint8Array;
  35975. var arrayValues = uncurryThis(ArrayIterators.values);
  35976. var arrayKeys = uncurryThis(ArrayIterators.keys);
  35977. var arrayEntries = uncurryThis(ArrayIterators.entries);
  35978. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  35979. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  35980. var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];
  35981. var PROPER_ARRAY_VALUES_NAME = !!nativeTypedArrayIterator && nativeTypedArrayIterator.name === 'values';
  35982. var typedArrayValues = function values() {
  35983. return arrayValues(aTypedArray(this));
  35984. };
  35985. // `%TypedArray%.prototype.entries` method
  35986. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
  35987. exportTypedArrayMethod('entries', function entries() {
  35988. return arrayEntries(aTypedArray(this));
  35989. });
  35990. // `%TypedArray%.prototype.keys` method
  35991. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
  35992. exportTypedArrayMethod('keys', function keys() {
  35993. return arrayKeys(aTypedArray(this));
  35994. });
  35995. // `%TypedArray%.prototype.values` method
  35996. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
  35997. exportTypedArrayMethod('values', typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);
  35998. // `%TypedArray%.prototype[@@iterator]` method
  35999. // https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
  36000. exportTypedArrayMethod(ITERATOR, typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME);
  36001. /***/ }),
  36002. /***/ 8867:
  36003. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36004. "use strict";
  36005. var ArrayBufferViewCore = __webpack_require__(2094);
  36006. var uncurryThis = __webpack_require__(1702);
  36007. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36008. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36009. var $join = uncurryThis([].join);
  36010. // `%TypedArray%.prototype.join` method
  36011. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
  36012. exportTypedArrayMethod('join', function join(separator) {
  36013. return $join(aTypedArray(this), separator);
  36014. });
  36015. /***/ }),
  36016. /***/ 7789:
  36017. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36018. "use strict";
  36019. var ArrayBufferViewCore = __webpack_require__(2094);
  36020. var apply = __webpack_require__(2104);
  36021. var $lastIndexOf = __webpack_require__(6583);
  36022. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36023. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36024. // `%TypedArray%.prototype.lastIndexOf` method
  36025. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
  36026. exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
  36027. var length = arguments.length;
  36028. return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]);
  36029. });
  36030. /***/ }),
  36031. /***/ 3739:
  36032. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36033. "use strict";
  36034. var ArrayBufferViewCore = __webpack_require__(2094);
  36035. var $map = (__webpack_require__(2092).map);
  36036. var typedArraySpeciesConstructor = __webpack_require__(6304);
  36037. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36038. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36039. // `%TypedArray%.prototype.map` method
  36040. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
  36041. exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
  36042. return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
  36043. return new (typedArraySpeciesConstructor(O))(length);
  36044. });
  36045. });
  36046. /***/ }),
  36047. /***/ 4483:
  36048. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36049. "use strict";
  36050. var ArrayBufferViewCore = __webpack_require__(2094);
  36051. var $reduceRight = (__webpack_require__(3671).right);
  36052. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36053. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36054. // `%TypedArray%.prototype.reduceRicht` method
  36055. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
  36056. exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
  36057. var length = arguments.length;
  36058. return $reduceRight(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);
  36059. });
  36060. /***/ }),
  36061. /***/ 9368:
  36062. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36063. "use strict";
  36064. var ArrayBufferViewCore = __webpack_require__(2094);
  36065. var $reduce = (__webpack_require__(3671).left);
  36066. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36067. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36068. // `%TypedArray%.prototype.reduce` method
  36069. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
  36070. exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {
  36071. var length = arguments.length;
  36072. return $reduce(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined);
  36073. });
  36074. /***/ }),
  36075. /***/ 2056:
  36076. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36077. "use strict";
  36078. var ArrayBufferViewCore = __webpack_require__(2094);
  36079. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36080. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36081. var floor = Math.floor;
  36082. // `%TypedArray%.prototype.reverse` method
  36083. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
  36084. exportTypedArrayMethod('reverse', function reverse() {
  36085. var that = this;
  36086. var length = aTypedArray(that).length;
  36087. var middle = floor(length / 2);
  36088. var index = 0;
  36089. var value;
  36090. while (index < middle) {
  36091. value = that[index];
  36092. that[index++] = that[--length];
  36093. that[length] = value;
  36094. } return that;
  36095. });
  36096. /***/ }),
  36097. /***/ 3462:
  36098. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36099. "use strict";
  36100. var global = __webpack_require__(7854);
  36101. var ArrayBufferViewCore = __webpack_require__(2094);
  36102. var lengthOfArrayLike = __webpack_require__(6244);
  36103. var toOffset = __webpack_require__(4590);
  36104. var toObject = __webpack_require__(7908);
  36105. var fails = __webpack_require__(7293);
  36106. var RangeError = global.RangeError;
  36107. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36108. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36109. var FORCED = fails(function () {
  36110. // eslint-disable-next-line es/no-typed-arrays -- required for testing
  36111. new Int8Array(1).set({});
  36112. });
  36113. // `%TypedArray%.prototype.set` method
  36114. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
  36115. exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
  36116. aTypedArray(this);
  36117. var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
  36118. var length = this.length;
  36119. var src = toObject(arrayLike);
  36120. var len = lengthOfArrayLike(src);
  36121. var index = 0;
  36122. if (len + offset > length) throw RangeError('Wrong length');
  36123. while (index < len) this[offset + index] = src[index++];
  36124. }, FORCED);
  36125. /***/ }),
  36126. /***/ 678:
  36127. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36128. "use strict";
  36129. var ArrayBufferViewCore = __webpack_require__(2094);
  36130. var typedArraySpeciesConstructor = __webpack_require__(6304);
  36131. var fails = __webpack_require__(7293);
  36132. var arraySlice = __webpack_require__(206);
  36133. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36134. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36135. var FORCED = fails(function () {
  36136. // eslint-disable-next-line es/no-typed-arrays -- required for testing
  36137. new Int8Array(1).slice();
  36138. });
  36139. // `%TypedArray%.prototype.slice` method
  36140. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
  36141. exportTypedArrayMethod('slice', function slice(start, end) {
  36142. var list = arraySlice(aTypedArray(this), start, end);
  36143. var C = typedArraySpeciesConstructor(this);
  36144. var index = 0;
  36145. var length = list.length;
  36146. var result = new C(length);
  36147. while (length > index) result[index] = list[index++];
  36148. return result;
  36149. }, FORCED);
  36150. /***/ }),
  36151. /***/ 7462:
  36152. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36153. "use strict";
  36154. var ArrayBufferViewCore = __webpack_require__(2094);
  36155. var $some = (__webpack_require__(2092).some);
  36156. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36157. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36158. // `%TypedArray%.prototype.some` method
  36159. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
  36160. exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {
  36161. return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
  36162. });
  36163. /***/ }),
  36164. /***/ 3824:
  36165. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36166. "use strict";
  36167. var global = __webpack_require__(7854);
  36168. var uncurryThis = __webpack_require__(1702);
  36169. var fails = __webpack_require__(7293);
  36170. var aCallable = __webpack_require__(9662);
  36171. var internalSort = __webpack_require__(4362);
  36172. var ArrayBufferViewCore = __webpack_require__(2094);
  36173. var FF = __webpack_require__(8886);
  36174. var IE_OR_EDGE = __webpack_require__(256);
  36175. var V8 = __webpack_require__(7392);
  36176. var WEBKIT = __webpack_require__(8008);
  36177. var Array = global.Array;
  36178. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36179. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36180. var Uint16Array = global.Uint16Array;
  36181. var un$Sort = Uint16Array && uncurryThis(Uint16Array.prototype.sort);
  36182. // WebKit
  36183. var ACCEPT_INCORRECT_ARGUMENTS = !!un$Sort && !(fails(function () {
  36184. un$Sort(new Uint16Array(2), null);
  36185. }) && fails(function () {
  36186. un$Sort(new Uint16Array(2), {});
  36187. }));
  36188. var STABLE_SORT = !!un$Sort && !fails(function () {
  36189. // feature detection can be too slow, so check engines versions
  36190. if (V8) return V8 < 74;
  36191. if (FF) return FF < 67;
  36192. if (IE_OR_EDGE) return true;
  36193. if (WEBKIT) return WEBKIT < 602;
  36194. var array = new Uint16Array(516);
  36195. var expected = Array(516);
  36196. var index, mod;
  36197. for (index = 0; index < 516; index++) {
  36198. mod = index % 4;
  36199. array[index] = 515 - index;
  36200. expected[index] = index - 2 * mod + 3;
  36201. }
  36202. un$Sort(array, function (a, b) {
  36203. return (a / 4 | 0) - (b / 4 | 0);
  36204. });
  36205. for (index = 0; index < 516; index++) {
  36206. if (array[index] !== expected[index]) return true;
  36207. }
  36208. });
  36209. var getSortCompare = function (comparefn) {
  36210. return function (x, y) {
  36211. if (comparefn !== undefined) return +comparefn(x, y) || 0;
  36212. // eslint-disable-next-line no-self-compare -- NaN check
  36213. if (y !== y) return -1;
  36214. // eslint-disable-next-line no-self-compare -- NaN check
  36215. if (x !== x) return 1;
  36216. if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;
  36217. return x > y;
  36218. };
  36219. };
  36220. // `%TypedArray%.prototype.sort` method
  36221. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
  36222. exportTypedArrayMethod('sort', function sort(comparefn) {
  36223. if (comparefn !== undefined) aCallable(comparefn);
  36224. if (STABLE_SORT) return un$Sort(this, comparefn);
  36225. return internalSort(aTypedArray(this), getSortCompare(comparefn));
  36226. }, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS);
  36227. /***/ }),
  36228. /***/ 5021:
  36229. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36230. "use strict";
  36231. var ArrayBufferViewCore = __webpack_require__(2094);
  36232. var toLength = __webpack_require__(7466);
  36233. var toAbsoluteIndex = __webpack_require__(1400);
  36234. var typedArraySpeciesConstructor = __webpack_require__(6304);
  36235. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36236. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36237. // `%TypedArray%.prototype.subarray` method
  36238. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
  36239. exportTypedArrayMethod('subarray', function subarray(begin, end) {
  36240. var O = aTypedArray(this);
  36241. var length = O.length;
  36242. var beginIndex = toAbsoluteIndex(begin, length);
  36243. var C = typedArraySpeciesConstructor(O);
  36244. return new C(
  36245. O.buffer,
  36246. O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
  36247. toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
  36248. );
  36249. });
  36250. /***/ }),
  36251. /***/ 2974:
  36252. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36253. "use strict";
  36254. var global = __webpack_require__(7854);
  36255. var apply = __webpack_require__(2104);
  36256. var ArrayBufferViewCore = __webpack_require__(2094);
  36257. var fails = __webpack_require__(7293);
  36258. var arraySlice = __webpack_require__(206);
  36259. var Int8Array = global.Int8Array;
  36260. var aTypedArray = ArrayBufferViewCore.aTypedArray;
  36261. var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
  36262. var $toLocaleString = [].toLocaleString;
  36263. // iOS Safari 6.x fails here
  36264. var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
  36265. $toLocaleString.call(new Int8Array(1));
  36266. });
  36267. var FORCED = fails(function () {
  36268. return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
  36269. }) || !fails(function () {
  36270. Int8Array.prototype.toLocaleString.call([1, 2]);
  36271. });
  36272. // `%TypedArray%.prototype.toLocaleString` method
  36273. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
  36274. exportTypedArrayMethod('toLocaleString', function toLocaleString() {
  36275. return apply(
  36276. $toLocaleString,
  36277. TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),
  36278. arraySlice(arguments)
  36279. );
  36280. }, FORCED);
  36281. /***/ }),
  36282. /***/ 5016:
  36283. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36284. "use strict";
  36285. var exportTypedArrayMethod = (__webpack_require__(2094).exportTypedArrayMethod);
  36286. var fails = __webpack_require__(7293);
  36287. var global = __webpack_require__(7854);
  36288. var uncurryThis = __webpack_require__(1702);
  36289. var Uint8Array = global.Uint8Array;
  36290. var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
  36291. var arrayToString = [].toString;
  36292. var join = uncurryThis([].join);
  36293. if (fails(function () { arrayToString.call({}); })) {
  36294. arrayToString = function toString() {
  36295. return join(this);
  36296. };
  36297. }
  36298. var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
  36299. // `%TypedArray%.prototype.toString` method
  36300. // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
  36301. exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
  36302. /***/ }),
  36303. /***/ 8255:
  36304. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36305. var createTypedArrayConstructor = __webpack_require__(9843);
  36306. // `Uint16Array` constructor
  36307. // https://tc39.es/ecma262/#sec-typedarray-objects
  36308. createTypedArrayConstructor('Uint16', function (init) {
  36309. return function Uint16Array(data, byteOffset, length) {
  36310. return init(this, data, byteOffset, length);
  36311. };
  36312. });
  36313. /***/ }),
  36314. /***/ 9135:
  36315. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36316. var createTypedArrayConstructor = __webpack_require__(9843);
  36317. // `Uint32Array` constructor
  36318. // https://tc39.es/ecma262/#sec-typedarray-objects
  36319. createTypedArrayConstructor('Uint32', function (init) {
  36320. return function Uint32Array(data, byteOffset, length) {
  36321. return init(this, data, byteOffset, length);
  36322. };
  36323. });
  36324. /***/ }),
  36325. /***/ 2472:
  36326. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36327. var createTypedArrayConstructor = __webpack_require__(9843);
  36328. // `Uint8Array` constructor
  36329. // https://tc39.es/ecma262/#sec-typedarray-objects
  36330. createTypedArrayConstructor('Uint8', function (init) {
  36331. return function Uint8Array(data, byteOffset, length) {
  36332. return init(this, data, byteOffset, length);
  36333. };
  36334. });
  36335. /***/ }),
  36336. /***/ 9743:
  36337. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36338. var createTypedArrayConstructor = __webpack_require__(9843);
  36339. // `Uint8ClampedArray` constructor
  36340. // https://tc39.es/ecma262/#sec-typedarray-objects
  36341. createTypedArrayConstructor('Uint8', function (init) {
  36342. return function Uint8ClampedArray(data, byteOffset, length) {
  36343. return init(this, data, byteOffset, length);
  36344. };
  36345. }, true);
  36346. /***/ }),
  36347. /***/ 8628:
  36348. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36349. // TODO: Remove from `core-js@4`
  36350. __webpack_require__(9170);
  36351. /***/ }),
  36352. /***/ 5743:
  36353. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36354. // TODO: Remove from `core-js@4`
  36355. __webpack_require__(5837);
  36356. /***/ }),
  36357. /***/ 7314:
  36358. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36359. // TODO: Remove from `core-js@4`
  36360. __webpack_require__(7922);
  36361. /***/ }),
  36362. /***/ 6290:
  36363. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36364. // TODO: Remove from `core-js@4`
  36365. __webpack_require__(4668);
  36366. /***/ }),
  36367. /***/ 7479:
  36368. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36369. "use strict";
  36370. var $ = __webpack_require__(2109);
  36371. var newPromiseCapabilityModule = __webpack_require__(8523);
  36372. var perform = __webpack_require__(2534);
  36373. // `Promise.try` method
  36374. // https://github.com/tc39/proposal-promise-try
  36375. $({ target: 'Promise', stat: true }, {
  36376. 'try': function (callbackfn) {
  36377. var promiseCapability = newPromiseCapabilityModule.f(this);
  36378. var result = perform(callbackfn);
  36379. (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);
  36380. return promiseCapability.promise;
  36381. }
  36382. });
  36383. /***/ }),
  36384. /***/ 3728:
  36385. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36386. // TODO: Remove from `core-js@4`
  36387. __webpack_require__(6373);
  36388. /***/ }),
  36389. /***/ 4747:
  36390. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36391. var global = __webpack_require__(7854);
  36392. var DOMIterables = __webpack_require__(8324);
  36393. var DOMTokenListPrototype = __webpack_require__(8509);
  36394. var forEach = __webpack_require__(8533);
  36395. var createNonEnumerableProperty = __webpack_require__(8880);
  36396. var handlePrototype = function (CollectionPrototype) {
  36397. // some Chrome versions have non-configurable methods on DOMTokenList
  36398. if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
  36399. createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
  36400. } catch (error) {
  36401. CollectionPrototype.forEach = forEach;
  36402. }
  36403. };
  36404. for (var COLLECTION_NAME in DOMIterables) {
  36405. if (DOMIterables[COLLECTION_NAME]) {
  36406. handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
  36407. }
  36408. }
  36409. handlePrototype(DOMTokenListPrototype);
  36410. /***/ }),
  36411. /***/ 3948:
  36412. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36413. var global = __webpack_require__(7854);
  36414. var DOMIterables = __webpack_require__(8324);
  36415. var DOMTokenListPrototype = __webpack_require__(8509);
  36416. var ArrayIteratorMethods = __webpack_require__(6992);
  36417. var createNonEnumerableProperty = __webpack_require__(8880);
  36418. var wellKnownSymbol = __webpack_require__(5112);
  36419. var ITERATOR = wellKnownSymbol('iterator');
  36420. var TO_STRING_TAG = wellKnownSymbol('toStringTag');
  36421. var ArrayValues = ArrayIteratorMethods.values;
  36422. var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
  36423. if (CollectionPrototype) {
  36424. // some Chrome versions have non-configurable methods on DOMTokenList
  36425. if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
  36426. createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
  36427. } catch (error) {
  36428. CollectionPrototype[ITERATOR] = ArrayValues;
  36429. }
  36430. if (!CollectionPrototype[TO_STRING_TAG]) {
  36431. createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
  36432. }
  36433. if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
  36434. // some Chrome versions have non-configurable methods on DOMTokenList
  36435. if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
  36436. createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
  36437. } catch (error) {
  36438. CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
  36439. }
  36440. }
  36441. }
  36442. };
  36443. for (var COLLECTION_NAME in DOMIterables) {
  36444. handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME);
  36445. }
  36446. handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
  36447. /***/ }),
  36448. /***/ 3753:
  36449. /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
  36450. "use strict";
  36451. var $ = __webpack_require__(2109);
  36452. var call = __webpack_require__(6916);
  36453. // `URL.prototype.toJSON` method
  36454. // https://url.spec.whatwg.org/#dom-url-tojson
  36455. $({ target: 'URL', proto: true, enumerable: true }, {
  36456. toJSON: function toJSON() {
  36457. return call(URL.prototype.toString, this);
  36458. }
  36459. });
  36460. /***/ }),
  36461. /***/ 1150:
  36462. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  36463. var parent = __webpack_require__(7633);
  36464. __webpack_require__(3948);
  36465. module.exports = parent;
  36466. /***/ }),
  36467. /***/ 251:
  36468. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  36469. var objectKeys = __webpack_require__(2215);
  36470. var isArguments = __webpack_require__(2584);
  36471. var is = __webpack_require__(609);
  36472. var isRegex = __webpack_require__(8420);
  36473. var flags = __webpack_require__(2847);
  36474. var isDate = __webpack_require__(8923);
  36475. var getTime = Date.prototype.getTime;
  36476. function deepEqual(actual, expected, options) {
  36477. var opts = options || {};
  36478. // 7.1. All identical values are equivalent, as determined by ===.
  36479. if (opts.strict ? is(actual, expected) : actual === expected) {
  36480. return true;
  36481. }
  36482. // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
  36483. if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
  36484. return opts.strict ? is(actual, expected) : actual == expected;
  36485. }
  36486. /*
  36487. * 7.4. For all other Object pairs, including Array objects, equivalence is
  36488. * determined by having the same number of owned properties (as verified
  36489. * with Object.prototype.hasOwnProperty.call), the same set of keys
  36490. * (although not necessarily the same order), equivalent values for every
  36491. * corresponding key, and an identical 'prototype' property. Note: this
  36492. * accounts for both named and indexed properties on Arrays.
  36493. */
  36494. // eslint-disable-next-line no-use-before-define
  36495. return objEquiv(actual, expected, opts);
  36496. }
  36497. function isUndefinedOrNull(value) {
  36498. return value === null || value === undefined;
  36499. }
  36500. function isBuffer(x) {
  36501. if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
  36502. return false;
  36503. }
  36504. if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
  36505. return false;
  36506. }
  36507. if (x.length > 0 && typeof x[0] !== 'number') {
  36508. return false;
  36509. }
  36510. return true;
  36511. }
  36512. function objEquiv(a, b, opts) {
  36513. /* eslint max-statements: [2, 50] */
  36514. var i, key;
  36515. if (typeof a !== typeof b) { return false; }
  36516. if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; }
  36517. // an identical 'prototype' property.
  36518. if (a.prototype !== b.prototype) { return false; }
  36519. if (isArguments(a) !== isArguments(b)) { return false; }
  36520. var aIsRegex = isRegex(a);
  36521. var bIsRegex = isRegex(b);
  36522. if (aIsRegex !== bIsRegex) { return false; }
  36523. if (aIsRegex || bIsRegex) {
  36524. return a.source === b.source && flags(a) === flags(b);
  36525. }
  36526. if (isDate(a) && isDate(b)) {
  36527. return getTime.call(a) === getTime.call(b);
  36528. }
  36529. var aIsBuffer = isBuffer(a);
  36530. var bIsBuffer = isBuffer(b);
  36531. if (aIsBuffer !== bIsBuffer) { return false; }
  36532. if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
  36533. if (a.length !== b.length) { return false; }
  36534. for (i = 0; i < a.length; i++) {
  36535. if (a[i] !== b[i]) { return false; }
  36536. }
  36537. return true;
  36538. }
  36539. if (typeof a !== typeof b) { return false; }
  36540. try {
  36541. var ka = objectKeys(a);
  36542. var kb = objectKeys(b);
  36543. } catch (e) { // happens when one is a string literal and the other isn't
  36544. return false;
  36545. }
  36546. // having the same number of owned properties (keys incorporates hasOwnProperty)
  36547. if (ka.length !== kb.length) { return false; }
  36548. // the same set of keys (although not necessarily the same order),
  36549. ka.sort();
  36550. kb.sort();
  36551. // ~~~cheap key test
  36552. for (i = ka.length - 1; i >= 0; i--) {
  36553. if (ka[i] != kb[i]) { return false; }
  36554. }
  36555. // equivalent values for every corresponding key, and ~~~possibly expensive deep test
  36556. for (i = ka.length - 1; i >= 0; i--) {
  36557. key = ka[i];
  36558. if (!deepEqual(a[key], b[key], opts)) { return false; }
  36559. }
  36560. return true;
  36561. }
  36562. module.exports = deepEqual;
  36563. /***/ }),
  36564. /***/ 4289:
  36565. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  36566. "use strict";
  36567. var keys = __webpack_require__(2215);
  36568. var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
  36569. var toStr = Object.prototype.toString;
  36570. var concat = Array.prototype.concat;
  36571. var origDefineProperty = Object.defineProperty;
  36572. var isFunction = function (fn) {
  36573. return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
  36574. };
  36575. var arePropertyDescriptorsSupported = function () {
  36576. var obj = {};
  36577. try {
  36578. origDefineProperty(obj, 'x', { enumerable: false, value: obj });
  36579. // eslint-disable-next-line no-unused-vars, no-restricted-syntax
  36580. for (var _ in obj) { // jscs:ignore disallowUnusedVariables
  36581. return false;
  36582. }
  36583. return obj.x === obj;
  36584. } catch (e) { /* this is IE 8. */
  36585. return false;
  36586. }
  36587. };
  36588. var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
  36589. var defineProperty = function (object, name, value, predicate) {
  36590. if (name in object && (!isFunction(predicate) || !predicate())) {
  36591. return;
  36592. }
  36593. if (supportsDescriptors) {
  36594. origDefineProperty(object, name, {
  36595. configurable: true,
  36596. enumerable: false,
  36597. value: value,
  36598. writable: true
  36599. });
  36600. } else {
  36601. object[name] = value;
  36602. }
  36603. };
  36604. var defineProperties = function (object, map) {
  36605. var predicates = arguments.length > 2 ? arguments[2] : {};
  36606. var props = keys(map);
  36607. if (hasSymbols) {
  36608. props = concat.call(props, Object.getOwnPropertySymbols(map));
  36609. }
  36610. for (var i = 0; i < props.length; i += 1) {
  36611. defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
  36612. }
  36613. };
  36614. defineProperties.supportsDescriptors = !!supportsDescriptors;
  36615. module.exports = defineProperties;
  36616. /***/ }),
  36617. /***/ 8091:
  36618. /***/ (function(module) {
  36619. "use strict";
  36620. /**
  36621. * Code refactored from Mozilla Developer Network:
  36622. * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
  36623. */
  36624. function assign(target, firstSource) {
  36625. if (target === undefined || target === null) {
  36626. throw new TypeError('Cannot convert first argument to object');
  36627. }
  36628. var to = Object(target);
  36629. for (var i = 1; i < arguments.length; i++) {
  36630. var nextSource = arguments[i];
  36631. if (nextSource === undefined || nextSource === null) {
  36632. continue;
  36633. }
  36634. var keysArray = Object.keys(Object(nextSource));
  36635. for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) {
  36636. var nextKey = keysArray[nextIndex];
  36637. var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey);
  36638. if (desc !== undefined && desc.enumerable) {
  36639. to[nextKey] = nextSource[nextKey];
  36640. }
  36641. }
  36642. }
  36643. return to;
  36644. }
  36645. function polyfill() {
  36646. if (!Object.assign) {
  36647. Object.defineProperty(Object, 'assign', {
  36648. enumerable: false,
  36649. configurable: true,
  36650. writable: true,
  36651. value: assign
  36652. });
  36653. }
  36654. }
  36655. module.exports = {
  36656. assign: assign,
  36657. polyfill: polyfill
  36658. };
  36659. /***/ }),
  36660. /***/ 7187:
  36661. /***/ (function(module) {
  36662. "use strict";
  36663. // Copyright Joyent, Inc. and other Node contributors.
  36664. //
  36665. // Permission is hereby granted, free of charge, to any person obtaining a
  36666. // copy of this software and associated documentation files (the
  36667. // "Software"), to deal in the Software without restriction, including
  36668. // without limitation the rights to use, copy, modify, merge, publish,
  36669. // distribute, sublicense, and/or sell copies of the Software, and to permit
  36670. // persons to whom the Software is furnished to do so, subject to the
  36671. // following conditions:
  36672. //
  36673. // The above copyright notice and this permission notice shall be included
  36674. // in all copies or substantial portions of the Software.
  36675. //
  36676. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  36677. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  36678. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  36679. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  36680. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  36681. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  36682. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  36683. var R = typeof Reflect === 'object' ? Reflect : null
  36684. var ReflectApply = R && typeof R.apply === 'function'
  36685. ? R.apply
  36686. : function ReflectApply(target, receiver, args) {
  36687. return Function.prototype.apply.call(target, receiver, args);
  36688. }
  36689. var ReflectOwnKeys
  36690. if (R && typeof R.ownKeys === 'function') {
  36691. ReflectOwnKeys = R.ownKeys
  36692. } else if (Object.getOwnPropertySymbols) {
  36693. ReflectOwnKeys = function ReflectOwnKeys(target) {
  36694. return Object.getOwnPropertyNames(target)
  36695. .concat(Object.getOwnPropertySymbols(target));
  36696. };
  36697. } else {
  36698. ReflectOwnKeys = function ReflectOwnKeys(target) {
  36699. return Object.getOwnPropertyNames(target);
  36700. };
  36701. }
  36702. function ProcessEmitWarning(warning) {
  36703. if (console && console.warn) console.warn(warning);
  36704. }
  36705. var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
  36706. return value !== value;
  36707. }
  36708. function EventEmitter() {
  36709. EventEmitter.init.call(this);
  36710. }
  36711. module.exports = EventEmitter;
  36712. module.exports.once = once;
  36713. // Backwards-compat with node 0.10.x
  36714. EventEmitter.EventEmitter = EventEmitter;
  36715. EventEmitter.prototype._events = undefined;
  36716. EventEmitter.prototype._eventsCount = 0;
  36717. EventEmitter.prototype._maxListeners = undefined;
  36718. // By default EventEmitters will print a warning if more than 10 listeners are
  36719. // added to it. This is a useful default which helps finding memory leaks.
  36720. var defaultMaxListeners = 10;
  36721. function checkListener(listener) {
  36722. if (typeof listener !== 'function') {
  36723. throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
  36724. }
  36725. }
  36726. Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
  36727. enumerable: true,
  36728. get: function() {
  36729. return defaultMaxListeners;
  36730. },
  36731. set: function(arg) {
  36732. if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
  36733. throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
  36734. }
  36735. defaultMaxListeners = arg;
  36736. }
  36737. });
  36738. EventEmitter.init = function() {
  36739. if (this._events === undefined ||
  36740. this._events === Object.getPrototypeOf(this)._events) {
  36741. this._events = Object.create(null);
  36742. this._eventsCount = 0;
  36743. }
  36744. this._maxListeners = this._maxListeners || undefined;
  36745. };
  36746. // Obviously not all Emitters should be limited to 10. This function allows
  36747. // that to be increased. Set to zero for unlimited.
  36748. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
  36749. if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
  36750. throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
  36751. }
  36752. this._maxListeners = n;
  36753. return this;
  36754. };
  36755. function _getMaxListeners(that) {
  36756. if (that._maxListeners === undefined)
  36757. return EventEmitter.defaultMaxListeners;
  36758. return that._maxListeners;
  36759. }
  36760. EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
  36761. return _getMaxListeners(this);
  36762. };
  36763. EventEmitter.prototype.emit = function emit(type) {
  36764. var args = [];
  36765. for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
  36766. var doError = (type === 'error');
  36767. var events = this._events;
  36768. if (events !== undefined)
  36769. doError = (doError && events.error === undefined);
  36770. else if (!doError)
  36771. return false;
  36772. // If there is no 'error' event listener then throw.
  36773. if (doError) {
  36774. var er;
  36775. if (args.length > 0)
  36776. er = args[0];
  36777. if (er instanceof Error) {
  36778. // Note: The comments on the `throw` lines are intentional, they show
  36779. // up in Node's output if this results in an unhandled exception.
  36780. throw er; // Unhandled 'error' event
  36781. }
  36782. // At least give some kind of context to the user
  36783. var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
  36784. err.context = er;
  36785. throw err; // Unhandled 'error' event
  36786. }
  36787. var handler = events[type];
  36788. if (handler === undefined)
  36789. return false;
  36790. if (typeof handler === 'function') {
  36791. ReflectApply(handler, this, args);
  36792. } else {
  36793. var len = handler.length;
  36794. var listeners = arrayClone(handler, len);
  36795. for (var i = 0; i < len; ++i)
  36796. ReflectApply(listeners[i], this, args);
  36797. }
  36798. return true;
  36799. };
  36800. function _addListener(target, type, listener, prepend) {
  36801. var m;
  36802. var events;
  36803. var existing;
  36804. checkListener(listener);
  36805. events = target._events;
  36806. if (events === undefined) {
  36807. events = target._events = Object.create(null);
  36808. target._eventsCount = 0;
  36809. } else {
  36810. // To avoid recursion in the case that type === "newListener"! Before
  36811. // adding it to the listeners, first emit "newListener".
  36812. if (events.newListener !== undefined) {
  36813. target.emit('newListener', type,
  36814. listener.listener ? listener.listener : listener);
  36815. // Re-assign `events` because a newListener handler could have caused the
  36816. // this._events to be assigned to a new object
  36817. events = target._events;
  36818. }
  36819. existing = events[type];
  36820. }
  36821. if (existing === undefined) {
  36822. // Optimize the case of one listener. Don't need the extra array object.
  36823. existing = events[type] = listener;
  36824. ++target._eventsCount;
  36825. } else {
  36826. if (typeof existing === 'function') {
  36827. // Adding the second element, need to change to array.
  36828. existing = events[type] =
  36829. prepend ? [listener, existing] : [existing, listener];
  36830. // If we've already got an array, just append.
  36831. } else if (prepend) {
  36832. existing.unshift(listener);
  36833. } else {
  36834. existing.push(listener);
  36835. }
  36836. // Check for listener leak
  36837. m = _getMaxListeners(target);
  36838. if (m > 0 && existing.length > m && !existing.warned) {
  36839. existing.warned = true;
  36840. // No error code for this since it is a Warning
  36841. // eslint-disable-next-line no-restricted-syntax
  36842. var w = new Error('Possible EventEmitter memory leak detected. ' +
  36843. existing.length + ' ' + String(type) + ' listeners ' +
  36844. 'added. Use emitter.setMaxListeners() to ' +
  36845. 'increase limit');
  36846. w.name = 'MaxListenersExceededWarning';
  36847. w.emitter = target;
  36848. w.type = type;
  36849. w.count = existing.length;
  36850. ProcessEmitWarning(w);
  36851. }
  36852. }
  36853. return target;
  36854. }
  36855. EventEmitter.prototype.addListener = function addListener(type, listener) {
  36856. return _addListener(this, type, listener, false);
  36857. };
  36858. EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  36859. EventEmitter.prototype.prependListener =
  36860. function prependListener(type, listener) {
  36861. return _addListener(this, type, listener, true);
  36862. };
  36863. function onceWrapper() {
  36864. if (!this.fired) {
  36865. this.target.removeListener(this.type, this.wrapFn);
  36866. this.fired = true;
  36867. if (arguments.length === 0)
  36868. return this.listener.call(this.target);
  36869. return this.listener.apply(this.target, arguments);
  36870. }
  36871. }
  36872. function _onceWrap(target, type, listener) {
  36873. var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
  36874. var wrapped = onceWrapper.bind(state);
  36875. wrapped.listener = listener;
  36876. state.wrapFn = wrapped;
  36877. return wrapped;
  36878. }
  36879. EventEmitter.prototype.once = function once(type, listener) {
  36880. checkListener(listener);
  36881. this.on(type, _onceWrap(this, type, listener));
  36882. return this;
  36883. };
  36884. EventEmitter.prototype.prependOnceListener =
  36885. function prependOnceListener(type, listener) {
  36886. checkListener(listener);
  36887. this.prependListener(type, _onceWrap(this, type, listener));
  36888. return this;
  36889. };
  36890. // Emits a 'removeListener' event if and only if the listener was removed.
  36891. EventEmitter.prototype.removeListener =
  36892. function removeListener(type, listener) {
  36893. var list, events, position, i, originalListener;
  36894. checkListener(listener);
  36895. events = this._events;
  36896. if (events === undefined)
  36897. return this;
  36898. list = events[type];
  36899. if (list === undefined)
  36900. return this;
  36901. if (list === listener || list.listener === listener) {
  36902. if (--this._eventsCount === 0)
  36903. this._events = Object.create(null);
  36904. else {
  36905. delete events[type];
  36906. if (events.removeListener)
  36907. this.emit('removeListener', type, list.listener || listener);
  36908. }
  36909. } else if (typeof list !== 'function') {
  36910. position = -1;
  36911. for (i = list.length - 1; i >= 0; i--) {
  36912. if (list[i] === listener || list[i].listener === listener) {
  36913. originalListener = list[i].listener;
  36914. position = i;
  36915. break;
  36916. }
  36917. }
  36918. if (position < 0)
  36919. return this;
  36920. if (position === 0)
  36921. list.shift();
  36922. else {
  36923. spliceOne(list, position);
  36924. }
  36925. if (list.length === 1)
  36926. events[type] = list[0];
  36927. if (events.removeListener !== undefined)
  36928. this.emit('removeListener', type, originalListener || listener);
  36929. }
  36930. return this;
  36931. };
  36932. EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  36933. EventEmitter.prototype.removeAllListeners =
  36934. function removeAllListeners(type) {
  36935. var listeners, events, i;
  36936. events = this._events;
  36937. if (events === undefined)
  36938. return this;
  36939. // not listening for removeListener, no need to emit
  36940. if (events.removeListener === undefined) {
  36941. if (arguments.length === 0) {
  36942. this._events = Object.create(null);
  36943. this._eventsCount = 0;
  36944. } else if (events[type] !== undefined) {
  36945. if (--this._eventsCount === 0)
  36946. this._events = Object.create(null);
  36947. else
  36948. delete events[type];
  36949. }
  36950. return this;
  36951. }
  36952. // emit removeListener for all listeners on all events
  36953. if (arguments.length === 0) {
  36954. var keys = Object.keys(events);
  36955. var key;
  36956. for (i = 0; i < keys.length; ++i) {
  36957. key = keys[i];
  36958. if (key === 'removeListener') continue;
  36959. this.removeAllListeners(key);
  36960. }
  36961. this.removeAllListeners('removeListener');
  36962. this._events = Object.create(null);
  36963. this._eventsCount = 0;
  36964. return this;
  36965. }
  36966. listeners = events[type];
  36967. if (typeof listeners === 'function') {
  36968. this.removeListener(type, listeners);
  36969. } else if (listeners !== undefined) {
  36970. // LIFO order
  36971. for (i = listeners.length - 1; i >= 0; i--) {
  36972. this.removeListener(type, listeners[i]);
  36973. }
  36974. }
  36975. return this;
  36976. };
  36977. function _listeners(target, type, unwrap) {
  36978. var events = target._events;
  36979. if (events === undefined)
  36980. return [];
  36981. var evlistener = events[type];
  36982. if (evlistener === undefined)
  36983. return [];
  36984. if (typeof evlistener === 'function')
  36985. return unwrap ? [evlistener.listener || evlistener] : [evlistener];
  36986. return unwrap ?
  36987. unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  36988. }
  36989. EventEmitter.prototype.listeners = function listeners(type) {
  36990. return _listeners(this, type, true);
  36991. };
  36992. EventEmitter.prototype.rawListeners = function rawListeners(type) {
  36993. return _listeners(this, type, false);
  36994. };
  36995. EventEmitter.listenerCount = function(emitter, type) {
  36996. if (typeof emitter.listenerCount === 'function') {
  36997. return emitter.listenerCount(type);
  36998. } else {
  36999. return listenerCount.call(emitter, type);
  37000. }
  37001. };
  37002. EventEmitter.prototype.listenerCount = listenerCount;
  37003. function listenerCount(type) {
  37004. var events = this._events;
  37005. if (events !== undefined) {
  37006. var evlistener = events[type];
  37007. if (typeof evlistener === 'function') {
  37008. return 1;
  37009. } else if (evlistener !== undefined) {
  37010. return evlistener.length;
  37011. }
  37012. }
  37013. return 0;
  37014. }
  37015. EventEmitter.prototype.eventNames = function eventNames() {
  37016. return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  37017. };
  37018. function arrayClone(arr, n) {
  37019. var copy = new Array(n);
  37020. for (var i = 0; i < n; ++i)
  37021. copy[i] = arr[i];
  37022. return copy;
  37023. }
  37024. function spliceOne(list, index) {
  37025. for (; index + 1 < list.length; index++)
  37026. list[index] = list[index + 1];
  37027. list.pop();
  37028. }
  37029. function unwrapListeners(arr) {
  37030. var ret = new Array(arr.length);
  37031. for (var i = 0; i < ret.length; ++i) {
  37032. ret[i] = arr[i].listener || arr[i];
  37033. }
  37034. return ret;
  37035. }
  37036. function once(emitter, name) {
  37037. return new Promise(function (resolve, reject) {
  37038. function errorListener(err) {
  37039. emitter.removeListener(name, resolver);
  37040. reject(err);
  37041. }
  37042. function resolver() {
  37043. if (typeof emitter.removeListener === 'function') {
  37044. emitter.removeListener('error', errorListener);
  37045. }
  37046. resolve([].slice.call(arguments));
  37047. };
  37048. eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
  37049. if (name !== 'error') {
  37050. addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
  37051. }
  37052. });
  37053. }
  37054. function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
  37055. if (typeof emitter.on === 'function') {
  37056. eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
  37057. }
  37058. }
  37059. function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
  37060. if (typeof emitter.on === 'function') {
  37061. if (flags.once) {
  37062. emitter.once(name, listener);
  37063. } else {
  37064. emitter.on(name, listener);
  37065. }
  37066. } else if (typeof emitter.addEventListener === 'function') {
  37067. // EventTarget does not have `error` event semantics like Node
  37068. // EventEmitters, we do not listen for `error` events here.
  37069. emitter.addEventListener(name, function wrapListener(arg) {
  37070. // IE does not have builtin `{ once: true }` support so we
  37071. // have to do it manually.
  37072. if (flags.once) {
  37073. emitter.removeEventListener(name, wrapListener);
  37074. }
  37075. listener(arg);
  37076. });
  37077. } else {
  37078. throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
  37079. }
  37080. }
  37081. /***/ }),
  37082. /***/ 2536:
  37083. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  37084. var ___EXPOSE_LOADER_IMPORT___ = __webpack_require__(4275);
  37085. var ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = __webpack_require__(7672);
  37086. var ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___;
  37087. if (typeof ___EXPOSE_LOADER_GLOBAL_THIS___["pdfMake"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___["pdfMake"] = ___EXPOSE_LOADER_IMPORT___;
  37088. module.exports = ___EXPOSE_LOADER_IMPORT___;
  37089. /***/ }),
  37090. /***/ 7672:
  37091. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  37092. "use strict";
  37093. // eslint-disable-next-line func-names
  37094. module.exports = function () {
  37095. if (typeof globalThis === "object") {
  37096. return globalThis;
  37097. }
  37098. var g;
  37099. try {
  37100. // This works if eval is allowed (see CSP)
  37101. // eslint-disable-next-line no-new-func
  37102. g = this || new Function("return this")();
  37103. } catch (e) {
  37104. // This works if the window reference is available
  37105. if (typeof window === "object") {
  37106. return window;
  37107. } // This works if the self reference is available
  37108. if (typeof self === "object") {
  37109. return self;
  37110. } // This works if the global reference is available
  37111. if (typeof __webpack_require__.g !== "undefined") {
  37112. return __webpack_require__.g;
  37113. }
  37114. }
  37115. return g;
  37116. }();
  37117. /***/ }),
  37118. /***/ 9804:
  37119. /***/ (function(module) {
  37120. var hasOwn = Object.prototype.hasOwnProperty;
  37121. var toString = Object.prototype.toString;
  37122. module.exports = function forEach (obj, fn, ctx) {
  37123. if (toString.call(fn) !== '[object Function]') {
  37124. throw new TypeError('iterator must be a function');
  37125. }
  37126. var l = obj.length;
  37127. if (l === +l) {
  37128. for (var i = 0; i < l; i++) {
  37129. fn.call(ctx, obj[i], i, obj);
  37130. }
  37131. } else {
  37132. for (var k in obj) {
  37133. if (hasOwn.call(obj, k)) {
  37134. fn.call(ctx, obj[k], k, obj);
  37135. }
  37136. }
  37137. }
  37138. };
  37139. /***/ }),
  37140. /***/ 7648:
  37141. /***/ (function(module) {
  37142. "use strict";
  37143. /* eslint no-invalid-this: 1 */
  37144. var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
  37145. var slice = Array.prototype.slice;
  37146. var toStr = Object.prototype.toString;
  37147. var funcType = '[object Function]';
  37148. module.exports = function bind(that) {
  37149. var target = this;
  37150. if (typeof target !== 'function' || toStr.call(target) !== funcType) {
  37151. throw new TypeError(ERROR_MESSAGE + target);
  37152. }
  37153. var args = slice.call(arguments, 1);
  37154. var bound;
  37155. var binder = function () {
  37156. if (this instanceof bound) {
  37157. var result = target.apply(
  37158. this,
  37159. args.concat(slice.call(arguments))
  37160. );
  37161. if (Object(result) === result) {
  37162. return result;
  37163. }
  37164. return this;
  37165. } else {
  37166. return target.apply(
  37167. that,
  37168. args.concat(slice.call(arguments))
  37169. );
  37170. }
  37171. };
  37172. var boundLength = Math.max(0, target.length - args.length);
  37173. var boundArgs = [];
  37174. for (var i = 0; i < boundLength; i++) {
  37175. boundArgs.push('$' + i);
  37176. }
  37177. bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
  37178. if (target.prototype) {
  37179. var Empty = function Empty() {};
  37180. Empty.prototype = target.prototype;
  37181. bound.prototype = new Empty();
  37182. Empty.prototype = null;
  37183. }
  37184. return bound;
  37185. };
  37186. /***/ }),
  37187. /***/ 8612:
  37188. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  37189. "use strict";
  37190. var implementation = __webpack_require__(7648);
  37191. module.exports = Function.prototype.bind || implementation;
  37192. /***/ }),
  37193. /***/ 210:
  37194. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  37195. "use strict";
  37196. var undefined;
  37197. var $SyntaxError = SyntaxError;
  37198. var $Function = Function;
  37199. var $TypeError = TypeError;
  37200. // eslint-disable-next-line consistent-return
  37201. var getEvalledConstructor = function (expressionSyntax) {
  37202. try {
  37203. return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
  37204. } catch (e) {}
  37205. };
  37206. var $gOPD = Object.getOwnPropertyDescriptor;
  37207. if ($gOPD) {
  37208. try {
  37209. $gOPD({}, '');
  37210. } catch (e) {
  37211. $gOPD = null; // this is IE 8, which has a broken gOPD
  37212. }
  37213. }
  37214. var throwTypeError = function () {
  37215. throw new $TypeError();
  37216. };
  37217. var ThrowTypeError = $gOPD
  37218. ? (function () {
  37219. try {
  37220. // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
  37221. arguments.callee; // IE 8 does not throw here
  37222. return throwTypeError;
  37223. } catch (calleeThrows) {
  37224. try {
  37225. // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
  37226. return $gOPD(arguments, 'callee').get;
  37227. } catch (gOPDthrows) {
  37228. return throwTypeError;
  37229. }
  37230. }
  37231. }())
  37232. : throwTypeError;
  37233. var hasSymbols = __webpack_require__(1405)();
  37234. var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
  37235. var needsEval = {};
  37236. var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
  37237. var INTRINSICS = {
  37238. '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
  37239. '%Array%': Array,
  37240. '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
  37241. '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
  37242. '%AsyncFromSyncIteratorPrototype%': undefined,
  37243. '%AsyncFunction%': needsEval,
  37244. '%AsyncGenerator%': needsEval,
  37245. '%AsyncGeneratorFunction%': needsEval,
  37246. '%AsyncIteratorPrototype%': needsEval,
  37247. '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
  37248. '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
  37249. '%Boolean%': Boolean,
  37250. '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
  37251. '%Date%': Date,
  37252. '%decodeURI%': decodeURI,
  37253. '%decodeURIComponent%': decodeURIComponent,
  37254. '%encodeURI%': encodeURI,
  37255. '%encodeURIComponent%': encodeURIComponent,
  37256. '%Error%': Error,
  37257. '%eval%': eval, // eslint-disable-line no-eval
  37258. '%EvalError%': EvalError,
  37259. '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
  37260. '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
  37261. '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
  37262. '%Function%': $Function,
  37263. '%GeneratorFunction%': needsEval,
  37264. '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
  37265. '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
  37266. '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
  37267. '%isFinite%': isFinite,
  37268. '%isNaN%': isNaN,
  37269. '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
  37270. '%JSON%': typeof JSON === 'object' ? JSON : undefined,
  37271. '%Map%': typeof Map === 'undefined' ? undefined : Map,
  37272. '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
  37273. '%Math%': Math,
  37274. '%Number%': Number,
  37275. '%Object%': Object,
  37276. '%parseFloat%': parseFloat,
  37277. '%parseInt%': parseInt,
  37278. '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
  37279. '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
  37280. '%RangeError%': RangeError,
  37281. '%ReferenceError%': ReferenceError,
  37282. '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
  37283. '%RegExp%': RegExp,
  37284. '%Set%': typeof Set === 'undefined' ? undefined : Set,
  37285. '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
  37286. '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
  37287. '%String%': String,
  37288. '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
  37289. '%Symbol%': hasSymbols ? Symbol : undefined,
  37290. '%SyntaxError%': $SyntaxError,
  37291. '%ThrowTypeError%': ThrowTypeError,
  37292. '%TypedArray%': TypedArray,
  37293. '%TypeError%': $TypeError,
  37294. '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
  37295. '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
  37296. '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
  37297. '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
  37298. '%URIError%': URIError,
  37299. '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
  37300. '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
  37301. '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
  37302. };
  37303. var doEval = function doEval(name) {
  37304. var value;
  37305. if (name === '%AsyncFunction%') {
  37306. value = getEvalledConstructor('async function () {}');
  37307. } else if (name === '%GeneratorFunction%') {
  37308. value = getEvalledConstructor('function* () {}');
  37309. } else if (name === '%AsyncGeneratorFunction%') {
  37310. value = getEvalledConstructor('async function* () {}');
  37311. } else if (name === '%AsyncGenerator%') {
  37312. var fn = doEval('%AsyncGeneratorFunction%');
  37313. if (fn) {
  37314. value = fn.prototype;
  37315. }
  37316. } else if (name === '%AsyncIteratorPrototype%') {
  37317. var gen = doEval('%AsyncGenerator%');
  37318. if (gen) {
  37319. value = getProto(gen.prototype);
  37320. }
  37321. }
  37322. INTRINSICS[name] = value;
  37323. return value;
  37324. };
  37325. var LEGACY_ALIASES = {
  37326. '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
  37327. '%ArrayPrototype%': ['Array', 'prototype'],
  37328. '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
  37329. '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
  37330. '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
  37331. '%ArrayProto_values%': ['Array', 'prototype', 'values'],
  37332. '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
  37333. '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
  37334. '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
  37335. '%BooleanPrototype%': ['Boolean', 'prototype'],
  37336. '%DataViewPrototype%': ['DataView', 'prototype'],
  37337. '%DatePrototype%': ['Date', 'prototype'],
  37338. '%ErrorPrototype%': ['Error', 'prototype'],
  37339. '%EvalErrorPrototype%': ['EvalError', 'prototype'],
  37340. '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
  37341. '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
  37342. '%FunctionPrototype%': ['Function', 'prototype'],
  37343. '%Generator%': ['GeneratorFunction', 'prototype'],
  37344. '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
  37345. '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
  37346. '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
  37347. '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
  37348. '%JSONParse%': ['JSON', 'parse'],
  37349. '%JSONStringify%': ['JSON', 'stringify'],
  37350. '%MapPrototype%': ['Map', 'prototype'],
  37351. '%NumberPrototype%': ['Number', 'prototype'],
  37352. '%ObjectPrototype%': ['Object', 'prototype'],
  37353. '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
  37354. '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
  37355. '%PromisePrototype%': ['Promise', 'prototype'],
  37356. '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
  37357. '%Promise_all%': ['Promise', 'all'],
  37358. '%Promise_reject%': ['Promise', 'reject'],
  37359. '%Promise_resolve%': ['Promise', 'resolve'],
  37360. '%RangeErrorPrototype%': ['RangeError', 'prototype'],
  37361. '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
  37362. '%RegExpPrototype%': ['RegExp', 'prototype'],
  37363. '%SetPrototype%': ['Set', 'prototype'],
  37364. '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
  37365. '%StringPrototype%': ['String', 'prototype'],
  37366. '%SymbolPrototype%': ['Symbol', 'prototype'],
  37367. '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
  37368. '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
  37369. '%TypeErrorPrototype%': ['TypeError', 'prototype'],
  37370. '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
  37371. '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
  37372. '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
  37373. '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
  37374. '%URIErrorPrototype%': ['URIError', 'prototype'],
  37375. '%WeakMapPrototype%': ['WeakMap', 'prototype'],
  37376. '%WeakSetPrototype%': ['WeakSet', 'prototype']
  37377. };
  37378. var bind = __webpack_require__(8612);
  37379. var hasOwn = __webpack_require__(7642);
  37380. var $concat = bind.call(Function.call, Array.prototype.concat);
  37381. var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
  37382. var $replace = bind.call(Function.call, String.prototype.replace);
  37383. var $strSlice = bind.call(Function.call, String.prototype.slice);
  37384. /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
  37385. var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
  37386. var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
  37387. var stringToPath = function stringToPath(string) {
  37388. var first = $strSlice(string, 0, 1);
  37389. var last = $strSlice(string, -1);
  37390. if (first === '%' && last !== '%') {
  37391. throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
  37392. } else if (last === '%' && first !== '%') {
  37393. throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
  37394. }
  37395. var result = [];
  37396. $replace(string, rePropName, function (match, number, quote, subString) {
  37397. result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
  37398. });
  37399. return result;
  37400. };
  37401. /* end adaptation */
  37402. var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
  37403. var intrinsicName = name;
  37404. var alias;
  37405. if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
  37406. alias = LEGACY_ALIASES[intrinsicName];
  37407. intrinsicName = '%' + alias[0] + '%';
  37408. }
  37409. if (hasOwn(INTRINSICS, intrinsicName)) {
  37410. var value = INTRINSICS[intrinsicName];
  37411. if (value === needsEval) {
  37412. value = doEval(intrinsicName);
  37413. }
  37414. if (typeof value === 'undefined' && !allowMissing) {
  37415. throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
  37416. }
  37417. return {
  37418. alias: alias,
  37419. name: intrinsicName,
  37420. value: value
  37421. };
  37422. }
  37423. throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
  37424. };
  37425. module.exports = function GetIntrinsic(name, allowMissing) {
  37426. if (typeof name !== 'string' || name.length === 0) {
  37427. throw new $TypeError('intrinsic name must be a non-empty string');
  37428. }
  37429. if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
  37430. throw new $TypeError('"allowMissing" argument must be a boolean');
  37431. }
  37432. var parts = stringToPath(name);
  37433. var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
  37434. var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
  37435. var intrinsicRealName = intrinsic.name;
  37436. var value = intrinsic.value;
  37437. var skipFurtherCaching = false;
  37438. var alias = intrinsic.alias;
  37439. if (alias) {
  37440. intrinsicBaseName = alias[0];
  37441. $spliceApply(parts, $concat([0, 1], alias));
  37442. }
  37443. for (var i = 1, isOwn = true; i < parts.length; i += 1) {
  37444. var part = parts[i];
  37445. var first = $strSlice(part, 0, 1);
  37446. var last = $strSlice(part, -1);
  37447. if (
  37448. (
  37449. (first === '"' || first === "'" || first === '`')
  37450. || (last === '"' || last === "'" || last === '`')
  37451. )
  37452. && first !== last
  37453. ) {
  37454. throw new $SyntaxError('property names with quotes must have matching quotes');
  37455. }
  37456. if (part === 'constructor' || !isOwn) {
  37457. skipFurtherCaching = true;
  37458. }
  37459. intrinsicBaseName += '.' + part;
  37460. intrinsicRealName = '%' + intrinsicBaseName + '%';
  37461. if (hasOwn(INTRINSICS, intrinsicRealName)) {
  37462. value = INTRINSICS[intrinsicRealName];
  37463. } else if (value != null) {
  37464. if (!(part in value)) {
  37465. if (!allowMissing) {
  37466. throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
  37467. }
  37468. return void undefined;
  37469. }
  37470. if ($gOPD && (i + 1) >= parts.length) {
  37471. var desc = $gOPD(value, part);
  37472. isOwn = !!desc;
  37473. // By convention, when a data property is converted to an accessor
  37474. // property to emulate a data property that does not suffer from
  37475. // the override mistake, that accessor's getter is marked with
  37476. // an `originalValue` property. Here, when we detect this, we
  37477. // uphold the illusion by pretending to see that original data
  37478. // property, i.e., returning the value rather than the getter
  37479. // itself.
  37480. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
  37481. value = desc.get;
  37482. } else {
  37483. value = value[part];
  37484. }
  37485. } else {
  37486. isOwn = hasOwn(value, part);
  37487. value = value[part];
  37488. }
  37489. if (isOwn && !skipFurtherCaching) {
  37490. INTRINSICS[intrinsicRealName] = value;
  37491. }
  37492. }
  37493. }
  37494. return value;
  37495. };
  37496. /***/ }),
  37497. /***/ 1405:
  37498. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  37499. "use strict";
  37500. var origSymbol = typeof Symbol !== 'undefined' && Symbol;
  37501. var hasSymbolSham = __webpack_require__(5419);
  37502. module.exports = function hasNativeSymbols() {
  37503. if (typeof origSymbol !== 'function') { return false; }
  37504. if (typeof Symbol !== 'function') { return false; }
  37505. if (typeof origSymbol('foo') !== 'symbol') { return false; }
  37506. if (typeof Symbol('bar') !== 'symbol') { return false; }
  37507. return hasSymbolSham();
  37508. };
  37509. /***/ }),
  37510. /***/ 5419:
  37511. /***/ (function(module) {
  37512. "use strict";
  37513. /* eslint complexity: [2, 18], max-statements: [2, 33] */
  37514. module.exports = function hasSymbols() {
  37515. if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
  37516. if (typeof Symbol.iterator === 'symbol') { return true; }
  37517. var obj = {};
  37518. var sym = Symbol('test');
  37519. var symObj = Object(sym);
  37520. if (typeof sym === 'string') { return false; }
  37521. if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
  37522. if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
  37523. // temp disabled per https://github.com/ljharb/object.assign/issues/17
  37524. // if (sym instanceof Symbol) { return false; }
  37525. // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
  37526. // if (!(symObj instanceof Symbol)) { return false; }
  37527. // if (typeof Symbol.prototype.toString !== 'function') { return false; }
  37528. // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
  37529. var symVal = 42;
  37530. obj[sym] = symVal;
  37531. for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
  37532. if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
  37533. if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
  37534. var syms = Object.getOwnPropertySymbols(obj);
  37535. if (syms.length !== 1 || syms[0] !== sym) { return false; }
  37536. if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
  37537. if (typeof Object.getOwnPropertyDescriptor === 'function') {
  37538. var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
  37539. if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
  37540. }
  37541. return true;
  37542. };
  37543. /***/ }),
  37544. /***/ 6410:
  37545. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  37546. "use strict";
  37547. var hasSymbols = __webpack_require__(5419);
  37548. module.exports = function hasToStringTagShams() {
  37549. return hasSymbols() && !!Symbol.toStringTag;
  37550. };
  37551. /***/ }),
  37552. /***/ 7642:
  37553. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  37554. "use strict";
  37555. var bind = __webpack_require__(8612);
  37556. module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
  37557. /***/ }),
  37558. /***/ 688:
  37559. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  37560. "use strict";
  37561. var Buffer = (__webpack_require__(7103).Buffer);
  37562. // Multibyte codec. In this scheme, a character is represented by 1 or more bytes.
  37563. // Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
  37564. // To save memory and loading time, we read table files only when requested.
  37565. exports._dbcs = DBCSCodec;
  37566. var UNASSIGNED = -1,
  37567. GB18030_CODE = -2,
  37568. SEQ_START = -10,
  37569. NODE_START = -1000,
  37570. UNASSIGNED_NODE = new Array(0x100),
  37571. DEF_CHAR = -1;
  37572. for (var i = 0; i < 0x100; i++)
  37573. UNASSIGNED_NODE[i] = UNASSIGNED;
  37574. // Class DBCSCodec reads and initializes mapping tables.
  37575. function DBCSCodec(codecOptions, iconv) {
  37576. this.encodingName = codecOptions.encodingName;
  37577. if (!codecOptions)
  37578. throw new Error("DBCS codec is called without the data.")
  37579. if (!codecOptions.table)
  37580. throw new Error("Encoding '" + this.encodingName + "' has no data.");
  37581. // Load tables.
  37582. var mappingTable = codecOptions.table();
  37583. // Decode tables: MBCS -> Unicode.
  37584. // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256.
  37585. // Trie root is decodeTables[0].
  37586. // Values: >= 0 -> unicode character code. can be > 0xFFFF
  37587. // == UNASSIGNED -> unknown/unassigned sequence.
  37588. // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
  37589. // <= NODE_START -> index of the next node in our trie to process next byte.
  37590. // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
  37591. this.decodeTables = [];
  37592. this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node.
  37593. // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here.
  37594. this.decodeTableSeq = [];
  37595. // Actual mapping tables consist of chunks. Use them to fill up decode tables.
  37596. for (var i = 0; i < mappingTable.length; i++)
  37597. this._addDecodeChunk(mappingTable[i]);
  37598. // Load & create GB18030 tables when needed.
  37599. if (typeof codecOptions.gb18030 === 'function') {
  37600. this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges.
  37601. // Add GB18030 common decode nodes.
  37602. var commonThirdByteNodeIdx = this.decodeTables.length;
  37603. this.decodeTables.push(UNASSIGNED_NODE.slice(0));
  37604. var commonFourthByteNodeIdx = this.decodeTables.length;
  37605. this.decodeTables.push(UNASSIGNED_NODE.slice(0));
  37606. // Fill out the tree
  37607. var firstByteNode = this.decodeTables[0];
  37608. for (var i = 0x81; i <= 0xFE; i++) {
  37609. var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]];
  37610. for (var j = 0x30; j <= 0x39; j++) {
  37611. if (secondByteNode[j] === UNASSIGNED) {
  37612. secondByteNode[j] = NODE_START - commonThirdByteNodeIdx;
  37613. } else if (secondByteNode[j] > NODE_START) {
  37614. throw new Error("gb18030 decode tables conflict at byte 2");
  37615. }
  37616. var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]];
  37617. for (var k = 0x81; k <= 0xFE; k++) {
  37618. if (thirdByteNode[k] === UNASSIGNED) {
  37619. thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx;
  37620. } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) {
  37621. continue;
  37622. } else if (thirdByteNode[k] > NODE_START) {
  37623. throw new Error("gb18030 decode tables conflict at byte 3");
  37624. }
  37625. var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]];
  37626. for (var l = 0x30; l <= 0x39; l++) {
  37627. if (fourthByteNode[l] === UNASSIGNED)
  37628. fourthByteNode[l] = GB18030_CODE;
  37629. }
  37630. }
  37631. }
  37632. }
  37633. }
  37634. this.defaultCharUnicode = iconv.defaultCharUnicode;
  37635. // Encode tables: Unicode -> DBCS.
  37636. // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance.
  37637. // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null.
  37638. // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.).
  37639. // == UNASSIGNED -> no conversion found. Output a default char.
  37640. // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence.
  37641. this.encodeTable = [];
  37642. // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of
  37643. // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key
  37644. // means end of sequence (needed when one sequence is a strict subsequence of another).
  37645. // Objects are kept separately from encodeTable to increase performance.
  37646. this.encodeTableSeq = [];
  37647. // Some chars can be decoded, but need not be encoded.
  37648. var skipEncodeChars = {};
  37649. if (codecOptions.encodeSkipVals)
  37650. for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) {
  37651. var val = codecOptions.encodeSkipVals[i];
  37652. if (typeof val === 'number')
  37653. skipEncodeChars[val] = true;
  37654. else
  37655. for (var j = val.from; j <= val.to; j++)
  37656. skipEncodeChars[j] = true;
  37657. }
  37658. // Use decode trie to recursively fill out encode tables.
  37659. this._fillEncodeTable(0, 0, skipEncodeChars);
  37660. // Add more encoding pairs when needed.
  37661. if (codecOptions.encodeAdd) {
  37662. for (var uChar in codecOptions.encodeAdd)
  37663. if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar))
  37664. this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]);
  37665. }
  37666. this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)];
  37667. if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?'];
  37668. if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0);
  37669. }
  37670. DBCSCodec.prototype.encoder = DBCSEncoder;
  37671. DBCSCodec.prototype.decoder = DBCSDecoder;
  37672. // Decoder helpers
  37673. DBCSCodec.prototype._getDecodeTrieNode = function(addr) {
  37674. var bytes = [];
  37675. for (; addr > 0; addr >>>= 8)
  37676. bytes.push(addr & 0xFF);
  37677. if (bytes.length == 0)
  37678. bytes.push(0);
  37679. var node = this.decodeTables[0];
  37680. for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
  37681. var val = node[bytes[i]];
  37682. if (val == UNASSIGNED) { // Create new node.
  37683. node[bytes[i]] = NODE_START - this.decodeTables.length;
  37684. this.decodeTables.push(node = UNASSIGNED_NODE.slice(0));
  37685. }
  37686. else if (val <= NODE_START) { // Existing node.
  37687. node = this.decodeTables[NODE_START - val];
  37688. }
  37689. else
  37690. throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16));
  37691. }
  37692. return node;
  37693. }
  37694. DBCSCodec.prototype._addDecodeChunk = function(chunk) {
  37695. // First element of chunk is the hex mbcs code where we start.
  37696. var curAddr = parseInt(chunk[0], 16);
  37697. // Choose the decoding node where we'll write our chars.
  37698. var writeTable = this._getDecodeTrieNode(curAddr);
  37699. curAddr = curAddr & 0xFF;
  37700. // Write all other elements of the chunk to the table.
  37701. for (var k = 1; k < chunk.length; k++) {
  37702. var part = chunk[k];
  37703. if (typeof part === "string") { // String, write as-is.
  37704. for (var l = 0; l < part.length;) {
  37705. var code = part.charCodeAt(l++);
  37706. if (0xD800 <= code && code < 0xDC00) { // Decode surrogate
  37707. var codeTrail = part.charCodeAt(l++);
  37708. if (0xDC00 <= codeTrail && codeTrail < 0xE000)
  37709. writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
  37710. else
  37711. throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]);
  37712. }
  37713. else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used)
  37714. var len = 0xFFF - code + 2;
  37715. var seq = [];
  37716. for (var m = 0; m < len; m++)
  37717. seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq.
  37718. writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
  37719. this.decodeTableSeq.push(seq);
  37720. }
  37721. else
  37722. writeTable[curAddr++] = code; // Basic char
  37723. }
  37724. }
  37725. else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character.
  37726. var charCode = writeTable[curAddr - 1] + 1;
  37727. for (var l = 0; l < part; l++)
  37728. writeTable[curAddr++] = charCode++;
  37729. }
  37730. else
  37731. throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]);
  37732. }
  37733. if (curAddr > 0xFF)
  37734. throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr);
  37735. }
  37736. // Encoder helpers
  37737. DBCSCodec.prototype._getEncodeBucket = function(uCode) {
  37738. var high = uCode >> 8; // This could be > 0xFF because of astral characters.
  37739. if (this.encodeTable[high] === undefined)
  37740. this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand.
  37741. return this.encodeTable[high];
  37742. }
  37743. DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) {
  37744. var bucket = this._getEncodeBucket(uCode);
  37745. var low = uCode & 0xFF;
  37746. if (bucket[low] <= SEQ_START)
  37747. this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it.
  37748. else if (bucket[low] == UNASSIGNED)
  37749. bucket[low] = dbcsCode;
  37750. }
  37751. DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) {
  37752. // Get the root of character tree according to first character of the sequence.
  37753. var uCode = seq[0];
  37754. var bucket = this._getEncodeBucket(uCode);
  37755. var low = uCode & 0xFF;
  37756. var node;
  37757. if (bucket[low] <= SEQ_START) {
  37758. // There's already a sequence with - use it.
  37759. node = this.encodeTableSeq[SEQ_START-bucket[low]];
  37760. }
  37761. else {
  37762. // There was no sequence object - allocate a new one.
  37763. node = {};
  37764. if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence.
  37765. bucket[low] = SEQ_START - this.encodeTableSeq.length;
  37766. this.encodeTableSeq.push(node);
  37767. }
  37768. // Traverse the character tree, allocating new nodes as needed.
  37769. for (var j = 1; j < seq.length-1; j++) {
  37770. var oldVal = node[uCode];
  37771. if (typeof oldVal === 'object')
  37772. node = oldVal;
  37773. else {
  37774. node = node[uCode] = {}
  37775. if (oldVal !== undefined)
  37776. node[DEF_CHAR] = oldVal
  37777. }
  37778. }
  37779. // Set the leaf to given dbcsCode.
  37780. uCode = seq[seq.length-1];
  37781. node[uCode] = dbcsCode;
  37782. }
  37783. DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) {
  37784. var node = this.decodeTables[nodeIdx];
  37785. var hasValues = false;
  37786. var subNodeEmpty = {};
  37787. for (var i = 0; i < 0x100; i++) {
  37788. var uCode = node[i];
  37789. var mbCode = prefix + i;
  37790. if (skipEncodeChars[mbCode])
  37791. continue;
  37792. if (uCode >= 0) {
  37793. this._setEncodeChar(uCode, mbCode);
  37794. hasValues = true;
  37795. } else if (uCode <= NODE_START) {
  37796. var subNodeIdx = NODE_START - uCode;
  37797. if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030).
  37798. var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive.
  37799. if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars))
  37800. hasValues = true;
  37801. else
  37802. subNodeEmpty[subNodeIdx] = true;
  37803. }
  37804. } else if (uCode <= SEQ_START) {
  37805. this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
  37806. hasValues = true;
  37807. }
  37808. }
  37809. return hasValues;
  37810. }
  37811. // == Encoder ==================================================================
  37812. function DBCSEncoder(options, codec) {
  37813. // Encoder state
  37814. this.leadSurrogate = -1;
  37815. this.seqObj = undefined;
  37816. // Static data
  37817. this.encodeTable = codec.encodeTable;
  37818. this.encodeTableSeq = codec.encodeTableSeq;
  37819. this.defaultCharSingleByte = codec.defCharSB;
  37820. this.gb18030 = codec.gb18030;
  37821. }
  37822. DBCSEncoder.prototype.write = function(str) {
  37823. var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)),
  37824. leadSurrogate = this.leadSurrogate,
  37825. seqObj = this.seqObj, nextChar = -1,
  37826. i = 0, j = 0;
  37827. while (true) {
  37828. // 0. Get next character.
  37829. if (nextChar === -1) {
  37830. if (i == str.length) break;
  37831. var uCode = str.charCodeAt(i++);
  37832. }
  37833. else {
  37834. var uCode = nextChar;
  37835. nextChar = -1;
  37836. }
  37837. // 1. Handle surrogates.
  37838. if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates.
  37839. if (uCode < 0xDC00) { // We've got lead surrogate.
  37840. if (leadSurrogate === -1) {
  37841. leadSurrogate = uCode;
  37842. continue;
  37843. } else {
  37844. leadSurrogate = uCode;
  37845. // Double lead surrogate found.
  37846. uCode = UNASSIGNED;
  37847. }
  37848. } else { // We've got trail surrogate.
  37849. if (leadSurrogate !== -1) {
  37850. uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
  37851. leadSurrogate = -1;
  37852. } else {
  37853. // Incomplete surrogate pair - only trail surrogate found.
  37854. uCode = UNASSIGNED;
  37855. }
  37856. }
  37857. }
  37858. else if (leadSurrogate !== -1) {
  37859. // Incomplete surrogate pair - only lead surrogate found.
  37860. nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char.
  37861. leadSurrogate = -1;
  37862. }
  37863. // 2. Convert uCode character.
  37864. var dbcsCode = UNASSIGNED;
  37865. if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence
  37866. var resCode = seqObj[uCode];
  37867. if (typeof resCode === 'object') { // Sequence continues.
  37868. seqObj = resCode;
  37869. continue;
  37870. } else if (typeof resCode == 'number') { // Sequence finished. Write it.
  37871. dbcsCode = resCode;
  37872. } else if (resCode == undefined) { // Current character is not part of the sequence.
  37873. // Try default character for this sequence
  37874. resCode = seqObj[DEF_CHAR];
  37875. if (resCode !== undefined) {
  37876. dbcsCode = resCode; // Found. Write it.
  37877. nextChar = uCode; // Current character will be written too in the next iteration.
  37878. } else {
  37879. // TODO: What if we have no default? (resCode == undefined)
  37880. // Then, we should write first char of the sequence as-is and try the rest recursively.
  37881. // Didn't do it for now because no encoding has this situation yet.
  37882. // Currently, just skip the sequence and write current char.
  37883. }
  37884. }
  37885. seqObj = undefined;
  37886. }
  37887. else if (uCode >= 0) { // Regular character
  37888. var subtable = this.encodeTable[uCode >> 8];
  37889. if (subtable !== undefined)
  37890. dbcsCode = subtable[uCode & 0xFF];
  37891. if (dbcsCode <= SEQ_START) { // Sequence start
  37892. seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
  37893. continue;
  37894. }
  37895. if (dbcsCode == UNASSIGNED && this.gb18030) {
  37896. // Use GB18030 algorithm to find character(s) to write.
  37897. var idx = findIdx(this.gb18030.uChars, uCode);
  37898. if (idx != -1) {
  37899. var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
  37900. newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600;
  37901. newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260;
  37902. newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10;
  37903. newBuf[j++] = 0x30 + dbcsCode;
  37904. continue;
  37905. }
  37906. }
  37907. }
  37908. // 3. Write dbcsCode character.
  37909. if (dbcsCode === UNASSIGNED)
  37910. dbcsCode = this.defaultCharSingleByte;
  37911. if (dbcsCode < 0x100) {
  37912. newBuf[j++] = dbcsCode;
  37913. }
  37914. else if (dbcsCode < 0x10000) {
  37915. newBuf[j++] = dbcsCode >> 8; // high byte
  37916. newBuf[j++] = dbcsCode & 0xFF; // low byte
  37917. }
  37918. else if (dbcsCode < 0x1000000) {
  37919. newBuf[j++] = dbcsCode >> 16;
  37920. newBuf[j++] = (dbcsCode >> 8) & 0xFF;
  37921. newBuf[j++] = dbcsCode & 0xFF;
  37922. } else {
  37923. newBuf[j++] = dbcsCode >>> 24;
  37924. newBuf[j++] = (dbcsCode >>> 16) & 0xFF;
  37925. newBuf[j++] = (dbcsCode >>> 8) & 0xFF;
  37926. newBuf[j++] = dbcsCode & 0xFF;
  37927. }
  37928. }
  37929. this.seqObj = seqObj;
  37930. this.leadSurrogate = leadSurrogate;
  37931. return newBuf.slice(0, j);
  37932. }
  37933. DBCSEncoder.prototype.end = function() {
  37934. if (this.leadSurrogate === -1 && this.seqObj === undefined)
  37935. return; // All clean. Most often case.
  37936. var newBuf = Buffer.alloc(10), j = 0;
  37937. if (this.seqObj) { // We're in the sequence.
  37938. var dbcsCode = this.seqObj[DEF_CHAR];
  37939. if (dbcsCode !== undefined) { // Write beginning of the sequence.
  37940. if (dbcsCode < 0x100) {
  37941. newBuf[j++] = dbcsCode;
  37942. }
  37943. else {
  37944. newBuf[j++] = dbcsCode >> 8; // high byte
  37945. newBuf[j++] = dbcsCode & 0xFF; // low byte
  37946. }
  37947. } else {
  37948. // See todo above.
  37949. }
  37950. this.seqObj = undefined;
  37951. }
  37952. if (this.leadSurrogate !== -1) {
  37953. // Incomplete surrogate pair - only lead surrogate found.
  37954. newBuf[j++] = this.defaultCharSingleByte;
  37955. this.leadSurrogate = -1;
  37956. }
  37957. return newBuf.slice(0, j);
  37958. }
  37959. // Export for testing
  37960. DBCSEncoder.prototype.findIdx = findIdx;
  37961. // == Decoder ==================================================================
  37962. function DBCSDecoder(options, codec) {
  37963. // Decoder state
  37964. this.nodeIdx = 0;
  37965. this.prevBytes = [];
  37966. // Static data
  37967. this.decodeTables = codec.decodeTables;
  37968. this.decodeTableSeq = codec.decodeTableSeq;
  37969. this.defaultCharUnicode = codec.defaultCharUnicode;
  37970. this.gb18030 = codec.gb18030;
  37971. }
  37972. DBCSDecoder.prototype.write = function(buf) {
  37973. var newBuf = Buffer.alloc(buf.length*2),
  37974. nodeIdx = this.nodeIdx,
  37975. prevBytes = this.prevBytes, prevOffset = this.prevBytes.length,
  37976. seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence.
  37977. uCode;
  37978. for (var i = 0, j = 0; i < buf.length; i++) {
  37979. var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset];
  37980. // Lookup in current trie node.
  37981. var uCode = this.decodeTables[nodeIdx][curByte];
  37982. if (uCode >= 0) {
  37983. // Normal character, just use it.
  37984. }
  37985. else if (uCode === UNASSIGNED) { // Unknown char.
  37986. // TODO: Callback with seq.
  37987. uCode = this.defaultCharUnicode.charCodeAt(0);
  37988. i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again.
  37989. }
  37990. else if (uCode === GB18030_CODE) {
  37991. if (i >= 3) {
  37992. var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30);
  37993. } else {
  37994. var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 +
  37995. (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 +
  37996. (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 +
  37997. (curByte-0x30);
  37998. }
  37999. var idx = findIdx(this.gb18030.gbChars, ptr);
  38000. uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
  38001. }
  38002. else if (uCode <= NODE_START) { // Go to next trie node.
  38003. nodeIdx = NODE_START - uCode;
  38004. continue;
  38005. }
  38006. else if (uCode <= SEQ_START) { // Output a sequence of chars.
  38007. var seq = this.decodeTableSeq[SEQ_START - uCode];
  38008. for (var k = 0; k < seq.length - 1; k++) {
  38009. uCode = seq[k];
  38010. newBuf[j++] = uCode & 0xFF;
  38011. newBuf[j++] = uCode >> 8;
  38012. }
  38013. uCode = seq[seq.length-1];
  38014. }
  38015. else
  38016. throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte);
  38017. // Write the character to buffer, handling higher planes using surrogate pair.
  38018. if (uCode >= 0x10000) {
  38019. uCode -= 0x10000;
  38020. var uCodeLead = 0xD800 | (uCode >> 10);
  38021. newBuf[j++] = uCodeLead & 0xFF;
  38022. newBuf[j++] = uCodeLead >> 8;
  38023. uCode = 0xDC00 | (uCode & 0x3FF);
  38024. }
  38025. newBuf[j++] = uCode & 0xFF;
  38026. newBuf[j++] = uCode >> 8;
  38027. // Reset trie node.
  38028. nodeIdx = 0; seqStart = i+1;
  38029. }
  38030. this.nodeIdx = nodeIdx;
  38031. this.prevBytes = (seqStart >= 0)
  38032. ? Array.prototype.slice.call(buf, seqStart)
  38033. : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf));
  38034. return newBuf.slice(0, j).toString('ucs2');
  38035. }
  38036. DBCSDecoder.prototype.end = function() {
  38037. var ret = '';
  38038. // Try to parse all remaining chars.
  38039. while (this.prevBytes.length > 0) {
  38040. // Skip 1 character in the buffer.
  38041. ret += this.defaultCharUnicode;
  38042. var bytesArr = this.prevBytes.slice(1);
  38043. // Parse remaining as usual.
  38044. this.prevBytes = [];
  38045. this.nodeIdx = 0;
  38046. if (bytesArr.length > 0)
  38047. ret += this.write(bytesArr);
  38048. }
  38049. this.prevBytes = [];
  38050. this.nodeIdx = 0;
  38051. return ret;
  38052. }
  38053. // Binary search for GB18030. Returns largest i such that table[i] <= val.
  38054. function findIdx(table, val) {
  38055. if (table[0] > val)
  38056. return -1;
  38057. var l = 0, r = table.length;
  38058. while (l < r-1) { // always table[l] <= val < table[r]
  38059. var mid = l + ((r-l+1) >> 1);
  38060. if (table[mid] <= val)
  38061. l = mid;
  38062. else
  38063. r = mid;
  38064. }
  38065. return l;
  38066. }
  38067. /***/ }),
  38068. /***/ 5990:
  38069. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  38070. "use strict";
  38071. // Description of supported double byte encodings and aliases.
  38072. // Tables are not require()-d until they are needed to speed up library load.
  38073. // require()-s are direct to support Browserify.
  38074. module.exports = {
  38075. // == Japanese/ShiftJIS ====================================================
  38076. // All japanese encodings are based on JIS X set of standards:
  38077. // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
  38078. // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
  38079. // Has several variations in 1978, 1983, 1990 and 1997.
  38080. // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
  38081. // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
  38082. // 2 planes, first is superset of 0208, second - revised 0212.
  38083. // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx)
  38084. // Byte encodings are:
  38085. // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
  38086. // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC.
  38087. // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI.
  38088. // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
  38089. // 0x00-0x7F - lower part of 0201
  38090. // 0x8E, 0xA1-0xDF - upper part of 0201
  38091. // (0xA1-0xFE)x2 - 0208 plane (94x94).
  38092. // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
  38093. // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
  38094. // Used as-is in ISO2022 family.
  38095. // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
  38096. // 0201-1976 Roman, 0208-1978, 0208-1983.
  38097. // * ISO2022-JP-1: Adds esc seq for 0212-1990.
  38098. // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
  38099. // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
  38100. // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
  38101. //
  38102. // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes.
  38103. //
  38104. // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
  38105. 'shiftjis': {
  38106. type: '_dbcs',
  38107. table: function() { return __webpack_require__(7014) },
  38108. encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
  38109. encodeSkipVals: [{from: 0xED40, to: 0xF940}],
  38110. },
  38111. 'csshiftjis': 'shiftjis',
  38112. 'mskanji': 'shiftjis',
  38113. 'sjis': 'shiftjis',
  38114. 'windows31j': 'shiftjis',
  38115. 'ms31j': 'shiftjis',
  38116. 'xsjis': 'shiftjis',
  38117. 'windows932': 'shiftjis',
  38118. 'ms932': 'shiftjis',
  38119. '932': 'shiftjis',
  38120. 'cp932': 'shiftjis',
  38121. 'eucjp': {
  38122. type: '_dbcs',
  38123. table: function() { return __webpack_require__(5633) },
  38124. encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E},
  38125. },
  38126. // TODO: KDDI extension to Shift_JIS
  38127. // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
  38128. // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars.
  38129. // == Chinese/GBK ==========================================================
  38130. // http://en.wikipedia.org/wiki/GBK
  38131. // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
  38132. // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936
  38133. 'gb2312': 'cp936',
  38134. 'gb231280': 'cp936',
  38135. 'gb23121980': 'cp936',
  38136. 'csgb2312': 'cp936',
  38137. 'csiso58gb231280': 'cp936',
  38138. 'euccn': 'cp936',
  38139. // Microsoft's CP936 is a subset and approximation of GBK.
  38140. 'windows936': 'cp936',
  38141. 'ms936': 'cp936',
  38142. '936': 'cp936',
  38143. 'cp936': {
  38144. type: '_dbcs',
  38145. table: function() { return __webpack_require__(3336) },
  38146. },
  38147. // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
  38148. 'gbk': {
  38149. type: '_dbcs',
  38150. table: function() { return (__webpack_require__(3336).concat)(__webpack_require__(4346)) },
  38151. },
  38152. 'xgbk': 'gbk',
  38153. 'isoir58': 'gbk',
  38154. // GB18030 is an algorithmic extension of GBK.
  38155. // Main source: https://www.w3.org/TR/encoding/#gbk-encoder
  38156. // http://icu-project.org/docs/papers/gb18030.html
  38157. // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
  38158. // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0
  38159. 'gb18030': {
  38160. type: '_dbcs',
  38161. table: function() { return (__webpack_require__(3336).concat)(__webpack_require__(4346)) },
  38162. gb18030: function() { return __webpack_require__(6258) },
  38163. encodeSkipVals: [0x80],
  38164. encodeAdd: {'€': 0xA2E3},
  38165. },
  38166. 'chinese': 'gb18030',
  38167. // == Korean ===============================================================
  38168. // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
  38169. 'windows949': 'cp949',
  38170. 'ms949': 'cp949',
  38171. '949': 'cp949',
  38172. 'cp949': {
  38173. type: '_dbcs',
  38174. table: function() { return __webpack_require__(7348) },
  38175. },
  38176. 'cseuckr': 'cp949',
  38177. 'csksc56011987': 'cp949',
  38178. 'euckr': 'cp949',
  38179. 'isoir149': 'cp949',
  38180. 'korean': 'cp949',
  38181. 'ksc56011987': 'cp949',
  38182. 'ksc56011989': 'cp949',
  38183. 'ksc5601': 'cp949',
  38184. // == Big5/Taiwan/Hong Kong ================================================
  38185. // There are lots of tables for Big5 and cp950. Please see the following links for history:
  38186. // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
  38187. // Variations, in roughly number of defined chars:
  38188. // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT
  38189. // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/
  38190. // * Big5-2003 (Taiwan standard) almost superset of cp950.
  38191. // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers.
  38192. // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
  38193. // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years.
  38194. // Plus, it has 4 combining sequences.
  38195. // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299
  38196. // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
  38197. // Implementations are not consistent within browsers; sometimes labeled as just big5.
  38198. // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
  38199. // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31
  38200. // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
  38201. // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt
  38202. // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
  38203. //
  38204. // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder
  38205. // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong.
  38206. 'windows950': 'cp950',
  38207. 'ms950': 'cp950',
  38208. '950': 'cp950',
  38209. 'cp950': {
  38210. type: '_dbcs',
  38211. table: function() { return __webpack_require__(4284) },
  38212. },
  38213. // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
  38214. 'big5': 'big5hkscs',
  38215. 'big5hkscs': {
  38216. type: '_dbcs',
  38217. table: function() { return (__webpack_require__(4284).concat)(__webpack_require__(3480)) },
  38218. encodeSkipVals: [
  38219. // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of
  38220. // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU.
  38221. // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter.
  38222. 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe,
  38223. 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca,
  38224. 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62,
  38225. 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef,
  38226. 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed,
  38227. // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345
  38228. 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce,
  38229. ],
  38230. },
  38231. 'cnbig5': 'big5hkscs',
  38232. 'csbig5': 'big5hkscs',
  38233. 'xxbig5': 'big5hkscs',
  38234. };
  38235. /***/ }),
  38236. /***/ 6934:
  38237. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  38238. "use strict";
  38239. // Update this array if you add/rename/remove files in this directory.
  38240. // We support Browserify by skipping automatic module discovery and requiring modules directly.
  38241. var modules = [
  38242. __webpack_require__(1025),
  38243. __webpack_require__(7688),
  38244. __webpack_require__(1279),
  38245. __webpack_require__(758),
  38246. __webpack_require__(9068),
  38247. __webpack_require__(3769),
  38248. __webpack_require__(7018),
  38249. __webpack_require__(688),
  38250. __webpack_require__(5990),
  38251. ];
  38252. // Put all encoding/alias/codec definitions to single object and export it.
  38253. for (var i = 0; i < modules.length; i++) {
  38254. var module = modules[i];
  38255. for (var enc in module)
  38256. if (Object.prototype.hasOwnProperty.call(module, enc))
  38257. exports[enc] = module[enc];
  38258. }
  38259. /***/ }),
  38260. /***/ 1025:
  38261. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  38262. "use strict";
  38263. var Buffer = (__webpack_require__(7103).Buffer);
  38264. // Export Node.js internal encodings.
  38265. module.exports = {
  38266. // Encodings
  38267. utf8: { type: "_internal", bomAware: true},
  38268. cesu8: { type: "_internal", bomAware: true},
  38269. unicode11utf8: "utf8",
  38270. ucs2: { type: "_internal", bomAware: true},
  38271. utf16le: "ucs2",
  38272. binary: { type: "_internal" },
  38273. base64: { type: "_internal" },
  38274. hex: { type: "_internal" },
  38275. // Codec.
  38276. _internal: InternalCodec,
  38277. };
  38278. //------------------------------------------------------------------------------
  38279. function InternalCodec(codecOptions, iconv) {
  38280. this.enc = codecOptions.encodingName;
  38281. this.bomAware = codecOptions.bomAware;
  38282. if (this.enc === "base64")
  38283. this.encoder = InternalEncoderBase64;
  38284. else if (this.enc === "cesu8") {
  38285. this.enc = "utf8"; // Use utf8 for decoding.
  38286. this.encoder = InternalEncoderCesu8;
  38287. // Add decoder for versions of Node not supporting CESU-8
  38288. if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {
  38289. this.decoder = InternalDecoderCesu8;
  38290. this.defaultCharUnicode = iconv.defaultCharUnicode;
  38291. }
  38292. }
  38293. }
  38294. InternalCodec.prototype.encoder = InternalEncoder;
  38295. InternalCodec.prototype.decoder = InternalDecoder;
  38296. //------------------------------------------------------------------------------
  38297. // We use node.js internal decoder. Its signature is the same as ours.
  38298. var StringDecoder = (__webpack_require__(2553)/* .StringDecoder */ .s);
  38299. if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.
  38300. StringDecoder.prototype.end = function() {};
  38301. function InternalDecoder(options, codec) {
  38302. this.decoder = new StringDecoder(codec.enc);
  38303. }
  38304. InternalDecoder.prototype.write = function(buf) {
  38305. if (!Buffer.isBuffer(buf)) {
  38306. buf = Buffer.from(buf);
  38307. }
  38308. return this.decoder.write(buf);
  38309. }
  38310. InternalDecoder.prototype.end = function() {
  38311. return this.decoder.end();
  38312. }
  38313. //------------------------------------------------------------------------------
  38314. // Encoder is mostly trivial
  38315. function InternalEncoder(options, codec) {
  38316. this.enc = codec.enc;
  38317. }
  38318. InternalEncoder.prototype.write = function(str) {
  38319. return Buffer.from(str, this.enc);
  38320. }
  38321. InternalEncoder.prototype.end = function() {
  38322. }
  38323. //------------------------------------------------------------------------------
  38324. // Except base64 encoder, which must keep its state.
  38325. function InternalEncoderBase64(options, codec) {
  38326. this.prevStr = '';
  38327. }
  38328. InternalEncoderBase64.prototype.write = function(str) {
  38329. str = this.prevStr + str;
  38330. var completeQuads = str.length - (str.length % 4);
  38331. this.prevStr = str.slice(completeQuads);
  38332. str = str.slice(0, completeQuads);
  38333. return Buffer.from(str, "base64");
  38334. }
  38335. InternalEncoderBase64.prototype.end = function() {
  38336. return Buffer.from(this.prevStr, "base64");
  38337. }
  38338. //------------------------------------------------------------------------------
  38339. // CESU-8 encoder is also special.
  38340. function InternalEncoderCesu8(options, codec) {
  38341. }
  38342. InternalEncoderCesu8.prototype.write = function(str) {
  38343. var buf = Buffer.alloc(str.length * 3), bufIdx = 0;
  38344. for (var i = 0; i < str.length; i++) {
  38345. var charCode = str.charCodeAt(i);
  38346. // Naive implementation, but it works because CESU-8 is especially easy
  38347. // to convert from UTF-16 (which all JS strings are encoded in).
  38348. if (charCode < 0x80)
  38349. buf[bufIdx++] = charCode;
  38350. else if (charCode < 0x800) {
  38351. buf[bufIdx++] = 0xC0 + (charCode >>> 6);
  38352. buf[bufIdx++] = 0x80 + (charCode & 0x3f);
  38353. }
  38354. else { // charCode will always be < 0x10000 in javascript.
  38355. buf[bufIdx++] = 0xE0 + (charCode >>> 12);
  38356. buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);
  38357. buf[bufIdx++] = 0x80 + (charCode & 0x3f);
  38358. }
  38359. }
  38360. return buf.slice(0, bufIdx);
  38361. }
  38362. InternalEncoderCesu8.prototype.end = function() {
  38363. }
  38364. //------------------------------------------------------------------------------
  38365. // CESU-8 decoder is not implemented in Node v4.0+
  38366. function InternalDecoderCesu8(options, codec) {
  38367. this.acc = 0;
  38368. this.contBytes = 0;
  38369. this.accBytes = 0;
  38370. this.defaultCharUnicode = codec.defaultCharUnicode;
  38371. }
  38372. InternalDecoderCesu8.prototype.write = function(buf) {
  38373. var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes,
  38374. res = '';
  38375. for (var i = 0; i < buf.length; i++) {
  38376. var curByte = buf[i];
  38377. if ((curByte & 0xC0) !== 0x80) { // Leading byte
  38378. if (contBytes > 0) { // Previous code is invalid
  38379. res += this.defaultCharUnicode;
  38380. contBytes = 0;
  38381. }
  38382. if (curByte < 0x80) { // Single-byte code
  38383. res += String.fromCharCode(curByte);
  38384. } else if (curByte < 0xE0) { // Two-byte code
  38385. acc = curByte & 0x1F;
  38386. contBytes = 1; accBytes = 1;
  38387. } else if (curByte < 0xF0) { // Three-byte code
  38388. acc = curByte & 0x0F;
  38389. contBytes = 2; accBytes = 1;
  38390. } else { // Four or more are not supported for CESU-8.
  38391. res += this.defaultCharUnicode;
  38392. }
  38393. } else { // Continuation byte
  38394. if (contBytes > 0) { // We're waiting for it.
  38395. acc = (acc << 6) | (curByte & 0x3f);
  38396. contBytes--; accBytes++;
  38397. if (contBytes === 0) {
  38398. // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
  38399. if (accBytes === 2 && acc < 0x80 && acc > 0)
  38400. res += this.defaultCharUnicode;
  38401. else if (accBytes === 3 && acc < 0x800)
  38402. res += this.defaultCharUnicode;
  38403. else
  38404. // Actually add character.
  38405. res += String.fromCharCode(acc);
  38406. }
  38407. } else { // Unexpected continuation byte
  38408. res += this.defaultCharUnicode;
  38409. }
  38410. }
  38411. }
  38412. this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;
  38413. return res;
  38414. }
  38415. InternalDecoderCesu8.prototype.end = function() {
  38416. var res = 0;
  38417. if (this.contBytes > 0)
  38418. res += this.defaultCharUnicode;
  38419. return res;
  38420. }
  38421. /***/ }),
  38422. /***/ 9068:
  38423. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  38424. "use strict";
  38425. var Buffer = (__webpack_require__(7103).Buffer);
  38426. // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
  38427. // correspond to encoded bytes (if 128 - then lower half is ASCII).
  38428. exports._sbcs = SBCSCodec;
  38429. function SBCSCodec(codecOptions, iconv) {
  38430. if (!codecOptions)
  38431. throw new Error("SBCS codec is called without the data.")
  38432. // Prepare char buffer for decoding.
  38433. if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256))
  38434. throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)");
  38435. if (codecOptions.chars.length === 128) {
  38436. var asciiString = "";
  38437. for (var i = 0; i < 128; i++)
  38438. asciiString += String.fromCharCode(i);
  38439. codecOptions.chars = asciiString + codecOptions.chars;
  38440. }
  38441. this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2');
  38442. // Encoding buffer.
  38443. var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0));
  38444. for (var i = 0; i < codecOptions.chars.length; i++)
  38445. encodeBuf[codecOptions.chars.charCodeAt(i)] = i;
  38446. this.encodeBuf = encodeBuf;
  38447. }
  38448. SBCSCodec.prototype.encoder = SBCSEncoder;
  38449. SBCSCodec.prototype.decoder = SBCSDecoder;
  38450. function SBCSEncoder(options, codec) {
  38451. this.encodeBuf = codec.encodeBuf;
  38452. }
  38453. SBCSEncoder.prototype.write = function(str) {
  38454. var buf = Buffer.alloc(str.length);
  38455. for (var i = 0; i < str.length; i++)
  38456. buf[i] = this.encodeBuf[str.charCodeAt(i)];
  38457. return buf;
  38458. }
  38459. SBCSEncoder.prototype.end = function() {
  38460. }
  38461. function SBCSDecoder(options, codec) {
  38462. this.decodeBuf = codec.decodeBuf;
  38463. }
  38464. SBCSDecoder.prototype.write = function(buf) {
  38465. // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
  38466. var decodeBuf = this.decodeBuf;
  38467. var newBuf = Buffer.alloc(buf.length*2);
  38468. var idx1 = 0, idx2 = 0;
  38469. for (var i = 0; i < buf.length; i++) {
  38470. idx1 = buf[i]*2; idx2 = i*2;
  38471. newBuf[idx2] = decodeBuf[idx1];
  38472. newBuf[idx2+1] = decodeBuf[idx1+1];
  38473. }
  38474. return newBuf.toString('ucs2');
  38475. }
  38476. SBCSDecoder.prototype.end = function() {
  38477. }
  38478. /***/ }),
  38479. /***/ 7018:
  38480. /***/ (function(module) {
  38481. "use strict";
  38482. // Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script.
  38483. module.exports = {
  38484. "437": "cp437",
  38485. "737": "cp737",
  38486. "775": "cp775",
  38487. "850": "cp850",
  38488. "852": "cp852",
  38489. "855": "cp855",
  38490. "856": "cp856",
  38491. "857": "cp857",
  38492. "858": "cp858",
  38493. "860": "cp860",
  38494. "861": "cp861",
  38495. "862": "cp862",
  38496. "863": "cp863",
  38497. "864": "cp864",
  38498. "865": "cp865",
  38499. "866": "cp866",
  38500. "869": "cp869",
  38501. "874": "windows874",
  38502. "922": "cp922",
  38503. "1046": "cp1046",
  38504. "1124": "cp1124",
  38505. "1125": "cp1125",
  38506. "1129": "cp1129",
  38507. "1133": "cp1133",
  38508. "1161": "cp1161",
  38509. "1162": "cp1162",
  38510. "1163": "cp1163",
  38511. "1250": "windows1250",
  38512. "1251": "windows1251",
  38513. "1252": "windows1252",
  38514. "1253": "windows1253",
  38515. "1254": "windows1254",
  38516. "1255": "windows1255",
  38517. "1256": "windows1256",
  38518. "1257": "windows1257",
  38519. "1258": "windows1258",
  38520. "28591": "iso88591",
  38521. "28592": "iso88592",
  38522. "28593": "iso88593",
  38523. "28594": "iso88594",
  38524. "28595": "iso88595",
  38525. "28596": "iso88596",
  38526. "28597": "iso88597",
  38527. "28598": "iso88598",
  38528. "28599": "iso88599",
  38529. "28600": "iso885910",
  38530. "28601": "iso885911",
  38531. "28603": "iso885913",
  38532. "28604": "iso885914",
  38533. "28605": "iso885915",
  38534. "28606": "iso885916",
  38535. "windows874": {
  38536. "type": "_sbcs",
  38537. "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
  38538. },
  38539. "win874": "windows874",
  38540. "cp874": "windows874",
  38541. "windows1250": {
  38542. "type": "_sbcs",
  38543. "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
  38544. },
  38545. "win1250": "windows1250",
  38546. "cp1250": "windows1250",
  38547. "windows1251": {
  38548. "type": "_sbcs",
  38549. "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
  38550. },
  38551. "win1251": "windows1251",
  38552. "cp1251": "windows1251",
  38553. "windows1252": {
  38554. "type": "_sbcs",
  38555. "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  38556. },
  38557. "win1252": "windows1252",
  38558. "cp1252": "windows1252",
  38559. "windows1253": {
  38560. "type": "_sbcs",
  38561. "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
  38562. },
  38563. "win1253": "windows1253",
  38564. "cp1253": "windows1253",
  38565. "windows1254": {
  38566. "type": "_sbcs",
  38567. "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
  38568. },
  38569. "win1254": "windows1254",
  38570. "cp1254": "windows1254",
  38571. "windows1255": {
  38572. "type": "_sbcs",
  38573. "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�"
  38574. },
  38575. "win1255": "windows1255",
  38576. "cp1255": "windows1255",
  38577. "windows1256": {
  38578. "type": "_sbcs",
  38579. "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے"
  38580. },
  38581. "win1256": "windows1256",
  38582. "cp1256": "windows1256",
  38583. "windows1257": {
  38584. "type": "_sbcs",
  38585. "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙"
  38586. },
  38587. "win1257": "windows1257",
  38588. "cp1257": "windows1257",
  38589. "windows1258": {
  38590. "type": "_sbcs",
  38591. "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
  38592. },
  38593. "win1258": "windows1258",
  38594. "cp1258": "windows1258",
  38595. "iso88591": {
  38596. "type": "_sbcs",
  38597. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  38598. },
  38599. "cp28591": "iso88591",
  38600. "iso88592": {
  38601. "type": "_sbcs",
  38602. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙"
  38603. },
  38604. "cp28592": "iso88592",
  38605. "iso88593": {
  38606. "type": "_sbcs",
  38607. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙"
  38608. },
  38609. "cp28593": "iso88593",
  38610. "iso88594": {
  38611. "type": "_sbcs",
  38612. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙"
  38613. },
  38614. "cp28594": "iso88594",
  38615. "iso88595": {
  38616. "type": "_sbcs",
  38617. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ"
  38618. },
  38619. "cp28595": "iso88595",
  38620. "iso88596": {
  38621. "type": "_sbcs",
  38622. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������"
  38623. },
  38624. "cp28596": "iso88596",
  38625. "iso88597": {
  38626. "type": "_sbcs",
  38627. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�"
  38628. },
  38629. "cp28597": "iso88597",
  38630. "iso88598": {
  38631. "type": "_sbcs",
  38632. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�"
  38633. },
  38634. "cp28598": "iso88598",
  38635. "iso88599": {
  38636. "type": "_sbcs",
  38637. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ"
  38638. },
  38639. "cp28599": "iso88599",
  38640. "iso885910": {
  38641. "type": "_sbcs",
  38642. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ"
  38643. },
  38644. "cp28600": "iso885910",
  38645. "iso885911": {
  38646. "type": "_sbcs",
  38647. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
  38648. },
  38649. "cp28601": "iso885911",
  38650. "iso885913": {
  38651. "type": "_sbcs",
  38652. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’"
  38653. },
  38654. "cp28603": "iso885913",
  38655. "iso885914": {
  38656. "type": "_sbcs",
  38657. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ"
  38658. },
  38659. "cp28604": "iso885914",
  38660. "iso885915": {
  38661. "type": "_sbcs",
  38662. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  38663. },
  38664. "cp28605": "iso885915",
  38665. "iso885916": {
  38666. "type": "_sbcs",
  38667. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ"
  38668. },
  38669. "cp28606": "iso885916",
  38670. "cp437": {
  38671. "type": "_sbcs",
  38672. "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  38673. },
  38674. "ibm437": "cp437",
  38675. "csibm437": "cp437",
  38676. "cp737": {
  38677. "type": "_sbcs",
  38678. "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ "
  38679. },
  38680. "ibm737": "cp737",
  38681. "csibm737": "cp737",
  38682. "cp775": {
  38683. "type": "_sbcs",
  38684. "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ "
  38685. },
  38686. "ibm775": "cp775",
  38687. "csibm775": "cp775",
  38688. "cp850": {
  38689. "type": "_sbcs",
  38690. "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
  38691. },
  38692. "ibm850": "cp850",
  38693. "csibm850": "cp850",
  38694. "cp852": {
  38695. "type": "_sbcs",
  38696. "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ "
  38697. },
  38698. "ibm852": "cp852",
  38699. "csibm852": "cp852",
  38700. "cp855": {
  38701. "type": "_sbcs",
  38702. "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ "
  38703. },
  38704. "ibm855": "cp855",
  38705. "csibm855": "cp855",
  38706. "cp856": {
  38707. "type": "_sbcs",
  38708. "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ "
  38709. },
  38710. "ibm856": "cp856",
  38711. "csibm856": "cp856",
  38712. "cp857": {
  38713. "type": "_sbcs",
  38714. "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ "
  38715. },
  38716. "ibm857": "cp857",
  38717. "csibm857": "cp857",
  38718. "cp858": {
  38719. "type": "_sbcs",
  38720. "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ "
  38721. },
  38722. "ibm858": "cp858",
  38723. "csibm858": "cp858",
  38724. "cp860": {
  38725. "type": "_sbcs",
  38726. "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  38727. },
  38728. "ibm860": "cp860",
  38729. "csibm860": "cp860",
  38730. "cp861": {
  38731. "type": "_sbcs",
  38732. "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  38733. },
  38734. "ibm861": "cp861",
  38735. "csibm861": "cp861",
  38736. "cp862": {
  38737. "type": "_sbcs",
  38738. "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  38739. },
  38740. "ibm862": "cp862",
  38741. "csibm862": "cp862",
  38742. "cp863": {
  38743. "type": "_sbcs",
  38744. "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  38745. },
  38746. "ibm863": "cp863",
  38747. "csibm863": "cp863",
  38748. "cp864": {
  38749. "type": "_sbcs",
  38750. "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�"
  38751. },
  38752. "ibm864": "cp864",
  38753. "csibm864": "cp864",
  38754. "cp865": {
  38755. "type": "_sbcs",
  38756. "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  38757. },
  38758. "ibm865": "cp865",
  38759. "csibm865": "cp865",
  38760. "cp866": {
  38761. "type": "_sbcs",
  38762. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ "
  38763. },
  38764. "ibm866": "cp866",
  38765. "csibm866": "cp866",
  38766. "cp869": {
  38767. "type": "_sbcs",
  38768. "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ "
  38769. },
  38770. "ibm869": "cp869",
  38771. "csibm869": "cp869",
  38772. "cp922": {
  38773. "type": "_sbcs",
  38774. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ"
  38775. },
  38776. "ibm922": "cp922",
  38777. "csibm922": "cp922",
  38778. "cp1046": {
  38779. "type": "_sbcs",
  38780. "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�"
  38781. },
  38782. "ibm1046": "cp1046",
  38783. "csibm1046": "cp1046",
  38784. "cp1124": {
  38785. "type": "_sbcs",
  38786. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ"
  38787. },
  38788. "ibm1124": "cp1124",
  38789. "csibm1124": "cp1124",
  38790. "cp1125": {
  38791. "type": "_sbcs",
  38792. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ "
  38793. },
  38794. "ibm1125": "cp1125",
  38795. "csibm1125": "cp1125",
  38796. "cp1129": {
  38797. "type": "_sbcs",
  38798. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
  38799. },
  38800. "ibm1129": "cp1129",
  38801. "csibm1129": "cp1129",
  38802. "cp1133": {
  38803. "type": "_sbcs",
  38804. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�"
  38805. },
  38806. "ibm1133": "cp1133",
  38807. "csibm1133": "cp1133",
  38808. "cp1161": {
  38809. "type": "_sbcs",
  38810. "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ "
  38811. },
  38812. "ibm1161": "cp1161",
  38813. "csibm1161": "cp1161",
  38814. "cp1162": {
  38815. "type": "_sbcs",
  38816. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
  38817. },
  38818. "ibm1162": "cp1162",
  38819. "csibm1162": "cp1162",
  38820. "cp1163": {
  38821. "type": "_sbcs",
  38822. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ"
  38823. },
  38824. "ibm1163": "cp1163",
  38825. "csibm1163": "cp1163",
  38826. "maccroatian": {
  38827. "type": "_sbcs",
  38828. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ"
  38829. },
  38830. "maccyrillic": {
  38831. "type": "_sbcs",
  38832. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
  38833. },
  38834. "macgreek": {
  38835. "type": "_sbcs",
  38836. "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�"
  38837. },
  38838. "maciceland": {
  38839. "type": "_sbcs",
  38840. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
  38841. },
  38842. "macroman": {
  38843. "type": "_sbcs",
  38844. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
  38845. },
  38846. "macromania": {
  38847. "type": "_sbcs",
  38848. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
  38849. },
  38850. "macthai": {
  38851. "type": "_sbcs",
  38852. "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����"
  38853. },
  38854. "macturkish": {
  38855. "type": "_sbcs",
  38856. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ"
  38857. },
  38858. "macukraine": {
  38859. "type": "_sbcs",
  38860. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤"
  38861. },
  38862. "koi8r": {
  38863. "type": "_sbcs",
  38864. "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
  38865. },
  38866. "koi8u": {
  38867. "type": "_sbcs",
  38868. "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
  38869. },
  38870. "koi8ru": {
  38871. "type": "_sbcs",
  38872. "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
  38873. },
  38874. "koi8t": {
  38875. "type": "_sbcs",
  38876. "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ"
  38877. },
  38878. "armscii8": {
  38879. "type": "_sbcs",
  38880. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�"
  38881. },
  38882. "rk1048": {
  38883. "type": "_sbcs",
  38884. "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
  38885. },
  38886. "tcvn": {
  38887. "type": "_sbcs",
  38888. "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ"
  38889. },
  38890. "georgianacademy": {
  38891. "type": "_sbcs",
  38892. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  38893. },
  38894. "georgianps": {
  38895. "type": "_sbcs",
  38896. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ"
  38897. },
  38898. "pt154": {
  38899. "type": "_sbcs",
  38900. "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя"
  38901. },
  38902. "viscii": {
  38903. "type": "_sbcs",
  38904. "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ"
  38905. },
  38906. "iso646cn": {
  38907. "type": "_sbcs",
  38908. "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
  38909. },
  38910. "iso646jp": {
  38911. "type": "_sbcs",
  38912. "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������"
  38913. },
  38914. "hproman8": {
  38915. "type": "_sbcs",
  38916. "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�"
  38917. },
  38918. "macintosh": {
  38919. "type": "_sbcs",
  38920. "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ"
  38921. },
  38922. "ascii": {
  38923. "type": "_sbcs",
  38924. "chars": "��������������������������������������������������������������������������������������������������������������������������������"
  38925. },
  38926. "tis620": {
  38927. "type": "_sbcs",
  38928. "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����"
  38929. }
  38930. }
  38931. /***/ }),
  38932. /***/ 3769:
  38933. /***/ (function(module) {
  38934. "use strict";
  38935. // Manually added data to be used by sbcs codec in addition to generated one.
  38936. module.exports = {
  38937. // Not supported by iconv, not sure why.
  38938. "10029": "maccenteuro",
  38939. "maccenteuro": {
  38940. "type": "_sbcs",
  38941. "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ"
  38942. },
  38943. "808": "cp808",
  38944. "ibm808": "cp808",
  38945. "cp808": {
  38946. "type": "_sbcs",
  38947. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ "
  38948. },
  38949. "mik": {
  38950. "type": "_sbcs",
  38951. "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ "
  38952. },
  38953. "cp720": {
  38954. "type": "_sbcs",
  38955. "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0"
  38956. },
  38957. // Aliases of generated encodings.
  38958. "ascii8bit": "ascii",
  38959. "usascii": "ascii",
  38960. "ansix34": "ascii",
  38961. "ansix341968": "ascii",
  38962. "ansix341986": "ascii",
  38963. "csascii": "ascii",
  38964. "cp367": "ascii",
  38965. "ibm367": "ascii",
  38966. "isoir6": "ascii",
  38967. "iso646us": "ascii",
  38968. "iso646irv": "ascii",
  38969. "us": "ascii",
  38970. "latin1": "iso88591",
  38971. "latin2": "iso88592",
  38972. "latin3": "iso88593",
  38973. "latin4": "iso88594",
  38974. "latin5": "iso88599",
  38975. "latin6": "iso885910",
  38976. "latin7": "iso885913",
  38977. "latin8": "iso885914",
  38978. "latin9": "iso885915",
  38979. "latin10": "iso885916",
  38980. "csisolatin1": "iso88591",
  38981. "csisolatin2": "iso88592",
  38982. "csisolatin3": "iso88593",
  38983. "csisolatin4": "iso88594",
  38984. "csisolatincyrillic": "iso88595",
  38985. "csisolatinarabic": "iso88596",
  38986. "csisolatingreek" : "iso88597",
  38987. "csisolatinhebrew": "iso88598",
  38988. "csisolatin5": "iso88599",
  38989. "csisolatin6": "iso885910",
  38990. "l1": "iso88591",
  38991. "l2": "iso88592",
  38992. "l3": "iso88593",
  38993. "l4": "iso88594",
  38994. "l5": "iso88599",
  38995. "l6": "iso885910",
  38996. "l7": "iso885913",
  38997. "l8": "iso885914",
  38998. "l9": "iso885915",
  38999. "l10": "iso885916",
  39000. "isoir14": "iso646jp",
  39001. "isoir57": "iso646cn",
  39002. "isoir100": "iso88591",
  39003. "isoir101": "iso88592",
  39004. "isoir109": "iso88593",
  39005. "isoir110": "iso88594",
  39006. "isoir144": "iso88595",
  39007. "isoir127": "iso88596",
  39008. "isoir126": "iso88597",
  39009. "isoir138": "iso88598",
  39010. "isoir148": "iso88599",
  39011. "isoir157": "iso885910",
  39012. "isoir166": "tis620",
  39013. "isoir179": "iso885913",
  39014. "isoir199": "iso885914",
  39015. "isoir203": "iso885915",
  39016. "isoir226": "iso885916",
  39017. "cp819": "iso88591",
  39018. "ibm819": "iso88591",
  39019. "cyrillic": "iso88595",
  39020. "arabic": "iso88596",
  39021. "arabic8": "iso88596",
  39022. "ecma114": "iso88596",
  39023. "asmo708": "iso88596",
  39024. "greek" : "iso88597",
  39025. "greek8" : "iso88597",
  39026. "ecma118" : "iso88597",
  39027. "elot928" : "iso88597",
  39028. "hebrew": "iso88598",
  39029. "hebrew8": "iso88598",
  39030. "turkish": "iso88599",
  39031. "turkish8": "iso88599",
  39032. "thai": "iso885911",
  39033. "thai8": "iso885911",
  39034. "celtic": "iso885914",
  39035. "celtic8": "iso885914",
  39036. "isoceltic": "iso885914",
  39037. "tis6200": "tis620",
  39038. "tis62025291": "tis620",
  39039. "tis62025330": "tis620",
  39040. "10000": "macroman",
  39041. "10006": "macgreek",
  39042. "10007": "maccyrillic",
  39043. "10079": "maciceland",
  39044. "10081": "macturkish",
  39045. "cspc8codepage437": "cp437",
  39046. "cspc775baltic": "cp775",
  39047. "cspc850multilingual": "cp850",
  39048. "cspcp852": "cp852",
  39049. "cspc862latinhebrew": "cp862",
  39050. "cpgr": "cp869",
  39051. "msee": "cp1250",
  39052. "mscyrl": "cp1251",
  39053. "msansi": "cp1252",
  39054. "msgreek": "cp1253",
  39055. "msturk": "cp1254",
  39056. "mshebr": "cp1255",
  39057. "msarab": "cp1256",
  39058. "winbaltrim": "cp1257",
  39059. "cp20866": "koi8r",
  39060. "20866": "koi8r",
  39061. "ibm878": "koi8r",
  39062. "cskoi8r": "koi8r",
  39063. "cp21866": "koi8u",
  39064. "21866": "koi8u",
  39065. "ibm1168": "koi8u",
  39066. "strk10482002": "rk1048",
  39067. "tcvn5712": "tcvn",
  39068. "tcvn57121": "tcvn",
  39069. "gb198880": "iso646cn",
  39070. "cn": "iso646cn",
  39071. "csiso14jisc6220ro": "iso646jp",
  39072. "jisc62201969ro": "iso646jp",
  39073. "jp": "iso646jp",
  39074. "cshproman8": "hproman8",
  39075. "r8": "hproman8",
  39076. "roman8": "hproman8",
  39077. "xroman8": "hproman8",
  39078. "ibm1051": "hproman8",
  39079. "mac": "macintosh",
  39080. "csmacintosh": "macintosh",
  39081. };
  39082. /***/ }),
  39083. /***/ 1279:
  39084. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  39085. "use strict";
  39086. var Buffer = (__webpack_require__(7103).Buffer);
  39087. // Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js
  39088. // == UTF16-BE codec. ==========================================================
  39089. exports.utf16be = Utf16BECodec;
  39090. function Utf16BECodec() {
  39091. }
  39092. Utf16BECodec.prototype.encoder = Utf16BEEncoder;
  39093. Utf16BECodec.prototype.decoder = Utf16BEDecoder;
  39094. Utf16BECodec.prototype.bomAware = true;
  39095. // -- Encoding
  39096. function Utf16BEEncoder() {
  39097. }
  39098. Utf16BEEncoder.prototype.write = function(str) {
  39099. var buf = Buffer.from(str, 'ucs2');
  39100. for (var i = 0; i < buf.length; i += 2) {
  39101. var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp;
  39102. }
  39103. return buf;
  39104. }
  39105. Utf16BEEncoder.prototype.end = function() {
  39106. }
  39107. // -- Decoding
  39108. function Utf16BEDecoder() {
  39109. this.overflowByte = -1;
  39110. }
  39111. Utf16BEDecoder.prototype.write = function(buf) {
  39112. if (buf.length == 0)
  39113. return '';
  39114. var buf2 = Buffer.alloc(buf.length + 1),
  39115. i = 0, j = 0;
  39116. if (this.overflowByte !== -1) {
  39117. buf2[0] = buf[0];
  39118. buf2[1] = this.overflowByte;
  39119. i = 1; j = 2;
  39120. }
  39121. for (; i < buf.length-1; i += 2, j+= 2) {
  39122. buf2[j] = buf[i+1];
  39123. buf2[j+1] = buf[i];
  39124. }
  39125. this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;
  39126. return buf2.slice(0, j).toString('ucs2');
  39127. }
  39128. Utf16BEDecoder.prototype.end = function() {
  39129. this.overflowByte = -1;
  39130. }
  39131. // == UTF-16 codec =============================================================
  39132. // Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
  39133. // Defaults to UTF-16LE, as it's prevalent and default in Node.
  39134. // http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
  39135. // Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});
  39136. // Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).
  39137. exports.utf16 = Utf16Codec;
  39138. function Utf16Codec(codecOptions, iconv) {
  39139. this.iconv = iconv;
  39140. }
  39141. Utf16Codec.prototype.encoder = Utf16Encoder;
  39142. Utf16Codec.prototype.decoder = Utf16Decoder;
  39143. // -- Encoding (pass-through)
  39144. function Utf16Encoder(options, codec) {
  39145. options = options || {};
  39146. if (options.addBOM === undefined)
  39147. options.addBOM = true;
  39148. this.encoder = codec.iconv.getEncoder('utf-16le', options);
  39149. }
  39150. Utf16Encoder.prototype.write = function(str) {
  39151. return this.encoder.write(str);
  39152. }
  39153. Utf16Encoder.prototype.end = function() {
  39154. return this.encoder.end();
  39155. }
  39156. // -- Decoding
  39157. function Utf16Decoder(options, codec) {
  39158. this.decoder = null;
  39159. this.initialBufs = [];
  39160. this.initialBufsLen = 0;
  39161. this.options = options || {};
  39162. this.iconv = codec.iconv;
  39163. }
  39164. Utf16Decoder.prototype.write = function(buf) {
  39165. if (!this.decoder) {
  39166. // Codec is not chosen yet. Accumulate initial bytes.
  39167. this.initialBufs.push(buf);
  39168. this.initialBufsLen += buf.length;
  39169. if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below)
  39170. return '';
  39171. // We have enough bytes -> detect endianness.
  39172. var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
  39173. this.decoder = this.iconv.getDecoder(encoding, this.options);
  39174. var resStr = '';
  39175. for (var i = 0; i < this.initialBufs.length; i++)
  39176. resStr += this.decoder.write(this.initialBufs[i]);
  39177. this.initialBufs.length = this.initialBufsLen = 0;
  39178. return resStr;
  39179. }
  39180. return this.decoder.write(buf);
  39181. }
  39182. Utf16Decoder.prototype.end = function() {
  39183. if (!this.decoder) {
  39184. var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
  39185. this.decoder = this.iconv.getDecoder(encoding, this.options);
  39186. var resStr = '';
  39187. for (var i = 0; i < this.initialBufs.length; i++)
  39188. resStr += this.decoder.write(this.initialBufs[i]);
  39189. var trail = this.decoder.end();
  39190. if (trail)
  39191. resStr += trail;
  39192. this.initialBufs.length = this.initialBufsLen = 0;
  39193. return resStr;
  39194. }
  39195. return this.decoder.end();
  39196. }
  39197. function detectEncoding(bufs, defaultEncoding) {
  39198. var b = [];
  39199. var charsProcessed = 0;
  39200. var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE.
  39201. outer_loop:
  39202. for (var i = 0; i < bufs.length; i++) {
  39203. var buf = bufs[i];
  39204. for (var j = 0; j < buf.length; j++) {
  39205. b.push(buf[j]);
  39206. if (b.length === 2) {
  39207. if (charsProcessed === 0) {
  39208. // Check BOM first.
  39209. if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le';
  39210. if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be';
  39211. }
  39212. if (b[0] === 0 && b[1] !== 0) asciiCharsBE++;
  39213. if (b[0] !== 0 && b[1] === 0) asciiCharsLE++;
  39214. b.length = 0;
  39215. charsProcessed++;
  39216. if (charsProcessed >= 100) {
  39217. break outer_loop;
  39218. }
  39219. }
  39220. }
  39221. }
  39222. // Make decisions.
  39223. // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon.
  39224. // So, we count ASCII as if it was LE or BE, and decide from that.
  39225. if (asciiCharsBE > asciiCharsLE) return 'utf-16be';
  39226. if (asciiCharsBE < asciiCharsLE) return 'utf-16le';
  39227. // Couldn't decide (likely all zeros or not enough data).
  39228. return defaultEncoding || 'utf-16le';
  39229. }
  39230. /***/ }),
  39231. /***/ 7688:
  39232. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  39233. "use strict";
  39234. var Buffer = (__webpack_require__(7103).Buffer);
  39235. // == UTF32-LE/BE codec. ==========================================================
  39236. exports._utf32 = Utf32Codec;
  39237. function Utf32Codec(codecOptions, iconv) {
  39238. this.iconv = iconv;
  39239. this.bomAware = true;
  39240. this.isLE = codecOptions.isLE;
  39241. }
  39242. exports.utf32le = { type: '_utf32', isLE: true };
  39243. exports.utf32be = { type: '_utf32', isLE: false };
  39244. // Aliases
  39245. exports.ucs4le = 'utf32le';
  39246. exports.ucs4be = 'utf32be';
  39247. Utf32Codec.prototype.encoder = Utf32Encoder;
  39248. Utf32Codec.prototype.decoder = Utf32Decoder;
  39249. // -- Encoding
  39250. function Utf32Encoder(options, codec) {
  39251. this.isLE = codec.isLE;
  39252. this.highSurrogate = 0;
  39253. }
  39254. Utf32Encoder.prototype.write = function(str) {
  39255. var src = Buffer.from(str, 'ucs2');
  39256. var dst = Buffer.alloc(src.length * 2);
  39257. var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE;
  39258. var offset = 0;
  39259. for (var i = 0; i < src.length; i += 2) {
  39260. var code = src.readUInt16LE(i);
  39261. var isHighSurrogate = (0xD800 <= code && code < 0xDC00);
  39262. var isLowSurrogate = (0xDC00 <= code && code < 0xE000);
  39263. if (this.highSurrogate) {
  39264. if (isHighSurrogate || !isLowSurrogate) {
  39265. // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low
  39266. // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character
  39267. // (technically wrong, but expected by some applications, like Windows file names).
  39268. write32.call(dst, this.highSurrogate, offset);
  39269. offset += 4;
  39270. }
  39271. else {
  39272. // Create 32-bit value from high and low surrogates;
  39273. var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000;
  39274. write32.call(dst, codepoint, offset);
  39275. offset += 4;
  39276. this.highSurrogate = 0;
  39277. continue;
  39278. }
  39279. }
  39280. if (isHighSurrogate)
  39281. this.highSurrogate = code;
  39282. else {
  39283. // Even if the current character is a low surrogate, with no previous high surrogate, we'll
  39284. // encode it as a semi-invalid stand-alone character for the same reasons expressed above for
  39285. // unpaired high surrogates.
  39286. write32.call(dst, code, offset);
  39287. offset += 4;
  39288. this.highSurrogate = 0;
  39289. }
  39290. }
  39291. if (offset < dst.length)
  39292. dst = dst.slice(0, offset);
  39293. return dst;
  39294. };
  39295. Utf32Encoder.prototype.end = function() {
  39296. // Treat any leftover high surrogate as a semi-valid independent character.
  39297. if (!this.highSurrogate)
  39298. return;
  39299. var buf = Buffer.alloc(4);
  39300. if (this.isLE)
  39301. buf.writeUInt32LE(this.highSurrogate, 0);
  39302. else
  39303. buf.writeUInt32BE(this.highSurrogate, 0);
  39304. this.highSurrogate = 0;
  39305. return buf;
  39306. };
  39307. // -- Decoding
  39308. function Utf32Decoder(options, codec) {
  39309. this.isLE = codec.isLE;
  39310. this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0);
  39311. this.overflow = [];
  39312. }
  39313. Utf32Decoder.prototype.write = function(src) {
  39314. if (src.length === 0)
  39315. return '';
  39316. var i = 0;
  39317. var codepoint = 0;
  39318. var dst = Buffer.alloc(src.length + 4);
  39319. var offset = 0;
  39320. var isLE = this.isLE;
  39321. var overflow = this.overflow;
  39322. var badChar = this.badChar;
  39323. if (overflow.length > 0) {
  39324. for (; i < src.length && overflow.length < 4; i++)
  39325. overflow.push(src[i]);
  39326. if (overflow.length === 4) {
  39327. // NOTE: codepoint is a signed int32 and can be negative.
  39328. // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer).
  39329. if (isLE) {
  39330. codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24);
  39331. } else {
  39332. codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24);
  39333. }
  39334. overflow.length = 0;
  39335. offset = _writeCodepoint(dst, offset, codepoint, badChar);
  39336. }
  39337. }
  39338. // Main loop. Should be as optimized as possible.
  39339. for (; i < src.length - 3; i += 4) {
  39340. // NOTE: codepoint is a signed int32 and can be negative.
  39341. if (isLE) {
  39342. codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24);
  39343. } else {
  39344. codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24);
  39345. }
  39346. offset = _writeCodepoint(dst, offset, codepoint, badChar);
  39347. }
  39348. // Keep overflowing bytes.
  39349. for (; i < src.length; i++) {
  39350. overflow.push(src[i]);
  39351. }
  39352. return dst.slice(0, offset).toString('ucs2');
  39353. };
  39354. function _writeCodepoint(dst, offset, codepoint, badChar) {
  39355. // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations.
  39356. if (codepoint < 0 || codepoint > 0x10FFFF) {
  39357. // Not a valid Unicode codepoint
  39358. codepoint = badChar;
  39359. }
  39360. // Ephemeral Planes: Write high surrogate.
  39361. if (codepoint >= 0x10000) {
  39362. codepoint -= 0x10000;
  39363. var high = 0xD800 | (codepoint >> 10);
  39364. dst[offset++] = high & 0xff;
  39365. dst[offset++] = high >> 8;
  39366. // Low surrogate is written below.
  39367. var codepoint = 0xDC00 | (codepoint & 0x3FF);
  39368. }
  39369. // Write BMP char or low surrogate.
  39370. dst[offset++] = codepoint & 0xff;
  39371. dst[offset++] = codepoint >> 8;
  39372. return offset;
  39373. };
  39374. Utf32Decoder.prototype.end = function() {
  39375. this.overflow.length = 0;
  39376. };
  39377. // == UTF-32 Auto codec =============================================================
  39378. // Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic.
  39379. // Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32
  39380. // Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'});
  39381. // Encoder prepends BOM (which can be overridden with (addBOM: false}).
  39382. exports.utf32 = Utf32AutoCodec;
  39383. exports.ucs4 = 'utf32';
  39384. function Utf32AutoCodec(options, iconv) {
  39385. this.iconv = iconv;
  39386. }
  39387. Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder;
  39388. Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder;
  39389. // -- Encoding
  39390. function Utf32AutoEncoder(options, codec) {
  39391. options = options || {};
  39392. if (options.addBOM === undefined)
  39393. options.addBOM = true;
  39394. this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options);
  39395. }
  39396. Utf32AutoEncoder.prototype.write = function(str) {
  39397. return this.encoder.write(str);
  39398. };
  39399. Utf32AutoEncoder.prototype.end = function() {
  39400. return this.encoder.end();
  39401. };
  39402. // -- Decoding
  39403. function Utf32AutoDecoder(options, codec) {
  39404. this.decoder = null;
  39405. this.initialBufs = [];
  39406. this.initialBufsLen = 0;
  39407. this.options = options || {};
  39408. this.iconv = codec.iconv;
  39409. }
  39410. Utf32AutoDecoder.prototype.write = function(buf) {
  39411. if (!this.decoder) {
  39412. // Codec is not chosen yet. Accumulate initial bytes.
  39413. this.initialBufs.push(buf);
  39414. this.initialBufsLen += buf.length;
  39415. if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below)
  39416. return '';
  39417. // We have enough bytes -> detect endianness.
  39418. var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
  39419. this.decoder = this.iconv.getDecoder(encoding, this.options);
  39420. var resStr = '';
  39421. for (var i = 0; i < this.initialBufs.length; i++)
  39422. resStr += this.decoder.write(this.initialBufs[i]);
  39423. this.initialBufs.length = this.initialBufsLen = 0;
  39424. return resStr;
  39425. }
  39426. return this.decoder.write(buf);
  39427. };
  39428. Utf32AutoDecoder.prototype.end = function() {
  39429. if (!this.decoder) {
  39430. var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding);
  39431. this.decoder = this.iconv.getDecoder(encoding, this.options);
  39432. var resStr = '';
  39433. for (var i = 0; i < this.initialBufs.length; i++)
  39434. resStr += this.decoder.write(this.initialBufs[i]);
  39435. var trail = this.decoder.end();
  39436. if (trail)
  39437. resStr += trail;
  39438. this.initialBufs.length = this.initialBufsLen = 0;
  39439. return resStr;
  39440. }
  39441. return this.decoder.end();
  39442. };
  39443. function detectEncoding(bufs, defaultEncoding) {
  39444. var b = [];
  39445. var charsProcessed = 0;
  39446. var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE.
  39447. var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE.
  39448. outer_loop:
  39449. for (var i = 0; i < bufs.length; i++) {
  39450. var buf = bufs[i];
  39451. for (var j = 0; j < buf.length; j++) {
  39452. b.push(buf[j]);
  39453. if (b.length === 4) {
  39454. if (charsProcessed === 0) {
  39455. // Check BOM first.
  39456. if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) {
  39457. return 'utf-32le';
  39458. }
  39459. if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) {
  39460. return 'utf-32be';
  39461. }
  39462. }
  39463. if (b[0] !== 0 || b[1] > 0x10) invalidBE++;
  39464. if (b[3] !== 0 || b[2] > 0x10) invalidLE++;
  39465. if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++;
  39466. if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++;
  39467. b.length = 0;
  39468. charsProcessed++;
  39469. if (charsProcessed >= 100) {
  39470. break outer_loop;
  39471. }
  39472. }
  39473. }
  39474. }
  39475. // Make decisions.
  39476. if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be';
  39477. if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le';
  39478. // Couldn't decide (likely all zeros or not enough data).
  39479. return defaultEncoding || 'utf-32le';
  39480. }
  39481. /***/ }),
  39482. /***/ 758:
  39483. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  39484. "use strict";
  39485. var Buffer = (__webpack_require__(7103).Buffer);
  39486. // UTF-7 codec, according to https://tools.ietf.org/html/rfc2152
  39487. // See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3
  39488. exports.utf7 = Utf7Codec;
  39489. exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7
  39490. function Utf7Codec(codecOptions, iconv) {
  39491. this.iconv = iconv;
  39492. };
  39493. Utf7Codec.prototype.encoder = Utf7Encoder;
  39494. Utf7Codec.prototype.decoder = Utf7Decoder;
  39495. Utf7Codec.prototype.bomAware = true;
  39496. // -- Encoding
  39497. var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
  39498. function Utf7Encoder(options, codec) {
  39499. this.iconv = codec.iconv;
  39500. }
  39501. Utf7Encoder.prototype.write = function(str) {
  39502. // Naive implementation.
  39503. // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
  39504. return Buffer.from(str.replace(nonDirectChars, function(chunk) {
  39505. return "+" + (chunk === '+' ? '' :
  39506. this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
  39507. + "-";
  39508. }.bind(this)));
  39509. }
  39510. Utf7Encoder.prototype.end = function() {
  39511. }
  39512. // -- Decoding
  39513. function Utf7Decoder(options, codec) {
  39514. this.iconv = codec.iconv;
  39515. this.inBase64 = false;
  39516. this.base64Accum = '';
  39517. }
  39518. var base64Regex = /[A-Za-z0-9\/+]/;
  39519. var base64Chars = [];
  39520. for (var i = 0; i < 256; i++)
  39521. base64Chars[i] = base64Regex.test(String.fromCharCode(i));
  39522. var plusChar = '+'.charCodeAt(0),
  39523. minusChar = '-'.charCodeAt(0),
  39524. andChar = '&'.charCodeAt(0);
  39525. Utf7Decoder.prototype.write = function(buf) {
  39526. var res = "", lastI = 0,
  39527. inBase64 = this.inBase64,
  39528. base64Accum = this.base64Accum;
  39529. // The decoder is more involved as we must handle chunks in stream.
  39530. for (var i = 0; i < buf.length; i++) {
  39531. if (!inBase64) { // We're in direct mode.
  39532. // Write direct chars until '+'
  39533. if (buf[i] == plusChar) {
  39534. res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
  39535. lastI = i+1;
  39536. inBase64 = true;
  39537. }
  39538. } else { // We decode base64.
  39539. if (!base64Chars[buf[i]]) { // Base64 ended.
  39540. if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
  39541. res += "+";
  39542. } else {
  39543. var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii");
  39544. res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
  39545. }
  39546. if (buf[i] != minusChar) // Minus is absorbed after base64.
  39547. i--;
  39548. lastI = i+1;
  39549. inBase64 = false;
  39550. base64Accum = '';
  39551. }
  39552. }
  39553. }
  39554. if (!inBase64) {
  39555. res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
  39556. } else {
  39557. var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii");
  39558. var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
  39559. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
  39560. b64str = b64str.slice(0, canBeDecoded);
  39561. res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
  39562. }
  39563. this.inBase64 = inBase64;
  39564. this.base64Accum = base64Accum;
  39565. return res;
  39566. }
  39567. Utf7Decoder.prototype.end = function() {
  39568. var res = "";
  39569. if (this.inBase64 && this.base64Accum.length > 0)
  39570. res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be");
  39571. this.inBase64 = false;
  39572. this.base64Accum = '';
  39573. return res;
  39574. }
  39575. // UTF-7-IMAP codec.
  39576. // RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)
  39577. // Differences:
  39578. // * Base64 part is started by "&" instead of "+"
  39579. // * Direct characters are 0x20-0x7E, except "&" (0x26)
  39580. // * In Base64, "," is used instead of "/"
  39581. // * Base64 must not be used to represent direct characters.
  39582. // * No implicit shift back from Base64 (should always end with '-')
  39583. // * String must end in non-shifted position.
  39584. // * "-&" while in base64 is not allowed.
  39585. exports.utf7imap = Utf7IMAPCodec;
  39586. function Utf7IMAPCodec(codecOptions, iconv) {
  39587. this.iconv = iconv;
  39588. };
  39589. Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder;
  39590. Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder;
  39591. Utf7IMAPCodec.prototype.bomAware = true;
  39592. // -- Encoding
  39593. function Utf7IMAPEncoder(options, codec) {
  39594. this.iconv = codec.iconv;
  39595. this.inBase64 = false;
  39596. this.base64Accum = Buffer.alloc(6);
  39597. this.base64AccumIdx = 0;
  39598. }
  39599. Utf7IMAPEncoder.prototype.write = function(str) {
  39600. var inBase64 = this.inBase64,
  39601. base64Accum = this.base64Accum,
  39602. base64AccumIdx = this.base64AccumIdx,
  39603. buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0;
  39604. for (var i = 0; i < str.length; i++) {
  39605. var uChar = str.charCodeAt(i);
  39606. if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'.
  39607. if (inBase64) {
  39608. if (base64AccumIdx > 0) {
  39609. bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
  39610. base64AccumIdx = 0;
  39611. }
  39612. buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
  39613. inBase64 = false;
  39614. }
  39615. if (!inBase64) {
  39616. buf[bufIdx++] = uChar; // Write direct character
  39617. if (uChar === andChar) // Ampersand -> '&-'
  39618. buf[bufIdx++] = minusChar;
  39619. }
  39620. } else { // Non-direct character
  39621. if (!inBase64) {
  39622. buf[bufIdx++] = andChar; // Write '&', then go to base64 mode.
  39623. inBase64 = true;
  39624. }
  39625. if (inBase64) {
  39626. base64Accum[base64AccumIdx++] = uChar >> 8;
  39627. base64Accum[base64AccumIdx++] = uChar & 0xFF;
  39628. if (base64AccumIdx == base64Accum.length) {
  39629. bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx);
  39630. base64AccumIdx = 0;
  39631. }
  39632. }
  39633. }
  39634. }
  39635. this.inBase64 = inBase64;
  39636. this.base64AccumIdx = base64AccumIdx;
  39637. return buf.slice(0, bufIdx);
  39638. }
  39639. Utf7IMAPEncoder.prototype.end = function() {
  39640. var buf = Buffer.alloc(10), bufIdx = 0;
  39641. if (this.inBase64) {
  39642. if (this.base64AccumIdx > 0) {
  39643. bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx);
  39644. this.base64AccumIdx = 0;
  39645. }
  39646. buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
  39647. this.inBase64 = false;
  39648. }
  39649. return buf.slice(0, bufIdx);
  39650. }
  39651. // -- Decoding
  39652. function Utf7IMAPDecoder(options, codec) {
  39653. this.iconv = codec.iconv;
  39654. this.inBase64 = false;
  39655. this.base64Accum = '';
  39656. }
  39657. var base64IMAPChars = base64Chars.slice();
  39658. base64IMAPChars[','.charCodeAt(0)] = true;
  39659. Utf7IMAPDecoder.prototype.write = function(buf) {
  39660. var res = "", lastI = 0,
  39661. inBase64 = this.inBase64,
  39662. base64Accum = this.base64Accum;
  39663. // The decoder is more involved as we must handle chunks in stream.
  39664. // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).
  39665. for (var i = 0; i < buf.length; i++) {
  39666. if (!inBase64) { // We're in direct mode.
  39667. // Write direct chars until '&'
  39668. if (buf[i] == andChar) {
  39669. res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars.
  39670. lastI = i+1;
  39671. inBase64 = true;
  39672. }
  39673. } else { // We decode base64.
  39674. if (!base64IMAPChars[buf[i]]) { // Base64 ended.
  39675. if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
  39676. res += "&";
  39677. } else {
  39678. var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/');
  39679. res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
  39680. }
  39681. if (buf[i] != minusChar) // Minus may be absorbed after base64.
  39682. i--;
  39683. lastI = i+1;
  39684. inBase64 = false;
  39685. base64Accum = '';
  39686. }
  39687. }
  39688. }
  39689. if (!inBase64) {
  39690. res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars.
  39691. } else {
  39692. var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/');
  39693. var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars.
  39694. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future.
  39695. b64str = b64str.slice(0, canBeDecoded);
  39696. res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
  39697. }
  39698. this.inBase64 = inBase64;
  39699. this.base64Accum = base64Accum;
  39700. return res;
  39701. }
  39702. Utf7IMAPDecoder.prototype.end = function() {
  39703. var res = "";
  39704. if (this.inBase64 && this.base64Accum.length > 0)
  39705. res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be");
  39706. this.inBase64 = false;
  39707. this.base64Accum = '';
  39708. return res;
  39709. }
  39710. /***/ }),
  39711. /***/ 5395:
  39712. /***/ (function(__unused_webpack_module, exports) {
  39713. "use strict";
  39714. var BOMChar = '\uFEFF';
  39715. exports.PrependBOM = PrependBOMWrapper
  39716. function PrependBOMWrapper(encoder, options) {
  39717. this.encoder = encoder;
  39718. this.addBOM = true;
  39719. }
  39720. PrependBOMWrapper.prototype.write = function(str) {
  39721. if (this.addBOM) {
  39722. str = BOMChar + str;
  39723. this.addBOM = false;
  39724. }
  39725. return this.encoder.write(str);
  39726. }
  39727. PrependBOMWrapper.prototype.end = function() {
  39728. return this.encoder.end();
  39729. }
  39730. //------------------------------------------------------------------------------
  39731. exports.StripBOM = StripBOMWrapper;
  39732. function StripBOMWrapper(decoder, options) {
  39733. this.decoder = decoder;
  39734. this.pass = false;
  39735. this.options = options || {};
  39736. }
  39737. StripBOMWrapper.prototype.write = function(buf) {
  39738. var res = this.decoder.write(buf);
  39739. if (this.pass || !res)
  39740. return res;
  39741. if (res[0] === BOMChar) {
  39742. res = res.slice(1);
  39743. if (typeof this.options.stripBOM === 'function')
  39744. this.options.stripBOM();
  39745. }
  39746. this.pass = true;
  39747. return res;
  39748. }
  39749. StripBOMWrapper.prototype.end = function() {
  39750. return this.decoder.end();
  39751. }
  39752. /***/ }),
  39753. /***/ 4914:
  39754. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  39755. "use strict";
  39756. var Buffer = (__webpack_require__(7103).Buffer);
  39757. var bomHandling = __webpack_require__(5395),
  39758. iconv = module.exports;
  39759. // All codecs and aliases are kept here, keyed by encoding name/alias.
  39760. // They are lazy loaded in `iconv.getCodec` from `encodings/index.js`.
  39761. iconv.encodings = null;
  39762. // Characters emitted in case of error.
  39763. iconv.defaultCharUnicode = '�';
  39764. iconv.defaultCharSingleByte = '?';
  39765. // Public API.
  39766. iconv.encode = function encode(str, encoding, options) {
  39767. str = "" + (str || ""); // Ensure string.
  39768. var encoder = iconv.getEncoder(encoding, options);
  39769. var res = encoder.write(str);
  39770. var trail = encoder.end();
  39771. return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res;
  39772. }
  39773. iconv.decode = function decode(buf, encoding, options) {
  39774. if (typeof buf === 'string') {
  39775. if (!iconv.skipDecodeWarning) {
  39776. console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding');
  39777. iconv.skipDecodeWarning = true;
  39778. }
  39779. buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer.
  39780. }
  39781. var decoder = iconv.getDecoder(encoding, options);
  39782. var res = decoder.write(buf);
  39783. var trail = decoder.end();
  39784. return trail ? (res + trail) : res;
  39785. }
  39786. iconv.encodingExists = function encodingExists(enc) {
  39787. try {
  39788. iconv.getCodec(enc);
  39789. return true;
  39790. } catch (e) {
  39791. return false;
  39792. }
  39793. }
  39794. // Legacy aliases to convert functions
  39795. iconv.toEncoding = iconv.encode;
  39796. iconv.fromEncoding = iconv.decode;
  39797. // Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache.
  39798. iconv._codecDataCache = {};
  39799. iconv.getCodec = function getCodec(encoding) {
  39800. if (!iconv.encodings)
  39801. iconv.encodings = __webpack_require__(6934); // Lazy load all encoding definitions.
  39802. // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
  39803. var enc = iconv._canonicalizeEncoding(encoding);
  39804. // Traverse iconv.encodings to find actual codec.
  39805. var codecOptions = {};
  39806. while (true) {
  39807. var codec = iconv._codecDataCache[enc];
  39808. if (codec)
  39809. return codec;
  39810. var codecDef = iconv.encodings[enc];
  39811. switch (typeof codecDef) {
  39812. case "string": // Direct alias to other encoding.
  39813. enc = codecDef;
  39814. break;
  39815. case "object": // Alias with options. Can be layered.
  39816. for (var key in codecDef)
  39817. codecOptions[key] = codecDef[key];
  39818. if (!codecOptions.encodingName)
  39819. codecOptions.encodingName = enc;
  39820. enc = codecDef.type;
  39821. break;
  39822. case "function": // Codec itself.
  39823. if (!codecOptions.encodingName)
  39824. codecOptions.encodingName = enc;
  39825. // The codec function must load all tables and return object with .encoder and .decoder methods.
  39826. // It'll be called only once (for each different options object).
  39827. codec = new codecDef(codecOptions, iconv);
  39828. iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later.
  39829. return codec;
  39830. default:
  39831. throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')");
  39832. }
  39833. }
  39834. }
  39835. iconv._canonicalizeEncoding = function(encoding) {
  39836. // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
  39837. return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
  39838. }
  39839. iconv.getEncoder = function getEncoder(encoding, options) {
  39840. var codec = iconv.getCodec(encoding),
  39841. encoder = new codec.encoder(options, codec);
  39842. if (codec.bomAware && options && options.addBOM)
  39843. encoder = new bomHandling.PrependBOM(encoder, options);
  39844. return encoder;
  39845. }
  39846. iconv.getDecoder = function getDecoder(encoding, options) {
  39847. var codec = iconv.getCodec(encoding),
  39848. decoder = new codec.decoder(options, codec);
  39849. if (codec.bomAware && !(options && options.stripBOM === false))
  39850. decoder = new bomHandling.StripBOM(decoder, options);
  39851. return decoder;
  39852. }
  39853. // Streaming API
  39854. // NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add
  39855. // up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default.
  39856. // If you would like to enable it explicitly, please add the following code to your app:
  39857. // > iconv.enableStreamingAPI(require('stream'));
  39858. iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) {
  39859. if (iconv.supportsStreams)
  39860. return;
  39861. // Dependency-inject stream module to create IconvLite stream classes.
  39862. var streams = __webpack_require__(8044)(stream_module);
  39863. // Not public API yet, but expose the stream classes.
  39864. iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream;
  39865. iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream;
  39866. // Streaming API.
  39867. iconv.encodeStream = function encodeStream(encoding, options) {
  39868. return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options);
  39869. }
  39870. iconv.decodeStream = function decodeStream(encoding, options) {
  39871. return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options);
  39872. }
  39873. iconv.supportsStreams = true;
  39874. }
  39875. // Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments).
  39876. var stream_module;
  39877. try {
  39878. stream_module = __webpack_require__(5832);
  39879. } catch (e) {}
  39880. if (stream_module && stream_module.Transform) {
  39881. iconv.enableStreamingAPI(stream_module);
  39882. } else {
  39883. // In rare cases where 'stream' module is not available by default, throw a helpful exception.
  39884. iconv.encodeStream = iconv.decodeStream = function() {
  39885. throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it.");
  39886. };
  39887. }
  39888. if (false) {}
  39889. /***/ }),
  39890. /***/ 8044:
  39891. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  39892. "use strict";
  39893. var Buffer = (__webpack_require__(7103).Buffer);
  39894. // NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments),
  39895. // we opt to dependency-inject it instead of creating a hard dependency.
  39896. module.exports = function(stream_module) {
  39897. var Transform = stream_module.Transform;
  39898. // == Encoder stream =======================================================
  39899. function IconvLiteEncoderStream(conv, options) {
  39900. this.conv = conv;
  39901. options = options || {};
  39902. options.decodeStrings = false; // We accept only strings, so we don't need to decode them.
  39903. Transform.call(this, options);
  39904. }
  39905. IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, {
  39906. constructor: { value: IconvLiteEncoderStream }
  39907. });
  39908. IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) {
  39909. if (typeof chunk != 'string')
  39910. return done(new Error("Iconv encoding stream needs strings as its input."));
  39911. try {
  39912. var res = this.conv.write(chunk);
  39913. if (res && res.length) this.push(res);
  39914. done();
  39915. }
  39916. catch (e) {
  39917. done(e);
  39918. }
  39919. }
  39920. IconvLiteEncoderStream.prototype._flush = function(done) {
  39921. try {
  39922. var res = this.conv.end();
  39923. if (res && res.length) this.push(res);
  39924. done();
  39925. }
  39926. catch (e) {
  39927. done(e);
  39928. }
  39929. }
  39930. IconvLiteEncoderStream.prototype.collect = function(cb) {
  39931. var chunks = [];
  39932. this.on('error', cb);
  39933. this.on('data', function(chunk) { chunks.push(chunk); });
  39934. this.on('end', function() {
  39935. cb(null, Buffer.concat(chunks));
  39936. });
  39937. return this;
  39938. }
  39939. // == Decoder stream =======================================================
  39940. function IconvLiteDecoderStream(conv, options) {
  39941. this.conv = conv;
  39942. options = options || {};
  39943. options.encoding = this.encoding = 'utf8'; // We output strings.
  39944. Transform.call(this, options);
  39945. }
  39946. IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, {
  39947. constructor: { value: IconvLiteDecoderStream }
  39948. });
  39949. IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) {
  39950. if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array))
  39951. return done(new Error("Iconv decoding stream needs buffers as its input."));
  39952. try {
  39953. var res = this.conv.write(chunk);
  39954. if (res && res.length) this.push(res, this.encoding);
  39955. done();
  39956. }
  39957. catch (e) {
  39958. done(e);
  39959. }
  39960. }
  39961. IconvLiteDecoderStream.prototype._flush = function(done) {
  39962. try {
  39963. var res = this.conv.end();
  39964. if (res && res.length) this.push(res, this.encoding);
  39965. done();
  39966. }
  39967. catch (e) {
  39968. done(e);
  39969. }
  39970. }
  39971. IconvLiteDecoderStream.prototype.collect = function(cb) {
  39972. var res = '';
  39973. this.on('error', cb);
  39974. this.on('data', function(chunk) { res += chunk; });
  39975. this.on('end', function() {
  39976. cb(null, res);
  39977. });
  39978. return this;
  39979. }
  39980. return {
  39981. IconvLiteEncoderStream: IconvLiteEncoderStream,
  39982. IconvLiteDecoderStream: IconvLiteDecoderStream,
  39983. };
  39984. };
  39985. /***/ }),
  39986. /***/ 645:
  39987. /***/ (function(__unused_webpack_module, exports) {
  39988. /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
  39989. exports.read = function (buffer, offset, isLE, mLen, nBytes) {
  39990. var e, m
  39991. var eLen = (nBytes * 8) - mLen - 1
  39992. var eMax = (1 << eLen) - 1
  39993. var eBias = eMax >> 1
  39994. var nBits = -7
  39995. var i = isLE ? (nBytes - 1) : 0
  39996. var d = isLE ? -1 : 1
  39997. var s = buffer[offset + i]
  39998. i += d
  39999. e = s & ((1 << (-nBits)) - 1)
  40000. s >>= (-nBits)
  40001. nBits += eLen
  40002. for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  40003. m = e & ((1 << (-nBits)) - 1)
  40004. e >>= (-nBits)
  40005. nBits += mLen
  40006. for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
  40007. if (e === 0) {
  40008. e = 1 - eBias
  40009. } else if (e === eMax) {
  40010. return m ? NaN : ((s ? -1 : 1) * Infinity)
  40011. } else {
  40012. m = m + Math.pow(2, mLen)
  40013. e = e - eBias
  40014. }
  40015. return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
  40016. }
  40017. exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
  40018. var e, m, c
  40019. var eLen = (nBytes * 8) - mLen - 1
  40020. var eMax = (1 << eLen) - 1
  40021. var eBias = eMax >> 1
  40022. var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
  40023. var i = isLE ? 0 : (nBytes - 1)
  40024. var d = isLE ? 1 : -1
  40025. var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
  40026. value = Math.abs(value)
  40027. if (isNaN(value) || value === Infinity) {
  40028. m = isNaN(value) ? 1 : 0
  40029. e = eMax
  40030. } else {
  40031. e = Math.floor(Math.log(value) / Math.LN2)
  40032. if (value * (c = Math.pow(2, -e)) < 1) {
  40033. e--
  40034. c *= 2
  40035. }
  40036. if (e + eBias >= 1) {
  40037. value += rt / c
  40038. } else {
  40039. value += rt * Math.pow(2, 1 - eBias)
  40040. }
  40041. if (value * c >= 2) {
  40042. e++
  40043. c /= 2
  40044. }
  40045. if (e + eBias >= eMax) {
  40046. m = 0
  40047. e = eMax
  40048. } else if (e + eBias >= 1) {
  40049. m = ((value * c) - 1) * Math.pow(2, mLen)
  40050. e = e + eBias
  40051. } else {
  40052. m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
  40053. e = 0
  40054. }
  40055. }
  40056. for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
  40057. e = (e << mLen) | m
  40058. eLen += mLen
  40059. for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
  40060. buffer[offset + i - d] |= s * 128
  40061. }
  40062. /***/ }),
  40063. /***/ 5717:
  40064. /***/ (function(module) {
  40065. if (typeof Object.create === 'function') {
  40066. // implementation from standard node.js 'util' module
  40067. module.exports = function inherits(ctor, superCtor) {
  40068. if (superCtor) {
  40069. ctor.super_ = superCtor
  40070. ctor.prototype = Object.create(superCtor.prototype, {
  40071. constructor: {
  40072. value: ctor,
  40073. enumerable: false,
  40074. writable: true,
  40075. configurable: true
  40076. }
  40077. })
  40078. }
  40079. };
  40080. } else {
  40081. // old school shim for old browsers
  40082. module.exports = function inherits(ctor, superCtor) {
  40083. if (superCtor) {
  40084. ctor.super_ = superCtor
  40085. var TempCtor = function () {}
  40086. TempCtor.prototype = superCtor.prototype
  40087. ctor.prototype = new TempCtor()
  40088. ctor.prototype.constructor = ctor
  40089. }
  40090. }
  40091. }
  40092. /***/ }),
  40093. /***/ 2584:
  40094. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40095. "use strict";
  40096. var hasToStringTag = __webpack_require__(6410)();
  40097. var callBound = __webpack_require__(1924);
  40098. var $toString = callBound('Object.prototype.toString');
  40099. var isStandardArguments = function isArguments(value) {
  40100. if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
  40101. return false;
  40102. }
  40103. return $toString(value) === '[object Arguments]';
  40104. };
  40105. var isLegacyArguments = function isArguments(value) {
  40106. if (isStandardArguments(value)) {
  40107. return true;
  40108. }
  40109. return value !== null &&
  40110. typeof value === 'object' &&
  40111. typeof value.length === 'number' &&
  40112. value.length >= 0 &&
  40113. $toString(value) !== '[object Array]' &&
  40114. $toString(value.callee) === '[object Function]';
  40115. };
  40116. var supportsStandardArguments = (function () {
  40117. return isStandardArguments(arguments);
  40118. }());
  40119. isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
  40120. module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
  40121. /***/ }),
  40122. /***/ 8923:
  40123. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40124. "use strict";
  40125. var getDay = Date.prototype.getDay;
  40126. var tryDateObject = function tryDateGetDayCall(value) {
  40127. try {
  40128. getDay.call(value);
  40129. return true;
  40130. } catch (e) {
  40131. return false;
  40132. }
  40133. };
  40134. var toStr = Object.prototype.toString;
  40135. var dateClass = '[object Date]';
  40136. var hasToStringTag = __webpack_require__(6410)();
  40137. module.exports = function isDateObject(value) {
  40138. if (typeof value !== 'object' || value === null) {
  40139. return false;
  40140. }
  40141. return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass;
  40142. };
  40143. /***/ }),
  40144. /***/ 8662:
  40145. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40146. "use strict";
  40147. var toStr = Object.prototype.toString;
  40148. var fnToStr = Function.prototype.toString;
  40149. var isFnRegex = /^\s*(?:function)?\*/;
  40150. var hasToStringTag = __webpack_require__(6410)();
  40151. var getProto = Object.getPrototypeOf;
  40152. var getGeneratorFunc = function () { // eslint-disable-line consistent-return
  40153. if (!hasToStringTag) {
  40154. return false;
  40155. }
  40156. try {
  40157. return Function('return function*() {}')();
  40158. } catch (e) {
  40159. }
  40160. };
  40161. var GeneratorFunction;
  40162. module.exports = function isGeneratorFunction(fn) {
  40163. if (typeof fn !== 'function') {
  40164. return false;
  40165. }
  40166. if (isFnRegex.test(fnToStr.call(fn))) {
  40167. return true;
  40168. }
  40169. if (!hasToStringTag) {
  40170. var str = toStr.call(fn);
  40171. return str === '[object GeneratorFunction]';
  40172. }
  40173. if (!getProto) {
  40174. return false;
  40175. }
  40176. if (typeof GeneratorFunction === 'undefined') {
  40177. var generatorFunc = getGeneratorFunc();
  40178. GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;
  40179. }
  40180. return getProto(fn) === GeneratorFunction;
  40181. };
  40182. /***/ }),
  40183. /***/ 8611:
  40184. /***/ (function(module) {
  40185. "use strict";
  40186. /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
  40187. module.exports = function isNaN(value) {
  40188. return value !== value;
  40189. };
  40190. /***/ }),
  40191. /***/ 360:
  40192. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40193. "use strict";
  40194. var callBind = __webpack_require__(5559);
  40195. var define = __webpack_require__(4289);
  40196. var implementation = __webpack_require__(8611);
  40197. var getPolyfill = __webpack_require__(9415);
  40198. var shim = __webpack_require__(6743);
  40199. var polyfill = callBind(getPolyfill(), Number);
  40200. /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
  40201. define(polyfill, {
  40202. getPolyfill: getPolyfill,
  40203. implementation: implementation,
  40204. shim: shim
  40205. });
  40206. module.exports = polyfill;
  40207. /***/ }),
  40208. /***/ 9415:
  40209. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40210. "use strict";
  40211. var implementation = __webpack_require__(8611);
  40212. module.exports = function getPolyfill() {
  40213. if (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {
  40214. return Number.isNaN;
  40215. }
  40216. return implementation;
  40217. };
  40218. /***/ }),
  40219. /***/ 6743:
  40220. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40221. "use strict";
  40222. var define = __webpack_require__(4289);
  40223. var getPolyfill = __webpack_require__(9415);
  40224. /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
  40225. module.exports = function shimNumberIsNaN() {
  40226. var polyfill = getPolyfill();
  40227. define(Number, { isNaN: polyfill }, {
  40228. isNaN: function testIsNaN() {
  40229. return Number.isNaN !== polyfill;
  40230. }
  40231. });
  40232. return polyfill;
  40233. };
  40234. /***/ }),
  40235. /***/ 8420:
  40236. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40237. "use strict";
  40238. var callBound = __webpack_require__(1924);
  40239. var hasToStringTag = __webpack_require__(6410)();
  40240. var has;
  40241. var $exec;
  40242. var isRegexMarker;
  40243. var badStringifier;
  40244. if (hasToStringTag) {
  40245. has = callBound('Object.prototype.hasOwnProperty');
  40246. $exec = callBound('RegExp.prototype.exec');
  40247. isRegexMarker = {};
  40248. var throwRegexMarker = function () {
  40249. throw isRegexMarker;
  40250. };
  40251. badStringifier = {
  40252. toString: throwRegexMarker,
  40253. valueOf: throwRegexMarker
  40254. };
  40255. if (typeof Symbol.toPrimitive === 'symbol') {
  40256. badStringifier[Symbol.toPrimitive] = throwRegexMarker;
  40257. }
  40258. }
  40259. var $toString = callBound('Object.prototype.toString');
  40260. var gOPD = Object.getOwnPropertyDescriptor;
  40261. var regexClass = '[object RegExp]';
  40262. module.exports = hasToStringTag
  40263. // eslint-disable-next-line consistent-return
  40264. ? function isRegex(value) {
  40265. if (!value || typeof value !== 'object') {
  40266. return false;
  40267. }
  40268. var descriptor = gOPD(value, 'lastIndex');
  40269. var hasLastIndexDataProperty = descriptor && has(descriptor, 'value');
  40270. if (!hasLastIndexDataProperty) {
  40271. return false;
  40272. }
  40273. try {
  40274. $exec(value, badStringifier);
  40275. } catch (e) {
  40276. return e === isRegexMarker;
  40277. }
  40278. }
  40279. : function isRegex(value) {
  40280. // In older browsers, typeof regex incorrectly returns 'function'
  40281. if (!value || (typeof value !== 'object' && typeof value !== 'function')) {
  40282. return false;
  40283. }
  40284. return $toString(value) === regexClass;
  40285. };
  40286. /***/ }),
  40287. /***/ 5692:
  40288. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40289. "use strict";
  40290. var forEach = __webpack_require__(9804);
  40291. var availableTypedArrays = __webpack_require__(3083);
  40292. var callBound = __webpack_require__(1924);
  40293. var $toString = callBound('Object.prototype.toString');
  40294. var hasToStringTag = __webpack_require__(6410)();
  40295. var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis;
  40296. var typedArrays = availableTypedArrays();
  40297. var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
  40298. for (var i = 0; i < array.length; i += 1) {
  40299. if (array[i] === value) {
  40300. return i;
  40301. }
  40302. }
  40303. return -1;
  40304. };
  40305. var $slice = callBound('String.prototype.slice');
  40306. var toStrTags = {};
  40307. var gOPD = __webpack_require__(882);
  40308. var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
  40309. if (hasToStringTag && gOPD && getPrototypeOf) {
  40310. forEach(typedArrays, function (typedArray) {
  40311. var arr = new g[typedArray]();
  40312. if (Symbol.toStringTag in arr) {
  40313. var proto = getPrototypeOf(arr);
  40314. var descriptor = gOPD(proto, Symbol.toStringTag);
  40315. if (!descriptor) {
  40316. var superProto = getPrototypeOf(proto);
  40317. descriptor = gOPD(superProto, Symbol.toStringTag);
  40318. }
  40319. toStrTags[typedArray] = descriptor.get;
  40320. }
  40321. });
  40322. }
  40323. var tryTypedArrays = function tryAllTypedArrays(value) {
  40324. var anyTrue = false;
  40325. forEach(toStrTags, function (getter, typedArray) {
  40326. if (!anyTrue) {
  40327. try {
  40328. anyTrue = getter.call(value) === typedArray;
  40329. } catch (e) { /**/ }
  40330. }
  40331. });
  40332. return anyTrue;
  40333. };
  40334. module.exports = function isTypedArray(value) {
  40335. if (!value || typeof value !== 'object') { return false; }
  40336. if (!hasToStringTag || !(Symbol.toStringTag in value)) {
  40337. var tag = $slice($toString(value), 8, -1);
  40338. return $indexOf(typedArrays, tag) > -1;
  40339. }
  40340. if (!gOPD) { return false; }
  40341. return tryTypedArrays(value);
  40342. };
  40343. /***/ }),
  40344. /***/ 4244:
  40345. /***/ (function(module) {
  40346. "use strict";
  40347. var numberIsNaN = function (value) {
  40348. return value !== value;
  40349. };
  40350. module.exports = function is(a, b) {
  40351. if (a === 0 && b === 0) {
  40352. return 1 / a === 1 / b;
  40353. }
  40354. if (a === b) {
  40355. return true;
  40356. }
  40357. if (numberIsNaN(a) && numberIsNaN(b)) {
  40358. return true;
  40359. }
  40360. return false;
  40361. };
  40362. /***/ }),
  40363. /***/ 609:
  40364. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40365. "use strict";
  40366. var define = __webpack_require__(4289);
  40367. var callBind = __webpack_require__(5559);
  40368. var implementation = __webpack_require__(4244);
  40369. var getPolyfill = __webpack_require__(5624);
  40370. var shim = __webpack_require__(2281);
  40371. var polyfill = callBind(getPolyfill(), Object);
  40372. define(polyfill, {
  40373. getPolyfill: getPolyfill,
  40374. implementation: implementation,
  40375. shim: shim
  40376. });
  40377. module.exports = polyfill;
  40378. /***/ }),
  40379. /***/ 5624:
  40380. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40381. "use strict";
  40382. var implementation = __webpack_require__(4244);
  40383. module.exports = function getPolyfill() {
  40384. return typeof Object.is === 'function' ? Object.is : implementation;
  40385. };
  40386. /***/ }),
  40387. /***/ 2281:
  40388. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40389. "use strict";
  40390. var getPolyfill = __webpack_require__(5624);
  40391. var define = __webpack_require__(4289);
  40392. module.exports = function shimObjectIs() {
  40393. var polyfill = getPolyfill();
  40394. define(Object, { is: polyfill }, {
  40395. is: function testObjectIs() {
  40396. return Object.is !== polyfill;
  40397. }
  40398. });
  40399. return polyfill;
  40400. };
  40401. /***/ }),
  40402. /***/ 8987:
  40403. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40404. "use strict";
  40405. var keysShim;
  40406. if (!Object.keys) {
  40407. // modified from https://github.com/es-shims/es5-shim
  40408. var has = Object.prototype.hasOwnProperty;
  40409. var toStr = Object.prototype.toString;
  40410. var isArgs = __webpack_require__(1414); // eslint-disable-line global-require
  40411. var isEnumerable = Object.prototype.propertyIsEnumerable;
  40412. var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
  40413. var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
  40414. var dontEnums = [
  40415. 'toString',
  40416. 'toLocaleString',
  40417. 'valueOf',
  40418. 'hasOwnProperty',
  40419. 'isPrototypeOf',
  40420. 'propertyIsEnumerable',
  40421. 'constructor'
  40422. ];
  40423. var equalsConstructorPrototype = function (o) {
  40424. var ctor = o.constructor;
  40425. return ctor && ctor.prototype === o;
  40426. };
  40427. var excludedKeys = {
  40428. $applicationCache: true,
  40429. $console: true,
  40430. $external: true,
  40431. $frame: true,
  40432. $frameElement: true,
  40433. $frames: true,
  40434. $innerHeight: true,
  40435. $innerWidth: true,
  40436. $onmozfullscreenchange: true,
  40437. $onmozfullscreenerror: true,
  40438. $outerHeight: true,
  40439. $outerWidth: true,
  40440. $pageXOffset: true,
  40441. $pageYOffset: true,
  40442. $parent: true,
  40443. $scrollLeft: true,
  40444. $scrollTop: true,
  40445. $scrollX: true,
  40446. $scrollY: true,
  40447. $self: true,
  40448. $webkitIndexedDB: true,
  40449. $webkitStorageInfo: true,
  40450. $window: true
  40451. };
  40452. var hasAutomationEqualityBug = (function () {
  40453. /* global window */
  40454. if (typeof window === 'undefined') { return false; }
  40455. for (var k in window) {
  40456. try {
  40457. if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
  40458. try {
  40459. equalsConstructorPrototype(window[k]);
  40460. } catch (e) {
  40461. return true;
  40462. }
  40463. }
  40464. } catch (e) {
  40465. return true;
  40466. }
  40467. }
  40468. return false;
  40469. }());
  40470. var equalsConstructorPrototypeIfNotBuggy = function (o) {
  40471. /* global window */
  40472. if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
  40473. return equalsConstructorPrototype(o);
  40474. }
  40475. try {
  40476. return equalsConstructorPrototype(o);
  40477. } catch (e) {
  40478. return false;
  40479. }
  40480. };
  40481. keysShim = function keys(object) {
  40482. var isObject = object !== null && typeof object === 'object';
  40483. var isFunction = toStr.call(object) === '[object Function]';
  40484. var isArguments = isArgs(object);
  40485. var isString = isObject && toStr.call(object) === '[object String]';
  40486. var theKeys = [];
  40487. if (!isObject && !isFunction && !isArguments) {
  40488. throw new TypeError('Object.keys called on a non-object');
  40489. }
  40490. var skipProto = hasProtoEnumBug && isFunction;
  40491. if (isString && object.length > 0 && !has.call(object, 0)) {
  40492. for (var i = 0; i < object.length; ++i) {
  40493. theKeys.push(String(i));
  40494. }
  40495. }
  40496. if (isArguments && object.length > 0) {
  40497. for (var j = 0; j < object.length; ++j) {
  40498. theKeys.push(String(j));
  40499. }
  40500. } else {
  40501. for (var name in object) {
  40502. if (!(skipProto && name === 'prototype') && has.call(object, name)) {
  40503. theKeys.push(String(name));
  40504. }
  40505. }
  40506. }
  40507. if (hasDontEnumBug) {
  40508. var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
  40509. for (var k = 0; k < dontEnums.length; ++k) {
  40510. if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
  40511. theKeys.push(dontEnums[k]);
  40512. }
  40513. }
  40514. }
  40515. return theKeys;
  40516. };
  40517. }
  40518. module.exports = keysShim;
  40519. /***/ }),
  40520. /***/ 2215:
  40521. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  40522. "use strict";
  40523. var slice = Array.prototype.slice;
  40524. var isArgs = __webpack_require__(1414);
  40525. var origKeys = Object.keys;
  40526. var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8987);
  40527. var originalKeys = Object.keys;
  40528. keysShim.shim = function shimObjectKeys() {
  40529. if (Object.keys) {
  40530. var keysWorksWithArguments = (function () {
  40531. // Safari 5.0 bug
  40532. var args = Object.keys(arguments);
  40533. return args && args.length === arguments.length;
  40534. }(1, 2));
  40535. if (!keysWorksWithArguments) {
  40536. Object.keys = function keys(object) { // eslint-disable-line func-name-matching
  40537. if (isArgs(object)) {
  40538. return originalKeys(slice.call(object));
  40539. }
  40540. return originalKeys(object);
  40541. };
  40542. }
  40543. } else {
  40544. Object.keys = keysShim;
  40545. }
  40546. return Object.keys || keysShim;
  40547. };
  40548. module.exports = keysShim;
  40549. /***/ }),
  40550. /***/ 1414:
  40551. /***/ (function(module) {
  40552. "use strict";
  40553. var toStr = Object.prototype.toString;
  40554. module.exports = function isArguments(value) {
  40555. var str = toStr.call(value);
  40556. var isArgs = str === '[object Arguments]';
  40557. if (!isArgs) {
  40558. isArgs = str !== '[object Array]' &&
  40559. value !== null &&
  40560. typeof value === 'object' &&
  40561. typeof value.length === 'number' &&
  40562. value.length >= 0 &&
  40563. toStr.call(value.callee) === '[object Function]';
  40564. }
  40565. return isArgs;
  40566. };
  40567. /***/ }),
  40568. /***/ 4155:
  40569. /***/ (function(module) {
  40570. // shim for using process in browser
  40571. var process = module.exports = {};
  40572. // cached from whatever global is present so that test runners that stub it
  40573. // don't break things. But we need to wrap it in a try catch in case it is
  40574. // wrapped in strict mode code which doesn't define any globals. It's inside a
  40575. // function because try/catches deoptimize in certain engines.
  40576. var cachedSetTimeout;
  40577. var cachedClearTimeout;
  40578. function defaultSetTimout() {
  40579. throw new Error('setTimeout has not been defined');
  40580. }
  40581. function defaultClearTimeout () {
  40582. throw new Error('clearTimeout has not been defined');
  40583. }
  40584. (function () {
  40585. try {
  40586. if (typeof setTimeout === 'function') {
  40587. cachedSetTimeout = setTimeout;
  40588. } else {
  40589. cachedSetTimeout = defaultSetTimout;
  40590. }
  40591. } catch (e) {
  40592. cachedSetTimeout = defaultSetTimout;
  40593. }
  40594. try {
  40595. if (typeof clearTimeout === 'function') {
  40596. cachedClearTimeout = clearTimeout;
  40597. } else {
  40598. cachedClearTimeout = defaultClearTimeout;
  40599. }
  40600. } catch (e) {
  40601. cachedClearTimeout = defaultClearTimeout;
  40602. }
  40603. } ())
  40604. function runTimeout(fun) {
  40605. if (cachedSetTimeout === setTimeout) {
  40606. //normal enviroments in sane situations
  40607. return setTimeout(fun, 0);
  40608. }
  40609. // if setTimeout wasn't available but was latter defined
  40610. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  40611. cachedSetTimeout = setTimeout;
  40612. return setTimeout(fun, 0);
  40613. }
  40614. try {
  40615. // when when somebody has screwed with setTimeout but no I.E. maddness
  40616. return cachedSetTimeout(fun, 0);
  40617. } catch(e){
  40618. try {
  40619. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  40620. return cachedSetTimeout.call(null, fun, 0);
  40621. } catch(e){
  40622. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  40623. return cachedSetTimeout.call(this, fun, 0);
  40624. }
  40625. }
  40626. }
  40627. function runClearTimeout(marker) {
  40628. if (cachedClearTimeout === clearTimeout) {
  40629. //normal enviroments in sane situations
  40630. return clearTimeout(marker);
  40631. }
  40632. // if clearTimeout wasn't available but was latter defined
  40633. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  40634. cachedClearTimeout = clearTimeout;
  40635. return clearTimeout(marker);
  40636. }
  40637. try {
  40638. // when when somebody has screwed with setTimeout but no I.E. maddness
  40639. return cachedClearTimeout(marker);
  40640. } catch (e){
  40641. try {
  40642. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  40643. return cachedClearTimeout.call(null, marker);
  40644. } catch (e){
  40645. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  40646. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  40647. return cachedClearTimeout.call(this, marker);
  40648. }
  40649. }
  40650. }
  40651. var queue = [];
  40652. var draining = false;
  40653. var currentQueue;
  40654. var queueIndex = -1;
  40655. function cleanUpNextTick() {
  40656. if (!draining || !currentQueue) {
  40657. return;
  40658. }
  40659. draining = false;
  40660. if (currentQueue.length) {
  40661. queue = currentQueue.concat(queue);
  40662. } else {
  40663. queueIndex = -1;
  40664. }
  40665. if (queue.length) {
  40666. drainQueue();
  40667. }
  40668. }
  40669. function drainQueue() {
  40670. if (draining) {
  40671. return;
  40672. }
  40673. var timeout = runTimeout(cleanUpNextTick);
  40674. draining = true;
  40675. var len = queue.length;
  40676. while(len) {
  40677. currentQueue = queue;
  40678. queue = [];
  40679. while (++queueIndex < len) {
  40680. if (currentQueue) {
  40681. currentQueue[queueIndex].run();
  40682. }
  40683. }
  40684. queueIndex = -1;
  40685. len = queue.length;
  40686. }
  40687. currentQueue = null;
  40688. draining = false;
  40689. runClearTimeout(timeout);
  40690. }
  40691. process.nextTick = function (fun) {
  40692. var args = new Array(arguments.length - 1);
  40693. if (arguments.length > 1) {
  40694. for (var i = 1; i < arguments.length; i++) {
  40695. args[i - 1] = arguments[i];
  40696. }
  40697. }
  40698. queue.push(new Item(fun, args));
  40699. if (queue.length === 1 && !draining) {
  40700. runTimeout(drainQueue);
  40701. }
  40702. };
  40703. // v8 likes predictible objects
  40704. function Item(fun, array) {
  40705. this.fun = fun;
  40706. this.array = array;
  40707. }
  40708. Item.prototype.run = function () {
  40709. this.fun.apply(null, this.array);
  40710. };
  40711. process.title = 'browser';
  40712. process.browser = true;
  40713. process.env = {};
  40714. process.argv = [];
  40715. process.version = ''; // empty string to avoid regexp issues
  40716. process.versions = {};
  40717. function noop() {}
  40718. process.on = noop;
  40719. process.addListener = noop;
  40720. process.once = noop;
  40721. process.off = noop;
  40722. process.removeListener = noop;
  40723. process.removeAllListeners = noop;
  40724. process.emit = noop;
  40725. process.prependListener = noop;
  40726. process.prependOnceListener = noop;
  40727. process.listeners = function (name) { return [] }
  40728. process.binding = function (name) {
  40729. throw new Error('process.binding is not supported');
  40730. };
  40731. process.cwd = function () { return '/' };
  40732. process.chdir = function (dir) {
  40733. throw new Error('process.chdir is not supported');
  40734. };
  40735. process.umask = function() { return 0; };
  40736. /***/ }),
  40737. /***/ 5666:
  40738. /***/ (function(module) {
  40739. /**
  40740. * Copyright (c) 2014-present, Facebook, Inc.
  40741. *
  40742. * This source code is licensed under the MIT license found in the
  40743. * LICENSE file in the root directory of this source tree.
  40744. */
  40745. var runtime = (function (exports) {
  40746. "use strict";
  40747. var Op = Object.prototype;
  40748. var hasOwn = Op.hasOwnProperty;
  40749. var undefined; // More compressible than void 0.
  40750. var $Symbol = typeof Symbol === "function" ? Symbol : {};
  40751. var iteratorSymbol = $Symbol.iterator || "@@iterator";
  40752. var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
  40753. var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
  40754. function define(obj, key, value) {
  40755. Object.defineProperty(obj, key, {
  40756. value: value,
  40757. enumerable: true,
  40758. configurable: true,
  40759. writable: true
  40760. });
  40761. return obj[key];
  40762. }
  40763. try {
  40764. // IE 8 has a broken Object.defineProperty that only works on DOM objects.
  40765. define({}, "");
  40766. } catch (err) {
  40767. define = function(obj, key, value) {
  40768. return obj[key] = value;
  40769. };
  40770. }
  40771. function wrap(innerFn, outerFn, self, tryLocsList) {
  40772. // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
  40773. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
  40774. var generator = Object.create(protoGenerator.prototype);
  40775. var context = new Context(tryLocsList || []);
  40776. // The ._invoke method unifies the implementations of the .next,
  40777. // .throw, and .return methods.
  40778. generator._invoke = makeInvokeMethod(innerFn, self, context);
  40779. return generator;
  40780. }
  40781. exports.wrap = wrap;
  40782. // Try/catch helper to minimize deoptimizations. Returns a completion
  40783. // record like context.tryEntries[i].completion. This interface could
  40784. // have been (and was previously) designed to take a closure to be
  40785. // invoked without arguments, but in all the cases we care about we
  40786. // already have an existing method we want to call, so there's no need
  40787. // to create a new function object. We can even get away with assuming
  40788. // the method takes exactly one argument, since that happens to be true
  40789. // in every case, so we don't have to touch the arguments object. The
  40790. // only additional allocation required is the completion record, which
  40791. // has a stable shape and so hopefully should be cheap to allocate.
  40792. function tryCatch(fn, obj, arg) {
  40793. try {
  40794. return { type: "normal", arg: fn.call(obj, arg) };
  40795. } catch (err) {
  40796. return { type: "throw", arg: err };
  40797. }
  40798. }
  40799. var GenStateSuspendedStart = "suspendedStart";
  40800. var GenStateSuspendedYield = "suspendedYield";
  40801. var GenStateExecuting = "executing";
  40802. var GenStateCompleted = "completed";
  40803. // Returning this object from the innerFn has the same effect as
  40804. // breaking out of the dispatch switch statement.
  40805. var ContinueSentinel = {};
  40806. // Dummy constructor functions that we use as the .constructor and
  40807. // .constructor.prototype properties for functions that return Generator
  40808. // objects. For full spec compliance, you may wish to configure your
  40809. // minifier not to mangle the names of these two functions.
  40810. function Generator() {}
  40811. function GeneratorFunction() {}
  40812. function GeneratorFunctionPrototype() {}
  40813. // This is a polyfill for %IteratorPrototype% for environments that
  40814. // don't natively support it.
  40815. var IteratorPrototype = {};
  40816. define(IteratorPrototype, iteratorSymbol, function () {
  40817. return this;
  40818. });
  40819. var getProto = Object.getPrototypeOf;
  40820. var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
  40821. if (NativeIteratorPrototype &&
  40822. NativeIteratorPrototype !== Op &&
  40823. hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
  40824. // This environment has a native %IteratorPrototype%; use it instead
  40825. // of the polyfill.
  40826. IteratorPrototype = NativeIteratorPrototype;
  40827. }
  40828. var Gp = GeneratorFunctionPrototype.prototype =
  40829. Generator.prototype = Object.create(IteratorPrototype);
  40830. GeneratorFunction.prototype = GeneratorFunctionPrototype;
  40831. define(Gp, "constructor", GeneratorFunctionPrototype);
  40832. define(GeneratorFunctionPrototype, "constructor", GeneratorFunction);
  40833. GeneratorFunction.displayName = define(
  40834. GeneratorFunctionPrototype,
  40835. toStringTagSymbol,
  40836. "GeneratorFunction"
  40837. );
  40838. // Helper for defining the .next, .throw, and .return methods of the
  40839. // Iterator interface in terms of a single ._invoke method.
  40840. function defineIteratorMethods(prototype) {
  40841. ["next", "throw", "return"].forEach(function(method) {
  40842. define(prototype, method, function(arg) {
  40843. return this._invoke(method, arg);
  40844. });
  40845. });
  40846. }
  40847. exports.isGeneratorFunction = function(genFun) {
  40848. var ctor = typeof genFun === "function" && genFun.constructor;
  40849. return ctor
  40850. ? ctor === GeneratorFunction ||
  40851. // For the native GeneratorFunction constructor, the best we can
  40852. // do is to check its .name property.
  40853. (ctor.displayName || ctor.name) === "GeneratorFunction"
  40854. : false;
  40855. };
  40856. exports.mark = function(genFun) {
  40857. if (Object.setPrototypeOf) {
  40858. Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
  40859. } else {
  40860. genFun.__proto__ = GeneratorFunctionPrototype;
  40861. define(genFun, toStringTagSymbol, "GeneratorFunction");
  40862. }
  40863. genFun.prototype = Object.create(Gp);
  40864. return genFun;
  40865. };
  40866. // Within the body of any async function, `await x` is transformed to
  40867. // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
  40868. // `hasOwn.call(value, "__await")` to determine if the yielded value is
  40869. // meant to be awaited.
  40870. exports.awrap = function(arg) {
  40871. return { __await: arg };
  40872. };
  40873. function AsyncIterator(generator, PromiseImpl) {
  40874. function invoke(method, arg, resolve, reject) {
  40875. var record = tryCatch(generator[method], generator, arg);
  40876. if (record.type === "throw") {
  40877. reject(record.arg);
  40878. } else {
  40879. var result = record.arg;
  40880. var value = result.value;
  40881. if (value &&
  40882. typeof value === "object" &&
  40883. hasOwn.call(value, "__await")) {
  40884. return PromiseImpl.resolve(value.__await).then(function(value) {
  40885. invoke("next", value, resolve, reject);
  40886. }, function(err) {
  40887. invoke("throw", err, resolve, reject);
  40888. });
  40889. }
  40890. return PromiseImpl.resolve(value).then(function(unwrapped) {
  40891. // When a yielded Promise is resolved, its final value becomes
  40892. // the .value of the Promise<{value,done}> result for the
  40893. // current iteration.
  40894. result.value = unwrapped;
  40895. resolve(result);
  40896. }, function(error) {
  40897. // If a rejected Promise was yielded, throw the rejection back
  40898. // into the async generator function so it can be handled there.
  40899. return invoke("throw", error, resolve, reject);
  40900. });
  40901. }
  40902. }
  40903. var previousPromise;
  40904. function enqueue(method, arg) {
  40905. function callInvokeWithMethodAndArg() {
  40906. return new PromiseImpl(function(resolve, reject) {
  40907. invoke(method, arg, resolve, reject);
  40908. });
  40909. }
  40910. return previousPromise =
  40911. // If enqueue has been called before, then we want to wait until
  40912. // all previous Promises have been resolved before calling invoke,
  40913. // so that results are always delivered in the correct order. If
  40914. // enqueue has not been called before, then it is important to
  40915. // call invoke immediately, without waiting on a callback to fire,
  40916. // so that the async generator function has the opportunity to do
  40917. // any necessary setup in a predictable way. This predictability
  40918. // is why the Promise constructor synchronously invokes its
  40919. // executor callback, and why async functions synchronously
  40920. // execute code before the first await. Since we implement simple
  40921. // async functions in terms of async generators, it is especially
  40922. // important to get this right, even though it requires care.
  40923. previousPromise ? previousPromise.then(
  40924. callInvokeWithMethodAndArg,
  40925. // Avoid propagating failures to Promises returned by later
  40926. // invocations of the iterator.
  40927. callInvokeWithMethodAndArg
  40928. ) : callInvokeWithMethodAndArg();
  40929. }
  40930. // Define the unified helper method that is used to implement .next,
  40931. // .throw, and .return (see defineIteratorMethods).
  40932. this._invoke = enqueue;
  40933. }
  40934. defineIteratorMethods(AsyncIterator.prototype);
  40935. define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
  40936. return this;
  40937. });
  40938. exports.AsyncIterator = AsyncIterator;
  40939. // Note that simple async functions are implemented on top of
  40940. // AsyncIterator objects; they just return a Promise for the value of
  40941. // the final result produced by the iterator.
  40942. exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
  40943. if (PromiseImpl === void 0) PromiseImpl = Promise;
  40944. var iter = new AsyncIterator(
  40945. wrap(innerFn, outerFn, self, tryLocsList),
  40946. PromiseImpl
  40947. );
  40948. return exports.isGeneratorFunction(outerFn)
  40949. ? iter // If outerFn is a generator, return the full iterator.
  40950. : iter.next().then(function(result) {
  40951. return result.done ? result.value : iter.next();
  40952. });
  40953. };
  40954. function makeInvokeMethod(innerFn, self, context) {
  40955. var state = GenStateSuspendedStart;
  40956. return function invoke(method, arg) {
  40957. if (state === GenStateExecuting) {
  40958. throw new Error("Generator is already running");
  40959. }
  40960. if (state === GenStateCompleted) {
  40961. if (method === "throw") {
  40962. throw arg;
  40963. }
  40964. // Be forgiving, per 25.3.3.3.3 of the spec:
  40965. // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
  40966. return doneResult();
  40967. }
  40968. context.method = method;
  40969. context.arg = arg;
  40970. while (true) {
  40971. var delegate = context.delegate;
  40972. if (delegate) {
  40973. var delegateResult = maybeInvokeDelegate(delegate, context);
  40974. if (delegateResult) {
  40975. if (delegateResult === ContinueSentinel) continue;
  40976. return delegateResult;
  40977. }
  40978. }
  40979. if (context.method === "next") {
  40980. // Setting context._sent for legacy support of Babel's
  40981. // function.sent implementation.
  40982. context.sent = context._sent = context.arg;
  40983. } else if (context.method === "throw") {
  40984. if (state === GenStateSuspendedStart) {
  40985. state = GenStateCompleted;
  40986. throw context.arg;
  40987. }
  40988. context.dispatchException(context.arg);
  40989. } else if (context.method === "return") {
  40990. context.abrupt("return", context.arg);
  40991. }
  40992. state = GenStateExecuting;
  40993. var record = tryCatch(innerFn, self, context);
  40994. if (record.type === "normal") {
  40995. // If an exception is thrown from innerFn, we leave state ===
  40996. // GenStateExecuting and loop back for another invocation.
  40997. state = context.done
  40998. ? GenStateCompleted
  40999. : GenStateSuspendedYield;
  41000. if (record.arg === ContinueSentinel) {
  41001. continue;
  41002. }
  41003. return {
  41004. value: record.arg,
  41005. done: context.done
  41006. };
  41007. } else if (record.type === "throw") {
  41008. state = GenStateCompleted;
  41009. // Dispatch the exception by looping back around to the
  41010. // context.dispatchException(context.arg) call above.
  41011. context.method = "throw";
  41012. context.arg = record.arg;
  41013. }
  41014. }
  41015. };
  41016. }
  41017. // Call delegate.iterator[context.method](context.arg) and handle the
  41018. // result, either by returning a { value, done } result from the
  41019. // delegate iterator, or by modifying context.method and context.arg,
  41020. // setting context.delegate to null, and returning the ContinueSentinel.
  41021. function maybeInvokeDelegate(delegate, context) {
  41022. var method = delegate.iterator[context.method];
  41023. if (method === undefined) {
  41024. // A .throw or .return when the delegate iterator has no .throw
  41025. // method always terminates the yield* loop.
  41026. context.delegate = null;
  41027. if (context.method === "throw") {
  41028. // Note: ["return"] must be used for ES3 parsing compatibility.
  41029. if (delegate.iterator["return"]) {
  41030. // If the delegate iterator has a return method, give it a
  41031. // chance to clean up.
  41032. context.method = "return";
  41033. context.arg = undefined;
  41034. maybeInvokeDelegate(delegate, context);
  41035. if (context.method === "throw") {
  41036. // If maybeInvokeDelegate(context) changed context.method from
  41037. // "return" to "throw", let that override the TypeError below.
  41038. return ContinueSentinel;
  41039. }
  41040. }
  41041. context.method = "throw";
  41042. context.arg = new TypeError(
  41043. "The iterator does not provide a 'throw' method");
  41044. }
  41045. return ContinueSentinel;
  41046. }
  41047. var record = tryCatch(method, delegate.iterator, context.arg);
  41048. if (record.type === "throw") {
  41049. context.method = "throw";
  41050. context.arg = record.arg;
  41051. context.delegate = null;
  41052. return ContinueSentinel;
  41053. }
  41054. var info = record.arg;
  41055. if (! info) {
  41056. context.method = "throw";
  41057. context.arg = new TypeError("iterator result is not an object");
  41058. context.delegate = null;
  41059. return ContinueSentinel;
  41060. }
  41061. if (info.done) {
  41062. // Assign the result of the finished delegate to the temporary
  41063. // variable specified by delegate.resultName (see delegateYield).
  41064. context[delegate.resultName] = info.value;
  41065. // Resume execution at the desired location (see delegateYield).
  41066. context.next = delegate.nextLoc;
  41067. // If context.method was "throw" but the delegate handled the
  41068. // exception, let the outer generator proceed normally. If
  41069. // context.method was "next", forget context.arg since it has been
  41070. // "consumed" by the delegate iterator. If context.method was
  41071. // "return", allow the original .return call to continue in the
  41072. // outer generator.
  41073. if (context.method !== "return") {
  41074. context.method = "next";
  41075. context.arg = undefined;
  41076. }
  41077. } else {
  41078. // Re-yield the result returned by the delegate method.
  41079. return info;
  41080. }
  41081. // The delegate iterator is finished, so forget it and continue with
  41082. // the outer generator.
  41083. context.delegate = null;
  41084. return ContinueSentinel;
  41085. }
  41086. // Define Generator.prototype.{next,throw,return} in terms of the
  41087. // unified ._invoke helper method.
  41088. defineIteratorMethods(Gp);
  41089. define(Gp, toStringTagSymbol, "Generator");
  41090. // A Generator should always return itself as the iterator object when the
  41091. // @@iterator function is called on it. Some browsers' implementations of the
  41092. // iterator prototype chain incorrectly implement this, causing the Generator
  41093. // object to not be returned from this call. This ensures that doesn't happen.
  41094. // See https://github.com/facebook/regenerator/issues/274 for more details.
  41095. define(Gp, iteratorSymbol, function() {
  41096. return this;
  41097. });
  41098. define(Gp, "toString", function() {
  41099. return "[object Generator]";
  41100. });
  41101. function pushTryEntry(locs) {
  41102. var entry = { tryLoc: locs[0] };
  41103. if (1 in locs) {
  41104. entry.catchLoc = locs[1];
  41105. }
  41106. if (2 in locs) {
  41107. entry.finallyLoc = locs[2];
  41108. entry.afterLoc = locs[3];
  41109. }
  41110. this.tryEntries.push(entry);
  41111. }
  41112. function resetTryEntry(entry) {
  41113. var record = entry.completion || {};
  41114. record.type = "normal";
  41115. delete record.arg;
  41116. entry.completion = record;
  41117. }
  41118. function Context(tryLocsList) {
  41119. // The root entry object (effectively a try statement without a catch
  41120. // or a finally block) gives us a place to store values thrown from
  41121. // locations where there is no enclosing try statement.
  41122. this.tryEntries = [{ tryLoc: "root" }];
  41123. tryLocsList.forEach(pushTryEntry, this);
  41124. this.reset(true);
  41125. }
  41126. exports.keys = function(object) {
  41127. var keys = [];
  41128. for (var key in object) {
  41129. keys.push(key);
  41130. }
  41131. keys.reverse();
  41132. // Rather than returning an object with a next method, we keep
  41133. // things simple and return the next function itself.
  41134. return function next() {
  41135. while (keys.length) {
  41136. var key = keys.pop();
  41137. if (key in object) {
  41138. next.value = key;
  41139. next.done = false;
  41140. return next;
  41141. }
  41142. }
  41143. // To avoid creating an additional object, we just hang the .value
  41144. // and .done properties off the next function object itself. This
  41145. // also ensures that the minifier will not anonymize the function.
  41146. next.done = true;
  41147. return next;
  41148. };
  41149. };
  41150. function values(iterable) {
  41151. if (iterable) {
  41152. var iteratorMethod = iterable[iteratorSymbol];
  41153. if (iteratorMethod) {
  41154. return iteratorMethod.call(iterable);
  41155. }
  41156. if (typeof iterable.next === "function") {
  41157. return iterable;
  41158. }
  41159. if (!isNaN(iterable.length)) {
  41160. var i = -1, next = function next() {
  41161. while (++i < iterable.length) {
  41162. if (hasOwn.call(iterable, i)) {
  41163. next.value = iterable[i];
  41164. next.done = false;
  41165. return next;
  41166. }
  41167. }
  41168. next.value = undefined;
  41169. next.done = true;
  41170. return next;
  41171. };
  41172. return next.next = next;
  41173. }
  41174. }
  41175. // Return an iterator with no values.
  41176. return { next: doneResult };
  41177. }
  41178. exports.values = values;
  41179. function doneResult() {
  41180. return { value: undefined, done: true };
  41181. }
  41182. Context.prototype = {
  41183. constructor: Context,
  41184. reset: function(skipTempReset) {
  41185. this.prev = 0;
  41186. this.next = 0;
  41187. // Resetting context._sent for legacy support of Babel's
  41188. // function.sent implementation.
  41189. this.sent = this._sent = undefined;
  41190. this.done = false;
  41191. this.delegate = null;
  41192. this.method = "next";
  41193. this.arg = undefined;
  41194. this.tryEntries.forEach(resetTryEntry);
  41195. if (!skipTempReset) {
  41196. for (var name in this) {
  41197. // Not sure about the optimal order of these conditions:
  41198. if (name.charAt(0) === "t" &&
  41199. hasOwn.call(this, name) &&
  41200. !isNaN(+name.slice(1))) {
  41201. this[name] = undefined;
  41202. }
  41203. }
  41204. }
  41205. },
  41206. stop: function() {
  41207. this.done = true;
  41208. var rootEntry = this.tryEntries[0];
  41209. var rootRecord = rootEntry.completion;
  41210. if (rootRecord.type === "throw") {
  41211. throw rootRecord.arg;
  41212. }
  41213. return this.rval;
  41214. },
  41215. dispatchException: function(exception) {
  41216. if (this.done) {
  41217. throw exception;
  41218. }
  41219. var context = this;
  41220. function handle(loc, caught) {
  41221. record.type = "throw";
  41222. record.arg = exception;
  41223. context.next = loc;
  41224. if (caught) {
  41225. // If the dispatched exception was caught by a catch block,
  41226. // then let that catch block handle the exception normally.
  41227. context.method = "next";
  41228. context.arg = undefined;
  41229. }
  41230. return !! caught;
  41231. }
  41232. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41233. var entry = this.tryEntries[i];
  41234. var record = entry.completion;
  41235. if (entry.tryLoc === "root") {
  41236. // Exception thrown outside of any try block that could handle
  41237. // it, so set the completion value of the entire function to
  41238. // throw the exception.
  41239. return handle("end");
  41240. }
  41241. if (entry.tryLoc <= this.prev) {
  41242. var hasCatch = hasOwn.call(entry, "catchLoc");
  41243. var hasFinally = hasOwn.call(entry, "finallyLoc");
  41244. if (hasCatch && hasFinally) {
  41245. if (this.prev < entry.catchLoc) {
  41246. return handle(entry.catchLoc, true);
  41247. } else if (this.prev < entry.finallyLoc) {
  41248. return handle(entry.finallyLoc);
  41249. }
  41250. } else if (hasCatch) {
  41251. if (this.prev < entry.catchLoc) {
  41252. return handle(entry.catchLoc, true);
  41253. }
  41254. } else if (hasFinally) {
  41255. if (this.prev < entry.finallyLoc) {
  41256. return handle(entry.finallyLoc);
  41257. }
  41258. } else {
  41259. throw new Error("try statement without catch or finally");
  41260. }
  41261. }
  41262. }
  41263. },
  41264. abrupt: function(type, arg) {
  41265. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41266. var entry = this.tryEntries[i];
  41267. if (entry.tryLoc <= this.prev &&
  41268. hasOwn.call(entry, "finallyLoc") &&
  41269. this.prev < entry.finallyLoc) {
  41270. var finallyEntry = entry;
  41271. break;
  41272. }
  41273. }
  41274. if (finallyEntry &&
  41275. (type === "break" ||
  41276. type === "continue") &&
  41277. finallyEntry.tryLoc <= arg &&
  41278. arg <= finallyEntry.finallyLoc) {
  41279. // Ignore the finally entry if control is not jumping to a
  41280. // location outside the try/catch block.
  41281. finallyEntry = null;
  41282. }
  41283. var record = finallyEntry ? finallyEntry.completion : {};
  41284. record.type = type;
  41285. record.arg = arg;
  41286. if (finallyEntry) {
  41287. this.method = "next";
  41288. this.next = finallyEntry.finallyLoc;
  41289. return ContinueSentinel;
  41290. }
  41291. return this.complete(record);
  41292. },
  41293. complete: function(record, afterLoc) {
  41294. if (record.type === "throw") {
  41295. throw record.arg;
  41296. }
  41297. if (record.type === "break" ||
  41298. record.type === "continue") {
  41299. this.next = record.arg;
  41300. } else if (record.type === "return") {
  41301. this.rval = this.arg = record.arg;
  41302. this.method = "return";
  41303. this.next = "end";
  41304. } else if (record.type === "normal" && afterLoc) {
  41305. this.next = afterLoc;
  41306. }
  41307. return ContinueSentinel;
  41308. },
  41309. finish: function(finallyLoc) {
  41310. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41311. var entry = this.tryEntries[i];
  41312. if (entry.finallyLoc === finallyLoc) {
  41313. this.complete(entry.completion, entry.afterLoc);
  41314. resetTryEntry(entry);
  41315. return ContinueSentinel;
  41316. }
  41317. }
  41318. },
  41319. "catch": function(tryLoc) {
  41320. for (var i = this.tryEntries.length - 1; i >= 0; --i) {
  41321. var entry = this.tryEntries[i];
  41322. if (entry.tryLoc === tryLoc) {
  41323. var record = entry.completion;
  41324. if (record.type === "throw") {
  41325. var thrown = record.arg;
  41326. resetTryEntry(entry);
  41327. }
  41328. return thrown;
  41329. }
  41330. }
  41331. // The context.catch method must only be called with a location
  41332. // argument that corresponds to a known catch block.
  41333. throw new Error("illegal catch attempt");
  41334. },
  41335. delegateYield: function(iterable, resultName, nextLoc) {
  41336. this.delegate = {
  41337. iterator: values(iterable),
  41338. resultName: resultName,
  41339. nextLoc: nextLoc
  41340. };
  41341. if (this.method === "next") {
  41342. // Deliberately forget the last sent value so that we don't
  41343. // accidentally pass it on to the delegate.
  41344. this.arg = undefined;
  41345. }
  41346. return ContinueSentinel;
  41347. }
  41348. };
  41349. // Regardless of whether this script is executing as a CommonJS module
  41350. // or not, return the runtime object so that we can declare the variable
  41351. // regeneratorRuntime in the outer scope, which allows this module to be
  41352. // injected easily by `bin/regenerator --include-runtime script.js`.
  41353. return exports;
  41354. }(
  41355. // If this script is executing as a CommonJS module, use module.exports
  41356. // as the regeneratorRuntime namespace. Otherwise create a new empty
  41357. // object. Either way, the resulting object will be used to initialize
  41358. // the regeneratorRuntime variable at the top of this file.
  41359. true ? module.exports : 0
  41360. ));
  41361. try {
  41362. regeneratorRuntime = runtime;
  41363. } catch (accidentalStrictMode) {
  41364. // This module should not be running in strict mode, so the above
  41365. // assignment should always work unless something is misconfigured. Just
  41366. // in case runtime.js accidentally runs in strict mode, in modern engines
  41367. // we can explicitly access globalThis. In older engines we can escape
  41368. // strict mode using a global Function call. This could conceivably fail
  41369. // if a Content Security Policy forbids using Function, but in that case
  41370. // the proper solution is to fix the accidental strict mode problem. If
  41371. // you've misconfigured your bundler to force strict mode and applied a
  41372. // CSP to forbid Function, and you're not willing to fix either of those
  41373. // problems, please detail your unique predicament in a GitHub issue.
  41374. if (typeof globalThis === "object") {
  41375. globalThis.regeneratorRuntime = runtime;
  41376. } else {
  41377. Function("r", "regeneratorRuntime = r")(runtime);
  41378. }
  41379. }
  41380. /***/ }),
  41381. /***/ 3697:
  41382. /***/ (function(module) {
  41383. "use strict";
  41384. var $Object = Object;
  41385. var $TypeError = TypeError;
  41386. module.exports = function flags() {
  41387. if (this != null && this !== $Object(this)) {
  41388. throw new $TypeError('RegExp.prototype.flags getter called on non-object');
  41389. }
  41390. var result = '';
  41391. if (this.global) {
  41392. result += 'g';
  41393. }
  41394. if (this.ignoreCase) {
  41395. result += 'i';
  41396. }
  41397. if (this.multiline) {
  41398. result += 'm';
  41399. }
  41400. if (this.dotAll) {
  41401. result += 's';
  41402. }
  41403. if (this.unicode) {
  41404. result += 'u';
  41405. }
  41406. if (this.sticky) {
  41407. result += 'y';
  41408. }
  41409. return result;
  41410. };
  41411. /***/ }),
  41412. /***/ 2847:
  41413. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  41414. "use strict";
  41415. var define = __webpack_require__(4289);
  41416. var callBind = __webpack_require__(5559);
  41417. var implementation = __webpack_require__(3697);
  41418. var getPolyfill = __webpack_require__(1721);
  41419. var shim = __webpack_require__(2753);
  41420. var flagsBound = callBind(implementation);
  41421. define(flagsBound, {
  41422. getPolyfill: getPolyfill,
  41423. implementation: implementation,
  41424. shim: shim
  41425. });
  41426. module.exports = flagsBound;
  41427. /***/ }),
  41428. /***/ 1721:
  41429. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  41430. "use strict";
  41431. var implementation = __webpack_require__(3697);
  41432. var supportsDescriptors = (__webpack_require__(4289).supportsDescriptors);
  41433. var $gOPD = Object.getOwnPropertyDescriptor;
  41434. var $TypeError = TypeError;
  41435. module.exports = function getPolyfill() {
  41436. if (!supportsDescriptors) {
  41437. throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
  41438. }
  41439. if ((/a/mig).flags === 'gim') {
  41440. var descriptor = $gOPD(RegExp.prototype, 'flags');
  41441. if (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') {
  41442. return descriptor.get;
  41443. }
  41444. }
  41445. return implementation;
  41446. };
  41447. /***/ }),
  41448. /***/ 2753:
  41449. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  41450. "use strict";
  41451. var supportsDescriptors = (__webpack_require__(4289).supportsDescriptors);
  41452. var getPolyfill = __webpack_require__(1721);
  41453. var gOPD = Object.getOwnPropertyDescriptor;
  41454. var defineProperty = Object.defineProperty;
  41455. var TypeErr = TypeError;
  41456. var getProto = Object.getPrototypeOf;
  41457. var regex = /a/;
  41458. module.exports = function shimFlags() {
  41459. if (!supportsDescriptors || !getProto) {
  41460. throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors');
  41461. }
  41462. var polyfill = getPolyfill();
  41463. var proto = getProto(regex);
  41464. var descriptor = gOPD(proto, 'flags');
  41465. if (!descriptor || descriptor.get !== polyfill) {
  41466. defineProperty(proto, 'flags', {
  41467. configurable: true,
  41468. enumerable: false,
  41469. get: polyfill
  41470. });
  41471. }
  41472. return polyfill;
  41473. };
  41474. /***/ }),
  41475. /***/ 6099:
  41476. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  41477. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  41478. ;(function (sax) { // wrapper for non-node envs
  41479. sax.parser = function (strict, opt) { return new SAXParser(strict, opt) }
  41480. sax.SAXParser = SAXParser
  41481. sax.SAXStream = SAXStream
  41482. sax.createStream = createStream
  41483. // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns.
  41484. // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
  41485. // since that's the earliest that a buffer overrun could occur. This way, checks are
  41486. // as rare as required, but as often as necessary to ensure never crossing this bound.
  41487. // Furthermore, buffers are only tested at most once per write(), so passing a very
  41488. // large string into write() might have undesirable effects, but this is manageable by
  41489. // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme
  41490. // edge case, result in creating at most one complete copy of the string passed in.
  41491. // Set to Infinity to have unlimited buffers.
  41492. sax.MAX_BUFFER_LENGTH = 64 * 1024
  41493. var buffers = [
  41494. 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype',
  41495. 'procInstName', 'procInstBody', 'entity', 'attribName',
  41496. 'attribValue', 'cdata', 'script'
  41497. ]
  41498. sax.EVENTS = [
  41499. 'text',
  41500. 'processinginstruction',
  41501. 'sgmldeclaration',
  41502. 'doctype',
  41503. 'comment',
  41504. 'opentagstart',
  41505. 'attribute',
  41506. 'opentag',
  41507. 'closetag',
  41508. 'opencdata',
  41509. 'cdata',
  41510. 'closecdata',
  41511. 'error',
  41512. 'end',
  41513. 'ready',
  41514. 'script',
  41515. 'opennamespace',
  41516. 'closenamespace'
  41517. ]
  41518. function SAXParser (strict, opt) {
  41519. if (!(this instanceof SAXParser)) {
  41520. return new SAXParser(strict, opt)
  41521. }
  41522. var parser = this
  41523. clearBuffers(parser)
  41524. parser.q = parser.c = ''
  41525. parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH
  41526. parser.opt = opt || {}
  41527. parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags
  41528. parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase'
  41529. parser.tags = []
  41530. parser.closed = parser.closedRoot = parser.sawRoot = false
  41531. parser.tag = parser.error = null
  41532. parser.strict = !!strict
  41533. parser.noscript = !!(strict || parser.opt.noscript)
  41534. parser.state = S.BEGIN
  41535. parser.strictEntities = parser.opt.strictEntities
  41536. parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES)
  41537. parser.attribList = []
  41538. // namespaces form a prototype chain.
  41539. // it always points at the current tag,
  41540. // which protos to its parent tag.
  41541. if (parser.opt.xmlns) {
  41542. parser.ns = Object.create(rootNS)
  41543. }
  41544. // mostly just for error reporting
  41545. parser.trackPosition = parser.opt.position !== false
  41546. if (parser.trackPosition) {
  41547. parser.position = parser.line = parser.column = 0
  41548. }
  41549. emit(parser, 'onready')
  41550. }
  41551. if (!Object.create) {
  41552. Object.create = function (o) {
  41553. function F () {}
  41554. F.prototype = o
  41555. var newf = new F()
  41556. return newf
  41557. }
  41558. }
  41559. if (!Object.keys) {
  41560. Object.keys = function (o) {
  41561. var a = []
  41562. for (var i in o) if (o.hasOwnProperty(i)) a.push(i)
  41563. return a
  41564. }
  41565. }
  41566. function checkBufferLength (parser) {
  41567. var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10)
  41568. var maxActual = 0
  41569. for (var i = 0, l = buffers.length; i < l; i++) {
  41570. var len = parser[buffers[i]].length
  41571. if (len > maxAllowed) {
  41572. // Text/cdata nodes can get big, and since they're buffered,
  41573. // we can get here under normal conditions.
  41574. // Avoid issues by emitting the text node now,
  41575. // so at least it won't get any bigger.
  41576. switch (buffers[i]) {
  41577. case 'textNode':
  41578. closeText(parser)
  41579. break
  41580. case 'cdata':
  41581. emitNode(parser, 'oncdata', parser.cdata)
  41582. parser.cdata = ''
  41583. break
  41584. case 'script':
  41585. emitNode(parser, 'onscript', parser.script)
  41586. parser.script = ''
  41587. break
  41588. default:
  41589. error(parser, 'Max buffer length exceeded: ' + buffers[i])
  41590. }
  41591. }
  41592. maxActual = Math.max(maxActual, len)
  41593. }
  41594. // schedule the next check for the earliest possible buffer overrun.
  41595. var m = sax.MAX_BUFFER_LENGTH - maxActual
  41596. parser.bufferCheckPosition = m + parser.position
  41597. }
  41598. function clearBuffers (parser) {
  41599. for (var i = 0, l = buffers.length; i < l; i++) {
  41600. parser[buffers[i]] = ''
  41601. }
  41602. }
  41603. function flushBuffers (parser) {
  41604. closeText(parser)
  41605. if (parser.cdata !== '') {
  41606. emitNode(parser, 'oncdata', parser.cdata)
  41607. parser.cdata = ''
  41608. }
  41609. if (parser.script !== '') {
  41610. emitNode(parser, 'onscript', parser.script)
  41611. parser.script = ''
  41612. }
  41613. }
  41614. SAXParser.prototype = {
  41615. end: function () { end(this) },
  41616. write: write,
  41617. resume: function () { this.error = null; return this },
  41618. close: function () { return this.write(null) },
  41619. flush: function () { flushBuffers(this) }
  41620. }
  41621. var Stream
  41622. try {
  41623. Stream = (__webpack_require__(2830).Stream)
  41624. } catch (ex) {
  41625. Stream = function () {}
  41626. }
  41627. var streamWraps = sax.EVENTS.filter(function (ev) {
  41628. return ev !== 'error' && ev !== 'end'
  41629. })
  41630. function createStream (strict, opt) {
  41631. return new SAXStream(strict, opt)
  41632. }
  41633. function SAXStream (strict, opt) {
  41634. if (!(this instanceof SAXStream)) {
  41635. return new SAXStream(strict, opt)
  41636. }
  41637. Stream.apply(this)
  41638. this._parser = new SAXParser(strict, opt)
  41639. this.writable = true
  41640. this.readable = true
  41641. var me = this
  41642. this._parser.onend = function () {
  41643. me.emit('end')
  41644. }
  41645. this._parser.onerror = function (er) {
  41646. me.emit('error', er)
  41647. // if didn't throw, then means error was handled.
  41648. // go ahead and clear error, so we can write again.
  41649. me._parser.error = null
  41650. }
  41651. this._decoder = null
  41652. streamWraps.forEach(function (ev) {
  41653. Object.defineProperty(me, 'on' + ev, {
  41654. get: function () {
  41655. return me._parser['on' + ev]
  41656. },
  41657. set: function (h) {
  41658. if (!h) {
  41659. me.removeAllListeners(ev)
  41660. me._parser['on' + ev] = h
  41661. return h
  41662. }
  41663. me.on(ev, h)
  41664. },
  41665. enumerable: true,
  41666. configurable: false
  41667. })
  41668. })
  41669. }
  41670. SAXStream.prototype = Object.create(Stream.prototype, {
  41671. constructor: {
  41672. value: SAXStream
  41673. }
  41674. })
  41675. SAXStream.prototype.write = function (data) {
  41676. if (typeof Buffer === 'function' &&
  41677. typeof Buffer.isBuffer === 'function' &&
  41678. Buffer.isBuffer(data)) {
  41679. if (!this._decoder) {
  41680. var SD = (__webpack_require__(2553)/* .StringDecoder */ .s)
  41681. this._decoder = new SD('utf8')
  41682. }
  41683. data = this._decoder.write(data)
  41684. }
  41685. this._parser.write(data.toString())
  41686. this.emit('data', data)
  41687. return true
  41688. }
  41689. SAXStream.prototype.end = function (chunk) {
  41690. if (chunk && chunk.length) {
  41691. this.write(chunk)
  41692. }
  41693. this._parser.end()
  41694. return true
  41695. }
  41696. SAXStream.prototype.on = function (ev, handler) {
  41697. var me = this
  41698. if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
  41699. me._parser['on' + ev] = function () {
  41700. var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments)
  41701. args.splice(0, 0, ev)
  41702. me.emit.apply(me, args)
  41703. }
  41704. }
  41705. return Stream.prototype.on.call(me, ev, handler)
  41706. }
  41707. // this really needs to be replaced with character classes.
  41708. // XML allows all manner of ridiculous numbers and digits.
  41709. var CDATA = '[CDATA['
  41710. var DOCTYPE = 'DOCTYPE'
  41711. var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace'
  41712. var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/'
  41713. var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE }
  41714. // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
  41715. // This implementation works on strings, a single character at a time
  41716. // as such, it cannot ever support astral-plane characters (10000-EFFFF)
  41717. // without a significant breaking change to either this parser, or the
  41718. // JavaScript language. Implementation of an emoji-capable xml parser
  41719. // is left as an exercise for the reader.
  41720. var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
  41721. var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
  41722. var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/
  41723. var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/
  41724. function isWhitespace (c) {
  41725. return c === ' ' || c === '\n' || c === '\r' || c === '\t'
  41726. }
  41727. function isQuote (c) {
  41728. return c === '"' || c === '\''
  41729. }
  41730. function isAttribEnd (c) {
  41731. return c === '>' || isWhitespace(c)
  41732. }
  41733. function isMatch (regex, c) {
  41734. return regex.test(c)
  41735. }
  41736. function notMatch (regex, c) {
  41737. return !isMatch(regex, c)
  41738. }
  41739. var S = 0
  41740. sax.STATE = {
  41741. BEGIN: S++, // leading byte order mark or whitespace
  41742. BEGIN_WHITESPACE: S++, // leading whitespace
  41743. TEXT: S++, // general stuff
  41744. TEXT_ENTITY: S++, // &amp and such.
  41745. OPEN_WAKA: S++, // <
  41746. SGML_DECL: S++, // <!BLARG
  41747. SGML_DECL_QUOTED: S++, // <!BLARG foo "bar
  41748. DOCTYPE: S++, // <!DOCTYPE
  41749. DOCTYPE_QUOTED: S++, // <!DOCTYPE "//blah
  41750. DOCTYPE_DTD: S++, // <!DOCTYPE "//blah" [ ...
  41751. DOCTYPE_DTD_QUOTED: S++, // <!DOCTYPE "//blah" [ "foo
  41752. COMMENT_STARTING: S++, // <!-
  41753. COMMENT: S++, // <!--
  41754. COMMENT_ENDING: S++, // <!-- blah -
  41755. COMMENT_ENDED: S++, // <!-- blah --
  41756. CDATA: S++, // <![CDATA[ something
  41757. CDATA_ENDING: S++, // ]
  41758. CDATA_ENDING_2: S++, // ]]
  41759. PROC_INST: S++, // <?hi
  41760. PROC_INST_BODY: S++, // <?hi there
  41761. PROC_INST_ENDING: S++, // <?hi "there" ?
  41762. OPEN_TAG: S++, // <strong
  41763. OPEN_TAG_SLASH: S++, // <strong /
  41764. ATTRIB: S++, // <a
  41765. ATTRIB_NAME: S++, // <a foo
  41766. ATTRIB_NAME_SAW_WHITE: S++, // <a foo _
  41767. ATTRIB_VALUE: S++, // <a foo=
  41768. ATTRIB_VALUE_QUOTED: S++, // <a foo="bar
  41769. ATTRIB_VALUE_CLOSED: S++, // <a foo="bar"
  41770. ATTRIB_VALUE_UNQUOTED: S++, // <a foo=bar
  41771. ATTRIB_VALUE_ENTITY_Q: S++, // <foo bar="&quot;"
  41772. ATTRIB_VALUE_ENTITY_U: S++, // <foo bar=&quot
  41773. CLOSE_TAG: S++, // </a
  41774. CLOSE_TAG_SAW_WHITE: S++, // </a >
  41775. SCRIPT: S++, // <script> ...
  41776. SCRIPT_ENDING: S++ // <script> ... <
  41777. }
  41778. sax.XML_ENTITIES = {
  41779. 'amp': '&',
  41780. 'gt': '>',
  41781. 'lt': '<',
  41782. 'quot': '"',
  41783. 'apos': "'"
  41784. }
  41785. sax.ENTITIES = {
  41786. 'amp': '&',
  41787. 'gt': '>',
  41788. 'lt': '<',
  41789. 'quot': '"',
  41790. 'apos': "'",
  41791. 'AElig': 198,
  41792. 'Aacute': 193,
  41793. 'Acirc': 194,
  41794. 'Agrave': 192,
  41795. 'Aring': 197,
  41796. 'Atilde': 195,
  41797. 'Auml': 196,
  41798. 'Ccedil': 199,
  41799. 'ETH': 208,
  41800. 'Eacute': 201,
  41801. 'Ecirc': 202,
  41802. 'Egrave': 200,
  41803. 'Euml': 203,
  41804. 'Iacute': 205,
  41805. 'Icirc': 206,
  41806. 'Igrave': 204,
  41807. 'Iuml': 207,
  41808. 'Ntilde': 209,
  41809. 'Oacute': 211,
  41810. 'Ocirc': 212,
  41811. 'Ograve': 210,
  41812. 'Oslash': 216,
  41813. 'Otilde': 213,
  41814. 'Ouml': 214,
  41815. 'THORN': 222,
  41816. 'Uacute': 218,
  41817. 'Ucirc': 219,
  41818. 'Ugrave': 217,
  41819. 'Uuml': 220,
  41820. 'Yacute': 221,
  41821. 'aacute': 225,
  41822. 'acirc': 226,
  41823. 'aelig': 230,
  41824. 'agrave': 224,
  41825. 'aring': 229,
  41826. 'atilde': 227,
  41827. 'auml': 228,
  41828. 'ccedil': 231,
  41829. 'eacute': 233,
  41830. 'ecirc': 234,
  41831. 'egrave': 232,
  41832. 'eth': 240,
  41833. 'euml': 235,
  41834. 'iacute': 237,
  41835. 'icirc': 238,
  41836. 'igrave': 236,
  41837. 'iuml': 239,
  41838. 'ntilde': 241,
  41839. 'oacute': 243,
  41840. 'ocirc': 244,
  41841. 'ograve': 242,
  41842. 'oslash': 248,
  41843. 'otilde': 245,
  41844. 'ouml': 246,
  41845. 'szlig': 223,
  41846. 'thorn': 254,
  41847. 'uacute': 250,
  41848. 'ucirc': 251,
  41849. 'ugrave': 249,
  41850. 'uuml': 252,
  41851. 'yacute': 253,
  41852. 'yuml': 255,
  41853. 'copy': 169,
  41854. 'reg': 174,
  41855. 'nbsp': 160,
  41856. 'iexcl': 161,
  41857. 'cent': 162,
  41858. 'pound': 163,
  41859. 'curren': 164,
  41860. 'yen': 165,
  41861. 'brvbar': 166,
  41862. 'sect': 167,
  41863. 'uml': 168,
  41864. 'ordf': 170,
  41865. 'laquo': 171,
  41866. 'not': 172,
  41867. 'shy': 173,
  41868. 'macr': 175,
  41869. 'deg': 176,
  41870. 'plusmn': 177,
  41871. 'sup1': 185,
  41872. 'sup2': 178,
  41873. 'sup3': 179,
  41874. 'acute': 180,
  41875. 'micro': 181,
  41876. 'para': 182,
  41877. 'middot': 183,
  41878. 'cedil': 184,
  41879. 'ordm': 186,
  41880. 'raquo': 187,
  41881. 'frac14': 188,
  41882. 'frac12': 189,
  41883. 'frac34': 190,
  41884. 'iquest': 191,
  41885. 'times': 215,
  41886. 'divide': 247,
  41887. 'OElig': 338,
  41888. 'oelig': 339,
  41889. 'Scaron': 352,
  41890. 'scaron': 353,
  41891. 'Yuml': 376,
  41892. 'fnof': 402,
  41893. 'circ': 710,
  41894. 'tilde': 732,
  41895. 'Alpha': 913,
  41896. 'Beta': 914,
  41897. 'Gamma': 915,
  41898. 'Delta': 916,
  41899. 'Epsilon': 917,
  41900. 'Zeta': 918,
  41901. 'Eta': 919,
  41902. 'Theta': 920,
  41903. 'Iota': 921,
  41904. 'Kappa': 922,
  41905. 'Lambda': 923,
  41906. 'Mu': 924,
  41907. 'Nu': 925,
  41908. 'Xi': 926,
  41909. 'Omicron': 927,
  41910. 'Pi': 928,
  41911. 'Rho': 929,
  41912. 'Sigma': 931,
  41913. 'Tau': 932,
  41914. 'Upsilon': 933,
  41915. 'Phi': 934,
  41916. 'Chi': 935,
  41917. 'Psi': 936,
  41918. 'Omega': 937,
  41919. 'alpha': 945,
  41920. 'beta': 946,
  41921. 'gamma': 947,
  41922. 'delta': 948,
  41923. 'epsilon': 949,
  41924. 'zeta': 950,
  41925. 'eta': 951,
  41926. 'theta': 952,
  41927. 'iota': 953,
  41928. 'kappa': 954,
  41929. 'lambda': 955,
  41930. 'mu': 956,
  41931. 'nu': 957,
  41932. 'xi': 958,
  41933. 'omicron': 959,
  41934. 'pi': 960,
  41935. 'rho': 961,
  41936. 'sigmaf': 962,
  41937. 'sigma': 963,
  41938. 'tau': 964,
  41939. 'upsilon': 965,
  41940. 'phi': 966,
  41941. 'chi': 967,
  41942. 'psi': 968,
  41943. 'omega': 969,
  41944. 'thetasym': 977,
  41945. 'upsih': 978,
  41946. 'piv': 982,
  41947. 'ensp': 8194,
  41948. 'emsp': 8195,
  41949. 'thinsp': 8201,
  41950. 'zwnj': 8204,
  41951. 'zwj': 8205,
  41952. 'lrm': 8206,
  41953. 'rlm': 8207,
  41954. 'ndash': 8211,
  41955. 'mdash': 8212,
  41956. 'lsquo': 8216,
  41957. 'rsquo': 8217,
  41958. 'sbquo': 8218,
  41959. 'ldquo': 8220,
  41960. 'rdquo': 8221,
  41961. 'bdquo': 8222,
  41962. 'dagger': 8224,
  41963. 'Dagger': 8225,
  41964. 'bull': 8226,
  41965. 'hellip': 8230,
  41966. 'permil': 8240,
  41967. 'prime': 8242,
  41968. 'Prime': 8243,
  41969. 'lsaquo': 8249,
  41970. 'rsaquo': 8250,
  41971. 'oline': 8254,
  41972. 'frasl': 8260,
  41973. 'euro': 8364,
  41974. 'image': 8465,
  41975. 'weierp': 8472,
  41976. 'real': 8476,
  41977. 'trade': 8482,
  41978. 'alefsym': 8501,
  41979. 'larr': 8592,
  41980. 'uarr': 8593,
  41981. 'rarr': 8594,
  41982. 'darr': 8595,
  41983. 'harr': 8596,
  41984. 'crarr': 8629,
  41985. 'lArr': 8656,
  41986. 'uArr': 8657,
  41987. 'rArr': 8658,
  41988. 'dArr': 8659,
  41989. 'hArr': 8660,
  41990. 'forall': 8704,
  41991. 'part': 8706,
  41992. 'exist': 8707,
  41993. 'empty': 8709,
  41994. 'nabla': 8711,
  41995. 'isin': 8712,
  41996. 'notin': 8713,
  41997. 'ni': 8715,
  41998. 'prod': 8719,
  41999. 'sum': 8721,
  42000. 'minus': 8722,
  42001. 'lowast': 8727,
  42002. 'radic': 8730,
  42003. 'prop': 8733,
  42004. 'infin': 8734,
  42005. 'ang': 8736,
  42006. 'and': 8743,
  42007. 'or': 8744,
  42008. 'cap': 8745,
  42009. 'cup': 8746,
  42010. 'int': 8747,
  42011. 'there4': 8756,
  42012. 'sim': 8764,
  42013. 'cong': 8773,
  42014. 'asymp': 8776,
  42015. 'ne': 8800,
  42016. 'equiv': 8801,
  42017. 'le': 8804,
  42018. 'ge': 8805,
  42019. 'sub': 8834,
  42020. 'sup': 8835,
  42021. 'nsub': 8836,
  42022. 'sube': 8838,
  42023. 'supe': 8839,
  42024. 'oplus': 8853,
  42025. 'otimes': 8855,
  42026. 'perp': 8869,
  42027. 'sdot': 8901,
  42028. 'lceil': 8968,
  42029. 'rceil': 8969,
  42030. 'lfloor': 8970,
  42031. 'rfloor': 8971,
  42032. 'lang': 9001,
  42033. 'rang': 9002,
  42034. 'loz': 9674,
  42035. 'spades': 9824,
  42036. 'clubs': 9827,
  42037. 'hearts': 9829,
  42038. 'diams': 9830
  42039. }
  42040. Object.keys(sax.ENTITIES).forEach(function (key) {
  42041. var e = sax.ENTITIES[key]
  42042. var s = typeof e === 'number' ? String.fromCharCode(e) : e
  42043. sax.ENTITIES[key] = s
  42044. })
  42045. for (var s in sax.STATE) {
  42046. sax.STATE[sax.STATE[s]] = s
  42047. }
  42048. // shorthand
  42049. S = sax.STATE
  42050. function emit (parser, event, data) {
  42051. parser[event] && parser[event](data)
  42052. }
  42053. function emitNode (parser, nodeType, data) {
  42054. if (parser.textNode) closeText(parser)
  42055. emit(parser, nodeType, data)
  42056. }
  42057. function closeText (parser) {
  42058. parser.textNode = textopts(parser.opt, parser.textNode)
  42059. if (parser.textNode) emit(parser, 'ontext', parser.textNode)
  42060. parser.textNode = ''
  42061. }
  42062. function textopts (opt, text) {
  42063. if (opt.trim) text = text.trim()
  42064. if (opt.normalize) text = text.replace(/\s+/g, ' ')
  42065. return text
  42066. }
  42067. function error (parser, er) {
  42068. closeText(parser)
  42069. if (parser.trackPosition) {
  42070. er += '\nLine: ' + parser.line +
  42071. '\nColumn: ' + parser.column +
  42072. '\nChar: ' + parser.c
  42073. }
  42074. er = new Error(er)
  42075. parser.error = er
  42076. emit(parser, 'onerror', er)
  42077. return parser
  42078. }
  42079. function end (parser) {
  42080. if (parser.sawRoot && !parser.closedRoot) strictFail(parser, 'Unclosed root tag')
  42081. if ((parser.state !== S.BEGIN) &&
  42082. (parser.state !== S.BEGIN_WHITESPACE) &&
  42083. (parser.state !== S.TEXT)) {
  42084. error(parser, 'Unexpected end')
  42085. }
  42086. closeText(parser)
  42087. parser.c = ''
  42088. parser.closed = true
  42089. emit(parser, 'onend')
  42090. SAXParser.call(parser, parser.strict, parser.opt)
  42091. return parser
  42092. }
  42093. function strictFail (parser, message) {
  42094. if (typeof parser !== 'object' || !(parser instanceof SAXParser)) {
  42095. throw new Error('bad call to strictFail')
  42096. }
  42097. if (parser.strict) {
  42098. error(parser, message)
  42099. }
  42100. }
  42101. function newTag (parser) {
  42102. if (!parser.strict) parser.tagName = parser.tagName[parser.looseCase]()
  42103. var parent = parser.tags[parser.tags.length - 1] || parser
  42104. var tag = parser.tag = { name: parser.tagName, attributes: {} }
  42105. // will be overridden if tag contails an xmlns="foo" or xmlns:foo="bar"
  42106. if (parser.opt.xmlns) {
  42107. tag.ns = parent.ns
  42108. }
  42109. parser.attribList.length = 0
  42110. emitNode(parser, 'onopentagstart', tag)
  42111. }
  42112. function qname (name, attribute) {
  42113. var i = name.indexOf(':')
  42114. var qualName = i < 0 ? [ '', name ] : name.split(':')
  42115. var prefix = qualName[0]
  42116. var local = qualName[1]
  42117. // <x "xmlns"="http://foo">
  42118. if (attribute && name === 'xmlns') {
  42119. prefix = 'xmlns'
  42120. local = ''
  42121. }
  42122. return { prefix: prefix, local: local }
  42123. }
  42124. function attrib (parser) {
  42125. if (!parser.strict) {
  42126. parser.attribName = parser.attribName[parser.looseCase]()
  42127. }
  42128. if (parser.attribList.indexOf(parser.attribName) !== -1 ||
  42129. parser.tag.attributes.hasOwnProperty(parser.attribName)) {
  42130. parser.attribName = parser.attribValue = ''
  42131. return
  42132. }
  42133. if (parser.opt.xmlns) {
  42134. var qn = qname(parser.attribName, true)
  42135. var prefix = qn.prefix
  42136. var local = qn.local
  42137. if (prefix === 'xmlns') {
  42138. // namespace binding attribute. push the binding into scope
  42139. if (local === 'xml' && parser.attribValue !== XML_NAMESPACE) {
  42140. strictFail(parser,
  42141. 'xml: prefix must be bound to ' + XML_NAMESPACE + '\n' +
  42142. 'Actual: ' + parser.attribValue)
  42143. } else if (local === 'xmlns' && parser.attribValue !== XMLNS_NAMESPACE) {
  42144. strictFail(parser,
  42145. 'xmlns: prefix must be bound to ' + XMLNS_NAMESPACE + '\n' +
  42146. 'Actual: ' + parser.attribValue)
  42147. } else {
  42148. var tag = parser.tag
  42149. var parent = parser.tags[parser.tags.length - 1] || parser
  42150. if (tag.ns === parent.ns) {
  42151. tag.ns = Object.create(parent.ns)
  42152. }
  42153. tag.ns[local] = parser.attribValue
  42154. }
  42155. }
  42156. // defer onattribute events until all attributes have been seen
  42157. // so any new bindings can take effect. preserve attribute order
  42158. // so deferred events can be emitted in document order
  42159. parser.attribList.push([parser.attribName, parser.attribValue])
  42160. } else {
  42161. // in non-xmlns mode, we can emit the event right away
  42162. parser.tag.attributes[parser.attribName] = parser.attribValue
  42163. emitNode(parser, 'onattribute', {
  42164. name: parser.attribName,
  42165. value: parser.attribValue
  42166. })
  42167. }
  42168. parser.attribName = parser.attribValue = ''
  42169. }
  42170. function openTag (parser, selfClosing) {
  42171. if (parser.opt.xmlns) {
  42172. // emit namespace binding events
  42173. var tag = parser.tag
  42174. // add namespace info to tag
  42175. var qn = qname(parser.tagName)
  42176. tag.prefix = qn.prefix
  42177. tag.local = qn.local
  42178. tag.uri = tag.ns[qn.prefix] || ''
  42179. if (tag.prefix && !tag.uri) {
  42180. strictFail(parser, 'Unbound namespace prefix: ' +
  42181. JSON.stringify(parser.tagName))
  42182. tag.uri = qn.prefix
  42183. }
  42184. var parent = parser.tags[parser.tags.length - 1] || parser
  42185. if (tag.ns && parent.ns !== tag.ns) {
  42186. Object.keys(tag.ns).forEach(function (p) {
  42187. emitNode(parser, 'onopennamespace', {
  42188. prefix: p,
  42189. uri: tag.ns[p]
  42190. })
  42191. })
  42192. }
  42193. // handle deferred onattribute events
  42194. // Note: do not apply default ns to attributes:
  42195. // http://www.w3.org/TR/REC-xml-names/#defaulting
  42196. for (var i = 0, l = parser.attribList.length; i < l; i++) {
  42197. var nv = parser.attribList[i]
  42198. var name = nv[0]
  42199. var value = nv[1]
  42200. var qualName = qname(name, true)
  42201. var prefix = qualName.prefix
  42202. var local = qualName.local
  42203. var uri = prefix === '' ? '' : (tag.ns[prefix] || '')
  42204. var a = {
  42205. name: name,
  42206. value: value,
  42207. prefix: prefix,
  42208. local: local,
  42209. uri: uri
  42210. }
  42211. // if there's any attributes with an undefined namespace,
  42212. // then fail on them now.
  42213. if (prefix && prefix !== 'xmlns' && !uri) {
  42214. strictFail(parser, 'Unbound namespace prefix: ' +
  42215. JSON.stringify(prefix))
  42216. a.uri = prefix
  42217. }
  42218. parser.tag.attributes[name] = a
  42219. emitNode(parser, 'onattribute', a)
  42220. }
  42221. parser.attribList.length = 0
  42222. }
  42223. parser.tag.isSelfClosing = !!selfClosing
  42224. // process the tag
  42225. parser.sawRoot = true
  42226. parser.tags.push(parser.tag)
  42227. emitNode(parser, 'onopentag', parser.tag)
  42228. if (!selfClosing) {
  42229. // special case for <script> in non-strict mode.
  42230. if (!parser.noscript && parser.tagName.toLowerCase() === 'script') {
  42231. parser.state = S.SCRIPT
  42232. } else {
  42233. parser.state = S.TEXT
  42234. }
  42235. parser.tag = null
  42236. parser.tagName = ''
  42237. }
  42238. parser.attribName = parser.attribValue = ''
  42239. parser.attribList.length = 0
  42240. }
  42241. function closeTag (parser) {
  42242. if (!parser.tagName) {
  42243. strictFail(parser, 'Weird empty close tag.')
  42244. parser.textNode += '</>'
  42245. parser.state = S.TEXT
  42246. return
  42247. }
  42248. if (parser.script) {
  42249. if (parser.tagName !== 'script') {
  42250. parser.script += '</' + parser.tagName + '>'
  42251. parser.tagName = ''
  42252. parser.state = S.SCRIPT
  42253. return
  42254. }
  42255. emitNode(parser, 'onscript', parser.script)
  42256. parser.script = ''
  42257. }
  42258. // first make sure that the closing tag actually exists.
  42259. // <a><b></c></b></a> will close everything, otherwise.
  42260. var t = parser.tags.length
  42261. var tagName = parser.tagName
  42262. if (!parser.strict) {
  42263. tagName = tagName[parser.looseCase]()
  42264. }
  42265. var closeTo = tagName
  42266. while (t--) {
  42267. var close = parser.tags[t]
  42268. if (close.name !== closeTo) {
  42269. // fail the first time in strict mode
  42270. strictFail(parser, 'Unexpected close tag')
  42271. } else {
  42272. break
  42273. }
  42274. }
  42275. // didn't find it. we already failed for strict, so just abort.
  42276. if (t < 0) {
  42277. strictFail(parser, 'Unmatched closing tag: ' + parser.tagName)
  42278. parser.textNode += '</' + parser.tagName + '>'
  42279. parser.state = S.TEXT
  42280. return
  42281. }
  42282. parser.tagName = tagName
  42283. var s = parser.tags.length
  42284. while (s-- > t) {
  42285. var tag = parser.tag = parser.tags.pop()
  42286. parser.tagName = parser.tag.name
  42287. emitNode(parser, 'onclosetag', parser.tagName)
  42288. var x = {}
  42289. for (var i in tag.ns) {
  42290. x[i] = tag.ns[i]
  42291. }
  42292. var parent = parser.tags[parser.tags.length - 1] || parser
  42293. if (parser.opt.xmlns && tag.ns !== parent.ns) {
  42294. // remove namespace bindings introduced by tag
  42295. Object.keys(tag.ns).forEach(function (p) {
  42296. var n = tag.ns[p]
  42297. emitNode(parser, 'onclosenamespace', { prefix: p, uri: n })
  42298. })
  42299. }
  42300. }
  42301. if (t === 0) parser.closedRoot = true
  42302. parser.tagName = parser.attribValue = parser.attribName = ''
  42303. parser.attribList.length = 0
  42304. parser.state = S.TEXT
  42305. }
  42306. function parseEntity (parser) {
  42307. var entity = parser.entity
  42308. var entityLC = entity.toLowerCase()
  42309. var num
  42310. var numStr = ''
  42311. if (parser.ENTITIES[entity]) {
  42312. return parser.ENTITIES[entity]
  42313. }
  42314. if (parser.ENTITIES[entityLC]) {
  42315. return parser.ENTITIES[entityLC]
  42316. }
  42317. entity = entityLC
  42318. if (entity.charAt(0) === '#') {
  42319. if (entity.charAt(1) === 'x') {
  42320. entity = entity.slice(2)
  42321. num = parseInt(entity, 16)
  42322. numStr = num.toString(16)
  42323. } else {
  42324. entity = entity.slice(1)
  42325. num = parseInt(entity, 10)
  42326. numStr = num.toString(10)
  42327. }
  42328. }
  42329. entity = entity.replace(/^0+/, '')
  42330. if (isNaN(num) || numStr.toLowerCase() !== entity) {
  42331. strictFail(parser, 'Invalid character entity')
  42332. return '&' + parser.entity + ';'
  42333. }
  42334. return String.fromCodePoint(num)
  42335. }
  42336. function beginWhiteSpace (parser, c) {
  42337. if (c === '<') {
  42338. parser.state = S.OPEN_WAKA
  42339. parser.startTagPosition = parser.position
  42340. } else if (!isWhitespace(c)) {
  42341. // have to process this as a text node.
  42342. // weird, but happens.
  42343. strictFail(parser, 'Non-whitespace before first tag.')
  42344. parser.textNode = c
  42345. parser.state = S.TEXT
  42346. }
  42347. }
  42348. function charAt (chunk, i) {
  42349. var result = ''
  42350. if (i < chunk.length) {
  42351. result = chunk.charAt(i)
  42352. }
  42353. return result
  42354. }
  42355. function write (chunk) {
  42356. var parser = this
  42357. if (this.error) {
  42358. throw this.error
  42359. }
  42360. if (parser.closed) {
  42361. return error(parser,
  42362. 'Cannot write after close. Assign an onready handler.')
  42363. }
  42364. if (chunk === null) {
  42365. return end(parser)
  42366. }
  42367. if (typeof chunk === 'object') {
  42368. chunk = chunk.toString()
  42369. }
  42370. var i = 0
  42371. var c = ''
  42372. while (true) {
  42373. c = charAt(chunk, i++)
  42374. parser.c = c
  42375. if (!c) {
  42376. break
  42377. }
  42378. if (parser.trackPosition) {
  42379. parser.position++
  42380. if (c === '\n') {
  42381. parser.line++
  42382. parser.column = 0
  42383. } else {
  42384. parser.column++
  42385. }
  42386. }
  42387. switch (parser.state) {
  42388. case S.BEGIN:
  42389. parser.state = S.BEGIN_WHITESPACE
  42390. if (c === '\uFEFF') {
  42391. continue
  42392. }
  42393. beginWhiteSpace(parser, c)
  42394. continue
  42395. case S.BEGIN_WHITESPACE:
  42396. beginWhiteSpace(parser, c)
  42397. continue
  42398. case S.TEXT:
  42399. if (parser.sawRoot && !parser.closedRoot) {
  42400. var starti = i - 1
  42401. while (c && c !== '<' && c !== '&') {
  42402. c = charAt(chunk, i++)
  42403. if (c && parser.trackPosition) {
  42404. parser.position++
  42405. if (c === '\n') {
  42406. parser.line++
  42407. parser.column = 0
  42408. } else {
  42409. parser.column++
  42410. }
  42411. }
  42412. }
  42413. parser.textNode += chunk.substring(starti, i - 1)
  42414. }
  42415. if (c === '<' && !(parser.sawRoot && parser.closedRoot && !parser.strict)) {
  42416. parser.state = S.OPEN_WAKA
  42417. parser.startTagPosition = parser.position
  42418. } else {
  42419. if (!isWhitespace(c) && (!parser.sawRoot || parser.closedRoot)) {
  42420. strictFail(parser, 'Text data outside of root node.')
  42421. }
  42422. if (c === '&') {
  42423. parser.state = S.TEXT_ENTITY
  42424. } else {
  42425. parser.textNode += c
  42426. }
  42427. }
  42428. continue
  42429. case S.SCRIPT:
  42430. // only non-strict
  42431. if (c === '<') {
  42432. parser.state = S.SCRIPT_ENDING
  42433. } else {
  42434. parser.script += c
  42435. }
  42436. continue
  42437. case S.SCRIPT_ENDING:
  42438. if (c === '/') {
  42439. parser.state = S.CLOSE_TAG
  42440. } else {
  42441. parser.script += '<' + c
  42442. parser.state = S.SCRIPT
  42443. }
  42444. continue
  42445. case S.OPEN_WAKA:
  42446. // either a /, ?, !, or text is coming next.
  42447. if (c === '!') {
  42448. parser.state = S.SGML_DECL
  42449. parser.sgmlDecl = ''
  42450. } else if (isWhitespace(c)) {
  42451. // wait for it...
  42452. } else if (isMatch(nameStart, c)) {
  42453. parser.state = S.OPEN_TAG
  42454. parser.tagName = c
  42455. } else if (c === '/') {
  42456. parser.state = S.CLOSE_TAG
  42457. parser.tagName = ''
  42458. } else if (c === '?') {
  42459. parser.state = S.PROC_INST
  42460. parser.procInstName = parser.procInstBody = ''
  42461. } else {
  42462. strictFail(parser, 'Unencoded <')
  42463. // if there was some whitespace, then add that in.
  42464. if (parser.startTagPosition + 1 < parser.position) {
  42465. var pad = parser.position - parser.startTagPosition
  42466. c = new Array(pad).join(' ') + c
  42467. }
  42468. parser.textNode += '<' + c
  42469. parser.state = S.TEXT
  42470. }
  42471. continue
  42472. case S.SGML_DECL:
  42473. if ((parser.sgmlDecl + c).toUpperCase() === CDATA) {
  42474. emitNode(parser, 'onopencdata')
  42475. parser.state = S.CDATA
  42476. parser.sgmlDecl = ''
  42477. parser.cdata = ''
  42478. } else if (parser.sgmlDecl + c === '--') {
  42479. parser.state = S.COMMENT
  42480. parser.comment = ''
  42481. parser.sgmlDecl = ''
  42482. } else if ((parser.sgmlDecl + c).toUpperCase() === DOCTYPE) {
  42483. parser.state = S.DOCTYPE
  42484. if (parser.doctype || parser.sawRoot) {
  42485. strictFail(parser,
  42486. 'Inappropriately located doctype declaration')
  42487. }
  42488. parser.doctype = ''
  42489. parser.sgmlDecl = ''
  42490. } else if (c === '>') {
  42491. emitNode(parser, 'onsgmldeclaration', parser.sgmlDecl)
  42492. parser.sgmlDecl = ''
  42493. parser.state = S.TEXT
  42494. } else if (isQuote(c)) {
  42495. parser.state = S.SGML_DECL_QUOTED
  42496. parser.sgmlDecl += c
  42497. } else {
  42498. parser.sgmlDecl += c
  42499. }
  42500. continue
  42501. case S.SGML_DECL_QUOTED:
  42502. if (c === parser.q) {
  42503. parser.state = S.SGML_DECL
  42504. parser.q = ''
  42505. }
  42506. parser.sgmlDecl += c
  42507. continue
  42508. case S.DOCTYPE:
  42509. if (c === '>') {
  42510. parser.state = S.TEXT
  42511. emitNode(parser, 'ondoctype', parser.doctype)
  42512. parser.doctype = true // just remember that we saw it.
  42513. } else {
  42514. parser.doctype += c
  42515. if (c === '[') {
  42516. parser.state = S.DOCTYPE_DTD
  42517. } else if (isQuote(c)) {
  42518. parser.state = S.DOCTYPE_QUOTED
  42519. parser.q = c
  42520. }
  42521. }
  42522. continue
  42523. case S.DOCTYPE_QUOTED:
  42524. parser.doctype += c
  42525. if (c === parser.q) {
  42526. parser.q = ''
  42527. parser.state = S.DOCTYPE
  42528. }
  42529. continue
  42530. case S.DOCTYPE_DTD:
  42531. parser.doctype += c
  42532. if (c === ']') {
  42533. parser.state = S.DOCTYPE
  42534. } else if (isQuote(c)) {
  42535. parser.state = S.DOCTYPE_DTD_QUOTED
  42536. parser.q = c
  42537. }
  42538. continue
  42539. case S.DOCTYPE_DTD_QUOTED:
  42540. parser.doctype += c
  42541. if (c === parser.q) {
  42542. parser.state = S.DOCTYPE_DTD
  42543. parser.q = ''
  42544. }
  42545. continue
  42546. case S.COMMENT:
  42547. if (c === '-') {
  42548. parser.state = S.COMMENT_ENDING
  42549. } else {
  42550. parser.comment += c
  42551. }
  42552. continue
  42553. case S.COMMENT_ENDING:
  42554. if (c === '-') {
  42555. parser.state = S.COMMENT_ENDED
  42556. parser.comment = textopts(parser.opt, parser.comment)
  42557. if (parser.comment) {
  42558. emitNode(parser, 'oncomment', parser.comment)
  42559. }
  42560. parser.comment = ''
  42561. } else {
  42562. parser.comment += '-' + c
  42563. parser.state = S.COMMENT
  42564. }
  42565. continue
  42566. case S.COMMENT_ENDED:
  42567. if (c !== '>') {
  42568. strictFail(parser, 'Malformed comment')
  42569. // allow <!-- blah -- bloo --> in non-strict mode,
  42570. // which is a comment of " blah -- bloo "
  42571. parser.comment += '--' + c
  42572. parser.state = S.COMMENT
  42573. } else {
  42574. parser.state = S.TEXT
  42575. }
  42576. continue
  42577. case S.CDATA:
  42578. if (c === ']') {
  42579. parser.state = S.CDATA_ENDING
  42580. } else {
  42581. parser.cdata += c
  42582. }
  42583. continue
  42584. case S.CDATA_ENDING:
  42585. if (c === ']') {
  42586. parser.state = S.CDATA_ENDING_2
  42587. } else {
  42588. parser.cdata += ']' + c
  42589. parser.state = S.CDATA
  42590. }
  42591. continue
  42592. case S.CDATA_ENDING_2:
  42593. if (c === '>') {
  42594. if (parser.cdata) {
  42595. emitNode(parser, 'oncdata', parser.cdata)
  42596. }
  42597. emitNode(parser, 'onclosecdata')
  42598. parser.cdata = ''
  42599. parser.state = S.TEXT
  42600. } else if (c === ']') {
  42601. parser.cdata += ']'
  42602. } else {
  42603. parser.cdata += ']]' + c
  42604. parser.state = S.CDATA
  42605. }
  42606. continue
  42607. case S.PROC_INST:
  42608. if (c === '?') {
  42609. parser.state = S.PROC_INST_ENDING
  42610. } else if (isWhitespace(c)) {
  42611. parser.state = S.PROC_INST_BODY
  42612. } else {
  42613. parser.procInstName += c
  42614. }
  42615. continue
  42616. case S.PROC_INST_BODY:
  42617. if (!parser.procInstBody && isWhitespace(c)) {
  42618. continue
  42619. } else if (c === '?') {
  42620. parser.state = S.PROC_INST_ENDING
  42621. } else {
  42622. parser.procInstBody += c
  42623. }
  42624. continue
  42625. case S.PROC_INST_ENDING:
  42626. if (c === '>') {
  42627. emitNode(parser, 'onprocessinginstruction', {
  42628. name: parser.procInstName,
  42629. body: parser.procInstBody
  42630. })
  42631. parser.procInstName = parser.procInstBody = ''
  42632. parser.state = S.TEXT
  42633. } else {
  42634. parser.procInstBody += '?' + c
  42635. parser.state = S.PROC_INST_BODY
  42636. }
  42637. continue
  42638. case S.OPEN_TAG:
  42639. if (isMatch(nameBody, c)) {
  42640. parser.tagName += c
  42641. } else {
  42642. newTag(parser)
  42643. if (c === '>') {
  42644. openTag(parser)
  42645. } else if (c === '/') {
  42646. parser.state = S.OPEN_TAG_SLASH
  42647. } else {
  42648. if (!isWhitespace(c)) {
  42649. strictFail(parser, 'Invalid character in tag name')
  42650. }
  42651. parser.state = S.ATTRIB
  42652. }
  42653. }
  42654. continue
  42655. case S.OPEN_TAG_SLASH:
  42656. if (c === '>') {
  42657. openTag(parser, true)
  42658. closeTag(parser)
  42659. } else {
  42660. strictFail(parser, 'Forward-slash in opening tag not followed by >')
  42661. parser.state = S.ATTRIB
  42662. }
  42663. continue
  42664. case S.ATTRIB:
  42665. // haven't read the attribute name yet.
  42666. if (isWhitespace(c)) {
  42667. continue
  42668. } else if (c === '>') {
  42669. openTag(parser)
  42670. } else if (c === '/') {
  42671. parser.state = S.OPEN_TAG_SLASH
  42672. } else if (isMatch(nameStart, c)) {
  42673. parser.attribName = c
  42674. parser.attribValue = ''
  42675. parser.state = S.ATTRIB_NAME
  42676. } else {
  42677. strictFail(parser, 'Invalid attribute name')
  42678. }
  42679. continue
  42680. case S.ATTRIB_NAME:
  42681. if (c === '=') {
  42682. parser.state = S.ATTRIB_VALUE
  42683. } else if (c === '>') {
  42684. strictFail(parser, 'Attribute without value')
  42685. parser.attribValue = parser.attribName
  42686. attrib(parser)
  42687. openTag(parser)
  42688. } else if (isWhitespace(c)) {
  42689. parser.state = S.ATTRIB_NAME_SAW_WHITE
  42690. } else if (isMatch(nameBody, c)) {
  42691. parser.attribName += c
  42692. } else {
  42693. strictFail(parser, 'Invalid attribute name')
  42694. }
  42695. continue
  42696. case S.ATTRIB_NAME_SAW_WHITE:
  42697. if (c === '=') {
  42698. parser.state = S.ATTRIB_VALUE
  42699. } else if (isWhitespace(c)) {
  42700. continue
  42701. } else {
  42702. strictFail(parser, 'Attribute without value')
  42703. parser.tag.attributes[parser.attribName] = ''
  42704. parser.attribValue = ''
  42705. emitNode(parser, 'onattribute', {
  42706. name: parser.attribName,
  42707. value: ''
  42708. })
  42709. parser.attribName = ''
  42710. if (c === '>') {
  42711. openTag(parser)
  42712. } else if (isMatch(nameStart, c)) {
  42713. parser.attribName = c
  42714. parser.state = S.ATTRIB_NAME
  42715. } else {
  42716. strictFail(parser, 'Invalid attribute name')
  42717. parser.state = S.ATTRIB
  42718. }
  42719. }
  42720. continue
  42721. case S.ATTRIB_VALUE:
  42722. if (isWhitespace(c)) {
  42723. continue
  42724. } else if (isQuote(c)) {
  42725. parser.q = c
  42726. parser.state = S.ATTRIB_VALUE_QUOTED
  42727. } else {
  42728. strictFail(parser, 'Unquoted attribute value')
  42729. parser.state = S.ATTRIB_VALUE_UNQUOTED
  42730. parser.attribValue = c
  42731. }
  42732. continue
  42733. case S.ATTRIB_VALUE_QUOTED:
  42734. if (c !== parser.q) {
  42735. if (c === '&') {
  42736. parser.state = S.ATTRIB_VALUE_ENTITY_Q
  42737. } else {
  42738. parser.attribValue += c
  42739. }
  42740. continue
  42741. }
  42742. attrib(parser)
  42743. parser.q = ''
  42744. parser.state = S.ATTRIB_VALUE_CLOSED
  42745. continue
  42746. case S.ATTRIB_VALUE_CLOSED:
  42747. if (isWhitespace(c)) {
  42748. parser.state = S.ATTRIB
  42749. } else if (c === '>') {
  42750. openTag(parser)
  42751. } else if (c === '/') {
  42752. parser.state = S.OPEN_TAG_SLASH
  42753. } else if (isMatch(nameStart, c)) {
  42754. strictFail(parser, 'No whitespace between attributes')
  42755. parser.attribName = c
  42756. parser.attribValue = ''
  42757. parser.state = S.ATTRIB_NAME
  42758. } else {
  42759. strictFail(parser, 'Invalid attribute name')
  42760. }
  42761. continue
  42762. case S.ATTRIB_VALUE_UNQUOTED:
  42763. if (!isAttribEnd(c)) {
  42764. if (c === '&') {
  42765. parser.state = S.ATTRIB_VALUE_ENTITY_U
  42766. } else {
  42767. parser.attribValue += c
  42768. }
  42769. continue
  42770. }
  42771. attrib(parser)
  42772. if (c === '>') {
  42773. openTag(parser)
  42774. } else {
  42775. parser.state = S.ATTRIB
  42776. }
  42777. continue
  42778. case S.CLOSE_TAG:
  42779. if (!parser.tagName) {
  42780. if (isWhitespace(c)) {
  42781. continue
  42782. } else if (notMatch(nameStart, c)) {
  42783. if (parser.script) {
  42784. parser.script += '</' + c
  42785. parser.state = S.SCRIPT
  42786. } else {
  42787. strictFail(parser, 'Invalid tagname in closing tag.')
  42788. }
  42789. } else {
  42790. parser.tagName = c
  42791. }
  42792. } else if (c === '>') {
  42793. closeTag(parser)
  42794. } else if (isMatch(nameBody, c)) {
  42795. parser.tagName += c
  42796. } else if (parser.script) {
  42797. parser.script += '</' + parser.tagName
  42798. parser.tagName = ''
  42799. parser.state = S.SCRIPT
  42800. } else {
  42801. if (!isWhitespace(c)) {
  42802. strictFail(parser, 'Invalid tagname in closing tag')
  42803. }
  42804. parser.state = S.CLOSE_TAG_SAW_WHITE
  42805. }
  42806. continue
  42807. case S.CLOSE_TAG_SAW_WHITE:
  42808. if (isWhitespace(c)) {
  42809. continue
  42810. }
  42811. if (c === '>') {
  42812. closeTag(parser)
  42813. } else {
  42814. strictFail(parser, 'Invalid characters in closing tag')
  42815. }
  42816. continue
  42817. case S.TEXT_ENTITY:
  42818. case S.ATTRIB_VALUE_ENTITY_Q:
  42819. case S.ATTRIB_VALUE_ENTITY_U:
  42820. var returnState
  42821. var buffer
  42822. switch (parser.state) {
  42823. case S.TEXT_ENTITY:
  42824. returnState = S.TEXT
  42825. buffer = 'textNode'
  42826. break
  42827. case S.ATTRIB_VALUE_ENTITY_Q:
  42828. returnState = S.ATTRIB_VALUE_QUOTED
  42829. buffer = 'attribValue'
  42830. break
  42831. case S.ATTRIB_VALUE_ENTITY_U:
  42832. returnState = S.ATTRIB_VALUE_UNQUOTED
  42833. buffer = 'attribValue'
  42834. break
  42835. }
  42836. if (c === ';') {
  42837. parser[buffer] += parseEntity(parser)
  42838. parser.entity = ''
  42839. parser.state = returnState
  42840. } else if (isMatch(parser.entity.length ? entityBody : entityStart, c)) {
  42841. parser.entity += c
  42842. } else {
  42843. strictFail(parser, 'Invalid character in entity name')
  42844. parser[buffer] += '&' + parser.entity + c
  42845. parser.entity = ''
  42846. parser.state = returnState
  42847. }
  42848. continue
  42849. default:
  42850. throw new Error(parser, 'Unknown state: ' + parser.state)
  42851. }
  42852. } // while
  42853. if (parser.position >= parser.bufferCheckPosition) {
  42854. checkBufferLength(parser)
  42855. }
  42856. return parser
  42857. }
  42858. /*! http://mths.be/fromcodepoint v0.1.0 by @mathias */
  42859. /* istanbul ignore next */
  42860. if (!String.fromCodePoint) {
  42861. (function () {
  42862. var stringFromCharCode = String.fromCharCode
  42863. var floor = Math.floor
  42864. var fromCodePoint = function () {
  42865. var MAX_SIZE = 0x4000
  42866. var codeUnits = []
  42867. var highSurrogate
  42868. var lowSurrogate
  42869. var index = -1
  42870. var length = arguments.length
  42871. if (!length) {
  42872. return ''
  42873. }
  42874. var result = ''
  42875. while (++index < length) {
  42876. var codePoint = Number(arguments[index])
  42877. if (
  42878. !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
  42879. codePoint < 0 || // not a valid Unicode code point
  42880. codePoint > 0x10FFFF || // not a valid Unicode code point
  42881. floor(codePoint) !== codePoint // not an integer
  42882. ) {
  42883. throw RangeError('Invalid code point: ' + codePoint)
  42884. }
  42885. if (codePoint <= 0xFFFF) { // BMP code point
  42886. codeUnits.push(codePoint)
  42887. } else { // Astral code point; split in surrogate halves
  42888. // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
  42889. codePoint -= 0x10000
  42890. highSurrogate = (codePoint >> 10) + 0xD800
  42891. lowSurrogate = (codePoint % 0x400) + 0xDC00
  42892. codeUnits.push(highSurrogate, lowSurrogate)
  42893. }
  42894. if (index + 1 === length || codeUnits.length > MAX_SIZE) {
  42895. result += stringFromCharCode.apply(null, codeUnits)
  42896. codeUnits.length = 0
  42897. }
  42898. }
  42899. return result
  42900. }
  42901. /* istanbul ignore next */
  42902. if (Object.defineProperty) {
  42903. Object.defineProperty(String, 'fromCodePoint', {
  42904. value: fromCodePoint,
  42905. configurable: true,
  42906. writable: true
  42907. })
  42908. } else {
  42909. String.fromCodePoint = fromCodePoint
  42910. }
  42911. }())
  42912. }
  42913. })( false ? 0 : exports)
  42914. /***/ }),
  42915. /***/ 2830:
  42916. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  42917. // Copyright Joyent, Inc. and other Node contributors.
  42918. //
  42919. // Permission is hereby granted, free of charge, to any person obtaining a
  42920. // copy of this software and associated documentation files (the
  42921. // "Software"), to deal in the Software without restriction, including
  42922. // without limitation the rights to use, copy, modify, merge, publish,
  42923. // distribute, sublicense, and/or sell copies of the Software, and to permit
  42924. // persons to whom the Software is furnished to do so, subject to the
  42925. // following conditions:
  42926. //
  42927. // The above copyright notice and this permission notice shall be included
  42928. // in all copies or substantial portions of the Software.
  42929. //
  42930. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  42931. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  42932. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  42933. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  42934. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  42935. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  42936. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  42937. module.exports = Stream;
  42938. var EE = (__webpack_require__(7187).EventEmitter);
  42939. var inherits = __webpack_require__(5717);
  42940. inherits(Stream, EE);
  42941. Stream.Readable = __webpack_require__(6577);
  42942. Stream.Writable = __webpack_require__(323);
  42943. Stream.Duplex = __webpack_require__(8656);
  42944. Stream.Transform = __webpack_require__(4473);
  42945. Stream.PassThrough = __webpack_require__(2366);
  42946. Stream.finished = __webpack_require__(1086)
  42947. Stream.pipeline = __webpack_require__(6472)
  42948. // Backwards-compat with node 0.4.x
  42949. Stream.Stream = Stream;
  42950. // old-style streams. Note that the pipe method (the only relevant
  42951. // part of this class) is overridden in the Readable class.
  42952. function Stream() {
  42953. EE.call(this);
  42954. }
  42955. Stream.prototype.pipe = function(dest, options) {
  42956. var source = this;
  42957. function ondata(chunk) {
  42958. if (dest.writable) {
  42959. if (false === dest.write(chunk) && source.pause) {
  42960. source.pause();
  42961. }
  42962. }
  42963. }
  42964. source.on('data', ondata);
  42965. function ondrain() {
  42966. if (source.readable && source.resume) {
  42967. source.resume();
  42968. }
  42969. }
  42970. dest.on('drain', ondrain);
  42971. // If the 'end' option is not supplied, dest.end() will be called when
  42972. // source gets the 'end' or 'close' events. Only dest.end() once.
  42973. if (!dest._isStdio && (!options || options.end !== false)) {
  42974. source.on('end', onend);
  42975. source.on('close', onclose);
  42976. }
  42977. var didOnEnd = false;
  42978. function onend() {
  42979. if (didOnEnd) return;
  42980. didOnEnd = true;
  42981. dest.end();
  42982. }
  42983. function onclose() {
  42984. if (didOnEnd) return;
  42985. didOnEnd = true;
  42986. if (typeof dest.destroy === 'function') dest.destroy();
  42987. }
  42988. // don't leave dangling pipes when there are errors.
  42989. function onerror(er) {
  42990. cleanup();
  42991. if (EE.listenerCount(this, 'error') === 0) {
  42992. throw er; // Unhandled stream error in pipe.
  42993. }
  42994. }
  42995. source.on('error', onerror);
  42996. dest.on('error', onerror);
  42997. // remove all the event listeners that were added.
  42998. function cleanup() {
  42999. source.removeListener('data', ondata);
  43000. dest.removeListener('drain', ondrain);
  43001. source.removeListener('end', onend);
  43002. source.removeListener('close', onclose);
  43003. source.removeListener('error', onerror);
  43004. dest.removeListener('error', onerror);
  43005. source.removeListener('end', cleanup);
  43006. source.removeListener('close', cleanup);
  43007. dest.removeListener('close', cleanup);
  43008. }
  43009. source.on('end', cleanup);
  43010. source.on('close', cleanup);
  43011. dest.on('close', cleanup);
  43012. dest.emit('pipe', source);
  43013. // Allow for unix-like usage: A.pipe(B).pipe(C)
  43014. return dest;
  43015. };
  43016. /***/ }),
  43017. /***/ 8106:
  43018. /***/ (function(module) {
  43019. "use strict";
  43020. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }
  43021. var codes = {};
  43022. function createErrorType(code, message, Base) {
  43023. if (!Base) {
  43024. Base = Error;
  43025. }
  43026. function getMessage(arg1, arg2, arg3) {
  43027. if (typeof message === 'string') {
  43028. return message;
  43029. } else {
  43030. return message(arg1, arg2, arg3);
  43031. }
  43032. }
  43033. var NodeError =
  43034. /*#__PURE__*/
  43035. function (_Base) {
  43036. _inheritsLoose(NodeError, _Base);
  43037. function NodeError(arg1, arg2, arg3) {
  43038. return _Base.call(this, getMessage(arg1, arg2, arg3)) || this;
  43039. }
  43040. return NodeError;
  43041. }(Base);
  43042. NodeError.prototype.name = Base.name;
  43043. NodeError.prototype.code = code;
  43044. codes[code] = NodeError;
  43045. } // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js
  43046. function oneOf(expected, thing) {
  43047. if (Array.isArray(expected)) {
  43048. var len = expected.length;
  43049. expected = expected.map(function (i) {
  43050. return String(i);
  43051. });
  43052. if (len > 2) {
  43053. return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1];
  43054. } else if (len === 2) {
  43055. return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]);
  43056. } else {
  43057. return "of ".concat(thing, " ").concat(expected[0]);
  43058. }
  43059. } else {
  43060. return "of ".concat(thing, " ").concat(String(expected));
  43061. }
  43062. } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith
  43063. function startsWith(str, search, pos) {
  43064. return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;
  43065. } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith
  43066. function endsWith(str, search, this_len) {
  43067. if (this_len === undefined || this_len > str.length) {
  43068. this_len = str.length;
  43069. }
  43070. return str.substring(this_len - search.length, this_len) === search;
  43071. } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes
  43072. function includes(str, search, start) {
  43073. if (typeof start !== 'number') {
  43074. start = 0;
  43075. }
  43076. if (start + search.length > str.length) {
  43077. return false;
  43078. } else {
  43079. return str.indexOf(search, start) !== -1;
  43080. }
  43081. }
  43082. createErrorType('ERR_INVALID_OPT_VALUE', function (name, value) {
  43083. return 'The value "' + value + '" is invalid for option "' + name + '"';
  43084. }, TypeError);
  43085. createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {
  43086. // determiner: 'must be' or 'must not be'
  43087. var determiner;
  43088. if (typeof expected === 'string' && startsWith(expected, 'not ')) {
  43089. determiner = 'must not be';
  43090. expected = expected.replace(/^not /, '');
  43091. } else {
  43092. determiner = 'must be';
  43093. }
  43094. var msg;
  43095. if (endsWith(name, ' argument')) {
  43096. // For cases like 'first argument'
  43097. msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
  43098. } else {
  43099. var type = includes(name, '.') ? 'property' : 'argument';
  43100. msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type'));
  43101. }
  43102. msg += ". Received type ".concat(typeof actual);
  43103. return msg;
  43104. }, TypeError);
  43105. createErrorType('ERR_STREAM_PUSH_AFTER_EOF', 'stream.push() after EOF');
  43106. createErrorType('ERR_METHOD_NOT_IMPLEMENTED', function (name) {
  43107. return 'The ' + name + ' method is not implemented';
  43108. });
  43109. createErrorType('ERR_STREAM_PREMATURE_CLOSE', 'Premature close');
  43110. createErrorType('ERR_STREAM_DESTROYED', function (name) {
  43111. return 'Cannot call ' + name + ' after a stream was destroyed';
  43112. });
  43113. createErrorType('ERR_MULTIPLE_CALLBACK', 'Callback called multiple times');
  43114. createErrorType('ERR_STREAM_CANNOT_PIPE', 'Cannot pipe, not readable');
  43115. createErrorType('ERR_STREAM_WRITE_AFTER_END', 'write after end');
  43116. createErrorType('ERR_STREAM_NULL_VALUES', 'May not write null values to stream', TypeError);
  43117. createErrorType('ERR_UNKNOWN_ENCODING', function (arg) {
  43118. return 'Unknown encoding: ' + arg;
  43119. }, TypeError);
  43120. createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after end event');
  43121. module.exports.q = codes;
  43122. /***/ }),
  43123. /***/ 8656:
  43124. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  43125. "use strict";
  43126. /* provided dependency */ var process = __webpack_require__(4155);
  43127. // Copyright Joyent, Inc. and other Node contributors.
  43128. //
  43129. // Permission is hereby granted, free of charge, to any person obtaining a
  43130. // copy of this software and associated documentation files (the
  43131. // "Software"), to deal in the Software without restriction, including
  43132. // without limitation the rights to use, copy, modify, merge, publish,
  43133. // distribute, sublicense, and/or sell copies of the Software, and to permit
  43134. // persons to whom the Software is furnished to do so, subject to the
  43135. // following conditions:
  43136. //
  43137. // The above copyright notice and this permission notice shall be included
  43138. // in all copies or substantial portions of the Software.
  43139. //
  43140. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  43141. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  43142. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  43143. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  43144. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  43145. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  43146. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  43147. // a duplex stream is just a stream that is both readable and writable.
  43148. // Since JS doesn't have multiple prototypal inheritance, this class
  43149. // prototypally inherits from Readable, and then parasitically from
  43150. // Writable.
  43151. /*<replacement>*/
  43152. var objectKeys = Object.keys || function (obj) {
  43153. var keys = [];
  43154. for (var key in obj) {
  43155. keys.push(key);
  43156. }
  43157. return keys;
  43158. };
  43159. /*</replacement>*/
  43160. module.exports = Duplex;
  43161. var Readable = __webpack_require__(6577);
  43162. var Writable = __webpack_require__(323);
  43163. __webpack_require__(5717)(Duplex, Readable);
  43164. {
  43165. // Allow the keys array to be GC'ed.
  43166. var keys = objectKeys(Writable.prototype);
  43167. for (var v = 0; v < keys.length; v++) {
  43168. var method = keys[v];
  43169. if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
  43170. }
  43171. }
  43172. function Duplex(options) {
  43173. if (!(this instanceof Duplex)) return new Duplex(options);
  43174. Readable.call(this, options);
  43175. Writable.call(this, options);
  43176. this.allowHalfOpen = true;
  43177. if (options) {
  43178. if (options.readable === false) this.readable = false;
  43179. if (options.writable === false) this.writable = false;
  43180. if (options.allowHalfOpen === false) {
  43181. this.allowHalfOpen = false;
  43182. this.once('end', onend);
  43183. }
  43184. }
  43185. }
  43186. Object.defineProperty(Duplex.prototype, 'writableHighWaterMark', {
  43187. // making it explicit this property is not enumerable
  43188. // because otherwise some prototype manipulation in
  43189. // userland will fail
  43190. enumerable: false,
  43191. get: function get() {
  43192. return this._writableState.highWaterMark;
  43193. }
  43194. });
  43195. Object.defineProperty(Duplex.prototype, 'writableBuffer', {
  43196. // making it explicit this property is not enumerable
  43197. // because otherwise some prototype manipulation in
  43198. // userland will fail
  43199. enumerable: false,
  43200. get: function get() {
  43201. return this._writableState && this._writableState.getBuffer();
  43202. }
  43203. });
  43204. Object.defineProperty(Duplex.prototype, 'writableLength', {
  43205. // making it explicit this property is not enumerable
  43206. // because otherwise some prototype manipulation in
  43207. // userland will fail
  43208. enumerable: false,
  43209. get: function get() {
  43210. return this._writableState.length;
  43211. }
  43212. }); // the no-half-open enforcer
  43213. function onend() {
  43214. // If the writable side ended, then we're ok.
  43215. if (this._writableState.ended) return; // no more data can be written.
  43216. // But allow more writes to happen in this tick.
  43217. process.nextTick(onEndNT, this);
  43218. }
  43219. function onEndNT(self) {
  43220. self.end();
  43221. }
  43222. Object.defineProperty(Duplex.prototype, 'destroyed', {
  43223. // making it explicit this property is not enumerable
  43224. // because otherwise some prototype manipulation in
  43225. // userland will fail
  43226. enumerable: false,
  43227. get: function get() {
  43228. if (this._readableState === undefined || this._writableState === undefined) {
  43229. return false;
  43230. }
  43231. return this._readableState.destroyed && this._writableState.destroyed;
  43232. },
  43233. set: function set(value) {
  43234. // we ignore the value if the stream
  43235. // has not been initialized yet
  43236. if (this._readableState === undefined || this._writableState === undefined) {
  43237. return;
  43238. } // backward compatibility, the user is explicitly
  43239. // managing destroyed
  43240. this._readableState.destroyed = value;
  43241. this._writableState.destroyed = value;
  43242. }
  43243. });
  43244. /***/ }),
  43245. /***/ 2366:
  43246. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  43247. "use strict";
  43248. // Copyright Joyent, Inc. and other Node contributors.
  43249. //
  43250. // Permission is hereby granted, free of charge, to any person obtaining a
  43251. // copy of this software and associated documentation files (the
  43252. // "Software"), to deal in the Software without restriction, including
  43253. // without limitation the rights to use, copy, modify, merge, publish,
  43254. // distribute, sublicense, and/or sell copies of the Software, and to permit
  43255. // persons to whom the Software is furnished to do so, subject to the
  43256. // following conditions:
  43257. //
  43258. // The above copyright notice and this permission notice shall be included
  43259. // in all copies or substantial portions of the Software.
  43260. //
  43261. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  43262. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  43263. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  43264. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  43265. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  43266. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  43267. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  43268. // a passthrough stream.
  43269. // basically just the most minimal sort of Transform stream.
  43270. // Every written chunk gets output as-is.
  43271. module.exports = PassThrough;
  43272. var Transform = __webpack_require__(4473);
  43273. __webpack_require__(5717)(PassThrough, Transform);
  43274. function PassThrough(options) {
  43275. if (!(this instanceof PassThrough)) return new PassThrough(options);
  43276. Transform.call(this, options);
  43277. }
  43278. PassThrough.prototype._transform = function (chunk, encoding, cb) {
  43279. cb(null, chunk);
  43280. };
  43281. /***/ }),
  43282. /***/ 6577:
  43283. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  43284. "use strict";
  43285. /* provided dependency */ var process = __webpack_require__(4155);
  43286. // Copyright Joyent, Inc. and other Node contributors.
  43287. //
  43288. // Permission is hereby granted, free of charge, to any person obtaining a
  43289. // copy of this software and associated documentation files (the
  43290. // "Software"), to deal in the Software without restriction, including
  43291. // without limitation the rights to use, copy, modify, merge, publish,
  43292. // distribute, sublicense, and/or sell copies of the Software, and to permit
  43293. // persons to whom the Software is furnished to do so, subject to the
  43294. // following conditions:
  43295. //
  43296. // The above copyright notice and this permission notice shall be included
  43297. // in all copies or substantial portions of the Software.
  43298. //
  43299. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  43300. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  43301. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  43302. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  43303. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  43304. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  43305. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  43306. module.exports = Readable;
  43307. /*<replacement>*/
  43308. var Duplex;
  43309. /*</replacement>*/
  43310. Readable.ReadableState = ReadableState;
  43311. /*<replacement>*/
  43312. var EE = (__webpack_require__(7187).EventEmitter);
  43313. var EElistenerCount = function EElistenerCount(emitter, type) {
  43314. return emitter.listeners(type).length;
  43315. };
  43316. /*</replacement>*/
  43317. /*<replacement>*/
  43318. var Stream = __webpack_require__(3194);
  43319. /*</replacement>*/
  43320. var Buffer = (__webpack_require__(8823).Buffer);
  43321. var OurUint8Array = __webpack_require__.g.Uint8Array || function () {};
  43322. function _uint8ArrayToBuffer(chunk) {
  43323. return Buffer.from(chunk);
  43324. }
  43325. function _isUint8Array(obj) {
  43326. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  43327. }
  43328. /*<replacement>*/
  43329. var debugUtil = __webpack_require__(964);
  43330. var debug;
  43331. if (debugUtil && debugUtil.debuglog) {
  43332. debug = debugUtil.debuglog('stream');
  43333. } else {
  43334. debug = function debug() {};
  43335. }
  43336. /*</replacement>*/
  43337. var BufferList = __webpack_require__(3361);
  43338. var destroyImpl = __webpack_require__(1029);
  43339. var _require = __webpack_require__(94),
  43340. getHighWaterMark = _require.getHighWaterMark;
  43341. var _require$codes = (__webpack_require__(8106)/* .codes */ .q),
  43342. ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
  43343. ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,
  43344. ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
  43345. ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.
  43346. var StringDecoder;
  43347. var createReadableStreamAsyncIterator;
  43348. var from;
  43349. __webpack_require__(5717)(Readable, Stream);
  43350. var errorOrDestroy = destroyImpl.errorOrDestroy;
  43351. var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
  43352. function prependListener(emitter, event, fn) {
  43353. // Sadly this is not cacheable as some libraries bundle their own
  43354. // event emitter implementation with them.
  43355. if (typeof emitter.prependListener === 'function') return emitter.prependListener(event, fn); // This is a hack to make sure that our error handler is attached before any
  43356. // userland ones. NEVER DO THIS. This is here only because this code needs
  43357. // to continue to work with older versions of Node.js that do not include
  43358. // the prependListener() method. The goal is to eventually remove this hack.
  43359. if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (Array.isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]];
  43360. }
  43361. function ReadableState(options, stream, isDuplex) {
  43362. Duplex = Duplex || __webpack_require__(8656);
  43363. options = options || {}; // Duplex streams are both readable and writable, but share
  43364. // the same options object.
  43365. // However, some cases require setting options to different
  43366. // values for the readable and the writable sides of the duplex stream.
  43367. // These options can be provided separately as readableXXX and writableXXX.
  43368. if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag. Used to make read(n) ignore n and to
  43369. // make all the buffer merging and length checks go away
  43370. this.objectMode = !!options.objectMode;
  43371. if (isDuplex) this.objectMode = this.objectMode || !!options.readableObjectMode; // the point at which it stops calling _read() to fill the buffer
  43372. // Note: 0 is a valid value, means "don't call _read preemptively ever"
  43373. this.highWaterMark = getHighWaterMark(this, options, 'readableHighWaterMark', isDuplex); // A linked list is used to store data chunks instead of an array because the
  43374. // linked list can remove elements from the beginning faster than
  43375. // array.shift()
  43376. this.buffer = new BufferList();
  43377. this.length = 0;
  43378. this.pipes = null;
  43379. this.pipesCount = 0;
  43380. this.flowing = null;
  43381. this.ended = false;
  43382. this.endEmitted = false;
  43383. this.reading = false; // a flag to be able to tell if the event 'readable'/'data' is emitted
  43384. // immediately, or on a later tick. We set this to true at first, because
  43385. // any actions that shouldn't happen until "later" should generally also
  43386. // not happen before the first read call.
  43387. this.sync = true; // whenever we return null, then we set a flag to say
  43388. // that we're awaiting a 'readable' event emission.
  43389. this.needReadable = false;
  43390. this.emittedReadable = false;
  43391. this.readableListening = false;
  43392. this.resumeScheduled = false;
  43393. this.paused = true; // Should close be emitted on destroy. Defaults to true.
  43394. this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')
  43395. this.autoDestroy = !!options.autoDestroy; // has it been destroyed
  43396. this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string
  43397. // encoding is 'binary' so we have to make this configurable.
  43398. // Everything else in the universe uses 'utf8', though.
  43399. this.defaultEncoding = options.defaultEncoding || 'utf8'; // the number of writers that are awaiting a drain event in .pipe()s
  43400. this.awaitDrain = 0; // if true, a maybeReadMore has been scheduled
  43401. this.readingMore = false;
  43402. this.decoder = null;
  43403. this.encoding = null;
  43404. if (options.encoding) {
  43405. if (!StringDecoder) StringDecoder = (__webpack_require__(2553)/* .StringDecoder */ .s);
  43406. this.decoder = new StringDecoder(options.encoding);
  43407. this.encoding = options.encoding;
  43408. }
  43409. }
  43410. function Readable(options) {
  43411. Duplex = Duplex || __webpack_require__(8656);
  43412. if (!(this instanceof Readable)) return new Readable(options); // Checking for a Stream.Duplex instance is faster here instead of inside
  43413. // the ReadableState constructor, at least with V8 6.5
  43414. var isDuplex = this instanceof Duplex;
  43415. this._readableState = new ReadableState(options, this, isDuplex); // legacy
  43416. this.readable = true;
  43417. if (options) {
  43418. if (typeof options.read === 'function') this._read = options.read;
  43419. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  43420. }
  43421. Stream.call(this);
  43422. }
  43423. Object.defineProperty(Readable.prototype, 'destroyed', {
  43424. // making it explicit this property is not enumerable
  43425. // because otherwise some prototype manipulation in
  43426. // userland will fail
  43427. enumerable: false,
  43428. get: function get() {
  43429. if (this._readableState === undefined) {
  43430. return false;
  43431. }
  43432. return this._readableState.destroyed;
  43433. },
  43434. set: function set(value) {
  43435. // we ignore the value if the stream
  43436. // has not been initialized yet
  43437. if (!this._readableState) {
  43438. return;
  43439. } // backward compatibility, the user is explicitly
  43440. // managing destroyed
  43441. this._readableState.destroyed = value;
  43442. }
  43443. });
  43444. Readable.prototype.destroy = destroyImpl.destroy;
  43445. Readable.prototype._undestroy = destroyImpl.undestroy;
  43446. Readable.prototype._destroy = function (err, cb) {
  43447. cb(err);
  43448. }; // Manually shove something into the read() buffer.
  43449. // This returns true if the highWaterMark has not been hit yet,
  43450. // similar to how Writable.write() returns true if you should
  43451. // write() some more.
  43452. Readable.prototype.push = function (chunk, encoding) {
  43453. var state = this._readableState;
  43454. var skipChunkCheck;
  43455. if (!state.objectMode) {
  43456. if (typeof chunk === 'string') {
  43457. encoding = encoding || state.defaultEncoding;
  43458. if (encoding !== state.encoding) {
  43459. chunk = Buffer.from(chunk, encoding);
  43460. encoding = '';
  43461. }
  43462. skipChunkCheck = true;
  43463. }
  43464. } else {
  43465. skipChunkCheck = true;
  43466. }
  43467. return readableAddChunk(this, chunk, encoding, false, skipChunkCheck);
  43468. }; // Unshift should *always* be something directly out of read()
  43469. Readable.prototype.unshift = function (chunk) {
  43470. return readableAddChunk(this, chunk, null, true, false);
  43471. };
  43472. function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
  43473. debug('readableAddChunk', chunk);
  43474. var state = stream._readableState;
  43475. if (chunk === null) {
  43476. state.reading = false;
  43477. onEofChunk(stream, state);
  43478. } else {
  43479. var er;
  43480. if (!skipChunkCheck) er = chunkInvalid(state, chunk);
  43481. if (er) {
  43482. errorOrDestroy(stream, er);
  43483. } else if (state.objectMode || chunk && chunk.length > 0) {
  43484. if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
  43485. chunk = _uint8ArrayToBuffer(chunk);
  43486. }
  43487. if (addToFront) {
  43488. if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
  43489. } else if (state.ended) {
  43490. errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
  43491. } else if (state.destroyed) {
  43492. return false;
  43493. } else {
  43494. state.reading = false;
  43495. if (state.decoder && !encoding) {
  43496. chunk = state.decoder.write(chunk);
  43497. if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);else maybeReadMore(stream, state);
  43498. } else {
  43499. addChunk(stream, state, chunk, false);
  43500. }
  43501. }
  43502. } else if (!addToFront) {
  43503. state.reading = false;
  43504. maybeReadMore(stream, state);
  43505. }
  43506. } // We can push more data if we are below the highWaterMark.
  43507. // Also, if we have no data yet, we can stand some more bytes.
  43508. // This is to work around cases where hwm=0, such as the repl.
  43509. return !state.ended && (state.length < state.highWaterMark || state.length === 0);
  43510. }
  43511. function addChunk(stream, state, chunk, addToFront) {
  43512. if (state.flowing && state.length === 0 && !state.sync) {
  43513. state.awaitDrain = 0;
  43514. stream.emit('data', chunk);
  43515. } else {
  43516. // update the buffer info.
  43517. state.length += state.objectMode ? 1 : chunk.length;
  43518. if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk);
  43519. if (state.needReadable) emitReadable(stream);
  43520. }
  43521. maybeReadMore(stream, state);
  43522. }
  43523. function chunkInvalid(state, chunk) {
  43524. var er;
  43525. if (!_isUint8Array(chunk) && typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) {
  43526. er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer', 'Uint8Array'], chunk);
  43527. }
  43528. return er;
  43529. }
  43530. Readable.prototype.isPaused = function () {
  43531. return this._readableState.flowing === false;
  43532. }; // backwards compatibility.
  43533. Readable.prototype.setEncoding = function (enc) {
  43534. if (!StringDecoder) StringDecoder = (__webpack_require__(2553)/* .StringDecoder */ .s);
  43535. var decoder = new StringDecoder(enc);
  43536. this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8
  43537. this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:
  43538. var p = this._readableState.buffer.head;
  43539. var content = '';
  43540. while (p !== null) {
  43541. content += decoder.write(p.data);
  43542. p = p.next;
  43543. }
  43544. this._readableState.buffer.clear();
  43545. if (content !== '') this._readableState.buffer.push(content);
  43546. this._readableState.length = content.length;
  43547. return this;
  43548. }; // Don't raise the hwm > 1GB
  43549. var MAX_HWM = 0x40000000;
  43550. function computeNewHighWaterMark(n) {
  43551. if (n >= MAX_HWM) {
  43552. // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.
  43553. n = MAX_HWM;
  43554. } else {
  43555. // Get the next highest power of 2 to prevent increasing hwm excessively in
  43556. // tiny amounts
  43557. n--;
  43558. n |= n >>> 1;
  43559. n |= n >>> 2;
  43560. n |= n >>> 4;
  43561. n |= n >>> 8;
  43562. n |= n >>> 16;
  43563. n++;
  43564. }
  43565. return n;
  43566. } // This function is designed to be inlinable, so please take care when making
  43567. // changes to the function body.
  43568. function howMuchToRead(n, state) {
  43569. if (n <= 0 || state.length === 0 && state.ended) return 0;
  43570. if (state.objectMode) return 1;
  43571. if (n !== n) {
  43572. // Only flow one buffer at a time
  43573. if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length;
  43574. } // If we're asking for more than the current hwm, then raise the hwm.
  43575. if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
  43576. if (n <= state.length) return n; // Don't have enough
  43577. if (!state.ended) {
  43578. state.needReadable = true;
  43579. return 0;
  43580. }
  43581. return state.length;
  43582. } // you can override either this method, or the async _read(n) below.
  43583. Readable.prototype.read = function (n) {
  43584. debug('read', n);
  43585. n = parseInt(n, 10);
  43586. var state = this._readableState;
  43587. var nOrig = n;
  43588. if (n !== 0) state.emittedReadable = false; // if we're doing read(0) to trigger a readable event, but we
  43589. // already have a bunch of data in the buffer, then just trigger
  43590. // the 'readable' event and move on.
  43591. if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {
  43592. debug('read: emitReadable', state.length, state.ended);
  43593. if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this);
  43594. return null;
  43595. }
  43596. n = howMuchToRead(n, state); // if we've ended, and we're now clear, then finish it up.
  43597. if (n === 0 && state.ended) {
  43598. if (state.length === 0) endReadable(this);
  43599. return null;
  43600. } // All the actual chunk generation logic needs to be
  43601. // *below* the call to _read. The reason is that in certain
  43602. // synthetic stream cases, such as passthrough streams, _read
  43603. // may be a completely synchronous operation which may change
  43604. // the state of the read buffer, providing enough data when
  43605. // before there was *not* enough.
  43606. //
  43607. // So, the steps are:
  43608. // 1. Figure out what the state of things will be after we do
  43609. // a read from the buffer.
  43610. //
  43611. // 2. If that resulting state will trigger a _read, then call _read.
  43612. // Note that this may be asynchronous, or synchronous. Yes, it is
  43613. // deeply ugly to write APIs this way, but that still doesn't mean
  43614. // that the Readable class should behave improperly, as streams are
  43615. // designed to be sync/async agnostic.
  43616. // Take note if the _read call is sync or async (ie, if the read call
  43617. // has returned yet), so that we know whether or not it's safe to emit
  43618. // 'readable' etc.
  43619. //
  43620. // 3. Actually pull the requested chunks out of the buffer and return.
  43621. // if we need a readable event, then we need to do some reading.
  43622. var doRead = state.needReadable;
  43623. debug('need readable', doRead); // if we currently have less than the highWaterMark, then also read some
  43624. if (state.length === 0 || state.length - n < state.highWaterMark) {
  43625. doRead = true;
  43626. debug('length less than watermark', doRead);
  43627. } // however, if we've ended, then there's no point, and if we're already
  43628. // reading, then it's unnecessary.
  43629. if (state.ended || state.reading) {
  43630. doRead = false;
  43631. debug('reading or ended', doRead);
  43632. } else if (doRead) {
  43633. debug('do read');
  43634. state.reading = true;
  43635. state.sync = true; // if the length is currently zero, then we *need* a readable event.
  43636. if (state.length === 0) state.needReadable = true; // call internal read method
  43637. this._read(state.highWaterMark);
  43638. state.sync = false; // If _read pushed data synchronously, then `reading` will be false,
  43639. // and we need to re-evaluate how much data we can return to the user.
  43640. if (!state.reading) n = howMuchToRead(nOrig, state);
  43641. }
  43642. var ret;
  43643. if (n > 0) ret = fromList(n, state);else ret = null;
  43644. if (ret === null) {
  43645. state.needReadable = state.length <= state.highWaterMark;
  43646. n = 0;
  43647. } else {
  43648. state.length -= n;
  43649. state.awaitDrain = 0;
  43650. }
  43651. if (state.length === 0) {
  43652. // If we have nothing in the buffer, then we want to know
  43653. // as soon as we *do* get something into the buffer.
  43654. if (!state.ended) state.needReadable = true; // If we tried to read() past the EOF, then emit end on the next tick.
  43655. if (nOrig !== n && state.ended) endReadable(this);
  43656. }
  43657. if (ret !== null) this.emit('data', ret);
  43658. return ret;
  43659. };
  43660. function onEofChunk(stream, state) {
  43661. debug('onEofChunk');
  43662. if (state.ended) return;
  43663. if (state.decoder) {
  43664. var chunk = state.decoder.end();
  43665. if (chunk && chunk.length) {
  43666. state.buffer.push(chunk);
  43667. state.length += state.objectMode ? 1 : chunk.length;
  43668. }
  43669. }
  43670. state.ended = true;
  43671. if (state.sync) {
  43672. // if we are sync, wait until next tick to emit the data.
  43673. // Otherwise we risk emitting data in the flow()
  43674. // the readable code triggers during a read() call
  43675. emitReadable(stream);
  43676. } else {
  43677. // emit 'readable' now to make sure it gets picked up.
  43678. state.needReadable = false;
  43679. if (!state.emittedReadable) {
  43680. state.emittedReadable = true;
  43681. emitReadable_(stream);
  43682. }
  43683. }
  43684. } // Don't emit readable right away in sync mode, because this can trigger
  43685. // another read() call => stack overflow. This way, it might trigger
  43686. // a nextTick recursion warning, but that's not so bad.
  43687. function emitReadable(stream) {
  43688. var state = stream._readableState;
  43689. debug('emitReadable', state.needReadable, state.emittedReadable);
  43690. state.needReadable = false;
  43691. if (!state.emittedReadable) {
  43692. debug('emitReadable', state.flowing);
  43693. state.emittedReadable = true;
  43694. process.nextTick(emitReadable_, stream);
  43695. }
  43696. }
  43697. function emitReadable_(stream) {
  43698. var state = stream._readableState;
  43699. debug('emitReadable_', state.destroyed, state.length, state.ended);
  43700. if (!state.destroyed && (state.length || state.ended)) {
  43701. stream.emit('readable');
  43702. state.emittedReadable = false;
  43703. } // The stream needs another readable event if
  43704. // 1. It is not flowing, as the flow mechanism will take
  43705. // care of it.
  43706. // 2. It is not ended.
  43707. // 3. It is below the highWaterMark, so we can schedule
  43708. // another readable later.
  43709. state.needReadable = !state.flowing && !state.ended && state.length <= state.highWaterMark;
  43710. flow(stream);
  43711. } // at this point, the user has presumably seen the 'readable' event,
  43712. // and called read() to consume some data. that may have triggered
  43713. // in turn another _read(n) call, in which case reading = true if
  43714. // it's in progress.
  43715. // However, if we're not ended, or reading, and the length < hwm,
  43716. // then go ahead and try to read some more preemptively.
  43717. function maybeReadMore(stream, state) {
  43718. if (!state.readingMore) {
  43719. state.readingMore = true;
  43720. process.nextTick(maybeReadMore_, stream, state);
  43721. }
  43722. }
  43723. function maybeReadMore_(stream, state) {
  43724. // Attempt to read more data if we should.
  43725. //
  43726. // The conditions for reading more data are (one of):
  43727. // - Not enough data buffered (state.length < state.highWaterMark). The loop
  43728. // is responsible for filling the buffer with enough data if such data
  43729. // is available. If highWaterMark is 0 and we are not in the flowing mode
  43730. // we should _not_ attempt to buffer any extra data. We'll get more data
  43731. // when the stream consumer calls read() instead.
  43732. // - No data in the buffer, and the stream is in flowing mode. In this mode
  43733. // the loop below is responsible for ensuring read() is called. Failing to
  43734. // call read here would abort the flow and there's no other mechanism for
  43735. // continuing the flow if the stream consumer has just subscribed to the
  43736. // 'data' event.
  43737. //
  43738. // In addition to the above conditions to keep reading data, the following
  43739. // conditions prevent the data from being read:
  43740. // - The stream has ended (state.ended).
  43741. // - There is already a pending 'read' operation (state.reading). This is a
  43742. // case where the the stream has called the implementation defined _read()
  43743. // method, but they are processing the call asynchronously and have _not_
  43744. // called push() with new data. In this case we skip performing more
  43745. // read()s. The execution ends in this method again after the _read() ends
  43746. // up calling push() with more data.
  43747. while (!state.reading && !state.ended && (state.length < state.highWaterMark || state.flowing && state.length === 0)) {
  43748. var len = state.length;
  43749. debug('maybeReadMore read 0');
  43750. stream.read(0);
  43751. if (len === state.length) // didn't get any data, stop spinning.
  43752. break;
  43753. }
  43754. state.readingMore = false;
  43755. } // abstract method. to be overridden in specific implementation classes.
  43756. // call cb(er, data) where data is <= n in length.
  43757. // for virtual (non-string, non-buffer) streams, "length" is somewhat
  43758. // arbitrary, and perhaps not very meaningful.
  43759. Readable.prototype._read = function (n) {
  43760. errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
  43761. };
  43762. Readable.prototype.pipe = function (dest, pipeOpts) {
  43763. var src = this;
  43764. var state = this._readableState;
  43765. switch (state.pipesCount) {
  43766. case 0:
  43767. state.pipes = dest;
  43768. break;
  43769. case 1:
  43770. state.pipes = [state.pipes, dest];
  43771. break;
  43772. default:
  43773. state.pipes.push(dest);
  43774. break;
  43775. }
  43776. state.pipesCount += 1;
  43777. debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts);
  43778. var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr;
  43779. var endFn = doEnd ? onend : unpipe;
  43780. if (state.endEmitted) process.nextTick(endFn);else src.once('end', endFn);
  43781. dest.on('unpipe', onunpipe);
  43782. function onunpipe(readable, unpipeInfo) {
  43783. debug('onunpipe');
  43784. if (readable === src) {
  43785. if (unpipeInfo && unpipeInfo.hasUnpiped === false) {
  43786. unpipeInfo.hasUnpiped = true;
  43787. cleanup();
  43788. }
  43789. }
  43790. }
  43791. function onend() {
  43792. debug('onend');
  43793. dest.end();
  43794. } // when the dest drains, it reduces the awaitDrain counter
  43795. // on the source. This would be more elegant with a .once()
  43796. // handler in flow(), but adding and removing repeatedly is
  43797. // too slow.
  43798. var ondrain = pipeOnDrain(src);
  43799. dest.on('drain', ondrain);
  43800. var cleanedUp = false;
  43801. function cleanup() {
  43802. debug('cleanup'); // cleanup event handlers once the pipe is broken
  43803. dest.removeListener('close', onclose);
  43804. dest.removeListener('finish', onfinish);
  43805. dest.removeListener('drain', ondrain);
  43806. dest.removeListener('error', onerror);
  43807. dest.removeListener('unpipe', onunpipe);
  43808. src.removeListener('end', onend);
  43809. src.removeListener('end', unpipe);
  43810. src.removeListener('data', ondata);
  43811. cleanedUp = true; // if the reader is waiting for a drain event from this
  43812. // specific writer, then it would cause it to never start
  43813. // flowing again.
  43814. // So, if this is awaiting a drain, then we just call it now.
  43815. // If we don't know, then assume that we are waiting for one.
  43816. if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain();
  43817. }
  43818. src.on('data', ondata);
  43819. function ondata(chunk) {
  43820. debug('ondata');
  43821. var ret = dest.write(chunk);
  43822. debug('dest.write', ret);
  43823. if (ret === false) {
  43824. // If the user unpiped during `dest.write()`, it is possible
  43825. // to get stuck in a permanently paused state if that write
  43826. // also returned false.
  43827. // => Check whether `dest` is still a piping destination.
  43828. if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
  43829. debug('false write response, pause', state.awaitDrain);
  43830. state.awaitDrain++;
  43831. }
  43832. src.pause();
  43833. }
  43834. } // if the dest has an error, then stop piping into it.
  43835. // however, don't suppress the throwing behavior for this.
  43836. function onerror(er) {
  43837. debug('onerror', er);
  43838. unpipe();
  43839. dest.removeListener('error', onerror);
  43840. if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);
  43841. } // Make sure our error handler is attached before userland ones.
  43842. prependListener(dest, 'error', onerror); // Both close and finish should trigger unpipe, but only once.
  43843. function onclose() {
  43844. dest.removeListener('finish', onfinish);
  43845. unpipe();
  43846. }
  43847. dest.once('close', onclose);
  43848. function onfinish() {
  43849. debug('onfinish');
  43850. dest.removeListener('close', onclose);
  43851. unpipe();
  43852. }
  43853. dest.once('finish', onfinish);
  43854. function unpipe() {
  43855. debug('unpipe');
  43856. src.unpipe(dest);
  43857. } // tell the dest that it's being piped to
  43858. dest.emit('pipe', src); // start the flow if it hasn't been started already.
  43859. if (!state.flowing) {
  43860. debug('pipe resume');
  43861. src.resume();
  43862. }
  43863. return dest;
  43864. };
  43865. function pipeOnDrain(src) {
  43866. return function pipeOnDrainFunctionResult() {
  43867. var state = src._readableState;
  43868. debug('pipeOnDrain', state.awaitDrain);
  43869. if (state.awaitDrain) state.awaitDrain--;
  43870. if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) {
  43871. state.flowing = true;
  43872. flow(src);
  43873. }
  43874. };
  43875. }
  43876. Readable.prototype.unpipe = function (dest) {
  43877. var state = this._readableState;
  43878. var unpipeInfo = {
  43879. hasUnpiped: false
  43880. }; // if we're not piping anywhere, then do nothing.
  43881. if (state.pipesCount === 0) return this; // just one destination. most common case.
  43882. if (state.pipesCount === 1) {
  43883. // passed in one, but it's not the right one.
  43884. if (dest && dest !== state.pipes) return this;
  43885. if (!dest) dest = state.pipes; // got a match.
  43886. state.pipes = null;
  43887. state.pipesCount = 0;
  43888. state.flowing = false;
  43889. if (dest) dest.emit('unpipe', this, unpipeInfo);
  43890. return this;
  43891. } // slow case. multiple pipe destinations.
  43892. if (!dest) {
  43893. // remove all.
  43894. var dests = state.pipes;
  43895. var len = state.pipesCount;
  43896. state.pipes = null;
  43897. state.pipesCount = 0;
  43898. state.flowing = false;
  43899. for (var i = 0; i < len; i++) {
  43900. dests[i].emit('unpipe', this, {
  43901. hasUnpiped: false
  43902. });
  43903. }
  43904. return this;
  43905. } // try to find the right one.
  43906. var index = indexOf(state.pipes, dest);
  43907. if (index === -1) return this;
  43908. state.pipes.splice(index, 1);
  43909. state.pipesCount -= 1;
  43910. if (state.pipesCount === 1) state.pipes = state.pipes[0];
  43911. dest.emit('unpipe', this, unpipeInfo);
  43912. return this;
  43913. }; // set up data events if they are asked for
  43914. // Ensure readable listeners eventually get something
  43915. Readable.prototype.on = function (ev, fn) {
  43916. var res = Stream.prototype.on.call(this, ev, fn);
  43917. var state = this._readableState;
  43918. if (ev === 'data') {
  43919. // update readableListening so that resume() may be a no-op
  43920. // a few lines down. This is needed to support once('readable').
  43921. state.readableListening = this.listenerCount('readable') > 0; // Try start flowing on next tick if stream isn't explicitly paused
  43922. if (state.flowing !== false) this.resume();
  43923. } else if (ev === 'readable') {
  43924. if (!state.endEmitted && !state.readableListening) {
  43925. state.readableListening = state.needReadable = true;
  43926. state.flowing = false;
  43927. state.emittedReadable = false;
  43928. debug('on readable', state.length, state.reading);
  43929. if (state.length) {
  43930. emitReadable(this);
  43931. } else if (!state.reading) {
  43932. process.nextTick(nReadingNextTick, this);
  43933. }
  43934. }
  43935. }
  43936. return res;
  43937. };
  43938. Readable.prototype.addListener = Readable.prototype.on;
  43939. Readable.prototype.removeListener = function (ev, fn) {
  43940. var res = Stream.prototype.removeListener.call(this, ev, fn);
  43941. if (ev === 'readable') {
  43942. // We need to check if there is someone still listening to
  43943. // readable and reset the state. However this needs to happen
  43944. // after readable has been emitted but before I/O (nextTick) to
  43945. // support once('readable', fn) cycles. This means that calling
  43946. // resume within the same tick will have no
  43947. // effect.
  43948. process.nextTick(updateReadableListening, this);
  43949. }
  43950. return res;
  43951. };
  43952. Readable.prototype.removeAllListeners = function (ev) {
  43953. var res = Stream.prototype.removeAllListeners.apply(this, arguments);
  43954. if (ev === 'readable' || ev === undefined) {
  43955. // We need to check if there is someone still listening to
  43956. // readable and reset the state. However this needs to happen
  43957. // after readable has been emitted but before I/O (nextTick) to
  43958. // support once('readable', fn) cycles. This means that calling
  43959. // resume within the same tick will have no
  43960. // effect.
  43961. process.nextTick(updateReadableListening, this);
  43962. }
  43963. return res;
  43964. };
  43965. function updateReadableListening(self) {
  43966. var state = self._readableState;
  43967. state.readableListening = self.listenerCount('readable') > 0;
  43968. if (state.resumeScheduled && !state.paused) {
  43969. // flowing needs to be set to true now, otherwise
  43970. // the upcoming resume will not flow.
  43971. state.flowing = true; // crude way to check if we should resume
  43972. } else if (self.listenerCount('data') > 0) {
  43973. self.resume();
  43974. }
  43975. }
  43976. function nReadingNextTick(self) {
  43977. debug('readable nexttick read 0');
  43978. self.read(0);
  43979. } // pause() and resume() are remnants of the legacy readable stream API
  43980. // If the user uses them, then switch into old mode.
  43981. Readable.prototype.resume = function () {
  43982. var state = this._readableState;
  43983. if (!state.flowing) {
  43984. debug('resume'); // we flow only if there is no one listening
  43985. // for readable, but we still have to call
  43986. // resume()
  43987. state.flowing = !state.readableListening;
  43988. resume(this, state);
  43989. }
  43990. state.paused = false;
  43991. return this;
  43992. };
  43993. function resume(stream, state) {
  43994. if (!state.resumeScheduled) {
  43995. state.resumeScheduled = true;
  43996. process.nextTick(resume_, stream, state);
  43997. }
  43998. }
  43999. function resume_(stream, state) {
  44000. debug('resume', state.reading);
  44001. if (!state.reading) {
  44002. stream.read(0);
  44003. }
  44004. state.resumeScheduled = false;
  44005. stream.emit('resume');
  44006. flow(stream);
  44007. if (state.flowing && !state.reading) stream.read(0);
  44008. }
  44009. Readable.prototype.pause = function () {
  44010. debug('call pause flowing=%j', this._readableState.flowing);
  44011. if (this._readableState.flowing !== false) {
  44012. debug('pause');
  44013. this._readableState.flowing = false;
  44014. this.emit('pause');
  44015. }
  44016. this._readableState.paused = true;
  44017. return this;
  44018. };
  44019. function flow(stream) {
  44020. var state = stream._readableState;
  44021. debug('flow', state.flowing);
  44022. while (state.flowing && stream.read() !== null) {
  44023. ;
  44024. }
  44025. } // wrap an old-style stream as the async data source.
  44026. // This is *not* part of the readable stream interface.
  44027. // It is an ugly unfortunate mess of history.
  44028. Readable.prototype.wrap = function (stream) {
  44029. var _this = this;
  44030. var state = this._readableState;
  44031. var paused = false;
  44032. stream.on('end', function () {
  44033. debug('wrapped end');
  44034. if (state.decoder && !state.ended) {
  44035. var chunk = state.decoder.end();
  44036. if (chunk && chunk.length) _this.push(chunk);
  44037. }
  44038. _this.push(null);
  44039. });
  44040. stream.on('data', function (chunk) {
  44041. debug('wrapped data');
  44042. if (state.decoder) chunk = state.decoder.write(chunk); // don't skip over falsy values in objectMode
  44043. if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return;
  44044. var ret = _this.push(chunk);
  44045. if (!ret) {
  44046. paused = true;
  44047. stream.pause();
  44048. }
  44049. }); // proxy all the other methods.
  44050. // important when wrapping filters and duplexes.
  44051. for (var i in stream) {
  44052. if (this[i] === undefined && typeof stream[i] === 'function') {
  44053. this[i] = function methodWrap(method) {
  44054. return function methodWrapReturnFunction() {
  44055. return stream[method].apply(stream, arguments);
  44056. };
  44057. }(i);
  44058. }
  44059. } // proxy certain important events.
  44060. for (var n = 0; n < kProxyEvents.length; n++) {
  44061. stream.on(kProxyEvents[n], this.emit.bind(this, kProxyEvents[n]));
  44062. } // when we try to consume some more bytes, simply unpause the
  44063. // underlying stream.
  44064. this._read = function (n) {
  44065. debug('wrapped _read', n);
  44066. if (paused) {
  44067. paused = false;
  44068. stream.resume();
  44069. }
  44070. };
  44071. return this;
  44072. };
  44073. if (typeof Symbol === 'function') {
  44074. Readable.prototype[Symbol.asyncIterator] = function () {
  44075. if (createReadableStreamAsyncIterator === undefined) {
  44076. createReadableStreamAsyncIterator = __webpack_require__(828);
  44077. }
  44078. return createReadableStreamAsyncIterator(this);
  44079. };
  44080. }
  44081. Object.defineProperty(Readable.prototype, 'readableHighWaterMark', {
  44082. // making it explicit this property is not enumerable
  44083. // because otherwise some prototype manipulation in
  44084. // userland will fail
  44085. enumerable: false,
  44086. get: function get() {
  44087. return this._readableState.highWaterMark;
  44088. }
  44089. });
  44090. Object.defineProperty(Readable.prototype, 'readableBuffer', {
  44091. // making it explicit this property is not enumerable
  44092. // because otherwise some prototype manipulation in
  44093. // userland will fail
  44094. enumerable: false,
  44095. get: function get() {
  44096. return this._readableState && this._readableState.buffer;
  44097. }
  44098. });
  44099. Object.defineProperty(Readable.prototype, 'readableFlowing', {
  44100. // making it explicit this property is not enumerable
  44101. // because otherwise some prototype manipulation in
  44102. // userland will fail
  44103. enumerable: false,
  44104. get: function get() {
  44105. return this._readableState.flowing;
  44106. },
  44107. set: function set(state) {
  44108. if (this._readableState) {
  44109. this._readableState.flowing = state;
  44110. }
  44111. }
  44112. }); // exposed for testing purposes only.
  44113. Readable._fromList = fromList;
  44114. Object.defineProperty(Readable.prototype, 'readableLength', {
  44115. // making it explicit this property is not enumerable
  44116. // because otherwise some prototype manipulation in
  44117. // userland will fail
  44118. enumerable: false,
  44119. get: function get() {
  44120. return this._readableState.length;
  44121. }
  44122. }); // Pluck off n bytes from an array of buffers.
  44123. // Length is the combined lengths of all the buffers in the list.
  44124. // This function is designed to be inlinable, so please take care when making
  44125. // changes to the function body.
  44126. function fromList(n, state) {
  44127. // nothing buffered
  44128. if (state.length === 0) return null;
  44129. var ret;
  44130. if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) {
  44131. // read it all, truncate the list
  44132. if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.first();else ret = state.buffer.concat(state.length);
  44133. state.buffer.clear();
  44134. } else {
  44135. // read part of list
  44136. ret = state.buffer.consume(n, state.decoder);
  44137. }
  44138. return ret;
  44139. }
  44140. function endReadable(stream) {
  44141. var state = stream._readableState;
  44142. debug('endReadable', state.endEmitted);
  44143. if (!state.endEmitted) {
  44144. state.ended = true;
  44145. process.nextTick(endReadableNT, state, stream);
  44146. }
  44147. }
  44148. function endReadableNT(state, stream) {
  44149. debug('endReadableNT', state.endEmitted, state.length); // Check that we didn't get one last unshift.
  44150. if (!state.endEmitted && state.length === 0) {
  44151. state.endEmitted = true;
  44152. stream.readable = false;
  44153. stream.emit('end');
  44154. if (state.autoDestroy) {
  44155. // In case of duplex streams we need a way to detect
  44156. // if the writable side is ready for autoDestroy as well
  44157. var wState = stream._writableState;
  44158. if (!wState || wState.autoDestroy && wState.finished) {
  44159. stream.destroy();
  44160. }
  44161. }
  44162. }
  44163. }
  44164. if (typeof Symbol === 'function') {
  44165. Readable.from = function (iterable, opts) {
  44166. if (from === undefined) {
  44167. from = __webpack_require__(1265);
  44168. }
  44169. return from(Readable, iterable, opts);
  44170. };
  44171. }
  44172. function indexOf(xs, x) {
  44173. for (var i = 0, l = xs.length; i < l; i++) {
  44174. if (xs[i] === x) return i;
  44175. }
  44176. return -1;
  44177. }
  44178. /***/ }),
  44179. /***/ 4473:
  44180. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  44181. "use strict";
  44182. // Copyright Joyent, Inc. and other Node contributors.
  44183. //
  44184. // Permission is hereby granted, free of charge, to any person obtaining a
  44185. // copy of this software and associated documentation files (the
  44186. // "Software"), to deal in the Software without restriction, including
  44187. // without limitation the rights to use, copy, modify, merge, publish,
  44188. // distribute, sublicense, and/or sell copies of the Software, and to permit
  44189. // persons to whom the Software is furnished to do so, subject to the
  44190. // following conditions:
  44191. //
  44192. // The above copyright notice and this permission notice shall be included
  44193. // in all copies or substantial portions of the Software.
  44194. //
  44195. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  44196. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  44197. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  44198. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  44199. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  44200. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  44201. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  44202. // a transform stream is a readable/writable stream where you do
  44203. // something with the data. Sometimes it's called a "filter",
  44204. // but that's not a great name for it, since that implies a thing where
  44205. // some bits pass through, and others are simply ignored. (That would
  44206. // be a valid example of a transform, of course.)
  44207. //
  44208. // While the output is causally related to the input, it's not a
  44209. // necessarily symmetric or synchronous transformation. For example,
  44210. // a zlib stream might take multiple plain-text writes(), and then
  44211. // emit a single compressed chunk some time in the future.
  44212. //
  44213. // Here's how this works:
  44214. //
  44215. // The Transform stream has all the aspects of the readable and writable
  44216. // stream classes. When you write(chunk), that calls _write(chunk,cb)
  44217. // internally, and returns false if there's a lot of pending writes
  44218. // buffered up. When you call read(), that calls _read(n) until
  44219. // there's enough pending readable data buffered up.
  44220. //
  44221. // In a transform stream, the written data is placed in a buffer. When
  44222. // _read(n) is called, it transforms the queued up data, calling the
  44223. // buffered _write cb's as it consumes chunks. If consuming a single
  44224. // written chunk would result in multiple output chunks, then the first
  44225. // outputted bit calls the readcb, and subsequent chunks just go into
  44226. // the read buffer, and will cause it to emit 'readable' if necessary.
  44227. //
  44228. // This way, back-pressure is actually determined by the reading side,
  44229. // since _read has to be called to start processing a new chunk. However,
  44230. // a pathological inflate type of transform can cause excessive buffering
  44231. // here. For example, imagine a stream where every byte of input is
  44232. // interpreted as an integer from 0-255, and then results in that many
  44233. // bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in
  44234. // 1kb of data being output. In this case, you could write a very small
  44235. // amount of input, and end up with a very large amount of output. In
  44236. // such a pathological inflating mechanism, there'd be no way to tell
  44237. // the system to stop doing the transform. A single 4MB write could
  44238. // cause the system to run out of memory.
  44239. //
  44240. // However, even in such a pathological case, only a single written chunk
  44241. // would be consumed, and then the rest would wait (un-transformed) until
  44242. // the results of the previous transformed chunk were consumed.
  44243. module.exports = Transform;
  44244. var _require$codes = (__webpack_require__(8106)/* .codes */ .q),
  44245. ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
  44246. ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
  44247. ERR_TRANSFORM_ALREADY_TRANSFORMING = _require$codes.ERR_TRANSFORM_ALREADY_TRANSFORMING,
  44248. ERR_TRANSFORM_WITH_LENGTH_0 = _require$codes.ERR_TRANSFORM_WITH_LENGTH_0;
  44249. var Duplex = __webpack_require__(8656);
  44250. __webpack_require__(5717)(Transform, Duplex);
  44251. function afterTransform(er, data) {
  44252. var ts = this._transformState;
  44253. ts.transforming = false;
  44254. var cb = ts.writecb;
  44255. if (cb === null) {
  44256. return this.emit('error', new ERR_MULTIPLE_CALLBACK());
  44257. }
  44258. ts.writechunk = null;
  44259. ts.writecb = null;
  44260. if (data != null) // single equals check for both `null` and `undefined`
  44261. this.push(data);
  44262. cb(er);
  44263. var rs = this._readableState;
  44264. rs.reading = false;
  44265. if (rs.needReadable || rs.length < rs.highWaterMark) {
  44266. this._read(rs.highWaterMark);
  44267. }
  44268. }
  44269. function Transform(options) {
  44270. if (!(this instanceof Transform)) return new Transform(options);
  44271. Duplex.call(this, options);
  44272. this._transformState = {
  44273. afterTransform: afterTransform.bind(this),
  44274. needTransform: false,
  44275. transforming: false,
  44276. writecb: null,
  44277. writechunk: null,
  44278. writeencoding: null
  44279. }; // start out asking for a readable event once data is transformed.
  44280. this._readableState.needReadable = true; // we have implemented the _read method, and done the other things
  44281. // that Readable wants before the first _read call, so unset the
  44282. // sync guard flag.
  44283. this._readableState.sync = false;
  44284. if (options) {
  44285. if (typeof options.transform === 'function') this._transform = options.transform;
  44286. if (typeof options.flush === 'function') this._flush = options.flush;
  44287. } // When the writable side finishes, then flush out anything remaining.
  44288. this.on('prefinish', prefinish);
  44289. }
  44290. function prefinish() {
  44291. var _this = this;
  44292. if (typeof this._flush === 'function' && !this._readableState.destroyed) {
  44293. this._flush(function (er, data) {
  44294. done(_this, er, data);
  44295. });
  44296. } else {
  44297. done(this, null, null);
  44298. }
  44299. }
  44300. Transform.prototype.push = function (chunk, encoding) {
  44301. this._transformState.needTransform = false;
  44302. return Duplex.prototype.push.call(this, chunk, encoding);
  44303. }; // This is the part where you do stuff!
  44304. // override this function in implementation classes.
  44305. // 'chunk' is an input chunk.
  44306. //
  44307. // Call `push(newChunk)` to pass along transformed output
  44308. // to the readable side. You may call 'push' zero or more times.
  44309. //
  44310. // Call `cb(err)` when you are done with this chunk. If you pass
  44311. // an error, then that'll put the hurt on the whole operation. If you
  44312. // never call cb(), then you'll never get another chunk.
  44313. Transform.prototype._transform = function (chunk, encoding, cb) {
  44314. cb(new ERR_METHOD_NOT_IMPLEMENTED('_transform()'));
  44315. };
  44316. Transform.prototype._write = function (chunk, encoding, cb) {
  44317. var ts = this._transformState;
  44318. ts.writecb = cb;
  44319. ts.writechunk = chunk;
  44320. ts.writeencoding = encoding;
  44321. if (!ts.transforming) {
  44322. var rs = this._readableState;
  44323. if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark);
  44324. }
  44325. }; // Doesn't matter what the args are here.
  44326. // _transform does all the work.
  44327. // That we got here means that the readable side wants more data.
  44328. Transform.prototype._read = function (n) {
  44329. var ts = this._transformState;
  44330. if (ts.writechunk !== null && !ts.transforming) {
  44331. ts.transforming = true;
  44332. this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform);
  44333. } else {
  44334. // mark that we need a transform, so that any data that comes in
  44335. // will get processed, now that we've asked for it.
  44336. ts.needTransform = true;
  44337. }
  44338. };
  44339. Transform.prototype._destroy = function (err, cb) {
  44340. Duplex.prototype._destroy.call(this, err, function (err2) {
  44341. cb(err2);
  44342. });
  44343. };
  44344. function done(stream, er, data) {
  44345. if (er) return stream.emit('error', er);
  44346. if (data != null) // single equals check for both `null` and `undefined`
  44347. stream.push(data); // TODO(BridgeAR): Write a test for these two error cases
  44348. // if there's nothing in the write buffer, then that means
  44349. // that nothing more will ever be provided
  44350. if (stream._writableState.length) throw new ERR_TRANSFORM_WITH_LENGTH_0();
  44351. if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
  44352. return stream.push(null);
  44353. }
  44354. /***/ }),
  44355. /***/ 323:
  44356. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  44357. "use strict";
  44358. /* provided dependency */ var process = __webpack_require__(4155);
  44359. // Copyright Joyent, Inc. and other Node contributors.
  44360. //
  44361. // Permission is hereby granted, free of charge, to any person obtaining a
  44362. // copy of this software and associated documentation files (the
  44363. // "Software"), to deal in the Software without restriction, including
  44364. // without limitation the rights to use, copy, modify, merge, publish,
  44365. // distribute, sublicense, and/or sell copies of the Software, and to permit
  44366. // persons to whom the Software is furnished to do so, subject to the
  44367. // following conditions:
  44368. //
  44369. // The above copyright notice and this permission notice shall be included
  44370. // in all copies or substantial portions of the Software.
  44371. //
  44372. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  44373. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  44374. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  44375. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  44376. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  44377. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  44378. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  44379. // A bit simpler than readable streams.
  44380. // Implement an async ._write(chunk, encoding, cb), and it'll handle all
  44381. // the drain event emission and buffering.
  44382. module.exports = Writable;
  44383. /* <replacement> */
  44384. function WriteReq(chunk, encoding, cb) {
  44385. this.chunk = chunk;
  44386. this.encoding = encoding;
  44387. this.callback = cb;
  44388. this.next = null;
  44389. } // It seems a linked list but it is not
  44390. // there will be only 2 of these for each stream
  44391. function CorkedRequest(state) {
  44392. var _this = this;
  44393. this.next = null;
  44394. this.entry = null;
  44395. this.finish = function () {
  44396. onCorkedFinish(_this, state);
  44397. };
  44398. }
  44399. /* </replacement> */
  44400. /*<replacement>*/
  44401. var Duplex;
  44402. /*</replacement>*/
  44403. Writable.WritableState = WritableState;
  44404. /*<replacement>*/
  44405. var internalUtil = {
  44406. deprecate: __webpack_require__(4927)
  44407. };
  44408. /*</replacement>*/
  44409. /*<replacement>*/
  44410. var Stream = __webpack_require__(3194);
  44411. /*</replacement>*/
  44412. var Buffer = (__webpack_require__(8823).Buffer);
  44413. var OurUint8Array = __webpack_require__.g.Uint8Array || function () {};
  44414. function _uint8ArrayToBuffer(chunk) {
  44415. return Buffer.from(chunk);
  44416. }
  44417. function _isUint8Array(obj) {
  44418. return Buffer.isBuffer(obj) || obj instanceof OurUint8Array;
  44419. }
  44420. var destroyImpl = __webpack_require__(1029);
  44421. var _require = __webpack_require__(94),
  44422. getHighWaterMark = _require.getHighWaterMark;
  44423. var _require$codes = (__webpack_require__(8106)/* .codes */ .q),
  44424. ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
  44425. ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
  44426. ERR_MULTIPLE_CALLBACK = _require$codes.ERR_MULTIPLE_CALLBACK,
  44427. ERR_STREAM_CANNOT_PIPE = _require$codes.ERR_STREAM_CANNOT_PIPE,
  44428. ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED,
  44429. ERR_STREAM_NULL_VALUES = _require$codes.ERR_STREAM_NULL_VALUES,
  44430. ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,
  44431. ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
  44432. var errorOrDestroy = destroyImpl.errorOrDestroy;
  44433. __webpack_require__(5717)(Writable, Stream);
  44434. function nop() {}
  44435. function WritableState(options, stream, isDuplex) {
  44436. Duplex = Duplex || __webpack_require__(8656);
  44437. options = options || {}; // Duplex streams are both readable and writable, but share
  44438. // the same options object.
  44439. // However, some cases require setting options to different
  44440. // values for the readable and the writable sides of the duplex stream,
  44441. // e.g. options.readableObjectMode vs. options.writableObjectMode, etc.
  44442. if (typeof isDuplex !== 'boolean') isDuplex = stream instanceof Duplex; // object stream flag to indicate whether or not this stream
  44443. // contains buffers or objects.
  44444. this.objectMode = !!options.objectMode;
  44445. if (isDuplex) this.objectMode = this.objectMode || !!options.writableObjectMode; // the point at which write() starts returning false
  44446. // Note: 0 is a valid value, means that we always return false if
  44447. // the entire buffer is not flushed immediately on write()
  44448. this.highWaterMark = getHighWaterMark(this, options, 'writableHighWaterMark', isDuplex); // if _final has been called
  44449. this.finalCalled = false; // drain event flag.
  44450. this.needDrain = false; // at the start of calling end()
  44451. this.ending = false; // when end() has been called, and returned
  44452. this.ended = false; // when 'finish' is emitted
  44453. this.finished = false; // has it been destroyed
  44454. this.destroyed = false; // should we decode strings into buffers before passing to _write?
  44455. // this is here so that some node-core streams can optimize string
  44456. // handling at a lower level.
  44457. var noDecode = options.decodeStrings === false;
  44458. this.decodeStrings = !noDecode; // Crypto is kind of old and crusty. Historically, its default string
  44459. // encoding is 'binary' so we have to make this configurable.
  44460. // Everything else in the universe uses 'utf8', though.
  44461. this.defaultEncoding = options.defaultEncoding || 'utf8'; // not an actual buffer we keep track of, but a measurement
  44462. // of how much we're waiting to get pushed to some underlying
  44463. // socket or file.
  44464. this.length = 0; // a flag to see when we're in the middle of a write.
  44465. this.writing = false; // when true all writes will be buffered until .uncork() call
  44466. this.corked = 0; // a flag to be able to tell if the onwrite cb is called immediately,
  44467. // or on a later tick. We set this to true at first, because any
  44468. // actions that shouldn't happen until "later" should generally also
  44469. // not happen before the first write call.
  44470. this.sync = true; // a flag to know if we're processing previously buffered items, which
  44471. // may call the _write() callback in the same tick, so that we don't
  44472. // end up in an overlapped onwrite situation.
  44473. this.bufferProcessing = false; // the callback that's passed to _write(chunk,cb)
  44474. this.onwrite = function (er) {
  44475. onwrite(stream, er);
  44476. }; // the callback that the user supplies to write(chunk,encoding,cb)
  44477. this.writecb = null; // the amount that is being written when _write is called.
  44478. this.writelen = 0;
  44479. this.bufferedRequest = null;
  44480. this.lastBufferedRequest = null; // number of pending user-supplied write callbacks
  44481. // this must be 0 before 'finish' can be emitted
  44482. this.pendingcb = 0; // emit prefinish if the only thing we're waiting for is _write cbs
  44483. // This is relevant for synchronous Transform streams
  44484. this.prefinished = false; // True if the error was already emitted and should not be thrown again
  44485. this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.
  44486. this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')
  44487. this.autoDestroy = !!options.autoDestroy; // count buffered requests
  44488. this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
  44489. // one allocated and free to use, and we maintain at most two
  44490. this.corkedRequestsFree = new CorkedRequest(this);
  44491. }
  44492. WritableState.prototype.getBuffer = function getBuffer() {
  44493. var current = this.bufferedRequest;
  44494. var out = [];
  44495. while (current) {
  44496. out.push(current);
  44497. current = current.next;
  44498. }
  44499. return out;
  44500. };
  44501. (function () {
  44502. try {
  44503. Object.defineProperty(WritableState.prototype, 'buffer', {
  44504. get: internalUtil.deprecate(function writableStateBufferGetter() {
  44505. return this.getBuffer();
  44506. }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.', 'DEP0003')
  44507. });
  44508. } catch (_) {}
  44509. })(); // Test _writableState for inheritance to account for Duplex streams,
  44510. // whose prototype chain only points to Readable.
  44511. var realHasInstance;
  44512. if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') {
  44513. realHasInstance = Function.prototype[Symbol.hasInstance];
  44514. Object.defineProperty(Writable, Symbol.hasInstance, {
  44515. value: function value(object) {
  44516. if (realHasInstance.call(this, object)) return true;
  44517. if (this !== Writable) return false;
  44518. return object && object._writableState instanceof WritableState;
  44519. }
  44520. });
  44521. } else {
  44522. realHasInstance = function realHasInstance(object) {
  44523. return object instanceof this;
  44524. };
  44525. }
  44526. function Writable(options) {
  44527. Duplex = Duplex || __webpack_require__(8656); // Writable ctor is applied to Duplexes, too.
  44528. // `realHasInstance` is necessary because using plain `instanceof`
  44529. // would return false, as no `_writableState` property is attached.
  44530. // Trying to use the custom `instanceof` for Writable here will also break the
  44531. // Node.js LazyTransform implementation, which has a non-trivial getter for
  44532. // `_writableState` that would lead to infinite recursion.
  44533. // Checking for a Stream.Duplex instance is faster here instead of inside
  44534. // the WritableState constructor, at least with V8 6.5
  44535. var isDuplex = this instanceof Duplex;
  44536. if (!isDuplex && !realHasInstance.call(Writable, this)) return new Writable(options);
  44537. this._writableState = new WritableState(options, this, isDuplex); // legacy.
  44538. this.writable = true;
  44539. if (options) {
  44540. if (typeof options.write === 'function') this._write = options.write;
  44541. if (typeof options.writev === 'function') this._writev = options.writev;
  44542. if (typeof options.destroy === 'function') this._destroy = options.destroy;
  44543. if (typeof options.final === 'function') this._final = options.final;
  44544. }
  44545. Stream.call(this);
  44546. } // Otherwise people can pipe Writable streams, which is just wrong.
  44547. Writable.prototype.pipe = function () {
  44548. errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
  44549. };
  44550. function writeAfterEnd(stream, cb) {
  44551. var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb
  44552. errorOrDestroy(stream, er);
  44553. process.nextTick(cb, er);
  44554. } // Checks that a user-supplied chunk is valid, especially for the particular
  44555. // mode the stream is in. Currently this means that `null` is never accepted
  44556. // and undefined/non-string values are only allowed in object mode.
  44557. function validChunk(stream, state, chunk, cb) {
  44558. var er;
  44559. if (chunk === null) {
  44560. er = new ERR_STREAM_NULL_VALUES();
  44561. } else if (typeof chunk !== 'string' && !state.objectMode) {
  44562. er = new ERR_INVALID_ARG_TYPE('chunk', ['string', 'Buffer'], chunk);
  44563. }
  44564. if (er) {
  44565. errorOrDestroy(stream, er);
  44566. process.nextTick(cb, er);
  44567. return false;
  44568. }
  44569. return true;
  44570. }
  44571. Writable.prototype.write = function (chunk, encoding, cb) {
  44572. var state = this._writableState;
  44573. var ret = false;
  44574. var isBuf = !state.objectMode && _isUint8Array(chunk);
  44575. if (isBuf && !Buffer.isBuffer(chunk)) {
  44576. chunk = _uint8ArrayToBuffer(chunk);
  44577. }
  44578. if (typeof encoding === 'function') {
  44579. cb = encoding;
  44580. encoding = null;
  44581. }
  44582. if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding;
  44583. if (typeof cb !== 'function') cb = nop;
  44584. if (state.ending) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) {
  44585. state.pendingcb++;
  44586. ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
  44587. }
  44588. return ret;
  44589. };
  44590. Writable.prototype.cork = function () {
  44591. this._writableState.corked++;
  44592. };
  44593. Writable.prototype.uncork = function () {
  44594. var state = this._writableState;
  44595. if (state.corked) {
  44596. state.corked--;
  44597. if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
  44598. }
  44599. };
  44600. Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
  44601. // node::ParseEncoding() requires lower case.
  44602. if (typeof encoding === 'string') encoding = encoding.toLowerCase();
  44603. if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new ERR_UNKNOWN_ENCODING(encoding);
  44604. this._writableState.defaultEncoding = encoding;
  44605. return this;
  44606. };
  44607. Object.defineProperty(Writable.prototype, 'writableBuffer', {
  44608. // making it explicit this property is not enumerable
  44609. // because otherwise some prototype manipulation in
  44610. // userland will fail
  44611. enumerable: false,
  44612. get: function get() {
  44613. return this._writableState && this._writableState.getBuffer();
  44614. }
  44615. });
  44616. function decodeChunk(state, chunk, encoding) {
  44617. if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') {
  44618. chunk = Buffer.from(chunk, encoding);
  44619. }
  44620. return chunk;
  44621. }
  44622. Object.defineProperty(Writable.prototype, 'writableHighWaterMark', {
  44623. // making it explicit this property is not enumerable
  44624. // because otherwise some prototype manipulation in
  44625. // userland will fail
  44626. enumerable: false,
  44627. get: function get() {
  44628. return this._writableState.highWaterMark;
  44629. }
  44630. }); // if we're already writing something, then just put this
  44631. // in the queue, and wait our turn. Otherwise, call _write
  44632. // If we return false, then we need a drain event, so set that flag.
  44633. function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
  44634. if (!isBuf) {
  44635. var newChunk = decodeChunk(state, chunk, encoding);
  44636. if (chunk !== newChunk) {
  44637. isBuf = true;
  44638. encoding = 'buffer';
  44639. chunk = newChunk;
  44640. }
  44641. }
  44642. var len = state.objectMode ? 1 : chunk.length;
  44643. state.length += len;
  44644. var ret = state.length < state.highWaterMark; // we must ensure that previous needDrain will not be reset to false.
  44645. if (!ret) state.needDrain = true;
  44646. if (state.writing || state.corked) {
  44647. var last = state.lastBufferedRequest;
  44648. state.lastBufferedRequest = {
  44649. chunk: chunk,
  44650. encoding: encoding,
  44651. isBuf: isBuf,
  44652. callback: cb,
  44653. next: null
  44654. };
  44655. if (last) {
  44656. last.next = state.lastBufferedRequest;
  44657. } else {
  44658. state.bufferedRequest = state.lastBufferedRequest;
  44659. }
  44660. state.bufferedRequestCount += 1;
  44661. } else {
  44662. doWrite(stream, state, false, len, chunk, encoding, cb);
  44663. }
  44664. return ret;
  44665. }
  44666. function doWrite(stream, state, writev, len, chunk, encoding, cb) {
  44667. state.writelen = len;
  44668. state.writecb = cb;
  44669. state.writing = true;
  44670. state.sync = true;
  44671. if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED('write'));else if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite);
  44672. state.sync = false;
  44673. }
  44674. function onwriteError(stream, state, sync, er, cb) {
  44675. --state.pendingcb;
  44676. if (sync) {
  44677. // defer the callback if we are being called synchronously
  44678. // to avoid piling up things on the stack
  44679. process.nextTick(cb, er); // this can emit finish, and it will always happen
  44680. // after error
  44681. process.nextTick(finishMaybe, stream, state);
  44682. stream._writableState.errorEmitted = true;
  44683. errorOrDestroy(stream, er);
  44684. } else {
  44685. // the caller expect this to happen before if
  44686. // it is async
  44687. cb(er);
  44688. stream._writableState.errorEmitted = true;
  44689. errorOrDestroy(stream, er); // this can emit finish, but finish must
  44690. // always follow error
  44691. finishMaybe(stream, state);
  44692. }
  44693. }
  44694. function onwriteStateUpdate(state) {
  44695. state.writing = false;
  44696. state.writecb = null;
  44697. state.length -= state.writelen;
  44698. state.writelen = 0;
  44699. }
  44700. function onwrite(stream, er) {
  44701. var state = stream._writableState;
  44702. var sync = state.sync;
  44703. var cb = state.writecb;
  44704. if (typeof cb !== 'function') throw new ERR_MULTIPLE_CALLBACK();
  44705. onwriteStateUpdate(state);
  44706. if (er) onwriteError(stream, state, sync, er, cb);else {
  44707. // Check if we're actually ready to finish, but don't emit yet
  44708. var finished = needFinish(state) || stream.destroyed;
  44709. if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
  44710. clearBuffer(stream, state);
  44711. }
  44712. if (sync) {
  44713. process.nextTick(afterWrite, stream, state, finished, cb);
  44714. } else {
  44715. afterWrite(stream, state, finished, cb);
  44716. }
  44717. }
  44718. }
  44719. function afterWrite(stream, state, finished, cb) {
  44720. if (!finished) onwriteDrain(stream, state);
  44721. state.pendingcb--;
  44722. cb();
  44723. finishMaybe(stream, state);
  44724. } // Must force callback to be called on nextTick, so that we don't
  44725. // emit 'drain' before the write() consumer gets the 'false' return
  44726. // value, and has a chance to attach a 'drain' listener.
  44727. function onwriteDrain(stream, state) {
  44728. if (state.length === 0 && state.needDrain) {
  44729. state.needDrain = false;
  44730. stream.emit('drain');
  44731. }
  44732. } // if there's something in the buffer waiting, then process it
  44733. function clearBuffer(stream, state) {
  44734. state.bufferProcessing = true;
  44735. var entry = state.bufferedRequest;
  44736. if (stream._writev && entry && entry.next) {
  44737. // Fast case, write everything using _writev()
  44738. var l = state.bufferedRequestCount;
  44739. var buffer = new Array(l);
  44740. var holder = state.corkedRequestsFree;
  44741. holder.entry = entry;
  44742. var count = 0;
  44743. var allBuffers = true;
  44744. while (entry) {
  44745. buffer[count] = entry;
  44746. if (!entry.isBuf) allBuffers = false;
  44747. entry = entry.next;
  44748. count += 1;
  44749. }
  44750. buffer.allBuffers = allBuffers;
  44751. doWrite(stream, state, true, state.length, buffer, '', holder.finish); // doWrite is almost always async, defer these to save a bit of time
  44752. // as the hot path ends with doWrite
  44753. state.pendingcb++;
  44754. state.lastBufferedRequest = null;
  44755. if (holder.next) {
  44756. state.corkedRequestsFree = holder.next;
  44757. holder.next = null;
  44758. } else {
  44759. state.corkedRequestsFree = new CorkedRequest(state);
  44760. }
  44761. state.bufferedRequestCount = 0;
  44762. } else {
  44763. // Slow case, write chunks one-by-one
  44764. while (entry) {
  44765. var chunk = entry.chunk;
  44766. var encoding = entry.encoding;
  44767. var cb = entry.callback;
  44768. var len = state.objectMode ? 1 : chunk.length;
  44769. doWrite(stream, state, false, len, chunk, encoding, cb);
  44770. entry = entry.next;
  44771. state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then
  44772. // it means that we need to wait until it does.
  44773. // also, that means that the chunk and cb are currently
  44774. // being processed, so move the buffer counter past them.
  44775. if (state.writing) {
  44776. break;
  44777. }
  44778. }
  44779. if (entry === null) state.lastBufferedRequest = null;
  44780. }
  44781. state.bufferedRequest = entry;
  44782. state.bufferProcessing = false;
  44783. }
  44784. Writable.prototype._write = function (chunk, encoding, cb) {
  44785. cb(new ERR_METHOD_NOT_IMPLEMENTED('_write()'));
  44786. };
  44787. Writable.prototype._writev = null;
  44788. Writable.prototype.end = function (chunk, encoding, cb) {
  44789. var state = this._writableState;
  44790. if (typeof chunk === 'function') {
  44791. cb = chunk;
  44792. chunk = null;
  44793. encoding = null;
  44794. } else if (typeof encoding === 'function') {
  44795. cb = encoding;
  44796. encoding = null;
  44797. }
  44798. if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); // .end() fully uncorks
  44799. if (state.corked) {
  44800. state.corked = 1;
  44801. this.uncork();
  44802. } // ignore unnecessary end() calls.
  44803. if (!state.ending) endWritable(this, state, cb);
  44804. return this;
  44805. };
  44806. Object.defineProperty(Writable.prototype, 'writableLength', {
  44807. // making it explicit this property is not enumerable
  44808. // because otherwise some prototype manipulation in
  44809. // userland will fail
  44810. enumerable: false,
  44811. get: function get() {
  44812. return this._writableState.length;
  44813. }
  44814. });
  44815. function needFinish(state) {
  44816. return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing;
  44817. }
  44818. function callFinal(stream, state) {
  44819. stream._final(function (err) {
  44820. state.pendingcb--;
  44821. if (err) {
  44822. errorOrDestroy(stream, err);
  44823. }
  44824. state.prefinished = true;
  44825. stream.emit('prefinish');
  44826. finishMaybe(stream, state);
  44827. });
  44828. }
  44829. function prefinish(stream, state) {
  44830. if (!state.prefinished && !state.finalCalled) {
  44831. if (typeof stream._final === 'function' && !state.destroyed) {
  44832. state.pendingcb++;
  44833. state.finalCalled = true;
  44834. process.nextTick(callFinal, stream, state);
  44835. } else {
  44836. state.prefinished = true;
  44837. stream.emit('prefinish');
  44838. }
  44839. }
  44840. }
  44841. function finishMaybe(stream, state) {
  44842. var need = needFinish(state);
  44843. if (need) {
  44844. prefinish(stream, state);
  44845. if (state.pendingcb === 0) {
  44846. state.finished = true;
  44847. stream.emit('finish');
  44848. if (state.autoDestroy) {
  44849. // In case of duplex streams we need a way to detect
  44850. // if the readable side is ready for autoDestroy as well
  44851. var rState = stream._readableState;
  44852. if (!rState || rState.autoDestroy && rState.endEmitted) {
  44853. stream.destroy();
  44854. }
  44855. }
  44856. }
  44857. }
  44858. return need;
  44859. }
  44860. function endWritable(stream, state, cb) {
  44861. state.ending = true;
  44862. finishMaybe(stream, state);
  44863. if (cb) {
  44864. if (state.finished) process.nextTick(cb);else stream.once('finish', cb);
  44865. }
  44866. state.ended = true;
  44867. stream.writable = false;
  44868. }
  44869. function onCorkedFinish(corkReq, state, err) {
  44870. var entry = corkReq.entry;
  44871. corkReq.entry = null;
  44872. while (entry) {
  44873. var cb = entry.callback;
  44874. state.pendingcb--;
  44875. cb(err);
  44876. entry = entry.next;
  44877. } // reuse the free corkReq.
  44878. state.corkedRequestsFree.next = corkReq;
  44879. }
  44880. Object.defineProperty(Writable.prototype, 'destroyed', {
  44881. // making it explicit this property is not enumerable
  44882. // because otherwise some prototype manipulation in
  44883. // userland will fail
  44884. enumerable: false,
  44885. get: function get() {
  44886. if (this._writableState === undefined) {
  44887. return false;
  44888. }
  44889. return this._writableState.destroyed;
  44890. },
  44891. set: function set(value) {
  44892. // we ignore the value if the stream
  44893. // has not been initialized yet
  44894. if (!this._writableState) {
  44895. return;
  44896. } // backward compatibility, the user is explicitly
  44897. // managing destroyed
  44898. this._writableState.destroyed = value;
  44899. }
  44900. });
  44901. Writable.prototype.destroy = destroyImpl.destroy;
  44902. Writable.prototype._undestroy = destroyImpl.undestroy;
  44903. Writable.prototype._destroy = function (err, cb) {
  44904. cb(err);
  44905. };
  44906. /***/ }),
  44907. /***/ 828:
  44908. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  44909. "use strict";
  44910. /* provided dependency */ var process = __webpack_require__(4155);
  44911. var _Object$setPrototypeO;
  44912. 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; }
  44913. var finished = __webpack_require__(1086);
  44914. var kLastResolve = Symbol('lastResolve');
  44915. var kLastReject = Symbol('lastReject');
  44916. var kError = Symbol('error');
  44917. var kEnded = Symbol('ended');
  44918. var kLastPromise = Symbol('lastPromise');
  44919. var kHandlePromise = Symbol('handlePromise');
  44920. var kStream = Symbol('stream');
  44921. function createIterResult(value, done) {
  44922. return {
  44923. value: value,
  44924. done: done
  44925. };
  44926. }
  44927. function readAndResolve(iter) {
  44928. var resolve = iter[kLastResolve];
  44929. if (resolve !== null) {
  44930. var data = iter[kStream].read(); // we defer if data is null
  44931. // we can be expecting either 'end' or
  44932. // 'error'
  44933. if (data !== null) {
  44934. iter[kLastPromise] = null;
  44935. iter[kLastResolve] = null;
  44936. iter[kLastReject] = null;
  44937. resolve(createIterResult(data, false));
  44938. }
  44939. }
  44940. }
  44941. function onReadable(iter) {
  44942. // we wait for the next tick, because it might
  44943. // emit an error with process.nextTick
  44944. process.nextTick(readAndResolve, iter);
  44945. }
  44946. function wrapForNext(lastPromise, iter) {
  44947. return function (resolve, reject) {
  44948. lastPromise.then(function () {
  44949. if (iter[kEnded]) {
  44950. resolve(createIterResult(undefined, true));
  44951. return;
  44952. }
  44953. iter[kHandlePromise](resolve, reject);
  44954. }, reject);
  44955. };
  44956. }
  44957. var AsyncIteratorPrototype = Object.getPrototypeOf(function () {});
  44958. var ReadableStreamAsyncIteratorPrototype = Object.setPrototypeOf((_Object$setPrototypeO = {
  44959. get stream() {
  44960. return this[kStream];
  44961. },
  44962. next: function next() {
  44963. var _this = this;
  44964. // if we have detected an error in the meanwhile
  44965. // reject straight away
  44966. var error = this[kError];
  44967. if (error !== null) {
  44968. return Promise.reject(error);
  44969. }
  44970. if (this[kEnded]) {
  44971. return Promise.resolve(createIterResult(undefined, true));
  44972. }
  44973. if (this[kStream].destroyed) {
  44974. // We need to defer via nextTick because if .destroy(err) is
  44975. // called, the error will be emitted via nextTick, and
  44976. // we cannot guarantee that there is no error lingering around
  44977. // waiting to be emitted.
  44978. return new Promise(function (resolve, reject) {
  44979. process.nextTick(function () {
  44980. if (_this[kError]) {
  44981. reject(_this[kError]);
  44982. } else {
  44983. resolve(createIterResult(undefined, true));
  44984. }
  44985. });
  44986. });
  44987. } // if we have multiple next() calls
  44988. // we will wait for the previous Promise to finish
  44989. // this logic is optimized to support for await loops,
  44990. // where next() is only called once at a time
  44991. var lastPromise = this[kLastPromise];
  44992. var promise;
  44993. if (lastPromise) {
  44994. promise = new Promise(wrapForNext(lastPromise, this));
  44995. } else {
  44996. // fast path needed to support multiple this.push()
  44997. // without triggering the next() queue
  44998. var data = this[kStream].read();
  44999. if (data !== null) {
  45000. return Promise.resolve(createIterResult(data, false));
  45001. }
  45002. promise = new Promise(this[kHandlePromise]);
  45003. }
  45004. this[kLastPromise] = promise;
  45005. return promise;
  45006. }
  45007. }, _defineProperty(_Object$setPrototypeO, Symbol.asyncIterator, function () {
  45008. return this;
  45009. }), _defineProperty(_Object$setPrototypeO, "return", function _return() {
  45010. var _this2 = this;
  45011. // destroy(err, cb) is a private API
  45012. // we can guarantee we have that here, because we control the
  45013. // Readable class this is attached to
  45014. return new Promise(function (resolve, reject) {
  45015. _this2[kStream].destroy(null, function (err) {
  45016. if (err) {
  45017. reject(err);
  45018. return;
  45019. }
  45020. resolve(createIterResult(undefined, true));
  45021. });
  45022. });
  45023. }), _Object$setPrototypeO), AsyncIteratorPrototype);
  45024. var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterator(stream) {
  45025. var _Object$create;
  45026. var iterator = Object.create(ReadableStreamAsyncIteratorPrototype, (_Object$create = {}, _defineProperty(_Object$create, kStream, {
  45027. value: stream,
  45028. writable: true
  45029. }), _defineProperty(_Object$create, kLastResolve, {
  45030. value: null,
  45031. writable: true
  45032. }), _defineProperty(_Object$create, kLastReject, {
  45033. value: null,
  45034. writable: true
  45035. }), _defineProperty(_Object$create, kError, {
  45036. value: null,
  45037. writable: true
  45038. }), _defineProperty(_Object$create, kEnded, {
  45039. value: stream._readableState.endEmitted,
  45040. writable: true
  45041. }), _defineProperty(_Object$create, kHandlePromise, {
  45042. value: function value(resolve, reject) {
  45043. var data = iterator[kStream].read();
  45044. if (data) {
  45045. iterator[kLastPromise] = null;
  45046. iterator[kLastResolve] = null;
  45047. iterator[kLastReject] = null;
  45048. resolve(createIterResult(data, false));
  45049. } else {
  45050. iterator[kLastResolve] = resolve;
  45051. iterator[kLastReject] = reject;
  45052. }
  45053. },
  45054. writable: true
  45055. }), _Object$create));
  45056. iterator[kLastPromise] = null;
  45057. finished(stream, function (err) {
  45058. if (err && err.code !== 'ERR_STREAM_PREMATURE_CLOSE') {
  45059. var reject = iterator[kLastReject]; // reject if we are waiting for data in the Promise
  45060. // returned by next() and store the error
  45061. if (reject !== null) {
  45062. iterator[kLastPromise] = null;
  45063. iterator[kLastResolve] = null;
  45064. iterator[kLastReject] = null;
  45065. reject(err);
  45066. }
  45067. iterator[kError] = err;
  45068. return;
  45069. }
  45070. var resolve = iterator[kLastResolve];
  45071. if (resolve !== null) {
  45072. iterator[kLastPromise] = null;
  45073. iterator[kLastResolve] = null;
  45074. iterator[kLastReject] = null;
  45075. resolve(createIterResult(undefined, true));
  45076. }
  45077. iterator[kEnded] = true;
  45078. });
  45079. stream.on('readable', onReadable.bind(null, iterator));
  45080. return iterator;
  45081. };
  45082. module.exports = createReadableStreamAsyncIterator;
  45083. /***/ }),
  45084. /***/ 1029:
  45085. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  45086. "use strict";
  45087. /* provided dependency */ var process = __webpack_require__(4155);
  45088. // undocumented cb() API, needed for core, not for public API
  45089. function destroy(err, cb) {
  45090. var _this = this;
  45091. var readableDestroyed = this._readableState && this._readableState.destroyed;
  45092. var writableDestroyed = this._writableState && this._writableState.destroyed;
  45093. if (readableDestroyed || writableDestroyed) {
  45094. if (cb) {
  45095. cb(err);
  45096. } else if (err) {
  45097. if (!this._writableState) {
  45098. process.nextTick(emitErrorNT, this, err);
  45099. } else if (!this._writableState.errorEmitted) {
  45100. this._writableState.errorEmitted = true;
  45101. process.nextTick(emitErrorNT, this, err);
  45102. }
  45103. }
  45104. return this;
  45105. } // we set destroyed to true before firing error callbacks in order
  45106. // to make it re-entrance safe in case destroy() is called within callbacks
  45107. if (this._readableState) {
  45108. this._readableState.destroyed = true;
  45109. } // if this is a duplex stream mark the writable part as destroyed as well
  45110. if (this._writableState) {
  45111. this._writableState.destroyed = true;
  45112. }
  45113. this._destroy(err || null, function (err) {
  45114. if (!cb && err) {
  45115. if (!_this._writableState) {
  45116. process.nextTick(emitErrorAndCloseNT, _this, err);
  45117. } else if (!_this._writableState.errorEmitted) {
  45118. _this._writableState.errorEmitted = true;
  45119. process.nextTick(emitErrorAndCloseNT, _this, err);
  45120. } else {
  45121. process.nextTick(emitCloseNT, _this);
  45122. }
  45123. } else if (cb) {
  45124. process.nextTick(emitCloseNT, _this);
  45125. cb(err);
  45126. } else {
  45127. process.nextTick(emitCloseNT, _this);
  45128. }
  45129. });
  45130. return this;
  45131. }
  45132. function emitErrorAndCloseNT(self, err) {
  45133. emitErrorNT(self, err);
  45134. emitCloseNT(self);
  45135. }
  45136. function emitCloseNT(self) {
  45137. if (self._writableState && !self._writableState.emitClose) return;
  45138. if (self._readableState && !self._readableState.emitClose) return;
  45139. self.emit('close');
  45140. }
  45141. function undestroy() {
  45142. if (this._readableState) {
  45143. this._readableState.destroyed = false;
  45144. this._readableState.reading = false;
  45145. this._readableState.ended = false;
  45146. this._readableState.endEmitted = false;
  45147. }
  45148. if (this._writableState) {
  45149. this._writableState.destroyed = false;
  45150. this._writableState.ended = false;
  45151. this._writableState.ending = false;
  45152. this._writableState.finalCalled = false;
  45153. this._writableState.prefinished = false;
  45154. this._writableState.finished = false;
  45155. this._writableState.errorEmitted = false;
  45156. }
  45157. }
  45158. function emitErrorNT(self, err) {
  45159. self.emit('error', err);
  45160. }
  45161. function errorOrDestroy(stream, err) {
  45162. // We have tests that rely on errors being emitted
  45163. // in the same tick, so changing this is semver major.
  45164. // For now when you opt-in to autoDestroy we allow
  45165. // the error to be emitted nextTick. In a future
  45166. // semver major update we should change the default to this.
  45167. var rState = stream._readableState;
  45168. var wState = stream._writableState;
  45169. if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);
  45170. }
  45171. module.exports = {
  45172. destroy: destroy,
  45173. undestroy: undestroy,
  45174. errorOrDestroy: errorOrDestroy
  45175. };
  45176. /***/ }),
  45177. /***/ 1086:
  45178. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  45179. "use strict";
  45180. // Ported from https://github.com/mafintosh/end-of-stream with
  45181. // permission from the author, Mathias Buus (@mafintosh).
  45182. var ERR_STREAM_PREMATURE_CLOSE = (__webpack_require__(8106)/* .codes.ERR_STREAM_PREMATURE_CLOSE */ .q.ERR_STREAM_PREMATURE_CLOSE);
  45183. function once(callback) {
  45184. var called = false;
  45185. return function () {
  45186. if (called) return;
  45187. called = true;
  45188. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  45189. args[_key] = arguments[_key];
  45190. }
  45191. callback.apply(this, args);
  45192. };
  45193. }
  45194. function noop() {}
  45195. function isRequest(stream) {
  45196. return stream.setHeader && typeof stream.abort === 'function';
  45197. }
  45198. function eos(stream, opts, callback) {
  45199. if (typeof opts === 'function') return eos(stream, null, opts);
  45200. if (!opts) opts = {};
  45201. callback = once(callback || noop);
  45202. var readable = opts.readable || opts.readable !== false && stream.readable;
  45203. var writable = opts.writable || opts.writable !== false && stream.writable;
  45204. var onlegacyfinish = function onlegacyfinish() {
  45205. if (!stream.writable) onfinish();
  45206. };
  45207. var writableEnded = stream._writableState && stream._writableState.finished;
  45208. var onfinish = function onfinish() {
  45209. writable = false;
  45210. writableEnded = true;
  45211. if (!readable) callback.call(stream);
  45212. };
  45213. var readableEnded = stream._readableState && stream._readableState.endEmitted;
  45214. var onend = function onend() {
  45215. readable = false;
  45216. readableEnded = true;
  45217. if (!writable) callback.call(stream);
  45218. };
  45219. var onerror = function onerror(err) {
  45220. callback.call(stream, err);
  45221. };
  45222. var onclose = function onclose() {
  45223. var err;
  45224. if (readable && !readableEnded) {
  45225. if (!stream._readableState || !stream._readableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
  45226. return callback.call(stream, err);
  45227. }
  45228. if (writable && !writableEnded) {
  45229. if (!stream._writableState || !stream._writableState.ended) err = new ERR_STREAM_PREMATURE_CLOSE();
  45230. return callback.call(stream, err);
  45231. }
  45232. };
  45233. var onrequest = function onrequest() {
  45234. stream.req.on('finish', onfinish);
  45235. };
  45236. if (isRequest(stream)) {
  45237. stream.on('complete', onfinish);
  45238. stream.on('abort', onclose);
  45239. if (stream.req) onrequest();else stream.on('request', onrequest);
  45240. } else if (writable && !stream._writableState) {
  45241. // legacy streams
  45242. stream.on('end', onlegacyfinish);
  45243. stream.on('close', onlegacyfinish);
  45244. }
  45245. stream.on('end', onend);
  45246. stream.on('finish', onfinish);
  45247. if (opts.error !== false) stream.on('error', onerror);
  45248. stream.on('close', onclose);
  45249. return function () {
  45250. stream.removeListener('complete', onfinish);
  45251. stream.removeListener('abort', onclose);
  45252. stream.removeListener('request', onrequest);
  45253. if (stream.req) stream.req.removeListener('finish', onfinish);
  45254. stream.removeListener('end', onlegacyfinish);
  45255. stream.removeListener('close', onlegacyfinish);
  45256. stream.removeListener('finish', onfinish);
  45257. stream.removeListener('end', onend);
  45258. stream.removeListener('error', onerror);
  45259. stream.removeListener('close', onclose);
  45260. };
  45261. }
  45262. module.exports = eos;
  45263. /***/ }),
  45264. /***/ 1265:
  45265. /***/ (function(module) {
  45266. module.exports = function () {
  45267. throw new Error('Readable.from is not available in the browser')
  45268. };
  45269. /***/ }),
  45270. /***/ 6472:
  45271. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  45272. "use strict";
  45273. // Ported from https://github.com/mafintosh/pump with
  45274. // permission from the author, Mathias Buus (@mafintosh).
  45275. var eos;
  45276. function once(callback) {
  45277. var called = false;
  45278. return function () {
  45279. if (called) return;
  45280. called = true;
  45281. callback.apply(void 0, arguments);
  45282. };
  45283. }
  45284. var _require$codes = (__webpack_require__(8106)/* .codes */ .q),
  45285. ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS,
  45286. ERR_STREAM_DESTROYED = _require$codes.ERR_STREAM_DESTROYED;
  45287. function noop(err) {
  45288. // Rethrow the error if it exists to avoid swallowing it
  45289. if (err) throw err;
  45290. }
  45291. function isRequest(stream) {
  45292. return stream.setHeader && typeof stream.abort === 'function';
  45293. }
  45294. function destroyer(stream, reading, writing, callback) {
  45295. callback = once(callback);
  45296. var closed = false;
  45297. stream.on('close', function () {
  45298. closed = true;
  45299. });
  45300. if (eos === undefined) eos = __webpack_require__(1086);
  45301. eos(stream, {
  45302. readable: reading,
  45303. writable: writing
  45304. }, function (err) {
  45305. if (err) return callback(err);
  45306. closed = true;
  45307. callback();
  45308. });
  45309. var destroyed = false;
  45310. return function (err) {
  45311. if (closed) return;
  45312. if (destroyed) return;
  45313. destroyed = true; // request.destroy just do .end - .abort is what we want
  45314. if (isRequest(stream)) return stream.abort();
  45315. if (typeof stream.destroy === 'function') return stream.destroy();
  45316. callback(err || new ERR_STREAM_DESTROYED('pipe'));
  45317. };
  45318. }
  45319. function call(fn) {
  45320. fn();
  45321. }
  45322. function pipe(from, to) {
  45323. return from.pipe(to);
  45324. }
  45325. function popCallback(streams) {
  45326. if (!streams.length) return noop;
  45327. if (typeof streams[streams.length - 1] !== 'function') return noop;
  45328. return streams.pop();
  45329. }
  45330. function pipeline() {
  45331. for (var _len = arguments.length, streams = new Array(_len), _key = 0; _key < _len; _key++) {
  45332. streams[_key] = arguments[_key];
  45333. }
  45334. var callback = popCallback(streams);
  45335. if (Array.isArray(streams[0])) streams = streams[0];
  45336. if (streams.length < 2) {
  45337. throw new ERR_MISSING_ARGS('streams');
  45338. }
  45339. var error;
  45340. var destroys = streams.map(function (stream, i) {
  45341. var reading = i < streams.length - 1;
  45342. var writing = i > 0;
  45343. return destroyer(stream, reading, writing, function (err) {
  45344. if (!error) error = err;
  45345. if (err) destroys.forEach(call);
  45346. if (reading) return;
  45347. destroys.forEach(call);
  45348. callback(error);
  45349. });
  45350. });
  45351. return streams.reduce(pipe);
  45352. }
  45353. module.exports = pipeline;
  45354. /***/ }),
  45355. /***/ 94:
  45356. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  45357. "use strict";
  45358. var ERR_INVALID_OPT_VALUE = (__webpack_require__(8106)/* .codes.ERR_INVALID_OPT_VALUE */ .q.ERR_INVALID_OPT_VALUE);
  45359. function highWaterMarkFrom(options, isDuplex, duplexKey) {
  45360. return options.highWaterMark != null ? options.highWaterMark : isDuplex ? options[duplexKey] : null;
  45361. }
  45362. function getHighWaterMark(state, options, duplexKey, isDuplex) {
  45363. var hwm = highWaterMarkFrom(options, isDuplex, duplexKey);
  45364. if (hwm != null) {
  45365. if (!(isFinite(hwm) && Math.floor(hwm) === hwm) || hwm < 0) {
  45366. var name = isDuplex ? duplexKey : 'highWaterMark';
  45367. throw new ERR_INVALID_OPT_VALUE(name, hwm);
  45368. }
  45369. return Math.floor(hwm);
  45370. } // Default value
  45371. return state.objectMode ? 16 : 16 * 1024;
  45372. }
  45373. module.exports = {
  45374. getHighWaterMark: getHighWaterMark
  45375. };
  45376. /***/ }),
  45377. /***/ 3194:
  45378. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  45379. module.exports = __webpack_require__(7187).EventEmitter;
  45380. /***/ }),
  45381. /***/ 4896:
  45382. /***/ (function(module, exports, __webpack_require__) {
  45383. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function(a,b){if(true)!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (b),
  45384. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  45385. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  45386. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {}})(this,function(){"use strict";function b(a,b){return"undefined"==typeof b?b={autoBom:!1}:"object"!=typeof b&&(console.warn("Deprecated: Expected third argument to be a object"),b={autoBom:!b}),b.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpRequest;d.open("GET",a),d.responseType="blob",d.onload=function(){g(d.response,b,c)},d.onerror=function(){console.error("could not download file")},d.send()}function d(a){var b=new XMLHttpRequest;b.open("HEAD",a,!1);try{b.send()}catch(a){}return 200<=b.status&&299>=b.status}function e(a){try{a.dispatchEvent(new MouseEvent("click"))}catch(c){var b=document.createEvent("MouseEvents");b.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),a.dispatchEvent(b)}}var f="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof __webpack_require__.g&&__webpack_require__.g.global===__webpack_require__.g?__webpack_require__.g:void 0,a=f.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),g=f.saveAs||("object"!=typeof window||window!==f?function(){}:(typeof HTMLAnchorElement !== "undefined" && "download" in HTMLAnchorElement.prototype)&&!a?function(b,g,h){var i=f.URL||f.webkitURL,j=document.createElement("a");g=g||b.name||"download",j.download=g,j.rel="noopener","string"==typeof b?(j.href=b,j.origin===location.origin?e(j):d(j.href)?c(b,g,h):e(j,j.target="_blank")):(j.href=i.createObjectURL(b),setTimeout(function(){i.revokeObjectURL(j.href)},4E4),setTimeout(function(){e(j)},0))}:"msSaveOrOpenBlob"in navigator?function(f,g,h){if(g=g||f.name||"download","string"!=typeof f)navigator.msSaveOrOpenBlob(b(f,h),g);else if(d(f))c(f,g,h);else{var i=document.createElement("a");i.href=f,i.target="_blank",setTimeout(function(){e(i)})}}:function(b,d,e,g){if(g=g||open("","_blank"),g&&(g.document.title=g.document.body.innerText="downloading..."),"string"==typeof b)return c(b,d,e);var h="application/octet-stream"===b.type,i=/constructor/i.test(f.HTMLElement)||f.safari,j=/CriOS\/[\d]+/.test(navigator.userAgent);if((j||h&&i||a)&&"undefined"!=typeof FileReader){var k=new FileReader;k.onloadend=function(){var a=k.result;a=j?a:a.replace(/^data:[^;]*;/,"data:attachment/file;"),g?g.location.href=a:location=a,g=null},k.readAsDataURL(b)}else{var l=f.URL||f.webkitURL,m=l.createObjectURL(b);g?g.location=m:location.href=m,g=null,setTimeout(function(){l.revokeObjectURL(m)},4E4)}});f.saveAs=g.saveAs=g, true&&(module.exports=g)});
  45387. //# sourceMappingURL=FileSaver.min.js.map
  45388. /***/ }),
  45389. /***/ 2553:
  45390. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  45391. "use strict";
  45392. // Copyright Joyent, Inc. and other Node contributors.
  45393. //
  45394. // Permission is hereby granted, free of charge, to any person obtaining a
  45395. // copy of this software and associated documentation files (the
  45396. // "Software"), to deal in the Software without restriction, including
  45397. // without limitation the rights to use, copy, modify, merge, publish,
  45398. // distribute, sublicense, and/or sell copies of the Software, and to permit
  45399. // persons to whom the Software is furnished to do so, subject to the
  45400. // following conditions:
  45401. //
  45402. // The above copyright notice and this permission notice shall be included
  45403. // in all copies or substantial portions of the Software.
  45404. //
  45405. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  45406. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  45407. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  45408. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  45409. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  45410. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  45411. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  45412. /*<replacement>*/
  45413. var Buffer = (__webpack_require__(1750).Buffer);
  45414. /*</replacement>*/
  45415. var isEncoding = Buffer.isEncoding || function (encoding) {
  45416. encoding = '' + encoding;
  45417. switch (encoding && encoding.toLowerCase()) {
  45418. 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':
  45419. return true;
  45420. default:
  45421. return false;
  45422. }
  45423. };
  45424. function _normalizeEncoding(enc) {
  45425. if (!enc) return 'utf8';
  45426. var retried;
  45427. while (true) {
  45428. switch (enc) {
  45429. case 'utf8':
  45430. case 'utf-8':
  45431. return 'utf8';
  45432. case 'ucs2':
  45433. case 'ucs-2':
  45434. case 'utf16le':
  45435. case 'utf-16le':
  45436. return 'utf16le';
  45437. case 'latin1':
  45438. case 'binary':
  45439. return 'latin1';
  45440. case 'base64':
  45441. case 'ascii':
  45442. case 'hex':
  45443. return enc;
  45444. default:
  45445. if (retried) return; // undefined
  45446. enc = ('' + enc).toLowerCase();
  45447. retried = true;
  45448. }
  45449. }
  45450. };
  45451. // Do not cache `Buffer.isEncoding` when checking encoding names as some
  45452. // modules monkey-patch it to support additional encodings
  45453. function normalizeEncoding(enc) {
  45454. var nenc = _normalizeEncoding(enc);
  45455. if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc);
  45456. return nenc || enc;
  45457. }
  45458. // StringDecoder provides an interface for efficiently splitting a series of
  45459. // buffers into a series of JS strings without breaking apart multi-byte
  45460. // characters.
  45461. exports.s = StringDecoder;
  45462. function StringDecoder(encoding) {
  45463. this.encoding = normalizeEncoding(encoding);
  45464. var nb;
  45465. switch (this.encoding) {
  45466. case 'utf16le':
  45467. this.text = utf16Text;
  45468. this.end = utf16End;
  45469. nb = 4;
  45470. break;
  45471. case 'utf8':
  45472. this.fillLast = utf8FillLast;
  45473. nb = 4;
  45474. break;
  45475. case 'base64':
  45476. this.text = base64Text;
  45477. this.end = base64End;
  45478. nb = 3;
  45479. break;
  45480. default:
  45481. this.write = simpleWrite;
  45482. this.end = simpleEnd;
  45483. return;
  45484. }
  45485. this.lastNeed = 0;
  45486. this.lastTotal = 0;
  45487. this.lastChar = Buffer.allocUnsafe(nb);
  45488. }
  45489. StringDecoder.prototype.write = function (buf) {
  45490. if (buf.length === 0) return '';
  45491. var r;
  45492. var i;
  45493. if (this.lastNeed) {
  45494. r = this.fillLast(buf);
  45495. if (r === undefined) return '';
  45496. i = this.lastNeed;
  45497. this.lastNeed = 0;
  45498. } else {
  45499. i = 0;
  45500. }
  45501. if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i);
  45502. return r || '';
  45503. };
  45504. StringDecoder.prototype.end = utf8End;
  45505. // Returns only complete characters in a Buffer
  45506. StringDecoder.prototype.text = utf8Text;
  45507. // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
  45508. StringDecoder.prototype.fillLast = function (buf) {
  45509. if (this.lastNeed <= buf.length) {
  45510. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
  45511. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  45512. }
  45513. buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
  45514. this.lastNeed -= buf.length;
  45515. };
  45516. // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
  45517. // continuation byte. If an invalid byte is detected, -2 is returned.
  45518. function utf8CheckByte(byte) {
  45519. if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4;
  45520. return byte >> 6 === 0x02 ? -1 : -2;
  45521. }
  45522. // Checks at most 3 bytes at the end of a Buffer in order to detect an
  45523. // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
  45524. // needed to complete the UTF-8 character (if applicable) are returned.
  45525. function utf8CheckIncomplete(self, buf, i) {
  45526. var j = buf.length - 1;
  45527. if (j < i) return 0;
  45528. var nb = utf8CheckByte(buf[j]);
  45529. if (nb >= 0) {
  45530. if (nb > 0) self.lastNeed = nb - 1;
  45531. return nb;
  45532. }
  45533. if (--j < i || nb === -2) return 0;
  45534. nb = utf8CheckByte(buf[j]);
  45535. if (nb >= 0) {
  45536. if (nb > 0) self.lastNeed = nb - 2;
  45537. return nb;
  45538. }
  45539. if (--j < i || nb === -2) return 0;
  45540. nb = utf8CheckByte(buf[j]);
  45541. if (nb >= 0) {
  45542. if (nb > 0) {
  45543. if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
  45544. }
  45545. return nb;
  45546. }
  45547. return 0;
  45548. }
  45549. // Validates as many continuation bytes for a multi-byte UTF-8 character as
  45550. // needed or are available. If we see a non-continuation byte where we expect
  45551. // one, we "replace" the validated continuation bytes we've seen so far with
  45552. // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
  45553. // behavior. The continuation byte check is included three times in the case
  45554. // where all of the continuation bytes for a character exist in the same buffer.
  45555. // It is also done this way as a slight performance increase instead of using a
  45556. // loop.
  45557. function utf8CheckExtraBytes(self, buf, p) {
  45558. if ((buf[0] & 0xC0) !== 0x80) {
  45559. self.lastNeed = 0;
  45560. return '\ufffd';
  45561. }
  45562. if (self.lastNeed > 1 && buf.length > 1) {
  45563. if ((buf[1] & 0xC0) !== 0x80) {
  45564. self.lastNeed = 1;
  45565. return '\ufffd';
  45566. }
  45567. if (self.lastNeed > 2 && buf.length > 2) {
  45568. if ((buf[2] & 0xC0) !== 0x80) {
  45569. self.lastNeed = 2;
  45570. return '\ufffd';
  45571. }
  45572. }
  45573. }
  45574. }
  45575. // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
  45576. function utf8FillLast(buf) {
  45577. var p = this.lastTotal - this.lastNeed;
  45578. var r = utf8CheckExtraBytes(this, buf, p);
  45579. if (r !== undefined) return r;
  45580. if (this.lastNeed <= buf.length) {
  45581. buf.copy(this.lastChar, p, 0, this.lastNeed);
  45582. return this.lastChar.toString(this.encoding, 0, this.lastTotal);
  45583. }
  45584. buf.copy(this.lastChar, p, 0, buf.length);
  45585. this.lastNeed -= buf.length;
  45586. }
  45587. // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
  45588. // partial character, the character's bytes are buffered until the required
  45589. // number of bytes are available.
  45590. function utf8Text(buf, i) {
  45591. var total = utf8CheckIncomplete(this, buf, i);
  45592. if (!this.lastNeed) return buf.toString('utf8', i);
  45593. this.lastTotal = total;
  45594. var end = buf.length - (total - this.lastNeed);
  45595. buf.copy(this.lastChar, 0, end);
  45596. return buf.toString('utf8', i, end);
  45597. }
  45598. // For UTF-8, a replacement character is added when ending on a partial
  45599. // character.
  45600. function utf8End(buf) {
  45601. var r = buf && buf.length ? this.write(buf) : '';
  45602. if (this.lastNeed) return r + '\ufffd';
  45603. return r;
  45604. }
  45605. // UTF-16LE typically needs two bytes per character, but even if we have an even
  45606. // number of bytes available, we need to check if we end on a leading/high
  45607. // surrogate. In that case, we need to wait for the next two bytes in order to
  45608. // decode the last character properly.
  45609. function utf16Text(buf, i) {
  45610. if ((buf.length - i) % 2 === 0) {
  45611. var r = buf.toString('utf16le', i);
  45612. if (r) {
  45613. var c = r.charCodeAt(r.length - 1);
  45614. if (c >= 0xD800 && c <= 0xDBFF) {
  45615. this.lastNeed = 2;
  45616. this.lastTotal = 4;
  45617. this.lastChar[0] = buf[buf.length - 2];
  45618. this.lastChar[1] = buf[buf.length - 1];
  45619. return r.slice(0, -1);
  45620. }
  45621. }
  45622. return r;
  45623. }
  45624. this.lastNeed = 1;
  45625. this.lastTotal = 2;
  45626. this.lastChar[0] = buf[buf.length - 1];
  45627. return buf.toString('utf16le', i, buf.length - 1);
  45628. }
  45629. // For UTF-16LE we do not explicitly append special replacement characters if we
  45630. // end on a partial character, we simply let v8 handle that.
  45631. function utf16End(buf) {
  45632. var r = buf && buf.length ? this.write(buf) : '';
  45633. if (this.lastNeed) {
  45634. var end = this.lastTotal - this.lastNeed;
  45635. return r + this.lastChar.toString('utf16le', 0, end);
  45636. }
  45637. return r;
  45638. }
  45639. function base64Text(buf, i) {
  45640. var n = (buf.length - i) % 3;
  45641. if (n === 0) return buf.toString('base64', i);
  45642. this.lastNeed = 3 - n;
  45643. this.lastTotal = 3;
  45644. if (n === 1) {
  45645. this.lastChar[0] = buf[buf.length - 1];
  45646. } else {
  45647. this.lastChar[0] = buf[buf.length - 2];
  45648. this.lastChar[1] = buf[buf.length - 1];
  45649. }
  45650. return buf.toString('base64', i, buf.length - n);
  45651. }
  45652. function base64End(buf) {
  45653. var r = buf && buf.length ? this.write(buf) : '';
  45654. if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
  45655. return r;
  45656. }
  45657. // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
  45658. function simpleWrite(buf) {
  45659. return buf.toString(this.encoding);
  45660. }
  45661. function simpleEnd(buf) {
  45662. return buf && buf.length ? this.write(buf) : '';
  45663. }
  45664. /***/ }),
  45665. /***/ 311:
  45666. /***/ (function(module) {
  45667. var TINF_OK = 0;
  45668. var TINF_DATA_ERROR = -3;
  45669. function Tree() {
  45670. this.table = new Uint16Array(16); /* table of code length counts */
  45671. this.trans = new Uint16Array(288); /* code -> symbol translation table */
  45672. }
  45673. function Data(source, dest) {
  45674. this.source = source;
  45675. this.sourceIndex = 0;
  45676. this.tag = 0;
  45677. this.bitcount = 0;
  45678. this.dest = dest;
  45679. this.destLen = 0;
  45680. this.ltree = new Tree(); /* dynamic length/symbol tree */
  45681. this.dtree = new Tree(); /* dynamic distance tree */
  45682. }
  45683. /* --------------------------------------------------- *
  45684. * -- uninitialized global data (static structures) -- *
  45685. * --------------------------------------------------- */
  45686. var sltree = new Tree();
  45687. var sdtree = new Tree();
  45688. /* extra bits and base tables for length codes */
  45689. var length_bits = new Uint8Array(30);
  45690. var length_base = new Uint16Array(30);
  45691. /* extra bits and base tables for distance codes */
  45692. var dist_bits = new Uint8Array(30);
  45693. var dist_base = new Uint16Array(30);
  45694. /* special ordering of code length codes */
  45695. var clcidx = new Uint8Array([
  45696. 16, 17, 18, 0, 8, 7, 9, 6,
  45697. 10, 5, 11, 4, 12, 3, 13, 2,
  45698. 14, 1, 15
  45699. ]);
  45700. /* used by tinf_decode_trees, avoids allocations every call */
  45701. var code_tree = new Tree();
  45702. var lengths = new Uint8Array(288 + 32);
  45703. /* ----------------------- *
  45704. * -- utility functions -- *
  45705. * ----------------------- */
  45706. /* build extra bits and base tables */
  45707. function tinf_build_bits_base(bits, base, delta, first) {
  45708. var i, sum;
  45709. /* build bits table */
  45710. for (i = 0; i < delta; ++i) bits[i] = 0;
  45711. for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;
  45712. /* build base table */
  45713. for (sum = first, i = 0; i < 30; ++i) {
  45714. base[i] = sum;
  45715. sum += 1 << bits[i];
  45716. }
  45717. }
  45718. /* build the fixed huffman trees */
  45719. function tinf_build_fixed_trees(lt, dt) {
  45720. var i;
  45721. /* build fixed length tree */
  45722. for (i = 0; i < 7; ++i) lt.table[i] = 0;
  45723. lt.table[7] = 24;
  45724. lt.table[8] = 152;
  45725. lt.table[9] = 112;
  45726. for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i;
  45727. for (i = 0; i < 144; ++i) lt.trans[24 + i] = i;
  45728. for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i;
  45729. for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i;
  45730. /* build fixed distance tree */
  45731. for (i = 0; i < 5; ++i) dt.table[i] = 0;
  45732. dt.table[5] = 32;
  45733. for (i = 0; i < 32; ++i) dt.trans[i] = i;
  45734. }
  45735. /* given an array of code lengths, build a tree */
  45736. var offs = new Uint16Array(16);
  45737. function tinf_build_tree(t, lengths, off, num) {
  45738. var i, sum;
  45739. /* clear code length count table */
  45740. for (i = 0; i < 16; ++i) t.table[i] = 0;
  45741. /* scan symbol lengths, and sum code length counts */
  45742. for (i = 0; i < num; ++i) t.table[lengths[off + i]]++;
  45743. t.table[0] = 0;
  45744. /* compute offset table for distribution sort */
  45745. for (sum = 0, i = 0; i < 16; ++i) {
  45746. offs[i] = sum;
  45747. sum += t.table[i];
  45748. }
  45749. /* create code->symbol translation table (symbols sorted by code) */
  45750. for (i = 0; i < num; ++i) {
  45751. if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i;
  45752. }
  45753. }
  45754. /* ---------------------- *
  45755. * -- decode functions -- *
  45756. * ---------------------- */
  45757. /* get one bit from source stream */
  45758. function tinf_getbit(d) {
  45759. /* check if tag is empty */
  45760. if (!d.bitcount--) {
  45761. /* load next tag */
  45762. d.tag = d.source[d.sourceIndex++];
  45763. d.bitcount = 7;
  45764. }
  45765. /* shift bit out of tag */
  45766. var bit = d.tag & 1;
  45767. d.tag >>>= 1;
  45768. return bit;
  45769. }
  45770. /* read a num bit value from a stream and add base */
  45771. function tinf_read_bits(d, num, base) {
  45772. if (!num)
  45773. return base;
  45774. while (d.bitcount < 24) {
  45775. d.tag |= d.source[d.sourceIndex++] << d.bitcount;
  45776. d.bitcount += 8;
  45777. }
  45778. var val = d.tag & (0xffff >>> (16 - num));
  45779. d.tag >>>= num;
  45780. d.bitcount -= num;
  45781. return val + base;
  45782. }
  45783. /* given a data stream and a tree, decode a symbol */
  45784. function tinf_decode_symbol(d, t) {
  45785. while (d.bitcount < 24) {
  45786. d.tag |= d.source[d.sourceIndex++] << d.bitcount;
  45787. d.bitcount += 8;
  45788. }
  45789. var sum = 0, cur = 0, len = 0;
  45790. var tag = d.tag;
  45791. /* get more bits while code value is above sum */
  45792. do {
  45793. cur = 2 * cur + (tag & 1);
  45794. tag >>>= 1;
  45795. ++len;
  45796. sum += t.table[len];
  45797. cur -= t.table[len];
  45798. } while (cur >= 0);
  45799. d.tag = tag;
  45800. d.bitcount -= len;
  45801. return t.trans[sum + cur];
  45802. }
  45803. /* given a data stream, decode dynamic trees from it */
  45804. function tinf_decode_trees(d, lt, dt) {
  45805. var hlit, hdist, hclen;
  45806. var i, num, length;
  45807. /* get 5 bits HLIT (257-286) */
  45808. hlit = tinf_read_bits(d, 5, 257);
  45809. /* get 5 bits HDIST (1-32) */
  45810. hdist = tinf_read_bits(d, 5, 1);
  45811. /* get 4 bits HCLEN (4-19) */
  45812. hclen = tinf_read_bits(d, 4, 4);
  45813. for (i = 0; i < 19; ++i) lengths[i] = 0;
  45814. /* read code lengths for code length alphabet */
  45815. for (i = 0; i < hclen; ++i) {
  45816. /* get 3 bits code length (0-7) */
  45817. var clen = tinf_read_bits(d, 3, 0);
  45818. lengths[clcidx[i]] = clen;
  45819. }
  45820. /* build code length tree */
  45821. tinf_build_tree(code_tree, lengths, 0, 19);
  45822. /* decode code lengths for the dynamic trees */
  45823. for (num = 0; num < hlit + hdist;) {
  45824. var sym = tinf_decode_symbol(d, code_tree);
  45825. switch (sym) {
  45826. case 16:
  45827. /* copy previous code length 3-6 times (read 2 bits) */
  45828. var prev = lengths[num - 1];
  45829. for (length = tinf_read_bits(d, 2, 3); length; --length) {
  45830. lengths[num++] = prev;
  45831. }
  45832. break;
  45833. case 17:
  45834. /* repeat code length 0 for 3-10 times (read 3 bits) */
  45835. for (length = tinf_read_bits(d, 3, 3); length; --length) {
  45836. lengths[num++] = 0;
  45837. }
  45838. break;
  45839. case 18:
  45840. /* repeat code length 0 for 11-138 times (read 7 bits) */
  45841. for (length = tinf_read_bits(d, 7, 11); length; --length) {
  45842. lengths[num++] = 0;
  45843. }
  45844. break;
  45845. default:
  45846. /* values 0-15 represent the actual code lengths */
  45847. lengths[num++] = sym;
  45848. break;
  45849. }
  45850. }
  45851. /* build dynamic trees */
  45852. tinf_build_tree(lt, lengths, 0, hlit);
  45853. tinf_build_tree(dt, lengths, hlit, hdist);
  45854. }
  45855. /* ----------------------------- *
  45856. * -- block inflate functions -- *
  45857. * ----------------------------- */
  45858. /* given a stream and two trees, inflate a block of data */
  45859. function tinf_inflate_block_data(d, lt, dt) {
  45860. while (1) {
  45861. var sym = tinf_decode_symbol(d, lt);
  45862. /* check for end of block */
  45863. if (sym === 256) {
  45864. return TINF_OK;
  45865. }
  45866. if (sym < 256) {
  45867. d.dest[d.destLen++] = sym;
  45868. } else {
  45869. var length, dist, offs;
  45870. var i;
  45871. sym -= 257;
  45872. /* possibly get more bits from length code */
  45873. length = tinf_read_bits(d, length_bits[sym], length_base[sym]);
  45874. dist = tinf_decode_symbol(d, dt);
  45875. /* possibly get more bits from distance code */
  45876. offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);
  45877. /* copy match */
  45878. for (i = offs; i < offs + length; ++i) {
  45879. d.dest[d.destLen++] = d.dest[i];
  45880. }
  45881. }
  45882. }
  45883. }
  45884. /* inflate an uncompressed block of data */
  45885. function tinf_inflate_uncompressed_block(d) {
  45886. var length, invlength;
  45887. var i;
  45888. /* unread from bitbuffer */
  45889. while (d.bitcount > 8) {
  45890. d.sourceIndex--;
  45891. d.bitcount -= 8;
  45892. }
  45893. /* get length */
  45894. length = d.source[d.sourceIndex + 1];
  45895. length = 256 * length + d.source[d.sourceIndex];
  45896. /* get one's complement of length */
  45897. invlength = d.source[d.sourceIndex + 3];
  45898. invlength = 256 * invlength + d.source[d.sourceIndex + 2];
  45899. /* check length */
  45900. if (length !== (~invlength & 0x0000ffff))
  45901. return TINF_DATA_ERROR;
  45902. d.sourceIndex += 4;
  45903. /* copy block */
  45904. for (i = length; i; --i)
  45905. d.dest[d.destLen++] = d.source[d.sourceIndex++];
  45906. /* make sure we start next block on a byte boundary */
  45907. d.bitcount = 0;
  45908. return TINF_OK;
  45909. }
  45910. /* inflate stream from source to dest */
  45911. function tinf_uncompress(source, dest) {
  45912. var d = new Data(source, dest);
  45913. var bfinal, btype, res;
  45914. do {
  45915. /* read final block flag */
  45916. bfinal = tinf_getbit(d);
  45917. /* read block type (2 bits) */
  45918. btype = tinf_read_bits(d, 2, 0);
  45919. /* decompress block */
  45920. switch (btype) {
  45921. case 0:
  45922. /* decompress uncompressed block */
  45923. res = tinf_inflate_uncompressed_block(d);
  45924. break;
  45925. case 1:
  45926. /* decompress block with fixed huffman trees */
  45927. res = tinf_inflate_block_data(d, sltree, sdtree);
  45928. break;
  45929. case 2:
  45930. /* decompress block with dynamic huffman trees */
  45931. tinf_decode_trees(d, d.ltree, d.dtree);
  45932. res = tinf_inflate_block_data(d, d.ltree, d.dtree);
  45933. break;
  45934. default:
  45935. res = TINF_DATA_ERROR;
  45936. }
  45937. if (res !== TINF_OK)
  45938. throw new Error('Data error');
  45939. } while (!bfinal);
  45940. if (d.destLen < d.dest.length) {
  45941. if (typeof d.dest.slice === 'function')
  45942. return d.dest.slice(0, d.destLen);
  45943. else
  45944. return d.dest.subarray(0, d.destLen);
  45945. }
  45946. return d.dest;
  45947. }
  45948. /* -------------------- *
  45949. * -- initialization -- *
  45950. * -------------------- */
  45951. /* build fixed huffman trees */
  45952. tinf_build_fixed_trees(sltree, sdtree);
  45953. /* build extra bits and base tables */
  45954. tinf_build_bits_base(length_bits, length_base, 4, 3);
  45955. tinf_build_bits_base(dist_bits, dist_base, 2, 1);
  45956. /* fix a special case */
  45957. length_bits[28] = 0;
  45958. length_base[28] = 258;
  45959. module.exports = tinf_uncompress;
  45960. /***/ }),
  45961. /***/ 1917:
  45962. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  45963. "use strict";
  45964. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  45965. __webpack_require__(2526);
  45966. __webpack_require__(1817);
  45967. __webpack_require__(2165);
  45968. __webpack_require__(1539);
  45969. __webpack_require__(4747);
  45970. __webpack_require__(7941);
  45971. __webpack_require__(7042);
  45972. __webpack_require__(6992);
  45973. __webpack_require__(1532);
  45974. __webpack_require__(8783);
  45975. __webpack_require__(3948);
  45976. __webpack_require__(2222);
  45977. __webpack_require__(9653);
  45978. __webpack_require__(1249);
  45979. __webpack_require__(2087);
  45980. __webpack_require__(8309);
  45981. __webpack_require__(9601);
  45982. __webpack_require__(4953);
  45983. __webpack_require__(8674);
  45984. __webpack_require__(5003);
  45985. __webpack_require__(189);
  45986. __webpack_require__(561);
  45987. __webpack_require__(2481);
  45988. __webpack_require__(2707);
  45989. __webpack_require__(4916);
  45990. __webpack_require__(4723);
  45991. __webpack_require__(1038);
  45992. __webpack_require__(9600);
  45993. __webpack_require__(3371);
  45994. __webpack_require__(3290);
  45995. __webpack_require__(3299);
  45996. __webpack_require__(8255);
  45997. __webpack_require__(2990);
  45998. __webpack_require__(8927);
  45999. __webpack_require__(3105);
  46000. __webpack_require__(5035);
  46001. __webpack_require__(4345);
  46002. __webpack_require__(7174);
  46003. __webpack_require__(2846);
  46004. __webpack_require__(4731);
  46005. __webpack_require__(7209);
  46006. __webpack_require__(6319);
  46007. __webpack_require__(8867);
  46008. __webpack_require__(7789);
  46009. __webpack_require__(3739);
  46010. __webpack_require__(9368);
  46011. __webpack_require__(4483);
  46012. __webpack_require__(2056);
  46013. __webpack_require__(3462);
  46014. __webpack_require__(678);
  46015. __webpack_require__(7462);
  46016. __webpack_require__(3824);
  46017. __webpack_require__(5021);
  46018. __webpack_require__(2974);
  46019. __webpack_require__(5016);
  46020. __webpack_require__(5109);
  46021. __webpack_require__(9714);
  46022. __webpack_require__(3210);
  46023. var _;
  46024. 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); } }
  46025. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  46026. function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
  46027. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  46028. 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."); }
  46029. 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); }
  46030. 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; }
  46031. function _interopDefault(ex) {
  46032. return ex && typeof ex === 'object' && 'default' in ex ? ex['default'] : ex;
  46033. }
  46034. var r = _interopDefault(__webpack_require__(5106));
  46035. var utils = __webpack_require__(6610);
  46036. var isEqual = _interopDefault(__webpack_require__(251));
  46037. var unicode = _interopDefault(__webpack_require__(9160));
  46038. var UnicodeTrie = _interopDefault(__webpack_require__(4781));
  46039. var StateMachine = _interopDefault(__webpack_require__(9811));
  46040. var cloneDeep = _interopDefault(__webpack_require__(6313));
  46041. var inflate = _interopDefault(__webpack_require__(311));
  46042. var brotli = _interopDefault(__webpack_require__(7709));
  46043. var fs = __webpack_require__(3857);
  46044. var fontkit = {};
  46045. fontkit.logErrors = false;
  46046. var formats = [];
  46047. fontkit.registerFormat = function (format) {
  46048. formats.push(format);
  46049. };
  46050. fontkit.openSync = function (filename, postscriptName) {
  46051. var buffer = fs.readFileSync(filename);
  46052. return fontkit.create(buffer, postscriptName);
  46053. };
  46054. fontkit.open = function (filename, postscriptName, callback) {
  46055. if (typeof postscriptName === 'function') {
  46056. callback = postscriptName;
  46057. postscriptName = null;
  46058. }
  46059. fs.readFile(filename, function (err, buffer) {
  46060. if (err) {
  46061. return callback(err);
  46062. }
  46063. try {
  46064. var font = fontkit.create(buffer, postscriptName);
  46065. } catch (e) {
  46066. return callback(e);
  46067. }
  46068. return callback(null, font);
  46069. });
  46070. return;
  46071. };
  46072. fontkit.create = function (buffer, postscriptName) {
  46073. for (var i = 0; i < formats.length; i++) {
  46074. var format = formats[i];
  46075. if (format.probe(buffer)) {
  46076. var font = new format(new r.DecodeStream(buffer));
  46077. if (postscriptName) {
  46078. return font.getFont(postscriptName);
  46079. }
  46080. return font;
  46081. }
  46082. }
  46083. throw new Error('Unknown font format');
  46084. };
  46085. fontkit.defaultLanguage = 'en';
  46086. fontkit.setDefaultLanguage = function (lang) {
  46087. if (lang === void 0) {
  46088. lang = 'en';
  46089. }
  46090. fontkit.defaultLanguage = lang;
  46091. };
  46092. function _defineProperty(obj, key, value) {
  46093. if (key in obj) {
  46094. Object.defineProperty(obj, key, {
  46095. value: value,
  46096. enumerable: true,
  46097. configurable: true,
  46098. writable: true
  46099. });
  46100. } else {
  46101. obj[key] = value;
  46102. }
  46103. return obj;
  46104. }
  46105. function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {
  46106. var desc = {};
  46107. Object.keys(descriptor).forEach(function (key) {
  46108. desc[key] = descriptor[key];
  46109. });
  46110. desc.enumerable = !!desc.enumerable;
  46111. desc.configurable = !!desc.configurable;
  46112. if ('value' in desc || desc.initializer) {
  46113. desc.writable = true;
  46114. }
  46115. desc = decorators.slice().reverse().reduce(function (desc, decorator) {
  46116. return decorator(target, property, desc) || desc;
  46117. }, desc);
  46118. if (context && desc.initializer !== void 0) {
  46119. desc.value = desc.initializer ? desc.initializer.call(context) : void 0;
  46120. desc.initializer = undefined;
  46121. }
  46122. if (desc.initializer === void 0) {
  46123. Object.defineProperty(target, property, desc);
  46124. desc = null;
  46125. }
  46126. return desc;
  46127. }
  46128. /**
  46129. * This decorator caches the results of a getter or method such that
  46130. * the results are lazily computed once, and then cached.
  46131. * @private
  46132. */
  46133. function cache(target, key, descriptor) {
  46134. if (descriptor.get) {
  46135. var get = descriptor.get;
  46136. descriptor.get = function () {
  46137. var value = get.call(this);
  46138. Object.defineProperty(this, key, {
  46139. value: value
  46140. });
  46141. return value;
  46142. };
  46143. } else if (typeof descriptor.value === 'function') {
  46144. var fn = descriptor.value;
  46145. return {
  46146. get: function get() {
  46147. var cache = new Map();
  46148. function memoized() {
  46149. for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
  46150. args[_key] = arguments[_key];
  46151. }
  46152. var key = args.length > 0 ? args[0] : 'value';
  46153. if (cache.has(key)) {
  46154. return cache.get(key);
  46155. }
  46156. var result = fn.apply(this, args);
  46157. cache.set(key, result);
  46158. return result;
  46159. }
  46160. Object.defineProperty(this, key, {
  46161. value: memoized
  46162. });
  46163. return memoized;
  46164. }
  46165. };
  46166. }
  46167. }
  46168. var SubHeader = new r.Struct({
  46169. firstCode: r.uint16,
  46170. entryCount: r.uint16,
  46171. idDelta: r.int16,
  46172. idRangeOffset: r.uint16
  46173. });
  46174. var CmapGroup = new r.Struct({
  46175. startCharCode: r.uint32,
  46176. endCharCode: r.uint32,
  46177. glyphID: r.uint32
  46178. });
  46179. var UnicodeValueRange = new r.Struct({
  46180. startUnicodeValue: r.uint24,
  46181. additionalCount: r.uint8
  46182. });
  46183. var UVSMapping = new r.Struct({
  46184. unicodeValue: r.uint24,
  46185. glyphID: r.uint16
  46186. });
  46187. var DefaultUVS = new r.Array(UnicodeValueRange, r.uint32);
  46188. var NonDefaultUVS = new r.Array(UVSMapping, r.uint32);
  46189. var VarSelectorRecord = new r.Struct({
  46190. varSelector: r.uint24,
  46191. defaultUVS: new r.Pointer(r.uint32, DefaultUVS, {
  46192. type: 'parent'
  46193. }),
  46194. nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, {
  46195. type: 'parent'
  46196. })
  46197. });
  46198. var CmapSubtable = new r.VersionedStruct(r.uint16, {
  46199. 0: {
  46200. // Byte encoding
  46201. length: r.uint16,
  46202. // Total table length in bytes (set to 262 for format 0)
  46203. language: r.uint16,
  46204. // Language code for this encoding subtable, or zero if language-independent
  46205. codeMap: new r.LazyArray(r.uint8, 256)
  46206. },
  46207. 2: {
  46208. // High-byte mapping (CJK)
  46209. length: r.uint16,
  46210. language: r.uint16,
  46211. subHeaderKeys: new r.Array(r.uint16, 256),
  46212. subHeaderCount: function subHeaderCount(t) {
  46213. return Math.max.apply(Math, t.subHeaderKeys);
  46214. },
  46215. subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'),
  46216. glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount')
  46217. },
  46218. 4: {
  46219. // Segment mapping to delta values
  46220. length: r.uint16,
  46221. // Total table length in bytes
  46222. language: r.uint16,
  46223. // Language code
  46224. segCountX2: r.uint16,
  46225. segCount: function segCount(t) {
  46226. return t.segCountX2 >> 1;
  46227. },
  46228. searchRange: r.uint16,
  46229. entrySelector: r.uint16,
  46230. rangeShift: r.uint16,
  46231. endCode: new r.LazyArray(r.uint16, 'segCount'),
  46232. reservedPad: new r.Reserved(r.uint16),
  46233. // This value should be zero
  46234. startCode: new r.LazyArray(r.uint16, 'segCount'),
  46235. idDelta: new r.LazyArray(r.int16, 'segCount'),
  46236. idRangeOffset: new r.LazyArray(r.uint16, 'segCount'),
  46237. glyphIndexArray: new r.LazyArray(r.uint16, function (t) {
  46238. return (t.length - t._currentOffset) / 2;
  46239. })
  46240. },
  46241. 6: {
  46242. // Trimmed table
  46243. length: r.uint16,
  46244. language: r.uint16,
  46245. firstCode: r.uint16,
  46246. entryCount: r.uint16,
  46247. glyphIndices: new r.LazyArray(r.uint16, 'entryCount')
  46248. },
  46249. 8: {
  46250. // mixed 16-bit and 32-bit coverage
  46251. reserved: new r.Reserved(r.uint16),
  46252. length: r.uint32,
  46253. language: r.uint16,
  46254. is32: new r.LazyArray(r.uint8, 8192),
  46255. nGroups: r.uint32,
  46256. groups: new r.LazyArray(CmapGroup, 'nGroups')
  46257. },
  46258. 10: {
  46259. // Trimmed Array
  46260. reserved: new r.Reserved(r.uint16),
  46261. length: r.uint32,
  46262. language: r.uint32,
  46263. firstCode: r.uint32,
  46264. entryCount: r.uint32,
  46265. glyphIndices: new r.LazyArray(r.uint16, 'numChars')
  46266. },
  46267. 12: {
  46268. // Segmented coverage
  46269. reserved: new r.Reserved(r.uint16),
  46270. length: r.uint32,
  46271. language: r.uint32,
  46272. nGroups: r.uint32,
  46273. groups: new r.LazyArray(CmapGroup, 'nGroups')
  46274. },
  46275. 13: {
  46276. // Many-to-one range mappings (same as 12 except for group.startGlyphID)
  46277. reserved: new r.Reserved(r.uint16),
  46278. length: r.uint32,
  46279. language: r.uint32,
  46280. nGroups: r.uint32,
  46281. groups: new r.LazyArray(CmapGroup, 'nGroups')
  46282. },
  46283. 14: {
  46284. // Unicode Variation Sequences
  46285. length: r.uint32,
  46286. numRecords: r.uint32,
  46287. varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords')
  46288. }
  46289. });
  46290. var CmapEntry = new r.Struct({
  46291. platformID: r.uint16,
  46292. // Platform identifier
  46293. encodingID: r.uint16,
  46294. // Platform-specific encoding identifier
  46295. table: new r.Pointer(r.uint32, CmapSubtable, {
  46296. type: 'parent',
  46297. lazy: true
  46298. })
  46299. }); // character to glyph mapping
  46300. var cmap = new r.Struct({
  46301. version: r.uint16,
  46302. numSubtables: r.uint16,
  46303. tables: new r.Array(CmapEntry, 'numSubtables')
  46304. });
  46305. var head = new r.Struct({
  46306. version: r.int32,
  46307. // 0x00010000 (version 1.0)
  46308. revision: r.int32,
  46309. // set by font manufacturer
  46310. checkSumAdjustment: r.uint32,
  46311. magicNumber: r.uint32,
  46312. // set to 0x5F0F3CF5
  46313. flags: r.uint16,
  46314. unitsPerEm: r.uint16,
  46315. // range from 64 to 16384
  46316. created: new r.Array(r.int32, 2),
  46317. modified: new r.Array(r.int32, 2),
  46318. xMin: r.int16,
  46319. // for all glyph bounding boxes
  46320. yMin: r.int16,
  46321. // for all glyph bounding boxes
  46322. xMax: r.int16,
  46323. // for all glyph bounding boxes
  46324. yMax: r.int16,
  46325. // for all glyph bounding boxes
  46326. macStyle: new r.Bitfield(r.uint16, ['bold', 'italic', 'underline', 'outline', 'shadow', 'condensed', 'extended']),
  46327. lowestRecPPEM: r.uint16,
  46328. // smallest readable size in pixels
  46329. fontDirectionHint: r.int16,
  46330. indexToLocFormat: r.int16,
  46331. // 0 for short offsets, 1 for long
  46332. glyphDataFormat: r.int16 // 0 for current format
  46333. });
  46334. var hhea = new r.Struct({
  46335. version: r.int32,
  46336. ascent: r.int16,
  46337. // Distance from baseline of highest ascender
  46338. descent: r.int16,
  46339. // Distance from baseline of lowest descender
  46340. lineGap: r.int16,
  46341. // Typographic line gap
  46342. advanceWidthMax: r.uint16,
  46343. // Maximum advance width value in 'hmtx' table
  46344. minLeftSideBearing: r.int16,
  46345. // Maximum advance width value in 'hmtx' table
  46346. minRightSideBearing: r.int16,
  46347. // Minimum right sidebearing value
  46348. xMaxExtent: r.int16,
  46349. caretSlopeRise: r.int16,
  46350. // Used to calculate the slope of the cursor (rise/run); 1 for vertical
  46351. caretSlopeRun: r.int16,
  46352. // 0 for vertical
  46353. caretOffset: r.int16,
  46354. // Set to 0 for non-slanted fonts
  46355. reserved: new r.Reserved(r.int16, 4),
  46356. metricDataFormat: r.int16,
  46357. // 0 for current format
  46358. numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table
  46359. });
  46360. var HmtxEntry = new r.Struct({
  46361. advance: r.uint16,
  46362. bearing: r.int16
  46363. });
  46364. var hmtx = new r.Struct({
  46365. metrics: new r.LazyArray(HmtxEntry, function (t) {
  46366. return t.parent.hhea.numberOfMetrics;
  46367. }),
  46368. bearings: new r.LazyArray(r.int16, function (t) {
  46369. return t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics;
  46370. })
  46371. });
  46372. var maxp = new r.Struct({
  46373. version: r.int32,
  46374. numGlyphs: r.uint16,
  46375. // The number of glyphs in the font
  46376. maxPoints: r.uint16,
  46377. // Maximum points in a non-composite glyph
  46378. maxContours: r.uint16,
  46379. // Maximum contours in a non-composite glyph
  46380. maxComponentPoints: r.uint16,
  46381. // Maximum points in a composite glyph
  46382. maxComponentContours: r.uint16,
  46383. // Maximum contours in a composite glyph
  46384. maxZones: r.uint16,
  46385. // 1 if instructions do not use the twilight zone, 2 otherwise
  46386. maxTwilightPoints: r.uint16,
  46387. // Maximum points used in Z0
  46388. maxStorage: r.uint16,
  46389. // Number of Storage Area locations
  46390. maxFunctionDefs: r.uint16,
  46391. // Number of FDEFs
  46392. maxInstructionDefs: r.uint16,
  46393. // Number of IDEFs
  46394. maxStackElements: r.uint16,
  46395. // Maximum stack depth
  46396. maxSizeOfInstructions: r.uint16,
  46397. // Maximum byte count for glyph instructions
  46398. maxComponentElements: r.uint16,
  46399. // Maximum number of components referenced at “top level” for any composite glyph
  46400. maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components
  46401. });
  46402. /**
  46403. * Gets an encoding name from platform, encoding, and language ids.
  46404. * Returned encoding names can be used in iconv-lite to decode text.
  46405. */
  46406. function getEncoding(platformID, encodingID, languageID) {
  46407. if (languageID === void 0) {
  46408. languageID = 0;
  46409. }
  46410. if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) {
  46411. return MAC_LANGUAGE_ENCODINGS[languageID];
  46412. }
  46413. return ENCODINGS[platformID][encodingID];
  46414. } // Map of platform ids to encoding ids.
  46415. var ENCODINGS = [// unicode
  46416. ['utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be'], // macintosh
  46417. // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/
  46418. // 0 Roman 17 Malayalam
  46419. // 1 Japanese 18 Sinhalese
  46420. // 2 Traditional Chinese 19 Burmese
  46421. // 3 Korean 20 Khmer
  46422. // 4 Arabic 21 Thai
  46423. // 5 Hebrew 22 Laotian
  46424. // 6 Greek 23 Georgian
  46425. // 7 Russian 24 Armenian
  46426. // 8 RSymbol 25 Simplified Chinese
  46427. // 9 Devanagari 26 Tibetan
  46428. // 10 Gurmukhi 27 Mongolian
  46429. // 11 Gujarati 28 Geez
  46430. // 12 Oriya 29 Slavic
  46431. // 13 Bengali 30 Vietnamese
  46432. // 14 Tamil 31 Sindhi
  46433. // 15 Telugu 32 (Uninterpreted)
  46434. // 16 Kannada
  46435. ['macroman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8', 'macgreek', 'maccyrillic', 'symbol', 'Devanagari', 'Gurmukhi', 'Gujarati', 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese', 'Burmese', 'Khmer', 'macthai', 'Laotian', 'Georgian', 'Armenian', 'gb-2312-80', 'Tibetan', 'Mongolian', 'Geez', 'maccenteuro', 'Vietnamese', 'Sindhi'], // ISO (deprecated)
  46436. ['ascii'], // windows
  46437. // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx
  46438. ['symbol', 'utf16be', 'shift-jis', 'gb18030', 'big5', 'wansung', 'johab', null, null, null, 'utf16be']]; // Overrides for Mac scripts by language id.
  46439. // See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt
  46440. var MAC_LANGUAGE_ENCODINGS = {
  46441. 15: 'maciceland',
  46442. 17: 'macturkish',
  46443. 18: 'maccroatian',
  46444. 24: 'maccenteuro',
  46445. 25: 'maccenteuro',
  46446. 26: 'maccenteuro',
  46447. 27: 'maccenteuro',
  46448. 28: 'maccenteuro',
  46449. 30: 'maciceland',
  46450. 37: 'macromania',
  46451. 38: 'maccenteuro',
  46452. 39: 'maccenteuro',
  46453. 40: 'maccenteuro',
  46454. 143: 'macinuit',
  46455. // Unsupported by iconv-lite
  46456. 146: 'macgaelic' // Unsupported by iconv-lite
  46457. }; // Map of platform ids to BCP-47 language codes.
  46458. var LANGUAGES = [// unicode
  46459. [], {
  46460. // macintosh
  46461. 0: 'en',
  46462. 30: 'fo',
  46463. 60: 'ks',
  46464. 90: 'rw',
  46465. 1: 'fr',
  46466. 31: 'fa',
  46467. 61: 'ku',
  46468. 91: 'rn',
  46469. 2: 'de',
  46470. 32: 'ru',
  46471. 62: 'sd',
  46472. 92: 'ny',
  46473. 3: 'it',
  46474. 33: 'zh',
  46475. 63: 'bo',
  46476. 93: 'mg',
  46477. 4: 'nl',
  46478. 34: 'nl-BE',
  46479. 64: 'ne',
  46480. 94: 'eo',
  46481. 5: 'sv',
  46482. 35: 'ga',
  46483. 65: 'sa',
  46484. 128: 'cy',
  46485. 6: 'es',
  46486. 36: 'sq',
  46487. 66: 'mr',
  46488. 129: 'eu',
  46489. 7: 'da',
  46490. 37: 'ro',
  46491. 67: 'bn',
  46492. 130: 'ca',
  46493. 8: 'pt',
  46494. 38: 'cz',
  46495. 68: 'as',
  46496. 131: 'la',
  46497. 9: 'no',
  46498. 39: 'sk',
  46499. 69: 'gu',
  46500. 132: 'qu',
  46501. 10: 'he',
  46502. 40: 'si',
  46503. 70: 'pa',
  46504. 133: 'gn',
  46505. 11: 'ja',
  46506. 41: 'yi',
  46507. 71: 'or',
  46508. 134: 'ay',
  46509. 12: 'ar',
  46510. 42: 'sr',
  46511. 72: 'ml',
  46512. 135: 'tt',
  46513. 13: 'fi',
  46514. 43: 'mk',
  46515. 73: 'kn',
  46516. 136: 'ug',
  46517. 14: 'el',
  46518. 44: 'bg',
  46519. 74: 'ta',
  46520. 137: 'dz',
  46521. 15: 'is',
  46522. 45: 'uk',
  46523. 75: 'te',
  46524. 138: 'jv',
  46525. 16: 'mt',
  46526. 46: 'be',
  46527. 76: 'si',
  46528. 139: 'su',
  46529. 17: 'tr',
  46530. 47: 'uz',
  46531. 77: 'my',
  46532. 140: 'gl',
  46533. 18: 'hr',
  46534. 48: 'kk',
  46535. 78: 'km',
  46536. 141: 'af',
  46537. 19: 'zh-Hant',
  46538. 49: 'az-Cyrl',
  46539. 79: 'lo',
  46540. 142: 'br',
  46541. 20: 'ur',
  46542. 50: 'az-Arab',
  46543. 80: 'vi',
  46544. 143: 'iu',
  46545. 21: 'hi',
  46546. 51: 'hy',
  46547. 81: 'id',
  46548. 144: 'gd',
  46549. 22: 'th',
  46550. 52: 'ka',
  46551. 82: 'tl',
  46552. 145: 'gv',
  46553. 23: 'ko',
  46554. 53: 'mo',
  46555. 83: 'ms',
  46556. 146: 'ga',
  46557. 24: 'lt',
  46558. 54: 'ky',
  46559. 84: 'ms-Arab',
  46560. 147: 'to',
  46561. 25: 'pl',
  46562. 55: 'tg',
  46563. 85: 'am',
  46564. 148: 'el-polyton',
  46565. 26: 'hu',
  46566. 56: 'tk',
  46567. 86: 'ti',
  46568. 149: 'kl',
  46569. 27: 'es',
  46570. 57: 'mn-CN',
  46571. 87: 'om',
  46572. 150: 'az',
  46573. 28: 'lv',
  46574. 58: 'mn',
  46575. 88: 'so',
  46576. 151: 'nn',
  46577. 29: 'se',
  46578. 59: 'ps',
  46579. 89: 'sw'
  46580. }, // ISO (deprecated)
  46581. [], {
  46582. // windows
  46583. 0x0436: 'af',
  46584. 0x4009: 'en-IN',
  46585. 0x0487: 'rw',
  46586. 0x0432: 'tn',
  46587. 0x041C: 'sq',
  46588. 0x1809: 'en-IE',
  46589. 0x0441: 'sw',
  46590. 0x045B: 'si',
  46591. 0x0484: 'gsw',
  46592. 0x2009: 'en-JM',
  46593. 0x0457: 'kok',
  46594. 0x041B: 'sk',
  46595. 0x045E: 'am',
  46596. 0x4409: 'en-MY',
  46597. 0x0412: 'ko',
  46598. 0x0424: 'sl',
  46599. 0x1401: 'ar-DZ',
  46600. 0x1409: 'en-NZ',
  46601. 0x0440: 'ky',
  46602. 0x2C0A: 'es-AR',
  46603. 0x3C01: 'ar-BH',
  46604. 0x3409: 'en-PH',
  46605. 0x0454: 'lo',
  46606. 0x400A: 'es-BO',
  46607. 0x0C01: 'ar',
  46608. 0x4809: 'en-SG',
  46609. 0x0426: 'lv',
  46610. 0x340A: 'es-CL',
  46611. 0x0801: 'ar-IQ',
  46612. 0x1C09: 'en-ZA',
  46613. 0x0427: 'lt',
  46614. 0x240A: 'es-CO',
  46615. 0x2C01: 'ar-JO',
  46616. 0x2C09: 'en-TT',
  46617. 0x082E: 'dsb',
  46618. 0x140A: 'es-CR',
  46619. 0x3401: 'ar-KW',
  46620. 0x0809: 'en-GB',
  46621. 0x046E: 'lb',
  46622. 0x1C0A: 'es-DO',
  46623. 0x3001: 'ar-LB',
  46624. 0x0409: 'en',
  46625. 0x042F: 'mk',
  46626. 0x300A: 'es-EC',
  46627. 0x1001: 'ar-LY',
  46628. 0x3009: 'en-ZW',
  46629. 0x083E: 'ms-BN',
  46630. 0x440A: 'es-SV',
  46631. 0x1801: 'ary',
  46632. 0x0425: 'et',
  46633. 0x043E: 'ms',
  46634. 0x100A: 'es-GT',
  46635. 0x2001: 'ar-OM',
  46636. 0x0438: 'fo',
  46637. 0x044C: 'ml',
  46638. 0x480A: 'es-HN',
  46639. 0x4001: 'ar-QA',
  46640. 0x0464: 'fil',
  46641. 0x043A: 'mt',
  46642. 0x080A: 'es-MX',
  46643. 0x0401: 'ar-SA',
  46644. 0x040B: 'fi',
  46645. 0x0481: 'mi',
  46646. 0x4C0A: 'es-NI',
  46647. 0x2801: 'ar-SY',
  46648. 0x080C: 'fr-BE',
  46649. 0x047A: 'arn',
  46650. 0x180A: 'es-PA',
  46651. 0x1C01: 'aeb',
  46652. 0x0C0C: 'fr-CA',
  46653. 0x044E: 'mr',
  46654. 0x3C0A: 'es-PY',
  46655. 0x3801: 'ar-AE',
  46656. 0x040C: 'fr',
  46657. 0x047C: 'moh',
  46658. 0x280A: 'es-PE',
  46659. 0x2401: 'ar-YE',
  46660. 0x140C: 'fr-LU',
  46661. 0x0450: 'mn',
  46662. 0x500A: 'es-PR',
  46663. 0x042B: 'hy',
  46664. 0x180C: 'fr-MC',
  46665. 0x0850: 'mn-CN',
  46666. 0x0C0A: 'es',
  46667. 0x044D: 'as',
  46668. 0x100C: 'fr-CH',
  46669. 0x0461: 'ne',
  46670. 0x040A: 'es',
  46671. 0x082C: 'az-Cyrl',
  46672. 0x0462: 'fy',
  46673. 0x0414: 'nb',
  46674. 0x540A: 'es-US',
  46675. 0x042C: 'az',
  46676. 0x0456: 'gl',
  46677. 0x0814: 'nn',
  46678. 0x380A: 'es-UY',
  46679. 0x046D: 'ba',
  46680. 0x0437: 'ka',
  46681. 0x0482: 'oc',
  46682. 0x200A: 'es-VE',
  46683. 0x042D: 'eu',
  46684. 0x0C07: 'de-AT',
  46685. 0x0448: 'or',
  46686. 0x081D: 'sv-FI',
  46687. 0x0423: 'be',
  46688. 0x0407: 'de',
  46689. 0x0463: 'ps',
  46690. 0x041D: 'sv',
  46691. 0x0845: 'bn',
  46692. 0x1407: 'de-LI',
  46693. 0x0415: 'pl',
  46694. 0x045A: 'syr',
  46695. 0x0445: 'bn-IN',
  46696. 0x1007: 'de-LU',
  46697. 0x0416: 'pt',
  46698. 0x0428: 'tg',
  46699. 0x201A: 'bs-Cyrl',
  46700. 0x0807: 'de-CH',
  46701. 0x0816: 'pt-PT',
  46702. 0x085F: 'tzm',
  46703. 0x141A: 'bs',
  46704. 0x0408: 'el',
  46705. 0x0446: 'pa',
  46706. 0x0449: 'ta',
  46707. 0x047E: 'br',
  46708. 0x046F: 'kl',
  46709. 0x046B: 'qu-BO',
  46710. 0x0444: 'tt',
  46711. 0x0402: 'bg',
  46712. 0x0447: 'gu',
  46713. 0x086B: 'qu-EC',
  46714. 0x044A: 'te',
  46715. 0x0403: 'ca',
  46716. 0x0468: 'ha',
  46717. 0x0C6B: 'qu',
  46718. 0x041E: 'th',
  46719. 0x0C04: 'zh-HK',
  46720. 0x040D: 'he',
  46721. 0x0418: 'ro',
  46722. 0x0451: 'bo',
  46723. 0x1404: 'zh-MO',
  46724. 0x0439: 'hi',
  46725. 0x0417: 'rm',
  46726. 0x041F: 'tr',
  46727. 0x0804: 'zh',
  46728. 0x040E: 'hu',
  46729. 0x0419: 'ru',
  46730. 0x0442: 'tk',
  46731. 0x1004: 'zh-SG',
  46732. 0x040F: 'is',
  46733. 0x243B: 'smn',
  46734. 0x0480: 'ug',
  46735. 0x0404: 'zh-TW',
  46736. 0x0470: 'ig',
  46737. 0x103B: 'smj-NO',
  46738. 0x0422: 'uk',
  46739. 0x0483: 'co',
  46740. 0x0421: 'id',
  46741. 0x143B: 'smj',
  46742. 0x042E: 'hsb',
  46743. 0x041A: 'hr',
  46744. 0x045D: 'iu',
  46745. 0x0C3B: 'se-FI',
  46746. 0x0420: 'ur',
  46747. 0x101A: 'hr-BA',
  46748. 0x085D: 'iu-Latn',
  46749. 0x043B: 'se',
  46750. 0x0843: 'uz-Cyrl',
  46751. 0x0405: 'cs',
  46752. 0x083C: 'ga',
  46753. 0x083B: 'se-SE',
  46754. 0x0443: 'uz',
  46755. 0x0406: 'da',
  46756. 0x0434: 'xh',
  46757. 0x203B: 'sms',
  46758. 0x042A: 'vi',
  46759. 0x048C: 'prs',
  46760. 0x0435: 'zu',
  46761. 0x183B: 'sma-NO',
  46762. 0x0452: 'cy',
  46763. 0x0465: 'dv',
  46764. 0x0410: 'it',
  46765. 0x1C3B: 'sms',
  46766. 0x0488: 'wo',
  46767. 0x0813: 'nl-BE',
  46768. 0x0810: 'it-CH',
  46769. 0x044F: 'sa',
  46770. 0x0485: 'sah',
  46771. 0x0413: 'nl',
  46772. 0x0411: 'ja',
  46773. 0x1C1A: 'sr-Cyrl-BA',
  46774. 0x0478: 'ii',
  46775. 0x0C09: 'en-AU',
  46776. 0x044B: 'kn',
  46777. 0x0C1A: 'sr',
  46778. 0x046A: 'yo',
  46779. 0x2809: 'en-BZ',
  46780. 0x043F: 'kk',
  46781. 0x181A: 'sr-Latn-BA',
  46782. 0x1009: 'en-CA',
  46783. 0x0453: 'km',
  46784. 0x081A: 'sr-Latn',
  46785. 0x2409: 'en-029',
  46786. 0x0486: 'quc',
  46787. 0x046C: 'nso'
  46788. }];
  46789. var NameRecord = new r.Struct({
  46790. platformID: r.uint16,
  46791. encodingID: r.uint16,
  46792. languageID: r.uint16,
  46793. nameID: r.uint16,
  46794. length: r.uint16,
  46795. string: new r.Pointer(r.uint16, new r.String('length', function (t) {
  46796. return getEncoding(t.platformID, t.encodingID, t.languageID);
  46797. }), {
  46798. type: 'parent',
  46799. relativeTo: function relativeTo(ctx) {
  46800. return ctx.parent.stringOffset;
  46801. },
  46802. allowNull: false
  46803. })
  46804. });
  46805. var LangTagRecord = new r.Struct({
  46806. length: r.uint16,
  46807. tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {
  46808. type: 'parent',
  46809. relativeTo: function relativeTo(ctx) {
  46810. return ctx.stringOffset;
  46811. }
  46812. })
  46813. });
  46814. var NameTable = new r.VersionedStruct(r.uint16, {
  46815. 0: {
  46816. count: r.uint16,
  46817. stringOffset: r.uint16,
  46818. records: new r.Array(NameRecord, 'count')
  46819. },
  46820. 1: {
  46821. count: r.uint16,
  46822. stringOffset: r.uint16,
  46823. records: new r.Array(NameRecord, 'count'),
  46824. langTagCount: r.uint16,
  46825. langTags: new r.Array(LangTagRecord, 'langTagCount')
  46826. }
  46827. });
  46828. var NAMES = ['copyright', 'fontFamily', 'fontSubfamily', 'uniqueSubfamily', 'fullName', 'version', 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII.
  46829. 'trademark', 'manufacturer', 'designer', 'description', 'vendorURL', 'designerURL', 'license', 'licenseURL', null, // reserved
  46830. 'preferredFamily', 'preferredSubfamily', 'compatibleFull', 'sampleText', 'postscriptCIDFontName', 'wwsFamilyName', 'wwsSubfamilyName'];
  46831. NameTable.process = function (stream) {
  46832. var records = {};
  46833. for (var _iterator = _createForOfIteratorHelperLoose(this.records), _step; !(_step = _iterator()).done;) {
  46834. var record = _step.value;
  46835. // find out what language this is for
  46836. var language = LANGUAGES[record.platformID][record.languageID];
  46837. if (language == null && this.langTags != null && record.languageID >= 0x8000) {
  46838. language = this.langTags[record.languageID - 0x8000].tag;
  46839. }
  46840. if (language == null) {
  46841. language = record.platformID + '-' + record.languageID;
  46842. } // if the nameID is >= 256, it is a font feature record (AAT)
  46843. var key = record.nameID >= 256 ? 'fontFeatures' : NAMES[record.nameID] || record.nameID;
  46844. if (records[key] == null) {
  46845. records[key] = {};
  46846. }
  46847. var obj = records[key];
  46848. if (record.nameID >= 256) {
  46849. obj = obj[record.nameID] || (obj[record.nameID] = {});
  46850. }
  46851. if (typeof record.string === 'string' || typeof obj[language] !== 'string') {
  46852. obj[language] = record.string;
  46853. }
  46854. }
  46855. this.records = records;
  46856. };
  46857. NameTable.preEncode = function () {
  46858. if (Array.isArray(this.records)) return;
  46859. this.version = 0;
  46860. var records = [];
  46861. for (var key in this.records) {
  46862. var val = this.records[key];
  46863. if (key === 'fontFeatures') continue;
  46864. records.push({
  46865. platformID: 3,
  46866. encodingID: 1,
  46867. languageID: 0x409,
  46868. nameID: NAMES.indexOf(key),
  46869. length: Buffer.byteLength(val.en, 'utf16le'),
  46870. string: val.en
  46871. });
  46872. if (key === 'postscriptName') {
  46873. records.push({
  46874. platformID: 1,
  46875. encodingID: 0,
  46876. languageID: 0,
  46877. nameID: NAMES.indexOf(key),
  46878. length: val.en.length,
  46879. string: val.en
  46880. });
  46881. }
  46882. }
  46883. this.records = records;
  46884. this.count = records.length;
  46885. this.stringOffset = NameTable.size(this, null, false);
  46886. };
  46887. var OS2 = new r.VersionedStruct(r.uint16, {
  46888. header: {
  46889. xAvgCharWidth: r.int16,
  46890. // average weighted advance width of lower case letters and space
  46891. usWeightClass: r.uint16,
  46892. // visual weight of stroke in glyphs
  46893. usWidthClass: r.uint16,
  46894. // relative change from the normal aspect ratio (width to height ratio)
  46895. fsType: new r.Bitfield(r.uint16, [// Indicates font embedding licensing rights
  46896. null, 'noEmbedding', 'viewOnly', 'editable', null, null, null, null, 'noSubsetting', 'bitmapOnly']),
  46897. ySubscriptXSize: r.int16,
  46898. // recommended horizontal size in pixels for subscripts
  46899. ySubscriptYSize: r.int16,
  46900. // recommended vertical size in pixels for subscripts
  46901. ySubscriptXOffset: r.int16,
  46902. // recommended horizontal offset for subscripts
  46903. ySubscriptYOffset: r.int16,
  46904. // recommended vertical offset form the baseline for subscripts
  46905. ySuperscriptXSize: r.int16,
  46906. // recommended horizontal size in pixels for superscripts
  46907. ySuperscriptYSize: r.int16,
  46908. // recommended vertical size in pixels for superscripts
  46909. ySuperscriptXOffset: r.int16,
  46910. // recommended horizontal offset for superscripts
  46911. ySuperscriptYOffset: r.int16,
  46912. // recommended vertical offset from the baseline for superscripts
  46913. yStrikeoutSize: r.int16,
  46914. // width of the strikeout stroke
  46915. yStrikeoutPosition: r.int16,
  46916. // position of the strikeout stroke relative to the baseline
  46917. sFamilyClass: r.int16,
  46918. // classification of font-family design
  46919. panose: new r.Array(r.uint8, 10),
  46920. // describe the visual characteristics of a given typeface
  46921. ulCharRange: new r.Array(r.uint32, 4),
  46922. vendorID: new r.String(4),
  46923. // four character identifier for the font vendor
  46924. fsSelection: new r.Bitfield(r.uint16, [// bit field containing information about the font
  46925. 'italic', 'underscore', 'negative', 'outlined', 'strikeout', 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique']),
  46926. usFirstCharIndex: r.uint16,
  46927. // The minimum Unicode index in this font
  46928. usLastCharIndex: r.uint16 // The maximum Unicode index in this font
  46929. },
  46930. // The Apple version of this table ends here, but the Microsoft one continues on...
  46931. 0: {},
  46932. 1: {
  46933. typoAscender: r.int16,
  46934. typoDescender: r.int16,
  46935. typoLineGap: r.int16,
  46936. winAscent: r.uint16,
  46937. winDescent: r.uint16,
  46938. codePageRange: new r.Array(r.uint32, 2)
  46939. },
  46940. 2: {
  46941. // these should be common with version 1 somehow
  46942. typoAscender: r.int16,
  46943. typoDescender: r.int16,
  46944. typoLineGap: r.int16,
  46945. winAscent: r.uint16,
  46946. winDescent: r.uint16,
  46947. codePageRange: new r.Array(r.uint32, 2),
  46948. xHeight: r.int16,
  46949. capHeight: r.int16,
  46950. defaultChar: r.uint16,
  46951. breakChar: r.uint16,
  46952. maxContent: r.uint16
  46953. },
  46954. 5: {
  46955. typoAscender: r.int16,
  46956. typoDescender: r.int16,
  46957. typoLineGap: r.int16,
  46958. winAscent: r.uint16,
  46959. winDescent: r.uint16,
  46960. codePageRange: new r.Array(r.uint32, 2),
  46961. xHeight: r.int16,
  46962. capHeight: r.int16,
  46963. defaultChar: r.uint16,
  46964. breakChar: r.uint16,
  46965. maxContent: r.uint16,
  46966. usLowerOpticalPointSize: r.uint16,
  46967. usUpperOpticalPointSize: r.uint16
  46968. }
  46969. });
  46970. var versions = OS2.versions;
  46971. versions[3] = versions[4] = versions[2];
  46972. var post = new r.VersionedStruct(r.fixed32, {
  46973. header: {
  46974. // these fields exist at the top of all versions
  46975. italicAngle: r.fixed32,
  46976. // Italic angle in counter-clockwise degrees from the vertical.
  46977. underlinePosition: r.int16,
  46978. // Suggested distance of the top of the underline from the baseline
  46979. underlineThickness: r.int16,
  46980. // Suggested values for the underline thickness
  46981. isFixedPitch: r.uint32,
  46982. // Whether the font is monospaced
  46983. minMemType42: r.uint32,
  46984. // Minimum memory usage when a TrueType font is downloaded as a Type 42 font
  46985. maxMemType42: r.uint32,
  46986. // Maximum memory usage when a TrueType font is downloaded as a Type 42 font
  46987. minMemType1: r.uint32,
  46988. // Minimum memory usage when a TrueType font is downloaded as a Type 1 font
  46989. maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font
  46990. },
  46991. 1: {},
  46992. // version 1 has no additional fields
  46993. 2: {
  46994. numberOfGlyphs: r.uint16,
  46995. glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'),
  46996. names: new r.Array(new r.String(r.uint8))
  46997. },
  46998. 2.5: {
  46999. numberOfGlyphs: r.uint16,
  47000. offsets: new r.Array(r.uint8, 'numberOfGlyphs')
  47001. },
  47002. 3: {},
  47003. // version 3 has no additional fields
  47004. 4: {
  47005. map: new r.Array(r.uint32, function (t) {
  47006. return t.parent.maxp.numGlyphs;
  47007. })
  47008. }
  47009. });
  47010. var cvt = new r.Struct({
  47011. controlValues: new r.Array(r.int16)
  47012. }); // These instructions are known as the font program. The main use of this table
  47013. // is for the definition of functions that are used in many different glyph programs.
  47014. var fpgm = new r.Struct({
  47015. instructions: new r.Array(r.uint8)
  47016. });
  47017. var loca = new r.VersionedStruct('head.indexToLocFormat', {
  47018. 0: {
  47019. offsets: new r.Array(r.uint16)
  47020. },
  47021. 1: {
  47022. offsets: new r.Array(r.uint32)
  47023. }
  47024. });
  47025. loca.process = function () {
  47026. if (this.version === 0) {
  47027. for (var i = 0; i < this.offsets.length; i++) {
  47028. this.offsets[i] <<= 1;
  47029. }
  47030. }
  47031. };
  47032. loca.preEncode = function () {
  47033. if (this.version === 0) {
  47034. for (var i = 0; i < this.offsets.length; i++) {
  47035. this.offsets[i] >>>= 1;
  47036. }
  47037. }
  47038. };
  47039. var prep = new r.Struct({
  47040. controlValueProgram: new r.Array(r.uint8)
  47041. });
  47042. var glyf = new r.Array(new r.Buffer());
  47043. var CFFIndex = /*#__PURE__*/function () {
  47044. function CFFIndex(type) {
  47045. this.type = type;
  47046. }
  47047. var _proto = CFFIndex.prototype;
  47048. _proto.getCFFVersion = function getCFFVersion(ctx) {
  47049. while (ctx && !ctx.hdrSize) {
  47050. ctx = ctx.parent;
  47051. }
  47052. return ctx ? ctx.version : -1;
  47053. };
  47054. _proto.decode = function decode(stream, parent) {
  47055. var version = this.getCFFVersion(parent);
  47056. var count = version >= 2 ? stream.readUInt32BE() : stream.readUInt16BE();
  47057. if (count === 0) {
  47058. return [];
  47059. }
  47060. var offSize = stream.readUInt8();
  47061. var offsetType;
  47062. if (offSize === 1) {
  47063. offsetType = r.uint8;
  47064. } else if (offSize === 2) {
  47065. offsetType = r.uint16;
  47066. } else if (offSize === 3) {
  47067. offsetType = r.uint24;
  47068. } else if (offSize === 4) {
  47069. offsetType = r.uint32;
  47070. } else {
  47071. throw new Error("Bad offset size in CFFIndex: ".concat(offSize, " ").concat(stream.pos));
  47072. }
  47073. var ret = [];
  47074. var startPos = stream.pos + (count + 1) * offSize - 1;
  47075. var start = offsetType.decode(stream);
  47076. for (var i = 0; i < count; i++) {
  47077. var end = offsetType.decode(stream);
  47078. if (this.type != null) {
  47079. var pos = stream.pos;
  47080. stream.pos = startPos + start;
  47081. parent.length = end - start;
  47082. ret.push(this.type.decode(stream, parent));
  47083. stream.pos = pos;
  47084. } else {
  47085. ret.push({
  47086. offset: startPos + start,
  47087. length: end - start
  47088. });
  47089. }
  47090. start = end;
  47091. }
  47092. stream.pos = startPos + start;
  47093. return ret;
  47094. };
  47095. _proto.size = function size(arr, parent) {
  47096. var size = 2;
  47097. if (arr.length === 0) {
  47098. return size;
  47099. }
  47100. var type = this.type || new r.Buffer(); // find maximum offset to detminine offset type
  47101. var offset = 1;
  47102. for (var i = 0; i < arr.length; i++) {
  47103. var item = arr[i];
  47104. offset += type.size(item, parent);
  47105. }
  47106. var offsetType;
  47107. if (offset <= 0xff) {
  47108. offsetType = r.uint8;
  47109. } else if (offset <= 0xffff) {
  47110. offsetType = r.uint16;
  47111. } else if (offset <= 0xffffff) {
  47112. offsetType = r.uint24;
  47113. } else if (offset <= 0xffffffff) {
  47114. offsetType = r.uint32;
  47115. } else {
  47116. throw new Error("Bad offset in CFFIndex");
  47117. }
  47118. size += 1 + offsetType.size() * (arr.length + 1);
  47119. size += offset - 1;
  47120. return size;
  47121. };
  47122. _proto.encode = function encode(stream, arr, parent) {
  47123. stream.writeUInt16BE(arr.length);
  47124. if (arr.length === 0) {
  47125. return;
  47126. }
  47127. var type = this.type || new r.Buffer(); // find maximum offset to detminine offset type
  47128. var sizes = [];
  47129. var offset = 1;
  47130. for (var _iterator2 = _createForOfIteratorHelperLoose(arr), _step2; !(_step2 = _iterator2()).done;) {
  47131. var item = _step2.value;
  47132. var s = type.size(item, parent);
  47133. sizes.push(s);
  47134. offset += s;
  47135. }
  47136. var offsetType;
  47137. if (offset <= 0xff) {
  47138. offsetType = r.uint8;
  47139. } else if (offset <= 0xffff) {
  47140. offsetType = r.uint16;
  47141. } else if (offset <= 0xffffff) {
  47142. offsetType = r.uint24;
  47143. } else if (offset <= 0xffffffff) {
  47144. offsetType = r.uint32;
  47145. } else {
  47146. throw new Error("Bad offset in CFFIndex");
  47147. } // write offset size
  47148. stream.writeUInt8(offsetType.size()); // write elements
  47149. offset = 1;
  47150. offsetType.encode(stream, offset);
  47151. for (var _i22 = 0, _sizes = sizes; _i22 < _sizes.length; _i22++) {
  47152. var size = _sizes[_i22];
  47153. offset += size;
  47154. offsetType.encode(stream, offset);
  47155. }
  47156. for (var _iterator3 = _createForOfIteratorHelperLoose(arr), _step3; !(_step3 = _iterator3()).done;) {
  47157. var _item = _step3.value;
  47158. type.encode(stream, _item, parent);
  47159. }
  47160. return;
  47161. };
  47162. return CFFIndex;
  47163. }();
  47164. var FLOAT_EOF = 0xf;
  47165. var FLOAT_LOOKUP = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', null, '-'];
  47166. var FLOAT_ENCODE_LOOKUP = {
  47167. '.': 10,
  47168. 'E': 11,
  47169. 'E-': 12,
  47170. '-': 14
  47171. };
  47172. var CFFOperand = /*#__PURE__*/function () {
  47173. function CFFOperand() {}
  47174. CFFOperand.decode = function decode(stream, value) {
  47175. if (32 <= value && value <= 246) {
  47176. return value - 139;
  47177. }
  47178. if (247 <= value && value <= 250) {
  47179. return (value - 247) * 256 + stream.readUInt8() + 108;
  47180. }
  47181. if (251 <= value && value <= 254) {
  47182. return -(value - 251) * 256 - stream.readUInt8() - 108;
  47183. }
  47184. if (value === 28) {
  47185. return stream.readInt16BE();
  47186. }
  47187. if (value === 29) {
  47188. return stream.readInt32BE();
  47189. }
  47190. if (value === 30) {
  47191. var str = '';
  47192. while (true) {
  47193. var b = stream.readUInt8();
  47194. var n1 = b >> 4;
  47195. if (n1 === FLOAT_EOF) {
  47196. break;
  47197. }
  47198. str += FLOAT_LOOKUP[n1];
  47199. var n2 = b & 15;
  47200. if (n2 === FLOAT_EOF) {
  47201. break;
  47202. }
  47203. str += FLOAT_LOOKUP[n2];
  47204. }
  47205. return parseFloat(str);
  47206. }
  47207. return null;
  47208. };
  47209. CFFOperand.size = function size(value) {
  47210. // if the value needs to be forced to the largest size (32 bit)
  47211. // e.g. for unknown pointers, set to 32768
  47212. if (value.forceLarge) {
  47213. value = 32768;
  47214. }
  47215. if ((value | 0) !== value) {
  47216. // floating point
  47217. var str = '' + value;
  47218. return 1 + Math.ceil((str.length + 1) / 2);
  47219. } else if (-107 <= value && value <= 107) {
  47220. return 1;
  47221. } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) {
  47222. return 2;
  47223. } else if (-32768 <= value && value <= 32767) {
  47224. return 3;
  47225. } else {
  47226. return 5;
  47227. }
  47228. };
  47229. CFFOperand.encode = function encode(stream, value) {
  47230. // if the value needs to be forced to the largest size (32 bit)
  47231. // e.g. for unknown pointers, save the old value and set to 32768
  47232. var val = Number(value);
  47233. if (value.forceLarge) {
  47234. stream.writeUInt8(29);
  47235. return stream.writeInt32BE(val);
  47236. } else if ((val | 0) !== val) {
  47237. // floating point
  47238. stream.writeUInt8(30);
  47239. var str = '' + val;
  47240. for (var i = 0; i < str.length; i += 2) {
  47241. var c1 = str[i];
  47242. var n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1;
  47243. if (i === str.length - 1) {
  47244. var n2 = FLOAT_EOF;
  47245. } else {
  47246. var c2 = str[i + 1];
  47247. var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2;
  47248. }
  47249. stream.writeUInt8(n1 << 4 | n2 & 15);
  47250. }
  47251. if (n2 !== FLOAT_EOF) {
  47252. return stream.writeUInt8(FLOAT_EOF << 4);
  47253. }
  47254. } else if (-107 <= val && val <= 107) {
  47255. return stream.writeUInt8(val + 139);
  47256. } else if (108 <= val && val <= 1131) {
  47257. val -= 108;
  47258. stream.writeUInt8((val >> 8) + 247);
  47259. return stream.writeUInt8(val & 0xff);
  47260. } else if (-1131 <= val && val <= -108) {
  47261. val = -val - 108;
  47262. stream.writeUInt8((val >> 8) + 251);
  47263. return stream.writeUInt8(val & 0xff);
  47264. } else if (-32768 <= val && val <= 32767) {
  47265. stream.writeUInt8(28);
  47266. return stream.writeInt16BE(val);
  47267. } else {
  47268. stream.writeUInt8(29);
  47269. return stream.writeInt32BE(val);
  47270. }
  47271. };
  47272. return CFFOperand;
  47273. }();
  47274. var CFFDict = /*#__PURE__*/function () {
  47275. function CFFDict(ops) {
  47276. if (ops === void 0) {
  47277. ops = [];
  47278. }
  47279. this.ops = ops;
  47280. this.fields = {};
  47281. for (var _iterator4 = _createForOfIteratorHelperLoose(ops), _step4; !(_step4 = _iterator4()).done;) {
  47282. var field = _step4.value;
  47283. var key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0];
  47284. this.fields[key] = field;
  47285. }
  47286. }
  47287. var _proto2 = CFFDict.prototype;
  47288. _proto2.decodeOperands = function decodeOperands(type, stream, ret, operands) {
  47289. var _this = this;
  47290. if (Array.isArray(type)) {
  47291. return operands.map(function (op, i) {
  47292. return _this.decodeOperands(type[i], stream, ret, [op]);
  47293. });
  47294. } else if (type.decode != null) {
  47295. return type.decode(stream, ret, operands);
  47296. } else {
  47297. switch (type) {
  47298. case 'number':
  47299. case 'offset':
  47300. case 'sid':
  47301. return operands[0];
  47302. case 'boolean':
  47303. return !!operands[0];
  47304. default:
  47305. return operands;
  47306. }
  47307. }
  47308. };
  47309. _proto2.encodeOperands = function encodeOperands(type, stream, ctx, operands) {
  47310. var _this2 = this;
  47311. if (Array.isArray(type)) {
  47312. return operands.map(function (op, i) {
  47313. return _this2.encodeOperands(type[i], stream, ctx, op)[0];
  47314. });
  47315. } else if (type.encode != null) {
  47316. return type.encode(stream, operands, ctx);
  47317. } else if (typeof operands === 'number') {
  47318. return [operands];
  47319. } else if (typeof operands === 'boolean') {
  47320. return [+operands];
  47321. } else if (Array.isArray(operands)) {
  47322. return operands;
  47323. } else {
  47324. return [operands];
  47325. }
  47326. };
  47327. _proto2.decode = function decode(stream, parent) {
  47328. var end = stream.pos + parent.length;
  47329. var ret = {};
  47330. var operands = []; // define hidden properties
  47331. Object.defineProperties(ret, {
  47332. parent: {
  47333. value: parent
  47334. },
  47335. _startOffset: {
  47336. value: stream.pos
  47337. }
  47338. }); // fill in defaults
  47339. for (var key in this.fields) {
  47340. var field = this.fields[key];
  47341. ret[field[1]] = field[3];
  47342. }
  47343. while (stream.pos < end) {
  47344. var b = stream.readUInt8();
  47345. if (b < 28) {
  47346. if (b === 12) {
  47347. b = b << 8 | stream.readUInt8();
  47348. }
  47349. var _field = this.fields[b];
  47350. if (!_field) {
  47351. throw new Error("Unknown operator ".concat(b));
  47352. }
  47353. var val = this.decodeOperands(_field[2], stream, ret, operands);
  47354. if (val != null) {
  47355. if (val instanceof utils.PropertyDescriptor) {
  47356. Object.defineProperty(ret, _field[1], val);
  47357. } else {
  47358. ret[_field[1]] = val;
  47359. }
  47360. }
  47361. operands = [];
  47362. } else {
  47363. operands.push(CFFOperand.decode(stream, b));
  47364. }
  47365. }
  47366. return ret;
  47367. };
  47368. _proto2.size = function size(dict, parent, includePointers) {
  47369. if (includePointers === void 0) {
  47370. includePointers = true;
  47371. }
  47372. var ctx = {
  47373. parent: parent,
  47374. val: dict,
  47375. pointerSize: 0,
  47376. startOffset: parent.startOffset || 0
  47377. };
  47378. var len = 0;
  47379. for (var k in this.fields) {
  47380. var field = this.fields[k];
  47381. var val = dict[field[1]];
  47382. if (val == null || isEqual(val, field[3])) {
  47383. continue;
  47384. }
  47385. var operands = this.encodeOperands(field[2], null, ctx, val);
  47386. for (var _iterator5 = _createForOfIteratorHelperLoose(operands), _step5; !(_step5 = _iterator5()).done;) {
  47387. var op = _step5.value;
  47388. len += CFFOperand.size(op);
  47389. }
  47390. var key = Array.isArray(field[0]) ? field[0] : [field[0]];
  47391. len += key.length;
  47392. }
  47393. if (includePointers) {
  47394. len += ctx.pointerSize;
  47395. }
  47396. return len;
  47397. };
  47398. _proto2.encode = function encode(stream, dict, parent) {
  47399. var ctx = {
  47400. pointers: [],
  47401. startOffset: stream.pos,
  47402. parent: parent,
  47403. val: dict,
  47404. pointerSize: 0
  47405. };
  47406. ctx.pointerOffset = stream.pos + this.size(dict, ctx, false);
  47407. for (var _iterator6 = _createForOfIteratorHelperLoose(this.ops), _step6; !(_step6 = _iterator6()).done;) {
  47408. var field = _step6.value;
  47409. var val = dict[field[1]];
  47410. if (val == null || isEqual(val, field[3])) {
  47411. continue;
  47412. }
  47413. var operands = this.encodeOperands(field[2], stream, ctx, val);
  47414. for (var _iterator7 = _createForOfIteratorHelperLoose(operands), _step7; !(_step7 = _iterator7()).done;) {
  47415. var op = _step7.value;
  47416. CFFOperand.encode(stream, op);
  47417. }
  47418. var key = Array.isArray(field[0]) ? field[0] : [field[0]];
  47419. for (var _iterator8 = _createForOfIteratorHelperLoose(key), _step8; !(_step8 = _iterator8()).done;) {
  47420. var _op = _step8.value;
  47421. stream.writeUInt8(_op);
  47422. }
  47423. }
  47424. var i = 0;
  47425. while (i < ctx.pointers.length) {
  47426. var ptr = ctx.pointers[i++];
  47427. ptr.type.encode(stream, ptr.val, ptr.parent);
  47428. }
  47429. return;
  47430. };
  47431. return CFFDict;
  47432. }();
  47433. var CFFPointer = /*#__PURE__*/function (_r$Pointer) {
  47434. _inheritsLoose(CFFPointer, _r$Pointer);
  47435. function CFFPointer(type, options) {
  47436. if (options === void 0) {
  47437. options = {};
  47438. }
  47439. if (options.type == null) {
  47440. options.type = 'global';
  47441. }
  47442. return _r$Pointer.call(this, null, type, options) || this;
  47443. }
  47444. var _proto3 = CFFPointer.prototype;
  47445. _proto3.decode = function decode(stream, parent, operands) {
  47446. this.offsetType = {
  47447. decode: function decode() {
  47448. return operands[0];
  47449. }
  47450. };
  47451. return _r$Pointer.prototype.decode.call(this, stream, parent, operands);
  47452. };
  47453. _proto3.encode = function encode(stream, value, ctx) {
  47454. if (!stream) {
  47455. // compute the size (so ctx.pointerSize is correct)
  47456. this.offsetType = {
  47457. size: function size() {
  47458. return 0;
  47459. }
  47460. };
  47461. this.size(value, ctx);
  47462. return [new Ptr(0)];
  47463. }
  47464. var ptr = null;
  47465. this.offsetType = {
  47466. encode: function encode(stream, val) {
  47467. return ptr = val;
  47468. }
  47469. };
  47470. _r$Pointer.prototype.encode.call(this, stream, value, ctx);
  47471. return [new Ptr(ptr)];
  47472. };
  47473. return CFFPointer;
  47474. }(r.Pointer);
  47475. var Ptr = /*#__PURE__*/function () {
  47476. function Ptr(val) {
  47477. this.val = val;
  47478. this.forceLarge = true;
  47479. }
  47480. var _proto4 = Ptr.prototype;
  47481. _proto4.valueOf = function valueOf() {
  47482. return this.val;
  47483. };
  47484. return Ptr;
  47485. }();
  47486. var CFFBlendOp = /*#__PURE__*/function () {
  47487. function CFFBlendOp() {}
  47488. CFFBlendOp.decode = function decode(stream, parent, operands) {
  47489. var numBlends = operands.pop(); // TODO: actually blend. For now just consume the deltas
  47490. // since we don't use any of the values anyway.
  47491. while (operands.length > numBlends) {
  47492. operands.pop();
  47493. }
  47494. };
  47495. return CFFBlendOp;
  47496. }();
  47497. var CFFPrivateDict = new CFFDict([// key name type default
  47498. [6, 'BlueValues', 'delta', null], [7, 'OtherBlues', 'delta', null], [8, 'FamilyBlues', 'delta', null], [9, 'FamilyOtherBlues', 'delta', null], [[12, 9], 'BlueScale', 'number', 0.039625], [[12, 10], 'BlueShift', 'number', 7], [[12, 11], 'BlueFuzz', 'number', 1], [10, 'StdHW', 'number', null], [11, 'StdVW', 'number', null], [[12, 12], 'StemSnapH', 'delta', null], [[12, 13], 'StemSnapV', 'delta', null], [[12, 14], 'ForceBold', 'boolean', false], [[12, 17], 'LanguageGroup', 'number', 0], [[12, 18], 'ExpansionFactor', 'number', 0.06], [[12, 19], 'initialRandomSeed', 'number', 0], [20, 'defaultWidthX', 'number', 0], [21, 'nominalWidthX', 'number', 0], [22, 'vsindex', 'number', 0], [23, 'blend', CFFBlendOp, null], [19, 'Subrs', new CFFPointer(new CFFIndex(), {
  47499. type: 'local'
  47500. }), null]]); // Automatically generated from Appendix A of the CFF specification; do
  47501. // not edit. Length should be 391.
  47502. var standardStrings = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"];
  47503. var StandardEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron', 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls'];
  47504. var ExpertEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior', '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'];
  47505. var ISOAdobeCharset = ['.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron'];
  47506. var ExpertCharset = ['.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'];
  47507. var ExpertSubsetCharset = ['.notdef', 'space', 'dollaroldstyle', 'dollarsuperior', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted', 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter', 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior']; // Scripts and Languages #
  47508. //########################
  47509. var LangSysTable = new r.Struct({
  47510. reserved: new r.Reserved(r.uint16),
  47511. reqFeatureIndex: r.uint16,
  47512. featureCount: r.uint16,
  47513. featureIndexes: new r.Array(r.uint16, 'featureCount')
  47514. });
  47515. var LangSysRecord = new r.Struct({
  47516. tag: new r.String(4),
  47517. langSys: new r.Pointer(r.uint16, LangSysTable, {
  47518. type: 'parent'
  47519. })
  47520. });
  47521. var Script = new r.Struct({
  47522. defaultLangSys: new r.Pointer(r.uint16, LangSysTable),
  47523. count: r.uint16,
  47524. langSysRecords: new r.Array(LangSysRecord, 'count')
  47525. });
  47526. var ScriptRecord = new r.Struct({
  47527. tag: new r.String(4),
  47528. script: new r.Pointer(r.uint16, Script, {
  47529. type: 'parent'
  47530. })
  47531. });
  47532. var ScriptList = new r.Array(ScriptRecord, r.uint16); //#######################
  47533. // Features and Lookups #
  47534. //#######################
  47535. var Feature = new r.Struct({
  47536. featureParams: r.uint16,
  47537. // pointer
  47538. lookupCount: r.uint16,
  47539. lookupListIndexes: new r.Array(r.uint16, 'lookupCount')
  47540. });
  47541. var FeatureRecord = new r.Struct({
  47542. tag: new r.String(4),
  47543. feature: new r.Pointer(r.uint16, Feature, {
  47544. type: 'parent'
  47545. })
  47546. });
  47547. var FeatureList = new r.Array(FeatureRecord, r.uint16);
  47548. var LookupFlags = new r.Struct({
  47549. markAttachmentType: r.uint8,
  47550. flags: new r.Bitfield(r.uint8, ['rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures', 'ignoreMarks', 'useMarkFilteringSet'])
  47551. });
  47552. function LookupList(SubTable) {
  47553. var Lookup = new r.Struct({
  47554. lookupType: r.uint16,
  47555. flags: LookupFlags,
  47556. subTableCount: r.uint16,
  47557. subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'),
  47558. markFilteringSet: new r.Optional(r.uint16, function (t) {
  47559. return t.flags.flags.useMarkFilteringSet;
  47560. })
  47561. });
  47562. return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16);
  47563. } //#################
  47564. // Coverage Table #
  47565. //#################
  47566. var RangeRecord = new r.Struct({
  47567. start: r.uint16,
  47568. end: r.uint16,
  47569. startCoverageIndex: r.uint16
  47570. });
  47571. var Coverage = new r.VersionedStruct(r.uint16, {
  47572. 1: {
  47573. glyphCount: r.uint16,
  47574. glyphs: new r.Array(r.uint16, 'glyphCount')
  47575. },
  47576. 2: {
  47577. rangeCount: r.uint16,
  47578. rangeRecords: new r.Array(RangeRecord, 'rangeCount')
  47579. }
  47580. }); //#########################
  47581. // Class Definition Table #
  47582. //#########################
  47583. var ClassRangeRecord = new r.Struct({
  47584. start: r.uint16,
  47585. end: r.uint16,
  47586. class: r.uint16
  47587. });
  47588. var ClassDef = new r.VersionedStruct(r.uint16, {
  47589. 1: {
  47590. // Class array
  47591. startGlyph: r.uint16,
  47592. glyphCount: r.uint16,
  47593. classValueArray: new r.Array(r.uint16, 'glyphCount')
  47594. },
  47595. 2: {
  47596. // Class ranges
  47597. classRangeCount: r.uint16,
  47598. classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount')
  47599. }
  47600. }); //###############
  47601. // Device Table #
  47602. //###############
  47603. var Device = new r.Struct({
  47604. a: r.uint16,
  47605. // startSize for hinting Device, outerIndex for VariationIndex
  47606. b: r.uint16,
  47607. // endSize for Device, innerIndex for VariationIndex
  47608. deltaFormat: r.uint16
  47609. }); //#############################################
  47610. // Contextual Substitution/Positioning Tables #
  47611. //#############################################
  47612. var LookupRecord = new r.Struct({
  47613. sequenceIndex: r.uint16,
  47614. lookupListIndex: r.uint16
  47615. });
  47616. var Rule = new r.Struct({
  47617. glyphCount: r.uint16,
  47618. lookupCount: r.uint16,
  47619. input: new r.Array(r.uint16, function (t) {
  47620. return t.glyphCount - 1;
  47621. }),
  47622. lookupRecords: new r.Array(LookupRecord, 'lookupCount')
  47623. });
  47624. var RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16);
  47625. var ClassRule = new r.Struct({
  47626. glyphCount: r.uint16,
  47627. lookupCount: r.uint16,
  47628. classes: new r.Array(r.uint16, function (t) {
  47629. return t.glyphCount - 1;
  47630. }),
  47631. lookupRecords: new r.Array(LookupRecord, 'lookupCount')
  47632. });
  47633. var ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16);
  47634. var Context = new r.VersionedStruct(r.uint16, {
  47635. 1: {
  47636. // Simple context
  47637. coverage: new r.Pointer(r.uint16, Coverage),
  47638. ruleSetCount: r.uint16,
  47639. ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount')
  47640. },
  47641. 2: {
  47642. // Class-based context
  47643. coverage: new r.Pointer(r.uint16, Coverage),
  47644. classDef: new r.Pointer(r.uint16, ClassDef),
  47645. classSetCnt: r.uint16,
  47646. classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt')
  47647. },
  47648. 3: {
  47649. glyphCount: r.uint16,
  47650. lookupCount: r.uint16,
  47651. coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'),
  47652. lookupRecords: new r.Array(LookupRecord, 'lookupCount')
  47653. }
  47654. }); //######################################################
  47655. // Chaining Contextual Substitution/Positioning Tables #
  47656. //######################################################
  47657. var ChainRule = new r.Struct({
  47658. backtrackGlyphCount: r.uint16,
  47659. backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'),
  47660. inputGlyphCount: r.uint16,
  47661. input: new r.Array(r.uint16, function (t) {
  47662. return t.inputGlyphCount - 1;
  47663. }),
  47664. lookaheadGlyphCount: r.uint16,
  47665. lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'),
  47666. lookupCount: r.uint16,
  47667. lookupRecords: new r.Array(LookupRecord, 'lookupCount')
  47668. });
  47669. var ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16);
  47670. var ChainingContext = new r.VersionedStruct(r.uint16, {
  47671. 1: {
  47672. // Simple context glyph substitution
  47673. coverage: new r.Pointer(r.uint16, Coverage),
  47674. chainCount: r.uint16,
  47675. chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')
  47676. },
  47677. 2: {
  47678. // Class-based chaining context
  47679. coverage: new r.Pointer(r.uint16, Coverage),
  47680. backtrackClassDef: new r.Pointer(r.uint16, ClassDef),
  47681. inputClassDef: new r.Pointer(r.uint16, ClassDef),
  47682. lookaheadClassDef: new r.Pointer(r.uint16, ClassDef),
  47683. chainCount: r.uint16,
  47684. chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')
  47685. },
  47686. 3: {
  47687. // Coverage-based chaining context
  47688. backtrackGlyphCount: r.uint16,
  47689. backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),
  47690. inputGlyphCount: r.uint16,
  47691. inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'),
  47692. lookaheadGlyphCount: r.uint16,
  47693. lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),
  47694. lookupCount: r.uint16,
  47695. lookupRecords: new r.Array(LookupRecord, 'lookupCount')
  47696. }
  47697. });
  47698. /*******************
  47699. * Variation Store *
  47700. *******************/
  47701. var F2DOT14 = new r.Fixed(16, 'BE', 14);
  47702. var RegionAxisCoordinates = new r.Struct({
  47703. startCoord: F2DOT14,
  47704. peakCoord: F2DOT14,
  47705. endCoord: F2DOT14
  47706. });
  47707. var VariationRegionList = new r.Struct({
  47708. axisCount: r.uint16,
  47709. regionCount: r.uint16,
  47710. variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount')
  47711. });
  47712. var DeltaSet = new r.Struct({
  47713. shortDeltas: new r.Array(r.int16, function (t) {
  47714. return t.parent.shortDeltaCount;
  47715. }),
  47716. regionDeltas: new r.Array(r.int8, function (t) {
  47717. return t.parent.regionIndexCount - t.parent.shortDeltaCount;
  47718. }),
  47719. deltas: function deltas(t) {
  47720. return t.shortDeltas.concat(t.regionDeltas);
  47721. }
  47722. });
  47723. var ItemVariationData = new r.Struct({
  47724. itemCount: r.uint16,
  47725. shortDeltaCount: r.uint16,
  47726. regionIndexCount: r.uint16,
  47727. regionIndexes: new r.Array(r.uint16, 'regionIndexCount'),
  47728. deltaSets: new r.Array(DeltaSet, 'itemCount')
  47729. });
  47730. var ItemVariationStore = new r.Struct({
  47731. format: r.uint16,
  47732. variationRegionList: new r.Pointer(r.uint32, VariationRegionList),
  47733. variationDataCount: r.uint16,
  47734. itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount')
  47735. });
  47736. /**********************
  47737. * Feature Variations *
  47738. **********************/
  47739. var ConditionTable = new r.VersionedStruct(r.uint16, {
  47740. 1: (_ = {
  47741. axisIndex: r.uint16
  47742. }, _["axisIndex"] = r.uint16, _.filterRangeMinValue = F2DOT14, _.filterRangeMaxValue = F2DOT14, _)
  47743. });
  47744. var ConditionSet = new r.Struct({
  47745. conditionCount: r.uint16,
  47746. conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount')
  47747. });
  47748. var FeatureTableSubstitutionRecord = new r.Struct({
  47749. featureIndex: r.uint16,
  47750. alternateFeatureTable: new r.Pointer(r.uint32, Feature, {
  47751. type: 'parent'
  47752. })
  47753. });
  47754. var FeatureTableSubstitution = new r.Struct({
  47755. version: r.fixed32,
  47756. substitutionCount: r.uint16,
  47757. substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount')
  47758. });
  47759. var FeatureVariationRecord = new r.Struct({
  47760. conditionSet: new r.Pointer(r.uint32, ConditionSet, {
  47761. type: 'parent'
  47762. }),
  47763. featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {
  47764. type: 'parent'
  47765. })
  47766. });
  47767. var FeatureVariations = new r.Struct({
  47768. majorVersion: r.uint16,
  47769. minorVersion: r.uint16,
  47770. featureVariationRecordCount: r.uint32,
  47771. featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount')
  47772. }); // otherwise delegates to the provided type.
  47773. var PredefinedOp = /*#__PURE__*/function () {
  47774. function PredefinedOp(predefinedOps, type) {
  47775. this.predefinedOps = predefinedOps;
  47776. this.type = type;
  47777. }
  47778. var _proto5 = PredefinedOp.prototype;
  47779. _proto5.decode = function decode(stream, parent, operands) {
  47780. if (this.predefinedOps[operands[0]]) {
  47781. return this.predefinedOps[operands[0]];
  47782. }
  47783. return this.type.decode(stream, parent, operands);
  47784. };
  47785. _proto5.size = function size(value, ctx) {
  47786. return this.type.size(value, ctx);
  47787. };
  47788. _proto5.encode = function encode(stream, value, ctx) {
  47789. var index = this.predefinedOps.indexOf(value);
  47790. if (index !== -1) {
  47791. return index;
  47792. }
  47793. return this.type.encode(stream, value, ctx);
  47794. };
  47795. return PredefinedOp;
  47796. }();
  47797. var CFFEncodingVersion = /*#__PURE__*/function (_r$Number) {
  47798. _inheritsLoose(CFFEncodingVersion, _r$Number);
  47799. function CFFEncodingVersion() {
  47800. return _r$Number.call(this, 'UInt8') || this;
  47801. }
  47802. var _proto6 = CFFEncodingVersion.prototype;
  47803. _proto6.decode = function decode(stream) {
  47804. return r.uint8.decode(stream) & 0x7f;
  47805. };
  47806. return CFFEncodingVersion;
  47807. }(r.Number);
  47808. var Range1 = new r.Struct({
  47809. first: r.uint16,
  47810. nLeft: r.uint8
  47811. });
  47812. var Range2 = new r.Struct({
  47813. first: r.uint16,
  47814. nLeft: r.uint16
  47815. });
  47816. var CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), {
  47817. 0: {
  47818. nCodes: r.uint8,
  47819. codes: new r.Array(r.uint8, 'nCodes')
  47820. },
  47821. 1: {
  47822. nRanges: r.uint8,
  47823. ranges: new r.Array(Range1, 'nRanges')
  47824. } // TODO: supplement?
  47825. });
  47826. var CFFEncoding = new PredefinedOp([StandardEncoding, ExpertEncoding], new CFFPointer(CFFCustomEncoding, {
  47827. lazy: true
  47828. })); // Decodes an array of ranges until the total
  47829. // length is equal to the provided length.
  47830. var RangeArray = /*#__PURE__*/function (_r$Array) {
  47831. _inheritsLoose(RangeArray, _r$Array);
  47832. function RangeArray() {
  47833. return _r$Array.apply(this, arguments) || this;
  47834. }
  47835. var _proto7 = RangeArray.prototype;
  47836. _proto7.decode = function decode(stream, parent) {
  47837. var length = utils.resolveLength(this.length, stream, parent);
  47838. var count = 0;
  47839. var res = [];
  47840. while (count < length) {
  47841. var range = this.type.decode(stream, parent);
  47842. range.offset = count;
  47843. count += range.nLeft + 1;
  47844. res.push(range);
  47845. }
  47846. return res;
  47847. };
  47848. return RangeArray;
  47849. }(r.Array);
  47850. var CFFCustomCharset = new r.VersionedStruct(r.uint8, {
  47851. 0: {
  47852. glyphs: new r.Array(r.uint16, function (t) {
  47853. return t.parent.CharStrings.length - 1;
  47854. })
  47855. },
  47856. 1: {
  47857. ranges: new RangeArray(Range1, function (t) {
  47858. return t.parent.CharStrings.length - 1;
  47859. })
  47860. },
  47861. 2: {
  47862. ranges: new RangeArray(Range2, function (t) {
  47863. return t.parent.CharStrings.length - 1;
  47864. })
  47865. }
  47866. });
  47867. var CFFCharset = new PredefinedOp([ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset], new CFFPointer(CFFCustomCharset, {
  47868. lazy: true
  47869. }));
  47870. var FDRange3 = new r.Struct({
  47871. first: r.uint16,
  47872. fd: r.uint8
  47873. });
  47874. var FDRange4 = new r.Struct({
  47875. first: r.uint32,
  47876. fd: r.uint16
  47877. });
  47878. var FDSelect = new r.VersionedStruct(r.uint8, {
  47879. 0: {
  47880. fds: new r.Array(r.uint8, function (t) {
  47881. return t.parent.CharStrings.length;
  47882. })
  47883. },
  47884. 3: {
  47885. nRanges: r.uint16,
  47886. ranges: new r.Array(FDRange3, 'nRanges'),
  47887. sentinel: r.uint16
  47888. },
  47889. 4: {
  47890. nRanges: r.uint32,
  47891. ranges: new r.Array(FDRange4, 'nRanges'),
  47892. sentinel: r.uint32
  47893. }
  47894. });
  47895. var ptr = new CFFPointer(CFFPrivateDict);
  47896. var CFFPrivateOp = /*#__PURE__*/function () {
  47897. function CFFPrivateOp() {}
  47898. var _proto8 = CFFPrivateOp.prototype;
  47899. _proto8.decode = function decode(stream, parent, operands) {
  47900. parent.length = operands[0];
  47901. return ptr.decode(stream, parent, [operands[1]]);
  47902. };
  47903. _proto8.size = function size(dict, ctx) {
  47904. return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]];
  47905. };
  47906. _proto8.encode = function encode(stream, dict, ctx) {
  47907. return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]];
  47908. };
  47909. return CFFPrivateOp;
  47910. }();
  47911. var FontDict = new CFFDict([// key name type(s) default
  47912. [18, 'Private', new CFFPrivateOp(), null], [[12, 38], 'FontName', 'sid', null], [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], [[12, 5], 'PaintType', 'number', 0]]);
  47913. var CFFTopDict = new CFFDict([// key name type(s) default
  47914. [[12, 30], 'ROS', ['sid', 'sid', 'number'], null], [0, 'version', 'sid', null], [1, 'Notice', 'sid', null], [[12, 0], 'Copyright', 'sid', null], [2, 'FullName', 'sid', null], [3, 'FamilyName', 'sid', null], [4, 'Weight', 'sid', null], [[12, 1], 'isFixedPitch', 'boolean', false], [[12, 2], 'ItalicAngle', 'number', 0], [[12, 3], 'UnderlinePosition', 'number', -100], [[12, 4], 'UnderlineThickness', 'number', 50], [[12, 5], 'PaintType', 'number', 0], [[12, 6], 'CharstringType', 'number', 2], [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], [13, 'UniqueID', 'number', null], [5, 'FontBBox', 'array', [0, 0, 0, 0]], [[12, 8], 'StrokeWidth', 'number', 0], [14, 'XUID', 'array', null], [15, 'charset', CFFCharset, ISOAdobeCharset], [16, 'Encoding', CFFEncoding, StandardEncoding], [17, 'CharStrings', new CFFPointer(new CFFIndex()), null], [18, 'Private', new CFFPrivateOp(), null], [[12, 20], 'SyntheticBase', 'number', null], [[12, 21], 'PostScript', 'sid', null], [[12, 22], 'BaseFontName', 'sid', null], [[12, 23], 'BaseFontBlend', 'delta', null], // CID font specific
  47915. [[12, 31], 'CIDFontVersion', 'number', 0], [[12, 32], 'CIDFontRevision', 'number', 0], [[12, 33], 'CIDFontType', 'number', 0], [[12, 34], 'CIDCount', 'number', 8720], [[12, 35], 'UIDBase', 'number', null], [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null], [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null], [[12, 38], 'FontName', 'sid', null]]);
  47916. var VariationStore = new r.Struct({
  47917. length: r.uint16,
  47918. itemVariationStore: ItemVariationStore
  47919. });
  47920. var CFF2TopDict = new CFFDict([[[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], [17, 'CharStrings', new CFFPointer(new CFFIndex()), null], [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null], [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null], [24, 'vstore', new CFFPointer(VariationStore), null], [25, 'maxstack', 'number', 193]]);
  47921. var CFFTop = new r.VersionedStruct(r.fixed16, {
  47922. 1: {
  47923. hdrSize: r.uint8,
  47924. offSize: r.uint8,
  47925. nameIndex: new CFFIndex(new r.String('length')),
  47926. topDictIndex: new CFFIndex(CFFTopDict),
  47927. stringIndex: new CFFIndex(new r.String('length')),
  47928. globalSubrIndex: new CFFIndex()
  47929. },
  47930. 2: {
  47931. hdrSize: r.uint8,
  47932. length: r.uint16,
  47933. topDict: CFF2TopDict,
  47934. globalSubrIndex: new CFFIndex()
  47935. }
  47936. });
  47937. var CFFFont = /*#__PURE__*/function () {
  47938. function CFFFont(stream) {
  47939. this.stream = stream;
  47940. this.decode();
  47941. }
  47942. CFFFont.decode = function decode(stream) {
  47943. return new CFFFont(stream);
  47944. };
  47945. var _proto9 = CFFFont.prototype;
  47946. _proto9.decode = function decode() {
  47947. var start = this.stream.pos;
  47948. var top = CFFTop.decode(this.stream);
  47949. for (var key in top) {
  47950. var val = top[key];
  47951. this[key] = val;
  47952. }
  47953. if (this.version < 2) {
  47954. if (this.topDictIndex.length !== 1) {
  47955. throw new Error("Only a single font is allowed in CFF");
  47956. }
  47957. this.topDict = this.topDictIndex[0];
  47958. }
  47959. this.isCIDFont = this.topDict.ROS != null;
  47960. return this;
  47961. };
  47962. _proto9.string = function string(sid) {
  47963. if (this.version >= 2) {
  47964. return null;
  47965. }
  47966. if (sid < standardStrings.length) {
  47967. return standardStrings[sid];
  47968. }
  47969. return this.stringIndex[sid - standardStrings.length];
  47970. };
  47971. _proto9.getCharString = function getCharString(glyph) {
  47972. this.stream.pos = this.topDict.CharStrings[glyph].offset;
  47973. return this.stream.readBuffer(this.topDict.CharStrings[glyph].length);
  47974. };
  47975. _proto9.getGlyphName = function getGlyphName(gid) {
  47976. // CFF2 glyph names are in the post table.
  47977. if (this.version >= 2) {
  47978. return null;
  47979. } // CID-keyed fonts don't have glyph names
  47980. if (this.isCIDFont) {
  47981. return null;
  47982. }
  47983. var charset = this.topDict.charset;
  47984. if (Array.isArray(charset)) {
  47985. return charset[gid];
  47986. }
  47987. if (gid === 0) {
  47988. return '.notdef';
  47989. }
  47990. gid -= 1;
  47991. switch (charset.version) {
  47992. case 0:
  47993. return this.string(charset.glyphs[gid]);
  47994. case 1:
  47995. case 2:
  47996. for (var i = 0; i < charset.ranges.length; i++) {
  47997. var range = charset.ranges[i];
  47998. if (range.offset <= gid && gid <= range.offset + range.nLeft) {
  47999. return this.string(range.first + (gid - range.offset));
  48000. }
  48001. }
  48002. break;
  48003. }
  48004. return null;
  48005. };
  48006. _proto9.fdForGlyph = function fdForGlyph(gid) {
  48007. if (!this.topDict.FDSelect) {
  48008. return null;
  48009. }
  48010. switch (this.topDict.FDSelect.version) {
  48011. case 0:
  48012. return this.topDict.FDSelect.fds[gid];
  48013. case 3:
  48014. case 4:
  48015. var ranges = this.topDict.FDSelect.ranges;
  48016. var low = 0;
  48017. var high = ranges.length - 1;
  48018. while (low <= high) {
  48019. var mid = low + high >> 1;
  48020. if (gid < ranges[mid].first) {
  48021. high = mid - 1;
  48022. } else if (mid < high && gid >= ranges[mid + 1].first) {
  48023. low = mid + 1;
  48024. } else {
  48025. return ranges[mid].fd;
  48026. }
  48027. }
  48028. default:
  48029. throw new Error("Unknown FDSelect version: ".concat(this.topDict.FDSelect.version));
  48030. }
  48031. };
  48032. _proto9.privateDictForGlyph = function privateDictForGlyph(gid) {
  48033. if (this.topDict.FDSelect) {
  48034. var fd = this.fdForGlyph(gid);
  48035. if (this.topDict.FDArray[fd]) {
  48036. return this.topDict.FDArray[fd].Private;
  48037. }
  48038. return null;
  48039. }
  48040. if (this.version < 2) {
  48041. return this.topDict.Private;
  48042. }
  48043. return this.topDict.FDArray[0].Private;
  48044. };
  48045. _createClass(CFFFont, [{
  48046. key: "postscriptName",
  48047. get: function get() {
  48048. if (this.version < 2) {
  48049. return this.nameIndex[0];
  48050. }
  48051. return null;
  48052. }
  48053. }, {
  48054. key: "fullName",
  48055. get: function get() {
  48056. return this.string(this.topDict.FullName);
  48057. }
  48058. }, {
  48059. key: "familyName",
  48060. get: function get() {
  48061. return this.string(this.topDict.FamilyName);
  48062. }
  48063. }]);
  48064. return CFFFont;
  48065. }();
  48066. var VerticalOrigin = new r.Struct({
  48067. glyphIndex: r.uint16,
  48068. vertOriginY: r.int16
  48069. });
  48070. var VORG = new r.Struct({
  48071. majorVersion: r.uint16,
  48072. minorVersion: r.uint16,
  48073. defaultVertOriginY: r.int16,
  48074. numVertOriginYMetrics: r.uint16,
  48075. metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics')
  48076. });
  48077. var BigMetrics = new r.Struct({
  48078. height: r.uint8,
  48079. width: r.uint8,
  48080. horiBearingX: r.int8,
  48081. horiBearingY: r.int8,
  48082. horiAdvance: r.uint8,
  48083. vertBearingX: r.int8,
  48084. vertBearingY: r.int8,
  48085. vertAdvance: r.uint8
  48086. });
  48087. var SmallMetrics = new r.Struct({
  48088. height: r.uint8,
  48089. width: r.uint8,
  48090. bearingX: r.int8,
  48091. bearingY: r.int8,
  48092. advance: r.uint8
  48093. });
  48094. var EBDTComponent = new r.Struct({
  48095. glyph: r.uint16,
  48096. xOffset: r.int8,
  48097. yOffset: r.int8
  48098. });
  48099. var ByteAligned = function ByteAligned() {};
  48100. var BitAligned = function BitAligned() {};
  48101. var glyph = new r.VersionedStruct('version', {
  48102. 1: {
  48103. metrics: SmallMetrics,
  48104. data: ByteAligned
  48105. },
  48106. 2: {
  48107. metrics: SmallMetrics,
  48108. data: BitAligned
  48109. },
  48110. // format 3 is deprecated
  48111. // format 4 is not supported by Microsoft
  48112. 5: {
  48113. data: BitAligned
  48114. },
  48115. 6: {
  48116. metrics: BigMetrics,
  48117. data: ByteAligned
  48118. },
  48119. 7: {
  48120. metrics: BigMetrics,
  48121. data: BitAligned
  48122. },
  48123. 8: {
  48124. metrics: SmallMetrics,
  48125. pad: new r.Reserved(r.uint8),
  48126. numComponents: r.uint16,
  48127. components: new r.Array(EBDTComponent, 'numComponents')
  48128. },
  48129. 9: {
  48130. metrics: BigMetrics,
  48131. pad: new r.Reserved(r.uint8),
  48132. numComponents: r.uint16,
  48133. components: new r.Array(EBDTComponent, 'numComponents')
  48134. },
  48135. 17: {
  48136. metrics: SmallMetrics,
  48137. dataLen: r.uint32,
  48138. data: new r.Buffer('dataLen')
  48139. },
  48140. 18: {
  48141. metrics: BigMetrics,
  48142. dataLen: r.uint32,
  48143. data: new r.Buffer('dataLen')
  48144. },
  48145. 19: {
  48146. dataLen: r.uint32,
  48147. data: new r.Buffer('dataLen')
  48148. }
  48149. });
  48150. var SBitLineMetrics = new r.Struct({
  48151. ascender: r.int8,
  48152. descender: r.int8,
  48153. widthMax: r.uint8,
  48154. caretSlopeNumerator: r.int8,
  48155. caretSlopeDenominator: r.int8,
  48156. caretOffset: r.int8,
  48157. minOriginSB: r.int8,
  48158. minAdvanceSB: r.int8,
  48159. maxBeforeBL: r.int8,
  48160. minAfterBL: r.int8,
  48161. pad: new r.Reserved(r.int8, 2)
  48162. });
  48163. var CodeOffsetPair = new r.Struct({
  48164. glyphCode: r.uint16,
  48165. offset: r.uint16
  48166. });
  48167. var IndexSubtable = new r.VersionedStruct(r.uint16, {
  48168. header: {
  48169. imageFormat: r.uint16,
  48170. imageDataOffset: r.uint32
  48171. },
  48172. 1: {
  48173. offsetArray: new r.Array(r.uint32, function (t) {
  48174. return t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1;
  48175. })
  48176. },
  48177. 2: {
  48178. imageSize: r.uint32,
  48179. bigMetrics: BigMetrics
  48180. },
  48181. 3: {
  48182. offsetArray: new r.Array(r.uint16, function (t) {
  48183. return t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1;
  48184. })
  48185. },
  48186. 4: {
  48187. numGlyphs: r.uint32,
  48188. glyphArray: new r.Array(CodeOffsetPair, function (t) {
  48189. return t.numGlyphs + 1;
  48190. })
  48191. },
  48192. 5: {
  48193. imageSize: r.uint32,
  48194. bigMetrics: BigMetrics,
  48195. numGlyphs: r.uint32,
  48196. glyphCodeArray: new r.Array(r.uint16, 'numGlyphs')
  48197. }
  48198. });
  48199. var IndexSubtableArray = new r.Struct({
  48200. firstGlyphIndex: r.uint16,
  48201. lastGlyphIndex: r.uint16,
  48202. subtable: new r.Pointer(r.uint32, IndexSubtable)
  48203. });
  48204. var BitmapSizeTable = new r.Struct({
  48205. indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), {
  48206. type: 'parent'
  48207. }),
  48208. indexTablesSize: r.uint32,
  48209. numberOfIndexSubTables: r.uint32,
  48210. colorRef: r.uint32,
  48211. hori: SBitLineMetrics,
  48212. vert: SBitLineMetrics,
  48213. startGlyphIndex: r.uint16,
  48214. endGlyphIndex: r.uint16,
  48215. ppemX: r.uint8,
  48216. ppemY: r.uint8,
  48217. bitDepth: r.uint8,
  48218. flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical'])
  48219. });
  48220. var EBLC = new r.Struct({
  48221. version: r.uint32,
  48222. // 0x00020000
  48223. numSizes: r.uint32,
  48224. sizes: new r.Array(BitmapSizeTable, 'numSizes')
  48225. });
  48226. var ImageTable = new r.Struct({
  48227. ppem: r.uint16,
  48228. resolution: r.uint16,
  48229. imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), function (t) {
  48230. return t.parent.parent.maxp.numGlyphs + 1;
  48231. })
  48232. }); // This is the Apple sbix table, used by the "Apple Color Emoji" font.
  48233. // It includes several image tables with images for each bitmap glyph
  48234. // of several different sizes.
  48235. var sbix = new r.Struct({
  48236. version: r.uint16,
  48237. flags: new r.Bitfield(r.uint16, ['renderOutlines']),
  48238. numImgTables: r.uint32,
  48239. imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables')
  48240. });
  48241. var LayerRecord = new r.Struct({
  48242. gid: r.uint16,
  48243. // Glyph ID of layer glyph (must be in z-order from bottom to top).
  48244. paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must
  48245. }); // be less than numPaletteEntries in the CPAL table, except for
  48246. // the special case noted below. Each palette entry is 16 bits.
  48247. // A palette index of 0xFFFF is a special case indicating that
  48248. // the text foreground color should be used.
  48249. var BaseGlyphRecord = new r.Struct({
  48250. gid: r.uint16,
  48251. // Glyph ID of reference glyph. This glyph is for reference only
  48252. // and is not rendered for color.
  48253. firstLayerIndex: r.uint16,
  48254. // Index (from beginning of the Layer Records) to the layer record.
  48255. // There will be numLayers consecutive entries for this base glyph.
  48256. numLayers: r.uint16
  48257. });
  48258. var COLR = new r.Struct({
  48259. version: r.uint16,
  48260. numBaseGlyphRecords: r.uint16,
  48261. baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')),
  48262. layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), {
  48263. lazy: true
  48264. }),
  48265. numLayerRecords: r.uint16
  48266. });
  48267. var ColorRecord = new r.Struct({
  48268. blue: r.uint8,
  48269. green: r.uint8,
  48270. red: r.uint8,
  48271. alpha: r.uint8
  48272. });
  48273. var CPAL = new r.VersionedStruct(r.uint16, {
  48274. header: {
  48275. numPaletteEntries: r.uint16,
  48276. numPalettes: r.uint16,
  48277. numColorRecords: r.uint16,
  48278. colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')),
  48279. colorRecordIndices: new r.Array(r.uint16, 'numPalettes')
  48280. },
  48281. 0: {},
  48282. 1: {
  48283. offsetPaletteTypeArray: new r.Pointer(r.uint32, new r.Array(r.uint32, 'numPalettes')),
  48284. offsetPaletteLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPalettes')),
  48285. offsetPaletteEntryLabelArray: new r.Pointer(r.uint32, new r.Array(r.uint16, 'numPaletteEntries'))
  48286. }
  48287. });
  48288. var BaseCoord = new r.VersionedStruct(r.uint16, {
  48289. 1: {
  48290. // Design units only
  48291. coordinate: r.int16 // X or Y value, in design units
  48292. },
  48293. 2: {
  48294. // Design units plus contour point
  48295. coordinate: r.int16,
  48296. // X or Y value, in design units
  48297. referenceGlyph: r.uint16,
  48298. // GlyphID of control glyph
  48299. baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph
  48300. },
  48301. 3: {
  48302. // Design units plus Device table
  48303. coordinate: r.int16,
  48304. // X or Y value, in design units
  48305. deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value
  48306. }
  48307. });
  48308. var BaseValues = new r.Struct({
  48309. defaultIndex: r.uint16,
  48310. // Index of default baseline for this script-same index in the BaseTagList
  48311. baseCoordCount: r.uint16,
  48312. baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount')
  48313. });
  48314. var FeatMinMaxRecord = new r.Struct({
  48315. tag: new r.String(4),
  48316. // 4-byte feature identification tag-must match FeatureTag in FeatureList
  48317. minCoord: new r.Pointer(r.uint16, BaseCoord, {
  48318. type: 'parent'
  48319. }),
  48320. // May be NULL
  48321. maxCoord: new r.Pointer(r.uint16, BaseCoord, {
  48322. type: 'parent'
  48323. }) // May be NULL
  48324. });
  48325. var MinMax = new r.Struct({
  48326. minCoord: new r.Pointer(r.uint16, BaseCoord),
  48327. // May be NULL
  48328. maxCoord: new r.Pointer(r.uint16, BaseCoord),
  48329. // May be NULL
  48330. featMinMaxCount: r.uint16,
  48331. // May be 0
  48332. featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order
  48333. });
  48334. var BaseLangSysRecord = new r.Struct({
  48335. tag: new r.String(4),
  48336. // 4-byte language system identification tag
  48337. minMax: new r.Pointer(r.uint16, MinMax, {
  48338. type: 'parent'
  48339. })
  48340. });
  48341. var BaseScript = new r.Struct({
  48342. baseValues: new r.Pointer(r.uint16, BaseValues),
  48343. // May be NULL
  48344. defaultMinMax: new r.Pointer(r.uint16, MinMax),
  48345. // May be NULL
  48346. baseLangSysCount: r.uint16,
  48347. // May be 0
  48348. baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag
  48349. });
  48350. var BaseScriptRecord = new r.Struct({
  48351. tag: new r.String(4),
  48352. // 4-byte script identification tag
  48353. script: new r.Pointer(r.uint16, BaseScript, {
  48354. type: 'parent'
  48355. })
  48356. });
  48357. var BaseScriptList = new r.Array(BaseScriptRecord, r.uint16); // Array of 4-byte baseline identification tags-must be in alphabetical order
  48358. var BaseTagList = new r.Array(new r.String(4), r.uint16);
  48359. var Axis = new r.Struct({
  48360. baseTagList: new r.Pointer(r.uint16, BaseTagList),
  48361. // May be NULL
  48362. baseScriptList: new r.Pointer(r.uint16, BaseScriptList)
  48363. });
  48364. var BASE = new r.VersionedStruct(r.uint32, {
  48365. header: {
  48366. horizAxis: new r.Pointer(r.uint16, Axis),
  48367. // May be NULL
  48368. vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL
  48369. },
  48370. 0x00010000: {},
  48371. 0x00010001: {
  48372. itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)
  48373. }
  48374. });
  48375. var AttachPoint = new r.Array(r.uint16, r.uint16);
  48376. var AttachList = new r.Struct({
  48377. coverage: new r.Pointer(r.uint16, Coverage),
  48378. glyphCount: r.uint16,
  48379. attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount')
  48380. });
  48381. var CaretValue = new r.VersionedStruct(r.uint16, {
  48382. 1: {
  48383. // Design units only
  48384. coordinate: r.int16
  48385. },
  48386. 2: {
  48387. // Contour point
  48388. caretValuePoint: r.uint16
  48389. },
  48390. 3: {
  48391. // Design units plus Device table
  48392. coordinate: r.int16,
  48393. deviceTable: new r.Pointer(r.uint16, Device)
  48394. }
  48395. });
  48396. var LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16);
  48397. var LigCaretList = new r.Struct({
  48398. coverage: new r.Pointer(r.uint16, Coverage),
  48399. ligGlyphCount: r.uint16,
  48400. ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount')
  48401. });
  48402. var MarkGlyphSetsDef = new r.Struct({
  48403. markSetTableFormat: r.uint16,
  48404. markSetCount: r.uint16,
  48405. coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount')
  48406. });
  48407. var GDEF = new r.VersionedStruct(r.uint32, {
  48408. header: {
  48409. glyphClassDef: new r.Pointer(r.uint16, ClassDef),
  48410. attachList: new r.Pointer(r.uint16, AttachList),
  48411. ligCaretList: new r.Pointer(r.uint16, LigCaretList),
  48412. markAttachClassDef: new r.Pointer(r.uint16, ClassDef)
  48413. },
  48414. 0x00010000: {},
  48415. 0x00010002: {
  48416. markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef)
  48417. },
  48418. 0x00010003: {
  48419. markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef),
  48420. itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)
  48421. }
  48422. });
  48423. var ValueFormat = new r.Bitfield(r.uint16, ['xPlacement', 'yPlacement', 'xAdvance', 'yAdvance', 'xPlaDevice', 'yPlaDevice', 'xAdvDevice', 'yAdvDevice']);
  48424. var types = {
  48425. xPlacement: r.int16,
  48426. yPlacement: r.int16,
  48427. xAdvance: r.int16,
  48428. yAdvance: r.int16,
  48429. xPlaDevice: new r.Pointer(r.uint16, Device, {
  48430. type: 'global',
  48431. relativeTo: function relativeTo(ctx) {
  48432. return ctx.rel;
  48433. }
  48434. }),
  48435. yPlaDevice: new r.Pointer(r.uint16, Device, {
  48436. type: 'global',
  48437. relativeTo: function relativeTo(ctx) {
  48438. return ctx.rel;
  48439. }
  48440. }),
  48441. xAdvDevice: new r.Pointer(r.uint16, Device, {
  48442. type: 'global',
  48443. relativeTo: function relativeTo(ctx) {
  48444. return ctx.rel;
  48445. }
  48446. }),
  48447. yAdvDevice: new r.Pointer(r.uint16, Device, {
  48448. type: 'global',
  48449. relativeTo: function relativeTo(ctx) {
  48450. return ctx.rel;
  48451. }
  48452. })
  48453. };
  48454. var ValueRecord = /*#__PURE__*/function () {
  48455. function ValueRecord(key) {
  48456. if (key === void 0) {
  48457. key = 'valueFormat';
  48458. }
  48459. this.key = key;
  48460. }
  48461. var _proto10 = ValueRecord.prototype;
  48462. _proto10.buildStruct = function buildStruct(parent) {
  48463. var struct = parent;
  48464. while (!struct[this.key] && struct.parent) {
  48465. struct = struct.parent;
  48466. }
  48467. if (!struct[this.key]) return;
  48468. var fields = {};
  48469. fields.rel = function () {
  48470. return struct._startOffset;
  48471. };
  48472. var format = struct[this.key];
  48473. for (var key in format) {
  48474. if (format[key]) {
  48475. fields[key] = types[key];
  48476. }
  48477. }
  48478. return new r.Struct(fields);
  48479. };
  48480. _proto10.size = function size(val, ctx) {
  48481. return this.buildStruct(ctx).size(val, ctx);
  48482. };
  48483. _proto10.decode = function decode(stream, parent) {
  48484. var res = this.buildStruct(parent).decode(stream, parent);
  48485. delete res.rel;
  48486. return res;
  48487. };
  48488. return ValueRecord;
  48489. }();
  48490. var PairValueRecord = new r.Struct({
  48491. secondGlyph: r.uint16,
  48492. value1: new ValueRecord('valueFormat1'),
  48493. value2: new ValueRecord('valueFormat2')
  48494. });
  48495. var PairSet = new r.Array(PairValueRecord, r.uint16);
  48496. var Class2Record = new r.Struct({
  48497. value1: new ValueRecord('valueFormat1'),
  48498. value2: new ValueRecord('valueFormat2')
  48499. });
  48500. var Anchor = new r.VersionedStruct(r.uint16, {
  48501. 1: {
  48502. // Design units only
  48503. xCoordinate: r.int16,
  48504. yCoordinate: r.int16
  48505. },
  48506. 2: {
  48507. // Design units plus contour point
  48508. xCoordinate: r.int16,
  48509. yCoordinate: r.int16,
  48510. anchorPoint: r.uint16
  48511. },
  48512. 3: {
  48513. // Design units plus Device tables
  48514. xCoordinate: r.int16,
  48515. yCoordinate: r.int16,
  48516. xDeviceTable: new r.Pointer(r.uint16, Device),
  48517. yDeviceTable: new r.Pointer(r.uint16, Device)
  48518. }
  48519. });
  48520. var EntryExitRecord = new r.Struct({
  48521. entryAnchor: new r.Pointer(r.uint16, Anchor, {
  48522. type: 'parent'
  48523. }),
  48524. exitAnchor: new r.Pointer(r.uint16, Anchor, {
  48525. type: 'parent'
  48526. })
  48527. });
  48528. var MarkRecord = new r.Struct({
  48529. class: r.uint16,
  48530. markAnchor: new r.Pointer(r.uint16, Anchor, {
  48531. type: 'parent'
  48532. })
  48533. });
  48534. var MarkArray = new r.Array(MarkRecord, r.uint16);
  48535. var BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), function (t) {
  48536. return t.parent.classCount;
  48537. });
  48538. var BaseArray = new r.Array(BaseRecord, r.uint16);
  48539. var ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), function (t) {
  48540. return t.parent.parent.classCount;
  48541. });
  48542. var LigatureAttach = new r.Array(ComponentRecord, r.uint16);
  48543. var LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16);
  48544. var GPOSLookup = new r.VersionedStruct('lookupType', {
  48545. 1: new r.VersionedStruct(r.uint16, {
  48546. // Single Adjustment
  48547. 1: {
  48548. // Single positioning value
  48549. coverage: new r.Pointer(r.uint16, Coverage),
  48550. valueFormat: ValueFormat,
  48551. value: new ValueRecord()
  48552. },
  48553. 2: {
  48554. coverage: new r.Pointer(r.uint16, Coverage),
  48555. valueFormat: ValueFormat,
  48556. valueCount: r.uint16,
  48557. values: new r.LazyArray(new ValueRecord(), 'valueCount')
  48558. }
  48559. }),
  48560. 2: new r.VersionedStruct(r.uint16, {
  48561. // Pair Adjustment Positioning
  48562. 1: {
  48563. // Adjustments for glyph pairs
  48564. coverage: new r.Pointer(r.uint16, Coverage),
  48565. valueFormat1: ValueFormat,
  48566. valueFormat2: ValueFormat,
  48567. pairSetCount: r.uint16,
  48568. pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount')
  48569. },
  48570. 2: {
  48571. // Class pair adjustment
  48572. coverage: new r.Pointer(r.uint16, Coverage),
  48573. valueFormat1: ValueFormat,
  48574. valueFormat2: ValueFormat,
  48575. classDef1: new r.Pointer(r.uint16, ClassDef),
  48576. classDef2: new r.Pointer(r.uint16, ClassDef),
  48577. class1Count: r.uint16,
  48578. class2Count: r.uint16,
  48579. classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count')
  48580. }
  48581. }),
  48582. 3: {
  48583. // Cursive Attachment Positioning
  48584. format: r.uint16,
  48585. coverage: new r.Pointer(r.uint16, Coverage),
  48586. entryExitCount: r.uint16,
  48587. entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount')
  48588. },
  48589. 4: {
  48590. // MarkToBase Attachment Positioning
  48591. format: r.uint16,
  48592. markCoverage: new r.Pointer(r.uint16, Coverage),
  48593. baseCoverage: new r.Pointer(r.uint16, Coverage),
  48594. classCount: r.uint16,
  48595. markArray: new r.Pointer(r.uint16, MarkArray),
  48596. baseArray: new r.Pointer(r.uint16, BaseArray)
  48597. },
  48598. 5: {
  48599. // MarkToLigature Attachment Positioning
  48600. format: r.uint16,
  48601. markCoverage: new r.Pointer(r.uint16, Coverage),
  48602. ligatureCoverage: new r.Pointer(r.uint16, Coverage),
  48603. classCount: r.uint16,
  48604. markArray: new r.Pointer(r.uint16, MarkArray),
  48605. ligatureArray: new r.Pointer(r.uint16, LigatureArray)
  48606. },
  48607. 6: {
  48608. // MarkToMark Attachment Positioning
  48609. format: r.uint16,
  48610. mark1Coverage: new r.Pointer(r.uint16, Coverage),
  48611. mark2Coverage: new r.Pointer(r.uint16, Coverage),
  48612. classCount: r.uint16,
  48613. mark1Array: new r.Pointer(r.uint16, MarkArray),
  48614. mark2Array: new r.Pointer(r.uint16, BaseArray)
  48615. },
  48616. 7: Context,
  48617. // Contextual positioning
  48618. 8: ChainingContext,
  48619. // Chaining contextual positioning
  48620. 9: {
  48621. // Extension Positioning
  48622. posFormat: r.uint16,
  48623. lookupType: r.uint16,
  48624. // cannot also be 9
  48625. extension: new r.Pointer(r.uint32, GPOSLookup)
  48626. }
  48627. }); // Fix circular reference
  48628. GPOSLookup.versions[9].extension.type = GPOSLookup;
  48629. var GPOS = new r.VersionedStruct(r.uint32, {
  48630. header: {
  48631. scriptList: new r.Pointer(r.uint16, ScriptList),
  48632. featureList: new r.Pointer(r.uint16, FeatureList),
  48633. lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup))
  48634. },
  48635. 0x00010000: {},
  48636. 0x00010001: {
  48637. featureVariations: new r.Pointer(r.uint32, FeatureVariations)
  48638. }
  48639. }); // export GPOSLookup for JSTF table
  48640. var Sequence = new r.Array(r.uint16, r.uint16);
  48641. var AlternateSet = Sequence;
  48642. var Ligature = new r.Struct({
  48643. glyph: r.uint16,
  48644. compCount: r.uint16,
  48645. components: new r.Array(r.uint16, function (t) {
  48646. return t.compCount - 1;
  48647. })
  48648. });
  48649. var LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16);
  48650. var GSUBLookup = new r.VersionedStruct('lookupType', {
  48651. 1: new r.VersionedStruct(r.uint16, {
  48652. // Single Substitution
  48653. 1: {
  48654. coverage: new r.Pointer(r.uint16, Coverage),
  48655. deltaGlyphID: r.int16
  48656. },
  48657. 2: {
  48658. coverage: new r.Pointer(r.uint16, Coverage),
  48659. glyphCount: r.uint16,
  48660. substitute: new r.LazyArray(r.uint16, 'glyphCount')
  48661. }
  48662. }),
  48663. 2: {
  48664. // Multiple Substitution
  48665. substFormat: r.uint16,
  48666. coverage: new r.Pointer(r.uint16, Coverage),
  48667. count: r.uint16,
  48668. sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count')
  48669. },
  48670. 3: {
  48671. // Alternate Substitution
  48672. substFormat: r.uint16,
  48673. coverage: new r.Pointer(r.uint16, Coverage),
  48674. count: r.uint16,
  48675. alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count')
  48676. },
  48677. 4: {
  48678. // Ligature Substitution
  48679. substFormat: r.uint16,
  48680. coverage: new r.Pointer(r.uint16, Coverage),
  48681. count: r.uint16,
  48682. ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count')
  48683. },
  48684. 5: Context,
  48685. // Contextual Substitution
  48686. 6: ChainingContext,
  48687. // Chaining Contextual Substitution
  48688. 7: {
  48689. // Extension Substitution
  48690. substFormat: r.uint16,
  48691. lookupType: r.uint16,
  48692. // cannot also be 7
  48693. extension: new r.Pointer(r.uint32, GSUBLookup)
  48694. },
  48695. 8: {
  48696. // Reverse Chaining Contextual Single Substitution
  48697. substFormat: r.uint16,
  48698. coverage: new r.Pointer(r.uint16, Coverage),
  48699. backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),
  48700. lookaheadGlyphCount: r.uint16,
  48701. lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),
  48702. glyphCount: r.uint16,
  48703. substitutes: new r.Array(r.uint16, 'glyphCount')
  48704. }
  48705. }); // Fix circular reference
  48706. GSUBLookup.versions[7].extension.type = GSUBLookup;
  48707. var GSUB = new r.VersionedStruct(r.uint32, {
  48708. header: {
  48709. scriptList: new r.Pointer(r.uint16, ScriptList),
  48710. featureList: new r.Pointer(r.uint16, FeatureList),
  48711. lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup))
  48712. },
  48713. 0x00010000: {},
  48714. 0x00010001: {
  48715. featureVariations: new r.Pointer(r.uint32, FeatureVariations)
  48716. }
  48717. });
  48718. var JstfGSUBModList = new r.Array(r.uint16, r.uint16);
  48719. var JstfPriority = new r.Struct({
  48720. shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),
  48721. shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),
  48722. shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),
  48723. shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),
  48724. shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)),
  48725. extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),
  48726. extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),
  48727. extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),
  48728. extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),
  48729. extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup))
  48730. });
  48731. var JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16);
  48732. var JstfLangSysRecord = new r.Struct({
  48733. tag: new r.String(4),
  48734. jstfLangSys: new r.Pointer(r.uint16, JstfLangSys)
  48735. });
  48736. var JstfScript = new r.Struct({
  48737. extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)),
  48738. // array of glyphs to extend line length
  48739. defaultLangSys: new r.Pointer(r.uint16, JstfLangSys),
  48740. langSysCount: r.uint16,
  48741. langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount')
  48742. });
  48743. var JstfScriptRecord = new r.Struct({
  48744. tag: new r.String(4),
  48745. script: new r.Pointer(r.uint16, JstfScript, {
  48746. type: 'parent'
  48747. })
  48748. });
  48749. var JSTF = new r.Struct({
  48750. version: r.uint32,
  48751. // should be 0x00010000
  48752. scriptCount: r.uint16,
  48753. scriptList: new r.Array(JstfScriptRecord, 'scriptCount')
  48754. });
  48755. var VariableSizeNumber = /*#__PURE__*/function () {
  48756. function VariableSizeNumber(size) {
  48757. this._size = size;
  48758. }
  48759. var _proto11 = VariableSizeNumber.prototype;
  48760. _proto11.decode = function decode(stream, parent) {
  48761. switch (this.size(0, parent)) {
  48762. case 1:
  48763. return stream.readUInt8();
  48764. case 2:
  48765. return stream.readUInt16BE();
  48766. case 3:
  48767. return stream.readUInt24BE();
  48768. case 4:
  48769. return stream.readUInt32BE();
  48770. }
  48771. };
  48772. _proto11.size = function size(val, parent) {
  48773. return utils.resolveLength(this._size, null, parent);
  48774. };
  48775. return VariableSizeNumber;
  48776. }();
  48777. var MapDataEntry = new r.Struct({
  48778. entry: new VariableSizeNumber(function (t) {
  48779. return ((t.parent.entryFormat & 0x0030) >> 4) + 1;
  48780. }),
  48781. outerIndex: function outerIndex(t) {
  48782. return t.entry >> (t.parent.entryFormat & 0x000F) + 1;
  48783. },
  48784. innerIndex: function innerIndex(t) {
  48785. return t.entry & (1 << (t.parent.entryFormat & 0x000F) + 1) - 1;
  48786. }
  48787. });
  48788. var DeltaSetIndexMap = new r.Struct({
  48789. entryFormat: r.uint16,
  48790. mapCount: r.uint16,
  48791. mapData: new r.Array(MapDataEntry, 'mapCount')
  48792. });
  48793. var HVAR = new r.Struct({
  48794. majorVersion: r.uint16,
  48795. minorVersion: r.uint16,
  48796. itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore),
  48797. advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),
  48798. LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),
  48799. RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap)
  48800. });
  48801. var Signature = new r.Struct({
  48802. format: r.uint32,
  48803. length: r.uint32,
  48804. offset: r.uint32
  48805. });
  48806. var SignatureBlock = new r.Struct({
  48807. reserved: new r.Reserved(r.uint16, 2),
  48808. cbSignature: r.uint32,
  48809. // Length (in bytes) of the PKCS#7 packet in pbSignature
  48810. signature: new r.Buffer('cbSignature')
  48811. });
  48812. var DSIG = new r.Struct({
  48813. ulVersion: r.uint32,
  48814. // Version number of the DSIG table (0x00000001)
  48815. usNumSigs: r.uint16,
  48816. // Number of signatures in the table
  48817. usFlag: r.uint16,
  48818. // Permission flags
  48819. signatures: new r.Array(Signature, 'usNumSigs'),
  48820. signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs')
  48821. });
  48822. var GaspRange = new r.Struct({
  48823. rangeMaxPPEM: r.uint16,
  48824. // Upper limit of range, in ppem
  48825. rangeGaspBehavior: new r.Bitfield(r.uint16, [// Flags describing desired rasterizer behavior
  48826. 'grayscale', 'gridfit', 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType
  48827. ])
  48828. });
  48829. var gasp = new r.Struct({
  48830. version: r.uint16,
  48831. // set to 0
  48832. numRanges: r.uint16,
  48833. gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem
  48834. });
  48835. var DeviceRecord = new r.Struct({
  48836. pixelSize: r.uint8,
  48837. maximumWidth: r.uint8,
  48838. widths: new r.Array(r.uint8, function (t) {
  48839. return t.parent.parent.maxp.numGlyphs;
  48840. })
  48841. }); // The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes
  48842. var hdmx = new r.Struct({
  48843. version: r.uint16,
  48844. numRecords: r.int16,
  48845. sizeDeviceRecord: r.int32,
  48846. records: new r.Array(DeviceRecord, 'numRecords')
  48847. });
  48848. var KernPair = new r.Struct({
  48849. left: r.uint16,
  48850. right: r.uint16,
  48851. value: r.int16
  48852. });
  48853. var ClassTable = new r.Struct({
  48854. firstGlyph: r.uint16,
  48855. nGlyphs: r.uint16,
  48856. offsets: new r.Array(r.uint16, 'nGlyphs'),
  48857. max: function max(t) {
  48858. return t.offsets.length && Math.max.apply(Math, t.offsets);
  48859. }
  48860. });
  48861. var Kern2Array = new r.Struct({
  48862. off: function off(t) {
  48863. return t._startOffset - t.parent.parent._startOffset;
  48864. },
  48865. len: function len(t) {
  48866. return ((t.parent.leftTable.max - t.off) / t.parent.rowWidth + 1) * (t.parent.rowWidth / 2);
  48867. },
  48868. values: new r.LazyArray(r.int16, 'len')
  48869. });
  48870. var KernSubtable = new r.VersionedStruct('format', {
  48871. 0: {
  48872. nPairs: r.uint16,
  48873. searchRange: r.uint16,
  48874. entrySelector: r.uint16,
  48875. rangeShift: r.uint16,
  48876. pairs: new r.Array(KernPair, 'nPairs')
  48877. },
  48878. 2: {
  48879. rowWidth: r.uint16,
  48880. leftTable: new r.Pointer(r.uint16, ClassTable, {
  48881. type: 'parent'
  48882. }),
  48883. rightTable: new r.Pointer(r.uint16, ClassTable, {
  48884. type: 'parent'
  48885. }),
  48886. array: new r.Pointer(r.uint16, Kern2Array, {
  48887. type: 'parent'
  48888. })
  48889. },
  48890. 3: {
  48891. glyphCount: r.uint16,
  48892. kernValueCount: r.uint8,
  48893. leftClassCount: r.uint8,
  48894. rightClassCount: r.uint8,
  48895. flags: r.uint8,
  48896. kernValue: new r.Array(r.int16, 'kernValueCount'),
  48897. leftClass: new r.Array(r.uint8, 'glyphCount'),
  48898. rightClass: new r.Array(r.uint8, 'glyphCount'),
  48899. kernIndex: new r.Array(r.uint8, function (t) {
  48900. return t.leftClassCount * t.rightClassCount;
  48901. })
  48902. }
  48903. });
  48904. var KernTable = new r.VersionedStruct('version', {
  48905. 0: {
  48906. // Microsoft uses this format
  48907. subVersion: r.uint16,
  48908. // Microsoft has an extra sub-table version number
  48909. length: r.uint16,
  48910. // Length of the subtable, in bytes
  48911. format: r.uint8,
  48912. // Format of subtable
  48913. coverage: new r.Bitfield(r.uint8, ['horizontal', // 1 if table has horizontal data, 0 if vertical
  48914. 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values.
  48915. 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text
  48916. 'override' // If set to 1 the value in this table replaces the accumulated value
  48917. ]),
  48918. subtable: KernSubtable,
  48919. padding: new r.Reserved(r.uint8, function (t) {
  48920. return t.length - t._currentOffset;
  48921. })
  48922. },
  48923. 1: {
  48924. // Apple uses this format
  48925. length: r.uint32,
  48926. coverage: new r.Bitfield(r.uint8, [null, null, null, null, null, 'variation', // Set if table has variation kerning values
  48927. 'crossStream', // Set if table has cross-stream kerning values
  48928. 'vertical' // Set if table has vertical kerning values
  48929. ]),
  48930. format: r.uint8,
  48931. tupleIndex: r.uint16,
  48932. subtable: KernSubtable,
  48933. padding: new r.Reserved(r.uint8, function (t) {
  48934. return t.length - t._currentOffset;
  48935. })
  48936. }
  48937. });
  48938. var kern = new r.VersionedStruct(r.uint16, {
  48939. 0: {
  48940. // Microsoft Version
  48941. nTables: r.uint16,
  48942. tables: new r.Array(KernTable, 'nTables')
  48943. },
  48944. 1: {
  48945. // Apple Version
  48946. reserved: new r.Reserved(r.uint16),
  48947. // the other half of the version number
  48948. nTables: r.uint32,
  48949. tables: new r.Array(KernTable, 'nTables')
  48950. }
  48951. }); // Records the ppem for each glyph at which the scaling becomes linear again,
  48952. // despite instructions effecting the advance width
  48953. var LTSH = new r.Struct({
  48954. version: r.uint16,
  48955. numGlyphs: r.uint16,
  48956. yPels: new r.Array(r.uint8, 'numGlyphs')
  48957. }); // NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines
  48958. var PCLT = new r.Struct({
  48959. version: r.uint16,
  48960. fontNumber: r.uint32,
  48961. pitch: r.uint16,
  48962. xHeight: r.uint16,
  48963. style: r.uint16,
  48964. typeFamily: r.uint16,
  48965. capHeight: r.uint16,
  48966. symbolSet: r.uint16,
  48967. typeface: new r.String(16),
  48968. characterComplement: new r.String(8),
  48969. fileName: new r.String(6),
  48970. strokeWeight: new r.String(1),
  48971. widthType: new r.String(1),
  48972. serifStyle: r.uint8,
  48973. reserved: new r.Reserved(r.uint8)
  48974. }); // sizes. This is needed in order to match font metrics on Windows.
  48975. var Ratio = new r.Struct({
  48976. bCharSet: r.uint8,
  48977. // Character set
  48978. xRatio: r.uint8,
  48979. // Value to use for x-Ratio
  48980. yStartRatio: r.uint8,
  48981. // Starting y-Ratio value
  48982. yEndRatio: r.uint8 // Ending y-Ratio value
  48983. });
  48984. var vTable = new r.Struct({
  48985. yPelHeight: r.uint16,
  48986. // yPelHeight to which values apply
  48987. yMax: r.int16,
  48988. // Maximum value (in pels) for this yPelHeight
  48989. yMin: r.int16 // Minimum value (in pels) for this yPelHeight
  48990. });
  48991. var VdmxGroup = new r.Struct({
  48992. recs: r.uint16,
  48993. // Number of height records in this group
  48994. startsz: r.uint8,
  48995. // Starting yPelHeight
  48996. endsz: r.uint8,
  48997. // Ending yPelHeight
  48998. entries: new r.Array(vTable, 'recs') // The VDMX records
  48999. });
  49000. var VDMX = new r.Struct({
  49001. version: r.uint16,
  49002. // Version number (0 or 1)
  49003. numRecs: r.uint16,
  49004. // Number of VDMX groups present
  49005. numRatios: r.uint16,
  49006. // Number of aspect ratio groupings
  49007. ratioRanges: new r.Array(Ratio, 'numRatios'),
  49008. // Ratio ranges
  49009. offsets: new r.Array(r.uint16, 'numRatios'),
  49010. // Offset to the VDMX group for this ratio range
  49011. groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings
  49012. });
  49013. var vhea = new r.Struct({
  49014. version: r.uint16,
  49015. // Version number of the Vertical Header Table
  49016. ascent: r.int16,
  49017. // The vertical typographic ascender for this font
  49018. descent: r.int16,
  49019. // The vertical typographic descender for this font
  49020. lineGap: r.int16,
  49021. // The vertical typographic line gap for this font
  49022. advanceHeightMax: r.int16,
  49023. // The maximum advance height measurement found in the font
  49024. minTopSideBearing: r.int16,
  49025. // The minimum top side bearing measurement found in the font
  49026. minBottomSideBearing: r.int16,
  49027. // The minimum bottom side bearing measurement found in the font
  49028. yMaxExtent: r.int16,
  49029. caretSlopeRise: r.int16,
  49030. // Caret slope (rise/run)
  49031. caretSlopeRun: r.int16,
  49032. caretOffset: r.int16,
  49033. // Set value equal to 0 for nonslanted fonts
  49034. reserved: new r.Reserved(r.int16, 4),
  49035. metricDataFormat: r.int16,
  49036. // Set to 0
  49037. numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table
  49038. });
  49039. var VmtxEntry = new r.Struct({
  49040. advance: r.uint16,
  49041. // The advance height of the glyph
  49042. bearing: r.int16 // The top sidebearing of the glyph
  49043. }); // Vertical Metrics Table
  49044. var vmtx = new r.Struct({
  49045. metrics: new r.LazyArray(VmtxEntry, function (t) {
  49046. return t.parent.vhea.numberOfMetrics;
  49047. }),
  49048. bearings: new r.LazyArray(r.int16, function (t) {
  49049. return t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics;
  49050. })
  49051. });
  49052. var shortFrac = new r.Fixed(16, 'BE', 14);
  49053. var Correspondence = new r.Struct({
  49054. fromCoord: shortFrac,
  49055. toCoord: shortFrac
  49056. });
  49057. var Segment = new r.Struct({
  49058. pairCount: r.uint16,
  49059. correspondence: new r.Array(Correspondence, 'pairCount')
  49060. });
  49061. var avar = new r.Struct({
  49062. version: r.fixed32,
  49063. axisCount: r.uint32,
  49064. segment: new r.Array(Segment, 'axisCount')
  49065. });
  49066. var UnboundedArrayAccessor = /*#__PURE__*/function () {
  49067. function UnboundedArrayAccessor(type, stream, parent) {
  49068. this.type = type;
  49069. this.stream = stream;
  49070. this.parent = parent;
  49071. this.base = this.stream.pos;
  49072. this._items = [];
  49073. }
  49074. var _proto12 = UnboundedArrayAccessor.prototype;
  49075. _proto12.getItem = function getItem(index) {
  49076. if (this._items[index] == null) {
  49077. var pos = this.stream.pos;
  49078. this.stream.pos = this.base + this.type.size(null, this.parent) * index;
  49079. this._items[index] = this.type.decode(this.stream, this.parent);
  49080. this.stream.pos = pos;
  49081. }
  49082. return this._items[index];
  49083. };
  49084. _proto12.inspect = function inspect() {
  49085. return "[UnboundedArray ".concat(this.type.constructor.name, "]");
  49086. };
  49087. return UnboundedArrayAccessor;
  49088. }();
  49089. var UnboundedArray = /*#__PURE__*/function (_r$Array2) {
  49090. _inheritsLoose(UnboundedArray, _r$Array2);
  49091. function UnboundedArray(type) {
  49092. return _r$Array2.call(this, type, 0) || this;
  49093. }
  49094. var _proto13 = UnboundedArray.prototype;
  49095. _proto13.decode = function decode(stream, parent) {
  49096. return new UnboundedArrayAccessor(this.type, stream, parent);
  49097. };
  49098. return UnboundedArray;
  49099. }(r.Array);
  49100. var LookupTable = function LookupTable(ValueType) {
  49101. if (ValueType === void 0) {
  49102. ValueType = r.uint16;
  49103. }
  49104. // Helper class that makes internal structures invisible to pointers
  49105. var Shadow = /*#__PURE__*/function () {
  49106. function Shadow(type) {
  49107. this.type = type;
  49108. }
  49109. var _proto14 = Shadow.prototype;
  49110. _proto14.decode = function decode(stream, ctx) {
  49111. ctx = ctx.parent.parent;
  49112. return this.type.decode(stream, ctx);
  49113. };
  49114. _proto14.size = function size(val, ctx) {
  49115. ctx = ctx.parent.parent;
  49116. return this.type.size(val, ctx);
  49117. };
  49118. _proto14.encode = function encode(stream, val, ctx) {
  49119. ctx = ctx.parent.parent;
  49120. return this.type.encode(stream, val, ctx);
  49121. };
  49122. return Shadow;
  49123. }();
  49124. ValueType = new Shadow(ValueType);
  49125. var BinarySearchHeader = new r.Struct({
  49126. unitSize: r.uint16,
  49127. nUnits: r.uint16,
  49128. searchRange: r.uint16,
  49129. entrySelector: r.uint16,
  49130. rangeShift: r.uint16
  49131. });
  49132. var LookupSegmentSingle = new r.Struct({
  49133. lastGlyph: r.uint16,
  49134. firstGlyph: r.uint16,
  49135. value: ValueType
  49136. });
  49137. var LookupSegmentArray = new r.Struct({
  49138. lastGlyph: r.uint16,
  49139. firstGlyph: r.uint16,
  49140. values: new r.Pointer(r.uint16, new r.Array(ValueType, function (t) {
  49141. return t.lastGlyph - t.firstGlyph + 1;
  49142. }), {
  49143. type: 'parent'
  49144. })
  49145. });
  49146. var LookupSingle = new r.Struct({
  49147. glyph: r.uint16,
  49148. value: ValueType
  49149. });
  49150. return new r.VersionedStruct(r.uint16, {
  49151. 0: {
  49152. values: new UnboundedArray(ValueType) // length == number of glyphs maybe?
  49153. },
  49154. 2: {
  49155. binarySearchHeader: BinarySearchHeader,
  49156. segments: new r.Array(LookupSegmentSingle, function (t) {
  49157. return t.binarySearchHeader.nUnits;
  49158. })
  49159. },
  49160. 4: {
  49161. binarySearchHeader: BinarySearchHeader,
  49162. segments: new r.Array(LookupSegmentArray, function (t) {
  49163. return t.binarySearchHeader.nUnits;
  49164. })
  49165. },
  49166. 6: {
  49167. binarySearchHeader: BinarySearchHeader,
  49168. segments: new r.Array(LookupSingle, function (t) {
  49169. return t.binarySearchHeader.nUnits;
  49170. })
  49171. },
  49172. 8: {
  49173. firstGlyph: r.uint16,
  49174. count: r.uint16,
  49175. values: new r.Array(ValueType, 'count')
  49176. }
  49177. });
  49178. };
  49179. function StateTable(entryData, lookupType) {
  49180. if (entryData === void 0) {
  49181. entryData = {};
  49182. }
  49183. if (lookupType === void 0) {
  49184. lookupType = r.uint16;
  49185. }
  49186. var entry = Object.assign({
  49187. newState: r.uint16,
  49188. flags: r.uint16
  49189. }, entryData);
  49190. var Entry = new r.Struct(entry);
  49191. var StateArray = new UnboundedArray(new r.Array(r.uint16, function (t) {
  49192. return t.nClasses;
  49193. }));
  49194. var StateHeader = new r.Struct({
  49195. nClasses: r.uint32,
  49196. classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)),
  49197. stateArray: new r.Pointer(r.uint32, StateArray),
  49198. entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry))
  49199. });
  49200. return StateHeader;
  49201. } // This is the old version of the StateTable structure
  49202. function StateTable1(entryData, lookupType) {
  49203. if (entryData === void 0) {
  49204. entryData = {};
  49205. }
  49206. if (lookupType === void 0) {
  49207. lookupType = r.uint16;
  49208. }
  49209. var ClassLookupTable = new r.Struct({
  49210. version: function version() {
  49211. return 8;
  49212. },
  49213. // simulate LookupTable
  49214. firstGlyph: r.uint16,
  49215. values: new r.Array(r.uint8, r.uint16)
  49216. });
  49217. var entry = Object.assign({
  49218. newStateOffset: r.uint16,
  49219. // convert offset to stateArray index
  49220. newState: function newState(t) {
  49221. return (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses;
  49222. },
  49223. flags: r.uint16
  49224. }, entryData);
  49225. var Entry = new r.Struct(entry);
  49226. var StateArray = new UnboundedArray(new r.Array(r.uint8, function (t) {
  49227. return t.nClasses;
  49228. }));
  49229. var StateHeader1 = new r.Struct({
  49230. nClasses: r.uint16,
  49231. classTable: new r.Pointer(r.uint16, ClassLookupTable),
  49232. stateArray: new r.Pointer(r.uint16, StateArray),
  49233. entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry))
  49234. });
  49235. return StateHeader1;
  49236. }
  49237. var BslnSubtable = new r.VersionedStruct('format', {
  49238. 0: {
  49239. // Distance-based, no mapping
  49240. deltas: new r.Array(r.int16, 32)
  49241. },
  49242. 1: {
  49243. // Distance-based, with mapping
  49244. deltas: new r.Array(r.int16, 32),
  49245. mappingData: new LookupTable(r.uint16)
  49246. },
  49247. 2: {
  49248. // Control point-based, no mapping
  49249. standardGlyph: r.uint16,
  49250. controlPoints: new r.Array(r.uint16, 32)
  49251. },
  49252. 3: {
  49253. // Control point-based, with mapping
  49254. standardGlyph: r.uint16,
  49255. controlPoints: new r.Array(r.uint16, 32),
  49256. mappingData: new LookupTable(r.uint16)
  49257. }
  49258. });
  49259. var bsln = new r.Struct({
  49260. version: r.fixed32,
  49261. format: r.uint16,
  49262. defaultBaseline: r.uint16,
  49263. subtable: BslnSubtable
  49264. });
  49265. var Setting = new r.Struct({
  49266. setting: r.uint16,
  49267. nameIndex: r.int16,
  49268. name: function name(t) {
  49269. return t.parent.parent.parent.name.records.fontFeatures[t.nameIndex];
  49270. }
  49271. });
  49272. var FeatureName = new r.Struct({
  49273. feature: r.uint16,
  49274. nSettings: r.uint16,
  49275. settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), {
  49276. type: 'parent'
  49277. }),
  49278. featureFlags: new r.Bitfield(r.uint8, [null, null, null, null, null, null, 'hasDefault', 'exclusive']),
  49279. defaultSetting: r.uint8,
  49280. nameIndex: r.int16,
  49281. name: function name(t) {
  49282. return t.parent.parent.name.records.fontFeatures[t.nameIndex];
  49283. }
  49284. });
  49285. var feat = new r.Struct({
  49286. version: r.fixed32,
  49287. featureNameCount: r.uint16,
  49288. reserved1: new r.Reserved(r.uint16),
  49289. reserved2: new r.Reserved(r.uint32),
  49290. featureNames: new r.Array(FeatureName, 'featureNameCount')
  49291. });
  49292. var Axis$1 = new r.Struct({
  49293. axisTag: new r.String(4),
  49294. minValue: r.fixed32,
  49295. defaultValue: r.fixed32,
  49296. maxValue: r.fixed32,
  49297. flags: r.uint16,
  49298. nameID: r.uint16,
  49299. name: function name(t) {
  49300. return t.parent.parent.name.records.fontFeatures[t.nameID];
  49301. }
  49302. });
  49303. var Instance = new r.Struct({
  49304. nameID: r.uint16,
  49305. name: function name(t) {
  49306. return t.parent.parent.name.records.fontFeatures[t.nameID];
  49307. },
  49308. flags: r.uint16,
  49309. coord: new r.Array(r.fixed32, function (t) {
  49310. return t.parent.axisCount;
  49311. }),
  49312. postscriptNameID: new r.Optional(r.uint16, function (t) {
  49313. return t.parent.instanceSize - t._currentOffset > 0;
  49314. })
  49315. });
  49316. var fvar = new r.Struct({
  49317. version: r.fixed32,
  49318. offsetToData: r.uint16,
  49319. countSizePairs: r.uint16,
  49320. axisCount: r.uint16,
  49321. axisSize: r.uint16,
  49322. instanceCount: r.uint16,
  49323. instanceSize: r.uint16,
  49324. axis: new r.Array(Axis$1, 'axisCount'),
  49325. instance: new r.Array(Instance, 'instanceCount')
  49326. });
  49327. var shortFrac$1 = new r.Fixed(16, 'BE', 14);
  49328. var Offset = /*#__PURE__*/function () {
  49329. function Offset() {}
  49330. Offset.decode = function decode(stream, parent) {
  49331. // In short format, offsets are multiplied by 2.
  49332. // This doesn't seem to be documented by Apple, but it
  49333. // is implemented this way in Freetype.
  49334. return parent.flags ? stream.readUInt32BE() : stream.readUInt16BE() * 2;
  49335. };
  49336. return Offset;
  49337. }();
  49338. var gvar = new r.Struct({
  49339. version: r.uint16,
  49340. reserved: new r.Reserved(r.uint16),
  49341. axisCount: r.uint16,
  49342. globalCoordCount: r.uint16,
  49343. globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac$1, 'axisCount'), 'globalCoordCount')),
  49344. glyphCount: r.uint16,
  49345. flags: r.uint16,
  49346. offsetToData: r.uint32,
  49347. offsets: new r.Array(new r.Pointer(Offset, 'void', {
  49348. relativeTo: function relativeTo(ctx) {
  49349. return ctx.offsetToData;
  49350. },
  49351. allowNull: false
  49352. }), function (t) {
  49353. return t.glyphCount + 1;
  49354. })
  49355. });
  49356. var ClassTable$1 = new r.Struct({
  49357. length: r.uint16,
  49358. coverage: r.uint16,
  49359. subFeatureFlags: r.uint32,
  49360. stateTable: new StateTable1()
  49361. });
  49362. var WidthDeltaRecord = new r.Struct({
  49363. justClass: r.uint32,
  49364. beforeGrowLimit: r.fixed32,
  49365. beforeShrinkLimit: r.fixed32,
  49366. afterGrowLimit: r.fixed32,
  49367. afterShrinkLimit: r.fixed32,
  49368. growFlags: r.uint16,
  49369. shrinkFlags: r.uint16
  49370. });
  49371. var WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32);
  49372. var ActionData = new r.VersionedStruct('actionType', {
  49373. 0: {
  49374. // Decomposition action
  49375. lowerLimit: r.fixed32,
  49376. upperLimit: r.fixed32,
  49377. order: r.uint16,
  49378. glyphs: new r.Array(r.uint16, r.uint16)
  49379. },
  49380. 1: {
  49381. // Unconditional add glyph action
  49382. addGlyph: r.uint16
  49383. },
  49384. 2: {
  49385. // Conditional add glyph action
  49386. substThreshold: r.fixed32,
  49387. addGlyph: r.uint16,
  49388. substGlyph: r.uint16
  49389. },
  49390. 3: {},
  49391. // Stretch glyph action (no data, not supported by CoreText)
  49392. 4: {
  49393. // Ductile glyph action (not supported by CoreText)
  49394. variationAxis: r.uint32,
  49395. minimumLimit: r.fixed32,
  49396. noStretchValue: r.fixed32,
  49397. maximumLimit: r.fixed32
  49398. },
  49399. 5: {
  49400. // Repeated add glyph action
  49401. flags: r.uint16,
  49402. glyph: r.uint16
  49403. }
  49404. });
  49405. var Action = new r.Struct({
  49406. actionClass: r.uint16,
  49407. actionType: r.uint16,
  49408. actionLength: r.uint32,
  49409. actionData: ActionData,
  49410. padding: new r.Reserved(r.uint8, function (t) {
  49411. return t.actionLength - t._currentOffset;
  49412. })
  49413. });
  49414. var PostcompensationAction = new r.Array(Action, r.uint32);
  49415. var PostCompensationTable = new r.Struct({
  49416. lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction))
  49417. });
  49418. var JustificationTable = new r.Struct({
  49419. classTable: new r.Pointer(r.uint16, ClassTable$1, {
  49420. type: 'parent'
  49421. }),
  49422. wdcOffset: r.uint16,
  49423. postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, {
  49424. type: 'parent'
  49425. }),
  49426. widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, {
  49427. type: 'parent',
  49428. relativeTo: function relativeTo(ctx) {
  49429. return ctx.wdcOffset;
  49430. }
  49431. }))
  49432. });
  49433. var just = new r.Struct({
  49434. version: r.uint32,
  49435. format: r.uint16,
  49436. horizontal: new r.Pointer(r.uint16, JustificationTable),
  49437. vertical: new r.Pointer(r.uint16, JustificationTable)
  49438. });
  49439. var LigatureData = {
  49440. action: r.uint16
  49441. };
  49442. var ContextualData = {
  49443. markIndex: r.uint16,
  49444. currentIndex: r.uint16
  49445. };
  49446. var InsertionData = {
  49447. currentInsertIndex: r.uint16,
  49448. markedInsertIndex: r.uint16
  49449. };
  49450. var SubstitutionTable = new r.Struct({
  49451. items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable()))
  49452. });
  49453. var SubtableData = new r.VersionedStruct('type', {
  49454. 0: {
  49455. // Indic Rearrangement Subtable
  49456. stateTable: new StateTable()
  49457. },
  49458. 1: {
  49459. // Contextual Glyph Substitution Subtable
  49460. stateTable: new StateTable(ContextualData),
  49461. substitutionTable: new r.Pointer(r.uint32, SubstitutionTable)
  49462. },
  49463. 2: {
  49464. // Ligature subtable
  49465. stateTable: new StateTable(LigatureData),
  49466. ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)),
  49467. components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)),
  49468. ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))
  49469. },
  49470. 4: {
  49471. // Non-contextual Glyph Substitution Subtable
  49472. lookupTable: new LookupTable()
  49473. },
  49474. 5: {
  49475. // Glyph Insertion Subtable
  49476. stateTable: new StateTable(InsertionData),
  49477. insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))
  49478. }
  49479. });
  49480. var Subtable = new r.Struct({
  49481. length: r.uint32,
  49482. coverage: r.uint24,
  49483. type: r.uint8,
  49484. subFeatureFlags: r.uint32,
  49485. table: SubtableData,
  49486. padding: new r.Reserved(r.uint8, function (t) {
  49487. return t.length - t._currentOffset;
  49488. })
  49489. });
  49490. var FeatureEntry = new r.Struct({
  49491. featureType: r.uint16,
  49492. featureSetting: r.uint16,
  49493. enableFlags: r.uint32,
  49494. disableFlags: r.uint32
  49495. });
  49496. var MorxChain = new r.Struct({
  49497. defaultFlags: r.uint32,
  49498. chainLength: r.uint32,
  49499. nFeatureEntries: r.uint32,
  49500. nSubtables: r.uint32,
  49501. features: new r.Array(FeatureEntry, 'nFeatureEntries'),
  49502. subtables: new r.Array(Subtable, 'nSubtables')
  49503. });
  49504. var morx = new r.Struct({
  49505. version: r.uint16,
  49506. unused: new r.Reserved(r.uint16),
  49507. nChains: r.uint32,
  49508. chains: new r.Array(MorxChain, 'nChains')
  49509. });
  49510. var OpticalBounds = new r.Struct({
  49511. left: r.int16,
  49512. top: r.int16,
  49513. right: r.int16,
  49514. bottom: r.int16
  49515. });
  49516. var opbd = new r.Struct({
  49517. version: r.fixed32,
  49518. format: r.uint16,
  49519. lookupTable: new LookupTable(OpticalBounds)
  49520. });
  49521. var tables = {};
  49522. tables.cmap = cmap;
  49523. tables.head = head;
  49524. tables.hhea = hhea;
  49525. tables.hmtx = hmtx;
  49526. tables.maxp = maxp;
  49527. tables.name = NameTable;
  49528. tables['OS/2'] = OS2;
  49529. tables.post = post; // TrueType Outlines
  49530. tables.fpgm = fpgm;
  49531. tables.loca = loca;
  49532. tables.prep = prep;
  49533. tables['cvt '] = cvt;
  49534. tables.glyf = glyf; // PostScript Outlines
  49535. tables['CFF '] = CFFFont;
  49536. tables['CFF2'] = CFFFont;
  49537. tables.VORG = VORG; // Bitmap Glyphs
  49538. tables.EBLC = EBLC;
  49539. tables.CBLC = tables.EBLC;
  49540. tables.sbix = sbix;
  49541. tables.COLR = COLR;
  49542. tables.CPAL = CPAL; // Advanced OpenType Tables
  49543. tables.BASE = BASE;
  49544. tables.GDEF = GDEF;
  49545. tables.GPOS = GPOS;
  49546. tables.GSUB = GSUB;
  49547. tables.JSTF = JSTF; // OpenType variations tables
  49548. tables.HVAR = HVAR; // Other OpenType Tables
  49549. tables.DSIG = DSIG;
  49550. tables.gasp = gasp;
  49551. tables.hdmx = hdmx;
  49552. tables.kern = kern;
  49553. tables.LTSH = LTSH;
  49554. tables.PCLT = PCLT;
  49555. tables.VDMX = VDMX;
  49556. tables.vhea = vhea;
  49557. tables.vmtx = vmtx; // Apple Advanced Typography Tables
  49558. tables.avar = avar;
  49559. tables.bsln = bsln;
  49560. tables.feat = feat;
  49561. tables.fvar = fvar;
  49562. tables.gvar = gvar;
  49563. tables.just = just;
  49564. tables.morx = morx;
  49565. tables.opbd = opbd;
  49566. var TableEntry = new r.Struct({
  49567. tag: new r.String(4),
  49568. checkSum: r.uint32,
  49569. offset: new r.Pointer(r.uint32, 'void', {
  49570. type: 'global'
  49571. }),
  49572. length: r.uint32
  49573. });
  49574. var Directory = new r.Struct({
  49575. tag: new r.String(4),
  49576. numTables: r.uint16,
  49577. searchRange: r.uint16,
  49578. entrySelector: r.uint16,
  49579. rangeShift: r.uint16,
  49580. tables: new r.Array(TableEntry, 'numTables')
  49581. });
  49582. Directory.process = function () {
  49583. var tables = {};
  49584. for (var _iterator9 = _createForOfIteratorHelperLoose(this.tables), _step9; !(_step9 = _iterator9()).done;) {
  49585. var table = _step9.value;
  49586. tables[table.tag] = table;
  49587. }
  49588. this.tables = tables;
  49589. };
  49590. Directory.preEncode = function (stream) {
  49591. var tables$1 = [];
  49592. for (var tag in this.tables) {
  49593. var table = this.tables[tag];
  49594. if (table) {
  49595. tables$1.push({
  49596. tag: tag,
  49597. checkSum: 0,
  49598. offset: new r.VoidPointer(tables[tag], table),
  49599. length: tables[tag].size(table)
  49600. });
  49601. }
  49602. }
  49603. this.tag = 'true';
  49604. this.numTables = tables$1.length;
  49605. this.tables = tables$1;
  49606. var maxExponentFor2 = Math.floor(Math.log(this.numTables) / Math.LN2);
  49607. var maxPowerOf2 = Math.pow(2, maxExponentFor2);
  49608. this.searchRange = maxPowerOf2 * 16;
  49609. this.entrySelector = Math.log(maxPowerOf2) / Math.LN2;
  49610. this.rangeShift = this.numTables * 16 - this.searchRange;
  49611. };
  49612. function binarySearch(arr, cmp) {
  49613. var min = 0;
  49614. var max = arr.length - 1;
  49615. while (min <= max) {
  49616. var mid = min + max >> 1;
  49617. var res = cmp(arr[mid]);
  49618. if (res < 0) {
  49619. max = mid - 1;
  49620. } else if (res > 0) {
  49621. min = mid + 1;
  49622. } else {
  49623. return mid;
  49624. }
  49625. }
  49626. return -1;
  49627. }
  49628. function range(index, end) {
  49629. var range = [];
  49630. while (index < end) {
  49631. range.push(index++);
  49632. }
  49633. return range;
  49634. }
  49635. var _class;
  49636. try {
  49637. var iconv = __webpack_require__(4914);
  49638. } catch (err) {}
  49639. var CmapProcessor = (_class = /*#__PURE__*/function () {
  49640. function CmapProcessor(cmapTable) {
  49641. // Attempt to find a Unicode cmap first
  49642. this.encoding = null;
  49643. this.cmap = this.findSubtable(cmapTable, [// 32-bit subtables
  49644. [3, 10], [0, 6], [0, 4], // 16-bit subtables
  49645. [3, 1], [0, 3], [0, 2], [0, 1], [0, 0]]); // If not unicode cmap was found, and iconv-lite is installed,
  49646. // take the first table with a supported encoding.
  49647. if (!this.cmap && iconv) {
  49648. for (var _iterator10 = _createForOfIteratorHelperLoose(cmapTable.tables), _step10; !(_step10 = _iterator10()).done;) {
  49649. var cmap = _step10.value;
  49650. var encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1);
  49651. if (iconv.encodingExists(encoding)) {
  49652. this.cmap = cmap.table;
  49653. this.encoding = encoding;
  49654. }
  49655. }
  49656. }
  49657. if (!this.cmap) {
  49658. throw new Error("Could not find a supported cmap table");
  49659. }
  49660. this.uvs = this.findSubtable(cmapTable, [[0, 5]]);
  49661. if (this.uvs && this.uvs.version !== 14) {
  49662. this.uvs = null;
  49663. }
  49664. }
  49665. var _proto15 = CmapProcessor.prototype;
  49666. _proto15.findSubtable = function findSubtable(cmapTable, pairs) {
  49667. for (var _iterator11 = _createForOfIteratorHelperLoose(pairs), _step11; !(_step11 = _iterator11()).done;) {
  49668. var _step11$value = _step11.value,
  49669. platformID = _step11$value[0],
  49670. encodingID = _step11$value[1];
  49671. for (var _iterator12 = _createForOfIteratorHelperLoose(cmapTable.tables), _step12; !(_step12 = _iterator12()).done;) {
  49672. var cmap = _step12.value;
  49673. if (cmap.platformID === platformID && cmap.encodingID === encodingID) {
  49674. return cmap.table;
  49675. }
  49676. }
  49677. }
  49678. return null;
  49679. };
  49680. _proto15.lookup = function lookup(codepoint, variationSelector) {
  49681. // If there is no Unicode cmap in this font, we need to re-encode
  49682. // the codepoint in the encoding that the cmap supports.
  49683. if (this.encoding) {
  49684. var buf = iconv.encode(String.fromCodePoint(codepoint), this.encoding);
  49685. codepoint = 0;
  49686. for (var i = 0; i < buf.length; i++) {
  49687. codepoint = codepoint << 8 | buf[i];
  49688. } // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided.
  49689. } else if (variationSelector) {
  49690. var gid = this.getVariationSelector(codepoint, variationSelector);
  49691. if (gid) {
  49692. return gid;
  49693. }
  49694. }
  49695. var cmap = this.cmap;
  49696. switch (cmap.version) {
  49697. case 0:
  49698. return cmap.codeMap.get(codepoint) || 0;
  49699. case 4:
  49700. {
  49701. var min = 0;
  49702. var max = cmap.segCount - 1;
  49703. while (min <= max) {
  49704. var mid = min + max >> 1;
  49705. if (codepoint < cmap.startCode.get(mid)) {
  49706. max = mid - 1;
  49707. } else if (codepoint > cmap.endCode.get(mid)) {
  49708. min = mid + 1;
  49709. } else {
  49710. var rangeOffset = cmap.idRangeOffset.get(mid);
  49711. var _gid = void 0;
  49712. if (rangeOffset === 0) {
  49713. _gid = codepoint + cmap.idDelta.get(mid);
  49714. } else {
  49715. var index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid);
  49716. _gid = cmap.glyphIndexArray.get(index) || 0;
  49717. if (_gid !== 0) {
  49718. _gid += cmap.idDelta.get(mid);
  49719. }
  49720. }
  49721. return _gid & 0xffff;
  49722. }
  49723. }
  49724. return 0;
  49725. }
  49726. case 8:
  49727. throw new Error('TODO: cmap format 8');
  49728. case 6:
  49729. case 10:
  49730. return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0;
  49731. case 12:
  49732. case 13:
  49733. {
  49734. var _min = 0;
  49735. var _max = cmap.nGroups - 1;
  49736. while (_min <= _max) {
  49737. var _mid = _min + _max >> 1;
  49738. var group = cmap.groups.get(_mid);
  49739. if (codepoint < group.startCharCode) {
  49740. _max = _mid - 1;
  49741. } else if (codepoint > group.endCharCode) {
  49742. _min = _mid + 1;
  49743. } else {
  49744. if (cmap.version === 12) {
  49745. return group.glyphID + (codepoint - group.startCharCode);
  49746. } else {
  49747. return group.glyphID;
  49748. }
  49749. }
  49750. }
  49751. return 0;
  49752. }
  49753. case 14:
  49754. throw new Error('TODO: cmap format 14');
  49755. default:
  49756. throw new Error("Unknown cmap format ".concat(cmap.version));
  49757. }
  49758. };
  49759. _proto15.getVariationSelector = function getVariationSelector(codepoint, variationSelector) {
  49760. if (!this.uvs) {
  49761. return 0;
  49762. }
  49763. var selectors = this.uvs.varSelectors.toArray();
  49764. var i = binarySearch(selectors, function (x) {
  49765. return variationSelector - x.varSelector;
  49766. });
  49767. var sel = selectors[i];
  49768. if (i !== -1 && sel.defaultUVS) {
  49769. i = binarySearch(sel.defaultUVS, function (x) {
  49770. return codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0;
  49771. });
  49772. }
  49773. if (i !== -1 && sel.nonDefaultUVS) {
  49774. i = binarySearch(sel.nonDefaultUVS, function (x) {
  49775. return codepoint - x.unicodeValue;
  49776. });
  49777. if (i !== -1) {
  49778. return sel.nonDefaultUVS[i].glyphID;
  49779. }
  49780. }
  49781. return 0;
  49782. };
  49783. _proto15.getCharacterSet = function getCharacterSet() {
  49784. var cmap = this.cmap;
  49785. switch (cmap.version) {
  49786. case 0:
  49787. return range(0, cmap.codeMap.length);
  49788. case 4:
  49789. {
  49790. var res = [];
  49791. var endCodes = cmap.endCode.toArray();
  49792. for (var i = 0; i < endCodes.length; i++) {
  49793. var tail = endCodes[i] + 1;
  49794. var start = cmap.startCode.get(i);
  49795. res.push.apply(res, range(start, tail));
  49796. }
  49797. return res;
  49798. }
  49799. case 8:
  49800. throw new Error('TODO: cmap format 8');
  49801. case 6:
  49802. case 10:
  49803. return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length);
  49804. case 12:
  49805. case 13:
  49806. {
  49807. var _res = [];
  49808. for (var _iterator13 = _createForOfIteratorHelperLoose(cmap.groups.toArray()), _step13; !(_step13 = _iterator13()).done;) {
  49809. var group = _step13.value;
  49810. _res.push.apply(_res, range(group.startCharCode, group.endCharCode + 1));
  49811. }
  49812. return _res;
  49813. }
  49814. case 14:
  49815. throw new Error('TODO: cmap format 14');
  49816. default:
  49817. throw new Error("Unknown cmap format ".concat(cmap.version));
  49818. }
  49819. };
  49820. _proto15.codePointsForGlyph = function codePointsForGlyph(gid) {
  49821. var cmap = this.cmap;
  49822. switch (cmap.version) {
  49823. case 0:
  49824. {
  49825. var res = [];
  49826. for (var i = 0; i < 256; i++) {
  49827. if (cmap.codeMap.get(i) === gid) {
  49828. res.push(i);
  49829. }
  49830. }
  49831. return res;
  49832. }
  49833. case 4:
  49834. {
  49835. var _res2 = [];
  49836. for (var _i = 0; _i < cmap.segCount; _i++) {
  49837. var end = cmap.endCode.get(_i);
  49838. var start = cmap.startCode.get(_i);
  49839. var rangeOffset = cmap.idRangeOffset.get(_i);
  49840. var delta = cmap.idDelta.get(_i);
  49841. for (var c = start; c <= end; c++) {
  49842. var g = 0;
  49843. if (rangeOffset === 0) {
  49844. g = c + delta;
  49845. } else {
  49846. var index = rangeOffset / 2 + (c - start) - (cmap.segCount - _i);
  49847. g = cmap.glyphIndexArray.get(index) || 0;
  49848. if (g !== 0) {
  49849. g += delta;
  49850. }
  49851. }
  49852. if (g === gid) {
  49853. _res2.push(c);
  49854. }
  49855. }
  49856. }
  49857. return _res2;
  49858. }
  49859. case 12:
  49860. {
  49861. var _res3 = [];
  49862. for (var _iterator14 = _createForOfIteratorHelperLoose(cmap.groups.toArray()), _step14; !(_step14 = _iterator14()).done;) {
  49863. var group = _step14.value;
  49864. if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) {
  49865. _res3.push(group.startCharCode + (gid - group.glyphID));
  49866. }
  49867. }
  49868. return _res3;
  49869. }
  49870. case 13:
  49871. {
  49872. var _res4 = [];
  49873. for (var _iterator15 = _createForOfIteratorHelperLoose(cmap.groups.toArray()), _step15; !(_step15 = _iterator15()).done;) {
  49874. var _group = _step15.value;
  49875. if (gid === _group.glyphID) {
  49876. _res4.push.apply(_res4, range(_group.startCharCode, _group.endCharCode + 1));
  49877. }
  49878. }
  49879. return _res4;
  49880. }
  49881. default:
  49882. throw new Error("Unknown cmap format ".concat(cmap.version));
  49883. }
  49884. };
  49885. return CmapProcessor;
  49886. }(), (_applyDecoratedDescriptor(_class.prototype, "getCharacterSet", [cache], Object.getOwnPropertyDescriptor(_class.prototype, "getCharacterSet"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "codePointsForGlyph", [cache], Object.getOwnPropertyDescriptor(_class.prototype, "codePointsForGlyph"), _class.prototype)), _class);
  49887. var KernProcessor = /*#__PURE__*/function () {
  49888. function KernProcessor(font) {
  49889. this.kern = font.kern;
  49890. }
  49891. var _proto16 = KernProcessor.prototype;
  49892. _proto16.process = function process(glyphs, positions) {
  49893. for (var glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) {
  49894. var left = glyphs[glyphIndex].id;
  49895. var right = glyphs[glyphIndex + 1].id;
  49896. positions[glyphIndex].xAdvance += this.getKerning(left, right);
  49897. }
  49898. };
  49899. _proto16.getKerning = function getKerning(left, right) {
  49900. var res = 0;
  49901. for (var _iterator16 = _createForOfIteratorHelperLoose(this.kern.tables), _step16; !(_step16 = _iterator16()).done;) {
  49902. var table = _step16.value;
  49903. if (table.coverage.crossStream) {
  49904. continue;
  49905. }
  49906. switch (table.version) {
  49907. case 0:
  49908. if (!table.coverage.horizontal) {
  49909. continue;
  49910. }
  49911. break;
  49912. case 1:
  49913. if (table.coverage.vertical || table.coverage.variation) {
  49914. continue;
  49915. }
  49916. break;
  49917. default:
  49918. throw new Error("Unsupported kerning table version ".concat(table.version));
  49919. }
  49920. var val = 0;
  49921. var s = table.subtable;
  49922. switch (table.format) {
  49923. case 0:
  49924. var pairIdx = binarySearch(s.pairs, function (pair) {
  49925. return left - pair.left || right - pair.right;
  49926. });
  49927. if (pairIdx >= 0) {
  49928. val = s.pairs[pairIdx].value;
  49929. }
  49930. break;
  49931. case 2:
  49932. var leftOffset = 0,
  49933. rightOffset = 0;
  49934. if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) {
  49935. leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph];
  49936. } else {
  49937. leftOffset = s.array.off;
  49938. }
  49939. if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) {
  49940. rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph];
  49941. }
  49942. var index = (leftOffset + rightOffset - s.array.off) / 2;
  49943. val = s.array.values.get(index);
  49944. break;
  49945. case 3:
  49946. if (left >= s.glyphCount || right >= s.glyphCount) {
  49947. return 0;
  49948. }
  49949. val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]];
  49950. break;
  49951. default:
  49952. throw new Error("Unsupported kerning sub-table format ".concat(table.format));
  49953. } // Microsoft supports the override flag, which resets the result
  49954. // Otherwise, the sum of the results from all subtables is returned
  49955. if (table.coverage.override) {
  49956. res = val;
  49957. } else {
  49958. res += val;
  49959. }
  49960. }
  49961. return res;
  49962. };
  49963. return KernProcessor;
  49964. }();
  49965. /**
  49966. * This class is used when GPOS does not define 'mark' or 'mkmk' features
  49967. * for positioning marks relative to base glyphs. It uses the unicode
  49968. * combining class property to position marks.
  49969. *
  49970. * Based on code from Harfbuzz, thanks!
  49971. * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc
  49972. */
  49973. var UnicodeLayoutEngine = /*#__PURE__*/function () {
  49974. function UnicodeLayoutEngine(font) {
  49975. this.font = font;
  49976. }
  49977. var _proto17 = UnicodeLayoutEngine.prototype;
  49978. _proto17.positionGlyphs = function positionGlyphs(glyphs, positions) {
  49979. // find each base + mark cluster, and position the marks relative to the base
  49980. var clusterStart = 0;
  49981. var clusterEnd = 0;
  49982. for (var index = 0; index < glyphs.length; index++) {
  49983. var glyph = glyphs[index];
  49984. if (glyph.isMark) {
  49985. // TODO: handle ligatures
  49986. clusterEnd = index;
  49987. } else {
  49988. if (clusterStart !== clusterEnd) {
  49989. this.positionCluster(glyphs, positions, clusterStart, clusterEnd);
  49990. }
  49991. clusterStart = clusterEnd = index;
  49992. }
  49993. }
  49994. if (clusterStart !== clusterEnd) {
  49995. this.positionCluster(glyphs, positions, clusterStart, clusterEnd);
  49996. }
  49997. return positions;
  49998. };
  49999. _proto17.positionCluster = function positionCluster(glyphs, positions, clusterStart, clusterEnd) {
  50000. var base = glyphs[clusterStart];
  50001. var baseBox = base.cbox.copy(); // adjust bounding box for ligature glyphs
  50002. if (base.codePoints.length > 1) {
  50003. // LTR. TODO: RTL support.
  50004. baseBox.minX += (base.codePoints.length - 1) * baseBox.width / base.codePoints.length;
  50005. }
  50006. var xOffset = -positions[clusterStart].xAdvance;
  50007. var yOffset = 0;
  50008. var yGap = this.font.unitsPerEm / 16; // position each of the mark glyphs relative to the base glyph
  50009. for (var index = clusterStart + 1; index <= clusterEnd; index++) {
  50010. var mark = glyphs[index];
  50011. var markBox = mark.cbox;
  50012. var position = positions[index];
  50013. var combiningClass = this.getCombiningClass(mark.codePoints[0]);
  50014. if (combiningClass !== 'Not_Reordered') {
  50015. position.xOffset = position.yOffset = 0; // x positioning
  50016. switch (combiningClass) {
  50017. case 'Double_Above':
  50018. case 'Double_Below':
  50019. // LTR. TODO: RTL support.
  50020. position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX;
  50021. break;
  50022. case 'Attached_Below_Left':
  50023. case 'Below_Left':
  50024. case 'Above_Left':
  50025. // left align
  50026. position.xOffset += baseBox.minX - markBox.minX;
  50027. break;
  50028. case 'Attached_Above_Right':
  50029. case 'Below_Right':
  50030. case 'Above_Right':
  50031. // right align
  50032. position.xOffset += baseBox.maxX - markBox.width - markBox.minX;
  50033. break;
  50034. default:
  50035. // Attached_Below, Attached_Above, Below, Above, other
  50036. // center align
  50037. position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX;
  50038. } // y positioning
  50039. switch (combiningClass) {
  50040. case 'Double_Below':
  50041. case 'Below_Left':
  50042. case 'Below':
  50043. case 'Below_Right':
  50044. case 'Attached_Below_Left':
  50045. case 'Attached_Below':
  50046. // add a small gap between the glyphs if they are not attached
  50047. if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') {
  50048. baseBox.minY += yGap;
  50049. }
  50050. position.yOffset = -baseBox.minY - markBox.maxY;
  50051. baseBox.minY += markBox.height;
  50052. break;
  50053. case 'Double_Above':
  50054. case 'Above_Left':
  50055. case 'Above':
  50056. case 'Above_Right':
  50057. case 'Attached_Above':
  50058. case 'Attached_Above_Right':
  50059. // add a small gap between the glyphs if they are not attached
  50060. if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') {
  50061. baseBox.maxY += yGap;
  50062. }
  50063. position.yOffset = baseBox.maxY - markBox.minY;
  50064. baseBox.maxY += markBox.height;
  50065. break;
  50066. }
  50067. position.xAdvance = position.yAdvance = 0;
  50068. position.xOffset += xOffset;
  50069. position.yOffset += yOffset;
  50070. } else {
  50071. xOffset -= position.xAdvance;
  50072. yOffset -= position.yAdvance;
  50073. }
  50074. }
  50075. return;
  50076. };
  50077. _proto17.getCombiningClass = function getCombiningClass(codePoint) {
  50078. var combiningClass = unicode.getCombiningClass(codePoint); // Thai / Lao need some per-character work
  50079. if ((codePoint & ~0xff) === 0x0e00) {
  50080. if (combiningClass === 'Not_Reordered') {
  50081. switch (codePoint) {
  50082. case 0x0e31:
  50083. case 0x0e34:
  50084. case 0x0e35:
  50085. case 0x0e36:
  50086. case 0x0e37:
  50087. case 0x0e47:
  50088. case 0x0e4c:
  50089. case 0x0e3d:
  50090. case 0x0e4e:
  50091. return 'Above_Right';
  50092. case 0x0eb1:
  50093. case 0x0eb4:
  50094. case 0x0eb5:
  50095. case 0x0eb6:
  50096. case 0x0eb7:
  50097. case 0x0ebb:
  50098. case 0x0ecc:
  50099. case 0x0ecd:
  50100. return 'Above';
  50101. case 0x0ebc:
  50102. return 'Below';
  50103. }
  50104. } else if (codePoint === 0x0e3a) {
  50105. // virama
  50106. return 'Below_Right';
  50107. }
  50108. }
  50109. switch (combiningClass) {
  50110. // Hebrew
  50111. case 'CCC10': // sheva
  50112. case 'CCC11': // hataf segol
  50113. case 'CCC12': // hataf patah
  50114. case 'CCC13': // hataf qamats
  50115. case 'CCC14': // hiriq
  50116. case 'CCC15': // tsere
  50117. case 'CCC16': // segol
  50118. case 'CCC17': // patah
  50119. case 'CCC18': // qamats
  50120. case 'CCC20': // qubuts
  50121. case 'CCC22':
  50122. // meteg
  50123. return 'Below';
  50124. case 'CCC23':
  50125. // rafe
  50126. return 'Attached_Above';
  50127. case 'CCC24':
  50128. // shin dot
  50129. return 'Above_Right';
  50130. case 'CCC25': // sin dot
  50131. case 'CCC19':
  50132. // holam
  50133. return 'Above_Left';
  50134. case 'CCC26':
  50135. // point varika
  50136. return 'Above';
  50137. case 'CCC21':
  50138. // dagesh
  50139. break;
  50140. // Arabic and Syriac
  50141. case 'CCC27': // fathatan
  50142. case 'CCC28': // dammatan
  50143. case 'CCC30': // fatha
  50144. case 'CCC31': // damma
  50145. case 'CCC33': // shadda
  50146. case 'CCC34': // sukun
  50147. case 'CCC35': // superscript alef
  50148. case 'CCC36':
  50149. // superscript alaph
  50150. return 'Above';
  50151. case 'CCC29': // kasratan
  50152. case 'CCC32':
  50153. // kasra
  50154. return 'Below';
  50155. // Thai
  50156. case 'CCC103':
  50157. // sara u / sara uu
  50158. return 'Below_Right';
  50159. case 'CCC107':
  50160. // mai
  50161. return 'Above_Right';
  50162. // Lao
  50163. case 'CCC118':
  50164. // sign u / sign uu
  50165. return 'Below';
  50166. case 'CCC122':
  50167. // mai
  50168. return 'Above';
  50169. // Tibetan
  50170. case 'CCC129': // sign aa
  50171. case 'CCC132':
  50172. // sign u
  50173. return 'Below';
  50174. case 'CCC130':
  50175. // sign i
  50176. return 'Above';
  50177. }
  50178. return combiningClass;
  50179. };
  50180. return UnicodeLayoutEngine;
  50181. }();
  50182. /**
  50183. * Represents a glyph bounding box
  50184. */
  50185. var BBox = /*#__PURE__*/function () {
  50186. function BBox(minX, minY, maxX, maxY) {
  50187. if (minX === void 0) {
  50188. minX = Infinity;
  50189. }
  50190. if (minY === void 0) {
  50191. minY = Infinity;
  50192. }
  50193. if (maxX === void 0) {
  50194. maxX = -Infinity;
  50195. }
  50196. if (maxY === void 0) {
  50197. maxY = -Infinity;
  50198. }
  50199. /**
  50200. * The minimum X position in the bounding box
  50201. * @type {number}
  50202. */
  50203. this.minX = minX;
  50204. /**
  50205. * The minimum Y position in the bounding box
  50206. * @type {number}
  50207. */
  50208. this.minY = minY;
  50209. /**
  50210. * The maxmimum X position in the bounding box
  50211. * @type {number}
  50212. */
  50213. this.maxX = maxX;
  50214. /**
  50215. * The maxmimum Y position in the bounding box
  50216. * @type {number}
  50217. */
  50218. this.maxY = maxY;
  50219. }
  50220. /**
  50221. * The width of the bounding box
  50222. * @type {number}
  50223. */
  50224. var _proto18 = BBox.prototype;
  50225. _proto18.addPoint = function addPoint(x, y) {
  50226. if (Math.abs(x) !== Infinity) {
  50227. if (x < this.minX) {
  50228. this.minX = x;
  50229. }
  50230. if (x > this.maxX) {
  50231. this.maxX = x;
  50232. }
  50233. }
  50234. if (Math.abs(y) !== Infinity) {
  50235. if (y < this.minY) {
  50236. this.minY = y;
  50237. }
  50238. if (y > this.maxY) {
  50239. this.maxY = y;
  50240. }
  50241. }
  50242. };
  50243. _proto18.copy = function copy() {
  50244. return new BBox(this.minX, this.minY, this.maxX, this.maxY);
  50245. };
  50246. _createClass(BBox, [{
  50247. key: "width",
  50248. get: function get() {
  50249. return this.maxX - this.minX;
  50250. }
  50251. /**
  50252. * The height of the bounding box
  50253. * @type {number}
  50254. */
  50255. }, {
  50256. key: "height",
  50257. get: function get() {
  50258. return this.maxY - this.minY;
  50259. }
  50260. }]);
  50261. return BBox;
  50262. }(); // Data from http://www.microsoft.com/typography/otspec/scripttags.htm
  50263. // and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt.
  50264. var UNICODE_SCRIPTS = {
  50265. Caucasian_Albanian: 'aghb',
  50266. Arabic: 'arab',
  50267. Imperial_Aramaic: 'armi',
  50268. Armenian: 'armn',
  50269. Avestan: 'avst',
  50270. Balinese: 'bali',
  50271. Bamum: 'bamu',
  50272. Bassa_Vah: 'bass',
  50273. Batak: 'batk',
  50274. Bengali: ['bng2', 'beng'],
  50275. Bopomofo: 'bopo',
  50276. Brahmi: 'brah',
  50277. Braille: 'brai',
  50278. Buginese: 'bugi',
  50279. Buhid: 'buhd',
  50280. Chakma: 'cakm',
  50281. Canadian_Aboriginal: 'cans',
  50282. Carian: 'cari',
  50283. Cham: 'cham',
  50284. Cherokee: 'cher',
  50285. Coptic: 'copt',
  50286. Cypriot: 'cprt',
  50287. Cyrillic: 'cyrl',
  50288. Devanagari: ['dev2', 'deva'],
  50289. Deseret: 'dsrt',
  50290. Duployan: 'dupl',
  50291. Egyptian_Hieroglyphs: 'egyp',
  50292. Elbasan: 'elba',
  50293. Ethiopic: 'ethi',
  50294. Georgian: 'geor',
  50295. Glagolitic: 'glag',
  50296. Gothic: 'goth',
  50297. Grantha: 'gran',
  50298. Greek: 'grek',
  50299. Gujarati: ['gjr2', 'gujr'],
  50300. Gurmukhi: ['gur2', 'guru'],
  50301. Hangul: 'hang',
  50302. Han: 'hani',
  50303. Hanunoo: 'hano',
  50304. Hebrew: 'hebr',
  50305. Hiragana: 'hira',
  50306. Pahawh_Hmong: 'hmng',
  50307. Katakana_Or_Hiragana: 'hrkt',
  50308. Old_Italic: 'ital',
  50309. Javanese: 'java',
  50310. Kayah_Li: 'kali',
  50311. Katakana: 'kana',
  50312. Kharoshthi: 'khar',
  50313. Khmer: 'khmr',
  50314. Khojki: 'khoj',
  50315. Kannada: ['knd2', 'knda'],
  50316. Kaithi: 'kthi',
  50317. Tai_Tham: 'lana',
  50318. Lao: 'lao ',
  50319. Latin: 'latn',
  50320. Lepcha: 'lepc',
  50321. Limbu: 'limb',
  50322. Linear_A: 'lina',
  50323. Linear_B: 'linb',
  50324. Lisu: 'lisu',
  50325. Lycian: 'lyci',
  50326. Lydian: 'lydi',
  50327. Mahajani: 'mahj',
  50328. Mandaic: 'mand',
  50329. Manichaean: 'mani',
  50330. Mende_Kikakui: 'mend',
  50331. Meroitic_Cursive: 'merc',
  50332. Meroitic_Hieroglyphs: 'mero',
  50333. Malayalam: ['mlm2', 'mlym'],
  50334. Modi: 'modi',
  50335. Mongolian: 'mong',
  50336. Mro: 'mroo',
  50337. Meetei_Mayek: 'mtei',
  50338. Myanmar: ['mym2', 'mymr'],
  50339. Old_North_Arabian: 'narb',
  50340. Nabataean: 'nbat',
  50341. Nko: 'nko ',
  50342. Ogham: 'ogam',
  50343. Ol_Chiki: 'olck',
  50344. Old_Turkic: 'orkh',
  50345. Oriya: ['ory2', 'orya'],
  50346. Osmanya: 'osma',
  50347. Palmyrene: 'palm',
  50348. Pau_Cin_Hau: 'pauc',
  50349. Old_Permic: 'perm',
  50350. Phags_Pa: 'phag',
  50351. Inscriptional_Pahlavi: 'phli',
  50352. Psalter_Pahlavi: 'phlp',
  50353. Phoenician: 'phnx',
  50354. Miao: 'plrd',
  50355. Inscriptional_Parthian: 'prti',
  50356. Rejang: 'rjng',
  50357. Runic: 'runr',
  50358. Samaritan: 'samr',
  50359. Old_South_Arabian: 'sarb',
  50360. Saurashtra: 'saur',
  50361. Shavian: 'shaw',
  50362. Sharada: 'shrd',
  50363. Siddham: 'sidd',
  50364. Khudawadi: 'sind',
  50365. Sinhala: 'sinh',
  50366. Sora_Sompeng: 'sora',
  50367. Sundanese: 'sund',
  50368. Syloti_Nagri: 'sylo',
  50369. Syriac: 'syrc',
  50370. Tagbanwa: 'tagb',
  50371. Takri: 'takr',
  50372. Tai_Le: 'tale',
  50373. New_Tai_Lue: 'talu',
  50374. Tamil: ['tml2', 'taml'],
  50375. Tai_Viet: 'tavt',
  50376. Telugu: ['tel2', 'telu'],
  50377. Tifinagh: 'tfng',
  50378. Tagalog: 'tglg',
  50379. Thaana: 'thaa',
  50380. Thai: 'thai',
  50381. Tibetan: 'tibt',
  50382. Tirhuta: 'tirh',
  50383. Ugaritic: 'ugar',
  50384. Vai: 'vai ',
  50385. Warang_Citi: 'wara',
  50386. Old_Persian: 'xpeo',
  50387. Cuneiform: 'xsux',
  50388. Yi: 'yi ',
  50389. Inherited: 'zinh',
  50390. Common: 'zyyy',
  50391. Unknown: 'zzzz'
  50392. };
  50393. var OPENTYPE_SCRIPTS = {};
  50394. for (var script in UNICODE_SCRIPTS) {
  50395. var tag = UNICODE_SCRIPTS[script];
  50396. if (Array.isArray(tag)) {
  50397. for (var _iterator17 = _createForOfIteratorHelperLoose(tag), _step17; !(_step17 = _iterator17()).done;) {
  50398. var t = _step17.value;
  50399. OPENTYPE_SCRIPTS[t] = script;
  50400. }
  50401. } else {
  50402. OPENTYPE_SCRIPTS[tag] = script;
  50403. }
  50404. }
  50405. function fromOpenType(tag) {
  50406. return OPENTYPE_SCRIPTS[tag];
  50407. }
  50408. function forString(string) {
  50409. var len = string.length;
  50410. var idx = 0;
  50411. while (idx < len) {
  50412. var code = string.charCodeAt(idx++); // Check if this is a high surrogate
  50413. if (0xd800 <= code && code <= 0xdbff && idx < len) {
  50414. var next = string.charCodeAt(idx); // Check if this is a low surrogate
  50415. if (0xdc00 <= next && next <= 0xdfff) {
  50416. idx++;
  50417. code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000;
  50418. }
  50419. }
  50420. var _script = unicode.getScript(code);
  50421. if (_script !== 'Common' && _script !== 'Inherited' && _script !== 'Unknown') {
  50422. return UNICODE_SCRIPTS[_script];
  50423. }
  50424. }
  50425. return UNICODE_SCRIPTS.Unknown;
  50426. }
  50427. function forCodePoints(codePoints) {
  50428. for (var i = 0; i < codePoints.length; i++) {
  50429. var codePoint = codePoints[i];
  50430. var _script2 = unicode.getScript(codePoint);
  50431. if (_script2 !== 'Common' && _script2 !== 'Inherited' && _script2 !== 'Unknown') {
  50432. return UNICODE_SCRIPTS[_script2];
  50433. }
  50434. }
  50435. return UNICODE_SCRIPTS.Unknown;
  50436. } // The scripts in this map are written from right to left
  50437. var RTL = {
  50438. arab: true,
  50439. // Arabic
  50440. hebr: true,
  50441. // Hebrew
  50442. syrc: true,
  50443. // Syriac
  50444. thaa: true,
  50445. // Thaana
  50446. cprt: true,
  50447. // Cypriot Syllabary
  50448. khar: true,
  50449. // Kharosthi
  50450. phnx: true,
  50451. // Phoenician
  50452. 'nko ': true,
  50453. // N'Ko
  50454. lydi: true,
  50455. // Lydian
  50456. avst: true,
  50457. // Avestan
  50458. armi: true,
  50459. // Imperial Aramaic
  50460. phli: true,
  50461. // Inscriptional Pahlavi
  50462. prti: true,
  50463. // Inscriptional Parthian
  50464. sarb: true,
  50465. // Old South Arabian
  50466. orkh: true,
  50467. // Old Turkic, Orkhon Runic
  50468. samr: true,
  50469. // Samaritan
  50470. mand: true,
  50471. // Mandaic, Mandaean
  50472. merc: true,
  50473. // Meroitic Cursive
  50474. mero: true,
  50475. // Meroitic Hieroglyphs
  50476. // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm)
  50477. mani: true,
  50478. // Manichaean
  50479. mend: true,
  50480. // Mende Kikakui
  50481. nbat: true,
  50482. // Nabataean
  50483. narb: true,
  50484. // Old North Arabian
  50485. palm: true,
  50486. // Palmyrene
  50487. phlp: true // Psalter Pahlavi
  50488. };
  50489. function direction(script) {
  50490. if (RTL[script]) {
  50491. return 'rtl';
  50492. }
  50493. return 'ltr';
  50494. }
  50495. /**
  50496. * Represents a run of Glyph and GlyphPosition objects.
  50497. * Returned by the font layout method.
  50498. */
  50499. var GlyphRun = /*#__PURE__*/function () {
  50500. function GlyphRun(glyphs, features, script, language, direction$1) {
  50501. /**
  50502. * An array of Glyph objects in the run
  50503. * @type {Glyph[]}
  50504. */
  50505. this.glyphs = glyphs;
  50506. /**
  50507. * An array of GlyphPosition objects for each glyph in the run
  50508. * @type {GlyphPosition[]}
  50509. */
  50510. this.positions = null;
  50511. /**
  50512. * The script that was requested for shaping. This was either passed in or detected automatically.
  50513. * @type {string}
  50514. */
  50515. this.script = script;
  50516. /**
  50517. * The language requested for shaping, as passed in. If `null`, the default language for the
  50518. * script was used.
  50519. * @type {string}
  50520. */
  50521. this.language = language || null;
  50522. /**
  50523. * The direction requested for shaping, as passed in (either ltr or rtl).
  50524. * If `null`, the default direction of the script is used.
  50525. * @type {string}
  50526. */
  50527. this.direction = direction$1 || direction(script);
  50528. /**
  50529. * The features requested during shaping. This is a combination of user
  50530. * specified features and features chosen by the shaper.
  50531. * @type {object}
  50532. */
  50533. this.features = {}; // Convert features to an object
  50534. if (Array.isArray(features)) {
  50535. for (var _iterator18 = _createForOfIteratorHelperLoose(features), _step18; !(_step18 = _iterator18()).done;) {
  50536. var tag = _step18.value;
  50537. this.features[tag] = true;
  50538. }
  50539. } else if (typeof features === 'object') {
  50540. this.features = features;
  50541. }
  50542. }
  50543. /**
  50544. * The total advance width of the run.
  50545. * @type {number}
  50546. */
  50547. _createClass(GlyphRun, [{
  50548. key: "advanceWidth",
  50549. get: function get() {
  50550. var width = 0;
  50551. for (var _iterator19 = _createForOfIteratorHelperLoose(this.positions), _step19; !(_step19 = _iterator19()).done;) {
  50552. var position = _step19.value;
  50553. width += position.xAdvance;
  50554. }
  50555. return width;
  50556. }
  50557. /**
  50558. * The total advance height of the run.
  50559. * @type {number}
  50560. */
  50561. }, {
  50562. key: "advanceHeight",
  50563. get: function get() {
  50564. var height = 0;
  50565. for (var _iterator20 = _createForOfIteratorHelperLoose(this.positions), _step20; !(_step20 = _iterator20()).done;) {
  50566. var position = _step20.value;
  50567. height += position.yAdvance;
  50568. }
  50569. return height;
  50570. }
  50571. /**
  50572. * The bounding box containing all glyphs in the run.
  50573. * @type {BBox}
  50574. */
  50575. }, {
  50576. key: "bbox",
  50577. get: function get() {
  50578. var bbox = new BBox();
  50579. var x = 0;
  50580. var y = 0;
  50581. for (var index = 0; index < this.glyphs.length; index++) {
  50582. var glyph = this.glyphs[index];
  50583. var p = this.positions[index];
  50584. var b = glyph.bbox;
  50585. bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset);
  50586. bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset);
  50587. x += p.xAdvance;
  50588. y += p.yAdvance;
  50589. }
  50590. return bbox;
  50591. }
  50592. }]);
  50593. return GlyphRun;
  50594. }();
  50595. /**
  50596. * Represents positioning information for a glyph in a GlyphRun.
  50597. */
  50598. var GlyphPosition = function GlyphPosition(xAdvance, yAdvance, xOffset, yOffset) {
  50599. if (xAdvance === void 0) {
  50600. xAdvance = 0;
  50601. }
  50602. if (yAdvance === void 0) {
  50603. yAdvance = 0;
  50604. }
  50605. if (xOffset === void 0) {
  50606. xOffset = 0;
  50607. }
  50608. if (yOffset === void 0) {
  50609. yOffset = 0;
  50610. }
  50611. /**
  50612. * The amount to move the virtual pen in the X direction after rendering this glyph.
  50613. * @type {number}
  50614. */
  50615. this.xAdvance = xAdvance;
  50616. /**
  50617. * The amount to move the virtual pen in the Y direction after rendering this glyph.
  50618. * @type {number}
  50619. */
  50620. this.yAdvance = yAdvance;
  50621. /**
  50622. * The offset from the pen position in the X direction at which to render this glyph.
  50623. * @type {number}
  50624. */
  50625. this.xOffset = xOffset;
  50626. /**
  50627. * The offset from the pen position in the Y direction at which to render this glyph.
  50628. * @type {number}
  50629. */
  50630. this.yOffset = yOffset;
  50631. }; // see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html
  50632. // and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac
  50633. var features = {
  50634. allTypographicFeatures: {
  50635. code: 0,
  50636. exclusive: false,
  50637. allTypeFeatures: 0
  50638. },
  50639. ligatures: {
  50640. code: 1,
  50641. exclusive: false,
  50642. requiredLigatures: 0,
  50643. commonLigatures: 2,
  50644. rareLigatures: 4,
  50645. // logos: 6
  50646. rebusPictures: 8,
  50647. diphthongLigatures: 10,
  50648. squaredLigatures: 12,
  50649. abbrevSquaredLigatures: 14,
  50650. symbolLigatures: 16,
  50651. contextualLigatures: 18,
  50652. historicalLigatures: 20
  50653. },
  50654. cursiveConnection: {
  50655. code: 2,
  50656. exclusive: true,
  50657. unconnected: 0,
  50658. partiallyConnected: 1,
  50659. cursive: 2
  50660. },
  50661. letterCase: {
  50662. code: 3,
  50663. exclusive: true
  50664. },
  50665. // upperAndLowerCase: 0 # deprecated
  50666. // allCaps: 1 # deprecated
  50667. // allLowerCase: 2 # deprecated
  50668. // smallCaps: 3 # deprecated
  50669. // initialCaps: 4 # deprecated
  50670. // initialCapsAndSmallCaps: 5 # deprecated
  50671. verticalSubstitution: {
  50672. code: 4,
  50673. exclusive: false,
  50674. substituteVerticalForms: 0
  50675. },
  50676. linguisticRearrangement: {
  50677. code: 5,
  50678. exclusive: false,
  50679. linguisticRearrangement: 0
  50680. },
  50681. numberSpacing: {
  50682. code: 6,
  50683. exclusive: true,
  50684. monospacedNumbers: 0,
  50685. proportionalNumbers: 1,
  50686. thirdWidthNumbers: 2,
  50687. quarterWidthNumbers: 3
  50688. },
  50689. smartSwash: {
  50690. code: 8,
  50691. exclusive: false,
  50692. wordInitialSwashes: 0,
  50693. wordFinalSwashes: 2,
  50694. // lineInitialSwashes: 4
  50695. // lineFinalSwashes: 6
  50696. nonFinalSwashes: 8
  50697. },
  50698. diacritics: {
  50699. code: 9,
  50700. exclusive: true,
  50701. showDiacritics: 0,
  50702. hideDiacritics: 1,
  50703. decomposeDiacritics: 2
  50704. },
  50705. verticalPosition: {
  50706. code: 10,
  50707. exclusive: true,
  50708. normalPosition: 0,
  50709. superiors: 1,
  50710. inferiors: 2,
  50711. ordinals: 3,
  50712. scientificInferiors: 4
  50713. },
  50714. fractions: {
  50715. code: 11,
  50716. exclusive: true,
  50717. noFractions: 0,
  50718. verticalFractions: 1,
  50719. diagonalFractions: 2
  50720. },
  50721. overlappingCharacters: {
  50722. code: 13,
  50723. exclusive: false,
  50724. preventOverlap: 0
  50725. },
  50726. typographicExtras: {
  50727. code: 14,
  50728. exclusive: false,
  50729. // hyphensToEmDash: 0
  50730. // hyphenToEnDash: 2
  50731. slashedZero: 4
  50732. },
  50733. // formInterrobang: 6
  50734. // smartQuotes: 8
  50735. // periodsToEllipsis: 10
  50736. mathematicalExtras: {
  50737. code: 15,
  50738. exclusive: false,
  50739. // hyphenToMinus: 0
  50740. // asteristoMultiply: 2
  50741. // slashToDivide: 4
  50742. // inequalityLigatures: 6
  50743. // exponents: 8
  50744. mathematicalGreek: 10
  50745. },
  50746. ornamentSets: {
  50747. code: 16,
  50748. exclusive: true,
  50749. noOrnaments: 0,
  50750. dingbats: 1,
  50751. piCharacters: 2,
  50752. fleurons: 3,
  50753. decorativeBorders: 4,
  50754. internationalSymbols: 5,
  50755. mathSymbols: 6
  50756. },
  50757. characterAlternatives: {
  50758. code: 17,
  50759. exclusive: true,
  50760. noAlternates: 0
  50761. },
  50762. // user defined options
  50763. designComplexity: {
  50764. code: 18,
  50765. exclusive: true,
  50766. designLevel1: 0,
  50767. designLevel2: 1,
  50768. designLevel3: 2,
  50769. designLevel4: 3,
  50770. designLevel5: 4
  50771. },
  50772. styleOptions: {
  50773. code: 19,
  50774. exclusive: true,
  50775. noStyleOptions: 0,
  50776. displayText: 1,
  50777. engravedText: 2,
  50778. illuminatedCaps: 3,
  50779. titlingCaps: 4,
  50780. tallCaps: 5
  50781. },
  50782. characterShape: {
  50783. code: 20,
  50784. exclusive: true,
  50785. traditionalCharacters: 0,
  50786. simplifiedCharacters: 1,
  50787. JIS1978Characters: 2,
  50788. JIS1983Characters: 3,
  50789. JIS1990Characters: 4,
  50790. traditionalAltOne: 5,
  50791. traditionalAltTwo: 6,
  50792. traditionalAltThree: 7,
  50793. traditionalAltFour: 8,
  50794. traditionalAltFive: 9,
  50795. expertCharacters: 10,
  50796. JIS2004Characters: 11,
  50797. hojoCharacters: 12,
  50798. NLCCharacters: 13,
  50799. traditionalNamesCharacters: 14
  50800. },
  50801. numberCase: {
  50802. code: 21,
  50803. exclusive: true,
  50804. lowerCaseNumbers: 0,
  50805. upperCaseNumbers: 1
  50806. },
  50807. textSpacing: {
  50808. code: 22,
  50809. exclusive: true,
  50810. proportionalText: 0,
  50811. monospacedText: 1,
  50812. halfWidthText: 2,
  50813. thirdWidthText: 3,
  50814. quarterWidthText: 4,
  50815. altProportionalText: 5,
  50816. altHalfWidthText: 6
  50817. },
  50818. transliteration: {
  50819. code: 23,
  50820. exclusive: true,
  50821. noTransliteration: 0
  50822. },
  50823. // hanjaToHangul: 1
  50824. // hiraganaToKatakana: 2
  50825. // katakanaToHiragana: 3
  50826. // kanaToRomanization: 4
  50827. // romanizationToHiragana: 5
  50828. // romanizationToKatakana: 6
  50829. // hanjaToHangulAltOne: 7
  50830. // hanjaToHangulAltTwo: 8
  50831. // hanjaToHangulAltThree: 9
  50832. annotation: {
  50833. code: 24,
  50834. exclusive: true,
  50835. noAnnotation: 0,
  50836. boxAnnotation: 1,
  50837. roundedBoxAnnotation: 2,
  50838. circleAnnotation: 3,
  50839. invertedCircleAnnotation: 4,
  50840. parenthesisAnnotation: 5,
  50841. periodAnnotation: 6,
  50842. romanNumeralAnnotation: 7,
  50843. diamondAnnotation: 8,
  50844. invertedBoxAnnotation: 9,
  50845. invertedRoundedBoxAnnotation: 10
  50846. },
  50847. kanaSpacing: {
  50848. code: 25,
  50849. exclusive: true,
  50850. fullWidthKana: 0,
  50851. proportionalKana: 1
  50852. },
  50853. ideographicSpacing: {
  50854. code: 26,
  50855. exclusive: true,
  50856. fullWidthIdeographs: 0,
  50857. proportionalIdeographs: 1,
  50858. halfWidthIdeographs: 2
  50859. },
  50860. unicodeDecomposition: {
  50861. code: 27,
  50862. exclusive: false,
  50863. canonicalComposition: 0,
  50864. compatibilityComposition: 2,
  50865. transcodingComposition: 4
  50866. },
  50867. rubyKana: {
  50868. code: 28,
  50869. exclusive: false,
  50870. // noRubyKana: 0 # deprecated - use rubyKanaOff instead
  50871. // rubyKana: 1 # deprecated - use rubyKanaOn instead
  50872. rubyKana: 2
  50873. },
  50874. CJKSymbolAlternatives: {
  50875. code: 29,
  50876. exclusive: true,
  50877. noCJKSymbolAlternatives: 0,
  50878. CJKSymbolAltOne: 1,
  50879. CJKSymbolAltTwo: 2,
  50880. CJKSymbolAltThree: 3,
  50881. CJKSymbolAltFour: 4,
  50882. CJKSymbolAltFive: 5
  50883. },
  50884. ideographicAlternatives: {
  50885. code: 30,
  50886. exclusive: true,
  50887. noIdeographicAlternatives: 0,
  50888. ideographicAltOne: 1,
  50889. ideographicAltTwo: 2,
  50890. ideographicAltThree: 3,
  50891. ideographicAltFour: 4,
  50892. ideographicAltFive: 5
  50893. },
  50894. CJKVerticalRomanPlacement: {
  50895. code: 31,
  50896. exclusive: true,
  50897. CJKVerticalRomanCentered: 0,
  50898. CJKVerticalRomanHBaseline: 1
  50899. },
  50900. italicCJKRoman: {
  50901. code: 32,
  50902. exclusive: false,
  50903. // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead
  50904. // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead
  50905. CJKItalicRoman: 2
  50906. },
  50907. caseSensitiveLayout: {
  50908. code: 33,
  50909. exclusive: false,
  50910. caseSensitiveLayout: 0,
  50911. caseSensitiveSpacing: 2
  50912. },
  50913. alternateKana: {
  50914. code: 34,
  50915. exclusive: false,
  50916. alternateHorizKana: 0,
  50917. alternateVertKana: 2
  50918. },
  50919. stylisticAlternatives: {
  50920. code: 35,
  50921. exclusive: false,
  50922. noStylisticAlternates: 0,
  50923. stylisticAltOne: 2,
  50924. stylisticAltTwo: 4,
  50925. stylisticAltThree: 6,
  50926. stylisticAltFour: 8,
  50927. stylisticAltFive: 10,
  50928. stylisticAltSix: 12,
  50929. stylisticAltSeven: 14,
  50930. stylisticAltEight: 16,
  50931. stylisticAltNine: 18,
  50932. stylisticAltTen: 20,
  50933. stylisticAltEleven: 22,
  50934. stylisticAltTwelve: 24,
  50935. stylisticAltThirteen: 26,
  50936. stylisticAltFourteen: 28,
  50937. stylisticAltFifteen: 30,
  50938. stylisticAltSixteen: 32,
  50939. stylisticAltSeventeen: 34,
  50940. stylisticAltEighteen: 36,
  50941. stylisticAltNineteen: 38,
  50942. stylisticAltTwenty: 40
  50943. },
  50944. contextualAlternates: {
  50945. code: 36,
  50946. exclusive: false,
  50947. contextualAlternates: 0,
  50948. swashAlternates: 2,
  50949. contextualSwashAlternates: 4
  50950. },
  50951. lowerCase: {
  50952. code: 37,
  50953. exclusive: true,
  50954. defaultLowerCase: 0,
  50955. lowerCaseSmallCaps: 1,
  50956. lowerCasePetiteCaps: 2
  50957. },
  50958. upperCase: {
  50959. code: 38,
  50960. exclusive: true,
  50961. defaultUpperCase: 0,
  50962. upperCaseSmallCaps: 1,
  50963. upperCasePetiteCaps: 2
  50964. },
  50965. languageTag: {
  50966. // indices into ltag table
  50967. code: 39,
  50968. exclusive: true
  50969. },
  50970. CJKRomanSpacing: {
  50971. code: 103,
  50972. exclusive: true,
  50973. halfWidthCJKRoman: 0,
  50974. proportionalCJKRoman: 1,
  50975. defaultCJKRoman: 2,
  50976. fullWidthCJKRoman: 3
  50977. }
  50978. };
  50979. var feature = function feature(name, selector) {
  50980. return [features[name].code, features[name][selector]];
  50981. };
  50982. var OTMapping = {
  50983. rlig: feature('ligatures', 'requiredLigatures'),
  50984. clig: feature('ligatures', 'contextualLigatures'),
  50985. dlig: feature('ligatures', 'rareLigatures'),
  50986. hlig: feature('ligatures', 'historicalLigatures'),
  50987. liga: feature('ligatures', 'commonLigatures'),
  50988. hist: feature('ligatures', 'historicalLigatures'),
  50989. // ??
  50990. smcp: feature('lowerCase', 'lowerCaseSmallCaps'),
  50991. pcap: feature('lowerCase', 'lowerCasePetiteCaps'),
  50992. frac: feature('fractions', 'diagonalFractions'),
  50993. dnom: feature('fractions', 'diagonalFractions'),
  50994. // ??
  50995. numr: feature('fractions', 'diagonalFractions'),
  50996. // ??
  50997. afrc: feature('fractions', 'verticalFractions'),
  50998. // aalt
  50999. // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset?
  51000. // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum?
  51001. // unic, vatu, vhal, vjmo, vpal, vrt2
  51002. // dist -> trak table?
  51003. // kern, vkrn -> kern table
  51004. // lfbd + opbd + rtbd -> opbd table?
  51005. // mark, mkmk -> acnt table?
  51006. // locl -> languageTag + ltag table
  51007. case: feature('caseSensitiveLayout', 'caseSensitiveLayout'),
  51008. // also caseSensitiveSpacing
  51009. ccmp: feature('unicodeDecomposition', 'canonicalComposition'),
  51010. // compatibilityComposition?
  51011. cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'),
  51012. // guess..., probably not given below
  51013. valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'),
  51014. swsh: feature('contextualAlternates', 'swashAlternates'),
  51015. cswh: feature('contextualAlternates', 'contextualSwashAlternates'),
  51016. curs: feature('cursiveConnection', 'cursive'),
  51017. // ??
  51018. c2pc: feature('upperCase', 'upperCasePetiteCaps'),
  51019. c2sc: feature('upperCase', 'upperCaseSmallCaps'),
  51020. init: feature('smartSwash', 'wordInitialSwashes'),
  51021. // ??
  51022. fin2: feature('smartSwash', 'wordFinalSwashes'),
  51023. // ??
  51024. medi: feature('smartSwash', 'nonFinalSwashes'),
  51025. // ??
  51026. med2: feature('smartSwash', 'nonFinalSwashes'),
  51027. // ??
  51028. fin3: feature('smartSwash', 'wordFinalSwashes'),
  51029. // ??
  51030. fina: feature('smartSwash', 'wordFinalSwashes'),
  51031. // ??
  51032. pkna: feature('kanaSpacing', 'proportionalKana'),
  51033. half: feature('textSpacing', 'halfWidthText'),
  51034. // also HalfWidthCJKRoman, HalfWidthIdeographs?
  51035. halt: feature('textSpacing', 'altHalfWidthText'),
  51036. hkna: feature('alternateKana', 'alternateHorizKana'),
  51037. vkna: feature('alternateKana', 'alternateVertKana'),
  51038. // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated
  51039. ital: feature('italicCJKRoman', 'CJKItalicRoman'),
  51040. lnum: feature('numberCase', 'upperCaseNumbers'),
  51041. onum: feature('numberCase', 'lowerCaseNumbers'),
  51042. mgrk: feature('mathematicalExtras', 'mathematicalGreek'),
  51043. // nalt: not enough info. what type of annotation?
  51044. // ornm: ditto, which ornament style?
  51045. calt: feature('contextualAlternates', 'contextualAlternates'),
  51046. // or more?
  51047. vrt2: feature('verticalSubstitution', 'substituteVerticalForms'),
  51048. // oh... below?
  51049. vert: feature('verticalSubstitution', 'substituteVerticalForms'),
  51050. tnum: feature('numberSpacing', 'monospacedNumbers'),
  51051. pnum: feature('numberSpacing', 'proportionalNumbers'),
  51052. sups: feature('verticalPosition', 'superiors'),
  51053. subs: feature('verticalPosition', 'inferiors'),
  51054. ordn: feature('verticalPosition', 'ordinals'),
  51055. pwid: feature('textSpacing', 'proportionalText'),
  51056. hwid: feature('textSpacing', 'halfWidthText'),
  51057. qwid: feature('textSpacing', 'quarterWidthText'),
  51058. // also QuarterWidthNumbers?
  51059. twid: feature('textSpacing', 'thirdWidthText'),
  51060. // also ThirdWidthNumbers?
  51061. fwid: feature('textSpacing', 'proportionalText'),
  51062. //??
  51063. palt: feature('textSpacing', 'altProportionalText'),
  51064. trad: feature('characterShape', 'traditionalCharacters'),
  51065. smpl: feature('characterShape', 'simplifiedCharacters'),
  51066. jp78: feature('characterShape', 'JIS1978Characters'),
  51067. jp83: feature('characterShape', 'JIS1983Characters'),
  51068. jp90: feature('characterShape', 'JIS1990Characters'),
  51069. jp04: feature('characterShape', 'JIS2004Characters'),
  51070. expt: feature('characterShape', 'expertCharacters'),
  51071. hojo: feature('characterShape', 'hojoCharacters'),
  51072. nlck: feature('characterShape', 'NLCCharacters'),
  51073. tnam: feature('characterShape', 'traditionalNamesCharacters'),
  51074. ruby: feature('rubyKana', 'rubyKana'),
  51075. titl: feature('styleOptions', 'titlingCaps'),
  51076. zero: feature('typographicExtras', 'slashedZero'),
  51077. ss01: feature('stylisticAlternatives', 'stylisticAltOne'),
  51078. ss02: feature('stylisticAlternatives', 'stylisticAltTwo'),
  51079. ss03: feature('stylisticAlternatives', 'stylisticAltThree'),
  51080. ss04: feature('stylisticAlternatives', 'stylisticAltFour'),
  51081. ss05: feature('stylisticAlternatives', 'stylisticAltFive'),
  51082. ss06: feature('stylisticAlternatives', 'stylisticAltSix'),
  51083. ss07: feature('stylisticAlternatives', 'stylisticAltSeven'),
  51084. ss08: feature('stylisticAlternatives', 'stylisticAltEight'),
  51085. ss09: feature('stylisticAlternatives', 'stylisticAltNine'),
  51086. ss10: feature('stylisticAlternatives', 'stylisticAltTen'),
  51087. ss11: feature('stylisticAlternatives', 'stylisticAltEleven'),
  51088. ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'),
  51089. ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'),
  51090. ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'),
  51091. ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'),
  51092. ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'),
  51093. ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'),
  51094. ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'),
  51095. ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'),
  51096. ss20: feature('stylisticAlternatives', 'stylisticAltTwenty')
  51097. }; // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose
  51098. // Add cv01-cv99 features
  51099. for (var i = 1; i <= 99; i++) {
  51100. OTMapping["cv".concat("00".concat(i).slice(-2))] = [features.characterAlternatives.code, i];
  51101. } // create inverse mapping
  51102. var AATMapping = {};
  51103. for (var ot in OTMapping) {
  51104. var aat = OTMapping[ot];
  51105. if (AATMapping[aat[0]] == null) {
  51106. AATMapping[aat[0]] = {};
  51107. }
  51108. AATMapping[aat[0]][aat[1]] = ot;
  51109. } // Maps an array of OpenType features to AAT features
  51110. // in the form of {featureType:{featureSetting:true}}
  51111. function mapOTToAAT(features) {
  51112. var res = {};
  51113. for (var k in features) {
  51114. var r = void 0;
  51115. if (r = OTMapping[k]) {
  51116. if (res[r[0]] == null) {
  51117. res[r[0]] = {};
  51118. }
  51119. res[r[0]][r[1]] = features[k];
  51120. }
  51121. }
  51122. return res;
  51123. } // Maps strings in a [featureType, featureSetting]
  51124. // to their equivalent number codes
  51125. function mapFeatureStrings(f) {
  51126. var type = f[0],
  51127. setting = f[1];
  51128. if (isNaN(type)) {
  51129. var typeCode = features[type] && features[type].code;
  51130. } else {
  51131. var typeCode = type;
  51132. }
  51133. if (isNaN(setting)) {
  51134. var settingCode = features[type] && features[type][setting];
  51135. } else {
  51136. var settingCode = setting;
  51137. }
  51138. return [typeCode, settingCode];
  51139. } // Maps AAT features to an array of OpenType features
  51140. // Supports both arrays in the form of [[featureType, featureSetting]]
  51141. // and objects in the form of {featureType:{featureSetting:true}}
  51142. // featureTypes and featureSettings can be either strings or number codes
  51143. function mapAATToOT(features) {
  51144. var res = {};
  51145. if (Array.isArray(features)) {
  51146. for (var k = 0; k < features.length; k++) {
  51147. var r = void 0;
  51148. var f = mapFeatureStrings(features[k]);
  51149. if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) {
  51150. res[r] = true;
  51151. }
  51152. }
  51153. } else if (typeof features === 'object') {
  51154. for (var type in features) {
  51155. var _feature = features[type];
  51156. for (var setting in _feature) {
  51157. var _r = void 0;
  51158. var _f = mapFeatureStrings([type, setting]);
  51159. if (_feature[setting] && (_r = AATMapping[_f[0]] && AATMapping[_f[0]][_f[1]])) {
  51160. res[_r] = true;
  51161. }
  51162. }
  51163. }
  51164. }
  51165. return Object.keys(res);
  51166. }
  51167. var _class$1;
  51168. var AATLookupTable = (_class$1 = /*#__PURE__*/function () {
  51169. function AATLookupTable(table) {
  51170. this.table = table;
  51171. }
  51172. var _proto19 = AATLookupTable.prototype;
  51173. _proto19.lookup = function lookup(glyph) {
  51174. switch (this.table.version) {
  51175. case 0:
  51176. // simple array format
  51177. return this.table.values.getItem(glyph);
  51178. case 2: // segment format
  51179. case 4:
  51180. {
  51181. var min = 0;
  51182. var max = this.table.binarySearchHeader.nUnits - 1;
  51183. while (min <= max) {
  51184. var mid = min + max >> 1;
  51185. var seg = this.table.segments[mid]; // special end of search value
  51186. if (seg.firstGlyph === 0xffff) {
  51187. return null;
  51188. }
  51189. if (glyph < seg.firstGlyph) {
  51190. max = mid - 1;
  51191. } else if (glyph > seg.lastGlyph) {
  51192. min = mid + 1;
  51193. } else {
  51194. if (this.table.version === 2) {
  51195. return seg.value;
  51196. } else {
  51197. return seg.values[glyph - seg.firstGlyph];
  51198. }
  51199. }
  51200. }
  51201. return null;
  51202. }
  51203. case 6:
  51204. {
  51205. // lookup single
  51206. var _min = 0;
  51207. var _max = this.table.binarySearchHeader.nUnits - 1;
  51208. while (_min <= _max) {
  51209. var mid = _min + _max >> 1;
  51210. var seg = this.table.segments[mid]; // special end of search value
  51211. if (seg.glyph === 0xffff) {
  51212. return null;
  51213. }
  51214. if (glyph < seg.glyph) {
  51215. _max = mid - 1;
  51216. } else if (glyph > seg.glyph) {
  51217. _min = mid + 1;
  51218. } else {
  51219. return seg.value;
  51220. }
  51221. }
  51222. return null;
  51223. }
  51224. case 8:
  51225. // lookup trimmed
  51226. return this.table.values[glyph - this.table.firstGlyph];
  51227. default:
  51228. throw new Error("Unknown lookup table format: ".concat(this.table.version));
  51229. }
  51230. };
  51231. _proto19.glyphsForValue = function glyphsForValue(classValue) {
  51232. var res = [];
  51233. switch (this.table.version) {
  51234. case 2: // segment format
  51235. case 4:
  51236. {
  51237. for (var _iterator21 = _createForOfIteratorHelperLoose(this.table.segments), _step21; !(_step21 = _iterator21()).done;) {
  51238. var segment = _step21.value;
  51239. if (this.table.version === 2 && segment.value === classValue) {
  51240. res.push.apply(res, range(segment.firstGlyph, segment.lastGlyph + 1));
  51241. } else {
  51242. for (var index = 0; index < segment.values.length; index++) {
  51243. if (segment.values[index] === classValue) {
  51244. res.push(segment.firstGlyph + index);
  51245. }
  51246. }
  51247. }
  51248. }
  51249. break;
  51250. }
  51251. case 6:
  51252. {
  51253. // lookup single
  51254. for (var _iterator22 = _createForOfIteratorHelperLoose(this.table.segments), _step22; !(_step22 = _iterator22()).done;) {
  51255. var _segment = _step22.value;
  51256. if (_segment.value === classValue) {
  51257. res.push(_segment.glyph);
  51258. }
  51259. }
  51260. break;
  51261. }
  51262. case 8:
  51263. {
  51264. // lookup trimmed
  51265. for (var i = 0; i < this.table.values.length; i++) {
  51266. if (this.table.values[i] === classValue) {
  51267. res.push(this.table.firstGlyph + i);
  51268. }
  51269. }
  51270. break;
  51271. }
  51272. default:
  51273. throw new Error("Unknown lookup table format: ".concat(this.table.version));
  51274. }
  51275. return res;
  51276. };
  51277. return AATLookupTable;
  51278. }(), _applyDecoratedDescriptor(_class$1.prototype, "glyphsForValue", [cache], Object.getOwnPropertyDescriptor(_class$1.prototype, "glyphsForValue"), _class$1.prototype), _class$1);
  51279. var START_OF_TEXT_STATE = 0;
  51280. var END_OF_TEXT_CLASS = 0;
  51281. var OUT_OF_BOUNDS_CLASS = 1;
  51282. var DELETED_GLYPH_CLASS = 2;
  51283. var DONT_ADVANCE = 0x4000;
  51284. var AATStateMachine = /*#__PURE__*/function () {
  51285. function AATStateMachine(stateTable) {
  51286. this.stateTable = stateTable;
  51287. this.lookupTable = new AATLookupTable(stateTable.classTable);
  51288. }
  51289. var _proto20 = AATStateMachine.prototype;
  51290. _proto20.process = function process(glyphs, reverse, processEntry) {
  51291. var currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think?
  51292. var index = reverse ? glyphs.length - 1 : 0;
  51293. var dir = reverse ? -1 : 1;
  51294. while (dir === 1 && index <= glyphs.length || dir === -1 && index >= -1) {
  51295. var glyph = null;
  51296. var classCode = OUT_OF_BOUNDS_CLASS;
  51297. var shouldAdvance = true;
  51298. if (index === glyphs.length || index === -1) {
  51299. classCode = END_OF_TEXT_CLASS;
  51300. } else {
  51301. glyph = glyphs[index];
  51302. if (glyph.id === 0xffff) {
  51303. // deleted glyph
  51304. classCode = DELETED_GLYPH_CLASS;
  51305. } else {
  51306. classCode = this.lookupTable.lookup(glyph.id);
  51307. if (classCode == null) {
  51308. classCode = OUT_OF_BOUNDS_CLASS;
  51309. }
  51310. }
  51311. }
  51312. var row = this.stateTable.stateArray.getItem(currentState);
  51313. var entryIndex = row[classCode];
  51314. var entry = this.stateTable.entryTable.getItem(entryIndex);
  51315. if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) {
  51316. processEntry(glyph, entry, index);
  51317. shouldAdvance = !(entry.flags & DONT_ADVANCE);
  51318. }
  51319. currentState = entry.newState;
  51320. if (shouldAdvance) {
  51321. index += dir;
  51322. }
  51323. }
  51324. return glyphs;
  51325. }
  51326. /**
  51327. * Performs a depth-first traversal of the glyph strings
  51328. * represented by the state machine.
  51329. */
  51330. ;
  51331. _proto20.traverse = function traverse(opts, state, visited) {
  51332. if (state === void 0) {
  51333. state = 0;
  51334. }
  51335. if (visited === void 0) {
  51336. visited = new Set();
  51337. }
  51338. if (visited.has(state)) {
  51339. return;
  51340. }
  51341. visited.add(state);
  51342. var _this$stateTable = this.stateTable,
  51343. nClasses = _this$stateTable.nClasses,
  51344. stateArray = _this$stateTable.stateArray,
  51345. entryTable = _this$stateTable.entryTable;
  51346. var row = stateArray.getItem(state); // Skip predefined classes
  51347. for (var classCode = 4; classCode < nClasses; classCode++) {
  51348. var entryIndex = row[classCode];
  51349. var entry = entryTable.getItem(entryIndex); // Try all glyphs in the class
  51350. for (var _iterator23 = _createForOfIteratorHelperLoose(this.lookupTable.glyphsForValue(classCode)), _step23; !(_step23 = _iterator23()).done;) {
  51351. var glyph = _step23.value;
  51352. if (opts.enter) {
  51353. opts.enter(glyph, entry);
  51354. }
  51355. if (entry.newState !== 0) {
  51356. this.traverse(opts, entry.newState, visited);
  51357. }
  51358. if (opts.exit) {
  51359. opts.exit(glyph, entry);
  51360. }
  51361. }
  51362. }
  51363. };
  51364. return AATStateMachine;
  51365. }();
  51366. var _class$2;
  51367. var MARK_FIRST = 0x8000;
  51368. var MARK_LAST = 0x2000;
  51369. var VERB = 0x000F; // contextual substitution and glyph insertion flag
  51370. var SET_MARK = 0x8000; // ligature entry flags
  51371. var SET_COMPONENT = 0x8000;
  51372. var PERFORM_ACTION = 0x2000; // ligature action masks
  51373. var LAST_MASK = 0x80000000;
  51374. var STORE_MASK = 0x40000000;
  51375. var OFFSET_MASK = 0x3FFFFFFF;
  51376. var REVERSE_DIRECTION = 0x400000;
  51377. var CURRENT_INSERT_BEFORE = 0x0800;
  51378. var MARKED_INSERT_BEFORE = 0x0400;
  51379. var CURRENT_INSERT_COUNT = 0x03E0;
  51380. var MARKED_INSERT_COUNT = 0x001F;
  51381. var AATMorxProcessor = (_class$2 = /*#__PURE__*/function () {
  51382. function AATMorxProcessor(font) {
  51383. this.processIndicRearragement = this.processIndicRearragement.bind(this);
  51384. this.processContextualSubstitution = this.processContextualSubstitution.bind(this);
  51385. this.processLigature = this.processLigature.bind(this);
  51386. this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this);
  51387. this.processGlyphInsertion = this.processGlyphInsertion.bind(this);
  51388. this.font = font;
  51389. this.morx = font.morx;
  51390. this.inputCache = null;
  51391. } // Processes an array of glyphs and applies the specified features
  51392. // Features should be in the form of {featureType:{featureSetting:boolean}}
  51393. var _proto21 = AATMorxProcessor.prototype;
  51394. _proto21.process = function process(glyphs, features) {
  51395. if (features === void 0) {
  51396. features = {};
  51397. }
  51398. for (var _iterator24 = _createForOfIteratorHelperLoose(this.morx.chains), _step24; !(_step24 = _iterator24()).done;) {
  51399. var chain = _step24.value;
  51400. var flags = chain.defaultFlags; // enable/disable the requested features
  51401. for (var _iterator25 = _createForOfIteratorHelperLoose(chain.features), _step25; !(_step25 = _iterator25()).done;) {
  51402. var feature = _step25.value;
  51403. var f = void 0;
  51404. if (f = features[feature.featureType]) {
  51405. if (f[feature.featureSetting]) {
  51406. flags &= feature.disableFlags;
  51407. flags |= feature.enableFlags;
  51408. } else if (f[feature.featureSetting] === false) {
  51409. flags |= ~feature.disableFlags;
  51410. flags &= ~feature.enableFlags;
  51411. }
  51412. }
  51413. }
  51414. for (var _iterator26 = _createForOfIteratorHelperLoose(chain.subtables), _step26; !(_step26 = _iterator26()).done;) {
  51415. var subtable = _step26.value;
  51416. if (subtable.subFeatureFlags & flags) {
  51417. this.processSubtable(subtable, glyphs);
  51418. }
  51419. }
  51420. } // remove deleted glyphs
  51421. var index = glyphs.length - 1;
  51422. while (index >= 0) {
  51423. if (glyphs[index].id === 0xffff) {
  51424. glyphs.splice(index, 1);
  51425. }
  51426. index--;
  51427. }
  51428. return glyphs;
  51429. };
  51430. _proto21.processSubtable = function processSubtable(subtable, glyphs) {
  51431. this.subtable = subtable;
  51432. this.glyphs = glyphs;
  51433. if (this.subtable.type === 4) {
  51434. this.processNoncontextualSubstitutions(this.subtable, this.glyphs);
  51435. return;
  51436. }
  51437. this.ligatureStack = [];
  51438. this.markedGlyph = null;
  51439. this.firstGlyph = null;
  51440. this.lastGlyph = null;
  51441. this.markedIndex = null;
  51442. var stateMachine = this.getStateMachine(subtable);
  51443. var process = this.getProcessor();
  51444. var reverse = !!(this.subtable.coverage & REVERSE_DIRECTION);
  51445. return stateMachine.process(this.glyphs, reverse, process);
  51446. };
  51447. _proto21.getStateMachine = function getStateMachine(subtable) {
  51448. return new AATStateMachine(subtable.table.stateTable);
  51449. };
  51450. _proto21.getProcessor = function getProcessor() {
  51451. switch (this.subtable.type) {
  51452. case 0:
  51453. return this.processIndicRearragement;
  51454. case 1:
  51455. return this.processContextualSubstitution;
  51456. case 2:
  51457. return this.processLigature;
  51458. case 4:
  51459. return this.processNoncontextualSubstitutions;
  51460. case 5:
  51461. return this.processGlyphInsertion;
  51462. default:
  51463. throw new Error("Invalid morx subtable type: ".concat(this.subtable.type));
  51464. }
  51465. };
  51466. _proto21.processIndicRearragement = function processIndicRearragement(glyph, entry, index) {
  51467. if (entry.flags & MARK_FIRST) {
  51468. this.firstGlyph = index;
  51469. }
  51470. if (entry.flags & MARK_LAST) {
  51471. this.lastGlyph = index;
  51472. }
  51473. reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph);
  51474. };
  51475. _proto21.processContextualSubstitution = function processContextualSubstitution(glyph, entry, index) {
  51476. var subsitutions = this.subtable.table.substitutionTable.items;
  51477. if (entry.markIndex !== 0xffff) {
  51478. var lookup = subsitutions.getItem(entry.markIndex);
  51479. var lookupTable = new AATLookupTable(lookup);
  51480. glyph = this.glyphs[this.markedGlyph];
  51481. var gid = lookupTable.lookup(glyph.id);
  51482. if (gid) {
  51483. this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints);
  51484. }
  51485. }
  51486. if (entry.currentIndex !== 0xffff) {
  51487. var _lookup = subsitutions.getItem(entry.currentIndex);
  51488. var _lookupTable = new AATLookupTable(_lookup);
  51489. glyph = this.glyphs[index];
  51490. var gid = _lookupTable.lookup(glyph.id);
  51491. if (gid) {
  51492. this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);
  51493. }
  51494. }
  51495. if (entry.flags & SET_MARK) {
  51496. this.markedGlyph = index;
  51497. }
  51498. };
  51499. _proto21.processLigature = function processLigature(glyph, entry, index) {
  51500. if (entry.flags & SET_COMPONENT) {
  51501. this.ligatureStack.push(index);
  51502. }
  51503. if (entry.flags & PERFORM_ACTION) {
  51504. var _this$ligatureStack;
  51505. var actions = this.subtable.table.ligatureActions;
  51506. var components = this.subtable.table.components;
  51507. var ligatureList = this.subtable.table.ligatureList;
  51508. var actionIndex = entry.action;
  51509. var last = false;
  51510. var ligatureIndex = 0;
  51511. var codePoints = [];
  51512. var ligatureGlyphs = [];
  51513. while (!last) {
  51514. var _codePoints;
  51515. var componentGlyph = this.ligatureStack.pop();
  51516. (_codePoints = codePoints).unshift.apply(_codePoints, this.glyphs[componentGlyph].codePoints);
  51517. var action = actions.getItem(actionIndex++);
  51518. last = !!(action & LAST_MASK);
  51519. var store = !!(action & STORE_MASK);
  51520. var offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits
  51521. offset += this.glyphs[componentGlyph].id;
  51522. var component = components.getItem(offset);
  51523. ligatureIndex += component;
  51524. if (last || store) {
  51525. var ligatureEntry = ligatureList.getItem(ligatureIndex);
  51526. this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints);
  51527. ligatureGlyphs.push(componentGlyph);
  51528. ligatureIndex = 0;
  51529. codePoints = [];
  51530. } else {
  51531. this.glyphs[componentGlyph] = this.font.getGlyph(0xffff);
  51532. }
  51533. } // Put ligature glyph indexes back on the stack
  51534. (_this$ligatureStack = this.ligatureStack).push.apply(_this$ligatureStack, ligatureGlyphs);
  51535. }
  51536. };
  51537. _proto21.processNoncontextualSubstitutions = function processNoncontextualSubstitutions(subtable, glyphs, index) {
  51538. var lookupTable = new AATLookupTable(subtable.table.lookupTable);
  51539. for (index = 0; index < glyphs.length; index++) {
  51540. var glyph = glyphs[index];
  51541. if (glyph.id !== 0xffff) {
  51542. var gid = lookupTable.lookup(glyph.id);
  51543. if (gid) {
  51544. // 0 means do nothing
  51545. glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);
  51546. }
  51547. }
  51548. }
  51549. };
  51550. _proto21._insertGlyphs = function _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) {
  51551. var _this$glyphs;
  51552. var insertions = [];
  51553. while (count--) {
  51554. var gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++);
  51555. insertions.push(this.font.getGlyph(gid));
  51556. }
  51557. if (!isBefore) {
  51558. glyphIndex++;
  51559. }
  51560. (_this$glyphs = this.glyphs).splice.apply(_this$glyphs, [glyphIndex, 0].concat(insertions));
  51561. };
  51562. _proto21.processGlyphInsertion = function processGlyphInsertion(glyph, entry, index) {
  51563. if (entry.flags & SET_MARK) {
  51564. this.markedIndex = index;
  51565. }
  51566. if (entry.markedInsertIndex !== 0xffff) {
  51567. var count = (entry.flags & MARKED_INSERT_COUNT) >>> 5;
  51568. var isBefore = !!(entry.flags & MARKED_INSERT_BEFORE);
  51569. this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore);
  51570. }
  51571. if (entry.currentInsertIndex !== 0xffff) {
  51572. var _count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5;
  51573. var _isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE);
  51574. this._insertGlyphs(index, entry.currentInsertIndex, _count, _isBefore);
  51575. }
  51576. };
  51577. _proto21.getSupportedFeatures = function getSupportedFeatures() {
  51578. var features = [];
  51579. for (var _iterator27 = _createForOfIteratorHelperLoose(this.morx.chains), _step27; !(_step27 = _iterator27()).done;) {
  51580. var chain = _step27.value;
  51581. for (var _iterator28 = _createForOfIteratorHelperLoose(chain.features), _step28; !(_step28 = _iterator28()).done;) {
  51582. var feature = _step28.value;
  51583. features.push([feature.featureType, feature.featureSetting]);
  51584. }
  51585. }
  51586. return features;
  51587. };
  51588. _proto21.generateInputs = function generateInputs(gid) {
  51589. if (!this.inputCache) {
  51590. this.generateInputCache();
  51591. }
  51592. return this.inputCache[gid] || [];
  51593. };
  51594. _proto21.generateInputCache = function generateInputCache() {
  51595. this.inputCache = {};
  51596. for (var _iterator29 = _createForOfIteratorHelperLoose(this.morx.chains), _step29; !(_step29 = _iterator29()).done;) {
  51597. var chain = _step29.value;
  51598. var flags = chain.defaultFlags;
  51599. for (var _iterator30 = _createForOfIteratorHelperLoose(chain.subtables), _step30; !(_step30 = _iterator30()).done;) {
  51600. var subtable = _step30.value;
  51601. if (subtable.subFeatureFlags & flags) {
  51602. this.generateInputsForSubtable(subtable);
  51603. }
  51604. }
  51605. }
  51606. };
  51607. _proto21.generateInputsForSubtable = function generateInputsForSubtable(subtable) {
  51608. var _this3 = this;
  51609. // Currently, only supporting ligature subtables.
  51610. if (subtable.type !== 2) {
  51611. return;
  51612. }
  51613. var reverse = !!(subtable.coverage & REVERSE_DIRECTION);
  51614. if (reverse) {
  51615. throw new Error('Reverse subtable, not supported.');
  51616. }
  51617. this.subtable = subtable;
  51618. this.ligatureStack = [];
  51619. var stateMachine = this.getStateMachine(subtable);
  51620. var process = this.getProcessor();
  51621. var input = [];
  51622. var stack = [];
  51623. this.glyphs = [];
  51624. stateMachine.traverse({
  51625. enter: function enter(glyph, entry) {
  51626. var glyphs = _this3.glyphs;
  51627. stack.push({
  51628. glyphs: glyphs.slice(),
  51629. ligatureStack: _this3.ligatureStack.slice()
  51630. }); // Add glyph to input and glyphs to process.
  51631. var g = _this3.font.getGlyph(glyph);
  51632. input.push(g);
  51633. glyphs.push(input[input.length - 1]); // Process ligature substitution
  51634. process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); // Add input to result if only one matching (non-deleted) glyph remains.
  51635. var count = 0;
  51636. var found = 0;
  51637. for (var i = 0; i < glyphs.length && count <= 1; i++) {
  51638. if (glyphs[i].id !== 0xffff) {
  51639. count++;
  51640. found = glyphs[i].id;
  51641. }
  51642. }
  51643. if (count === 1) {
  51644. var result = input.map(function (g) {
  51645. return g.id;
  51646. });
  51647. var _cache = _this3.inputCache[found];
  51648. if (_cache) {
  51649. _cache.push(result);
  51650. } else {
  51651. _this3.inputCache[found] = [result];
  51652. }
  51653. }
  51654. },
  51655. exit: function exit() {
  51656. var _stack$pop = stack.pop();
  51657. _this3.glyphs = _stack$pop.glyphs;
  51658. _this3.ligatureStack = _stack$pop.ligatureStack;
  51659. input.pop();
  51660. }
  51661. });
  51662. };
  51663. return AATMorxProcessor;
  51664. }(), _applyDecoratedDescriptor(_class$2.prototype, "getStateMachine", [cache], Object.getOwnPropertyDescriptor(_class$2.prototype, "getStateMachine"), _class$2.prototype), _class$2); // reverse the glyphs inside those ranges if specified
  51665. // ranges are in [offset, length] format
  51666. function swap(glyphs, rangeA, rangeB, reverseA, reverseB) {
  51667. if (reverseA === void 0) {
  51668. reverseA = false;
  51669. }
  51670. if (reverseB === void 0) {
  51671. reverseB = false;
  51672. }
  51673. var end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]);
  51674. if (reverseB) {
  51675. end.reverse();
  51676. }
  51677. var start = glyphs.splice.apply(glyphs, [rangeA[0], rangeA[1]].concat(end));
  51678. if (reverseA) {
  51679. start.reverse();
  51680. }
  51681. glyphs.splice.apply(glyphs, [rangeB[0] - (rangeA[1] - 1), 0].concat(start));
  51682. return glyphs;
  51683. }
  51684. function reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) {
  51685. switch (verb) {
  51686. case 0:
  51687. // no change
  51688. return glyphs;
  51689. case 1:
  51690. // Ax => xA
  51691. return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]);
  51692. case 2:
  51693. // xD => Dx
  51694. return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]);
  51695. case 3:
  51696. // AxD => DxA
  51697. return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]);
  51698. case 4:
  51699. // ABx => xAB
  51700. return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]);
  51701. case 5:
  51702. // ABx => xBA
  51703. return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false);
  51704. case 6:
  51705. // xCD => CDx
  51706. return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]);
  51707. case 7:
  51708. // xCD => DCx
  51709. return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true);
  51710. case 8:
  51711. // AxCD => CDxA
  51712. return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]);
  51713. case 9:
  51714. // AxCD => DCxA
  51715. return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true);
  51716. case 10:
  51717. // ABxD => DxAB
  51718. return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]);
  51719. case 11:
  51720. // ABxD => DxBA
  51721. return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false);
  51722. case 12:
  51723. // ABxCD => CDxAB
  51724. return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]);
  51725. case 13:
  51726. // ABxCD => CDxBA
  51727. return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false);
  51728. case 14:
  51729. // ABxCD => DCxAB
  51730. return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true);
  51731. case 15:
  51732. // ABxCD => DCxBA
  51733. return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true);
  51734. default:
  51735. throw new Error("Unknown verb: ".concat(verb));
  51736. }
  51737. }
  51738. var AATLayoutEngine = /*#__PURE__*/function () {
  51739. function AATLayoutEngine(font) {
  51740. this.font = font;
  51741. this.morxProcessor = new AATMorxProcessor(font);
  51742. this.fallbackPosition = false;
  51743. }
  51744. var _proto22 = AATLayoutEngine.prototype;
  51745. _proto22.substitute = function substitute(glyphRun) {
  51746. // AAT expects the glyphs to be in visual order prior to morx processing,
  51747. // so reverse the glyphs if the script is right-to-left.
  51748. if (glyphRun.direction === 'rtl') {
  51749. glyphRun.glyphs.reverse();
  51750. }
  51751. this.morxProcessor.process(glyphRun.glyphs, mapOTToAAT(glyphRun.features));
  51752. };
  51753. _proto22.getAvailableFeatures = function getAvailableFeatures(script, language) {
  51754. return mapAATToOT(this.morxProcessor.getSupportedFeatures());
  51755. };
  51756. _proto22.stringsForGlyph = function stringsForGlyph(gid) {
  51757. var glyphStrings = this.morxProcessor.generateInputs(gid);
  51758. var result = new Set();
  51759. for (var _iterator31 = _createForOfIteratorHelperLoose(glyphStrings), _step31; !(_step31 = _iterator31()).done;) {
  51760. var glyphs = _step31.value;
  51761. this._addStrings(glyphs, 0, result, '');
  51762. }
  51763. return result;
  51764. };
  51765. _proto22._addStrings = function _addStrings(glyphs, index, strings, string) {
  51766. var codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]);
  51767. for (var _iterator32 = _createForOfIteratorHelperLoose(codePoints), _step32; !(_step32 = _iterator32()).done;) {
  51768. var codePoint = _step32.value;
  51769. var s = string + String.fromCodePoint(codePoint);
  51770. if (index < glyphs.length - 1) {
  51771. this._addStrings(glyphs, index + 1, strings, s);
  51772. } else {
  51773. strings.add(s);
  51774. }
  51775. }
  51776. };
  51777. return AATLayoutEngine;
  51778. }();
  51779. /**
  51780. * ShapingPlans are used by the OpenType shapers to store which
  51781. * features should by applied, and in what order to apply them.
  51782. * The features are applied in groups called stages. A feature
  51783. * can be applied globally to all glyphs, or locally to only
  51784. * specific glyphs.
  51785. *
  51786. * @private
  51787. */
  51788. var ShapingPlan = /*#__PURE__*/function () {
  51789. function ShapingPlan(font, script, direction) {
  51790. this.font = font;
  51791. this.script = script;
  51792. this.direction = direction;
  51793. this.stages = [];
  51794. this.globalFeatures = {};
  51795. this.allFeatures = {};
  51796. }
  51797. /**
  51798. * Adds the given features to the last stage.
  51799. * Ignores features that have already been applied.
  51800. */
  51801. var _proto23 = ShapingPlan.prototype;
  51802. _proto23._addFeatures = function _addFeatures(features, global) {
  51803. var stageIndex = this.stages.length - 1;
  51804. var stage = this.stages[stageIndex];
  51805. for (var _iterator33 = _createForOfIteratorHelperLoose(features), _step33; !(_step33 = _iterator33()).done;) {
  51806. var feature = _step33.value;
  51807. if (this.allFeatures[feature] == null) {
  51808. stage.push(feature);
  51809. this.allFeatures[feature] = stageIndex;
  51810. if (global) {
  51811. this.globalFeatures[feature] = true;
  51812. }
  51813. }
  51814. }
  51815. }
  51816. /**
  51817. * Add features to the last stage
  51818. */
  51819. ;
  51820. _proto23.add = function add(arg, global) {
  51821. if (global === void 0) {
  51822. global = true;
  51823. }
  51824. if (this.stages.length === 0) {
  51825. this.stages.push([]);
  51826. }
  51827. if (typeof arg === 'string') {
  51828. arg = [arg];
  51829. }
  51830. if (Array.isArray(arg)) {
  51831. this._addFeatures(arg, global);
  51832. } else if (typeof arg === 'object') {
  51833. this._addFeatures(arg.global || [], true);
  51834. this._addFeatures(arg.local || [], false);
  51835. } else {
  51836. throw new Error("Unsupported argument to ShapingPlan#add");
  51837. }
  51838. }
  51839. /**
  51840. * Add a new stage
  51841. */
  51842. ;
  51843. _proto23.addStage = function addStage(arg, global) {
  51844. if (typeof arg === 'function') {
  51845. this.stages.push(arg, []);
  51846. } else {
  51847. this.stages.push([]);
  51848. this.add(arg, global);
  51849. }
  51850. };
  51851. _proto23.setFeatureOverrides = function setFeatureOverrides(features) {
  51852. if (Array.isArray(features)) {
  51853. this.add(features);
  51854. } else if (typeof features === 'object') {
  51855. for (var tag in features) {
  51856. if (features[tag]) {
  51857. this.add(tag);
  51858. } else if (this.allFeatures[tag] != null) {
  51859. var stage = this.stages[this.allFeatures[tag]];
  51860. stage.splice(stage.indexOf(tag), 1);
  51861. delete this.allFeatures[tag];
  51862. delete this.globalFeatures[tag];
  51863. }
  51864. }
  51865. }
  51866. }
  51867. /**
  51868. * Assigns the global features to the given glyphs
  51869. */
  51870. ;
  51871. _proto23.assignGlobalFeatures = function assignGlobalFeatures(glyphs) {
  51872. for (var _iterator34 = _createForOfIteratorHelperLoose(glyphs), _step34; !(_step34 = _iterator34()).done;) {
  51873. var glyph = _step34.value;
  51874. for (var feature in this.globalFeatures) {
  51875. glyph.features[feature] = true;
  51876. }
  51877. }
  51878. }
  51879. /**
  51880. * Executes the planned stages using the given OTProcessor
  51881. */
  51882. ;
  51883. _proto23.process = function process(processor, glyphs, positions) {
  51884. for (var _iterator35 = _createForOfIteratorHelperLoose(this.stages), _step35; !(_step35 = _iterator35()).done;) {
  51885. var stage = _step35.value;
  51886. if (typeof stage === 'function') {
  51887. if (!positions) {
  51888. stage(this.font, glyphs, this);
  51889. }
  51890. } else if (stage.length > 0) {
  51891. processor.applyFeatures(stage, glyphs, positions);
  51892. }
  51893. }
  51894. };
  51895. return ShapingPlan;
  51896. }();
  51897. var VARIATION_FEATURES = ['rvrn'];
  51898. var COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk'];
  51899. var FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom'];
  51900. var HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern'];
  51901. var DIRECTIONAL_FEATURES = {
  51902. ltr: ['ltra', 'ltrm'],
  51903. rtl: ['rtla', 'rtlm']
  51904. };
  51905. var DefaultShaper = /*#__PURE__*/function () {
  51906. function DefaultShaper() {}
  51907. DefaultShaper.plan = function plan(_plan, glyphs, features) {
  51908. // Plan the features we want to apply
  51909. this.planPreprocessing(_plan);
  51910. this.planFeatures(_plan);
  51911. this.planPostprocessing(_plan, features); // Assign the global features to all the glyphs
  51912. _plan.assignGlobalFeatures(glyphs); // Assign local features to glyphs
  51913. this.assignFeatures(_plan, glyphs);
  51914. };
  51915. DefaultShaper.planPreprocessing = function planPreprocessing(plan) {
  51916. plan.add({
  51917. global: [].concat(VARIATION_FEATURES, DIRECTIONAL_FEATURES[plan.direction]),
  51918. local: FRACTIONAL_FEATURES
  51919. });
  51920. };
  51921. DefaultShaper.planFeatures = function planFeatures(plan) {// Do nothing by default. Let subclasses override this.
  51922. };
  51923. DefaultShaper.planPostprocessing = function planPostprocessing(plan, userFeatures) {
  51924. plan.add([].concat(COMMON_FEATURES, HORIZONTAL_FEATURES));
  51925. plan.setFeatureOverrides(userFeatures);
  51926. };
  51927. DefaultShaper.assignFeatures = function assignFeatures(plan, glyphs) {
  51928. // Enable contextual fractions
  51929. for (var i = 0; i < glyphs.length; i++) {
  51930. var glyph = glyphs[i];
  51931. if (glyph.codePoints[0] === 0x2044) {
  51932. // fraction slash
  51933. var start = i;
  51934. var end = i + 1; // Apply numerator
  51935. while (start > 0 && unicode.isDigit(glyphs[start - 1].codePoints[0])) {
  51936. glyphs[start - 1].features.numr = true;
  51937. glyphs[start - 1].features.frac = true;
  51938. start--;
  51939. } // Apply denominator
  51940. while (end < glyphs.length && unicode.isDigit(glyphs[end].codePoints[0])) {
  51941. glyphs[end].features.dnom = true;
  51942. glyphs[end].features.frac = true;
  51943. end++;
  51944. } // Apply fraction slash
  51945. glyph.features.frac = true;
  51946. i = end - 1;
  51947. }
  51948. }
  51949. };
  51950. return DefaultShaper;
  51951. }();
  51952. _defineProperty(DefaultShaper, "zeroMarkWidths", 'AFTER_GPOS');
  51953. var trie = new UnicodeTrie(Buffer("APABAAAAAAAAOAAAAf0BAv7tmi1MxDAUx7vtvjhAgcDgkEgEAnmXEBIMCYaEcygEiqBQ4FAkCE4ikUgMiiBJSAgSiUQSDMn9L9eSl6bddddug9t7yS/trevre+3r27pcNxZiG+yCfdCVv/9LeQxOwRm4AJegD27ALbgD9+ABPJF+z+BN/h7yDj5k/VOWX6SdmU5+wLWknggxDxaS8u0qiiX4uiz9XamQ3wzDMAzDMAzDMAzDVI/h959V/v7BMAzDMAzDMLlyNTNiMSdewVxbiA44B4/guz1qW58VYlMI0WsJ0W+N6kXw0spvPtdwhtkwnGM6uLaV4Xyzg3v3PM9DPfQ/sOg4xPWjipy31P8LTqbU304c/cLCUmWJLNB2Uz2U1KTeRKNmKHVMfbJC+/0loTZRH/W5cvEvBJPMbREkWt3FD1NcqXZBSpuE2Ad0PBehPtNrPtIEdYP+hiRt/V1jIiE69X4NT/uVZI3PUHE9bm5M7ePGdZWy951v7Nn6j8v1WWKP3mt6ttnsigx6VN7Vc0VomSSGqW2mGNP1muZPl7LfjNUaKNFtDGVf2fvE9O7VlBS5j333c5p/eeoOqcs1R/hIqDWLJ7TTlksirVT1SI7l8k4Yp+g3jafGcrU1RM6l9th80XOpnlN97bDNY4i4s61B0Si/ipa0uHMl6zqEjlFfCZm/TM8KmzQDjmuTAQ==","base64"));
  51954. var FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init'];
  51955. var ShapingClasses = {
  51956. Non_Joining: 0,
  51957. Left_Joining: 1,
  51958. Right_Joining: 2,
  51959. Dual_Joining: 3,
  51960. Join_Causing: 3,
  51961. ALAPH: 4,
  51962. 'DALATH RISH': 5,
  51963. Transparent: 6
  51964. };
  51965. var ISOL = 'isol';
  51966. var FINA = 'fina';
  51967. var FIN2 = 'fin2';
  51968. var FIN3 = 'fin3';
  51969. var MEDI = 'medi';
  51970. var MED2 = 'med2';
  51971. var INIT = 'init';
  51972. var NONE = null; // Each entry is [prevAction, curAction, nextState]
  51973. var STATE_TABLE = [// Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH
  51974. // State 0: prev was U, not willing to join.
  51975. [[NONE, NONE, 0], [NONE, ISOL, 2], [NONE, ISOL, 1], [NONE, ISOL, 2], [NONE, ISOL, 1], [NONE, ISOL, 6]], // State 1: prev was R or ISOL/ALAPH, not willing to join.
  51976. [[NONE, NONE, 0], [NONE, ISOL, 2], [NONE, ISOL, 1], [NONE, ISOL, 2], [NONE, FIN2, 5], [NONE, ISOL, 6]], // State 2: prev was D/L in ISOL form, willing to join.
  51977. [[NONE, NONE, 0], [NONE, ISOL, 2], [INIT, FINA, 1], [INIT, FINA, 3], [INIT, FINA, 4], [INIT, FINA, 6]], // State 3: prev was D in FINA form, willing to join.
  51978. [[NONE, NONE, 0], [NONE, ISOL, 2], [MEDI, FINA, 1], [MEDI, FINA, 3], [MEDI, FINA, 4], [MEDI, FINA, 6]], // State 4: prev was FINA ALAPH, not willing to join.
  51979. [[NONE, NONE, 0], [NONE, ISOL, 2], [MED2, ISOL, 1], [MED2, ISOL, 2], [MED2, FIN2, 5], [MED2, ISOL, 6]], // State 5: prev was FIN2/FIN3 ALAPH, not willing to join.
  51980. [[NONE, NONE, 0], [NONE, ISOL, 2], [ISOL, ISOL, 1], [ISOL, ISOL, 2], [ISOL, FIN2, 5], [ISOL, ISOL, 6]], // State 6: prev was DALATH/RISH, not willing to join.
  51981. [[NONE, NONE, 0], [NONE, ISOL, 2], [NONE, ISOL, 1], [NONE, ISOL, 2], [NONE, FIN3, 5], [NONE, ISOL, 6]]];
  51982. /**
  51983. * This is a shaper for Arabic, and other cursive scripts.
  51984. * It uses data from ArabicShaping.txt in the Unicode database,
  51985. * compiled to a UnicodeTrie by generate-data.coffee.
  51986. *
  51987. * The shaping state machine was ported from Harfbuzz.
  51988. * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc
  51989. */
  51990. var ArabicShaper = /*#__PURE__*/function (_DefaultShaper) {
  51991. _inheritsLoose(ArabicShaper, _DefaultShaper);
  51992. function ArabicShaper() {
  51993. return _DefaultShaper.apply(this, arguments) || this;
  51994. }
  51995. ArabicShaper.planFeatures = function planFeatures(plan) {
  51996. plan.add(['ccmp', 'locl']);
  51997. for (var i = 0; i < FEATURES.length; i++) {
  51998. var feature = FEATURES[i];
  51999. plan.addStage(feature, false);
  52000. }
  52001. plan.addStage('mset');
  52002. };
  52003. ArabicShaper.assignFeatures = function assignFeatures(plan, glyphs) {
  52004. _DefaultShaper.assignFeatures.call(this, plan, glyphs);
  52005. var prev = -1;
  52006. var state = 0;
  52007. var actions = []; // Apply the state machine to map glyphs to features
  52008. for (var i = 0; i < glyphs.length; i++) {
  52009. var curAction = void 0,
  52010. prevAction = void 0;
  52011. var glyph = glyphs[i];
  52012. var type = getShapingClass(glyph.codePoints[0]);
  52013. if (type === ShapingClasses.Transparent) {
  52014. actions[i] = NONE;
  52015. continue;
  52016. }
  52017. var _STATE_TABLE$state$ty = STATE_TABLE[state][type];
  52018. prevAction = _STATE_TABLE$state$ty[0];
  52019. curAction = _STATE_TABLE$state$ty[1];
  52020. state = _STATE_TABLE$state$ty[2];
  52021. if (prevAction !== NONE && prev !== -1) {
  52022. actions[prev] = prevAction;
  52023. }
  52024. actions[i] = curAction;
  52025. prev = i;
  52026. } // Apply the chosen features to their respective glyphs
  52027. for (var index = 0; index < glyphs.length; index++) {
  52028. var feature = void 0;
  52029. var glyph = glyphs[index];
  52030. if (feature = actions[index]) {
  52031. glyph.features[feature] = true;
  52032. }
  52033. }
  52034. };
  52035. return ArabicShaper;
  52036. }(DefaultShaper);
  52037. function getShapingClass(codePoint) {
  52038. var res = trie.get(codePoint);
  52039. if (res) {
  52040. return res - 1;
  52041. }
  52042. var category = unicode.getCategory(codePoint);
  52043. if (category === 'Mn' || category === 'Me' || category === 'Cf') {
  52044. return ShapingClasses.Transparent;
  52045. }
  52046. return ShapingClasses.Non_Joining;
  52047. }
  52048. var GlyphIterator = /*#__PURE__*/function () {
  52049. function GlyphIterator(glyphs, options) {
  52050. this.glyphs = glyphs;
  52051. this.reset(options);
  52052. }
  52053. var _proto24 = GlyphIterator.prototype;
  52054. _proto24.reset = function reset(options, index) {
  52055. if (options === void 0) {
  52056. options = {};
  52057. }
  52058. if (index === void 0) {
  52059. index = 0;
  52060. }
  52061. this.options = options;
  52062. this.flags = options.flags || {};
  52063. this.markAttachmentType = options.markAttachmentType || 0;
  52064. this.index = index;
  52065. };
  52066. _proto24.shouldIgnore = function shouldIgnore(glyph) {
  52067. return this.flags.ignoreMarks && glyph.isMark || this.flags.ignoreBaseGlyphs && glyph.isBase || this.flags.ignoreLigatures && glyph.isLigature || this.markAttachmentType && glyph.isMark && glyph.markAttachmentType !== this.markAttachmentType;
  52068. };
  52069. _proto24.move = function move(dir) {
  52070. this.index += dir;
  52071. while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index])) {
  52072. this.index += dir;
  52073. }
  52074. if (0 > this.index || this.index >= this.glyphs.length) {
  52075. return null;
  52076. }
  52077. return this.glyphs[this.index];
  52078. };
  52079. _proto24.next = function next() {
  52080. return this.move(+1);
  52081. };
  52082. _proto24.prev = function prev() {
  52083. return this.move(-1);
  52084. };
  52085. _proto24.peek = function peek(count) {
  52086. if (count === void 0) {
  52087. count = 1;
  52088. }
  52089. var idx = this.index;
  52090. var res = this.increment(count);
  52091. this.index = idx;
  52092. return res;
  52093. };
  52094. _proto24.peekIndex = function peekIndex(count) {
  52095. if (count === void 0) {
  52096. count = 1;
  52097. }
  52098. var idx = this.index;
  52099. this.increment(count);
  52100. var res = this.index;
  52101. this.index = idx;
  52102. return res;
  52103. };
  52104. _proto24.increment = function increment(count) {
  52105. if (count === void 0) {
  52106. count = 1;
  52107. }
  52108. var dir = count < 0 ? -1 : 1;
  52109. count = Math.abs(count);
  52110. while (count--) {
  52111. this.move(dir);
  52112. }
  52113. return this.glyphs[this.index];
  52114. };
  52115. _createClass(GlyphIterator, [{
  52116. key: "cur",
  52117. get: function get() {
  52118. return this.glyphs[this.index] || null;
  52119. }
  52120. }]);
  52121. return GlyphIterator;
  52122. }();
  52123. var DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn'];
  52124. var OTProcessor = /*#__PURE__*/function () {
  52125. function OTProcessor(font, table) {
  52126. this.font = font;
  52127. this.table = table;
  52128. this.script = null;
  52129. this.scriptTag = null;
  52130. this.language = null;
  52131. this.languageTag = null;
  52132. this.features = {};
  52133. this.lookups = {}; // Setup variation substitutions
  52134. this.variationsIndex = font._variationProcessor ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) : -1; // initialize to default script + language
  52135. this.selectScript(); // current context (set by applyFeatures)
  52136. this.glyphs = [];
  52137. this.positions = []; // only used by GPOS
  52138. this.ligatureID = 1;
  52139. this.currentFeature = null;
  52140. }
  52141. var _proto25 = OTProcessor.prototype;
  52142. _proto25.findScript = function findScript(script) {
  52143. if (this.table.scriptList == null) {
  52144. return null;
  52145. }
  52146. if (!Array.isArray(script)) {
  52147. script = [script];
  52148. }
  52149. for (var _iterator36 = _createForOfIteratorHelperLoose(script), _step36; !(_step36 = _iterator36()).done;) {
  52150. var s = _step36.value;
  52151. for (var _iterator37 = _createForOfIteratorHelperLoose(this.table.scriptList), _step37; !(_step37 = _iterator37()).done;) {
  52152. var entry = _step37.value;
  52153. if (entry.tag === s) {
  52154. return entry;
  52155. }
  52156. }
  52157. }
  52158. return null;
  52159. };
  52160. _proto25.selectScript = function selectScript(script, language, direction$1) {
  52161. var changed = false;
  52162. var entry;
  52163. if (!this.script || script !== this.scriptTag) {
  52164. entry = this.findScript(script);
  52165. if (!entry) {
  52166. entry = this.findScript(DEFAULT_SCRIPTS);
  52167. }
  52168. if (!entry) {
  52169. return this.scriptTag;
  52170. }
  52171. this.scriptTag = entry.tag;
  52172. this.script = entry.script;
  52173. this.language = null;
  52174. this.languageTag = null;
  52175. changed = true;
  52176. }
  52177. if (!direction$1 || direction$1 !== this.direction) {
  52178. this.direction = direction$1 || direction(script);
  52179. }
  52180. if (language && language.length < 4) {
  52181. language += ' '.repeat(4 - language.length);
  52182. }
  52183. if (!language || language !== this.languageTag) {
  52184. this.language = null;
  52185. for (var _iterator38 = _createForOfIteratorHelperLoose(this.script.langSysRecords), _step38; !(_step38 = _iterator38()).done;) {
  52186. var lang = _step38.value;
  52187. if (lang.tag === language) {
  52188. this.language = lang.langSys;
  52189. this.languageTag = lang.tag;
  52190. break;
  52191. }
  52192. }
  52193. if (!this.language) {
  52194. this.language = this.script.defaultLangSys;
  52195. this.languageTag = null;
  52196. }
  52197. changed = true;
  52198. } // Build a feature lookup table
  52199. if (changed) {
  52200. this.features = {};
  52201. if (this.language) {
  52202. for (var _iterator39 = _createForOfIteratorHelperLoose(this.language.featureIndexes), _step39; !(_step39 = _iterator39()).done;) {
  52203. var featureIndex = _step39.value;
  52204. var record = this.table.featureList[featureIndex];
  52205. var substituteFeature = this.substituteFeatureForVariations(featureIndex);
  52206. this.features[record.tag] = substituteFeature || record.feature;
  52207. }
  52208. }
  52209. }
  52210. return this.scriptTag;
  52211. };
  52212. _proto25.lookupsForFeatures = function lookupsForFeatures(userFeatures, exclude) {
  52213. if (userFeatures === void 0) {
  52214. userFeatures = [];
  52215. }
  52216. var lookups = [];
  52217. for (var _iterator40 = _createForOfIteratorHelperLoose(userFeatures), _step40; !(_step40 = _iterator40()).done;) {
  52218. var tag = _step40.value;
  52219. var feature = this.features[tag];
  52220. if (!feature) {
  52221. continue;
  52222. }
  52223. for (var _iterator41 = _createForOfIteratorHelperLoose(feature.lookupListIndexes), _step41; !(_step41 = _iterator41()).done;) {
  52224. var lookupIndex = _step41.value;
  52225. if (exclude && exclude.indexOf(lookupIndex) !== -1) {
  52226. continue;
  52227. }
  52228. lookups.push({
  52229. feature: tag,
  52230. index: lookupIndex,
  52231. lookup: this.table.lookupList.get(lookupIndex)
  52232. });
  52233. }
  52234. }
  52235. lookups.sort(function (a, b) {
  52236. return a.index - b.index;
  52237. });
  52238. return lookups;
  52239. };
  52240. _proto25.substituteFeatureForVariations = function substituteFeatureForVariations(featureIndex) {
  52241. if (this.variationsIndex === -1) {
  52242. return null;
  52243. }
  52244. var record = this.table.featureVariations.featureVariationRecords[this.variationsIndex];
  52245. var substitutions = record.featureTableSubstitution.substitutions;
  52246. for (var _iterator42 = _createForOfIteratorHelperLoose(substitutions), _step42; !(_step42 = _iterator42()).done;) {
  52247. var substitution = _step42.value;
  52248. if (substitution.featureIndex === featureIndex) {
  52249. return substitution.alternateFeatureTable;
  52250. }
  52251. }
  52252. return null;
  52253. };
  52254. _proto25.findVariationsIndex = function findVariationsIndex(coords) {
  52255. var variations = this.table.featureVariations;
  52256. if (!variations) {
  52257. return -1;
  52258. }
  52259. var records = variations.featureVariationRecords;
  52260. for (var i = 0; i < records.length; i++) {
  52261. var conditions = records[i].conditionSet.conditionTable;
  52262. if (this.variationConditionsMatch(conditions, coords)) {
  52263. return i;
  52264. }
  52265. }
  52266. return -1;
  52267. };
  52268. _proto25.variationConditionsMatch = function variationConditionsMatch(conditions, coords) {
  52269. return conditions.every(function (condition) {
  52270. var coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0;
  52271. return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue;
  52272. });
  52273. };
  52274. _proto25.applyFeatures = function applyFeatures(userFeatures, glyphs, advances) {
  52275. var lookups = this.lookupsForFeatures(userFeatures);
  52276. this.applyLookups(lookups, glyphs, advances);
  52277. };
  52278. _proto25.applyLookups = function applyLookups(lookups, glyphs, positions) {
  52279. this.glyphs = glyphs;
  52280. this.positions = positions;
  52281. this.glyphIterator = new GlyphIterator(glyphs);
  52282. for (var _iterator43 = _createForOfIteratorHelperLoose(lookups), _step43; !(_step43 = _iterator43()).done;) {
  52283. var _step43$value = _step43.value,
  52284. feature = _step43$value.feature,
  52285. lookup = _step43$value.lookup;
  52286. this.currentFeature = feature;
  52287. this.glyphIterator.reset(lookup.flags);
  52288. while (this.glyphIterator.index < glyphs.length) {
  52289. if (!(feature in this.glyphIterator.cur.features)) {
  52290. this.glyphIterator.next();
  52291. continue;
  52292. }
  52293. for (var _iterator44 = _createForOfIteratorHelperLoose(lookup.subTables), _step44; !(_step44 = _iterator44()).done;) {
  52294. var table = _step44.value;
  52295. var res = this.applyLookup(lookup.lookupType, table);
  52296. if (res) {
  52297. break;
  52298. }
  52299. }
  52300. this.glyphIterator.next();
  52301. }
  52302. }
  52303. };
  52304. _proto25.applyLookup = function applyLookup(lookup, table) {
  52305. throw new Error("applyLookup must be implemented by subclasses");
  52306. };
  52307. _proto25.applyLookupList = function applyLookupList(lookupRecords) {
  52308. var options = this.glyphIterator.options;
  52309. var glyphIndex = this.glyphIterator.index;
  52310. for (var _iterator45 = _createForOfIteratorHelperLoose(lookupRecords), _step45; !(_step45 = _iterator45()).done;) {
  52311. var lookupRecord = _step45.value;
  52312. // Reset flags and find glyph index for this lookup record
  52313. this.glyphIterator.reset(options, glyphIndex);
  52314. this.glyphIterator.increment(lookupRecord.sequenceIndex); // Get the lookup and setup flags for subtables
  52315. var lookup = this.table.lookupList.get(lookupRecord.lookupListIndex);
  52316. this.glyphIterator.reset(lookup.flags, this.glyphIterator.index); // Apply lookup subtables until one matches
  52317. for (var _iterator46 = _createForOfIteratorHelperLoose(lookup.subTables), _step46; !(_step46 = _iterator46()).done;) {
  52318. var table = _step46.value;
  52319. if (this.applyLookup(lookup.lookupType, table)) {
  52320. break;
  52321. }
  52322. }
  52323. }
  52324. this.glyphIterator.reset(options, glyphIndex);
  52325. return true;
  52326. };
  52327. _proto25.coverageIndex = function coverageIndex(coverage, glyph) {
  52328. if (glyph == null) {
  52329. glyph = this.glyphIterator.cur.id;
  52330. }
  52331. switch (coverage.version) {
  52332. case 1:
  52333. return coverage.glyphs.indexOf(glyph);
  52334. case 2:
  52335. for (var _iterator47 = _createForOfIteratorHelperLoose(coverage.rangeRecords), _step47; !(_step47 = _iterator47()).done;) {
  52336. var range = _step47.value;
  52337. if (range.start <= glyph && glyph <= range.end) {
  52338. return range.startCoverageIndex + glyph - range.start;
  52339. }
  52340. }
  52341. break;
  52342. }
  52343. return -1;
  52344. };
  52345. _proto25.match = function match(sequenceIndex, sequence, fn, matched) {
  52346. var pos = this.glyphIterator.index;
  52347. var glyph = this.glyphIterator.increment(sequenceIndex);
  52348. var idx = 0;
  52349. while (idx < sequence.length && glyph && fn(sequence[idx], glyph)) {
  52350. if (matched) {
  52351. matched.push(this.glyphIterator.index);
  52352. }
  52353. idx++;
  52354. glyph = this.glyphIterator.next();
  52355. }
  52356. this.glyphIterator.index = pos;
  52357. if (idx < sequence.length) {
  52358. return false;
  52359. }
  52360. return matched || true;
  52361. };
  52362. _proto25.sequenceMatches = function sequenceMatches(sequenceIndex, sequence) {
  52363. return this.match(sequenceIndex, sequence, function (component, glyph) {
  52364. return component === glyph.id;
  52365. });
  52366. };
  52367. _proto25.sequenceMatchIndices = function sequenceMatchIndices(sequenceIndex, sequence) {
  52368. var _this4 = this;
  52369. return this.match(sequenceIndex, sequence, function (component, glyph) {
  52370. // If the current feature doesn't apply to this glyph,
  52371. if (!(_this4.currentFeature in glyph.features)) {
  52372. return false;
  52373. }
  52374. return component === glyph.id;
  52375. }, []);
  52376. };
  52377. _proto25.coverageSequenceMatches = function coverageSequenceMatches(sequenceIndex, sequence) {
  52378. var _this5 = this;
  52379. return this.match(sequenceIndex, sequence, function (coverage, glyph) {
  52380. return _this5.coverageIndex(coverage, glyph.id) >= 0;
  52381. });
  52382. };
  52383. _proto25.getClassID = function getClassID(glyph, classDef) {
  52384. switch (classDef.version) {
  52385. case 1:
  52386. // Class array
  52387. var i = glyph - classDef.startGlyph;
  52388. if (i >= 0 && i < classDef.classValueArray.length) {
  52389. return classDef.classValueArray[i];
  52390. }
  52391. break;
  52392. case 2:
  52393. for (var _iterator48 = _createForOfIteratorHelperLoose(classDef.classRangeRecord), _step48; !(_step48 = _iterator48()).done;) {
  52394. var range = _step48.value;
  52395. if (range.start <= glyph && glyph <= range.end) {
  52396. return range.class;
  52397. }
  52398. }
  52399. break;
  52400. }
  52401. return 0;
  52402. };
  52403. _proto25.classSequenceMatches = function classSequenceMatches(sequenceIndex, sequence, classDef) {
  52404. var _this6 = this;
  52405. return this.match(sequenceIndex, sequence, function (classID, glyph) {
  52406. return classID === _this6.getClassID(glyph.id, classDef);
  52407. });
  52408. };
  52409. _proto25.applyContext = function applyContext(table) {
  52410. switch (table.version) {
  52411. case 1:
  52412. var index = this.coverageIndex(table.coverage);
  52413. if (index === -1) {
  52414. return false;
  52415. }
  52416. var set = table.ruleSets[index];
  52417. for (var _iterator49 = _createForOfIteratorHelperLoose(set), _step49; !(_step49 = _iterator49()).done;) {
  52418. var rule = _step49.value;
  52419. if (this.sequenceMatches(1, rule.input)) {
  52420. return this.applyLookupList(rule.lookupRecords);
  52421. }
  52422. }
  52423. break;
  52424. case 2:
  52425. if (this.coverageIndex(table.coverage) === -1) {
  52426. return false;
  52427. }
  52428. index = this.getClassID(this.glyphIterator.cur.id, table.classDef);
  52429. if (index === -1) {
  52430. return false;
  52431. }
  52432. set = table.classSet[index];
  52433. for (var _iterator50 = _createForOfIteratorHelperLoose(set), _step50; !(_step50 = _iterator50()).done;) {
  52434. var _rule = _step50.value;
  52435. if (this.classSequenceMatches(1, _rule.classes, table.classDef)) {
  52436. return this.applyLookupList(_rule.lookupRecords);
  52437. }
  52438. }
  52439. break;
  52440. case 3:
  52441. if (this.coverageSequenceMatches(0, table.coverages)) {
  52442. return this.applyLookupList(table.lookupRecords);
  52443. }
  52444. break;
  52445. }
  52446. return false;
  52447. };
  52448. _proto25.applyChainingContext = function applyChainingContext(table) {
  52449. switch (table.version) {
  52450. case 1:
  52451. var index = this.coverageIndex(table.coverage);
  52452. if (index === -1) {
  52453. return false;
  52454. }
  52455. var set = table.chainRuleSets[index];
  52456. for (var _iterator51 = _createForOfIteratorHelperLoose(set), _step51; !(_step51 = _iterator51()).done;) {
  52457. var rule = _step51.value;
  52458. if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) && this.sequenceMatches(1, rule.input) && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) {
  52459. return this.applyLookupList(rule.lookupRecords);
  52460. }
  52461. }
  52462. break;
  52463. case 2:
  52464. if (this.coverageIndex(table.coverage) === -1) {
  52465. return false;
  52466. }
  52467. index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef);
  52468. var rules = table.chainClassSet[index];
  52469. if (!rules) {
  52470. return false;
  52471. }
  52472. for (var _iterator52 = _createForOfIteratorHelperLoose(rules), _step52; !(_step52 = _iterator52()).done;) {
  52473. var _rule2 = _step52.value;
  52474. if (this.classSequenceMatches(-_rule2.backtrack.length, _rule2.backtrack, table.backtrackClassDef) && this.classSequenceMatches(1, _rule2.input, table.inputClassDef) && this.classSequenceMatches(1 + _rule2.input.length, _rule2.lookahead, table.lookaheadClassDef)) {
  52475. return this.applyLookupList(_rule2.lookupRecords);
  52476. }
  52477. }
  52478. break;
  52479. case 3:
  52480. if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && this.coverageSequenceMatches(0, table.inputCoverage) && this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) {
  52481. return this.applyLookupList(table.lookupRecords);
  52482. }
  52483. break;
  52484. }
  52485. return false;
  52486. };
  52487. return OTProcessor;
  52488. }();
  52489. var GlyphInfo = /*#__PURE__*/function () {
  52490. function GlyphInfo(font, id, codePoints, features) {
  52491. if (codePoints === void 0) {
  52492. codePoints = [];
  52493. }
  52494. this._font = font;
  52495. this.codePoints = codePoints;
  52496. this.id = id;
  52497. this.features = {};
  52498. if (Array.isArray(features)) {
  52499. for (var i = 0; i < features.length; i++) {
  52500. var feature = features[i];
  52501. this.features[feature] = true;
  52502. }
  52503. } else if (typeof features === 'object') {
  52504. Object.assign(this.features, features);
  52505. }
  52506. this.ligatureID = null;
  52507. this.ligatureComponent = null;
  52508. this.isLigated = false;
  52509. this.cursiveAttachment = null;
  52510. this.markAttachment = null;
  52511. this.shaperInfo = null;
  52512. this.substituted = false;
  52513. this.isMultiplied = false;
  52514. }
  52515. var _proto26 = GlyphInfo.prototype;
  52516. _proto26.copy = function copy() {
  52517. return new GlyphInfo(this._font, this.id, this.codePoints, this.features);
  52518. };
  52519. _createClass(GlyphInfo, [{
  52520. key: "id",
  52521. get: function get() {
  52522. return this._id;
  52523. },
  52524. set: function set(id) {
  52525. this._id = id;
  52526. this.substituted = true;
  52527. var GDEF = this._font.GDEF;
  52528. if (GDEF && GDEF.glyphClassDef) {
  52529. // TODO: clean this up
  52530. var classID = OTProcessor.prototype.getClassID(id, GDEF.glyphClassDef);
  52531. this.isBase = classID === 1;
  52532. this.isLigature = classID === 2;
  52533. this.isMark = classID === 3;
  52534. this.markAttachmentType = GDEF.markAttachClassDef ? OTProcessor.prototype.getClassID(id, GDEF.markAttachClassDef) : 0;
  52535. } else {
  52536. this.isMark = this.codePoints.length > 0 && this.codePoints.every(unicode.isMark);
  52537. this.isBase = !this.isMark;
  52538. this.isLigature = this.codePoints.length > 1;
  52539. this.markAttachmentType = 0;
  52540. }
  52541. }
  52542. }]);
  52543. return GlyphInfo;
  52544. }();
  52545. /**
  52546. * This is a shaper for the Hangul script, used by the Korean language.
  52547. * It does the following:
  52548. * - decompose if unsupported by the font:
  52549. * <LV> -> <L,V>
  52550. * <LVT> -> <L,V,T>
  52551. * <LV,T> -> <L,V,T>
  52552. *
  52553. * - compose if supported by the font:
  52554. * <L,V> -> <LV>
  52555. * <L,V,T> -> <LVT>
  52556. * <LV,T> -> <LVT>
  52557. *
  52558. * - reorder tone marks (S is any valid syllable):
  52559. * <S, M> -> <M, S>
  52560. *
  52561. * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.
  52562. *
  52563. * This logic is based on the following documents:
  52564. * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm
  52565. * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf
  52566. */
  52567. var HangulShaper = /*#__PURE__*/function (_DefaultShaper2) {
  52568. _inheritsLoose(HangulShaper, _DefaultShaper2);
  52569. function HangulShaper() {
  52570. return _DefaultShaper2.apply(this, arguments) || this;
  52571. }
  52572. HangulShaper.planFeatures = function planFeatures(plan) {
  52573. plan.add(['ljmo', 'vjmo', 'tjmo'], false);
  52574. };
  52575. HangulShaper.assignFeatures = function assignFeatures(plan, glyphs) {
  52576. var state = 0;
  52577. var i = 0;
  52578. while (i < glyphs.length) {
  52579. var action = void 0;
  52580. var glyph = glyphs[i];
  52581. var code = glyph.codePoints[0];
  52582. var type = getType(code);
  52583. var _STATE_TABLE$1$state$ = STATE_TABLE$1[state][type];
  52584. action = _STATE_TABLE$1$state$[0];
  52585. state = _STATE_TABLE$1$state$[1];
  52586. switch (action) {
  52587. case DECOMPOSE:
  52588. // Decompose the composed syllable if it is not supported by the font.
  52589. if (!plan.font.hasGlyphForCodePoint(code)) {
  52590. i = decompose(glyphs, i, plan.font);
  52591. }
  52592. break;
  52593. case COMPOSE:
  52594. // Found a decomposed syllable. Try to compose if supported by the font.
  52595. i = compose(glyphs, i, plan.font);
  52596. break;
  52597. case TONE_MARK:
  52598. // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable.
  52599. reorderToneMark(glyphs, i, plan.font);
  52600. break;
  52601. case INVALID:
  52602. // Tone mark has no valid syllable to attach to, so insert a dotted circle
  52603. i = insertDottedCircle(glyphs, i, plan.font);
  52604. break;
  52605. }
  52606. i++;
  52607. }
  52608. };
  52609. return HangulShaper;
  52610. }(DefaultShaper);
  52611. _defineProperty(HangulShaper, "zeroMarkWidths", 'NONE');
  52612. var HANGUL_BASE = 0xac00;
  52613. var HANGUL_END = 0xd7a4;
  52614. var HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1;
  52615. var L_BASE = 0x1100; // lead
  52616. var V_BASE = 0x1161; // vowel
  52617. var T_BASE = 0x11a7; // trail
  52618. var L_COUNT = 19;
  52619. var V_COUNT = 21;
  52620. var T_COUNT = 28;
  52621. var L_END = L_BASE + L_COUNT - 1;
  52622. var V_END = V_BASE + V_COUNT - 1;
  52623. var T_END = T_BASE + T_COUNT - 1;
  52624. var DOTTED_CIRCLE = 0x25cc;
  52625. var isL = function isL(code) {
  52626. return 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c;
  52627. };
  52628. var isV = function isV(code) {
  52629. return 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6;
  52630. };
  52631. var isT = function isT(code) {
  52632. return 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb;
  52633. };
  52634. var isTone = function isTone(code) {
  52635. return 0x302e <= code && code <= 0x302f;
  52636. };
  52637. var isLVT = function isLVT(code) {
  52638. return HANGUL_BASE <= code && code <= HANGUL_END;
  52639. };
  52640. var isLV = function isLV(code) {
  52641. return code - HANGUL_BASE < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0;
  52642. };
  52643. var isCombiningL = function isCombiningL(code) {
  52644. return L_BASE <= code && code <= L_END;
  52645. };
  52646. var isCombiningV = function isCombiningV(code) {
  52647. return V_BASE <= code && code <= V_END;
  52648. };
  52649. var isCombiningT = function isCombiningT(code) {
  52650. return 1 <= code && code <= T_END;
  52651. }; // Character categories
  52652. var X = 0; // Other character
  52653. var L = 1; // Leading consonant
  52654. var V = 2; // Medial vowel
  52655. var T = 3; // Trailing consonant
  52656. var LV = 4; // Composed <LV> syllable
  52657. var LVT = 5; // Composed <LVT> syllable
  52658. var M = 6; // Tone mark
  52659. // This function classifies a character using the above categories.
  52660. function getType(code) {
  52661. if (isL(code)) {
  52662. return L;
  52663. }
  52664. if (isV(code)) {
  52665. return V;
  52666. }
  52667. if (isT(code)) {
  52668. return T;
  52669. }
  52670. if (isLV(code)) {
  52671. return LV;
  52672. }
  52673. if (isLVT(code)) {
  52674. return LVT;
  52675. }
  52676. if (isTone(code)) {
  52677. return M;
  52678. }
  52679. return X;
  52680. } // State machine actions
  52681. var NO_ACTION = 0;
  52682. var DECOMPOSE = 1;
  52683. var COMPOSE = 2;
  52684. var TONE_MARK = 4;
  52685. var INVALID = 5; // Build a state machine that accepts valid syllables, and applies actions along the way.
  52686. // The logic this is implementing is documented at the top of the file.
  52687. var STATE_TABLE$1 = [// X L V T LV LVT M
  52688. // State 0: start state
  52689. [[NO_ACTION, 0], [NO_ACTION, 1], [NO_ACTION, 0], [NO_ACTION, 0], [DECOMPOSE, 2], [DECOMPOSE, 3], [INVALID, 0]], // State 1: <L>
  52690. [[NO_ACTION, 0], [NO_ACTION, 1], [COMPOSE, 2], [NO_ACTION, 0], [DECOMPOSE, 2], [DECOMPOSE, 3], [INVALID, 0]], // State 2: <L,V> or <LV>
  52691. [[NO_ACTION, 0], [NO_ACTION, 1], [NO_ACTION, 0], [COMPOSE, 3], [DECOMPOSE, 2], [DECOMPOSE, 3], [TONE_MARK, 0]], // State 3: <L,V,T> or <LVT>
  52692. [[NO_ACTION, 0], [NO_ACTION, 1], [NO_ACTION, 0], [NO_ACTION, 0], [DECOMPOSE, 2], [DECOMPOSE, 3], [TONE_MARK, 0]]];
  52693. function getGlyph(font, code, features) {
  52694. return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features);
  52695. }
  52696. function decompose(glyphs, i, font) {
  52697. var glyph = glyphs[i];
  52698. var code = glyph.codePoints[0];
  52699. var s = code - HANGUL_BASE;
  52700. var t = T_BASE + s % T_COUNT;
  52701. s = s / T_COUNT | 0;
  52702. var l = L_BASE + s / V_COUNT | 0;
  52703. var v = V_BASE + s % V_COUNT; // Don't decompose if all of the components are not available
  52704. if (!font.hasGlyphForCodePoint(l) || !font.hasGlyphForCodePoint(v) || t !== T_BASE && !font.hasGlyphForCodePoint(t)) {
  52705. return i;
  52706. } // Replace the current glyph with decomposed L, V, and T glyphs,
  52707. // and apply the proper OpenType features to each component.
  52708. var ljmo = getGlyph(font, l, glyph.features);
  52709. ljmo.features.ljmo = true;
  52710. var vjmo = getGlyph(font, v, glyph.features);
  52711. vjmo.features.vjmo = true;
  52712. var insert = [ljmo, vjmo];
  52713. if (t > T_BASE) {
  52714. var tjmo = getGlyph(font, t, glyph.features);
  52715. tjmo.features.tjmo = true;
  52716. insert.push(tjmo);
  52717. }
  52718. glyphs.splice.apply(glyphs, [i, 1].concat(insert));
  52719. return i + insert.length - 1;
  52720. }
  52721. function compose(glyphs, i, font) {
  52722. var glyph = glyphs[i];
  52723. var code = glyphs[i].codePoints[0];
  52724. var type = getType(code);
  52725. var prev = glyphs[i - 1].codePoints[0];
  52726. var prevType = getType(prev); // Figure out what type of syllable we're dealing with
  52727. var lv, ljmo, vjmo, tjmo;
  52728. if (prevType === LV && type === T) {
  52729. // <LV,T>
  52730. lv = prev;
  52731. tjmo = glyph;
  52732. } else {
  52733. if (type === V) {
  52734. // <L,V>
  52735. ljmo = glyphs[i - 1];
  52736. vjmo = glyph;
  52737. } else {
  52738. // <L,V,T>
  52739. ljmo = glyphs[i - 2];
  52740. vjmo = glyphs[i - 1];
  52741. tjmo = glyph;
  52742. }
  52743. var l = ljmo.codePoints[0];
  52744. var v = vjmo.codePoints[0]; // Make sure L and V are combining characters
  52745. if (isCombiningL(l) && isCombiningV(v)) {
  52746. lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT;
  52747. }
  52748. }
  52749. var t = tjmo && tjmo.codePoints[0] || T_BASE;
  52750. if (lv != null && (t === T_BASE || isCombiningT(t))) {
  52751. var s = lv + (t - T_BASE); // Replace with a composed glyph if supported by the font,
  52752. // otherwise apply the proper OpenType features to each component.
  52753. if (font.hasGlyphForCodePoint(s)) {
  52754. var del = prevType === V ? 3 : 2;
  52755. glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features));
  52756. return i - del + 1;
  52757. }
  52758. } // Didn't compose (either a non-combining component or unsupported by font).
  52759. if (ljmo) {
  52760. ljmo.features.ljmo = true;
  52761. }
  52762. if (vjmo) {
  52763. vjmo.features.vjmo = true;
  52764. }
  52765. if (tjmo) {
  52766. tjmo.features.tjmo = true;
  52767. }
  52768. if (prevType === LV) {
  52769. // Sequence was originally <L,V>, which got combined earlier.
  52770. // Either the T was non-combining, or the LVT glyph wasn't supported.
  52771. // Decompose the glyph again and apply OT features.
  52772. decompose(glyphs, i - 1, font);
  52773. return i + 1;
  52774. }
  52775. return i;
  52776. }
  52777. function getLength(code) {
  52778. switch (getType(code)) {
  52779. case LV:
  52780. case LVT:
  52781. return 1;
  52782. case V:
  52783. return 2;
  52784. case T:
  52785. return 3;
  52786. }
  52787. }
  52788. function reorderToneMark(glyphs, i, font) {
  52789. var glyph = glyphs[i];
  52790. var code = glyphs[i].codePoints[0]; // Move tone mark to the beginning of the previous syllable, unless it is zero width
  52791. if (font.glyphForCodePoint(code).advanceWidth === 0) {
  52792. return;
  52793. }
  52794. var prev = glyphs[i - 1].codePoints[0];
  52795. var len = getLength(prev);
  52796. glyphs.splice(i, 1);
  52797. return glyphs.splice(i - len, 0, glyph);
  52798. }
  52799. function insertDottedCircle(glyphs, i, font) {
  52800. var glyph = glyphs[i];
  52801. var code = glyphs[i].codePoints[0];
  52802. if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) {
  52803. var dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features); // If the tone mark is zero width, insert the dotted circle before, otherwise after
  52804. var idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1;
  52805. glyphs.splice(idx, 0, dottedCircle);
  52806. i++;
  52807. }
  52808. return i;
  52809. }
  52810. var stateTable = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 11, 12, 13, 14, 15, 16, 17], [0, 0, 0, 18, 19, 20, 21, 22, 23, 0, 24, 0, 0, 25, 26, 0, 0, 27, 0], [0, 0, 0, 28, 29, 30, 31, 32, 33, 0, 34, 0, 0, 35, 36, 0, 0, 37, 0], [0, 0, 0, 38, 5, 7, 7, 8, 9, 0, 10, 0, 0, 0, 13, 0, 0, 16, 0], [0, 39, 0, 0, 0, 40, 41, 0, 9, 0, 10, 0, 0, 0, 42, 0, 39, 0, 0], [0, 0, 0, 0, 43, 44, 44, 8, 9, 0, 0, 0, 0, 12, 43, 0, 0, 0, 0], [0, 0, 0, 0, 43, 44, 44, 8, 9, 0, 0, 0, 0, 0, 43, 0, 0, 0, 0], [0, 0, 0, 45, 46, 47, 48, 49, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 50, 0, 0, 51, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 53, 54, 55, 56, 57, 58, 0, 59, 0, 0, 60, 61, 0, 0, 62, 0], [0, 0, 0, 4, 5, 7, 7, 8, 9, 0, 10, 0, 0, 0, 13, 0, 0, 16, 0], [0, 63, 64, 0, 0, 40, 41, 0, 9, 0, 10, 0, 0, 0, 42, 0, 63, 0, 0], [0, 2, 3, 4, 5, 6, 7, 8, 9, 0, 10, 11, 11, 12, 13, 0, 2, 16, 0], [0, 0, 0, 18, 65, 20, 21, 22, 23, 0, 24, 0, 0, 25, 26, 0, 0, 27, 0], [0, 0, 0, 0, 66, 67, 67, 8, 9, 0, 10, 0, 0, 0, 68, 0, 0, 0, 0], [0, 0, 0, 69, 0, 70, 70, 0, 71, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 73, 19, 74, 74, 22, 23, 0, 24, 0, 0, 0, 26, 0, 0, 27, 0], [0, 75, 0, 0, 0, 76, 77, 0, 23, 0, 24, 0, 0, 0, 78, 0, 75, 0, 0], [0, 0, 0, 0, 79, 80, 80, 22, 23, 0, 0, 0, 0, 25, 79, 0, 0, 0, 0], [0, 0, 0, 18, 19, 20, 74, 22, 23, 0, 24, 0, 0, 25, 26, 0, 0, 27, 0], [0, 0, 0, 81, 82, 83, 84, 85, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 86, 0, 0, 87, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 88, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 18, 19, 74, 74, 22, 23, 0, 24, 0, 0, 0, 26, 0, 0, 27, 0], [0, 89, 90, 0, 0, 76, 77, 0, 23, 0, 24, 0, 0, 0, 78, 0, 89, 0, 0], [0, 0, 0, 0, 91, 92, 92, 22, 23, 0, 24, 0, 0, 0, 93, 0, 0, 0, 0], [0, 0, 0, 94, 29, 95, 31, 32, 33, 0, 34, 0, 0, 0, 36, 0, 0, 37, 0], [0, 96, 0, 0, 0, 97, 98, 0, 33, 0, 34, 0, 0, 0, 99, 0, 96, 0, 0], [0, 0, 0, 0, 100, 101, 101, 32, 33, 0, 0, 0, 0, 35, 100, 0, 0, 0, 0], [0, 0, 0, 0, 100, 101, 101, 32, 33, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0], [0, 0, 0, 102, 103, 104, 105, 106, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 107, 0, 0, 108, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 28, 29, 95, 31, 32, 33, 0, 34, 0, 0, 0, 36, 0, 0, 37, 0], [0, 110, 111, 0, 0, 97, 98, 0, 33, 0, 34, 0, 0, 0, 99, 0, 110, 0, 0], [0, 0, 0, 0, 112, 113, 113, 32, 33, 0, 34, 0, 0, 0, 114, 0, 0, 0, 0], [0, 0, 0, 0, 5, 7, 7, 8, 9, 0, 10, 0, 0, 0, 13, 0, 0, 16, 0], [0, 0, 0, 115, 116, 117, 118, 8, 9, 0, 10, 0, 0, 119, 120, 0, 0, 16, 0], [0, 0, 0, 0, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 39, 0, 122, 0, 123, 123, 8, 9, 0, 10, 0, 0, 0, 42, 0, 39, 0, 0], [0, 124, 64, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 124, 0, 0], [0, 39, 0, 0, 0, 121, 125, 0, 9, 0, 10, 0, 0, 0, 42, 0, 39, 0, 0], [0, 0, 0, 0, 0, 126, 126, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 46, 47, 48, 49, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 47, 47, 49, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 127, 127, 49, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 128, 127, 127, 49, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 129, 130, 131, 132, 133, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 134, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 135, 54, 56, 56, 57, 58, 0, 59, 0, 0, 0, 61, 0, 0, 62, 0], [0, 136, 0, 0, 0, 137, 138, 0, 58, 0, 59, 0, 0, 0, 139, 0, 136, 0, 0], [0, 0, 0, 0, 140, 141, 141, 57, 58, 0, 0, 0, 0, 60, 140, 0, 0, 0, 0], [0, 0, 0, 0, 140, 141, 141, 57, 58, 0, 0, 0, 0, 0, 140, 0, 0, 0, 0], [0, 0, 0, 142, 143, 144, 145, 146, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 147, 0, 0, 148, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 149, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 53, 54, 56, 56, 57, 58, 0, 59, 0, 0, 0, 61, 0, 0, 62, 0], [0, 150, 151, 0, 0, 137, 138, 0, 58, 0, 59, 0, 0, 0, 139, 0, 150, 0, 0], [0, 0, 0, 0, 152, 153, 153, 57, 58, 0, 59, 0, 0, 0, 154, 0, 0, 0, 0], [0, 0, 0, 155, 116, 156, 157, 8, 9, 0, 10, 0, 0, 158, 120, 0, 0, 16, 0], [0, 0, 0, 0, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0], [0, 75, 3, 4, 5, 159, 160, 8, 161, 0, 162, 0, 11, 12, 163, 0, 75, 16, 0], [0, 0, 0, 0, 0, 40, 164, 0, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 165, 44, 44, 8, 9, 0, 0, 0, 0, 0, 165, 0, 0, 0, 0], [0, 124, 64, 0, 0, 40, 164, 0, 9, 0, 10, 0, 0, 0, 42, 0, 124, 0, 0], [0, 0, 0, 0, 0, 70, 70, 0, 71, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 166, 0, 0, 167, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 168, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 19, 74, 74, 22, 23, 0, 24, 0, 0, 0, 26, 0, 0, 27, 0], [0, 0, 0, 0, 79, 80, 80, 22, 23, 0, 0, 0, 0, 0, 79, 0, 0, 0, 0], [0, 0, 0, 169, 170, 171, 172, 22, 23, 0, 24, 0, 0, 173, 174, 0, 0, 27, 0], [0, 0, 0, 0, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 75, 0, 176, 0, 177, 177, 22, 23, 0, 24, 0, 0, 0, 78, 0, 75, 0, 0], [0, 178, 90, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 178, 0, 0], [0, 75, 0, 0, 0, 175, 179, 0, 23, 0, 24, 0, 0, 0, 78, 0, 75, 0, 0], [0, 0, 0, 0, 0, 180, 180, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 82, 83, 84, 85, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 83, 83, 85, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 181, 181, 85, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 182, 181, 181, 85, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 183, 184, 185, 186, 187, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 86, 0, 0, 0, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 188, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 189, 170, 190, 191, 22, 23, 0, 24, 0, 0, 192, 174, 0, 0, 27, 0], [0, 0, 0, 0, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 76, 193, 0, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 194, 80, 80, 22, 23, 0, 0, 0, 0, 0, 194, 0, 0, 0, 0], [0, 178, 90, 0, 0, 76, 193, 0, 23, 0, 24, 0, 0, 0, 78, 0, 178, 0, 0], [0, 0, 0, 0, 29, 95, 31, 32, 33, 0, 34, 0, 0, 0, 36, 0, 0, 37, 0], [0, 0, 0, 0, 100, 101, 101, 32, 33, 0, 0, 0, 0, 0, 100, 0, 0, 0, 0], [0, 0, 0, 195, 196, 197, 198, 32, 33, 0, 34, 0, 0, 199, 200, 0, 0, 37, 0], [0, 0, 0, 0, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 96, 0, 202, 0, 203, 203, 32, 33, 0, 34, 0, 0, 0, 99, 0, 96, 0, 0], [0, 204, 111, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 204, 0, 0], [0, 96, 0, 0, 0, 201, 205, 0, 33, 0, 34, 0, 0, 0, 99, 0, 96, 0, 0], [0, 0, 0, 0, 0, 206, 206, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 103, 104, 105, 106, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 104, 104, 106, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 207, 207, 106, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 208, 207, 207, 106, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 209, 210, 211, 212, 213, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 107, 0, 0, 0, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 214, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 215, 196, 216, 217, 32, 33, 0, 34, 0, 0, 218, 200, 0, 0, 37, 0], [0, 0, 0, 0, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 97, 219, 0, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 220, 101, 101, 32, 33, 0, 0, 0, 0, 0, 220, 0, 0, 0, 0], [0, 204, 111, 0, 0, 97, 219, 0, 33, 0, 34, 0, 0, 0, 99, 0, 204, 0, 0], [0, 0, 0, 221, 116, 222, 222, 8, 9, 0, 10, 0, 0, 0, 120, 0, 0, 16, 0], [0, 223, 0, 0, 0, 40, 224, 0, 9, 0, 10, 0, 0, 0, 42, 0, 223, 0, 0], [0, 0, 0, 0, 225, 44, 44, 8, 9, 0, 0, 0, 0, 119, 225, 0, 0, 0, 0], [0, 0, 0, 115, 116, 117, 222, 8, 9, 0, 10, 0, 0, 119, 120, 0, 0, 16, 0], [0, 0, 0, 115, 116, 222, 222, 8, 9, 0, 10, 0, 0, 0, 120, 0, 0, 16, 0], [0, 226, 64, 0, 0, 40, 224, 0, 9, 0, 10, 0, 0, 0, 42, 0, 226, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 39, 0, 0, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 39, 0, 0], [0, 0, 0, 0, 0, 44, 44, 8, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 227, 0, 228, 229, 0, 9, 0, 10, 0, 0, 230, 0, 0, 0, 0, 0], [0, 39, 0, 122, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 39, 0, 0], [0, 0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 231, 231, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 232, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 130, 131, 132, 133, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 131, 131, 133, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 233, 233, 133, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 234, 233, 233, 133, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 235, 236, 237, 238, 239, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 54, 56, 56, 57, 58, 0, 59, 0, 0, 0, 61, 0, 0, 62, 0], [0, 0, 0, 240, 241, 242, 243, 57, 58, 0, 59, 0, 0, 244, 245, 0, 0, 62, 0], [0, 0, 0, 0, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 136, 0, 247, 0, 248, 248, 57, 58, 0, 59, 0, 0, 0, 139, 0, 136, 0, 0], [0, 249, 151, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 249, 0, 0], [0, 136, 0, 0, 0, 246, 250, 0, 58, 0, 59, 0, 0, 0, 139, 0, 136, 0, 0], [0, 0, 0, 0, 0, 251, 251, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 143, 144, 145, 146, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 144, 144, 146, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 252, 252, 146, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 253, 252, 252, 146, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 254, 255, 256, 257, 258, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 147, 0, 0, 0, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 259, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 260, 241, 261, 262, 57, 58, 0, 59, 0, 0, 263, 245, 0, 0, 62, 0], [0, 0, 0, 0, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 137, 264, 0, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 265, 141, 141, 57, 58, 0, 0, 0, 0, 0, 265, 0, 0, 0, 0], [0, 249, 151, 0, 0, 137, 264, 0, 58, 0, 59, 0, 0, 0, 139, 0, 249, 0, 0], [0, 0, 0, 221, 116, 222, 222, 8, 9, 0, 10, 0, 0, 0, 120, 0, 0, 16, 0], [0, 0, 0, 0, 225, 44, 44, 8, 9, 0, 0, 0, 0, 158, 225, 0, 0, 0, 0], [0, 0, 0, 155, 116, 156, 222, 8, 9, 0, 10, 0, 0, 158, 120, 0, 0, 16, 0], [0, 0, 0, 155, 116, 222, 222, 8, 9, 0, 10, 0, 0, 0, 120, 0, 0, 16, 0], [0, 0, 0, 0, 43, 266, 266, 8, 161, 0, 24, 0, 0, 12, 267, 0, 0, 0, 0], [0, 75, 0, 176, 43, 268, 268, 269, 161, 0, 24, 0, 0, 0, 267, 0, 75, 0, 0], [0, 0, 0, 0, 0, 270, 0, 0, 271, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 272, 0, 0, 0, 0, 0, 0, 0, 0], [0, 273, 274, 0, 0, 40, 41, 0, 9, 0, 10, 0, 0, 0, 42, 0, 273, 0, 0], [0, 0, 0, 40, 0, 123, 123, 8, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 121, 275, 0, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 166, 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 276, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 277, 170, 278, 278, 22, 23, 0, 24, 0, 0, 0, 174, 0, 0, 27, 0], [0, 279, 0, 0, 0, 76, 280, 0, 23, 0, 24, 0, 0, 0, 78, 0, 279, 0, 0], [0, 0, 0, 0, 281, 80, 80, 22, 23, 0, 0, 0, 0, 173, 281, 0, 0, 0, 0], [0, 0, 0, 169, 170, 171, 278, 22, 23, 0, 24, 0, 0, 173, 174, 0, 0, 27, 0], [0, 0, 0, 169, 170, 278, 278, 22, 23, 0, 24, 0, 0, 0, 174, 0, 0, 27, 0], [0, 282, 90, 0, 0, 76, 280, 0, 23, 0, 24, 0, 0, 0, 78, 0, 282, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 75, 0, 0, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 75, 0, 0], [0, 0, 0, 0, 0, 80, 80, 22, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 283, 0, 284, 285, 0, 23, 0, 24, 0, 0, 286, 0, 0, 0, 0, 0], [0, 75, 0, 176, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 75, 0, 0], [0, 0, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 287, 287, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 288, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 184, 185, 186, 187, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 185, 185, 187, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 289, 289, 187, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 290, 289, 289, 187, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 291, 292, 293, 294, 295, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 277, 170, 278, 278, 22, 23, 0, 24, 0, 0, 0, 174, 0, 0, 27, 0], [0, 0, 0, 0, 281, 80, 80, 22, 23, 0, 0, 0, 0, 192, 281, 0, 0, 0, 0], [0, 0, 0, 189, 170, 190, 278, 22, 23, 0, 24, 0, 0, 192, 174, 0, 0, 27, 0], [0, 0, 0, 189, 170, 278, 278, 22, 23, 0, 24, 0, 0, 0, 174, 0, 0, 27, 0], [0, 0, 0, 76, 0, 177, 177, 22, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 175, 296, 0, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 297, 196, 298, 298, 32, 33, 0, 34, 0, 0, 0, 200, 0, 0, 37, 0], [0, 299, 0, 0, 0, 97, 300, 0, 33, 0, 34, 0, 0, 0, 99, 0, 299, 0, 0], [0, 0, 0, 0, 301, 101, 101, 32, 33, 0, 0, 0, 0, 199, 301, 0, 0, 0, 0], [0, 0, 0, 195, 196, 197, 298, 32, 33, 0, 34, 0, 0, 199, 200, 0, 0, 37, 0], [0, 0, 0, 195, 196, 298, 298, 32, 33, 0, 34, 0, 0, 0, 200, 0, 0, 37, 0], [0, 302, 111, 0, 0, 97, 300, 0, 33, 0, 34, 0, 0, 0, 99, 0, 302, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 96, 0, 0, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 96, 0, 0], [0, 0, 0, 0, 0, 101, 101, 32, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 303, 0, 304, 305, 0, 33, 0, 34, 0, 0, 306, 0, 0, 0, 0, 0], [0, 96, 0, 202, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 96, 0, 0], [0, 0, 0, 0, 0, 0, 0, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 307, 307, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 210, 211, 212, 213, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 211, 211, 213, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 309, 309, 213, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 310, 309, 309, 213, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 311, 312, 313, 314, 315, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 297, 196, 298, 298, 32, 33, 0, 34, 0, 0, 0, 200, 0, 0, 37, 0], [0, 0, 0, 0, 301, 101, 101, 32, 33, 0, 0, 0, 0, 218, 301, 0, 0, 0, 0], [0, 0, 0, 215, 196, 216, 298, 32, 33, 0, 34, 0, 0, 218, 200, 0, 0, 37, 0], [0, 0, 0, 215, 196, 298, 298, 32, 33, 0, 34, 0, 0, 0, 200, 0, 0, 37, 0], [0, 0, 0, 97, 0, 203, 203, 32, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 201, 316, 0, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 116, 222, 222, 8, 9, 0, 10, 0, 0, 0, 120, 0, 0, 16, 0], [0, 0, 0, 0, 225, 44, 44, 8, 9, 0, 0, 0, 0, 0, 225, 0, 0, 0, 0], [0, 0, 0, 317, 318, 319, 320, 8, 9, 0, 10, 0, 0, 321, 322, 0, 0, 16, 0], [0, 223, 0, 323, 0, 123, 123, 8, 9, 0, 10, 0, 0, 0, 42, 0, 223, 0, 0], [0, 223, 0, 0, 0, 121, 324, 0, 9, 0, 10, 0, 0, 0, 42, 0, 223, 0, 0], [0, 0, 0, 325, 318, 326, 327, 8, 9, 0, 10, 0, 0, 328, 322, 0, 0, 16, 0], [0, 0, 0, 64, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 0, 230, 0, 0, 0, 0, 0], [0, 0, 0, 227, 0, 228, 121, 0, 9, 0, 10, 0, 0, 230, 0, 0, 0, 0, 0], [0, 0, 0, 227, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0], [0, 0, 0, 0, 0, 329, 329, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 330, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 236, 237, 238, 239, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 237, 237, 239, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 331, 331, 239, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 332, 331, 331, 239, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 333, 40, 121, 334, 0, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 335, 241, 336, 336, 57, 58, 0, 59, 0, 0, 0, 245, 0, 0, 62, 0], [0, 337, 0, 0, 0, 137, 338, 0, 58, 0, 59, 0, 0, 0, 139, 0, 337, 0, 0], [0, 0, 0, 0, 339, 141, 141, 57, 58, 0, 0, 0, 0, 244, 339, 0, 0, 0, 0], [0, 0, 0, 240, 241, 242, 336, 57, 58, 0, 59, 0, 0, 244, 245, 0, 0, 62, 0], [0, 0, 0, 240, 241, 336, 336, 57, 58, 0, 59, 0, 0, 0, 245, 0, 0, 62, 0], [0, 340, 151, 0, 0, 137, 338, 0, 58, 0, 59, 0, 0, 0, 139, 0, 340, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 136, 0, 0, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 136, 0, 0], [0, 0, 0, 0, 0, 141, 141, 57, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 341, 0, 342, 343, 0, 58, 0, 59, 0, 0, 344, 0, 0, 0, 0, 0], [0, 136, 0, 247, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 136, 0, 0], [0, 0, 0, 0, 0, 0, 0, 57, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 345, 345, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 346, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 255, 256, 257, 258, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 256, 256, 258, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 347, 347, 258, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 348, 347, 347, 258, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 349, 350, 351, 352, 353, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 335, 241, 336, 336, 57, 58, 0, 59, 0, 0, 0, 245, 0, 0, 62, 0], [0, 0, 0, 0, 339, 141, 141, 57, 58, 0, 0, 0, 0, 263, 339, 0, 0, 0, 0], [0, 0, 0, 260, 241, 261, 336, 57, 58, 0, 59, 0, 0, 263, 245, 0, 0, 62, 0], [0, 0, 0, 260, 241, 336, 336, 57, 58, 0, 59, 0, 0, 0, 245, 0, 0, 62, 0], [0, 0, 0, 137, 0, 248, 248, 57, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 246, 354, 0, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 126, 126, 8, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 355, 90, 0, 0, 121, 125, 0, 9, 0, 10, 0, 0, 0, 42, 0, 355, 0, 0], [0, 0, 0, 0, 0, 356, 356, 269, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 357, 358, 359, 360, 361, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 270, 0, 0, 0, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 363, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 364, 116, 365, 366, 8, 161, 0, 162, 0, 0, 367, 120, 0, 0, 16, 0], [0, 0, 0, 0, 0, 368, 368, 0, 161, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 40, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 170, 278, 278, 22, 23, 0, 24, 0, 0, 0, 174, 0, 0, 27, 0], [0, 0, 0, 0, 281, 80, 80, 22, 23, 0, 0, 0, 0, 0, 281, 0, 0, 0, 0], [0, 0, 0, 369, 370, 371, 372, 22, 23, 0, 24, 0, 0, 373, 374, 0, 0, 27, 0], [0, 279, 0, 375, 0, 177, 177, 22, 23, 0, 24, 0, 0, 0, 78, 0, 279, 0, 0], [0, 279, 0, 0, 0, 175, 376, 0, 23, 0, 24, 0, 0, 0, 78, 0, 279, 0, 0], [0, 0, 0, 377, 370, 378, 379, 22, 23, 0, 24, 0, 0, 380, 374, 0, 0, 27, 0], [0, 0, 0, 90, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 286, 0, 0, 0, 0, 0], [0, 0, 0, 283, 0, 284, 175, 0, 23, 0, 24, 0, 0, 286, 0, 0, 0, 0, 0], [0, 0, 0, 283, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 85, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 0, 0], [0, 0, 0, 0, 0, 381, 381, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 382, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 292, 293, 294, 295, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 293, 293, 295, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 0, 383, 383, 295, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 384, 383, 383, 295, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 385, 76, 175, 386, 0, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 76, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 196, 298, 298, 32, 33, 0, 34, 0, 0, 0, 200, 0, 0, 37, 0], [0, 0, 0, 0, 301, 101, 101, 32, 33, 0, 0, 0, 0, 0, 301, 0, 0, 0, 0], [0, 0, 0, 387, 388, 389, 390, 32, 33, 0, 34, 0, 0, 391, 392, 0, 0, 37, 0], [0, 299, 0, 393, 0, 203, 203, 32, 33, 0, 34, 0, 0, 0, 99, 0, 299, 0, 0], [0, 299, 0, 0, 0, 201, 394, 0, 33, 0, 34, 0, 0, 0, 99, 0, 299, 0, 0], [0, 0, 0, 395, 388, 396, 397, 32, 33, 0, 34, 0, 0, 398, 392, 0, 0, 37, 0], [0, 0, 0, 111, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 33, 0, 0, 0, 0, 306, 0, 0, 0, 0, 0], [0, 0, 0, 303, 0, 304, 201, 0, 33, 0, 34, 0, 0, 306, 0, 0, 0, 0, 0], [0, 0, 0, 303, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 106, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 103, 0, 0], [0, 0, 0, 0, 0, 399, 399, 213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 312, 313, 314, 315, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 313, 313, 315, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 0, 401, 401, 315, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 402, 401, 401, 315, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 403, 97, 201, 404, 0, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 97, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 405, 318, 406, 406, 8, 9, 0, 10, 0, 0, 0, 322, 0, 0, 16, 0], [0, 407, 0, 0, 0, 40, 408, 0, 9, 0, 10, 0, 0, 0, 42, 0, 407, 0, 0], [0, 0, 0, 0, 409, 44, 44, 8, 9, 0, 0, 0, 0, 321, 409, 0, 0, 0, 0], [0, 0, 0, 317, 318, 319, 406, 8, 9, 0, 10, 0, 0, 321, 322, 0, 0, 16, 0], [0, 0, 0, 317, 318, 406, 406, 8, 9, 0, 10, 0, 0, 0, 322, 0, 0, 16, 0], [0, 410, 64, 0, 0, 40, 408, 0, 9, 0, 10, 0, 0, 0, 42, 0, 410, 0, 0], [0, 223, 0, 0, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 223, 0, 0], [0, 223, 0, 323, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 223, 0, 0], [0, 0, 0, 405, 318, 406, 406, 8, 9, 0, 10, 0, 0, 0, 322, 0, 0, 16, 0], [0, 0, 0, 0, 409, 44, 44, 8, 9, 0, 0, 0, 0, 328, 409, 0, 0, 0, 0], [0, 0, 0, 325, 318, 326, 406, 8, 9, 0, 10, 0, 0, 328, 322, 0, 0, 16, 0], [0, 0, 0, 325, 318, 406, 406, 8, 9, 0, 10, 0, 0, 0, 322, 0, 0, 16, 0], [0, 0, 0, 0, 0, 0, 0, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 0, 0], [0, 0, 0, 0, 0, 411, 411, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 412, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 40, 121, 334, 0, 9, 0, 10, 0, 0, 0, 42, 0, 0, 0, 0], [0, 0, 0, 0, 413, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 241, 336, 336, 57, 58, 0, 59, 0, 0, 0, 245, 0, 0, 62, 0], [0, 0, 0, 0, 339, 141, 141, 57, 58, 0, 0, 0, 0, 0, 339, 0, 0, 0, 0], [0, 0, 0, 414, 415, 416, 417, 57, 58, 0, 59, 0, 0, 418, 419, 0, 0, 62, 0], [0, 337, 0, 420, 0, 248, 248, 57, 58, 0, 59, 0, 0, 0, 139, 0, 337, 0, 0], [0, 337, 0, 0, 0, 246, 421, 0, 58, 0, 59, 0, 0, 0, 139, 0, 337, 0, 0], [0, 0, 0, 422, 415, 423, 424, 57, 58, 0, 59, 0, 0, 425, 419, 0, 0, 62, 0], [0, 0, 0, 151, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 58, 0, 0, 0, 0, 344, 0, 0, 0, 0, 0], [0, 0, 0, 341, 0, 342, 246, 0, 58, 0, 59, 0, 0, 344, 0, 0, 0, 0, 0], [0, 0, 0, 341, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 146, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, 0, 0], [0, 0, 0, 0, 0, 426, 426, 258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 427, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 350, 351, 352, 353, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 351, 351, 353, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 0, 428, 428, 353, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 429, 428, 428, 353, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 430, 137, 246, 431, 0, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 137, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 432, 116, 433, 434, 8, 161, 0, 162, 0, 0, 435, 120, 0, 0, 16, 0], [0, 0, 0, 0, 0, 180, 180, 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 358, 359, 360, 361, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 0, 359, 359, 361, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 0, 436, 436, 361, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 437, 436, 436, 361, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 438, 439, 440, 441, 442, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 443, 274, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 443, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 444, 116, 445, 445, 8, 161, 0, 162, 0, 0, 0, 120, 0, 0, 16, 0], [0, 0, 0, 0, 225, 44, 44, 8, 161, 0, 0, 0, 0, 367, 225, 0, 0, 0, 0], [0, 0, 0, 364, 116, 365, 445, 8, 161, 0, 162, 0, 0, 367, 120, 0, 0, 16, 0], [0, 0, 0, 364, 116, 445, 445, 8, 161, 0, 162, 0, 0, 0, 120, 0, 0, 16, 0], [0, 0, 0, 0, 0, 0, 0, 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 446, 370, 447, 447, 22, 23, 0, 24, 0, 0, 0, 374, 0, 0, 27, 0], [0, 448, 0, 0, 0, 76, 449, 0, 23, 0, 24, 0, 0, 0, 78, 0, 448, 0, 0], [0, 0, 0, 0, 450, 80, 80, 22, 23, 0, 0, 0, 0, 373, 450, 0, 0, 0, 0], [0, 0, 0, 369, 370, 371, 447, 22, 23, 0, 24, 0, 0, 373, 374, 0, 0, 27, 0], [0, 0, 0, 369, 370, 447, 447, 22, 23, 0, 24, 0, 0, 0, 374, 0, 0, 27, 0], [0, 451, 90, 0, 0, 76, 449, 0, 23, 0, 24, 0, 0, 0, 78, 0, 451, 0, 0], [0, 279, 0, 0, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 279, 0, 0], [0, 279, 0, 375, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 279, 0, 0], [0, 0, 0, 446, 370, 447, 447, 22, 23, 0, 24, 0, 0, 0, 374, 0, 0, 27, 0], [0, 0, 0, 0, 450, 80, 80, 22, 23, 0, 0, 0, 0, 380, 450, 0, 0, 0, 0], [0, 0, 0, 377, 370, 378, 447, 22, 23, 0, 24, 0, 0, 380, 374, 0, 0, 27, 0], [0, 0, 0, 377, 370, 447, 447, 22, 23, 0, 24, 0, 0, 0, 374, 0, 0, 27, 0], [0, 0, 0, 0, 0, 0, 0, 187, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 184, 0, 0], [0, 0, 0, 0, 0, 452, 452, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 453, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 76, 175, 386, 0, 23, 0, 24, 0, 0, 0, 78, 0, 0, 0, 0], [0, 0, 0, 0, 454, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 455, 388, 456, 456, 32, 33, 0, 34, 0, 0, 0, 392, 0, 0, 37, 0], [0, 457, 0, 0, 0, 97, 458, 0, 33, 0, 34, 0, 0, 0, 99, 0, 457, 0, 0], [0, 0, 0, 0, 459, 101, 101, 32, 33, 0, 0, 0, 0, 391, 459, 0, 0, 0, 0], [0, 0, 0, 387, 388, 389, 456, 32, 33, 0, 34, 0, 0, 391, 392, 0, 0, 37, 0], [0, 0, 0, 387, 388, 456, 456, 32, 33, 0, 34, 0, 0, 0, 392, 0, 0, 37, 0], [0, 460, 111, 0, 0, 97, 458, 0, 33, 0, 34, 0, 0, 0, 99, 0, 460, 0, 0], [0, 299, 0, 0, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 299, 0, 0], [0, 299, 0, 393, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 299, 0, 0], [0, 0, 0, 455, 388, 456, 456, 32, 33, 0, 34, 0, 0, 0, 392, 0, 0, 37, 0], [0, 0, 0, 0, 459, 101, 101, 32, 33, 0, 0, 0, 0, 398, 459, 0, 0, 0, 0], [0, 0, 0, 395, 388, 396, 456, 32, 33, 0, 34, 0, 0, 398, 392, 0, 0, 37, 0], [0, 0, 0, 395, 388, 456, 456, 32, 33, 0, 34, 0, 0, 0, 392, 0, 0, 37, 0], [0, 0, 0, 0, 0, 0, 0, 213, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 0, 0], [0, 0, 0, 0, 0, 461, 461, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 462, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 97, 201, 404, 0, 33, 0, 34, 0, 0, 0, 99, 0, 0, 0, 0], [0, 0, 0, 0, 463, 0, 0, 0, 33, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 318, 406, 406, 8, 9, 0, 10, 0, 0, 0, 322, 0, 0, 16, 0], [0, 0, 0, 0, 409, 44, 44, 8, 9, 0, 0, 0, 0, 0, 409, 0, 0, 0, 0], [0, 0, 0, 464, 465, 466, 467, 8, 9, 0, 10, 0, 0, 468, 469, 0, 0, 16, 0], [0, 407, 0, 470, 0, 123, 123, 8, 9, 0, 10, 0, 0, 0, 42, 0, 407, 0, 0], [0, 407, 0, 0, 0, 121, 471, 0, 9, 0, 10, 0, 0, 0, 42, 0, 407, 0, 0], [0, 0, 0, 472, 465, 473, 474, 8, 9, 0, 10, 0, 0, 475, 469, 0, 0, 16, 0], [0, 0, 0, 0, 0, 0, 0, 239, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 236, 0, 0], [0, 0, 0, 0, 0, 0, 476, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 477, 415, 478, 478, 57, 58, 0, 59, 0, 0, 0, 419, 0, 0, 62, 0], [0, 479, 0, 0, 0, 137, 480, 0, 58, 0, 59, 0, 0, 0, 139, 0, 479, 0, 0], [0, 0, 0, 0, 481, 141, 141, 57, 58, 0, 0, 0, 0, 418, 481, 0, 0, 0, 0], [0, 0, 0, 414, 415, 416, 478, 57, 58, 0, 59, 0, 0, 418, 419, 0, 0, 62, 0], [0, 0, 0, 414, 415, 478, 478, 57, 58, 0, 59, 0, 0, 0, 419, 0, 0, 62, 0], [0, 482, 151, 0, 0, 137, 480, 0, 58, 0, 59, 0, 0, 0, 139, 0, 482, 0, 0], [0, 337, 0, 0, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 337, 0, 0], [0, 337, 0, 420, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 337, 0, 0], [0, 0, 0, 477, 415, 478, 478, 57, 58, 0, 59, 0, 0, 0, 419, 0, 0, 62, 0], [0, 0, 0, 0, 481, 141, 141, 57, 58, 0, 0, 0, 0, 425, 481, 0, 0, 0, 0], [0, 0, 0, 422, 415, 423, 478, 57, 58, 0, 59, 0, 0, 425, 419, 0, 0, 62, 0], [0, 0, 0, 422, 415, 478, 478, 57, 58, 0, 59, 0, 0, 0, 419, 0, 0, 62, 0], [0, 0, 0, 0, 0, 0, 0, 258, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 0, 0], [0, 0, 0, 0, 0, 483, 483, 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 484, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 137, 246, 431, 0, 58, 0, 59, 0, 0, 0, 139, 0, 0, 0, 0], [0, 0, 0, 0, 485, 0, 0, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 444, 116, 445, 445, 8, 161, 0, 162, 0, 0, 0, 120, 0, 0, 16, 0], [0, 0, 0, 0, 225, 44, 44, 8, 161, 0, 0, 0, 0, 435, 225, 0, 0, 0, 0], [0, 0, 0, 432, 116, 433, 445, 8, 161, 0, 162, 0, 0, 435, 120, 0, 0, 16, 0], [0, 0, 0, 432, 116, 445, 445, 8, 161, 0, 162, 0, 0, 0, 120, 0, 0, 16, 0], [0, 0, 0, 0, 0, 486, 486, 361, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 487, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 439, 440, 441, 442, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 0, 440, 440, 442, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 0, 488, 488, 442, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 489, 488, 488, 442, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 490, 491, 492, 493, 494, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 495, 0, 496, 497, 0, 161, 0, 162, 0, 0, 498, 0, 0, 0, 0, 0], [0, 0, 0, 0, 116, 445, 445, 8, 161, 0, 162, 0, 0, 0, 120, 0, 0, 16, 0], [0, 0, 0, 0, 225, 44, 44, 8, 161, 0, 0, 0, 0, 0, 225, 0, 0, 0, 0], [0, 0, 0, 0, 370, 447, 447, 22, 23, 0, 24, 0, 0, 0, 374, 0, 0, 27, 0], [0, 0, 0, 0, 450, 80, 80, 22, 23, 0, 0, 0, 0, 0, 450, 0, 0, 0, 0], [0, 0, 0, 499, 500, 501, 502, 22, 23, 0, 24, 0, 0, 503, 504, 0, 0, 27, 0], [0, 448, 0, 505, 0, 177, 177, 22, 23, 0, 24, 0, 0, 0, 78, 0, 448, 0, 0], [0, 448, 0, 0, 0, 175, 506, 0, 23, 0, 24, 0, 0, 0, 78, 0, 448, 0, 0], [0, 0, 0, 507, 500, 508, 509, 22, 23, 0, 24, 0, 0, 510, 504, 0, 0, 27, 0], [0, 0, 0, 0, 0, 0, 0, 295, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 292, 0, 0], [0, 0, 0, 0, 0, 0, 511, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 388, 456, 456, 32, 33, 0, 34, 0, 0, 0, 392, 0, 0, 37, 0], [0, 0, 0, 0, 459, 101, 101, 32, 33, 0, 0, 0, 0, 0, 459, 0, 0, 0, 0], [0, 0, 0, 512, 513, 514, 515, 32, 33, 0, 34, 0, 0, 516, 517, 0, 0, 37, 0], [0, 457, 0, 518, 0, 203, 203, 32, 33, 0, 34, 0, 0, 0, 99, 0, 457, 0, 0], [0, 457, 0, 0, 0, 201, 519, 0, 33, 0, 34, 0, 0, 0, 99, 0, 457, 0, 0], [0, 0, 0, 520, 513, 521, 522, 32, 33, 0, 34, 0, 0, 523, 517, 0, 0, 37, 0], [0, 0, 0, 0, 0, 0, 0, 315, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 312, 0, 0], [0, 0, 0, 0, 0, 0, 524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 525, 465, 526, 526, 8, 9, 0, 10, 0, 0, 0, 469, 0, 0, 16, 0], [0, 527, 0, 0, 0, 40, 528, 0, 9, 0, 10, 0, 0, 0, 42, 0, 527, 0, 0], [0, 0, 0, 0, 529, 44, 44, 8, 9, 0, 0, 0, 0, 468, 529, 0, 0, 0, 0], [0, 0, 0, 464, 465, 466, 526, 8, 9, 0, 10, 0, 0, 468, 469, 0, 0, 16, 0], [0, 0, 0, 464, 465, 526, 526, 8, 9, 0, 10, 0, 0, 0, 469, 0, 0, 16, 0], [0, 530, 64, 0, 0, 40, 528, 0, 9, 0, 10, 0, 0, 0, 42, 0, 530, 0, 0], [0, 407, 0, 0, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 407, 0, 0], [0, 407, 0, 470, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 407, 0, 0], [0, 0, 0, 525, 465, 526, 526, 8, 9, 0, 10, 0, 0, 0, 469, 0, 0, 16, 0], [0, 0, 0, 0, 529, 44, 44, 8, 9, 0, 0, 0, 0, 475, 529, 0, 0, 0, 0], [0, 0, 0, 472, 465, 473, 526, 8, 9, 0, 10, 0, 0, 475, 469, 0, 0, 16, 0], [0, 0, 0, 472, 465, 526, 526, 8, 9, 0, 10, 0, 0, 0, 469, 0, 0, 16, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40, 0, 0], [0, 0, 0, 0, 415, 478, 478, 57, 58, 0, 59, 0, 0, 0, 419, 0, 0, 62, 0], [0, 0, 0, 0, 481, 141, 141, 57, 58, 0, 0, 0, 0, 0, 481, 0, 0, 0, 0], [0, 0, 0, 531, 532, 533, 534, 57, 58, 0, 59, 0, 0, 535, 536, 0, 0, 62, 0], [0, 479, 0, 537, 0, 248, 248, 57, 58, 0, 59, 0, 0, 0, 139, 0, 479, 0, 0], [0, 479, 0, 0, 0, 246, 538, 0, 58, 0, 59, 0, 0, 0, 139, 0, 479, 0, 0], [0, 0, 0, 539, 532, 540, 541, 57, 58, 0, 59, 0, 0, 542, 536, 0, 0, 62, 0], [0, 0, 0, 0, 0, 0, 0, 353, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 350, 0, 0], [0, 0, 0, 0, 0, 0, 543, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 361, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 358, 0, 0], [0, 0, 0, 0, 0, 544, 544, 442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 545, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 491, 492, 493, 494, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 0, 492, 492, 494, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 0, 546, 546, 494, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 547, 546, 546, 494, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 548, 549, 368, 550, 0, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 274, 0, 368, 368, 0, 161, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 161, 0, 0, 0, 0, 498, 0, 0, 0, 0, 0], [0, 0, 0, 495, 0, 496, 368, 0, 161, 0, 162, 0, 0, 498, 0, 0, 0, 0, 0], [0, 0, 0, 495, 0, 368, 368, 0, 161, 0, 162, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 551, 500, 552, 552, 22, 23, 0, 24, 0, 0, 0, 504, 0, 0, 27, 0], [0, 553, 0, 0, 0, 76, 554, 0, 23, 0, 24, 0, 0, 0, 78, 0, 553, 0, 0], [0, 0, 0, 0, 555, 80, 80, 22, 23, 0, 0, 0, 0, 503, 555, 0, 0, 0, 0], [0, 0, 0, 499, 500, 501, 552, 22, 23, 0, 24, 0, 0, 503, 504, 0, 0, 27, 0], [0, 0, 0, 499, 500, 552, 552, 22, 23, 0, 24, 0, 0, 0, 504, 0, 0, 27, 0], [0, 556, 90, 0, 0, 76, 554, 0, 23, 0, 24, 0, 0, 0, 78, 0, 556, 0, 0], [0, 448, 0, 0, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 448, 0, 0], [0, 448, 0, 505, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 448, 0, 0], [0, 0, 0, 551, 500, 552, 552, 22, 23, 0, 24, 0, 0, 0, 504, 0, 0, 27, 0], [0, 0, 0, 0, 555, 80, 80, 22, 23, 0, 0, 0, 0, 510, 555, 0, 0, 0, 0], [0, 0, 0, 507, 500, 508, 552, 22, 23, 0, 24, 0, 0, 510, 504, 0, 0, 27, 0], [0, 0, 0, 507, 500, 552, 552, 22, 23, 0, 24, 0, 0, 0, 504, 0, 0, 27, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 76, 0, 0], [0, 0, 0, 557, 513, 558, 558, 32, 33, 0, 34, 0, 0, 0, 517, 0, 0, 37, 0], [0, 559, 0, 0, 0, 97, 560, 0, 33, 0, 34, 0, 0, 0, 99, 0, 559, 0, 0], [0, 0, 0, 0, 561, 101, 101, 32, 33, 0, 0, 0, 0, 516, 561, 0, 0, 0, 0], [0, 0, 0, 512, 513, 514, 558, 32, 33, 0, 34, 0, 0, 516, 517, 0, 0, 37, 0], [0, 0, 0, 512, 513, 558, 558, 32, 33, 0, 34, 0, 0, 0, 517, 0, 0, 37, 0], [0, 562, 111, 0, 0, 97, 560, 0, 33, 0, 34, 0, 0, 0, 99, 0, 562, 0, 0], [0, 457, 0, 0, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 457, 0, 0], [0, 457, 0, 518, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 457, 0, 0], [0, 0, 0, 557, 513, 558, 558, 32, 33, 0, 34, 0, 0, 0, 517, 0, 0, 37, 0], [0, 0, 0, 0, 561, 101, 101, 32, 33, 0, 0, 0, 0, 523, 561, 0, 0, 0, 0], [0, 0, 0, 520, 513, 521, 558, 32, 33, 0, 34, 0, 0, 523, 517, 0, 0, 37, 0], [0, 0, 0, 520, 513, 558, 558, 32, 33, 0, 34, 0, 0, 0, 517, 0, 0, 37, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 0, 0], [0, 0, 0, 0, 465, 526, 526, 8, 9, 0, 10, 0, 0, 0, 469, 0, 0, 16, 0], [0, 0, 0, 0, 529, 44, 44, 8, 9, 0, 0, 0, 0, 0, 529, 0, 0, 0, 0], [0, 0, 0, 563, 66, 564, 565, 8, 9, 0, 10, 0, 0, 566, 68, 0, 0, 16, 0], [0, 527, 0, 567, 0, 123, 123, 8, 9, 0, 10, 0, 0, 0, 42, 0, 527, 0, 0], [0, 527, 0, 0, 0, 121, 568, 0, 9, 0, 10, 0, 0, 0, 42, 0, 527, 0, 0], [0, 0, 0, 569, 66, 570, 571, 8, 9, 0, 10, 0, 0, 572, 68, 0, 0, 16, 0], [0, 0, 0, 573, 532, 574, 574, 57, 58, 0, 59, 0, 0, 0, 536, 0, 0, 62, 0], [0, 575, 0, 0, 0, 137, 576, 0, 58, 0, 59, 0, 0, 0, 139, 0, 575, 0, 0], [0, 0, 0, 0, 577, 141, 141, 57, 58, 0, 0, 0, 0, 535, 577, 0, 0, 0, 0], [0, 0, 0, 531, 532, 533, 574, 57, 58, 0, 59, 0, 0, 535, 536, 0, 0, 62, 0], [0, 0, 0, 531, 532, 574, 574, 57, 58, 0, 59, 0, 0, 0, 536, 0, 0, 62, 0], [0, 578, 151, 0, 0, 137, 576, 0, 58, 0, 59, 0, 0, 0, 139, 0, 578, 0, 0], [0, 479, 0, 0, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 479, 0, 0], [0, 479, 0, 537, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 479, 0, 0], [0, 0, 0, 573, 532, 574, 574, 57, 58, 0, 59, 0, 0, 0, 536, 0, 0, 62, 0], [0, 0, 0, 0, 577, 141, 141, 57, 58, 0, 0, 0, 0, 542, 577, 0, 0, 0, 0], [0, 0, 0, 539, 532, 540, 574, 57, 58, 0, 59, 0, 0, 542, 536, 0, 0, 62, 0], [0, 0, 0, 539, 532, 574, 574, 57, 58, 0, 59, 0, 0, 0, 536, 0, 0, 62, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 137, 0, 0], [0, 0, 0, 0, 0, 0, 0, 442, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 439, 0, 0], [0, 0, 0, 0, 0, 579, 579, 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 580, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 549, 368, 550, 0, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 0, 368, 368, 0, 161, 0, 162, 0, 0, 0, 362, 0, 0, 0, 0], [0, 0, 0, 0, 581, 0, 0, 0, 161, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 500, 552, 552, 22, 23, 0, 24, 0, 0, 0, 504, 0, 0, 27, 0], [0, 0, 0, 0, 555, 80, 80, 22, 23, 0, 0, 0, 0, 0, 555, 0, 0, 0, 0], [0, 0, 0, 582, 91, 583, 584, 22, 23, 0, 24, 0, 0, 585, 93, 0, 0, 27, 0], [0, 553, 0, 586, 0, 177, 177, 22, 23, 0, 24, 0, 0, 0, 78, 0, 553, 0, 0], [0, 553, 0, 0, 0, 175, 587, 0, 23, 0, 24, 0, 0, 0, 78, 0, 553, 0, 0], [0, 0, 0, 588, 91, 589, 590, 22, 23, 0, 24, 0, 0, 591, 93, 0, 0, 27, 0], [0, 0, 0, 0, 513, 558, 558, 32, 33, 0, 34, 0, 0, 0, 517, 0, 0, 37, 0], [0, 0, 0, 0, 561, 101, 101, 32, 33, 0, 0, 0, 0, 0, 561, 0, 0, 0, 0], [0, 0, 0, 592, 112, 593, 594, 32, 33, 0, 34, 0, 0, 595, 114, 0, 0, 37, 0], [0, 559, 0, 596, 0, 203, 203, 32, 33, 0, 34, 0, 0, 0, 99, 0, 559, 0, 0], [0, 559, 0, 0, 0, 201, 597, 0, 33, 0, 34, 0, 0, 0, 99, 0, 559, 0, 0], [0, 0, 0, 598, 112, 599, 600, 32, 33, 0, 34, 0, 0, 601, 114, 0, 0, 37, 0], [0, 0, 0, 602, 66, 67, 67, 8, 9, 0, 10, 0, 0, 0, 68, 0, 0, 16, 0], [0, 0, 0, 0, 165, 44, 44, 8, 9, 0, 0, 0, 0, 566, 165, 0, 0, 0, 0], [0, 0, 0, 563, 66, 564, 67, 8, 9, 0, 10, 0, 0, 566, 68, 0, 0, 16, 0], [0, 0, 0, 563, 66, 67, 67, 8, 9, 0, 10, 0, 0, 0, 68, 0, 0, 16, 0], [0, 527, 0, 0, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 527, 0, 0], [0, 527, 0, 567, 0, 121, 121, 0, 9, 0, 10, 0, 0, 0, 42, 0, 527, 0, 0], [0, 0, 0, 602, 66, 67, 67, 8, 9, 0, 10, 0, 0, 0, 68, 0, 0, 16, 0], [0, 0, 0, 0, 165, 44, 44, 8, 9, 0, 0, 0, 0, 572, 165, 0, 0, 0, 0], [0, 0, 0, 569, 66, 570, 67, 8, 9, 0, 10, 0, 0, 572, 68, 0, 0, 16, 0], [0, 0, 0, 569, 66, 67, 67, 8, 9, 0, 10, 0, 0, 0, 68, 0, 0, 16, 0], [0, 0, 0, 0, 532, 574, 574, 57, 58, 0, 59, 0, 0, 0, 536, 0, 0, 62, 0], [0, 0, 0, 0, 577, 141, 141, 57, 58, 0, 0, 0, 0, 0, 577, 0, 0, 0, 0], [0, 0, 0, 603, 152, 604, 605, 57, 58, 0, 59, 0, 0, 606, 154, 0, 0, 62, 0], [0, 575, 0, 607, 0, 248, 248, 57, 58, 0, 59, 0, 0, 0, 139, 0, 575, 0, 0], [0, 575, 0, 0, 0, 246, 608, 0, 58, 0, 59, 0, 0, 0, 139, 0, 575, 0, 0], [0, 0, 0, 609, 152, 610, 611, 57, 58, 0, 59, 0, 0, 612, 154, 0, 0, 62, 0], [0, 0, 0, 0, 0, 0, 0, 494, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 491, 0, 0], [0, 0, 0, 0, 0, 0, 613, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 614, 91, 92, 92, 22, 23, 0, 24, 0, 0, 0, 93, 0, 0, 27, 0], [0, 0, 0, 0, 194, 80, 80, 22, 23, 0, 0, 0, 0, 585, 194, 0, 0, 0, 0], [0, 0, 0, 582, 91, 583, 92, 22, 23, 0, 24, 0, 0, 585, 93, 0, 0, 27, 0], [0, 0, 0, 582, 91, 92, 92, 22, 23, 0, 24, 0, 0, 0, 93, 0, 0, 27, 0], [0, 553, 0, 0, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 553, 0, 0], [0, 553, 0, 586, 0, 175, 175, 0, 23, 0, 24, 0, 0, 0, 78, 0, 553, 0, 0], [0, 0, 0, 614, 91, 92, 92, 22, 23, 0, 24, 0, 0, 0, 93, 0, 0, 27, 0], [0, 0, 0, 0, 194, 80, 80, 22, 23, 0, 0, 0, 0, 591, 194, 0, 0, 0, 0], [0, 0, 0, 588, 91, 589, 92, 22, 23, 0, 24, 0, 0, 591, 93, 0, 0, 27, 0], [0, 0, 0, 588, 91, 92, 92, 22, 23, 0, 24, 0, 0, 0, 93, 0, 0, 27, 0], [0, 0, 0, 615, 112, 113, 113, 32, 33, 0, 34, 0, 0, 0, 114, 0, 0, 37, 0], [0, 0, 0, 0, 220, 101, 101, 32, 33, 0, 0, 0, 0, 595, 220, 0, 0, 0, 0], [0, 0, 0, 592, 112, 593, 113, 32, 33, 0, 34, 0, 0, 595, 114, 0, 0, 37, 0], [0, 0, 0, 592, 112, 113, 113, 32, 33, 0, 34, 0, 0, 0, 114, 0, 0, 37, 0], [0, 559, 0, 0, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 559, 0, 0], [0, 559, 0, 596, 0, 201, 201, 0, 33, 0, 34, 0, 0, 0, 99, 0, 559, 0, 0], [0, 0, 0, 615, 112, 113, 113, 32, 33, 0, 34, 0, 0, 0, 114, 0, 0, 37, 0], [0, 0, 0, 0, 220, 101, 101, 32, 33, 0, 0, 0, 0, 601, 220, 0, 0, 0, 0], [0, 0, 0, 598, 112, 599, 113, 32, 33, 0, 34, 0, 0, 601, 114, 0, 0, 37, 0], [0, 0, 0, 598, 112, 113, 113, 32, 33, 0, 34, 0, 0, 0, 114, 0, 0, 37, 0], [0, 0, 0, 0, 66, 67, 67, 8, 9, 0, 10, 0, 0, 0, 68, 0, 0, 16, 0], [0, 0, 0, 616, 152, 153, 153, 57, 58, 0, 59, 0, 0, 0, 154, 0, 0, 62, 0], [0, 0, 0, 0, 265, 141, 141, 57, 58, 0, 0, 0, 0, 606, 265, 0, 0, 0, 0], [0, 0, 0, 603, 152, 604, 153, 57, 58, 0, 59, 0, 0, 606, 154, 0, 0, 62, 0], [0, 0, 0, 603, 152, 153, 153, 57, 58, 0, 59, 0, 0, 0, 154, 0, 0, 62, 0], [0, 575, 0, 0, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 575, 0, 0], [0, 575, 0, 607, 0, 246, 246, 0, 58, 0, 59, 0, 0, 0, 139, 0, 575, 0, 0], [0, 0, 0, 616, 152, 153, 153, 57, 58, 0, 59, 0, 0, 0, 154, 0, 0, 62, 0], [0, 0, 0, 0, 265, 141, 141, 57, 58, 0, 0, 0, 0, 612, 265, 0, 0, 0, 0], [0, 0, 0, 609, 152, 610, 153, 57, 58, 0, 59, 0, 0, 612, 154, 0, 0, 62, 0], [0, 0, 0, 609, 152, 153, 153, 57, 58, 0, 59, 0, 0, 0, 154, 0, 0, 62, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 549, 0, 0], [0, 0, 0, 0, 91, 92, 92, 22, 23, 0, 24, 0, 0, 0, 93, 0, 0, 27, 0], [0, 0, 0, 0, 112, 113, 113, 32, 33, 0, 34, 0, 0, 0, 114, 0, 0, 37, 0], [0, 0, 0, 0, 152, 153, 153, 57, 58, 0, 59, 0, 0, 0, 154, 0, 0, 62, 0]];
  52811. var accepting = [false, true, true, true, true, true, false, false, true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, false, true, false, true, true, false, false, true, true, true, true, true, true, false, false, true, true, true, true, true, true, true, true, true, true, false, true, true, false, true, true, true, false, true, true, true, false, true, false, true, true, false, false, true, true, true, true, true, true, true, false, true, true, false, true, true, true, false, true, false, true, true, false, false, true, true, true, true, true, true, true, false, true, true, true, false, true, true, true, false, true, false, true, true, false, false, false, true, true, false, false, true, true, true, true, true, true, false, true, false, true, true, false, false, true, true, true, true, true, true, true, false, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, false, true, false, true, true, false, false, false, true, true, false, false, true, true, true, false, true, true, true, true, true, true, false, true, true, true, false, true, false, true, true, false, false, false, true, true, false, false, true, true, true, false, true, true, true, true, true, false, true, true, true, true, true, false, true, true, false, false, false, false, true, true, false, false, true, true, true, false, true, true, true, false, true, false, true, true, false, false, false, true, true, false, false, true, true, true, false, true, true, true, true, false, true, false, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, false, true, true, false, false, false, false, true, true, false, false, true, true, true, false, true, true, true, true, true, false, true, true, false, false, false, false, true, true, false, false, true, true, true, true, false, true, true, true, true, true, true, false, true, true, false, false, false, false, true, false, true, false, true, true, true, true, true, false, true, true, false, false, false, false, true, true, false, false, true, true, true, false, true, true, false, false, true, false, true, true, false, true, true, false, true, true, false, true, true, true, true, true, true, false, true, true, false, false, false, false, true, false, true, true, false, true, true, true, true, true, true, false, true, true, false, false, false, false, true, false, true, false, true, true, true, true, false, false, false, true, true, false, true, true, true, true, true, true, false, true, true, false, false, false, false, true, false, true, false, true, true, false, false, true, true, false, false, true, true, true, false, true, false, true, true, true, true, false, false, false, true, false, true, true, true, true, false, false, false, true, true, false, true, true, true, true, true, true, false, true, true, false, true, false, true, true, true, true, false, false, false, false, false, false, false, true, true, false, false, true, true, false, true, true, true, true, false, true, true, true, true, true, true, false, true, true, false, true, true, false, true, true, true, true, true, true, false, true, true, false, true, false, true, true, true, true, true, true, false, true, true, true, true, true, true, false, true, true, false, false, false, false, false, true, true, false, true, false, true, true, true, true, true, false, true, true, true, true, true, false, true, true, true, true, true, false, true, true, true, false, true, true, true, true, false, false, false, true, false, true, true, true, true, true, false, true, true, true, false, true, true, true, true, true, false, true, true, true, true, false, true, true, true, true, true, false, true, true, false, true, true, true];
  52812. var tags = [[], ["broken_cluster"], ["consonant_syllable"], ["vowel_syllable"], ["broken_cluster"], ["broken_cluster"], [], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["standalone_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["consonant_syllable"], ["broken_cluster"], ["symbol_cluster"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], [], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["broken_cluster"], ["broken_cluster"], ["consonant_syllable", "broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["symbol_cluster"], [], ["symbol_cluster"], ["symbol_cluster"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], [], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], [], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], [], [], [], ["broken_cluster"], ["broken_cluster"], [], [], ["broken_cluster"], ["broken_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], [], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["symbol_cluster"], ["symbol_cluster"], ["symbol_cluster"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], [], [], [], ["consonant_syllable"], ["consonant_syllable"], [], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], [], [], [], ["vowel_syllable"], ["vowel_syllable"], [], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], [], [], [], [], ["broken_cluster"], ["broken_cluster"], [], [], ["broken_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], [], [], [], ["standalone_cluster"], ["standalone_cluster"], [], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["broken_cluster"], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], ["broken_cluster"], ["symbol_cluster"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], [], [], [], [], ["consonant_syllable"], ["consonant_syllable"], [], [], ["consonant_syllable"], ["consonant_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], [], [], [], [], ["vowel_syllable"], ["vowel_syllable"], [], [], ["vowel_syllable"], ["vowel_syllable"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], [], [], [], [], ["broken_cluster"], [], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], [], [], [], [], ["standalone_cluster"], ["standalone_cluster"], [], [], ["standalone_cluster"], ["standalone_cluster"], ["consonant_syllable", "broken_cluster"], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], [], ["consonant_syllable", "broken_cluster"], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], [], [], [], [], ["consonant_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], [], [], [], [], ["vowel_syllable"], [], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], [], [], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], [], [], [], [], ["standalone_cluster"], [], ["consonant_syllable", "broken_cluster"], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], [], [], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], [], [], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], [], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], [], [], [], [], [], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], [], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], [], [], [], [], [], ["consonant_syllable", "broken_cluster"], ["consonant_syllable", "broken_cluster"], [], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], [], [], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], ["consonant_syllable"], [], ["consonant_syllable"], ["consonant_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], ["vowel_syllable"], [], ["vowel_syllable"], ["vowel_syllable"], ["broken_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], ["standalone_cluster"], [], ["standalone_cluster"], ["standalone_cluster"], [], ["consonant_syllable"], ["vowel_syllable"], ["standalone_cluster"]];
  52813. var indicMachine = {
  52814. stateTable: stateTable,
  52815. accepting: accepting,
  52816. tags: tags
  52817. };
  52818. var categories = ["O", "IND", "S", "GB", "B", "FM", "CGJ", "VMAbv", "VMPst", "VAbv", "VPst", "CMBlw", "VPre", "VBlw", "H", "VMBlw", "CMAbv", "MBlw", "CS", "R", "SUB", "MPst", "MPre", "FAbv", "FPst", "FBlw", "null", "SMAbv", "SMBlw", "VMPre", "ZWNJ", "ZWJ", "WJ", "M", "VS", "N", "HN", "MAbv"];
  52819. var decompositions = {
  52820. "2507": [2503, 2494],
  52821. "2508": [2503, 2519],
  52822. "2888": [2887, 2902],
  52823. "2891": [2887, 2878],
  52824. "2892": [2887, 2903],
  52825. "3018": [3014, 3006],
  52826. "3019": [3015, 3006],
  52827. "3020": [3014, 3031],
  52828. "3144": [3142, 3158],
  52829. "3264": [3263, 3285],
  52830. "3271": [3270, 3285],
  52831. "3272": [3270, 3286],
  52832. "3274": [3270, 3266],
  52833. "3275": [3270, 3266, 3285],
  52834. "3402": [3398, 3390],
  52835. "3403": [3399, 3390],
  52836. "3404": [3398, 3415],
  52837. "3546": [3545, 3530],
  52838. "3548": [3545, 3535],
  52839. "3549": [3545, 3535, 3530],
  52840. "3550": [3545, 3551],
  52841. "3635": [3661, 3634],
  52842. "3763": [3789, 3762],
  52843. "3955": [3953, 3954],
  52844. "3957": [3953, 3956],
  52845. "3958": [4018, 3968],
  52846. "3959": [4018, 3953, 3968],
  52847. "3960": [4019, 3968],
  52848. "3961": [4019, 3953, 3968],
  52849. "3969": [3953, 3968],
  52850. "6971": [6970, 6965],
  52851. "6973": [6972, 6965],
  52852. "6976": [6974, 6965],
  52853. "6977": [6975, 6965],
  52854. "6979": [6978, 6965],
  52855. "69934": [69937, 69927],
  52856. "69935": [69938, 69927],
  52857. "70475": [70471, 70462],
  52858. "70476": [70471, 70487],
  52859. "70843": [70841, 70842],
  52860. "70844": [70841, 70832],
  52861. "70846": [70841, 70845],
  52862. "71098": [71096, 71087],
  52863. "71099": [71097, 71087]
  52864. };
  52865. var stateTable$1 = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 3, 4, 4, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 17, 18, 11, 19, 20, 21, 22, 0, 0, 0, 23, 0, 0, 2, 0, 0, 24, 0, 25], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 0, 0, 0, 0, 0, 27, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 0, 41, 35, 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 39, 0, 0, 47], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 0, 12, 0, 14, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 0, 9, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 16, 0, 0, 18, 11, 19, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 25], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 11, 12, 0, 14, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 0, 9, 0, 0, 12, 0, 14, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0, 7, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 18, 11, 19, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 25], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 11, 12, 0, 14, 0, 0, 0, 0, 0, 11, 0, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 4, 4, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 18, 11, 19, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 25], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 48, 11, 12, 13, 14, 48, 16, 0, 0, 18, 11, 19, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 49, 0, 0, 25], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 11, 12, 0, 14, 0, 16, 0, 0, 0, 11, 0, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 25], [0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 51, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 11, 12, 0, 14, 0, 16, 0, 0, 0, 11, 0, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 0, 0, 36, 0, 38, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 0, 33, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 0, 40, 0, 0, 41, 35, 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 47], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 0, 35, 36, 0, 38, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 0, 33, 0, 0, 36, 0, 38, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 0, 31, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 0, 0, 41, 35, 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 47], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 0, 35, 36, 0, 38, 0, 0, 0, 0, 0, 35, 0, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 52, 35, 36, 37, 38, 52, 40, 0, 0, 41, 35, 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 53, 0, 0, 47], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 0, 35, 36, 0, 38, 0, 40, 0, 0, 0, 35, 0, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 47], [0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 44, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 0, 0, 0, 0, 0, 0, 38, 0, 0, 0, 0, 0, 0, 0, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 0, 35, 36, 0, 38, 0, 40, 0, 0, 0, 35, 0, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 48, 11, 12, 13, 14, 0, 16, 0, 0, 18, 11, 19, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 25], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 48, 11, 12, 13, 14, 48, 16, 0, 0, 18, 11, 19, 20, 21, 22, 0, 0, 0, 23, 0, 0, 0, 0, 0, 0, 0, 25], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 51, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 54, 0, 0], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 52, 35, 36, 37, 38, 0, 40, 0, 0, 41, 35, 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 47], [0, 0, 0, 0, 0, 29, 0, 30, 31, 32, 33, 52, 35, 36, 37, 38, 52, 40, 0, 0, 41, 35, 42, 43, 44, 45, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 47], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 0, 51, 0]];
  52866. var accepting$1 = [false, true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true];
  52867. var tags$1 = [[], ["broken_cluster"], ["independent_cluster"], ["symbol_cluster"], ["standard_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["numeral_cluster"], ["broken_cluster"], ["independent_cluster"], ["symbol_cluster"], ["symbol_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["virama_terminated_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["broken_cluster"], ["broken_cluster"], ["numeral_cluster"], ["number_joiner_terminated_cluster"], ["standard_cluster"], ["standard_cluster"], ["numeral_cluster"]];
  52868. var useData = {
  52869. categories: categories,
  52870. decompositions: decompositions,
  52871. stateTable: stateTable$1,
  52872. accepting: accepting$1,
  52873. tags: tags$1
  52874. }; // Cateories used in the OpenType spec:
  52875. // https://www.microsoft.com/typography/otfntdev/devanot/shaping.aspx
  52876. var CATEGORIES = {
  52877. X: 1 << 0,
  52878. C: 1 << 1,
  52879. V: 1 << 2,
  52880. N: 1 << 3,
  52881. H: 1 << 4,
  52882. ZWNJ: 1 << 5,
  52883. ZWJ: 1 << 6,
  52884. M: 1 << 7,
  52885. SM: 1 << 8,
  52886. VD: 1 << 9,
  52887. A: 1 << 10,
  52888. Placeholder: 1 << 11,
  52889. Dotted_Circle: 1 << 12,
  52890. RS: 1 << 13,
  52891. // Register Shifter, used in Khmer OT spec.
  52892. Coeng: 1 << 14,
  52893. // Khmer-style Virama.
  52894. Repha: 1 << 15,
  52895. // Atomically-encoded logical or visual repha.
  52896. Ra: 1 << 16,
  52897. CM: 1 << 17,
  52898. // Consonant-Medial.
  52899. Symbol: 1 << 18 // Avagraha, etc that take marks (SM,A,VD).
  52900. }; // Visual positions in a syllable from left to right.
  52901. var POSITIONS = {
  52902. Start: 1 << 0,
  52903. Ra_To_Become_Reph: 1 << 1,
  52904. Pre_M: 1 << 2,
  52905. Pre_C: 1 << 3,
  52906. Base_C: 1 << 4,
  52907. After_Main: 1 << 5,
  52908. Above_C: 1 << 6,
  52909. Before_Sub: 1 << 7,
  52910. Below_C: 1 << 8,
  52911. After_Sub: 1 << 9,
  52912. Before_Post: 1 << 10,
  52913. Post_C: 1 << 11,
  52914. After_Post: 1 << 12,
  52915. Final_C: 1 << 13,
  52916. SMVD: 1 << 14,
  52917. End: 1 << 15
  52918. };
  52919. var CONSONANT_FLAGS = CATEGORIES.C | CATEGORIES.Ra | CATEGORIES.CM | CATEGORIES.V | CATEGORIES.Placeholder | CATEGORIES.Dotted_Circle;
  52920. var JOINER_FLAGS = CATEGORIES.ZWJ | CATEGORIES.ZWNJ;
  52921. var HALANT_OR_COENG_FLAGS = CATEGORIES.H | CATEGORIES.Coeng;
  52922. var INDIC_CONFIGS = {
  52923. Default: {
  52924. hasOldSpec: false,
  52925. virama: 0,
  52926. basePos: 'Last',
  52927. rephPos: POSITIONS.Before_Post,
  52928. rephMode: 'Implicit',
  52929. blwfMode: 'Pre_And_Post'
  52930. },
  52931. Devanagari: {
  52932. hasOldSpec: true,
  52933. virama: 0x094D,
  52934. basePos: 'Last',
  52935. rephPos: POSITIONS.Before_Post,
  52936. rephMode: 'Implicit',
  52937. blwfMode: 'Pre_And_Post'
  52938. },
  52939. Bengali: {
  52940. hasOldSpec: true,
  52941. virama: 0x09CD,
  52942. basePos: 'Last',
  52943. rephPos: POSITIONS.After_Sub,
  52944. rephMode: 'Implicit',
  52945. blwfMode: 'Pre_And_Post'
  52946. },
  52947. Gurmukhi: {
  52948. hasOldSpec: true,
  52949. virama: 0x0A4D,
  52950. basePos: 'Last',
  52951. rephPos: POSITIONS.Before_Sub,
  52952. rephMode: 'Implicit',
  52953. blwfMode: 'Pre_And_Post'
  52954. },
  52955. Gujarati: {
  52956. hasOldSpec: true,
  52957. virama: 0x0ACD,
  52958. basePos: 'Last',
  52959. rephPos: POSITIONS.Before_Post,
  52960. rephMode: 'Implicit',
  52961. blwfMode: 'Pre_And_Post'
  52962. },
  52963. Oriya: {
  52964. hasOldSpec: true,
  52965. virama: 0x0B4D,
  52966. basePos: 'Last',
  52967. rephPos: POSITIONS.After_Main,
  52968. rephMode: 'Implicit',
  52969. blwfMode: 'Pre_And_Post'
  52970. },
  52971. Tamil: {
  52972. hasOldSpec: true,
  52973. virama: 0x0BCD,
  52974. basePos: 'Last',
  52975. rephPos: POSITIONS.After_Post,
  52976. rephMode: 'Implicit',
  52977. blwfMode: 'Pre_And_Post'
  52978. },
  52979. Telugu: {
  52980. hasOldSpec: true,
  52981. virama: 0x0C4D,
  52982. basePos: 'Last',
  52983. rephPos: POSITIONS.After_Post,
  52984. rephMode: 'Explicit',
  52985. blwfMode: 'Post_Only'
  52986. },
  52987. Kannada: {
  52988. hasOldSpec: true,
  52989. virama: 0x0CCD,
  52990. basePos: 'Last',
  52991. rephPos: POSITIONS.After_Post,
  52992. rephMode: 'Implicit',
  52993. blwfMode: 'Post_Only'
  52994. },
  52995. Malayalam: {
  52996. hasOldSpec: true,
  52997. virama: 0x0D4D,
  52998. basePos: 'Last',
  52999. rephPos: POSITIONS.After_Main,
  53000. rephMode: 'Log_Repha',
  53001. blwfMode: 'Pre_And_Post'
  53002. },
  53003. // Handled by UniversalShaper
  53004. // Sinhala: {
  53005. // hasOldSpec: false,
  53006. // virama: 0x0DCA,
  53007. // basePos: 'Last_Sinhala',
  53008. // rephPos: POSITIONS.After_Main,
  53009. // rephMode: 'Explicit',
  53010. // blwfMode: 'Pre_And_Post'
  53011. // },
  53012. Khmer: {
  53013. hasOldSpec: false,
  53014. virama: 0x17D2,
  53015. basePos: 'First',
  53016. rephPos: POSITIONS.Ra_To_Become_Reph,
  53017. rephMode: 'Vis_Repha',
  53018. blwfMode: 'Pre_And_Post'
  53019. }
  53020. }; // Additional decompositions that aren't in Unicode
  53021. var INDIC_DECOMPOSITIONS = {
  53022. // Khmer
  53023. 0x17BE: [0x17C1, 0x17BE],
  53024. 0x17BF: [0x17C1, 0x17BF],
  53025. 0x17C0: [0x17C1, 0x17C0],
  53026. 0x17C4: [0x17C1, 0x17C4],
  53027. 0x17C5: [0x17C1, 0x17C5]
  53028. };
  53029. var decompositions$1 = useData.decompositions;
  53030. var trie$1 = new UnicodeTrie(Buffer("AAARAAAAAABg2AAAAWYPmfDtnXuMXFUdx+/uzs7M7szudAtECGJRIMRQbUAithQWkGAKiVhNpFVRRAmIQVCDkDYICGotIA9BTCz8IeUviv7BQ2PBtBIRLBBQIWAUsKg1BKxRAqIgfs/cc+aeOXPej3tnZX7JJ/dxzj3nd36/8753Z5fUsuxgsAwcAU4Gp4BPgM+Cd4P3RjieDs4GXwLrHJ5bDy4DG8A14LvgZrAZbAF3gns0z18ALgY/B78C94NHwBPgabAE/AX8DbwM5sF/QX0yD5vFcU/wVnAgWAoOAyvAceBE8CGwBpwGzgJfAF8BXwXfAFeC68EmsBlsAXeCreA+8CB4DDwF/gh2gd3gFfAGmKxn2QzYC+wHDgRLweFgJTgWrKrnuq/GcQ04jV6fheN54EJwEbgcXAG+Q8O/j+Mt4DZwB9haz8t9Hz3a8iCN/xiOvwRP0evH6fE68AzOH+Ke2eWYhw3PcGnuxvkr4A3QaGRZB7wFLAEHg2XgiEZ/fHKcp/ceBh/A+cngFPCpRm6vM3E8l8a5gN67GMdvgqsbeX2ap9yI601gM7gN3AG20mfuo8cdOP6GpvdUg9oKxz839GV90RDO2/glxN1B790NXsN1rZll7WYRdw+c70uvTwIHNAfTO0RyL5TDmnnbc3lmRQI9UnM0dD5eovfz4FpJ/BNpXNYWV+N6Lfg0hY97JK1vn+Pur9DoQur2F7m436bHDUK8C5t5/8vruo4+97WmXG+GLmzEiBF+PDwEOowYMWLEiBEjRoxYeBw5BDqIPEfXut9yWN+vVNxfrnnmWqR/PdgENoMt4E5wD9gOHgCPgifBs2BXM99b2o3jP8F/wMRUlrXAHNgHvH0q3895J46HguXgWHAGLctmLv9VuL96qnp7jxgxYsSbCbJvuRZ97/tqxT59VVRtixEjRsThBG7OSt5zzoPT0M+cBc4T5noXOs79TqLHeZrHUeCSqeJ96gacXy2kecNU8V6Hh7yXuQlhtw7B/PO1RTkr52Aj8JNFZjYg3gOKuC/g/v6Ls2wNuAY8urg//PcIb+6RZXuDNeCS6SzbBrJWlh0DLiFHco8ed9IjzzvaWfa9sZzTcf6D9mCcnbg3PlNcH4fzS8F2MDaLdQG4dLZIJxbbaZqv4ri8k58f3+mPs66T6/TTzqDeI0aMGDGiHP5dcR8ce/xxYcWi6vOfr725uRzcjnngXVOD61Hync+9uL+Nmyfej/NHpvL56A5Jeuz7uyfo+pqcPz2Vf1NH0ttJ03pekt8SmuY/EPYy9zzbN319ym/9TL6ZIt9MHCXRdxJtoAkWTRdz472n87D9cTwYLJvuz++I6WIePo/zE8AHp4v8WLyP0nufnM6/+zoDx8+DL08P6r9+urheRtO+jD6/cdrsx3mqu8w+xH4PScKIXa5D2jeCm8Et4DbwI/BjcC/4BXgI/Bb8DuwEu8Bu8Ap4A9RaRZptnO8J9gUHgEPAoWA5OLY1qMO90GEV7q+mYWtxPBWcIYnL4p+DsPNbxfVFOP86uAr8DNc34HgTDb8Vx9sVaRFI/LtagzYjnCqpb908EX87eBA8Bh4Hf2jle/9/wvGFVv787rrZZy8h7qtgDOuFOmiBuXYRvg/O9wMHgXeB97SLspk4sq0OI/q9v13+ek+sh3zYSRp9jrYorw9ll1/GRzR+KotYZSHf8laVP2lvpA/8OGdPMk59hqtXZ+L8nHbxvWwqO65ryu+fT3VZz+l4dET7L0R072ljsMyzTpaJqQxsbL8M9WajY789DO85XMp/Dcp3Qztdn+9qf/a97ZWK8PXc3G+TpC/nv8Mncy7ZvICF302P5O+aNiOtLdTXd+D4Q7DVwfcvWvx9zTEJ/o5iG3R8YAjGNFseha5PGuZKz7b7xxXbOrXMcu5eJSo//rXdH/73Enz6L1q/X+fyIu8wZGtNBmkjkzNZNgP2AvuBg2bysKUzduXn/66JtNeN4PCZvO0/x7Ujdn4VnYOvRJzjZ/I+9sQZeftX2Tc1RPcPz/Tf4/si0g+t5Mq+kfZjZL34Mc5ul3PPnE7TOxvHK2qDaZ+L++db2HyYqMo/qVnb/P8uH8/rmnFxR0k6DCu/rjj/RxT7KGUSWgbd+LMQuEgYB1zsk2qtvJD8v5AhdfdttbEunSxbcJD9Zf7chqp1Hlbe7FK1/aPVTfp7FgtC1yGGiSncFK/DhZvi+epZta0WWjlsfDZMyPRdSPrryqSSKnXx1bkq/Ye9TlRpk7Lrjq1UrfdC9X+MtKqwP6+3a/4pJFUZF0pZZpv91MYjMBaRRXbxpho5zQmUY3F+Pt4o7rvQrBXPdm00TaE24uMadaM2meLSI7iu071t3er3b6ZLi8JEde3qw+6zGv+ycF5kaRBh/m1T/7Yl/mMyTuMwadP4xL9ifjJpNwbvDZRJ8G8vnqV/Wf12aa/kyOdl69+BspTsXzGueE6E+JfZnvmXIfNPW+FfXkjb1YmqPNpnLP3b61fHCj/X5tzGANf2y3yqvC7Jv7btV4TVbdammI9l/g0dS5lNxLrk2j9r8xjjxhBQnygg0lgg/bOrfyct+udJi/Yrk0lFnxC7f+5kRbsNmcexfrubt0X/rGvLqrGSnYv3ZPHEe8r7lvMvUfi2LOu/2dg8LrRtQt2yfcv8r5IU70VkIs6nbebUXf0M/o7Znl39Sdoz+X1oEb5N8ffF67qhPfPP6eoUbxf+GRf/6sRnvaSdmw+Bf1VxmbD+2sa//DU7t/Gv2PfKpKdrBP92Ojk+IvqX16ks/2qxbL8EZnc2HqsgYuqPuzZV+I3RbujbDm+T0PmWCVO/5jqftp1zy+wSA6s0JWtp2z5e1oZV+yMsjB3ZXolsv0Ulrv01v3/iKrF94Qtbt9siCnmeb6fjjf59KnLk1xaEbvtvFnFirGvEOqmycQrbm/IMsXd3P28uh4nM3swXRER717OiX8kc7K2qqyn2p3maFGU/aruP5VCv+PraoTYU8yUmmbDwcYo6pusnM486xdoga4dkPCb1pK7Sfc6ebvkd4qeAtQcd/N63bB3lU3dlUnUf38VyvqCqK7JxlNSd7lydrDlm+/uqHiRvl30Nrp/n9zpkZRjoJ3V1diyP05rIYXHYs+w+D5+WMS8b5gZtKcuX0KT5d/WwtB97VnyvY6rjMukI56HI0rFJPwt8PjT/1OXzSbcMeEmdh294qvKK4rNu7j4n3LNZg8TKXwafv025U+XvKjHsT8Q7/7LGaJt9lAh7Asz3uv0XEX6t0duDoWN/93wmh92XpUHmCKb9GALbG+rZP3AfNbQPKKv/jpF/bP0JXfuW1QYk7dhljcyvk5mw+933Hpo1g26PQ2ZP6zVmTJt47P25jncD9vPwGS+q9QS/V6RaY8j8K8LmvUr9HfYCpH5OWL9lZY+Sv6pesHCJHbtrf9k6etZvf0G1L0ja4cAe1UT/s3zdCe3/Q5/n372wMc97/E1Qh0Tbmfwh3m/V9On72tNnrCF1sJkVe1EyXMdBa7+lHMsk44zMF6St9e2djNnbm8ybpHkq+gbbemMaH0UZmD8obKGrk7r+nt+3bE7o83YZp/vqOKdv6PzJNN6mTJsI/51XR7i2ZrGA5B6zFwnjzxmqPjaGfW3tZNrz1eljq29mOOqeCfF/irRt87PNw0uXSVAvrmOMNT569MptsYaV0sic/wbY13e8hPrb9K2ySUJ0j6G/Lu0U4qpTrR23jMp6m5hU+YTaWCeh9aIsm/rqUHV4bFv42kgnZdfH1PUj1D7DVH9d8khRN1zFRl/+/TW//qxL1uH83+mk3H+SvRtS2TDU90nX2TpM6/1xzZpZtoYdK763dqlz0f6uNeFehcs+H/nbGP77MpX06n/ofpzP+tVmTUvRtVuX/cjS67OE5kRBrxyJ+w/dPo7r+9cO1160e3gqu0S2uW7PjN/L6ns/UfMf10Lai87frJ+3KndAfc8yTf1M3T4s6qm4/yh7/2GSkG8UMw//DvRLgbYZSEOxr0LCWvRdjfh9XGzfqN4NivfZd7rsmFp08zmbssrKJEuTfVMZopdpbuwSrhNv3/N2s+0PDG3KNB6RMrFvJHv6B85HXObAoWsd3zm3i+6uZYytv+5+pohbpo6+tpZJFfmGlrcMf4c8b1Pe2OUIsaXJrinCTfaxtZOt+NYnU3hIfQlN20Z/1+dt7JaqLsbIzycNWZmrlNg2Dc2/LJ1T+T6WrrYSml4Ku7ik7yIx2opJD51vU9UfVRmrqL8u/olZj0PyCLV5irxcdKoi/6rKb8qTrHsnhW9jyZH/nSpeWDzxd9769uQ016lgUuf2pAfKPhu2FpfZL2Yb9snLNl/fNIepXaUsj4vNXCXUZ75px8ojNP8UPvAta2g6fb+F1ckZuneshv1vGXXDeyRRrN/bBPS1Jul+l+7zW86R7Wv63WXyDpt/RxraRjvC+TC3O61/Sqj/prag8x372yQivn+XwudrI2X2E2KdtJEov52e0L+uv4FO3p/rvssgsL8F4d/z9PzlWS94m8fqS3361Fi+6qaVYHwi9Yz4iH2fobIj+45cpz/TUaarr/4+z+vaWtVtyAX2d1LG8W9C3f+F1mnf36/k4w3YPrLv+XBVXCJs3cr+n4MKJuLv/fN9GhNdXVP5pJMN9vFi3rpv3/r8Ywg3SYp66zNOsO8QGcxPpnmRS/1mvmJjju3v7absI2xspQrvs1dNbjOj/wP7h1RlZyKGy8occ408UL8En4v6xfC/K3z52XzJd62T8vuZGGsxo/6O46ntmNqqFb/jps2/hHV4rPKH0svT4pstU7t2tZ9u/ZdqbJL1MwP6O86Fyt4jYaIrGz9mjEt8lFL4PtVE6votG2P6fpdf/GZRse7s3bf4BtSl/DIbKMctx++Z+8o6K6z9FPOwKsRmXiaNl7C+6NYRpjlbqG1j72f49qsuY4brd/amb4ZVc8TQ+sSH985LrEe8iPWJnfPrJRbWbb+dwn4x6o+r/aS2S7w3qWt//LnYz2ntE0vH1uDcyKatx1rH+EiMPEN1SZG/iz6+9o01Rob6O7Q+xLZ1jHobK61U+pWVvo2EpuWqzzD6Poa+pvhli0wn8Zq/72Mzm2d90o5VN1x9ZKuzbTgvqWwUIin8FSpl1CXXvFRxU0iozVPYJDRtF3uFphn6XAyJUUdD7SjTJ8v6n9fVbVObkKWp001lc9VRlqdOf5v0ZM+bymdbfp1NfG0bq27Y5JMyfxeJkU6o/inKH8O2Zfgidb6h/g3VJ7QcVbWL0Pxt6rlrPqa4KfQ25a2zl4/E8GdM/4fK/wA=","base64"));
  53031. var stateMachine = new StateMachine(indicMachine);
  53032. /**
  53033. * The IndicShaper supports indic scripts e.g. Devanagari, Kannada, etc.
  53034. * Based on code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc
  53035. */
  53036. var IndicShaper = /*#__PURE__*/function (_DefaultShaper3) {
  53037. _inheritsLoose(IndicShaper, _DefaultShaper3);
  53038. function IndicShaper() {
  53039. return _DefaultShaper3.apply(this, arguments) || this;
  53040. }
  53041. IndicShaper.planFeatures = function planFeatures(plan) {
  53042. plan.addStage(setupSyllables);
  53043. plan.addStage(['locl', 'ccmp']);
  53044. plan.addStage(initialReordering);
  53045. plan.addStage('nukt');
  53046. plan.addStage('akhn');
  53047. plan.addStage('rphf', false);
  53048. plan.addStage('rkrf');
  53049. plan.addStage('pref', false);
  53050. plan.addStage('blwf', false);
  53051. plan.addStage('abvf', false);
  53052. plan.addStage('half', false);
  53053. plan.addStage('pstf', false);
  53054. plan.addStage('vatu');
  53055. plan.addStage('cjct');
  53056. plan.addStage('cfar', false);
  53057. plan.addStage(finalReordering);
  53058. plan.addStage({
  53059. local: ['init'],
  53060. global: ['pres', 'abvs', 'blws', 'psts', 'haln', 'dist', 'abvm', 'blwm', 'calt', 'clig']
  53061. }); // Setup the indic config for the selected script
  53062. plan.unicodeScript = fromOpenType(plan.script);
  53063. plan.indicConfig = INDIC_CONFIGS[plan.unicodeScript] || INDIC_CONFIGS.Default;
  53064. plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2'; // TODO: turn off kern (Khmer) and liga features.
  53065. };
  53066. IndicShaper.assignFeatures = function assignFeatures(plan, glyphs) {
  53067. var _loop = function _loop(i) {
  53068. var codepoint = glyphs[i].codePoints[0];
  53069. var d = INDIC_DECOMPOSITIONS[codepoint] || decompositions$1[codepoint];
  53070. if (d) {
  53071. var decomposed = d.map(function (c) {
  53072. var g = plan.font.glyphForCodePoint(c);
  53073. return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);
  53074. });
  53075. glyphs.splice.apply(glyphs, [i, 1].concat(decomposed));
  53076. }
  53077. }; // Decompose split matras
  53078. // TODO: do this in a more general unicode normalizer
  53079. for (var i = glyphs.length - 1; i >= 0; i--) {
  53080. _loop(i);
  53081. }
  53082. };
  53083. return IndicShaper;
  53084. }(DefaultShaper);
  53085. _defineProperty(IndicShaper, "zeroMarkWidths", 'NONE');
  53086. function indicCategory(glyph) {
  53087. return trie$1.get(glyph.codePoints[0]) >> 8;
  53088. }
  53089. function indicPosition(glyph) {
  53090. return 1 << (trie$1.get(glyph.codePoints[0]) & 0xff);
  53091. }
  53092. var IndicInfo = function IndicInfo(category, position, syllableType, syllable) {
  53093. this.category = category;
  53094. this.position = position;
  53095. this.syllableType = syllableType;
  53096. this.syllable = syllable;
  53097. };
  53098. function setupSyllables(font, glyphs) {
  53099. var syllable = 0;
  53100. var last = 0;
  53101. for (var _iterator53 = _createForOfIteratorHelperLoose(stateMachine.match(glyphs.map(indicCategory))), _step53; !(_step53 = _iterator53()).done;) {
  53102. var _step53$value = _step53.value,
  53103. start = _step53$value[0],
  53104. end = _step53$value[1],
  53105. tags = _step53$value[2];
  53106. if (start > last) {
  53107. ++syllable;
  53108. for (var i = last; i < start; i++) {
  53109. glyphs[i].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);
  53110. }
  53111. }
  53112. ++syllable; // Create shaper info
  53113. for (var _i = start; _i <= end; _i++) {
  53114. glyphs[_i].shaperInfo = new IndicInfo(1 << indicCategory(glyphs[_i]), indicPosition(glyphs[_i]), tags[0], syllable);
  53115. }
  53116. last = end + 1;
  53117. }
  53118. if (last < glyphs.length) {
  53119. ++syllable;
  53120. for (var _i2 = last; _i2 < glyphs.length; _i2++) {
  53121. glyphs[_i2].shaperInfo = new IndicInfo(CATEGORIES.X, POSITIONS.End, 'non_indic_cluster', syllable);
  53122. }
  53123. }
  53124. }
  53125. function isConsonant(glyph) {
  53126. return glyph.shaperInfo.category & CONSONANT_FLAGS;
  53127. }
  53128. function isJoiner(glyph) {
  53129. return glyph.shaperInfo.category & JOINER_FLAGS;
  53130. }
  53131. function isHalantOrCoeng(glyph) {
  53132. return glyph.shaperInfo.category & HALANT_OR_COENG_FLAGS;
  53133. }
  53134. function wouldSubstitute(glyphs, feature) {
  53135. for (var _iterator54 = _createForOfIteratorHelperLoose(glyphs), _step54; !(_step54 = _iterator54()).done;) {
  53136. var _glyph$features;
  53137. var glyph = _step54.value;
  53138. glyph.features = (_glyph$features = {}, _glyph$features[feature] = true, _glyph$features);
  53139. }
  53140. var GSUB = glyphs[0]._font._layoutEngine.engine.GSUBProcessor;
  53141. GSUB.applyFeatures([feature], glyphs);
  53142. return glyphs.length === 1;
  53143. }
  53144. function consonantPosition(font, consonant, virama) {
  53145. var glyphs = [virama, consonant, virama];
  53146. if (wouldSubstitute(glyphs.slice(0, 2), 'blwf') || wouldSubstitute(glyphs.slice(1, 3), 'blwf')) {
  53147. return POSITIONS.Below_C;
  53148. } else if (wouldSubstitute(glyphs.slice(0, 2), 'pstf') || wouldSubstitute(glyphs.slice(1, 3), 'pstf')) {
  53149. return POSITIONS.Post_C;
  53150. } else if (wouldSubstitute(glyphs.slice(0, 2), 'pref') || wouldSubstitute(glyphs.slice(1, 3), 'pref')) {
  53151. return POSITIONS.Post_C;
  53152. }
  53153. return POSITIONS.Base_C;
  53154. }
  53155. function initialReordering(font, glyphs, plan) {
  53156. var indicConfig = plan.indicConfig;
  53157. var features = font._layoutEngine.engine.GSUBProcessor.features;
  53158. var dottedCircle = font.glyphForCodePoint(0x25cc).id;
  53159. var virama = font.glyphForCodePoint(indicConfig.virama).id;
  53160. if (virama) {
  53161. var info = new GlyphInfo(font, virama, [indicConfig.virama]);
  53162. for (var i = 0; i < glyphs.length; i++) {
  53163. if (glyphs[i].shaperInfo.position === POSITIONS.Base_C) {
  53164. glyphs[i].shaperInfo.position = consonantPosition(font, glyphs[i].copy(), info);
  53165. }
  53166. }
  53167. }
  53168. for (var start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {
  53169. var _glyphs$start$shaperI = glyphs[start].shaperInfo,
  53170. category = _glyphs$start$shaperI.category,
  53171. syllableType = _glyphs$start$shaperI.syllableType;
  53172. if (syllableType === 'symbol_cluster' || syllableType === 'non_indic_cluster') {
  53173. continue;
  53174. }
  53175. if (syllableType === 'broken_cluster' && dottedCircle) {
  53176. var g = new GlyphInfo(font, dottedCircle, [0x25cc]);
  53177. g.shaperInfo = new IndicInfo(1 << indicCategory(g), indicPosition(g), glyphs[start].shaperInfo.syllableType, glyphs[start].shaperInfo.syllable); // Insert after possible Repha.
  53178. var _i3 = start;
  53179. while (_i3 < end && glyphs[_i3].shaperInfo.category === CATEGORIES.Repha) {
  53180. _i3++;
  53181. }
  53182. glyphs.splice(_i3++, 0, g);
  53183. end++;
  53184. } // 1. Find base consonant:
  53185. //
  53186. // The shaping engine finds the base consonant of the syllable, using the
  53187. // following algorithm: starting from the end of the syllable, move backwards
  53188. // until a consonant is found that does not have a below-base or post-base
  53189. // form (post-base forms have to follow below-base forms), or that is not a
  53190. // pre-base reordering Ra, or arrive at the first consonant. The consonant
  53191. // stopped at will be the base.
  53192. var base = end;
  53193. var limit = start;
  53194. var hasReph = false; // If the syllable starts with Ra + Halant (in a script that has Reph)
  53195. // and has more than one consonant, Ra is excluded from candidates for
  53196. // base consonants.
  53197. if (indicConfig.rephPos !== POSITIONS.Ra_To_Become_Reph && features.rphf && start + 3 <= end && (indicConfig.rephMode === 'Implicit' && !isJoiner(glyphs[start + 2]) || indicConfig.rephMode === 'Explicit' && glyphs[start + 2].shaperInfo.category === CATEGORIES.ZWJ)) {
  53198. // See if it matches the 'rphf' feature.
  53199. var _g = [glyphs[start].copy(), glyphs[start + 1].copy(), glyphs[start + 2].copy()];
  53200. if (wouldSubstitute(_g.slice(0, 2), 'rphf') || indicConfig.rephMode === 'Explicit' && wouldSubstitute(_g, 'rphf')) {
  53201. limit += 2;
  53202. while (limit < end && isJoiner(glyphs[limit])) {
  53203. limit++;
  53204. }
  53205. base = start;
  53206. hasReph = true;
  53207. }
  53208. } else if (indicConfig.rephMode === 'Log_Repha' && glyphs[start].shaperInfo.category === CATEGORIES.Repha) {
  53209. limit++;
  53210. while (limit < end && isJoiner(glyphs[limit])) {
  53211. limit++;
  53212. }
  53213. base = start;
  53214. hasReph = true;
  53215. }
  53216. switch (indicConfig.basePos) {
  53217. case 'Last':
  53218. {
  53219. // starting from the end of the syllable, move backwards
  53220. var _i4 = end;
  53221. var seenBelow = false;
  53222. do {
  53223. var _info = glyphs[--_i4].shaperInfo; // until a consonant is found
  53224. if (isConsonant(glyphs[_i4])) {
  53225. // that does not have a below-base or post-base form
  53226. // (post-base forms have to follow below-base forms),
  53227. if (_info.position !== POSITIONS.Below_C && (_info.position !== POSITIONS.Post_C || seenBelow)) {
  53228. base = _i4;
  53229. break;
  53230. } // or that is not a pre-base reordering Ra,
  53231. //
  53232. // IMPLEMENTATION NOTES:
  53233. //
  53234. // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped
  53235. // by the logic above already.
  53236. //
  53237. // or arrive at the first consonant. The consonant stopped at will
  53238. // be the base.
  53239. if (_info.position === POSITIONS.Below_C) {
  53240. seenBelow = true;
  53241. }
  53242. base = _i4;
  53243. } else if (start < _i4 && _info.category === CATEGORIES.ZWJ && glyphs[_i4 - 1].shaperInfo.category === CATEGORIES.H) {
  53244. // A ZWJ after a Halant stops the base search, and requests an explicit
  53245. // half form.
  53246. // A ZWJ before a Halant, requests a subjoined form instead, and hence
  53247. // search continues. This is particularly important for Bengali
  53248. // sequence Ra,H,Ya that should form Ya-Phalaa by subjoining Ya.
  53249. break;
  53250. }
  53251. } while (_i4 > limit);
  53252. break;
  53253. }
  53254. case 'First':
  53255. {
  53256. // The first consonant is always the base.
  53257. base = start; // Mark all subsequent consonants as below.
  53258. for (var _i5 = base + 1; _i5 < end; _i5++) {
  53259. if (isConsonant(glyphs[_i5])) {
  53260. glyphs[_i5].shaperInfo.position = POSITIONS.Below_C;
  53261. }
  53262. }
  53263. }
  53264. } // If the syllable starts with Ra + Halant (in a script that has Reph)
  53265. // and has more than one consonant, Ra is excluded from candidates for
  53266. // base consonants.
  53267. //
  53268. // Only do this for unforced Reph. (ie. not for Ra,H,ZWJ)
  53269. if (hasReph && base === start && limit - base <= 2) {
  53270. hasReph = false;
  53271. } // 2. Decompose and reorder Matras:
  53272. //
  53273. // Each matra and any syllable modifier sign in the cluster are moved to the
  53274. // appropriate position relative to the consonant(s) in the cluster. The
  53275. // shaping engine decomposes two- or three-part matras into their constituent
  53276. // parts before any repositioning. Matra characters are classified by which
  53277. // consonant in a conjunct they have affinity for and are reordered to the
  53278. // following positions:
  53279. //
  53280. // o Before first half form in the syllable
  53281. // o After subjoined consonants
  53282. // o After post-form consonant
  53283. // o After main consonant (for above marks)
  53284. //
  53285. // IMPLEMENTATION NOTES:
  53286. //
  53287. // The normalize() routine has already decomposed matras for us, so we don't
  53288. // need to worry about that.
  53289. // 3. Reorder marks to canonical order:
  53290. //
  53291. // Adjacent nukta and halant or nukta and vedic sign are always repositioned
  53292. // if necessary, so that the nukta is first.
  53293. //
  53294. // IMPLEMENTATION NOTES:
  53295. //
  53296. // We don't need to do this: the normalize() routine already did this for us.
  53297. // Reorder characters
  53298. for (var _i6 = start; _i6 < base; _i6++) {
  53299. var _info2 = glyphs[_i6].shaperInfo;
  53300. _info2.position = Math.min(POSITIONS.Pre_C, _info2.position);
  53301. }
  53302. if (base < end) {
  53303. glyphs[base].shaperInfo.position = POSITIONS.Base_C;
  53304. } // Mark final consonants. A final consonant is one appearing after a matra,
  53305. // like in Khmer.
  53306. for (var _i7 = base + 1; _i7 < end; _i7++) {
  53307. if (glyphs[_i7].shaperInfo.category === CATEGORIES.M) {
  53308. for (var j = _i7 + 1; j < end; j++) {
  53309. if (isConsonant(glyphs[j])) {
  53310. glyphs[j].shaperInfo.position = POSITIONS.Final_C;
  53311. break;
  53312. }
  53313. }
  53314. break;
  53315. }
  53316. } // Handle beginning Ra
  53317. if (hasReph) {
  53318. glyphs[start].shaperInfo.position = POSITIONS.Ra_To_Become_Reph;
  53319. } // For old-style Indic script tags, move the first post-base Halant after
  53320. // last consonant.
  53321. //
  53322. // Reports suggest that in some scripts Uniscribe does this only if there
  53323. // is *not* a Halant after last consonant already (eg. Kannada), while it
  53324. // does it unconditionally in other scripts (eg. Malayalam). We don't
  53325. // currently know about other scripts, so we single out Malayalam for now.
  53326. //
  53327. // Kannada test case:
  53328. // U+0C9A,U+0CCD,U+0C9A,U+0CCD
  53329. // With some versions of Lohit Kannada.
  53330. // https://bugs.freedesktop.org/show_bug.cgi?id=59118
  53331. //
  53332. // Malayalam test case:
  53333. // U+0D38,U+0D4D,U+0D31,U+0D4D,U+0D31,U+0D4D
  53334. // With lohit-ttf-20121122/Lohit-Malayalam.ttf
  53335. if (plan.isOldSpec) {
  53336. var disallowDoubleHalants = plan.unicodeScript !== 'Malayalam';
  53337. for (var _i8 = base + 1; _i8 < end; _i8++) {
  53338. if (glyphs[_i8].shaperInfo.category === CATEGORIES.H) {
  53339. var _j = void 0;
  53340. for (_j = end - 1; _j > _i8; _j--) {
  53341. if (isConsonant(glyphs[_j]) || disallowDoubleHalants && glyphs[_j].shaperInfo.category === CATEGORIES.H) {
  53342. break;
  53343. }
  53344. }
  53345. if (glyphs[_j].shaperInfo.category !== CATEGORIES.H && _j > _i8) {
  53346. // Move Halant to after last consonant.
  53347. var t = glyphs[_i8];
  53348. glyphs.splice.apply(glyphs, [_i8, 0].concat(glyphs.splice(_i8 + 1, _j - _i8)));
  53349. glyphs[_j] = t;
  53350. }
  53351. break;
  53352. }
  53353. }
  53354. } // Attach misc marks to previous char to move with them.
  53355. var lastPos = POSITIONS.Start;
  53356. for (var _i9 = start; _i9 < end; _i9++) {
  53357. var _info3 = glyphs[_i9].shaperInfo;
  53358. if (_info3.category & (JOINER_FLAGS | CATEGORIES.N | CATEGORIES.RS | CATEGORIES.CM | HALANT_OR_COENG_FLAGS & _info3.category)) {
  53359. _info3.position = lastPos;
  53360. if (_info3.category === CATEGORIES.H && _info3.position === POSITIONS.Pre_M) {
  53361. // Uniscribe doesn't move the Halant with Left Matra.
  53362. // TEST: U+092B,U+093F,U+094DE
  53363. // We follow. This is important for the Sinhala
  53364. // U+0DDA split matra since it decomposes to U+0DD9,U+0DCA
  53365. // where U+0DD9 is a left matra and U+0DCA is the virama.
  53366. // We don't want to move the virama with the left matra.
  53367. // TEST: U+0D9A,U+0DDA
  53368. for (var _j2 = _i9; _j2 > start; _j2--) {
  53369. if (glyphs[_j2 - 1].shaperInfo.position !== POSITIONS.Pre_M) {
  53370. _info3.position = glyphs[_j2 - 1].shaperInfo.position;
  53371. break;
  53372. }
  53373. }
  53374. }
  53375. } else if (_info3.position !== POSITIONS.SMVD) {
  53376. lastPos = _info3.position;
  53377. }
  53378. } // For post-base consonants let them own anything before them
  53379. // since the last consonant or matra.
  53380. var last = base;
  53381. for (var _i10 = base + 1; _i10 < end; _i10++) {
  53382. if (isConsonant(glyphs[_i10])) {
  53383. for (var _j3 = last + 1; _j3 < _i10; _j3++) {
  53384. if (glyphs[_j3].shaperInfo.position < POSITIONS.SMVD) {
  53385. glyphs[_j3].shaperInfo.position = glyphs[_i10].shaperInfo.position;
  53386. }
  53387. }
  53388. last = _i10;
  53389. } else if (glyphs[_i10].shaperInfo.category === CATEGORIES.M) {
  53390. last = _i10;
  53391. }
  53392. }
  53393. var arr = glyphs.slice(start, end);
  53394. arr.sort(function (a, b) {
  53395. return a.shaperInfo.position - b.shaperInfo.position;
  53396. });
  53397. glyphs.splice.apply(glyphs, [start, arr.length].concat(arr)); // Find base again
  53398. for (var _i11 = start; _i11 < end; _i11++) {
  53399. if (glyphs[_i11].shaperInfo.position === POSITIONS.Base_C) {
  53400. base = _i11;
  53401. break;
  53402. }
  53403. } // Setup features now
  53404. // Reph
  53405. for (var _i12 = start; _i12 < end && glyphs[_i12].shaperInfo.position === POSITIONS.Ra_To_Become_Reph; _i12++) {
  53406. glyphs[_i12].features.rphf = true;
  53407. } // Pre-base
  53408. var blwf = !plan.isOldSpec && indicConfig.blwfMode === 'Pre_And_Post';
  53409. for (var _i13 = start; _i13 < base; _i13++) {
  53410. glyphs[_i13].features.half = true;
  53411. if (blwf) {
  53412. glyphs[_i13].features.blwf = true;
  53413. }
  53414. } // Post-base
  53415. for (var _i14 = base + 1; _i14 < end; _i14++) {
  53416. glyphs[_i14].features.abvf = true;
  53417. glyphs[_i14].features.pstf = true;
  53418. glyphs[_i14].features.blwf = true;
  53419. }
  53420. if (plan.isOldSpec && plan.unicodeScript === 'Devanagari') {
  53421. // Old-spec eye-lash Ra needs special handling. From the
  53422. // spec:
  53423. //
  53424. // "The feature 'below-base form' is applied to consonants
  53425. // having below-base forms and following the base consonant.
  53426. // The exception is vattu, which may appear below half forms
  53427. // as well as below the base glyph. The feature 'below-base
  53428. // form' will be applied to all such occurrences of Ra as well."
  53429. //
  53430. // Test case: U+0924,U+094D,U+0930,U+094d,U+0915
  53431. // with Sanskrit 2003 font.
  53432. //
  53433. // However, note that Ra,Halant,ZWJ is the correct way to
  53434. // request eyelash form of Ra, so we wouldbn't inhibit it
  53435. // in that sequence.
  53436. //
  53437. // Test case: U+0924,U+094D,U+0930,U+094d,U+200D,U+0915
  53438. for (var _i15 = start; _i15 + 1 < base; _i15++) {
  53439. if (glyphs[_i15].shaperInfo.category === CATEGORIES.Ra && glyphs[_i15 + 1].shaperInfo.category === CATEGORIES.H && (_i15 + 1 === base || glyphs[_i15 + 2].shaperInfo.category === CATEGORIES.ZWJ)) {
  53440. glyphs[_i15].features.blwf = true;
  53441. glyphs[_i15 + 1].features.blwf = true;
  53442. }
  53443. }
  53444. }
  53445. var prefLen = 2;
  53446. if (features.pref && base + prefLen < end) {
  53447. // Find a Halant,Ra sequence and mark it for pre-base reordering processing.
  53448. for (var _i16 = base + 1; _i16 + prefLen - 1 < end; _i16++) {
  53449. var _g2 = [glyphs[_i16].copy(), glyphs[_i16 + 1].copy()];
  53450. if (wouldSubstitute(_g2, 'pref')) {
  53451. for (var _j4 = 0; _j4 < prefLen; _j4++) {
  53452. glyphs[_i16++].features.pref = true;
  53453. } // Mark the subsequent stuff with 'cfar'. Used in Khmer.
  53454. // Read the feature spec.
  53455. // This allows distinguishing the following cases with MS Khmer fonts:
  53456. // U+1784,U+17D2,U+179A,U+17D2,U+1782
  53457. // U+1784,U+17D2,U+1782,U+17D2,U+179A
  53458. if (features.cfar) {
  53459. for (; _i16 < end; _i16++) {
  53460. glyphs[_i16].features.cfar = true;
  53461. }
  53462. }
  53463. break;
  53464. }
  53465. }
  53466. } // Apply ZWJ/ZWNJ effects
  53467. for (var _i17 = start + 1; _i17 < end; _i17++) {
  53468. if (isJoiner(glyphs[_i17])) {
  53469. var nonJoiner = glyphs[_i17].shaperInfo.category === CATEGORIES.ZWNJ;
  53470. var _j5 = _i17;
  53471. do {
  53472. _j5--; // ZWJ/ZWNJ should disable CJCT. They do that by simply
  53473. // being there, since we don't skip them for the CJCT
  53474. // feature (ie. F_MANUAL_ZWJ)
  53475. // A ZWNJ disables HALF.
  53476. if (nonJoiner) {
  53477. delete glyphs[_j5].features.half;
  53478. }
  53479. } while (_j5 > start && !isConsonant(glyphs[_j5]));
  53480. }
  53481. }
  53482. }
  53483. }
  53484. function finalReordering(font, glyphs, plan) {
  53485. var indicConfig = plan.indicConfig;
  53486. var features = font._layoutEngine.engine.GSUBProcessor.features;
  53487. for (var start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {
  53488. // 4. Final reordering:
  53489. //
  53490. // After the localized forms and basic shaping forms GSUB features have been
  53491. // applied (see below), the shaping engine performs some final glyph
  53492. // reordering before applying all the remaining font features to the entire
  53493. // cluster.
  53494. var tryPref = !!features.pref; // Find base again
  53495. var base = start;
  53496. for (; base < end; base++) {
  53497. if (glyphs[base].shaperInfo.position >= POSITIONS.Base_C) {
  53498. if (tryPref && base + 1 < end) {
  53499. for (var i = base + 1; i < end; i++) {
  53500. if (glyphs[i].features.pref) {
  53501. if (!(glyphs[i].substituted && glyphs[i].isLigated && !glyphs[i].isMultiplied)) {
  53502. // Ok, this was a 'pref' candidate but didn't form any.
  53503. // Base is around here...
  53504. base = i;
  53505. while (base < end && isHalantOrCoeng(glyphs[base])) {
  53506. base++;
  53507. }
  53508. glyphs[base].shaperInfo.position = POSITIONS.BASE_C;
  53509. tryPref = false;
  53510. }
  53511. break;
  53512. }
  53513. }
  53514. } // For Malayalam, skip over unformed below- (but NOT post-) forms.
  53515. if (plan.unicodeScript === 'Malayalam') {
  53516. for (var _i18 = base + 1; _i18 < end; _i18++) {
  53517. while (_i18 < end && isJoiner(glyphs[_i18])) {
  53518. _i18++;
  53519. }
  53520. if (_i18 === end || !isHalantOrCoeng(glyphs[_i18])) {
  53521. break;
  53522. }
  53523. _i18++; // Skip halant.
  53524. while (_i18 < end && isJoiner(glyphs[_i18])) {
  53525. _i18++;
  53526. }
  53527. if (_i18 < end && isConsonant(glyphs[_i18]) && glyphs[_i18].shaperInfo.position === POSITIONS.Below_C) {
  53528. base = _i18;
  53529. glyphs[base].shaperInfo.position = POSITIONS.Base_C;
  53530. }
  53531. }
  53532. }
  53533. if (start < base && glyphs[base].shaperInfo.position > POSITIONS.Base_C) {
  53534. base--;
  53535. }
  53536. break;
  53537. }
  53538. }
  53539. if (base === end && start < base && glyphs[base - 1].shaperInfo.category === CATEGORIES.ZWJ) {
  53540. base--;
  53541. }
  53542. if (base < end) {
  53543. while (start < base && glyphs[base].shaperInfo.category & (CATEGORIES.N | HALANT_OR_COENG_FLAGS)) {
  53544. base--;
  53545. }
  53546. } // o Reorder matras:
  53547. //
  53548. // If a pre-base matra character had been reordered before applying basic
  53549. // features, the glyph can be moved closer to the main consonant based on
  53550. // whether half-forms had been formed. Actual position for the matra is
  53551. // defined as “after last standalone halant glyph, after initial matra
  53552. // position and before the main consonant”. If ZWJ or ZWNJ follow this
  53553. // halant, position is moved after it.
  53554. //
  53555. if (start + 1 < end && start < base) {
  53556. // Otherwise there can't be any pre-base matra characters.
  53557. // If we lost track of base, alas, position before last thingy.
  53558. var newPos = base === end ? base - 2 : base - 1; // Malayalam / Tamil do not have "half" forms or explicit virama forms.
  53559. // The glyphs formed by 'half' are Chillus or ligated explicit viramas.
  53560. // We want to position matra after them.
  53561. if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {
  53562. while (newPos > start && !(glyphs[newPos].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {
  53563. newPos--;
  53564. } // If we found no Halant we are done.
  53565. // Otherwise only proceed if the Halant does
  53566. // not belong to the Matra itself!
  53567. if (isHalantOrCoeng(glyphs[newPos]) && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {
  53568. // If ZWJ or ZWNJ follow this halant, position is moved after it.
  53569. if (newPos + 1 < end && isJoiner(glyphs[newPos + 1])) {
  53570. newPos++;
  53571. }
  53572. } else {
  53573. newPos = start; // No move.
  53574. }
  53575. }
  53576. if (start < newPos && glyphs[newPos].shaperInfo.position !== POSITIONS.Pre_M) {
  53577. // Now go see if there's actually any matras...
  53578. for (var _i19 = newPos; _i19 > start; _i19--) {
  53579. if (glyphs[_i19 - 1].shaperInfo.position === POSITIONS.Pre_M) {
  53580. var oldPos = _i19 - 1;
  53581. if (oldPos < base && base <= newPos) {
  53582. // Shouldn't actually happen.
  53583. base--;
  53584. }
  53585. var tmp = glyphs[oldPos];
  53586. glyphs.splice.apply(glyphs, [oldPos, 0].concat(glyphs.splice(oldPos + 1, newPos - oldPos)));
  53587. glyphs[newPos] = tmp;
  53588. newPos--;
  53589. }
  53590. }
  53591. }
  53592. } // o Reorder reph:
  53593. //
  53594. // Reph’s original position is always at the beginning of the syllable,
  53595. // (i.e. it is not reordered at the character reordering stage). However,
  53596. // it will be reordered according to the basic-forms shaping results.
  53597. // Possible positions for reph, depending on the script, are; after main,
  53598. // before post-base consonant forms, and after post-base consonant forms.
  53599. // Two cases:
  53600. //
  53601. // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then
  53602. // we should only move it if the sequence ligated to the repha form.
  53603. //
  53604. // - If repha is encoded separately and in the logical position, we should only
  53605. // move it if it did NOT ligate. If it ligated, it's probably the font trying
  53606. // to make it work without the reordering.
  53607. if (start + 1 < end && glyphs[start].shaperInfo.position === POSITIONS.Ra_To_Become_Reph && glyphs[start].shaperInfo.category === CATEGORIES.Repha !== (glyphs[start].isLigated && !glyphs[start].isMultiplied)) {
  53608. var newRephPos = void 0;
  53609. var rephPos = indicConfig.rephPos;
  53610. var found = false; // 1. If reph should be positioned after post-base consonant forms,
  53611. // proceed to step 5.
  53612. if (rephPos !== POSITIONS.After_Post) {
  53613. // 2. If the reph repositioning class is not after post-base: target
  53614. // position is after the first explicit halant glyph between the
  53615. // first post-reph consonant and last main consonant. If ZWJ or ZWNJ
  53616. // are following this halant, position is moved after it. If such
  53617. // position is found, this is the target position. Otherwise,
  53618. // proceed to the next step.
  53619. //
  53620. // Note: in old-implementation fonts, where classifications were
  53621. // fixed in shaping engine, there was no case where reph position
  53622. // will be found on this step.
  53623. newRephPos = start + 1;
  53624. while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {
  53625. newRephPos++;
  53626. }
  53627. if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {
  53628. // ->If ZWJ or ZWNJ are following this halant, position is moved after it.
  53629. if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {
  53630. newRephPos++;
  53631. }
  53632. found = true;
  53633. } // 3. If reph should be repositioned after the main consonant: find the
  53634. // first consonant not ligated with main, or find the first
  53635. // consonant that is not a potential pre-base reordering Ra.
  53636. if (!found && rephPos === POSITIONS.After_Main) {
  53637. newRephPos = base;
  53638. while (newRephPos + 1 < end && glyphs[newRephPos + 1].shaperInfo.position <= POSITIONS.After_Main) {
  53639. newRephPos++;
  53640. }
  53641. found = newRephPos < end;
  53642. } // 4. If reph should be positioned before post-base consonant, find
  53643. // first post-base classified consonant not ligated with main. If no
  53644. // consonant is found, the target position should be before the
  53645. // first matra, syllable modifier sign or vedic sign.
  53646. //
  53647. // This is our take on what step 4 is trying to say (and failing, BADLY).
  53648. if (!found && rephPos === POSITIONS.After_Sub) {
  53649. newRephPos = base;
  53650. while (newRephPos + 1 < end && !(glyphs[newRephPos + 1].shaperInfo.position & (POSITIONS.Post_C | POSITIONS.After_Post | POSITIONS.SMVD))) {
  53651. newRephPos++;
  53652. }
  53653. found = newRephPos < end;
  53654. }
  53655. } // 5. If no consonant is found in steps 3 or 4, move reph to a position
  53656. // immediately before the first post-base matra, syllable modifier
  53657. // sign or vedic sign that has a reordering class after the intended
  53658. // reph position. For example, if the reordering position for reph
  53659. // is post-main, it will skip above-base matras that also have a
  53660. // post-main position.
  53661. if (!found) {
  53662. // Copied from step 2.
  53663. newRephPos = start + 1;
  53664. while (newRephPos < base && !isHalantOrCoeng(glyphs[newRephPos])) {
  53665. newRephPos++;
  53666. }
  53667. if (newRephPos < base && isHalantOrCoeng(glyphs[newRephPos])) {
  53668. // ->If ZWJ or ZWNJ are following this halant, position is moved after it.
  53669. if (newRephPos + 1 < base && isJoiner(glyphs[newRephPos + 1])) {
  53670. newRephPos++;
  53671. }
  53672. found = true;
  53673. }
  53674. } // 6. Otherwise, reorder reph to the end of the syllable.
  53675. if (!found) {
  53676. newRephPos = end - 1;
  53677. while (newRephPos > start && glyphs[newRephPos].shaperInfo.position === POSITIONS.SMVD) {
  53678. newRephPos--;
  53679. } // If the Reph is to be ending up after a Matra,Halant sequence,
  53680. // position it before that Halant so it can interact with the Matra.
  53681. // However, if it's a plain Consonant,Halant we shouldn't do that.
  53682. // Uniscribe doesn't do this.
  53683. // TEST: U+0930,U+094D,U+0915,U+094B,U+094D
  53684. if (isHalantOrCoeng(glyphs[newRephPos])) {
  53685. for (var _i20 = base + 1; _i20 < newRephPos; _i20++) {
  53686. if (glyphs[_i20].shaperInfo.category === CATEGORIES.M) {
  53687. newRephPos--;
  53688. }
  53689. }
  53690. }
  53691. }
  53692. var reph = glyphs[start];
  53693. glyphs.splice.apply(glyphs, [start, 0].concat(glyphs.splice(start + 1, newRephPos - start)));
  53694. glyphs[newRephPos] = reph;
  53695. if (start < base && base <= newRephPos) {
  53696. base--;
  53697. }
  53698. } // o Reorder pre-base reordering consonants:
  53699. //
  53700. // If a pre-base reordering consonant is found, reorder it according to
  53701. // the following rules:
  53702. if (tryPref && base + 1 < end) {
  53703. for (var _i21 = base + 1; _i21 < end; _i21++) {
  53704. if (glyphs[_i21].features.pref) {
  53705. // 1. Only reorder a glyph produced by substitution during application
  53706. // of the <pref> feature. (Note that a font may shape a Ra consonant with
  53707. // the feature generally but block it in certain contexts.)
  53708. // Note: We just check that something got substituted. We don't check that
  53709. // the <pref> feature actually did it...
  53710. //
  53711. // Reorder pref only if it ligated.
  53712. if (glyphs[_i21].isLigated && !glyphs[_i21].isMultiplied) {
  53713. // 2. Try to find a target position the same way as for pre-base matra.
  53714. // If it is found, reorder pre-base consonant glyph.
  53715. //
  53716. // 3. If position is not found, reorder immediately before main
  53717. // consonant.
  53718. var _newPos = base; // Malayalam / Tamil do not have "half" forms or explicit virama forms.
  53719. // The glyphs formed by 'half' are Chillus or ligated explicit viramas.
  53720. // We want to position matra after them.
  53721. if (plan.unicodeScript !== 'Malayalam' && plan.unicodeScript !== 'Tamil') {
  53722. while (_newPos > start && !(glyphs[_newPos - 1].shaperInfo.category & (CATEGORIES.M | HALANT_OR_COENG_FLAGS))) {
  53723. _newPos--;
  53724. } // In Khmer coeng model, a H,Ra can go *after* matras. If it goes after a
  53725. // split matra, it should be reordered to *before* the left part of such matra.
  53726. if (_newPos > start && glyphs[_newPos - 1].shaperInfo.category === CATEGORIES.M) {
  53727. var _oldPos2 = _i21;
  53728. for (var j = base + 1; j < _oldPos2; j++) {
  53729. if (glyphs[j].shaperInfo.category === CATEGORIES.M) {
  53730. _newPos--;
  53731. break;
  53732. }
  53733. }
  53734. }
  53735. }
  53736. if (_newPos > start && isHalantOrCoeng(glyphs[_newPos - 1])) {
  53737. // -> If ZWJ or ZWNJ follow this halant, position is moved after it.
  53738. if (_newPos < end && isJoiner(glyphs[_newPos])) {
  53739. _newPos++;
  53740. }
  53741. }
  53742. var _oldPos = _i21;
  53743. var _tmp = glyphs[_oldPos];
  53744. glyphs.splice.apply(glyphs, [_newPos + 1, 0].concat(glyphs.splice(_newPos, _oldPos - _newPos)));
  53745. glyphs[_newPos] = _tmp;
  53746. if (_newPos <= base && base < _oldPos) {
  53747. base++;
  53748. }
  53749. }
  53750. break;
  53751. }
  53752. }
  53753. } // Apply 'init' to the Left Matra if it's a word start.
  53754. if (glyphs[start].shaperInfo.position === POSITIONS.Pre_M && (!start || !/Cf|Mn/.test(unicode.getCategory(glyphs[start - 1].codePoints[0])))) {
  53755. glyphs[start].features.init = true;
  53756. }
  53757. }
  53758. }
  53759. function nextSyllable(glyphs, start) {
  53760. if (start >= glyphs.length) return start;
  53761. var syllable = glyphs[start].shaperInfo.syllable;
  53762. while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable) {}
  53763. return start;
  53764. }
  53765. var categories$1 = useData.categories,
  53766. decompositions$2 = useData.decompositions;
  53767. var trie$2 = new UnicodeTrie(Buffer("AAACAAAAAAAQugAAAQUO+vHtnHuMX0UVx2d3u/t7bXe7FlqgvB+mpQhFmhikMRAg0ZQmakMU+cPWBzZisEGNjUpoiIYCEgmGUGOEGqOVNPUZUGNA+QNIBU2KREEFFSMBUYRISMXE+B3vnPzOzp553tcWfif5ZO5jnufMzJ2ZO/eumlDqFLAWnAMuBBvBZnC5uXZeBe4WsA1sBzs8/naCXcL1G8GtYDfYA74NvgfuAfcZHmT+fwEeBb8DTwvxPQWeAavACyZvq8z9VYxXwCGglijVBcvACnA8eCM4E6wHG8BF4BLwbvA+8AHwUbAd7AA7wS5wC9gN7gR7wX5wN7gXPAAeBr8Gvwd/Ac+CF8EhoCaV6oBZsBKcAE4FZ0wWeV8P9zxwoTnfCHczuBxsAdvAx8Gnzf1r4X4B3AxuA1+bHJb9m5PzdVGW/Yjv+xXHyfmxFfd9OH8Q/Ar8Bjw1WZT3GfACeAX8N5CfqSmlZsAKsGqqCH8K3DXgbHCuuXYB3HeAd4HLpgrdarbi+EPgY+CT4HPg8ybMTcb9MtyvghtYut/A+b4pf95+ELgfw08Qx/3gADgInjDl0veehPtX8A/wsrn2KtzxDuogWNoJx38k/BzXKeI8Ee5qcBZYD9aZtDbg+AwT19uMX83F7JizCdcvBZdZ97c6/BMfMWmfzfTm88/95aLj+DDSvApcDXZ04uPfaen3TMHPLvi5BezuFPVtD4t/qUcfe3FvP7gb3Ouwo9T+H+gMy/UIjh8DfwBPm7T08d/M8WMBe1Sh3xEjXo+M2s+IESNGjBgxYsSI1wLrOsM1gRsi/P+TzV3/Zc1jvxgR/j8IM9Et1mEGcJeDFeA4cJq5/ia467uF/w1wzwdvB+80998LdwvYZs63w90Bdnbd6Wp/uzz3R4wYMWJEvZzTMm2Xf8SIEfVQd/v+EsaPt3eL90J3wP2WMJ78Trd4t6+P77Hu37cIxp9/ny6YXqrUJeCR6TA74e/nll81MzxejeMtYA94HBwy91bPYow+O/S3A8d7oIM/gRN7CAP29Iqx/B1ThfuwOecM+vA3NmRjf6Gfm3BtH7v+PI7XDpS6EuwDz4O10+0/f9om1F4ehO4OmHp6EO7jxl56nvhsN/15ut+4Z0b657yYkZ7UJ0jhX0bcr3bn+6P87vekN4762QNzvWHZtL+jcH5srzg/uTf0f3pvfj5i+6tYW7rK9+aefO+tuL4BXAQ2gs3gPeBJc//9OL4CXAWuNvc/A64DN4Jbwe0s7jtxvBfsAz8EPwX3gwPgoJAHPQ9/Atf/bO7p/TTP4fglwS/5/zfujfWH5z0cz4Gj+8X5Sf1ib4m+vwbHZ/fdOtP+z+3LOnPp/QL4vxhsApeCy8BWk/a2ftFmYu22Hf4/Ba4B14Hrwc0sP7fh+Cvg6+Au8F1WthA/8pT7UeTxZ/12njkuXT8UyM9i6iur1EEb6f+yPz/eg0b3v4X7x365fMaW42lPu7PTv6vi8i/G+lWF/cvUk7bLl1r+5/rN5tu3j2qvWTd/qV+4h+AqjDGnBsX59GDo94iBXDa6v6Yjl6vu+h8itJcsZq/ZykHhHg/3tMHhUe9s/Yfuny7YNxTvQ8LYdrER2+/c0GBezhrMv3ZNRv7PmYirh7oOv4W1Y72/cwPOzx8U7X8d2295sfE3MPnbBPfSQbHv9nK4HxTqiK/trI7Yy5mLzvuVg/nX+N7V51A3r+gMy/4J434W7l2dYf5PZWGuNX6uh3uzEPetuLY7sZ20zTETY2oxyBhj3DrnfsidYPeXRGLHpxzX6pbFofGRkFBdGhcgW40L4cYtd9JAElO36q4LEzXHX7VMtZ2BEhJjy9dT25fazOtJxhwsBrHzwfu8w12kMYN9fLhIbp2RxlI59rX1dzjpsKl2Fxt3iu6rbofc9q5+KcRrXVzzDn6/Crvk6p/y1GFgGhs9/6maHjBLgv8/18fTxl1q0bPoW8ywsFTGWaazHosrNn/kP2eeqEroZYLZphsZl7L82eephMIqNT8dyT9JjH1Jpg32ubZvTB/SF665ymSnnaqjUHum+1Qn+NyOtz9f2r6y5OQ51b6hYy0D40r2tYXar30+Y/mbVX6JqY+hMC60XZapoh3S/HdOpT3DYu3rs0lKnquyb277JZvyPlqp+f1zVVK2/dJYNpQGf04uYyh1+PTPqfalZ2tO/xwSu+3bOrDzmWvfcTW/fLmibRx6lkvlcOlc8qsE/y5/rnSk67F1iAu1VT6+4jKt5tufn8e2b+n57JKcckhrsKG1Cd6Wu+Y8tf2l5DenPafqQZ/7xstKLeyr+XnInjSelvRgS9n27JPQM5n6Am7jmLG8VK6m7OvyS2L313XYV2r/tth5LWPfNxhyhI+1Up7HVbe/HMgeZE8brtNQ/7tcyX0cn//H2LTO9kpir5VI6yYp9szJW9W2jI1Tqfl5ic2v1GZ5XaG6RDZbyvxMO/DVh1SdUj5y1vraaHs+2/TYNXvtSRoXk4wrf9w6fEctnFt0zL2y+xFsfSrLza2zOTqMiZv8xOpbn8+xsL5ykdj6VsxNKb/Lvxb7nX8u48y1x6yuMW3V9tNxTlouzXslibVxndjC14xda8g2NIbg5x01XAP2lfeIBFSi/zrQEporTXru8fCueiy1CUnqrhspSM9SzbSS64tep9R1ZsZcOxKsUEUfNZeYtr0vjY5DeXW915hT8/PRV8MxlR1HV4DHZZc9R7dzajgWoXikdLtGr0uEfPigsGS/NvYjSHW87XejoXZehZ74XrcqpQ4d5T5f7Gu8f6g7fQmefoqOqk4/VarQv2o4/VDetPDnhjR2dc3BCBp/9NVw7KGfwStVMf6aZNAajj6224j9HCZbpZa/LvH1gU30i/q5WnUdSNEprxv2eIOwx2pcjjLMsmObo008k0J4u69P3d9QdbspW/dy080Nb8PXqcrmj0vsc7tu6qwD1A5oLYr3U3XWSxqj6/a10nCMkudJMyxvrvbK55jUrqU+Xlr/Iai98jY7mVAml5QNHxq31j2m5TrSdmp6z5p+9kpzQntdQbI1Pafr6I9C60gxrALHGtdF6tyhLTtxeBuW+hhqyzPMX931xl6rJ5f6n5h3blpsW7vKbvdBfL1gpYfjDLrvob1drrRT+mcuMf1OrJSdW/P+RfufdUB+pOtdTzhpL5t0jfKr46P3obQfQdPGt1jS+DEkx4MT2PmEg1j72OthqfZNWX+JuZ4at/2sTAmn5cSIMqZIjk0pnD0+aUI6YS9ekdaspWsp8cWEC62dS66UTkq+ypajyvXSlPz4xhQhm/ns6wpXBVI560jHN9aKkdT46spvWT916rONdHNsGSNtl6Hp8oakTVukpF9n3U3Jx0TNefbp3R4jltVfFfpvQkJpNaH/puyco++qbZPz7sE1L3DFGVovc4XPLUPO3ELyrzLiSpmPhaTJfqeJ+t60PiTh9snNW2656upDQ+Wtyg6ueJquB7HSVPspW9a28lDWJouhb6iyv7XjTfVL67j2vjDpvUfMt1Vl4GvctMaeq/vYcFWXIfV5Ku3XaxK951H6dsWFrhcxa3pU/pz3C1xc71tTcaXjGjtJbYIj7UHm7wxSyx+D/d7SfpfJ3wPpfSQp32tS2dt8V2tD7+Bce3rpPa3eC6Dr8Ulq+K+J3HFvbn312Zv2RdStr9g0pP0P/B04XbP3Q8cIT2dlRF6orkrhY/Rv27FqHfL1DP480ffo/V6V7aTHXLKDbTdXOOrnyG1ScvSv6xqve30lPzdpj36M8Pilb+L5vr0xE3dd30nWIfZ45uSSxK4x+CRmTUK6F/LrSsfnj+aOdYyvpXyMK7/OpHWjlDTsa0rJum5K7Ppnj7F9c+0q0qtr7pQji2X9oMwcVrJfmblwU2V2SV3rEk3YuO46XXf8MfrQz077G2zftyDkj/ZqhcZr9nldkOg5ykAt3GunJbR3NGYsUfWafd3ts853C4dLHppOM6WcfM5C+xSbaC/2HMa1H9v1vXdoXm/LKSVpYh5wqmr/X67SfwHtPc9a97p/k8bt0hpbW0j1Svr2m+7Rd98qIQ1pvSF273dKOjHYNmk6fd8/JX3tWIddblBqoU5p7zrZKnd9TppjVq0DSitWqkwz12b2exb7vwjaRvS/TFd/S+8AYvIo+Suri5TwvvZRdV1IQevQ1/8SA+UeH5eto7n/X1Oe86ptaafl8kPjcF7P7W93eD9d5n+oSvn7fFe7I/G9q1IBfylSR71N6fft94ZU18hOXKR+JqUO8f4+5dvLsmWlMQb/Vov+CUDlpTGUndeQlG3fdZWdRPoPgl3mmDlsLnaey/4X3tVuU+o6L3/Pym+qlLV/jk6rlBRd8394hZ6JdnuqIv2ykOh3pfq96Wkq/E8qu2xl88/tOJ4R3tfmpbGi3c5T859bzqr7MbsN03iI5itUNj5eaEKWqIX/KJCQ/iFWNZMmHXs8ovWk53JzFq5vPul6zDjLV36pX7bzvNzB0YlQOZephWtRS5T7eeSq8030R77/HvC1d7tN83Zt9yltrDdwSR0XxsZd5l+MvvvU1/M9jSnj+Nh6FPJbBld/w6XHXH5MZeXrOfS/65g9RTl1JCa8chzX2RZ9/3lXSh4/VqWfEBNq4b82Ytp6m+9Qqxir1jX+rfPdT1vvsWhM6bPbmON6E1LnPCZW7L0qqXswmtqf0MQelZj4myrzYtzvIYmURlvtqapyx+gzRfd0XPfahVSOquMoG+dibBdl46iyfdbV1qvUW9m8+KTudMvkzZe/pqTJ+pWTflX5zw1fVfox6ZTVc8hvHflOSb+OuG1JsZ0kufXAJf8D","base64"));
  53768. var stateMachine$1 = new StateMachine(useData);
  53769. /**
  53770. * This shaper is an implementation of the Universal Shaping Engine, which
  53771. * uses Unicode data to shape a number of scripts without a dedicated shaping engine.
  53772. * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.
  53773. */
  53774. var UniversalShaper = /*#__PURE__*/function (_DefaultShaper4) {
  53775. _inheritsLoose(UniversalShaper, _DefaultShaper4);
  53776. function UniversalShaper() {
  53777. return _DefaultShaper4.apply(this, arguments) || this;
  53778. }
  53779. UniversalShaper.planFeatures = function planFeatures(plan) {
  53780. plan.addStage(setupSyllables$1); // Default glyph pre-processing group
  53781. plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']); // Reordering group
  53782. plan.addStage(clearSubstitutionFlags);
  53783. plan.addStage(['rphf'], false);
  53784. plan.addStage(recordRphf);
  53785. plan.addStage(clearSubstitutionFlags);
  53786. plan.addStage(['pref']);
  53787. plan.addStage(recordPref); // Orthographic unit shaping group
  53788. plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']);
  53789. plan.addStage(reorder); // Topographical features
  53790. // Scripts that need this are handled by the Arabic shaper, not implemented here for now.
  53791. // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false);
  53792. // Standard topographic presentation and positional feature application
  53793. plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']);
  53794. };
  53795. UniversalShaper.assignFeatures = function assignFeatures(plan, glyphs) {
  53796. var _loop = function _loop(i) {
  53797. var codepoint = glyphs[i].codePoints[0];
  53798. if (decompositions$2[codepoint]) {
  53799. var decomposed = decompositions$2[codepoint].map(function (c) {
  53800. var g = plan.font.glyphForCodePoint(c);
  53801. return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);
  53802. });
  53803. glyphs.splice.apply(glyphs, [i, 1].concat(decomposed));
  53804. }
  53805. }; // Decompose split vowels
  53806. // TODO: do this in a more general unicode normalizer
  53807. for (var i = glyphs.length - 1; i >= 0; i--) {
  53808. _loop(i);
  53809. }
  53810. };
  53811. return UniversalShaper;
  53812. }(DefaultShaper);
  53813. _defineProperty(UniversalShaper, "zeroMarkWidths", 'BEFORE_GPOS');
  53814. function useCategory(glyph) {
  53815. return trie$2.get(glyph.codePoints[0]);
  53816. }
  53817. var USEInfo = function USEInfo(category, syllableType, syllable) {
  53818. this.category = category;
  53819. this.syllableType = syllableType;
  53820. this.syllable = syllable;
  53821. };
  53822. function setupSyllables$1(font, glyphs) {
  53823. var syllable = 0;
  53824. for (var _iterator55 = _createForOfIteratorHelperLoose(stateMachine$1.match(glyphs.map(useCategory))), _step55; !(_step55 = _iterator55()).done;) {
  53825. var _step55$value = _step55.value,
  53826. start = _step55$value[0],
  53827. end = _step55$value[1],
  53828. tags = _step55$value[2];
  53829. ++syllable; // Create shaper info
  53830. for (var i = start; i <= end; i++) {
  53831. glyphs[i].shaperInfo = new USEInfo(categories$1[useCategory(glyphs[i])], tags[0], syllable);
  53832. } // Assign rphf feature
  53833. var limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start);
  53834. for (var _i = start; _i < start + limit; _i++) {
  53835. glyphs[_i].features.rphf = true;
  53836. }
  53837. }
  53838. }
  53839. function clearSubstitutionFlags(font, glyphs) {
  53840. for (var _iterator56 = _createForOfIteratorHelperLoose(glyphs), _step56; !(_step56 = _iterator56()).done;) {
  53841. var glyph = _step56.value;
  53842. glyph.substituted = false;
  53843. }
  53844. }
  53845. function recordRphf(font, glyphs) {
  53846. for (var _iterator57 = _createForOfIteratorHelperLoose(glyphs), _step57; !(_step57 = _iterator57()).done;) {
  53847. var glyph = _step57.value;
  53848. if (glyph.substituted && glyph.features.rphf) {
  53849. // Mark a substituted repha.
  53850. glyph.shaperInfo.category = 'R';
  53851. }
  53852. }
  53853. }
  53854. function recordPref(font, glyphs) {
  53855. for (var _iterator58 = _createForOfIteratorHelperLoose(glyphs), _step58; !(_step58 = _iterator58()).done;) {
  53856. var glyph = _step58.value;
  53857. if (glyph.substituted) {
  53858. // Mark a substituted pref as VPre, as they behave the same way.
  53859. glyph.shaperInfo.category = 'VPre';
  53860. }
  53861. }
  53862. }
  53863. function reorder(font, glyphs) {
  53864. var dottedCircle = font.glyphForCodePoint(0x25cc).id;
  53865. for (var start = 0, end = nextSyllable$1(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable$1(glyphs, start)) {
  53866. var i = void 0,
  53867. j = void 0;
  53868. var info = glyphs[start].shaperInfo;
  53869. var type = info.syllableType; // Only a few syllable types need reordering.
  53870. if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') {
  53871. continue;
  53872. } // Insert a dotted circle glyph in broken clusters.
  53873. if (type === 'broken_cluster' && dottedCircle) {
  53874. var g = new GlyphInfo(font, dottedCircle, [0x25cc]);
  53875. g.shaperInfo = info; // Insert after possible Repha.
  53876. for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++) {}
  53877. glyphs.splice(++i, 0, g);
  53878. end++;
  53879. } // Move things forward.
  53880. if (info.category === 'R' && end - start > 1) {
  53881. // Got a repha. Reorder it to after first base, before first halant.
  53882. for (i = start + 1; i < end; i++) {
  53883. info = glyphs[i].shaperInfo;
  53884. if (isBase(info) || isHalant(glyphs[i])) {
  53885. // If we hit a halant, move before it; otherwise it's a base: move to it's
  53886. // place, and shift things in between backward.
  53887. if (isHalant(glyphs[i])) {
  53888. i--;
  53889. }
  53890. glyphs.splice.apply(glyphs, [start, 0].concat(glyphs.splice(start + 1, i - start), [glyphs[i]]));
  53891. break;
  53892. }
  53893. }
  53894. } // Move things back.
  53895. for (i = start, j = end; i < end; i++) {
  53896. info = glyphs[i].shaperInfo;
  53897. if (isBase(info) || isHalant(glyphs[i])) {
  53898. // If we hit a halant, move after it; otherwise it's a base: move to it's
  53899. // place, and shift things in between backward.
  53900. j = isHalant(glyphs[i]) ? i + 1 : i;
  53901. } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) {
  53902. glyphs.splice.apply(glyphs, [j, 1, glyphs[i]].concat(glyphs.splice(j, i - j)));
  53903. }
  53904. }
  53905. }
  53906. }
  53907. function nextSyllable$1(glyphs, start) {
  53908. if (start >= glyphs.length) return start;
  53909. var syllable = glyphs[start].shaperInfo.syllable;
  53910. while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable) {}
  53911. return start;
  53912. }
  53913. function isHalant(glyph) {
  53914. return glyph.shaperInfo.category === 'H' && !glyph.isLigated;
  53915. }
  53916. function isBase(info) {
  53917. return info.category === 'B' || info.category === 'GB';
  53918. }
  53919. var SHAPERS = {
  53920. arab: ArabicShaper,
  53921. // Arabic
  53922. mong: ArabicShaper,
  53923. // Mongolian
  53924. syrc: ArabicShaper,
  53925. // Syriac
  53926. 'nko ': ArabicShaper,
  53927. // N'Ko
  53928. phag: ArabicShaper,
  53929. // Phags Pa
  53930. mand: ArabicShaper,
  53931. // Mandaic
  53932. mani: ArabicShaper,
  53933. // Manichaean
  53934. phlp: ArabicShaper,
  53935. // Psalter Pahlavi
  53936. hang: HangulShaper,
  53937. // Hangul
  53938. bng2: IndicShaper,
  53939. // Bengali
  53940. beng: IndicShaper,
  53941. // Bengali
  53942. dev2: IndicShaper,
  53943. // Devanagari
  53944. deva: IndicShaper,
  53945. // Devanagari
  53946. gjr2: IndicShaper,
  53947. // Gujarati
  53948. gujr: IndicShaper,
  53949. // Gujarati
  53950. guru: IndicShaper,
  53951. // Gurmukhi
  53952. gur2: IndicShaper,
  53953. // Gurmukhi
  53954. knda: IndicShaper,
  53955. // Kannada
  53956. knd2: IndicShaper,
  53957. // Kannada
  53958. mlm2: IndicShaper,
  53959. // Malayalam
  53960. mlym: IndicShaper,
  53961. // Malayalam
  53962. ory2: IndicShaper,
  53963. // Oriya
  53964. orya: IndicShaper,
  53965. // Oriya
  53966. taml: IndicShaper,
  53967. // Tamil
  53968. tml2: IndicShaper,
  53969. // Tamil
  53970. telu: IndicShaper,
  53971. // Telugu
  53972. tel2: IndicShaper,
  53973. // Telugu
  53974. khmr: IndicShaper,
  53975. // Khmer
  53976. bali: UniversalShaper,
  53977. // Balinese
  53978. batk: UniversalShaper,
  53979. // Batak
  53980. brah: UniversalShaper,
  53981. // Brahmi
  53982. bugi: UniversalShaper,
  53983. // Buginese
  53984. buhd: UniversalShaper,
  53985. // Buhid
  53986. cakm: UniversalShaper,
  53987. // Chakma
  53988. cham: UniversalShaper,
  53989. // Cham
  53990. dupl: UniversalShaper,
  53991. // Duployan
  53992. egyp: UniversalShaper,
  53993. // Egyptian Hieroglyphs
  53994. gran: UniversalShaper,
  53995. // Grantha
  53996. hano: UniversalShaper,
  53997. // Hanunoo
  53998. java: UniversalShaper,
  53999. // Javanese
  54000. kthi: UniversalShaper,
  54001. // Kaithi
  54002. kali: UniversalShaper,
  54003. // Kayah Li
  54004. khar: UniversalShaper,
  54005. // Kharoshthi
  54006. khoj: UniversalShaper,
  54007. // Khojki
  54008. sind: UniversalShaper,
  54009. // Khudawadi
  54010. lepc: UniversalShaper,
  54011. // Lepcha
  54012. limb: UniversalShaper,
  54013. // Limbu
  54014. mahj: UniversalShaper,
  54015. // Mahajani
  54016. // mand: UniversalShaper, // Mandaic
  54017. // mani: UniversalShaper, // Manichaean
  54018. mtei: UniversalShaper,
  54019. // Meitei Mayek
  54020. modi: UniversalShaper,
  54021. // Modi
  54022. // mong: UniversalShaper, // Mongolian
  54023. // 'nko ': UniversalShaper, // N’Ko
  54024. hmng: UniversalShaper,
  54025. // Pahawh Hmong
  54026. // phag: UniversalShaper, // Phags-pa
  54027. // phlp: UniversalShaper, // Psalter Pahlavi
  54028. rjng: UniversalShaper,
  54029. // Rejang
  54030. saur: UniversalShaper,
  54031. // Saurashtra
  54032. shrd: UniversalShaper,
  54033. // Sharada
  54034. sidd: UniversalShaper,
  54035. // Siddham
  54036. sinh: UniversalShaper,
  54037. // Sinhala
  54038. sund: UniversalShaper,
  54039. // Sundanese
  54040. sylo: UniversalShaper,
  54041. // Syloti Nagri
  54042. tglg: UniversalShaper,
  54043. // Tagalog
  54044. tagb: UniversalShaper,
  54045. // Tagbanwa
  54046. tale: UniversalShaper,
  54047. // Tai Le
  54048. lana: UniversalShaper,
  54049. // Tai Tham
  54050. tavt: UniversalShaper,
  54051. // Tai Viet
  54052. takr: UniversalShaper,
  54053. // Takri
  54054. tibt: UniversalShaper,
  54055. // Tibetan
  54056. tfng: UniversalShaper,
  54057. // Tifinagh
  54058. tirh: UniversalShaper,
  54059. // Tirhuta
  54060. latn: DefaultShaper,
  54061. // Latin
  54062. DFLT: DefaultShaper // Default
  54063. };
  54064. function choose(script) {
  54065. if (!Array.isArray(script)) {
  54066. script = [script];
  54067. }
  54068. for (var _iterator59 = _createForOfIteratorHelperLoose(script), _step59; !(_step59 = _iterator59()).done;) {
  54069. var s = _step59.value;
  54070. var shaper = SHAPERS[s];
  54071. if (shaper) {
  54072. return shaper;
  54073. }
  54074. }
  54075. return DefaultShaper;
  54076. }
  54077. var GSUBProcessor = /*#__PURE__*/function (_OTProcessor) {
  54078. _inheritsLoose(GSUBProcessor, _OTProcessor);
  54079. function GSUBProcessor() {
  54080. return _OTProcessor.apply(this, arguments) || this;
  54081. }
  54082. var _proto27 = GSUBProcessor.prototype;
  54083. _proto27.applyLookup = function applyLookup(lookupType, table) {
  54084. var _this7 = this;
  54085. switch (lookupType) {
  54086. case 1:
  54087. {
  54088. // Single Substitution
  54089. var index = this.coverageIndex(table.coverage);
  54090. if (index === -1) {
  54091. return false;
  54092. }
  54093. var glyph = this.glyphIterator.cur;
  54094. switch (table.version) {
  54095. case 1:
  54096. glyph.id = glyph.id + table.deltaGlyphID & 0xffff;
  54097. break;
  54098. case 2:
  54099. glyph.id = table.substitute.get(index);
  54100. break;
  54101. }
  54102. return true;
  54103. }
  54104. case 2:
  54105. {
  54106. // Multiple Substitution
  54107. var _index = this.coverageIndex(table.coverage);
  54108. if (_index !== -1) {
  54109. var _this$glyphs2;
  54110. var sequence = table.sequences.get(_index);
  54111. if (sequence.length === 0) {
  54112. // If the sequence length is zero, delete the glyph.
  54113. // The OpenType spec disallows this, but seems like Harfbuzz and Uniscribe allow it.
  54114. this.glyphs.splice(this.glyphIterator.index, 1);
  54115. return true;
  54116. }
  54117. this.glyphIterator.cur.id = sequence[0];
  54118. this.glyphIterator.cur.ligatureComponent = 0;
  54119. var features = this.glyphIterator.cur.features;
  54120. var curGlyph = this.glyphIterator.cur;
  54121. var replacement = sequence.slice(1).map(function (gid, i) {
  54122. var glyph = new GlyphInfo(_this7.font, gid, undefined, features);
  54123. glyph.shaperInfo = curGlyph.shaperInfo;
  54124. glyph.isLigated = curGlyph.isLigated;
  54125. glyph.ligatureComponent = i + 1;
  54126. glyph.substituted = true;
  54127. glyph.isMultiplied = true;
  54128. return glyph;
  54129. });
  54130. (_this$glyphs2 = this.glyphs).splice.apply(_this$glyphs2, [this.glyphIterator.index + 1, 0].concat(replacement));
  54131. return true;
  54132. }
  54133. return false;
  54134. }
  54135. case 3:
  54136. {
  54137. // Alternate Substitution
  54138. var _index2 = this.coverageIndex(table.coverage);
  54139. if (_index2 !== -1) {
  54140. var USER_INDEX = 0; // TODO
  54141. this.glyphIterator.cur.id = table.alternateSet.get(_index2)[USER_INDEX];
  54142. return true;
  54143. }
  54144. return false;
  54145. }
  54146. case 4:
  54147. {
  54148. // Ligature Substitution
  54149. var _index3 = this.coverageIndex(table.coverage);
  54150. if (_index3 === -1) {
  54151. return false;
  54152. }
  54153. for (var _iterator60 = _createForOfIteratorHelperLoose(table.ligatureSets.get(_index3)), _step60; !(_step60 = _iterator60()).done;) {
  54154. var ligature = _step60.value;
  54155. var matched = this.sequenceMatchIndices(1, ligature.components);
  54156. if (!matched) {
  54157. continue;
  54158. }
  54159. var _curGlyph = this.glyphIterator.cur; // Concatenate all of the characters the new ligature will represent
  54160. var characters = _curGlyph.codePoints.slice();
  54161. for (var _iterator61 = _createForOfIteratorHelperLoose(matched), _step61; !(_step61 = _iterator61()).done;) {
  54162. var _index4 = _step61.value;
  54163. characters.push.apply(characters, this.glyphs[_index4].codePoints);
  54164. } // Create the replacement ligature glyph
  54165. var ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, _curGlyph.features);
  54166. ligatureGlyph.shaperInfo = _curGlyph.shaperInfo;
  54167. ligatureGlyph.isLigated = true;
  54168. ligatureGlyph.substituted = true; // From Harfbuzz:
  54169. // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave
  54170. // the ligature to keep its old ligature id. This will allow it to attach to
  54171. // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,
  54172. // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a
  54173. // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature
  54174. // later, we don't want them to lose their ligature id/component, otherwise
  54175. // GPOS will fail to correctly position the mark ligature on top of the
  54176. // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343
  54177. //
  54178. // - If a ligature is formed of components that some of which are also ligatures
  54179. // themselves, and those ligature components had marks attached to *their*
  54180. // components, we have to attach the marks to the new ligature component
  54181. // positions! Now *that*'s tricky! And these marks may be following the
  54182. // last component of the whole sequence, so we should loop forward looking
  54183. // for them and update them.
  54184. //
  54185. // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a
  54186. // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature
  54187. // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature
  54188. // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to
  54189. // the new ligature with a component value of 2.
  54190. //
  54191. // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633
  54192. var isMarkLigature = _curGlyph.isMark;
  54193. for (var i = 0; i < matched.length && isMarkLigature; i++) {
  54194. isMarkLigature = this.glyphs[matched[i]].isMark;
  54195. }
  54196. ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++;
  54197. var lastLigID = _curGlyph.ligatureID;
  54198. var lastNumComps = _curGlyph.codePoints.length;
  54199. var curComps = lastNumComps;
  54200. var idx = this.glyphIterator.index + 1; // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence.
  54201. // This allows GPOS to attach marks to the correct ligature components.
  54202. for (var _iterator62 = _createForOfIteratorHelperLoose(matched), _step62; !(_step62 = _iterator62()).done;) {
  54203. var matchIndex = _step62.value;
  54204. // Don't assign new ligature components for mark ligatures (see above)
  54205. if (isMarkLigature) {
  54206. idx = matchIndex;
  54207. } else {
  54208. while (idx < matchIndex) {
  54209. var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps);
  54210. this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID;
  54211. this.glyphs[idx].ligatureComponent = ligatureComponent;
  54212. idx++;
  54213. }
  54214. }
  54215. lastLigID = this.glyphs[idx].ligatureID;
  54216. lastNumComps = this.glyphs[idx].codePoints.length;
  54217. curComps += lastNumComps;
  54218. idx++; // skip base glyph
  54219. } // Adjust ligature components for any marks following
  54220. if (lastLigID && !isMarkLigature) {
  54221. for (var _i = idx; _i < this.glyphs.length; _i++) {
  54222. if (this.glyphs[_i].ligatureID === lastLigID) {
  54223. var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[_i].ligatureComponent || 1, lastNumComps);
  54224. this.glyphs[_i].ligatureComponent = ligatureComponent;
  54225. } else {
  54226. break;
  54227. }
  54228. }
  54229. } // Delete the matched glyphs, and replace the current glyph with the ligature glyph
  54230. for (var _i2 = matched.length - 1; _i2 >= 0; _i2--) {
  54231. this.glyphs.splice(matched[_i2], 1);
  54232. }
  54233. this.glyphs[this.glyphIterator.index] = ligatureGlyph;
  54234. return true;
  54235. }
  54236. return false;
  54237. }
  54238. case 5:
  54239. // Contextual Substitution
  54240. return this.applyContext(table);
  54241. case 6:
  54242. // Chaining Contextual Substitution
  54243. return this.applyChainingContext(table);
  54244. case 7:
  54245. // Extension Substitution
  54246. return this.applyLookup(table.lookupType, table.extension);
  54247. default:
  54248. throw new Error("GSUB lookupType ".concat(lookupType, " is not supported"));
  54249. }
  54250. };
  54251. return GSUBProcessor;
  54252. }(OTProcessor);
  54253. var GPOSProcessor = /*#__PURE__*/function (_OTProcessor2) {
  54254. _inheritsLoose(GPOSProcessor, _OTProcessor2);
  54255. function GPOSProcessor() {
  54256. return _OTProcessor2.apply(this, arguments) || this;
  54257. }
  54258. var _proto28 = GPOSProcessor.prototype;
  54259. _proto28.applyPositionValue = function applyPositionValue(sequenceIndex, value) {
  54260. var position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)];
  54261. if (value.xAdvance != null) {
  54262. position.xAdvance += value.xAdvance;
  54263. }
  54264. if (value.yAdvance != null) {
  54265. position.yAdvance += value.yAdvance;
  54266. }
  54267. if (value.xPlacement != null) {
  54268. position.xOffset += value.xPlacement;
  54269. }
  54270. if (value.yPlacement != null) {
  54271. position.yOffset += value.yPlacement;
  54272. } // Adjustments for font variations
  54273. var variationProcessor = this.font._variationProcessor;
  54274. var variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;
  54275. if (variationProcessor && variationStore) {
  54276. if (value.xPlaDevice) {
  54277. position.xOffset += variationProcessor.getDelta(variationStore, value.xPlaDevice.a, value.xPlaDevice.b);
  54278. }
  54279. if (value.yPlaDevice) {
  54280. position.yOffset += variationProcessor.getDelta(variationStore, value.yPlaDevice.a, value.yPlaDevice.b);
  54281. }
  54282. if (value.xAdvDevice) {
  54283. position.xAdvance += variationProcessor.getDelta(variationStore, value.xAdvDevice.a, value.xAdvDevice.b);
  54284. }
  54285. if (value.yAdvDevice) {
  54286. position.yAdvance += variationProcessor.getDelta(variationStore, value.yAdvDevice.a, value.yAdvDevice.b);
  54287. }
  54288. } // TODO: device tables
  54289. };
  54290. _proto28.applyLookup = function applyLookup(lookupType, table) {
  54291. switch (lookupType) {
  54292. case 1:
  54293. {
  54294. // Single positioning value
  54295. var index = this.coverageIndex(table.coverage);
  54296. if (index === -1) {
  54297. return false;
  54298. }
  54299. switch (table.version) {
  54300. case 1:
  54301. this.applyPositionValue(0, table.value);
  54302. break;
  54303. case 2:
  54304. this.applyPositionValue(0, table.values.get(index));
  54305. break;
  54306. }
  54307. return true;
  54308. }
  54309. case 2:
  54310. {
  54311. // Pair Adjustment Positioning
  54312. var nextGlyph = this.glyphIterator.peek();
  54313. if (!nextGlyph) {
  54314. return false;
  54315. }
  54316. var _index = this.coverageIndex(table.coverage);
  54317. if (_index === -1) {
  54318. return false;
  54319. }
  54320. switch (table.version) {
  54321. case 1:
  54322. // Adjustments for glyph pairs
  54323. var set = table.pairSets.get(_index);
  54324. for (var _iterator63 = _createForOfIteratorHelperLoose(set), _step63; !(_step63 = _iterator63()).done;) {
  54325. var _pair = _step63.value;
  54326. if (_pair.secondGlyph === nextGlyph.id) {
  54327. this.applyPositionValue(0, _pair.value1);
  54328. this.applyPositionValue(1, _pair.value2);
  54329. return true;
  54330. }
  54331. }
  54332. return false;
  54333. case 2:
  54334. // Class pair adjustment
  54335. var class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1);
  54336. var class2 = this.getClassID(nextGlyph.id, table.classDef2);
  54337. if (class1 === -1 || class2 === -1) {
  54338. return false;
  54339. }
  54340. var pair = table.classRecords.get(class1).get(class2);
  54341. this.applyPositionValue(0, pair.value1);
  54342. this.applyPositionValue(1, pair.value2);
  54343. return true;
  54344. }
  54345. }
  54346. case 3:
  54347. {
  54348. // Cursive Attachment Positioning
  54349. var nextIndex = this.glyphIterator.peekIndex();
  54350. var _nextGlyph = this.glyphs[nextIndex];
  54351. if (!_nextGlyph) {
  54352. return false;
  54353. }
  54354. var curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)];
  54355. if (!curRecord || !curRecord.exitAnchor) {
  54356. return false;
  54357. }
  54358. var nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, _nextGlyph.id)];
  54359. if (!nextRecord || !nextRecord.entryAnchor) {
  54360. return false;
  54361. }
  54362. var entry = this.getAnchor(nextRecord.entryAnchor);
  54363. var exit = this.getAnchor(curRecord.exitAnchor);
  54364. var cur = this.positions[this.glyphIterator.index];
  54365. var next = this.positions[nextIndex];
  54366. switch (this.direction) {
  54367. case 'ltr':
  54368. cur.xAdvance = exit.x + cur.xOffset;
  54369. var d = entry.x + next.xOffset;
  54370. next.xAdvance -= d;
  54371. next.xOffset -= d;
  54372. break;
  54373. case 'rtl':
  54374. d = exit.x + cur.xOffset;
  54375. cur.xAdvance -= d;
  54376. cur.xOffset -= d;
  54377. next.xAdvance = entry.x + next.xOffset;
  54378. break;
  54379. }
  54380. if (this.glyphIterator.flags.rightToLeft) {
  54381. this.glyphIterator.cur.cursiveAttachment = nextIndex;
  54382. cur.yOffset = entry.y - exit.y;
  54383. } else {
  54384. _nextGlyph.cursiveAttachment = this.glyphIterator.index;
  54385. cur.yOffset = exit.y - entry.y;
  54386. }
  54387. return true;
  54388. }
  54389. case 4:
  54390. {
  54391. // Mark to base positioning
  54392. var markIndex = this.coverageIndex(table.markCoverage);
  54393. if (markIndex === -1) {
  54394. return false;
  54395. } // search backward for a base glyph
  54396. var baseGlyphIndex = this.glyphIterator.index;
  54397. while (--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex].ligatureComponent > 0)) {}
  54398. if (baseGlyphIndex < 0) {
  54399. return false;
  54400. }
  54401. var baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id);
  54402. if (baseIndex === -1) {
  54403. return false;
  54404. }
  54405. var markRecord = table.markArray[markIndex];
  54406. var baseAnchor = table.baseArray[baseIndex][markRecord.class];
  54407. this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);
  54408. return true;
  54409. }
  54410. case 5:
  54411. {
  54412. // Mark to ligature positioning
  54413. var _markIndex = this.coverageIndex(table.markCoverage);
  54414. if (_markIndex === -1) {
  54415. return false;
  54416. } // search backward for a base glyph
  54417. var _baseGlyphIndex = this.glyphIterator.index;
  54418. while (--_baseGlyphIndex >= 0 && this.glyphs[_baseGlyphIndex].isMark) {}
  54419. if (_baseGlyphIndex < 0) {
  54420. return false;
  54421. }
  54422. var ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[_baseGlyphIndex].id);
  54423. if (ligIndex === -1) {
  54424. return false;
  54425. }
  54426. var ligAttach = table.ligatureArray[ligIndex];
  54427. var markGlyph = this.glyphIterator.cur;
  54428. var ligGlyph = this.glyphs[_baseGlyphIndex];
  54429. var compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && markGlyph.ligatureComponent > 0 ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 : ligGlyph.codePoints.length - 1;
  54430. var _markRecord = table.markArray[_markIndex];
  54431. var _baseAnchor = ligAttach[compIndex][_markRecord.class];
  54432. this.applyAnchor(_markRecord, _baseAnchor, _baseGlyphIndex);
  54433. return true;
  54434. }
  54435. case 6:
  54436. {
  54437. // Mark to mark positioning
  54438. var mark1Index = this.coverageIndex(table.mark1Coverage);
  54439. if (mark1Index === -1) {
  54440. return false;
  54441. } // get the previous mark to attach to
  54442. var prevIndex = this.glyphIterator.peekIndex(-1);
  54443. var prev = this.glyphs[prevIndex];
  54444. if (!prev || !prev.isMark) {
  54445. return false;
  54446. }
  54447. var _cur = this.glyphIterator.cur; // The following logic was borrowed from Harfbuzz
  54448. var good = false;
  54449. if (_cur.ligatureID === prev.ligatureID) {
  54450. if (!_cur.ligatureID) {
  54451. // Marks belonging to the same base
  54452. good = true;
  54453. } else if (_cur.ligatureComponent === prev.ligatureComponent) {
  54454. // Marks belonging to the same ligature component
  54455. good = true;
  54456. }
  54457. } else {
  54458. // If ligature ids don't match, it may be the case that one of the marks
  54459. // itself is a ligature, in which case match.
  54460. if (_cur.ligatureID && !_cur.ligatureComponent || prev.ligatureID && !prev.ligatureComponent) {
  54461. good = true;
  54462. }
  54463. }
  54464. if (!good) {
  54465. return false;
  54466. }
  54467. var mark2Index = this.coverageIndex(table.mark2Coverage, prev.id);
  54468. if (mark2Index === -1) {
  54469. return false;
  54470. }
  54471. var _markRecord2 = table.mark1Array[mark1Index];
  54472. var _baseAnchor2 = table.mark2Array[mark2Index][_markRecord2.class];
  54473. this.applyAnchor(_markRecord2, _baseAnchor2, prevIndex);
  54474. return true;
  54475. }
  54476. case 7:
  54477. // Contextual positioning
  54478. return this.applyContext(table);
  54479. case 8:
  54480. // Chaining contextual positioning
  54481. return this.applyChainingContext(table);
  54482. case 9:
  54483. // Extension positioning
  54484. return this.applyLookup(table.lookupType, table.extension);
  54485. default:
  54486. throw new Error("Unsupported GPOS table: ".concat(lookupType));
  54487. }
  54488. };
  54489. _proto28.applyAnchor = function applyAnchor(markRecord, baseAnchor, baseGlyphIndex) {
  54490. var baseCoords = this.getAnchor(baseAnchor);
  54491. var markCoords = this.getAnchor(markRecord.markAnchor);
  54492. var basePos = this.positions[baseGlyphIndex];
  54493. var markPos = this.positions[this.glyphIterator.index];
  54494. markPos.xOffset = baseCoords.x - markCoords.x;
  54495. markPos.yOffset = baseCoords.y - markCoords.y;
  54496. this.glyphIterator.cur.markAttachment = baseGlyphIndex;
  54497. };
  54498. _proto28.getAnchor = function getAnchor(anchor) {
  54499. // TODO: contour point, device tables
  54500. var x = anchor.xCoordinate;
  54501. var y = anchor.yCoordinate; // Adjustments for font variations
  54502. var variationProcessor = this.font._variationProcessor;
  54503. var variationStore = this.font.GDEF && this.font.GDEF.itemVariationStore;
  54504. if (variationProcessor && variationStore) {
  54505. if (anchor.xDeviceTable) {
  54506. x += variationProcessor.getDelta(variationStore, anchor.xDeviceTable.a, anchor.xDeviceTable.b);
  54507. }
  54508. if (anchor.yDeviceTable) {
  54509. y += variationProcessor.getDelta(variationStore, anchor.yDeviceTable.a, anchor.yDeviceTable.b);
  54510. }
  54511. }
  54512. return {
  54513. x: x,
  54514. y: y
  54515. };
  54516. };
  54517. _proto28.applyFeatures = function applyFeatures(userFeatures, glyphs, advances) {
  54518. _OTProcessor2.prototype.applyFeatures.call(this, userFeatures, glyphs, advances);
  54519. for (var i = 0; i < this.glyphs.length; i++) {
  54520. this.fixCursiveAttachment(i);
  54521. }
  54522. this.fixMarkAttachment();
  54523. };
  54524. _proto28.fixCursiveAttachment = function fixCursiveAttachment(i) {
  54525. var glyph = this.glyphs[i];
  54526. if (glyph.cursiveAttachment != null) {
  54527. var j = glyph.cursiveAttachment;
  54528. glyph.cursiveAttachment = null;
  54529. this.fixCursiveAttachment(j);
  54530. this.positions[i].yOffset += this.positions[j].yOffset;
  54531. }
  54532. };
  54533. _proto28.fixMarkAttachment = function fixMarkAttachment() {
  54534. for (var i = 0; i < this.glyphs.length; i++) {
  54535. var glyph = this.glyphs[i];
  54536. if (glyph.markAttachment != null) {
  54537. var j = glyph.markAttachment;
  54538. this.positions[i].xOffset += this.positions[j].xOffset;
  54539. this.positions[i].yOffset += this.positions[j].yOffset;
  54540. if (this.direction === 'ltr') {
  54541. for (var k = j; k < i; k++) {
  54542. this.positions[i].xOffset -= this.positions[k].xAdvance;
  54543. this.positions[i].yOffset -= this.positions[k].yAdvance;
  54544. }
  54545. } else {
  54546. for (var _k = j + 1; _k < i + 1; _k++) {
  54547. this.positions[i].xOffset += this.positions[_k].xAdvance;
  54548. this.positions[i].yOffset += this.positions[_k].yAdvance;
  54549. }
  54550. }
  54551. }
  54552. }
  54553. };
  54554. return GPOSProcessor;
  54555. }(OTProcessor);
  54556. var OTLayoutEngine = /*#__PURE__*/function () {
  54557. function OTLayoutEngine(font) {
  54558. this.font = font;
  54559. this.glyphInfos = null;
  54560. this.plan = null;
  54561. this.GSUBProcessor = null;
  54562. this.GPOSProcessor = null;
  54563. this.fallbackPosition = true;
  54564. if (font.GSUB) {
  54565. this.GSUBProcessor = new GSUBProcessor(font, font.GSUB);
  54566. }
  54567. if (font.GPOS) {
  54568. this.GPOSProcessor = new GPOSProcessor(font, font.GPOS);
  54569. }
  54570. }
  54571. var _proto29 = OTLayoutEngine.prototype;
  54572. _proto29.setup = function setup(glyphRun) {
  54573. var _this8 = this;
  54574. // Map glyphs to GlyphInfo objects so data can be passed between
  54575. // GSUB and GPOS without mutating the real (shared) Glyph objects.
  54576. this.glyphInfos = glyphRun.glyphs.map(function (glyph) {
  54577. return new GlyphInfo(_this8.font, glyph.id, [].concat(glyph.codePoints));
  54578. }); // Select a script based on what is available in GSUB/GPOS.
  54579. var script = null;
  54580. if (this.GPOSProcessor) {
  54581. script = this.GPOSProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);
  54582. }
  54583. if (this.GSUBProcessor) {
  54584. script = this.GSUBProcessor.selectScript(glyphRun.script, glyphRun.language, glyphRun.direction);
  54585. } // Choose a shaper based on the script, and setup a shaping plan.
  54586. // This determines which features to apply to which glyphs.
  54587. this.shaper = choose(script);
  54588. this.plan = new ShapingPlan(this.font, script, glyphRun.direction);
  54589. this.shaper.plan(this.plan, this.glyphInfos, glyphRun.features); // Assign chosen features to output glyph run
  54590. for (var key in this.plan.allFeatures) {
  54591. glyphRun.features[key] = true;
  54592. }
  54593. };
  54594. _proto29.substitute = function substitute(glyphRun) {
  54595. var _this9 = this;
  54596. if (this.GSUBProcessor) {
  54597. this.plan.process(this.GSUBProcessor, this.glyphInfos); // Map glyph infos back to normal Glyph objects
  54598. glyphRun.glyphs = this.glyphInfos.map(function (glyphInfo) {
  54599. return _this9.font.getGlyph(glyphInfo.id, glyphInfo.codePoints);
  54600. });
  54601. }
  54602. };
  54603. _proto29.position = function position(glyphRun) {
  54604. if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') {
  54605. this.zeroMarkAdvances(glyphRun.positions);
  54606. }
  54607. if (this.GPOSProcessor) {
  54608. this.plan.process(this.GPOSProcessor, this.glyphInfos, glyphRun.positions);
  54609. }
  54610. if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') {
  54611. this.zeroMarkAdvances(glyphRun.positions);
  54612. } // Reverse the glyphs and positions if the script is right-to-left
  54613. if (glyphRun.direction === 'rtl') {
  54614. glyphRun.glyphs.reverse();
  54615. glyphRun.positions.reverse();
  54616. }
  54617. return this.GPOSProcessor && this.GPOSProcessor.features;
  54618. };
  54619. _proto29.zeroMarkAdvances = function zeroMarkAdvances(positions) {
  54620. for (var i = 0; i < this.glyphInfos.length; i++) {
  54621. if (this.glyphInfos[i].isMark) {
  54622. positions[i].xAdvance = 0;
  54623. positions[i].yAdvance = 0;
  54624. }
  54625. }
  54626. };
  54627. _proto29.cleanup = function cleanup() {
  54628. this.glyphInfos = null;
  54629. this.plan = null;
  54630. this.shaper = null;
  54631. };
  54632. _proto29.getAvailableFeatures = function getAvailableFeatures(script, language) {
  54633. var features = [];
  54634. if (this.GSUBProcessor) {
  54635. this.GSUBProcessor.selectScript(script, language);
  54636. features.push.apply(features, Object.keys(this.GSUBProcessor.features));
  54637. }
  54638. if (this.GPOSProcessor) {
  54639. this.GPOSProcessor.selectScript(script, language);
  54640. features.push.apply(features, Object.keys(this.GPOSProcessor.features));
  54641. }
  54642. return features;
  54643. };
  54644. return OTLayoutEngine;
  54645. }();
  54646. var LayoutEngine = /*#__PURE__*/function () {
  54647. function LayoutEngine(font) {
  54648. this.font = font;
  54649. this.unicodeLayoutEngine = null;
  54650. this.kernProcessor = null; // Choose an advanced layout engine. We try the AAT morx table first since more
  54651. // scripts are currently supported because the shaping logic is built into the font.
  54652. if (this.font.morx) {
  54653. this.engine = new AATLayoutEngine(this.font);
  54654. } else if (this.font.GSUB || this.font.GPOS) {
  54655. this.engine = new OTLayoutEngine(this.font);
  54656. }
  54657. }
  54658. var _proto30 = LayoutEngine.prototype;
  54659. _proto30.layout = function layout(string, features, script, language, direction) {
  54660. // Make the features parameter optional
  54661. if (typeof features === 'string') {
  54662. direction = language;
  54663. language = script;
  54664. script = features;
  54665. features = [];
  54666. } // Map string to glyphs if needed
  54667. if (typeof string === 'string') {
  54668. // Attempt to detect the script from the string if not provided.
  54669. if (script == null) {
  54670. script = forString(string);
  54671. }
  54672. var glyphs = this.font.glyphsForString(string);
  54673. } else {
  54674. // Attempt to detect the script from the glyph code points if not provided.
  54675. if (script == null) {
  54676. var codePoints = [];
  54677. for (var _iterator64 = _createForOfIteratorHelperLoose(string), _step64; !(_step64 = _iterator64()).done;) {
  54678. var glyph = _step64.value;
  54679. codePoints.push.apply(codePoints, glyph.codePoints);
  54680. }
  54681. script = forCodePoints(codePoints);
  54682. }
  54683. var glyphs = string;
  54684. }
  54685. var glyphRun = new GlyphRun(glyphs, features, script, language, direction); // Return early if there are no glyphs
  54686. if (glyphs.length === 0) {
  54687. glyphRun.positions = [];
  54688. return glyphRun;
  54689. } // Setup the advanced layout engine
  54690. if (this.engine && this.engine.setup) {
  54691. this.engine.setup(glyphRun);
  54692. } // Substitute and position the glyphs
  54693. this.substitute(glyphRun);
  54694. this.position(glyphRun);
  54695. this.hideDefaultIgnorables(glyphRun.glyphs, glyphRun.positions); // Let the layout engine clean up any state it might have
  54696. if (this.engine && this.engine.cleanup) {
  54697. this.engine.cleanup();
  54698. }
  54699. return glyphRun;
  54700. };
  54701. _proto30.substitute = function substitute(glyphRun) {
  54702. // Call the advanced layout engine to make substitutions
  54703. if (this.engine && this.engine.substitute) {
  54704. this.engine.substitute(glyphRun);
  54705. }
  54706. };
  54707. _proto30.position = function position(glyphRun) {
  54708. // Get initial glyph positions
  54709. glyphRun.positions = glyphRun.glyphs.map(function (glyph) {
  54710. return new GlyphPosition(glyph.advanceWidth);
  54711. });
  54712. var positioned = null; // Call the advanced layout engine. Returns the features applied.
  54713. if (this.engine && this.engine.position) {
  54714. positioned = this.engine.position(glyphRun);
  54715. } // if there is no GPOS table, use unicode properties to position marks.
  54716. if (!positioned && (!this.engine || this.engine.fallbackPosition)) {
  54717. if (!this.unicodeLayoutEngine) {
  54718. this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font);
  54719. }
  54720. this.unicodeLayoutEngine.positionGlyphs(glyphRun.glyphs, glyphRun.positions);
  54721. } // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table
  54722. if ((!positioned || !positioned.kern) && glyphRun.features.kern !== false && this.font.kern) {
  54723. if (!this.kernProcessor) {
  54724. this.kernProcessor = new KernProcessor(this.font);
  54725. }
  54726. this.kernProcessor.process(glyphRun.glyphs, glyphRun.positions);
  54727. glyphRun.features.kern = true;
  54728. }
  54729. };
  54730. _proto30.hideDefaultIgnorables = function hideDefaultIgnorables(glyphs, positions) {
  54731. var space = this.font.glyphForCodePoint(0x20);
  54732. for (var i = 0; i < glyphs.length; i++) {
  54733. if (this.isDefaultIgnorable(glyphs[i].codePoints[0])) {
  54734. glyphs[i] = space;
  54735. positions[i].xAdvance = 0;
  54736. positions[i].yAdvance = 0;
  54737. }
  54738. }
  54739. };
  54740. _proto30.isDefaultIgnorable = function isDefaultIgnorable(ch) {
  54741. // From DerivedCoreProperties.txt in the Unicode database,
  54742. // minus U+115F, U+1160, U+3164 and U+FFA0, which is what
  54743. // Harfbuzz and Uniscribe do.
  54744. var plane = ch >> 16;
  54745. if (plane === 0) {
  54746. // BMP
  54747. switch (ch >> 8) {
  54748. case 0x00:
  54749. return ch === 0x00AD;
  54750. case 0x03:
  54751. return ch === 0x034F;
  54752. case 0x06:
  54753. return ch === 0x061C;
  54754. case 0x17:
  54755. return 0x17B4 <= ch && ch <= 0x17B5;
  54756. case 0x18:
  54757. return 0x180B <= ch && ch <= 0x180E;
  54758. case 0x20:
  54759. return 0x200B <= ch && ch <= 0x200F || 0x202A <= ch && ch <= 0x202E || 0x2060 <= ch && ch <= 0x206F;
  54760. case 0xFE:
  54761. return 0xFE00 <= ch && ch <= 0xFE0F || ch === 0xFEFF;
  54762. case 0xFF:
  54763. return 0xFFF0 <= ch && ch <= 0xFFF8;
  54764. default:
  54765. return false;
  54766. }
  54767. } else {
  54768. // Other planes
  54769. switch (plane) {
  54770. case 0x01:
  54771. return 0x1BCA0 <= ch && ch <= 0x1BCA3 || 0x1D173 <= ch && ch <= 0x1D17A;
  54772. case 0x0E:
  54773. return 0xE0000 <= ch && ch <= 0xE0FFF;
  54774. default:
  54775. return false;
  54776. }
  54777. }
  54778. };
  54779. _proto30.getAvailableFeatures = function getAvailableFeatures(script, language) {
  54780. var features = [];
  54781. if (this.engine) {
  54782. features.push.apply(features, this.engine.getAvailableFeatures(script, language));
  54783. }
  54784. if (this.font.kern && features.indexOf('kern') === -1) {
  54785. features.push('kern');
  54786. }
  54787. return features;
  54788. };
  54789. _proto30.stringsForGlyph = function stringsForGlyph(gid) {
  54790. var result = new Set();
  54791. var codePoints = this.font._cmapProcessor.codePointsForGlyph(gid);
  54792. for (var _iterator65 = _createForOfIteratorHelperLoose(codePoints), _step65; !(_step65 = _iterator65()).done;) {
  54793. var codePoint = _step65.value;
  54794. result.add(String.fromCodePoint(codePoint));
  54795. }
  54796. if (this.engine && this.engine.stringsForGlyph) {
  54797. for (var _iterator66 = _createForOfIteratorHelperLoose(this.engine.stringsForGlyph(gid)), _step66; !(_step66 = _iterator66()).done;) {
  54798. var string = _step66.value;
  54799. result.add(string);
  54800. }
  54801. }
  54802. return Array.from(result);
  54803. };
  54804. return LayoutEngine;
  54805. }();
  54806. var SVG_COMMANDS = {
  54807. moveTo: 'M',
  54808. lineTo: 'L',
  54809. quadraticCurveTo: 'Q',
  54810. bezierCurveTo: 'C',
  54811. closePath: 'Z'
  54812. };
  54813. /**
  54814. * Path objects are returned by glyphs and represent the actual
  54815. * vector outlines for each glyph in the font. Paths can be converted
  54816. * to SVG path data strings, or to functions that can be applied to
  54817. * render the path to a graphics context.
  54818. */
  54819. var Path = /*#__PURE__*/function () {
  54820. function Path() {
  54821. this.commands = [];
  54822. this._bbox = null;
  54823. this._cbox = null;
  54824. }
  54825. /**
  54826. * Compiles the path to a JavaScript function that can be applied with
  54827. * a graphics context in order to render the path.
  54828. * @return {string}
  54829. */
  54830. var _proto31 = Path.prototype;
  54831. _proto31.toFunction = function toFunction() {
  54832. var _this10 = this;
  54833. return function (ctx) {
  54834. _this10.commands.forEach(function (c) {
  54835. return ctx[c.command].apply(ctx, c.args);
  54836. });
  54837. };
  54838. }
  54839. /**
  54840. * Converts the path to an SVG path data string
  54841. * @return {string}
  54842. */
  54843. ;
  54844. _proto31.toSVG = function toSVG() {
  54845. var cmds = this.commands.map(function (c) {
  54846. var args = c.args.map(function (arg) {
  54847. return Math.round(arg * 100) / 100;
  54848. });
  54849. return "".concat(SVG_COMMANDS[c.command]).concat(args.join(' '));
  54850. });
  54851. return cmds.join('');
  54852. }
  54853. /**
  54854. * Gets the "control box" of a path.
  54855. * This is like the bounding box, but it includes all points including
  54856. * control points of bezier segments and is much faster to compute than
  54857. * the real bounding box.
  54858. * @type {BBox}
  54859. */
  54860. ;
  54861. /**
  54862. * Applies a mapping function to each point in the path.
  54863. * @param {function} fn
  54864. * @return {Path}
  54865. */
  54866. _proto31.mapPoints = function mapPoints(fn) {
  54867. var path = new Path();
  54868. for (var _iterator67 = _createForOfIteratorHelperLoose(this.commands), _step67; !(_step67 = _iterator67()).done;) {
  54869. var c = _step67.value;
  54870. var args = [];
  54871. for (var i = 0; i < c.args.length; i += 2) {
  54872. var _fn = fn(c.args[i], c.args[i + 1]),
  54873. x = _fn[0],
  54874. y = _fn[1];
  54875. args.push(x, y);
  54876. }
  54877. path[c.command].apply(path, args);
  54878. }
  54879. return path;
  54880. }
  54881. /**
  54882. * Transforms the path by the given matrix.
  54883. */
  54884. ;
  54885. _proto31.transform = function transform(m0, m1, m2, m3, m4, m5) {
  54886. return this.mapPoints(function (x, y) {
  54887. x = m0 * x + m2 * y + m4;
  54888. y = m1 * x + m3 * y + m5;
  54889. return [x, y];
  54890. });
  54891. }
  54892. /**
  54893. * Translates the path by the given offset.
  54894. */
  54895. ;
  54896. _proto31.translate = function translate(x, y) {
  54897. return this.transform(1, 0, 0, 1, x, y);
  54898. }
  54899. /**
  54900. * Rotates the path by the given angle (in radians).
  54901. */
  54902. ;
  54903. _proto31.rotate = function rotate(angle) {
  54904. var cos = Math.cos(angle);
  54905. var sin = Math.sin(angle);
  54906. return this.transform(cos, sin, -sin, cos, 0, 0);
  54907. }
  54908. /**
  54909. * Scales the path.
  54910. */
  54911. ;
  54912. _proto31.scale = function scale(scaleX, scaleY) {
  54913. if (scaleY === void 0) {
  54914. scaleY = scaleX;
  54915. }
  54916. return this.transform(scaleX, 0, 0, scaleY, 0, 0);
  54917. };
  54918. _createClass(Path, [{
  54919. key: "cbox",
  54920. get: function get() {
  54921. if (!this._cbox) {
  54922. var cbox = new BBox();
  54923. for (var _iterator68 = _createForOfIteratorHelperLoose(this.commands), _step68; !(_step68 = _iterator68()).done;) {
  54924. var command = _step68.value;
  54925. for (var i = 0; i < command.args.length; i += 2) {
  54926. cbox.addPoint(command.args[i], command.args[i + 1]);
  54927. }
  54928. }
  54929. this._cbox = Object.freeze(cbox);
  54930. }
  54931. return this._cbox;
  54932. }
  54933. /**
  54934. * Gets the exact bounding box of the path by evaluating curve segments.
  54935. * Slower to compute than the control box, but more accurate.
  54936. * @type {BBox}
  54937. */
  54938. }, {
  54939. key: "bbox",
  54940. get: function get() {
  54941. if (this._bbox) {
  54942. return this._bbox;
  54943. }
  54944. var bbox = new BBox();
  54945. var cx = 0,
  54946. cy = 0;
  54947. var f = function f(t) {
  54948. return Math.pow(1 - t, 3) * p0[i] + 3 * Math.pow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i];
  54949. };
  54950. for (var _iterator69 = _createForOfIteratorHelperLoose(this.commands), _step69; !(_step69 = _iterator69()).done;) {
  54951. var c = _step69.value;
  54952. switch (c.command) {
  54953. case 'moveTo':
  54954. case 'lineTo':
  54955. var _c$args = c.args,
  54956. x = _c$args[0],
  54957. y = _c$args[1];
  54958. bbox.addPoint(x, y);
  54959. cx = x;
  54960. cy = y;
  54961. break;
  54962. case 'quadraticCurveTo':
  54963. case 'bezierCurveTo':
  54964. if (c.command === 'quadraticCurveTo') {
  54965. // http://fontforge.org/bezier.html
  54966. var _c$args2 = c.args,
  54967. qp1x = _c$args2[0],
  54968. qp1y = _c$args2[1],
  54969. p3x = _c$args2[2],
  54970. p3y = _c$args2[3];
  54971. var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0)
  54972. var cp1y = cy + 2 / 3 * (qp1y - cy);
  54973. var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2)
  54974. var cp2y = p3y + 2 / 3 * (qp1y - p3y);
  54975. } else {
  54976. var _c$args3 = c.args,
  54977. cp1x = _c$args3[0],
  54978. cp1y = _c$args3[1],
  54979. cp2x = _c$args3[2],
  54980. cp2y = _c$args3[3],
  54981. p3x = _c$args3[4],
  54982. p3y = _c$args3[5];
  54983. } // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
  54984. bbox.addPoint(p3x, p3y);
  54985. var p0 = [cx, cy];
  54986. var p1 = [cp1x, cp1y];
  54987. var p2 = [cp2x, cp2y];
  54988. var p3 = [p3x, p3y];
  54989. for (var i = 0; i <= 1; i++) {
  54990. var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
  54991. var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
  54992. c = 3 * p1[i] - 3 * p0[i];
  54993. if (a === 0) {
  54994. if (b === 0) {
  54995. continue;
  54996. }
  54997. var t = -c / b;
  54998. if (0 < t && t < 1) {
  54999. if (i === 0) {
  55000. bbox.addPoint(f(t), bbox.maxY);
  55001. } else if (i === 1) {
  55002. bbox.addPoint(bbox.maxX, f(t));
  55003. }
  55004. }
  55005. continue;
  55006. }
  55007. var b2ac = Math.pow(b, 2) - 4 * c * a;
  55008. if (b2ac < 0) {
  55009. continue;
  55010. }
  55011. var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
  55012. if (0 < t1 && t1 < 1) {
  55013. if (i === 0) {
  55014. bbox.addPoint(f(t1), bbox.maxY);
  55015. } else if (i === 1) {
  55016. bbox.addPoint(bbox.maxX, f(t1));
  55017. }
  55018. }
  55019. var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
  55020. if (0 < t2 && t2 < 1) {
  55021. if (i === 0) {
  55022. bbox.addPoint(f(t2), bbox.maxY);
  55023. } else if (i === 1) {
  55024. bbox.addPoint(bbox.maxX, f(t2));
  55025. }
  55026. }
  55027. }
  55028. cx = p3x;
  55029. cy = p3y;
  55030. break;
  55031. }
  55032. }
  55033. return this._bbox = Object.freeze(bbox);
  55034. }
  55035. }]);
  55036. return Path;
  55037. }();
  55038. var _loop = function _loop(command) {
  55039. Path.prototype[command] = function () {
  55040. this._bbox = this._cbox = null;
  55041. for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
  55042. args[_key2] = arguments[_key2];
  55043. }
  55044. this.commands.push({
  55045. command: command,
  55046. args: args
  55047. });
  55048. return this;
  55049. };
  55050. };
  55051. for (var _i23 = 0, _arr = ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']; _i23 < _arr.length; _i23++) {
  55052. var command = _arr[_i23];
  55053. _loop(command);
  55054. }
  55055. var StandardNames = ['.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth', 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior', 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla', 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'];
  55056. var _class$3;
  55057. /**
  55058. * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and
  55059. * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context.
  55060. *
  55061. * You do not create glyph objects directly. They are created by various methods on the font object.
  55062. * There are several subclasses of the base Glyph class internally that may be returned depending
  55063. * on the font format, but they all inherit from this class.
  55064. */
  55065. var Glyph = (_class$3 = /*#__PURE__*/function () {
  55066. function Glyph(id, codePoints, font) {
  55067. /**
  55068. * The glyph id in the font
  55069. * @type {number}
  55070. */
  55071. this.id = id;
  55072. /**
  55073. * An array of unicode code points that are represented by this glyph.
  55074. * There can be multiple code points in the case of ligatures and other glyphs
  55075. * that represent multiple visual characters.
  55076. * @type {number[]}
  55077. */
  55078. this.codePoints = codePoints;
  55079. this._font = font; // TODO: get this info from GDEF if available
  55080. this.isMark = this.codePoints.length > 0 && this.codePoints.every(unicode.isMark);
  55081. this.isLigature = this.codePoints.length > 1;
  55082. }
  55083. var _proto32 = Glyph.prototype;
  55084. _proto32._getPath = function _getPath() {
  55085. return new Path();
  55086. };
  55087. _proto32._getCBox = function _getCBox() {
  55088. return this.path.cbox;
  55089. };
  55090. _proto32._getBBox = function _getBBox() {
  55091. return this.path.bbox;
  55092. };
  55093. _proto32._getTableMetrics = function _getTableMetrics(table) {
  55094. if (this.id < table.metrics.length) {
  55095. return table.metrics.get(this.id);
  55096. }
  55097. var metric = table.metrics.get(table.metrics.length - 1);
  55098. var res = {
  55099. advance: metric ? metric.advance : 0,
  55100. bearing: table.bearings.get(this.id - table.metrics.length) || 0
  55101. };
  55102. return res;
  55103. };
  55104. _proto32._getMetrics = function _getMetrics(cbox) {
  55105. if (this._metrics) {
  55106. return this._metrics;
  55107. }
  55108. var _this$_getTableMetric = this._getTableMetrics(this._font.hmtx),
  55109. advanceWidth = _this$_getTableMetric.advance,
  55110. leftBearing = _this$_getTableMetric.bearing; // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea
  55111. if (this._font.vmtx) {
  55112. var _this$_getTableMetric2 = this._getTableMetrics(this._font.vmtx),
  55113. advanceHeight = _this$_getTableMetric2.advance,
  55114. topBearing = _this$_getTableMetric2.bearing;
  55115. } else {
  55116. var os2;
  55117. if (typeof cbox === 'undefined' || cbox === null) {
  55118. cbox = this.cbox;
  55119. }
  55120. if ((os2 = this._font['OS/2']) && os2.version > 0) {
  55121. var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender);
  55122. var topBearing = os2.typoAscender - cbox.maxY;
  55123. } else {
  55124. var hhea = this._font.hhea;
  55125. var advanceHeight = Math.abs(hhea.ascent - hhea.descent);
  55126. var topBearing = hhea.ascent - cbox.maxY;
  55127. }
  55128. }
  55129. if (this._font._variationProcessor && this._font.HVAR) {
  55130. advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR);
  55131. }
  55132. return this._metrics = {
  55133. advanceWidth: advanceWidth,
  55134. advanceHeight: advanceHeight,
  55135. leftBearing: leftBearing,
  55136. topBearing: topBearing
  55137. };
  55138. }
  55139. /**
  55140. * The glyph’s control box.
  55141. * This is often the same as the bounding box, but is faster to compute.
  55142. * Because of the way bezier curves are defined, some of the control points
  55143. * can be outside of the bounding box. Where `bbox` takes this into account,
  55144. * `cbox` does not. Thus, cbox is less accurate, but faster to compute.
  55145. * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)
  55146. * for a more detailed description.
  55147. *
  55148. * @type {BBox}
  55149. */
  55150. ;
  55151. /**
  55152. * Returns a path scaled to the given font size.
  55153. * @param {number} size
  55154. * @return {Path}
  55155. */
  55156. _proto32.getScaledPath = function getScaledPath(size) {
  55157. var scale = 1 / this._font.unitsPerEm * size;
  55158. return this.path.scale(scale);
  55159. }
  55160. /**
  55161. * The glyph's advance width.
  55162. * @type {number}
  55163. */
  55164. ;
  55165. _proto32._getName = function _getName() {
  55166. var post = this._font.post;
  55167. if (!post) {
  55168. return null;
  55169. }
  55170. switch (post.version) {
  55171. case 1:
  55172. return StandardNames[this.id];
  55173. case 2:
  55174. var id = post.glyphNameIndex[this.id];
  55175. if (id < StandardNames.length) {
  55176. return StandardNames[id];
  55177. }
  55178. return post.names[id - StandardNames.length];
  55179. case 2.5:
  55180. return StandardNames[this.id + post.offsets[this.id]];
  55181. case 4:
  55182. return String.fromCharCode(post.map[this.id]);
  55183. }
  55184. }
  55185. /**
  55186. * The glyph's name
  55187. * @type {string}
  55188. */
  55189. ;
  55190. /**
  55191. * Renders the glyph to the given graphics context, at the specified font size.
  55192. * @param {CanvasRenderingContext2d} ctx
  55193. * @param {number} size
  55194. */
  55195. _proto32.render = function render(ctx, size) {
  55196. ctx.save();
  55197. var scale = 1 / this._font.head.unitsPerEm * size;
  55198. ctx.scale(scale, scale);
  55199. var fn = this.path.toFunction();
  55200. fn(ctx);
  55201. ctx.fill();
  55202. ctx.restore();
  55203. };
  55204. _createClass(Glyph, [{
  55205. key: "cbox",
  55206. get: function get() {
  55207. return this._getCBox();
  55208. }
  55209. /**
  55210. * The glyph’s bounding box, i.e. the rectangle that encloses the
  55211. * glyph outline as tightly as possible.
  55212. * @type {BBox}
  55213. */
  55214. }, {
  55215. key: "bbox",
  55216. get: function get() {
  55217. return this._getBBox();
  55218. }
  55219. /**
  55220. * A vector Path object representing the glyph outline.
  55221. * @type {Path}
  55222. */
  55223. }, {
  55224. key: "path",
  55225. get: function get() {
  55226. // Cache the path so we only decode it once
  55227. // Decoding is actually performed by subclasses
  55228. return this._getPath();
  55229. }
  55230. }, {
  55231. key: "advanceWidth",
  55232. get: function get() {
  55233. return this._getMetrics().advanceWidth;
  55234. }
  55235. /**
  55236. * The glyph's advance height.
  55237. * @type {number}
  55238. */
  55239. }, {
  55240. key: "advanceHeight",
  55241. get: function get() {
  55242. return this._getMetrics().advanceHeight;
  55243. }
  55244. }, {
  55245. key: "ligatureCaretPositions",
  55246. get: function get() {}
  55247. }, {
  55248. key: "name",
  55249. get: function get() {
  55250. return this._getName();
  55251. }
  55252. }]);
  55253. return Glyph;
  55254. }(), (_applyDecoratedDescriptor(_class$3.prototype, "cbox", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "cbox"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "bbox", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "bbox"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "path", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "path"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "advanceWidth", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "advanceWidth"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "advanceHeight", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "advanceHeight"), _class$3.prototype), _applyDecoratedDescriptor(_class$3.prototype, "name", [cache], Object.getOwnPropertyDescriptor(_class$3.prototype, "name"), _class$3.prototype)), _class$3);
  55255. var GlyfHeader = new r.Struct({
  55256. numberOfContours: r.int16,
  55257. // if negative, this is a composite glyph
  55258. xMin: r.int16,
  55259. yMin: r.int16,
  55260. xMax: r.int16,
  55261. yMax: r.int16
  55262. }); // Flags for simple glyphs
  55263. var ON_CURVE = 1 << 0;
  55264. var X_SHORT_VECTOR = 1 << 1;
  55265. var Y_SHORT_VECTOR = 1 << 2;
  55266. var REPEAT = 1 << 3;
  55267. var SAME_X = 1 << 4;
  55268. var SAME_Y = 1 << 5; // Flags for composite glyphs
  55269. var ARG_1_AND_2_ARE_WORDS = 1 << 0;
  55270. var WE_HAVE_A_SCALE = 1 << 3;
  55271. var MORE_COMPONENTS = 1 << 5;
  55272. var WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6;
  55273. var WE_HAVE_A_TWO_BY_TWO = 1 << 7;
  55274. var WE_HAVE_INSTRUCTIONS = 1 << 8;
  55275. var Point = /*#__PURE__*/function () {
  55276. function Point(onCurve, endContour, x, y) {
  55277. if (x === void 0) {
  55278. x = 0;
  55279. }
  55280. if (y === void 0) {
  55281. y = 0;
  55282. }
  55283. this.onCurve = onCurve;
  55284. this.endContour = endContour;
  55285. this.x = x;
  55286. this.y = y;
  55287. }
  55288. var _proto33 = Point.prototype;
  55289. _proto33.copy = function copy() {
  55290. return new Point(this.onCurve, this.endContour, this.x, this.y);
  55291. };
  55292. return Point;
  55293. }(); // Represents a component in a composite glyph
  55294. var Component = function Component(glyphID, dx, dy) {
  55295. this.glyphID = glyphID;
  55296. this.dx = dx;
  55297. this.dy = dy;
  55298. this.pos = 0;
  55299. this.scaleX = this.scaleY = 1;
  55300. this.scale01 = this.scale10 = 0;
  55301. };
  55302. /**
  55303. * Represents a TrueType glyph.
  55304. */
  55305. var TTFGlyph = /*#__PURE__*/function (_Glyph) {
  55306. _inheritsLoose(TTFGlyph, _Glyph);
  55307. function TTFGlyph() {
  55308. return _Glyph.apply(this, arguments) || this;
  55309. }
  55310. var _proto34 = TTFGlyph.prototype;
  55311. // Parses just the glyph header and returns the bounding box
  55312. _proto34._getCBox = function _getCBox(internal) {
  55313. // We need to decode the glyph if variation processing is requested,
  55314. // so it's easier just to recompute the path's cbox after decoding.
  55315. if (this._font._variationProcessor && !internal) {
  55316. return this.path.cbox;
  55317. }
  55318. var stream = this._font._getTableStream('glyf');
  55319. stream.pos += this._font.loca.offsets[this.id];
  55320. var glyph = GlyfHeader.decode(stream);
  55321. var cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax);
  55322. return Object.freeze(cbox);
  55323. } // Parses a single glyph coordinate
  55324. ;
  55325. _proto34._parseGlyphCoord = function _parseGlyphCoord(stream, prev, short, same) {
  55326. if (short) {
  55327. var val = stream.readUInt8();
  55328. if (!same) {
  55329. val = -val;
  55330. }
  55331. val += prev;
  55332. } else {
  55333. if (same) {
  55334. var val = prev;
  55335. } else {
  55336. var val = prev + stream.readInt16BE();
  55337. }
  55338. }
  55339. return val;
  55340. } // Decodes the glyph data into points for simple glyphs,
  55341. // or components for composite glyphs
  55342. ;
  55343. _proto34._decode = function _decode() {
  55344. var glyfPos = this._font.loca.offsets[this.id];
  55345. var nextPos = this._font.loca.offsets[this.id + 1]; // Nothing to do if there is no data for this glyph
  55346. if (glyfPos === nextPos) {
  55347. return null;
  55348. }
  55349. var stream = this._font._getTableStream('glyf');
  55350. stream.pos += glyfPos;
  55351. var startPos = stream.pos;
  55352. var glyph = GlyfHeader.decode(stream);
  55353. if (glyph.numberOfContours > 0) {
  55354. this._decodeSimple(glyph, stream);
  55355. } else if (glyph.numberOfContours < 0) {
  55356. this._decodeComposite(glyph, stream, startPos);
  55357. }
  55358. return glyph;
  55359. };
  55360. _proto34._decodeSimple = function _decodeSimple(glyph, stream) {
  55361. // this is a simple glyph
  55362. glyph.points = [];
  55363. var endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream);
  55364. glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream);
  55365. var flags = [];
  55366. var numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1;
  55367. while (flags.length < numCoords) {
  55368. var flag = stream.readUInt8();
  55369. flags.push(flag); // check for repeat flag
  55370. if (flag & REPEAT) {
  55371. var count = stream.readUInt8();
  55372. for (var j = 0; j < count; j++) {
  55373. flags.push(flag);
  55374. }
  55375. }
  55376. }
  55377. for (var i = 0; i < flags.length; i++) {
  55378. var flag = flags[i];
  55379. var point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0);
  55380. glyph.points.push(point);
  55381. }
  55382. var px = 0;
  55383. for (var i = 0; i < flags.length; i++) {
  55384. var flag = flags[i];
  55385. glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X);
  55386. }
  55387. var py = 0;
  55388. for (var i = 0; i < flags.length; i++) {
  55389. var flag = flags[i];
  55390. glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y);
  55391. }
  55392. if (this._font._variationProcessor) {
  55393. var points = glyph.points.slice();
  55394. points.push.apply(points, this._getPhantomPoints(glyph));
  55395. this._font._variationProcessor.transformPoints(this.id, points);
  55396. glyph.phantomPoints = points.slice(-4);
  55397. }
  55398. return;
  55399. };
  55400. _proto34._decodeComposite = function _decodeComposite(glyph, stream, offset) {
  55401. if (offset === void 0) {
  55402. offset = 0;
  55403. }
  55404. // this is a composite glyph
  55405. glyph.components = [];
  55406. var haveInstructions = false;
  55407. var flags = MORE_COMPONENTS;
  55408. while (flags & MORE_COMPONENTS) {
  55409. flags = stream.readUInt16BE();
  55410. var gPos = stream.pos - offset;
  55411. var glyphID = stream.readUInt16BE();
  55412. if (!haveInstructions) {
  55413. haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0;
  55414. }
  55415. if (flags & ARG_1_AND_2_ARE_WORDS) {
  55416. var dx = stream.readInt16BE();
  55417. var dy = stream.readInt16BE();
  55418. } else {
  55419. var dx = stream.readInt8();
  55420. var dy = stream.readInt8();
  55421. }
  55422. var component = new Component(glyphID, dx, dy);
  55423. component.pos = gPos;
  55424. if (flags & WE_HAVE_A_SCALE) {
  55425. // fixed number with 14 bits of fraction
  55426. component.scaleX = component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824;
  55427. } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {
  55428. component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824;
  55429. component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824;
  55430. } else if (flags & WE_HAVE_A_TWO_BY_TWO) {
  55431. component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824;
  55432. component.scale01 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824;
  55433. component.scale10 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824;
  55434. component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824;
  55435. }
  55436. glyph.components.push(component);
  55437. }
  55438. if (this._font._variationProcessor) {
  55439. var points = [];
  55440. for (var j = 0; j < glyph.components.length; j++) {
  55441. var component = glyph.components[j];
  55442. points.push(new Point(true, true, component.dx, component.dy));
  55443. }
  55444. points.push.apply(points, this._getPhantomPoints(glyph));
  55445. this._font._variationProcessor.transformPoints(this.id, points);
  55446. glyph.phantomPoints = points.splice(-4, 4);
  55447. for (var i = 0; i < points.length; i++) {
  55448. var point = points[i];
  55449. glyph.components[i].dx = point.x;
  55450. glyph.components[i].dy = point.y;
  55451. }
  55452. }
  55453. return haveInstructions;
  55454. };
  55455. _proto34._getPhantomPoints = function _getPhantomPoints(glyph) {
  55456. var cbox = this._getCBox(true);
  55457. if (this._metrics == null) {
  55458. this._metrics = Glyph.prototype._getMetrics.call(this, cbox);
  55459. }
  55460. var _this$_metrics = this._metrics,
  55461. advanceWidth = _this$_metrics.advanceWidth,
  55462. advanceHeight = _this$_metrics.advanceHeight,
  55463. leftBearing = _this$_metrics.leftBearing,
  55464. topBearing = _this$_metrics.topBearing;
  55465. return [new Point(false, true, glyph.xMin - leftBearing, 0), new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0), new Point(false, true, 0, glyph.yMax + topBearing), new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight)];
  55466. } // Decodes font data, resolves composite glyphs, and returns an array of contours
  55467. ;
  55468. _proto34._getContours = function _getContours() {
  55469. var glyph = this._decode();
  55470. if (!glyph) {
  55471. return [];
  55472. }
  55473. var points = [];
  55474. if (glyph.numberOfContours < 0) {
  55475. // resolve composite glyphs
  55476. for (var _iterator70 = _createForOfIteratorHelperLoose(glyph.components), _step70; !(_step70 = _iterator70()).done;) {
  55477. var component = _step70.value;
  55478. var _contours = this._font.getGlyph(component.glyphID)._getContours();
  55479. for (var i = 0; i < _contours.length; i++) {
  55480. var contour = _contours[i];
  55481. for (var j = 0; j < contour.length; j++) {
  55482. var _point = contour[j];
  55483. var x = _point.x * component.scaleX + _point.y * component.scale01 + component.dx;
  55484. var y = _point.y * component.scaleY + _point.x * component.scale10 + component.dy;
  55485. points.push(new Point(_point.onCurve, _point.endContour, x, y));
  55486. }
  55487. }
  55488. }
  55489. } else {
  55490. points = glyph.points || [];
  55491. } // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table
  55492. if (glyph.phantomPoints && !this._font.directory.tables.HVAR) {
  55493. this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x;
  55494. this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y;
  55495. this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x;
  55496. this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax;
  55497. }
  55498. var contours = [];
  55499. var cur = [];
  55500. for (var k = 0; k < points.length; k++) {
  55501. var point = points[k];
  55502. cur.push(point);
  55503. if (point.endContour) {
  55504. contours.push(cur);
  55505. cur = [];
  55506. }
  55507. }
  55508. return contours;
  55509. };
  55510. _proto34._getMetrics = function _getMetrics() {
  55511. if (this._metrics) {
  55512. return this._metrics;
  55513. }
  55514. var cbox = this._getCBox(true);
  55515. _Glyph.prototype._getMetrics.call(this, cbox);
  55516. if (this._font._variationProcessor && !this._font.HVAR) {
  55517. // No HVAR table, decode the glyph. This triggers recomputation of metrics.
  55518. this.path;
  55519. }
  55520. return this._metrics;
  55521. } // Converts contours to a Path object that can be rendered
  55522. ;
  55523. _proto34._getPath = function _getPath() {
  55524. var contours = this._getContours();
  55525. var path = new Path();
  55526. for (var i = 0; i < contours.length; i++) {
  55527. var contour = contours[i];
  55528. var firstPt = contour[0];
  55529. var lastPt = contour[contour.length - 1];
  55530. var start = 0;
  55531. if (firstPt.onCurve) {
  55532. // The first point will be consumed by the moveTo command, so skip in the loop
  55533. var curvePt = null;
  55534. start = 1;
  55535. } else {
  55536. if (lastPt.onCurve) {
  55537. // Start at the last point if the first point is off curve and the last point is on curve
  55538. firstPt = lastPt;
  55539. } else {
  55540. // Start at the middle if both the first and last points are off curve
  55541. firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2);
  55542. }
  55543. var curvePt = firstPt;
  55544. }
  55545. path.moveTo(firstPt.x, firstPt.y);
  55546. for (var j = start; j < contour.length; j++) {
  55547. var pt = contour[j];
  55548. var prevPt = j === 0 ? firstPt : contour[j - 1];
  55549. if (prevPt.onCurve && pt.onCurve) {
  55550. path.lineTo(pt.x, pt.y);
  55551. } else if (prevPt.onCurve && !pt.onCurve) {
  55552. var curvePt = pt;
  55553. } else if (!prevPt.onCurve && !pt.onCurve) {
  55554. var midX = (prevPt.x + pt.x) / 2;
  55555. var midY = (prevPt.y + pt.y) / 2;
  55556. path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);
  55557. var curvePt = pt;
  55558. } else if (!prevPt.onCurve && pt.onCurve) {
  55559. path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y);
  55560. var curvePt = null;
  55561. } else {
  55562. throw new Error("Unknown TTF path state");
  55563. }
  55564. } // Connect the first and last points
  55565. if (curvePt) {
  55566. path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);
  55567. }
  55568. path.closePath();
  55569. }
  55570. return path;
  55571. };
  55572. return TTFGlyph;
  55573. }(Glyph);
  55574. /**
  55575. * Represents an OpenType PostScript glyph, in the Compact Font Format.
  55576. */
  55577. var CFFGlyph = /*#__PURE__*/function (_Glyph2) {
  55578. _inheritsLoose(CFFGlyph, _Glyph2);
  55579. function CFFGlyph() {
  55580. return _Glyph2.apply(this, arguments) || this;
  55581. }
  55582. var _proto35 = CFFGlyph.prototype;
  55583. _proto35._getName = function _getName() {
  55584. if (this._font.CFF2) {
  55585. return _Glyph2.prototype._getName.call(this);
  55586. }
  55587. return this._font['CFF '].getGlyphName(this.id);
  55588. };
  55589. _proto35.bias = function bias(s) {
  55590. if (s.length < 1240) {
  55591. return 107;
  55592. } else if (s.length < 33900) {
  55593. return 1131;
  55594. } else {
  55595. return 32768;
  55596. }
  55597. };
  55598. _proto35._getPath = function _getPath() {
  55599. var cff = this._font.CFF2 || this._font['CFF '];
  55600. var stream = cff.stream;
  55601. var str = cff.topDict.CharStrings[this.id];
  55602. var end = str.offset + str.length;
  55603. stream.pos = str.offset;
  55604. var path = new Path();
  55605. var stack = [];
  55606. var trans = [];
  55607. var width = null;
  55608. var nStems = 0;
  55609. var x = 0,
  55610. y = 0;
  55611. var usedGsubrs;
  55612. var usedSubrs;
  55613. var open = false;
  55614. this._usedGsubrs = usedGsubrs = {};
  55615. this._usedSubrs = usedSubrs = {};
  55616. var gsubrs = cff.globalSubrIndex || [];
  55617. var gsubrsBias = this.bias(gsubrs);
  55618. var privateDict = cff.privateDictForGlyph(this.id) || {};
  55619. var subrs = privateDict.Subrs || [];
  55620. var subrsBias = this.bias(subrs);
  55621. var vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore;
  55622. var vsindex = privateDict.vsindex;
  55623. var variationProcessor = this._font._variationProcessor;
  55624. function checkWidth() {
  55625. if (width == null) {
  55626. width = stack.shift() + privateDict.nominalWidthX;
  55627. }
  55628. }
  55629. function parseStems() {
  55630. if (stack.length % 2 !== 0) {
  55631. checkWidth();
  55632. }
  55633. nStems += stack.length >> 1;
  55634. return stack.length = 0;
  55635. }
  55636. function moveTo(x, y) {
  55637. if (open) {
  55638. path.closePath();
  55639. }
  55640. path.moveTo(x, y);
  55641. open = true;
  55642. }
  55643. var parse = function parse() {
  55644. while (stream.pos < end) {
  55645. var op = stream.readUInt8();
  55646. if (op < 32) {
  55647. switch (op) {
  55648. case 1: // hstem
  55649. case 3: // vstem
  55650. case 18: // hstemhm
  55651. case 23:
  55652. // vstemhm
  55653. parseStems();
  55654. break;
  55655. case 4:
  55656. // vmoveto
  55657. if (stack.length > 1) {
  55658. checkWidth();
  55659. }
  55660. y += stack.shift();
  55661. moveTo(x, y);
  55662. break;
  55663. case 5:
  55664. // rlineto
  55665. while (stack.length >= 2) {
  55666. x += stack.shift();
  55667. y += stack.shift();
  55668. path.lineTo(x, y);
  55669. }
  55670. break;
  55671. case 6: // hlineto
  55672. case 7:
  55673. // vlineto
  55674. var phase = op === 6;
  55675. while (stack.length >= 1) {
  55676. if (phase) {
  55677. x += stack.shift();
  55678. } else {
  55679. y += stack.shift();
  55680. }
  55681. path.lineTo(x, y);
  55682. phase = !phase;
  55683. }
  55684. break;
  55685. case 8:
  55686. // rrcurveto
  55687. while (stack.length > 0) {
  55688. var c1x = x + stack.shift();
  55689. var c1y = y + stack.shift();
  55690. var c2x = c1x + stack.shift();
  55691. var c2y = c1y + stack.shift();
  55692. x = c2x + stack.shift();
  55693. y = c2y + stack.shift();
  55694. path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);
  55695. }
  55696. break;
  55697. case 10:
  55698. // callsubr
  55699. var index = stack.pop() + subrsBias;
  55700. var subr = subrs[index];
  55701. if (subr) {
  55702. usedSubrs[index] = true;
  55703. var p = stream.pos;
  55704. var e = end;
  55705. stream.pos = subr.offset;
  55706. end = subr.offset + subr.length;
  55707. parse();
  55708. stream.pos = p;
  55709. end = e;
  55710. }
  55711. break;
  55712. case 11:
  55713. // return
  55714. if (cff.version >= 2) {
  55715. break;
  55716. }
  55717. return;
  55718. case 14:
  55719. // endchar
  55720. if (cff.version >= 2) {
  55721. break;
  55722. }
  55723. if (stack.length > 0) {
  55724. checkWidth();
  55725. }
  55726. if (open) {
  55727. path.closePath();
  55728. open = false;
  55729. }
  55730. break;
  55731. case 15:
  55732. {
  55733. // vsindex
  55734. if (cff.version < 2) {
  55735. throw new Error('vsindex operator not supported in CFF v1');
  55736. }
  55737. vsindex = stack.pop();
  55738. break;
  55739. }
  55740. case 16:
  55741. {
  55742. // blend
  55743. if (cff.version < 2) {
  55744. throw new Error('blend operator not supported in CFF v1');
  55745. }
  55746. if (!variationProcessor) {
  55747. throw new Error('blend operator in non-variation font');
  55748. }
  55749. var blendVector = variationProcessor.getBlendVector(vstore, vsindex);
  55750. var numBlends = stack.pop();
  55751. var numOperands = numBlends * blendVector.length;
  55752. var delta = stack.length - numOperands;
  55753. var base = delta - numBlends;
  55754. for (var i = 0; i < numBlends; i++) {
  55755. var sum = stack[base + i];
  55756. for (var j = 0; j < blendVector.length; j++) {
  55757. sum += blendVector[j] * stack[delta++];
  55758. }
  55759. stack[base + i] = sum;
  55760. }
  55761. while (numOperands--) {
  55762. stack.pop();
  55763. }
  55764. break;
  55765. }
  55766. case 19: // hintmask
  55767. case 20:
  55768. // cntrmask
  55769. parseStems();
  55770. stream.pos += nStems + 7 >> 3;
  55771. break;
  55772. case 21:
  55773. // rmoveto
  55774. if (stack.length > 2) {
  55775. checkWidth();
  55776. }
  55777. x += stack.shift();
  55778. y += stack.shift();
  55779. moveTo(x, y);
  55780. break;
  55781. case 22:
  55782. // hmoveto
  55783. if (stack.length > 1) {
  55784. checkWidth();
  55785. }
  55786. x += stack.shift();
  55787. moveTo(x, y);
  55788. break;
  55789. case 24:
  55790. // rcurveline
  55791. while (stack.length >= 8) {
  55792. var c1x = x + stack.shift();
  55793. var c1y = y + stack.shift();
  55794. var c2x = c1x + stack.shift();
  55795. var c2y = c1y + stack.shift();
  55796. x = c2x + stack.shift();
  55797. y = c2y + stack.shift();
  55798. path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);
  55799. }
  55800. x += stack.shift();
  55801. y += stack.shift();
  55802. path.lineTo(x, y);
  55803. break;
  55804. case 25:
  55805. // rlinecurve
  55806. while (stack.length >= 8) {
  55807. x += stack.shift();
  55808. y += stack.shift();
  55809. path.lineTo(x, y);
  55810. }
  55811. var c1x = x + stack.shift();
  55812. var c1y = y + stack.shift();
  55813. var c2x = c1x + stack.shift();
  55814. var c2y = c1y + stack.shift();
  55815. x = c2x + stack.shift();
  55816. y = c2y + stack.shift();
  55817. path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);
  55818. break;
  55819. case 26:
  55820. // vvcurveto
  55821. if (stack.length % 2) {
  55822. x += stack.shift();
  55823. }
  55824. while (stack.length >= 4) {
  55825. c1x = x;
  55826. c1y = y + stack.shift();
  55827. c2x = c1x + stack.shift();
  55828. c2y = c1y + stack.shift();
  55829. x = c2x;
  55830. y = c2y + stack.shift();
  55831. path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);
  55832. }
  55833. break;
  55834. case 27:
  55835. // hhcurveto
  55836. if (stack.length % 2) {
  55837. y += stack.shift();
  55838. }
  55839. while (stack.length >= 4) {
  55840. c1x = x + stack.shift();
  55841. c1y = y;
  55842. c2x = c1x + stack.shift();
  55843. c2y = c1y + stack.shift();
  55844. x = c2x + stack.shift();
  55845. y = c2y;
  55846. path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);
  55847. }
  55848. break;
  55849. case 28:
  55850. // shortint
  55851. stack.push(stream.readInt16BE());
  55852. break;
  55853. case 29:
  55854. // callgsubr
  55855. index = stack.pop() + gsubrsBias;
  55856. subr = gsubrs[index];
  55857. if (subr) {
  55858. usedGsubrs[index] = true;
  55859. var p = stream.pos;
  55860. var e = end;
  55861. stream.pos = subr.offset;
  55862. end = subr.offset + subr.length;
  55863. parse();
  55864. stream.pos = p;
  55865. end = e;
  55866. }
  55867. break;
  55868. case 30: // vhcurveto
  55869. case 31:
  55870. // hvcurveto
  55871. phase = op === 31;
  55872. while (stack.length >= 4) {
  55873. if (phase) {
  55874. c1x = x + stack.shift();
  55875. c1y = y;
  55876. c2x = c1x + stack.shift();
  55877. c2y = c1y + stack.shift();
  55878. y = c2y + stack.shift();
  55879. x = c2x + (stack.length === 1 ? stack.shift() : 0);
  55880. } else {
  55881. c1x = x;
  55882. c1y = y + stack.shift();
  55883. c2x = c1x + stack.shift();
  55884. c2y = c1y + stack.shift();
  55885. x = c2x + stack.shift();
  55886. y = c2y + (stack.length === 1 ? stack.shift() : 0);
  55887. }
  55888. path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);
  55889. phase = !phase;
  55890. }
  55891. break;
  55892. case 12:
  55893. op = stream.readUInt8();
  55894. switch (op) {
  55895. case 3:
  55896. // and
  55897. var a = stack.pop();
  55898. var b = stack.pop();
  55899. stack.push(a && b ? 1 : 0);
  55900. break;
  55901. case 4:
  55902. // or
  55903. a = stack.pop();
  55904. b = stack.pop();
  55905. stack.push(a || b ? 1 : 0);
  55906. break;
  55907. case 5:
  55908. // not
  55909. a = stack.pop();
  55910. stack.push(a ? 0 : 1);
  55911. break;
  55912. case 9:
  55913. // abs
  55914. a = stack.pop();
  55915. stack.push(Math.abs(a));
  55916. break;
  55917. case 10:
  55918. // add
  55919. a = stack.pop();
  55920. b = stack.pop();
  55921. stack.push(a + b);
  55922. break;
  55923. case 11:
  55924. // sub
  55925. a = stack.pop();
  55926. b = stack.pop();
  55927. stack.push(a - b);
  55928. break;
  55929. case 12:
  55930. // div
  55931. a = stack.pop();
  55932. b = stack.pop();
  55933. stack.push(a / b);
  55934. break;
  55935. case 14:
  55936. // neg
  55937. a = stack.pop();
  55938. stack.push(-a);
  55939. break;
  55940. case 15:
  55941. // eq
  55942. a = stack.pop();
  55943. b = stack.pop();
  55944. stack.push(a === b ? 1 : 0);
  55945. break;
  55946. case 18:
  55947. // drop
  55948. stack.pop();
  55949. break;
  55950. case 20:
  55951. // put
  55952. var val = stack.pop();
  55953. var idx = stack.pop();
  55954. trans[idx] = val;
  55955. break;
  55956. case 21:
  55957. // get
  55958. idx = stack.pop();
  55959. stack.push(trans[idx] || 0);
  55960. break;
  55961. case 22:
  55962. // ifelse
  55963. var s1 = stack.pop();
  55964. var s2 = stack.pop();
  55965. var v1 = stack.pop();
  55966. var v2 = stack.pop();
  55967. stack.push(v1 <= v2 ? s1 : s2);
  55968. break;
  55969. case 23:
  55970. // random
  55971. stack.push(Math.random());
  55972. break;
  55973. case 24:
  55974. // mul
  55975. a = stack.pop();
  55976. b = stack.pop();
  55977. stack.push(a * b);
  55978. break;
  55979. case 26:
  55980. // sqrt
  55981. a = stack.pop();
  55982. stack.push(Math.sqrt(a));
  55983. break;
  55984. case 27:
  55985. // dup
  55986. a = stack.pop();
  55987. stack.push(a, a);
  55988. break;
  55989. case 28:
  55990. // exch
  55991. a = stack.pop();
  55992. b = stack.pop();
  55993. stack.push(b, a);
  55994. break;
  55995. case 29:
  55996. // index
  55997. idx = stack.pop();
  55998. if (idx < 0) {
  55999. idx = 0;
  56000. } else if (idx > stack.length - 1) {
  56001. idx = stack.length - 1;
  56002. }
  56003. stack.push(stack[idx]);
  56004. break;
  56005. case 30:
  56006. // roll
  56007. var n = stack.pop();
  56008. var _j = stack.pop();
  56009. if (_j >= 0) {
  56010. while (_j > 0) {
  56011. var t = stack[n - 1];
  56012. for (var _i = n - 2; _i >= 0; _i--) {
  56013. stack[_i + 1] = stack[_i];
  56014. }
  56015. stack[0] = t;
  56016. _j--;
  56017. }
  56018. } else {
  56019. while (_j < 0) {
  56020. var t = stack[0];
  56021. for (var _i2 = 0; _i2 <= n; _i2++) {
  56022. stack[_i2] = stack[_i2 + 1];
  56023. }
  56024. stack[n - 1] = t;
  56025. _j++;
  56026. }
  56027. }
  56028. break;
  56029. case 34:
  56030. // hflex
  56031. c1x = x + stack.shift();
  56032. c1y = y;
  56033. c2x = c1x + stack.shift();
  56034. c2y = c1y + stack.shift();
  56035. var c3x = c2x + stack.shift();
  56036. var c3y = c2y;
  56037. var c4x = c3x + stack.shift();
  56038. var c4y = c3y;
  56039. var c5x = c4x + stack.shift();
  56040. var c5y = c4y;
  56041. var c6x = c5x + stack.shift();
  56042. var c6y = c5y;
  56043. x = c6x;
  56044. y = c6y;
  56045. path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);
  56046. path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);
  56047. break;
  56048. case 35:
  56049. // flex
  56050. var pts = [];
  56051. for (var _i3 = 0; _i3 <= 5; _i3++) {
  56052. x += stack.shift();
  56053. y += stack.shift();
  56054. pts.push(x, y);
  56055. }
  56056. path.bezierCurveTo.apply(path, pts.slice(0, 6));
  56057. path.bezierCurveTo.apply(path, pts.slice(6));
  56058. stack.shift(); // fd
  56059. break;
  56060. case 36:
  56061. // hflex1
  56062. c1x = x + stack.shift();
  56063. c1y = y + stack.shift();
  56064. c2x = c1x + stack.shift();
  56065. c2y = c1y + stack.shift();
  56066. c3x = c2x + stack.shift();
  56067. c3y = c2y;
  56068. c4x = c3x + stack.shift();
  56069. c4y = c3y;
  56070. c5x = c4x + stack.shift();
  56071. c5y = c4y + stack.shift();
  56072. c6x = c5x + stack.shift();
  56073. c6y = c5y;
  56074. x = c6x;
  56075. y = c6y;
  56076. path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);
  56077. path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);
  56078. break;
  56079. case 37:
  56080. // flex1
  56081. var startx = x;
  56082. var starty = y;
  56083. pts = [];
  56084. for (var _i4 = 0; _i4 <= 4; _i4++) {
  56085. x += stack.shift();
  56086. y += stack.shift();
  56087. pts.push(x, y);
  56088. }
  56089. if (Math.abs(x - startx) > Math.abs(y - starty)) {
  56090. // horizontal
  56091. x += stack.shift();
  56092. y = starty;
  56093. } else {
  56094. x = startx;
  56095. y += stack.shift();
  56096. }
  56097. pts.push(x, y);
  56098. path.bezierCurveTo.apply(path, pts.slice(0, 6));
  56099. path.bezierCurveTo.apply(path, pts.slice(6));
  56100. break;
  56101. default:
  56102. throw new Error("Unknown op: 12 ".concat(op));
  56103. }
  56104. break;
  56105. default:
  56106. throw new Error("Unknown op: ".concat(op));
  56107. }
  56108. } else if (op < 247) {
  56109. stack.push(op - 139);
  56110. } else if (op < 251) {
  56111. var b1 = stream.readUInt8();
  56112. stack.push((op - 247) * 256 + b1 + 108);
  56113. } else if (op < 255) {
  56114. var b1 = stream.readUInt8();
  56115. stack.push(-(op - 251) * 256 - b1 - 108);
  56116. } else {
  56117. stack.push(stream.readInt32BE() / 65536);
  56118. }
  56119. }
  56120. };
  56121. parse();
  56122. if (open) {
  56123. path.closePath();
  56124. }
  56125. return path;
  56126. };
  56127. return CFFGlyph;
  56128. }(Glyph);
  56129. var SBIXImage = new r.Struct({
  56130. originX: r.uint16,
  56131. originY: r.uint16,
  56132. type: new r.String(4),
  56133. data: new r.Buffer(function (t) {
  56134. return t.parent.buflen - t._currentOffset;
  56135. })
  56136. });
  56137. /**
  56138. * Represents a color (e.g. emoji) glyph in Apple's SBIX format.
  56139. */
  56140. var SBIXGlyph = /*#__PURE__*/function (_TTFGlyph) {
  56141. _inheritsLoose(SBIXGlyph, _TTFGlyph);
  56142. function SBIXGlyph() {
  56143. return _TTFGlyph.apply(this, arguments) || this;
  56144. }
  56145. var _proto36 = SBIXGlyph.prototype;
  56146. /**
  56147. * Returns an object representing a glyph image at the given point size.
  56148. * The object has a data property with a Buffer containing the actual image data,
  56149. * along with the image type, and origin.
  56150. *
  56151. * @param {number} size
  56152. * @return {object}
  56153. */
  56154. _proto36.getImageForSize = function getImageForSize(size) {
  56155. for (var i = 0; i < this._font.sbix.imageTables.length; i++) {
  56156. var table = this._font.sbix.imageTables[i];
  56157. if (table.ppem >= size) {
  56158. break;
  56159. }
  56160. }
  56161. var offsets = table.imageOffsets;
  56162. var start = offsets[this.id];
  56163. var end = offsets[this.id + 1];
  56164. if (start === end) {
  56165. return null;
  56166. }
  56167. this._font.stream.pos = start;
  56168. return SBIXImage.decode(this._font.stream, {
  56169. buflen: end - start
  56170. });
  56171. };
  56172. _proto36.render = function render(ctx, size) {
  56173. var img = this.getImageForSize(size);
  56174. if (img != null) {
  56175. var scale = size / this._font.unitsPerEm;
  56176. ctx.image(img.data, {
  56177. height: size,
  56178. x: img.originX,
  56179. y: (this.bbox.minY - img.originY) * scale
  56180. });
  56181. }
  56182. if (this._font.sbix.flags.renderOutlines) {
  56183. _TTFGlyph.prototype.render.call(this, ctx, size);
  56184. }
  56185. };
  56186. return SBIXGlyph;
  56187. }(TTFGlyph);
  56188. var COLRLayer = function COLRLayer(glyph, color) {
  56189. this.glyph = glyph;
  56190. this.color = color;
  56191. };
  56192. /**
  56193. * Represents a color (e.g. emoji) glyph in Microsoft's COLR format.
  56194. * Each glyph in this format contain a list of colored layers, each
  56195. * of which is another vector glyph.
  56196. */
  56197. var COLRGlyph = /*#__PURE__*/function (_Glyph3) {
  56198. _inheritsLoose(COLRGlyph, _Glyph3);
  56199. function COLRGlyph() {
  56200. return _Glyph3.apply(this, arguments) || this;
  56201. }
  56202. var _proto37 = COLRGlyph.prototype;
  56203. _proto37._getBBox = function _getBBox() {
  56204. var bbox = new BBox();
  56205. for (var i = 0; i < this.layers.length; i++) {
  56206. var layer = this.layers[i];
  56207. var b = layer.glyph.bbox;
  56208. bbox.addPoint(b.minX, b.minY);
  56209. bbox.addPoint(b.maxX, b.maxY);
  56210. }
  56211. return bbox;
  56212. }
  56213. /**
  56214. * Returns an array of objects containing the glyph and color for
  56215. * each layer in the composite color glyph.
  56216. * @type {object[]}
  56217. */
  56218. ;
  56219. _proto37.render = function render(ctx, size) {
  56220. for (var _iterator71 = _createForOfIteratorHelperLoose(this.layers), _step71; !(_step71 = _iterator71()).done;) {
  56221. var _step71$value = _step71.value,
  56222. glyph = _step71$value.glyph,
  56223. color = _step71$value.color;
  56224. ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100);
  56225. glyph.render(ctx, size);
  56226. }
  56227. return;
  56228. };
  56229. _createClass(COLRGlyph, [{
  56230. key: "layers",
  56231. get: function get() {
  56232. var cpal = this._font.CPAL;
  56233. var colr = this._font.COLR;
  56234. var low = 0;
  56235. var high = colr.baseGlyphRecord.length - 1;
  56236. while (low <= high) {
  56237. var mid = low + high >> 1;
  56238. var rec = colr.baseGlyphRecord[mid];
  56239. if (this.id < rec.gid) {
  56240. high = mid - 1;
  56241. } else if (this.id > rec.gid) {
  56242. low = mid + 1;
  56243. } else {
  56244. var baseLayer = rec;
  56245. break;
  56246. }
  56247. } // if base glyph not found in COLR table,
  56248. // default to normal glyph from glyf or CFF
  56249. if (baseLayer == null) {
  56250. var g = this._font._getBaseGlyph(this.id);
  56251. var color = {
  56252. red: 0,
  56253. green: 0,
  56254. blue: 0,
  56255. alpha: 255
  56256. };
  56257. return [new COLRLayer(g, color)];
  56258. } // otherwise, return an array of all the layers
  56259. var layers = [];
  56260. for (var i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) {
  56261. var rec = colr.layerRecords[i];
  56262. var color = cpal.colorRecords[rec.paletteIndex];
  56263. var g = this._font._getBaseGlyph(rec.gid);
  56264. layers.push(new COLRLayer(g, color));
  56265. }
  56266. return layers;
  56267. }
  56268. }]);
  56269. return COLRGlyph;
  56270. }(Glyph);
  56271. var TUPLES_SHARE_POINT_NUMBERS = 0x8000;
  56272. var TUPLE_COUNT_MASK = 0x0fff;
  56273. var EMBEDDED_TUPLE_COORD = 0x8000;
  56274. var INTERMEDIATE_TUPLE = 0x4000;
  56275. var PRIVATE_POINT_NUMBERS = 0x2000;
  56276. var TUPLE_INDEX_MASK = 0x0fff;
  56277. var POINTS_ARE_WORDS = 0x80;
  56278. var POINT_RUN_COUNT_MASK = 0x7f;
  56279. var DELTAS_ARE_ZERO = 0x80;
  56280. var DELTAS_ARE_WORDS = 0x40;
  56281. var DELTA_RUN_COUNT_MASK = 0x3f;
  56282. /**
  56283. * This class is transforms TrueType glyphs according to the data from
  56284. * the Apple Advanced Typography variation tables (fvar, gvar, and avar).
  56285. * These tables allow infinite adjustments to glyph weight, width, slant,
  56286. * and optical size without the designer needing to specify every exact style.
  56287. *
  56288. * Apple's documentation for these tables is not great, so thanks to the
  56289. * Freetype project for figuring much of this out.
  56290. *
  56291. * @private
  56292. */
  56293. var GlyphVariationProcessor = /*#__PURE__*/function () {
  56294. function GlyphVariationProcessor(font, coords) {
  56295. this.font = font;
  56296. this.normalizedCoords = this.normalizeCoords(coords);
  56297. this.blendVectors = new Map();
  56298. }
  56299. var _proto38 = GlyphVariationProcessor.prototype;
  56300. _proto38.normalizeCoords = function normalizeCoords(coords) {
  56301. // the default mapping is linear along each axis, in two segments:
  56302. // from the minValue to defaultValue, and from defaultValue to maxValue.
  56303. var normalized = [];
  56304. for (var i = 0; i < this.font.fvar.axis.length; i++) {
  56305. var axis = this.font.fvar.axis[i];
  56306. if (coords[i] < axis.defaultValue) {
  56307. normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON));
  56308. } else {
  56309. normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON));
  56310. }
  56311. } // if there is an avar table, the normalized value is calculated
  56312. // by interpolating between the two nearest mapped values.
  56313. if (this.font.avar) {
  56314. for (var i = 0; i < this.font.avar.segment.length; i++) {
  56315. var segment = this.font.avar.segment[i];
  56316. for (var j = 0; j < segment.correspondence.length; j++) {
  56317. var pair = segment.correspondence[j];
  56318. if (j >= 1 && normalized[i] < pair.fromCoord) {
  56319. var prev = segment.correspondence[j - 1];
  56320. normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) / (pair.fromCoord - prev.fromCoord + Number.EPSILON) + prev.toCoord;
  56321. break;
  56322. }
  56323. }
  56324. }
  56325. }
  56326. return normalized;
  56327. };
  56328. _proto38.transformPoints = function transformPoints(gid, glyphPoints) {
  56329. if (!this.font.fvar || !this.font.gvar) {
  56330. return;
  56331. }
  56332. var gvar = this.font.gvar;
  56333. if (gid >= gvar.glyphCount) {
  56334. return;
  56335. }
  56336. var offset = gvar.offsets[gid];
  56337. if (offset === gvar.offsets[gid + 1]) {
  56338. return;
  56339. } // Read the gvar data for this glyph
  56340. var stream = this.font.stream;
  56341. stream.pos = offset;
  56342. if (stream.pos >= stream.length) {
  56343. return;
  56344. }
  56345. var tupleCount = stream.readUInt16BE();
  56346. var offsetToData = offset + stream.readUInt16BE();
  56347. if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) {
  56348. var here = stream.pos;
  56349. stream.pos = offsetToData;
  56350. var sharedPoints = this.decodePoints();
  56351. offsetToData = stream.pos;
  56352. stream.pos = here;
  56353. }
  56354. var origPoints = glyphPoints.map(function (pt) {
  56355. return pt.copy();
  56356. });
  56357. tupleCount &= TUPLE_COUNT_MASK;
  56358. for (var i = 0; i < tupleCount; i++) {
  56359. var tupleDataSize = stream.readUInt16BE();
  56360. var tupleIndex = stream.readUInt16BE();
  56361. if (tupleIndex & EMBEDDED_TUPLE_COORD) {
  56362. var tupleCoords = [];
  56363. for (var a = 0; a < gvar.axisCount; a++) {
  56364. tupleCoords.push(stream.readInt16BE() / 16384);
  56365. }
  56366. } else {
  56367. if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) {
  56368. throw new Error('Invalid gvar table');
  56369. }
  56370. var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK];
  56371. }
  56372. if (tupleIndex & INTERMEDIATE_TUPLE) {
  56373. var startCoords = [];
  56374. for (var _a = 0; _a < gvar.axisCount; _a++) {
  56375. startCoords.push(stream.readInt16BE() / 16384);
  56376. }
  56377. var endCoords = [];
  56378. for (var _a2 = 0; _a2 < gvar.axisCount; _a2++) {
  56379. endCoords.push(stream.readInt16BE() / 16384);
  56380. }
  56381. } // Get the factor at which to apply this tuple
  56382. var factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords);
  56383. if (factor === 0) {
  56384. offsetToData += tupleDataSize;
  56385. continue;
  56386. }
  56387. var here = stream.pos;
  56388. stream.pos = offsetToData;
  56389. if (tupleIndex & PRIVATE_POINT_NUMBERS) {
  56390. var points = this.decodePoints();
  56391. } else {
  56392. var points = sharedPoints;
  56393. } // points.length = 0 means there are deltas for all points
  56394. var nPoints = points.length === 0 ? glyphPoints.length : points.length;
  56395. var xDeltas = this.decodeDeltas(nPoints);
  56396. var yDeltas = this.decodeDeltas(nPoints);
  56397. if (points.length === 0) {
  56398. // all points
  56399. for (var _i = 0; _i < glyphPoints.length; _i++) {
  56400. var point = glyphPoints[_i];
  56401. point.x += Math.round(xDeltas[_i] * factor);
  56402. point.y += Math.round(yDeltas[_i] * factor);
  56403. }
  56404. } else {
  56405. var outPoints = origPoints.map(function (pt) {
  56406. return pt.copy();
  56407. });
  56408. var hasDelta = glyphPoints.map(function () {
  56409. return false;
  56410. });
  56411. for (var _i2 = 0; _i2 < points.length; _i2++) {
  56412. var idx = points[_i2];
  56413. if (idx < glyphPoints.length) {
  56414. var _point = outPoints[idx];
  56415. hasDelta[idx] = true;
  56416. _point.x += Math.round(xDeltas[_i2] * factor);
  56417. _point.y += Math.round(yDeltas[_i2] * factor);
  56418. }
  56419. }
  56420. this.interpolateMissingDeltas(outPoints, origPoints, hasDelta);
  56421. for (var _i3 = 0; _i3 < glyphPoints.length; _i3++) {
  56422. var deltaX = outPoints[_i3].x - origPoints[_i3].x;
  56423. var deltaY = outPoints[_i3].y - origPoints[_i3].y;
  56424. glyphPoints[_i3].x += deltaX;
  56425. glyphPoints[_i3].y += deltaY;
  56426. }
  56427. }
  56428. offsetToData += tupleDataSize;
  56429. stream.pos = here;
  56430. }
  56431. };
  56432. _proto38.decodePoints = function decodePoints() {
  56433. var stream = this.font.stream;
  56434. var count = stream.readUInt8();
  56435. if (count & POINTS_ARE_WORDS) {
  56436. count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8();
  56437. }
  56438. var points = new Uint16Array(count);
  56439. var i = 0;
  56440. var point = 0;
  56441. while (i < count) {
  56442. var run = stream.readUInt8();
  56443. var runCount = (run & POINT_RUN_COUNT_MASK) + 1;
  56444. var fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8;
  56445. for (var j = 0; j < runCount && i < count; j++) {
  56446. point += fn.call(stream);
  56447. points[i++] = point;
  56448. }
  56449. }
  56450. return points;
  56451. };
  56452. _proto38.decodeDeltas = function decodeDeltas(count) {
  56453. var stream = this.font.stream;
  56454. var i = 0;
  56455. var deltas = new Int16Array(count);
  56456. while (i < count) {
  56457. var run = stream.readUInt8();
  56458. var runCount = (run & DELTA_RUN_COUNT_MASK) + 1;
  56459. if (run & DELTAS_ARE_ZERO) {
  56460. i += runCount;
  56461. } else {
  56462. var fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8;
  56463. for (var j = 0; j < runCount && i < count; j++) {
  56464. deltas[i++] = fn.call(stream);
  56465. }
  56466. }
  56467. }
  56468. return deltas;
  56469. };
  56470. _proto38.tupleFactor = function tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) {
  56471. var normalized = this.normalizedCoords;
  56472. var gvar = this.font.gvar;
  56473. var factor = 1;
  56474. for (var i = 0; i < gvar.axisCount; i++) {
  56475. if (tupleCoords[i] === 0) {
  56476. continue;
  56477. }
  56478. if (normalized[i] === 0) {
  56479. return 0;
  56480. }
  56481. if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) {
  56482. if (normalized[i] < Math.min(0, tupleCoords[i]) || normalized[i] > Math.max(0, tupleCoords[i])) {
  56483. return 0;
  56484. }
  56485. factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON);
  56486. } else {
  56487. if (normalized[i] < startCoords[i] || normalized[i] > endCoords[i]) {
  56488. return 0;
  56489. } else if (normalized[i] < tupleCoords[i]) {
  56490. factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON);
  56491. } else {
  56492. factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON);
  56493. }
  56494. }
  56495. }
  56496. return factor;
  56497. } // Interpolates points without delta values.
  56498. // Needed for the Ø and Q glyphs in Skia.
  56499. // Algorithm from Freetype.
  56500. ;
  56501. _proto38.interpolateMissingDeltas = function interpolateMissingDeltas(points, inPoints, hasDelta) {
  56502. if (points.length === 0) {
  56503. return;
  56504. }
  56505. var point = 0;
  56506. while (point < points.length) {
  56507. var firstPoint = point; // find the end point of the contour
  56508. var endPoint = point;
  56509. var pt = points[endPoint];
  56510. while (!pt.endContour) {
  56511. pt = points[++endPoint];
  56512. } // find the first point that has a delta
  56513. while (point <= endPoint && !hasDelta[point]) {
  56514. point++;
  56515. }
  56516. if (point > endPoint) {
  56517. continue;
  56518. }
  56519. var firstDelta = point;
  56520. var curDelta = point;
  56521. point++;
  56522. while (point <= endPoint) {
  56523. // find the next point with a delta, and interpolate intermediate points
  56524. if (hasDelta[point]) {
  56525. this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points);
  56526. curDelta = point;
  56527. }
  56528. point++;
  56529. } // shift contour if we only have a single delta
  56530. if (curDelta === firstDelta) {
  56531. this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points);
  56532. } else {
  56533. // otherwise, handle the remaining points at the end and beginning of the contour
  56534. this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points);
  56535. if (firstDelta > 0) {
  56536. this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points);
  56537. }
  56538. }
  56539. point = endPoint + 1;
  56540. }
  56541. };
  56542. _proto38.deltaInterpolate = function deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) {
  56543. if (p1 > p2) {
  56544. return;
  56545. }
  56546. var iterable = ['x', 'y'];
  56547. for (var i = 0; i < iterable.length; i++) {
  56548. var k = iterable[i];
  56549. if (inPoints[ref1][k] > inPoints[ref2][k]) {
  56550. var p = ref1;
  56551. ref1 = ref2;
  56552. ref2 = p;
  56553. }
  56554. var in1 = inPoints[ref1][k];
  56555. var in2 = inPoints[ref2][k];
  56556. var out1 = outPoints[ref1][k];
  56557. var out2 = outPoints[ref2][k]; // If the reference points have the same coordinate but different
  56558. // delta, inferred delta is zero. Otherwise interpolate.
  56559. if (in1 !== in2 || out1 === out2) {
  56560. var scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);
  56561. for (var _p = p1; _p <= p2; _p++) {
  56562. var out = inPoints[_p][k];
  56563. if (out <= in1) {
  56564. out += out1 - in1;
  56565. } else if (out >= in2) {
  56566. out += out2 - in2;
  56567. } else {
  56568. out = out1 + (out - in1) * scale;
  56569. }
  56570. outPoints[_p][k] = out;
  56571. }
  56572. }
  56573. }
  56574. };
  56575. _proto38.deltaShift = function deltaShift(p1, p2, ref, inPoints, outPoints) {
  56576. var deltaX = outPoints[ref].x - inPoints[ref].x;
  56577. var deltaY = outPoints[ref].y - inPoints[ref].y;
  56578. if (deltaX === 0 && deltaY === 0) {
  56579. return;
  56580. }
  56581. for (var p = p1; p <= p2; p++) {
  56582. if (p !== ref) {
  56583. outPoints[p].x += deltaX;
  56584. outPoints[p].y += deltaY;
  56585. }
  56586. }
  56587. };
  56588. _proto38.getAdvanceAdjustment = function getAdvanceAdjustment(gid, table) {
  56589. var outerIndex, innerIndex;
  56590. if (table.advanceWidthMapping) {
  56591. var idx = gid;
  56592. if (idx >= table.advanceWidthMapping.mapCount) {
  56593. idx = table.advanceWidthMapping.mapCount - 1;
  56594. }
  56595. var entryFormat = table.advanceWidthMapping.entryFormat;
  56596. var _table$advanceWidthMa = table.advanceWidthMapping.mapData[idx];
  56597. outerIndex = _table$advanceWidthMa.outerIndex;
  56598. innerIndex = _table$advanceWidthMa.innerIndex;
  56599. } else {
  56600. outerIndex = 0;
  56601. innerIndex = gid;
  56602. }
  56603. return this.getDelta(table.itemVariationStore, outerIndex, innerIndex);
  56604. } // See pseudo code from `Font Variations Overview'
  56605. // in the OpenType specification.
  56606. ;
  56607. _proto38.getDelta = function getDelta(itemStore, outerIndex, innerIndex) {
  56608. if (outerIndex >= itemStore.itemVariationData.length) {
  56609. return 0;
  56610. }
  56611. var varData = itemStore.itemVariationData[outerIndex];
  56612. if (innerIndex >= varData.deltaSets.length) {
  56613. return 0;
  56614. }
  56615. var deltaSet = varData.deltaSets[innerIndex];
  56616. var blendVector = this.getBlendVector(itemStore, outerIndex);
  56617. var netAdjustment = 0;
  56618. for (var master = 0; master < varData.regionIndexCount; master++) {
  56619. netAdjustment += deltaSet.deltas[master] * blendVector[master];
  56620. }
  56621. return netAdjustment;
  56622. };
  56623. _proto38.getBlendVector = function getBlendVector(itemStore, outerIndex) {
  56624. var varData = itemStore.itemVariationData[outerIndex];
  56625. if (this.blendVectors.has(varData)) {
  56626. return this.blendVectors.get(varData);
  56627. }
  56628. var normalizedCoords = this.normalizedCoords;
  56629. var blendVector = []; // outer loop steps through master designs to be blended
  56630. for (var master = 0; master < varData.regionIndexCount; master++) {
  56631. var scalar = 1;
  56632. var regionIndex = varData.regionIndexes[master];
  56633. var axes = itemStore.variationRegionList.variationRegions[regionIndex]; // inner loop steps through axes in this region
  56634. for (var j = 0; j < axes.length; j++) {
  56635. var axis = axes[j];
  56636. var axisScalar = void 0; // compute the scalar contribution of this axis
  56637. // ignore invalid ranges
  56638. if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) {
  56639. axisScalar = 1;
  56640. } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) {
  56641. axisScalar = 1; // peak of 0 means ignore this axis
  56642. } else if (axis.peakCoord === 0) {
  56643. axisScalar = 1; // ignore this region if coords are out of range
  56644. } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) {
  56645. axisScalar = 0; // calculate a proportional factor
  56646. } else {
  56647. if (normalizedCoords[j] === axis.peakCoord) {
  56648. axisScalar = 1;
  56649. } else if (normalizedCoords[j] < axis.peakCoord) {
  56650. axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) / (axis.peakCoord - axis.startCoord + Number.EPSILON);
  56651. } else {
  56652. axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) / (axis.endCoord - axis.peakCoord + Number.EPSILON);
  56653. }
  56654. } // take product of all the axis scalars
  56655. scalar *= axisScalar;
  56656. }
  56657. blendVector[master] = scalar;
  56658. }
  56659. this.blendVectors.set(varData, blendVector);
  56660. return blendVector;
  56661. };
  56662. return GlyphVariationProcessor;
  56663. }();
  56664. var resolved = Promise.resolve();
  56665. var Subset = /*#__PURE__*/function () {
  56666. function Subset(font) {
  56667. this.font = font;
  56668. this.glyphs = [];
  56669. this.mapping = {}; // always include the missing glyph
  56670. this.includeGlyph(0);
  56671. }
  56672. var _proto39 = Subset.prototype;
  56673. _proto39.includeGlyph = function includeGlyph(glyph) {
  56674. if (typeof glyph === 'object') {
  56675. glyph = glyph.id;
  56676. }
  56677. if (this.mapping[glyph] == null) {
  56678. this.glyphs.push(glyph);
  56679. this.mapping[glyph] = this.glyphs.length - 1;
  56680. }
  56681. return this.mapping[glyph];
  56682. };
  56683. _proto39.encodeStream = function encodeStream() {
  56684. var _this11 = this;
  56685. var s = new r.EncodeStream();
  56686. resolved.then(function () {
  56687. _this11.encode(s);
  56688. return s.end();
  56689. });
  56690. return s;
  56691. };
  56692. return Subset;
  56693. }();
  56694. var ON_CURVE$1 = 1 << 0;
  56695. var X_SHORT_VECTOR$1 = 1 << 1;
  56696. var Y_SHORT_VECTOR$1 = 1 << 2;
  56697. var REPEAT$1 = 1 << 3;
  56698. var SAME_X$1 = 1 << 4;
  56699. var SAME_Y$1 = 1 << 5;
  56700. var Point$1 = /*#__PURE__*/function () {
  56701. function Point$1() {}
  56702. Point$1.size = function size(val) {
  56703. return val >= 0 && val <= 255 ? 1 : 2;
  56704. };
  56705. Point$1.encode = function encode(stream, value) {
  56706. if (value >= 0 && value <= 255) {
  56707. stream.writeUInt8(value);
  56708. } else {
  56709. stream.writeInt16BE(value);
  56710. }
  56711. };
  56712. return Point$1;
  56713. }();
  56714. var Glyf = new r.Struct({
  56715. numberOfContours: r.int16,
  56716. // if negative, this is a composite glyph
  56717. xMin: r.int16,
  56718. yMin: r.int16,
  56719. xMax: r.int16,
  56720. yMax: r.int16,
  56721. endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'),
  56722. instructions: new r.Array(r.uint8, r.uint16),
  56723. flags: new r.Array(r.uint8, 0),
  56724. xPoints: new r.Array(Point$1, 0),
  56725. yPoints: new r.Array(Point$1, 0)
  56726. });
  56727. /**
  56728. * Encodes TrueType glyph outlines
  56729. */
  56730. var TTFGlyphEncoder = /*#__PURE__*/function () {
  56731. function TTFGlyphEncoder() {}
  56732. var _proto40 = TTFGlyphEncoder.prototype;
  56733. _proto40.encodeSimple = function encodeSimple(path, instructions) {
  56734. if (instructions === void 0) {
  56735. instructions = [];
  56736. }
  56737. var endPtsOfContours = [];
  56738. var xPoints = [];
  56739. var yPoints = [];
  56740. var flags = [];
  56741. var same = 0;
  56742. var lastX = 0,
  56743. lastY = 0,
  56744. lastFlag = 0;
  56745. var pointCount = 0;
  56746. for (var i = 0; i < path.commands.length; i++) {
  56747. var c = path.commands[i];
  56748. for (var j = 0; j < c.args.length; j += 2) {
  56749. var x = c.args[j];
  56750. var y = c.args[j + 1];
  56751. var flag = 0; // If the ending point of a quadratic curve is the midpoint
  56752. // between the control point and the control point of the next
  56753. // quadratic curve, we can omit the ending point.
  56754. if (c.command === 'quadraticCurveTo' && j === 2) {
  56755. var next = path.commands[i + 1];
  56756. if (next && next.command === 'quadraticCurveTo') {
  56757. var midX = (lastX + next.args[0]) / 2;
  56758. var midY = (lastY + next.args[1]) / 2;
  56759. if (x === midX && y === midY) {
  56760. continue;
  56761. }
  56762. }
  56763. } // All points except control points are on curve.
  56764. if (!(c.command === 'quadraticCurveTo' && j === 0)) {
  56765. flag |= ON_CURVE$1;
  56766. }
  56767. flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR$1, SAME_X$1);
  56768. flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR$1, SAME_Y$1);
  56769. if (flag === lastFlag && same < 255) {
  56770. flags[flags.length - 1] |= REPEAT$1;
  56771. same++;
  56772. } else {
  56773. if (same > 0) {
  56774. flags.push(same);
  56775. same = 0;
  56776. }
  56777. flags.push(flag);
  56778. lastFlag = flag;
  56779. }
  56780. lastX = x;
  56781. lastY = y;
  56782. pointCount++;
  56783. }
  56784. if (c.command === 'closePath') {
  56785. endPtsOfContours.push(pointCount - 1);
  56786. }
  56787. } // Close the path if the last command didn't already
  56788. if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') {
  56789. endPtsOfContours.push(pointCount - 1);
  56790. }
  56791. var bbox = path.bbox;
  56792. var glyf = {
  56793. numberOfContours: endPtsOfContours.length,
  56794. xMin: bbox.minX,
  56795. yMin: bbox.minY,
  56796. xMax: bbox.maxX,
  56797. yMax: bbox.maxY,
  56798. endPtsOfContours: endPtsOfContours,
  56799. instructions: instructions,
  56800. flags: flags,
  56801. xPoints: xPoints,
  56802. yPoints: yPoints
  56803. };
  56804. var size = Glyf.size(glyf);
  56805. var tail = 4 - size % 4;
  56806. var stream = new r.EncodeStream(size + tail);
  56807. Glyf.encode(stream, glyf); // Align to 4-byte length
  56808. if (tail !== 0) {
  56809. stream.fill(0, tail);
  56810. }
  56811. return stream.buffer;
  56812. };
  56813. _proto40._encodePoint = function _encodePoint(value, last, points, flag, shortFlag, sameFlag) {
  56814. var diff = value - last;
  56815. if (value === last) {
  56816. flag |= sameFlag;
  56817. } else {
  56818. if (-255 <= diff && diff <= 255) {
  56819. flag |= shortFlag;
  56820. if (diff < 0) {
  56821. diff = -diff;
  56822. } else {
  56823. flag |= sameFlag;
  56824. }
  56825. }
  56826. points.push(diff);
  56827. }
  56828. return flag;
  56829. };
  56830. return TTFGlyphEncoder;
  56831. }();
  56832. var TTFSubset = /*#__PURE__*/function (_Subset) {
  56833. _inheritsLoose(TTFSubset, _Subset);
  56834. function TTFSubset(font) {
  56835. var _this12;
  56836. _this12 = _Subset.call(this, font) || this;
  56837. _this12.glyphEncoder = new TTFGlyphEncoder();
  56838. return _this12;
  56839. }
  56840. var _proto41 = TTFSubset.prototype;
  56841. _proto41._addGlyph = function _addGlyph(gid) {
  56842. var glyph = this.font.getGlyph(gid);
  56843. var glyf = glyph._decode(); // get the offset to the glyph from the loca table
  56844. var curOffset = this.font.loca.offsets[gid];
  56845. var nextOffset = this.font.loca.offsets[gid + 1];
  56846. var stream = this.font._getTableStream('glyf');
  56847. stream.pos += curOffset;
  56848. var buffer = stream.readBuffer(nextOffset - curOffset); // if it is a compound glyph, include its components
  56849. if (glyf && glyf.numberOfContours < 0) {
  56850. buffer = Buffer.from(buffer);
  56851. for (var _iterator72 = _createForOfIteratorHelperLoose(glyf.components), _step72; !(_step72 = _iterator72()).done;) {
  56852. var component = _step72.value;
  56853. gid = this.includeGlyph(component.glyphID);
  56854. buffer.writeUInt16BE(gid, component.pos);
  56855. }
  56856. } else if (glyf && this.font._variationProcessor) {
  56857. // If this is a TrueType variation glyph, re-encode the path
  56858. buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions);
  56859. }
  56860. this.glyf.push(buffer);
  56861. this.loca.offsets.push(this.offset);
  56862. this.hmtx.metrics.push({
  56863. advance: glyph.advanceWidth,
  56864. bearing: glyph._getMetrics().leftBearing
  56865. });
  56866. this.offset += buffer.length;
  56867. return this.glyf.length - 1;
  56868. };
  56869. _proto41.encode = function encode(stream) {
  56870. // tables required by PDF spec:
  56871. // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm
  56872. //
  56873. // additional tables required for standalone fonts:
  56874. // name, cmap, OS/2, post
  56875. this.glyf = [];
  56876. this.offset = 0;
  56877. this.loca = {
  56878. offsets: [],
  56879. version: this.font.loca.version
  56880. };
  56881. this.hmtx = {
  56882. metrics: [],
  56883. bearings: []
  56884. }; // include all the glyphs
  56885. // not using a for loop because we need to support adding more
  56886. // glyphs to the array as we go, and CoffeeScript caches the length.
  56887. var i = 0;
  56888. while (i < this.glyphs.length) {
  56889. this._addGlyph(this.glyphs[i++]);
  56890. }
  56891. var maxp = cloneDeep(this.font.maxp);
  56892. maxp.numGlyphs = this.glyf.length;
  56893. this.loca.offsets.push(this.offset);
  56894. var head = cloneDeep(this.font.head);
  56895. head.indexToLocFormat = this.loca.version;
  56896. var hhea = cloneDeep(this.font.hhea);
  56897. hhea.numberOfMetrics = this.hmtx.metrics.length; // map = []
  56898. // for index in [0...256]
  56899. // if index < @numGlyphs
  56900. // map[index] = index
  56901. // else
  56902. // map[index] = 0
  56903. //
  56904. // cmapTable =
  56905. // version: 0
  56906. // length: 262
  56907. // language: 0
  56908. // codeMap: map
  56909. //
  56910. // cmap =
  56911. // version: 0
  56912. // numSubtables: 1
  56913. // tables: [
  56914. // platformID: 1
  56915. // encodingID: 0
  56916. // table: cmapTable
  56917. // ]
  56918. // TODO: subset prep, cvt, fpgm?
  56919. Directory.encode(stream, {
  56920. tables: {
  56921. head: head,
  56922. hhea: hhea,
  56923. loca: this.loca,
  56924. maxp: maxp,
  56925. 'cvt ': this.font['cvt '],
  56926. prep: this.font.prep,
  56927. glyf: this.glyf,
  56928. hmtx: this.hmtx,
  56929. fpgm: this.font.fpgm // name: clone @font.name
  56930. // 'OS/2': clone @font['OS/2']
  56931. // post: clone @font.post
  56932. // cmap: cmap
  56933. }
  56934. });
  56935. };
  56936. return TTFSubset;
  56937. }(Subset);
  56938. var CFFSubset = /*#__PURE__*/function (_Subset2) {
  56939. _inheritsLoose(CFFSubset, _Subset2);
  56940. function CFFSubset(font) {
  56941. var _this13;
  56942. _this13 = _Subset2.call(this, font) || this;
  56943. _this13.cff = _this13.font['CFF '];
  56944. if (!_this13.cff) {
  56945. throw new Error('Not a CFF Font');
  56946. }
  56947. return _this13;
  56948. }
  56949. var _proto42 = CFFSubset.prototype;
  56950. _proto42.subsetCharstrings = function subsetCharstrings() {
  56951. this.charstrings = [];
  56952. var gsubrs = {};
  56953. for (var _iterator73 = _createForOfIteratorHelperLoose(this.glyphs), _step73; !(_step73 = _iterator73()).done;) {
  56954. var gid = _step73.value;
  56955. this.charstrings.push(this.cff.getCharString(gid));
  56956. var glyph = this.font.getGlyph(gid);
  56957. var path = glyph.path; // this causes the glyph to be parsed
  56958. for (var subr in glyph._usedGsubrs) {
  56959. gsubrs[subr] = true;
  56960. }
  56961. }
  56962. this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs);
  56963. };
  56964. _proto42.subsetSubrs = function subsetSubrs(subrs, used) {
  56965. var res = [];
  56966. for (var i = 0; i < subrs.length; i++) {
  56967. var subr = subrs[i];
  56968. if (used[i]) {
  56969. this.cff.stream.pos = subr.offset;
  56970. res.push(this.cff.stream.readBuffer(subr.length));
  56971. } else {
  56972. res.push(Buffer.from([11])); // return
  56973. }
  56974. }
  56975. return res;
  56976. };
  56977. _proto42.subsetFontdict = function subsetFontdict(topDict) {
  56978. topDict.FDArray = [];
  56979. topDict.FDSelect = {
  56980. version: 0,
  56981. fds: []
  56982. };
  56983. var used_fds = {};
  56984. var used_subrs = [];
  56985. var fd_select = {};
  56986. for (var _iterator74 = _createForOfIteratorHelperLoose(this.glyphs), _step74; !(_step74 = _iterator74()).done;) {
  56987. var gid = _step74.value;
  56988. var fd = this.cff.fdForGlyph(gid);
  56989. if (fd == null) {
  56990. continue;
  56991. }
  56992. if (!used_fds[fd]) {
  56993. topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd]));
  56994. used_subrs.push({});
  56995. fd_select[fd] = topDict.FDArray.length - 1;
  56996. }
  56997. used_fds[fd] = true;
  56998. topDict.FDSelect.fds.push(fd_select[fd]);
  56999. var glyph = this.font.getGlyph(gid);
  57000. var path = glyph.path; // this causes the glyph to be parsed
  57001. for (var subr in glyph._usedSubrs) {
  57002. used_subrs[fd_select[fd]][subr] = true;
  57003. }
  57004. }
  57005. for (var i = 0; i < topDict.FDArray.length; i++) {
  57006. var dict = topDict.FDArray[i];
  57007. delete dict.FontName;
  57008. if (dict.Private && dict.Private.Subrs) {
  57009. dict.Private = Object.assign({}, dict.Private);
  57010. dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]);
  57011. }
  57012. }
  57013. return;
  57014. };
  57015. _proto42.createCIDFontdict = function createCIDFontdict(topDict) {
  57016. var used_subrs = {};
  57017. for (var _iterator75 = _createForOfIteratorHelperLoose(this.glyphs), _step75; !(_step75 = _iterator75()).done;) {
  57018. var gid = _step75.value;
  57019. var glyph = this.font.getGlyph(gid);
  57020. var path = glyph.path; // this causes the glyph to be parsed
  57021. for (var subr in glyph._usedSubrs) {
  57022. used_subrs[subr] = true;
  57023. }
  57024. }
  57025. var privateDict = Object.assign({}, this.cff.topDict.Private);
  57026. if (this.cff.topDict.Private && this.cff.topDict.Private.Subrs) {
  57027. privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs);
  57028. }
  57029. topDict.FDArray = [{
  57030. Private: privateDict
  57031. }];
  57032. return topDict.FDSelect = {
  57033. version: 3,
  57034. nRanges: 1,
  57035. ranges: [{
  57036. first: 0,
  57037. fd: 0
  57038. }],
  57039. sentinel: this.charstrings.length
  57040. };
  57041. };
  57042. _proto42.addString = function addString(string) {
  57043. if (!string) {
  57044. return null;
  57045. }
  57046. if (!this.strings) {
  57047. this.strings = [];
  57048. }
  57049. this.strings.push(string);
  57050. return standardStrings.length + this.strings.length - 1;
  57051. };
  57052. _proto42.encode = function encode(stream) {
  57053. this.subsetCharstrings();
  57054. var charset = {
  57055. version: this.charstrings.length > 255 ? 2 : 1,
  57056. ranges: [{
  57057. first: 1,
  57058. nLeft: this.charstrings.length - 2
  57059. }]
  57060. };
  57061. var topDict = Object.assign({}, this.cff.topDict);
  57062. topDict.Private = null;
  57063. topDict.charset = charset;
  57064. topDict.Encoding = null;
  57065. topDict.CharStrings = this.charstrings;
  57066. for (var _i24 = 0, _arr2 = ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']; _i24 < _arr2.length; _i24++) {
  57067. var key = _arr2[_i24];
  57068. topDict[key] = this.addString(this.cff.string(topDict[key]));
  57069. }
  57070. topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0];
  57071. topDict.CIDCount = this.charstrings.length;
  57072. if (this.cff.isCIDFont) {
  57073. this.subsetFontdict(topDict);
  57074. } else {
  57075. this.createCIDFontdict(topDict);
  57076. }
  57077. var top = {
  57078. version: 1,
  57079. hdrSize: this.cff.hdrSize,
  57080. offSize: 4,
  57081. header: this.cff.header,
  57082. nameIndex: [this.cff.postscriptName],
  57083. topDictIndex: [topDict],
  57084. stringIndex: this.strings,
  57085. globalSubrIndex: this.gsubrs
  57086. };
  57087. CFFTop.encode(stream, top);
  57088. };
  57089. return CFFSubset;
  57090. }(Subset);
  57091. var _class$4;
  57092. /**
  57093. * This is the base class for all SFNT-based font formats in fontkit.
  57094. * It supports TrueType, and PostScript glyphs, and several color glyph formats.
  57095. */
  57096. var TTFFont = (_class$4 = /*#__PURE__*/function () {
  57097. TTFFont.probe = function probe(buffer) {
  57098. var format = buffer.toString('ascii', 0, 4);
  57099. return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);
  57100. };
  57101. function TTFFont(stream, variationCoords) {
  57102. if (variationCoords === void 0) {
  57103. variationCoords = null;
  57104. }
  57105. this.defaultLanguage = null;
  57106. this.stream = stream;
  57107. this.variationCoords = variationCoords;
  57108. this._directoryPos = this.stream.pos;
  57109. this._tables = {};
  57110. this._glyphs = {};
  57111. this._decodeDirectory(); // define properties for each table to lazily parse
  57112. for (var tag in this.directory.tables) {
  57113. var table = this.directory.tables[tag];
  57114. if (tables[tag] && table.length > 0) {
  57115. Object.defineProperty(this, tag, {
  57116. get: this._getTable.bind(this, table)
  57117. });
  57118. }
  57119. }
  57120. }
  57121. var _proto43 = TTFFont.prototype;
  57122. _proto43.setDefaultLanguage = function setDefaultLanguage(lang) {
  57123. if (lang === void 0) {
  57124. lang = null;
  57125. }
  57126. this.defaultLanguage = lang;
  57127. };
  57128. _proto43._getTable = function _getTable(table) {
  57129. if (!(table.tag in this._tables)) {
  57130. try {
  57131. this._tables[table.tag] = this._decodeTable(table);
  57132. } catch (e) {
  57133. if (fontkit.logErrors) {
  57134. console.error("Error decoding table ".concat(table.tag));
  57135. console.error(e.stack);
  57136. }
  57137. }
  57138. }
  57139. return this._tables[table.tag];
  57140. };
  57141. _proto43._getTableStream = function _getTableStream(tag) {
  57142. var table = this.directory.tables[tag];
  57143. if (table) {
  57144. this.stream.pos = table.offset;
  57145. return this.stream;
  57146. }
  57147. return null;
  57148. };
  57149. _proto43._decodeDirectory = function _decodeDirectory() {
  57150. return this.directory = Directory.decode(this.stream, {
  57151. _startOffset: 0
  57152. });
  57153. };
  57154. _proto43._decodeTable = function _decodeTable(table) {
  57155. var pos = this.stream.pos;
  57156. var stream = this._getTableStream(table.tag);
  57157. var result = tables[table.tag].decode(stream, this, table.length);
  57158. this.stream.pos = pos;
  57159. return result;
  57160. }
  57161. /**
  57162. * Gets a string from the font's `name` table
  57163. * `lang` is a BCP-47 language code.
  57164. * @return {string}
  57165. */
  57166. ;
  57167. _proto43.getName = function getName(key, lang) {
  57168. if (lang === void 0) {
  57169. lang = this.defaultLanguage || fontkit.defaultLanguage;
  57170. }
  57171. var record = this.name && this.name.records[key];
  57172. if (record) {
  57173. // Attempt to retrieve the entry, depending on which translation is available:
  57174. return record[lang] || record[this.defaultLanguage] || record[fontkit.defaultLanguage] || record['en'] || record[Object.keys(record)[0]] // Seriously, ANY language would be fine
  57175. || null;
  57176. }
  57177. return null;
  57178. }
  57179. /**
  57180. * The unique PostScript name for this font, e.g. "Helvetica-Bold"
  57181. * @type {string}
  57182. */
  57183. ;
  57184. /**
  57185. * Returns whether there is glyph in the font for the given unicode code point.
  57186. *
  57187. * @param {number} codePoint
  57188. * @return {boolean}
  57189. */
  57190. _proto43.hasGlyphForCodePoint = function hasGlyphForCodePoint(codePoint) {
  57191. return !!this._cmapProcessor.lookup(codePoint);
  57192. }
  57193. /**
  57194. * Maps a single unicode code point to a Glyph object.
  57195. * Does not perform any advanced substitutions (there is no context to do so).
  57196. *
  57197. * @param {number} codePoint
  57198. * @return {Glyph}
  57199. */
  57200. ;
  57201. _proto43.glyphForCodePoint = function glyphForCodePoint(codePoint) {
  57202. return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]);
  57203. }
  57204. /**
  57205. * Returns an array of Glyph objects for the given string.
  57206. * This is only a one-to-one mapping from characters to glyphs.
  57207. * For most uses, you should use font.layout (described below), which
  57208. * provides a much more advanced mapping supporting AAT and OpenType shaping.
  57209. *
  57210. * @param {string} string
  57211. * @return {Glyph[]}
  57212. */
  57213. ;
  57214. _proto43.glyphsForString = function glyphsForString(string) {
  57215. var glyphs = [];
  57216. var len = string.length;
  57217. var idx = 0;
  57218. var last = -1;
  57219. var state = -1;
  57220. while (idx <= len) {
  57221. var code = 0;
  57222. var nextState = 0;
  57223. if (idx < len) {
  57224. // Decode the next codepoint from UTF 16
  57225. code = string.charCodeAt(idx++);
  57226. if (0xd800 <= code && code <= 0xdbff && idx < len) {
  57227. var next = string.charCodeAt(idx);
  57228. if (0xdc00 <= next && next <= 0xdfff) {
  57229. idx++;
  57230. code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000;
  57231. }
  57232. } // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise.
  57233. nextState = 0xfe00 <= code && code <= 0xfe0f || 0xe0100 <= code && code <= 0xe01ef ? 1 : 0;
  57234. } else {
  57235. idx++;
  57236. }
  57237. if (state === 0 && nextState === 1) {
  57238. // Variation selector following normal codepoint.
  57239. glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code]));
  57240. } else if (state === 0 && nextState === 0) {
  57241. // Normal codepoint following normal codepoint.
  57242. glyphs.push(this.glyphForCodePoint(last));
  57243. }
  57244. last = code;
  57245. state = nextState;
  57246. }
  57247. return glyphs;
  57248. };
  57249. /**
  57250. * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string.
  57251. *
  57252. * @param {string} string
  57253. * @param {string[]} [userFeatures]
  57254. * @param {string} [script]
  57255. * @param {string} [language]
  57256. * @param {string} [direction]
  57257. * @return {GlyphRun}
  57258. */
  57259. _proto43.layout = function layout(string, userFeatures, script, language, direction) {
  57260. return this._layoutEngine.layout(string, userFeatures, script, language, direction);
  57261. }
  57262. /**
  57263. * Returns an array of strings that map to the given glyph id.
  57264. * @param {number} gid - glyph id
  57265. */
  57266. ;
  57267. _proto43.stringsForGlyph = function stringsForGlyph(gid) {
  57268. return this._layoutEngine.stringsForGlyph(gid);
  57269. }
  57270. /**
  57271. * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm)
  57272. * (or mapped AAT tags) supported by the font.
  57273. * The features parameter is an array of OpenType feature tags to be applied in addition to the default set.
  57274. * If this is an AAT font, the OpenType feature tags are mapped to AAT features.
  57275. *
  57276. * @type {string[]}
  57277. */
  57278. ;
  57279. _proto43.getAvailableFeatures = function getAvailableFeatures(script, language) {
  57280. return this._layoutEngine.getAvailableFeatures(script, language);
  57281. };
  57282. _proto43._getBaseGlyph = function _getBaseGlyph(glyph, characters) {
  57283. if (characters === void 0) {
  57284. characters = [];
  57285. }
  57286. if (!this._glyphs[glyph]) {
  57287. if (this.directory.tables.glyf) {
  57288. this._glyphs[glyph] = new TTFGlyph(glyph, characters, this);
  57289. } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) {
  57290. this._glyphs[glyph] = new CFFGlyph(glyph, characters, this);
  57291. }
  57292. }
  57293. return this._glyphs[glyph] || null;
  57294. }
  57295. /**
  57296. * Returns a glyph object for the given glyph id.
  57297. * You can pass the array of code points this glyph represents for
  57298. * your use later, and it will be stored in the glyph object.
  57299. *
  57300. * @param {number} glyph
  57301. * @param {number[]} characters
  57302. * @return {Glyph}
  57303. */
  57304. ;
  57305. _proto43.getGlyph = function getGlyph(glyph, characters) {
  57306. if (characters === void 0) {
  57307. characters = [];
  57308. }
  57309. if (!this._glyphs[glyph]) {
  57310. if (this.directory.tables.sbix) {
  57311. this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this);
  57312. } else if (this.directory.tables.COLR && this.directory.tables.CPAL) {
  57313. this._glyphs[glyph] = new COLRGlyph(glyph, characters, this);
  57314. } else {
  57315. this._getBaseGlyph(glyph, characters);
  57316. }
  57317. }
  57318. return this._glyphs[glyph] || null;
  57319. }
  57320. /**
  57321. * Returns a Subset for this font.
  57322. * @return {Subset}
  57323. */
  57324. ;
  57325. _proto43.createSubset = function createSubset() {
  57326. if (this.directory.tables['CFF ']) {
  57327. return new CFFSubset(this);
  57328. }
  57329. return new TTFSubset(this);
  57330. }
  57331. /**
  57332. * Returns an object describing the available variation axes
  57333. * that this font supports. Keys are setting tags, and values
  57334. * contain the axis name, range, and default value.
  57335. *
  57336. * @type {object}
  57337. */
  57338. ;
  57339. /**
  57340. * Returns a new font with the given variation settings applied.
  57341. * Settings can either be an instance name, or an object containing
  57342. * variation tags as specified by the `variationAxes` property.
  57343. *
  57344. * @param {object} settings
  57345. * @return {TTFFont}
  57346. */
  57347. _proto43.getVariation = function getVariation(settings) {
  57348. if (!(this.directory.tables.fvar && (this.directory.tables.gvar && this.directory.tables.glyf || this.directory.tables.CFF2))) {
  57349. throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.');
  57350. }
  57351. if (typeof settings === 'string') {
  57352. settings = this.namedVariations[settings];
  57353. }
  57354. if (typeof settings !== 'object') {
  57355. throw new Error('Variation settings must be either a variation name or settings object.');
  57356. } // normalize the coordinates
  57357. var coords = this.fvar.axis.map(function (axis, i) {
  57358. var axisTag = axis.axisTag.trim();
  57359. if (axisTag in settings) {
  57360. return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag]));
  57361. } else {
  57362. return axis.defaultValue;
  57363. }
  57364. });
  57365. var stream = new r.DecodeStream(this.stream.buffer);
  57366. stream.pos = this._directoryPos;
  57367. var font = new TTFFont(stream, coords);
  57368. font._tables = this._tables;
  57369. return font;
  57370. };
  57371. // Standardized format plugin API
  57372. _proto43.getFont = function getFont(name) {
  57373. return this.getVariation(name);
  57374. };
  57375. _createClass(TTFFont, [{
  57376. key: "postscriptName",
  57377. get: function get() {
  57378. return this.getName('postscriptName');
  57379. }
  57380. /**
  57381. * The font's full name, e.g. "Helvetica Bold"
  57382. * @type {string}
  57383. */
  57384. }, {
  57385. key: "fullName",
  57386. get: function get() {
  57387. return this.getName('fullName');
  57388. }
  57389. /**
  57390. * The font's family name, e.g. "Helvetica"
  57391. * @type {string}
  57392. */
  57393. }, {
  57394. key: "familyName",
  57395. get: function get() {
  57396. return this.getName('fontFamily');
  57397. }
  57398. /**
  57399. * The font's sub-family, e.g. "Bold".
  57400. * @type {string}
  57401. */
  57402. }, {
  57403. key: "subfamilyName",
  57404. get: function get() {
  57405. return this.getName('fontSubfamily');
  57406. }
  57407. /**
  57408. * The font's copyright information
  57409. * @type {string}
  57410. */
  57411. }, {
  57412. key: "copyright",
  57413. get: function get() {
  57414. return this.getName('copyright');
  57415. }
  57416. /**
  57417. * The font's version number
  57418. * @type {string}
  57419. */
  57420. }, {
  57421. key: "version",
  57422. get: function get() {
  57423. return this.getName('version');
  57424. }
  57425. /**
  57426. * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography))
  57427. * @type {number}
  57428. */
  57429. }, {
  57430. key: "ascent",
  57431. get: function get() {
  57432. return this.hhea.ascent;
  57433. }
  57434. /**
  57435. * The font’s [descender](https://en.wikipedia.org/wiki/Descender)
  57436. * @type {number}
  57437. */
  57438. }, {
  57439. key: "descent",
  57440. get: function get() {
  57441. return this.hhea.descent;
  57442. }
  57443. /**
  57444. * The amount of space that should be included between lines
  57445. * @type {number}
  57446. */
  57447. }, {
  57448. key: "lineGap",
  57449. get: function get() {
  57450. return this.hhea.lineGap;
  57451. }
  57452. /**
  57453. * The offset from the normal underline position that should be used
  57454. * @type {number}
  57455. */
  57456. }, {
  57457. key: "underlinePosition",
  57458. get: function get() {
  57459. return this.post.underlinePosition;
  57460. }
  57461. /**
  57462. * The weight of the underline that should be used
  57463. * @type {number}
  57464. */
  57465. }, {
  57466. key: "underlineThickness",
  57467. get: function get() {
  57468. return this.post.underlineThickness;
  57469. }
  57470. /**
  57471. * If this is an italic font, the angle the cursor should be drawn at to match the font design
  57472. * @type {number}
  57473. */
  57474. }, {
  57475. key: "italicAngle",
  57476. get: function get() {
  57477. return this.post.italicAngle;
  57478. }
  57479. /**
  57480. * The height of capital letters above the baseline.
  57481. * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details.
  57482. * @type {number}
  57483. */
  57484. }, {
  57485. key: "capHeight",
  57486. get: function get() {
  57487. var os2 = this['OS/2'];
  57488. return os2 ? os2.capHeight : this.ascent;
  57489. }
  57490. /**
  57491. * The height of lower case letters in the font.
  57492. * See [here](https://en.wikipedia.org/wiki/X-height) for more details.
  57493. * @type {number}
  57494. */
  57495. }, {
  57496. key: "xHeight",
  57497. get: function get() {
  57498. var os2 = this['OS/2'];
  57499. return os2 ? os2.xHeight : 0;
  57500. }
  57501. /**
  57502. * The number of glyphs in the font.
  57503. * @type {number}
  57504. */
  57505. }, {
  57506. key: "numGlyphs",
  57507. get: function get() {
  57508. return this.maxp.numGlyphs;
  57509. }
  57510. /**
  57511. * The size of the font’s internal coordinate grid
  57512. * @type {number}
  57513. */
  57514. }, {
  57515. key: "unitsPerEm",
  57516. get: function get() {
  57517. return this.head.unitsPerEm;
  57518. }
  57519. /**
  57520. * The font’s bounding box, i.e. the box that encloses all glyphs in the font.
  57521. * @type {BBox}
  57522. */
  57523. }, {
  57524. key: "bbox",
  57525. get: function get() {
  57526. return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax));
  57527. }
  57528. }, {
  57529. key: "_cmapProcessor",
  57530. get: function get() {
  57531. return new CmapProcessor(this.cmap);
  57532. }
  57533. /**
  57534. * An array of all of the unicode code points supported by the font.
  57535. * @type {number[]}
  57536. */
  57537. }, {
  57538. key: "characterSet",
  57539. get: function get() {
  57540. return this._cmapProcessor.getCharacterSet();
  57541. }
  57542. }, {
  57543. key: "_layoutEngine",
  57544. get: function get() {
  57545. return new LayoutEngine(this);
  57546. }
  57547. }, {
  57548. key: "availableFeatures",
  57549. get: function get() {
  57550. return this._layoutEngine.getAvailableFeatures();
  57551. }
  57552. }, {
  57553. key: "variationAxes",
  57554. get: function get() {
  57555. var res = {};
  57556. if (!this.fvar) {
  57557. return res;
  57558. }
  57559. for (var _iterator76 = _createForOfIteratorHelperLoose(this.fvar.axis), _step76; !(_step76 = _iterator76()).done;) {
  57560. var axis = _step76.value;
  57561. res[axis.axisTag.trim()] = {
  57562. name: axis.name.en,
  57563. min: axis.minValue,
  57564. default: axis.defaultValue,
  57565. max: axis.maxValue
  57566. };
  57567. }
  57568. return res;
  57569. }
  57570. /**
  57571. * Returns an object describing the named variation instances
  57572. * that the font designer has specified. Keys are variation names
  57573. * and values are the variation settings for this instance.
  57574. *
  57575. * @type {object}
  57576. */
  57577. }, {
  57578. key: "namedVariations",
  57579. get: function get() {
  57580. var res = {};
  57581. if (!this.fvar) {
  57582. return res;
  57583. }
  57584. for (var _iterator77 = _createForOfIteratorHelperLoose(this.fvar.instance), _step77; !(_step77 = _iterator77()).done;) {
  57585. var instance = _step77.value;
  57586. var settings = {};
  57587. for (var i = 0; i < this.fvar.axis.length; i++) {
  57588. var axis = this.fvar.axis[i];
  57589. settings[axis.axisTag.trim()] = instance.coord[i];
  57590. }
  57591. res[instance.name.en] = settings;
  57592. }
  57593. return res;
  57594. }
  57595. }, {
  57596. key: "_variationProcessor",
  57597. get: function get() {
  57598. if (!this.fvar) {
  57599. return null;
  57600. }
  57601. var variationCoords = this.variationCoords; // Ignore if no variation coords and not CFF2
  57602. if (!variationCoords && !this.CFF2) {
  57603. return null;
  57604. }
  57605. if (!variationCoords) {
  57606. variationCoords = this.fvar.axis.map(function (axis) {
  57607. return axis.defaultValue;
  57608. });
  57609. }
  57610. return new GlyphVariationProcessor(this, variationCoords);
  57611. }
  57612. }]);
  57613. return TTFFont;
  57614. }(), (_applyDecoratedDescriptor(_class$4.prototype, "bbox", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "bbox"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "_cmapProcessor", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "_cmapProcessor"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "characterSet", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "characterSet"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "_layoutEngine", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "_layoutEngine"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "variationAxes", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "variationAxes"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "namedVariations", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "namedVariations"), _class$4.prototype), _applyDecoratedDescriptor(_class$4.prototype, "_variationProcessor", [cache], Object.getOwnPropertyDescriptor(_class$4.prototype, "_variationProcessor"), _class$4.prototype)), _class$4);
  57615. var WOFFDirectoryEntry = new r.Struct({
  57616. tag: new r.String(4),
  57617. offset: new r.Pointer(r.uint32, 'void', {
  57618. type: 'global'
  57619. }),
  57620. compLength: r.uint32,
  57621. length: r.uint32,
  57622. origChecksum: r.uint32
  57623. });
  57624. var WOFFDirectory = new r.Struct({
  57625. tag: new r.String(4),
  57626. // should be 'wOFF'
  57627. flavor: r.uint32,
  57628. length: r.uint32,
  57629. numTables: r.uint16,
  57630. reserved: new r.Reserved(r.uint16),
  57631. totalSfntSize: r.uint32,
  57632. majorVersion: r.uint16,
  57633. minorVersion: r.uint16,
  57634. metaOffset: r.uint32,
  57635. metaLength: r.uint32,
  57636. metaOrigLength: r.uint32,
  57637. privOffset: r.uint32,
  57638. privLength: r.uint32,
  57639. tables: new r.Array(WOFFDirectoryEntry, 'numTables')
  57640. });
  57641. WOFFDirectory.process = function () {
  57642. var tables = {};
  57643. for (var _iterator78 = _createForOfIteratorHelperLoose(this.tables), _step78; !(_step78 = _iterator78()).done;) {
  57644. var table = _step78.value;
  57645. tables[table.tag] = table;
  57646. }
  57647. this.tables = tables;
  57648. };
  57649. var WOFFFont = /*#__PURE__*/function (_TTFFont) {
  57650. _inheritsLoose(WOFFFont, _TTFFont);
  57651. function WOFFFont() {
  57652. return _TTFFont.apply(this, arguments) || this;
  57653. }
  57654. WOFFFont.probe = function probe(buffer) {
  57655. return buffer.toString('ascii', 0, 4) === 'wOFF';
  57656. };
  57657. var _proto44 = WOFFFont.prototype;
  57658. _proto44._decodeDirectory = function _decodeDirectory() {
  57659. this.directory = WOFFDirectory.decode(this.stream, {
  57660. _startOffset: 0
  57661. });
  57662. };
  57663. _proto44._getTableStream = function _getTableStream(tag) {
  57664. var table = this.directory.tables[tag];
  57665. if (table) {
  57666. this.stream.pos = table.offset;
  57667. if (table.compLength < table.length) {
  57668. this.stream.pos += 2; // skip deflate header
  57669. var outBuffer = Buffer.alloc(table.length);
  57670. var buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer);
  57671. return new r.DecodeStream(buf);
  57672. } else {
  57673. return this.stream;
  57674. }
  57675. }
  57676. return null;
  57677. };
  57678. return WOFFFont;
  57679. }(TTFFont);
  57680. /**
  57681. * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently.
  57682. */
  57683. var WOFF2Glyph = /*#__PURE__*/function (_TTFGlyph2) {
  57684. _inheritsLoose(WOFF2Glyph, _TTFGlyph2);
  57685. function WOFF2Glyph() {
  57686. return _TTFGlyph2.apply(this, arguments) || this;
  57687. }
  57688. var _proto45 = WOFF2Glyph.prototype;
  57689. _proto45._decode = function _decode() {
  57690. // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.
  57691. return this._font._transformedGlyphs[this.id];
  57692. };
  57693. _proto45._getCBox = function _getCBox() {
  57694. return this.path.bbox;
  57695. };
  57696. return WOFF2Glyph;
  57697. }(TTFGlyph);
  57698. var Base128 = {
  57699. decode: function decode(stream) {
  57700. var result = 0;
  57701. var iterable = [0, 1, 2, 3, 4];
  57702. for (var j = 0; j < iterable.length; j++) {
  57703. var code = stream.readUInt8(); // If any of the top seven bits are set then we're about to overflow.
  57704. if (result & 0xe0000000) {
  57705. throw new Error('Overflow');
  57706. }
  57707. result = result << 7 | code & 0x7f;
  57708. if ((code & 0x80) === 0) {
  57709. return result;
  57710. }
  57711. }
  57712. throw new Error('Bad base 128 number');
  57713. }
  57714. };
  57715. var knownTags = ['cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ', 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp', 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF', 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL', 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc', 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx', 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill'];
  57716. var WOFF2DirectoryEntry = new r.Struct({
  57717. flags: r.uint8,
  57718. customTag: new r.Optional(new r.String(4), function (t) {
  57719. return (t.flags & 0x3f) === 0x3f;
  57720. }),
  57721. tag: function tag(t) {
  57722. return t.customTag || knownTags[t.flags & 0x3f];
  57723. },
  57724. // || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); },
  57725. length: Base128,
  57726. transformVersion: function transformVersion(t) {
  57727. return t.flags >>> 6 & 0x03;
  57728. },
  57729. transformed: function transformed(t) {
  57730. return t.tag === 'glyf' || t.tag === 'loca' ? t.transformVersion === 0 : t.transformVersion !== 0;
  57731. },
  57732. transformLength: new r.Optional(Base128, function (t) {
  57733. return t.transformed;
  57734. })
  57735. });
  57736. var WOFF2Directory = new r.Struct({
  57737. tag: new r.String(4),
  57738. // should be 'wOF2'
  57739. flavor: r.uint32,
  57740. length: r.uint32,
  57741. numTables: r.uint16,
  57742. reserved: new r.Reserved(r.uint16),
  57743. totalSfntSize: r.uint32,
  57744. totalCompressedSize: r.uint32,
  57745. majorVersion: r.uint16,
  57746. minorVersion: r.uint16,
  57747. metaOffset: r.uint32,
  57748. metaLength: r.uint32,
  57749. metaOrigLength: r.uint32,
  57750. privOffset: r.uint32,
  57751. privLength: r.uint32,
  57752. tables: new r.Array(WOFF2DirectoryEntry, 'numTables')
  57753. });
  57754. WOFF2Directory.process = function () {
  57755. var tables = {};
  57756. for (var i = 0; i < this.tables.length; i++) {
  57757. var table = this.tables[i];
  57758. tables[table.tag] = table;
  57759. }
  57760. return this.tables = tables;
  57761. };
  57762. /**
  57763. * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2
  57764. * See spec here: http://www.w3.org/TR/WOFF2/
  57765. */
  57766. var WOFF2Font = /*#__PURE__*/function (_TTFFont2) {
  57767. _inheritsLoose(WOFF2Font, _TTFFont2);
  57768. function WOFF2Font() {
  57769. return _TTFFont2.apply(this, arguments) || this;
  57770. }
  57771. WOFF2Font.probe = function probe(buffer) {
  57772. return buffer.toString('ascii', 0, 4) === 'wOF2';
  57773. };
  57774. var _proto46 = WOFF2Font.prototype;
  57775. _proto46._decodeDirectory = function _decodeDirectory() {
  57776. this.directory = WOFF2Directory.decode(this.stream);
  57777. this._dataPos = this.stream.pos;
  57778. };
  57779. _proto46._decompress = function _decompress() {
  57780. // decompress data and setup table offsets if we haven't already
  57781. if (!this._decompressed) {
  57782. this.stream.pos = this._dataPos;
  57783. var buffer = this.stream.readBuffer(this.directory.totalCompressedSize);
  57784. var decompressedSize = 0;
  57785. for (var tag in this.directory.tables) {
  57786. var entry = this.directory.tables[tag];
  57787. entry.offset = decompressedSize;
  57788. decompressedSize += entry.transformLength != null ? entry.transformLength : entry.length;
  57789. }
  57790. var decompressed = brotli(buffer, decompressedSize);
  57791. if (!decompressed) {
  57792. throw new Error('Error decoding compressed data in WOFF2');
  57793. }
  57794. this.stream = new r.DecodeStream(Buffer.from(decompressed));
  57795. this._decompressed = true;
  57796. }
  57797. };
  57798. _proto46._decodeTable = function _decodeTable(table) {
  57799. this._decompress();
  57800. return _TTFFont2.prototype._decodeTable.call(this, table);
  57801. } // Override this method to get a glyph and return our
  57802. // custom subclass if there is a glyf table.
  57803. ;
  57804. _proto46._getBaseGlyph = function _getBaseGlyph(glyph, characters) {
  57805. if (characters === void 0) {
  57806. characters = [];
  57807. }
  57808. if (!this._glyphs[glyph]) {
  57809. if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) {
  57810. if (!this._transformedGlyphs) {
  57811. this._transformGlyfTable();
  57812. }
  57813. return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this);
  57814. } else {
  57815. return _TTFFont2.prototype._getBaseGlyph.call(this, glyph, characters);
  57816. }
  57817. }
  57818. };
  57819. _proto46._transformGlyfTable = function _transformGlyfTable() {
  57820. this._decompress();
  57821. this.stream.pos = this.directory.tables.glyf.offset;
  57822. var table = GlyfTable.decode(this.stream);
  57823. var glyphs = [];
  57824. for (var index = 0; index < table.numGlyphs; index++) {
  57825. var glyph = {};
  57826. var nContours = table.nContours.readInt16BE();
  57827. glyph.numberOfContours = nContours;
  57828. if (nContours > 0) {
  57829. // simple glyph
  57830. var nPoints = [];
  57831. var totalPoints = 0;
  57832. for (var i = 0; i < nContours; i++) {
  57833. var _r = read255UInt16(table.nPoints);
  57834. totalPoints += _r;
  57835. nPoints.push(totalPoints);
  57836. }
  57837. glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints);
  57838. for (var _i = 0; _i < nContours; _i++) {
  57839. glyph.points[nPoints[_i] - 1].endContour = true;
  57840. }
  57841. var instructionSize = read255UInt16(table.glyphs);
  57842. } else if (nContours < 0) {
  57843. // composite glyph
  57844. var haveInstructions = TTFGlyph.prototype._decodeComposite.call({
  57845. _font: this
  57846. }, glyph, table.composites);
  57847. if (haveInstructions) {
  57848. var instructionSize = read255UInt16(table.glyphs);
  57849. }
  57850. }
  57851. glyphs.push(glyph);
  57852. }
  57853. this._transformedGlyphs = glyphs;
  57854. };
  57855. return WOFF2Font;
  57856. }(TTFFont); // Special class that accepts a length and returns a sub-stream for that data
  57857. var Substream = /*#__PURE__*/function () {
  57858. function Substream(length) {
  57859. this.length = length;
  57860. this._buf = new r.Buffer(length);
  57861. }
  57862. var _proto47 = Substream.prototype;
  57863. _proto47.decode = function decode(stream, parent) {
  57864. return new r.DecodeStream(this._buf.decode(stream, parent));
  57865. };
  57866. return Substream;
  57867. }(); // This struct represents the entire glyf table
  57868. var GlyfTable = new r.Struct({
  57869. version: r.uint32,
  57870. numGlyphs: r.uint16,
  57871. indexFormat: r.uint16,
  57872. nContourStreamSize: r.uint32,
  57873. nPointsStreamSize: r.uint32,
  57874. flagStreamSize: r.uint32,
  57875. glyphStreamSize: r.uint32,
  57876. compositeStreamSize: r.uint32,
  57877. bboxStreamSize: r.uint32,
  57878. instructionStreamSize: r.uint32,
  57879. nContours: new Substream('nContourStreamSize'),
  57880. nPoints: new Substream('nPointsStreamSize'),
  57881. flags: new Substream('flagStreamSize'),
  57882. glyphs: new Substream('glyphStreamSize'),
  57883. composites: new Substream('compositeStreamSize'),
  57884. bboxes: new Substream('bboxStreamSize'),
  57885. instructions: new Substream('instructionStreamSize')
  57886. });
  57887. var WORD_CODE = 253;
  57888. var ONE_MORE_BYTE_CODE2 = 254;
  57889. var ONE_MORE_BYTE_CODE1 = 255;
  57890. var LOWEST_U_CODE = 253;
  57891. function read255UInt16(stream) {
  57892. var code = stream.readUInt8();
  57893. if (code === WORD_CODE) {
  57894. return stream.readUInt16BE();
  57895. }
  57896. if (code === ONE_MORE_BYTE_CODE1) {
  57897. return stream.readUInt8() + LOWEST_U_CODE;
  57898. }
  57899. if (code === ONE_MORE_BYTE_CODE2) {
  57900. return stream.readUInt8() + LOWEST_U_CODE * 2;
  57901. }
  57902. return code;
  57903. }
  57904. function withSign(flag, baseval) {
  57905. return flag & 1 ? baseval : -baseval;
  57906. }
  57907. function decodeTriplet(flags, glyphs, nPoints) {
  57908. var y;
  57909. var x = y = 0;
  57910. var res = [];
  57911. for (var i = 0; i < nPoints; i++) {
  57912. var dx = 0,
  57913. dy = 0;
  57914. var flag = flags.readUInt8();
  57915. var onCurve = !(flag >> 7);
  57916. flag &= 0x7f;
  57917. if (flag < 10) {
  57918. dx = 0;
  57919. dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8());
  57920. } else if (flag < 20) {
  57921. dx = withSign(flag, ((flag - 10 & 14) << 7) + glyphs.readUInt8());
  57922. dy = 0;
  57923. } else if (flag < 84) {
  57924. var b0 = flag - 20;
  57925. var b1 = glyphs.readUInt8();
  57926. dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4));
  57927. dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f));
  57928. } else if (flag < 120) {
  57929. var b0 = flag - 84;
  57930. dx = withSign(flag, 1 + (b0 / 12 << 8) + glyphs.readUInt8());
  57931. dy = withSign(flag >> 1, 1 + (b0 % 12 >> 2 << 8) + glyphs.readUInt8());
  57932. } else if (flag < 124) {
  57933. var b1 = glyphs.readUInt8();
  57934. var b2 = glyphs.readUInt8();
  57935. dx = withSign(flag, (b1 << 4) + (b2 >> 4));
  57936. dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8());
  57937. } else {
  57938. dx = withSign(flag, glyphs.readUInt16BE());
  57939. dy = withSign(flag >> 1, glyphs.readUInt16BE());
  57940. }
  57941. x += dx;
  57942. y += dy;
  57943. res.push(new Point(onCurve, false, x, y));
  57944. }
  57945. return res;
  57946. }
  57947. var TTCHeader = new r.VersionedStruct(r.uint32, {
  57948. 0x00010000: {
  57949. numFonts: r.uint32,
  57950. offsets: new r.Array(r.uint32, 'numFonts')
  57951. },
  57952. 0x00020000: {
  57953. numFonts: r.uint32,
  57954. offsets: new r.Array(r.uint32, 'numFonts'),
  57955. dsigTag: r.uint32,
  57956. dsigLength: r.uint32,
  57957. dsigOffset: r.uint32
  57958. }
  57959. });
  57960. var TrueTypeCollection = /*#__PURE__*/function () {
  57961. TrueTypeCollection.probe = function probe(buffer) {
  57962. return buffer.toString('ascii', 0, 4) === 'ttcf';
  57963. };
  57964. function TrueTypeCollection(stream) {
  57965. this.stream = stream;
  57966. if (stream.readString(4) !== 'ttcf') {
  57967. throw new Error('Not a TrueType collection');
  57968. }
  57969. this.header = TTCHeader.decode(stream);
  57970. }
  57971. var _proto48 = TrueTypeCollection.prototype;
  57972. _proto48.getFont = function getFont(name) {
  57973. for (var _iterator79 = _createForOfIteratorHelperLoose(this.header.offsets), _step79; !(_step79 = _iterator79()).done;) {
  57974. var offset = _step79.value;
  57975. var stream = new r.DecodeStream(this.stream.buffer);
  57976. stream.pos = offset;
  57977. var font = new TTFFont(stream);
  57978. if (font.postscriptName === name) {
  57979. return font;
  57980. }
  57981. }
  57982. return null;
  57983. };
  57984. _createClass(TrueTypeCollection, [{
  57985. key: "fonts",
  57986. get: function get() {
  57987. var fonts = [];
  57988. for (var _iterator80 = _createForOfIteratorHelperLoose(this.header.offsets), _step80; !(_step80 = _iterator80()).done;) {
  57989. var offset = _step80.value;
  57990. var stream = new r.DecodeStream(this.stream.buffer);
  57991. stream.pos = offset;
  57992. fonts.push(new TTFFont(stream));
  57993. }
  57994. return fonts;
  57995. }
  57996. }]);
  57997. return TrueTypeCollection;
  57998. }();
  57999. var DFontName = new r.String(r.uint8);
  58000. var DFontData = new r.Struct({
  58001. len: r.uint32,
  58002. buf: new r.Buffer('len')
  58003. });
  58004. var Ref = new r.Struct({
  58005. id: r.uint16,
  58006. nameOffset: r.int16,
  58007. attr: r.uint8,
  58008. dataOffset: r.uint24,
  58009. handle: r.uint32
  58010. });
  58011. var Type = new r.Struct({
  58012. name: new r.String(4),
  58013. maxTypeIndex: r.uint16,
  58014. refList: new r.Pointer(r.uint16, new r.Array(Ref, function (t) {
  58015. return t.maxTypeIndex + 1;
  58016. }), {
  58017. type: 'parent'
  58018. })
  58019. });
  58020. var TypeList = new r.Struct({
  58021. length: r.uint16,
  58022. types: new r.Array(Type, function (t) {
  58023. return t.length + 1;
  58024. })
  58025. });
  58026. var DFontMap = new r.Struct({
  58027. reserved: new r.Reserved(r.uint8, 24),
  58028. typeList: new r.Pointer(r.uint16, TypeList),
  58029. nameListOffset: new r.Pointer(r.uint16, 'void')
  58030. });
  58031. var DFontHeader = new r.Struct({
  58032. dataOffset: r.uint32,
  58033. map: new r.Pointer(r.uint32, DFontMap),
  58034. dataLength: r.uint32,
  58035. mapLength: r.uint32
  58036. });
  58037. var DFont = /*#__PURE__*/function () {
  58038. DFont.probe = function probe(buffer) {
  58039. var stream = new r.DecodeStream(buffer);
  58040. try {
  58041. var header = DFontHeader.decode(stream);
  58042. } catch (e) {
  58043. return false;
  58044. }
  58045. for (var _iterator81 = _createForOfIteratorHelperLoose(header.map.typeList.types), _step81; !(_step81 = _iterator81()).done;) {
  58046. var type = _step81.value;
  58047. if (type.name === 'sfnt') {
  58048. return true;
  58049. }
  58050. }
  58051. return false;
  58052. };
  58053. function DFont(stream) {
  58054. this.stream = stream;
  58055. this.header = DFontHeader.decode(this.stream);
  58056. for (var _iterator82 = _createForOfIteratorHelperLoose(this.header.map.typeList.types), _step82; !(_step82 = _iterator82()).done;) {
  58057. var type = _step82.value;
  58058. for (var _iterator83 = _createForOfIteratorHelperLoose(type.refList), _step83; !(_step83 = _iterator83()).done;) {
  58059. var ref = _step83.value;
  58060. if (ref.nameOffset >= 0) {
  58061. this.stream.pos = ref.nameOffset + this.header.map.nameListOffset;
  58062. ref.name = DFontName.decode(this.stream);
  58063. } else {
  58064. ref.name = null;
  58065. }
  58066. }
  58067. if (type.name === 'sfnt') {
  58068. this.sfnt = type;
  58069. }
  58070. }
  58071. }
  58072. var _proto49 = DFont.prototype;
  58073. _proto49.getFont = function getFont(name) {
  58074. if (!this.sfnt) {
  58075. return null;
  58076. }
  58077. for (var _iterator84 = _createForOfIteratorHelperLoose(this.sfnt.refList), _step84; !(_step84 = _iterator84()).done;) {
  58078. var ref = _step84.value;
  58079. var pos = this.header.dataOffset + ref.dataOffset + 4;
  58080. var stream = new r.DecodeStream(this.stream.buffer.slice(pos));
  58081. var font = new TTFFont(stream);
  58082. if (font.postscriptName === name) {
  58083. return font;
  58084. }
  58085. }
  58086. return null;
  58087. };
  58088. _createClass(DFont, [{
  58089. key: "fonts",
  58090. get: function get() {
  58091. var fonts = [];
  58092. for (var _iterator85 = _createForOfIteratorHelperLoose(this.sfnt.refList), _step85; !(_step85 = _iterator85()).done;) {
  58093. var ref = _step85.value;
  58094. var pos = this.header.dataOffset + ref.dataOffset + 4;
  58095. var stream = new r.DecodeStream(this.stream.buffer.slice(pos));
  58096. fonts.push(new TTFFont(stream));
  58097. }
  58098. return fonts;
  58099. }
  58100. }]);
  58101. return DFont;
  58102. }();
  58103. fontkit.registerFormat(TTFFont);
  58104. fontkit.registerFormat(WOFFFont);
  58105. fontkit.registerFormat(WOFF2Font);
  58106. fontkit.registerFormat(TrueTypeCollection);
  58107. fontkit.registerFormat(DFont);
  58108. module.exports = fontkit;
  58109. /***/ }),
  58110. /***/ 7337:
  58111. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  58112. "use strict";
  58113. var UnicodeTrie = __webpack_require__(4781);
  58114. var base64 = __webpack_require__(9742);
  58115. var _require = __webpack_require__(2055),
  58116. BK = _require.BK,
  58117. CR = _require.CR,
  58118. LF = _require.LF,
  58119. NL = _require.NL,
  58120. SG = _require.SG,
  58121. WJ = _require.WJ,
  58122. SP = _require.SP,
  58123. ZWJ = _require.ZWJ,
  58124. BA = _require.BA,
  58125. HY = _require.HY,
  58126. NS = _require.NS,
  58127. AI = _require.AI,
  58128. AL = _require.AL,
  58129. CJ = _require.CJ,
  58130. HL = _require.HL,
  58131. RI = _require.RI,
  58132. SA = _require.SA,
  58133. XX = _require.XX;
  58134. var _require2 = __webpack_require__(8383),
  58135. DI_BRK = _require2.DI_BRK,
  58136. IN_BRK = _require2.IN_BRK,
  58137. CI_BRK = _require2.CI_BRK,
  58138. CP_BRK = _require2.CP_BRK,
  58139. PR_BRK = _require2.PR_BRK,
  58140. pairTable = _require2.pairTable;
  58141. var data = base64.toByteArray("AAgOAAAAAACA3QAAAe0OEvHtnXuMXUUdx+d2d2/33r237V3YSoFC11r6IGgbRFBEfFF5KCVCMYKFaKn8AYqmwUeqECFabUGQipUiNCkgSRElUkKwJRWtwSpJrZpCI4E2NQqiBsFGwWL8Tu6Md3Z23o9zbund5JM5c+b1m9/85nnOuXtTHyFrwXpwL9gBngTPgj+Dv4H9Ae4B0N9PSAMcDqaB0X57urmIs8AQ72SEnQ4+ABaBxWAJWAquENJ9BtdfANeCleBGcCv4NvgeuBv8AGwCm8FWlpbzOPw7wC7wFNgDngMvgpfAq2DCACF10ACHgaPAzIF2+PFwT2Th1P8OuO8FZ4MPggvAxWAp+A6VHe5ysILFvx7u6oF2+Wvg3g7uYvlT+TbC/TH4CdgCtoGtfW3/E2An8++Gu5eleR7uP8B+8BoLf4LFH6i23Vp1rB5a1Q7TGMeCUYYY18RcxF0gxT8H5b3dIw8X3iPkdxauPwQWgyVgWbVT30/h+mrwZan8r8L/FcEWVsJ/E1grpKXcwdLdI9y/H9cPgUerbbun0PadCHcbjQd+D55mafcx9y9wXwKvCLJUJiLdRH09ef4xupqE/KeCY8Bx4M3gbeBdYCE4G3wYXASWgGXgSibTcuaugHs9WA3WgNvBBha2Ee4D4GFNPTYL9x/D9XaJXwnXvwW7wDPgTzQd2A9eAwODhDTBCJgOZoETwEngtEFmF3DPAouY/0K4Swb9dbaMpbkS7nKP9CsCyrpOSrNK8K9kNnYL7q0DGwbb/XnjoDv3gQfBZvBz8GvwO/AHdr3Pkv4F4fplj3J79OgRBx8HypajR48ePXr06NGjx8HFv7pABhX/HRx7HqKjr9Y+y6PXg7X2WRoPm1Kzpz8CcWaweLPhHt/fPq95C65PZnmfDnchOLfWPo/7OLgQ15ewdJ+E++na2PMhyudw72bDGc01CP8aWAm+Dr4BVoHV4IZeWC+sF9YL64UlD1sD1oE7au0z0zK5p1YuZde/R49uJnYdez/62EPgkVr4c7pHkfYXivTbcW8n2A32gOekOH+F/5/gAOivE9IArXpbrmlwR+vljz9bJrV552RCvgQ2GXgRzJ9CyGVTxofdLd17Gv6jW4RcAG5ote/9FO4B8NZhQs4DN4O9kOFY6OFSsB48C/qGCFkAyERCzh9q+0WuA2sqHX4m+Smv4t6RjXYelItwvQ7sBtOahHwU3NYcn+5Q4pFmRz89evTocajxStM898/FfLSgrg8/sT5+zcLDTkXY+6S0C+E/l907SXO+Rt/Lujrxe1kmztPU70JDvSmXILwJWS9TxLuC3VtuycPGCoV+VfD41yvKW6W4d1O9/S5YtZ+Qtbi+k/m/D/eHYBPzb4G7DfyS+enZ42/qnXPFp+pjZdgD/yX0XcV6+93DF+H+G5AhtcxPIs/BoY5cg0g7RRGXx/8Ewo8Y6vhp/Bnwz2F5zId7CgunZ6Dv1uTF0585pNY7P9NdhPCPDI1Ncyn8l4OrwHKwguVB12WrNPnpoPW5BWluA3eCuxRl3cfyfFCom43NBjkeQ9h2Tzlzs7PL5CmD3UwHew26+KMm7AVHu8hJaL1fTtj29L3E/wi6oPvWvkY7bAjucKOYtpymKWdGo/3e5KxGR8YTGvmfZ4XW46RGmnMIG6excs6Ae46nPuh7pGXbvm/fOB91vLhRXvkmlkKuK8BnFTb8xYL6TyqugbzXJZCZ9tlVrO9+C+53G5134A8G1htsjdbvXoT/KEBPmwq04dS2v6UxNnxbAXV5gul4Z6J+tMtBZtv4+Qzy2Ndof+fwPHP/zsbg/QFz02tIM4B9ZRO0mp379NxxBpgD5gv3T8H16eAMcCZYxMIWw/2YEG8pri9n/qvgfr45fm67VtjPzmbpVrJ7NzL3VrjvF/Jdh+sN3M/cB+A+LOV/bVNdX13b0G9KtmrSHCo8jvqfGjFu7WiWP37E8s2+yv8ZwVbYRgvMAm9kvMkhjStzAZbIBGIR+ngAy2NSZ9f0Hv2bIIShCckU5k5sb+OdGGQ0BKqSPzeE1WFCgWXK5dO2rDD/COn9zTvEUfXJ4zT3c9DP2oH2+ZoAtc9RBr/mY0SLdGyap+Nxh6W0In2Sn5C8/W00c/7dXn63we1DtAHud9WZbFNimmFL2iIoqt8eDPQHptERIkNoO8prFVvblm13OaG6oGM+n7P4/RrRz2HdTktotxHFdZW5tvm72UWEtm9dQF6n++hU1FmVFL++L2Nsdt3/1IVrWaacda4Se91t+pHDVXF5HFd9pG7X14NNyePr6wkfPTRI+H6qDPvLqRM5DR2beZ8W95Divq0IWXXyy/d18Yq09ZhyY/fyPjafY37yta8ybD9l3W15+crXYhQ5rsj2Wkb7iDadon1c+tKI4p5NR6HjPl/vqvLm92uK8lTjWNntkwJTu9hkiJmHVf3S1V5UOii6PWL1nVqOkP5QI/b2L2o+Kqr/h9i0bHNl9HudnKn0btKBbZzItQ7n47Drmutg6P+ubZK7/5va0PU8XZS56DP4Isci07gUo3/fscdlfMyp6xR6dy0vt/275K1bJ8qkHI99bdK3v4vt4Gtzs7sEWa5aZH4NDz3yfWG368bXLlQ6GZYQ7/UL1y3mryroZ+nkZwK28SD1vlt+7sNd+lcR3Ji1RKq1WcvhftFzousYxftH7Ngu2pZubcGfD8eMizp5Y/uha/m69NNK5siSOapkcq2lTOOGvE4y9aPclFl20eXTvwoZO374ymob90Jx3Zfk2h/I849q7VNE+WXsj+ZFlJ96Xcd1PyD4ue2J69/Q9V+u9uPrQC7/sHRftjE+n+eQP2Ztl5Kc+0TX/WND8vP2iF23xO7lfO3XtKfLhUm/PE6Ze78RD/3Fknr8i907yWsoUx+M3S+0SNjcHyu7qg6+aYvqF671TLXfTzU+2uaTnOOzbFc+7yHoZE59npIL175kay/ZxlKMH6a+NSJdl90XKXytpbMpTr/kP5zJfqxQDzneYWTstxh9pPPdYJ/CL8alTBag+fFvHFXtQMutWxBloOUMMHS6GWSyVYS4pvgmexXtVjc/TFWk9ZnnZLt3+caI10/8Xkb+hsYlfeh+QOyPNQN1S7hv2nqivEVSj/Ex+1lu73Ib1olbu4jpfN4ddbWbHN+/mcpWfUem+g7RhK4833SuepHbN0d5PjKF1kUll3xPFc5d+btTW9uqdCHXwaQ7kw252ENIW9vKTdEfTLox+VPYT6r8XXUWq7tYuXyZnEAG+ic+pwyVdRLDp8wcOp0kEZNXzLyqw3f+yEkjMI1sFznk8ulDKcoKlcFVlz75qPyu9+U8YuvnqnfXNDn6t6neNr3xfHj4JEU500ma8SSkjjodptBlTLurbI7rTxUnhcxF6d9W76KRbd6G3DdVNj2qia/qD3KY2O90elLJocpHJc90Q7kqVLqaLlGUjYj+Pg00jD8Xk+Wnf5UAN8c8HGrvXKYi+4irnsoo09ctU29Fll2UraSyaxnTOar8DFw+w60St+cRNlzfm9E9y9CNUTZM5/7iOTWR6imOgaKf/pn6hJw/f8dDdS6u0tNhDN1ZOlGUoauTrqyQNvCd21Mjy8N/T7AixBkQrm3tRKS0tngDwrWYzobuLFwXV3WfP5uR9TGTXdvc3BRVjq18l3rbwmaS8c9QByR4m3Sb/lPVX2V/M4naDkV79GFmJDad2NaLOdpBpxsbvs+/YubgVPO5bn3h+75BahnEOU/EVb+yTL7vQeTQp04GH/twfTYaCv9ehe8XXdZ0Ic+IY94Hcik/9h0Zk35c7MdWXo737HM/y6dllPENj9zeuvq7vMMYam88fZnfU7nOHznf6/AdP+W8ffXv2q6uelDlE1N/Wx+Prb/MG8ARBVJ0eb7rz5Tf6sl5l/G9nizDnJLJudZoaNqU/hbsCPH73dhu+03aWPiZhW9/yLHf8IGvT1OtzwZJ56yG/7YvX5sSdn+yof6x5av2ebxcV1dOZ9pDVgSXys/36uLzG1s5Nvj7pKo9axm2zsueylxeT1lWlQ4rkuuzx5f3+VXPPGIhgbLnKp/rtiJdcz2lOtMpAtMZV27E/kRttyaF83dFbf3NdYwXx6sZpH0uVkZ/VslmOrspa24V1+O56u3TdmXpQdaJy36wLPm4LZVR7jyp/CLOmULtzeWZoqstuLS9rhzTmqwIe3LVia0f2OSP3c/71Ec8V0itv6JtONbOXdb3Oc5YdcTaQVFzRWg7+z6HydnHy+qPoWO+j1yq8anofifWl7ri97chNiq/z6KyM37t8333sJR/SF/3bUvd+z+8nV3KNPWfIvt3mfNZijFAZT8xfXSekLfOtl3rHCuPzxrEdT7U9UvRjn3HKV5/XTuo2i3n+E3L5L+3yN+TkH+z07ZGDlkviuXLcX3aL7b+8m+duhCzJonp/yF9wabPItZhJmJ/N8pVfvn31Fok7PeiYsalFON4bPnyuOO7Ru2G+S52fqB5DAt55bJtXf2LtJdQParCVevHlqcufduvKJuQ5yxxvA/Zw6W0l5D3+nz7a4wdieXxd+FS2SjPN7Z9XXDRp62/dMv4GTM22uwx1/iTe7zTUSfjf1Mqld36EHv2xvPoprMnGfGvIiDHk+/x+EQTP7fMOjl928f0/855OTnaJ5XeQsevVHNojO5147ePXLH681mDqOBhqef/Ivp+7PMF1Vxs02kMITLK30zp/k+FbX1RdP/w1b2OMt9hiR1bKLHfZ+XWT+4+ahqzVM8iUug81r5tfTf3+JB6DPFpk1zllLUu9523cpPLdlR6zTVP+bShGFd1lh/Td33rVdT44WqTtjqktOtc87osc8x5hM9vyLrK49v+Pvmp7De0/vyvLJvk1C3+1OOyLyG/aSSud1L/TlLq/BoZ5M2xNj66IFRlT9fcT4GqDYosQ3df/G0zlR5U4UVzjAJZPpW8NlLI5lOejzwq+eS4rnWZbsjTx7ZUrq4sXdrQPmAa82Pb0HVuyZl3rrrZ7Nal/ULzdy0zBUXrMaQcU18v6ncmxd9eM/1fkdQ24Tvu+paZ2q5S6z13+anlTyVfrv4aWz/desfFfn3WEj727rNGKHJdlqsM1VompjzT+shXv7F75dj3J3K3qY7QM7DcZ2L/Aw==");
  58142. var classTrie = new UnicodeTrie(data);
  58143. var mapClass = function mapClass(c) {
  58144. switch (c) {
  58145. case AI:
  58146. return AL;
  58147. case SA:
  58148. case SG:
  58149. case XX:
  58150. return AL;
  58151. case CJ:
  58152. return NS;
  58153. default:
  58154. return c;
  58155. }
  58156. };
  58157. var mapFirst = function mapFirst(c) {
  58158. switch (c) {
  58159. case LF:
  58160. case NL:
  58161. return BK;
  58162. case SP:
  58163. return WJ;
  58164. default:
  58165. return c;
  58166. }
  58167. };
  58168. var Break = function Break(position, required) {
  58169. if (required === void 0) {
  58170. required = false;
  58171. }
  58172. this.position = position;
  58173. this.required = required;
  58174. };
  58175. var LineBreaker = /*#__PURE__*/function () {
  58176. function LineBreaker(string) {
  58177. this.string = string;
  58178. this.pos = 0;
  58179. this.lastPos = 0;
  58180. this.curClass = null;
  58181. this.nextClass = null;
  58182. this.LB8a = false;
  58183. this.LB21a = false;
  58184. this.LB30a = 0;
  58185. }
  58186. var _proto = LineBreaker.prototype;
  58187. _proto.nextCodePoint = function nextCodePoint() {
  58188. var code = this.string.charCodeAt(this.pos++);
  58189. var next = this.string.charCodeAt(this.pos); // If a surrogate pair
  58190. if (0xd800 <= code && code <= 0xdbff && 0xdc00 <= next && next <= 0xdfff) {
  58191. this.pos++;
  58192. return (code - 0xd800) * 0x400 + (next - 0xdc00) + 0x10000;
  58193. }
  58194. return code;
  58195. };
  58196. _proto.nextCharClass = function nextCharClass() {
  58197. return mapClass(classTrie.get(this.nextCodePoint()));
  58198. };
  58199. _proto.getSimpleBreak = function getSimpleBreak() {
  58200. // handle classes not handled by the pair table
  58201. switch (this.nextClass) {
  58202. case SP:
  58203. return false;
  58204. case BK:
  58205. case LF:
  58206. case NL:
  58207. this.curClass = BK;
  58208. return false;
  58209. case CR:
  58210. this.curClass = CR;
  58211. return false;
  58212. }
  58213. return null;
  58214. };
  58215. _proto.getPairTableBreak = function getPairTableBreak(lastClass) {
  58216. // if not handled already, use the pair table
  58217. var shouldBreak = false;
  58218. switch (pairTable[this.curClass][this.nextClass]) {
  58219. case DI_BRK:
  58220. // Direct break
  58221. shouldBreak = true;
  58222. break;
  58223. case IN_BRK:
  58224. // possible indirect break
  58225. shouldBreak = lastClass === SP;
  58226. break;
  58227. case CI_BRK:
  58228. shouldBreak = lastClass === SP;
  58229. if (!shouldBreak) {
  58230. shouldBreak = false;
  58231. return shouldBreak;
  58232. }
  58233. break;
  58234. case CP_BRK:
  58235. // prohibited for combining marks
  58236. if (lastClass !== SP) {
  58237. return shouldBreak;
  58238. }
  58239. break;
  58240. case PR_BRK:
  58241. break;
  58242. }
  58243. if (this.LB8a) {
  58244. shouldBreak = false;
  58245. } // Rule LB21a
  58246. if (this.LB21a && (this.curClass === HY || this.curClass === BA)) {
  58247. shouldBreak = false;
  58248. this.LB21a = false;
  58249. } else {
  58250. this.LB21a = this.curClass === HL;
  58251. } // Rule LB30a
  58252. if (this.curClass === RI) {
  58253. this.LB30a++;
  58254. if (this.LB30a == 2 && this.nextClass === RI) {
  58255. shouldBreak = true;
  58256. this.LB30a = 0;
  58257. }
  58258. } else {
  58259. this.LB30a = 0;
  58260. }
  58261. this.curClass = this.nextClass;
  58262. return shouldBreak;
  58263. };
  58264. _proto.nextBreak = function nextBreak() {
  58265. // get the first char if we're at the beginning of the string
  58266. if (this.curClass == null) {
  58267. var firstClass = this.nextCharClass();
  58268. this.curClass = mapFirst(firstClass);
  58269. this.nextClass = firstClass;
  58270. this.LB8a = firstClass === ZWJ;
  58271. this.LB30a = 0;
  58272. }
  58273. while (this.pos < this.string.length) {
  58274. this.lastPos = this.pos;
  58275. var lastClass = this.nextClass;
  58276. this.nextClass = this.nextCharClass(); // explicit newline
  58277. if (this.curClass === BK || this.curClass === CR && this.nextClass !== LF) {
  58278. this.curClass = mapFirst(mapClass(this.nextClass));
  58279. return new Break(this.lastPos, true);
  58280. }
  58281. var shouldBreak = this.getSimpleBreak();
  58282. if (shouldBreak === null) {
  58283. shouldBreak = this.getPairTableBreak(lastClass);
  58284. } // Rule LB8a
  58285. this.LB8a = this.nextClass === ZWJ;
  58286. if (shouldBreak) {
  58287. return new Break(this.lastPos);
  58288. }
  58289. }
  58290. if (this.lastPos < this.string.length) {
  58291. this.lastPos = this.string.length;
  58292. return new Break(this.string.length);
  58293. }
  58294. return null;
  58295. };
  58296. return LineBreaker;
  58297. }();
  58298. module.exports = LineBreaker;
  58299. /***/ }),
  58300. /***/ 4927:
  58301. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  58302. /**
  58303. * Module exports.
  58304. */
  58305. module.exports = deprecate;
  58306. /**
  58307. * Mark that a method should not be used.
  58308. * Returns a modified function which warns once by default.
  58309. *
  58310. * If `localStorage.noDeprecation = true` is set, then it is a no-op.
  58311. *
  58312. * If `localStorage.throwDeprecation = true` is set, then deprecated functions
  58313. * will throw an Error when invoked.
  58314. *
  58315. * If `localStorage.traceDeprecation = true` is set, then deprecated functions
  58316. * will invoke `console.trace()` instead of `console.error()`.
  58317. *
  58318. * @param {Function} fn - the function to deprecate
  58319. * @param {String} msg - the string to print to the console when `fn` is invoked
  58320. * @returns {Function} a new "deprecated" version of `fn`
  58321. * @api public
  58322. */
  58323. function deprecate (fn, msg) {
  58324. if (config('noDeprecation')) {
  58325. return fn;
  58326. }
  58327. var warned = false;
  58328. function deprecated() {
  58329. if (!warned) {
  58330. if (config('throwDeprecation')) {
  58331. throw new Error(msg);
  58332. } else if (config('traceDeprecation')) {
  58333. console.trace(msg);
  58334. } else {
  58335. console.warn(msg);
  58336. }
  58337. warned = true;
  58338. }
  58339. return fn.apply(this, arguments);
  58340. }
  58341. return deprecated;
  58342. }
  58343. /**
  58344. * Checks `localStorage` for boolean values for the given `name`.
  58345. *
  58346. * @param {String} name
  58347. * @returns {Boolean}
  58348. * @api private
  58349. */
  58350. function config (name) {
  58351. // accessing global.localStorage can trigger a DOMException in sandboxed iframes
  58352. try {
  58353. if (!__webpack_require__.g.localStorage) return false;
  58354. } catch (_) {
  58355. return false;
  58356. }
  58357. var val = __webpack_require__.g.localStorage[name];
  58358. if (null == val) return false;
  58359. return String(val).toLowerCase() === 'true';
  58360. }
  58361. /***/ }),
  58362. /***/ 384:
  58363. /***/ (function(module) {
  58364. module.exports = function isBuffer(arg) {
  58365. return arg && typeof arg === 'object'
  58366. && typeof arg.copy === 'function'
  58367. && typeof arg.fill === 'function'
  58368. && typeof arg.readUInt8 === 'function';
  58369. }
  58370. /***/ }),
  58371. /***/ 5955:
  58372. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  58373. "use strict";
  58374. // Currently in sync with Node.js lib/internal/util/types.js
  58375. // https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
  58376. var isArgumentsObject = __webpack_require__(2584);
  58377. var isGeneratorFunction = __webpack_require__(8662);
  58378. var whichTypedArray = __webpack_require__(6430);
  58379. var isTypedArray = __webpack_require__(5692);
  58380. function uncurryThis(f) {
  58381. return f.call.bind(f);
  58382. }
  58383. var BigIntSupported = typeof BigInt !== 'undefined';
  58384. var SymbolSupported = typeof Symbol !== 'undefined';
  58385. var ObjectToString = uncurryThis(Object.prototype.toString);
  58386. var numberValue = uncurryThis(Number.prototype.valueOf);
  58387. var stringValue = uncurryThis(String.prototype.valueOf);
  58388. var booleanValue = uncurryThis(Boolean.prototype.valueOf);
  58389. if (BigIntSupported) {
  58390. var bigIntValue = uncurryThis(BigInt.prototype.valueOf);
  58391. }
  58392. if (SymbolSupported) {
  58393. var symbolValue = uncurryThis(Symbol.prototype.valueOf);
  58394. }
  58395. function checkBoxedPrimitive(value, prototypeValueOf) {
  58396. if (typeof value !== 'object') {
  58397. return false;
  58398. }
  58399. try {
  58400. prototypeValueOf(value);
  58401. return true;
  58402. } catch(e) {
  58403. return false;
  58404. }
  58405. }
  58406. exports.isArgumentsObject = isArgumentsObject;
  58407. exports.isGeneratorFunction = isGeneratorFunction;
  58408. exports.isTypedArray = isTypedArray;
  58409. // Taken from here and modified for better browser support
  58410. // https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js
  58411. function isPromise(input) {
  58412. return (
  58413. (
  58414. typeof Promise !== 'undefined' &&
  58415. input instanceof Promise
  58416. ) ||
  58417. (
  58418. input !== null &&
  58419. typeof input === 'object' &&
  58420. typeof input.then === 'function' &&
  58421. typeof input.catch === 'function'
  58422. )
  58423. );
  58424. }
  58425. exports.isPromise = isPromise;
  58426. function isArrayBufferView(value) {
  58427. if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
  58428. return ArrayBuffer.isView(value);
  58429. }
  58430. return (
  58431. isTypedArray(value) ||
  58432. isDataView(value)
  58433. );
  58434. }
  58435. exports.isArrayBufferView = isArrayBufferView;
  58436. function isUint8Array(value) {
  58437. return whichTypedArray(value) === 'Uint8Array';
  58438. }
  58439. exports.isUint8Array = isUint8Array;
  58440. function isUint8ClampedArray(value) {
  58441. return whichTypedArray(value) === 'Uint8ClampedArray';
  58442. }
  58443. exports.isUint8ClampedArray = isUint8ClampedArray;
  58444. function isUint16Array(value) {
  58445. return whichTypedArray(value) === 'Uint16Array';
  58446. }
  58447. exports.isUint16Array = isUint16Array;
  58448. function isUint32Array(value) {
  58449. return whichTypedArray(value) === 'Uint32Array';
  58450. }
  58451. exports.isUint32Array = isUint32Array;
  58452. function isInt8Array(value) {
  58453. return whichTypedArray(value) === 'Int8Array';
  58454. }
  58455. exports.isInt8Array = isInt8Array;
  58456. function isInt16Array(value) {
  58457. return whichTypedArray(value) === 'Int16Array';
  58458. }
  58459. exports.isInt16Array = isInt16Array;
  58460. function isInt32Array(value) {
  58461. return whichTypedArray(value) === 'Int32Array';
  58462. }
  58463. exports.isInt32Array = isInt32Array;
  58464. function isFloat32Array(value) {
  58465. return whichTypedArray(value) === 'Float32Array';
  58466. }
  58467. exports.isFloat32Array = isFloat32Array;
  58468. function isFloat64Array(value) {
  58469. return whichTypedArray(value) === 'Float64Array';
  58470. }
  58471. exports.isFloat64Array = isFloat64Array;
  58472. function isBigInt64Array(value) {
  58473. return whichTypedArray(value) === 'BigInt64Array';
  58474. }
  58475. exports.isBigInt64Array = isBigInt64Array;
  58476. function isBigUint64Array(value) {
  58477. return whichTypedArray(value) === 'BigUint64Array';
  58478. }
  58479. exports.isBigUint64Array = isBigUint64Array;
  58480. function isMapToString(value) {
  58481. return ObjectToString(value) === '[object Map]';
  58482. }
  58483. isMapToString.working = (
  58484. typeof Map !== 'undefined' &&
  58485. isMapToString(new Map())
  58486. );
  58487. function isMap(value) {
  58488. if (typeof Map === 'undefined') {
  58489. return false;
  58490. }
  58491. return isMapToString.working
  58492. ? isMapToString(value)
  58493. : value instanceof Map;
  58494. }
  58495. exports.isMap = isMap;
  58496. function isSetToString(value) {
  58497. return ObjectToString(value) === '[object Set]';
  58498. }
  58499. isSetToString.working = (
  58500. typeof Set !== 'undefined' &&
  58501. isSetToString(new Set())
  58502. );
  58503. function isSet(value) {
  58504. if (typeof Set === 'undefined') {
  58505. return false;
  58506. }
  58507. return isSetToString.working
  58508. ? isSetToString(value)
  58509. : value instanceof Set;
  58510. }
  58511. exports.isSet = isSet;
  58512. function isWeakMapToString(value) {
  58513. return ObjectToString(value) === '[object WeakMap]';
  58514. }
  58515. isWeakMapToString.working = (
  58516. typeof WeakMap !== 'undefined' &&
  58517. isWeakMapToString(new WeakMap())
  58518. );
  58519. function isWeakMap(value) {
  58520. if (typeof WeakMap === 'undefined') {
  58521. return false;
  58522. }
  58523. return isWeakMapToString.working
  58524. ? isWeakMapToString(value)
  58525. : value instanceof WeakMap;
  58526. }
  58527. exports.isWeakMap = isWeakMap;
  58528. function isWeakSetToString(value) {
  58529. return ObjectToString(value) === '[object WeakSet]';
  58530. }
  58531. isWeakSetToString.working = (
  58532. typeof WeakSet !== 'undefined' &&
  58533. isWeakSetToString(new WeakSet())
  58534. );
  58535. function isWeakSet(value) {
  58536. return isWeakSetToString(value);
  58537. }
  58538. exports.isWeakSet = isWeakSet;
  58539. function isArrayBufferToString(value) {
  58540. return ObjectToString(value) === '[object ArrayBuffer]';
  58541. }
  58542. isArrayBufferToString.working = (
  58543. typeof ArrayBuffer !== 'undefined' &&
  58544. isArrayBufferToString(new ArrayBuffer())
  58545. );
  58546. function isArrayBuffer(value) {
  58547. if (typeof ArrayBuffer === 'undefined') {
  58548. return false;
  58549. }
  58550. return isArrayBufferToString.working
  58551. ? isArrayBufferToString(value)
  58552. : value instanceof ArrayBuffer;
  58553. }
  58554. exports.isArrayBuffer = isArrayBuffer;
  58555. function isDataViewToString(value) {
  58556. return ObjectToString(value) === '[object DataView]';
  58557. }
  58558. isDataViewToString.working = (
  58559. typeof ArrayBuffer !== 'undefined' &&
  58560. typeof DataView !== 'undefined' &&
  58561. isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))
  58562. );
  58563. function isDataView(value) {
  58564. if (typeof DataView === 'undefined') {
  58565. return false;
  58566. }
  58567. return isDataViewToString.working
  58568. ? isDataViewToString(value)
  58569. : value instanceof DataView;
  58570. }
  58571. exports.isDataView = isDataView;
  58572. // Store a copy of SharedArrayBuffer in case it's deleted elsewhere
  58573. var SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;
  58574. function isSharedArrayBufferToString(value) {
  58575. return ObjectToString(value) === '[object SharedArrayBuffer]';
  58576. }
  58577. function isSharedArrayBuffer(value) {
  58578. if (typeof SharedArrayBufferCopy === 'undefined') {
  58579. return false;
  58580. }
  58581. if (typeof isSharedArrayBufferToString.working === 'undefined') {
  58582. isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());
  58583. }
  58584. return isSharedArrayBufferToString.working
  58585. ? isSharedArrayBufferToString(value)
  58586. : value instanceof SharedArrayBufferCopy;
  58587. }
  58588. exports.isSharedArrayBuffer = isSharedArrayBuffer;
  58589. function isAsyncFunction(value) {
  58590. return ObjectToString(value) === '[object AsyncFunction]';
  58591. }
  58592. exports.isAsyncFunction = isAsyncFunction;
  58593. function isMapIterator(value) {
  58594. return ObjectToString(value) === '[object Map Iterator]';
  58595. }
  58596. exports.isMapIterator = isMapIterator;
  58597. function isSetIterator(value) {
  58598. return ObjectToString(value) === '[object Set Iterator]';
  58599. }
  58600. exports.isSetIterator = isSetIterator;
  58601. function isGeneratorObject(value) {
  58602. return ObjectToString(value) === '[object Generator]';
  58603. }
  58604. exports.isGeneratorObject = isGeneratorObject;
  58605. function isWebAssemblyCompiledModule(value) {
  58606. return ObjectToString(value) === '[object WebAssembly.Module]';
  58607. }
  58608. exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
  58609. function isNumberObject(value) {
  58610. return checkBoxedPrimitive(value, numberValue);
  58611. }
  58612. exports.isNumberObject = isNumberObject;
  58613. function isStringObject(value) {
  58614. return checkBoxedPrimitive(value, stringValue);
  58615. }
  58616. exports.isStringObject = isStringObject;
  58617. function isBooleanObject(value) {
  58618. return checkBoxedPrimitive(value, booleanValue);
  58619. }
  58620. exports.isBooleanObject = isBooleanObject;
  58621. function isBigIntObject(value) {
  58622. return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
  58623. }
  58624. exports.isBigIntObject = isBigIntObject;
  58625. function isSymbolObject(value) {
  58626. return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
  58627. }
  58628. exports.isSymbolObject = isSymbolObject;
  58629. function isBoxedPrimitive(value) {
  58630. return (
  58631. isNumberObject(value) ||
  58632. isStringObject(value) ||
  58633. isBooleanObject(value) ||
  58634. isBigIntObject(value) ||
  58635. isSymbolObject(value)
  58636. );
  58637. }
  58638. exports.isBoxedPrimitive = isBoxedPrimitive;
  58639. function isAnyArrayBuffer(value) {
  58640. return typeof Uint8Array !== 'undefined' && (
  58641. isArrayBuffer(value) ||
  58642. isSharedArrayBuffer(value)
  58643. );
  58644. }
  58645. exports.isAnyArrayBuffer = isAnyArrayBuffer;
  58646. ['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {
  58647. Object.defineProperty(exports, method, {
  58648. enumerable: false,
  58649. value: function() {
  58650. throw new Error(method + ' is not supported in userland');
  58651. }
  58652. });
  58653. });
  58654. /***/ }),
  58655. /***/ 9539:
  58656. /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
  58657. /* provided dependency */ var process = __webpack_require__(4155);
  58658. // Copyright Joyent, Inc. and other Node contributors.
  58659. //
  58660. // Permission is hereby granted, free of charge, to any person obtaining a
  58661. // copy of this software and associated documentation files (the
  58662. // "Software"), to deal in the Software without restriction, including
  58663. // without limitation the rights to use, copy, modify, merge, publish,
  58664. // distribute, sublicense, and/or sell copies of the Software, and to permit
  58665. // persons to whom the Software is furnished to do so, subject to the
  58666. // following conditions:
  58667. //
  58668. // The above copyright notice and this permission notice shall be included
  58669. // in all copies or substantial portions of the Software.
  58670. //
  58671. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
  58672. // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
  58673. // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
  58674. // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
  58675. // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
  58676. // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
  58677. // USE OR OTHER DEALINGS IN THE SOFTWARE.
  58678. var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
  58679. function getOwnPropertyDescriptors(obj) {
  58680. var keys = Object.keys(obj);
  58681. var descriptors = {};
  58682. for (var i = 0; i < keys.length; i++) {
  58683. descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
  58684. }
  58685. return descriptors;
  58686. };
  58687. var formatRegExp = /%[sdj%]/g;
  58688. exports.format = function(f) {
  58689. if (!isString(f)) {
  58690. var objects = [];
  58691. for (var i = 0; i < arguments.length; i++) {
  58692. objects.push(inspect(arguments[i]));
  58693. }
  58694. return objects.join(' ');
  58695. }
  58696. var i = 1;
  58697. var args = arguments;
  58698. var len = args.length;
  58699. var str = String(f).replace(formatRegExp, function(x) {
  58700. if (x === '%%') return '%';
  58701. if (i >= len) return x;
  58702. switch (x) {
  58703. case '%s': return String(args[i++]);
  58704. case '%d': return Number(args[i++]);
  58705. case '%j':
  58706. try {
  58707. return JSON.stringify(args[i++]);
  58708. } catch (_) {
  58709. return '[Circular]';
  58710. }
  58711. default:
  58712. return x;
  58713. }
  58714. });
  58715. for (var x = args[i]; i < len; x = args[++i]) {
  58716. if (isNull(x) || !isObject(x)) {
  58717. str += ' ' + x;
  58718. } else {
  58719. str += ' ' + inspect(x);
  58720. }
  58721. }
  58722. return str;
  58723. };
  58724. // Mark that a method should not be used.
  58725. // Returns a modified function which warns once by default.
  58726. // If --no-deprecation is set, then it is a no-op.
  58727. exports.deprecate = function(fn, msg) {
  58728. if (typeof process !== 'undefined' && process.noDeprecation === true) {
  58729. return fn;
  58730. }
  58731. // Allow for deprecating things in the process of starting up.
  58732. if (typeof process === 'undefined') {
  58733. return function() {
  58734. return exports.deprecate(fn, msg).apply(this, arguments);
  58735. };
  58736. }
  58737. var warned = false;
  58738. function deprecated() {
  58739. if (!warned) {
  58740. if (process.throwDeprecation) {
  58741. throw new Error(msg);
  58742. } else if (process.traceDeprecation) {
  58743. console.trace(msg);
  58744. } else {
  58745. console.error(msg);
  58746. }
  58747. warned = true;
  58748. }
  58749. return fn.apply(this, arguments);
  58750. }
  58751. return deprecated;
  58752. };
  58753. var debugs = {};
  58754. var debugEnvRegex = /^$/;
  58755. if (process.env.NODE_DEBUG) {
  58756. var debugEnv = process.env.NODE_DEBUG;
  58757. debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&')
  58758. .replace(/\*/g, '.*')
  58759. .replace(/,/g, '$|^')
  58760. .toUpperCase();
  58761. debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');
  58762. }
  58763. exports.debuglog = function(set) {
  58764. set = set.toUpperCase();
  58765. if (!debugs[set]) {
  58766. if (debugEnvRegex.test(set)) {
  58767. var pid = process.pid;
  58768. debugs[set] = function() {
  58769. var msg = exports.format.apply(exports, arguments);
  58770. console.error('%s %d: %s', set, pid, msg);
  58771. };
  58772. } else {
  58773. debugs[set] = function() {};
  58774. }
  58775. }
  58776. return debugs[set];
  58777. };
  58778. /**
  58779. * Echos the value of a value. Trys to print the value out
  58780. * in the best way possible given the different types.
  58781. *
  58782. * @param {Object} obj The object to print out.
  58783. * @param {Object} opts Optional options object that alters the output.
  58784. */
  58785. /* legacy: obj, showHidden, depth, colors*/
  58786. function inspect(obj, opts) {
  58787. // default options
  58788. var ctx = {
  58789. seen: [],
  58790. stylize: stylizeNoColor
  58791. };
  58792. // legacy...
  58793. if (arguments.length >= 3) ctx.depth = arguments[2];
  58794. if (arguments.length >= 4) ctx.colors = arguments[3];
  58795. if (isBoolean(opts)) {
  58796. // legacy...
  58797. ctx.showHidden = opts;
  58798. } else if (opts) {
  58799. // got an "options" object
  58800. exports._extend(ctx, opts);
  58801. }
  58802. // set default options
  58803. if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
  58804. if (isUndefined(ctx.depth)) ctx.depth = 2;
  58805. if (isUndefined(ctx.colors)) ctx.colors = false;
  58806. if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
  58807. if (ctx.colors) ctx.stylize = stylizeWithColor;
  58808. return formatValue(ctx, obj, ctx.depth);
  58809. }
  58810. exports.inspect = inspect;
  58811. // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
  58812. inspect.colors = {
  58813. 'bold' : [1, 22],
  58814. 'italic' : [3, 23],
  58815. 'underline' : [4, 24],
  58816. 'inverse' : [7, 27],
  58817. 'white' : [37, 39],
  58818. 'grey' : [90, 39],
  58819. 'black' : [30, 39],
  58820. 'blue' : [34, 39],
  58821. 'cyan' : [36, 39],
  58822. 'green' : [32, 39],
  58823. 'magenta' : [35, 39],
  58824. 'red' : [31, 39],
  58825. 'yellow' : [33, 39]
  58826. };
  58827. // Don't use 'blue' not visible on cmd.exe
  58828. inspect.styles = {
  58829. 'special': 'cyan',
  58830. 'number': 'yellow',
  58831. 'boolean': 'yellow',
  58832. 'undefined': 'grey',
  58833. 'null': 'bold',
  58834. 'string': 'green',
  58835. 'date': 'magenta',
  58836. // "name": intentionally not styling
  58837. 'regexp': 'red'
  58838. };
  58839. function stylizeWithColor(str, styleType) {
  58840. var style = inspect.styles[styleType];
  58841. if (style) {
  58842. return '\u001b[' + inspect.colors[style][0] + 'm' + str +
  58843. '\u001b[' + inspect.colors[style][1] + 'm';
  58844. } else {
  58845. return str;
  58846. }
  58847. }
  58848. function stylizeNoColor(str, styleType) {
  58849. return str;
  58850. }
  58851. function arrayToHash(array) {
  58852. var hash = {};
  58853. array.forEach(function(val, idx) {
  58854. hash[val] = true;
  58855. });
  58856. return hash;
  58857. }
  58858. function formatValue(ctx, value, recurseTimes) {
  58859. // Provide a hook for user-specified inspect functions.
  58860. // Check that value is an object with an inspect function on it
  58861. if (ctx.customInspect &&
  58862. value &&
  58863. isFunction(value.inspect) &&
  58864. // Filter out the util module, it's inspect function is special
  58865. value.inspect !== exports.inspect &&
  58866. // Also filter out any prototype objects using the circular check.
  58867. !(value.constructor && value.constructor.prototype === value)) {
  58868. var ret = value.inspect(recurseTimes, ctx);
  58869. if (!isString(ret)) {
  58870. ret = formatValue(ctx, ret, recurseTimes);
  58871. }
  58872. return ret;
  58873. }
  58874. // Primitive types cannot have properties
  58875. var primitive = formatPrimitive(ctx, value);
  58876. if (primitive) {
  58877. return primitive;
  58878. }
  58879. // Look up the keys of the object.
  58880. var keys = Object.keys(value);
  58881. var visibleKeys = arrayToHash(keys);
  58882. if (ctx.showHidden) {
  58883. keys = Object.getOwnPropertyNames(value);
  58884. }
  58885. // IE doesn't make error fields non-enumerable
  58886. // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
  58887. if (isError(value)
  58888. && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
  58889. return formatError(value);
  58890. }
  58891. // Some type of object without properties can be shortcutted.
  58892. if (keys.length === 0) {
  58893. if (isFunction(value)) {
  58894. var name = value.name ? ': ' + value.name : '';
  58895. return ctx.stylize('[Function' + name + ']', 'special');
  58896. }
  58897. if (isRegExp(value)) {
  58898. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  58899. }
  58900. if (isDate(value)) {
  58901. return ctx.stylize(Date.prototype.toString.call(value), 'date');
  58902. }
  58903. if (isError(value)) {
  58904. return formatError(value);
  58905. }
  58906. }
  58907. var base = '', array = false, braces = ['{', '}'];
  58908. // Make Array say that they are Array
  58909. if (isArray(value)) {
  58910. array = true;
  58911. braces = ['[', ']'];
  58912. }
  58913. // Make functions say that they are functions
  58914. if (isFunction(value)) {
  58915. var n = value.name ? ': ' + value.name : '';
  58916. base = ' [Function' + n + ']';
  58917. }
  58918. // Make RegExps say that they are RegExps
  58919. if (isRegExp(value)) {
  58920. base = ' ' + RegExp.prototype.toString.call(value);
  58921. }
  58922. // Make dates with properties first say the date
  58923. if (isDate(value)) {
  58924. base = ' ' + Date.prototype.toUTCString.call(value);
  58925. }
  58926. // Make error with message first say the error
  58927. if (isError(value)) {
  58928. base = ' ' + formatError(value);
  58929. }
  58930. if (keys.length === 0 && (!array || value.length == 0)) {
  58931. return braces[0] + base + braces[1];
  58932. }
  58933. if (recurseTimes < 0) {
  58934. if (isRegExp(value)) {
  58935. return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
  58936. } else {
  58937. return ctx.stylize('[Object]', 'special');
  58938. }
  58939. }
  58940. ctx.seen.push(value);
  58941. var output;
  58942. if (array) {
  58943. output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
  58944. } else {
  58945. output = keys.map(function(key) {
  58946. return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
  58947. });
  58948. }
  58949. ctx.seen.pop();
  58950. return reduceToSingleString(output, base, braces);
  58951. }
  58952. function formatPrimitive(ctx, value) {
  58953. if (isUndefined(value))
  58954. return ctx.stylize('undefined', 'undefined');
  58955. if (isString(value)) {
  58956. var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
  58957. .replace(/'/g, "\\'")
  58958. .replace(/\\"/g, '"') + '\'';
  58959. return ctx.stylize(simple, 'string');
  58960. }
  58961. if (isNumber(value))
  58962. return ctx.stylize('' + value, 'number');
  58963. if (isBoolean(value))
  58964. return ctx.stylize('' + value, 'boolean');
  58965. // For some reason typeof null is "object", so special case here.
  58966. if (isNull(value))
  58967. return ctx.stylize('null', 'null');
  58968. }
  58969. function formatError(value) {
  58970. return '[' + Error.prototype.toString.call(value) + ']';
  58971. }
  58972. function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
  58973. var output = [];
  58974. for (var i = 0, l = value.length; i < l; ++i) {
  58975. if (hasOwnProperty(value, String(i))) {
  58976. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
  58977. String(i), true));
  58978. } else {
  58979. output.push('');
  58980. }
  58981. }
  58982. keys.forEach(function(key) {
  58983. if (!key.match(/^\d+$/)) {
  58984. output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
  58985. key, true));
  58986. }
  58987. });
  58988. return output;
  58989. }
  58990. function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
  58991. var name, str, desc;
  58992. desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
  58993. if (desc.get) {
  58994. if (desc.set) {
  58995. str = ctx.stylize('[Getter/Setter]', 'special');
  58996. } else {
  58997. str = ctx.stylize('[Getter]', 'special');
  58998. }
  58999. } else {
  59000. if (desc.set) {
  59001. str = ctx.stylize('[Setter]', 'special');
  59002. }
  59003. }
  59004. if (!hasOwnProperty(visibleKeys, key)) {
  59005. name = '[' + key + ']';
  59006. }
  59007. if (!str) {
  59008. if (ctx.seen.indexOf(desc.value) < 0) {
  59009. if (isNull(recurseTimes)) {
  59010. str = formatValue(ctx, desc.value, null);
  59011. } else {
  59012. str = formatValue(ctx, desc.value, recurseTimes - 1);
  59013. }
  59014. if (str.indexOf('\n') > -1) {
  59015. if (array) {
  59016. str = str.split('\n').map(function(line) {
  59017. return ' ' + line;
  59018. }).join('\n').substr(2);
  59019. } else {
  59020. str = '\n' + str.split('\n').map(function(line) {
  59021. return ' ' + line;
  59022. }).join('\n');
  59023. }
  59024. }
  59025. } else {
  59026. str = ctx.stylize('[Circular]', 'special');
  59027. }
  59028. }
  59029. if (isUndefined(name)) {
  59030. if (array && key.match(/^\d+$/)) {
  59031. return str;
  59032. }
  59033. name = JSON.stringify('' + key);
  59034. if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
  59035. name = name.substr(1, name.length - 2);
  59036. name = ctx.stylize(name, 'name');
  59037. } else {
  59038. name = name.replace(/'/g, "\\'")
  59039. .replace(/\\"/g, '"')
  59040. .replace(/(^"|"$)/g, "'");
  59041. name = ctx.stylize(name, 'string');
  59042. }
  59043. }
  59044. return name + ': ' + str;
  59045. }
  59046. function reduceToSingleString(output, base, braces) {
  59047. var numLinesEst = 0;
  59048. var length = output.reduce(function(prev, cur) {
  59049. numLinesEst++;
  59050. if (cur.indexOf('\n') >= 0) numLinesEst++;
  59051. return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
  59052. }, 0);
  59053. if (length > 60) {
  59054. return braces[0] +
  59055. (base === '' ? '' : base + '\n ') +
  59056. ' ' +
  59057. output.join(',\n ') +
  59058. ' ' +
  59059. braces[1];
  59060. }
  59061. return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
  59062. }
  59063. // NOTE: These type checking functions intentionally don't use `instanceof`
  59064. // because it is fragile and can be easily faked with `Object.create()`.
  59065. exports.types = __webpack_require__(5955);
  59066. function isArray(ar) {
  59067. return Array.isArray(ar);
  59068. }
  59069. exports.isArray = isArray;
  59070. function isBoolean(arg) {
  59071. return typeof arg === 'boolean';
  59072. }
  59073. exports.isBoolean = isBoolean;
  59074. function isNull(arg) {
  59075. return arg === null;
  59076. }
  59077. exports.isNull = isNull;
  59078. function isNullOrUndefined(arg) {
  59079. return arg == null;
  59080. }
  59081. exports.isNullOrUndefined = isNullOrUndefined;
  59082. function isNumber(arg) {
  59083. return typeof arg === 'number';
  59084. }
  59085. exports.isNumber = isNumber;
  59086. function isString(arg) {
  59087. return typeof arg === 'string';
  59088. }
  59089. exports.isString = isString;
  59090. function isSymbol(arg) {
  59091. return typeof arg === 'symbol';
  59092. }
  59093. exports.isSymbol = isSymbol;
  59094. function isUndefined(arg) {
  59095. return arg === void 0;
  59096. }
  59097. exports.isUndefined = isUndefined;
  59098. function isRegExp(re) {
  59099. return isObject(re) && objectToString(re) === '[object RegExp]';
  59100. }
  59101. exports.isRegExp = isRegExp;
  59102. exports.types.isRegExp = isRegExp;
  59103. function isObject(arg) {
  59104. return typeof arg === 'object' && arg !== null;
  59105. }
  59106. exports.isObject = isObject;
  59107. function isDate(d) {
  59108. return isObject(d) && objectToString(d) === '[object Date]';
  59109. }
  59110. exports.isDate = isDate;
  59111. exports.types.isDate = isDate;
  59112. function isError(e) {
  59113. return isObject(e) &&
  59114. (objectToString(e) === '[object Error]' || e instanceof Error);
  59115. }
  59116. exports.isError = isError;
  59117. exports.types.isNativeError = isError;
  59118. function isFunction(arg) {
  59119. return typeof arg === 'function';
  59120. }
  59121. exports.isFunction = isFunction;
  59122. function isPrimitive(arg) {
  59123. return arg === null ||
  59124. typeof arg === 'boolean' ||
  59125. typeof arg === 'number' ||
  59126. typeof arg === 'string' ||
  59127. typeof arg === 'symbol' || // ES6 symbol
  59128. typeof arg === 'undefined';
  59129. }
  59130. exports.isPrimitive = isPrimitive;
  59131. exports.isBuffer = __webpack_require__(384);
  59132. function objectToString(o) {
  59133. return Object.prototype.toString.call(o);
  59134. }
  59135. function pad(n) {
  59136. return n < 10 ? '0' + n.toString(10) : n.toString(10);
  59137. }
  59138. var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
  59139. 'Oct', 'Nov', 'Dec'];
  59140. // 26 Feb 16:19:34
  59141. function timestamp() {
  59142. var d = new Date();
  59143. var time = [pad(d.getHours()),
  59144. pad(d.getMinutes()),
  59145. pad(d.getSeconds())].join(':');
  59146. return [d.getDate(), months[d.getMonth()], time].join(' ');
  59147. }
  59148. // log is just a thin wrapper to console.log that prepends a timestamp
  59149. exports.log = function() {
  59150. console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
  59151. };
  59152. /**
  59153. * Inherit the prototype methods from one constructor into another.
  59154. *
  59155. * The Function.prototype.inherits from lang.js rewritten as a standalone
  59156. * function (not on Function.prototype). NOTE: If this file is to be loaded
  59157. * during bootstrapping this function needs to be rewritten using some native
  59158. * functions as prototype setup using normal JavaScript does not work as
  59159. * expected during bootstrapping (see mirror.js in r114903).
  59160. *
  59161. * @param {function} ctor Constructor function which needs to inherit the
  59162. * prototype.
  59163. * @param {function} superCtor Constructor function to inherit prototype from.
  59164. */
  59165. exports.inherits = __webpack_require__(5717);
  59166. exports._extend = function(origin, add) {
  59167. // Don't do anything if add isn't an object
  59168. if (!add || !isObject(add)) return origin;
  59169. var keys = Object.keys(add);
  59170. var i = keys.length;
  59171. while (i--) {
  59172. origin[keys[i]] = add[keys[i]];
  59173. }
  59174. return origin;
  59175. };
  59176. function hasOwnProperty(obj, prop) {
  59177. return Object.prototype.hasOwnProperty.call(obj, prop);
  59178. }
  59179. var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
  59180. exports.promisify = function promisify(original) {
  59181. if (typeof original !== 'function')
  59182. throw new TypeError('The "original" argument must be of type Function');
  59183. if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
  59184. var fn = original[kCustomPromisifiedSymbol];
  59185. if (typeof fn !== 'function') {
  59186. throw new TypeError('The "util.promisify.custom" argument must be of type Function');
  59187. }
  59188. Object.defineProperty(fn, kCustomPromisifiedSymbol, {
  59189. value: fn, enumerable: false, writable: false, configurable: true
  59190. });
  59191. return fn;
  59192. }
  59193. function fn() {
  59194. var promiseResolve, promiseReject;
  59195. var promise = new Promise(function (resolve, reject) {
  59196. promiseResolve = resolve;
  59197. promiseReject = reject;
  59198. });
  59199. var args = [];
  59200. for (var i = 0; i < arguments.length; i++) {
  59201. args.push(arguments[i]);
  59202. }
  59203. args.push(function (err, value) {
  59204. if (err) {
  59205. promiseReject(err);
  59206. } else {
  59207. promiseResolve(value);
  59208. }
  59209. });
  59210. try {
  59211. original.apply(this, args);
  59212. } catch (err) {
  59213. promiseReject(err);
  59214. }
  59215. return promise;
  59216. }
  59217. Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
  59218. if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
  59219. value: fn, enumerable: false, writable: false, configurable: true
  59220. });
  59221. return Object.defineProperties(
  59222. fn,
  59223. getOwnPropertyDescriptors(original)
  59224. );
  59225. }
  59226. exports.promisify.custom = kCustomPromisifiedSymbol
  59227. function callbackifyOnRejected(reason, cb) {
  59228. // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
  59229. // Because `null` is a special error value in callbacks which means "no error
  59230. // occurred", we error-wrap so the callback consumer can distinguish between
  59231. // "the promise rejected with null" or "the promise fulfilled with undefined".
  59232. if (!reason) {
  59233. var newReason = new Error('Promise was rejected with a falsy value');
  59234. newReason.reason = reason;
  59235. reason = newReason;
  59236. }
  59237. return cb(reason);
  59238. }
  59239. function callbackify(original) {
  59240. if (typeof original !== 'function') {
  59241. throw new TypeError('The "original" argument must be of type Function');
  59242. }
  59243. // We DO NOT return the promise as it gives the user a false sense that
  59244. // the promise is actually somehow related to the callback's execution
  59245. // and that the callback throwing will reject the promise.
  59246. function callbackified() {
  59247. var args = [];
  59248. for (var i = 0; i < arguments.length; i++) {
  59249. args.push(arguments[i]);
  59250. }
  59251. var maybeCb = args.pop();
  59252. if (typeof maybeCb !== 'function') {
  59253. throw new TypeError('The last argument must be of type Function');
  59254. }
  59255. var self = this;
  59256. var cb = function() {
  59257. return maybeCb.apply(self, arguments);
  59258. };
  59259. // In true node style we process the callback on `nextTick` with all the
  59260. // implications (stack, `uncaughtException`, `async_hooks`)
  59261. original.apply(this, args)
  59262. .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },
  59263. function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });
  59264. }
  59265. Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
  59266. Object.defineProperties(callbackified,
  59267. getOwnPropertyDescriptors(original));
  59268. return callbackified;
  59269. }
  59270. exports.callbackify = callbackify;
  59271. /***/ }),
  59272. /***/ 6430:
  59273. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  59274. "use strict";
  59275. var forEach = __webpack_require__(9804);
  59276. var availableTypedArrays = __webpack_require__(3083);
  59277. var callBound = __webpack_require__(1924);
  59278. var $toString = callBound('Object.prototype.toString');
  59279. var hasToStringTag = __webpack_require__(6410)();
  59280. var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis;
  59281. var typedArrays = availableTypedArrays();
  59282. var $slice = callBound('String.prototype.slice');
  59283. var toStrTags = {};
  59284. var gOPD = __webpack_require__(882);
  59285. var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
  59286. if (hasToStringTag && gOPD && getPrototypeOf) {
  59287. forEach(typedArrays, function (typedArray) {
  59288. if (typeof g[typedArray] === 'function') {
  59289. var arr = new g[typedArray]();
  59290. if (Symbol.toStringTag in arr) {
  59291. var proto = getPrototypeOf(arr);
  59292. var descriptor = gOPD(proto, Symbol.toStringTag);
  59293. if (!descriptor) {
  59294. var superProto = getPrototypeOf(proto);
  59295. descriptor = gOPD(superProto, Symbol.toStringTag);
  59296. }
  59297. toStrTags[typedArray] = descriptor.get;
  59298. }
  59299. }
  59300. });
  59301. }
  59302. var tryTypedArrays = function tryAllTypedArrays(value) {
  59303. var foundName = false;
  59304. forEach(toStrTags, function (getter, typedArray) {
  59305. if (!foundName) {
  59306. try {
  59307. var name = getter.call(value);
  59308. if (name === typedArray) {
  59309. foundName = name;
  59310. }
  59311. } catch (e) {}
  59312. }
  59313. });
  59314. return foundName;
  59315. };
  59316. var isTypedArray = __webpack_require__(5692);
  59317. module.exports = function whichTypedArray(value) {
  59318. if (!isTypedArray(value)) { return false; }
  59319. if (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }
  59320. return tryTypedArrays(value);
  59321. };
  59322. /***/ }),
  59323. /***/ 6513:
  59324. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  59325. // This file is just added for convenience so this repository can be
  59326. // directly checked out into a project's deps folder
  59327. module.exports = __webpack_require__(5011);
  59328. /***/ }),
  59329. /***/ 5011:
  59330. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  59331. (function () {
  59332. var sax;
  59333. if ( true && module.exports && !__webpack_require__.g.xmldocAssumeBrowser) {
  59334. // We're being used in a Node-like environment
  59335. sax = __webpack_require__(6099);
  59336. }
  59337. else {
  59338. // assume it's attached to the Window object in a browser
  59339. sax = this.sax;
  59340. if (!sax) // no sax for you!
  59341. throw new Error("Expected sax to be defined. Make sure you're including sax.js before this file.");
  59342. }
  59343. /*
  59344. XmlElement is our basic building block. Everything is an XmlElement; even XmlDocument
  59345. behaves like an XmlElement by inheriting its attributes and functions.
  59346. */
  59347. function XmlElement(tag) {
  59348. // Capture the parser object off of the XmlDocument delegate
  59349. var parser = delegates[delegates.length - 1].parser;
  59350. this.name = tag.name;
  59351. this.attr = tag.attributes;
  59352. this.val = "";
  59353. this.children = [];
  59354. this.firstChild = null;
  59355. this.lastChild = null;
  59356. // Assign parse information
  59357. this.line = parser.line;
  59358. this.column = parser.column;
  59359. this.position = parser.position;
  59360. this.startTagPosition = parser.startTagPosition;
  59361. }
  59362. // Private methods
  59363. XmlElement.prototype._addChild = function(child) {
  59364. // add to our children array
  59365. this.children.push(child);
  59366. // update first/last pointers
  59367. if (!this.firstChild) this.firstChild = child;
  59368. this.lastChild = child;
  59369. };
  59370. // SaxParser handlers
  59371. XmlElement.prototype._opentag = function(tag) {
  59372. var child = new XmlElement(tag);
  59373. this._addChild(child);
  59374. delegates.unshift(child);
  59375. };
  59376. XmlElement.prototype._closetag = function() {
  59377. delegates.shift();
  59378. };
  59379. XmlElement.prototype._text = function(text) {
  59380. if (typeof this.children === 'undefined')
  59381. return
  59382. this.val += text;
  59383. this._addChild(new XmlTextNode(text));
  59384. };
  59385. XmlElement.prototype._cdata = function(cdata) {
  59386. this.val += cdata;
  59387. this._addChild(new XmlCDataNode(cdata));
  59388. };
  59389. XmlElement.prototype._comment = function(comment) {
  59390. if (typeof this.children === 'undefined')
  59391. return
  59392. this._addChild(new XmlCommentNode(comment));
  59393. };
  59394. XmlElement.prototype._error = function(err) {
  59395. throw err;
  59396. };
  59397. // Useful functions
  59398. XmlElement.prototype.eachChild = function(iterator, context) {
  59399. for (var i=0, l=this.children.length; i<l; i++)
  59400. if (this.children[i].type === "element")
  59401. if (iterator.call(context, this.children[i], i, this.children) === false) return;
  59402. };
  59403. XmlElement.prototype.childNamed = function(name) {
  59404. for (var i=0, l=this.children.length; i<l; i++) {
  59405. var child = this.children[i];
  59406. if (child.name === name) return child;
  59407. }
  59408. return undefined;
  59409. };
  59410. XmlElement.prototype.childrenNamed = function(name) {
  59411. var matches = [];
  59412. for (var i=0, l=this.children.length; i<l; i++)
  59413. if (this.children[i].name === name)
  59414. matches.push(this.children[i]);
  59415. return matches;
  59416. };
  59417. XmlElement.prototype.childWithAttribute = function(name,value) {
  59418. for (var i=0, l=this.children.length; i<l; i++) {
  59419. var child = this.children[i];
  59420. if (child.type === "element" && ((value && child.attr[name] === value) || (!value && child.attr[name])))
  59421. return child;
  59422. }
  59423. return undefined;
  59424. };
  59425. XmlElement.prototype.descendantWithPath = function(path) {
  59426. var descendant = this;
  59427. var components = path.split('.');
  59428. for (var i=0, l=components.length; i<l; i++)
  59429. if (descendant && descendant.type === "element")
  59430. descendant = descendant.childNamed(components[i]);
  59431. else
  59432. return undefined;
  59433. return descendant;
  59434. };
  59435. XmlElement.prototype.valueWithPath = function(path) {
  59436. var components = path.split('@');
  59437. var descendant = this.descendantWithPath(components[0]);
  59438. if (descendant)
  59439. return components.length > 1 ? descendant.attr[components[1]] : descendant.val;
  59440. else
  59441. return undefined;
  59442. };
  59443. // String formatting (for debugging)
  59444. XmlElement.prototype.toString = function(options) {
  59445. return this.toStringWithIndent("", options);
  59446. };
  59447. XmlElement.prototype.toStringWithIndent = function(indent, options) {
  59448. var s = indent + "<" + this.name;
  59449. var linebreak = options && options.compressed ? "" : "\n";
  59450. var preserveWhitespace = options && options.preserveWhitespace;
  59451. for (var name in this.attr)
  59452. if (Object.prototype.hasOwnProperty.call(this.attr, name))
  59453. s += " " + name + '="' + escapeXML(this.attr[name]) + '"';
  59454. if (this.children.length === 1 && this.children[0].type !== "element") {
  59455. s += ">" + this.children[0].toString(options) + "</" + this.name + ">";
  59456. }
  59457. else if (this.children.length) {
  59458. s += ">" + linebreak;
  59459. var childIndent = indent + (options && options.compressed ? "" : " ");
  59460. for (var i=0, l=this.children.length; i<l; i++) {
  59461. s += this.children[i].toStringWithIndent(childIndent, options) + linebreak;
  59462. }
  59463. s += indent + "</" + this.name + ">";
  59464. }
  59465. else if (options && options.html) {
  59466. var whiteList = [
  59467. "area", "base", "br", "col", "embed", "frame", "hr", "img", "input",
  59468. "keygen", "link", "menuitem", "meta", "param", "source", "track", "wbr"
  59469. ];
  59470. if (whiteList.indexOf(this.name) !== -1) s += "/>";
  59471. else s += "></" + this.name + ">";
  59472. }
  59473. else {
  59474. s += "/>";
  59475. }
  59476. return s;
  59477. };
  59478. // Alternative XML nodes
  59479. function XmlTextNode (text) {
  59480. this.text = text;
  59481. }
  59482. XmlTextNode.prototype.toString = function(options) {
  59483. return formatText(escapeXML(this.text), options);
  59484. };
  59485. XmlTextNode.prototype.toStringWithIndent = function(indent, options) {
  59486. return indent+this.toString(options);
  59487. };
  59488. function XmlCDataNode (cdata) {
  59489. this.cdata = cdata;
  59490. }
  59491. XmlCDataNode.prototype.toString = function(options) {
  59492. return "<![CDATA["+formatText(this.cdata, options)+"]]>";
  59493. };
  59494. XmlCDataNode.prototype.toStringWithIndent = function(indent, options) {
  59495. return indent+this.toString(options);
  59496. };
  59497. function XmlCommentNode (comment) {
  59498. this.comment = comment;
  59499. }
  59500. XmlCommentNode.prototype.toString = function(options) {
  59501. return "<!--"+formatText(escapeXML(this.comment), options)+"-->";
  59502. };
  59503. XmlCommentNode.prototype.toStringWithIndent = function(indent, options) {
  59504. return indent+this.toString(options);
  59505. };
  59506. // Node type tag
  59507. XmlElement.prototype.type = "element";
  59508. XmlTextNode.prototype.type = "text";
  59509. XmlCDataNode.prototype.type = "cdata";
  59510. XmlCommentNode.prototype.type = "comment";
  59511. /*
  59512. XmlDocument is the class we expose to the user; it uses the sax parser to create a hierarchy
  59513. of XmlElements.
  59514. */
  59515. function XmlDocument(xml) {
  59516. xml && (xml = xml.toString().trim());
  59517. if (!xml)
  59518. throw new Error("No XML to parse!");
  59519. // Stores doctype (if defined)
  59520. this.doctype = "";
  59521. // Expose the parser to the other delegates while the parser is running
  59522. this.parser = sax.parser(true); // strict
  59523. addParserEvents(this.parser);
  59524. // We'll use the file-scoped "delegates" var to remember what elements we're currently
  59525. // parsing; they will push and pop off the stack as we get deeper into the XML hierarchy.
  59526. // It's safe to use a global because JS is single-threaded.
  59527. delegates = [this];
  59528. this.parser.write(xml);
  59529. // Remove the parser as it is no longer needed and should not be exposed to clients
  59530. delete this.parser;
  59531. }
  59532. // make XmlDocument inherit XmlElement's methods
  59533. extend(XmlDocument.prototype, XmlElement.prototype);
  59534. XmlDocument.prototype._opentag = function(tag) {
  59535. if (typeof this.children === 'undefined')
  59536. // the first tag we encounter should be the root - we'll "become" the root XmlElement
  59537. XmlElement.call(this,tag);
  59538. else
  59539. // all other tags will be the root element's children
  59540. XmlElement.prototype._opentag.apply(this,arguments);
  59541. };
  59542. XmlDocument.prototype._doctype = function(doctype) {
  59543. this.doctype += doctype;
  59544. }
  59545. // file-scoped global stack of delegates
  59546. var delegates = null;
  59547. /*
  59548. Helper functions
  59549. */
  59550. function addParserEvents(parser) {
  59551. parser.onopentag = parser_opentag;
  59552. parser.onclosetag = parser_closetag;
  59553. parser.ontext = parser_text;
  59554. parser.oncdata = parser_cdata;
  59555. parser.oncomment = parser_comment;
  59556. parser.ondoctype = parser_doctype;
  59557. parser.onerror = parser_error;
  59558. }
  59559. // create these closures and cache them by keeping them file-scoped
  59560. function parser_opentag() { delegates[0] && delegates[0]._opentag.apply(delegates[0],arguments) }
  59561. function parser_closetag() { delegates[0] && delegates[0]._closetag.apply(delegates[0],arguments) }
  59562. function parser_text() { delegates[0] && delegates[0]._text.apply(delegates[0],arguments) }
  59563. function parser_cdata() { delegates[0] && delegates[0]._cdata.apply(delegates[0],arguments) }
  59564. function parser_comment() { delegates[0] && delegates[0]._comment.apply(delegates[0],arguments) }
  59565. function parser_doctype() { delegates[0] && delegates[0]._doctype.apply(delegates[0],arguments) }
  59566. function parser_error() { delegates[0] && delegates[0]._error.apply(delegates[0],arguments) }
  59567. // a relatively standard extend method
  59568. function extend(destination, source) {
  59569. for (var prop in source)
  59570. if (source.hasOwnProperty(prop))
  59571. destination[prop] = source[prop];
  59572. }
  59573. // escapes XML entities like "<", "&", etc.
  59574. function escapeXML(value){
  59575. return value.toString().replace(/&/g, '&amp;').replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/'/g, '&apos;').replace(/"/g, '&quot;');
  59576. }
  59577. // formats some text for debugging given a few options
  59578. function formatText(text, options) {
  59579. var finalText = text;
  59580. if (options && options.trimmed && text.length > 25)
  59581. finalText = finalText.substring(0,25).trim() + "…";
  59582. if (!(options && options.preserveWhitespace))
  59583. finalText = finalText.trim();
  59584. return finalText;
  59585. }
  59586. // Are we being used in a Node-like environment?
  59587. if ( true && module.exports && !__webpack_require__.g.xmldocAssumeBrowser)
  59588. module.exports.XmlDocument = XmlDocument;
  59589. else
  59590. this.XmlDocument = XmlDocument;
  59591. })();
  59592. /***/ }),
  59593. /***/ 6255:
  59594. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  59595. "use strict";
  59596. // Internet Explorer polyfills
  59597. if (typeof window !== 'undefined' && !window.Promise) {
  59598. __webpack_require__(3867);
  59599. }
  59600. __webpack_require__(4667);
  59601. var fetchUrl = function (url) {
  59602. return new Promise(function (resolve, reject) {
  59603. var xhr = new XMLHttpRequest();
  59604. xhr.open('GET', url, true);
  59605. xhr.responseType = 'arraybuffer';
  59606. xhr.onreadystatechange = function () {
  59607. if (xhr.readyState !== 4) {
  59608. return;
  59609. }
  59610. var ok = xhr.status >= 200 && xhr.status < 300;
  59611. if (!ok) {
  59612. setTimeout(function () {
  59613. reject(new TypeError('Failed to fetch (url: "' + url + '")'));
  59614. }, 0);
  59615. }
  59616. };
  59617. xhr.onload = function () {
  59618. var ok = xhr.status >= 200 && xhr.status < 300;
  59619. if (ok) {
  59620. resolve(xhr.response);
  59621. }
  59622. };
  59623. xhr.onerror = function () {
  59624. setTimeout(function () {
  59625. reject(new TypeError('Network request failed (url: "' + url + '")'));
  59626. }, 0);
  59627. };
  59628. xhr.ontimeout = function () {
  59629. setTimeout(function () {
  59630. reject(new TypeError('Network request failed (url: "' + url + '")'));
  59631. }, 0);
  59632. };
  59633. xhr.send();
  59634. });
  59635. };
  59636. function URLBrowserResolver(fs) {
  59637. this.fs = fs;
  59638. this.resolving = {};
  59639. }
  59640. URLBrowserResolver.prototype.resolve = function (url) {
  59641. if (!this.resolving[url]) {
  59642. var _this = this;
  59643. this.resolving[url] = new Promise(function (resolve, reject) {
  59644. if (url.toLowerCase().indexOf('https://') === 0 || url.toLowerCase().indexOf('http://') === 0) {
  59645. fetchUrl(url).then(function (buffer) {
  59646. _this.fs.writeFileSync(url, buffer);
  59647. resolve();
  59648. }, function (result) {
  59649. reject(result);
  59650. });
  59651. } else {
  59652. // cannot be resolved
  59653. resolve();
  59654. }
  59655. });
  59656. }
  59657. return this.resolving[url];
  59658. }
  59659. URLBrowserResolver.prototype.resolved = function () {
  59660. var _this = this;
  59661. return new Promise(function (resolve, reject) {
  59662. Promise.all(Object.values(_this.resolving)).then(function () {
  59663. resolve();
  59664. }, function (result) {
  59665. reject(result);
  59666. });
  59667. });
  59668. }
  59669. module.exports = URLBrowserResolver;
  59670. /***/ }),
  59671. /***/ 4275:
  59672. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  59673. "use strict";
  59674. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  59675. var isFunction = (__webpack_require__(6225).isFunction);
  59676. var isUndefined = (__webpack_require__(6225).isUndefined);
  59677. var isNull = (__webpack_require__(6225).isNull);
  59678. var FileSaver = __webpack_require__(4896);
  59679. var saveAs = FileSaver.saveAs;
  59680. var defaultClientFonts = {
  59681. Roboto: {
  59682. normal: 'Roboto-Regular.ttf',
  59683. bold: 'Roboto-Medium.ttf',
  59684. italics: 'Roboto-Italic.ttf',
  59685. bolditalics: 'Roboto-MediumItalic.ttf'
  59686. }
  59687. };
  59688. function Document(docDefinition, tableLayouts, fonts, vfs) {
  59689. this.docDefinition = docDefinition;
  59690. this.tableLayouts = tableLayouts || null;
  59691. this.fonts = fonts || defaultClientFonts;
  59692. this.vfs = vfs;
  59693. }
  59694. function canCreatePdf() {
  59695. // Ensure the browser provides the level of support needed
  59696. try {
  59697. var arr = new Uint8Array(1)
  59698. var proto = { foo: function () { return 42 } }
  59699. Object.setPrototypeOf(proto, Uint8Array.prototype)
  59700. Object.setPrototypeOf(arr, proto)
  59701. return arr.foo() === 42
  59702. } catch (e) {
  59703. return false
  59704. }
  59705. }
  59706. Document.prototype._createDoc = function (options, cb) {
  59707. options = options || {};
  59708. if (this.tableLayouts) {
  59709. options.tableLayouts = this.tableLayouts;
  59710. }
  59711. var PdfPrinter = __webpack_require__(8617);
  59712. var printer = new PdfPrinter(this.fonts);
  59713. (__webpack_require__(3857).bindFS)(this.vfs); // bind virtual file system to file system
  59714. if (!isFunction(cb)) {
  59715. var doc = printer.createPdfKitDocument(this.docDefinition, options);
  59716. return doc;
  59717. }
  59718. var URLBrowserResolver = __webpack_require__(6255);
  59719. var urlResolver = new URLBrowserResolver(__webpack_require__(3857));
  59720. for (var font in this.fonts) {
  59721. if (this.fonts.hasOwnProperty(font)) {
  59722. if (this.fonts[font].normal) {
  59723. urlResolver.resolve(this.fonts[font].normal);
  59724. }
  59725. if (this.fonts[font].bold) {
  59726. urlResolver.resolve(this.fonts[font].bold);
  59727. }
  59728. if (this.fonts[font].italics) {
  59729. urlResolver.resolve(this.fonts[font].italics);
  59730. }
  59731. if (this.fonts[font].bolditalics) {
  59732. urlResolver.resolve(this.fonts[font].bolditalics);
  59733. }
  59734. }
  59735. }
  59736. if (this.docDefinition.images) {
  59737. for (var image in this.docDefinition.images) {
  59738. if (this.docDefinition.images.hasOwnProperty(image)) {
  59739. urlResolver.resolve(this.docDefinition.images[image]);
  59740. }
  59741. }
  59742. }
  59743. var _this = this;
  59744. urlResolver.resolved().then(function () {
  59745. var doc = printer.createPdfKitDocument(_this.docDefinition, options);
  59746. cb(doc);
  59747. }, function (result) {
  59748. throw result;
  59749. });
  59750. };
  59751. Document.prototype._flushDoc = function (doc, callback) {
  59752. var chunks = [];
  59753. var result;
  59754. doc.on('readable', function () {
  59755. var chunk;
  59756. while ((chunk = doc.read(9007199254740991)) !== null) {
  59757. chunks.push(chunk);
  59758. }
  59759. });
  59760. doc.on('end', function () {
  59761. result = Buffer.concat(chunks);
  59762. callback(result, doc._pdfMakePages);
  59763. });
  59764. doc.end();
  59765. };
  59766. Document.prototype._getPages = function (options, cb) {
  59767. if (!cb) {
  59768. throw '_getPages is an async method and needs a callback argument';
  59769. }
  59770. var _this = this;
  59771. this._createDoc(options, function (doc) {
  59772. _this._flushDoc(doc, function (ignoreBuffer, pages) {
  59773. cb(pages);
  59774. });
  59775. });
  59776. };
  59777. Document.prototype._bufferToBlob = function (buffer) {
  59778. var blob;
  59779. try {
  59780. blob = new Blob([buffer], { type: 'application/pdf' });
  59781. } catch (e) {
  59782. // Old browser which can't handle it without making it an byte array (ie10)
  59783. if (e.name === 'InvalidStateError') {
  59784. var byteArray = new Uint8Array(buffer);
  59785. blob = new Blob([byteArray.buffer], { type: 'application/pdf' });
  59786. }
  59787. }
  59788. if (!blob) {
  59789. throw 'Could not generate blob';
  59790. }
  59791. return blob;
  59792. };
  59793. Document.prototype._openWindow = function () {
  59794. // we have to open the window immediately and store the reference
  59795. // otherwise popup blockers will stop us
  59796. var win = window.open('', '_blank');
  59797. if (win === null) {
  59798. throw 'Open PDF in new window blocked by browser';
  59799. }
  59800. return win;
  59801. };
  59802. Document.prototype._openPdf = function (options, win) {
  59803. if (!win) {
  59804. win = this._openWindow();
  59805. }
  59806. try {
  59807. this.getBlob(function (result) {
  59808. var urlCreator = window.URL || window.webkitURL;
  59809. var pdfUrl = urlCreator.createObjectURL(result);
  59810. win.location.href = pdfUrl;
  59811. /* temporarily disabled
  59812. if (win !== window) {
  59813. setTimeout(function () {
  59814. if (isNull(win.window)) { // is closed by AdBlock
  59815. window.location.href = pdfUrl; // open in actual window
  59816. }
  59817. }, 500);
  59818. }
  59819. */
  59820. }, options);
  59821. } catch (e) {
  59822. win.close();
  59823. throw e;
  59824. }
  59825. };
  59826. Document.prototype.open = function (options, win) {
  59827. options = options || {};
  59828. options.autoPrint = false;
  59829. win = win || null;
  59830. this._openPdf(options, win);
  59831. };
  59832. Document.prototype.print = function (options, win) {
  59833. options = options || {};
  59834. options.autoPrint = true;
  59835. win = win || null;
  59836. this._openPdf(options, win);
  59837. };
  59838. /**
  59839. * download(defaultFileName = 'file.pdf', cb = null, options = {})
  59840. * or
  59841. * download(cb, options = {})
  59842. */
  59843. Document.prototype.download = function (defaultFileName, cb, options) {
  59844. if (isFunction(defaultFileName)) {
  59845. if (!isUndefined(cb)) {
  59846. options = cb;
  59847. }
  59848. cb = defaultFileName;
  59849. defaultFileName = null;
  59850. }
  59851. defaultFileName = defaultFileName || 'file.pdf';
  59852. this.getBlob(function (result) {
  59853. saveAs(result, defaultFileName);
  59854. if (isFunction(cb)) {
  59855. cb();
  59856. }
  59857. }, options);
  59858. };
  59859. Document.prototype.getBase64 = function (cb, options) {
  59860. if (!cb) {
  59861. throw 'getBase64 is an async method and needs a callback argument';
  59862. }
  59863. this.getBuffer(function (buffer) {
  59864. cb(buffer.toString('base64'));
  59865. }, options);
  59866. };
  59867. Document.prototype.getDataUrl = function (cb, options) {
  59868. if (!cb) {
  59869. throw 'getDataUrl is an async method and needs a callback argument';
  59870. }
  59871. this.getBuffer(function (buffer) {
  59872. cb('data:application/pdf;base64,' + buffer.toString('base64'));
  59873. }, options);
  59874. };
  59875. Document.prototype.getBlob = function (cb, options) {
  59876. if (!cb) {
  59877. throw 'getBlob is an async method and needs a callback argument';
  59878. }
  59879. var that = this;
  59880. this.getBuffer(function (result) {
  59881. var blob = that._bufferToBlob(result);
  59882. cb(blob);
  59883. }, options);
  59884. };
  59885. Document.prototype.getBuffer = function (cb, options) {
  59886. if (!cb) {
  59887. throw 'getBuffer is an async method and needs a callback argument';
  59888. }
  59889. var _this = this;
  59890. this._createDoc(options, function (doc) {
  59891. _this._flushDoc(doc, function (buffer) {
  59892. cb(buffer);
  59893. });
  59894. });
  59895. };
  59896. Document.prototype.getStream = function (options, cb) {
  59897. if (!isFunction(cb)) {
  59898. var doc = this._createDoc(options);
  59899. return doc;
  59900. }
  59901. this._createDoc(options, function (doc) {
  59902. cb(doc);
  59903. });
  59904. };
  59905. module.exports = {
  59906. createPdf: function (docDefinition, tableLayouts, fonts, vfs) {
  59907. if (!canCreatePdf()) {
  59908. throw 'Your browser does not provide the level of support needed';
  59909. }
  59910. return new Document(
  59911. docDefinition,
  59912. tableLayouts || __webpack_require__.g.pdfMake.tableLayouts,
  59913. fonts || __webpack_require__.g.pdfMake.fonts,
  59914. vfs || __webpack_require__.g.pdfMake.vfs
  59915. );
  59916. }
  59917. };
  59918. /***/ }),
  59919. /***/ 3857:
  59920. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  59921. "use strict";
  59922. var __dirname = "/";
  59923. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  59924. function VirtualFileSystem() {
  59925. this.fileSystem = {};
  59926. this.dataSystem = {};
  59927. }
  59928. VirtualFileSystem.prototype.existsSync = function (filename) {
  59929. filename = fixFilename(filename);
  59930. return typeof this.fileSystem[filename] !== 'undefined'
  59931. || typeof this.dataSystem[filename] !== 'undefined';
  59932. }
  59933. VirtualFileSystem.prototype.readFileSync = function (filename, options) {
  59934. filename = fixFilename(filename);
  59935. var dataContent = this.dataSystem[filename];
  59936. if (typeof dataContent === 'string' && options === 'utf8') {
  59937. return dataContent;
  59938. }
  59939. if (dataContent) {
  59940. return new Buffer(dataContent, typeof dataContent === 'string' ? 'base64' : undefined);
  59941. }
  59942. var content = this.fileSystem[filename];
  59943. if (content) {
  59944. return content;
  59945. }
  59946. throw 'File \'' + filename + '\' not found in virtual file system';
  59947. };
  59948. VirtualFileSystem.prototype.writeFileSync = function (filename, content) {
  59949. this.fileSystem[fixFilename(filename)] = content;
  59950. };
  59951. VirtualFileSystem.prototype.bindFS = function (data) {
  59952. this.dataSystem = data || {};
  59953. };
  59954. function fixFilename(filename) {
  59955. if (filename.indexOf(__dirname) === 0) {
  59956. filename = filename.substring(__dirname.length);
  59957. }
  59958. if (filename.indexOf('/') === 0) {
  59959. filename = filename.substring(1);
  59960. }
  59961. return filename;
  59962. }
  59963. module.exports = new VirtualFileSystem();
  59964. /***/ }),
  59965. /***/ 4498:
  59966. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  59967. "use strict";
  59968. var isString = (__webpack_require__(6225).isString);
  59969. function buildColumnWidths(columns, availableWidth) {
  59970. var autoColumns = [],
  59971. autoMin = 0, autoMax = 0,
  59972. starColumns = [],
  59973. starMaxMin = 0,
  59974. starMaxMax = 0,
  59975. fixedColumns = [],
  59976. initial_availableWidth = availableWidth;
  59977. columns.forEach(function (column) {
  59978. if (isAutoColumn(column)) {
  59979. autoColumns.push(column);
  59980. autoMin += column._minWidth;
  59981. autoMax += column._maxWidth;
  59982. } else if (isStarColumn(column)) {
  59983. starColumns.push(column);
  59984. starMaxMin = Math.max(starMaxMin, column._minWidth);
  59985. starMaxMax = Math.max(starMaxMax, column._maxWidth);
  59986. } else {
  59987. fixedColumns.push(column);
  59988. }
  59989. });
  59990. fixedColumns.forEach(function (col) {
  59991. // width specified as %
  59992. if (isString(col.width) && /\d+%/.test(col.width)) {
  59993. col.width = parseFloat(col.width) * initial_availableWidth / 100;
  59994. }
  59995. if (col.width < (col._minWidth) && col.elasticWidth) {
  59996. col._calcWidth = col._minWidth;
  59997. } else {
  59998. col._calcWidth = col.width;
  59999. }
  60000. availableWidth -= col._calcWidth;
  60001. });
  60002. // http://www.freesoft.org/CIE/RFC/1942/18.htm
  60003. // http://www.w3.org/TR/CSS2/tables.html#width-layout
  60004. // http://dev.w3.org/csswg/css3-tables-algorithms/Overview.src.htm
  60005. var minW = autoMin + starMaxMin * starColumns.length;
  60006. var maxW = autoMax + starMaxMax * starColumns.length;
  60007. if (minW >= availableWidth) {
  60008. // case 1 - there's no way to fit all columns within available width
  60009. // that's actually pretty bad situation with PDF as we have no horizontal scroll
  60010. // no easy workaround (unless we decide, in the future, to split single words)
  60011. // currently we simply use minWidths for all columns
  60012. autoColumns.forEach(function (col) {
  60013. col._calcWidth = col._minWidth;
  60014. });
  60015. starColumns.forEach(function (col) {
  60016. col._calcWidth = starMaxMin; // starMaxMin already contains padding
  60017. });
  60018. } else {
  60019. if (maxW < availableWidth) {
  60020. // case 2 - we can fit rest of the table within available space
  60021. autoColumns.forEach(function (col) {
  60022. col._calcWidth = col._maxWidth;
  60023. availableWidth -= col._calcWidth;
  60024. });
  60025. } else {
  60026. // maxW is too large, but minW fits within available width
  60027. var W = availableWidth - minW;
  60028. var D = maxW - minW;
  60029. autoColumns.forEach(function (col) {
  60030. var d = col._maxWidth - col._minWidth;
  60031. col._calcWidth = col._minWidth + d * W / D;
  60032. availableWidth -= col._calcWidth;
  60033. });
  60034. }
  60035. if (starColumns.length > 0) {
  60036. var starSize = availableWidth / starColumns.length;
  60037. starColumns.forEach(function (col) {
  60038. col._calcWidth = starSize;
  60039. });
  60040. }
  60041. }
  60042. }
  60043. function isAutoColumn(column) {
  60044. return column.width === 'auto';
  60045. }
  60046. function isStarColumn(column) {
  60047. return column.width === null || column.width === undefined || column.width === '*' || column.width === 'star';
  60048. }
  60049. //TODO: refactor and reuse in measureTable
  60050. function measureMinMax(columns) {
  60051. var result = { min: 0, max: 0 };
  60052. var maxStar = { min: 0, max: 0 };
  60053. var starCount = 0;
  60054. for (var i = 0, l = columns.length; i < l; i++) {
  60055. var c = columns[i];
  60056. if (isStarColumn(c)) {
  60057. maxStar.min = Math.max(maxStar.min, c._minWidth);
  60058. maxStar.max = Math.max(maxStar.max, c._maxWidth);
  60059. starCount++;
  60060. } else if (isAutoColumn(c)) {
  60061. result.min += c._minWidth;
  60062. result.max += c._maxWidth;
  60063. } else {
  60064. result.min += ((c.width !== undefined && c.width) || c._minWidth);
  60065. result.max += ((c.width !== undefined && c.width) || c._maxWidth);
  60066. }
  60067. }
  60068. if (starCount) {
  60069. result.min += starCount * maxStar.min;
  60070. result.max += starCount * maxStar.max;
  60071. }
  60072. return result;
  60073. }
  60074. /**
  60075. * Calculates column widths
  60076. * @private
  60077. */
  60078. module.exports = {
  60079. buildColumnWidths: buildColumnWidths,
  60080. measureMinMax: measureMinMax,
  60081. isAutoColumn: isAutoColumn,
  60082. isStarColumn: isStarColumn
  60083. };
  60084. /***/ }),
  60085. /***/ 1728:
  60086. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  60087. "use strict";
  60088. /*eslint no-unused-vars: ["error", {"args": "none"}]*/
  60089. var TextTools = __webpack_require__(1350);
  60090. var StyleContextStack = __webpack_require__(7597);
  60091. var ColumnCalculator = __webpack_require__(4498);
  60092. var isString = (__webpack_require__(6225).isString);
  60093. var isNumber = (__webpack_require__(6225).isNumber);
  60094. var isObject = (__webpack_require__(6225).isObject);
  60095. var isArray = (__webpack_require__(6225).isArray);
  60096. var fontStringify = (__webpack_require__(6225).fontStringify);
  60097. var getNodeId = (__webpack_require__(6225).getNodeId);
  60098. var pack = (__webpack_require__(6225).pack);
  60099. var qrEncoder = __webpack_require__(145);
  60100. /**
  60101. * @private
  60102. */
  60103. function DocMeasure(fontProvider, styleDictionary, defaultStyle, imageMeasure, svgMeasure, tableLayouts, images) {
  60104. this.textTools = new TextTools(fontProvider);
  60105. this.styleStack = new StyleContextStack(styleDictionary, defaultStyle);
  60106. this.imageMeasure = imageMeasure;
  60107. this.svgMeasure = svgMeasure;
  60108. this.tableLayouts = tableLayouts;
  60109. this.images = images;
  60110. this.autoImageIndex = 1;
  60111. }
  60112. /**
  60113. * Measures all nodes and sets min/max-width properties required for the second
  60114. * layout-pass.
  60115. * @param {Object} docStructure document-definition-object
  60116. * @return {Object} document-measurement-object
  60117. */
  60118. DocMeasure.prototype.measureDocument = function (docStructure) {
  60119. return this.measureNode(docStructure);
  60120. };
  60121. DocMeasure.prototype.measureNode = function (node) {
  60122. var self = this;
  60123. return this.styleStack.auto(node, function () {
  60124. // TODO: refactor + rethink whether this is the proper way to handle margins
  60125. node._margin = getNodeMargin(node);
  60126. if (node.columns) {
  60127. return extendMargins(self.measureColumns(node));
  60128. } else if (node.stack) {
  60129. return extendMargins(self.measureVerticalContainer(node));
  60130. } else if (node.ul) {
  60131. return extendMargins(self.measureUnorderedList(node));
  60132. } else if (node.ol) {
  60133. return extendMargins(self.measureOrderedList(node));
  60134. } else if (node.table) {
  60135. return extendMargins(self.measureTable(node));
  60136. } else if (node.text !== undefined) {
  60137. return extendMargins(self.measureLeaf(node));
  60138. } else if (node.toc) {
  60139. return extendMargins(self.measureToc(node));
  60140. } else if (node.image) {
  60141. return extendMargins(self.measureImage(node));
  60142. } else if (node.svg) {
  60143. return extendMargins(self.measureSVG(node));
  60144. } else if (node.canvas) {
  60145. return extendMargins(self.measureCanvas(node));
  60146. } else if (node.qr) {
  60147. return extendMargins(self.measureQr(node));
  60148. } else {
  60149. throw 'Unrecognized document structure: ' + JSON.stringify(node, fontStringify);
  60150. }
  60151. });
  60152. function extendMargins(node) {
  60153. var margin = node._margin;
  60154. if (margin) {
  60155. node._minWidth += margin[0] + margin[2];
  60156. node._maxWidth += margin[0] + margin[2];
  60157. }
  60158. return node;
  60159. }
  60160. function getNodeMargin() {
  60161. function processSingleMargins(node, currentMargin) {
  60162. if (node.marginLeft || node.marginTop || node.marginRight || node.marginBottom) {
  60163. return [
  60164. node.marginLeft || currentMargin[0] || 0,
  60165. node.marginTop || currentMargin[1] || 0,
  60166. node.marginRight || currentMargin[2] || 0,
  60167. node.marginBottom || currentMargin[3] || 0
  60168. ];
  60169. }
  60170. return currentMargin;
  60171. }
  60172. function flattenStyleArray(styleArray) {
  60173. var flattenedStyles = {};
  60174. for (var i = styleArray.length - 1; i >= 0; i--) {
  60175. var styleName = styleArray[i];
  60176. var style = self.styleStack.styleDictionary[styleName];
  60177. for (var key in style) {
  60178. if (style.hasOwnProperty(key)) {
  60179. flattenedStyles[key] = style[key];
  60180. }
  60181. }
  60182. }
  60183. return flattenedStyles;
  60184. }
  60185. function convertMargin(margin) {
  60186. if (isNumber(margin)) {
  60187. margin = [margin, margin, margin, margin];
  60188. } else if (isArray(margin)) {
  60189. if (margin.length === 2) {
  60190. margin = [margin[0], margin[1], margin[0], margin[1]];
  60191. }
  60192. }
  60193. return margin;
  60194. }
  60195. var margin = [undefined, undefined, undefined, undefined];
  60196. if (node.style) {
  60197. var styleArray = isArray(node.style) ? node.style : [node.style];
  60198. var flattenedStyleArray = flattenStyleArray(styleArray);
  60199. if (flattenedStyleArray) {
  60200. margin = processSingleMargins(flattenedStyleArray, margin);
  60201. }
  60202. if (flattenedStyleArray.margin) {
  60203. margin = convertMargin(flattenedStyleArray.margin);
  60204. }
  60205. }
  60206. margin = processSingleMargins(node, margin);
  60207. if (node.margin) {
  60208. margin = convertMargin(node.margin);
  60209. }
  60210. if (margin[0] === undefined && margin[1] === undefined && margin[2] === undefined && margin[3] === undefined) {
  60211. return null;
  60212. } else {
  60213. return margin;
  60214. }
  60215. }
  60216. };
  60217. DocMeasure.prototype.convertIfBase64Image = function (node) {
  60218. if (/^data:image\/(jpeg|jpg|png);base64,/.test(node.image)) {
  60219. var label = '$$pdfmake$$' + this.autoImageIndex++;
  60220. this.images[label] = node.image;
  60221. node.image = label;
  60222. }
  60223. };
  60224. DocMeasure.prototype.measureImageWithDimensions = function (node, dimensions) {
  60225. if (node.fit) {
  60226. var factor = (dimensions.width / dimensions.height > node.fit[0] / node.fit[1]) ? node.fit[0] / dimensions.width : node.fit[1] / dimensions.height;
  60227. node._width = node._minWidth = node._maxWidth = dimensions.width * factor;
  60228. node._height = dimensions.height * factor;
  60229. } else {
  60230. node._width = node._minWidth = node._maxWidth = node.width || dimensions.width;
  60231. node._height = node.height || (dimensions.height * node._width / dimensions.width);
  60232. if (isNumber(node.maxWidth) && node.maxWidth < node._width) {
  60233. node._width = node._minWidth = node._maxWidth = node.maxWidth;
  60234. node._height = node._width * dimensions.height / dimensions.width;
  60235. }
  60236. if (isNumber(node.maxHeight) && node.maxHeight < node._height) {
  60237. node._height = node.maxHeight;
  60238. node._width = node._minWidth = node._maxWidth = node._height * dimensions.width / dimensions.height;
  60239. }
  60240. if (isNumber(node.minWidth) && node.minWidth > node._width) {
  60241. node._width = node._minWidth = node._maxWidth = node.minWidth;
  60242. node._height = node._width * dimensions.height / dimensions.width;
  60243. }
  60244. if (isNumber(node.minHeight) && node.minHeight > node._height) {
  60245. node._height = node.minHeight;
  60246. node._width = node._minWidth = node._maxWidth = node._height * dimensions.width / dimensions.height;
  60247. }
  60248. }
  60249. node._alignment = this.styleStack.getProperty('alignment');
  60250. };
  60251. DocMeasure.prototype.measureImage = function (node) {
  60252. if (this.images) {
  60253. this.convertIfBase64Image(node);
  60254. }
  60255. var dimensions = this.imageMeasure.measureImage(node.image);
  60256. this.measureImageWithDimensions(node, dimensions);
  60257. return node;
  60258. };
  60259. DocMeasure.prototype.measureSVG = function (node) {
  60260. var dimensions = this.svgMeasure.measureSVG(node.svg);
  60261. this.measureImageWithDimensions(node, dimensions);
  60262. node.font = this.styleStack.getProperty('font');
  60263. // scale SVG based on final dimension
  60264. node.svg = this.svgMeasure.writeDimensions(node.svg, {
  60265. width: node._width,
  60266. height: node._height
  60267. });
  60268. return node;
  60269. };
  60270. DocMeasure.prototype.measureLeaf = function (node) {
  60271. if (node._textRef && node._textRef._textNodeRef.text) {
  60272. node.text = node._textRef._textNodeRef.text;
  60273. }
  60274. // Make sure style properties of the node itself are considered when building inlines.
  60275. // We could also just pass [node] to buildInlines, but that fails for bullet points.
  60276. var styleStack = this.styleStack.clone();
  60277. styleStack.push(node);
  60278. var data = this.textTools.buildInlines(node.text, styleStack);
  60279. node._inlines = data.items;
  60280. node._minWidth = data.minWidth;
  60281. node._maxWidth = data.maxWidth;
  60282. return node;
  60283. };
  60284. DocMeasure.prototype.measureToc = function (node) {
  60285. if (node.toc.title) {
  60286. node.toc.title = this.measureNode(node.toc.title);
  60287. }
  60288. if (node.toc._items.length > 0) {
  60289. var body = [];
  60290. var textStyle = node.toc.textStyle || {};
  60291. var numberStyle = node.toc.numberStyle || textStyle;
  60292. var textMargin = node.toc.textMargin || [0, 0, 0, 0];
  60293. for (var i = 0, l = node.toc._items.length; i < l; i++) {
  60294. var item = node.toc._items[i];
  60295. var lineStyle = item._textNodeRef.tocStyle || textStyle;
  60296. var lineMargin = item._textNodeRef.tocMargin || textMargin;
  60297. var lineNumberStyle = item._textNodeRef.tocNumberStyle || numberStyle;
  60298. var destination = getNodeId(item._nodeRef);
  60299. body.push([
  60300. { text: item._textNodeRef.text, linkToDestination: destination, alignment: 'left', style: lineStyle, margin: lineMargin },
  60301. { text: '00000', linkToDestination: destination, alignment: 'right', _tocItemRef: item._nodeRef, style: lineNumberStyle, margin: [0, lineMargin[1], 0, lineMargin[3]] }
  60302. ]);
  60303. }
  60304. node.toc._table = {
  60305. table: {
  60306. dontBreakRows: true,
  60307. widths: ['*', 'auto'],
  60308. body: body
  60309. },
  60310. layout: 'noBorders'
  60311. };
  60312. node.toc._table = this.measureNode(node.toc._table);
  60313. }
  60314. return node;
  60315. };
  60316. DocMeasure.prototype.measureVerticalContainer = function (node) {
  60317. var items = node.stack;
  60318. node._minWidth = 0;
  60319. node._maxWidth = 0;
  60320. for (var i = 0, l = items.length; i < l; i++) {
  60321. items[i] = this.measureNode(items[i]);
  60322. node._minWidth = Math.max(node._minWidth, items[i]._minWidth);
  60323. node._maxWidth = Math.max(node._maxWidth, items[i]._maxWidth);
  60324. }
  60325. return node;
  60326. };
  60327. DocMeasure.prototype.gapSizeForList = function () {
  60328. return this.textTools.sizeOfString('9. ', this.styleStack);
  60329. };
  60330. DocMeasure.prototype.buildUnorderedMarker = function (styleStack, gapSize, type) {
  60331. function buildDisc(gapSize, color) {
  60332. // TODO: ascender-based calculations
  60333. var radius = gapSize.fontSize / 6;
  60334. return {
  60335. canvas: [{
  60336. x: radius,
  60337. y: (gapSize.height / gapSize.lineHeight) + gapSize.descender - gapSize.fontSize / 3,
  60338. r1: radius,
  60339. r2: radius,
  60340. type: 'ellipse',
  60341. color: color
  60342. }]
  60343. };
  60344. }
  60345. function buildSquare(gapSize, color) {
  60346. // TODO: ascender-based calculations
  60347. var size = gapSize.fontSize / 3;
  60348. return {
  60349. canvas: [{
  60350. x: 0,
  60351. y: (gapSize.height / gapSize.lineHeight) + gapSize.descender - (gapSize.fontSize / 3) - (size / 2),
  60352. h: size,
  60353. w: size,
  60354. type: 'rect',
  60355. color: color
  60356. }]
  60357. };
  60358. }
  60359. function buildCircle(gapSize, color) {
  60360. // TODO: ascender-based calculations
  60361. var radius = gapSize.fontSize / 6;
  60362. return {
  60363. canvas: [{
  60364. x: radius,
  60365. y: (gapSize.height / gapSize.lineHeight) + gapSize.descender - gapSize.fontSize / 3,
  60366. r1: radius,
  60367. r2: radius,
  60368. type: 'ellipse',
  60369. lineColor: color
  60370. }]
  60371. };
  60372. }
  60373. var marker;
  60374. var color = styleStack.getProperty('markerColor') || styleStack.getProperty('color') || 'black';
  60375. switch (type) {
  60376. case 'circle':
  60377. marker = buildCircle(gapSize, color);
  60378. break;
  60379. case 'square':
  60380. marker = buildSquare(gapSize, color);
  60381. break;
  60382. case 'none':
  60383. marker = {};
  60384. break;
  60385. case 'disc':
  60386. default:
  60387. marker = buildDisc(gapSize, color);
  60388. break;
  60389. }
  60390. marker._minWidth = marker._maxWidth = gapSize.width;
  60391. marker._minHeight = marker._maxHeight = gapSize.height;
  60392. return marker;
  60393. };
  60394. DocMeasure.prototype.buildOrderedMarker = function (counter, styleStack, type, separator) {
  60395. function prepareAlpha(counter) {
  60396. function toAlpha(num) {
  60397. return (num >= 26 ? toAlpha((num / 26 >> 0) - 1) : '') + 'abcdefghijklmnopqrstuvwxyz'[num % 26 >> 0];
  60398. }
  60399. if (counter < 1) {
  60400. return counter.toString();
  60401. }
  60402. return toAlpha(counter - 1);
  60403. }
  60404. function prepareRoman(counter) {
  60405. if (counter < 1 || counter > 4999) {
  60406. return counter.toString();
  60407. }
  60408. var num = counter;
  60409. var lookup = { M: 1000, CM: 900, D: 500, CD: 400, C: 100, XC: 90, L: 50, XL: 40, X: 10, IX: 9, V: 5, IV: 4, I: 1 }, roman = '', i;
  60410. for (i in lookup) {
  60411. while (num >= lookup[i]) {
  60412. roman += i;
  60413. num -= lookup[i];
  60414. }
  60415. }
  60416. return roman;
  60417. }
  60418. function prepareDecimal(counter) {
  60419. return counter.toString();
  60420. }
  60421. var counterText;
  60422. switch (type) {
  60423. case 'none':
  60424. counterText = null;
  60425. break;
  60426. case 'upper-alpha':
  60427. counterText = prepareAlpha(counter).toUpperCase();
  60428. break;
  60429. case 'lower-alpha':
  60430. counterText = prepareAlpha(counter);
  60431. break;
  60432. case 'upper-roman':
  60433. counterText = prepareRoman(counter);
  60434. break;
  60435. case 'lower-roman':
  60436. counterText = prepareRoman(counter).toLowerCase();
  60437. break;
  60438. case 'decimal':
  60439. default:
  60440. counterText = prepareDecimal(counter);
  60441. break;
  60442. }
  60443. if (counterText === null) {
  60444. return {};
  60445. }
  60446. if (separator) {
  60447. if (isArray(separator)) {
  60448. if (separator[0]) {
  60449. counterText = separator[0] + counterText;
  60450. }
  60451. if (separator[1]) {
  60452. counterText += separator[1];
  60453. }
  60454. counterText += ' ';
  60455. } else {
  60456. counterText += separator + ' ';
  60457. }
  60458. }
  60459. var textArray = { text: counterText };
  60460. var markerColor = styleStack.getProperty('markerColor');
  60461. if (markerColor) {
  60462. textArray.color = markerColor;
  60463. }
  60464. return { _inlines: this.textTools.buildInlines(textArray, styleStack).items };
  60465. };
  60466. DocMeasure.prototype.measureUnorderedList = function (node) {
  60467. var style = this.styleStack.clone();
  60468. var items = node.ul;
  60469. node.type = node.type || 'disc';
  60470. node._gapSize = this.gapSizeForList();
  60471. node._minWidth = 0;
  60472. node._maxWidth = 0;
  60473. for (var i = 0, l = items.length; i < l; i++) {
  60474. var item = items[i] = this.measureNode(items[i]);
  60475. if (!item.ol && !item.ul) {
  60476. item.listMarker = this.buildUnorderedMarker(style, node._gapSize, item.listType || node.type);
  60477. }
  60478. node._minWidth = Math.max(node._minWidth, items[i]._minWidth + node._gapSize.width);
  60479. node._maxWidth = Math.max(node._maxWidth, items[i]._maxWidth + node._gapSize.width);
  60480. }
  60481. return node;
  60482. };
  60483. DocMeasure.prototype.measureOrderedList = function (node) {
  60484. var style = this.styleStack.clone();
  60485. var items = node.ol;
  60486. node.type = node.type || 'decimal';
  60487. node.separator = node.separator || '.';
  60488. node.reversed = node.reversed || false;
  60489. if (!isNumber(node.start)) {
  60490. node.start = node.reversed ? items.length : 1;
  60491. }
  60492. node._gapSize = this.gapSizeForList();
  60493. node._minWidth = 0;
  60494. node._maxWidth = 0;
  60495. var counter = node.start;
  60496. for (var i = 0, l = items.length; i < l; i++) {
  60497. var item = items[i] = this.measureNode(items[i]);
  60498. if (!item.ol && !item.ul) {
  60499. var counterValue = isNumber(item.counter) ? item.counter : counter;
  60500. item.listMarker = this.buildOrderedMarker(counterValue, style, item.listType || node.type, node.separator);
  60501. if (item.listMarker._inlines) {
  60502. node._gapSize.width = Math.max(node._gapSize.width, item.listMarker._inlines[0].width);
  60503. }
  60504. } // TODO: else - nested lists numbering
  60505. node._minWidth = Math.max(node._minWidth, items[i]._minWidth);
  60506. node._maxWidth = Math.max(node._maxWidth, items[i]._maxWidth);
  60507. if (node.reversed) {
  60508. counter--;
  60509. } else {
  60510. counter++;
  60511. }
  60512. }
  60513. node._minWidth += node._gapSize.width;
  60514. node._maxWidth += node._gapSize.width;
  60515. for (var i = 0, l = items.length; i < l; i++) {
  60516. var item = items[i];
  60517. if (!item.ol && !item.ul) {
  60518. item.listMarker._minWidth = item.listMarker._maxWidth = node._gapSize.width;
  60519. }
  60520. }
  60521. return node;
  60522. };
  60523. DocMeasure.prototype.measureColumns = function (node) {
  60524. var columns = node.columns;
  60525. node._gap = this.styleStack.getProperty('columnGap') || 0;
  60526. for (var i = 0, l = columns.length; i < l; i++) {
  60527. columns[i] = this.measureNode(columns[i]);
  60528. }
  60529. var measures = ColumnCalculator.measureMinMax(columns);
  60530. var numGaps = (columns.length > 0) ? (columns.length - 1) : 0;
  60531. node._minWidth = measures.min + node._gap * numGaps;
  60532. node._maxWidth = measures.max + node._gap * numGaps;
  60533. return node;
  60534. };
  60535. DocMeasure.prototype.measureTable = function (node) {
  60536. extendTableWidths(node);
  60537. node._layout = getLayout(this.tableLayouts);
  60538. node._offsets = getOffsets(node._layout);
  60539. var colSpans = [];
  60540. var col, row, cols, rows;
  60541. for (col = 0, cols = node.table.body[0].length; col < cols; col++) {
  60542. var c = node.table.widths[col];
  60543. c._minWidth = 0;
  60544. c._maxWidth = 0;
  60545. for (row = 0, rows = node.table.body.length; row < rows; row++) {
  60546. var rowData = node.table.body[row];
  60547. var data = rowData[col];
  60548. if (data === undefined) {
  60549. console.error('Malformed table row ', rowData, 'in node ', node);
  60550. throw 'Malformed table row, a cell is undefined.';
  60551. }
  60552. if (data === null) { // transform to object
  60553. data = '';
  60554. }
  60555. if (!data._span) {
  60556. data = rowData[col] = this.styleStack.auto(data, measureCb(this, data));
  60557. if (data.colSpan && data.colSpan > 1) {
  60558. markSpans(rowData, col, data.colSpan);
  60559. colSpans.push({ col: col, span: data.colSpan, minWidth: data._minWidth, maxWidth: data._maxWidth });
  60560. } else {
  60561. c._minWidth = Math.max(c._minWidth, data._minWidth);
  60562. c._maxWidth = Math.max(c._maxWidth, data._maxWidth);
  60563. }
  60564. }
  60565. if (data.rowSpan && data.rowSpan > 1) {
  60566. markVSpans(node.table, row, col, data.rowSpan);
  60567. }
  60568. }
  60569. }
  60570. extendWidthsForColSpans();
  60571. var measures = ColumnCalculator.measureMinMax(node.table.widths);
  60572. node._minWidth = measures.min + node._offsets.total;
  60573. node._maxWidth = measures.max + node._offsets.total;
  60574. return node;
  60575. function measureCb(_this, data) {
  60576. return function () {
  60577. if (isObject(data)) {
  60578. data.fillColor = _this.styleStack.getProperty('fillColor');
  60579. data.fillOpacity = _this.styleStack.getProperty('fillOpacity');
  60580. }
  60581. return _this.measureNode(data);
  60582. };
  60583. }
  60584. function getLayout(tableLayouts) {
  60585. var layout = node.layout;
  60586. if (isString(layout)) {
  60587. layout = tableLayouts[layout];
  60588. }
  60589. var defaultLayout = {
  60590. hLineWidth: function (i, node) {
  60591. return 1;
  60592. },
  60593. vLineWidth: function (i, node) {
  60594. return 1;
  60595. },
  60596. hLineColor: function (i, node) {
  60597. return 'black';
  60598. },
  60599. vLineColor: function (i, node) {
  60600. return 'black';
  60601. },
  60602. hLineStyle: function (i, node) {
  60603. return null;
  60604. },
  60605. vLineStyle: function (i, node) {
  60606. return null;
  60607. },
  60608. paddingLeft: function (i, node) {
  60609. return 4;
  60610. },
  60611. paddingRight: function (i, node) {
  60612. return 4;
  60613. },
  60614. paddingTop: function (i, node) {
  60615. return 2;
  60616. },
  60617. paddingBottom: function (i, node) {
  60618. return 2;
  60619. },
  60620. fillColor: function (i, node) {
  60621. return null;
  60622. },
  60623. fillOpacity: function (i, node) {
  60624. return 1;
  60625. },
  60626. defaultBorder: true
  60627. };
  60628. return pack(defaultLayout, layout);
  60629. }
  60630. function getOffsets(layout) {
  60631. var offsets = [];
  60632. var totalOffset = 0;
  60633. var prevRightPadding = 0;
  60634. for (var i = 0, l = node.table.widths.length; i < l; i++) {
  60635. var lOffset = prevRightPadding + layout.vLineWidth(i, node) + layout.paddingLeft(i, node);
  60636. offsets.push(lOffset);
  60637. totalOffset += lOffset;
  60638. prevRightPadding = layout.paddingRight(i, node);
  60639. }
  60640. totalOffset += prevRightPadding + layout.vLineWidth(node.table.widths.length, node);
  60641. return {
  60642. total: totalOffset,
  60643. offsets: offsets
  60644. };
  60645. }
  60646. function extendWidthsForColSpans() {
  60647. var q, j;
  60648. for (var i = 0, l = colSpans.length; i < l; i++) {
  60649. var span = colSpans[i];
  60650. var currentMinMax = getMinMax(span.col, span.span, node._offsets);
  60651. var minDifference = span.minWidth - currentMinMax.minWidth;
  60652. var maxDifference = span.maxWidth - currentMinMax.maxWidth;
  60653. if (minDifference > 0) {
  60654. q = minDifference / span.span;
  60655. for (j = 0; j < span.span; j++) {
  60656. node.table.widths[span.col + j]._minWidth += q;
  60657. }
  60658. }
  60659. if (maxDifference > 0) {
  60660. q = maxDifference / span.span;
  60661. for (j = 0; j < span.span; j++) {
  60662. node.table.widths[span.col + j]._maxWidth += q;
  60663. }
  60664. }
  60665. }
  60666. }
  60667. function getMinMax(col, span, offsets) {
  60668. var result = { minWidth: 0, maxWidth: 0 };
  60669. for (var i = 0; i < span; i++) {
  60670. result.minWidth += node.table.widths[col + i]._minWidth + (i ? offsets.offsets[col + i] : 0);
  60671. result.maxWidth += node.table.widths[col + i]._maxWidth + (i ? offsets.offsets[col + i] : 0);
  60672. }
  60673. return result;
  60674. }
  60675. function markSpans(rowData, col, span) {
  60676. for (var i = 1; i < span; i++) {
  60677. rowData[col + i] = {
  60678. _span: true,
  60679. _minWidth: 0,
  60680. _maxWidth: 0,
  60681. rowSpan: rowData[col].rowSpan
  60682. };
  60683. }
  60684. }
  60685. function markVSpans(table, row, col, span) {
  60686. for (var i = 1; i < span; i++) {
  60687. table.body[row + i][col] = {
  60688. _span: true,
  60689. _minWidth: 0,
  60690. _maxWidth: 0,
  60691. fillColor: table.body[row][col].fillColor,
  60692. fillOpacity: table.body[row][col].fillOpacity
  60693. };
  60694. }
  60695. }
  60696. function extendTableWidths(node) {
  60697. if (!node.table.widths) {
  60698. node.table.widths = 'auto';
  60699. }
  60700. if (isString(node.table.widths)) {
  60701. node.table.widths = [node.table.widths];
  60702. while (node.table.widths.length < node.table.body[0].length) {
  60703. node.table.widths.push(node.table.widths[node.table.widths.length - 1]);
  60704. }
  60705. }
  60706. for (var i = 0, l = node.table.widths.length; i < l; i++) {
  60707. var w = node.table.widths[i];
  60708. if (isNumber(w) || isString(w)) {
  60709. node.table.widths[i] = { width: w };
  60710. }
  60711. }
  60712. }
  60713. };
  60714. DocMeasure.prototype.measureCanvas = function (node) {
  60715. var w = 0, h = 0;
  60716. for (var i = 0, l = node.canvas.length; i < l; i++) {
  60717. var vector = node.canvas[i];
  60718. switch (vector.type) {
  60719. case 'ellipse':
  60720. w = Math.max(w, vector.x + vector.r1);
  60721. h = Math.max(h, vector.y + vector.r2);
  60722. break;
  60723. case 'rect':
  60724. w = Math.max(w, vector.x + vector.w);
  60725. h = Math.max(h, vector.y + vector.h);
  60726. break;
  60727. case 'line':
  60728. w = Math.max(w, vector.x1, vector.x2);
  60729. h = Math.max(h, vector.y1, vector.y2);
  60730. break;
  60731. case 'polyline':
  60732. for (var i2 = 0, l2 = vector.points.length; i2 < l2; i2++) {
  60733. w = Math.max(w, vector.points[i2].x);
  60734. h = Math.max(h, vector.points[i2].y);
  60735. }
  60736. break;
  60737. }
  60738. }
  60739. node._minWidth = node._maxWidth = w;
  60740. node._minHeight = node._maxHeight = h;
  60741. node._alignment = this.styleStack.getProperty('alignment');
  60742. return node;
  60743. };
  60744. DocMeasure.prototype.measureQr = function (node) {
  60745. node = qrEncoder.measure(node);
  60746. node._alignment = this.styleStack.getProperty('alignment');
  60747. return node;
  60748. };
  60749. module.exports = DocMeasure;
  60750. /***/ }),
  60751. /***/ 4889:
  60752. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  60753. "use strict";
  60754. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  60755. var isString = (__webpack_require__(6225).isString);
  60756. var isNumber = (__webpack_require__(6225).isNumber);
  60757. var isBoolean = (__webpack_require__(6225).isBoolean);
  60758. var isArray = (__webpack_require__(6225).isArray);
  60759. var isUndefined = (__webpack_require__(6225).isUndefined);
  60760. var fontStringify = (__webpack_require__(6225).fontStringify);
  60761. function DocPreprocessor() {
  60762. }
  60763. DocPreprocessor.prototype.preprocessDocument = function (docStructure) {
  60764. this.parentNode = null;
  60765. this.tocs = [];
  60766. this.nodeReferences = [];
  60767. return this.preprocessNode(docStructure);
  60768. };
  60769. DocPreprocessor.prototype.preprocessNode = function (node) {
  60770. // expand shortcuts and casting values
  60771. if (isArray(node)) {
  60772. node = { stack: node };
  60773. } else if (isString(node)) {
  60774. node = { text: node };
  60775. } else if (isNumber(node) || isBoolean(node)) {
  60776. node = { text: node.toString() };
  60777. } else if (node === undefined || node === null) {
  60778. node = { text: '' };
  60779. } else if (Object.keys(node).length === 0) { // empty object
  60780. node = { text: '' };
  60781. } else if ('text' in node && (node.text === undefined || node.text === null)) {
  60782. node.text = '';
  60783. }
  60784. if (node.columns) {
  60785. return this.preprocessColumns(node);
  60786. } else if (node.stack) {
  60787. return this.preprocessVerticalContainer(node);
  60788. } else if (node.ul) {
  60789. return this.preprocessList(node);
  60790. } else if (node.ol) {
  60791. return this.preprocessList(node);
  60792. } else if (node.table) {
  60793. return this.preprocessTable(node);
  60794. } else if (node.text !== undefined) {
  60795. return this.preprocessText(node);
  60796. } else if (node.toc) {
  60797. return this.preprocessToc(node);
  60798. } else if (node.image) {
  60799. return this.preprocessImage(node);
  60800. } else if (node.svg) {
  60801. return this.preprocessSVG(node);
  60802. } else if (node.canvas) {
  60803. return this.preprocessCanvas(node);
  60804. } else if (node.qr) {
  60805. return this.preprocessQr(node);
  60806. } else if (node.pageReference || node.textReference) {
  60807. return this.preprocessText(node);
  60808. } else {
  60809. throw 'Unrecognized document structure: ' + JSON.stringify(node, fontStringify);
  60810. }
  60811. };
  60812. DocPreprocessor.prototype.preprocessColumns = function (node) {
  60813. var columns = node.columns;
  60814. for (var i = 0, l = columns.length; i < l; i++) {
  60815. columns[i] = this.preprocessNode(columns[i]);
  60816. }
  60817. return node;
  60818. };
  60819. DocPreprocessor.prototype.preprocessVerticalContainer = function (node) {
  60820. var items = node.stack;
  60821. for (var i = 0, l = items.length; i < l; i++) {
  60822. items[i] = this.preprocessNode(items[i]);
  60823. }
  60824. return node;
  60825. };
  60826. DocPreprocessor.prototype.preprocessList = function (node) {
  60827. var items = node.ul || node.ol;
  60828. for (var i = 0, l = items.length; i < l; i++) {
  60829. items[i] = this.preprocessNode(items[i]);
  60830. }
  60831. return node;
  60832. };
  60833. DocPreprocessor.prototype.preprocessTable = function (node) {
  60834. var col, row, cols, rows;
  60835. for (col = 0, cols = node.table.body[0].length; col < cols; col++) {
  60836. for (row = 0, rows = node.table.body.length; row < rows; row++) {
  60837. var rowData = node.table.body[row];
  60838. var data = rowData[col];
  60839. if (data !== undefined) {
  60840. if (data === null) { // transform to object
  60841. data = '';
  60842. }
  60843. if (!data._span) {
  60844. rowData[col] = this.preprocessNode(data);
  60845. }
  60846. }
  60847. }
  60848. }
  60849. return node;
  60850. };
  60851. DocPreprocessor.prototype.preprocessText = function (node) {
  60852. if (node.tocItem) {
  60853. if (!isArray(node.tocItem)) {
  60854. node.tocItem = [node.tocItem];
  60855. }
  60856. for (var i = 0, l = node.tocItem.length; i < l; i++) {
  60857. if (!isString(node.tocItem[i])) {
  60858. node.tocItem[i] = '_default_';
  60859. }
  60860. var tocItemId = node.tocItem[i];
  60861. if (!this.tocs[tocItemId]) {
  60862. this.tocs[tocItemId] = { toc: { _items: [], _pseudo: true } };
  60863. }
  60864. if (!node.id) {
  60865. node.id = 'toc-' + tocItemId + '-' + this.tocs[tocItemId].toc._items.length;
  60866. }
  60867. var tocItemRef = {
  60868. _nodeRef: this._getNodeForNodeRef(node),
  60869. _textNodeRef: node
  60870. };
  60871. this.tocs[tocItemId].toc._items.push(tocItemRef);
  60872. }
  60873. }
  60874. if (node.id) {
  60875. if (this.nodeReferences[node.id]) {
  60876. if (!this.nodeReferences[node.id]._pseudo) {
  60877. throw "Node id '" + node.id + "' already exists";
  60878. }
  60879. this.nodeReferences[node.id]._nodeRef = this._getNodeForNodeRef(node);
  60880. this.nodeReferences[node.id]._textNodeRef = node;
  60881. this.nodeReferences[node.id]._pseudo = false;
  60882. } else {
  60883. this.nodeReferences[node.id] = {
  60884. _nodeRef: this._getNodeForNodeRef(node),
  60885. _textNodeRef: node
  60886. };
  60887. }
  60888. }
  60889. if (node.pageReference) {
  60890. if (!this.nodeReferences[node.pageReference]) {
  60891. this.nodeReferences[node.pageReference] = {
  60892. _nodeRef: {},
  60893. _textNodeRef: {},
  60894. _pseudo: true
  60895. };
  60896. }
  60897. node.text = '00000';
  60898. node.linkToDestination = node.pageReference;
  60899. node._pageRef = this.nodeReferences[node.pageReference];
  60900. }
  60901. if (node.textReference) {
  60902. if (!this.nodeReferences[node.textReference]) {
  60903. this.nodeReferences[node.textReference] = { _nodeRef: {}, _pseudo: true };
  60904. }
  60905. node.text = '';
  60906. node.linkToDestination = node.textReference;
  60907. node._textRef = this.nodeReferences[node.textReference];
  60908. }
  60909. if (node.text && node.text.text) {
  60910. node.text = [this.preprocessNode(node.text)];
  60911. } else if (isArray(node.text)) {
  60912. var isSetParentNode = false;
  60913. if (this.parentNode === null) {
  60914. this.parentNode = node;
  60915. isSetParentNode = true;
  60916. }
  60917. for (var i = 0, l = node.text.length; i < l; i++) {
  60918. node.text[i] = this.preprocessNode(node.text[i]);
  60919. }
  60920. if (isSetParentNode) {
  60921. this.parentNode = null;
  60922. }
  60923. }
  60924. return node;
  60925. };
  60926. DocPreprocessor.prototype.preprocessToc = function (node) {
  60927. if (!node.toc.id) {
  60928. node.toc.id = '_default_';
  60929. }
  60930. node.toc.title = node.toc.title ? this.preprocessNode(node.toc.title) : null;
  60931. node.toc._items = [];
  60932. if (this.tocs[node.toc.id]) {
  60933. if (!this.tocs[node.toc.id].toc._pseudo) {
  60934. throw "TOC '" + node.toc.id + "' already exists";
  60935. }
  60936. node.toc._items = this.tocs[node.toc.id].toc._items;
  60937. }
  60938. this.tocs[node.toc.id] = node;
  60939. return node;
  60940. };
  60941. DocPreprocessor.prototype.preprocessImage = function (node) {
  60942. if (!isUndefined(node.image.type) && !isUndefined(node.image.data) && (node.image.type === 'Buffer') && isArray(node.image.data)) {
  60943. node.image = Buffer.from(node.image.data);
  60944. }
  60945. return node;
  60946. };
  60947. DocPreprocessor.prototype.preprocessSVG = function (node) {
  60948. return node;
  60949. };
  60950. DocPreprocessor.prototype.preprocessCanvas = function (node) {
  60951. return node;
  60952. };
  60953. DocPreprocessor.prototype.preprocessQr = function (node) {
  60954. return node;
  60955. };
  60956. DocPreprocessor.prototype._getNodeForNodeRef = function (node) {
  60957. if (this.parentNode) {
  60958. return this.parentNode;
  60959. }
  60960. return node;
  60961. }
  60962. module.exports = DocPreprocessor;
  60963. /***/ }),
  60964. /***/ 3858:
  60965. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  60966. "use strict";
  60967. var TraversalTracker = __webpack_require__(8537);
  60968. var isString = (__webpack_require__(6225).isString);
  60969. /**
  60970. * Creates an instance of DocumentContext - a store for current x, y positions and available width/height.
  60971. * It facilitates column divisions and vertical sync
  60972. */
  60973. function DocumentContext(pageSize, pageMargins) {
  60974. this.pages = [];
  60975. this.pageMargins = pageMargins;
  60976. this.x = pageMargins.left;
  60977. this.availableWidth = pageSize.width - pageMargins.left - pageMargins.right;
  60978. this.availableHeight = 0;
  60979. this.page = -1;
  60980. this.snapshots = [];
  60981. this.endingCell = null;
  60982. this.tracker = new TraversalTracker();
  60983. this.backgroundLength = [];
  60984. this.addPage(pageSize);
  60985. }
  60986. DocumentContext.prototype.beginColumnGroup = function () {
  60987. this.snapshots.push({
  60988. x: this.x,
  60989. y: this.y,
  60990. availableHeight: this.availableHeight,
  60991. availableWidth: this.availableWidth,
  60992. page: this.page,
  60993. bottomMost: {
  60994. x: this.x,
  60995. y: this.y,
  60996. availableHeight: this.availableHeight,
  60997. availableWidth: this.availableWidth,
  60998. page: this.page
  60999. },
  61000. endingCell: this.endingCell,
  61001. lastColumnWidth: this.lastColumnWidth
  61002. });
  61003. this.lastColumnWidth = 0;
  61004. };
  61005. DocumentContext.prototype.beginColumn = function (width, offset, endingCell) {
  61006. var saved = this.snapshots[this.snapshots.length - 1];
  61007. this.calculateBottomMost(saved);
  61008. this.endingCell = endingCell;
  61009. this.page = saved.page;
  61010. this.x = this.x + this.lastColumnWidth + (offset || 0);
  61011. this.y = saved.y;
  61012. this.availableWidth = width; //saved.availableWidth - offset;
  61013. this.availableHeight = saved.availableHeight;
  61014. this.lastColumnWidth = width;
  61015. };
  61016. DocumentContext.prototype.calculateBottomMost = function (destContext) {
  61017. if (this.endingCell) {
  61018. this.saveContextInEndingCell(this.endingCell);
  61019. this.endingCell = null;
  61020. } else {
  61021. destContext.bottomMost = bottomMostContext(this, destContext.bottomMost);
  61022. }
  61023. };
  61024. DocumentContext.prototype.markEnding = function (endingCell) {
  61025. this.page = endingCell._columnEndingContext.page;
  61026. this.x = endingCell._columnEndingContext.x;
  61027. this.y = endingCell._columnEndingContext.y;
  61028. this.availableWidth = endingCell._columnEndingContext.availableWidth;
  61029. this.availableHeight = endingCell._columnEndingContext.availableHeight;
  61030. this.lastColumnWidth = endingCell._columnEndingContext.lastColumnWidth;
  61031. };
  61032. DocumentContext.prototype.saveContextInEndingCell = function (endingCell) {
  61033. endingCell._columnEndingContext = {
  61034. page: this.page,
  61035. x: this.x,
  61036. y: this.y,
  61037. availableHeight: this.availableHeight,
  61038. availableWidth: this.availableWidth,
  61039. lastColumnWidth: this.lastColumnWidth
  61040. };
  61041. };
  61042. DocumentContext.prototype.completeColumnGroup = function (height) {
  61043. var saved = this.snapshots.pop();
  61044. this.calculateBottomMost(saved);
  61045. this.endingCell = null;
  61046. this.x = saved.x;
  61047. var y = saved.bottomMost.y;
  61048. if (height) {
  61049. if (saved.page === saved.bottomMost.page) {
  61050. if ((saved.y + height) > y) {
  61051. y = saved.y + height;
  61052. }
  61053. } else {
  61054. y += height;
  61055. }
  61056. }
  61057. this.y = y;
  61058. this.page = saved.bottomMost.page;
  61059. this.availableWidth = saved.availableWidth;
  61060. this.availableHeight = saved.bottomMost.availableHeight;
  61061. if (height) {
  61062. this.availableHeight -= (y - saved.bottomMost.y);
  61063. }
  61064. this.lastColumnWidth = saved.lastColumnWidth;
  61065. };
  61066. DocumentContext.prototype.addMargin = function (left, right) {
  61067. this.x += left;
  61068. this.availableWidth -= left + (right || 0);
  61069. };
  61070. DocumentContext.prototype.moveDown = function (offset) {
  61071. this.y += offset;
  61072. this.availableHeight -= offset;
  61073. return this.availableHeight > 0;
  61074. };
  61075. DocumentContext.prototype.initializePage = function () {
  61076. this.y = this.pageMargins.top;
  61077. this.availableHeight = this.getCurrentPage().pageSize.height - this.pageMargins.top - this.pageMargins.bottom;
  61078. this.pageSnapshot().availableWidth = this.getCurrentPage().pageSize.width - this.pageMargins.left - this.pageMargins.right;
  61079. };
  61080. DocumentContext.prototype.pageSnapshot = function () {
  61081. if (this.snapshots[0]) {
  61082. return this.snapshots[0];
  61083. } else {
  61084. return this;
  61085. }
  61086. };
  61087. DocumentContext.prototype.moveTo = function (x, y) {
  61088. if (x !== undefined && x !== null) {
  61089. this.x = x;
  61090. this.availableWidth = this.getCurrentPage().pageSize.width - this.x - this.pageMargins.right;
  61091. }
  61092. if (y !== undefined && y !== null) {
  61093. this.y = y;
  61094. this.availableHeight = this.getCurrentPage().pageSize.height - this.y - this.pageMargins.bottom;
  61095. }
  61096. };
  61097. DocumentContext.prototype.moveToRelative = function (x, y) {
  61098. if (x !== undefined && x !== null) {
  61099. this.x = this.x + x;
  61100. }
  61101. if (y !== undefined && y !== null) {
  61102. this.y = this.y + y;
  61103. }
  61104. };
  61105. DocumentContext.prototype.beginDetachedBlock = function () {
  61106. this.snapshots.push({
  61107. x: this.x,
  61108. y: this.y,
  61109. availableHeight: this.availableHeight,
  61110. availableWidth: this.availableWidth,
  61111. page: this.page,
  61112. endingCell: this.endingCell,
  61113. lastColumnWidth: this.lastColumnWidth
  61114. });
  61115. };
  61116. DocumentContext.prototype.endDetachedBlock = function () {
  61117. var saved = this.snapshots.pop();
  61118. this.x = saved.x;
  61119. this.y = saved.y;
  61120. this.availableWidth = saved.availableWidth;
  61121. this.availableHeight = saved.availableHeight;
  61122. this.page = saved.page;
  61123. this.endingCell = saved.endingCell;
  61124. this.lastColumnWidth = saved.lastColumnWidth;
  61125. };
  61126. function pageOrientation(pageOrientationString, currentPageOrientation) {
  61127. if (pageOrientationString === undefined) {
  61128. return currentPageOrientation;
  61129. } else if (isString(pageOrientationString) && (pageOrientationString.toLowerCase() === 'landscape')) {
  61130. return 'landscape';
  61131. } else {
  61132. return 'portrait';
  61133. }
  61134. }
  61135. var getPageSize = function (currentPage, newPageOrientation) {
  61136. newPageOrientation = pageOrientation(newPageOrientation, currentPage.pageSize.orientation);
  61137. if (newPageOrientation !== currentPage.pageSize.orientation) {
  61138. return {
  61139. orientation: newPageOrientation,
  61140. width: currentPage.pageSize.height,
  61141. height: currentPage.pageSize.width
  61142. };
  61143. } else {
  61144. return {
  61145. orientation: currentPage.pageSize.orientation,
  61146. width: currentPage.pageSize.width,
  61147. height: currentPage.pageSize.height
  61148. };
  61149. }
  61150. };
  61151. DocumentContext.prototype.moveToNextPage = function (pageOrientation) {
  61152. var nextPageIndex = this.page + 1;
  61153. var prevPage = this.page;
  61154. var prevY = this.y;
  61155. var createNewPage = nextPageIndex >= this.pages.length;
  61156. if (createNewPage) {
  61157. var currentAvailableWidth = this.availableWidth;
  61158. var currentPageOrientation = this.getCurrentPage().pageSize.orientation;
  61159. var pageSize = getPageSize(this.getCurrentPage(), pageOrientation);
  61160. this.addPage(pageSize);
  61161. if (currentPageOrientation === pageSize.orientation) {
  61162. this.availableWidth = currentAvailableWidth;
  61163. }
  61164. } else {
  61165. this.page = nextPageIndex;
  61166. this.initializePage();
  61167. }
  61168. return {
  61169. newPageCreated: createNewPage,
  61170. prevPage: prevPage,
  61171. prevY: prevY,
  61172. y: this.y
  61173. };
  61174. };
  61175. DocumentContext.prototype.addPage = function (pageSize) {
  61176. var page = { items: [], pageSize: pageSize };
  61177. this.pages.push(page);
  61178. this.backgroundLength.push(0);
  61179. this.page = this.pages.length - 1;
  61180. this.initializePage();
  61181. this.tracker.emit('pageAdded');
  61182. return page;
  61183. };
  61184. DocumentContext.prototype.getCurrentPage = function () {
  61185. if (this.page < 0 || this.page >= this.pages.length) {
  61186. return null;
  61187. }
  61188. return this.pages[this.page];
  61189. };
  61190. DocumentContext.prototype.getCurrentPosition = function () {
  61191. var pageSize = this.getCurrentPage().pageSize;
  61192. var innerHeight = pageSize.height - this.pageMargins.top - this.pageMargins.bottom;
  61193. var innerWidth = pageSize.width - this.pageMargins.left - this.pageMargins.right;
  61194. return {
  61195. pageNumber: this.page + 1,
  61196. pageOrientation: pageSize.orientation,
  61197. pageInnerHeight: innerHeight,
  61198. pageInnerWidth: innerWidth,
  61199. left: this.x,
  61200. top: this.y,
  61201. verticalRatio: ((this.y - this.pageMargins.top) / innerHeight),
  61202. horizontalRatio: ((this.x - this.pageMargins.left) / innerWidth)
  61203. };
  61204. };
  61205. function bottomMostContext(c1, c2) {
  61206. var r;
  61207. if (c1.page > c2.page) {
  61208. r = c1;
  61209. } else if (c2.page > c1.page) {
  61210. r = c2;
  61211. } else {
  61212. r = (c1.y > c2.y) ? c1 : c2;
  61213. }
  61214. return {
  61215. page: r.page,
  61216. x: r.x,
  61217. y: r.y,
  61218. availableHeight: r.availableHeight,
  61219. availableWidth: r.availableWidth
  61220. };
  61221. }
  61222. module.exports = DocumentContext;
  61223. /***/ }),
  61224. /***/ 1196:
  61225. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  61226. "use strict";
  61227. var Line = __webpack_require__(4775);
  61228. var isNumber = (__webpack_require__(6225).isNumber);
  61229. var pack = (__webpack_require__(6225).pack);
  61230. var offsetVector = (__webpack_require__(6225).offsetVector);
  61231. var DocumentContext = __webpack_require__(3858);
  61232. /**
  61233. * Creates an instance of ElementWriter - a line/vector writer, which adds
  61234. * elements to current page and sets their positions based on the context
  61235. */
  61236. function ElementWriter(context, tracker) {
  61237. this.context = context;
  61238. this.contextStack = [];
  61239. this.tracker = tracker;
  61240. }
  61241. function addPageItem(page, item, index) {
  61242. if (index === null || index === undefined || index < 0 || index > page.items.length) {
  61243. page.items.push(item);
  61244. } else {
  61245. page.items.splice(index, 0, item);
  61246. }
  61247. }
  61248. ElementWriter.prototype.addLine = function (line, dontUpdateContextPosition, index) {
  61249. var height = line.getHeight();
  61250. var context = this.context;
  61251. var page = context.getCurrentPage(),
  61252. position = this.getCurrentPositionOnPage();
  61253. if (context.availableHeight < height || !page) {
  61254. return false;
  61255. }
  61256. line.x = context.x + (line.x || 0);
  61257. line.y = context.y + (line.y || 0);
  61258. this.alignLine(line);
  61259. addPageItem(page, {
  61260. type: 'line',
  61261. item: line
  61262. }, index);
  61263. this.tracker.emit('lineAdded', line);
  61264. if (!dontUpdateContextPosition) {
  61265. context.moveDown(height);
  61266. }
  61267. return position;
  61268. };
  61269. ElementWriter.prototype.alignLine = function (line) {
  61270. var width = this.context.availableWidth;
  61271. var lineWidth = line.getWidth();
  61272. var alignment = line.inlines && line.inlines.length > 0 && line.inlines[0].alignment;
  61273. var offset = 0;
  61274. switch (alignment) {
  61275. case 'right':
  61276. offset = width - lineWidth;
  61277. break;
  61278. case 'center':
  61279. offset = (width - lineWidth) / 2;
  61280. break;
  61281. }
  61282. if (offset) {
  61283. line.x = (line.x || 0) + offset;
  61284. }
  61285. if (alignment === 'justify' &&
  61286. !line.newLineForced &&
  61287. !line.lastLineInParagraph &&
  61288. line.inlines.length > 1) {
  61289. var additionalSpacing = (width - lineWidth) / (line.inlines.length - 1);
  61290. for (var i = 1, l = line.inlines.length; i < l; i++) {
  61291. offset = i * additionalSpacing;
  61292. line.inlines[i].x += offset;
  61293. line.inlines[i].justifyShift = additionalSpacing;
  61294. }
  61295. }
  61296. };
  61297. ElementWriter.prototype.addImage = function (image, index, type) {
  61298. var context = this.context;
  61299. var page = context.getCurrentPage(),
  61300. position = this.getCurrentPositionOnPage();
  61301. if (!page || (image.absolutePosition === undefined && context.availableHeight < image._height && page.items.length > 0)) {
  61302. return false;
  61303. }
  61304. if (image._x === undefined) {
  61305. image._x = image.x || 0;
  61306. }
  61307. image.x = context.x + image._x;
  61308. image.y = context.y;
  61309. this.alignImage(image);
  61310. addPageItem(page, {
  61311. type: type || 'image',
  61312. item: image
  61313. }, index);
  61314. context.moveDown(image._height);
  61315. return position;
  61316. };
  61317. ElementWriter.prototype.addSVG = function (image, index) {
  61318. return this.addImage(image, index, 'svg')
  61319. };
  61320. ElementWriter.prototype.addQr = function (qr, index) {
  61321. var context = this.context;
  61322. var page = context.getCurrentPage(),
  61323. position = this.getCurrentPositionOnPage();
  61324. if (!page || (qr.absolutePosition === undefined && context.availableHeight < qr._height)) {
  61325. return false;
  61326. }
  61327. if (qr._x === undefined) {
  61328. qr._x = qr.x || 0;
  61329. }
  61330. qr.x = context.x + qr._x;
  61331. qr.y = context.y;
  61332. this.alignImage(qr);
  61333. for (var i = 0, l = qr._canvas.length; i < l; i++) {
  61334. var vector = qr._canvas[i];
  61335. vector.x += qr.x;
  61336. vector.y += qr.y;
  61337. this.addVector(vector, true, true, index);
  61338. }
  61339. context.moveDown(qr._height);
  61340. return position;
  61341. };
  61342. ElementWriter.prototype.alignImage = function (image) {
  61343. var width = this.context.availableWidth;
  61344. var imageWidth = image._minWidth;
  61345. var offset = 0;
  61346. switch (image._alignment) {
  61347. case 'right':
  61348. offset = width - imageWidth;
  61349. break;
  61350. case 'center':
  61351. offset = (width - imageWidth) / 2;
  61352. break;
  61353. }
  61354. if (offset) {
  61355. image.x = (image.x || 0) + offset;
  61356. }
  61357. };
  61358. ElementWriter.prototype.alignCanvas = function (node) {
  61359. var width = this.context.availableWidth;
  61360. var canvasWidth = node._minWidth;
  61361. var offset = 0;
  61362. switch (node._alignment) {
  61363. case 'right':
  61364. offset = width - canvasWidth;
  61365. break;
  61366. case 'center':
  61367. offset = (width - canvasWidth) / 2;
  61368. break;
  61369. }
  61370. if (offset) {
  61371. node.canvas.forEach(function (vector) {
  61372. offsetVector(vector, offset, 0);
  61373. });
  61374. }
  61375. };
  61376. ElementWriter.prototype.addVector = function (vector, ignoreContextX, ignoreContextY, index) {
  61377. var context = this.context;
  61378. var page = context.getCurrentPage(),
  61379. position = this.getCurrentPositionOnPage();
  61380. if (page) {
  61381. offsetVector(vector, ignoreContextX ? 0 : context.x, ignoreContextY ? 0 : context.y);
  61382. addPageItem(page, {
  61383. type: 'vector',
  61384. item: vector
  61385. }, index);
  61386. return position;
  61387. }
  61388. };
  61389. ElementWriter.prototype.beginClip = function (width, height) {
  61390. var ctx = this.context;
  61391. var page = ctx.getCurrentPage();
  61392. page.items.push({
  61393. type: 'beginClip',
  61394. item: { x: ctx.x, y: ctx.y, width: width, height: height }
  61395. });
  61396. return true;
  61397. };
  61398. ElementWriter.prototype.endClip = function () {
  61399. var ctx = this.context;
  61400. var page = ctx.getCurrentPage();
  61401. page.items.push({
  61402. type: 'endClip'
  61403. });
  61404. return true;
  61405. };
  61406. function cloneLine(line) {
  61407. var result = new Line(line.maxWidth);
  61408. for (var key in line) {
  61409. if (line.hasOwnProperty(key)) {
  61410. result[key] = line[key];
  61411. }
  61412. }
  61413. return result;
  61414. }
  61415. ElementWriter.prototype.addFragment = function (block, useBlockXOffset, useBlockYOffset, dontUpdateContextPosition) {
  61416. var ctx = this.context;
  61417. var page = ctx.getCurrentPage();
  61418. if (!useBlockXOffset && block.height > ctx.availableHeight) {
  61419. return false;
  61420. }
  61421. block.items.forEach(function (item) {
  61422. switch (item.type) {
  61423. case 'line':
  61424. var l = cloneLine(item.item);
  61425. if (l._node) {
  61426. l._node.positions[0].pageNumber = ctx.page + 1;
  61427. }
  61428. l.x = (l.x || 0) + (useBlockXOffset ? (block.xOffset || 0) : ctx.x);
  61429. l.y = (l.y || 0) + (useBlockYOffset ? (block.yOffset || 0) : ctx.y);
  61430. page.items.push({
  61431. type: 'line',
  61432. item: l
  61433. });
  61434. break;
  61435. case 'vector':
  61436. var v = pack(item.item);
  61437. offsetVector(v, useBlockXOffset ? (block.xOffset || 0) : ctx.x, useBlockYOffset ? (block.yOffset || 0) : ctx.y);
  61438. page.items.push({
  61439. type: 'vector',
  61440. item: v
  61441. });
  61442. break;
  61443. case 'image':
  61444. case 'svg':
  61445. var img = pack(item.item);
  61446. img.x = (img.x || 0) + (useBlockXOffset ? (block.xOffset || 0) : ctx.x);
  61447. img.y = (img.y || 0) + (useBlockYOffset ? (block.yOffset || 0) : ctx.y);
  61448. page.items.push({
  61449. type: item.type,
  61450. item: img
  61451. });
  61452. break;
  61453. }
  61454. });
  61455. if (!dontUpdateContextPosition) {
  61456. ctx.moveDown(block.height);
  61457. }
  61458. return true;
  61459. };
  61460. /**
  61461. * Pushes the provided context onto the stack or creates a new one
  61462. *
  61463. * pushContext(context) - pushes the provided context and makes it current
  61464. * pushContext(width, height) - creates and pushes a new context with the specified width and height
  61465. * pushContext() - creates a new context for unbreakable blocks (with current availableWidth and full-page-height)
  61466. */
  61467. ElementWriter.prototype.pushContext = function (contextOrWidth, height) {
  61468. if (contextOrWidth === undefined) {
  61469. height = this.context.getCurrentPage().height - this.context.pageMargins.top - this.context.pageMargins.bottom;
  61470. contextOrWidth = this.context.availableWidth;
  61471. }
  61472. if (isNumber(contextOrWidth)) {
  61473. contextOrWidth = new DocumentContext({ width: contextOrWidth, height: height }, { left: 0, right: 0, top: 0, bottom: 0 });
  61474. }
  61475. this.contextStack.push(this.context);
  61476. this.context = contextOrWidth;
  61477. };
  61478. ElementWriter.prototype.popContext = function () {
  61479. this.context = this.contextStack.pop();
  61480. };
  61481. ElementWriter.prototype.getCurrentPositionOnPage = function () {
  61482. return (this.contextStack[0] || this.context).getCurrentPosition();
  61483. };
  61484. module.exports = ElementWriter;
  61485. /***/ }),
  61486. /***/ 2249:
  61487. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  61488. "use strict";
  61489. var isArray = (__webpack_require__(6225).isArray);
  61490. function typeName(bold, italics) {
  61491. var type = 'normal';
  61492. if (bold && italics) {
  61493. type = 'bolditalics';
  61494. } else if (bold) {
  61495. type = 'bold';
  61496. } else if (italics) {
  61497. type = 'italics';
  61498. }
  61499. return type;
  61500. }
  61501. function FontProvider(fontDescriptors, pdfKitDoc) {
  61502. this.fonts = {};
  61503. this.pdfKitDoc = pdfKitDoc;
  61504. this.fontCache = {};
  61505. for (var font in fontDescriptors) {
  61506. if (fontDescriptors.hasOwnProperty(font)) {
  61507. var fontDef = fontDescriptors[font];
  61508. this.fonts[font] = {
  61509. normal: fontDef.normal,
  61510. bold: fontDef.bold,
  61511. italics: fontDef.italics,
  61512. bolditalics: fontDef.bolditalics
  61513. };
  61514. }
  61515. }
  61516. }
  61517. FontProvider.prototype.getFontType = function (bold, italics) {
  61518. return typeName(bold, italics);
  61519. }
  61520. FontProvider.prototype.getFontFile = function (familyName, bold, italics) {
  61521. var type = this.getFontType(bold, italics);
  61522. if (!this.fonts[familyName] || !this.fonts[familyName][type]) {
  61523. return null;
  61524. }
  61525. return this.fonts[familyName][type];
  61526. }
  61527. FontProvider.prototype.provideFont = function (familyName, bold, italics) {
  61528. var type = this.getFontType(bold, italics);
  61529. if (this.getFontFile(familyName, bold, italics) === null) {
  61530. throw new Error('Font \'' + familyName + '\' in style \'' + type + '\' is not defined in the font section of the document definition.');
  61531. }
  61532. this.fontCache[familyName] = this.fontCache[familyName] || {};
  61533. if (!this.fontCache[familyName][type]) {
  61534. var def = this.fonts[familyName][type];
  61535. if (!isArray(def)) {
  61536. def = [def];
  61537. }
  61538. this.fontCache[familyName][type] = this.pdfKitDoc.font.apply(this.pdfKitDoc, def)._font;
  61539. }
  61540. return this.fontCache[familyName][type];
  61541. };
  61542. module.exports = FontProvider;
  61543. /***/ }),
  61544. /***/ 6225:
  61545. /***/ (function(module) {
  61546. "use strict";
  61547. function isString(variable) {
  61548. return typeof variable === 'string' || variable instanceof String;
  61549. }
  61550. function isNumber(variable) {
  61551. return typeof variable === 'number' || variable instanceof Number;
  61552. }
  61553. function isBoolean(variable) {
  61554. return typeof variable === 'boolean';
  61555. }
  61556. function isArray(variable) {
  61557. return Array.isArray(variable);
  61558. }
  61559. function isFunction(variable) {
  61560. return typeof variable === 'function';
  61561. }
  61562. function isObject(variable) {
  61563. return variable !== null && typeof variable === 'object';
  61564. }
  61565. function isNull(variable) {
  61566. return variable === null;
  61567. }
  61568. function isUndefined(variable) {
  61569. return variable === undefined;
  61570. }
  61571. function pack() {
  61572. var result = {};
  61573. for (var i = 0, l = arguments.length; i < l; i++) {
  61574. var obj = arguments[i];
  61575. if (obj) {
  61576. for (var key in obj) {
  61577. if (obj.hasOwnProperty(key)) {
  61578. result[key] = obj[key];
  61579. }
  61580. }
  61581. }
  61582. }
  61583. return result;
  61584. }
  61585. function offsetVector(vector, x, y) {
  61586. switch (vector.type) {
  61587. case 'ellipse':
  61588. case 'rect':
  61589. vector.x += x;
  61590. vector.y += y;
  61591. break;
  61592. case 'line':
  61593. vector.x1 += x;
  61594. vector.x2 += x;
  61595. vector.y1 += y;
  61596. vector.y2 += y;
  61597. break;
  61598. case 'polyline':
  61599. for (var i = 0, l = vector.points.length; i < l; i++) {
  61600. vector.points[i].x += x;
  61601. vector.points[i].y += y;
  61602. }
  61603. break;
  61604. }
  61605. }
  61606. function fontStringify(key, val) {
  61607. if (key === 'font') {
  61608. return 'font';
  61609. }
  61610. return val;
  61611. }
  61612. function getNodeId(node) {
  61613. if (node.id) {
  61614. return node.id;
  61615. }
  61616. if (isArray(node.text)) {
  61617. for (var i = 0, l = node.text.length; i < l; i++) {
  61618. var n = node.text[i];
  61619. var nodeId = getNodeId(n);
  61620. if (nodeId) {
  61621. return nodeId;
  61622. }
  61623. }
  61624. }
  61625. return null;
  61626. }
  61627. function isPattern(color) {
  61628. return isArray(color) && color.length === 2;
  61629. }
  61630. // converts from a [<pattern name>, <color>] as used by pdfmake
  61631. // into [<pattern object>, <color>] as used by pdfkit
  61632. // (the pattern has to be registered in the doc definition of course)
  61633. function getPattern(color, patterns) {
  61634. return [patterns[color[0]], color[1]];
  61635. }
  61636. module.exports = {
  61637. isString: isString,
  61638. isNumber: isNumber,
  61639. isBoolean: isBoolean,
  61640. isArray: isArray,
  61641. isFunction: isFunction,
  61642. isObject: isObject,
  61643. isNull: isNull,
  61644. isUndefined: isUndefined,
  61645. pack: pack,
  61646. fontStringify: fontStringify,
  61647. offsetVector: offsetVector,
  61648. getNodeId: getNodeId,
  61649. isPattern: isPattern,
  61650. getPattern: getPattern
  61651. };
  61652. /***/ }),
  61653. /***/ 3090:
  61654. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  61655. "use strict";
  61656. /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"];
  61657. var fs = __webpack_require__(3857);
  61658. function ImageMeasure(pdfKitDoc, imageDictionary) {
  61659. this.pdfKitDoc = pdfKitDoc;
  61660. this.imageDictionary = imageDictionary || {};
  61661. }
  61662. ImageMeasure.prototype.measureImage = function (src) {
  61663. var image;
  61664. var that = this;
  61665. if (!this.pdfKitDoc._imageRegistry[src]) {
  61666. try {
  61667. image = this.pdfKitDoc.openImage(realImageSrc(src));
  61668. if (!image) {
  61669. throw 'No image';
  61670. }
  61671. } catch (error) {
  61672. throw 'Invalid image: ' + error.toString() + '\nImages dictionary should contain dataURL entries (or local file paths in node.js)';
  61673. }
  61674. image.embed(this.pdfKitDoc);
  61675. this.pdfKitDoc._imageRegistry[src] = image;
  61676. } else {
  61677. image = this.pdfKitDoc._imageRegistry[src];
  61678. }
  61679. return { width: image.width, height: image.height };
  61680. function realImageSrc(src) {
  61681. var img = that.imageDictionary[src];
  61682. if (!img) {
  61683. return src;
  61684. }
  61685. if (fs.existsSync(img)) {
  61686. return fs.readFileSync(img);
  61687. }
  61688. var index = img.indexOf('base64,');
  61689. if (index < 0) {
  61690. return that.imageDictionary[src];
  61691. }
  61692. return Buffer.from(img.substring(index + 7), 'base64');
  61693. }
  61694. };
  61695. module.exports = ImageMeasure;
  61696. /***/ }),
  61697. /***/ 2678:
  61698. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  61699. "use strict";
  61700. var TraversalTracker = __webpack_require__(8537);
  61701. var DocPreprocessor = __webpack_require__(4889);
  61702. var DocMeasure = __webpack_require__(1728);
  61703. var DocumentContext = __webpack_require__(3858);
  61704. var PageElementWriter = __webpack_require__(2912);
  61705. var ColumnCalculator = __webpack_require__(4498);
  61706. var TableProcessor = __webpack_require__(9342);
  61707. var Line = __webpack_require__(4775);
  61708. var isString = (__webpack_require__(6225).isString);
  61709. var isArray = (__webpack_require__(6225).isArray);
  61710. var isUndefined = (__webpack_require__(6225).isUndefined);
  61711. var isNull = (__webpack_require__(6225).isNull);
  61712. var pack = (__webpack_require__(6225).pack);
  61713. var offsetVector = (__webpack_require__(6225).offsetVector);
  61714. var fontStringify = (__webpack_require__(6225).fontStringify);
  61715. var getNodeId = (__webpack_require__(6225).getNodeId);
  61716. var isFunction = (__webpack_require__(6225).isFunction);
  61717. var TextTools = __webpack_require__(1350);
  61718. var StyleContextStack = __webpack_require__(7597);
  61719. var isNumber = (__webpack_require__(6225).isNumber);
  61720. function addAll(target, otherArray) {
  61721. otherArray.forEach(function (item) {
  61722. target.push(item);
  61723. });
  61724. }
  61725. /**
  61726. * Creates an instance of LayoutBuilder - layout engine which turns document-definition-object
  61727. * into a set of pages, lines, inlines and vectors ready to be rendered into a PDF
  61728. *
  61729. * @param {Object} pageSize - an object defining page width and height
  61730. * @param {Object} pageMargins - an object defining top, left, right and bottom margins
  61731. */
  61732. function LayoutBuilder(pageSize, pageMargins, imageMeasure, svgMeasure) {
  61733. this.pageSize = pageSize;
  61734. this.pageMargins = pageMargins;
  61735. this.tracker = new TraversalTracker();
  61736. this.imageMeasure = imageMeasure;
  61737. this.svgMeasure = svgMeasure;
  61738. this.tableLayouts = {};
  61739. }
  61740. LayoutBuilder.prototype.registerTableLayouts = function (tableLayouts) {
  61741. this.tableLayouts = pack(this.tableLayouts, tableLayouts);
  61742. };
  61743. /**
  61744. * Executes layout engine on document-definition-object and creates an array of pages
  61745. * containing positioned Blocks, Lines and inlines
  61746. *
  61747. * @param {Object} docStructure document-definition-object
  61748. * @param {Object} fontProvider font provider
  61749. * @param {Object} styleDictionary dictionary with style definitions
  61750. * @param {Object} defaultStyle default style definition
  61751. * @return {Array} an array of pages
  61752. */
  61753. LayoutBuilder.prototype.layoutDocument = function (docStructure, fontProvider, styleDictionary, defaultStyle, background, header, footer, images, watermark, pageBreakBeforeFct) {
  61754. function addPageBreaksIfNecessary(linearNodeList, pages) {
  61755. if (!isFunction(pageBreakBeforeFct)) {
  61756. return false;
  61757. }
  61758. linearNodeList = linearNodeList.filter(function (node) {
  61759. return node.positions.length > 0;
  61760. });
  61761. linearNodeList.forEach(function (node) {
  61762. var nodeInfo = {};
  61763. [
  61764. 'id', 'text', 'ul', 'ol', 'table', 'image', 'qr', 'canvas', 'svg', 'columns',
  61765. 'headlineLevel', 'style', 'pageBreak', 'pageOrientation',
  61766. 'width', 'height'
  61767. ].forEach(function (key) {
  61768. if (node[key] !== undefined) {
  61769. nodeInfo[key] = node[key];
  61770. }
  61771. });
  61772. nodeInfo.startPosition = node.positions[0];
  61773. nodeInfo.pageNumbers = Array.from(new Set(node.positions.map(function (node) { return node.pageNumber; })));
  61774. nodeInfo.pages = pages.length;
  61775. nodeInfo.stack = isArray(node.stack);
  61776. node.nodeInfo = nodeInfo;
  61777. });
  61778. for (var index = 0; index < linearNodeList.length; index++) {
  61779. var node = linearNodeList[index];
  61780. if (node.pageBreak !== 'before' && !node.pageBreakCalculated) {
  61781. node.pageBreakCalculated = true;
  61782. var pageNumber = node.nodeInfo.pageNumbers[0];
  61783. var followingNodesOnPage = [];
  61784. var nodesOnNextPage = [];
  61785. var previousNodesOnPage = [];
  61786. if (pageBreakBeforeFct.length > 1) {
  61787. for (var ii = index + 1, l = linearNodeList.length; ii < l; ii++) {
  61788. if (linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber) > -1) {
  61789. followingNodesOnPage.push(linearNodeList[ii].nodeInfo);
  61790. }
  61791. if (pageBreakBeforeFct.length > 2 && linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber + 1) > -1) {
  61792. nodesOnNextPage.push(linearNodeList[ii].nodeInfo);
  61793. }
  61794. }
  61795. }
  61796. if (pageBreakBeforeFct.length > 3) {
  61797. for (var ii = 0; ii < index; ii++) {
  61798. if (linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber) > -1) {
  61799. previousNodesOnPage.push(linearNodeList[ii].nodeInfo);
  61800. }
  61801. }
  61802. }
  61803. if (pageBreakBeforeFct(node.nodeInfo, followingNodesOnPage, nodesOnNextPage, previousNodesOnPage)) {
  61804. node.pageBreak = 'before';
  61805. return true;
  61806. }
  61807. }
  61808. }
  61809. return false;
  61810. }
  61811. this.docPreprocessor = new DocPreprocessor();
  61812. this.docMeasure = new DocMeasure(fontProvider, styleDictionary, defaultStyle, this.imageMeasure, this.svgMeasure, this.tableLayouts, images);
  61813. function resetXYs(result) {
  61814. result.linearNodeList.forEach(function (node) {
  61815. node.resetXY();
  61816. });
  61817. }
  61818. var result = this.tryLayoutDocument(docStructure, fontProvider, styleDictionary, defaultStyle, background, header, footer, images, watermark);
  61819. while (addPageBreaksIfNecessary(result.linearNodeList, result.pages)) {
  61820. resetXYs(result);
  61821. result = this.tryLayoutDocument(docStructure, fontProvider, styleDictionary, defaultStyle, background, header, footer, images, watermark);
  61822. }
  61823. return result.pages;
  61824. };
  61825. LayoutBuilder.prototype.tryLayoutDocument = function (docStructure, fontProvider, styleDictionary, defaultStyle, background, header, footer, images, watermark, pageBreakBeforeFct) {
  61826. this.linearNodeList = [];
  61827. docStructure = this.docPreprocessor.preprocessDocument(docStructure);
  61828. docStructure = this.docMeasure.measureDocument(docStructure);
  61829. this.writer = new PageElementWriter(
  61830. new DocumentContext(this.pageSize, this.pageMargins), this.tracker);
  61831. var _this = this;
  61832. this.writer.context().tracker.startTracking('pageAdded', function () {
  61833. _this.addBackground(background);
  61834. });
  61835. this.addBackground(background);
  61836. this.processNode(docStructure);
  61837. this.addHeadersAndFooters(header, footer);
  61838. if (watermark != null) {
  61839. this.addWatermark(watermark, fontProvider, defaultStyle);
  61840. }
  61841. return { pages: this.writer.context().pages, linearNodeList: this.linearNodeList };
  61842. };
  61843. LayoutBuilder.prototype.addBackground = function (background) {
  61844. var backgroundGetter = isFunction(background) ? background : function () {
  61845. return background;
  61846. };
  61847. var context = this.writer.context();
  61848. var pageSize = context.getCurrentPage().pageSize;
  61849. var pageBackground = backgroundGetter(context.page + 1, pageSize);
  61850. if (pageBackground) {
  61851. this.writer.beginUnbreakableBlock(pageSize.width, pageSize.height);
  61852. pageBackground = this.docPreprocessor.preprocessDocument(pageBackground);
  61853. this.processNode(this.docMeasure.measureDocument(pageBackground));
  61854. this.writer.commitUnbreakableBlock(0, 0);
  61855. context.backgroundLength[context.page] += pageBackground.positions.length;
  61856. }
  61857. };
  61858. LayoutBuilder.prototype.addStaticRepeatable = function (headerOrFooter, sizeFunction) {
  61859. this.addDynamicRepeatable(function () {
  61860. return JSON.parse(JSON.stringify(headerOrFooter)); // copy to new object
  61861. }, sizeFunction);
  61862. };
  61863. LayoutBuilder.prototype.addDynamicRepeatable = function (nodeGetter, sizeFunction) {
  61864. var pages = this.writer.context().pages;
  61865. for (var pageIndex = 0, l = pages.length; pageIndex < l; pageIndex++) {
  61866. this.writer.context().page = pageIndex;
  61867. var node = nodeGetter(pageIndex + 1, l, this.writer.context().pages[pageIndex].pageSize);
  61868. if (node) {
  61869. var sizes = sizeFunction(this.writer.context().getCurrentPage().pageSize, this.pageMargins);
  61870. this.writer.beginUnbreakableBlock(sizes.width, sizes.height);
  61871. node = this.docPreprocessor.preprocessDocument(node);
  61872. this.processNode(this.docMeasure.measureDocument(node));
  61873. this.writer.commitUnbreakableBlock(sizes.x, sizes.y);
  61874. }
  61875. }
  61876. };
  61877. LayoutBuilder.prototype.addHeadersAndFooters = function (header, footer) {
  61878. var headerSizeFct = function (pageSize, pageMargins) {
  61879. return {
  61880. x: 0,
  61881. y: 0,
  61882. width: pageSize.width,
  61883. height: pageMargins.top
  61884. };
  61885. };
  61886. var footerSizeFct = function (pageSize, pageMargins) {
  61887. return {
  61888. x: 0,
  61889. y: pageSize.height - pageMargins.bottom,
  61890. width: pageSize.width,
  61891. height: pageMargins.bottom
  61892. };
  61893. };
  61894. if (isFunction(header)) {
  61895. this.addDynamicRepeatable(header, headerSizeFct);
  61896. } else if (header) {
  61897. this.addStaticRepeatable(header, headerSizeFct);
  61898. }
  61899. if (isFunction(footer)) {
  61900. this.addDynamicRepeatable(footer, footerSizeFct);
  61901. } else if (footer) {
  61902. this.addStaticRepeatable(footer, footerSizeFct);
  61903. }
  61904. };
  61905. LayoutBuilder.prototype.addWatermark = function (watermark, fontProvider, defaultStyle) {
  61906. if (isString(watermark)) {
  61907. watermark = { 'text': watermark };
  61908. }
  61909. if (!watermark.text) { // empty watermark text
  61910. return;
  61911. }
  61912. watermark.font = watermark.font || defaultStyle.font || 'Roboto';
  61913. watermark.fontSize = watermark.fontSize || 'auto';
  61914. watermark.color = watermark.color || 'black';
  61915. watermark.opacity = isNumber(watermark.opacity) ? watermark.opacity : 0.6;
  61916. watermark.bold = watermark.bold || false;
  61917. watermark.italics = watermark.italics || false;
  61918. watermark.angle = !isUndefined(watermark.angle) && !isNull(watermark.angle) ? watermark.angle : null;
  61919. if (watermark.angle === null) {
  61920. watermark.angle = Math.atan2(this.pageSize.height, this.pageSize.width) * -180 / Math.PI;
  61921. }
  61922. if (watermark.fontSize === 'auto') {
  61923. watermark.fontSize = getWatermarkFontSize(this.pageSize, watermark, fontProvider);
  61924. }
  61925. var watermarkObject = {
  61926. text: watermark.text,
  61927. font: fontProvider.provideFont(watermark.font, watermark.bold, watermark.italics),
  61928. fontSize: watermark.fontSize,
  61929. color: watermark.color,
  61930. opacity: watermark.opacity,
  61931. angle: watermark.angle
  61932. };
  61933. watermarkObject._size = getWatermarkSize(watermark, fontProvider);
  61934. var pages = this.writer.context().pages;
  61935. for (var i = 0, l = pages.length; i < l; i++) {
  61936. pages[i].watermark = watermarkObject;
  61937. }
  61938. function getWatermarkSize(watermark, fontProvider) {
  61939. var textTools = new TextTools(fontProvider);
  61940. var styleContextStack = new StyleContextStack(null, { font: watermark.font, bold: watermark.bold, italics: watermark.italics });
  61941. styleContextStack.push({
  61942. fontSize: watermark.fontSize
  61943. });
  61944. var size = textTools.sizeOfString(watermark.text, styleContextStack);
  61945. var rotatedSize = textTools.sizeOfRotatedText(watermark.text, watermark.angle, styleContextStack);
  61946. return { size: size, rotatedSize: rotatedSize };
  61947. }
  61948. function getWatermarkFontSize(pageSize, watermark, fontProvider) {
  61949. var textTools = new TextTools(fontProvider);
  61950. var styleContextStack = new StyleContextStack(null, { font: watermark.font, bold: watermark.bold, italics: watermark.italics });
  61951. var rotatedSize;
  61952. /**
  61953. * Binary search the best font size.
  61954. * Initial bounds [0, 1000]
  61955. * Break when range < 1
  61956. */
  61957. var a = 0;
  61958. var b = 1000;
  61959. var c = (a + b) / 2;
  61960. while (Math.abs(a - b) > 1) {
  61961. styleContextStack.push({
  61962. fontSize: c
  61963. });
  61964. rotatedSize = textTools.sizeOfRotatedText(watermark.text, watermark.angle, styleContextStack);
  61965. if (rotatedSize.width > pageSize.width) {
  61966. b = c;
  61967. c = (a + b) / 2;
  61968. } else if (rotatedSize.width < pageSize.width) {
  61969. if (rotatedSize.height > pageSize.height) {
  61970. b = c;
  61971. c = (a + b) / 2;
  61972. } else {
  61973. a = c;
  61974. c = (a + b) / 2;
  61975. }
  61976. }
  61977. styleContextStack.pop();
  61978. }
  61979. /*
  61980. End binary search
  61981. */
  61982. return c;
  61983. }
  61984. };
  61985. function decorateNode(node) {
  61986. var x = node.x, y = node.y;
  61987. node.positions = [];
  61988. if (isArray(node.canvas)) {
  61989. node.canvas.forEach(function (vector) {
  61990. var x = vector.x, y = vector.y, x1 = vector.x1, y1 = vector.y1, x2 = vector.x2, y2 = vector.y2;
  61991. vector.resetXY = function () {
  61992. vector.x = x;
  61993. vector.y = y;
  61994. vector.x1 = x1;
  61995. vector.y1 = y1;
  61996. vector.x2 = x2;
  61997. vector.y2 = y2;
  61998. };
  61999. });
  62000. }
  62001. node.resetXY = function () {
  62002. node.x = x;
  62003. node.y = y;
  62004. if (isArray(node.canvas)) {
  62005. node.canvas.forEach(function (vector) {
  62006. vector.resetXY();
  62007. });
  62008. }
  62009. };
  62010. }
  62011. LayoutBuilder.prototype.processNode = function (node) {
  62012. var self = this;
  62013. this.linearNodeList.push(node);
  62014. decorateNode(node);
  62015. applyMargins(function () {
  62016. var unbreakable = node.unbreakable;
  62017. if (unbreakable) {
  62018. self.writer.beginUnbreakableBlock();
  62019. }
  62020. var absPosition = node.absolutePosition;
  62021. if (absPosition) {
  62022. self.writer.context().beginDetachedBlock();
  62023. self.writer.context().moveTo(absPosition.x || 0, absPosition.y || 0);
  62024. }
  62025. var relPosition = node.relativePosition;
  62026. if (relPosition) {
  62027. self.writer.context().beginDetachedBlock();
  62028. self.writer.context().moveToRelative(relPosition.x || 0, relPosition.y || 0);
  62029. }
  62030. if (node.stack) {
  62031. self.processVerticalContainer(node);
  62032. } else if (node.columns) {
  62033. self.processColumns(node);
  62034. } else if (node.ul) {
  62035. self.processList(false, node);
  62036. } else if (node.ol) {
  62037. self.processList(true, node);
  62038. } else if (node.table) {
  62039. self.processTable(node);
  62040. } else if (node.text !== undefined) {
  62041. self.processLeaf(node);
  62042. } else if (node.toc) {
  62043. self.processToc(node);
  62044. } else if (node.image) {
  62045. self.processImage(node);
  62046. } else if (node.svg) {
  62047. self.processSVG(node);
  62048. } else if (node.canvas) {
  62049. self.processCanvas(node);
  62050. } else if (node.qr) {
  62051. self.processQr(node);
  62052. } else if (!node._span) {
  62053. throw 'Unrecognized document structure: ' + JSON.stringify(node, fontStringify);
  62054. }
  62055. if (absPosition || relPosition) {
  62056. self.writer.context().endDetachedBlock();
  62057. }
  62058. if (unbreakable) {
  62059. self.writer.commitUnbreakableBlock();
  62060. }
  62061. });
  62062. function applyMargins(callback) {
  62063. var margin = node._margin;
  62064. if (node.pageBreak === 'before') {
  62065. self.writer.moveToNextPage(node.pageOrientation);
  62066. } else if (node.pageBreak === 'beforeOdd') {
  62067. self.writer.moveToNextPage(node.pageOrientation);
  62068. if ((self.writer.context().page + 1) % 2 === 1) {
  62069. self.writer.moveToNextPage(node.pageOrientation);
  62070. }
  62071. } else if (node.pageBreak === 'beforeEven') {
  62072. self.writer.moveToNextPage(node.pageOrientation);
  62073. if ((self.writer.context().page + 1) % 2 === 0) {
  62074. self.writer.moveToNextPage(node.pageOrientation);
  62075. }
  62076. }
  62077. if (margin) {
  62078. self.writer.context().moveDown(margin[1]);
  62079. self.writer.context().addMargin(margin[0], margin[2]);
  62080. }
  62081. callback();
  62082. if (margin) {
  62083. self.writer.context().addMargin(-margin[0], -margin[2]);
  62084. self.writer.context().moveDown(margin[3]);
  62085. }
  62086. if (node.pageBreak === 'after') {
  62087. self.writer.moveToNextPage(node.pageOrientation);
  62088. } else if (node.pageBreak === 'afterOdd') {
  62089. self.writer.moveToNextPage(node.pageOrientation);
  62090. if ((self.writer.context().page + 1) % 2 === 1) {
  62091. self.writer.moveToNextPage(node.pageOrientation);
  62092. }
  62093. } else if (node.pageBreak === 'afterEven') {
  62094. self.writer.moveToNextPage(node.pageOrientation);
  62095. if ((self.writer.context().page + 1) % 2 === 0) {
  62096. self.writer.moveToNextPage(node.pageOrientation);
  62097. }
  62098. }
  62099. }
  62100. };
  62101. // vertical container
  62102. LayoutBuilder.prototype.processVerticalContainer = function (node) {
  62103. var self = this;
  62104. node.stack.forEach(function (item) {
  62105. self.processNode(item);
  62106. addAll(node.positions, item.positions);
  62107. //TODO: paragraph gap
  62108. });
  62109. };
  62110. // columns
  62111. LayoutBuilder.prototype.processColumns = function (columnNode) {
  62112. var columns = columnNode.columns;
  62113. var availableWidth = this.writer.context().availableWidth;
  62114. var gaps = gapArray(columnNode._gap);
  62115. if (gaps) {
  62116. availableWidth -= (gaps.length - 1) * columnNode._gap;
  62117. }
  62118. ColumnCalculator.buildColumnWidths(columns, availableWidth);
  62119. var result = this.processRow(columns, columns, gaps);
  62120. addAll(columnNode.positions, result.positions);
  62121. function gapArray(gap) {
  62122. if (!gap) {
  62123. return null;
  62124. }
  62125. var gaps = [];
  62126. gaps.push(0);
  62127. for (var i = columns.length - 1; i > 0; i--) {
  62128. gaps.push(gap);
  62129. }
  62130. return gaps;
  62131. }
  62132. };
  62133. LayoutBuilder.prototype.processRow = function (columns, widths, gaps, tableBody, tableRow, height) {
  62134. var self = this;
  62135. var pageBreaks = [], positions = [];
  62136. this.tracker.auto('pageChanged', storePageBreakData, function () {
  62137. widths = widths || columns;
  62138. self.writer.context().beginColumnGroup();
  62139. for (var i = 0, l = columns.length; i < l; i++) {
  62140. var column = columns[i];
  62141. var width = widths[i]._calcWidth;
  62142. var leftOffset = colLeftOffset(i);
  62143. if (column.colSpan && column.colSpan > 1) {
  62144. for (var j = 1; j < column.colSpan; j++) {
  62145. width += widths[++i]._calcWidth + gaps[i];
  62146. }
  62147. }
  62148. self.writer.context().beginColumn(width, leftOffset, getEndingCell(column, i));
  62149. if (!column._span) {
  62150. self.processNode(column);
  62151. addAll(positions, column.positions);
  62152. } else if (column._columnEndingContext) {
  62153. // row-span ending
  62154. self.writer.context().markEnding(column);
  62155. }
  62156. }
  62157. self.writer.context().completeColumnGroup(height);
  62158. });
  62159. return { pageBreaks: pageBreaks, positions: positions };
  62160. function storePageBreakData(data) {
  62161. var pageDesc;
  62162. for (var i = 0, l = pageBreaks.length; i < l; i++) {
  62163. var desc = pageBreaks[i];
  62164. if (desc.prevPage === data.prevPage) {
  62165. pageDesc = desc;
  62166. break;
  62167. }
  62168. }
  62169. if (!pageDesc) {
  62170. pageDesc = data;
  62171. pageBreaks.push(pageDesc);
  62172. }
  62173. pageDesc.prevY = Math.max(pageDesc.prevY, data.prevY);
  62174. pageDesc.y = Math.min(pageDesc.y, data.y);
  62175. }
  62176. function colLeftOffset(i) {
  62177. if (gaps && gaps.length > i) {
  62178. return gaps[i];
  62179. }
  62180. return 0;
  62181. }
  62182. function getEndingCell(column, columnIndex) {
  62183. if (column.rowSpan && column.rowSpan > 1) {
  62184. var endingRow = tableRow + column.rowSpan - 1;
  62185. if (endingRow >= tableBody.length) {
  62186. throw 'Row span for column ' + columnIndex + ' (with indexes starting from 0) exceeded row count';
  62187. }
  62188. return tableBody[endingRow][columnIndex];
  62189. }
  62190. return null;
  62191. }
  62192. };
  62193. // lists
  62194. LayoutBuilder.prototype.processList = function (orderedList, node) {
  62195. var self = this,
  62196. items = orderedList ? node.ol : node.ul,
  62197. gapSize = node._gapSize;
  62198. this.writer.context().addMargin(gapSize.width);
  62199. var nextMarker;
  62200. this.tracker.auto('lineAdded', addMarkerToFirstLeaf, function () {
  62201. items.forEach(function (item) {
  62202. nextMarker = item.listMarker;
  62203. self.processNode(item);
  62204. addAll(node.positions, item.positions);
  62205. });
  62206. });
  62207. this.writer.context().addMargin(-gapSize.width);
  62208. function addMarkerToFirstLeaf(line) {
  62209. // I'm not very happy with the way list processing is implemented
  62210. // (both code and algorithm should be rethinked)
  62211. if (nextMarker) {
  62212. var marker = nextMarker;
  62213. nextMarker = null;
  62214. if (marker.canvas) {
  62215. var vector = marker.canvas[0];
  62216. offsetVector(vector, -marker._minWidth, 0);
  62217. self.writer.addVector(vector);
  62218. } else if (marker._inlines) {
  62219. var markerLine = new Line(self.pageSize.width);
  62220. markerLine.addInline(marker._inlines[0]);
  62221. markerLine.x = -marker._minWidth;
  62222. markerLine.y = line.getAscenderHeight() - markerLine.getAscenderHeight();
  62223. self.writer.addLine(markerLine, true);
  62224. }
  62225. }
  62226. }
  62227. };
  62228. // tables
  62229. LayoutBuilder.prototype.processTable = function (tableNode) {
  62230. var processor = new TableProcessor(tableNode);
  62231. processor.beginTable(this.writer);
  62232. var rowHeights = tableNode.table.heights;
  62233. for (var i = 0, l = tableNode.table.body.length; i < l; i++) {
  62234. processor.beginRow(i, this.writer);
  62235. var height;
  62236. if (isFunction(rowHeights)) {
  62237. height = rowHeights(i);
  62238. } else if (isArray(rowHeights)) {
  62239. height = rowHeights[i];
  62240. } else {
  62241. height = rowHeights;
  62242. }
  62243. if (height === 'auto') {
  62244. height = undefined;
  62245. }
  62246. var result = this.processRow(tableNode.table.body[i], tableNode.table.widths, tableNode._offsets.offsets, tableNode.table.body, i, height);
  62247. addAll(tableNode.positions, result.positions);
  62248. processor.endRow(i, this.writer, result.pageBreaks);
  62249. }
  62250. processor.endTable(this.writer);
  62251. };
  62252. // leafs (texts)
  62253. LayoutBuilder.prototype.processLeaf = function (node) {
  62254. var line = this.buildNextLine(node);
  62255. if (line && (node.tocItem || node.id)) {
  62256. line._node = node;
  62257. }
  62258. var currentHeight = (line) ? line.getHeight() : 0;
  62259. var maxHeight = node.maxHeight || -1;
  62260. if (line) {
  62261. var nodeId = getNodeId(node);
  62262. if (nodeId) {
  62263. line.id = nodeId;
  62264. }
  62265. }
  62266. if (node._tocItemRef) {
  62267. line._pageNodeRef = node._tocItemRef;
  62268. }
  62269. if (node._pageRef) {
  62270. line._pageNodeRef = node._pageRef._nodeRef;
  62271. }
  62272. if (line && line.inlines && isArray(line.inlines)) {
  62273. for (var i = 0, l = line.inlines.length; i < l; i++) {
  62274. if (line.inlines[i]._tocItemRef) {
  62275. line.inlines[i]._pageNodeRef = line.inlines[i]._tocItemRef;
  62276. }
  62277. if (line.inlines[i]._pageRef) {
  62278. line.inlines[i]._pageNodeRef = line.inlines[i]._pageRef._nodeRef;
  62279. }
  62280. }
  62281. }
  62282. while (line && (maxHeight === -1 || currentHeight < maxHeight)) {
  62283. var positions = this.writer.addLine(line);
  62284. node.positions.push(positions);
  62285. line = this.buildNextLine(node);
  62286. if (line) {
  62287. currentHeight += line.getHeight();
  62288. }
  62289. }
  62290. };
  62291. LayoutBuilder.prototype.processToc = function (node) {
  62292. if (node.toc.title) {
  62293. this.processNode(node.toc.title);
  62294. }
  62295. if (node.toc._table) {
  62296. this.processNode(node.toc._table);
  62297. }
  62298. };
  62299. LayoutBuilder.prototype.buildNextLine = function (textNode) {
  62300. function cloneInline(inline) {
  62301. var newInline = inline.constructor();
  62302. for (var key in inline) {
  62303. newInline[key] = inline[key];
  62304. }
  62305. return newInline;
  62306. }
  62307. if (!textNode._inlines || textNode._inlines.length === 0) {
  62308. return null;
  62309. }
  62310. var line = new Line(this.writer.context().availableWidth);
  62311. var textTools = new TextTools(null);
  62312. var isForceContinue = false;
  62313. while (textNode._inlines && textNode._inlines.length > 0 &&
  62314. (line.hasEnoughSpaceForInline(textNode._inlines[0], textNode._inlines.slice(1)) || isForceContinue)) {
  62315. var isHardWrap = false;
  62316. var inline = textNode._inlines.shift();
  62317. isForceContinue = false;
  62318. if (!inline.noWrap && inline.text.length > 1 && inline.width > line.getAvailableWidth()) {
  62319. var widthPerChar = inline.width / inline.text.length;
  62320. var maxChars = Math.floor(line.getAvailableWidth() / widthPerChar);
  62321. if (maxChars < 1) {
  62322. maxChars = 1;
  62323. }
  62324. if (maxChars < inline.text.length) {
  62325. var newInline = cloneInline(inline);
  62326. newInline.text = inline.text.substr(maxChars);
  62327. inline.text = inline.text.substr(0, maxChars);
  62328. newInline.width = textTools.widthOfString(newInline.text, newInline.font, newInline.fontSize, newInline.characterSpacing, newInline.fontFeatures);
  62329. inline.width = textTools.widthOfString(inline.text, inline.font, inline.fontSize, inline.characterSpacing, inline.fontFeatures);
  62330. textNode._inlines.unshift(newInline);
  62331. isHardWrap = true;
  62332. }
  62333. }
  62334. line.addInline(inline);
  62335. isForceContinue = inline.noNewLine && !isHardWrap;
  62336. }
  62337. line.lastLineInParagraph = textNode._inlines.length === 0;
  62338. return line;
  62339. };
  62340. // images
  62341. LayoutBuilder.prototype.processImage = function (node) {
  62342. var position = this.writer.addImage(node);
  62343. node.positions.push(position);
  62344. };
  62345. LayoutBuilder.prototype.processSVG = function (node) {
  62346. var position = this.writer.addSVG(node);
  62347. node.positions.push(position);
  62348. };
  62349. LayoutBuilder.prototype.processCanvas = function (node) {
  62350. var height = node._minHeight;
  62351. if (node.absolutePosition === undefined && this.writer.context().availableHeight < height) {
  62352. // TODO: support for canvas larger than a page
  62353. // TODO: support for other overflow methods
  62354. this.writer.moveToNextPage();
  62355. }
  62356. this.writer.alignCanvas(node);
  62357. node.canvas.forEach(function (vector) {
  62358. var position = this.writer.addVector(vector);
  62359. node.positions.push(position);
  62360. }, this);
  62361. this.writer.context().moveDown(height);
  62362. };
  62363. LayoutBuilder.prototype.processQr = function (node) {
  62364. var position = this.writer.addQr(node);
  62365. node.positions.push(position);
  62366. };
  62367. module.exports = LayoutBuilder;
  62368. /***/ }),
  62369. /***/ 4775:
  62370. /***/ (function(module) {
  62371. "use strict";
  62372. /**
  62373. * Creates an instance of Line
  62374. *
  62375. * @constructor
  62376. * @this {Line}
  62377. * @param {Number} Maximum width this line can have
  62378. */
  62379. function Line(maxWidth) {
  62380. this.maxWidth = maxWidth;
  62381. this.leadingCut = 0;
  62382. this.trailingCut = 0;
  62383. this.inlineWidths = 0;
  62384. this.inlines = [];
  62385. }
  62386. Line.prototype.getAscenderHeight = function () {
  62387. var y = 0;
  62388. this.inlines.forEach(function (inline) {
  62389. y = Math.max(y, inline.font.ascender / 1000 * inline.fontSize);
  62390. });
  62391. return y;
  62392. };
  62393. Line.prototype.hasEnoughSpaceForInline = function (inline, nextInlines) {
  62394. nextInlines = nextInlines || [];
  62395. if (this.inlines.length === 0) {
  62396. return true;
  62397. }
  62398. if (this.newLineForced) {
  62399. return false;
  62400. }
  62401. var inlineWidth = inline.width;
  62402. var inlineTrailingCut = inline.trailingCut || 0;
  62403. if (inline.noNewLine) {
  62404. for (var i = 0, l = nextInlines.length; i < l; i++) {
  62405. var nextInline = nextInlines[i];
  62406. inlineWidth += nextInline.width;
  62407. inlineTrailingCut += nextInline.trailingCut || 0;
  62408. if (!nextInline.noNewLine) {
  62409. break;
  62410. }
  62411. }
  62412. }
  62413. return (this.inlineWidths + inlineWidth - this.leadingCut - inlineTrailingCut) <= this.maxWidth;
  62414. };
  62415. Line.prototype.addInline = function (inline) {
  62416. if (this.inlines.length === 0) {
  62417. this.leadingCut = inline.leadingCut || 0;
  62418. }
  62419. this.trailingCut = inline.trailingCut || 0;
  62420. inline.x = this.inlineWidths - this.leadingCut;
  62421. this.inlines.push(inline);
  62422. this.inlineWidths += inline.width;
  62423. if (inline.lineEnd) {
  62424. this.newLineForced = true;
  62425. }
  62426. };
  62427. Line.prototype.getWidth = function () {
  62428. return this.inlineWidths - this.leadingCut - this.trailingCut;
  62429. };
  62430. Line.prototype.getAvailableWidth = function () {
  62431. return this.maxWidth - this.getWidth();
  62432. };
  62433. /**
  62434. * Returns line height
  62435. * @return {Number}
  62436. */
  62437. Line.prototype.getHeight = function () {
  62438. var max = 0;
  62439. this.inlines.forEach(function (item) {
  62440. max = Math.max(max, item.height || 0);
  62441. });
  62442. return max;
  62443. };
  62444. module.exports = Line;
  62445. /***/ }),
  62446. /***/ 2912:
  62447. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  62448. "use strict";
  62449. var isUndefined = (__webpack_require__(6225).isUndefined);
  62450. var ElementWriter = __webpack_require__(1196);
  62451. /**
  62452. * Creates an instance of PageElementWriter - an extended ElementWriter
  62453. * which can handle:
  62454. * - page-breaks (it adds new pages when there's not enough space left),
  62455. * - repeatable fragments (like table-headers, which are repeated everytime
  62456. * a page-break occurs)
  62457. * - transactions (used for unbreakable-blocks when we want to make sure
  62458. * whole block will be rendered on the same page)
  62459. */
  62460. function PageElementWriter(context, tracker) {
  62461. this.transactionLevel = 0;
  62462. this.repeatables = [];
  62463. this.tracker = tracker;
  62464. this.writer = new ElementWriter(context, tracker);
  62465. }
  62466. function fitOnPage(self, addFct) {
  62467. var position = addFct(self);
  62468. if (!position) {
  62469. self.moveToNextPage();
  62470. position = addFct(self);
  62471. }
  62472. return position;
  62473. }
  62474. PageElementWriter.prototype.addLine = function (line, dontUpdateContextPosition, index) {
  62475. return fitOnPage(this, function (self) {
  62476. return self.writer.addLine(line, dontUpdateContextPosition, index);
  62477. });
  62478. };
  62479. PageElementWriter.prototype.addImage = function (image, index) {
  62480. return fitOnPage(this, function (self) {
  62481. return self.writer.addImage(image, index);
  62482. });
  62483. };
  62484. PageElementWriter.prototype.addSVG = function (image, index) {
  62485. return fitOnPage(this, function (self) {
  62486. return self.writer.addSVG(image, index);
  62487. });
  62488. };
  62489. PageElementWriter.prototype.addQr = function (qr, index) {
  62490. return fitOnPage(this, function (self) {
  62491. return self.writer.addQr(qr, index);
  62492. });
  62493. };
  62494. PageElementWriter.prototype.addVector = function (vector, ignoreContextX, ignoreContextY, index) {
  62495. return this.writer.addVector(vector, ignoreContextX, ignoreContextY, index);
  62496. };
  62497. PageElementWriter.prototype.beginClip = function (width, height) {
  62498. return this.writer.beginClip(width, height);
  62499. };
  62500. PageElementWriter.prototype.endClip = function () {
  62501. return this.writer.endClip();
  62502. };
  62503. PageElementWriter.prototype.alignCanvas = function (node) {
  62504. this.writer.alignCanvas(node);
  62505. };
  62506. PageElementWriter.prototype.addFragment = function (fragment, useBlockXOffset, useBlockYOffset, dontUpdateContextPosition) {
  62507. if (!this.writer.addFragment(fragment, useBlockXOffset, useBlockYOffset, dontUpdateContextPosition)) {
  62508. this.moveToNextPage();
  62509. this.writer.addFragment(fragment, useBlockXOffset, useBlockYOffset, dontUpdateContextPosition);
  62510. }
  62511. };
  62512. PageElementWriter.prototype.moveToNextPage = function (pageOrientation) {
  62513. var nextPage = this.writer.context.moveToNextPage(pageOrientation);
  62514. // moveToNextPage is called multiple times for table, because is called for each column
  62515. // and repeatables are inserted only in the first time. If columns are used, is needed
  62516. // call for table in first column and then for table in the second column (is other repeatables).
  62517. this.repeatables.forEach(function (rep) {
  62518. if (isUndefined(rep.insertedOnPages[this.writer.context.page])) {
  62519. rep.insertedOnPages[this.writer.context.page] = true;
  62520. this.writer.addFragment(rep, true);
  62521. } else {
  62522. this.writer.context.moveDown(rep.height);
  62523. }
  62524. }, this);
  62525. this.writer.tracker.emit('pageChanged', {
  62526. prevPage: nextPage.prevPage,
  62527. prevY: nextPage.prevY,
  62528. y: this.writer.context.y
  62529. });
  62530. };
  62531. PageElementWriter.prototype.beginUnbreakableBlock = function (width, height) {
  62532. if (this.transactionLevel++ === 0) {
  62533. this.originalX = this.writer.context.x;
  62534. this.writer.pushContext(width, height);
  62535. }
  62536. };
  62537. PageElementWriter.prototype.commitUnbreakableBlock = function (forcedX, forcedY) {
  62538. if (--this.transactionLevel === 0) {
  62539. var unbreakableContext = this.writer.context;
  62540. this.writer.popContext();
  62541. var nbPages = unbreakableContext.pages.length;
  62542. if (nbPages > 0) {
  62543. // no support for multi-page unbreakableBlocks
  62544. var fragment = unbreakableContext.pages[0];
  62545. fragment.xOffset = forcedX;
  62546. fragment.yOffset = forcedY;
  62547. //TODO: vectors can influence height in some situations
  62548. if (nbPages > 1) {
  62549. // on out-of-context blocs (headers, footers, background) height should be the whole DocumentContext height
  62550. if (forcedX !== undefined || forcedY !== undefined) {
  62551. fragment.height = unbreakableContext.getCurrentPage().pageSize.height - unbreakableContext.pageMargins.top - unbreakableContext.pageMargins.bottom;
  62552. } else {
  62553. fragment.height = this.writer.context.getCurrentPage().pageSize.height - this.writer.context.pageMargins.top - this.writer.context.pageMargins.bottom;
  62554. for (var i = 0, l = this.repeatables.length; i < l; i++) {
  62555. fragment.height -= this.repeatables[i].height;
  62556. }
  62557. }
  62558. } else {
  62559. fragment.height = unbreakableContext.y;
  62560. }
  62561. if (forcedX !== undefined || forcedY !== undefined) {
  62562. this.writer.addFragment(fragment, true, true, true);
  62563. } else {
  62564. this.addFragment(fragment);
  62565. }
  62566. }
  62567. }
  62568. };
  62569. PageElementWriter.prototype.currentBlockToRepeatable = function () {
  62570. var unbreakableContext = this.writer.context;
  62571. var rep = { items: [] };
  62572. unbreakableContext.pages[0].items.forEach(function (item) {
  62573. rep.items.push(item);
  62574. });
  62575. rep.xOffset = this.originalX;
  62576. //TODO: vectors can influence height in some situations
  62577. rep.height = unbreakableContext.y;
  62578. rep.insertedOnPages = [];
  62579. return rep;
  62580. };
  62581. PageElementWriter.prototype.pushToRepeatables = function (rep) {
  62582. this.repeatables.push(rep);
  62583. };
  62584. PageElementWriter.prototype.popFromRepeatables = function () {
  62585. this.repeatables.pop();
  62586. };
  62587. PageElementWriter.prototype.context = function () {
  62588. return this.writer.context;
  62589. };
  62590. module.exports = PageElementWriter;
  62591. /***/ }),
  62592. /***/ 6079:
  62593. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  62594. "use strict";
  62595. function _interopDefault(ex) {
  62596. return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex;
  62597. }
  62598. var PdfKit = _interopDefault(__webpack_require__(4872));
  62599. function getEngineInstance() {
  62600. return PdfKit;
  62601. }
  62602. function createPdfDocument(options) {
  62603. options = options || {};
  62604. return new PdfKit(options);
  62605. }
  62606. module.exports = {
  62607. getEngineInstance: getEngineInstance,
  62608. createPdfDocument: createPdfDocument
  62609. };
  62610. /***/ }),
  62611. /***/ 8617:
  62612. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  62613. "use strict";
  62614. /*eslint no-unused-vars: ["error", {"args": "none"}]*/
  62615. var PdfKitEngine = __webpack_require__(6079);
  62616. var FontProvider = __webpack_require__(2249);
  62617. var LayoutBuilder = __webpack_require__(2678);
  62618. var sizes = __webpack_require__(4762);
  62619. var ImageMeasure = __webpack_require__(3090);
  62620. var SVGMeasure = __webpack_require__(7601);
  62621. var textDecorator = __webpack_require__(3497);
  62622. var TextTools = __webpack_require__(1350);
  62623. var isFunction = (__webpack_require__(6225).isFunction);
  62624. var isString = (__webpack_require__(6225).isString);
  62625. var isNumber = (__webpack_require__(6225).isNumber);
  62626. var isBoolean = (__webpack_require__(6225).isBoolean);
  62627. var isArray = (__webpack_require__(6225).isArray);
  62628. var isUndefined = (__webpack_require__(6225).isUndefined);
  62629. var isPattern = (__webpack_require__(6225).isPattern);
  62630. var getPattern = (__webpack_require__(6225).getPattern);
  62631. var SVGtoPDF = __webpack_require__(8071);
  62632. var findFont = function (fonts, requiredFonts, defaultFont) {
  62633. for (var i = 0; i < requiredFonts.length; i++) {
  62634. var requiredFont = requiredFonts[i].toLowerCase();
  62635. for (var font in fonts) {
  62636. if (font.toLowerCase() === requiredFont) {
  62637. return font;
  62638. }
  62639. }
  62640. }
  62641. return defaultFont;
  62642. };
  62643. ////////////////////////////////////////
  62644. // PdfPrinter
  62645. /**
  62646. * @class Creates an instance of a PdfPrinter which turns document definition into a pdf
  62647. *
  62648. * @param {Object} fontDescriptors font definition dictionary
  62649. *
  62650. * @example
  62651. * var fontDescriptors = {
  62652. * Roboto: {
  62653. * normal: 'fonts/Roboto-Regular.ttf',
  62654. * bold: 'fonts/Roboto-Medium.ttf',
  62655. * italics: 'fonts/Roboto-Italic.ttf',
  62656. * bolditalics: 'fonts/Roboto-MediumItalic.ttf'
  62657. * }
  62658. * };
  62659. *
  62660. * var printer = new PdfPrinter(fontDescriptors);
  62661. */
  62662. function PdfPrinter(fontDescriptors) {
  62663. this.fontDescriptors = fontDescriptors;
  62664. }
  62665. /**
  62666. * Executes layout engine for the specified document and renders it into a pdfkit document
  62667. * ready to be saved.
  62668. *
  62669. * @param {Object} docDefinition document definition
  62670. * @param {Object} docDefinition.content an array describing the pdf structure (for more information take a look at the examples in the /examples folder)
  62671. * @param {Object} [docDefinition.defaultStyle] default (implicit) style definition
  62672. * @param {Object} [docDefinition.styles] dictionary defining all styles which can be used in the document
  62673. * @param {Object} [docDefinition.pageSize] page size (pdfkit units, A4 dimensions by default)
  62674. * @param {Number} docDefinition.pageSize.width width
  62675. * @param {Number} docDefinition.pageSize.height height
  62676. * @param {Object} [docDefinition.pageMargins] page margins (pdfkit units)
  62677. * @param {Number} docDefinition.maxPagesNumber maximum number of pages to render
  62678. *
  62679. * @example
  62680. *
  62681. * var docDefinition = {
  62682. * info: {
  62683. * title: 'awesome Document',
  62684. * author: 'john doe',
  62685. * subject: 'subject of document',
  62686. * keywords: 'keywords for document',
  62687. * },
  62688. * content: [
  62689. * 'First paragraph',
  62690. * 'Second paragraph, this time a little bit longer',
  62691. * { text: 'Third paragraph, slightly bigger font size', fontSize: 20 },
  62692. * { text: 'Another paragraph using a named style', style: 'header' },
  62693. * { text: ['playing with ', 'inlines' ] },
  62694. * { text: ['and ', { text: 'restyling ', bold: true }, 'them'] },
  62695. * ],
  62696. * styles: {
  62697. * header: { fontSize: 30, bold: true }
  62698. * },
  62699. * patterns: {
  62700. * stripe45d: {
  62701. * boundingBox: [1, 1, 4, 4],
  62702. * xStep: 3,
  62703. * yStep: 3,
  62704. * pattern: '1 w 0 1 m 4 5 l s 2 0 m 5 3 l s'
  62705. * }
  62706. * }
  62707. * };
  62708. *
  62709. * var pdfKitDoc = printer.createPdfKitDocument(docDefinition);
  62710. *
  62711. * pdfKitDoc.pipe(fs.createWriteStream('sample.pdf'));
  62712. * pdfKitDoc.end();
  62713. *
  62714. * @return {Object} a pdfKit document object which can be saved or encode to data-url
  62715. */
  62716. PdfPrinter.prototype.createPdfKitDocument = function (docDefinition, options) {
  62717. options = options || {};
  62718. docDefinition.version = docDefinition.version || '1.3';
  62719. docDefinition.compress = isBoolean(docDefinition.compress) ? docDefinition.compress : true;
  62720. docDefinition.images = docDefinition.images || {};
  62721. docDefinition.pageMargins = ((docDefinition.pageMargins !== undefined) && (docDefinition.pageMargins !== null)) ? docDefinition.pageMargins : 40;
  62722. var pageSize = fixPageSize(docDefinition.pageSize, docDefinition.pageOrientation);
  62723. var pdfOptions = {
  62724. size: [pageSize.width, pageSize.height],
  62725. pdfVersion: docDefinition.version,
  62726. compress: docDefinition.compress,
  62727. userPassword: docDefinition.userPassword,
  62728. ownerPassword: docDefinition.ownerPassword,
  62729. permissions: docDefinition.permissions,
  62730. fontLayoutCache: isBoolean(options.fontLayoutCache) ? options.fontLayoutCache : true,
  62731. bufferPages: options.bufferPages || false,
  62732. autoFirstPage: false,
  62733. info: createMetadata(docDefinition),
  62734. font: null
  62735. };
  62736. this.pdfKitDoc = PdfKitEngine.createPdfDocument(pdfOptions);
  62737. this.fontProvider = new FontProvider(this.fontDescriptors, this.pdfKitDoc);
  62738. var builder = new LayoutBuilder(pageSize, fixPageMargins(docDefinition.pageMargins), new ImageMeasure(this.pdfKitDoc, docDefinition.images), new SVGMeasure());
  62739. registerDefaultTableLayouts(builder);
  62740. if (options.tableLayouts) {
  62741. builder.registerTableLayouts(options.tableLayouts);
  62742. }
  62743. var pages = builder.layoutDocument(docDefinition.content, this.fontProvider, docDefinition.styles || {}, docDefinition.defaultStyle || {
  62744. fontSize: 12,
  62745. font: 'Roboto'
  62746. }, docDefinition.background, docDefinition.header, docDefinition.footer, docDefinition.images, docDefinition.watermark, docDefinition.pageBreakBefore);
  62747. var maxNumberPages = docDefinition.maxPagesNumber || -1;
  62748. if (isNumber(maxNumberPages) && maxNumberPages > -1) {
  62749. pages = pages.slice(0, maxNumberPages);
  62750. }
  62751. // if pageSize.height is set to Infinity, calculate the actual height of the page that
  62752. // was laid out using the height of each of the items in the page.
  62753. if (pageSize.height === Infinity) {
  62754. var pageHeight = calculatePageHeight(pages, docDefinition.pageMargins);
  62755. this.pdfKitDoc.options.size = [pageSize.width, pageHeight];
  62756. }
  62757. var patterns = createPatterns(docDefinition.patterns || {}, this.pdfKitDoc);
  62758. renderPages(pages, this.fontProvider, this.pdfKitDoc, patterns, options.progressCallback);
  62759. if (options.autoPrint) {
  62760. var printActionRef = this.pdfKitDoc.ref({
  62761. Type: 'Action',
  62762. S: 'Named',
  62763. N: 'Print'
  62764. });
  62765. this.pdfKitDoc._root.data.OpenAction = printActionRef;
  62766. printActionRef.end();
  62767. }
  62768. return this.pdfKitDoc;
  62769. };
  62770. function createMetadata(docDefinition) {
  62771. // PDF standard has these properties reserved: Title, Author, Subject, Keywords,
  62772. // Creator, Producer, CreationDate, ModDate, Trapped.
  62773. // To keep the pdfmake api consistent, the info field are defined lowercase.
  62774. // Custom properties don't contain a space.
  62775. function standardizePropertyKey(key) {
  62776. var standardProperties = ['Title', 'Author', 'Subject', 'Keywords',
  62777. 'Creator', 'Producer', 'CreationDate', 'ModDate', 'Trapped'];
  62778. var standardizedKey = key.charAt(0).toUpperCase() + key.slice(1);
  62779. if (standardProperties.indexOf(standardizedKey) !== -1) {
  62780. return standardizedKey;
  62781. }
  62782. return key.replace(/\s+/g, '');
  62783. }
  62784. var info = {
  62785. Producer: 'pdfmake',
  62786. Creator: 'pdfmake'
  62787. };
  62788. if (docDefinition.info) {
  62789. for (var key in docDefinition.info) {
  62790. var value = docDefinition.info[key];
  62791. if (value) {
  62792. key = standardizePropertyKey(key);
  62793. info[key] = value;
  62794. }
  62795. }
  62796. }
  62797. return info;
  62798. }
  62799. function calculatePageHeight(pages, margins) {
  62800. function getItemHeight(item) {
  62801. if (isFunction(item.item.getHeight)) {
  62802. return item.item.getHeight();
  62803. } else if (item.item._height) {
  62804. return item.item._height;
  62805. } else if (item.type === 'vector') {
  62806. return item.item.y1 > item.item.y2 ? item.item.y1 : item.item.y2;
  62807. } else {
  62808. // TODO: add support for next item types
  62809. return 0;
  62810. }
  62811. }
  62812. function getBottomPosition(item) {
  62813. var top = item.item.y || 0;
  62814. var height = getItemHeight(item);
  62815. return top + height;
  62816. }
  62817. var fixedMargins = fixPageMargins(margins || 40);
  62818. var height = fixedMargins.top;
  62819. pages.forEach(function (page) {
  62820. page.items.forEach(function (item) {
  62821. var bottomPosition = getBottomPosition(item);
  62822. if (bottomPosition > height) {
  62823. height = bottomPosition;
  62824. }
  62825. });
  62826. });
  62827. height += fixedMargins.bottom;
  62828. return height;
  62829. }
  62830. function fixPageSize(pageSize, pageOrientation) {
  62831. function isNeedSwapPageSizes(pageOrientation) {
  62832. if (isString(pageOrientation)) {
  62833. pageOrientation = pageOrientation.toLowerCase();
  62834. return ((pageOrientation === 'portrait') && (size.width > size.height)) ||
  62835. ((pageOrientation === 'landscape') && (size.width < size.height));
  62836. }
  62837. return false;
  62838. }
  62839. // if pageSize.height is set to auto, set the height to infinity so there are no page breaks.
  62840. if (pageSize && pageSize.height === 'auto') {
  62841. pageSize.height = Infinity;
  62842. }
  62843. var size = pageSize2widthAndHeight(pageSize || 'A4');
  62844. if (isNeedSwapPageSizes(pageOrientation)) { // swap page sizes
  62845. size = { width: size.height, height: size.width };
  62846. }
  62847. size.orientation = size.width > size.height ? 'landscape' : 'portrait';
  62848. return size;
  62849. }
  62850. function fixPageMargins(margin) {
  62851. if (isNumber(margin)) {
  62852. margin = { left: margin, right: margin, top: margin, bottom: margin };
  62853. } else if (isArray(margin)) {
  62854. if (margin.length === 2) {
  62855. margin = { left: margin[0], top: margin[1], right: margin[0], bottom: margin[1] };
  62856. } else if (margin.length === 4) {
  62857. margin = { left: margin[0], top: margin[1], right: margin[2], bottom: margin[3] };
  62858. } else {
  62859. throw 'Invalid pageMargins definition';
  62860. }
  62861. }
  62862. return margin;
  62863. }
  62864. function registerDefaultTableLayouts(layoutBuilder) {
  62865. layoutBuilder.registerTableLayouts({
  62866. noBorders: {
  62867. hLineWidth: function (i) {
  62868. return 0;
  62869. },
  62870. vLineWidth: function (i) {
  62871. return 0;
  62872. },
  62873. paddingLeft: function (i) {
  62874. return i && 4 || 0;
  62875. },
  62876. paddingRight: function (i, node) {
  62877. return (i < node.table.widths.length - 1) ? 4 : 0;
  62878. }
  62879. },
  62880. headerLineOnly: {
  62881. hLineWidth: function (i, node) {
  62882. if (i === 0 || i === node.table.body.length) {
  62883. return 0;
  62884. }
  62885. return (i === node.table.headerRows) ? 2 : 0;
  62886. },
  62887. vLineWidth: function (i) {
  62888. return 0;
  62889. },
  62890. paddingLeft: function (i) {
  62891. return i === 0 ? 0 : 8;
  62892. },
  62893. paddingRight: function (i, node) {
  62894. return (i === node.table.widths.length - 1) ? 0 : 8;
  62895. }
  62896. },
  62897. lightHorizontalLines: {
  62898. hLineWidth: function (i, node) {
  62899. if (i === 0 || i === node.table.body.length) {
  62900. return 0;
  62901. }
  62902. return (i === node.table.headerRows) ? 2 : 1;
  62903. },
  62904. vLineWidth: function (i) {
  62905. return 0;
  62906. },
  62907. hLineColor: function (i) {
  62908. return i === 1 ? 'black' : '#aaa';
  62909. },
  62910. paddingLeft: function (i) {
  62911. return i === 0 ? 0 : 8;
  62912. },
  62913. paddingRight: function (i, node) {
  62914. return (i === node.table.widths.length - 1) ? 0 : 8;
  62915. }
  62916. }
  62917. });
  62918. }
  62919. function pageSize2widthAndHeight(pageSize) {
  62920. if (isString(pageSize)) {
  62921. var size = sizes[pageSize.toUpperCase()];
  62922. if (!size) {
  62923. throw 'Page size ' + pageSize + ' not recognized';
  62924. }
  62925. return { width: size[0], height: size[1] };
  62926. }
  62927. return pageSize;
  62928. }
  62929. function updatePageOrientationInOptions(currentPage, pdfKitDoc) {
  62930. var previousPageOrientation = pdfKitDoc.options.size[0] > pdfKitDoc.options.size[1] ? 'landscape' : 'portrait';
  62931. if (currentPage.pageSize.orientation !== previousPageOrientation) {
  62932. var width = pdfKitDoc.options.size[0];
  62933. var height = pdfKitDoc.options.size[1];
  62934. pdfKitDoc.options.size = [height, width];
  62935. }
  62936. }
  62937. function renderPages(pages, fontProvider, pdfKitDoc, patterns, progressCallback) {
  62938. pdfKitDoc._pdfMakePages = pages;
  62939. pdfKitDoc.addPage();
  62940. var totalItems = 0;
  62941. if (progressCallback) {
  62942. pages.forEach(function (page) {
  62943. totalItems += page.items.length;
  62944. });
  62945. }
  62946. var renderedItems = 0;
  62947. progressCallback = progressCallback || function () {
  62948. };
  62949. for (var i = 0; i < pages.length; i++) {
  62950. if (i > 0) {
  62951. updatePageOrientationInOptions(pages[i], pdfKitDoc);
  62952. pdfKitDoc.addPage(pdfKitDoc.options);
  62953. }
  62954. var page = pages[i];
  62955. for (var ii = 0, il = page.items.length; ii < il; ii++) {
  62956. var item = page.items[ii];
  62957. switch (item.type) {
  62958. case 'vector':
  62959. renderVector(item.item, patterns, pdfKitDoc);
  62960. break;
  62961. case 'line':
  62962. renderLine(item.item, item.item.x, item.item.y, patterns, pdfKitDoc);
  62963. break;
  62964. case 'image':
  62965. renderImage(item.item, item.item.x, item.item.y, pdfKitDoc);
  62966. break;
  62967. case 'svg':
  62968. renderSVG(item.item, item.item.x, item.item.y, pdfKitDoc, fontProvider);
  62969. break;
  62970. case 'beginClip':
  62971. beginClip(item.item, pdfKitDoc);
  62972. break;
  62973. case 'endClip':
  62974. endClip(pdfKitDoc);
  62975. break;
  62976. }
  62977. renderedItems++;
  62978. progressCallback(renderedItems / totalItems);
  62979. }
  62980. if (page.watermark) {
  62981. renderWatermark(page, pdfKitDoc);
  62982. }
  62983. }
  62984. }
  62985. /**
  62986. * Shift the "y" height of the text baseline up or down (superscript or subscript,
  62987. * respectively). The exact shift can / should be changed according to standard
  62988. * conventions.
  62989. *
  62990. * @param {number} y
  62991. * @param {any} inline
  62992. */
  62993. function offsetText(y, inline) {
  62994. var newY = y;
  62995. if (inline.sup) {
  62996. newY -= inline.fontSize * 0.75;
  62997. }
  62998. if (inline.sub) {
  62999. newY += inline.fontSize * 0.35;
  63000. }
  63001. return newY;
  63002. }
  63003. function renderLine(line, x, y, patterns, pdfKitDoc) {
  63004. function preparePageNodeRefLine(_pageNodeRef, inline) {
  63005. var newWidth;
  63006. var diffWidth;
  63007. var textTools = new TextTools(null);
  63008. if (isUndefined(_pageNodeRef.positions)) {
  63009. throw 'Page reference id not found';
  63010. }
  63011. var pageNumber = _pageNodeRef.positions[0].pageNumber.toString();
  63012. inline.text = pageNumber;
  63013. newWidth = textTools.widthOfString(inline.text, inline.font, inline.fontSize, inline.characterSpacing, inline.fontFeatures);
  63014. diffWidth = inline.width - newWidth;
  63015. inline.width = newWidth;
  63016. switch (inline.alignment) {
  63017. case 'right':
  63018. inline.x += diffWidth;
  63019. break;
  63020. case 'center':
  63021. inline.x += diffWidth / 2;
  63022. break;
  63023. }
  63024. }
  63025. if (line._pageNodeRef) {
  63026. preparePageNodeRefLine(line._pageNodeRef, line.inlines[0]);
  63027. }
  63028. x = x || 0;
  63029. y = y || 0;
  63030. var lineHeight = line.getHeight();
  63031. var ascenderHeight = line.getAscenderHeight();
  63032. var descent = lineHeight - ascenderHeight;
  63033. textDecorator.drawBackground(line, x, y, patterns, pdfKitDoc);
  63034. //TODO: line.optimizeInlines();
  63035. for (var i = 0, l = line.inlines.length; i < l; i++) {
  63036. var inline = line.inlines[i];
  63037. var shiftToBaseline = lineHeight - ((inline.font.ascender / 1000) * inline.fontSize) - descent;
  63038. if (inline._pageNodeRef) {
  63039. preparePageNodeRefLine(inline._pageNodeRef, inline);
  63040. }
  63041. var options = {
  63042. lineBreak: false,
  63043. textWidth: inline.width,
  63044. characterSpacing: inline.characterSpacing,
  63045. wordCount: 1,
  63046. link: inline.link
  63047. };
  63048. if (inline.linkToDestination) {
  63049. options.goTo = inline.linkToDestination;
  63050. }
  63051. if (line.id && i === 0) {
  63052. options.destination = line.id;
  63053. }
  63054. if (inline.fontFeatures) {
  63055. options.features = inline.fontFeatures;
  63056. }
  63057. var opacity = isNumber(inline.opacity) ? inline.opacity : 1;
  63058. pdfKitDoc.opacity(opacity);
  63059. pdfKitDoc.fill(inline.color || 'black');
  63060. pdfKitDoc._font = inline.font;
  63061. pdfKitDoc.fontSize(inline.fontSize);
  63062. var shiftedY = offsetText(y + shiftToBaseline, inline);
  63063. pdfKitDoc.text(inline.text, x + inline.x, shiftedY, options);
  63064. if (inline.linkToPage) {
  63065. var _ref = pdfKitDoc.ref({ Type: 'Action', S: 'GoTo', D: [inline.linkToPage, 0, 0] }).end();
  63066. pdfKitDoc.annotate(x + inline.x, shiftedY, inline.width, inline.height, {
  63067. Subtype: 'Link',
  63068. Dest: [inline.linkToPage - 1, 'XYZ', null, null, null]
  63069. });
  63070. }
  63071. }
  63072. // Decorations won't draw correctly for superscript
  63073. textDecorator.drawDecorations(line, x, y, pdfKitDoc);
  63074. }
  63075. function renderWatermark(page, pdfKitDoc) {
  63076. var watermark = page.watermark;
  63077. pdfKitDoc.fill(watermark.color);
  63078. pdfKitDoc.opacity(watermark.opacity);
  63079. pdfKitDoc.save();
  63080. pdfKitDoc.rotate(watermark.angle, { origin: [pdfKitDoc.page.width / 2, pdfKitDoc.page.height / 2] });
  63081. var x = pdfKitDoc.page.width / 2 - watermark._size.size.width / 2;
  63082. var y = pdfKitDoc.page.height / 2 - watermark._size.size.height / 2;
  63083. pdfKitDoc._font = watermark.font;
  63084. pdfKitDoc.fontSize(watermark.fontSize);
  63085. pdfKitDoc.text(watermark.text, x, y, { lineBreak: false });
  63086. pdfKitDoc.restore();
  63087. }
  63088. function renderVector(vector, patterns, pdfKitDoc) {
  63089. //TODO: pdf optimization (there's no need to write all properties everytime)
  63090. pdfKitDoc.lineWidth(vector.lineWidth || 1);
  63091. if (vector.dash) {
  63092. pdfKitDoc.dash(vector.dash.length, { space: vector.dash.space || vector.dash.length, phase: vector.dash.phase || 0 });
  63093. } else {
  63094. pdfKitDoc.undash();
  63095. }
  63096. pdfKitDoc.lineJoin(vector.lineJoin || 'miter');
  63097. pdfKitDoc.lineCap(vector.lineCap || 'butt');
  63098. //TODO: clipping
  63099. var gradient = null;
  63100. switch (vector.type) {
  63101. case 'ellipse':
  63102. pdfKitDoc.ellipse(vector.x, vector.y, vector.r1, vector.r2);
  63103. if (vector.linearGradient) {
  63104. gradient = pdfKitDoc.linearGradient(vector.x - vector.r1, vector.y, vector.x + vector.r1, vector.y);
  63105. }
  63106. break;
  63107. case 'rect':
  63108. if (vector.r) {
  63109. pdfKitDoc.roundedRect(vector.x, vector.y, vector.w, vector.h, vector.r);
  63110. } else {
  63111. pdfKitDoc.rect(vector.x, vector.y, vector.w, vector.h);
  63112. }
  63113. if (vector.linearGradient) {
  63114. gradient = pdfKitDoc.linearGradient(vector.x, vector.y, vector.x + vector.w, vector.y);
  63115. }
  63116. break;
  63117. case 'line':
  63118. pdfKitDoc.moveTo(vector.x1, vector.y1);
  63119. pdfKitDoc.lineTo(vector.x2, vector.y2);
  63120. break;
  63121. case 'polyline':
  63122. if (vector.points.length === 0) {
  63123. break;
  63124. }
  63125. pdfKitDoc.moveTo(vector.points[0].x, vector.points[0].y);
  63126. for (var i = 1, l = vector.points.length; i < l; i++) {
  63127. pdfKitDoc.lineTo(vector.points[i].x, vector.points[i].y);
  63128. }
  63129. if (vector.points.length > 1) {
  63130. var p1 = vector.points[0];
  63131. var pn = vector.points[vector.points.length - 1];
  63132. if (vector.closePath || p1.x === pn.x && p1.y === pn.y) {
  63133. pdfKitDoc.closePath();
  63134. }
  63135. }
  63136. break;
  63137. case 'path':
  63138. pdfKitDoc.path(vector.d);
  63139. break;
  63140. }
  63141. if (vector.linearGradient && gradient) {
  63142. var step = 1 / (vector.linearGradient.length - 1);
  63143. for (var i = 0; i < vector.linearGradient.length; i++) {
  63144. gradient.stop(i * step, vector.linearGradient[i]);
  63145. }
  63146. vector.color = gradient;
  63147. }
  63148. if (isPattern(vector.color)) {
  63149. vector.color = getPattern(vector.color, patterns);
  63150. }
  63151. var fillOpacity = isNumber(vector.fillOpacity) ? vector.fillOpacity : 1;
  63152. var strokeOpacity = isNumber(vector.strokeOpacity) ? vector.strokeOpacity : 1;
  63153. if (vector.color && vector.lineColor) {
  63154. pdfKitDoc.fillColor(vector.color, fillOpacity);
  63155. pdfKitDoc.strokeColor(vector.lineColor, strokeOpacity);
  63156. pdfKitDoc.fillAndStroke();
  63157. } else if (vector.color) {
  63158. pdfKitDoc.fillColor(vector.color, fillOpacity);
  63159. pdfKitDoc.fill();
  63160. } else {
  63161. pdfKitDoc.strokeColor(vector.lineColor || 'black', strokeOpacity);
  63162. pdfKitDoc.stroke();
  63163. }
  63164. }
  63165. function renderImage(image, x, y, pdfKitDoc) {
  63166. var opacity = isNumber(image.opacity) ? image.opacity : 1;
  63167. pdfKitDoc.opacity(opacity);
  63168. if (image.cover) {
  63169. var align = image.cover.align || 'center';
  63170. var valign = image.cover.valign || 'center';
  63171. var width = image.cover.width ? image.cover.width : image.width;
  63172. var height = image.cover.height ? image.cover.height : image.height;
  63173. pdfKitDoc.save();
  63174. pdfKitDoc.rect(image.x, image.y, width, height).clip();
  63175. pdfKitDoc.image(image.image, image.x, image.y, { cover: [width, height], align: align, valign: valign });
  63176. pdfKitDoc.restore();
  63177. } else {
  63178. pdfKitDoc.image(image.image, image.x, image.y, { width: image._width, height: image._height });
  63179. }
  63180. if (image.link) {
  63181. pdfKitDoc.link(image.x, image.y, image._width, image._height, image.link);
  63182. }
  63183. if (image.linkToPage) {
  63184. pdfKitDoc.ref({ Type: 'Action', S: 'GoTo', D: [image.linkToPage, 0, 0] }).end();
  63185. pdfKitDoc.annotate(image.x, image.y, image._width, image._height, { Subtype: 'Link', Dest: [image.linkToPage - 1, 'XYZ', null, null, null] });
  63186. }
  63187. if (image.linkToDestination) {
  63188. pdfKitDoc.goTo(image.x, image.y, image._width, image._height, image.linkToDestination);
  63189. }
  63190. }
  63191. function renderSVG(svg, x, y, pdfKitDoc, fontProvider) {
  63192. var options = Object.assign({ width: svg._width, height: svg._height, assumePt: true }, svg.options);
  63193. options.fontCallback = function (family, bold, italic) {
  63194. var fontsFamily = family.split(',').map(function (f) { return f.trim().replace(/('|")/g, ''); });
  63195. var font = findFont(fontProvider.fonts, fontsFamily, svg.font || 'Roboto');
  63196. var fontFile = fontProvider.getFontFile(font, bold, italic);
  63197. if (fontFile === null) {
  63198. var type = fontProvider.getFontType(bold, italic);
  63199. throw new Error('Font \'' + font + '\' in style \'' + type + '\' is not defined in the font section of the document definition.');
  63200. }
  63201. return fontFile;
  63202. };
  63203. SVGtoPDF(pdfKitDoc, svg.svg, svg.x, svg.y, options);
  63204. }
  63205. function beginClip(rect, pdfKitDoc) {
  63206. pdfKitDoc.save();
  63207. pdfKitDoc.addContent('' + rect.x + ' ' + rect.y + ' ' + rect.width + ' ' + rect.height + ' re');
  63208. pdfKitDoc.clip();
  63209. }
  63210. function endClip(pdfKitDoc) {
  63211. pdfKitDoc.restore();
  63212. }
  63213. function createPatterns(patternDefinitions, pdfKitDoc) {
  63214. var patterns = {};
  63215. Object.keys(patternDefinitions).forEach(function (p) {
  63216. var pattern = patternDefinitions[p];
  63217. patterns[p] = pdfKitDoc.pattern(pattern.boundingBox, pattern.xStep, pattern.yStep, pattern.pattern, pattern.colored);
  63218. });
  63219. return patterns;
  63220. }
  63221. module.exports = PdfPrinter;
  63222. /***/ }),
  63223. /***/ 145:
  63224. /***/ (function(module) {
  63225. "use strict";
  63226. /*eslint no-unused-vars: ["error", {"args": "none"}]*/
  63227. /*eslint no-redeclare: "off"*/
  63228. /* qr.js -- QR code generator in Javascript (revision 2011-01-19)
  63229. * Written by Kang Seonghoon <public+qrjs@mearie.org>.
  63230. *
  63231. * This source code is in the public domain; if your jurisdiction does not
  63232. * recognize the public domain the terms of Creative Commons CC0 license
  63233. * apply. In the other words, you can always do what you want.
  63234. */
  63235. // per-version information (cf. JIS X 0510:2004 pp. 30--36, 71)
  63236. //
  63237. // [0]: the degree of generator polynomial by ECC levels
  63238. // [1]: # of code blocks by ECC levels
  63239. // [2]: left-top positions of alignment patterns
  63240. //
  63241. // the number in this table (in particular, [0]) does not exactly match with
  63242. // the numbers in the specficiation. see augumenteccs below for the reason.
  63243. var VERSIONS = [
  63244. null,
  63245. [[10, 7, 17, 13], [1, 1, 1, 1], []],
  63246. [[16, 10, 28, 22], [1, 1, 1, 1], [4, 16]],
  63247. [[26, 15, 22, 18], [1, 1, 2, 2], [4, 20]],
  63248. [[18, 20, 16, 26], [2, 1, 4, 2], [4, 24]],
  63249. [[24, 26, 22, 18], [2, 1, 4, 4], [4, 28]],
  63250. [[16, 18, 28, 24], [4, 2, 4, 4], [4, 32]],
  63251. [[18, 20, 26, 18], [4, 2, 5, 6], [4, 20, 36]],
  63252. [[22, 24, 26, 22], [4, 2, 6, 6], [4, 22, 40]],
  63253. [[22, 30, 24, 20], [5, 2, 8, 8], [4, 24, 44]],
  63254. [[26, 18, 28, 24], [5, 4, 8, 8], [4, 26, 48]],
  63255. [[30, 20, 24, 28], [5, 4, 11, 8], [4, 28, 52]],
  63256. [[22, 24, 28, 26], [8, 4, 11, 10], [4, 30, 56]],
  63257. [[22, 26, 22, 24], [9, 4, 16, 12], [4, 32, 60]],
  63258. [[24, 30, 24, 20], [9, 4, 16, 16], [4, 24, 44, 64]],
  63259. [[24, 22, 24, 30], [10, 6, 18, 12], [4, 24, 46, 68]],
  63260. [[28, 24, 30, 24], [10, 6, 16, 17], [4, 24, 48, 72]],
  63261. [[28, 28, 28, 28], [11, 6, 19, 16], [4, 28, 52, 76]],
  63262. [[26, 30, 28, 28], [13, 6, 21, 18], [4, 28, 54, 80]],
  63263. [[26, 28, 26, 26], [14, 7, 25, 21], [4, 28, 56, 84]],
  63264. [[26, 28, 28, 30], [16, 8, 25, 20], [4, 32, 60, 88]],
  63265. [[26, 28, 30, 28], [17, 8, 25, 23], [4, 26, 48, 70, 92]],
  63266. [[28, 28, 24, 30], [17, 9, 34, 23], [4, 24, 48, 72, 96]],
  63267. [[28, 30, 30, 30], [18, 9, 30, 25], [4, 28, 52, 76, 100]],
  63268. [[28, 30, 30, 30], [20, 10, 32, 27], [4, 26, 52, 78, 104]],
  63269. [[28, 26, 30, 30], [21, 12, 35, 29], [4, 30, 56, 82, 108]],
  63270. [[28, 28, 30, 28], [23, 12, 37, 34], [4, 28, 56, 84, 112]],
  63271. [[28, 30, 30, 30], [25, 12, 40, 34], [4, 32, 60, 88, 116]],
  63272. [[28, 30, 30, 30], [26, 13, 42, 35], [4, 24, 48, 72, 96, 120]],
  63273. [[28, 30, 30, 30], [28, 14, 45, 38], [4, 28, 52, 76, 100, 124]],
  63274. [[28, 30, 30, 30], [29, 15, 48, 40], [4, 24, 50, 76, 102, 128]],
  63275. [[28, 30, 30, 30], [31, 16, 51, 43], [4, 28, 54, 80, 106, 132]],
  63276. [[28, 30, 30, 30], [33, 17, 54, 45], [4, 32, 58, 84, 110, 136]],
  63277. [[28, 30, 30, 30], [35, 18, 57, 48], [4, 28, 56, 84, 112, 140]],
  63278. [[28, 30, 30, 30], [37, 19, 60, 51], [4, 32, 60, 88, 116, 144]],
  63279. [[28, 30, 30, 30], [38, 19, 63, 53], [4, 28, 52, 76, 100, 124, 148]],
  63280. [[28, 30, 30, 30], [40, 20, 66, 56], [4, 22, 48, 74, 100, 126, 152]],
  63281. [[28, 30, 30, 30], [43, 21, 70, 59], [4, 26, 52, 78, 104, 130, 156]],
  63282. [[28, 30, 30, 30], [45, 22, 74, 62], [4, 30, 56, 82, 108, 134, 160]],
  63283. [[28, 30, 30, 30], [47, 24, 77, 65], [4, 24, 52, 80, 108, 136, 164]],
  63284. [[28, 30, 30, 30], [49, 25, 81, 68], [4, 28, 56, 84, 112, 140, 168]]];
  63285. // mode constants (cf. Table 2 in JIS X 0510:2004 p. 16)
  63286. var MODE_TERMINATOR = 0;
  63287. var MODE_NUMERIC = 1, MODE_ALPHANUMERIC = 2, MODE_OCTET = 4, MODE_KANJI = 8;
  63288. // validation regexps
  63289. var NUMERIC_REGEXP = /^\d*$/;
  63290. var ALPHANUMERIC_REGEXP = /^[A-Za-z0-9 $%*+\-./:]*$/;
  63291. var ALPHANUMERIC_OUT_REGEXP = /^[A-Z0-9 $%*+\-./:]*$/;
  63292. // ECC levels (cf. Table 22 in JIS X 0510:2004 p. 45)
  63293. var ECCLEVEL_L = 1, ECCLEVEL_M = 0, ECCLEVEL_Q = 3, ECCLEVEL_H = 2;
  63294. // GF(2^8)-to-integer mapping with a reducing polynomial x^8+x^4+x^3+x^2+1
  63295. // invariant: GF256_MAP[GF256_INVMAP[i]] == i for all i in [1,256)
  63296. var GF256_MAP = [], GF256_INVMAP = [-1];
  63297. for (var i = 0, v = 1; i < 255; ++i) {
  63298. GF256_MAP.push(v);
  63299. GF256_INVMAP[v] = i;
  63300. v = (v * 2) ^ (v >= 128 ? 0x11d : 0);
  63301. }
  63302. // generator polynomials up to degree 30
  63303. // (should match with polynomials in JIS X 0510:2004 Appendix A)
  63304. //
  63305. // generator polynomial of degree K is product of (x-\alpha^0), (x-\alpha^1),
  63306. // ..., (x-\alpha^(K-1)). by convention, we omit the K-th coefficient (always 1)
  63307. // from the result; also other coefficients are written in terms of the exponent
  63308. // to \alpha to avoid the redundant calculation. (see also calculateecc below.)
  63309. var GF256_GENPOLY = [[]];
  63310. for (var i = 0; i < 30; ++i) {
  63311. var prevpoly = GF256_GENPOLY[i], poly = [];
  63312. for (var j = 0; j <= i; ++j) {
  63313. var a = (j < i ? GF256_MAP[prevpoly[j]] : 0);
  63314. var b = GF256_MAP[(i + (prevpoly[j - 1] || 0)) % 255];
  63315. poly.push(GF256_INVMAP[a ^ b]);
  63316. }
  63317. GF256_GENPOLY.push(poly);
  63318. }
  63319. // alphanumeric character mapping (cf. Table 5 in JIS X 0510:2004 p. 19)
  63320. var ALPHANUMERIC_MAP = {};
  63321. for (var i = 0; i < 45; ++i) {
  63322. ALPHANUMERIC_MAP['0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'.charAt(i)] = i;
  63323. }
  63324. // mask functions in terms of row # and column #
  63325. // (cf. Table 20 in JIS X 0510:2004 p. 42)
  63326. /*jshint unused: false */
  63327. var MASKFUNCS = [
  63328. function (i, j) {
  63329. return (i + j) % 2 === 0;
  63330. },
  63331. function (i, j) {
  63332. return i % 2 === 0;
  63333. },
  63334. function (i, j) {
  63335. return j % 3 === 0;
  63336. },
  63337. function (i, j) {
  63338. return (i + j) % 3 === 0;
  63339. },
  63340. function (i, j) {
  63341. return (((i / 2) | 0) + ((j / 3) | 0)) % 2 === 0;
  63342. },
  63343. function (i, j) {
  63344. return (i * j) % 2 + (i * j) % 3 === 0;
  63345. },
  63346. function (i, j) {
  63347. return ((i * j) % 2 + (i * j) % 3) % 2 === 0;
  63348. },
  63349. function (i, j) {
  63350. return ((i + j) % 2 + (i * j) % 3) % 2 === 0;
  63351. }];
  63352. // returns true when the version information has to be embeded.
  63353. var needsverinfo = function (ver) {
  63354. return ver > 6;
  63355. };
  63356. // returns the size of entire QR code for given version.
  63357. var getsizebyver = function (ver) {
  63358. return 4 * ver + 17;
  63359. };
  63360. // returns the number of bits available for code words in this version.
  63361. var nfullbits = function (ver) {
  63362. /*
  63363. * |<--------------- n --------------->|
  63364. * | |<----- n-17 ---->| |
  63365. * +-------+ ///+-------+ ----
  63366. * | | ///| | ^
  63367. * | 9x9 | @@@@@ ///| 9x8 | |
  63368. * | | # # # @5x5@ # # # | | |
  63369. * +-------+ @@@@@ +-------+ |
  63370. * # ---|
  63371. * ^ |
  63372. * # |
  63373. * @@@@@ @@@@@ @@@@@ | n
  63374. * @5x5@ @5x5@ @5x5@ n-17
  63375. * @@@@@ @@@@@ @@@@@ | |
  63376. * # | |
  63377. * ////// v |
  63378. * //////# ---|
  63379. * +-------+ @@@@@ @@@@@ |
  63380. * | | @5x5@ @5x5@ |
  63381. * | 8x9 | @@@@@ @@@@@ |
  63382. * | | v
  63383. * +-------+ ----
  63384. *
  63385. * when the entire code has n^2 modules and there are m^2-3 alignment
  63386. * patterns, we have:
  63387. * - 225 (= 9x9 + 9x8 + 8x9) modules for finder patterns and
  63388. * format information;
  63389. * - 2n-34 (= 2(n-17)) modules for timing patterns;
  63390. * - 36 (= 3x6 + 6x3) modules for version information, if any;
  63391. * - 25m^2-75 (= (m^2-3)(5x5)) modules for alignment patterns
  63392. * if any, but 10m-20 (= 2(m-2)x5) of them overlaps with
  63393. * timing patterns.
  63394. */
  63395. var v = VERSIONS[ver];
  63396. var nbits = 16 * ver * ver + 128 * ver + 64; // finder, timing and format info.
  63397. if (needsverinfo(ver))
  63398. nbits -= 36; // version information
  63399. if (v[2].length) { // alignment patterns
  63400. nbits -= 25 * v[2].length * v[2].length - 10 * v[2].length - 55;
  63401. }
  63402. return nbits;
  63403. };
  63404. // returns the number of bits available for data portions (i.e. excludes ECC
  63405. // bits but includes mode and length bits) in this version and ECC level.
  63406. var ndatabits = function (ver, ecclevel) {
  63407. var nbits = nfullbits(ver) & ~7; // no sub-octet code words
  63408. var v = VERSIONS[ver];
  63409. nbits -= 8 * v[0][ecclevel] * v[1][ecclevel]; // ecc bits
  63410. return nbits;
  63411. };
  63412. // returns the number of bits required for the length of data.
  63413. // (cf. Table 3 in JIS X 0510:2004 p. 16)
  63414. var ndatalenbits = function (ver, mode) {
  63415. switch (mode) {
  63416. case MODE_NUMERIC:
  63417. return (ver < 10 ? 10 : ver < 27 ? 12 : 14);
  63418. case MODE_ALPHANUMERIC:
  63419. return (ver < 10 ? 9 : ver < 27 ? 11 : 13);
  63420. case MODE_OCTET:
  63421. return (ver < 10 ? 8 : 16);
  63422. case MODE_KANJI:
  63423. return (ver < 10 ? 8 : ver < 27 ? 10 : 12);
  63424. }
  63425. };
  63426. // returns the maximum length of data possible in given configuration.
  63427. var getmaxdatalen = function (ver, mode, ecclevel) {
  63428. var nbits = ndatabits(ver, ecclevel) - 4 - ndatalenbits(ver, mode); // 4 for mode bits
  63429. switch (mode) {
  63430. case MODE_NUMERIC:
  63431. return ((nbits / 10) | 0) * 3 + (nbits % 10 < 4 ? 0 : nbits % 10 < 7 ? 1 : 2);
  63432. case MODE_ALPHANUMERIC:
  63433. return ((nbits / 11) | 0) * 2 + (nbits % 11 < 6 ? 0 : 1);
  63434. case MODE_OCTET:
  63435. return (nbits / 8) | 0;
  63436. case MODE_KANJI:
  63437. return (nbits / 13) | 0;
  63438. }
  63439. };
  63440. // checks if the given data can be encoded in given mode, and returns
  63441. // the converted data for the further processing if possible. otherwise
  63442. // returns null.
  63443. //
  63444. // this function does not check the length of data; it is a duty of
  63445. // encode function below (as it depends on the version and ECC level too).
  63446. var validatedata = function (mode, data) {
  63447. switch (mode) {
  63448. case MODE_NUMERIC:
  63449. if (!data.match(NUMERIC_REGEXP))
  63450. return null;
  63451. return data;
  63452. case MODE_ALPHANUMERIC:
  63453. if (!data.match(ALPHANUMERIC_REGEXP))
  63454. return null;
  63455. return data.toUpperCase();
  63456. case MODE_OCTET:
  63457. if (typeof data === 'string') { // encode as utf-8 string
  63458. var newdata = [];
  63459. for (var i = 0; i < data.length; ++i) {
  63460. var ch = data.charCodeAt(i);
  63461. if (ch < 0x80) {
  63462. newdata.push(ch);
  63463. } else if (ch < 0x800) {
  63464. newdata.push(0xc0 | (ch >> 6),
  63465. 0x80 | (ch & 0x3f));
  63466. } else if (ch < 0x10000) {
  63467. newdata.push(0xe0 | (ch >> 12),
  63468. 0x80 | ((ch >> 6) & 0x3f),
  63469. 0x80 | (ch & 0x3f));
  63470. } else {
  63471. newdata.push(0xf0 | (ch >> 18),
  63472. 0x80 | ((ch >> 12) & 0x3f),
  63473. 0x80 | ((ch >> 6) & 0x3f),
  63474. 0x80 | (ch & 0x3f));
  63475. }
  63476. }
  63477. return newdata;
  63478. } else {
  63479. return data;
  63480. }
  63481. }
  63482. };
  63483. // returns the code words (sans ECC bits) for given data and configurations.
  63484. // requires data to be preprocessed by validatedata. no length check is
  63485. // performed, and everything has to be checked before calling this function.
  63486. var encode = function (ver, mode, data, maxbuflen) {
  63487. var buf = [];
  63488. var bits = 0, remaining = 8;
  63489. var datalen = data.length;
  63490. // this function is intentionally no-op when n=0.
  63491. var pack = function (x, n) {
  63492. if (n >= remaining) {
  63493. buf.push(bits | (x >> (n -= remaining)));
  63494. while (n >= 8)
  63495. buf.push((x >> (n -= 8)) & 255);
  63496. bits = 0;
  63497. remaining = 8;
  63498. }
  63499. if (n > 0)
  63500. bits |= (x & ((1 << n) - 1)) << (remaining -= n);
  63501. };
  63502. var nlenbits = ndatalenbits(ver, mode);
  63503. pack(mode, 4);
  63504. pack(datalen, nlenbits);
  63505. switch (mode) {
  63506. case MODE_NUMERIC:
  63507. for (var i = 2; i < datalen; i += 3) {
  63508. pack(parseInt(data.substring(i - 2, i + 1), 10), 10);
  63509. }
  63510. pack(parseInt(data.substring(i - 2), 10), [0, 4, 7][datalen % 3]);
  63511. break;
  63512. case MODE_ALPHANUMERIC:
  63513. for (var i = 1; i < datalen; i += 2) {
  63514. pack(ALPHANUMERIC_MAP[data.charAt(i - 1)] * 45 +
  63515. ALPHANUMERIC_MAP[data.charAt(i)], 11);
  63516. }
  63517. if (datalen % 2 == 1) {
  63518. pack(ALPHANUMERIC_MAP[data.charAt(i - 1)], 6);
  63519. }
  63520. break;
  63521. case MODE_OCTET:
  63522. for (var i = 0; i < datalen; ++i) {
  63523. pack(data[i], 8);
  63524. }
  63525. break;
  63526. }
  63527. // final bits. it is possible that adding terminator causes the buffer
  63528. // to overflow, but then the buffer truncated to the maximum size will
  63529. // be valid as the truncated terminator mode bits and padding is
  63530. // identical in appearance (cf. JIS X 0510:2004 sec 8.4.8).
  63531. pack(MODE_TERMINATOR, 4);
  63532. if (remaining < 8)
  63533. buf.push(bits);
  63534. // the padding to fill up the remaining space. we should not add any
  63535. // words when the overflow already occurred.
  63536. while (buf.length + 1 < maxbuflen)
  63537. buf.push(0xec, 0x11);
  63538. if (buf.length < maxbuflen)
  63539. buf.push(0xec);
  63540. return buf;
  63541. };
  63542. // calculates ECC code words for given code words and generator polynomial.
  63543. //
  63544. // this is quite similar to CRC calculation as both Reed-Solomon and CRC use
  63545. // the certain kind of cyclic codes, which is effectively the division of
  63546. // zero-augumented polynomial by the generator polynomial. the only difference
  63547. // is that Reed-Solomon uses GF(2^8), instead of CRC's GF(2), and Reed-Solomon
  63548. // uses the different generator polynomial than CRC's.
  63549. var calculateecc = function (poly, genpoly) {
  63550. var modulus = poly.slice(0);
  63551. var polylen = poly.length, genpolylen = genpoly.length;
  63552. for (var i = 0; i < genpolylen; ++i)
  63553. modulus.push(0);
  63554. for (var i = 0; i < polylen; ) {
  63555. var quotient = GF256_INVMAP[modulus[i++]];
  63556. if (quotient >= 0) {
  63557. for (var j = 0; j < genpolylen; ++j) {
  63558. modulus[i + j] ^= GF256_MAP[(quotient + genpoly[j]) % 255];
  63559. }
  63560. }
  63561. }
  63562. return modulus.slice(polylen);
  63563. };
  63564. // auguments ECC code words to given code words. the resulting words are
  63565. // ready to be encoded in the matrix.
  63566. //
  63567. // the much of actual augumenting procedure follows JIS X 0510:2004 sec 8.7.
  63568. // the code is simplified using the fact that the size of each code & ECC
  63569. // blocks is almost same; for example, when we have 4 blocks and 46 data words
  63570. // the number of code words in those blocks are 11, 11, 12, 12 respectively.
  63571. var augumenteccs = function (poly, nblocks, genpoly) {
  63572. var subsizes = [];
  63573. var subsize = (poly.length / nblocks) | 0, subsize0 = 0;
  63574. var pivot = nblocks - poly.length % nblocks;
  63575. for (var i = 0; i < pivot; ++i) {
  63576. subsizes.push(subsize0);
  63577. subsize0 += subsize;
  63578. }
  63579. for (var i = pivot; i < nblocks; ++i) {
  63580. subsizes.push(subsize0);
  63581. subsize0 += subsize + 1;
  63582. }
  63583. subsizes.push(subsize0);
  63584. var eccs = [];
  63585. for (var i = 0; i < nblocks; ++i) {
  63586. eccs.push(calculateecc(poly.slice(subsizes[i], subsizes[i + 1]), genpoly));
  63587. }
  63588. var result = [];
  63589. var nitemsperblock = (poly.length / nblocks) | 0;
  63590. for (var i = 0; i < nitemsperblock; ++i) {
  63591. for (var j = 0; j < nblocks; ++j) {
  63592. result.push(poly[subsizes[j] + i]);
  63593. }
  63594. }
  63595. for (var j = pivot; j < nblocks; ++j) {
  63596. result.push(poly[subsizes[j + 1] - 1]);
  63597. }
  63598. for (var i = 0; i < genpoly.length; ++i) {
  63599. for (var j = 0; j < nblocks; ++j) {
  63600. result.push(eccs[j][i]);
  63601. }
  63602. }
  63603. return result;
  63604. };
  63605. // auguments BCH(p+q,q) code to the polynomial over GF(2), given the proper
  63606. // genpoly. the both input and output are in binary numbers, and unlike
  63607. // calculateecc genpoly should include the 1 bit for the highest degree.
  63608. //
  63609. // actual polynomials used for this procedure are as follows:
  63610. // - p=10, q=5, genpoly=x^10+x^8+x^5+x^4+x^2+x+1 (JIS X 0510:2004 Appendix C)
  63611. // - p=18, q=6, genpoly=x^12+x^11+x^10+x^9+x^8+x^5+x^2+1 (ibid. Appendix D)
  63612. var augumentbch = function (poly, p, genpoly, q) {
  63613. var modulus = poly << q;
  63614. for (var i = p - 1; i >= 0; --i) {
  63615. if ((modulus >> (q + i)) & 1)
  63616. modulus ^= genpoly << i;
  63617. }
  63618. return (poly << q) | modulus;
  63619. };
  63620. // creates the base matrix for given version. it returns two matrices, one of
  63621. // them is the actual one and the another represents the "reserved" portion
  63622. // (e.g. finder and timing patterns) of the matrix.
  63623. //
  63624. // some entries in the matrix may be undefined, rather than 0 or 1. this is
  63625. // intentional (no initialization needed!), and putdata below will fill
  63626. // the remaining ones.
  63627. var makebasematrix = function (ver) {
  63628. var v = VERSIONS[ver], n = getsizebyver(ver);
  63629. var matrix = [], reserved = [];
  63630. for (var i = 0; i < n; ++i) {
  63631. matrix.push([]);
  63632. reserved.push([]);
  63633. }
  63634. var blit = function (y, x, h, w, bits) {
  63635. for (var i = 0; i < h; ++i) {
  63636. for (var j = 0; j < w; ++j) {
  63637. matrix[y + i][x + j] = (bits[i] >> j) & 1;
  63638. reserved[y + i][x + j] = 1;
  63639. }
  63640. }
  63641. };
  63642. // finder patterns and a part of timing patterns
  63643. // will also mark the format information area (not yet written) as reserved.
  63644. blit(0, 0, 9, 9, [0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x17f, 0x00, 0x40]);
  63645. blit(n - 8, 0, 8, 9, [0x100, 0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x7f]);
  63646. blit(0, n - 8, 9, 8, [0xfe, 0x82, 0xba, 0xba, 0xba, 0x82, 0xfe, 0x00, 0x00]);
  63647. // the rest of timing patterns
  63648. for (var i = 9; i < n - 8; ++i) {
  63649. matrix[6][i] = matrix[i][6] = ~i & 1;
  63650. reserved[6][i] = reserved[i][6] = 1;
  63651. }
  63652. // alignment patterns
  63653. var aligns = v[2], m = aligns.length;
  63654. for (var i = 0; i < m; ++i) {
  63655. var minj = (i === 0 || i === m - 1 ? 1 : 0), maxj = (i === 0 ? m - 1 : m);
  63656. for (var j = minj; j < maxj; ++j) {
  63657. blit(aligns[i], aligns[j], 5, 5, [0x1f, 0x11, 0x15, 0x11, 0x1f]);
  63658. }
  63659. }
  63660. // version information
  63661. if (needsverinfo(ver)) {
  63662. var code = augumentbch(ver, 6, 0x1f25, 12);
  63663. var k = 0;
  63664. for (var i = 0; i < 6; ++i) {
  63665. for (var j = 0; j < 3; ++j) {
  63666. matrix[i][(n - 11) + j] = matrix[(n - 11) + j][i] = (code >> k++) & 1;
  63667. reserved[i][(n - 11) + j] = reserved[(n - 11) + j][i] = 1;
  63668. }
  63669. }
  63670. }
  63671. return {matrix: matrix, reserved: reserved};
  63672. };
  63673. // fills the data portion (i.e. unmarked in reserved) of the matrix with given
  63674. // code words. the size of code words should be no more than available bits,
  63675. // and remaining bits are padded to 0 (cf. JIS X 0510:2004 sec 8.7.3).
  63676. var putdata = function (matrix, reserved, buf) {
  63677. var n = matrix.length;
  63678. var k = 0, dir = -1;
  63679. for (var i = n - 1; i >= 0; i -= 2) {
  63680. if (i == 6)
  63681. --i; // skip the entire timing pattern column
  63682. var jj = (dir < 0 ? n - 1 : 0);
  63683. for (var j = 0; j < n; ++j) {
  63684. for (var ii = i; ii > i - 2; --ii) {
  63685. if (!reserved[jj][ii]) {
  63686. // may overflow, but (undefined >> x)
  63687. // is 0 so it will auto-pad to zero.
  63688. matrix[jj][ii] = (buf[k >> 3] >> (~k & 7)) & 1;
  63689. ++k;
  63690. }
  63691. }
  63692. jj += dir;
  63693. }
  63694. dir = -dir;
  63695. }
  63696. return matrix;
  63697. };
  63698. // XOR-masks the data portion of the matrix. repeating the call with the same
  63699. // arguments will revert the prior call (convenient in the matrix evaluation).
  63700. var maskdata = function (matrix, reserved, mask) {
  63701. var maskf = MASKFUNCS[mask];
  63702. var n = matrix.length;
  63703. for (var i = 0; i < n; ++i) {
  63704. for (var j = 0; j < n; ++j) {
  63705. if (!reserved[i][j])
  63706. matrix[i][j] ^= maskf(i, j);
  63707. }
  63708. }
  63709. return matrix;
  63710. };
  63711. // puts the format information.
  63712. var putformatinfo = function (matrix, reserved, ecclevel, mask) {
  63713. var n = matrix.length;
  63714. var code = augumentbch((ecclevel << 3) | mask, 5, 0x537, 10) ^ 0x5412;
  63715. for (var i = 0; i < 15; ++i) {
  63716. var r = [0, 1, 2, 3, 4, 5, 7, 8, n - 7, n - 6, n - 5, n - 4, n - 3, n - 2, n - 1][i];
  63717. var c = [n - 1, n - 2, n - 3, n - 4, n - 5, n - 6, n - 7, n - 8, 7, 5, 4, 3, 2, 1, 0][i];
  63718. matrix[r][8] = matrix[8][c] = (code >> i) & 1;
  63719. // we don't have to mark those bits reserved; always done
  63720. // in makebasematrix above.
  63721. }
  63722. return matrix;
  63723. };
  63724. // evaluates the resulting matrix and returns the score (lower is better).
  63725. // (cf. JIS X 0510:2004 sec 8.8.2)
  63726. //
  63727. // the evaluation procedure tries to avoid the problematic patterns naturally
  63728. // occuring from the original matrix. for example, it penaltizes the patterns
  63729. // which just look like the finder pattern which will confuse the decoder.
  63730. // we choose the mask which results in the lowest score among 8 possible ones.
  63731. //
  63732. // note: zxing seems to use the same procedure and in many cases its choice
  63733. // agrees to ours, but sometimes it does not. practically it doesn't matter.
  63734. var evaluatematrix = function (matrix) {
  63735. // N1+(k-5) points for each consecutive row of k same-colored modules,
  63736. // where k >= 5. no overlapping row counts.
  63737. var PENALTY_CONSECUTIVE = 3;
  63738. // N2 points for each 2x2 block of same-colored modules.
  63739. // overlapping block does count.
  63740. var PENALTY_TWOBYTWO = 3;
  63741. // N3 points for each pattern with >4W:1B:1W:3B:1W:1B or
  63742. // 1B:1W:3B:1W:1B:>4W, or their multiples (e.g. highly unlikely,
  63743. // but 13W:3B:3W:9B:3W:3B counts).
  63744. var PENALTY_FINDERLIKE = 40;
  63745. // N4*k points for every (5*k)% deviation from 50% black density.
  63746. // i.e. k=1 for 55~60% and 40~45%, k=2 for 60~65% and 35~40%, etc.
  63747. var PENALTY_DENSITY = 10;
  63748. var evaluategroup = function (groups) { // assumes [W,B,W,B,W,...,B,W]
  63749. var score = 0;
  63750. for (var i = 0; i < groups.length; ++i) {
  63751. if (groups[i] >= 5)
  63752. score += PENALTY_CONSECUTIVE + (groups[i] - 5);
  63753. }
  63754. for (var i = 5; i < groups.length; i += 2) {
  63755. var p = groups[i];
  63756. if (groups[i - 1] == p && groups[i - 2] == 3 * p && groups[i - 3] == p &&
  63757. groups[i - 4] == p && (groups[i - 5] >= 4 * p || groups[i + 1] >= 4 * p)) {
  63758. // this part differs from zxing...
  63759. score += PENALTY_FINDERLIKE;
  63760. }
  63761. }
  63762. return score;
  63763. };
  63764. var n = matrix.length;
  63765. var score = 0, nblacks = 0;
  63766. for (var i = 0; i < n; ++i) {
  63767. var row = matrix[i];
  63768. var groups;
  63769. // evaluate the current row
  63770. groups = [0]; // the first empty group of white
  63771. for (var j = 0; j < n; ) {
  63772. var k;
  63773. for (k = 0; j < n && row[j]; ++k)
  63774. ++j;
  63775. groups.push(k);
  63776. for (k = 0; j < n && !row[j]; ++k)
  63777. ++j;
  63778. groups.push(k);
  63779. }
  63780. score += evaluategroup(groups);
  63781. // evaluate the current column
  63782. groups = [0];
  63783. for (var j = 0; j < n; ) {
  63784. var k;
  63785. for (k = 0; j < n && matrix[j][i]; ++k)
  63786. ++j;
  63787. groups.push(k);
  63788. for (k = 0; j < n && !matrix[j][i]; ++k)
  63789. ++j;
  63790. groups.push(k);
  63791. }
  63792. score += evaluategroup(groups);
  63793. // check the 2x2 box and calculate the density
  63794. var nextrow = matrix[i + 1] || [];
  63795. nblacks += row[0];
  63796. for (var j = 1; j < n; ++j) {
  63797. var p = row[j];
  63798. nblacks += p;
  63799. // at least comparison with next row should be strict...
  63800. if (row[j - 1] == p && nextrow[j] === p && nextrow[j - 1] === p) {
  63801. score += PENALTY_TWOBYTWO;
  63802. }
  63803. }
  63804. }
  63805. score += PENALTY_DENSITY * ((Math.abs(nblacks / n / n - 0.5) / 0.05) | 0);
  63806. return score;
  63807. };
  63808. // returns the fully encoded QR code matrix which contains given data.
  63809. // it also chooses the best mask automatically when mask is -1.
  63810. var generate = function (data, ver, mode, ecclevel, mask) {
  63811. var v = VERSIONS[ver];
  63812. var buf = encode(ver, mode, data, ndatabits(ver, ecclevel) >> 3);
  63813. buf = augumenteccs(buf, v[1][ecclevel], GF256_GENPOLY[v[0][ecclevel]]);
  63814. var result = makebasematrix(ver);
  63815. var matrix = result.matrix, reserved = result.reserved;
  63816. putdata(matrix, reserved, buf);
  63817. if (mask < 0) {
  63818. // find the best mask
  63819. maskdata(matrix, reserved, 0);
  63820. putformatinfo(matrix, reserved, ecclevel, 0);
  63821. var bestmask = 0, bestscore = evaluatematrix(matrix);
  63822. maskdata(matrix, reserved, 0);
  63823. for (mask = 1; mask < 8; ++mask) {
  63824. maskdata(matrix, reserved, mask);
  63825. putformatinfo(matrix, reserved, ecclevel, mask);
  63826. var score = evaluatematrix(matrix);
  63827. if (bestscore > score) {
  63828. bestscore = score;
  63829. bestmask = mask;
  63830. }
  63831. maskdata(matrix, reserved, mask);
  63832. }
  63833. mask = bestmask;
  63834. }
  63835. maskdata(matrix, reserved, mask);
  63836. putformatinfo(matrix, reserved, ecclevel, mask);
  63837. return matrix;
  63838. };
  63839. // the public interface is trivial; the options available are as follows:
  63840. //
  63841. // - version: an integer in [1,40]. when omitted (or -1) the smallest possible
  63842. // version is chosen.
  63843. // - mode: one of 'numeric', 'alphanumeric', 'octet'. when omitted the smallest
  63844. // possible mode is chosen.
  63845. // - eccLevel: one of 'L', 'M', 'Q', 'H'. defaults to 'L'.
  63846. // - mask: an integer in [0,7]. when omitted (or -1) the best mask is chosen.
  63847. //
  63848. function generateFrame(data, options) {
  63849. var MODES = {'numeric': MODE_NUMERIC, 'alphanumeric': MODE_ALPHANUMERIC,
  63850. 'octet': MODE_OCTET};
  63851. var ECCLEVELS = {'L': ECCLEVEL_L, 'M': ECCLEVEL_M, 'Q': ECCLEVEL_Q,
  63852. 'H': ECCLEVEL_H};
  63853. options = options || {};
  63854. var ver = options.version || -1;
  63855. var ecclevel = ECCLEVELS[(options.eccLevel || 'L').toUpperCase()];
  63856. var mode = options.mode ? MODES[options.mode.toLowerCase()] : -1;
  63857. var mask = 'mask' in options ? options.mask : -1;
  63858. if (mode < 0) {
  63859. if (typeof data === 'string') {
  63860. if (data.match(NUMERIC_REGEXP)) {
  63861. mode = MODE_NUMERIC;
  63862. } else if (data.match(ALPHANUMERIC_OUT_REGEXP)) {
  63863. // while encode supports case-insensitive encoding, we restrict the data to be uppercased when auto-selecting the mode.
  63864. mode = MODE_ALPHANUMERIC;
  63865. } else {
  63866. mode = MODE_OCTET;
  63867. }
  63868. } else {
  63869. mode = MODE_OCTET;
  63870. }
  63871. } else if (!(mode == MODE_NUMERIC || mode == MODE_ALPHANUMERIC ||
  63872. mode == MODE_OCTET)) {
  63873. throw 'invalid or unsupported mode';
  63874. }
  63875. data = validatedata(mode, data);
  63876. if (data === null)
  63877. throw 'invalid data format';
  63878. if (ecclevel < 0 || ecclevel > 3)
  63879. throw 'invalid ECC level';
  63880. if (ver < 0) {
  63881. for (ver = 1; ver <= 40; ++ver) {
  63882. if (data.length <= getmaxdatalen(ver, mode, ecclevel))
  63883. break;
  63884. }
  63885. if (ver > 40)
  63886. throw 'too large data for the Qr format';
  63887. } else if (ver < 1 || ver > 40) {
  63888. throw 'invalid Qr version! should be between 1 and 40';
  63889. }
  63890. if (mask != -1 && (mask < 0 || mask > 8))
  63891. throw 'invalid mask';
  63892. //console.log('version:', ver, 'mode:', mode, 'ECC:', ecclevel, 'mask:', mask )
  63893. return generate(data, ver, mode, ecclevel, mask);
  63894. }
  63895. // options
  63896. // - modulesize: a number. this is a size of each modules in pixels, and
  63897. // defaults to 5px.
  63898. // - margin: a number. this is a size of margin in *modules*, and defaults to
  63899. // 4 (white modules). the specficiation mandates the margin no less than 4
  63900. // modules, so it is better not to alter this value unless you know what
  63901. // you're doing.
  63902. function buildCanvas(data, options) {
  63903. var canvas = [];
  63904. var background = options.background || '#fff';
  63905. var foreground = options.foreground || '#000';
  63906. //var margin = options.margin || 4;
  63907. var matrix = generateFrame(data, options);
  63908. var n = matrix.length;
  63909. var modSize = Math.floor(options.fit ? options.fit / n : 5);
  63910. var size = n * modSize;
  63911. canvas.push({
  63912. type: 'rect',
  63913. x: 0, y: 0, w: size, h: size, lineWidth: 0, color: background
  63914. });
  63915. for (var i = 0; i < n; ++i) {
  63916. for (var j = 0; j < n; ++j) {
  63917. if (matrix[i][j]) {
  63918. canvas.push({
  63919. type: 'rect',
  63920. x: modSize * j,
  63921. y: modSize * i,
  63922. w: modSize,
  63923. h: modSize,
  63924. lineWidth: 0,
  63925. color: foreground
  63926. });
  63927. }
  63928. }
  63929. }
  63930. return {
  63931. canvas: canvas,
  63932. size: size
  63933. };
  63934. }
  63935. function measure(node) {
  63936. var cd = buildCanvas(node.qr, node);
  63937. node._canvas = cd.canvas;
  63938. node._width = node._height = node._minWidth = node._maxWidth = node._minHeight = node._maxHeight = cd.size;
  63939. return node;
  63940. }
  63941. module.exports = {
  63942. measure: measure
  63943. };
  63944. /***/ }),
  63945. /***/ 4762:
  63946. /***/ (function(module) {
  63947. "use strict";
  63948. module.exports = {
  63949. '4A0': [4767.87, 6740.79],
  63950. '2A0': [3370.39, 4767.87],
  63951. A0: [2383.94, 3370.39],
  63952. A1: [1683.78, 2383.94],
  63953. A2: [1190.55, 1683.78],
  63954. A3: [841.89, 1190.55],
  63955. A4: [595.28, 841.89],
  63956. A5: [419.53, 595.28],
  63957. A6: [297.64, 419.53],
  63958. A7: [209.76, 297.64],
  63959. A8: [147.40, 209.76],
  63960. A9: [104.88, 147.40],
  63961. A10: [73.70, 104.88],
  63962. B0: [2834.65, 4008.19],
  63963. B1: [2004.09, 2834.65],
  63964. B2: [1417.32, 2004.09],
  63965. B3: [1000.63, 1417.32],
  63966. B4: [708.66, 1000.63],
  63967. B5: [498.90, 708.66],
  63968. B6: [354.33, 498.90],
  63969. B7: [249.45, 354.33],
  63970. B8: [175.75, 249.45],
  63971. B9: [124.72, 175.75],
  63972. B10: [87.87, 124.72],
  63973. C0: [2599.37, 3676.54],
  63974. C1: [1836.85, 2599.37],
  63975. C2: [1298.27, 1836.85],
  63976. C3: [918.43, 1298.27],
  63977. C4: [649.13, 918.43],
  63978. C5: [459.21, 649.13],
  63979. C6: [323.15, 459.21],
  63980. C7: [229.61, 323.15],
  63981. C8: [161.57, 229.61],
  63982. C9: [113.39, 161.57],
  63983. C10: [79.37, 113.39],
  63984. RA0: [2437.80, 3458.27],
  63985. RA1: [1729.13, 2437.80],
  63986. RA2: [1218.90, 1729.13],
  63987. RA3: [864.57, 1218.90],
  63988. RA4: [609.45, 864.57],
  63989. SRA0: [2551.18, 3628.35],
  63990. SRA1: [1814.17, 2551.18],
  63991. SRA2: [1275.59, 1814.17],
  63992. SRA3: [907.09, 1275.59],
  63993. SRA4: [637.80, 907.09],
  63994. EXECUTIVE: [521.86, 756.00],
  63995. FOLIO: [612.00, 936.00],
  63996. LEGAL: [612.00, 1008.00],
  63997. LETTER: [612.00, 792.00],
  63998. TABLOID: [792.00, 1224.00]
  63999. };
  64000. /***/ }),
  64001. /***/ 7597:
  64002. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  64003. "use strict";
  64004. var isString = (__webpack_require__(6225).isString);
  64005. var isArray = (__webpack_require__(6225).isArray);
  64006. var isUndefined = (__webpack_require__(6225).isUndefined);
  64007. var isNull = (__webpack_require__(6225).isNull);
  64008. /**
  64009. * Creates an instance of StyleContextStack used for style inheritance and style overrides
  64010. *
  64011. * @constructor
  64012. * @this {StyleContextStack}
  64013. * @param {Object} named styles dictionary
  64014. * @param {Object} optional default style definition
  64015. */
  64016. function StyleContextStack(styleDictionary, defaultStyle) {
  64017. this.defaultStyle = defaultStyle || {};
  64018. this.styleDictionary = styleDictionary;
  64019. this.styleOverrides = [];
  64020. }
  64021. /**
  64022. * Creates cloned version of current stack
  64023. * @return {StyleContextStack} current stack snapshot
  64024. */
  64025. StyleContextStack.prototype.clone = function () {
  64026. var stack = new StyleContextStack(this.styleDictionary, this.defaultStyle);
  64027. this.styleOverrides.forEach(function (item) {
  64028. stack.styleOverrides.push(item);
  64029. });
  64030. return stack;
  64031. };
  64032. /**
  64033. * Pushes style-name or style-overrides-object onto the stack for future evaluation
  64034. *
  64035. * @param {String|Object} styleNameOrOverride style-name (referring to styleDictionary) or
  64036. * a new dictionary defining overriding properties
  64037. */
  64038. StyleContextStack.prototype.push = function (styleNameOrOverride) {
  64039. this.styleOverrides.push(styleNameOrOverride);
  64040. };
  64041. /**
  64042. * Removes last style-name or style-overrides-object from the stack
  64043. *
  64044. * @param {Number} howMany - optional number of elements to be popped (if not specified,
  64045. * one element will be removed from the stack)
  64046. */
  64047. StyleContextStack.prototype.pop = function (howMany) {
  64048. howMany = howMany || 1;
  64049. while (howMany-- > 0) {
  64050. this.styleOverrides.pop();
  64051. }
  64052. };
  64053. /**
  64054. * Creates a set of named styles or/and a style-overrides-object based on the item,
  64055. * pushes those elements onto the stack for future evaluation and returns the number
  64056. * of elements pushed, so they can be easily poped then.
  64057. *
  64058. * @param {Object} item - an object with optional style property and/or style overrides
  64059. * @return the number of items pushed onto the stack
  64060. */
  64061. StyleContextStack.prototype.autopush = function (item) {
  64062. if (isString(item)) {
  64063. return 0;
  64064. }
  64065. var styleNames = [];
  64066. if (item.style) {
  64067. if (isArray(item.style)) {
  64068. styleNames = item.style;
  64069. } else {
  64070. styleNames = [item.style];
  64071. }
  64072. }
  64073. for (var i = 0, l = styleNames.length; i < l; i++) {
  64074. this.push(styleNames[i]);
  64075. }
  64076. var styleProperties = [
  64077. 'font',
  64078. 'fontSize',
  64079. 'fontFeatures',
  64080. 'bold',
  64081. 'italics',
  64082. 'alignment',
  64083. 'color',
  64084. 'columnGap',
  64085. 'fillColor',
  64086. 'fillOpacity',
  64087. 'decoration',
  64088. 'decorationStyle',
  64089. 'decorationColor',
  64090. 'background',
  64091. 'lineHeight',
  64092. 'characterSpacing',
  64093. 'noWrap',
  64094. 'markerColor',
  64095. 'leadingIndent',
  64096. 'sup',
  64097. 'sub'
  64098. //'tableCellPadding'
  64099. // 'cellBorder',
  64100. // 'headerCellBorder',
  64101. // 'oddRowCellBorder',
  64102. // 'evenRowCellBorder',
  64103. // 'tableBorder'
  64104. ];
  64105. var styleOverrideObject = {};
  64106. var pushStyleOverrideObject = false;
  64107. styleProperties.forEach(function (key) {
  64108. if (!isUndefined(item[key]) && !isNull(item[key])) {
  64109. styleOverrideObject[key] = item[key];
  64110. pushStyleOverrideObject = true;
  64111. }
  64112. });
  64113. if (pushStyleOverrideObject) {
  64114. this.push(styleOverrideObject);
  64115. }
  64116. return styleNames.length + (pushStyleOverrideObject ? 1 : 0);
  64117. };
  64118. /**
  64119. * Automatically pushes elements onto the stack, using autopush based on item,
  64120. * executes callback and then pops elements back. Returns value returned by callback
  64121. *
  64122. * @param {Object} item - an object with optional style property and/or style overrides
  64123. * @param {Function} function to be called between autopush and pop
  64124. * @return {Object} value returned by callback
  64125. */
  64126. StyleContextStack.prototype.auto = function (item, callback) {
  64127. var pushedItems = this.autopush(item);
  64128. var result = callback();
  64129. if (pushedItems > 0) {
  64130. this.pop(pushedItems);
  64131. }
  64132. return result;
  64133. };
  64134. /**
  64135. * Evaluates stack and returns value of a named property
  64136. *
  64137. * @param {String} property - property name
  64138. * @return property value or null if not found
  64139. */
  64140. StyleContextStack.prototype.getProperty = function (property) {
  64141. if (this.styleOverrides) {
  64142. for (var i = this.styleOverrides.length - 1; i >= 0; i--) {
  64143. var item = this.styleOverrides[i];
  64144. if (isString(item)) {
  64145. // named-style-override
  64146. var style = this.styleDictionary[item];
  64147. if (style && !isUndefined(style[property]) && !isNull(style[property])) {
  64148. return style[property];
  64149. }
  64150. } else if (!isUndefined(item[property]) && !isNull(item[property])) {
  64151. // style-overrides-object
  64152. return item[property];
  64153. }
  64154. }
  64155. }
  64156. return this.defaultStyle && this.defaultStyle[property];
  64157. };
  64158. module.exports = StyleContextStack;
  64159. /***/ }),
  64160. /***/ 7601:
  64161. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  64162. "use strict";
  64163. var xmldoc = __webpack_require__(6513);
  64164. /** Strip unit postfix, parse number, but return undefined instead of NaN for bad input */
  64165. function stripUnits(textVal) {
  64166. var n = parseFloat(textVal);
  64167. if (typeof n !== 'number' || isNaN(n)) {
  64168. return undefined;
  64169. }
  64170. return n;
  64171. }
  64172. /** Make sure it's valid XML and the root tage is <svg/>, returns xmldoc DOM */
  64173. function parseSVG(svgString) {
  64174. var doc;
  64175. try {
  64176. doc = new xmldoc.XmlDocument(svgString);
  64177. } catch (err) {
  64178. throw new Error('SVGMeasure: ' + err);
  64179. }
  64180. if (doc.name !== "svg") {
  64181. throw new Error('SVGMeasure: expected <svg> document');
  64182. }
  64183. return doc;
  64184. }
  64185. function SVGMeasure() {
  64186. }
  64187. SVGMeasure.prototype.measureSVG = function (svgString) {
  64188. var doc = parseSVG(svgString);
  64189. var docWidth = stripUnits(doc.attr.width);
  64190. var docHeight = stripUnits(doc.attr.height);
  64191. if ((docWidth == undefined || docHeight == undefined) && typeof doc.attr.viewBox == 'string') {
  64192. var viewBoxParts = doc.attr.viewBox.split(/[,\s]+/);
  64193. if (viewBoxParts.length !== 4) {
  64194. throw new Error("Unexpected svg viewbox format, should have 4 entries but found: '" + doc.attr.viewBox + "'");
  64195. }
  64196. if (docWidth == undefined) {
  64197. docWidth = stripUnits(viewBoxParts[2]);
  64198. }
  64199. if (docHeight == undefined) {
  64200. docHeight = stripUnits(viewBoxParts[3]);
  64201. }
  64202. }
  64203. return {
  64204. width: docWidth,
  64205. height: docHeight
  64206. };
  64207. };
  64208. SVGMeasure.prototype.writeDimensions = function (svgString, dimensions) {
  64209. var doc = parseSVG(svgString);
  64210. doc.attr.width = "" + dimensions.width;
  64211. doc.attr.height = "" + dimensions.height;
  64212. return doc.toString();
  64213. };
  64214. module.exports = SVGMeasure;
  64215. /***/ }),
  64216. /***/ 9342:
  64217. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  64218. "use strict";
  64219. var ColumnCalculator = __webpack_require__(4498);
  64220. var isFunction = (__webpack_require__(6225).isFunction);
  64221. var isNumber = (__webpack_require__(6225).isNumber);
  64222. function TableProcessor(tableNode) {
  64223. this.tableNode = tableNode;
  64224. }
  64225. TableProcessor.prototype.beginTable = function (writer) {
  64226. var tableNode;
  64227. var availableWidth;
  64228. var self = this;
  64229. tableNode = this.tableNode;
  64230. this.offsets = tableNode._offsets;
  64231. this.layout = tableNode._layout;
  64232. availableWidth = writer.context().availableWidth - this.offsets.total;
  64233. ColumnCalculator.buildColumnWidths(tableNode.table.widths, availableWidth);
  64234. this.tableWidth = tableNode._offsets.total + getTableInnerContentWidth();
  64235. this.rowSpanData = prepareRowSpanData();
  64236. this.cleanUpRepeatables = false;
  64237. this.headerRows = tableNode.table.headerRows || 0;
  64238. this.rowsWithoutPageBreak = this.headerRows + (tableNode.table.keepWithHeaderRows || 0);
  64239. this.dontBreakRows = tableNode.table.dontBreakRows || false;
  64240. if (this.rowsWithoutPageBreak) {
  64241. writer.beginUnbreakableBlock();
  64242. }
  64243. // update the border properties of all cells before drawing any lines
  64244. prepareCellBorders(this.tableNode.table.body);
  64245. this.drawHorizontalLine(0, writer);
  64246. function getTableInnerContentWidth() {
  64247. var width = 0;
  64248. tableNode.table.widths.forEach(function (w) {
  64249. width += w._calcWidth;
  64250. });
  64251. return width;
  64252. }
  64253. function prepareRowSpanData() {
  64254. var rsd = [];
  64255. var x = 0;
  64256. var lastWidth = 0;
  64257. rsd.push({ left: 0, rowSpan: 0 });
  64258. for (var i = 0, l = self.tableNode.table.body[0].length; i < l; i++) {
  64259. var paddings = self.layout.paddingLeft(i, self.tableNode) + self.layout.paddingRight(i, self.tableNode);
  64260. var lBorder = self.layout.vLineWidth(i, self.tableNode);
  64261. lastWidth = paddings + lBorder + self.tableNode.table.widths[i]._calcWidth;
  64262. rsd[rsd.length - 1].width = lastWidth;
  64263. x += lastWidth;
  64264. rsd.push({ left: x, rowSpan: 0, width: 0 });
  64265. }
  64266. return rsd;
  64267. }
  64268. // Iterate through all cells. If the current cell is the start of a
  64269. // rowSpan/colSpan, update the border property of the cells on its
  64270. // bottom/right accordingly. This is needed since each iteration of the
  64271. // line-drawing loops draws lines for a single cell, not for an entire
  64272. // rowSpan/colSpan.
  64273. function prepareCellBorders(body) {
  64274. for (var rowIndex = 0; rowIndex < body.length; rowIndex++) {
  64275. var row = body[rowIndex];
  64276. for (var colIndex = 0; colIndex < row.length; colIndex++) {
  64277. var cell = row[colIndex];
  64278. if (cell.border) {
  64279. var rowSpan = cell.rowSpan || 1;
  64280. var colSpan = cell.colSpan || 1;
  64281. for (var rowOffset = 0; rowOffset < rowSpan; rowOffset++) {
  64282. // set left border
  64283. if (cell.border[0] !== undefined && rowOffset > 0) {
  64284. setBorder(rowIndex + rowOffset, colIndex, 0, cell.border[0]);
  64285. }
  64286. // set right border
  64287. if (cell.border[2] !== undefined) {
  64288. setBorder(rowIndex + rowOffset, colIndex + colSpan - 1, 2, cell.border[2]);
  64289. }
  64290. }
  64291. for (var colOffset = 0; colOffset < colSpan; colOffset++) {
  64292. // set top border
  64293. if (cell.border[1] !== undefined && colOffset > 0) {
  64294. setBorder(rowIndex, colIndex + colOffset, 1, cell.border[1]);
  64295. }
  64296. // set bottom border
  64297. if (cell.border[3] !== undefined) {
  64298. setBorder(rowIndex + rowSpan - 1, colIndex + colOffset, 3, cell.border[3]);
  64299. }
  64300. }
  64301. }
  64302. }
  64303. }
  64304. // helper function to set the border for a given cell
  64305. function setBorder(rowIndex, colIndex, borderIndex, borderValue) {
  64306. var cell = body[rowIndex][colIndex];
  64307. cell.border = cell.border || {};
  64308. cell.border[borderIndex] = borderValue;
  64309. }
  64310. }
  64311. };
  64312. TableProcessor.prototype.onRowBreak = function (rowIndex, writer) {
  64313. var self = this;
  64314. return function () {
  64315. var offset = self.rowPaddingTop + (!self.headerRows ? self.topLineWidth : 0);
  64316. writer.context().availableHeight -= self.reservedAtBottom;
  64317. writer.context().moveDown(offset);
  64318. };
  64319. };
  64320. TableProcessor.prototype.beginRow = function (rowIndex, writer) {
  64321. this.topLineWidth = this.layout.hLineWidth(rowIndex, this.tableNode);
  64322. this.rowPaddingTop = this.layout.paddingTop(rowIndex, this.tableNode);
  64323. this.bottomLineWidth = this.layout.hLineWidth(rowIndex + 1, this.tableNode);
  64324. this.rowPaddingBottom = this.layout.paddingBottom(rowIndex, this.tableNode);
  64325. this.rowCallback = this.onRowBreak(rowIndex, writer);
  64326. writer.tracker.startTracking('pageChanged', this.rowCallback);
  64327. if (this.dontBreakRows) {
  64328. writer.beginUnbreakableBlock();
  64329. }
  64330. this.rowTopY = writer.context().y;
  64331. this.reservedAtBottom = this.bottomLineWidth + this.rowPaddingBottom;
  64332. writer.context().availableHeight -= this.reservedAtBottom;
  64333. writer.context().moveDown(this.rowPaddingTop);
  64334. };
  64335. TableProcessor.prototype.drawHorizontalLine = function (lineIndex, writer, overrideY) {
  64336. var lineWidth = this.layout.hLineWidth(lineIndex, this.tableNode);
  64337. if (lineWidth) {
  64338. var style = this.layout.hLineStyle(lineIndex, this.tableNode);
  64339. var dash;
  64340. if (style && style.dash) {
  64341. dash = style.dash;
  64342. }
  64343. var offset = lineWidth / 2;
  64344. var currentLine = null;
  64345. var body = this.tableNode.table.body;
  64346. var cellAbove;
  64347. var currentCell;
  64348. var rowCellAbove;
  64349. for (var i = 0, l = this.rowSpanData.length; i < l; i++) {
  64350. var data = this.rowSpanData[i];
  64351. var shouldDrawLine = !data.rowSpan;
  64352. var borderColor = null;
  64353. // draw only if the current cell requires a top border or the cell in the
  64354. // row above requires a bottom border
  64355. if (shouldDrawLine && i < l - 1) {
  64356. var topBorder = false, bottomBorder = false, rowBottomBorder = false;
  64357. // the cell in the row above
  64358. if (lineIndex > 0) {
  64359. cellAbove = body[lineIndex - 1][i];
  64360. bottomBorder = cellAbove.border ? cellAbove.border[3] : this.layout.defaultBorder;
  64361. if (bottomBorder && cellAbove.borderColor) {
  64362. borderColor = cellAbove.borderColor[3];
  64363. }
  64364. }
  64365. // the current cell
  64366. if (lineIndex < body.length) {
  64367. currentCell = body[lineIndex][i];
  64368. topBorder = currentCell.border ? currentCell.border[1] : this.layout.defaultBorder;
  64369. if (topBorder && borderColor == null && currentCell.borderColor) {
  64370. borderColor = currentCell.borderColor[1];
  64371. }
  64372. }
  64373. shouldDrawLine = topBorder || bottomBorder;
  64374. }
  64375. if (cellAbove && cellAbove._rowSpanCurrentOffset) {
  64376. rowCellAbove = body[lineIndex - 1 - cellAbove._rowSpanCurrentOffset][i];
  64377. rowBottomBorder = rowCellAbove && rowCellAbove.border ? rowCellAbove.border[3] : this.layout.defaultBorder;
  64378. if (rowBottomBorder && rowCellAbove && rowCellAbove.borderColor) {
  64379. borderColor = rowCellAbove.borderColor[3];
  64380. }
  64381. }
  64382. if (borderColor == null) {
  64383. borderColor = isFunction(this.layout.hLineColor) ? this.layout.hLineColor(lineIndex, this.tableNode, i) : this.layout.hLineColor;
  64384. }
  64385. if (!currentLine && shouldDrawLine) {
  64386. currentLine = { left: data.left, width: 0 };
  64387. }
  64388. if (shouldDrawLine) {
  64389. var colSpanIndex = 0;
  64390. if (rowCellAbove && rowCellAbove.colSpan && rowBottomBorder) {
  64391. while (rowCellAbove.colSpan > colSpanIndex) {
  64392. currentLine.width += (this.rowSpanData[i + colSpanIndex++].width || 0);
  64393. }
  64394. i += colSpanIndex - 1;
  64395. } else if (cellAbove && cellAbove.colSpan && bottomBorder) {
  64396. while (cellAbove.colSpan > colSpanIndex) {
  64397. currentLine.width += (this.rowSpanData[i + colSpanIndex++].width || 0);
  64398. }
  64399. i += colSpanIndex - 1;
  64400. } else if (currentCell && currentCell.colSpan && topBorder) {
  64401. while (currentCell.colSpan > colSpanIndex) {
  64402. currentLine.width += (this.rowSpanData[i + colSpanIndex++].width || 0);
  64403. }
  64404. i += colSpanIndex - 1;
  64405. } else {
  64406. currentLine.width += (this.rowSpanData[i].width || 0);
  64407. }
  64408. }
  64409. var y = (overrideY || 0) + offset;
  64410. if (shouldDrawLine) {
  64411. if (currentLine && currentLine.width) {
  64412. writer.addVector({
  64413. type: 'line',
  64414. x1: currentLine.left,
  64415. x2: currentLine.left + currentLine.width,
  64416. y1: y,
  64417. y2: y,
  64418. lineWidth: lineWidth,
  64419. dash: dash,
  64420. lineColor: borderColor
  64421. }, false, overrideY);
  64422. currentLine = null;
  64423. borderColor = null;
  64424. cellAbove = null;
  64425. currentCell = null;
  64426. rowCellAbove = null;
  64427. }
  64428. }
  64429. }
  64430. writer.context().moveDown(lineWidth);
  64431. }
  64432. };
  64433. TableProcessor.prototype.drawVerticalLine = function (x, y0, y1, vLineColIndex, writer, vLineRowIndex, beforeVLineColIndex) {
  64434. var width = this.layout.vLineWidth(vLineColIndex, this.tableNode);
  64435. if (width === 0) {
  64436. return;
  64437. }
  64438. var style = this.layout.vLineStyle(vLineColIndex, this.tableNode);
  64439. var dash;
  64440. if (style && style.dash) {
  64441. dash = style.dash;
  64442. }
  64443. var body = this.tableNode.table.body;
  64444. var cellBefore;
  64445. var currentCell;
  64446. var borderColor;
  64447. // the cell in the col before
  64448. if (vLineColIndex > 0) {
  64449. cellBefore = body[vLineRowIndex][beforeVLineColIndex];
  64450. if (cellBefore && cellBefore.borderColor) {
  64451. if (cellBefore.border ? cellBefore.border[2] : this.layout.defaultBorder) {
  64452. borderColor = cellBefore.borderColor[2];
  64453. }
  64454. }
  64455. }
  64456. // the current cell
  64457. if (borderColor == null && vLineColIndex < body.length) {
  64458. currentCell = body[vLineRowIndex][vLineColIndex];
  64459. if (currentCell && currentCell.borderColor) {
  64460. if (currentCell.border ? currentCell.border[0] : this.layout.defaultBorder) {
  64461. borderColor = currentCell.borderColor[0];
  64462. }
  64463. }
  64464. }
  64465. if (borderColor == null && cellBefore && cellBefore._rowSpanCurrentOffset) {
  64466. var rowCellBeforeAbove = body[vLineRowIndex - cellBefore._rowSpanCurrentOffset][beforeVLineColIndex];
  64467. if (rowCellBeforeAbove.borderColor) {
  64468. if (rowCellBeforeAbove.border ? rowCellBeforeAbove.border[2] : this.layout.defaultBorder) {
  64469. borderColor = rowCellBeforeAbove.borderColor[2];
  64470. }
  64471. }
  64472. }
  64473. if (borderColor == null && currentCell && currentCell._rowSpanCurrentOffset) {
  64474. var rowCurrentCellAbove = body[vLineRowIndex - currentCell._rowSpanCurrentOffset][vLineColIndex];
  64475. if (rowCurrentCellAbove.borderColor) {
  64476. if (rowCurrentCellAbove.border ? rowCurrentCellAbove.border[2] : this.layout.defaultBorder) {
  64477. borderColor = rowCurrentCellAbove.borderColor[2];
  64478. }
  64479. }
  64480. }
  64481. if (borderColor == null) {
  64482. borderColor = isFunction(this.layout.vLineColor) ? this.layout.vLineColor(vLineColIndex, this.tableNode, vLineRowIndex) : this.layout.vLineColor;
  64483. }
  64484. writer.addVector({
  64485. type: 'line',
  64486. x1: x + width / 2,
  64487. x2: x + width / 2,
  64488. y1: y0,
  64489. y2: y1,
  64490. lineWidth: width,
  64491. dash: dash,
  64492. lineColor: borderColor
  64493. }, false, true);
  64494. cellBefore = null;
  64495. currentCell = null;
  64496. borderColor = null;
  64497. };
  64498. TableProcessor.prototype.endTable = function (writer) {
  64499. if (this.cleanUpRepeatables) {
  64500. writer.popFromRepeatables();
  64501. }
  64502. };
  64503. TableProcessor.prototype.endRow = function (rowIndex, writer, pageBreaks) {
  64504. var l, i;
  64505. var self = this;
  64506. writer.tracker.stopTracking('pageChanged', this.rowCallback);
  64507. writer.context().moveDown(this.layout.paddingBottom(rowIndex, this.tableNode));
  64508. writer.context().availableHeight += this.reservedAtBottom;
  64509. var endingPage = writer.context().page;
  64510. var endingY = writer.context().y;
  64511. var xs = getLineXs();
  64512. var ys = [];
  64513. var hasBreaks = pageBreaks && pageBreaks.length > 0;
  64514. var body = this.tableNode.table.body;
  64515. ys.push({
  64516. y0: this.rowTopY,
  64517. page: hasBreaks ? pageBreaks[0].prevPage : endingPage
  64518. });
  64519. if (hasBreaks) {
  64520. for (i = 0, l = pageBreaks.length; i < l; i++) {
  64521. var pageBreak = pageBreaks[i];
  64522. ys[ys.length - 1].y1 = pageBreak.prevY;
  64523. ys.push({ y0: pageBreak.y, page: pageBreak.prevPage + 1 });
  64524. }
  64525. }
  64526. ys[ys.length - 1].y1 = endingY;
  64527. var skipOrphanePadding = (ys[0].y1 - ys[0].y0 === this.rowPaddingTop);
  64528. for (var yi = (skipOrphanePadding ? 1 : 0), yl = ys.length; yi < yl; yi++) {
  64529. var willBreak = yi < ys.length - 1;
  64530. var rowBreakWithoutHeader = (yi > 0 && !this.headerRows);
  64531. var hzLineOffset = rowBreakWithoutHeader ? 0 : this.topLineWidth;
  64532. var y1 = ys[yi].y0;
  64533. var y2 = ys[yi].y1;
  64534. if (willBreak) {
  64535. y2 = y2 + this.rowPaddingBottom;
  64536. }
  64537. if (writer.context().page != ys[yi].page) {
  64538. writer.context().page = ys[yi].page;
  64539. //TODO: buggy, availableHeight should be updated on every pageChanged event
  64540. // TableProcessor should be pageChanged listener, instead of processRow
  64541. this.reservedAtBottom = 0;
  64542. }
  64543. for (i = 0, l = xs.length; i < l; i++) {
  64544. var leftCellBorder = false;
  64545. var rightCellBorder = false;
  64546. var colIndex = xs[i].index;
  64547. // current cell
  64548. if (colIndex < body[rowIndex].length) {
  64549. var cell = body[rowIndex][colIndex];
  64550. leftCellBorder = cell.border ? cell.border[0] : this.layout.defaultBorder;
  64551. rightCellBorder = cell.border ? cell.border[2] : this.layout.defaultBorder;
  64552. }
  64553. // before cell
  64554. if (colIndex > 0 && !leftCellBorder) {
  64555. var cell = body[rowIndex][colIndex - 1];
  64556. leftCellBorder = cell.border ? cell.border[2] : this.layout.defaultBorder;
  64557. }
  64558. // after cell
  64559. if (colIndex + 1 < body[rowIndex].length && !rightCellBorder) {
  64560. var cell = body[rowIndex][colIndex + 1];
  64561. rightCellBorder = cell.border ? cell.border[0] : this.layout.defaultBorder;
  64562. }
  64563. if (leftCellBorder) {
  64564. this.drawVerticalLine(xs[i].x, y1 - hzLineOffset, y2 + this.bottomLineWidth, xs[i].index, writer, rowIndex, xs[i - 1] ? xs[i - 1].index : null);
  64565. }
  64566. if (i < l - 1) {
  64567. var fillColor = body[rowIndex][colIndex].fillColor;
  64568. var fillOpacity = body[rowIndex][colIndex].fillOpacity;
  64569. if (!fillColor) {
  64570. fillColor = isFunction(this.layout.fillColor) ? this.layout.fillColor(rowIndex, this.tableNode, colIndex) : this.layout.fillColor;
  64571. }
  64572. if (!isNumber(fillOpacity)) {
  64573. fillOpacity = isFunction(this.layout.fillOpacity) ? this.layout.fillOpacity(rowIndex, this.tableNode, colIndex) : this.layout.fillOpacity;
  64574. }
  64575. var overlayPattern = body[rowIndex][colIndex].overlayPattern;
  64576. var overlayOpacity = body[rowIndex][colIndex].overlayOpacity;
  64577. if (fillColor || overlayPattern) {
  64578. var widthLeftBorder = leftCellBorder ? this.layout.vLineWidth(colIndex, this.tableNode) : 0;
  64579. var widthRightBorder;
  64580. if ((colIndex === 0 || colIndex + 1 == body[rowIndex].length) && !rightCellBorder) {
  64581. widthRightBorder = this.layout.vLineWidth(colIndex + 1, this.tableNode);
  64582. } else if (rightCellBorder) {
  64583. widthRightBorder = this.layout.vLineWidth(colIndex + 1, this.tableNode) / 2;
  64584. } else {
  64585. widthRightBorder = 0;
  64586. }
  64587. var x1f = this.dontBreakRows ? xs[i].x + widthLeftBorder : xs[i].x + (widthLeftBorder / 2);
  64588. var y1f = this.dontBreakRows ? y1 : y1 - (hzLineOffset / 2);
  64589. var x2f = xs[i + 1].x + widthRightBorder;
  64590. var y2f = this.dontBreakRows ? y2 + this.bottomLineWidth : y2 + (this.bottomLineWidth / 2);
  64591. var bgWidth = x2f - x1f;
  64592. var bgHeight = y2f - y1f;
  64593. if (fillColor) {
  64594. writer.addVector({
  64595. type: 'rect',
  64596. x: x1f,
  64597. y: y1f,
  64598. w: bgWidth,
  64599. h: bgHeight,
  64600. lineWidth: 0,
  64601. color: fillColor,
  64602. fillOpacity: fillOpacity
  64603. }, false, true, writer.context().backgroundLength[writer.context().page]);
  64604. }
  64605. if (overlayPattern) {
  64606. writer.addVector({
  64607. type: 'rect',
  64608. x: x1f,
  64609. y: y1f,
  64610. w: bgWidth,
  64611. h: bgHeight,
  64612. lineWidth: 0,
  64613. color: overlayPattern,
  64614. fillOpacity: overlayOpacity
  64615. }, false, true);
  64616. }
  64617. }
  64618. }
  64619. }
  64620. if (willBreak && this.layout.hLineWhenBroken !== false) {
  64621. this.drawHorizontalLine(rowIndex + 1, writer, y2);
  64622. }
  64623. if (rowBreakWithoutHeader && this.layout.hLineWhenBroken !== false) {
  64624. this.drawHorizontalLine(rowIndex, writer, y1);
  64625. }
  64626. }
  64627. writer.context().page = endingPage;
  64628. writer.context().y = endingY;
  64629. var row = this.tableNode.table.body[rowIndex];
  64630. for (i = 0, l = row.length; i < l; i++) {
  64631. if (row[i].rowSpan) {
  64632. this.rowSpanData[i].rowSpan = row[i].rowSpan;
  64633. // fix colSpans
  64634. if (row[i].colSpan && row[i].colSpan > 1) {
  64635. for (var j = 1; j < row[i].rowSpan; j++) {
  64636. this.tableNode.table.body[rowIndex + j][i]._colSpan = row[i].colSpan;
  64637. }
  64638. }
  64639. // fix rowSpans
  64640. if (row[i].rowSpan && row[i].rowSpan > 1) {
  64641. for (var j = 1; j < row[i].rowSpan; j++) {
  64642. this.tableNode.table.body[rowIndex + j][i]._rowSpanCurrentOffset = j;
  64643. }
  64644. }
  64645. }
  64646. if (this.rowSpanData[i].rowSpan > 0) {
  64647. this.rowSpanData[i].rowSpan--;
  64648. }
  64649. }
  64650. this.drawHorizontalLine(rowIndex + 1, writer);
  64651. if (this.headerRows && rowIndex === this.headerRows - 1) {
  64652. this.headerRepeatable = writer.currentBlockToRepeatable();
  64653. }
  64654. if (this.dontBreakRows) {
  64655. writer.tracker.auto('pageChanged',
  64656. function () {
  64657. if (!self.headerRows && self.layout.hLineWhenBroken !== false) {
  64658. self.drawHorizontalLine(rowIndex, writer);
  64659. }
  64660. },
  64661. function () {
  64662. writer.commitUnbreakableBlock();
  64663. }
  64664. );
  64665. }
  64666. if (this.headerRepeatable && (rowIndex === (this.rowsWithoutPageBreak - 1) || rowIndex === this.tableNode.table.body.length - 1)) {
  64667. writer.commitUnbreakableBlock();
  64668. writer.pushToRepeatables(this.headerRepeatable);
  64669. this.cleanUpRepeatables = true;
  64670. this.headerRepeatable = null;
  64671. }
  64672. function getLineXs() {
  64673. var result = [];
  64674. var cols = 0;
  64675. for (var i = 0, l = self.tableNode.table.body[rowIndex].length; i < l; i++) {
  64676. if (!cols) {
  64677. result.push({ x: self.rowSpanData[i].left, index: i });
  64678. var item = self.tableNode.table.body[rowIndex][i];
  64679. cols = (item._colSpan || item.colSpan || 0);
  64680. }
  64681. if (cols > 0) {
  64682. cols--;
  64683. }
  64684. }
  64685. result.push({ x: self.rowSpanData[self.rowSpanData.length - 1].left, index: self.rowSpanData.length - 1 });
  64686. return result;
  64687. }
  64688. };
  64689. module.exports = TableProcessor;
  64690. /***/ }),
  64691. /***/ 3497:
  64692. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  64693. "use strict";
  64694. var isArray = (__webpack_require__(6225).isArray);
  64695. var isPattern = (__webpack_require__(6225).isPattern);
  64696. var getPattern = (__webpack_require__(6225).getPattern);
  64697. function groupDecorations(line) {
  64698. var groups = [], currentGroup = null;
  64699. for (var i = 0, l = line.inlines.length; i < l; i++) {
  64700. var inline = line.inlines[i];
  64701. var decoration = inline.decoration;
  64702. if (!decoration) {
  64703. currentGroup = null;
  64704. continue;
  64705. }
  64706. if (!isArray(decoration)) {
  64707. decoration = [decoration];
  64708. }
  64709. var color = inline.decorationColor || inline.color || 'black';
  64710. var style = inline.decorationStyle || 'solid';
  64711. for (var ii = 0, ll = decoration.length; ii < ll; ii++) {
  64712. var decorationItem = decoration[ii];
  64713. if (!currentGroup || decorationItem !== currentGroup.decoration ||
  64714. style !== currentGroup.decorationStyle || color !== currentGroup.decorationColor) {
  64715. currentGroup = {
  64716. line: line,
  64717. decoration: decorationItem,
  64718. decorationColor: color,
  64719. decorationStyle: style,
  64720. inlines: [inline]
  64721. };
  64722. groups.push(currentGroup);
  64723. } else {
  64724. currentGroup.inlines.push(inline);
  64725. }
  64726. }
  64727. }
  64728. return groups;
  64729. }
  64730. function drawDecoration(group, x, y, pdfKitDoc) {
  64731. function maxInline() {
  64732. var max = 0;
  64733. for (var i = 0, l = group.inlines.length; i < l; i++) {
  64734. var inline = group.inlines[i];
  64735. max = inline.fontSize > max ? i : max;
  64736. }
  64737. return group.inlines[max];
  64738. }
  64739. function width() {
  64740. var sum = 0;
  64741. for (var i = 0, l = group.inlines.length; i < l; i++) {
  64742. var justifyShift = (group.inlines[i].justifyShift || 0);
  64743. sum += group.inlines[i].width + justifyShift;
  64744. }
  64745. return sum;
  64746. }
  64747. var firstInline = group.inlines[0],
  64748. biggerInline = maxInline(),
  64749. totalWidth = width(),
  64750. lineAscent = group.line.getAscenderHeight(),
  64751. ascent = biggerInline.font.ascender / 1000 * biggerInline.fontSize,
  64752. height = biggerInline.height,
  64753. descent = height - ascent;
  64754. var lw = 0.5 + Math.floor(Math.max(biggerInline.fontSize - 8, 0) / 2) * 0.12;
  64755. switch (group.decoration) {
  64756. case 'underline':
  64757. y += lineAscent + descent * 0.45;
  64758. break;
  64759. case 'overline':
  64760. y += lineAscent - (ascent * 0.85);
  64761. break;
  64762. case 'lineThrough':
  64763. y += lineAscent - (ascent * 0.25);
  64764. break;
  64765. default:
  64766. throw 'Unkown decoration : ' + group.decoration;
  64767. }
  64768. pdfKitDoc.save();
  64769. if (group.decorationStyle === 'double') {
  64770. var gap = Math.max(0.5, lw * 2);
  64771. pdfKitDoc.fillColor(group.decorationColor)
  64772. .rect(x + firstInline.x, y - lw / 2, totalWidth, lw / 2).fill()
  64773. .rect(x + firstInline.x, y + gap - lw / 2, totalWidth, lw / 2).fill();
  64774. } else if (group.decorationStyle === 'dashed') {
  64775. var nbDashes = Math.ceil(totalWidth / (3.96 + 2.84));
  64776. var rdx = x + firstInline.x;
  64777. pdfKitDoc.rect(rdx, y, totalWidth, lw).clip();
  64778. pdfKitDoc.fillColor(group.decorationColor);
  64779. for (var i = 0; i < nbDashes; i++) {
  64780. pdfKitDoc.rect(rdx, y - lw / 2, 3.96, lw).fill();
  64781. rdx += 3.96 + 2.84;
  64782. }
  64783. } else if (group.decorationStyle === 'dotted') {
  64784. var nbDots = Math.ceil(totalWidth / (lw * 3));
  64785. var rx = x + firstInline.x;
  64786. pdfKitDoc.rect(rx, y, totalWidth, lw).clip();
  64787. pdfKitDoc.fillColor(group.decorationColor);
  64788. for (var ii = 0; ii < nbDots; ii++) {
  64789. pdfKitDoc.rect(rx, y - lw / 2, lw, lw).fill();
  64790. rx += (lw * 3);
  64791. }
  64792. } else if (group.decorationStyle === 'wavy') {
  64793. var sh = 0.7, sv = 1;
  64794. var nbWaves = Math.ceil(totalWidth / (sh * 2)) + 1;
  64795. var rwx = x + firstInline.x - 1;
  64796. pdfKitDoc.rect(x + firstInline.x, y - sv, totalWidth, y + sv).clip();
  64797. pdfKitDoc.lineWidth(0.24);
  64798. pdfKitDoc.moveTo(rwx, y);
  64799. for (var iii = 0; iii < nbWaves; iii++) {
  64800. pdfKitDoc.bezierCurveTo(rwx + sh, y - sv, rwx + sh * 2, y - sv, rwx + sh * 3, y)
  64801. .bezierCurveTo(rwx + sh * 4, y + sv, rwx + sh * 5, y + sv, rwx + sh * 6, y);
  64802. rwx += sh * 6;
  64803. }
  64804. pdfKitDoc.stroke(group.decorationColor);
  64805. } else {
  64806. pdfKitDoc.fillColor(group.decorationColor)
  64807. .rect(x + firstInline.x, y - lw / 2, totalWidth, lw)
  64808. .fill();
  64809. }
  64810. pdfKitDoc.restore();
  64811. }
  64812. function drawDecorations(line, x, y, pdfKitDoc) {
  64813. var groups = groupDecorations(line);
  64814. for (var i = 0, l = groups.length; i < l; i++) {
  64815. drawDecoration(groups[i], x, y, pdfKitDoc);
  64816. }
  64817. }
  64818. function drawBackground(line, x, y, patterns, pdfKitDoc) {
  64819. var height = line.getHeight();
  64820. for (var i = 0, l = line.inlines.length; i < l; i++) {
  64821. var inline = line.inlines[i];
  64822. if (!inline.background) {
  64823. continue;
  64824. }
  64825. var color = inline.background;
  64826. if (isPattern(inline.background)) {
  64827. color = getPattern(inline.background, patterns);
  64828. }
  64829. var justifyShift = (inline.justifyShift || 0);
  64830. pdfKitDoc.fillColor(color)
  64831. .rect(x + inline.x - justifyShift, y, inline.width + justifyShift, height)
  64832. .fill();
  64833. }
  64834. }
  64835. module.exports = {
  64836. drawBackground: drawBackground,
  64837. drawDecorations: drawDecorations
  64838. };
  64839. /***/ }),
  64840. /***/ 1350:
  64841. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  64842. "use strict";
  64843. var isString = (__webpack_require__(6225).isString);
  64844. var isNumber = (__webpack_require__(6225).isNumber);
  64845. var isObject = (__webpack_require__(6225).isObject);
  64846. var isArray = (__webpack_require__(6225).isArray);
  64847. var isUndefined = (__webpack_require__(6225).isUndefined);
  64848. var LineBreaker = __webpack_require__(7337);
  64849. var LEADING = /^(\s)+/g;
  64850. var TRAILING = /(\s)+$/g;
  64851. /**
  64852. * Creates an instance of TextTools - text measurement utility
  64853. *
  64854. * @constructor
  64855. * @param {FontProvider} fontProvider
  64856. */
  64857. function TextTools(fontProvider) {
  64858. this.fontProvider = fontProvider;
  64859. }
  64860. /**
  64861. * Converts an array of strings (or inline-definition-objects) into a collection
  64862. * of inlines and calculated minWidth/maxWidth.
  64863. * and their min/max widths
  64864. * @param {Object} textArray - an array of inline-definition-objects (or strings)
  64865. * @param {Object} styleContextStack current style stack
  64866. * @return {Object} collection of inlines, minWidth, maxWidth
  64867. */
  64868. TextTools.prototype.buildInlines = function (textArray, styleContextStack) {
  64869. var measured = measure(this.fontProvider, textArray, styleContextStack);
  64870. var minWidth = 0,
  64871. maxWidth = 0,
  64872. currentLineWidth;
  64873. measured.forEach(function (inline) {
  64874. minWidth = Math.max(minWidth, inline.width - inline.leadingCut - inline.trailingCut);
  64875. if (!currentLineWidth) {
  64876. currentLineWidth = { width: 0, leadingCut: inline.leadingCut, trailingCut: 0 };
  64877. }
  64878. currentLineWidth.width += inline.width;
  64879. currentLineWidth.trailingCut = inline.trailingCut;
  64880. maxWidth = Math.max(maxWidth, getTrimmedWidth(currentLineWidth));
  64881. if (inline.lineEnd) {
  64882. currentLineWidth = null;
  64883. }
  64884. });
  64885. if (getStyleProperty({}, styleContextStack, 'noWrap', false)) {
  64886. minWidth = maxWidth;
  64887. }
  64888. return {
  64889. items: measured,
  64890. minWidth: minWidth,
  64891. maxWidth: maxWidth
  64892. };
  64893. function getTrimmedWidth(item) {
  64894. return Math.max(0, item.width - item.leadingCut - item.trailingCut);
  64895. }
  64896. };
  64897. /**
  64898. * Returns size of the specified string (without breaking it) using the current style
  64899. * @param {String} text text to be measured
  64900. * @param {Object} styleContextStack current style stack
  64901. * @return {Object} size of the specified string
  64902. */
  64903. TextTools.prototype.sizeOfString = function (text, styleContextStack) {
  64904. text = text ? text.toString().replace(/\t/g, ' ') : '';
  64905. //TODO: refactor - extract from measure
  64906. var fontName = getStyleProperty({}, styleContextStack, 'font', 'Roboto');
  64907. var fontSize = getStyleProperty({}, styleContextStack, 'fontSize', 12);
  64908. var fontFeatures = getStyleProperty({}, styleContextStack, 'fontFeatures', null);
  64909. var bold = getStyleProperty({}, styleContextStack, 'bold', false);
  64910. var italics = getStyleProperty({}, styleContextStack, 'italics', false);
  64911. var lineHeight = getStyleProperty({}, styleContextStack, 'lineHeight', 1);
  64912. var characterSpacing = getStyleProperty({}, styleContextStack, 'characterSpacing', 0);
  64913. var font = this.fontProvider.provideFont(fontName, bold, italics);
  64914. return {
  64915. width: widthOfString(text, font, fontSize, characterSpacing, fontFeatures),
  64916. height: font.lineHeight(fontSize) * lineHeight,
  64917. fontSize: fontSize,
  64918. lineHeight: lineHeight,
  64919. ascender: font.ascender / 1000 * fontSize,
  64920. descender: font.descender / 1000 * fontSize
  64921. };
  64922. };
  64923. /**
  64924. * Returns size of the specified rotated string (without breaking it) using the current style
  64925. *
  64926. * @param {string} text text to be measured
  64927. * @param {number} angle
  64928. * @param {object} styleContextStack current style stack
  64929. * @returns {object} size of the specified string
  64930. */
  64931. TextTools.prototype.sizeOfRotatedText = function (text, angle, styleContextStack) {
  64932. var angleRad = angle * Math.PI / -180;
  64933. var size = this.sizeOfString(text, styleContextStack);
  64934. return {
  64935. width: Math.abs(size.height * Math.sin(angleRad)) + Math.abs(size.width * Math.cos(angleRad)),
  64936. height: Math.abs(size.width * Math.sin(angleRad)) + Math.abs(size.height * Math.cos(angleRad))
  64937. };
  64938. }
  64939. TextTools.prototype.widthOfString = function (text, font, fontSize, characterSpacing, fontFeatures) {
  64940. return widthOfString(text, font, fontSize, characterSpacing, fontFeatures);
  64941. };
  64942. function splitWords(text, noWrap) {
  64943. var results = [];
  64944. text = text.replace(/\t/g, ' ');
  64945. if (noWrap) {
  64946. results.push({ text: text });
  64947. return results;
  64948. }
  64949. var breaker = new LineBreaker(text);
  64950. var last = 0;
  64951. var bk;
  64952. while (bk = breaker.nextBreak()) {
  64953. var word = text.slice(last, bk.position);
  64954. if (bk.required || word.match(/\r?\n$|\r$/)) { // new line
  64955. word = word.replace(/\r?\n$|\r$/, '');
  64956. results.push({ text: word, lineEnd: true });
  64957. } else {
  64958. results.push({ text: word });
  64959. }
  64960. last = bk.position;
  64961. }
  64962. return results;
  64963. }
  64964. function copyStyle(source, destination) {
  64965. destination = destination || {};
  64966. source = source || {}; //TODO: default style
  64967. for (var key in source) {
  64968. if (key != 'text' && source.hasOwnProperty(key)) {
  64969. destination[key] = source[key];
  64970. }
  64971. }
  64972. return destination;
  64973. }
  64974. function normalizeTextArray(array, styleContextStack) {
  64975. function flatten(array) {
  64976. return array.reduce(function (prev, cur) {
  64977. var current = isArray(cur.text) ? flatten(cur.text) : cur;
  64978. var more = [].concat(current).some(Array.isArray);
  64979. return prev.concat(more ? flatten(current) : current);
  64980. }, []);
  64981. }
  64982. function getOneWord(index, words, noWrap) {
  64983. if (isUndefined(words[index])) {
  64984. return null;
  64985. }
  64986. if (words[index].lineEnd) {
  64987. return null;
  64988. }
  64989. var word = words[index].text;
  64990. if (noWrap) {
  64991. var tmpWords = splitWords(normalizeString(word), false);
  64992. if (isUndefined(tmpWords[tmpWords.length - 1])) {
  64993. return null;
  64994. }
  64995. word = tmpWords[tmpWords.length - 1].text;
  64996. }
  64997. return word;
  64998. }
  64999. var results = [];
  65000. if (!isArray(array)) {
  65001. array = [array];
  65002. }
  65003. array = flatten(array);
  65004. var lastWord = null;
  65005. for (var i = 0, l = array.length; i < l; i++) {
  65006. var item = array[i];
  65007. var style = null;
  65008. var words;
  65009. var noWrap = getStyleProperty(item || {}, styleContextStack, 'noWrap', false);
  65010. if (isObject(item)) {
  65011. if (item._textRef && item._textRef._textNodeRef.text) {
  65012. item.text = item._textRef._textNodeRef.text;
  65013. }
  65014. words = splitWords(normalizeString(item.text), noWrap);
  65015. style = copyStyle(item);
  65016. } else {
  65017. words = splitWords(normalizeString(item), noWrap);
  65018. }
  65019. if (lastWord && words.length) {
  65020. var firstWord = getOneWord(0, words, noWrap);
  65021. var wrapWords = splitWords(normalizeString(lastWord + firstWord), false);
  65022. if (wrapWords.length === 1) {
  65023. results[results.length - 1].noNewLine = true;
  65024. }
  65025. }
  65026. for (var i2 = 0, l2 = words.length; i2 < l2; i2++) {
  65027. var result = {
  65028. text: words[i2].text
  65029. };
  65030. if (words[i2].lineEnd) {
  65031. result.lineEnd = true;
  65032. }
  65033. copyStyle(style, result);
  65034. results.push(result);
  65035. }
  65036. lastWord = null;
  65037. if (i + 1 < l) {
  65038. lastWord = getOneWord(words.length - 1, words, noWrap);
  65039. }
  65040. }
  65041. return results;
  65042. }
  65043. function normalizeString(value) {
  65044. if (value === undefined || value === null) {
  65045. return '';
  65046. } else if (isNumber(value)) {
  65047. return value.toString();
  65048. } else if (isString(value)) {
  65049. return value;
  65050. } else {
  65051. return value.toString();
  65052. }
  65053. }
  65054. function getStyleProperty(item, styleContextStack, property, defaultValue) {
  65055. var value;
  65056. if (item[property] !== undefined && item[property] !== null) {
  65057. // item defines this property
  65058. return item[property];
  65059. }
  65060. if (!styleContextStack) {
  65061. return defaultValue;
  65062. }
  65063. styleContextStack.auto(item, function () {
  65064. value = styleContextStack.getProperty(property);
  65065. });
  65066. if (value !== null && value !== undefined) {
  65067. return value;
  65068. } else {
  65069. return defaultValue;
  65070. }
  65071. }
  65072. function measure(fontProvider, textArray, styleContextStack) {
  65073. var normalized = normalizeTextArray(textArray, styleContextStack);
  65074. if (normalized.length) {
  65075. var leadingIndent = getStyleProperty(normalized[0], styleContextStack, 'leadingIndent', 0);
  65076. if (leadingIndent) {
  65077. normalized[0].leadingCut = -leadingIndent;
  65078. normalized[0].leadingIndent = leadingIndent;
  65079. }
  65080. }
  65081. normalized.forEach(function (item) {
  65082. var fontName = getStyleProperty(item, styleContextStack, 'font', 'Roboto');
  65083. var fontSize = getStyleProperty(item, styleContextStack, 'fontSize', 12);
  65084. var fontFeatures = getStyleProperty(item, styleContextStack, 'fontFeatures', null);
  65085. var bold = getStyleProperty(item, styleContextStack, 'bold', false);
  65086. var italics = getStyleProperty(item, styleContextStack, 'italics', false);
  65087. var color = getStyleProperty(item, styleContextStack, 'color', 'black');
  65088. var decoration = getStyleProperty(item, styleContextStack, 'decoration', null);
  65089. var decorationColor = getStyleProperty(item, styleContextStack, 'decorationColor', null);
  65090. var decorationStyle = getStyleProperty(item, styleContextStack, 'decorationStyle', null);
  65091. var background = getStyleProperty(item, styleContextStack, 'background', null);
  65092. var lineHeight = getStyleProperty(item, styleContextStack, 'lineHeight', 1);
  65093. var characterSpacing = getStyleProperty(item, styleContextStack, 'characterSpacing', 0);
  65094. var link = getStyleProperty(item, styleContextStack, 'link', null);
  65095. var linkToPage = getStyleProperty(item, styleContextStack, 'linkToPage', null);
  65096. var linkToDestination = getStyleProperty(item, styleContextStack, 'linkToDestination', null);
  65097. var noWrap = getStyleProperty(item, styleContextStack, 'noWrap', null);
  65098. var preserveLeadingSpaces = getStyleProperty(item, styleContextStack, 'preserveLeadingSpaces', false);
  65099. var preserveTrailingSpaces = getStyleProperty(item, styleContextStack, 'preserveTrailingSpaces', false);
  65100. var opacity = getStyleProperty(item, styleContextStack, 'opacity', 1);
  65101. var sup = getStyleProperty(item, styleContextStack, 'sup', false);
  65102. var sub = getStyleProperty(item, styleContextStack, 'sub', false);
  65103. if ((sup || sub) && item.fontSize === undefined) {
  65104. // font size reduction taken from here: https://en.wikipedia.org/wiki/Subscript_and_superscript#Desktop_publishing
  65105. fontSize *= 0.58
  65106. }
  65107. var font = fontProvider.provideFont(fontName, bold, italics);
  65108. item.width = widthOfString(item.text, font, fontSize, characterSpacing, fontFeatures);
  65109. item.height = font.lineHeight(fontSize) * lineHeight;
  65110. if (!item.leadingCut) {
  65111. item.leadingCut = 0;
  65112. }
  65113. var leadingSpaces;
  65114. if (!preserveLeadingSpaces && (leadingSpaces = item.text.match(LEADING))) {
  65115. item.leadingCut += widthOfString(leadingSpaces[0], font, fontSize, characterSpacing, fontFeatures);
  65116. }
  65117. var trailingSpaces;
  65118. if (!preserveTrailingSpaces && (trailingSpaces = item.text.match(TRAILING))) {
  65119. item.trailingCut = widthOfString(trailingSpaces[0], font, fontSize, characterSpacing, fontFeatures);
  65120. } else {
  65121. item.trailingCut = 0;
  65122. }
  65123. item.alignment = getStyleProperty(item, styleContextStack, 'alignment', 'left');
  65124. item.font = font;
  65125. item.fontSize = fontSize;
  65126. item.fontFeatures = fontFeatures;
  65127. item.characterSpacing = characterSpacing;
  65128. item.color = color;
  65129. item.decoration = decoration;
  65130. item.decorationColor = decorationColor;
  65131. item.decorationStyle = decorationStyle;
  65132. item.background = background;
  65133. item.link = link;
  65134. item.linkToPage = linkToPage;
  65135. item.linkToDestination = linkToDestination;
  65136. item.noWrap = noWrap;
  65137. item.opacity = opacity;
  65138. item.sup = sup;
  65139. item.sub = sub;
  65140. });
  65141. return normalized;
  65142. }
  65143. function widthOfString(text, font, fontSize, characterSpacing, fontFeatures) {
  65144. return font.widthOfString(text, fontSize, fontFeatures) + ((characterSpacing || 0) * (text.length - 1));
  65145. }
  65146. module.exports = TextTools;
  65147. /***/ }),
  65148. /***/ 8537:
  65149. /***/ (function(module) {
  65150. "use strict";
  65151. function TraversalTracker() {
  65152. this.events = {};
  65153. }
  65154. TraversalTracker.prototype.startTracking = function (event, callback) {
  65155. var callbacks = this.events[event] || (this.events[event] = []);
  65156. if (callbacks.indexOf(callback) < 0) {
  65157. callbacks.push(callback);
  65158. }
  65159. };
  65160. TraversalTracker.prototype.stopTracking = function (event, callback) {
  65161. var callbacks = this.events[event];
  65162. if (!callbacks) {
  65163. return;
  65164. }
  65165. var index = callbacks.indexOf(callback);
  65166. if (index >= 0) {
  65167. callbacks.splice(index, 1);
  65168. }
  65169. };
  65170. TraversalTracker.prototype.emit = function (event) {
  65171. var args = Array.prototype.slice.call(arguments, 1);
  65172. var callbacks = this.events[event];
  65173. if (!callbacks) {
  65174. return;
  65175. }
  65176. callbacks.forEach(function (callback) {
  65177. callback.apply(this, args);
  65178. });
  65179. };
  65180. TraversalTracker.prototype.auto = function (event, callback, innerFunction) {
  65181. this.startTracking(event, callback);
  65182. innerFunction();
  65183. this.stopTracking(event, callback);
  65184. };
  65185. module.exports = TraversalTracker;
  65186. /***/ }),
  65187. /***/ 2480:
  65188. /***/ (function() {
  65189. /* (ignored) */
  65190. /***/ }),
  65191. /***/ 5832:
  65192. /***/ (function() {
  65193. /* (ignored) */
  65194. /***/ }),
  65195. /***/ 9862:
  65196. /***/ (function() {
  65197. /* (ignored) */
  65198. /***/ }),
  65199. /***/ 964:
  65200. /***/ (function() {
  65201. /* (ignored) */
  65202. /***/ }),
  65203. /***/ 3083:
  65204. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  65205. "use strict";
  65206. var possibleNames = [
  65207. 'BigInt64Array',
  65208. 'BigUint64Array',
  65209. 'Float32Array',
  65210. 'Float64Array',
  65211. 'Int16Array',
  65212. 'Int32Array',
  65213. 'Int8Array',
  65214. 'Uint16Array',
  65215. 'Uint32Array',
  65216. 'Uint8Array',
  65217. 'Uint8ClampedArray'
  65218. ];
  65219. var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis;
  65220. module.exports = function availableTypedArrays() {
  65221. var out = [];
  65222. for (var i = 0; i < possibleNames.length; i++) {
  65223. if (typeof g[possibleNames[i]] === 'function') {
  65224. out[out.length] = possibleNames[i];
  65225. }
  65226. }
  65227. return out;
  65228. };
  65229. /***/ }),
  65230. /***/ 882:
  65231. /***/ (function(module, __unused_webpack_exports, __webpack_require__) {
  65232. "use strict";
  65233. var GetIntrinsic = __webpack_require__(210);
  65234. var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
  65235. if ($gOPD) {
  65236. try {
  65237. $gOPD([], 'length');
  65238. } catch (e) {
  65239. // IE 8 has a broken gOPD
  65240. $gOPD = null;
  65241. }
  65242. }
  65243. module.exports = $gOPD;
  65244. /***/ }),
  65245. /***/ 3480:
  65246. /***/ (function(module) {
  65247. "use strict";
  65248. module.exports = JSON.parse('[["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"],["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"],["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"],["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"],["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"],["8940","𪎩𡅅"],["8943","攊"],["8946","丽滝鵎釟"],["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"],["89a1","琑糼緍楆竉刧"],["89ab","醌碸酞肼"],["89b0","贋胶𠧧"],["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"],["89c1","溚舾甙"],["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"],["8a40","𧶄唥"],["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"],["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"],["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"],["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"],["8aac","䠋𠆩㿺塳𢶍"],["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"],["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"],["8ac9","𪘁𠸉𢫏𢳉"],["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"],["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"],["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"],["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"],["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"],["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"],["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"],["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"],["8ca1","𣏹椙橃𣱣泿"],["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"],["8cc9","顨杫䉶圽"],["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"],["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"],["8d40","𠮟"],["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"],["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"],["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"],["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"],["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"],["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"],["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"],["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"],["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"],["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"],["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"],["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"],["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"],["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"],["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"],["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"],["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"],["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"],["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"],["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"],["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"],["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"],["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"],["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"],["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"],["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"],["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"],["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"],["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"],["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"],["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"],["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"],["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"],["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"],["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"],["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"],["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"],["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"],["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"],["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"],["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"],["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"],["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"],["9fae","酙隁酜"],["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"],["9fc1","𤤙盖鮝个𠳔莾衂"],["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"],["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"],["9fe7","毺蠘罸"],["9feb","嘠𪙊蹷齓"],["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"],["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"],["a055","𡠻𦸅"],["a058","詾𢔛"],["a05b","惽癧髗鵄鍮鮏蟵"],["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"],["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"],["a0a1","嵗𨯂迚𨸹"],["a0a6","僙𡵆礆匲阸𠼻䁥"],["a0ae","矾"],["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"],["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"],["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"],["a3c0","␀",31,"␡"],["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23],["c740","す",58,"ァアィイ"],["c7a1","ゥ",81,"А",5,"ЁЖ",4],["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"],["c8a1","龰冈龱𧘇"],["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"],["c8f5","ʃɐɛɔɵœøŋʊɪ"],["f9fe","■"],["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"],["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"],["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"],["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"],["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"],["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"],["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"],["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"],["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"],["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"]]');
  65249. /***/ }),
  65250. /***/ 3336:
  65251. /***/ (function(module) {
  65252. "use strict";
  65253. module.exports = JSON.parse('[["0","\\u0000",127,"€"],["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"],["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"],["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11],["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"],["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"],["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5],["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"],["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"],["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"],["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"],["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"],["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"],["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4],["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6],["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"],["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7],["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"],["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"],["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"],["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5],["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"],["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6],["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"],["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4],["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4],["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"],["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"],["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6],["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"],["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"],["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"],["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6],["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"],["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"],["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"],["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"],["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"],["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"],["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8],["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"],["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"],["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"],["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"],["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5],["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"],["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"],["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"],["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"],["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5],["9980","檧檨檪檭",114,"欥欦欨",6],["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"],["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"],["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"],["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"],["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"],["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5],["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"],["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"],["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6],["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"],["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"],["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4],["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19],["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"],["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"],["a2a1","ⅰ",9],["a2b1","⒈",19,"⑴",19,"①",9],["a2e5","㈠",9],["a2f1","Ⅰ",11],["a3a1","!"#¥%",88," ̄"],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"],["a6ee","︻︼︷︸︱"],["a6f4","︳︴"],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6],["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"],["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"],["a8bd","ńň"],["a8c0","ɡ"],["a8c5","ㄅ",36],["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"],["a959","℡㈱"],["a95c","‐"],["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8],["a980","﹢",4,"﹨﹩﹪﹫"],["a996","〇"],["a9a4","─",75],["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8],["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"],["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4],["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4],["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11],["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"],["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12],["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"],["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"],["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"],["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"],["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"],["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"],["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"],["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"],["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"],["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4],["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"],["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"],["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"],["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9],["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"],["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"],["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"],["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"],["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"],["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16],["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"],["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"],["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"],["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"],["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"],["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"],["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"],["bb40","籃",9,"籎",36,"籵",5,"籾",9],["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"],["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5],["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"],["bd40","紷",54,"絯",7],["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"],["be40","継",12,"綧",6,"綯",42],["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"],["bf40","緻",62],["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"],["c040","繞",35,"纃",23,"纜纝纞"],["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"],["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"],["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"],["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"],["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"],["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"],["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"],["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"],["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"],["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"],["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"],["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"],["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"],["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"],["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"],["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"],["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"],["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"],["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"],["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10],["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"],["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"],["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"],["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"],["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"],["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"],["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"],["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"],["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"],["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9],["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"],["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"],["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"],["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5],["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"],["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"],["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"],["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6],["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"],["d440","訞",31,"訿",8,"詉",21],["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"],["d540","誁",7,"誋",7,"誔",46],["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"],["d640","諤",34,"謈",27],["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"],["d740","譆",31,"譧",4,"譭",25],["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"],["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"],["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"],["d940","貮",62],["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"],["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"],["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"],["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"],["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"],["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7],["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"],["dd40","軥",62],["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"],["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"],["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"],["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"],["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"],["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"],["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"],["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"],["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"],["e240","釦",62],["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"],["e340","鉆",45,"鉵",16],["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"],["e440","銨",5,"銯",24,"鋉",31],["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"],["e540","錊",51,"錿",10],["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"],["e640","鍬",34,"鎐",27],["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"],["e740","鏎",7,"鏗",54],["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"],["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"],["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"],["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42],["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"],["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"],["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"],["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"],["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"],["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7],["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"],["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46],["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"],["ee40","頏",62],["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"],["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4],["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"],["f040","餈",4,"餎餏餑",28,"餯",26],["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"],["f140","馌馎馚",10,"馦馧馩",47],["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"],["f240","駺",62],["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"],["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"],["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"],["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5],["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"],["f540","魼",62],["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"],["f640","鯜",62],["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"],["f740","鰼",62],["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"],["f840","鳣",62],["f880","鴢",32],["f940","鵃",62],["f980","鶂",32],["fa40","鶣",62],["fa80","鷢",32],["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"],["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"],["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6],["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"],["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38],["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"],["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"]]');
  65254. /***/ }),
  65255. /***/ 7348:
  65256. /***/ (function(module) {
  65257. "use strict";
  65258. module.exports = JSON.parse('[["0","\\u0000",127],["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"],["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"],["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"],["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5],["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"],["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18],["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7],["8361","긝",18,"긲긳긵긶긹긻긼"],["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8],["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8],["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18],["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"],["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4],["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"],["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"],["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"],["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10],["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"],["8741","놞",9,"놩",15],["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"],["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4],["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4],["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"],["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"],["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"],["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"],["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15],["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"],["8a61","둧",4,"둭",18,"뒁뒂"],["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"],["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"],["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8],["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18],["8c41","똀",15,"똒똓똕똖똗똙",4],["8c61","똞",6,"똦",5,"똭",6,"똵",5],["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16],["8d41","뛃",16,"뛕",8],["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"],["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"],["8e41","랟랡",6,"랪랮",5,"랶랷랹",8],["8e61","럂",4,"럈럊",19],["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7],["8f41","뢅",7,"뢎",17],["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4],["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5],["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"],["9061","륾",5,"릆릈릋릌릏",15],["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"],["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5],["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5],["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6],["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"],["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4],["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"],["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"],["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8],["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"],["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8],["9461","봞",5,"봥",6,"봭",12],["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24],["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"],["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"],["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14],["9641","뺸",23,"뻒뻓"],["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8],["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44],["9741","뾃",16,"뾕",8],["9761","뾞",17,"뾱",7],["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"],["9841","쁀",16,"쁒",5,"쁙쁚쁛"],["9861","쁝쁞쁟쁡",6,"쁪",15],["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"],["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"],["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"],["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"],["9a41","숤숥숦숧숪숬숮숰숳숵",16],["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"],["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"],["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8],["9b61","쌳",17,"썆",7],["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"],["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5],["9c61","쏿",8,"쐉",6,"쐑",9],["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12],["9d41","쒪",13,"쒹쒺쒻쒽",8],["9d61","쓆",25],["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"],["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"],["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"],["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"],["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"],["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"],["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"],["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"],["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13],["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"],["a141","좥좦좧좩",18,"좾좿죀죁"],["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"],["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"],["a241","줐줒",5,"줙",18],["a261","줭",6,"줵",18],["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"],["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"],["a361","즑",6,"즚즜즞",16],["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"],["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"],["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12],["a481","쨦쨧쨨쨪",28,"ㄱ",93],["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"],["a561","쩫",17,"쩾",5,"쪅쪆"],["a581","쪇",16,"쪙",14,"ⅰ",9],["a5b0","Ⅰ",9],["a5c1","Α",16,"Σ",6],["a5e1","α",16,"σ",6],["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"],["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6],["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7],["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7],["a761","쬪",22,"쭂쭃쭄"],["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"],["a841","쭭",10,"쭺",14],["a861","쮉",18,"쮝",6],["a881","쮤",19,"쮹",11,"ÆЪĦ"],["a8a6","IJ"],["a8a8","ĿŁØŒºÞŦŊ"],["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"],["a941","쯅",14,"쯕",10],["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18],["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"],["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"],["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"],["aa81","챳챴챶",29,"ぁ",82],["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"],["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5],["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85],["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"],["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4],["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25],["acd1","а",5,"ёж",25],["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7],["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"],["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"],["ae41","췆",5,"췍췎췏췑",16],["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4],["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"],["af41","츬츭츮츯츲츴츶",19],["af61","칊",13,"칚칛칝칞칢",5,"칪칬"],["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"],["b041","캚",5,"캢캦",5,"캮",12],["b061","캻",5,"컂",19],["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"],["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"],["b161","켥",6,"켮켲",5,"켹",11],["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"],["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"],["b261","쾎",18,"쾢",5,"쾩"],["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"],["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"],["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5],["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"],["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5],["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"],["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"],["b541","킕",14,"킦킧킩킪킫킭",5],["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4],["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"],["b641","턅",7,"턎",17],["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"],["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"],["b741","텮",13,"텽",6,"톅톆톇톉톊"],["b761","톋",20,"톢톣톥톦톧"],["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"],["b841","퇐",7,"퇙",17],["b861","퇫",8,"퇵퇶퇷퇹",13],["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"],["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"],["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"],["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"],["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"],["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5],["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"],["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"],["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"],["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"],["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"],["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"],["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"],["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"],["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13],["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"],["be41","퐸",7,"푁푂푃푅",14],["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"],["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"],["bf41","풞",10,"풪",14],["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"],["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"],["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5],["c061","픞",25],["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"],["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"],["c161","햌햍햎햏햑",19,"햦햧"],["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"],["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"],["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"],["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"],["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4],["c361","홢",4,"홨홪",5,"홲홳홵",11],["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"],["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"],["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4],["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"],["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"],["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4],["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"],["c641","힍힎힏힑",6,"힚힜힞",5],["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"],["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"],["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"],["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"],["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"],["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"],["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"],["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"],["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"],["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"],["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"],["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"],["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"],["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"],["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"],["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"],["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"],["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"],["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"],["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"],["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"],["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"],["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"],["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"],["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"],["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"],["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"],["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"],["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"],["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"],["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"],["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"],["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"],["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"],["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"],["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"],["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"],["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"],["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"],["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"],["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"],["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"],["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"],["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"],["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"],["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"],["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"],["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"],["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"],["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"],["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"],["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"],["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"],["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"],["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"]]');
  65259. /***/ }),
  65260. /***/ 4284:
  65261. /***/ (function(module) {
  65262. "use strict";
  65263. module.exports = JSON.parse('[["0","\\u0000",127],["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"],["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"],["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"],["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21],["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10],["a3a1","ㄐ",25,"˙ˉˊˇˋ"],["a3e1","€"],["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"],["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"],["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"],["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"],["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"],["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"],["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"],["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"],["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"],["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"],["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"],["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"],["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"],["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"],["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"],["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"],["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"],["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"],["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"],["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"],["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"],["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"],["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"],["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"],["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"],["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"],["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"],["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"],["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"],["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"],["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"],["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"],["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"],["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"],["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"],["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"],["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"],["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"],["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"],["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"],["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"],["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"],["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"],["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"],["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"],["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"],["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"],["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"],["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"],["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"],["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"],["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"],["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"],["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"],["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"],["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"],["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"],["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"],["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"],["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"],["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"],["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"],["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"],["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"],["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"],["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"],["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"],["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"],["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"],["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"],["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"],["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"],["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"],["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"],["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"],["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"],["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"],["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"],["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"],["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"],["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"],["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"],["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"],["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"],["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"],["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"],["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"],["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"],["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"],["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"],["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"],["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"],["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"],["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"],["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"],["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"],["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"],["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"],["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"],["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"],["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"],["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"],["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"],["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"],["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"],["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"],["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"],["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"],["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"],["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"],["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"],["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"],["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"],["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"],["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"],["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"],["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"],["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"],["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"],["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"],["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"],["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"],["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"],["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"],["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"],["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"],["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"],["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"],["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"],["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"],["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"],["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"],["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"],["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"],["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"],["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"],["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"],["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"],["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"],["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"],["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"],["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"],["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"],["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"],["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"],["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"],["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"],["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"],["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"],["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"],["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"],["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"],["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"],["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"],["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"],["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"],["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"],["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"],["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"],["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"],["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"],["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"],["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"],["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"],["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"],["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"],["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"]]');
  65264. /***/ }),
  65265. /***/ 5633:
  65266. /***/ (function(module) {
  65267. "use strict";
  65268. module.exports = JSON.parse('[["0","\\u0000",127],["8ea1","。",62],["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],["a2ba","∈∋⊆⊇⊂⊃∪∩"],["a2ca","∧∨¬⇒⇔∀∃"],["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["a2f2","ʼn♯♭♪†‡¶"],["a2fe","◯"],["a3b0","0",9],["a3c1","A",25],["a3e1","a",25],["a4a1","ぁ",82],["a5a1","ァ",85],["a6a1","Α",16,"Σ",6],["a6c1","α",16,"σ",6],["a7a1","А",5,"ЁЖ",25],["a7d1","а",5,"ёж",25],["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["ada1","①",19,"Ⅰ",9],["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],["f4a1","堯槇遙瑤凜熙"],["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["fcf1","ⅰ",9,"¬¦'""],["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],["8fa2c2","¡¦¿"],["8fa2eb","ºª©®™¤№"],["8fa6e1","ΆΈΉΊΪ"],["8fa6e7","Ό"],["8fa6e9","ΎΫ"],["8fa6ec","Ώ"],["8fa6f1","άέήίϊΐόςύϋΰώ"],["8fa7c2","Ђ",10,"ЎЏ"],["8fa7f2","ђ",10,"ўџ"],["8fa9a1","ÆĐ"],["8fa9a4","Ħ"],["8fa9a6","IJ"],["8fa9a8","ŁĿ"],["8fa9ab","ŊØŒ"],["8fa9af","ŦÞ"],["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],["8fabbd","ġĥíìïîǐ"],["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]]');
  65269. /***/ }),
  65270. /***/ 6258:
  65271. /***/ (function(module) {
  65272. "use strict";
  65273. module.exports = JSON.parse('{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}');
  65274. /***/ }),
  65275. /***/ 4346:
  65276. /***/ (function(module) {
  65277. "use strict";
  65278. module.exports = JSON.parse('[["a140","",62],["a180","",32],["a240","",62],["a280","",32],["a2ab","",5],["a2e3","€"],["a2ef",""],["a2fd",""],["a340","",62],["a380","",31," "],["a440","",62],["a480","",32],["a4f4","",10],["a540","",62],["a580","",32],["a5f7","",7],["a640","",62],["a680","",32],["a6b9","",7],["a6d9","",6],["a6ec",""],["a6f3",""],["a6f6","",8],["a740","",62],["a780","",32],["a7c2","",14],["a7f2","",12],["a896","",10],["a8bc","ḿ"],["a8bf","ǹ"],["a8c1",""],["a8ea","",20],["a958",""],["a95b",""],["a95d",""],["a989","〾⿰",11],["a997","",12],["a9f0","",14],["aaa1","",93],["aba1","",93],["aca1","",93],["ada1","",93],["aea1","",93],["afa1","",93],["d7fa","",4],["f8a1","",93],["f9a1","",93],["faa1","",93],["fba1","",93],["fca1","",93],["fda1","",93],["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"],["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93],["8135f437",""]]');
  65279. /***/ }),
  65280. /***/ 7014:
  65281. /***/ (function(module) {
  65282. "use strict";
  65283. module.exports = JSON.parse('[["0","\\u0000",128],["a1","。",62],["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"],["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"],["81b8","∈∋⊆⊇⊂⊃∪∩"],["81c8","∧∨¬⇒⇔∀∃"],["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],["81f0","ʼn♯♭♪†‡¶"],["81fc","◯"],["824f","0",9],["8260","A",25],["8281","a",25],["829f","ぁ",82],["8340","ァ",62],["8380","ム",22],["839f","Α",16,"Σ",6],["83bf","α",16,"σ",6],["8440","А",5,"ЁЖ",25],["8470","а",5,"ёж",7],["8480","о",17],["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],["8740","①",19,"Ⅰ",9],["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],["877e","㍻"],["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"],["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"],["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"],["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"],["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"],["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"],["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"],["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"],["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"],["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"],["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"],["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"],["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"],["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"],["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"],["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"],["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"],["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"],["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"],["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"],["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"],["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"],["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"],["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"],["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"],["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"],["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"],["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"],["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"],["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"],["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"],["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"],["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"],["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"],["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"],["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"],["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],["eeef","ⅰ",9,"¬¦'""],["f040","",62],["f080","",124],["f140","",62],["f180","",124],["f240","",62],["f280","",124],["f340","",62],["f380","",124],["f440","",62],["f480","",124],["f540","",62],["f580","",124],["f640","",62],["f680","",124],["f740","",62],["f780","",124],["f840","",62],["f880","",124],["f940",""],["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"],["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"],["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"],["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"],["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"]]');
  65284. /***/ })
  65285. /******/ });
  65286. /************************************************************************/
  65287. /******/ // The module cache
  65288. /******/ var __webpack_module_cache__ = {};
  65289. /******/
  65290. /******/ // The require function
  65291. /******/ function __webpack_require__(moduleId) {
  65292. /******/ // Check if module is in cache
  65293. /******/ var cachedModule = __webpack_module_cache__[moduleId];
  65294. /******/ if (cachedModule !== undefined) {
  65295. /******/ return cachedModule.exports;
  65296. /******/ }
  65297. /******/ // Create a new module (and put it into the cache)
  65298. /******/ var module = __webpack_module_cache__[moduleId] = {
  65299. /******/ id: moduleId,
  65300. /******/ loaded: false,
  65301. /******/ exports: {}
  65302. /******/ };
  65303. /******/
  65304. /******/ // Execute the module function
  65305. /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  65306. /******/
  65307. /******/ // Flag the module as loaded
  65308. /******/ module.loaded = true;
  65309. /******/
  65310. /******/ // Return the exports of the module
  65311. /******/ return module.exports;
  65312. /******/ }
  65313. /******/
  65314. /************************************************************************/
  65315. /******/ /* webpack/runtime/global */
  65316. /******/ !function() {
  65317. /******/ __webpack_require__.g = (function() {
  65318. /******/ if (typeof globalThis === 'object') return globalThis;
  65319. /******/ try {
  65320. /******/ return this || new Function('return this')();
  65321. /******/ } catch (e) {
  65322. /******/ if (typeof window === 'object') return window;
  65323. /******/ }
  65324. /******/ })();
  65325. /******/ }();
  65326. /******/
  65327. /******/ /* webpack/runtime/node module decorator */
  65328. /******/ !function() {
  65329. /******/ __webpack_require__.nmd = function(module) {
  65330. /******/ module.paths = [];
  65331. /******/ if (!module.children) module.children = [];
  65332. /******/ return module;
  65333. /******/ };
  65334. /******/ }();
  65335. /******/
  65336. /************************************************************************/
  65337. /******/
  65338. /******/ // startup
  65339. /******/ // Load entry module and return exports
  65340. /******/ // This entry module is referenced by other modules so it can't be inlined
  65341. /******/ var __webpack_exports__ = __webpack_require__(2536);
  65342. /******/
  65343. /******/ return __webpack_exports__;
  65344. /******/ })()
  65345. ;
  65346. });
  65347. //# sourceMappingURL=pdfmake.js.map