@player-ui/player 0.4.0-next.11 → 0.4.0-next.13

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.
@@ -217,6 +217,7 @@ __webpack_require__.r(__webpack_exports__);
217
217
  __webpack_require__.r(__webpack_exports__);
218
218
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplicabilityPlugin", function() { return ApplicabilityPlugin; });
219
219
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AssetTransformCorePlugin", function() { return AssetTransformCorePlugin; });
220
+ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BINDING_BRACKETS_REGEX", function() { return BINDING_BRACKETS_REGEX; });
220
221
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BindingInstance", function() { return BindingInstance; });
221
222
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BindingParser", function() { return BindingParser; });
222
223
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Builder", function() { return Builder; });
@@ -283,10 +284,10 @@ __webpack_require__.r(__webpack_exports__);
283
284
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "withoutContext", function() { return withoutContext; });
284
285
  /* harmony import */ var _player_ui_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @player-ui/types */ "./bazel-out/k8-fastbuild/bin/core/types/dist/index.esm.js");
285
286
  /* harmony import */ var _player_ui_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_player_ui_types__WEBPACK_IMPORTED_MODULE_0__);
286
- /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _player_ui_types__WEBPACK_IMPORTED_MODULE_0__) if(["default","ApplicabilityPlugin","AssetTransformCorePlugin","BindingInstance","BindingParser","Builder","ConsoleLogger","ConstantsController","DataController","DependencyMiddleware","DependencyModel","DependencyTracker","EMPTY_NODE","ExpNodeOpaqueIdentifier","ExpressionEvaluator","FlowController","FlowExpPlugin","FlowInstance","LocalModel","LocalStateStore","NOOPDataModel","NOOP_MODEL","NOT_STARTED_STATE","NodeType","NoopLogger","Parser","PipelinedDataModel","Player","ProxyLogger","ROOT_BINDING","Resolver","SCHEMA_VALIDATION_PROVIDER_NAME","SIMPLE_BINDING_REGEX","SchemaController","StringResolverPlugin","SwitchPlugin","TapableLogger","TemplatePlugin","VALIDATION_PROVIDER_NAME_SYMBOL","VIEW_VALIDATION_PROVIDER_NAME","ValidationBindingTrackerViewPlugin","ValidationController","ValidationMiddleware","ValidatorRegistry","ViewController","ViewInstance","caresAboutDataChanges","constructModelForPipeline","findClosestNodeAtPosition","findInArray","findNextExp","getBindingSegments","isBinding","isExpressionNode","isObjectExpression","maybeConvertToNum","parse","parseExpression","removeBindingAndChildrenFromMap","resolveDataRefs","resolveDataRefsInString","resolveExpressionsInString","severities","toModel","toNodeResolveOptions","withParser","withoutContext"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _player_ui_types__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
287
+ /* harmony reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in _player_ui_types__WEBPACK_IMPORTED_MODULE_0__) if(["default","ApplicabilityPlugin","AssetTransformCorePlugin","BINDING_BRACKETS_REGEX","BindingInstance","BindingParser","Builder","ConsoleLogger","ConstantsController","DataController","DependencyMiddleware","DependencyModel","DependencyTracker","EMPTY_NODE","ExpNodeOpaqueIdentifier","ExpressionEvaluator","FlowController","FlowExpPlugin","FlowInstance","LocalModel","LocalStateStore","NOOPDataModel","NOOP_MODEL","NOT_STARTED_STATE","NodeType","NoopLogger","Parser","PipelinedDataModel","Player","ProxyLogger","ROOT_BINDING","Resolver","SCHEMA_VALIDATION_PROVIDER_NAME","SIMPLE_BINDING_REGEX","SchemaController","StringResolverPlugin","SwitchPlugin","TapableLogger","TemplatePlugin","VALIDATION_PROVIDER_NAME_SYMBOL","VIEW_VALIDATION_PROVIDER_NAME","ValidationBindingTrackerViewPlugin","ValidationController","ValidationMiddleware","ValidatorRegistry","ViewController","ViewInstance","caresAboutDataChanges","constructModelForPipeline","findClosestNodeAtPosition","findInArray","findNextExp","getBindingSegments","isBinding","isExpressionNode","isObjectExpression","maybeConvertToNum","parse","parseExpression","removeBindingAndChildrenFromMap","resolveDataRefs","resolveDataRefsInString","resolveExpressionsInString","severities","toModel","toNodeResolveOptions","withParser","withoutContext"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return _player_ui_types__WEBPACK_IMPORTED_MODULE_0__[key]; }) }(__WEBPACK_IMPORT_KEY__));
287
288
  /* harmony import */ var tapable_ts__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! tapable-ts */ "./node_modules/tapable-ts/dist/hooks.mjs");
288
- /* harmony import */ var nested_error_stacks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! nested-error-stacks */ "./node_modules/nested-error-stacks/index.js");
289
- /* harmony import */ var nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(nested_error_stacks__WEBPACK_IMPORTED_MODULE_2__);
289
+ /* harmony import */ var ts_nested_error__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ts-nested-error */ "./node_modules/ts-nested-error/build/nested-error.js");
290
+ /* harmony import */ var ts_nested_error__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(ts_nested_error__WEBPACK_IMPORTED_MODULE_2__);
290
291
  /* harmony import */ var arr_flatten__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! arr-flatten */ "./node_modules/arr-flatten/index.js");
291
292
  /* harmony import */ var arr_flatten__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(arr_flatten__WEBPACK_IMPORTED_MODULE_3__);
292
293
  /* harmony import */ var parsimmon__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! parsimmon */ "./node_modules/parsimmon/build/parsimmon.umd.min.js");
@@ -398,7 +399,8 @@ const isIdentifierChar = (char) => {
398
399
  return false;
399
400
  }
400
401
  const charCode = char.charCodeAt(0);
401
- return charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 90 || charCode >= 97 && charCode <= 122 || charCode === 95 || charCode === 45 || charCode === 64;
402
+ const matches = charCode === 32 || charCode === 34 || charCode === 39 || charCode === 40 || charCode === 41 || charCode === 42 || charCode === 46 || charCode === 61 || charCode === 91 || charCode === 93 || charCode === 96 || charCode === 123 || charCode === 125;
403
+ return !matches;
402
404
  };
