ag-psd 28.1.0 → 28.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundle.js CHANGED
@@ -1664,8 +1664,18 @@ function parseFilterFXItem(f, options) {
1664
1664
  } });
1665
1665
  }
1666
1666
  ;
1667
+ case 'BrgC':
1668
+ {
1669
+ return __assign(__assign({}, base), { type: 'brightness/contrast', filter: {
1670
+ brightness: f.Fltr.Brgh,
1671
+ contrast: f.Fltr.Cntr,
1672
+ useLegacy: !!f.Fltr.useLegacy,
1673
+ } });
1674
+ }
1675
+ ;
1667
1676
  default:
1668
1677
  if (options.throwForMissingFeatures) {
1678
+ console.log('FILTER', require('util').inspect(f, false, 99, true));
1669
1679
  throw new Error("Unknown filter classId: ".concat(f.Fltr._classID));
1670
1680
  }
1671
1681
  return undefined;
@@ -1685,9 +1695,10 @@ function parseFilterFXItem(f, options) {
1685
1695
  case 1181639749: return __assign(__assign({}, base), { type: 'find edges' });
1686
1696
  case 1399616122: return __assign(__assign({}, base), { type: 'solarize' });
1687
1697
  case 1314149187: return __assign(__assign({}, base), { type: 'ntsc colors' });
1698
+ case 1231976050: return __assign(__assign({}, base), { type: 'invert' });
1688
1699
  default:
1689
1700
  if (options.throwForMissingFeatures) {
1690
- // console.log('FILTER', require('util').inspect(f, false, 99, true));
1701
+ console.log('FILTER', require('util').inspect(f, false, 99, true));
1691
1702
  throw new Error("Unknown filterID: ".concat(f.filterID));
1692
1703
  }
1693
1704
  }
@@ -2023,6 +2034,7 @@ function serializeFilterFXItem(f) {
2023
2034
  IntC: descriptor_1.IntC.encode(f.filter.newFieldsBy),
2024
2035
  }, filterID: 1148089458 });
2025
2036
  case 'ntsc colors': return __assign(__assign({}, base), { filterID: 1314149187 });
2037
+ case 'invert': return __assign(__assign({}, base), { filterID: 1231976050 });
2026
2038
  case 'custom': return __assign(__assign({}, base), { Fltr: {
2027
2039
  _name: 'Custom',
2028
2040
  _classID: 'Cstm',
@@ -2160,6 +2172,13 @@ function serializeFilterFXItem(f) {
2160
2172
  Mpng: a.values,
2161
2173
  }; }),
2162
2174
  }, filterID: 1131574899 });
2175
+ case 'brightness/contrast': return __assign(__assign({}, base), { Fltr: {
2176
+ _name: 'Brightness/Contrast',
2177
+ _classID: 'BrgC',
2178
+ Brgh: f.filter.brightness,
2179
+ Cntr: f.filter.contrast,
2180
+ useLegacy: !!f.filter.useLegacy,
2181
+ }, filterID: 1114793795 });
2163
2182
  // case 'hsb/hsl': return {
2164
2183
  // TODO: ...
2165
2184
  // };
@@ -3184,7 +3203,8 @@ addHandler('thrs', adjustmentType('threshold'), function (reader, target, left)
3184
3203
  });
3185
3204
  var grdmColorModels = ['', '', '', 'rgb', 'hsb', '', 'lab'];
