chai 4.3.2 → 4.3.6

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/chai.js CHANGED
@@ -14,7 +14,7 @@ var used = [];
14
14
  * Chai version
15
15
  */
16
16
 
17
- exports.version = '4.3.2';
17
+ exports.version = '4.3.3';
18
18
 
19
19
  /*!
20
20
  * Assertion Error
@@ -95,7 +95,7 @@ exports.use(should);
95
95
  var assert = require('./chai/interface/assert');
96
96
  exports.use(assert);
97
97
 
98
- },{"./chai/assertion":3,"./chai/config":4,"./chai/core/assertions":5,"./chai/interface/assert":6,"./chai/interface/expect":7,"./chai/interface/should":8,"./chai/utils":23,"assertion-error":34}],3:[function(require,module,exports){
98
+ },{"./chai/assertion":3,"./chai/config":4,"./chai/core/assertions":5,"./chai/interface/assert":6,"./chai/interface/expect":7,"./chai/interface/should":8,"./chai/utils":22,"assertion-error":33}],3:[function(require,module,exports){
99
99
  /*!
100
100
  * chai
101
101
  * http://chaijs.com
@@ -1951,7 +1951,7 @@ module.exports = function (chai, _) {
1951
1951
  , errorMessage
1952
1952
  , shouldThrow = true
1953
1953
  , range = (startType === 'date' && finishType === 'date')
1954
- ? start.toUTCString() + '..' + finish.toUTCString()
1954
+ ? start.toISOString() + '..' + finish.toISOString()
1955
1955
  : start + '..' + finish;
1956
1956
 
1957
1957
  if (doLength && objType !== 'map' && objType !== 'set') {
@@ -7762,7 +7762,7 @@ module.exports = function addChainableMethod(ctx, name, method, chainingBehavior
7762
7762
  });
7763
7763
  };
7764
7764
 
7765
- },{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":31,"./transferFlags":33}],10:[function(require,module,exports){
7765
+ },{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":30,"./transferFlags":32}],10:[function(require,module,exports){
7766
7766
  var fnLengthDesc = Object.getOwnPropertyDescriptor(function () {}, 'length');
7767
7767
 
7768
7768
  /*!
@@ -7894,7 +7894,7 @@ module.exports = function addMethod(ctx, name, method) {
7894
7894
  ctx[name] = proxify(methodWrapper, name);
7895
7895
  };
7896
7896
 
7897
- },{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":31,"./transferFlags":33}],12:[function(require,module,exports){
7897
+ },{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":30,"./transferFlags":32}],12:[function(require,module,exports){
7898
7898
  /*!
7899
7899
  * Chai - addProperty utility
7900
7900
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -7968,7 +7968,7 @@ module.exports = function addProperty(ctx, name, getter) {
7968
7968
  });
7969
7969
  };
7970
7970
 
7971
- },{"../../chai":2,"./flag":15,"./isProxyEnabled":26,"./transferFlags":33}],13:[function(require,module,exports){
7971
+ },{"../../chai":2,"./flag":15,"./isProxyEnabled":25,"./transferFlags":32}],13:[function(require,module,exports){
7972
7972
  /*!
7973
7973
  * Chai - compareByInspect utility
7974
7974
  * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
@@ -8001,7 +8001,7 @@ module.exports = function compareByInspect(a, b) {
8001
8001
  return inspect(a) < inspect(b) ? -1 : 1;
8002
8002
  };
8003
8003
 
8004
- },{"./inspect":24}],14:[function(require,module,exports){
8004
+ },{"./inspect":23}],14:[function(require,module,exports){
8005
8005
  /*!
8006
8006
  * Chai - expectTypes utility
8007
8007
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -8054,7 +8054,7 @@ module.exports = function expectTypes(obj, types) {
8054
8054
  }
8055
8055
  };
8056
8056
 
8057
- },{"./flag":15,"assertion-error":34,"type-detect":39}],15:[function(require,module,exports){
8057
+ },{"./flag":15,"assertion-error":33,"type-detect":39}],15:[function(require,module,exports){
8058
8058
  /*!
8059
8059
  * Chai - flag utility
8060
8060
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -8112,34 +8112,6 @@ module.exports = function getActual(obj, args) {
8112
8112
  };
8113
8113
 
8114
8114
  },{}],17:[function(require,module,exports){
8115
- /*!
8116
- * Chai - getEnumerableProperties utility
8117
- * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
8118
- * MIT Licensed
8119
- */
8120
-
8121
- /**
8122
- * ### .getEnumerableProperties(object)
8123
- *
8124
- * This allows the retrieval of enumerable property names of an object,
8125
- * inherited or not.
8126
- *
8127
- * @param {Object} object
8128
- * @returns {Array}
8129
- * @namespace Utils
8130
- * @name getEnumerableProperties
8131
- * @api public
8132
- */
8133
-
8134
- module.exports = function getEnumerableProperties(object) {
8135
- var result = [];
8136
- for (var name in object) {
8137
- result.push(name);
8138
- }
8139
- return result;
8140
- };
8141
-
8142
- },{}],18:[function(require,module,exports){
8143
8115
  /*!
8144
8116
  * Chai - message composition utility
8145
8117
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -8191,7 +8163,7 @@ module.exports = function getMessage(obj, args) {
8191
8163
  return flagMsg ? flagMsg + ': ' + msg : msg;
8192
8164
  };
8193
8165
 
8194
- },{"./flag":15,"./getActual":16,"./objDisplay":27}],19:[function(require,module,exports){
8166
+ },{"./flag":15,"./getActual":16,"./objDisplay":26}],18:[function(require,module,exports){
8195
8167
  var type = require('type-detect');
8196
8168
 
8197
8169
  var flag = require('./flag');
@@ -8248,7 +8220,7 @@ module.exports = function getOperator(obj, args) {
8248
8220
  return isObject ? 'deepStrictEqual' : 'strictEqual';
8249
8221
  };
8250
8222
 
8251
- },{"./flag":15,"type-detect":39}],20:[function(require,module,exports){
8223
+ },{"./flag":15,"type-detect":39}],19:[function(require,module,exports){
8252
8224
  /*!
8253
8225
  * Chai - getOwnEnumerableProperties utility
8254
8226
  * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
@@ -8279,7 +8251,7 @@ module.exports = function getOwnEnumerableProperties(obj) {
8279
8251
  return Object.keys(obj).concat(getOwnEnumerablePropertySymbols(obj));
8280
8252
  };
8281
8253
 
8282
- },{"./getOwnEnumerablePropertySymbols":21}],21:[function(require,module,exports){
8254
+ },{"./getOwnEnumerablePropertySymbols":20}],20:[function(require,module,exports){
8283
8255
  /*!
8284
8256
  * Chai - getOwnEnumerablePropertySymbols utility
8285
8257
  * Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
@@ -8308,7 +8280,7 @@ module.exports = function getOwnEnumerablePropertySymbols(obj) {
8308
8280
  });
8309
8281
  };
8310
8282
 
8311
- },{}],22:[function(require,module,exports){
8283
+ },{}],21:[function(require,module,exports){
8312
8284
  /*!
8313
8285
  * Chai - getProperties utility
8314
8286
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -8346,7 +8318,7 @@ module.exports = function getProperties(object) {
8346
8318
  return result;
8347
8319
  };
8348
8320
 
8349
- },{}],23:[function(require,module,exports){
8321
+ },{}],22:[function(require,module,exports){
8350
8322
  /*!
8351
8323
  * chai
8352
8324
  * Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
@@ -8525,13 +8497,12 @@ exports.isNaN = require('./isNaN');
8525
8497
  */
8526
8498
 
8527
8499
  exports.getOperator = require('./getOperator');
8528
- },{"./addChainableMethod":9,"./addLengthGuard":10,"./addMethod":11,"./addProperty":12,"./compareByInspect":13,"./expectTypes":14,"./flag":15,"./getActual":16,"./getMessage":18,"./getOperator":19,"./getOwnEnumerableProperties":20,"./getOwnEnumerablePropertySymbols":21,"./inspect":24,"./isNaN":25,"./isProxyEnabled":26,"./objDisplay":27,"./overwriteChainableMethod":28,"./overwriteMethod":29,"./overwriteProperty":30,"./proxify":31,"./test":32,"./transferFlags":33,"check-error":35,"deep-eql":36,"get-func-name":37,"pathval":38,"type-detect":39}],24:[function(require,module,exports){
8500
+ },{"./addChainableMethod":9,"./addLengthGuard":10,"./addMethod":11,"./addProperty":12,"./compareByInspect":13,"./expectTypes":14,"./flag":15,"./getActual":16,"./getMessage":17,"./getOperator":18,"./getOwnEnumerableProperties":19,"./getOwnEnumerablePropertySymbols":20,"./inspect":23,"./isNaN":24,"./isProxyEnabled":25,"./objDisplay":26,"./overwriteChainableMethod":27,"./overwriteMethod":28,"./overwriteProperty":29,"./proxify":30,"./test":31,"./transferFlags":32,"check-error":34,"deep-eql":35,"get-func-name":36,"pathval":38,"type-detect":39}],23:[function(require,module,exports){
8529
8501
  // This is (almost) directly from Node.js utils
8530
8502
  // https://github.com/joyent/node/blob/f8c335d0caf47f16d31413f89aa28eda3878e3aa/lib/util.js
8531
8503
 
8532
8504
  var getName = require('get-func-name');
8533
- var getProperties = require('./getProperties');
8534
- var getEnumerableProperties = require('./getEnumerableProperties');
8505
+ var loupe = require('loupe');
8535
8506
  var config = require('../config');
8536
8507
 
8537
8508
  module.exports = inspect;
@@ -8552,358 +8523,16 @@ module.exports = inspect;
8552
8523
  * @name inspect
8553
8524
  */
8554
8525
  function inspect(obj, showHidden, depth, colors) {
8555
- var ctx = {
8526
+ var options = {
8527
+ colors: colors,
8528
+ depth: (typeof depth === 'undefined' ? 2 : depth),
8556
8529
  showHidden: showHidden,
8557
- seen: [],
8558
- stylize: function (str) { return str; }
8530
+ truncate: config.truncateThreshold ? config.truncateThreshold : Infinity,
8559
8531
  };
8560
- return formatValue(ctx, obj, (typeof depth === 'undefined' ? 2 : depth));
8561
- }
8562
-
8563
- // Returns true if object is a DOM element.
8564
- var isDOMElement = function (object) {
8565
- if (typeof HTMLElement === 'object') {
8566
- return object instanceof HTMLElement;
8567
- } else {
8568
- return object &&
8569
- typeof object === 'object' &&
8570
- 'nodeType' in object &&
8571
- object.nodeType === 1 &&
8572
- typeof object.nodeName === 'string';
8573
- }
8574
- };
8575
-
8576
- function formatValue(ctx, value, recurseTimes) {
8577
- // Provide a hook for user-specified inspect functions.
8578
- // Check that value is an object with an inspect function on it
8579
- if (value && typeof value.inspect === 'function' &&
8580
- // Filter out the util module, it's inspect function is special
8581
- value.inspect !== exports.inspect &&
8582
- // Also filter out any prototype objects using the circular check.
8583
- !(value.constructor && value.constructor.prototype === value)) {
8584
- var ret = value.inspect(recurseTimes, ctx);
8585
- if (typeof ret !== 'string') {
8586
- ret = formatValue(ctx, ret, recurseTimes);
8587
- }
8588
- return ret;
8589
- }
8590
-
8591
- // Primitive types cannot have properties
8592
- var primitive = formatPrimitive(ctx, value);
8593
- if (primitive) {
8594
- return primitive;
8595
- }
8596
-
8597
- // If this is a DOM element, try to get the outer HTML.
8598
- if (isDOMElement(value)) {
8599
- if ('outerHTML' in value) {
8600
- return value.outerHTML;
8601
- // This value does not have an outerHTML attribute,
8602
- // it could still be an XML element
8603
- } else {
8604
- // Attempt to serialize it
8605
- try {
8606
- if (document.xmlVersion) {
8607
- var xmlSerializer = new XMLSerializer();
8608
- return xmlSerializer.serializeToString(value);
8609
- } else {
8610
- // Firefox 11- do not support outerHTML
8611
- // It does, however, support innerHTML
8612
- // Use the following to render the element
8613
- var ns = "http://www.w3.org/1999/xhtml";
8614
- var container = document.createElementNS(ns, '_');
8615
-
8616
- container.appendChild(value.cloneNode(false));
8617
- var html = container.innerHTML
8618
- .replace('><', '>' + value.innerHTML + '<');
8619
- container.innerHTML = '';
8620
- return html;
8621
- }
8622
- } catch (err) {
8623
- // This could be a non-native DOM implementation,
8624
- // continue with the normal flow:
8625
- // printing the element as if it is an object.
8626
- }
8627
- }
8628
- }
8629
-
8630
- // Look up the keys of the object.
8631
- var visibleKeys = getEnumerableProperties(value);
8632
- var keys = ctx.showHidden ? getProperties(value) : visibleKeys;
8633
-
8634
- var name, nameSuffix;
8635
-
8636
- // Some type of object without properties can be shortcut.
8637
- // In IE, errors have a single `stack` property, or if they are vanilla `Error`,
8638
- // a `stack` plus `description` property; ignore those for consistency.
8639
- if (keys.length === 0 || (isError(value) && (
8640
- (keys.length === 1 && keys[0] === 'stack') ||
8641
- (keys.length === 2 && keys[0] === 'description' && keys[1] === 'stack')
8642
- ))) {
8643
- if (typeof value === 'function') {
8644
- name = getName(value);
8645
- nameSuffix = name ? ': ' + name : '';
8646
- return ctx.stylize('[Function' + nameSuffix + ']', 'special');
8647
- }
8648
- if (isRegExp(value)) {
8649
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
8650
- }
8651
- if (isDate(value)) {
8652
- return ctx.stylize(Date.prototype.toUTCString.call(value), 'date');
8653
- }
8654
- if (isError(value)) {
8655
- return formatError(value);
8656
- }
8657
- }
8658
-
8659
- var base = ''
8660
- , array = false
8661
- , typedArray = false
8662
- , braces = ['{', '}'];
8663
-
8664
- if (isTypedArray(value)) {
8665
- typedArray = true;
8666
- braces = ['[', ']'];
8667
- }
8668
-
8669
- // Make Array say that they are Array
8670
- if (isArray(value)) {
8671
- array = true;
8672
- braces = ['[', ']'];
8673
- }
8674
-
8675
- // Make functions say that they are functions
8676
- if (typeof value === 'function') {
8677
- name = getName(value);
8678
- nameSuffix = name ? ': ' + name : '';
8679
- base = ' [Function' + nameSuffix + ']';
8680
- }
8681
-
8682
- // Make RegExps say that they are RegExps
8683
- if (isRegExp(value)) {
8684
- base = ' ' + RegExp.prototype.toString.call(value);
8685
- }
8686
-
8687
- // Make dates with properties first say the date
8688
- if (isDate(value)) {
8689
- base = ' ' + Date.prototype.toUTCString.call(value);
8690
- }
8691
-
8692
- // Make error with message first say the error
8693
- if (isError(value)) {
8694
- return formatError(value);
8695
- }
8696
-
8697
- if (keys.length === 0 && (!array || value.length == 0)) {
8698
- return braces[0] + base + braces[1];
8699
- }
8700
-
8701
- if (recurseTimes < 0) {
8702
- if (isRegExp(value)) {
8703
- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');
8704
- } else {
8705
- return ctx.stylize('[Object]', 'special');
8706
- }
8707
- }
8708
-
8709
- ctx.seen.push(value);
8710
-
8711
- var output;
8712
- if (array) {
8713
- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
8714
- } else if (typedArray) {
8715
- return formatTypedArray(value);
8716
- } else {
8717
- output = keys.map(function(key) {
8718
- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
8719
- });
8720
- }
8721
-
8722
- ctx.seen.pop();
8723
-
8724
- return reduceToSingleString(output, base, braces);
8532
+ return loupe.inspect(obj, options);
8725
8533
  }
8726
8534
 
8727
- function formatPrimitive(ctx, value) {
8728
- switch (typeof value) {
8729
- case 'undefined':
8730
- return ctx.stylize('undefined', 'undefined');
8731
-
8732
- case 'string':
8733
- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '')
8734
- .replace(/'/g, "\\'")
8735
- .replace(/\\"/g, '"') + '\'';
8736
- return ctx.stylize(simple, 'string');
8737
-
8738
- case 'number':
8739
- if (value === 0 && (1/value) === -Infinity) {
8740
- return ctx.stylize('-0', 'number');
8741
- }
8742
- return ctx.stylize('' + value, 'number');
8743
-
8744
- case 'boolean':
8745
- return ctx.stylize('' + value, 'boolean');
8746
-
8747
- case 'symbol':
8748
- return ctx.stylize(value.toString(), 'symbol');
8749
- }
8750
- // For some reason typeof null is "object", so special case here.
8751
- if (value === null) {
8752
- return ctx.stylize('null', 'null');
8753
- }
8754
- }
8755
-
8756
- function formatError(value) {
8757
- return '[' + Error.prototype.toString.call(value) + ']';
8758
- }
8759
-
8760
- function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
8761
- var output = [];
8762
- for (var i = 0, l = value.length; i < l; ++i) {
8763
- if (Object.prototype.hasOwnProperty.call(value, String(i))) {
8764
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
8765
- String(i), true));
8766
- } else {
8767
- output.push('');
8768
- }
8769
- }
8770
-
8771
- keys.forEach(function(key) {
8772
- if (!key.match(/^\d+$/)) {
8773
- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,
8774
- key, true));
8775
- }
8776
- });
8777
- return output;
8778
- }
8779
-
8780
- function formatTypedArray(value) {
8781
- var str = '[ ';
8782
-
8783
- for (var i = 0; i < value.length; ++i) {
8784
- if (str.length >= config.truncateThreshold - 7) {
8785
- str += '...';
8786
- break;
8787
- }
8788
- str += value[i] + ', ';
8789
- }
8790
- str += ' ]';
8791
-
8792
- // Removing trailing `, ` if the array was not truncated
8793
- if (str.indexOf(', ]') !== -1) {
8794
- str = str.replace(', ]', ' ]');
8795
- }
8796
-
8797
- return str;
8798
- }
8799
-
8800
- function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
8801
- var name;
8802
- var propDescriptor = Object.getOwnPropertyDescriptor(value, key);
8803
- var str;
8804
-
8805
- if (propDescriptor) {
8806
- if (propDescriptor.get) {
8807
- if (propDescriptor.set) {
8808
- str = ctx.stylize('[Getter/Setter]', 'special');
8809
- } else {
8810
- str = ctx.stylize('[Getter]', 'special');
8811
- }
8812
- } else {
8813
- if (propDescriptor.set) {
8814
- str = ctx.stylize('[Setter]', 'special');
8815
- }
8816
- }
8817
- }
8818
- if (visibleKeys.indexOf(key) < 0) {
8819
- name = '[' + key + ']';
8820
- }
8821
- if (!str) {
8822
- if (ctx.seen.indexOf(value[key]) < 0) {
8823
- if (recurseTimes === null) {
8824
- str = formatValue(ctx, value[key], null);
8825
- } else {
8826
- str = formatValue(ctx, value[key], recurseTimes - 1);
8827
- }
8828
- if (str.indexOf('\n') > -1) {
8829
- if (array) {
8830
- str = str.split('\n').map(function(line) {
8831
- return ' ' + line;
8832
- }).join('\n').substr(2);
8833
- } else {
8834
- str = '\n' + str.split('\n').map(function(line) {
8835
- return ' ' + line;
8836
- }).join('\n');
8837
- }
8838
- }
8839
- } else {
8840
- str = ctx.stylize('[Circular]', 'special');
8841
- }
8842
- }
8843
- if (typeof name === 'undefined') {
8844
- if (array && key.match(/^\d+$/)) {
8845
- return str;
8846
- }
8847
- name = JSON.stringify('' + key);
8848
- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
8849
- name = name.substr(1, name.length - 2);
8850
- name = ctx.stylize(name, 'name');
8851
- } else {
8852
- name = name.replace(/'/g, "\\'")
8853
- .replace(/\\"/g, '"')
8854
- .replace(/(^"|"$)/g, "'");
8855
- name = ctx.stylize(name, 'string');
8856
- }
8857
- }
8858
-
8859
- return name + ': ' + str;
8860
- }
8861
-
8862
- function reduceToSingleString(output, base, braces) {
8863
- var length = output.reduce(function(prev, cur) {
8864
- return prev + cur.length + 1;
8865
- }, 0);
8866
-
8867
- if (length > 60) {
8868
- return braces[0] +
8869
- (base === '' ? '' : base + '\n ') +
8870
- ' ' +
8871
- output.join(',\n ') +
8872
- ' ' +
8873
- braces[1];
8874
- }
8875
-
8876
- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];
8877
- }
8878
-
8879
- function isTypedArray(ar) {
8880
- // Unfortunately there's no way to check if an object is a TypedArray
8881
- // We have to check if it's one of these types
8882
- return (typeof ar === 'object' && /\w+Array]$/.test(objectToString(ar)));
8883
- }
8884
-
8885
- function isArray(ar) {
8886
- return Array.isArray(ar) ||
8887
- (typeof ar === 'object' && objectToString(ar) === '[object Array]');
8888
- }
8889
-
8890
- function isRegExp(re) {
8891
- return typeof re === 'object' && objectToString(re) === '[object RegExp]';
8892
- }
8893
-
8894
- function isDate(d) {
8895
- return typeof d === 'object' && objectToString(d) === '[object Date]';
8896
- }
8897
-
8898
- function isError(e) {
8899
- return typeof e === 'object' && objectToString(e) === '[object Error]';
8900
- }
8901
-
8902
- function objectToString(o) {
8903
- return Object.prototype.toString.call(o);
8904
- }
8905
-
8906
- },{"../config":4,"./getEnumerableProperties":17,"./getProperties":22,"get-func-name":37}],25:[function(require,module,exports){
8535
+ },{"../config":4,"get-func-name":36,"loupe":37}],24:[function(require,module,exports){
8907
8536
  /*!
8908
8537
  * Chai - isNaN utility
8909
8538
  * Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
@@ -8931,7 +8560,7 @@ function isNaN(value) {
8931
8560
  // If ECMAScript 6's Number.isNaN is present, prefer that.
8932
8561
  module.exports = Number.isNaN || isNaN;
8933
8562
 
8934
- },{}],26:[function(require,module,exports){
8563
+ },{}],25:[function(require,module,exports){
8935
8564
  var config = require('../config');
8936
8565
 
8937
8566
  /*!
@@ -8957,7 +8586,7 @@ module.exports = function isProxyEnabled() {
8957
8586
  typeof Reflect !== 'undefined';
8958
8587
  };
8959
8588
 
8960
- },{"../config":4}],27:[function(require,module,exports){
8589
+ },{"../config":4}],26:[function(require,module,exports){
8961
8590
  /*!
8962
8591
  * Chai - flag utility
8963
8592
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -9009,7 +8638,7 @@ module.exports = function objDisplay(obj) {
9009
8638
  }
9010
8639
  };
9011
8640
 
9012
- },{"../config":4,"./inspect":24}],28:[function(require,module,exports){
8641
+ },{"../config":4,"./inspect":23}],27:[function(require,module,exports){
9013
8642
  /*!
9014
8643
  * Chai - overwriteChainableMethod utility
9015
8644
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -9080,7 +8709,7 @@ module.exports = function overwriteChainableMethod(ctx, name, method, chainingBe
9080
8709
  };
9081
8710
  };
9082
8711
 
9083
- },{"../../chai":2,"./transferFlags":33}],29:[function(require,module,exports){
8712
+ },{"../../chai":2,"./transferFlags":32}],28:[function(require,module,exports){
9084
8713
  /*!
9085
8714
  * Chai - overwriteMethod utility
9086
8715
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -9174,7 +8803,7 @@ module.exports = function overwriteMethod(ctx, name, method) {
9174
8803
  ctx[name] = proxify(overwritingMethodWrapper, name);
9175
8804
  };
9176
8805
 
9177
- },{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":31,"./transferFlags":33}],30:[function(require,module,exports){
8806
+ },{"../../chai":2,"./addLengthGuard":10,"./flag":15,"./proxify":30,"./transferFlags":32}],29:[function(require,module,exports){
9178
8807
  /*!
9179
8808
  * Chai - overwriteProperty utility
9180
8809
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -9268,7 +8897,7 @@ module.exports = function overwriteProperty(ctx, name, getter) {
9268
8897
  });
9269
8898
  };
9270
8899
 
9271
- },{"../../chai":2,"./flag":15,"./isProxyEnabled":26,"./transferFlags":33}],31:[function(require,module,exports){
8900
+ },{"../../chai":2,"./flag":15,"./isProxyEnabled":25,"./transferFlags":32}],30:[function(require,module,exports){
9272
8901
  var config = require('../config');
9273
8902
  var flag = require('./flag');
9274
8903
  var getProperties = require('./getProperties');
@@ -9417,7 +9046,7 @@ function stringDistanceCapped(strA, strB, cap) {
9417
9046
  return memo[strA.length][strB.length];
9418
9047
  }
9419
9048
 
9420
- },{"../config":4,"./flag":15,"./getProperties":22,"./isProxyEnabled":26}],32:[function(require,module,exports){
9049
+ },{"../config":4,"./flag":15,"./getProperties":21,"./isProxyEnabled":25}],31:[function(require,module,exports){
9421
9050
  /*!
9422
9051
  * Chai - test utility
9423
9052
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -9447,7 +9076,7 @@ module.exports = function test(obj, args) {
9447
9076
  return negate ? !expr : expr;
9448
9077
  };
9449
9078
 
9450
- },{"./flag":15}],33:[function(require,module,exports){
9079
+ },{"./flag":15}],32:[function(require,module,exports){
9451
9080
  /*!
9452
9081
  * Chai - transferFlags utility
9453
9082
  * Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
@@ -9494,7 +9123,7 @@ module.exports = function transferFlags(assertion, object, includeAll) {
9494
9123
  }
9495
9124
  };
9496
9125
 
9497
- },{}],34:[function(require,module,exports){
9126
+ },{}],33:[function(require,module,exports){
9498
9127
  /*!
9499
9128
  * assertion-error
9500
9129
  * Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
@@ -9612,7 +9241,7 @@ AssertionError.prototype.toJSON = function (stack) {
9612
9241
  return props;
9613
9242
  };
9614
9243
 
9615
- },{}],35:[function(require,module,exports){
9244
+ },{}],34:[function(require,module,exports){
9616
9245
  'use strict';
9617
9246
 
9618
9247
  /* !
@@ -9786,7 +9415,7 @@ module.exports = {
9786
9415
  getConstructorName: getConstructorName,
9787
9416
  };
9788
9417
 
9789
- },{}],36:[function(require,module,exports){
9418
+ },{}],35:[function(require,module,exports){
9790
9419
  'use strict';
9791
9420
  /* globals Symbol: false, Uint8Array: false, WeakMap: false */
9792
9421
  /*!
@@ -10243,7 +9872,7 @@ function isPrimitive(value) {
10243
9872
  return value === null || typeof value !== 'object';
10244
9873
  }
10245
9874
 
10246
- },{"type-detect":39}],37:[function(require,module,exports){
9875
+ },{"type-detect":39}],36:[function(require,module,exports){
10247
9876
  'use strict';
10248
9877
 
10249
9878
  /* !
@@ -10289,7 +9918,856 @@ function getFuncName(aFunc) {
10289
9918
 
10290
9919
  module.exports = getFuncName;
10291
9920
 
10292
- },{}],38:[function(require,module,exports){
9921
+ },{}],37:[function(require,module,exports){
9922
+ (function (global, factory) {
9923
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
9924
+ typeof define === 'function' && define.amd ? define(['exports'], factory) :
9925
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.loupe = {}));
9926
+ }(this, (function (exports) { 'use strict';
9927
+
9928
+ function _typeof(obj) {
9929
+ "@babel/helpers - typeof";
9930
+
9931
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
9932
+ _typeof = function (obj) {
9933
+ return typeof obj;
9934
+ };
9935
+ } else {
9936
+ _typeof = function (obj) {
9937
+ return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
9938
+ };
9939
+ }
9940
+
9941
+ return _typeof(obj);
9942
+ }
9943
+
9944
+ function _slicedToArray(arr, i) {
9945
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
9946
+ }
9947
+
9948
+ function _arrayWithHoles(arr) {
9949
+ if (Array.isArray(arr)) return arr;
9950
+ }
9951
+
9952
+ function _iterableToArrayLimit(arr, i) {
9953
+ if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
9954
+ var _arr = [];
9955
+ var _n = true;
9956
+ var _d = false;
9957
+ var _e = undefined;
9958
+
9959
+ try {
9960
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
9961
+ _arr.push(_s.value);
9962
+
9963
+ if (i && _arr.length === i) break;
9964
+ }
9965
+ } catch (err) {
9966
+ _d = true;
9967
+ _e = err;
9968
+ } finally {
9969
+ try {
9970
+ if (!_n && _i["return"] != null) _i["return"]();
9971
+ } finally {
9972
+ if (_d) throw _e;
9973
+ }
9974
+ }
9975
+
9976
+ return _arr;
9977
+ }
9978
+
9979
+ function _unsupportedIterableToArray(o, minLen) {
9980
+ if (!o) return;
9981
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
9982
+ var n = Object.prototype.toString.call(o).slice(8, -1);
9983
+ if (n === "Object" && o.constructor) n = o.constructor.name;
9984
+ if (n === "Map" || n === "Set") return Array.from(o);
9985
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
9986
+ }
9987
+
9988
+ function _arrayLikeToArray(arr, len) {
9989
+ if (len == null || len > arr.length) len = arr.length;
9990
+
9991
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
9992
+
9993
+ return arr2;
9994
+ }
9995
+
9996
+ function _nonIterableRest() {
9997
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
9998
+ }
9999
+
10000
+ var ansiColors = {
10001
+ bold: ['1', '22'],
10002
+ dim: ['2', '22'],
10003
+ italic: ['3', '23'],
10004
+ underline: ['4', '24'],
10005
+ // 5 & 6 are blinking
10006
+ inverse: ['7', '27'],
10007
+ hidden: ['8', '28'],
10008
+ strike: ['9', '29'],
10009
+ // 10-20 are fonts
10010
+ // 21-29 are resets for 1-9
10011
+ black: ['30', '39'],
10012
+ red: ['31', '39'],
10013
+ green: ['32', '39'],
10014
+ yellow: ['33', '39'],
10015
+ blue: ['34', '39'],
10016
+ magenta: ['35', '39'],
10017
+ cyan: ['36', '39'],
10018
+ white: ['37', '39'],
10019
+ brightblack: ['30;1', '39'],
10020
+ brightred: ['31;1', '39'],
10021
+ brightgreen: ['32;1', '39'],
10022
+ brightyellow: ['33;1', '39'],
10023
+ brightblue: ['34;1', '39'],
10024
+ brightmagenta: ['35;1', '39'],
10025
+ brightcyan: ['36;1', '39'],
10026
+ brightwhite: ['37;1', '39'],
10027
+ grey: ['90', '39']
10028
+ };
10029
+ var styles = {
10030
+ special: 'cyan',
10031
+ number: 'yellow',
10032
+ bigint: 'yellow',
10033
+ boolean: 'yellow',
10034
+ undefined: 'grey',
10035
+ null: 'bold',
10036
+ string: 'green',
10037
+ symbol: 'green',
10038
+ date: 'magenta',
10039
+ regexp: 'red'
10040
+ };
10041
+ var truncator = '…';
10042
+
10043
+ function colorise(value, styleType) {
10044
+ var color = ansiColors[styles[styleType]] || ansiColors[styleType];
10045
+
10046
+ if (!color) {
10047
+ return String(value);
10048
+ }
10049
+
10050
+ return "\x1B[".concat(color[0], "m").concat(String(value), "\x1B[").concat(color[1], "m");
10051
+ }
10052
+
10053
+ function normaliseOptions() {
10054
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10055
+ _ref$showHidden = _ref.showHidden,
10056
+ showHidden = _ref$showHidden === void 0 ? false : _ref$showHidden,
10057
+ _ref$depth = _ref.depth,
10058
+ depth = _ref$depth === void 0 ? 2 : _ref$depth,
10059
+ _ref$colors = _ref.colors,
10060
+ colors = _ref$colors === void 0 ? false : _ref$colors,
10061
+ _ref$customInspect = _ref.customInspect,
10062
+ customInspect = _ref$customInspect === void 0 ? true : _ref$customInspect,
10063
+ _ref$showProxy = _ref.showProxy,
10064
+ showProxy = _ref$showProxy === void 0 ? false : _ref$showProxy,
10065
+ _ref$maxArrayLength = _ref.maxArrayLength,
10066
+ maxArrayLength = _ref$maxArrayLength === void 0 ? Infinity : _ref$maxArrayLength,
10067
+ _ref$breakLength = _ref.breakLength,
10068
+ breakLength = _ref$breakLength === void 0 ? Infinity : _ref$breakLength,
10069
+ _ref$seen = _ref.seen,
10070
+ seen = _ref$seen === void 0 ? [] : _ref$seen,
10071
+ _ref$truncate = _ref.truncate,
10072
+ truncate = _ref$truncate === void 0 ? Infinity : _ref$truncate,
10073
+ _ref$stylize = _ref.stylize,
10074
+ stylize = _ref$stylize === void 0 ? String : _ref$stylize;
10075
+
10076
+ var options = {
10077
+ showHidden: Boolean(showHidden),
10078
+ depth: Number(depth),
10079
+ colors: Boolean(colors),
10080
+ customInspect: Boolean(customInspect),
10081
+ showProxy: Boolean(showProxy),
10082
+ maxArrayLength: Number(maxArrayLength),
10083
+ breakLength: Number(breakLength),
10084
+ truncate: Number(truncate),
10085
+ seen: seen,
10086
+ stylize: stylize
10087
+ };
10088
+
10089
+ if (options.colors) {
10090
+ options.stylize = colorise;
10091
+ }
10092
+
10093
+ return options;
10094
+ }
10095
+ function truncate(string, length) {
10096
+ var tail = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : truncator;
10097
+ string = String(string);
10098
+ var tailLength = tail.length;
10099
+ var stringLength = string.length;
10100
+
10101
+ if (tailLength > length && stringLength > tailLength) {
10102
+ return tail;
10103
+ }
10104
+
10105
+ if (stringLength > length && stringLength > tailLength) {
10106
+ return "".concat(string.slice(0, length - tailLength)).concat(tail);
10107
+ }
10108
+
10109
+ return string;
10110
+ } // eslint-disable-next-line complexity
10111
+
10112
+ function inspectList(list, options, inspectItem) {
10113
+ var separator = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : ', ';
10114
+ inspectItem = inspectItem || options.inspect;
10115
+ var size = list.length;
10116
+ if (size === 0) return '';
10117
+ var originalLength = options.truncate;
10118
+ var output = '';
10119
+ var peek = '';
10120
+ var truncated = '';
10121
+
10122
+ for (var i = 0; i < size; i += 1) {
10123
+ var last = i + 1 === list.length;
10124
+ var secondToLast = i + 2 === list.length;
10125
+ truncated = "".concat(truncator, "(").concat(list.length - i, ")");
10126
+ var value = list[i]; // If there is more than one remaining we need to account for a separator of `, `
10127
+
10128
+ options.truncate = originalLength - output.length - (last ? 0 : separator.length);
10129
+ var string = peek || inspectItem(value, options) + (last ? '' : separator);
10130
+ var nextLength = output.length + string.length;
10131
+ var truncatedLength = nextLength + truncated.length; // If this is the last element, and adding it would
10132
+ // take us over length, but adding the truncator wouldn't - then break now
10133
+
10134
+ if (last && nextLength > originalLength && output.length + truncated.length <= originalLength) {
10135
+ break;
10136
+ } // If this isn't the last or second to last element to scan,
10137
+ // but the string is already over length then break here
10138
+
10139
+
10140
+ if (!last && !secondToLast && truncatedLength > originalLength) {
10141
+ break;
10142
+ } // Peek at the next string to determine if we should
10143
+ // break early before adding this item to the output
10144
+
10145
+
10146
+ peek = last ? '' : inspectItem(list[i + 1], options) + (secondToLast ? '' : separator); // If we have one element left, but this element and
10147
+ // the next takes over length, the break early
10148
+
10149
+ if (!last && secondToLast && truncatedLength > originalLength && nextLength + peek.length > originalLength) {
10150
+ break;
10151
+ }
10152
+
10153
+ output += string; // If the next element takes us to length -
10154
+ // but there are more after that, then we should truncate now
10155
+
10156
+ if (!last && !secondToLast && nextLength + peek.length >= originalLength) {
10157
+ truncated = "".concat(truncator, "(").concat(list.length - i - 1, ")");
10158
+ break;
10159
+ }
10160
+
10161
+ truncated = '';
10162
+ }
10163
+
10164
+ return "".concat(output).concat(truncated);
10165
+ }
10166
+
10167
+ function quoteComplexKey(key) {
10168
+ if (key.match(/^[a-zA-Z_][a-zA-Z_0-9]*$/)) {
10169
+ return key;
10170
+ }
10171
+
10172
+ return JSON.stringify(key).replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
10173
+ }
10174
+
10175
+ function inspectProperty(_ref2, options) {
10176
+ var _ref3 = _slicedToArray(_ref2, 2),
10177
+ key = _ref3[0],
10178
+ value = _ref3[1];
10179
+
10180
+ options.truncate -= 2;
10181
+
10182
+ if (typeof key === 'string') {
10183
+ key = quoteComplexKey(key);
10184
+ } else if (typeof key !== 'number') {
10185
+ key = "[".concat(options.inspect(key, options), "]");
10186
+ }
10187
+
10188
+ options.truncate -= key.length;
10189
+ value = options.inspect(value, options);
10190
+ return "".concat(key, ": ").concat(value);
10191
+ }
10192
+
10193
+ function inspectArray(array, options) {
10194
+ // Object.keys will always output the Array indices first, so we can slice by
10195
+ // `array.length` to get non-index properties
10196
+ var nonIndexProperties = Object.keys(array).slice(array.length);
10197
+ if (!array.length && !nonIndexProperties.length) return '[]';
10198
+ options.truncate -= 4;
10199
+ var listContents = inspectList(array, options);
10200
+ options.truncate -= listContents.length;
10201
+ var propertyContents = '';
10202
+
10203
+ if (nonIndexProperties.length) {
10204
+ propertyContents = inspectList(nonIndexProperties.map(function (key) {
10205
+ return [key, array[key]];
10206
+ }), options, inspectProperty);
10207
+ }
10208
+
10209
+ return "[ ".concat(listContents).concat(propertyContents ? ", ".concat(propertyContents) : '', " ]");
10210
+ }
10211
+
10212
+ /* !
10213
+ * Chai - getFuncName utility
10214
+ * Copyright(c) 2012-2016 Jake Luer <jake@alogicalparadox.com>
10215
+ * MIT Licensed
10216
+ */
10217
+
10218
+ /**
10219
+ * ### .getFuncName(constructorFn)
10220
+ *
10221
+ * Returns the name of a function.
10222
+ * When a non-function instance is passed, returns `null`.
10223
+ * This also includes a polyfill function if `aFunc.name` is not defined.
10224
+ *
10225
+ * @name getFuncName
10226
+ * @param {Function} funct
10227
+ * @namespace Utils
10228
+ * @api public
10229
+ */
10230
+
10231
+ var toString = Function.prototype.toString;
10232
+ var functionNameMatch = /\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;
10233
+ function getFuncName(aFunc) {
10234
+ if (typeof aFunc !== 'function') {
10235
+ return null;
10236
+ }
10237
+
10238
+ var name = '';
10239
+ if (typeof Function.prototype.name === 'undefined' && typeof aFunc.name === 'undefined') {
10240
+ // Here we run a polyfill if Function does not support the `name` property and if aFunc.name is not defined
10241
+ var match = toString.call(aFunc).match(functionNameMatch);
10242
+ if (match) {
10243
+ name = match[1];
10244
+ }
10245
+ } else {
10246
+ // If we've got a `name` property we just use it
10247
+ name = aFunc.name;
10248
+ }
10249
+
10250
+ return name;
10251
+ }
10252
+
10253
+ var getFuncName_1 = getFuncName;
10254
+
10255
+ var getArrayName = function getArrayName(array) {
10256
+ // We need to special case Node.js' Buffers, which report to be Uint8Array
10257
+ if (typeof Buffer === 'function' && array instanceof Buffer) {
10258
+ return 'Buffer';
10259
+ }
10260
+
10261
+ if (array[Symbol.toStringTag]) {
10262
+ return array[Symbol.toStringTag];
10263
+ }
10264
+
10265
+ return getFuncName_1(array.constructor);
10266
+ };
10267
+
10268
+ function inspectTypedArray(array, options) {
10269
+ var name = getArrayName(array);
10270
+ options.truncate -= name.length + 4; // Object.keys will always output the Array indices first, so we can slice by
10271
+ // `array.length` to get non-index properties
10272
+
10273
+ var nonIndexProperties = Object.keys(array).slice(array.length);
10274
+ if (!array.length && !nonIndexProperties.length) return "".concat(name, "[]"); // As we know TypedArrays only contain Unsigned Integers, we can skip inspecting each one and simply
10275
+ // stylise the toString() value of them
10276
+
10277
+ var output = '';
10278
+
10279
+ for (var i = 0; i < array.length; i++) {
10280
+ var string = "".concat(options.stylize(truncate(array[i], options.truncate), 'number')).concat(i === array.length - 1 ? '' : ', ');
10281
+ options.truncate -= string.length;
10282
+
10283
+ if (array[i] !== array.length && options.truncate <= 3) {
10284
+ output += "".concat(truncator, "(").concat(array.length - array[i] + 1, ")");
10285
+ break;
10286
+ }
10287
+
10288
+ output += string;
10289
+ }
10290
+
10291
+ var propertyContents = '';
10292
+
10293
+ if (nonIndexProperties.length) {
10294
+ propertyContents = inspectList(nonIndexProperties.map(function (key) {
10295
+ return [key, array[key]];
10296
+ }), options, inspectProperty);
10297
+ }
10298
+
10299
+ return "".concat(name, "[ ").concat(output).concat(propertyContents ? ", ".concat(propertyContents) : '', " ]");
10300
+ }
10301
+
10302
+ function inspectDate(dateObject, options) {
10303
+ // If we need to - truncate the time portion, but never the date
10304
+ var split = dateObject.toJSON().split('T');
10305
+ var date = split[0];
10306
+ return options.stylize("".concat(date, "T").concat(truncate(split[1], options.truncate - date.length - 1)), 'date');
10307
+ }
10308
+
10309
+ function inspectFunction(func, options) {
10310
+ var name = getFuncName_1(func);
10311
+
10312
+ if (!name) {
10313
+ return options.stylize('[Function]', 'special');
10314
+ }
10315
+
10316
+ return options.stylize("[Function ".concat(truncate(name, options.truncate - 11), "]"), 'special');
10317
+ }
10318
+
10319
+ function inspectMapEntry(_ref, options) {
10320
+ var _ref2 = _slicedToArray(_ref, 2),
10321
+ key = _ref2[0],
10322
+ value = _ref2[1];
10323
+
10324
+ options.truncate -= 4;
10325
+ key = options.inspect(key, options);
10326
+ options.truncate -= key.length;
10327
+ value = options.inspect(value, options);
10328
+ return "".concat(key, " => ").concat(value);
10329
+ } // IE11 doesn't support `map.entries()`
10330
+
10331
+
10332
+ function mapToEntries(map) {
10333
+ var entries = [];
10334
+ map.forEach(function (value, key) {
10335
+ entries.push([key, value]);
10336
+ });
10337
+ return entries;
10338
+ }
10339
+
10340
+ function inspectMap(map, options) {
10341
+ var size = map.size - 1;
10342
+
10343
+ if (size <= 0) {
10344
+ return 'Map{}';
10345
+ }
10346
+
10347
+ options.truncate -= 7;
10348
+ return "Map{ ".concat(inspectList(mapToEntries(map), options, inspectMapEntry), " }");
10349
+ }
10350
+
10351
+ var isNaN = Number.isNaN || function (i) {
10352
+ return i !== i;
10353
+ }; // eslint-disable-line no-self-compare
10354
+
10355
+
10356
+ function inspectNumber(number, options) {
10357
+ if (isNaN(number)) {
10358
+ return options.stylize('NaN', 'number');
10359
+ }
10360
+
10361
+ if (number === Infinity) {
10362
+ return options.stylize('Infinity', 'number');
10363
+ }
10364
+
10365
+ if (number === -Infinity) {
10366
+ return options.stylize('-Infinity', 'number');
10367
+ }
10368
+
10369
+ if (number === 0) {
10370
+ return options.stylize(1 / number === Infinity ? '+0' : '-0', 'number');
10371
+ }
10372
+
10373
+ return options.stylize(truncate(number, options.truncate), 'number');
10374
+ }
10375
+
10376
+ function inspectBigInt(number, options) {
10377
+ var nums = truncate(number.toString(), options.truncate - 1);
10378
+ if (nums !== truncator) nums += 'n';
10379
+ return options.stylize(nums, 'bigint');
10380
+ }
10381
+
10382
+ function inspectRegExp(value, options) {
10383
+ var flags = value.toString().split('/')[2];
10384
+ var sourceLength = options.truncate - (2 + flags.length);
10385
+ var source = value.source;
10386
+ return options.stylize("/".concat(truncate(source, sourceLength), "/").concat(flags), 'regexp');
10387
+ }
10388
+
10389
+ function arrayFromSet(set) {
10390
+ var values = [];
10391
+ set.forEach(function (value) {
10392
+ values.push(value);
10393
+ });
10394
+ return values;
10395
+ }
10396
+
10397
+ function inspectSet(set, options) {
10398
+ if (set.size === 0) return 'Set{}';
10399
+ options.truncate -= 7;
10400
+ return "Set{ ".concat(inspectList(arrayFromSet(set), options), " }");
10401
+ }
10402
+
10403
+ var stringEscapeChars = new RegExp("['\\u0000-\\u001f\\u007f-\\u009f\\u00ad\\u0600-\\u0604\\u070f\\u17b4\\u17b5" + "\\u200c-\\u200f\\u2028-\\u202f\\u2060-\\u206f\\ufeff\\ufff0-\\uffff]", 'g');
10404
+ var escapeCharacters = {
10405
+ '\b': '\\b',
10406
+ '\t': '\\t',
10407
+ '\n': '\\n',
10408
+ '\f': '\\f',
10409
+ '\r': '\\r',
10410
+ "'": "\\'",
10411
+ '\\': '\\\\'
10412
+ };
10413
+ var hex = 16;
10414
+ var unicodeLength = 4;
10415
+
10416
+ function escape(char) {
10417
+ return escapeCharacters[char] || "\\u".concat("0000".concat(char.charCodeAt(0).toString(hex)).slice(-unicodeLength));
10418
+ }
10419
+
10420
+ function inspectString(string, options) {
10421
+ if (stringEscapeChars.test(string)) {
10422
+ string = string.replace(stringEscapeChars, escape);
10423
+ }
10424
+
10425
+ return options.stylize("'".concat(truncate(string, options.truncate - 2), "'"), 'string');
10426
+ }
10427
+
10428
+ function inspectSymbol(value) {
10429
+ if ('description' in Symbol.prototype) {
10430
+ return value.description ? "Symbol(".concat(value.description, ")") : 'Symbol()';
10431
+ }
10432
+
10433
+ return value.toString();
10434
+ }
10435
+
10436
+ var getPromiseValue = function getPromiseValue() {
10437
+ return 'Promise{…}';
10438
+ };
10439
+
10440
+ try {
10441
+ var _process$binding = process.binding('util'),
10442
+ getPromiseDetails = _process$binding.getPromiseDetails,
10443
+ kPending = _process$binding.kPending,
10444
+ kRejected = _process$binding.kRejected;
10445
+
10446
+ if (Array.isArray(getPromiseDetails(Promise.resolve()))) {
10447
+ getPromiseValue = function getPromiseValue(value, options) {
10448
+ var _getPromiseDetails = getPromiseDetails(value),
10449
+ _getPromiseDetails2 = _slicedToArray(_getPromiseDetails, 2),
10450
+ state = _getPromiseDetails2[0],
10451
+ innerValue = _getPromiseDetails2[1];
10452
+
10453
+ if (state === kPending) {
10454
+ return 'Promise{<pending>}';
10455
+ }
10456
+
10457
+ return "Promise".concat(state === kRejected ? '!' : '', "{").concat(options.inspect(innerValue, options), "}");
10458
+ };
10459
+ }
10460
+ } catch (notNode) {
10461
+ /* ignore */
10462
+ }
10463
+
10464
+ var inspectPromise = getPromiseValue;
10465
+
10466
+ function inspectObject(object, options) {
10467
+ var properties = Object.getOwnPropertyNames(object);
10468
+ var symbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols(object) : [];
10469
+
10470
+ if (properties.length === 0 && symbols.length === 0) {
10471
+ return '{}';
10472
+ }
10473
+
10474
+ options.truncate -= 4;
10475
+ options.seen = options.seen || [];
10476
+
10477
+ if (options.seen.indexOf(object) >= 0) {
10478
+ return '[Circular]';
10479
+ }
10480
+
10481
+ options.seen.push(object);
10482
+ var propertyContents = inspectList(properties.map(function (key) {
10483
+ return [key, object[key]];
10484
+ }), options, inspectProperty);
10485
+ var symbolContents = inspectList(symbols.map(function (key) {
10486
+ return [key, object[key]];
10487
+ }), options, inspectProperty);
10488
+ options.seen.pop();
10489
+ var sep = '';
10490
+
10491
+ if (propertyContents && symbolContents) {
10492
+ sep = ', ';
10493
+ }
10494
+
10495
+ return "{ ".concat(propertyContents).concat(sep).concat(symbolContents, " }");
10496
+ }
10497
+
10498
+ var toStringTag = typeof Symbol !== 'undefined' && Symbol.toStringTag ? Symbol.toStringTag : false;
10499
+ function inspectClass(value, options) {
10500
+ var name = '';
10501
+
10502
+ if (toStringTag && toStringTag in value) {
10503
+ name = value[toStringTag];
10504
+ }
10505
+
10506
+ name = name || getFuncName_1(value.constructor); // Babel transforms anonymous classes to the name `_class`
10507
+
10508
+ if (!name || name === '_class') {
10509
+ name = '<Anonymous Class>';
10510
+ }
10511
+
10512
+ options.truncate -= name.length;
10513
+ return "".concat(name).concat(inspectObject(value, options));
10514
+ }
10515
+
10516
+ function inspectArguments(args, options) {
10517
+ if (args.length === 0) return 'Arguments[]';
10518
+ options.truncate -= 13;
10519
+ return "Arguments[ ".concat(inspectList(args, options), " ]");
10520
+ }
10521
+
10522
+ var errorKeys = ['stack', 'line', 'column', 'name', 'message', 'fileName', 'lineNumber', 'columnNumber', 'number', 'description'];
10523
+ function inspectObject$1(error, options) {
10524
+ var properties = Object.getOwnPropertyNames(error).filter(function (key) {
10525
+ return errorKeys.indexOf(key) === -1;
10526
+ });
10527
+ var name = error.name;
10528
+ options.truncate -= name.length;
10529
+ var message = '';
10530
+
10531
+ if (typeof error.message === 'string') {
10532
+ message = truncate(error.message, options.truncate);
10533
+ } else {
10534
+ properties.unshift('message');
10535
+ }
10536
+
10537
+ message = message ? ": ".concat(message) : '';
10538
+ options.truncate -= message.length + 5;
10539
+ var propertyContents = inspectList(properties.map(function (key) {
10540
+ return [key, error[key]];
10541
+ }), options, inspectProperty);
10542
+ return "".concat(name).concat(message).concat(propertyContents ? " { ".concat(propertyContents, " }") : '');
10543
+ }
10544
+
10545
+ function inspectAttribute(_ref, options) {
10546
+ var _ref2 = _slicedToArray(_ref, 2),
10547
+ key = _ref2[0],
10548
+ value = _ref2[1];
10549
+
10550
+ options.truncate -= 3;
10551
+
10552
+ if (!value) {
10553
+ return "".concat(options.stylize(key, 'yellow'));
10554
+ }
10555
+
10556
+ return "".concat(options.stylize(key, 'yellow'), "=").concat(options.stylize("\"".concat(value, "\""), 'string'));
10557
+ }
10558
+ function inspectHTMLCollection(collection, options) {
10559
+ // eslint-disable-next-line no-use-before-define
10560
+ return inspectList(collection, options, inspectHTML, '\n');
10561
+ }
10562
+ function inspectHTML(element, options) {
10563
+ var properties = element.getAttributeNames();
10564
+ var name = element.tagName.toLowerCase();
10565
+ var head = options.stylize("<".concat(name), 'special');
10566
+ var headClose = options.stylize(">", 'special');
10567
+ var tail = options.stylize("</".concat(name, ">"), 'special');
10568
+ options.truncate -= name.length * 2 + 5;
10569
+ var propertyContents = '';
10570
+
10571
+ if (properties.length > 0) {
10572
+ propertyContents += ' ';
10573
+ propertyContents += inspectList(properties.map(function (key) {
10574
+ return [key, element.getAttribute(key)];
10575
+ }), options, inspectAttribute, ' ');
10576
+ }
10577
+
10578
+ options.truncate -= propertyContents.length;
10579
+ var truncate = options.truncate;
10580
+ var children = inspectHTMLCollection(element.children, options);
10581
+
10582
+ if (children && children.length > truncate) {
10583
+ children = "".concat(truncator, "(").concat(element.children.length, ")");
10584
+ }
10585
+
10586
+ return "".concat(head).concat(propertyContents).concat(headClose).concat(children).concat(tail);
10587
+ }
10588
+
10589
+ var symbolsSupported = typeof Symbol === 'function' && typeof Symbol.for === 'function';
10590
+ var chaiInspect = symbolsSupported ? Symbol.for('chai/inspect') : '@@chai/inspect';
10591
+ var nodeInspect = false;
10592
+
10593
+ try {
10594
+ // eslint-disable-next-line global-require
10595
+ var nodeUtil = require('util');
10596
+
10597
+ nodeInspect = nodeUtil.inspect ? nodeUtil.inspect.custom : false;
10598
+ } catch (noNodeInspect) {
10599
+ nodeInspect = false;
10600
+ }
10601
+
10602
+ var constructorMap = new WeakMap();
10603
+ var stringTagMap = {};
10604
+ var baseTypesMap = {
10605
+ undefined: function undefined$1(value, options) {
10606
+ return options.stylize('undefined', 'undefined');
10607
+ },
10608
+ null: function _null(value, options) {
10609
+ return options.stylize(null, 'null');
10610
+ },
10611
+ boolean: function boolean(value, options) {
10612
+ return options.stylize(value, 'boolean');
10613
+ },
10614
+ Boolean: function Boolean(value, options) {
10615
+ return options.stylize(value, 'boolean');
10616
+ },
10617
+ number: inspectNumber,
10618
+ Number: inspectNumber,
10619
+ bigint: inspectBigInt,
10620
+ BigInt: inspectBigInt,
10621
+ string: inspectString,
10622
+ String: inspectString,
10623
+ function: inspectFunction,
10624
+ Function: inspectFunction,
10625
+ symbol: inspectSymbol,
10626
+ // A Symbol polyfill will return `Symbol` not `symbol` from typedetect
10627
+ Symbol: inspectSymbol,
10628
+ Array: inspectArray,
10629
+ Date: inspectDate,
10630
+ Map: inspectMap,
10631
+ Set: inspectSet,
10632
+ RegExp: inspectRegExp,
10633
+ Promise: inspectPromise,
10634
+ // WeakSet, WeakMap are totally opaque to us
10635
+ WeakSet: function WeakSet(value, options) {
10636
+ return options.stylize('WeakSet{…}', 'special');
10637
+ },
10638
+ WeakMap: function WeakMap(value, options) {
10639
+ return options.stylize('WeakMap{…}', 'special');
10640
+ },
10641
+ Arguments: inspectArguments,
10642
+ Int8Array: inspectTypedArray,
10643
+ Uint8Array: inspectTypedArray,
10644
+ Uint8ClampedArray: inspectTypedArray,
10645
+ Int16Array: inspectTypedArray,
10646
+ Uint16Array: inspectTypedArray,
10647
+ Int32Array: inspectTypedArray,
10648
+ Uint32Array: inspectTypedArray,
10649
+ Float32Array: inspectTypedArray,
10650
+ Float64Array: inspectTypedArray,
10651
+ Generator: function Generator() {
10652
+ return '';
10653
+ },
10654
+ DataView: function DataView() {
10655
+ return '';
10656
+ },
10657
+ ArrayBuffer: function ArrayBuffer() {
10658
+ return '';
10659
+ },
10660
+ Error: inspectObject$1,
10661
+ HTMLCollection: inspectHTMLCollection,
10662
+ NodeList: inspectHTMLCollection
10663
+ }; // eslint-disable-next-line complexity
10664
+
10665
+ var inspectCustom = function inspectCustom(value, options, type) {
10666
+ if (chaiInspect in value && typeof value[chaiInspect] === 'function') {
10667
+ return value[chaiInspect](options);
10668
+ }
10669
+
10670
+ if (nodeInspect && nodeInspect in value && typeof value[nodeInspect] === 'function') {
10671
+ return value[nodeInspect](options.depth, options);
10672
+ }
10673
+
10674
+ if ('inspect' in value && typeof value.inspect === 'function') {
10675
+ return value.inspect(options.depth, options);
10676
+ }
10677
+
10678
+ if ('constructor' in value && constructorMap.has(value.constructor)) {
10679
+ return constructorMap.get(value.constructor)(value, options);
10680
+ }
10681
+
10682
+ if (stringTagMap[type]) {
10683
+ return stringTagMap[type](value, options);
10684
+ }
10685
+
10686
+ return '';
10687
+ };
10688
+
10689
+ var toString$1 = Object.prototype.toString; // eslint-disable-next-line complexity
10690
+
10691
+ function inspect(value, options) {
10692
+ options = normaliseOptions(options);
10693
+ options.inspect = inspect;
10694
+ var _options = options,
10695
+ customInspect = _options.customInspect;
10696
+ var type = value === null ? 'null' : _typeof(value);
10697
+
10698
+ if (type === 'object') {
10699
+ type = toString$1.call(value).slice(8, -1);
10700
+ } // If it is a base value that we already support, then use Loupe's inspector
10701
+
10702
+
10703
+ if (baseTypesMap[type]) {
10704
+ return baseTypesMap[type](value, options);
10705
+ } // If `options.customInspect` is set to true then try to use the custom inspector
10706
+
10707
+
10708
+ if (customInspect && value) {
10709
+ var output = inspectCustom(value, options, type);
10710
+
10711
+ if (output) {
10712
+ if (typeof output === 'string') return output;
10713
+ return inspect(output, options);
10714
+ }
10715
+ }
10716
+
10717
+ var proto = value ? Object.getPrototypeOf(value) : false; // If it's a plain Object then use Loupe's inspector
10718
+
10719
+ if (proto === Object.prototype || proto === null) {
10720
+ return inspectObject(value, options);
10721
+ } // Specifically account for HTMLElements
10722
+ // eslint-disable-next-line no-undef
10723
+
10724
+
10725
+ if (value && typeof HTMLElement === 'function' && value instanceof HTMLElement) {
10726
+ return inspectHTML(value, options);
10727
+ }
10728
+
10729
+ if ('constructor' in value) {
10730
+ // If it is a class, inspect it like an object but add the constructor name
10731
+ if (value.constructor !== Object) {
10732
+ return inspectClass(value, options);
10733
+ } // If it is an object with an anonymous prototype, display it as an object.
10734
+
10735
+
10736
+ return inspectObject(value, options);
10737
+ } // We have run out of options! Just stringify the value
10738
+
10739
+
10740
+ return options.stylize(String(value), type);
10741
+ }
10742
+ function registerConstructor(constructor, inspector) {
10743
+ if (constructorMap.has(constructor)) {
10744
+ return false;
10745
+ }
10746
+
10747
+ constructorMap.add(constructor, inspector);
10748
+ return true;
10749
+ }
10750
+ function registerStringTag(stringTag, inspector) {
10751
+ if (stringTag in stringTagMap) {
10752
+ return false;
10753
+ }
10754
+
10755
+ stringTagMap[stringTag] = inspector;
10756
+ return true;
10757
+ }
10758
+ var custom = chaiInspect;
10759
+
10760
+ exports.custom = custom;
10761
+ exports.default = inspect;
10762
+ exports.inspect = inspect;
10763
+ exports.registerConstructor = registerConstructor;
10764
+ exports.registerStringTag = registerStringTag;
10765
+
10766
+ Object.defineProperty(exports, '__esModule', { value: true });
10767
+
10768
+ })));
10769
+
10770
+ },{"util":undefined}],38:[function(require,module,exports){
10293
10771
  'use strict';
10294
10772
 
10295
10773
  /* !