403
405
  const parse$1 = (path) => {
404
406
  let index = 1;
@@ -684,7 +686,7 @@ function resolveBindingAST(bindingPathNode, options, hooks) {
684
686
  try {
685
687
  return options.convertToPath(options.getValue(nestedResolvedValue.path));
686
688
  } catch (e) {
687
- throw new nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default.a(`Unable to resolve path segment: ${nestedResolvedValue.path}`, e);
689
+ throw new ts_nested_error__WEBPACK_IMPORTED_MODULE_2__["NestedError"](`Unable to resolve path segment: ${nestedResolvedValue.path}`, e);
688
690
  }
689
691
  }
690
692
  if (node.name === "Expression") {
@@ -692,7 +694,7 @@ function resolveBindingAST(bindingPathNode, options, hooks) {
692
694
  const actualValue = options.evaluate(node.value);
693
695
  return options.convertToPath(actualValue);
694
696
  } catch (e) {
695
- throw new nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default.a(`Unable to resolve path: ${node.value}`, e);
697
+ throw new ts_nested_error__WEBPACK_IMPORTED_MODULE_2__["NestedError"](`Unable to resolve path: ${node.value}`, e);
696
698
  }
697
699
  }
698
700
  throw new Error(`Unable to resolve value for node: ${node.name}`);
@@ -762,6 +764,8 @@ var __spreadValues$d = (a, b) => {
762
764
  return a;
763
765
  };
764
766
  const SIMPLE_BINDING_REGEX = /^[\w\-@]+(\.[\w\-@]+)*$/;
767
+ const BINDING_BRACKETS_REGEX = /[\s()*=`{}'"[\]]/;
768
+ const LAZY_BINDING_REGEX = /^[^.]+(\..+)*$/;
765
769
  const DEFAULT_OPTIONS = {
766
770
  get: () => {
767
771
  throw new Error("Not Implemented");
@@ -786,7 +790,7 @@ class BindingParser {
786
790
  }
787
791
  normalizePath(path, resolveOptions) {
788
792
  var _a, _b;
789
- if (path.match(SIMPLE_BINDING_REGEX) && this.hooks.skipOptimization.call(path) !== true) {
793
+ if (!BINDING_BRACKETS_REGEX.test(path) && LAZY_BINDING_REGEX.test(path) && this.hooks.skipOptimization.call(path) !== true) {
790
794
  return { path: path.split("."), updates: void 0 };
791
795
  }
792
796
  const ast = (_a = this.parseCache[path]) != null ? _a : parse$1(path);
@@ -797,7 +801,7 @@ class BindingParser {
797
801
  try {
798
802
  return resolveBindingAST(ast.path, resolveOptions, this.hooks);
799
803
  } catch (e) {
800
- throw new nested_error_stacks__WEBPACK_IMPORTED_MODULE_2___default.a(`Cannot resolve binding: ${path}`, e);
804
+ throw new ts_nested_error__WEBPACK_IMPORTED_MODULE_2__["NestedError"](`Cannot resolve binding: ${path}`, e);
801
805
  }
802
806
  }
803
807
  getBindingForNormalizedResult(normalized) {
@@ -4049,6 +4053,14 @@ var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
4049
4053
  const SCHEMA_VALIDATION_PROVIDER_NAME = "schema";
4050
4054
  const VIEW_VALIDATION_PROVIDER_NAME = "view";
4051
4055
  const VALIDATION_PROVIDER_NAME_SYMBOL = Symbol.for("validation-provider-name");
4056
+ function isSubset(subset, containingSet) {
4057
+ if (subset.size > containingSet.size)
4058
+ return false;
4059
+ for (const entry of subset)
4060
+ if (!containingSet.has(entry))
4061
+ return false;
4062
+ return true;
4063
+ }
4052
4064
  function createStatefulValidationObject(obj) {
4053
4065
  return {
4054
4066
  value: obj,
@@ -4111,23 +4123,26 @@ class ValidatedBinding {
4111
4123
  }
4112
4124
  }
4113
4125
  runApplicableValidations(runner, canDismiss) {
4114
- this.applicableValidations = this.applicableValidations.map((obj) => {
4126
+ this.applicableValidations = this.applicableValidations.map((originalValue) => {
4115
4127
  var _a, _b, _c;
4116
- if (obj.state === "dismissed") {
4117
- return obj;
4128
+ if (originalValue.state === "dismissed") {
4129
+ return originalValue;
4118
4130
  }
4119
- const blocking = (_a = obj.value.blocking) != null ? _a : obj.value.severity === "warning" && "once" || true;
4131
+ const blocking = (_a = originalValue.value.blocking) != null ? _a : originalValue.value.severity === "warning" && "once" || true;
4132
+ const obj = Object(timm__WEBPACK_IMPORTED_MODULE_7__["setIn"])(originalValue, ["value", "blocking"], blocking);
4120
4133
  const isBlockingNavigation = blocking === true || blocking === "once" && !canDismiss;
4121
- const dismissable = canDismiss && blocking === "once";
4122
- if (this.currentPhase === "navigation" && obj.state === "active" && dismissable) {
4134
+ if (this.currentPhase === "navigation" && obj.state === "active" && obj.value.blocking !== true) {
4123
4135
  if (obj.value.severity === "warning") {
4124
4136
  const warn = obj;
4125
- if (warn.dismissable && warn.response.dismiss) {
4137
+ if (warn.dismissable && warn.response.dismiss && (warn.response.blocking !== "once" || !warn.response.blocking)) {
4126
4138
  warn.response.dismiss();
4127
4139
  } else {
4140
+ if ((warn == null ? void 0 : warn.response.blocking) === "once") {
4141
+ warn.response.blocking = false;
4142
+ }
4128
4143
  warn.dismissable = true;
4129
4144
  }
4130
- return obj;
4145
+ return warn;
4131
4146
  }
4132
4147
  }
4133
4148
  const response = runner(obj.value);
@@ -4154,6 +4169,7 @@ class ValidatedBinding {
4154
4169
  });
4155
4170
  }
4156
4171
  update(phase, canDismiss, runner) {
4172
+ const newApplicableValidations = [];
4157
4173
  if (phase === "load" && this.currentPhase !== void 0) {
4158
4174
  return;
4159
4175
  }
@@ -4171,8 +4187,13 @@ class ValidatedBinding {
4171
4187
  ...this.validationsByState.change
4172
4188
  ];
4173
4189
  } else if (phase === "navigation" && (this.currentPhase === "load" || this.currentPhase === "change")) {
4190
+ this.applicableValidations.forEach((element) => {
4191
+ if (!(element.type === "error" && element.state === "active" && element.isBlockingNavigation === false)) {
4192
+ newApplicableValidations.push(element);
4193
+ }
4194
+ });
4174
4195
  this.applicableValidations = [
4175
- ...this.applicableValidations,
4196
+ ...newApplicableValidations,
4176
4197
  ...this.currentPhase === "load" ? this.validationsByState.change : [],
4177
4198
  ...this.validationsByState.navigation
4178
4199
  ];
@@ -4412,19 +4433,11 @@ class ValidationController {
4412
4433
  updateValidations(!isNavigationTrigger);
4413
4434
  if (isNavigationTrigger) {
4414
4435
  const { activeBindings } = this;
4415
- if (this.setCompare(lastActiveBindings, activeBindings)) {
4436
+ if (isSubset(activeBindings, lastActiveBindings)) {
4416
4437
  updateValidations(true);
4417
4438
  }
4418
4439
  }
4419
4440
  }
4420
- setCompare(set1, set2) {
4421
- if (set1.size !== set2.size)
4422
- return false;
4423
- for (const entry of set1)
4424
- if (!set2.has(entry))
4425
- return false;
4426
- return true;
4427
- }
4428
4441
  get activeBindings() {
4429
4442
  return new Set(Array.from(this.getBindings()).filter((b) => {
4430
4443
  var _a;
@@ -5075,8 +5088,8 @@ var __async = (__this, __arguments, generator) => {
5075
5088
  step((generator = generator.apply(__this, __arguments)).next());
5076
5089
  });
5077
5090
  };
5078
- const PLAYER_VERSION = "0.4.0-next.11";
5079
- const COMMIT = "843876eed97f2f08d6ade9a2d86984fc9e4bd916";
5091
+ const PLAYER_VERSION = "0.4.0-next.13";
5092
+ const COMMIT = "80a0ff72b097eff2e227c7effef17923655c7499";
5080
5093
  const _Player = class {
5081
5094
  constructor(config) {
5082
5095
  this.logger = new TapableLogger();
@@ -7993,67 +8006,6 @@ module.exports = Array.isArray || function (arr) {
7993
8006
  };
7994
8007
 
7995
8008
 
7996
- /***/ }),
7997
-
7998
- /***/ "./node_modules/nested-error-stacks/index.js":
7999
- /*!***************************************************!*\
8000
- !*** ./node_modules/nested-error-stacks/index.js ***!
8001
- \***************************************************/
8002
- /*! no static exports found */
8003
- /***/ (function(module, exports, __webpack_require__) {
8004
-
8005
- var inherits = __webpack_require__(/*! util */ "./node_modules/node-libs-browser/node_modules/util/util.js").inherits;
8006
-
8007
- var NestedError = function (message, nested) {
8008
- this.nested = nested;
8009
-
8010
- if (message instanceof Error) {
8011
- nested = message;
8012
- } else if (typeof message !== 'undefined') {
8013
- Object.defineProperty(this, 'message', {
8014
- value: message,
8015
- writable: true,
8016
- enumerable: false,
8017
- configurable: true
8018
- });
8019
- }
8020
-
8021
- Error.captureStackTrace(this, this.constructor);
8022
- var oldStackDescriptor = Object.getOwnPropertyDescriptor(this, 'stack');
8023
- var stackDescriptor = buildStackDescriptor(oldStackDescriptor, nested);
8024
- Object.defineProperty(this, 'stack', stackDescriptor);
8025
- };
8026
-
8027
- function buildStackDescriptor(oldStackDescriptor, nested) {
8028
- if (oldStackDescriptor.get) {
8029
- return {
8030
- get: function () {
8031
- var stack = oldStackDescriptor.get.call(this);
8032
- return buildCombinedStacks(stack, this.nested);
8033
- }
8034
- };
8035
- } else {
8036
- var stack = oldStackDescriptor.value;
8037
- return {
8038
- value: buildCombinedStacks(stack, nested)
8039
- };
8040
- }
8041
- }
8042
-
8043
- function buildCombinedStacks(stack, nested) {
8044
- if (nested) {
8045
- stack += '\nCaused By: ' + nested.stack;
8046
- }
8047
- return stack;
8048
- }
8049
-
8050
- inherits(NestedError, Error);
8051
- NestedError.prototype.name = 'NestedError';
8052
-
8053
-
8054
- module.exports = NestedError;
8055
-
8056
-
8057
8009
  /***/ }),
8058
8010
 
8059
8011
  /***/ "./node_modules/node-libs-browser/node_modules/buffer/index.js":
@@ -9858,771 +9810,6 @@ function isnan (val) {
9858
9810
 
9859
9811
  /***/ }),
9860
9812
 
9861
- /***/ "./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js":
9862
- /*!**********************************************************************************!*\
9863
- !*** ./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js ***!
9864
- \**********************************************************************************/
9865
- /*! no static exports found */
9866
- /***/ (function(module, exports) {
9867
-
9868
- if (typeof Object.create === 'function') {
9869
- // implementation from standard node.js 'util' module
9870
- module.exports = function inherits(ctor, superCtor) {
9871
- ctor.super_ = superCtor
9872
- ctor.prototype = Object.create(superCtor.prototype, {
9873
- constructor: {
9874
- value: ctor,
9875
- enumerable: false,
9876
- writable: true,
9877
- configurable: true
9878
- }
9879
- });
9880
- };
9881
- } else {
9882
- // old school shim for old browsers
9883
- module.exports = function inherits(ctor, superCtor) {
9884
- ctor.super_ = superCtor
9885
- var TempCtor = function () {}
9886
- TempCtor.prototype = superCtor.prototype
9887
- ctor.prototype = new TempCtor()
9888
- ctor.prototype.constructor = ctor
9889
- }
9890
- }
9891
-
9892
-
9893
- /***/ }),
9894
-
9895
- /***/ "./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js":
9896
- /*!*************************************************************************************!*\
9897
- !*** ./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js ***!
9898
- \*************************************************************************************/
9899
- /*! no static exports found */
9900
- /***/ (function(module, exports) {
9901
-
9902
- module.exports = function isBuffer(arg) {
9903
- return arg && typeof arg === 'object'
9904
- && typeof arg.copy === 'function'
9905
- && typeof arg.fill === 'function'
9906
- && typeof arg.readUInt8 === 'function';
9907
- }
9908
-
9909
- /***/ }),
9910
-
9911
- /***/ "./node_modules/node-libs-browser/node_modules/util/util.js":
9912
- /*!******************************************************************!*\
9913
- !*** ./node_modules/node-libs-browser/node_modules/util/util.js ***!
9914
- \******************************************************************/
9915
- /*! no static exports found */
9916
- /***/ (function(module, exports, __webpack_require__) {
9917
-
9918
- /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors.
9919
- //
9920
- // Permission is hereby granted, free of charge, to any person obtaining a
9921
- // copy of this software and associated documentation files (the
9922
- // "Software"), to deal in the Software without restriction, including
9923
- // without limitation the rights to use, copy, modify, merge, publish,
9924
- // distribute, sublicense, and/or sell copies of the Software, and to permit
9925
- // persons to whom the Software is furnished to do so, subject to the
9926
- // following conditions:
9927
- //
9928
- // The above copyright notice and this permission notice shall be included
9929
- // in all copies or substantial portions of the Software.
9930
- //
9931
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9932
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9933
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
9934
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
9935
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
9936
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
9937
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
9938
-
9939
- var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||
9940
- function getOwnPropertyDescriptors(obj) {
9941
- var keys = Object.keys(obj);
9942
- var descriptors = {};
9943
- for (var i = 0; i < keys.length; i++) {
9944
- descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
9945
- }
9946
- return descriptors;
9947
- };
9948
-
9949
- var formatRegExp = /%[sdj%]/g;
9950
- exports.format = function(f) {
9951
- if (!isString(f)) {
9952
- var objects = [];
9953
- for (var i = 0; i < arguments.length; i++) {
9954
- objects.push(inspect(arguments[i]));
9955
- }
9956
- return objects.join(' ');
9957
- }
9958
-
9959
- var i = 1;
9960
- var args = arguments;
9961
- var len = args.length;
9962
- var str = String(f).replace(formatRegExp, function(x) {
9963
- if (x === '%%') return '%';
9964
- if (i >= len) return x;
9965
- switch (x) {
9966
- case '%s': return String(args[i++]);
9967
- case '%d': return Number(args[i++]);
9968
- case '%j':
9969
- try {
9970
- return JSON.stringify(args[i++]);
9971
- } catch (_) {
9972
- return '[Circular]';
9973
- }
9974
- default:
9975
- return x;
9976
- }
9977
- });
9978
- for (var x = args[i]; i < len; x = args[++i]) {
9979
- if (isNull(x) || !isObject(x)) {
9980
- str += ' ' + x;
9981
- } else {
9982
- str += ' ' + inspect(x);
9983
- }
9984
- }
9985
- return str;
9986
- };
9987
-
9988
-
9989
- // Mark that a method should not be used.
9990
- // Returns a modified function which warns once by default.
9991
- // If --no-deprecation is set, then it is a no-op.
9992
- exports.deprecate = function(fn, msg) {
9993
- if (typeof process !== 'undefined' && process.noDeprecation === true) {
9994
- return fn;
9995
- }
9996
-
9997
- // Allow for deprecating things in the process of starting up.
9998
- if (typeof process === 'undefined') {
9999
- return function() {
10000
- return exports.deprecate(fn, msg).apply(this, arguments);
10001
- };
10002
- }
10003
-
10004
- var warned = false;
10005
- function deprecated() {
10006
- if (!warned) {
10007
- if (process.throwDeprecation) {
10008
- throw new Error(msg);
10009
- } else if (process.traceDeprecation) {
10010
- console.trace(msg);
10011
- } else {
10012
- console.error(msg);
10013
- }
10014
- warned = true;
10015
- }
10016
- return fn.apply(this, arguments);
10017
- }
10018
-
10019
- return deprecated;
10020
- };
10021
-
10022
-
10023
- var debugs = {};
10024
- var debugEnviron;
10025
- exports.debuglog = function(set) {
10026
- if (isUndefined(debugEnviron))
10027
- debugEnviron = process.env.NODE_DEBUG || '';
10028
- set = set.toUpperCase();
10029
- if (!debugs[set]) {
10030
- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) {
10031
- var pid = process.pid;
10032
- debugs[set] = function() {
10033
- var msg = exports.format.apply(exports, arguments);
10034
- console.error('%s %d: %s', set, pid, msg);
10035
- };
10036
- } else {
10037
- debugs[set] = function() {};
10038
- }
10039
- }
10040
- return debugs[set];
10041
- };
10042
-
10043
-
10044
- /**
10045
- * Echos the value of a value. Trys to print the value out
10046
- * in the best way possible given the different types.
10047
- *
10048
- * @param {Object} obj The object to print out.
10049
- * @param {Object} opts Optional options object that alters the output.
10050
- */
10051
- /* legacy: obj, showHidden, depth, colors*/
10052
- function inspect(obj, opts) {
10053
- // default options
10054
- var ctx = {
10055
- seen: [],
10056
- stylize: stylizeNoColor
10057
- };
10058
- // legacy...
10059
- if (arguments.length >= 3) ctx.depth = arguments[2];
10060
- if (arguments.length >= 4) ctx.colors = arguments[3];
10061
- if (isBoolean(opts)) {
10062
- // legacy...
10063
- ctx.showHidden = opts;
10064
- } else if (opts) {
10065
- // got an "options" object
10066
- exports._extend(ctx, opts);
10067
- }
10068
- // set default options
10069
- if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
10070
- if (isUndefined(ctx.depth)) ctx.depth = 2;
10071
- if (isUndefined(ctx.colors)) ctx.colors = false;
10072
- if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
10073
- if (ctx.colors) ctx.stylize = stylizeWithColor;
10074
- return formatValue(ctx, obj, ctx.depth);
10075
- }
10076
- exports.inspect = inspect;
10077
-
10078
-
10079
- // http://en.wikipedia.org/wiki/ANSI_escape_code#graphics
10080
- inspect.colors = {
10081
- 'bold' : [1, 22],
10082
- 'italic' : [3, 23],
10083
- 'underline' : [4, 24],
10084
- 'inverse' : [7, 27],
10085
- 'white' : [37, 39],
10086
- 'grey' : [90, 39],
10087
- 'black' : [30, 39],
10088
- 'blue' : [34, 39],
10089
- 'cyan' : [36, 39],
10090
- 'green' : [32, 39],
10091
- 'magenta' : [35, 39],
10092
- 'red' : [31, 39],
10093
- 'yellow' : [33, 39]
10094
- };
10095
-
10096
- // Don't use 'blue' not visible on cmd.exe
10097
- inspect.styles = {
10098
- 'special': 'cyan',
10099
- 'number': 'yellow',
10100
- 'boolean': 'yellow',
10101
- 'undefined': 'grey',
10102
- 'null': 'bold',
10103
- 'string': 'green',
10104
- 'date': 'magenta',
10105
- // "name": intentionally not styling
10106
- 'regexp': 'red'
10107
- };
10108
-
10109
-
10110
- function stylizeWithColor(str, styleType) {
10111
- var style = inspect.styles[styleType];
10112
-
10113
- if (style) {
10114
- return '\u001b[' + inspect.colors[style][0] + 'm' + str +
10115
- '\u001b[' + inspect.colors[style][1] + 'm';
10116
- } else {
10117
- return str;
10118
- }
10119
- }
10120
-
10121
-
10122
- function stylizeNoColor(str, styleType) {
10123
- return str;
10124
- }
10125
-
10126
-
10127
- function arrayToHash(array) {
10128
- var hash = {};
10129
-
10130
- array.forEach(function(val, idx) {
10131
- hash[val] = true;
10132
- });
10133
-
10134
- return hash;
10135
- }
10136
-
10137
-
10138
- function formatValue(ctx, value, recurseTimes) {
10139
- // Provide a hook for user-specified inspect functions.
10140
- // Check that value is an object with an inspect function on it
10141
- if (ctx.customInspect &&
10142
- value &&
10143
- isFunction(value.inspect) &&
10144
- // Filter out the util module, it's inspect function is special
10145
- value.inspect !== exports.inspect &&
10146
- // Also filter out any prototype objects using the circular check.
10147
- !(value.constructor && value.constructor.prototype === value)) {
10148
- var ret = value.inspect(recurseTimes, ctx);
10149
- if (!isString(ret)) {
10150
- ret = formatValue(ctx, ret, recurseTimes);
10151
- }
10152
- return ret;
10153
- }
10154
-
10155
- // Primitive types cannot have properties
10156
- var primitive = formatPrimitive(ctx, value);
10157
- if (primitive) {
10158
- return primitive;
10159
- }
10160
-
10161
- // Look up the keys of the object.
10162
- var keys = Object.keys(value);
10163
- var visibleKeys = arrayToHash(keys);
10164
-
10165
- if (ctx.showHidden) {
10166
- keys = Object.getOwnPropertyNames(value);
10167
- }
10168
-
10169
- // IE doesn't make error fields non-enumerable
10170
- // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
10171
- if (isError(value)
10172
- && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {
10173
- return formatError(value);
10174
- }
10175
-
10176
- // Some type of object without properties can be shortcutted.
10177
- if (keys.length === 0) {
10178
- if (isFunction(value)) {
10179
- var name = value.name ? ': ' + value.name : '';
10180
- return ctx.stylize('[Function' + name + ']', 'special');
10181
- }
10182
- if (isRegExp(value)) {
10183
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
10184
- }
10185
- if (isDate(value)) {
10186
- return ctx.stylize(Date.prototype.toString.call(value), 'date');
10187
- }
10188
- if (isError(value)) {
10189
- return formatError(value);
10190
- }
10191
- }
10192
-
10193
- var base = '', array = false, braces = ['{', '}'];
10194
-
10195
- // Make Array say that they are Array
10196
- if (isArray(value)) {
10197
- array = true;
10198
- braces = ['[', ']'];
10199
- }
10200
-
10201
- // Make functions say that they are functions
10202
- if (isFunction(value)) {
10203
- var n = value.name ? ': ' + value.name : '';
10204
- base = ' [Function' + n + ']';
10205
- }
10206
-
10207
- // Make RegExps say that they are RegExps
10208
- if (isRegExp(value)) {
10209
- base = ' ' + RegExp.prototype.toString.call(value);
10210
- }
10211
-
10212
- // Make dates with properties first say the date
10213
- if (isDate(value)) {
10214
- base = ' ' + Date.prototype.toUTCString.call(value);
10215
- }
10216
-
10217
- // Make error with message first say the error
10218
- if (isError(value)) {
10219
- base = ' ' + formatError(value);
10220
- }
10221
-
10222
- if (keys.length === 0 && (!array || value.length == 0)) {
10223
- return braces[0] + base + braces[1];
10224
- }
10225
-
10226
- if (recurseTimes < 0) {
10227
- if (isRegExp(value)) {
10228
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
10229
- } else {
10230
- return ctx.stylize('[Object]', 'special');
10231
- }
10232
- }
10233
-
10234
- ctx.seen.push(value);
10235
-
10236
- var output;
10237
- if (array) {
10238
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
10239
- } else {
10240
- output = keys.map(function(key) {
10241
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
10242
- });
10243
- }
10244
-
10245
- ctx.seen.pop();
10246
-
10247
- return reduceToSingleString(output, base, braces);
10248
- }
10249
-
10250
-
10251
- function formatPrimitive(ctx, value) {
10252
- if (isUndefined(value))
10253
- return ctx.stylize('undefined', 'undefined');
10254
- if (isString(value)) {
10255
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
10256
- .replace(/'/g, "\\'")
10257
- .replace(/\\"/g, '"') + '\'';
10258
- return ctx.stylize(simple, 'string');
10259
- }
10260
- if (isNumber(value))
10261
- return ctx.stylize('' + value, 'number');
10262
- if (isBoolean(value))
10263
- return ctx.stylize('' + value, 'boolean');
10264
- // For some reason typeof null is "object", so special case here.
10265
- if (isNull(value))
10266
- return ctx.stylize('null', 'null');
10267
- }
10268
-
10269
-
10270
- function formatError(value) {
10271
- return '[' + Error.prototype.toString.call(value) + ']';
10272
- }
10273
-
10274
-
10275
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
10276
- var output = [];
10277
- for (var i = 0, l = value.length; i < l; ++i) {
10278
- if (hasOwnProperty(value, String(i))) {
10279
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
10280
- String(i), true));
10281
- } else {
10282
- output.push('');
10283
- }
10284
- }
10285
- keys.forEach(function(key) {
10286
- if (!key.match(/^\d+$/)) {
10287
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
10288
- key, true));
10289
- }
10290
- });
10291
- return output;
10292
- }
10293
-
10294
-
10295
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
10296
- var name, str, desc;
10297
- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
10298
- if (desc.get) {
10299
- if (desc.set) {
10300
- str = ctx.stylize('[Getter/Setter]', 'special');
10301
- } else {
10302
- str = ctx.stylize('[Getter]', 'special');
10303
- }
10304
- } else {
10305
- if (desc.set) {
10306
- str = ctx.stylize('[Setter]', 'special');
10307
- }
10308
- }
10309
- if (!hasOwnProperty(visibleKeys, key)) {
10310
- name = '[' + key + ']';
10311
- }
10312
- if (!str) {
10313
- if (ctx.seen.indexOf(desc.value) < 0) {
10314
- if (isNull(recurseTimes)) {
10315
- str = formatValue(ctx, desc.value, null);
10316
- } else {
10317
- str = formatValue(ctx, desc.value, recurseTimes - 1);
10318
- }
10319
- if (str.indexOf('\n') > -1) {
10320
- if (array) {
10321
- str = str.split('\n').map(function(line) {
10322
- return ' ' + line;
10323
- }).join('\n').substr(2);
10324
- } else {
10325
- str = '\n' + str.split('\n').map(function(line) {
10326
- return ' ' + line;
10327
- }).join('\n');
10328
- }
10329
- }
10330
- } else {
10331
- str = ctx.stylize('[Circular]', 'special');
10332
- }
10333
- }
10334
- if (isUndefined(name)) {
10335
- if (array && key.match(/^\d+$/)) {
10336
- return str;
10337
- }
10338
- name = JSON.stringify('' + key);
10339
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
10340
- name = name.substr(1, name.length - 2);
10341
- name = ctx.stylize(name, 'name');
10342
- } else {
10343
- name = name.replace(/'/g, "\\'")
10344
- .replace(/\\"/g, '"')
10345
- .replace(/(^"|"$)/g, "'");
10346
- name = ctx.stylize(name, 'string');
10347
- }
10348
- }
10349
-
10350
- return name + ': ' + str;
10351
- }
10352
-
10353
-
10354
- function reduceToSingleString(output, base, braces) {
10355
- var numLinesEst = 0;
10356
- var length = output.reduce(function(prev, cur) {
10357
- numLinesEst++;
10358
- if (cur.indexOf('\n') >= 0) numLinesEst++;
10359
- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1;
10360
- }, 0);
10361
-
10362
- if (length > 60) {
10363
- return braces[0] +
10364
- (base === '' ? '' : base + '\n ') +
10365
- ' ' +
10366
- output.join(',\n ') +
10367
- ' ' +
10368
- braces[1];
10369
- }
10370
-
10371
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
10372
- }
10373
-
10374
-
10375
- // NOTE: These type checking functions intentionally don't use `instanceof`
10376
- // because it is fragile and can be easily faked with `Object.create()`.
10377
- function isArray(ar) {
10378
- return Array.isArray(ar);
10379
- }
10380
- exports.isArray = isArray;
10381
-
10382
- function isBoolean(arg) {
10383
- return typeof arg === 'boolean';
10384
- }
10385
- exports.isBoolean = isBoolean;
10386
-
10387
- function isNull(arg) {
10388
- return arg === null;
10389
- }
10390
- exports.isNull = isNull;
10391
-
10392
- function isNullOrUndefined(arg) {
10393
- return arg == null;
10394
- }
10395
- exports.isNullOrUndefined = isNullOrUndefined;
10396
-
10397
- function isNumber(arg) {
10398
- return typeof arg === 'number';
10399
- }
10400
- exports.isNumber = isNumber;
10401
-
10402
- function isString(arg) {
10403
- return typeof arg === 'string';
10404
- }
10405
- exports.isString = isString;
10406
-
10407
- function isSymbol(arg) {
10408
- return typeof arg === 'symbol';
10409
- }
10410
- exports.isSymbol = isSymbol;
10411
-
10412
- function isUndefined(arg) {
10413
- return arg === void 0;
10414
- }
10415
- exports.isUndefined = isUndefined;
10416
-
10417
- function isRegExp(re) {
10418
- return isObject(re) && objectToString(re) === '[object RegExp]';
10419
- }
10420
- exports.isRegExp = isRegExp;
10421
-
10422
- function isObject(arg) {
10423
- return typeof arg === 'object' && arg !== null;
10424
- }
10425
- exports.isObject = isObject;
10426
-
10427
- function isDate(d) {
10428
- return isObject(d) && objectToString(d) === '[object Date]';
10429
- }
10430
- exports.isDate = isDate;
10431
-
10432
- function isError(e) {
10433
- return isObject(e) &&
10434
- (objectToString(e) === '[object Error]' || e instanceof Error);
10435
- }
10436
- exports.isError = isError;
10437
-
10438
- function isFunction(arg) {
10439
- return typeof arg === 'function';
10440
- }
10441
- exports.isFunction = isFunction;
10442
-
10443
- function isPrimitive(arg) {
10444
- return arg === null ||
10445
- typeof arg === 'boolean' ||
10446
- typeof arg === 'number' ||
10447
- typeof arg === 'string' ||
10448
- typeof arg === 'symbol' || // ES6 symbol
10449
- typeof arg === 'undefined';
10450
- }
10451
- exports.isPrimitive = isPrimitive;
10452
-
10453
- exports.isBuffer = __webpack_require__(/*! ./support/isBuffer */ "./node_modules/node-libs-browser/node_modules/util/support/isBufferBrowser.js");
10454
-
10455
- function objectToString(o) {
10456
- return Object.prototype.toString.call(o);
10457
- }
10458
-
10459
-
10460
- function pad(n) {
10461
- return n < 10 ? '0' + n.toString(10) : n.toString(10);
10462
- }
10463
-
10464
-
10465
- var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',
10466
- 'Oct', 'Nov', 'Dec'];
10467
-
10468
- // 26 Feb 16:19:34
10469
- function timestamp() {
10470
- var d = new Date();
10471
- var time = [pad(d.getHours()),
10472
- pad(d.getMinutes()),
10473
- pad(d.getSeconds())].join(':');
10474
- return [d.getDate(), months[d.getMonth()], time].join(' ');
10475
- }
10476
-
10477
-
10478
- // log is just a thin wrapper to console.log that prepends a timestamp
10479
- exports.log = function() {
10480
- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
10481
- };
10482
-
10483
-
10484
- /**
10485
- * Inherit the prototype methods from one constructor into another.
10486
- *
10487
- * The Function.prototype.inherits from lang.js rewritten as a standalone
10488
- * function (not on Function.prototype). NOTE: If this file is to be loaded
10489
- * during bootstrapping this function needs to be rewritten using some native
10490
- * functions as prototype setup using normal JavaScript does not work as
10491
- * expected during bootstrapping (see mirror.js in r114903).
10492
- *
10493
- * @param {function} ctor Constructor function which needs to inherit the
10494
- * prototype.
10495
- * @param {function} superCtor Constructor function to inherit prototype from.
10496
- */
10497
- exports.inherits = __webpack_require__(/*! inherits */ "./node_modules/node-libs-browser/node_modules/inherits/inherits_browser.js");
10498
-
10499
- exports._extend = function(origin, add) {
10500
- // Don't do anything if add isn't an object
10501
- if (!add || !isObject(add)) return origin;
10502
-
10503
- var keys = Object.keys(add);
10504
- var i = keys.length;
10505
- while (i--) {
10506
- origin[keys[i]] = add[keys[i]];
10507
- }
10508
- return origin;
10509
- };
10510
-
10511
- function hasOwnProperty(obj, prop) {
10512
- return Object.prototype.hasOwnProperty.call(obj, prop);
10513
- }
10514
-
10515
- var kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;
10516
-
10517
- exports.promisify = function promisify(original) {
10518
- if (typeof original !== 'function')
10519
- throw new TypeError('The "original" argument must be of type Function');
10520
-
10521
- if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
10522
- var fn = original[kCustomPromisifiedSymbol];
10523
- if (typeof fn !== 'function') {
10524
- throw new TypeError('The "util.promisify.custom" argument must be of type Function');
10525
- }
10526
- Object.defineProperty(fn, kCustomPromisifiedSymbol, {
10527
- value: fn, enumerable: false, writable: false, configurable: true
10528
- });
10529
- return fn;
10530
- }
10531
-
10532
- function fn() {
10533
- var promiseResolve, promiseReject;
10534
- var promise = new Promise(function (resolve, reject) {
10535
- promiseResolve = resolve;
10536
- promiseReject = reject;
10537
- });
10538
-
10539
- var args = [];
10540
- for (var i = 0; i < arguments.length; i++) {
10541
- args.push(arguments[i]);
10542
- }
10543
- args.push(function (err, value) {
10544
- if (err) {
10545
- promiseReject(err);
10546
- } else {
10547
- promiseResolve(value);
10548
- }
10549
- });
10550
-
10551
- try {
10552
- original.apply(this, args);
10553
- } catch (err) {
10554
- promiseReject(err);
10555
- }
10556
-
10557
- return promise;
10558
- }
10559
-
10560
- Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
10561
-
10562
- if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
10563
- value: fn, enumerable: false, writable: false, configurable: true
10564
- });
10565
- return Object.defineProperties(
10566
- fn,
10567
- getOwnPropertyDescriptors(original)
10568
- );
10569
- }
10570
-
10571
- exports.promisify.custom = kCustomPromisifiedSymbol
10572
-
10573
- function callbackifyOnRejected(reason, cb) {
10574
- // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).
10575
- // Because `null` is a special error value in callbacks which means "no error
10576
- // occurred", we error-wrap so the callback consumer can distinguish between
10577
- // "the promise rejected with null" or "the promise fulfilled with undefined".
10578
- if (!reason) {
10579
- var newReason = new Error('Promise was rejected with a falsy value');
10580
- newReason.reason = reason;
10581
- reason = newReason;
10582
- }
10583
- return cb(reason);
10584
- }
10585
-
10586
- function callbackify(original) {
10587
- if (typeof original !== 'function') {
10588
- throw new TypeError('The "original" argument must be of type Function');
10589
- }
10590
-
10591
- // We DO NOT return the promise as it gives the user a false sense that
10592
- // the promise is actually somehow related to the callback's execution
10593
- // and that the callback throwing will reject the promise.
10594
- function callbackified() {
10595
- var args = [];
10596
- for (var i = 0; i < arguments.length; i++) {
10597
- args.push(arguments[i]);
10598
- }
10599
-
10600
- var maybeCb = args.pop();
10601
- if (typeof maybeCb !== 'function') {
10602
- throw new TypeError('The last argument must be of type Function');
10603
- }
10604
- var self = this;
10605
- var cb = function() {
10606
- return maybeCb.apply(self, arguments);
10607
- };
10608
- // In true node style we process the callback on `nextTick` with all the
10609
- // implications (stack, `uncaughtException`, `async_hooks`)
10610
- original.apply(this, args)
10611
- .then(function(ret) { process.nextTick(cb, null, ret) },
10612
- function(rej) { process.nextTick(callbackifyOnRejected, rej, cb) });
10613
- }
10614
-
10615
- Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
10616
- Object.defineProperties(callbackified,
10617
- getOwnPropertyDescriptors(original));
10618
- return callbackified;
10619
- }
10620
- exports.callbackify = callbackify;
10621
-
10622
- /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ "./node_modules/process/browser.js")))
10623
-
10624
- /***/ }),
10625
-
10626
9813
  /***/ "./node_modules/o3/index.js":
10627
9814
  /*!**********************************!*\
10628
9815
  !*** ./node_modules/o3/index.js ***!
@@ -10843,201 +10030,6 @@ module.exports = pDefer;
10843
10030
  /* WEBPACK VAR INJECTION */(function(Buffer) {!function(n,t){ true?module.exports=t():undefined}("undefined"!=typeof self?self:this,function(){return function(n){var t={};function r(e){if(t[e])return t[e].exports;var u=t[e]={i:e,l:!1,exports:{}};return n[e].call(u.exports,u,u.exports,r),u.l=!0,u.exports}return r.m=n,r.c=t,r.d=function(n,t,e){r.o(n,t)||Object.defineProperty(n,t,{configurable:!1,enumerable:!0,get:e})},r.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},r.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return r.d(t,"a",t),t},r.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},r.p="",r(r.s=0)}([function(n,t,r){"use strict";function e(n){if(!(this instanceof e))return new e(n);this._=n}var u=e.prototype;function o(n,t){for(var r=0;r<n;r++)t(r)}function i(n,t,r){return function(n,t){o(t.length,function(r){n(t[r],r,t)})}(function(r,e,u){t=n(t,r,e,u)},r),t}function a(n,t){return i(function(t,r,e,u){return t.concat([n(r,e,u)])},[],t)}function f(n,t){var r={v:0,buf:t};return o(n,function(){var n;r={v:r.v<<1|(n=r.buf,n[0]>>7),buf:function(n){var t=i(function(n,t,r,e){return n.concat(r===e.length-1?Buffer.from([t,0]).readUInt16BE(0):e.readUInt16BE(r))},[],n);return Buffer.from(a(function(n){return(n<<1&65535)>>8},t))}(r.buf)}}),r}function c(){return"undefined"!=typeof Buffer}function s(){if(!c())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function l(n){s();var t=i(function(n,t){return n+t},0,n);if(t%8!=0)throw new Error("The bits ["+n.join(", ")+"] add up to "+t+" which is not an even number of bytes; the total should be divisible by 8");var r,u=t/8,o=(r=function(n){return n>48},i(function(n,t){return n||(r(t)?t:n)},null,n));if(o)throw new Error(o+" bit range requested exceeds 48 bit (6 byte) Number max.");return new e(function(t,r){var e=u+r;return e>t.length?x(r,u.toString()+" bytes"):b(e,i(function(n,t){var r=f(t,n.buf);return{coll:n.coll.concat(r.v),buf:r.buf}},{coll:[],buf:t.slice(r,e)},n).coll)})}function h(n,t){return new e(function(r,e){return s(),e+t>r.length?x(e,t+" bytes for "+n):b(e+t,r.slice(e,e+t))})}function p(n,t){if("number"!=typeof(r=t)||Math.floor(r)!==r||t<0||t>6)throw new Error(n+" requires integer length in range [0, 6].");var r}function d(n){return p("uintBE",n),h("uintBE("+n+")",n).map(function(t){return t.readUIntBE(0,n)})}function v(n){return p("uintLE",n),h("uintLE("+n+")",n).map(function(t){return t.readUIntLE(0,n)})}function g(n){return p("intBE",n),h("intBE("+n+")",n).map(function(t){return t.readIntBE(0,n)})}function m(n){return p("intLE",n),h("intLE("+n+")",n).map(function(t){return t.readIntLE(0,n)})}function y(n){return n instanceof e}function E(n){return"[object Array]"==={}.toString.call(n)}function w(n){return c()&&Buffer.isBuffer(n)}function b(n,t){return{status:!0,index:n,value:t,furthest:-1,expected:[]}}function x(n,t){return E(t)||(t=[t]),{status:!1,index:-1,value:null,furthest:n,expected:t}}function B(n,t){if(!t)return n;if(n.furthest>t.furthest)return n;var r=n.furthest===t.furthest?function(n,t){if(function(){if(void 0!==e._supportsSet)return e._supportsSet;var n="undefined"!=typeof Set;return e._supportsSet=n,n}()&&Array.from){for(var r=new Set(n),u=0;u<t.length;u++)r.add(t[u]);var o=Array.from(r);return o.sort(),o}for(var i={},a=0;a<n.length;a++)i[n[a]]=!0;for(var f=0;f<t.length;f++)i[t[f]]=!0;var c=[];for(var s in i)({}).hasOwnProperty.call(i,s)&&c.push(s);return c.sort(),c}(n.expected,t.expected):t.expected;return{status:n.status,index:n.index,value:n.value,furthest:t.furthest,expected:r}}var j={};function S(n,t){if(w(n))return{offset:t,line:-1,column:-1};n in j||(j[n]={});for(var r=j[n],e=0,u=0,o=0,i=t;i>=0;){if(i in r){e=r[i].line,0===o&&(o=r[i].lineStart);break}("\n"===n.charAt(i)||"\r"===n.charAt(i)&&"\n"!==n.charAt(i+1))&&(u++,0===o&&(o=i+1)),i--}var a=e+u,f=t-o;return r[t]={line:a,lineStart:o},{offset:t,line:a+1,column:f+1}}function _(n){if(!y(n))throw new Error("not a parser: "+n)}function L(n,t){return"string"==typeof n?n.charAt(t):n[t]}function O(n){if("number"!=typeof n)throw new Error("not a number: "+n)}function k(n){if("function"!=typeof n)throw new Error("not a function: "+n)}function P(n){if("string"!=typeof n)throw new Error("not a string: "+n)}var q=2,A=3,I=8,F=5*I,M=4*I,z=" ";function R(n,t){return new Array(t+1).join(n)}function U(n,t,r){var e=t-n.length;return e<=0?n:R(r,e)+n}function W(n,t,r,e){return{from:n-t>0?n-t:0,to:n+r>e?e:n+r}}function D(n,t){var r,e,u,o,f,c=t.index,s=c.offset,l=1;if(s===n.length)return"Got the end of the input";if(w(n)){var h=s-s%I,p=s-h,d=W(h,F,M+I,n.length),v=a(function(n){return a(function(n){return U(n.toString(16),2,"0")},n)},function(n,t){var r=n.length,e=[],u=0;if(r<=t)return[n.slice()];for(var o=0;o<r;o++)e[u]||e.push([]),e[u].push(n[o]),(o+1)%t==0&&u++;return e}(n.slice(d.from,d.to).toJSON().data,I));o=function(n){return 0===n.from&&1===n.to?{from:n.from,to:n.to}:{from:n.from/I,to:Math.floor(n.to/I)}}(d),e=h/I,r=3*p,p>=4&&(r+=1),l=2,u=a(function(n){return n.length<=4?n.join(" "):n.slice(0,4).join(" ")+" "+n.slice(4).join(" ")},v),(f=(8*(o.to>0?o.to-1:o.to)).toString(16).length)<2&&(f=2)}else{var g=n.split(/\r\n|[\n\r\u2028\u2029]/);r=c.column-1,e=c.line-1,o=W(e,q,A,g.length),u=g.slice(o.from,o.to),f=o.to.toString().length}var m=e-o.from;return w(n)&&(f=(8*(o.to>0?o.to-1:o.to)).toString(16).length)<2&&(f=2),i(function(t,e,u){var i,a=u===m,c=a?"> ":z;return i=w(n)?U((8*(o.from+u)).toString(16),f,"0"):U((o.from+u+1).toString(),f," "),[].concat(t,[c+i+" | "+e],a?[z+R(" ",f)+" | "+U("",r," ")+R("^",l)]:[])},[],u).join("\n")}function N(n,t){return["\n","-- PARSING FAILED "+R("-",50),"\n\n",D(n,t),"\n\n",(r=t.expected,1===r.length?"Expected:\n\n"+r[0]:"Expected one of the following: \n\n"+r.join(", ")),"\n"].join("");var r}function G(n){return void 0!==n.flags?n.flags:[n.global?"g":"",n.ignoreCase?"i":"",n.multiline?"m":"",n.unicode?"u":"",n.sticky?"y":""].join("")}function C(){for(var n=[].slice.call(arguments),t=n.length,r=0;r<t;r+=1)_(n[r]);return e(function(r,e){for(var u,o=new Array(t),i=0;i<t;i+=1){if(!(u=B(n[i]._(r,e),u)).status)return u;o[i]=u.value,e=u.index}return B(b(e,o),u)})}function J(){var n=[].slice.call(arguments);if(0===n.length)throw new Error("seqMap needs at least one argument");var t=n.pop();return k(t),C.apply(null,n).map(function(n){return t.apply(null,n)})}function T(){var n=[].slice.call(arguments),t=n.length;if(0===t)return Y("zero alternates");for(var r=0;r<t;r+=1)_(n[r]);return e(function(t,r){for(var e,u=0;u<n.length;u+=1)if((e=B(n[u]._(t,r),e)).status)return e;return e})}function V(n,t){return H(n,t).or(X([]))}function H(n,t){return _(n),_(t),J(n,t.then(n).many(),function(n,t){return[n].concat(t)})}function K(n){P(n);var t="'"+n+"'";return e(function(r,e){var u=e+n.length,o=r.slice(e,u);return o===n?b(u,o):x(e,t)})}function Q(n,t){!function(n){if(!(n instanceof RegExp))throw new Error("not a regexp: "+n);for(var t=G(n),r=0;r<t.length;r++){var e=t.charAt(r);if("i"!==e&&"m"!==e&&"u"!==e&&"s"!==e)throw new Error('unsupported regexp flag "'+e+'": '+n)}}(n),arguments.length>=2?O(t):t=0;var r=function(n){return RegExp("^(?:"+n.source+")",G(n))}(n),u=""+n;return e(function(n,e){var o=r.exec(n.slice(e));if(o){if(0<=t&&t<=o.length){var i=o[0],a=o[t];return b(e+i.length,a)}return x(e,"valid match group (0 to "+o.length+") in "+u)}return x(e,u)})}function X(n){return e(function(t,r){return b(r,n)})}function Y(n){return e(function(t,r){return x(r,n)})}function Z(n){if(y(n))return e(function(t,r){var e=n._(t,r);return e.index=r,e.value="",e});if("string"==typeof n)return Z(K(n));if(n instanceof RegExp)return Z(Q(n));throw new Error("not a string, regexp, or parser: "+n)}function $(n){return _(n),e(function(t,r){var e=n._(t,r),u=t.slice(r,e.index);return e.status?x(r,'not "'+u+'"'):b(r,null)})}function nn(n){return k(n),e(function(t,r){var e=L(t,r);return r<t.length&&n(e)?b(r+1,e):x(r,"a character/byte matching "+n)})}function tn(n,t){arguments.length<2&&(t=n,n=void 0);var r=e(function(n,e){return r._=t()._,r._(n,e)});return n?r.desc(n):r}function rn(){return Y("fantasy-land/empty")}u.parse=function(n){if("string"!=typeof n&&!w(n))throw new Error(".parse must be called with a string or Buffer as its argument");var t,r=this.skip(an)._(n,0);return t=r.status?{status:!0,value:r.value}:{status:!1,index:S(n,r.furthest),expected:r.expected},delete j[n],t},u.tryParse=function(n){var t=this.parse(n);if(t.status)return t.value;var r=N(n,t),e=new Error(r);throw e.type="ParsimmonError",e.result=t,e},u.assert=function(n,t){return this.chain(function(r){return n(r)?X(r):Y(t)})},u.or=function(n){return T(this,n)},u.trim=function(n){return this.wrap(n,n)},u.wrap=function(n,t){return J(n,this,t,function(n,t){return t})},u.thru=function(n){return n(this)},u.then=function(n){return _(n),C(this,n).map(function(n){return n[1]})},u.many=function(){var n=this;return e(function(t,r){for(var e=[],u=void 0;;){if(!(u=B(n._(t,r),u)).status)return B(b(r,e),u);if(r===u.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");r=u.index,e.push(u.value)}})},u.tieWith=function(n){return P(n),this.map(function(t){if(function(n){if(!E(n))throw new Error("not an array: "+n)}(t),t.length){P(t[0]);for(var r=t[0],e=1;e<t.length;e++)P(t[e]),r+=n+t[e];return r}return""})},u.tie=function(){return this.tieWith("")},u.times=function(n,t){var r=this;return arguments.length<2&&(t=n),O(n),O(t),e(function(e,u){for(var o=[],i=void 0,a=void 0,f=0;f<n;f+=1){if(a=B(i=r._(e,u),a),!i.status)return a;u=i.index,o.push(i.value)}for(;f<t&&(a=B(i=r._(e,u),a),i.status);f+=1)u=i.index,o.push(i.value);return B(b(u,o),a)})},u.result=function(n){return this.map(function(){return n})},u.atMost=function(n){return this.times(0,n)},u.atLeast=function(n){return J(this.times(n),this.many(),function(n,t){return n.concat(t)})},u.map=function(n){k(n);var t=this;return e(function(r,e){var u=t._(r,e);return u.status?B(b(u.index,n(u.value)),u):u})},u.contramap=function(n){k(n);var t=this;return e(function(r,e){var u=t.parse(n(r.slice(e)));return u.status?b(e+r.length,u.value):u})},u.promap=function(n,t){return k(n),k(t),this.contramap(n).map(t)},u.skip=function(n){return C(this,n).map(function(n){return n[0]})},u.mark=function(){return J(en,this,en,function(n,t,r){return{start:n,value:t,end:r}})},u.node=function(n){return J(en,this,en,function(t,r,e){return{name:n,value:r,start:t,end:e}})},u.sepBy=function(n){return V(this,n)},u.sepBy1=function(n){return H(this,n)},u.lookahead=function(n){return this.skip(Z(n))},u.notFollowedBy=function(n){return this.skip($(n))},u.desc=function(n){E(n)||(n=[n]);var t=this;return e(function(r,e){var u=t._(r,e);return u.status||(u.expected=n),u})},u.fallback=function(n){return this.or(X(n))},u.ap=function(n){return J(n,this,function(n,t){return n(t)})},u.chain=function(n){var t=this;return e(function(r,e){var u=t._(r,e);return u.status?B(n(u.value)._(r,u.index),u):u})},u.concat=u.or,u.empty=rn,u.of=X,u["fantasy-land/ap"]=u.ap,u["fantasy-land/chain"]=u.chain,u["fantasy-land/concat"]=u.concat,u["fantasy-land/empty"]=u.empty,u["fantasy-land/of"]=u.of,u["fantasy-land/map"]=u.map;var en=e(function(n,t){return b(t,S(n,t))}),un=e(function(n,t){return t>=n.length?x(t,"any character/byte"):b(t+1,L(n,t))}),on=e(function(n,t){return b(n.length,n.slice(t))}),an=e(function(n,t){return t<n.length?x(t,"EOF"):b(t,null)}),fn=Q(/[0-9]/).desc("a digit"),cn=Q(/[0-9]*/).desc("optional digits"),sn=Q(/[a-z]/i).desc("a letter"),ln=Q(/[a-z]*/i).desc("optional letters"),hn=Q(/\s*/).desc("optional whitespace"),pn=Q(/\s+/).desc("whitespace"),dn=K("\r"),vn=K("\n"),gn=K("\r\n"),mn=T(gn,vn,dn).desc("newline"),yn=T(mn,an);e.all=on,e.alt=T,e.any=un,e.cr=dn,e.createLanguage=function(n){var t={};for(var r in n)({}).hasOwnProperty.call(n,r)&&function(r){t[r]=tn(function(){return n[r](t)})}(r);return t},e.crlf=gn,e.custom=function(n){return e(n(b,x))},e.digit=fn,e.digits=cn,e.empty=rn,e.end=yn,e.eof=an,e.fail=Y,e.formatError=N,e.index=en,e.isParser=y,e.lazy=tn,e.letter=sn,e.letters=ln,e.lf=vn,e.lookahead=Z,e.makeFailure=x,e.makeSuccess=b,e.newline=mn,e.noneOf=function(n){return nn(function(t){return n.indexOf(t)<0}).desc("none of '"+n+"'")},e.notFollowedBy=$,e.of=X,e.oneOf=function(n){for(var t=n.split(""),r=0;r<t.length;r++)t[r]="'"+t[r]+"'";return nn(function(t){return n.indexOf(t)>=0}).desc(t)},e.optWhitespace=hn,e.Parser=e,e.range=function(n,t){return nn(function(r){return n<=r&&r<=t}).desc(n+"-"+t)},e.regex=Q,e.regexp=Q,e.sepBy=V,e.sepBy1=H,e.seq=C,e.seqMap=J,e.seqObj=function(){for(var n,t={},r=0,u=(n=arguments,Array.prototype.slice.call(n)),o=u.length,i=0;i<o;i+=1){var a=u[i];if(!y(a)){if(E(a)&&2===a.length&&"string"==typeof a[0]&&y(a[1])){var f=a[0];if(Object.prototype.hasOwnProperty.call(t,f))throw new Error("seqObj: duplicate key "+f);t[f]=!0,r++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(0===r)throw new Error("seqObj expects at least one named parser, found zero");return e(function(n,t){for(var r,e={},i=0;i<o;i+=1){var a,f;if(E(u[i])?(a=u[i][0],f=u[i][1]):(a=null,f=u[i]),!(r=B(f._(n,t),r)).status)return r;a&&(e[a]=r.value),t=r.index}return B(b(t,e),r)})},e.string=K,e.succeed=X,e.takeWhile=function(n){return k(n),e(function(t,r){for(var e=r;e<t.length&&n(L(t,e));)e++;return b(e,t.slice(r,e))})},e.test=nn,e.whitespace=pn,e["fantasy-land/empty"]=rn,e["fantasy-land/of"]=X,e.Binary={bitSeq:l,bitSeqObj:function(n){s();var t={},r=0,e=a(function(n){if(E(n)){var e=n;if(2!==e.length)throw new Error("["+e.join(", ")+"] should be length 2, got length "+e.length);if(P(e[0]),O(e[1]),Object.prototype.hasOwnProperty.call(t,e[0]))throw new Error("duplicate key in bitSeqObj: "+e[0]);return t[e[0]]=!0,r++,e}return O(n),[null,n]},n);if(r<1)throw new Error("bitSeqObj expects at least one named pair, got ["+n.join(", ")+"]");var u=a(function(n){return n[0]},e);return l(a(function(n){return n[1]},e)).map(function(n){return i(function(n,t){return null!==t[0]&&(n[t[0]]=t[1]),n},{},a(function(t,r){return[t,n[r]]},u))})},byte:function(n){if(s(),O(n),n>255)throw new Error("Value specified to byte constructor ("+n+"=0x"+n.toString(16)+") is larger in value than a single byte.");var t=(n>15?"0x":"0x0")+n.toString(16);return e(function(r,e){var u=L(r,e);return u===n?b(e+1,u):x(e,t)})},buffer:function(n){return h("buffer",n).map(function(n){return Buffer.from(n)})},encodedString:function(n,t){return h("string",t).map(function(t){return t.toString(n)})},uintBE:d,uint8BE:d(1),uint16BE:d(2),uint32BE:d(4),uintLE:v,uint8LE:v(1),uint16LE:v(2),uint32LE:v(4),intBE:g,int8BE:g(1),int16BE:g(2),int32BE:g(4),intLE:m,int8LE:m(1),int16LE:m(2),int32LE:m(4),floatBE:h("floatBE",4).map(function(n){return n.readFloatBE(0)}),floatLE:h("floatLE",4).map(function(n){return n.readFloatLE(0)}),doubleBE:h("doubleBE",8).map(function(n){return n.readDoubleBE(0)}),doubleLE:h("doubleLE",8).map(function(n){return n.readDoubleLE(0)})},n.exports=e}])});
10844
10031
  /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/node_modules/buffer/index.js */ "./node_modules/node-libs-browser/node_modules/buffer/index.js").Buffer))
10845
10032
 
10846
- /***/ }),
10847
-
10848
- /***/ "./node_modules/process/browser.js":
10849
- /*!*****************************************!*\
10850
- !*** ./node_modules/process/browser.js ***!
10851
- \*****************************************/
10852
- /*! no static exports found */
10853
- /***/ (function(module, exports) {
10854
-
10855
- // shim for using process in browser
10856
- var process = module.exports = {};
10857
-
10858
- // cached from whatever global is present so that test runners that stub it
10859
- // don't break things. But we need to wrap it in a try catch in case it is
10860
- // wrapped in strict mode code which doesn't define any globals. It's inside a
10861
- // function because try/catches deoptimize in certain engines.
10862
-
10863
- var cachedSetTimeout;
10864
- var cachedClearTimeout;
10865
-
10866
- function defaultSetTimout() {
10867
- throw new Error('setTimeout has not been defined');
10868
- }
10869
- function defaultClearTimeout () {
10870
- throw new Error('clearTimeout has not been defined');
10871
- }
10872
- (function () {
10873
- try {
10874
- if (typeof setTimeout === 'function') {
10875
- cachedSetTimeout = setTimeout;
10876
- } else {
10877
- cachedSetTimeout = defaultSetTimout;
10878
- }
10879
- } catch (e) {
10880
- cachedSetTimeout = defaultSetTimout;
10881
- }
10882
- try {
10883
- if (typeof clearTimeout === 'function') {
10884
- cachedClearTimeout = clearTimeout;
10885
- } else {
10886
- cachedClearTimeout = defaultClearTimeout;
10887
- }
10888
- } catch (e) {
10889
- cachedClearTimeout = defaultClearTimeout;
10890
- }
10891
- } ())
10892
- function runTimeout(fun) {
10893
- if (cachedSetTimeout === setTimeout) {
10894
- //normal enviroments in sane situations
10895
- return setTimeout(fun, 0);
10896
- }
10897
- // if setTimeout wasn't available but was latter defined
10898
- if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
10899
- cachedSetTimeout = setTimeout;
10900
- return setTimeout(fun, 0);
10901
- }
10902
- try {
10903
- // when when somebody has screwed with setTimeout but no I.E. maddness
10904
- return cachedSetTimeout(fun, 0);
10905
- } catch(e){
10906
- try {
10907
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
10908
- return cachedSetTimeout.call(null, fun, 0);
10909
- } catch(e){
10910
- // 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
10911
- return cachedSetTimeout.call(this, fun, 0);
10912
- }
10913
- }
10914
-
10915
-
10916
- }
10917
- function runClearTimeout(marker) {
10918
- if (cachedClearTimeout === clearTimeout) {
10919
- //normal enviroments in sane situations
10920
- return clearTimeout(marker);
10921
- }
10922
- // if clearTimeout wasn't available but was latter defined
10923
- if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
10924
- cachedClearTimeout = clearTimeout;
10925
- return clearTimeout(marker);
10926
- }
10927
- try {
10928
- // when when somebody has screwed with setTimeout but no I.E. maddness
10929
- return cachedClearTimeout(marker);
10930
- } catch (e){
10931
- try {
10932
- // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
10933
- return cachedClearTimeout.call(null, marker);
10934
- } catch (e){
10935
- // 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.
10936
- // Some versions of I.E. have different rules for clearTimeout vs setTimeout
10937
- return cachedClearTimeout.call(this, marker);
10938
- }
10939
- }
10940
-
10941
-
10942
-
10943
- }
10944
- var queue = [];
10945
- var draining = false;
10946
- var currentQueue;
10947
- var queueIndex = -1;
10948
-
10949
- function cleanUpNextTick() {
10950
- if (!draining || !currentQueue) {
10951
- return;
10952
- }
10953
- draining = false;
10954
- if (currentQueue.length) {
10955
- queue = currentQueue.concat(queue);
10956
- } else {
10957
- queueIndex = -1;
10958
- }
10959
- if (queue.length) {
10960
- drainQueue();
10961
- }
10962
- }
10963
-
10964
- function drainQueue() {
10965
- if (draining) {
10966
- return;
10967
- }
10968
- var timeout = runTimeout(cleanUpNextTick);
10969
- draining = true;
10970
-
10971
- var len = queue.length;
10972
- while(len) {
10973
- currentQueue = queue;
10974
- queue = [];
10975
- while (++queueIndex < len) {
10976
- if (currentQueue) {
10977
- currentQueue[queueIndex].run();
10978
- }
10979
- }
10980
- queueIndex = -1;
10981
- len = queue.length;
10982
- }
10983
- currentQueue = null;
10984
- draining = false;
10985
- runClearTimeout(timeout);
10986
- }
10987
-
10988
- process.nextTick = function (fun) {
10989
- var args = new Array(arguments.length - 1);
10990
- if (arguments.length > 1) {
10991
- for (var i = 1; i < arguments.length; i++) {
10992
- args[i - 1] = arguments[i];
10993
- }
10994
- }
10995
- queue.push(new Item(fun, args));
10996
- if (queue.length === 1 && !draining) {
10997
- runTimeout(drainQueue);
10998
- }
10999
- };
11000
-
11001
- // v8 likes predictible objects
11002
- function Item(fun, array) {
11003
- this.fun = fun;
11004
- this.array = array;
11005
- }
11006
- Item.prototype.run = function () {
11007
- this.fun.apply(null, this.array);
11008
- };
11009
- process.title = 'browser';
11010
- process.browser = true;
11011
- process.env = {};
11012
- process.argv = [];
11013
- process.version = ''; // empty string to avoid regexp issues
11014
- process.versions = {};
11015
-
11016
- function noop() {}
11017
-
11018
- process.on = noop;
11019
- process.addListener = noop;
11020
- process.once = noop;
11021
- process.off = noop;
11022
- process.removeListener = noop;
11023
- process.removeAllListeners = noop;
11024
- process.emit = noop;
11025
- process.prependListener = noop;
11026
- process.prependOnceListener = noop;
11027
-
11028
- process.listeners = function (name) { return [] }
11029
-
11030
- process.binding = function (name) {
11031
- throw new Error('process.binding is not supported');
11032
- };
11033
-
11034
- process.cwd = function () { return '/' };
11035
- process.chdir = function (dir) {
11036
- throw new Error('process.chdir is not supported');
11037
- };
11038
- process.umask = function() { return 0; };
11039
-
11040
-
11041
10033
  /***/ }),
11042
10034
 
11043
10035
  /***/ "./node_modules/queue-microtask/index.js":
@@ -12196,6 +11188,107 @@ exports.default = _default;
12196
11188
 
12197
11189
  /***/ }),
12198
11190
 
11191
+ /***/ "./node_modules/ts-nested-error/build/nested-error.js":
11192
+ /*!************************************************************!*\
11193
+ !*** ./node_modules/ts-nested-error/build/nested-error.js ***!
11194
+ \************************************************************/
11195
+ /*! no static exports found */
11196
+ /***/ (function(module, exports, __webpack_require__) {
11197
+
11198
+ "use strict";
11199
+
11200
+ Object.defineProperty(exports, "__esModule", { value: true });
11201
+ exports.toError = exports.NestedError = void 0;
11202
+ /**
11203
+ * Subclass of standard `Error` that eagerly collects the callstack of the error
11204
+ * that caused it. This way you can investigate the core problem that happened
11205
+ * by looking at the callstack from up to bottom (from higher level errors to
11206
+ * lower level).
11207
+ */
11208
+ class NestedError extends Error {
11209
+ /**
11210
+ * Allocates an instance of `NestedError` with the given error `message` and
11211
+ * optional `innerError` (which will be automatically coerced using `toError()`).
11212
+ *
11213
+ * @param message Laconic error message to attach to the created `NestedError`.
11214
+ * @param innerErrors Optional errors that will be wrapped by this higher level
11215
+ * error. This value will be automatically coerced using `toError()`.
11216
+ */
11217
+ constructor(message, ...innerErrors) {
11218
+ super(message);
11219
+ const thisErrorReport = NestedError.getErrorReport(this);
11220
+ if (innerErrors.length === 1) {
11221
+ const innerError = toError(innerErrors[0]);
11222
+ this.innerErrors = [innerError];
11223
+ const errReport = NestedError.getErrorReport(innerError);
11224
+ this.stack = `${thisErrorReport}\n\n======= INNER ERROR =======\n\n${errReport}`;
11225
+ return;
11226
+ }
11227
+ this.innerErrors = innerErrors.map(err => toError(err));
11228
+ const innerErrorReports = this.innerErrors
11229
+ .map((error, idx) => {
11230
+ const errReport = NestedError.getErrorReport(error);
11231
+ return `======= INNER ERROR (${idx + 1} of ${innerErrors.length}) =======\n\n${errReport}`;
11232
+ })
11233
+ .join("\n\n");
11234
+ this.stack = `${thisErrorReport}\n\n${innerErrorReports}`;
11235
+ }
11236
+ /**
11237
+ * Provides the first `Error` of the `innerErrors` (if it exists);
11238
+ * otherwise, `null`.
11239
+ *
11240
+ * @deprecated Please shift to using the `innerErrors` (with an 's') property.
11241
+ */
11242
+ get innerError() {
11243
+ return this.innerErrors.length === 0
11244
+ ? null
11245
+ : this.innerErrors[0];
11246
+ }
11247
+ /**
11248
+ * Returns the function that accepts any value that was thrown as the first argument and
11249
+ * throws it wrapped into `NestedError` or class derived from `NestedError` (provided
11250
+ * this method was called directly in the context of that dervied class constructor)
11251
+ * with the given `message`.
11252
+ * Returned function will pass accepted `Error` object directly to `NestedError`
11253
+ * as `innerErrors` by invoking `toError(err)` on it.
11254
+ *
11255
+ * You'll most likely want to use this method with promises:
11256
+ *
11257
+ * ```ts
11258
+ * userService.getPage().then(
11259
+ * data => console.log(`Hooray! data: ${data}`),
11260
+ * NestedError.rethrow('failed to fetch users page')
11261
+ * );
11262
+ * ```
11263
+ *
11264
+ * @param message Message to attach `NestedError` created by the returned function.
11265
+ */
11266
+ static rethrow(message) {
11267
+ return (...errs) => { throw new this(message, ...errs); };
11268
+ }
11269
+ }
11270
+ exports.NestedError = NestedError;
11271
+ NestedError.getErrorReport = typeof new Error().stack === 'string'
11272
+ ? (err) => err.stack
11273
+ : (err) => `${err.name}: ${err.message}`;
11274
+ NestedError.prototype.name = "NestedError";
11275
+ function toError(err) {
11276
+ try {
11277
+ return err instanceof Error
11278
+ ? err
11279
+ : new Error(`Value that is not an instance of Error was thrown: ${err}`);
11280
+ }
11281
+ catch {
11282
+ return new Error("Failed to stringify non-instance of Error that was thrown." +
11283
+ "This is possibly due to the fact that toString() method of the value" +
11284
+ "doesn't return a primitive value.");
11285
+ }
11286
+ }
11287
+ exports.toError = toError;
11288
+ //# sourceMappingURL=nested-error.js.map
11289
+
11290
+ /***/ }),
11291
+
12199
11292
  /***/ "./node_modules/u3/index.js":
12200
11293
  /*!**********************************!*\
12201
11294
  !*** ./node_modules/u3/index.js ***!