3186
3205
  addHandler('grdm', adjustmentType('gradient map'), function (reader, target, left) {
3187
- if ((0, psdReader_1.readUint16)(reader) !== 1)
3206
+ var version = (0, psdReader_1.readUint16)(reader);
3207
+ if (version !== 1 && version !== 3)
3188
3208
  throw new Error('Invalid grdm version');
3189
3209
  var info = {
3190
3210
  type: 'gradient map',
@@ -3192,6 +3212,12 @@ addHandler('grdm', adjustmentType('gradient map'), function (reader, target, lef
3192
3212
  };
3193
3213
  info.reverse = !!(0, psdReader_1.readUint8)(reader);
3194
3214
  info.dither = !!(0, psdReader_1.readUint8)(reader);
3215
+ var hasMethod = !!(0, psdReader_1.readUint8)(reader);
3216
+ reader.offset--;
3217
+ if (hasMethod) {
3218
+ var method = (0, psdReader_1.readSignature)(reader);
3219
+ info.method = descriptor_1.gradientInterpolationMethodType.decode(method);
3220
+ }
3195
3221
  info.name = (0, psdReader_1.readUnicodeString)(reader);
3196
3222
  info.colorStops = [];
3197
3223
  info.opacityStops = [];
@@ -3251,9 +3277,12 @@ addHandler('grdm', adjustmentType('gradient map'), function (reader, target, lef
3251
3277
  }, function (writer, target) {
3252
3278
  var _a, _b, _c;
3253
3279
  var info = target.adjustment;
3254
- (0, psdWriter_1.writeUint16)(writer, 1); // version
3280
+ (0, psdWriter_1.writeUint16)(writer, info.method !== undefined ? 3 : 1); // version
3255
3281
  (0, psdWriter_1.writeUint8)(writer, info.reverse ? 1 : 0);
3256
3282
  (0, psdWriter_1.writeUint8)(writer, info.dither ? 1 : 0);
3283
+ if (info.method !== undefined) {
3284
+ (0, psdWriter_1.writeSignature)(writer, descriptor_1.gradientInterpolationMethodType.encode(info.method));
3285
+ }
3257
3286
  (0, psdWriter_1.writeUnicodeStringWithPadding)(writer, info.name || '');
3258
3287
  (0, psdWriter_1.writeUint16)(writer, info.colorStops && info.colorStops.length || 0);
3259
3288
  var interpolation = Math.round(((_a = info.smoothness) !== null && _a !== void 0 ? _a : 1) * 4096);
@@ -3712,7 +3741,7 @@ addHandler('tsly', hasKey('transparencyShapesLayer'), function (reader, target)
3712
3741
  (0, psdWriter_1.writeZeros)(writer, 3);
3713
3742
  });
3714
3743
 
3715
- },{"./descriptor":4,"./effectsHelpers":5,"./engineData":6,"./engineData2":7,"./helpers":8,"./psdReader":12,"./psdWriter":13,"./text":14,"base64-js":16}],3:[function(require,module,exports){
3744
+ },{"./descriptor":4,"./effectsHelpers":5,"./engineData":6,"./engineData2":7,"./helpers":8,"./psdReader":12,"./psdWriter":13,"./text":14,"base64-js":18,"util":54}],3:[function(require,module,exports){
3716
3745
  "use strict";
3717
3746
  var __assign = (this && this.__assign) || function () {
3718
3747
  __assign = Object.assign || function(t) {
@@ -5602,6 +5631,7 @@ exports.gradientInterpolationMethodType = (0, helpers_1.createEnum)('gradientInt
5602
5631
  linear: 'Lnr ',
5603
5632
  classic: 'Gcls',
5604
5633
  smooth: 'Smoo',
5634
+ // TODO: stripes
5605
5635
  });
5606
5636
  exports.ClrS = (0, helpers_1.createEnum)('ClrS', 'rgb', {
5607
5637
  rgb: 'RGBC',
@@ -7227,7 +7257,7 @@ function initializeCanvas(createCanvasMethod, createCanvasFromDataMethod, create
7227
7257
  }
7228
7258
  exports.initializeCanvas = initializeCanvas;
7229
7259
 
7230
- },{"base64-js":16,"pako":19}],9:[function(require,module,exports){
7260
+ },{"base64-js":18,"pako":35}],9:[function(require,module,exports){
7231
7261
  "use strict";
7232
7262
  var __assign = (this && this.__assign) || function () {
7233
7263
  __assign = Object.assign || function(t) {
@@ -8287,7 +8317,7 @@ target) { return target._ir4002 !== undefined; }, function (reader, target, left
8287
8317
  (0, psdWriter_1.writeBytes)(writer, target._ir4002);
8288
8318
  });
8289
8319
 
8290
- },{"./descriptor":4,"./helpers":8,"./psdReader":12,"./psdWriter":13,"./utf8":15,"base64-js":16}],10:[function(require,module,exports){
8320
+ },{"./descriptor":4,"./helpers":8,"./psdReader":12,"./psdWriter":13,"./utf8":15,"base64-js":18}],10:[function(require,module,exports){
8291
8321
  (function (Buffer){(function (){
8292
8322
  "use strict";
8293
8323
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -8343,7 +8373,7 @@ function writePsdBuffer(psd, options) {
8343
8373
  exports.writePsdBuffer = writePsdBuffer;
8344
8374
 
8345
8375
  }).call(this)}).call(this,require("buffer").Buffer)
8346
- },{"./abr":1,"./csh":3,"./helpers":8,"./psd":11,"./psdReader":12,"./psdWriter":13,"base64-js":16,"buffer":17}],11:[function(require,module,exports){
8376
+ },{"./abr":1,"./csh":3,"./helpers":8,"./psd":11,"./psdReader":12,"./psdWriter":13,"base64-js":18,"buffer":19}],11:[function(require,module,exports){
8347
8377
  "use strict";
8348
8378
  Object.defineProperty(exports, "__esModule", { value: true });
8349
8379
  exports.LayerCompCapturedInfo = exports.SectionDividerType = exports.ColorMode = void 0;
@@ -9588,7 +9618,7 @@ function readPattern(reader) {
9588
9618
  }
9589
9619
  exports.readPattern = readPattern;
9590
9620
 
9591
- },{"./additionalInfo":2,"./helpers":8,"./imageResources":9,"pako":19}],13:[function(require,module,exports){
9621
+ },{"./additionalInfo":2,"./helpers":8,"./imageResources":9,"pako":35}],13:[function(require,module,exports){
9592
9622
  "use strict";
9593
9623
  var __assign = (this && this.__assign) || function () {
9594
9624
  __assign = Object.assign || function(t) {
@@ -11122,6 +11152,58 @@ function decodeString(value) {
11122
11152
  exports.decodeString = decodeString;
11123
11153
 
11124
11154
  },{}],16:[function(require,module,exports){
11155
+
11156
+ /**
11157
+ * Array#filter.
11158
+ *
11159
+ * @param {Array} arr
11160
+ * @param {Function} fn
11161
+ * @param {Object=} self
11162
+ * @return {Array}
11163
+ * @throw TypeError
11164
+ */
11165
+
11166
+ module.exports = function (arr, fn, self) {
11167
+ if (arr.filter) return arr.filter(fn, self);
11168
+ if (void 0 === arr || null === arr) throw new TypeError;
11169
+ if ('function' != typeof fn) throw new TypeError;
11170
+ var ret = [];
11171
+ for (var i = 0; i < arr.length; i++) {
11172
+ if (!hasOwn.call(arr, i)) continue;
11173
+ var val = arr[i];
11174
+ if (fn.call(self, val, i, arr)) ret.push(val);
11175
+ }
11176
+ return ret;
11177
+ };
11178
+
11179
+ var hasOwn = Object.prototype.hasOwnProperty;
11180
+
11181
+ },{}],17:[function(require,module,exports){
11182
+ (function (global){(function (){
11183
+ 'use strict';
11184
+
11185
+ var filter = require('array-filter');
11186
+
11187
+ module.exports = function availableTypedArrays() {
11188
+ return filter([
11189
+ 'BigInt64Array',
11190
+ 'BigUint64Array',
11191
+ 'Float32Array',
11192
+ 'Float64Array',
11193
+ 'Int16Array',
11194
+ 'Int32Array',
11195
+ 'Int8Array',
11196
+ 'Uint16Array',
11197
+ 'Uint32Array',
11198
+ 'Uint8Array',
11199
+ 'Uint8ClampedArray'
11200
+ ], function (typedArray) {
11201
+ return typeof global[typedArray] === 'function';
11202
+ });
11203
+ };
11204
+
11205
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
11206
+ },{"array-filter":16}],18:[function(require,module,exports){
11125
11207
  'use strict'
11126
11208
 
11127
11209
  exports.byteLength = byteLength
@@ -11273,7 +11355,7 @@ function fromByteArray (uint8) {
11273
11355
  return parts.join('')
11274
11356
  }
11275
11357
 
11276
- },{}],17:[function(require,module,exports){
11358
+ },{}],19:[function(require,module,exports){
11277
11359
  (function (Buffer){(function (){
11278
11360
  /*!
11279
11361
  * The buffer module from node.js, for the browser.
@@ -13054,7 +13136,609 @@ function numberIsNaN (obj) {
13054
13136
  }
13055
13137
 
13056
13138
  }).call(this)}).call(this,require("buffer").Buffer)
13057
- },{"base64-js":16,"buffer":17,"ieee754":18}],18:[function(require,module,exports){
13139
+ },{"base64-js":18,"buffer":19,"ieee754":30}],20:[function(require,module,exports){
13140
+ 'use strict';
13141
+
13142
+ var GetIntrinsic = require('get-intrinsic');
13143
+
13144
+ var callBind = require('./');
13145
+
13146
+ var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
13147
+
13148
+ module.exports = function callBoundIntrinsic(name, allowMissing) {
13149
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
13150
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
13151
+ return callBind(intrinsic);
13152
+ }
13153
+ return intrinsic;
13154
+ };
13155
+
13156
+ },{"./":21,"get-intrinsic":26}],21:[function(require,module,exports){
13157
+ 'use strict';
13158
+
13159
+ var bind = require('function-bind');
13160
+ var GetIntrinsic = require('get-intrinsic');
13161
+
13162
+ var $apply = GetIntrinsic('%Function.prototype.apply%');
13163
+ var $call = GetIntrinsic('%Function.prototype.call%');
13164
+ var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
13165
+
13166
+ var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
13167
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
13168
+ var $max = GetIntrinsic('%Math.max%');
13169
+
13170
+ if ($defineProperty) {
13171
+ try {
13172
+ $defineProperty({}, 'a', { value: 1 });
13173
+ } catch (e) {
13174
+ // IE 8 has a broken defineProperty
13175
+ $defineProperty = null;
13176
+ }
13177
+ }
13178
+
13179
+ module.exports = function callBind(originalFunction) {
13180
+ var func = $reflectApply(bind, $call, arguments);
13181
+ if ($gOPD && $defineProperty) {
13182
+ var desc = $gOPD(func, 'length');
13183
+ if (desc.configurable) {
13184
+ // original length, plus the receiver, minus any additional arguments (after the receiver)
13185
+ $defineProperty(
13186
+ func,
13187
+ 'length',
13188
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
13189
+ );
13190
+ }
13191
+ }
13192
+ return func;
13193
+ };
13194
+
13195
+ var applyBind = function applyBind() {
13196
+ return $reflectApply(bind, $apply, arguments);
13197
+ };
13198
+
13199
+ if ($defineProperty) {
13200
+ $defineProperty(module.exports, 'apply', { value: applyBind });
13201
+ } else {
13202
+ module.exports.apply = applyBind;
13203
+ }
13204
+
13205
+ },{"function-bind":25,"get-intrinsic":26}],22:[function(require,module,exports){
13206
+ 'use strict';
13207
+
13208
+ var GetIntrinsic = require('get-intrinsic');
13209
+
13210
+ var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
13211
+ if ($gOPD) {
13212
+ try {
13213
+ $gOPD([], 'length');
13214
+ } catch (e) {
13215
+ // IE 8 has a broken gOPD
13216
+ $gOPD = null;
13217
+ }
13218
+ }
13219
+
13220
+ module.exports = $gOPD;
13221
+
13222
+ },{"get-intrinsic":26}],23:[function(require,module,exports){
13223
+
13224
+ var hasOwn = Object.prototype.hasOwnProperty;
13225
+ var toString = Object.prototype.toString;
13226
+
13227
+ module.exports = function forEach (obj, fn, ctx) {
13228
+ if (toString.call(fn) !== '[object Function]') {
13229
+ throw new TypeError('iterator must be a function');
13230
+ }
13231
+ var l = obj.length;
13232
+ if (l === +l) {
13233
+ for (var i = 0; i < l; i++) {
13234
+ fn.call(ctx, obj[i], i, obj);
13235
+ }
13236
+ } else {
13237
+ for (var k in obj) {
13238
+ if (hasOwn.call(obj, k)) {
13239
+ fn.call(ctx, obj[k], k, obj);
13240
+ }
13241
+ }
13242
+ }
13243
+ };
13244
+
13245
+
13246
+ },{}],24:[function(require,module,exports){
13247
+ 'use strict';
13248
+
13249
+ /* eslint no-invalid-this: 1 */
13250
+
13251
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
13252
+ var toStr = Object.prototype.toString;
13253
+ var max = Math.max;
13254
+ var funcType = '[object Function]';
13255
+
13256
+ var concatty = function concatty(a, b) {
13257
+ var arr = [];
13258
+
13259
+ for (var i = 0; i < a.length; i += 1) {
13260
+ arr[i] = a[i];
13261
+ }
13262
+ for (var j = 0; j < b.length; j += 1) {
13263
+ arr[j + a.length] = b[j];
13264
+ }
13265
+
13266
+ return arr;
13267
+ };
13268
+
13269
+ var slicy = function slicy(arrLike, offset) {
13270
+ var arr = [];
13271
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
13272
+ arr[j] = arrLike[i];
13273
+ }
13274
+ return arr;
13275
+ };
13276
+
13277
+ var joiny = function (arr, joiner) {
13278
+ var str = '';
13279
+ for (var i = 0; i < arr.length; i += 1) {
13280
+ str += arr[i];
13281
+ if (i + 1 < arr.length) {
13282
+ str += joiner;
13283
+ }
13284
+ }
13285
+ return str;
13286
+ };
13287
+
13288
+ module.exports = function bind(that) {
13289
+ var target = this;
13290
+ if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
13291
+ throw new TypeError(ERROR_MESSAGE + target);
13292
+ }
13293
+ var args = slicy(arguments, 1);
13294
+
13295
+ var bound;
13296
+ var binder = function () {
13297
+ if (this instanceof bound) {
13298
+ var result = target.apply(
13299
+ this,
13300
+ concatty(args, arguments)
13301
+ );
13302
+ if (Object(result) === result) {
13303
+ return result;
13304
+ }
13305
+ return this;
13306
+ }
13307
+ return target.apply(
13308
+ that,
13309
+ concatty(args, arguments)
13310
+ );
13311
+
13312
+ };
13313
+
13314
+ var boundLength = max(0, target.length - args.length);
13315
+ var boundArgs = [];
13316
+ for (var i = 0; i < boundLength; i++) {
13317
+ boundArgs[i] = '$' + i;
13318
+ }
13319
+
13320
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
13321
+
13322
+ if (target.prototype) {
13323
+ var Empty = function Empty() {};
13324
+ Empty.prototype = target.prototype;
13325
+ bound.prototype = new Empty();
13326
+ Empty.prototype = null;
13327
+ }
13328
+
13329
+ return bound;
13330
+ };
13331
+
13332
+ },{}],25:[function(require,module,exports){
13333
+ 'use strict';
13334
+
13335
+ var implementation = require('./implementation');
13336
+
13337
+ module.exports = Function.prototype.bind || implementation;
13338
+
13339
+ },{"./implementation":24}],26:[function(require,module,exports){
13340
+ 'use strict';
13341
+
13342
+ var undefined;
13343
+
13344
+ var $SyntaxError = SyntaxError;
13345
+ var $Function = Function;
13346
+ var $TypeError = TypeError;
13347
+
13348
+ // eslint-disable-next-line consistent-return
13349
+ var getEvalledConstructor = function (expressionSyntax) {
13350
+ try {
13351
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
13352
+ } catch (e) {}
13353
+ };
13354
+
13355
+ var $gOPD = Object.getOwnPropertyDescriptor;
13356
+ if ($gOPD) {
13357
+ try {
13358
+ $gOPD({}, '');
13359
+ } catch (e) {
13360
+ $gOPD = null; // this is IE 8, which has a broken gOPD
13361
+ }
13362
+ }
13363
+
13364
+ var throwTypeError = function () {
13365
+ throw new $TypeError();
13366
+ };
13367
+ var ThrowTypeError = $gOPD
13368
+ ? (function () {
13369
+ try {
13370
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
13371
+ arguments.callee; // IE 8 does not throw here
13372
+ return throwTypeError;
13373
+ } catch (calleeThrows) {
13374
+ try {
13375
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
13376
+ return $gOPD(arguments, 'callee').get;
13377
+ } catch (gOPDthrows) {
13378
+ return throwTypeError;
13379
+ }
13380
+ }
13381
+ }())
13382
+ : throwTypeError;
13383
+
13384
+ var hasSymbols = require('has-symbols')();
13385
+
13386
+ var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
13387
+
13388
+ var needsEval = {};
13389
+
13390
+ var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
13391
+
13392
+ var INTRINSICS = {
13393
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
13394
+ '%Array%': Array,
13395
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
13396
+ '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
13397
+ '%AsyncFromSyncIteratorPrototype%': undefined,
13398
+ '%AsyncFunction%': needsEval,
13399
+ '%AsyncGenerator%': needsEval,
13400
+ '%AsyncGeneratorFunction%': needsEval,
13401
+ '%AsyncIteratorPrototype%': needsEval,
13402
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
13403
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
13404
+ '%Boolean%': Boolean,
13405
+ '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
13406
+ '%Date%': Date,
13407
+ '%decodeURI%': decodeURI,
13408
+ '%decodeURIComponent%': decodeURIComponent,
13409
+ '%encodeURI%': encodeURI,
13410
+ '%encodeURIComponent%': encodeURIComponent,
13411
+ '%Error%': Error,
13412
+ '%eval%': eval, // eslint-disable-line no-eval
13413
+ '%EvalError%': EvalError,
13414
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
13415
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
13416
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
13417
+ '%Function%': $Function,
13418
+ '%GeneratorFunction%': needsEval,
13419
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
13420
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
13421
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
13422
+ '%isFinite%': isFinite,
13423
+ '%isNaN%': isNaN,
13424
+ '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
13425
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined,
13426
+ '%Map%': typeof Map === 'undefined' ? undefined : Map,
13427
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
13428
+ '%Math%': Math,
13429
+ '%Number%': Number,
13430
+ '%Object%': Object,
13431
+ '%parseFloat%': parseFloat,
13432
+ '%parseInt%': parseInt,
13433
+ '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
13434
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
13435
+ '%RangeError%': RangeError,
13436
+ '%ReferenceError%': ReferenceError,
13437
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
13438
+ '%RegExp%': RegExp,
13439
+ '%Set%': typeof Set === 'undefined' ? undefined : Set,
13440
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
13441
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
13442
+ '%String%': String,
13443
+ '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
13444
+ '%Symbol%': hasSymbols ? Symbol : undefined,
13445
+ '%SyntaxError%': $SyntaxError,
13446
+ '%ThrowTypeError%': ThrowTypeError,
13447
+ '%TypedArray%': TypedArray,
13448
+ '%TypeError%': $TypeError,
13449
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
13450
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
13451
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
13452
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
13453
+ '%URIError%': URIError,
13454
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
13455
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
13456
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
13457
+ };
13458
+
13459
+ var doEval = function doEval(name) {
13460
+ var value;
13461
+ if (name === '%AsyncFunction%') {
13462
+ value = getEvalledConstructor('async function () {}');
13463
+ } else if (name === '%GeneratorFunction%') {
13464
+ value = getEvalledConstructor('function* () {}');
13465
+ } else if (name === '%AsyncGeneratorFunction%') {
13466
+ value = getEvalledConstructor('async function* () {}');
13467
+ } else if (name === '%AsyncGenerator%') {
13468
+ var fn = doEval('%AsyncGeneratorFunction%');
13469
+ if (fn) {
13470
+ value = fn.prototype;
13471
+ }
13472
+ } else if (name === '%AsyncIteratorPrototype%') {
13473
+ var gen = doEval('%AsyncGenerator%');
13474
+ if (gen) {
13475
+ value = getProto(gen.prototype);
13476
+ }
13477
+ }
13478
+
13479
+ INTRINSICS[name] = value;
13480
+
13481
+ return value;
13482
+ };
13483
+
13484
+ var LEGACY_ALIASES = {
13485
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
13486
+ '%ArrayPrototype%': ['Array', 'prototype'],
13487
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
13488
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
13489
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
13490
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
13491
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
13492
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
13493
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
13494
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
13495
+ '%DataViewPrototype%': ['DataView', 'prototype'],
13496
+ '%DatePrototype%': ['Date', 'prototype'],
13497
+ '%ErrorPrototype%': ['Error', 'prototype'],
13498
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
13499
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
13500
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
13501
+ '%FunctionPrototype%': ['Function', 'prototype'],
13502
+ '%Generator%': ['GeneratorFunction', 'prototype'],
13503
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
13504
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
13505
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
13506
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
13507
+ '%JSONParse%': ['JSON', 'parse'],
13508
+ '%JSONStringify%': ['JSON', 'stringify'],
13509
+ '%MapPrototype%': ['Map', 'prototype'],
13510
+ '%NumberPrototype%': ['Number', 'prototype'],
13511
+ '%ObjectPrototype%': ['Object', 'prototype'],
13512
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
13513
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
13514
+ '%PromisePrototype%': ['Promise', 'prototype'],
13515
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
13516
+ '%Promise_all%': ['Promise', 'all'],
13517
+ '%Promise_reject%': ['Promise', 'reject'],
13518
+ '%Promise_resolve%': ['Promise', 'resolve'],
13519
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
13520
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
13521
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
13522
+ '%SetPrototype%': ['Set', 'prototype'],
13523
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
13524
+ '%StringPrototype%': ['String', 'prototype'],
13525
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
13526
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
13527
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
13528
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
13529
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
13530
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
13531
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
13532
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
13533
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
13534
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
13535
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
13536
+ };
13537
+
13538
+ var bind = require('function-bind');
13539
+ var hasOwn = require('has');
13540
+ var $concat = bind.call(Function.call, Array.prototype.concat);
13541
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
13542
+ var $replace = bind.call(Function.call, String.prototype.replace);
13543
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
13544
+ var $exec = bind.call(Function.call, RegExp.prototype.exec);
13545
+
13546
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
13547
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13548
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
13549
+ var stringToPath = function stringToPath(string) {
13550
+ var first = $strSlice(string, 0, 1);
13551
+ var last = $strSlice(string, -1);
13552
+ if (first === '%' && last !== '%') {
13553
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
13554
+ } else if (last === '%' && first !== '%') {
13555
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
13556
+ }
13557
+ var result = [];
13558
+ $replace(string, rePropName, function (match, number, quote, subString) {
13559
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
13560
+ });
13561
+ return result;
13562
+ };
13563
+ /* end adaptation */
13564
+
13565
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
13566
+ var intrinsicName = name;
13567
+ var alias;
13568
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
13569
+ alias = LEGACY_ALIASES[intrinsicName];
13570
+ intrinsicName = '%' + alias[0] + '%';
13571
+ }
13572
+
13573
+ if (hasOwn(INTRINSICS, intrinsicName)) {
13574
+ var value = INTRINSICS[intrinsicName];
13575
+ if (value === needsEval) {
13576
+ value = doEval(intrinsicName);
13577
+ }
13578
+ if (typeof value === 'undefined' && !allowMissing) {
13579
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
13580
+ }
13581
+
13582
+ return {
13583
+ alias: alias,
13584
+ name: intrinsicName,
13585
+ value: value
13586
+ };
13587
+ }
13588
+
13589
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
13590
+ };
13591
+
13592
+ module.exports = function GetIntrinsic(name, allowMissing) {
13593
+ if (typeof name !== 'string' || name.length === 0) {
13594
+ throw new $TypeError('intrinsic name must be a non-empty string');
13595
+ }
13596
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
13597
+ throw new $TypeError('"allowMissing" argument must be a boolean');
13598
+ }
13599
+
13600
+ if ($exec(/^%?[^%]*%?$/g, name) === null) {
13601
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
13602
+ }
13603
+ var parts = stringToPath(name);
13604
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
13605
+
13606
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
13607
+ var intrinsicRealName = intrinsic.name;
13608
+ var value = intrinsic.value;
13609
+ var skipFurtherCaching = false;
13610
+
13611
+ var alias = intrinsic.alias;
13612
+ if (alias) {
13613
+ intrinsicBaseName = alias[0];
13614
+ $spliceApply(parts, $concat([0, 1], alias));
13615
+ }
13616
+
13617
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
13618
+ var part = parts[i];
13619
+ var first = $strSlice(part, 0, 1);
13620
+ var last = $strSlice(part, -1);
13621
+ if (
13622
+ (
13623
+ (first === '"' || first === "'" || first === '`')
13624
+ || (last === '"' || last === "'" || last === '`')
13625
+ )
13626
+ && first !== last
13627
+ ) {
13628
+ throw new $SyntaxError('property names with quotes must have matching quotes');
13629
+ }
13630
+ if (part === 'constructor' || !isOwn) {
13631
+ skipFurtherCaching = true;
13632
+ }
13633
+
13634
+ intrinsicBaseName += '.' + part;
13635
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
13636
+
13637
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
13638
+ value = INTRINSICS[intrinsicRealName];
13639
+ } else if (value != null) {
13640
+ if (!(part in value)) {
13641
+ if (!allowMissing) {
13642
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
13643
+ }
13644
+ return void undefined;
13645
+ }
13646
+ if ($gOPD && (i + 1) >= parts.length) {
13647
+ var desc = $gOPD(value, part);
13648
+ isOwn = !!desc;
13649
+
13650
+ // By convention, when a data property is converted to an accessor
13651
+ // property to emulate a data property that does not suffer from
13652
+ // the override mistake, that accessor's getter is marked with
13653
+ // an `originalValue` property. Here, when we detect this, we
13654
+ // uphold the illusion by pretending to see that original data
13655
+ // property, i.e., returning the value rather than the getter
13656
+ // itself.
13657
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
13658
+ value = desc.get;
13659
+ } else {
13660
+ value = value[part];
13661
+ }
13662
+ } else {
13663
+ isOwn = hasOwn(value, part);
13664
+ value = value[part];
13665
+ }
13666
+
13667
+ if (isOwn && !skipFurtherCaching) {
13668
+ INTRINSICS[intrinsicRealName] = value;
13669
+ }
13670
+ }
13671
+ }
13672
+ return value;
13673
+ };
13674
+
13675
+ },{"function-bind":25,"has":29,"has-symbols":27}],27:[function(require,module,exports){
13676
+ 'use strict';
13677
+
13678
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
13679
+ var hasSymbolSham = require('./shams');
13680
+
13681
+ module.exports = function hasNativeSymbols() {
13682
+ if (typeof origSymbol !== 'function') { return false; }
13683
+ if (typeof Symbol !== 'function') { return false; }
13684
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
13685
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
13686
+
13687
+ return hasSymbolSham();
13688
+ };
13689
+
13690
+ },{"./shams":28}],28:[function(require,module,exports){
13691
+ 'use strict';
13692
+
13693
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
13694
+ module.exports = function hasSymbols() {
13695
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
13696
+ if (typeof Symbol.iterator === 'symbol') { return true; }
13697
+
13698
+ var obj = {};
13699
+ var sym = Symbol('test');
13700
+ var symObj = Object(sym);
13701
+ if (typeof sym === 'string') { return false; }
13702
+
13703
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
13704
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
13705
+
13706
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
13707
+ // if (sym instanceof Symbol) { return false; }
13708
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
13709
+ // if (!(symObj instanceof Symbol)) { return false; }
13710
+
13711
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
13712
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
13713
+
13714
+ var symVal = 42;
13715
+ obj[sym] = symVal;
13716
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
13717
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
13718
+
13719
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
13720
+
13721
+ var syms = Object.getOwnPropertySymbols(obj);
13722
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
13723
+
13724
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
13725
+
13726
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
13727
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
13728
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
13729
+ }
13730
+
13731
+ return true;
13732
+ };
13733
+
13734
+ },{}],29:[function(require,module,exports){
13735
+ 'use strict';
13736
+
13737
+ var bind = require('function-bind');
13738
+
13739
+ module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty);
13740
+
13741
+ },{"function-bind":25}],30:[function(require,module,exports){
13058
13742
  /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
13059
13743
  exports.read = function (buffer, offset, isLE, mLen, nBytes) {
13060
13744
  var e, m
@@ -13141,7 +13825,170 @@ exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
13141
13825
  buffer[offset + i - d] |= s * 128
13142
13826
  }
13143
13827
 
13144
- },{}],19:[function(require,module,exports){
13828
+ },{}],31:[function(require,module,exports){
13829
+ if (typeof Object.create === 'function') {
13830
+ // implementation from standard node.js 'util' module
13831
+ module.exports = function inherits(ctor, superCtor) {
13832
+ if (superCtor) {
13833
+ ctor.super_ = superCtor
13834
+ ctor.prototype = Object.create(superCtor.prototype, {
13835
+ constructor: {
13836
+ value: ctor,
13837
+ enumerable: false,
13838
+ writable: true,
13839
+ configurable: true
13840
+ }
13841
+ })
13842
+ }
13843
+ };
13844
+ } else {
13845
+ // old school shim for old browsers
13846
+ module.exports = function inherits(ctor, superCtor) {
13847
+ if (superCtor) {
13848
+ ctor.super_ = superCtor
13849
+ var TempCtor = function () {}
13850
+ TempCtor.prototype = superCtor.prototype
13851
+ ctor.prototype = new TempCtor()
13852
+ ctor.prototype.constructor = ctor
13853
+ }
13854
+ }
13855
+ }
13856
+
13857
+ },{}],32:[function(require,module,exports){
13858
+ 'use strict';
13859
+
13860
+ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
13861
+ var callBound = require('call-bind/callBound');
13862
+
13863
+ var $toString = callBound('Object.prototype.toString');
13864
+
13865
+ var isStandardArguments = function isArguments(value) {
13866
+ if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {
13867
+ return false;
13868
+ }
13869
+ return $toString(value) === '[object Arguments]';
13870
+ };
13871
+
13872
+ var isLegacyArguments = function isArguments(value) {
13873
+ if (isStandardArguments(value)) {
13874
+ return true;
13875
+ }
13876
+ return value !== null &&
13877
+ typeof value === 'object' &&
13878
+ typeof value.length === 'number' &&
13879
+ value.length >= 0 &&
13880
+ $toString(value) !== '[object Array]' &&
13881
+ $toString(value.callee) === '[object Function]';
13882
+ };
13883
+
13884
+ var supportsStandardArguments = (function () {
13885
+ return isStandardArguments(arguments);
13886
+ }());
13887
+
13888
+ isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests
13889
+
13890
+ module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
13891
+
13892
+ },{"call-bind/callBound":20}],33:[function(require,module,exports){
13893
+ 'use strict';
13894
+
13895
+ var toStr = Object.prototype.toString;
13896
+ var fnToStr = Function.prototype.toString;
13897
+ var isFnRegex = /^\s*(?:function)?\*/;
13898
+ var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
13899
+ var getProto = Object.getPrototypeOf;
13900
+ var getGeneratorFunc = function () { // eslint-disable-line consistent-return
13901
+ if (!hasToStringTag) {
13902
+ return false;
13903
+ }
13904
+ try {
13905
+ return Function('return function*() {}')();
13906
+ } catch (e) {
13907
+ }
13908
+ };
13909
+ var generatorFunc = getGeneratorFunc();
13910
+ var GeneratorFunction = getProto && generatorFunc ? getProto(generatorFunc) : false;
13911
+
13912
+ module.exports = function isGeneratorFunction(fn) {
13913
+ if (typeof fn !== 'function') {
13914
+ return false;
13915
+ }
13916
+ if (isFnRegex.test(fnToStr.call(fn))) {
13917
+ return true;
13918
+ }
13919
+ if (!hasToStringTag) {
13920
+ var str = toStr.call(fn);
13921
+ return str === '[object GeneratorFunction]';
13922
+ }
13923
+ return getProto && getProto(fn) === GeneratorFunction;
13924
+ };
13925
+
13926
+ },{}],34:[function(require,module,exports){
13927
+ (function (global){(function (){
13928
+ 'use strict';
13929
+
13930
+ var forEach = require('foreach');
13931
+ var availableTypedArrays = require('available-typed-arrays');
13932
+ var callBound = require('call-bind/callBound');
13933
+
13934
+ var $toString = callBound('Object.prototype.toString');
13935
+ var hasSymbols = require('has-symbols')();
13936
+ var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';
13937
+
13938
+ var typedArrays = availableTypedArrays();
13939
+
13940
+ var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {
13941
+ for (var i = 0; i < array.length; i += 1) {
13942
+ if (array[i] === value) {
13943
+ return i;
13944
+ }
13945
+ }
13946
+ return -1;
13947
+ };
13948
+ var $slice = callBound('String.prototype.slice');
13949
+ var toStrTags = {};
13950
+ var gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
13951
+ var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
13952
+ if (hasToStringTag && gOPD && getPrototypeOf) {
13953
+ forEach(typedArrays, function (typedArray) {
13954
+ var arr = new global[typedArray]();
13955
+ if (!(Symbol.toStringTag in arr)) {
13956
+ throw new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');
13957
+ }
13958
+ var proto = getPrototypeOf(arr);
13959
+ var descriptor = gOPD(proto, Symbol.toStringTag);
13960
+ if (!descriptor) {
13961
+ var superProto = getPrototypeOf(proto);
13962
+ descriptor = gOPD(superProto, Symbol.toStringTag);
13963
+ }
13964
+ toStrTags[typedArray] = descriptor.get;
13965
+ });
13966
+ }
13967
+
13968
+ var tryTypedArrays = function tryAllTypedArrays(value) {
13969
+ var anyTrue = false;
13970
+ forEach(toStrTags, function (getter, typedArray) {
13971
+ if (!anyTrue) {
13972
+ try {
13973
+ anyTrue = getter.call(value) === typedArray;
13974
+ } catch (e) { /**/ }
13975
+ }
13976
+ });
13977
+ return anyTrue;
13978
+ };
13979
+
13980
+ module.exports = function isTypedArray(value) {
13981
+ if (!value || typeof value !== 'object') { return false; }
13982
+ if (!hasToStringTag) {
13983
+ var tag = $slice($toString(value), 8, -1);
13984
+ return $indexOf(typedArrays, tag) > -1;
13985
+ }
13986
+ if (!gOPD) { return false; }
13987
+ return tryTypedArrays(value);
13988
+ };
13989
+
13990
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
13991
+ },{"available-typed-arrays":17,"call-bind/callBound":20,"es-abstract/helpers/getOwnPropertyDescriptor":22,"foreach":23,"has-symbols":27}],35:[function(require,module,exports){
13145
13992
  // Top level file is just a mixin of submodules & constants
13146
13993
  'use strict';
13147
13994
 
@@ -13161,7 +14008,7 @@ module.exports.inflateRaw = inflateRaw;
13161
14008
  module.exports.ungzip = ungzip;
13162
14009
  module.exports.constants = constants;
13163
14010
 
13164
- },{"./lib/deflate":20,"./lib/inflate":21,"./lib/zlib/constants":25}],20:[function(require,module,exports){
14011
+ },{"./lib/deflate":36,"./lib/inflate":37,"./lib/zlib/constants":41}],36:[function(require,module,exports){
13165
14012
  'use strict';
13166
14013
 
13167
14014
 
@@ -13543,7 +14390,7 @@ module.exports.deflateRaw = deflateRaw;
13543
14390
  module.exports.gzip = gzip;
13544
14391
  module.exports.constants = require('./zlib/constants');
13545
14392
 
13546
- },{"./utils/common":22,"./utils/strings":23,"./zlib/constants":25,"./zlib/deflate":27,"./zlib/messages":32,"./zlib/zstream":34}],21:[function(require,module,exports){
14393
+ },{"./utils/common":38,"./utils/strings":39,"./zlib/constants":41,"./zlib/deflate":43,"./zlib/messages":48,"./zlib/zstream":50}],37:[function(require,module,exports){
13547
14394
  'use strict';
13548
14395
 
13549
14396
 
@@ -13964,7 +14811,7 @@ module.exports.inflateRaw = inflateRaw;
13964
14811
  module.exports.ungzip = inflate;
13965
14812
  module.exports.constants = require('./zlib/constants');
13966
14813
 
13967
- },{"./utils/common":22,"./utils/strings":23,"./zlib/constants":25,"./zlib/gzheader":28,"./zlib/inflate":30,"./zlib/messages":32,"./zlib/zstream":34}],22:[function(require,module,exports){
14814
+ },{"./utils/common":38,"./utils/strings":39,"./zlib/constants":41,"./zlib/gzheader":44,"./zlib/inflate":46,"./zlib/messages":48,"./zlib/zstream":50}],38:[function(require,module,exports){
13968
14815
  'use strict';
13969
14816
 
13970
14817
 
@@ -14014,7 +14861,7 @@ module.exports.flattenChunks = (chunks) => {
14014
14861
  return result;
14015
14862
  };
14016
14863
 
14017
- },{}],23:[function(require,module,exports){
14864
+ },{}],39:[function(require,module,exports){
14018
14865
  // String encode/decode helpers
14019
14866
  'use strict';
14020
14867
 
@@ -14190,7 +15037,7 @@ module.exports.utf8border = (buf, max) => {
14190
15037
  return (pos + _utf8len[buf[pos]] > max) ? pos : max;
14191
15038
  };
14192
15039
 
14193
- },{}],24:[function(require,module,exports){
15040
+ },{}],40:[function(require,module,exports){
14194
15041
  'use strict';
14195
15042
 
14196
15043
  // Note: adler32 takes 12% for level 0 and 2% for level 6.
@@ -14243,7 +15090,7 @@ const adler32 = (adler, buf, len, pos) => {
14243
15090
 
14244
15091
  module.exports = adler32;
14245
15092
 
14246
- },{}],25:[function(require,module,exports){
15093
+ },{}],41:[function(require,module,exports){
14247
15094
  'use strict';
14248
15095
 
14249
15096
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -14313,7 +15160,7 @@ module.exports = {
14313
15160
  //Z_NULL: null // Use -1 or null inline, depending on var type
14314
15161
  };
14315
15162
 
14316
- },{}],26:[function(require,module,exports){
15163
+ },{}],42:[function(require,module,exports){
14317
15164
  'use strict';
14318
15165
 
14319
15166
  // Note: we can't get significant speed boost here.
@@ -14374,7 +15221,7 @@ const crc32 = (crc, buf, len, pos) => {
14374
15221
 
14375
15222
  module.exports = crc32;
14376
15223
 
14377
- },{}],27:[function(require,module,exports){
15224
+ },{}],43:[function(require,module,exports){
14378
15225
  'use strict';
14379
15226
 
14380
15227
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -16424,7 +17271,7 @@ module.exports.deflatePrime = deflatePrime;
16424
17271
  module.exports.deflateTune = deflateTune;
16425
17272
  */
16426
17273
 
16427
- },{"./adler32":24,"./constants":25,"./crc32":26,"./messages":32,"./trees":33}],28:[function(require,module,exports){
17274
+ },{"./adler32":40,"./constants":41,"./crc32":42,"./messages":48,"./trees":49}],44:[function(require,module,exports){
16428
17275
  'use strict';
16429
17276
 
16430
17277
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -16484,7 +17331,7 @@ function GZheader() {
16484
17331
 
16485
17332
  module.exports = GZheader;
16486
17333
 
16487
- },{}],29:[function(require,module,exports){
17334
+ },{}],45:[function(require,module,exports){
16488
17335
  'use strict';
16489
17336
 
16490
17337
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -16830,7 +17677,7 @@ module.exports = function inflate_fast(strm, start) {
16830
17677
  return;
16831
17678
  };
16832
17679
 
16833
- },{}],30:[function(require,module,exports){
17680
+ },{}],46:[function(require,module,exports){
16834
17681
  'use strict';
16835
17682
 
16836
17683
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -18404,7 +19251,7 @@ module.exports.inflateUndermine = inflateUndermine;
18404
19251
  module.exports.inflateValidate = inflateValidate;
18405
19252
  */
18406
19253
 
18407
- },{"./adler32":24,"./constants":25,"./crc32":26,"./inffast":29,"./inftrees":31}],31:[function(require,module,exports){
19254
+ },{"./adler32":40,"./constants":41,"./crc32":42,"./inffast":45,"./inftrees":47}],47:[function(require,module,exports){
18408
19255
  'use strict';
18409
19256
 
18410
19257
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -18746,7 +19593,7 @@ const inflate_table = (type, lens, lens_index, codes, table, table_index, work,
18746
19593
 
18747
19594
  module.exports = inflate_table;
18748
19595
 
18749
- },{}],32:[function(require,module,exports){
19596
+ },{}],48:[function(require,module,exports){
18750
19597
  'use strict';
18751
19598
 
18752
19599
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -18780,7 +19627,7 @@ module.exports = {
18780
19627
  '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
18781
19628
  };
18782
19629
 
18783
- },{}],33:[function(require,module,exports){
19630
+ },{}],49:[function(require,module,exports){
18784
19631
  'use strict';
18785
19632
 
18786
19633
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -19961,7 +20808,7 @@ module.exports._tr_flush_block = _tr_flush_block;
19961
20808
  module.exports._tr_tally = _tr_tally;
19962
20809
  module.exports._tr_align = _tr_align;
19963
20810
 
19964
- },{}],34:[function(require,module,exports){
20811
+ },{}],50:[function(require,module,exports){
19965
20812
  'use strict';
19966
20813
 
19967
20814
  // (C) 1995-2013 Jean-loup Gailly and Mark Adler
@@ -20010,5 +20857,1311 @@ function ZStream() {
20010
20857
 
20011
20858
  module.exports = ZStream;
20012
20859
 
20013
- },{}]},{},[10])(10)
20860
+ },{}],51:[function(require,module,exports){
20861
+ // shim for using process in browser
20862
+ var process = module.exports = {};
20863
+
20864
+ // cached from whatever global is present so that test runners that stub it
20865
+ // don't break things. But we need to wrap it in a try catch in case it is
20866
+ // wrapped in strict mode code which doesn't define any globals. It's inside a
20867
+ // function because try/catches deoptimize in certain engines.
20868
+
20869
+ var cachedSetTimeout;
20870
+ var cachedClearTimeout;
20871
+
20872
+ function defaultSetTimout() {
20873
+ throw new Error('setTimeout has not been defined');
20874
+ }
20875
+ function defaultClearTimeout () {
20876
+ throw new Error('clearTimeout has not been defined');
20877
+ }
20878
+ (function () {
20879
+ try {
20880
+ if (typeof setTimeout === 'function') {
20881
+ cachedSetTimeout = setTimeout;
20882
+ } else {
20883
+ cachedSetTimeout = defaultSetTimout;
20884
+ }
20885
+ } catch (e) {
20886
+ cachedSetTimeout = defaultSetTimout;
20887
+ }
20888
+ try {
20889
+ if (typeof clearTimeout === 'function') {
20890
+ cachedClearTimeout = clearTimeout;
20891
+ } else {
20892
+ cachedClearTimeout = defaultClearTimeout;
20893
+ }
20894
+ } catch (e) {
20895
+ cachedClearTimeout = defaultClearTimeout;
20896
+ }
20897
+ } ())
20898
+ function runTimeout(fun) {
20899
+ if (cachedSetTimeout === setTimeout) {
20900
+ //normal enviroments in sane situations
20901
+ return setTimeout(fun, 0);
20902
+ }
20903
+ // if setTimeout wasn't available but was latter defined
20904
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
20905
+ cachedSetTimeout = setTimeout;
20906
+ return setTimeout(fun, 0);
20907
+ }
20908
+ try {
20909
+ // when when somebody has screwed with setTimeout but no I.E. maddness
20910
+ return cachedSetTimeout(fun, 0);
20911
+ } catch(e){
20912
+ try {
20913
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
20914
+ return cachedSetTimeout.call(null, fun, 0);
20915
+ } catch(e){
20916
+ // 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
20917
+ return cachedSetTimeout.call(this, fun, 0);
20918
+ }
20919
+ }
20920
+
20921
+
20922
+ }
20923
+ function runClearTimeout(marker) {
20924
+ if (cachedClearTimeout === clearTimeout) {
20925
+ //normal enviroments in sane situations
20926
+ return clearTimeout(marker);
20927
+ }
20928
+ // if clearTimeout wasn't available but was latter defined
20929
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
20930
+ cachedClearTimeout = clearTimeout;
20931
+ return clearTimeout(marker);
20932
+ }
20933
+ try {
20934
+ // when when somebody has screwed with setTimeout but no I.E. maddness
20935
+ return cachedClearTimeout(marker);
20936
+ } catch (e){
20937
+ try {
20938
+ // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
20939
+ return cachedClearTimeout.call(null, marker);
20940
+ } catch (e){
20941
+ // 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.
20942
+ // Some versions of I.E. have different rules for clearTimeout vs setTimeout
20943
+ return cachedClearTimeout.call(this, marker);
20944
+ }
20945
+ }
20946
+
20947
+
20948
+
20949
+ }
20950
+ var queue = [];
20951
+ var draining = false;
20952
+ var currentQueue;
20953
+ var queueIndex = -1;
20954
+
20955
+ function cleanUpNextTick() {
20956
+ if (!draining || !currentQueue) {
20957
+ return;
20958
+ }
20959
+ draining = false;
20960
+ if (currentQueue.length) {
20961
+ queue = currentQueue.concat(queue);
20962
+ } else {
20963
+ queueIndex = -1;
20964
+ }
20965
+ if (queue.length) {
20966
+ drainQueue();
20967
+ }
20968
+ }
20969
+
20970
+ function drainQueue() {
20971
+ if (draining) {
20972
+ return;
20973
+ }
20974
+ var timeout = runTimeout(cleanUpNextTick);
20975
+ draining = true;
20976
+
20977
+ var len = queue.length;
20978
+ while(len) {
20979
+ currentQueue = queue;
20980
+ queue = [];
20981
+ while (++queueIndex < len) {
20982
+ if (currentQueue) {
20983
+ currentQueue[queueIndex].run();
20984
+ }
20985
+ }
20986
+ queueIndex = -1;
20987
+ len = queue.length;
20988
+ }
20989
+ currentQueue = null;
20990
+ draining = false;
20991
+ runClearTimeout(timeout);
20992
+ }
20993
+
20994
+ process.nextTick = function (fun) {
20995
+ var args = new Array(arguments.length - 1);
20996
+ if (arguments.length > 1) {
20997
+ for (var i = 1; i < arguments.length; i++) {
20998
+ args[i - 1] = arguments[i];
20999
+ }
21000
+ }
21001
+ queue.push(new Item(fun, args));
21002
+ if (queue.length === 1 && !draining) {
21003
+ runTimeout(drainQueue);
21004
+ }
21005
+ };
21006
+
21007
+ // v8 likes predictible objects
21008
+ function Item(fun, array) {
21009
+ this.fun = fun;
21010
+ this.array = array;
21011
+ }
21012
+ Item.prototype.run = function () {
21013
+ this.fun.apply(null, this.array);
21014
+ };
21015
+ process.title = 'browser';
21016
+ process.browser = true;
21017
+ process.env = {};
21018
+ process.argv = [];
21019
+ process.version = ''; // empty string to avoid regexp issues
21020
+ process.versions = {};
21021
+
21022
+ function noop() {}
21023
+
21024
+ process.on = noop;
21025
+ process.addListener = noop;
21026
+ process.once = noop;
21027
+ process.off = noop;
21028
+ process.removeListener = noop;
21029
+ process.removeAllListeners = noop;
21030
+ process.emit = noop;
21031
+ process.prependListener = noop;
21032
+ process.prependOnceListener = noop;
21033
+
21034
+ process.listeners = function (name) { return [] }
21035
+
21036
+ process.binding = function (name) {
21037
+ throw new Error('process.binding is not supported');
21038
+ };
21039
+
21040
+ process.cwd = function () { return '/' };
21041
+ process.chdir = function (dir) {
21042
+ throw new Error('process.chdir is not supported');
21043
+ };
21044
+ process.umask = function() { return 0; };
21045
+
21046
+ },{}],52:[function(require,module,exports){
21047
+ module.exports = function isBuffer(arg) {
21048
+ return arg && typeof arg === 'object'
21049
+ && typeof arg.copy === 'function'
21050
+ && typeof arg.fill === 'function'
21051
+ && typeof arg.readUInt8 === 'function';
21052
+ }
21053
+ },{}],53:[function(require,module,exports){
21054
+ // Currently in sync with Node.js lib/internal/util/types.js
21055
+ // https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9
21056
+
21057
+ 'use strict';
21058
+
21059
+ var isArgumentsObject = require('is-arguments');
21060
+ var isGeneratorFunction = require('is-generator-function');
21061
+ var whichTypedArray = require('which-typed-array');
21062
+ var isTypedArray = require('is-typed-array');
21063
+
21064
+ function uncurryThis(f) {
21065
+ return f.call.bind(f);
21066
+ }
21067
+
21068
+ var BigIntSupported = typeof BigInt !== 'undefined';
21069
+ var SymbolSupported = typeof Symbol !== 'undefined';
21070
+
21071
+ var ObjectToString = uncurryThis(Object.prototype.toString);
21072
+
21073
+ var numberValue = uncurryThis(Number.prototype.valueOf);
21074
+ var stringValue = uncurryThis(String.prototype.valueOf);
21075
+ var booleanValue = uncurryThis(Boolean.prototype.valueOf);
21076
+
21077
+ if (BigIntSupported) {
21078
+ var bigIntValue = uncurryThis(BigInt.prototype.valueOf);
21079
+ }
21080
+
21081
+ if (SymbolSupported) {
21082
+ var symbolValue = uncurryThis(Symbol.prototype.valueOf);
21083
+ }
21084
+
21085
+ function checkBoxedPrimitive(value, prototypeValueOf) {
21086
+ if (typeof value !== 'object') {
21087
+ return false;
21088
+ }
21089
+ try {
21090
+ prototypeValueOf(value);
21091
+ return true;
21092
+ } catch(e) {
21093
+ return false;
21094
+ }
21095
+ }
21096
+
21097
+ exports.isArgumentsObject = isArgumentsObject;
21098
+ exports.isGeneratorFunction = isGeneratorFunction;
21099
+ exports.isTypedArray = isTypedArray;
21100
+
21101
+ // Taken from here and modified for better browser support
21102
+ // https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js
21103
+ function isPromise(input) {
21104
+ return (
21105
+ (
21106
+ typeof Promise !== 'undefined' &&
21107
+ input instanceof Promise
21108
+ ) ||
21109
+ (
21110
+ input !== null &&
21111
+ typeof input === 'object' &&
21112
+ typeof input.then === 'function' &&
21113
+ typeof input.catch === 'function'
21114
+ )
21115
+ );
21116
+ }
21117
+ exports.isPromise = isPromise;
21118
+
21119
+ function isArrayBufferView(value) {
21120
+ if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
21121
+ return ArrayBuffer.isView(value);
21122
+ }
21123
+
21124
+ return (
21125
+ isTypedArray(value) ||
21126
+ isDataView(value)
21127
+ );
21128
+ }
21129
+ exports.isArrayBufferView = isArrayBufferView;
21130
+
21131
+
21132
+ function isUint8Array(value) {
21133
+ return whichTypedArray(value) === 'Uint8Array';
21134
+ }
21135
+ exports.isUint8Array = isUint8Array;
21136
+
21137
+ function isUint8ClampedArray(value) {
21138
+ return whichTypedArray(value) === 'Uint8ClampedArray';
21139
+ }
21140
+ exports.isUint8ClampedArray = isUint8ClampedArray;
21141
+
21142
+ function isUint16Array(value) {
21143
+ return whichTypedArray(value) === 'Uint16Array';
21144
+ }
21145
+ exports.isUint16Array = isUint16Array;
21146
+
21147
+ function isUint32Array(value) {
21148
+ return whichTypedArray(value) === 'Uint32Array';
21149
+ }
21150
+ exports.isUint32Array = isUint32Array;
21151
+
21152
+ function isInt8Array(value) {
21153
+ return whichTypedArray(value) === 'Int8Array';
21154
+ }
21155
+ exports.isInt8Array = isInt8Array;
21156
+
21157
+ function isInt16Array(value) {
21158
+ return whichTypedArray(value) === 'Int16Array';
21159
+ }
21160
+ exports.isInt16Array = isInt16Array;
21161
+
21162
+ function isInt32Array(value) {
21163
+ return whichTypedArray(value) === 'Int32Array';
21164
+ }
21165
+ exports.isInt32Array = isInt32Array;
21166
+
21167
+ function isFloat32Array(value) {
21168
+ return whichTypedArray(value) === 'Float32Array';
21169
+ }
21170
+ exports.isFloat32Array = isFloat32Array;
21171
+
21172
+ function isFloat64Array(value) {
21173
+ return whichTypedArray(value) === 'Float64Array';
21174
+ }
21175
+ exports.isFloat64Array = isFloat64Array;
21176
+
21177
+ function isBigInt64Array(value) {
21178
+ return whichTypedArray(value) === 'BigInt64Array';
21179
+ }
21180
+ exports.isBigInt64Array = isBigInt64Array;
21181
+
21182
+ function isBigUint64Array(value) {
21183
+ return whichTypedArray(value) === 'BigUint64Array';
21184
+ }
21185
+ exports.isBigUint64Array = isBigUint64Array;
21186
+
21187
+ function isMapToString(value) {
21188
+ return ObjectToString(value) === '[object Map]';
21189
+ }
21190
+ isMapToString.working = (
21191
+ typeof Map !== 'undefined' &&
21192
+ isMapToString(new Map())
21193
+ );
21194
+
21195
+ function isMap(value) {
21196
+ if (typeof Map === 'undefined') {
21197
+ return false;
21198
+ }
21199
+
21200
+ return isMapToString.working
21201
+ ? isMapToString(value)
21202
+ : value instanceof Map;
21203
+ }
21204
+ exports.isMap = isMap;
21205
+
21206
+ function isSetToString(value) {
21207
+ return ObjectToString(value) === '[object Set]';
21208
+ }
21209
+ isSetToString.working = (
21210
+ typeof Set !== 'undefined' &&
21211
+ isSetToString(new Set())
21212
+ );
21213
+ function isSet(value) {
21214
+ if (typeof Set === 'undefined') {
21215
+ return false;
21216
+ }
21217
+
21218
+ return isSetToString.working
21219
+ ? isSetToString(value)
21220
+ : value instanceof Set;
21221
+ }
21222
+ exports.isSet = isSet;
21223
+
21224
+ function isWeakMapToString(value) {
21225
+ return ObjectToString(value) === '[object WeakMap]';
21226
+ }
21227
+ isWeakMapToString.working = (
21228
+ typeof WeakMap !== 'undefined' &&
21229
+ isWeakMapToString(new WeakMap())
21230
+ );
21231
+ function isWeakMap(value) {
21232
+ if (typeof WeakMap === 'undefined') {
21233
+ return false;
21234
+ }
21235
+
21236
+ return isWeakMapToString.working
21237
+ ? isWeakMapToString(value)
21238
+ : value instanceof WeakMap;
21239
+ }
21240
+ exports.isWeakMap = isWeakMap;
21241
+
21242
+ function isWeakSetToString(value) {
21243
+ return ObjectToString(value) === '[object WeakSet]';
21244
+ }
21245
+ isWeakSetToString.working = (
21246
+ typeof WeakSet !== 'undefined' &&
21247
+ isWeakSetToString(new WeakSet())
21248
+ );
21249
+ function isWeakSet(value) {
21250
+ return isWeakSetToString(value);
21251
+ }
21252
+ exports.isWeakSet = isWeakSet;
21253
+
21254
+ function isArrayBufferToString(value) {
21255
+ return ObjectToString(value) === '[object ArrayBuffer]';
21256
+ }
21257
+ isArrayBufferToString.working = (
21258
+ typeof ArrayBuffer !== 'undefined' &&
21259
+ isArrayBufferToString(new ArrayBuffer())
21260
+ );
21261
+ function isArrayBuffer(value) {
21262
+ if (typeof ArrayBuffer === 'undefined') {
21263
+ return false;
21264
+ }
21265
+
21266
+ return isArrayBufferToString.working
21267
+ ? isArrayBufferToString(value)
21268
+ : value instanceof ArrayBuffer;
21269
+ }
21270
+ exports.isArrayBuffer = isArrayBuffer;
21271
+
21272
+ function isDataViewToString(value) {
21273
+ return ObjectToString(value) === '[object DataView]';
21274
+ }
21275
+ isDataViewToString.working = (
21276
+ typeof ArrayBuffer !== 'undefined' &&
21277
+ typeof DataView !== 'undefined' &&
21278
+ isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))
21279
+ );
21280
+ function isDataView(value) {
21281
+ if (typeof DataView === 'undefined') {
21282
+ return false;
21283
+ }
21284
+
21285
+ return isDataViewToString.working
21286
+ ? isDataViewToString(value)
21287
+ : value instanceof DataView;
21288
+ }
21289
+ exports.isDataView = isDataView;
21290
+
21291
+ function isSharedArrayBufferToString(value) {
21292
+ return ObjectToString(value) === '[object SharedArrayBuffer]';
21293
+ }
21294
+ isSharedArrayBufferToString.working = (
21295
+ typeof SharedArrayBuffer !== 'undefined' &&
21296
+ isSharedArrayBufferToString(new SharedArrayBuffer())
21297
+ );
21298
+ function isSharedArrayBuffer(value) {
21299
+ if (typeof SharedArrayBuffer === 'undefined') {
21300
+ return false;
21301
+ }
21302
+
21303
+ return isSharedArrayBufferToString.working
21304
+ ? isSharedArrayBufferToString(value)
21305
+ : value instanceof SharedArrayBuffer;
21306
+ }
21307
+ exports.isSharedArrayBuffer = isSharedArrayBuffer;
21308
+
21309
+ function isAsyncFunction(value) {
21310
+ return ObjectToString(value) === '[object AsyncFunction]';
21311
+ }
21312
+ exports.isAsyncFunction = isAsyncFunction;
21313
+
21314
+ function isMapIterator(value) {
21315
+ return ObjectToString(value) === '[object Map Iterator]';
21316
+ }
21317
+ exports.isMapIterator = isMapIterator;
21318
+
21319
+ function isSetIterator(value) {
21320
+ return ObjectToString(value) === '[object Set Iterator]';
21321
+ }
21322
+ exports.isSetIterator = isSetIterator;
21323
+
21324
+ function isGeneratorObject(value) {
21325
+ return ObjectToString(value) === '[object Generator]';
21326
+ }
21327
+ exports.isGeneratorObject = isGeneratorObject;
21328
+
21329
+ function isWebAssemblyCompiledModule(value) {
21330
+ return ObjectToString(value) === '[object WebAssembly.Module]';
21331
+ }
21332
+ exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
21333
+
21334
+ function isNumberObject(value) {
21335
+ return checkBoxedPrimitive(value, numberValue);
21336
+ }
21337
+ exports.isNumberObject = isNumberObject;
21338
+
21339
+ function isStringObject(value) {
21340
+ return checkBoxedPrimitive(value, stringValue);
21341
+ }
21342
+ exports.isStringObject = isStringObject;
21343
+
21344
+ function isBooleanObject(value) {
21345
+ return checkBoxedPrimitive(value, booleanValue);
21346
+ }
21347
+ exports.isBooleanObject = isBooleanObject;
21348
+
21349
+ function isBigIntObject(value) {
21350
+ return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
21351
+ }
21352
+ exports.isBigIntObject = isBigIntObject;
21353
+
21354
+ function isSymbolObject(value) {
21355
+ return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
21356
+ }
21357
+ exports.isSymbolObject = isSymbolObject;
21358
+
21359
+ function isBoxedPrimitive(value) {
21360
+ return (
21361
+ isNumberObject(value) ||
21362
+ isStringObject(value) ||
21363
+ isBooleanObject(value) ||
21364
+ isBigIntObject(value) ||
21365
+ isSymbolObject(value)
21366
+ );
21367
+ }
21368
+ exports.isBoxedPrimitive = isBoxedPrimitive;
21369
+
21370
+ function isAnyArrayBuffer(value) {
21371
+ return typeof Uint8Array !== 'undefined' && (
21372
+ isArrayBuffer(value) ||
21373
+ isSharedArrayBuffer(value)
21374
+ );
21375
+ }
21376
+ exports.isAnyArrayBuffer = isAnyArrayBuffer;
21377
+
21378
+ ['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {
21379
+ Object.defineProperty(exports, method, {
21380
+ enumerable: false,
21381
+ value: function() {
21382
+ throw new Error(method + ' is not supported in userland');
21383
+ }
21384
+ });
21385
+ });
21386
+
21387
+ },{"is-arguments":32,"is-generator-function":33,"is-typed-array":34,"which-typed-array":55}],54:[function(require,module,exports){
21388
+ (function (process){(function (){
21389
+ // Copyright Joyent, Inc. and other Node contributors.
21390
+ //
21391
+ // Permission is hereby granted, free of charge, to any person obtaining a
21392
+ // copy of this software and associated documentation files (the
21393
+ // "Software"), to deal in the Software without restriction, including
21394
+ // without limitation the rights to use, copy, modify, merge, publish,
21395
+ // distribute, sublicense, and/or sell copies of the Software, and to permit
21396
+ // persons to whom the Software is furnished to do so, subject to the
21397
+ // following conditions:
21398
+ //
21399
+ // The above copyright notice and this permission notice shall be included
21400
+ // in all copies or substantial portions of the Software.
21401
+ //
21402
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21403
+ // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21404
+ // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
21405
+ // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21406
+ // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
21407
+ // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
21408
+ // USE OR OTHER DEALINGS IN THE SOFTWARE.
21409
+
21410
+ var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
21411
+ function getOwnPropertyDescriptors(obj) {
21412
+ var keys = Object.keys(obj);
21413
+ var descriptors = {};
21414
+ for (var i = 0; i < keys.length; i++) {
21415
+ descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
21416
+ }
21417
+ return descriptors;
21418
+ };
21419
+
21420
+ var formatRegExp = /%[sdj%]/g;
21421
+ exports.format = function(f) {
21422
+ if (!isString(f)) {
21423
+ var objects = [];
21424
+ for (var i = 0; i < arguments.length; i++) {
21425
+ objects.push(inspect(arguments[i]));
21426
+ }
21427
+ return objects.join(' ');
21428
+ }
21429
+
21430
+ var i = 1;
21431
+ var args = arguments;
21432
+ var len = args.length;
21433
+ var str = String(f).replace(formatRegExp, function(x) {
21434
+ if (x === '%%') return '%';
21435
+ if (i >= len) return x;
21436
+ switch (x) {
21437
+ case '%s': return String(args[i++]);
21438
+ case '%d': return Number(args[i++]);
21439
+ case '%j':
21440
+ try {
21441
+ return JSON.stringify(args[i++]);
21442
+ } catch (_) {
21443
+ return '[Circular]';
21444
+ }
21445
+ default:
21446
+ return x;
21447
+ }
21448
+ });
21449
+ for (var x = args[i]; i < len; x = args[++i]) {
21450
+ if (isNull(x) || !isObject(x)) {
21451
+ str += ' ' + x;
21452
+ } else {
21453
+ str += ' ' + inspect(x);
21454
+ }
21455
+ }
21456
+ return str;
21457
+ };
21458
+
21459
+
21460
+ // Mark that a method should not be used.
21461
+ // Returns a modified function which warns once by default.
21462
+ // If --no-deprecation is set, then it is a no-op.
21463
+ exports.deprecate = function(fn, msg) {
21464
+ if (typeof process !== 'undefined' && process.noDeprecation === true) {
21465
+ return fn;
21466
+ }
21467
+
21468
+ // Allow for deprecating things in the process of starting up.
21469
+ if (typeof process === 'undefined') {
21470
+ return function() {
21471
+ return exports.deprecate(fn, msg).apply(this, arguments);
21472
+ };
21473
+ }
21474
+
21475
+ var warned = false;
21476
+ function deprecated() {
21477
+ if (!warned) {
21478
+ if (process.throwDeprecation) {
21479
+ throw new Error(msg);
21480
+ } else if (process.traceDeprecation) {
21481
+ console.trace(msg);
21482
+ } else {
21483
+ console.error(msg);
21484
+ }
21485
+ warned = true;
21486
+ }
21487
+ return fn.apply(this, arguments);
21488
+ }
21489
+
21490
+ return deprecated;
21491
+ };
21492
+
21493
+
21494
+ var debugs = {};
21495
+ var debugEnvRegex = /^$/;
21496
+
21497
+ if (process.env.NODE_DEBUG) {
21498
+ var debugEnv = process.env.NODE_DEBUG;
21499
+ debugEnv = debugEnv.replace(/[|\\{}()[\]^$+?.]/g, '\\$&')
21500
+ .replace(/\*/g, '.*')
21501
+ .replace(/,/g, '$|^')
21502
+ .toUpperCase();
21503
+ debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');
21504
+ }
21505
+ exports.debuglog = function(set) {
21506
+ set = set.toUpperCase();
21507
+ if (!debugs[set]) {
21508
+ if (debugEnvRegex.test(set)) {
21509
+ var pid = process.pid;
21510
+ debugs[set] = function() {
21511
+ var msg = exports.format.apply(exports, arguments);
21512
+ console.error('%s %d: %s', set, pid, msg);
21513
+ };
21514
+ } else {
21515
+ debugs[set] = function() {};
21516
+ }
21517
+ }
21518
+ return debugs[set];
21519
+ };
21520
+
21521
+
21522
+ /**
21523
+ * Echos the value of a value. Trys to print the value out
21524
+ * in the best way possible given the different types.
21525
+ *
21526
+ * @param {Object} obj The object to print out.
21527
+ * @param {Object} opts Optional options object that alters the output.
21528
+ */
21529
+ /* legacy: obj, showHidden, depth, colors*/
21530
+ function inspect(obj, opts) {
21531
+ // default options
21532
+ var ctx = {
21533
+ seen: [],
21534
+ stylize: stylizeNoColor
21535
+ };
21536
+ // legacy...
21537
+ if (arguments.length >= 3) ctx.depth = arguments[2];
21538
+ if (arguments.length >= 4) ctx.colors = arguments[3];
21539
+ if (isBoolean(opts)) {
21540
+ // legacy...
21541
+ ctx.showHidden = opts;
21542
+ } else if (opts) {
21543
+ // got an "options" object
21544
+ exports._extend(ctx, opts);
21545
+ }
21546
+ // set default options
21547
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
21548
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
21549
+ if (isUndefined(ctx.colors)) ctx.colors = false;
21550
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
21551
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
21552
+ return formatValue(ctx, obj, ctx.depth);
21553
+ }
21554
+ exports.inspect = inspect;
21555
+
21556
+
21557
+ // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
21558
+ inspect.colors = {
21559
+ 'bold' : [1, 22],
21560
+ 'italic' : [3, 23],
21561
+ 'underline' : [4, 24],
21562
+ 'inverse' : [7, 27],
21563
+ 'white' : [37, 39],
21564
+ 'grey' : [90, 39],
21565
+ 'black' : [30, 39],
21566
+ 'blue' : [34, 39],
21567
+ 'cyan' : [36, 39],
21568
+ 'green' : [32, 39],
21569
+ 'magenta' : [35, 39],
21570
+ 'red' : [31, 39],
21571
+ 'yellow' : [33, 39]
21572
+ };
21573
+
21574
+ // Don't use 'blue' not visible on cmd.exe
21575
+ inspect.styles = {
21576
+ 'special': 'cyan',
21577
+ 'number': 'yellow',
21578
+ 'boolean': 'yellow',
21579
+ 'undefined': 'grey',
21580
+ 'null': 'bold',
21581
+ 'string': 'green',
21582
+ 'date': 'magenta',
21583
+ // "name": intentionally not styling
21584
+ 'regexp': 'red'
21585
+ };
21586
+
21587
+
21588
+ function stylizeWithColor(str, styleType) {
21589
+ var style = inspect.styles[styleType];
21590
+
21591
+ if (style) {
21592
+ return '\u001b[' + inspect.colors[style][0] + 'm' + str +
21593
+ '\u001b[' + inspect.colors[style][1] + 'm';
21594
+ } else {
21595
+ return str;
21596
+ }
21597
+ }
21598
+
21599
+
21600
+ function stylizeNoColor(str, styleType) {
21601
+ return str;
21602
+ }
21603
+
21604
+
21605
+ function arrayToHash(array) {
21606
+ var hash = {};
21607
+
21608
+ array.forEach(function(val, idx) {
21609
+ hash[val] = true;
21610
+ });
21611
+
21612
+ return hash;
21613
+ }
21614
+
21615
+
21616
+ function formatValue(ctx, value, recurseTimes) {
21617
+ // Provide a hook for user-specified inspect functions.
21618
+ // Check that value is an object with an inspect function on it
21619
+ if (ctx.customInspect &&
21620
+ value &&
21621
+ isFunction(value.inspect) &&
21622
+ // Filter out the util module, it's inspect function is special
21623
+ value.inspect !== exports.inspect &&
21624
+ // Also filter out any prototype objects using the circular check.
21625
+ !(value.constructor && value.constructor.prototype === value)) {
21626
+ var ret = value.inspect(recurseTimes, ctx);
21627
+ if (!isString(ret)) {
21628
+ ret = formatValue(ctx, ret, recurseTimes);
21629
+ }
21630
+ return ret;
21631
+ }
21632
+
21633
+ // Primitive types cannot have properties
21634
+ var primitive = formatPrimitive(ctx, value);
21635
+ if (primitive) {
21636
+ return primitive;
21637
+ }
21638
+
21639
+ // Look up the keys of the object.
21640
+ var keys = Object.keys(value);
21641
+ var visibleKeys = arrayToHash(keys);
21642
+
21643
+ if (ctx.showHidden) {
21644
+ keys = Object.getOwnPropertyNames(value);
21645
+ }
21646
+
21647
+ // IE doesn't make error fields non-enumerable
21648
+ // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
21649
+ if (isError(value)
21650
+ && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
21651
+ return formatError(value);
21652
+ }
21653
+
21654
+ // Some type of object without properties can be shortcutted.
21655
+ if (keys.length === 0) {
21656
+ if (isFunction(value)) {
21657
+ var name = value.name ? ': ' + value.name : '';
21658
+ return ctx.stylize('[Function' + name + ']', 'special');
21659
+ }
21660
+ if (isRegExp(value)) {
21661
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
21662
+ }
21663
+ if (isDate(value)) {
21664
+ return ctx.stylize(Date.prototype.toString.call(value), 'date');
21665
+ }
21666
+ if (isError(value)) {
21667
+ return formatError(value);
21668
+ }
21669
+ }
21670
+
21671
+ var base = '', array = false, braces = ['{', '}'];
21672
+
21673
+ // Make Array say that they are Array
21674
+ if (isArray(value)) {
21675
+ array = true;
21676
+ braces = ['[', ']'];
21677
+ }
21678
+
21679
+ // Make functions say that they are functions
21680
+ if (isFunction(value)) {
21681
+ var n = value.name ? ': ' + value.name : '';
21682
+ base = ' [Function' + n + ']';
21683
+ }
21684
+
21685
+ // Make RegExps say that they are RegExps
21686
+ if (isRegExp(value)) {
21687
+ base = ' ' + RegExp.prototype.toString.call(value);
21688
+ }
21689
+
21690
+ // Make dates with properties first say the date
21691
+ if (isDate(value)) {
21692
+ base = ' ' + Date.prototype.toUTCString.call(value);
21693
+ }
21694
+
21695
+ // Make error with message first say the error
21696
+ if (isError(value)) {
21697
+ base = ' ' + formatError(value);
21698
+ }
21699
+
21700
+ if (keys.length === 0 && (!array || value.length == 0)) {
21701
+ return braces[0] + base + braces[1];
21702
+ }
21703
+
21704
+ if (recurseTimes < 0) {
21705
+ if (isRegExp(value)) {
21706
+ return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
21707
+ } else {
21708
+ return ctx.stylize('[Object]', 'special');
21709
+ }
21710
+ }
21711
+
21712
+ ctx.seen.push(value);
21713
+
21714
+ var output;
21715
+ if (array) {
21716
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
21717
+ } else {
21718
+ output = keys.map(function(key) {
21719
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
21720
+ });
21721
+ }
21722
+
21723
+ ctx.seen.pop();
21724
+
21725
+ return reduceToSingleString(output, base, braces);
21726
+ }
21727
+
21728
+
21729
+ function formatPrimitive(ctx, value) {
21730
+ if (isUndefined(value))
21731
+ return ctx.stylize('undefined', 'undefined');
21732
+ if (isString(value)) {
21733
+ var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
21734
+ .replace(/'/g, "\\'")
21735
+ .replace(/\\"/g, '"') + '\'';
21736
+ return ctx.stylize(simple, 'string');
21737
+ }
21738
+ if (isNumber(value))
21739
+ return ctx.stylize('' + value, 'number');
21740
+ if (isBoolean(value))
21741
+ return ctx.stylize('' + value, 'boolean');
21742
+ // For some reason typeof null is "object", so special case here.
21743
+ if (isNull(value))
21744
+ return ctx.stylize('null', 'null');
21745
+ }
21746
+
21747
+
21748
+ function formatError(value) {
21749
+ return '[' + Error.prototype.toString.call(value) + ']';
21750
+ }
21751
+
21752
+
21753
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
21754
+ var output = [];
21755
+ for (var i = 0, l = value.length; i < l; ++i) {
21756
+ if (hasOwnProperty(value, String(i))) {
21757
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
21758
+ String(i), true));
21759
+ } else {
21760
+ output.push('');
21761
+ }
21762
+ }
21763
+ keys.forEach(function(key) {
21764
+ if (!key.match(/^\d+$/)) {
21765
+ output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
21766
+ key, true));
21767
+ }
21768
+ });
21769
+ return output;
21770
+ }
21771
+
21772
+
21773
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
21774
+ var name, str, desc;
21775
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
21776
+ if (desc.get) {
21777
+ if (desc.set) {
21778
+ str = ctx.stylize('[Getter/Setter]', 'special');
21779
+ } else {
21780
+ str = ctx.stylize('[Getter]', 'special');
21781
+ }
21782
+ } else {
21783
+ if (desc.set) {
21784
+ str = ctx.stylize('[Setter]', 'special');
21785
+ }
21786
+ }
21787
+ if (!hasOwnProperty(visibleKeys, key)) {
21788
+ name = '[' + key + ']';
21789
+ }
21790
+ if (!str) {
21791
+ if (ctx.seen.indexOf(desc.value) < 0) {
21792
+ if (isNull(recurseTimes)) {
21793
+ str = formatValue(ctx, desc.value, null);
21794
+ } else {
21795
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
21796
+ }
21797
+ if (str.indexOf('\n') > -1) {
21798
+ if (array) {
21799
+ str = str.split('\n').map(function(line) {
21800
+ return ' ' + line;
21801
+ }).join('\n').substr(2);
21802
+ } else {
21803
+ str = '\n' + str.split('\n').map(function(line) {
21804
+ return ' ' + line;
21805
+ }).join('\n');
21806
+ }
21807
+ }
21808
+ } else {
21809
+ str = ctx.stylize('[Circular]', 'special');
21810
+ }
21811
+ }
21812
+ if (isUndefined(name)) {
21813
+ if (array && key.match(/^\d+$/)) {
21814
+ return str;
21815
+ }
21816
+ name = JSON.stringify('' + key);
21817
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
21818
+ name = name.substr(1, name.length - 2);
21819
+ name = ctx.stylize(name, 'name');
21820
+ } else {
21821
+ name = name.replace(/'/g, "\\'")
21822
+ .replace(/\\"/g, '"')
21823
+ .replace(/(^"|"$)/g, "'");
21824
+ name = ctx.stylize(name, 'string');
21825
+ }
21826
+ }
21827
+
21828
+ return name + ': ' + str;
21829
+ }
21830
+
21831
+
21832
+ function reduceToSingleString(output, base, braces) {
21833
+ var numLinesEst = 0;
21834
+ var length = output.reduce(function(prev, cur) {
21835
+ numLinesEst++;
21836
+ if (cur.indexOf('\n') >= 0) numLinesEst++;
21837
+ return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
21838
+ }, 0);
21839
+
21840
+ if (length > 60) {
21841
+ return braces[0] +
21842
+ (base === '' ? '' : base + '\n ') +
21843
+ ' ' +
21844
+ output.join(',\n ') +
21845
+ ' ' +
21846
+ braces[1];
21847
+ }
21848
+
21849
+ return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
21850
+ }
21851
+
21852
+
21853
+ // NOTE: These type checking functions intentionally don't use `instanceof`
21854
+ // because it is fragile and can be easily faked with `Object.create()`.
21855
+ exports.types = require('./support/types');
21856
+
21857
+ function isArray(ar) {
21858
+ return Array.isArray(ar);
21859
+ }
21860
+ exports.isArray = isArray;
21861
+
21862
+ function isBoolean(arg) {
21863
+ return typeof arg === 'boolean';
21864
+ }
21865
+ exports.isBoolean = isBoolean;
21866
+
21867
+ function isNull(arg) {
21868
+ return arg === null;
21869
+ }
21870
+ exports.isNull = isNull;
21871
+
21872
+ function isNullOrUndefined(arg) {
21873
+ return arg == null;
21874
+ }
21875
+ exports.isNullOrUndefined = isNullOrUndefined;
21876
+
21877
+ function isNumber(arg) {
21878
+ return typeof arg === 'number';
21879
+ }
21880
+ exports.isNumber = isNumber;
21881
+
21882
+ function isString(arg) {
21883
+ return typeof arg === 'string';
21884
+ }
21885
+ exports.isString = isString;
21886
+
21887
+ function isSymbol(arg) {
21888
+ return typeof arg === 'symbol';
21889
+ }
21890
+ exports.isSymbol = isSymbol;
21891
+
21892
+ function isUndefined(arg) {
21893
+ return arg === void 0;
21894
+ }
21895
+ exports.isUndefined = isUndefined;
21896
+
21897
+ function isRegExp(re) {
21898
+ return isObject(re) && objectToString(re) === '[object RegExp]';
21899
+ }
21900
+ exports.isRegExp = isRegExp;
21901
+ exports.types.isRegExp = isRegExp;
21902
+
21903
+ function isObject(arg) {
21904
+ return typeof arg === 'object' && arg !== null;
21905
+ }
21906
+ exports.isObject = isObject;
21907
+
21908
+ function isDate(d) {
21909
+ return isObject(d) && objectToString(d) === '[object Date]';
21910
+ }
21911
+ exports.isDate = isDate;
21912
+ exports.types.isDate = isDate;
21913
+
21914
+ function isError(e) {
21915
+ return isObject(e) &&
21916
+ (objectToString(e) === '[object Error]' || e instanceof Error);
21917
+ }
21918
+ exports.isError = isError;
21919
+ exports.types.isNativeError = isError;
21920
+
21921
+ function isFunction(arg) {
21922
+ return typeof arg === 'function';
21923
+ }
21924
+ exports.isFunction = isFunction;
21925
+
21926
+ function isPrimitive(arg) {
21927
+ return arg === null ||
21928
+ typeof arg === 'boolean' ||
21929
+ typeof arg === 'number' ||
21930
+ typeof arg === 'string' ||
21931
+ typeof arg === 'symbol' || // ES6 symbol
21932
+ typeof arg === 'undefined';
21933
+ }
21934
+ exports.isPrimitive = isPrimitive;
21935
+
21936
+ exports.isBuffer = require('./support/isBuffer');
21937
+
21938
+ function objectToString(o) {
21939
+ return Object.prototype.toString.call(o);
21940
+ }
21941
+
21942
+
21943
+ function pad(n) {
21944
+ return n < 10 ? '0' + n.toString(10) : n.toString(10);
21945
+ }
21946
+
21947
+
21948
+ var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
21949
+ 'Oct', 'Nov', 'Dec'];
21950
+
21951
+ // 26 Feb 16:19:34
21952
+ function timestamp() {
21953
+ var d = new Date();
21954
+ var time = [pad(d.getHours()),
21955
+ pad(d.getMinutes()),
21956
+ pad(d.getSeconds())].join(':');
21957
+ return [d.getDate(), months[d.getMonth()], time].join(' ');
21958
+ }
21959
+
21960
+
21961
+ // log is just a thin wrapper to console.log that prepends a timestamp
21962
+ exports.log = function() {
21963
+ console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
21964
+ };
21965
+
21966
+
21967
+ /**
21968
+ * Inherit the prototype methods from one constructor into another.
21969
+ *
21970
+ * The Function.prototype.inherits from lang.js rewritten as a standalone
21971
+ * function (not on Function.prototype). NOTE: If this file is to be loaded
21972
+ * during bootstrapping this function needs to be rewritten using some native
21973
+ * functions as prototype setup using normal JavaScript does not work as
21974
+ * expected during bootstrapping (see mirror.js in r114903).
21975
+ *
21976
+ * @param {function} ctor Constructor function which needs to inherit the
21977
+ * prototype.
21978
+ * @param {function} superCtor Constructor function to inherit prototype from.
21979
+ */
21980
+ exports.inherits = require('inherits');
21981
+
21982
+ exports._extend = function(origin, add) {
21983
+ // Don't do anything if add isn't an object
21984
+ if (!add || !isObject(add)) return origin;
21985
+
21986
+ var keys = Object.keys(add);
21987
+ var i = keys.length;
21988
+ while (i--) {
21989
+ origin[keys[i]] = add[keys[i]];
21990
+ }
21991
+ return origin;
21992
+ };
21993
+
21994
+ function hasOwnProperty(obj, prop) {
21995
+ return Object.prototype.hasOwnProperty.call(obj, prop);
21996
+ }
21997
+
21998
+ var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
21999
+
22000
+ exports.promisify = function promisify(original) {
22001
+ if (typeof original !== 'function')
22002
+ throw new TypeError('The "original" argument must be of type Function');
22003
+
22004
+ if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
22005
+ var fn = original[kCustomPromisifiedSymbol];
22006
+ if (typeof fn !== 'function') {
22007
+ throw new TypeError('The "util.promisify.custom" argument must be of type Function');
22008
+ }
22009
+ Object.defineProperty(fn, kCustomPromisifiedSymbol, {
22010
+ value: fn, enumerable: false, writable: false, configurable: true
22011
+ });
22012
+ return fn;
22013
+ }
22014
+
22015
+ function fn() {
22016
+ var promiseResolve, promiseReject;
22017
+ var promise = new Promise(function (resolve, reject) {
22018
+ promiseResolve = resolve;
22019
+ promiseReject = reject;
22020
+ });
22021
+
22022
+ var args = [];
22023
+ for (var i = 0; i < arguments.length; i++) {
22024
+ args.push(arguments[i]);
22025
+ }
22026
+ args.push(function (err, value) {
22027
+ if (err) {
22028
+ promiseReject(err);
22029
+ } else {
22030
+ promiseResolve(value);
22031
+ }
22032
+ });
22033
+
22034
+ try {
22035
+ original.apply(this, args);
22036
+ } catch (err) {
22037
+ promiseReject(err);
22038
+ }
22039
+
22040
+ return promise;
22041
+ }
22042
+
22043
+ Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
22044
+
22045
+ if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
22046
+ value: fn, enumerable: false, writable: false, configurable: true
22047
+ });
22048
+ return Object.defineProperties(
22049
+ fn,
22050
+ getOwnPropertyDescriptors(original)
22051
+ );
22052
+ }
22053
+
22054
+ exports.promisify.custom = kCustomPromisifiedSymbol
22055
+
22056
+ function callbackifyOnRejected(reason, cb) {
22057
+ // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
22058
+ // Because `null` is a special error value in callbacks which means "no error
22059
+ // occurred", we error-wrap so the callback consumer can distinguish between
22060
+ // "the promise rejected with null" or "the promise fulfilled with undefined".
22061
+ if (!reason) {
22062
+ var newReason = new Error('Promise was rejected with a falsy value');
22063
+ newReason.reason = reason;
22064
+ reason = newReason;
22065
+ }
22066
+ return cb(reason);
22067
+ }
22068
+
22069
+ function callbackify(original) {
22070
+ if (typeof original !== 'function') {
22071
+ throw new TypeError('The "original" argument must be of type Function');
22072
+ }
22073
+
22074
+ // We DO NOT return the promise as it gives the user a false sense that
22075
+ // the promise is actually somehow related to the callback's execution
22076
+ // and that the callback throwing will reject the promise.
22077
+ function callbackified() {
22078
+ var args = [];
22079
+ for (var i = 0; i < arguments.length; i++) {
22080
+ args.push(arguments[i]);
22081
+ }
22082
+
22083
+ var maybeCb = args.pop();
22084
+ if (typeof maybeCb !== 'function') {
22085
+ throw new TypeError('The last argument must be of type Function');
22086
+ }
22087
+ var self = this;
22088
+ var cb = function() {
22089
+ return maybeCb.apply(self, arguments);
22090
+ };
22091
+ // In true node style we process the callback on `nextTick` with all the
22092
+ // implications (stack, `uncaughtException`, `async_hooks`)
22093
+ original.apply(this, args)
22094
+ .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },
22095
+ function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });
22096
+ }
22097
+
22098
+ Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
22099
+ Object.defineProperties(callbackified,
22100
+ getOwnPropertyDescriptors(original));
22101
+ return callbackified;
22102
+ }
22103
+ exports.callbackify = callbackify;
22104
+
22105
+ }).call(this)}).call(this,require('_process'))
22106
+ },{"./support/isBuffer":52,"./support/types":53,"_process":51,"inherits":31}],55:[function(require,module,exports){
22107
+ (function (global){(function (){
22108
+ 'use strict';
22109
+
22110
+ var forEach = require('foreach');
22111
+ var availableTypedArrays = require('available-typed-arrays');
22112
+ var callBound = require('call-bind/callBound');
22113
+
22114
+ var $toString = callBound('Object.prototype.toString');
22115
+ var hasSymbols = require('has-symbols')();
22116
+ var hasToStringTag = hasSymbols && typeof Symbol.toStringTag === 'symbol';
22117
+
22118
+ var typedArrays = availableTypedArrays();
22119
+
22120
+ var $slice = callBound('String.prototype.slice');
22121
+ var toStrTags = {};
22122
+ var gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
22123
+ var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');
22124
+ if (hasToStringTag && gOPD && getPrototypeOf) {
22125
+ forEach(typedArrays, function (typedArray) {
22126
+ if (typeof global[typedArray] === 'function') {
22127
+ var arr = new global[typedArray]();
22128
+ if (!(Symbol.toStringTag in arr)) {
22129
+ throw new EvalError('this engine has support for Symbol.toStringTag, but ' + typedArray + ' does not have the property! Please report this.');
22130
+ }
22131
+ var proto = getPrototypeOf(arr);
22132
+ var descriptor = gOPD(proto, Symbol.toStringTag);
22133
+ if (!descriptor) {
22134
+ var superProto = getPrototypeOf(proto);
22135
+ descriptor = gOPD(superProto, Symbol.toStringTag);
22136
+ }
22137
+ toStrTags[typedArray] = descriptor.get;
22138
+ }
22139
+ });
22140
+ }
22141
+
22142
+ var tryTypedArrays = function tryAllTypedArrays(value) {
22143
+ var foundName = false;
22144
+ forEach(toStrTags, function (getter, typedArray) {
22145
+ if (!foundName) {
22146
+ try {
22147
+ var name = getter.call(value);
22148
+ if (name === typedArray) {
22149
+ foundName = name;
22150
+ }
22151
+ } catch (e) {}
22152
+ }
22153
+ });
22154
+ return foundName;
22155
+ };
22156
+
22157
+ var isTypedArray = require('is-typed-array');
22158
+
22159
+ module.exports = function whichTypedArray(value) {
22160
+ if (!isTypedArray(value)) { return false; }
22161
+ if (!hasToStringTag) { return $slice($toString(value), 8, -1); }
22162
+ return tryTypedArrays(value);
22163
+ };
22164
+
22165
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
22166
+ },{"available-typed-arrays":17,"call-bind/callBound":20,"es-abstract/helpers/getOwnPropertyDescriptor":22,"foreach":23,"has-symbols":27,"is-typed-array":34}]},{},[10])(10)
20014
22167
  });