mocha 8.2.1 → 8.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/LICENSE +1 -1
- package/README.md +22 -59
- package/bin/mocha +0 -3
- package/lib/browser/growl.js +1 -1
- package/lib/cli/collect-files.js +25 -25
- package/lib/cli/config.js +6 -3
- package/lib/cli/options.js +7 -2
- package/lib/cli/watch-run.js +15 -11
- package/lib/errors.js +112 -5
- package/lib/esm-utils.js +23 -1
- package/lib/interfaces/bdd.js +0 -7
- package/lib/interfaces/common.js +0 -9
- package/lib/interfaces/qunit.js +0 -1
- package/lib/interfaces/tdd.js +0 -1
- package/lib/mocha.js +61 -19
- package/lib/runnable.js +7 -8
- package/lib/utils.js +3 -0
- package/mocha.js +1057 -677
- package/mocha.js.map +1 -1
- package/package.json +15 -14
package/mocha.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.mocha = factory());
|
|
5
5
|
}(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
|
+
var regeneratorRuntime;
|
|
8
|
+
|
|
7
9
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
10
|
|
|
9
11
|
function createCommonjsModule(fn, basedir, module) {
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
check(typeof self == 'object' && self) ||
|
|
37
39
|
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
38
40
|
// eslint-disable-next-line no-new-func
|
|
39
|
-
Function('return this')();
|
|
41
|
+
(function () { return this; })() || Function('return this')();
|
|
40
42
|
|
|
41
43
|
var fails = function (exec) {
|
|
42
44
|
try {
|
|
@@ -46,7 +48,7 @@
|
|
|
46
48
|
}
|
|
47
49
|
};
|
|
48
50
|
|
|
49
|
-
//
|
|
51
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
50
52
|
var descriptors = !fails(function () {
|
|
51
53
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
52
54
|
});
|
|
@@ -58,7 +60,7 @@
|
|
|
58
60
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
|
59
61
|
|
|
60
62
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
61
|
-
// https://tc39.
|
|
63
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
62
64
|
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
63
65
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
64
66
|
return !!descriptor && descriptor.enumerable;
|
|
@@ -95,7 +97,7 @@
|
|
|
95
97
|
} : Object;
|
|
96
98
|
|
|
97
99
|
// `RequireObjectCoercible` abstract operation
|
|
98
|
-
// https://tc39.
|
|
100
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
99
101
|
var requireObjectCoercible = function (it) {
|
|
100
102
|
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
101
103
|
return it;
|
|
@@ -114,7 +116,7 @@
|
|
|
114
116
|
};
|
|
115
117
|
|
|
116
118
|
// `ToPrimitive` abstract operation
|
|
117
|
-
// https://tc39.
|
|
119
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
118
120
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
119
121
|
// and the second argument - flag - preferred type is a string
|
|
120
122
|
var toPrimitive = function (input, PREFERRED_STRING) {
|
|
@@ -150,7 +152,7 @@
|
|
|
150
152
|
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
151
153
|
|
|
152
154
|
// `Object.getOwnPropertyDescriptor` method
|
|
153
|
-
// https://tc39.
|
|
155
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
154
156
|
var f$1 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
155
157
|
O = toIndexedObject(O);
|
|
156
158
|
P = toPrimitive(P, true);
|
|
@@ -173,7 +175,7 @@
|
|
|
173
175
|
var nativeDefineProperty = Object.defineProperty;
|
|
174
176
|
|
|
175
177
|
// `Object.defineProperty` method
|
|
176
|
-
// https://tc39.
|
|
178
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
177
179
|
var f$2 = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
|
|
178
180
|
anObject(O);
|
|
179
181
|
P = toPrimitive(P, true);
|
|
@@ -229,9 +231,9 @@
|
|
|
229
231
|
(module.exports = function (key, value) {
|
|
230
232
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
231
233
|
})('versions', []).push({
|
|
232
|
-
version: '3.
|
|
234
|
+
version: '3.8.3',
|
|
233
235
|
mode: 'global',
|
|
234
|
-
copyright: '©
|
|
236
|
+
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
235
237
|
});
|
|
236
238
|
});
|
|
237
239
|
|
|
@@ -267,11 +269,12 @@
|
|
|
267
269
|
};
|
|
268
270
|
|
|
269
271
|
if (nativeWeakMap) {
|
|
270
|
-
var store$1 = new WeakMap$1();
|
|
272
|
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
|
|
271
273
|
var wmget = store$1.get;
|
|
272
274
|
var wmhas = store$1.has;
|
|
273
275
|
var wmset = store$1.set;
|
|
274
276
|
set = function (it, metadata) {
|
|
277
|
+
metadata.facade = it;
|
|
275
278
|
wmset.call(store$1, it, metadata);
|
|
276
279
|
return metadata;
|
|
277
280
|
};
|
|
@@ -285,6 +288,7 @@
|
|
|
285
288
|
var STATE = sharedKey('state');
|
|
286
289
|
hiddenKeys[STATE] = true;
|
|
287
290
|
set = function (it, metadata) {
|
|
291
|
+
metadata.facade = it;
|
|
288
292
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
289
293
|
return metadata;
|
|
290
294
|
};
|
|
@@ -313,9 +317,15 @@
|
|
|
313
317
|
var unsafe = options ? !!options.unsafe : false;
|
|
314
318
|
var simple = options ? !!options.enumerable : false;
|
|
315
319
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
320
|
+
var state;
|
|
316
321
|
if (typeof value == 'function') {
|
|
317
|
-
if (typeof key == 'string' && !has(value, 'name'))
|
|
318
|
-
|
|
322
|
+
if (typeof key == 'string' && !has(value, 'name')) {
|
|
323
|
+
createNonEnumerableProperty(value, 'name', key);
|
|
324
|
+
}
|
|
325
|
+
state = enforceInternalState(value);
|
|
326
|
+
if (!state.source) {
|
|
327
|
+
state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
|
|
328
|
+
}
|
|
319
329
|
}
|
|
320
330
|
if (O === global_1) {
|
|
321
331
|
if (simple) O[key] = value;
|
|
@@ -349,7 +359,7 @@
|
|
|
349
359
|
var floor = Math.floor;
|
|
350
360
|
|
|
351
361
|
// `ToInteger` abstract operation
|
|
352
|
-
// https://tc39.
|
|
362
|
+
// https://tc39.es/ecma262/#sec-tointeger
|
|
353
363
|
var toInteger = function (argument) {
|
|
354
364
|
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
|
|
355
365
|
};
|
|
@@ -357,7 +367,7 @@
|
|
|
357
367
|
var min = Math.min;
|
|
358
368
|
|
|
359
369
|
// `ToLength` abstract operation
|
|
360
|
-
// https://tc39.
|
|
370
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
361
371
|
var toLength = function (argument) {
|
|
362
372
|
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
363
373
|
};
|
|
@@ -395,10 +405,10 @@
|
|
|
395
405
|
|
|
396
406
|
var arrayIncludes = {
|
|
397
407
|
// `Array.prototype.includes` method
|
|
398
|
-
// https://tc39.
|
|
408
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
399
409
|
includes: createMethod(true),
|
|
400
410
|
// `Array.prototype.indexOf` method
|
|
401
|
-
// https://tc39.
|
|
411
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
402
412
|
indexOf: createMethod(false)
|
|
403
413
|
};
|
|
404
414
|
|
|
@@ -432,7 +442,7 @@
|
|
|
432
442
|
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
433
443
|
|
|
434
444
|
// `Object.getOwnPropertyNames` method
|
|
435
|
-
// https://tc39.
|
|
445
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
436
446
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
437
447
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
438
448
|
};
|
|
@@ -568,13 +578,13 @@
|
|
|
568
578
|
};
|
|
569
579
|
|
|
570
580
|
// `ToObject` abstract operation
|
|
571
|
-
// https://tc39.
|
|
581
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
572
582
|
var toObject = function (argument) {
|
|
573
583
|
return Object(requireObjectCoercible(argument));
|
|
574
584
|
};
|
|
575
585
|
|
|
576
586
|
// `IsArray` abstract operation
|
|
577
|
-
// https://tc39.
|
|
587
|
+
// https://tc39.es/ecma262/#sec-isarray
|
|
578
588
|
var isArray = Array.isArray || function isArray(arg) {
|
|
579
589
|
return classofRaw(arg) == 'Array';
|
|
580
590
|
};
|
|
@@ -605,7 +615,7 @@
|
|
|
605
615
|
var SPECIES = wellKnownSymbol('species');
|
|
606
616
|
|
|
607
617
|
// `ArraySpeciesCreate` abstract operation
|
|
608
|
-
// https://tc39.
|
|
618
|
+
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
609
619
|
var arraySpeciesCreate = function (originalArray, length) {
|
|
610
620
|
var C;
|
|
611
621
|
if (isArray(originalArray)) {
|
|
@@ -621,13 +631,14 @@
|
|
|
621
631
|
|
|
622
632
|
var push = [].push;
|
|
623
633
|
|
|
624
|
-
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
|
|
634
|
+
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation
|
|
625
635
|
var createMethod$1 = function (TYPE) {
|
|
626
636
|
var IS_MAP = TYPE == 1;
|
|
627
637
|
var IS_FILTER = TYPE == 2;
|
|
628
638
|
var IS_SOME = TYPE == 3;
|
|
629
639
|
var IS_EVERY = TYPE == 4;
|
|
630
640
|
var IS_FIND_INDEX = TYPE == 6;
|
|
641
|
+
var IS_FILTER_OUT = TYPE == 7;
|
|
631
642
|
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
|
|
632
643
|
return function ($this, callbackfn, that, specificCreate) {
|
|
633
644
|
var O = toObject($this);
|
|
@@ -636,7 +647,7 @@
|
|
|
636
647
|
var length = toLength(self.length);
|
|
637
648
|
var index = 0;
|
|
638
649
|
var create = specificCreate || arraySpeciesCreate;
|
|
639
|
-
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
|
|
650
|
+
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;
|
|
640
651
|
var value, result;
|
|
641
652
|
for (;length > index; index++) if (NO_HOLES || index in self) {
|
|
642
653
|
value = self[index];
|
|
@@ -648,7 +659,10 @@
|
|
|
648
659
|
case 5: return value; // find
|
|
649
660
|
case 6: return index; // findIndex
|
|
650
661
|
case 2: push.call(target, value); // filter
|
|
651
|
-
} else
|
|
662
|
+
} else switch (TYPE) {
|
|
663
|
+
case 4: return false; // every
|
|
664
|
+
case 7: push.call(target, value); // filterOut
|
|
665
|
+
}
|
|
652
666
|
}
|
|
653
667
|
}
|
|
654
668
|
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
|
|
@@ -657,26 +671,29 @@
|
|
|
657
671
|
|
|
658
672
|
var arrayIteration = {
|
|
659
673
|
// `Array.prototype.forEach` method
|
|
660
|
-
// https://tc39.
|
|
674
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
661
675
|
forEach: createMethod$1(0),
|
|
662
676
|
// `Array.prototype.map` method
|
|
663
|
-
// https://tc39.
|
|
677
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
664
678
|
map: createMethod$1(1),
|
|
665
679
|
// `Array.prototype.filter` method
|
|
666
|
-
// https://tc39.
|
|
680
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
667
681
|
filter: createMethod$1(2),
|
|
668
682
|
// `Array.prototype.some` method
|
|
669
|
-
// https://tc39.
|
|
683
|
+
// https://tc39.es/ecma262/#sec-array.prototype.some
|
|
670
684
|
some: createMethod$1(3),
|
|
671
685
|
// `Array.prototype.every` method
|
|
672
|
-
// https://tc39.
|
|
686
|
+
// https://tc39.es/ecma262/#sec-array.prototype.every
|
|
673
687
|
every: createMethod$1(4),
|
|
674
688
|
// `Array.prototype.find` method
|
|
675
|
-
// https://tc39.
|
|
689
|
+
// https://tc39.es/ecma262/#sec-array.prototype.find
|
|
676
690
|
find: createMethod$1(5),
|
|
677
691
|
// `Array.prototype.findIndex` method
|
|
678
|
-
// https://tc39.
|
|
679
|
-
findIndex: createMethod$1(6)
|
|
692
|
+
// https://tc39.es/ecma262/#sec-array.prototype.findIndex
|
|
693
|
+
findIndex: createMethod$1(6),
|
|
694
|
+
// `Array.prototype.filterOut` method
|
|
695
|
+
// https://github.com/tc39/proposal-array-filtering
|
|
696
|
+
filterOut: createMethod$1(7)
|
|
680
697
|
};
|
|
681
698
|
|
|
682
699
|
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
@@ -748,7 +765,7 @@
|
|
|
748
765
|
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
|
|
749
766
|
|
|
750
767
|
// `Array.prototype.filter` method
|
|
751
|
-
// https://tc39.
|
|
768
|
+
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
752
769
|
// with adding support of @@species
|
|
753
770
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
|
|
754
771
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
@@ -756,54 +773,6 @@
|
|
|
756
773
|
}
|
|
757
774
|
});
|
|
758
775
|
|
|
759
|
-
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
760
|
-
var method = [][METHOD_NAME];
|
|
761
|
-
return !!method && fails(function () {
|
|
762
|
-
// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
763
|
-
method.call(null, argument || function () { throw 1; }, 1);
|
|
764
|
-
});
|
|
765
|
-
};
|
|
766
|
-
|
|
767
|
-
var $forEach = arrayIteration.forEach;
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
772
|
-
var USES_TO_LENGTH$1 = arrayMethodUsesToLength('forEach');
|
|
773
|
-
|
|
774
|
-
// `Array.prototype.forEach` method implementation
|
|
775
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
776
|
-
var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$1) ? function forEach(callbackfn /* , thisArg */) {
|
|
777
|
-
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
778
|
-
} : [].forEach;
|
|
779
|
-
|
|
780
|
-
// `Array.prototype.forEach` method
|
|
781
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
|
|
782
|
-
_export({ target: 'Array', proto: true, forced: [].forEach != arrayForEach }, {
|
|
783
|
-
forEach: arrayForEach
|
|
784
|
-
});
|
|
785
|
-
|
|
786
|
-
var $indexOf = arrayIncludes.indexOf;
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
var nativeIndexOf = [].indexOf;
|
|
791
|
-
|
|
792
|
-
var NEGATIVE_ZERO = !!nativeIndexOf && 1 / [1].indexOf(1, -0) < 0;
|
|
793
|
-
var STRICT_METHOD$1 = arrayMethodIsStrict('indexOf');
|
|
794
|
-
var USES_TO_LENGTH$2 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
795
|
-
|
|
796
|
-
// `Array.prototype.indexOf` method
|
|
797
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
|
|
798
|
-
_export({ target: 'Array', proto: true, forced: NEGATIVE_ZERO || !STRICT_METHOD$1 || !USES_TO_LENGTH$2 }, {
|
|
799
|
-
indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {
|
|
800
|
-
return NEGATIVE_ZERO
|
|
801
|
-
// convert -0 to +0
|
|
802
|
-
? nativeIndexOf.apply(this, arguments) || 0
|
|
803
|
-
: $indexOf(this, searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
804
|
-
}
|
|
805
|
-
});
|
|
806
|
-
|
|
807
776
|
var createProperty = function (object, key, value) {
|
|
808
777
|
var propertyKey = toPrimitive(key);
|
|
809
778
|
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));
|
|
@@ -811,7 +780,7 @@
|
|
|
811
780
|
};
|
|
812
781
|
|
|
813
782
|
var HAS_SPECIES_SUPPORT$1 = arrayMethodHasSpeciesSupport('splice');
|
|
814
|
-
var USES_TO_LENGTH$
|
|
783
|
+
var USES_TO_LENGTH$1 = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
|
|
815
784
|
|
|
816
785
|
var max$1 = Math.max;
|
|
817
786
|
var min$2 = Math.min;
|
|
@@ -819,9 +788,9 @@
|
|
|
819
788
|
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
|
|
820
789
|
|
|
821
790
|
// `Array.prototype.splice` method
|
|
822
|
-
// https://tc39.
|
|
791
|
+
// https://tc39.es/ecma262/#sec-array.prototype.splice
|
|
823
792
|
// with adding support of @@species
|
|
824
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$
|
|
793
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$1 || !USES_TO_LENGTH$1 }, {
|
|
825
794
|
splice: function splice(start, deleteCount /* , ...items */) {
|
|
826
795
|
var O = toObject(this);
|
|
827
796
|
var len = toLength(O.length);
|
|
@@ -871,7 +840,7 @@
|
|
|
871
840
|
});
|
|
872
841
|
|
|
873
842
|
// `Object.keys` method
|
|
874
|
-
// https://tc39.
|
|
843
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
875
844
|
var objectKeys = Object.keys || function keys(O) {
|
|
876
845
|
return objectKeysInternal(O, enumBugKeys);
|
|
877
846
|
};
|
|
@@ -880,7 +849,7 @@
|
|
|
880
849
|
var defineProperty$1 = Object.defineProperty;
|
|
881
850
|
|
|
882
851
|
// `Object.assign` method
|
|
883
|
-
// https://tc39.
|
|
852
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
884
853
|
var objectAssign = !nativeAssign || fails(function () {
|
|
885
854
|
// should have correct order of operations (Edge bug)
|
|
886
855
|
if (descriptors && nativeAssign({ b: 1 }, nativeAssign(defineProperty$1({}, 'a', {
|
|
@@ -921,7 +890,7 @@
|
|
|
921
890
|
} : nativeAssign;
|
|
922
891
|
|
|
923
892
|
// `Object.assign` method
|
|
924
|
-
// https://tc39.
|
|
893
|
+
// https://tc39.es/ecma262/#sec-object.assign
|
|
925
894
|
_export({ target: 'Object', stat: true, forced: Object.assign !== objectAssign }, {
|
|
926
895
|
assign: objectAssign
|
|
927
896
|
});
|
|
@@ -929,7 +898,7 @@
|
|
|
929
898
|
var FAILS_ON_PRIMITIVES = fails(function () { objectKeys(1); });
|
|
930
899
|
|
|
931
900
|
// `Object.keys` method
|
|
932
|
-
// https://tc39.
|
|
901
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
933
902
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
934
903
|
keys: function keys(it) {
|
|
935
904
|
return objectKeys(toObject(it));
|
|
@@ -937,7 +906,7 @@
|
|
|
937
906
|
});
|
|
938
907
|
|
|
939
908
|
// `RegExp.prototype.flags` getter implementation
|
|
940
|
-
// https://tc39.
|
|
909
|
+
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
941
910
|
var regexpFlags = function () {
|
|
942
911
|
var that = anObject(this);
|
|
943
912
|
var result = '';
|
|
@@ -1059,6 +1028,8 @@
|
|
|
1059
1028
|
|
|
1060
1029
|
var regexpExec = patchedExec;
|
|
1061
1030
|
|
|
1031
|
+
// `RegExp.prototype.exec` method
|
|
1032
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
1062
1033
|
_export({ target: 'RegExp', proto: true, forced: /./.exec !== regexpExec }, {
|
|
1063
1034
|
exec: regexpExec
|
|
1064
1035
|
});
|
|
@@ -1189,14 +1160,14 @@
|
|
|
1189
1160
|
};
|
|
1190
1161
|
|
|
1191
1162
|
// `SameValue` abstract operation
|
|
1192
|
-
// https://tc39.
|
|
1163
|
+
// https://tc39.es/ecma262/#sec-samevalue
|
|
1193
1164
|
var sameValue = Object.is || function is(x, y) {
|
|
1194
1165
|
// eslint-disable-next-line no-self-compare
|
|
1195
1166
|
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
|
1196
1167
|
};
|
|
1197
1168
|
|
|
1198
1169
|
// `RegExpExec` abstract operation
|
|
1199
|
-
// https://tc39.
|
|
1170
|
+
// https://tc39.es/ecma262/#sec-regexpexec
|
|
1200
1171
|
var regexpExecAbstract = function (R, S) {
|
|
1201
1172
|
var exec = R.exec;
|
|
1202
1173
|
if (typeof exec === 'function') {
|
|
@@ -1218,14 +1189,14 @@
|
|
|
1218
1189
|
fixRegexpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
|
|
1219
1190
|
return [
|
|
1220
1191
|
// `String.prototype.search` method
|
|
1221
|
-
// https://tc39.
|
|
1192
|
+
// https://tc39.es/ecma262/#sec-string.prototype.search
|
|
1222
1193
|
function search(regexp) {
|
|
1223
1194
|
var O = requireObjectCoercible(this);
|
|
1224
1195
|
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
|
|
1225
1196
|
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
|
|
1226
1197
|
},
|
|
1227
1198
|
// `RegExp.prototype[@@search]` method
|
|
1228
|
-
// https://tc39.
|
|
1199
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
|
1229
1200
|
function (regexp) {
|
|
1230
1201
|
var res = maybeCallNative(nativeSearch, regexp, this);
|
|
1231
1202
|
if (res.done) return res.value;
|
|
@@ -1278,6 +1249,27 @@
|
|
|
1278
1249
|
TouchList: 0
|
|
1279
1250
|
};
|
|
1280
1251
|
|
|
1252
|
+
var arrayMethodIsStrict = function (METHOD_NAME, argument) {
|
|
1253
|
+
var method = [][METHOD_NAME];
|
|
1254
|
+
return !!method && fails(function () {
|
|
1255
|
+
// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
1256
|
+
method.call(null, argument || function () { throw 1; }, 1);
|
|
1257
|
+
});
|
|
1258
|
+
};
|
|
1259
|
+
|
|
1260
|
+
var $forEach = arrayIteration.forEach;
|
|
1261
|
+
|
|
1262
|
+
|
|
1263
|
+
|
|
1264
|
+
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
1265
|
+
var USES_TO_LENGTH$2 = arrayMethodUsesToLength('forEach');
|
|
1266
|
+
|
|
1267
|
+
// `Array.prototype.forEach` method implementation
|
|
1268
|
+
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
1269
|
+
var arrayForEach = (!STRICT_METHOD || !USES_TO_LENGTH$2) ? function forEach(callbackfn /* , thisArg */) {
|
|
1270
|
+
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
1271
|
+
} : [].forEach;
|
|
1272
|
+
|
|
1281
1273
|
for (var COLLECTION_NAME in domIterables) {
|
|
1282
1274
|
var Collection = global_1[COLLECTION_NAME];
|
|
1283
1275
|
var CollectionPrototype = Collection && Collection.prototype;
|
|
@@ -1313,7 +1305,7 @@
|
|
|
1313
1305
|
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
|
1314
1306
|
|
|
1315
1307
|
// `Array.prototype.concat` method
|
|
1316
|
-
// https://tc39.
|
|
1308
|
+
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
|
1317
1309
|
// with adding support of @@isConcatSpreadable and @@species
|
|
1318
1310
|
_export({ target: 'Array', proto: true, forced: FORCED }, {
|
|
1319
1311
|
concat: function concat(arg) { // eslint-disable-line no-unused-vars
|
|
@@ -1612,13 +1604,13 @@
|
|
|
1612
1604
|
};
|
|
1613
1605
|
|
|
1614
1606
|
// `Object.prototype.toString` method implementation
|
|
1615
|
-
// https://tc39.
|
|
1607
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1616
1608
|
var objectToString = toStringTagSupport ? {}.toString : function toString() {
|
|
1617
1609
|
return '[object ' + classof(this) + ']';
|
|
1618
1610
|
};
|
|
1619
1611
|
|
|
1620
1612
|
// `Object.prototype.toString` method
|
|
1621
|
-
// https://tc39.
|
|
1613
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1622
1614
|
if (!toStringTagSupport) {
|
|
1623
1615
|
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
|
1624
1616
|
}
|
|
@@ -1632,7 +1624,7 @@
|
|
|
1632
1624
|
var INCORRECT_NAME = nativeToString.name != TO_STRING;
|
|
1633
1625
|
|
|
1634
1626
|
// `RegExp.prototype.toString` method
|
|
1635
|
-
// https://tc39.
|
|
1627
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
1636
1628
|
if (NOT_GENERIC || INCORRECT_NAME) {
|
|
1637
1629
|
redefine(RegExp.prototype, TO_STRING, function toString() {
|
|
1638
1630
|
var R = anObject(this);
|
|
@@ -1651,7 +1643,7 @@
|
|
|
1651
1643
|
var NAME = 'name';
|
|
1652
1644
|
|
|
1653
1645
|
// Function instances `.name` property
|
|
1654
|
-
// https://tc39.
|
|
1646
|
+
// https://tc39.es/ecma262/#sec-function-instances-name
|
|
1655
1647
|
if (descriptors && !(NAME in FunctionPrototype)) {
|
|
1656
1648
|
defineProperty$2(FunctionPrototype, NAME, {
|
|
1657
1649
|
configurable: true,
|
|
@@ -1675,7 +1667,7 @@
|
|
|
1675
1667
|
var ObjectPrototype = Object.prototype;
|
|
1676
1668
|
|
|
1677
1669
|
// `Object.getPrototypeOf` method
|
|
1678
|
-
// https://tc39.
|
|
1670
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1679
1671
|
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
|
1680
1672
|
O = toObject(O);
|
|
1681
1673
|
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
|
@@ -1687,7 +1679,7 @@
|
|
|
1687
1679
|
var FAILS_ON_PRIMITIVES$1 = fails(function () { objectGetPrototypeOf(1); });
|
|
1688
1680
|
|
|
1689
1681
|
// `Object.getPrototypeOf` method
|
|
1690
|
-
// https://tc39.
|
|
1682
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1691
1683
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$1, sham: !correctPrototypeGetter }, {
|
|
1692
1684
|
getPrototypeOf: function getPrototypeOf(it) {
|
|
1693
1685
|
return objectGetPrototypeOf(toObject(it));
|
|
@@ -1695,7 +1687,7 @@
|
|
|
1695
1687
|
});
|
|
1696
1688
|
|
|
1697
1689
|
// `Reflect.ownKeys` method
|
|
1698
|
-
// https://tc39.
|
|
1690
|
+
// https://tc39.es/ecma262/#sec-reflect.ownkeys
|
|
1699
1691
|
_export({ target: 'Reflect', stat: true }, {
|
|
1700
1692
|
ownKeys: ownKeys
|
|
1701
1693
|
});
|
|
@@ -2145,11 +2137,11 @@
|
|
|
2145
2137
|
var nativeJoin = [].join;
|
|
2146
2138
|
|
|
2147
2139
|
var ES3_STRINGS = indexedObject != Object;
|
|
2148
|
-
var STRICT_METHOD$
|
|
2140
|
+
var STRICT_METHOD$1 = arrayMethodIsStrict('join', ',');
|
|
2149
2141
|
|
|
2150
2142
|
// `Array.prototype.join` method
|
|
2151
|
-
// https://tc39.
|
|
2152
|
-
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$
|
|
2143
|
+
// https://tc39.es/ecma262/#sec-array.prototype.join
|
|
2144
|
+
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$1 }, {
|
|
2153
2145
|
join: function join(separator) {
|
|
2154
2146
|
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
2155
2147
|
}
|
|
@@ -2161,68 +2153,17 @@
|
|
|
2161
2153
|
|
|
2162
2154
|
var HAS_SPECIES_SUPPORT$2 = arrayMethodHasSpeciesSupport('map');
|
|
2163
2155
|
// FF49- issue
|
|
2164
|
-
var USES_TO_LENGTH$
|
|
2156
|
+
var USES_TO_LENGTH$3 = arrayMethodUsesToLength('map');
|
|
2165
2157
|
|
|
2166
2158
|
// `Array.prototype.map` method
|
|
2167
|
-
// https://tc39.
|
|
2159
|
+
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
2168
2160
|
// with adding support of @@species
|
|
2169
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$
|
|
2161
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$2 || !USES_TO_LENGTH$3 }, {
|
|
2170
2162
|
map: function map(callbackfn /* , thisArg */) {
|
|
2171
2163
|
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
2172
2164
|
}
|
|
2173
2165
|
});
|
|
2174
2166
|
|
|
2175
|
-
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
2176
|
-
var createMethod$2 = function (IS_RIGHT) {
|
|
2177
|
-
return function (that, callbackfn, argumentsLength, memo) {
|
|
2178
|
-
aFunction$1(callbackfn);
|
|
2179
|
-
var O = toObject(that);
|
|
2180
|
-
var self = indexedObject(O);
|
|
2181
|
-
var length = toLength(O.length);
|
|
2182
|
-
var index = IS_RIGHT ? length - 1 : 0;
|
|
2183
|
-
var i = IS_RIGHT ? -1 : 1;
|
|
2184
|
-
if (argumentsLength < 2) while (true) {
|
|
2185
|
-
if (index in self) {
|
|
2186
|
-
memo = self[index];
|
|
2187
|
-
index += i;
|
|
2188
|
-
break;
|
|
2189
|
-
}
|
|
2190
|
-
index += i;
|
|
2191
|
-
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
2192
|
-
throw TypeError('Reduce of empty array with no initial value');
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
2196
|
-
memo = callbackfn(memo, self[index], index, O);
|
|
2197
|
-
}
|
|
2198
|
-
return memo;
|
|
2199
|
-
};
|
|
2200
|
-
};
|
|
2201
|
-
|
|
2202
|
-
var arrayReduce = {
|
|
2203
|
-
// `Array.prototype.reduce` method
|
|
2204
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
2205
|
-
left: createMethod$2(false),
|
|
2206
|
-
// `Array.prototype.reduceRight` method
|
|
2207
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
|
2208
|
-
right: createMethod$2(true)
|
|
2209
|
-
};
|
|
2210
|
-
|
|
2211
|
-
var $reduce = arrayReduce.left;
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
var STRICT_METHOD$3 = arrayMethodIsStrict('reduce');
|
|
2216
|
-
var USES_TO_LENGTH$5 = arrayMethodUsesToLength('reduce', { 1: 0 });
|
|
2217
|
-
|
|
2218
|
-
// `Array.prototype.reduce` method
|
|
2219
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
2220
|
-
_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$3 || !USES_TO_LENGTH$5 }, {
|
|
2221
|
-
reduce: function reduce(callbackfn /* , initialValue */) {
|
|
2222
|
-
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
2223
|
-
}
|
|
2224
|
-
});
|
|
2225
|
-
|
|
2226
2167
|
var aPossiblePrototype = function (it) {
|
|
2227
2168
|
if (!isObject(it) && it !== null) {
|
|
2228
2169
|
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
|
@@ -2230,7 +2171,7 @@
|
|
|
2230
2171
|
};
|
|
2231
2172
|
|
|
2232
2173
|
// `Object.setPrototypeOf` method
|
|
2233
|
-
// https://tc39.
|
|
2174
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
2234
2175
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
2235
2176
|
/* eslint-disable no-proto */
|
|
2236
2177
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
@@ -2267,7 +2208,7 @@
|
|
|
2267
2208
|
};
|
|
2268
2209
|
|
|
2269
2210
|
// `Object.defineProperties` method
|
|
2270
|
-
// https://tc39.
|
|
2211
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
2271
2212
|
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
2272
2213
|
anObject(O);
|
|
2273
2214
|
var keys = objectKeys(Properties);
|
|
@@ -2338,7 +2279,7 @@
|
|
|
2338
2279
|
hiddenKeys[IE_PROTO$1] = true;
|
|
2339
2280
|
|
|
2340
2281
|
// `Object.create` method
|
|
2341
|
-
// https://tc39.
|
|
2282
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
2342
2283
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
2343
2284
|
var result;
|
|
2344
2285
|
if (O !== null) {
|
|
@@ -2360,7 +2301,7 @@
|
|
|
2360
2301
|
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
2361
2302
|
|
|
2362
2303
|
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
2363
|
-
var createMethod$
|
|
2304
|
+
var createMethod$2 = function (TYPE) {
|
|
2364
2305
|
return function ($this) {
|
|
2365
2306
|
var string = String(requireObjectCoercible($this));
|
|
2366
2307
|
if (TYPE & 1) string = string.replace(ltrim, '');
|
|
@@ -2371,14 +2312,14 @@
|
|
|
2371
2312
|
|
|
2372
2313
|
var stringTrim = {
|
|
2373
2314
|
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
2374
|
-
// https://tc39.
|
|
2375
|
-
start: createMethod$
|
|
2315
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
2316
|
+
start: createMethod$2(1),
|
|
2376
2317
|
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
2377
|
-
// https://tc39.
|
|
2378
|
-
end: createMethod$
|
|
2318
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
2319
|
+
end: createMethod$2(2),
|
|
2379
2320
|
// `String.prototype.trim` method
|
|
2380
|
-
// https://tc39.
|
|
2381
|
-
trim: createMethod$
|
|
2321
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
2322
|
+
trim: createMethod$2(3)
|
|
2382
2323
|
};
|
|
2383
2324
|
|
|
2384
2325
|
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
@@ -2394,7 +2335,7 @@
|
|
|
2394
2335
|
var BROKEN_CLASSOF = classofRaw(objectCreate(NumberPrototype)) == NUMBER;
|
|
2395
2336
|
|
|
2396
2337
|
// `ToNumber` abstract operation
|
|
2397
|
-
// https://tc39.
|
|
2338
|
+
// https://tc39.es/ecma262/#sec-tonumber
|
|
2398
2339
|
var toNumber = function (argument) {
|
|
2399
2340
|
var it = toPrimitive(argument, false);
|
|
2400
2341
|
var first, third, radix, maxCode, digits, length, index, code;
|
|
@@ -2423,7 +2364,7 @@
|
|
|
2423
2364
|
};
|
|
2424
2365
|
|
|
2425
2366
|
// `Number` constructor
|
|
2426
|
-
// https://tc39.
|
|
2367
|
+
// https://tc39.es/ecma262/#sec-number-constructor
|
|
2427
2368
|
if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
|
|
2428
2369
|
var NumberWrapper = function Number(value) {
|
|
2429
2370
|
var it = arguments.length < 1 ? 0 : value;
|
|
@@ -2438,7 +2379,9 @@
|
|
|
2438
2379
|
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
|
|
2439
2380
|
// ES2015 (in case, if modules with ES2015 Number statics required before):
|
|
2440
2381
|
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' +
|
|
2441
|
-
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger'
|
|
2382
|
+
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
|
|
2383
|
+
// ESNext
|
|
2384
|
+
'fromString,range'
|
|
2442
2385
|
).split(','), j = 0, key; keys$1.length > j; j++) {
|
|
2443
2386
|
if (has(NativeNumber, key = keys$1[j]) && !has(NumberWrapper, key)) {
|
|
2444
2387
|
defineProperty$3(NumberWrapper, key, getOwnPropertyDescriptor$2(NativeNumber, key));
|
|
@@ -2456,7 +2399,7 @@
|
|
|
2456
2399
|
var FORCED$1 = !descriptors || FAILS_ON_PRIMITIVES$2;
|
|
2457
2400
|
|
|
2458
2401
|
// `Object.getOwnPropertyDescriptor` method
|
|
2459
|
-
// https://tc39.
|
|
2402
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
2460
2403
|
_export({ target: 'Object', stat: true, forced: FORCED$1, sham: !descriptors }, {
|
|
2461
2404
|
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
|
2462
2405
|
return nativeGetOwnPropertyDescriptor$1(toIndexedObject(it), key);
|
|
@@ -2494,7 +2437,7 @@
|
|
|
2494
2437
|
var FAILS_ON_PRIMITIVES$3 = fails(function () { return !Object.getOwnPropertyNames(1); });
|
|
2495
2438
|
|
|
2496
2439
|
// `Object.getOwnPropertyNames` method
|
|
2497
|
-
// https://tc39.
|
|
2440
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
2498
2441
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3 }, {
|
|
2499
2442
|
getOwnPropertyNames: nativeGetOwnPropertyNames$1
|
|
2500
2443
|
});
|
|
@@ -2502,7 +2445,7 @@
|
|
|
2502
2445
|
var MATCH = wellKnownSymbol('match');
|
|
2503
2446
|
|
|
2504
2447
|
// `IsRegExp` abstract operation
|
|
2505
|
-
// https://tc39.
|
|
2448
|
+
// https://tc39.es/ecma262/#sec-isregexp
|
|
2506
2449
|
var isRegexp = function (it) {
|
|
2507
2450
|
var isRegExp;
|
|
2508
2451
|
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
|
@@ -2551,7 +2494,7 @@
|
|
|
2551
2494
|
})));
|
|
2552
2495
|
|
|
2553
2496
|
// `RegExp` constructor
|
|
2554
|
-
// https://tc39.
|
|
2497
|
+
// https://tc39.es/ecma262/#sec-regexp-constructor
|
|
2555
2498
|
if (FORCED$2) {
|
|
2556
2499
|
var RegExpWrapper = function RegExp(pattern, flags) {
|
|
2557
2500
|
var thisIsRegExp = this instanceof RegExpWrapper;
|
|
@@ -2600,11 +2543,11 @@
|
|
|
2600
2543
|
redefine(global_1, 'RegExp', RegExpWrapper);
|
|
2601
2544
|
}
|
|
2602
2545
|
|
|
2603
|
-
// https://tc39.
|
|
2546
|
+
// https://tc39.es/ecma262/#sec-get-regexp-@@species
|
|
2604
2547
|
setSpecies('RegExp');
|
|
2605
2548
|
|
|
2606
2549
|
// `String.prototype.{ codePointAt, at }` methods implementation
|
|
2607
|
-
var createMethod$
|
|
2550
|
+
var createMethod$3 = function (CONVERT_TO_STRING) {
|
|
2608
2551
|
return function ($this, pos) {
|
|
2609
2552
|
var S = String(requireObjectCoercible($this));
|
|
2610
2553
|
var position = toInteger(pos);
|
|
@@ -2621,17 +2564,17 @@
|
|
|
2621
2564
|
|
|
2622
2565
|
var stringMultibyte = {
|
|
2623
2566
|
// `String.prototype.codePointAt` method
|
|
2624
|
-
// https://tc39.
|
|
2625
|
-
codeAt: createMethod$
|
|
2567
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
2568
|
+
codeAt: createMethod$3(false),
|
|
2626
2569
|
// `String.prototype.at` method
|
|
2627
2570
|
// https://github.com/mathiasbynens/String.prototype.at
|
|
2628
|
-
charAt: createMethod$
|
|
2571
|
+
charAt: createMethod$3(true)
|
|
2629
2572
|
};
|
|
2630
2573
|
|
|
2631
2574
|
var charAt = stringMultibyte.charAt;
|
|
2632
2575
|
|
|
2633
2576
|
// `AdvanceStringIndex` abstract operation
|
|
2634
|
-
// https://tc39.
|
|
2577
|
+
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
2635
2578
|
var advanceStringIndex = function (S, index, unicode) {
|
|
2636
2579
|
return index + (unicode ? charAt(S, index).length : 1);
|
|
2637
2580
|
};
|
|
@@ -2640,14 +2583,14 @@
|
|
|
2640
2583
|
fixRegexpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
|
|
2641
2584
|
return [
|
|
2642
2585
|
// `String.prototype.match` method
|
|
2643
|
-
// https://tc39.
|
|
2586
|
+
// https://tc39.es/ecma262/#sec-string.prototype.match
|
|
2644
2587
|
function match(regexp) {
|
|
2645
2588
|
var O = requireObjectCoercible(this);
|
|
2646
2589
|
var matcher = regexp == undefined ? undefined : regexp[MATCH];
|
|
2647
2590
|
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
|
|
2648
2591
|
},
|
|
2649
2592
|
// `RegExp.prototype[@@match]` method
|
|
2650
|
-
// https://tc39.
|
|
2593
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
|
2651
2594
|
function (regexp) {
|
|
2652
2595
|
var res = maybeCallNative(nativeMatch, regexp, this);
|
|
2653
2596
|
if (res.done) return res.value;
|
|
@@ -2673,12 +2616,48 @@
|
|
|
2673
2616
|
];
|
|
2674
2617
|
});
|
|
2675
2618
|
|
|
2676
|
-
var max$2 = Math.max;
|
|
2677
|
-
var min$3 = Math.min;
|
|
2678
2619
|
var floor$1 = Math.floor;
|
|
2620
|
+
var replace = ''.replace;
|
|
2679
2621
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
|
|
2680
2622
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
|
|
2681
2623
|
|
|
2624
|
+
// https://tc39.es/ecma262/#sec-getsubstitution
|
|
2625
|
+
var getSubstitution = function (matched, str, position, captures, namedCaptures, replacement) {
|
|
2626
|
+
var tailPos = position + matched.length;
|
|
2627
|
+
var m = captures.length;
|
|
2628
|
+
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
2629
|
+
if (namedCaptures !== undefined) {
|
|
2630
|
+
namedCaptures = toObject(namedCaptures);
|
|
2631
|
+
symbols = SUBSTITUTION_SYMBOLS;
|
|
2632
|
+
}
|
|
2633
|
+
return replace.call(replacement, symbols, function (match, ch) {
|
|
2634
|
+
var capture;
|
|
2635
|
+
switch (ch.charAt(0)) {
|
|
2636
|
+
case '$': return '$';
|
|
2637
|
+
case '&': return matched;
|
|
2638
|
+
case '`': return str.slice(0, position);
|
|
2639
|
+
case "'": return str.slice(tailPos);
|
|
2640
|
+
case '<':
|
|
2641
|
+
capture = namedCaptures[ch.slice(1, -1)];
|
|
2642
|
+
break;
|
|
2643
|
+
default: // \d\d?
|
|
2644
|
+
var n = +ch;
|
|
2645
|
+
if (n === 0) return match;
|
|
2646
|
+
if (n > m) {
|
|
2647
|
+
var f = floor$1(n / 10);
|
|
2648
|
+
if (f === 0) return match;
|
|
2649
|
+
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
2650
|
+
return match;
|
|
2651
|
+
}
|
|
2652
|
+
capture = captures[n - 1];
|
|
2653
|
+
}
|
|
2654
|
+
return capture === undefined ? '' : capture;
|
|
2655
|
+
});
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2658
|
+
var max$2 = Math.max;
|
|
2659
|
+
var min$3 = Math.min;
|
|
2660
|
+
|
|
2682
2661
|
var maybeToString = function (it) {
|
|
2683
2662
|
return it === undefined ? it : String(it);
|
|
2684
2663
|
};
|
|
@@ -2691,7 +2670,7 @@
|
|
|
2691
2670
|
|
|
2692
2671
|
return [
|
|
2693
2672
|
// `String.prototype.replace` method
|
|
2694
|
-
// https://tc39.
|
|
2673
|
+
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
2695
2674
|
function replace(searchValue, replaceValue) {
|
|
2696
2675
|
var O = requireObjectCoercible(this);
|
|
2697
2676
|
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
|
|
@@ -2700,7 +2679,7 @@
|
|
|
2700
2679
|
: nativeReplace.call(String(O), searchValue, replaceValue);
|
|
2701
2680
|
},
|
|
2702
2681
|
// `RegExp.prototype[@@replace]` method
|
|
2703
|
-
// https://tc39.
|
|
2682
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
2704
2683
|
function (regexp, replaceValue) {
|
|
2705
2684
|
if (
|
|
2706
2685
|
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
|
|
@@ -2763,46 +2742,12 @@
|
|
|
2763
2742
|
return accumulatedResult + S.slice(nextSourcePosition);
|
|
2764
2743
|
}
|
|
2765
2744
|
];
|
|
2766
|
-
|
|
2767
|
-
// https://tc39.github.io/ecma262/#sec-getsubstitution
|
|
2768
|
-
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
|
|
2769
|
-
var tailPos = position + matched.length;
|
|
2770
|
-
var m = captures.length;
|
|
2771
|
-
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
|
|
2772
|
-
if (namedCaptures !== undefined) {
|
|
2773
|
-
namedCaptures = toObject(namedCaptures);
|
|
2774
|
-
symbols = SUBSTITUTION_SYMBOLS;
|
|
2775
|
-
}
|
|
2776
|
-
return nativeReplace.call(replacement, symbols, function (match, ch) {
|
|
2777
|
-
var capture;
|
|
2778
|
-
switch (ch.charAt(0)) {
|
|
2779
|
-
case '$': return '$';
|
|
2780
|
-
case '&': return matched;
|
|
2781
|
-
case '`': return str.slice(0, position);
|
|
2782
|
-
case "'": return str.slice(tailPos);
|
|
2783
|
-
case '<':
|
|
2784
|
-
capture = namedCaptures[ch.slice(1, -1)];
|
|
2785
|
-
break;
|
|
2786
|
-
default: // \d\d?
|
|
2787
|
-
var n = +ch;
|
|
2788
|
-
if (n === 0) return match;
|
|
2789
|
-
if (n > m) {
|
|
2790
|
-
var f = floor$1(n / 10);
|
|
2791
|
-
if (f === 0) return match;
|
|
2792
|
-
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
|
|
2793
|
-
return match;
|
|
2794
|
-
}
|
|
2795
|
-
capture = captures[n - 1];
|
|
2796
|
-
}
|
|
2797
|
-
return capture === undefined ? '' : capture;
|
|
2798
|
-
});
|
|
2799
|
-
}
|
|
2800
2745
|
});
|
|
2801
2746
|
|
|
2802
2747
|
var SPECIES$4 = wellKnownSymbol('species');
|
|
2803
2748
|
|
|
2804
2749
|
// `SpeciesConstructor` abstract operation
|
|
2805
|
-
// https://tc39.
|
|
2750
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
2806
2751
|
var speciesConstructor = function (O, defaultConstructor) {
|
|
2807
2752
|
var C = anObject(O).constructor;
|
|
2808
2753
|
var S;
|
|
@@ -2871,7 +2816,7 @@
|
|
|
2871
2816
|
|
|
2872
2817
|
return [
|
|
2873
2818
|
// `String.prototype.split` method
|
|
2874
|
-
// https://tc39.
|
|
2819
|
+
// https://tc39.es/ecma262/#sec-string.prototype.split
|
|
2875
2820
|
function split(separator, limit) {
|
|
2876
2821
|
var O = requireObjectCoercible(this);
|
|
2877
2822
|
var splitter = separator == undefined ? undefined : separator[SPLIT];
|
|
@@ -2880,7 +2825,7 @@
|
|
|
2880
2825
|
: internalSplit.call(String(O), separator, limit);
|
|
2881
2826
|
},
|
|
2882
2827
|
// `RegExp.prototype[@@split]` method
|
|
2883
|
-
// https://tc39.
|
|
2828
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
2884
2829
|
//
|
|
2885
2830
|
// NOTE: This cannot be properly polyfilled in engines that don't support
|
|
2886
2831
|
// the 'y' flag.
|
|
@@ -3321,7 +3266,7 @@
|
|
|
3321
3266
|
};
|
|
3322
3267
|
|
|
3323
3268
|
// `Symbol` constructor
|
|
3324
|
-
// https://tc39.
|
|
3269
|
+
// https://tc39.es/ecma262/#sec-symbol-constructor
|
|
3325
3270
|
if (!nativeSymbol) {
|
|
3326
3271
|
$Symbol = function Symbol() {
|
|
3327
3272
|
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
|
|
@@ -3378,7 +3323,7 @@
|
|
|
3378
3323
|
|
|
3379
3324
|
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
|
|
3380
3325
|
// `Symbol.for` method
|
|
3381
|
-
// https://tc39.
|
|
3326
|
+
// https://tc39.es/ecma262/#sec-symbol.for
|
|
3382
3327
|
'for': function (key) {
|
|
3383
3328
|
var string = String(key);
|
|
3384
3329
|
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
|
@@ -3388,7 +3333,7 @@
|
|
|
3388
3333
|
return symbol;
|
|
3389
3334
|
},
|
|
3390
3335
|
// `Symbol.keyFor` method
|
|
3391
|
-
// https://tc39.
|
|
3336
|
+
// https://tc39.es/ecma262/#sec-symbol.keyfor
|
|
3392
3337
|
keyFor: function keyFor(sym) {
|
|
3393
3338
|
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
|
3394
3339
|
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
|
@@ -3399,25 +3344,25 @@
|
|
|
3399
3344
|
|
|
3400
3345
|
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
|
|
3401
3346
|
// `Object.create` method
|
|
3402
|
-
// https://tc39.
|
|
3347
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
3403
3348
|
create: $create,
|
|
3404
3349
|
// `Object.defineProperty` method
|
|
3405
|
-
// https://tc39.
|
|
3350
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
3406
3351
|
defineProperty: $defineProperty,
|
|
3407
3352
|
// `Object.defineProperties` method
|
|
3408
|
-
// https://tc39.
|
|
3353
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
3409
3354
|
defineProperties: $defineProperties,
|
|
3410
3355
|
// `Object.getOwnPropertyDescriptor` method
|
|
3411
|
-
// https://tc39.
|
|
3356
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
|
3412
3357
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
|
3413
3358
|
});
|
|
3414
3359
|
|
|
3415
3360
|
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
|
|
3416
3361
|
// `Object.getOwnPropertyNames` method
|
|
3417
|
-
// https://tc39.
|
|
3362
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
3418
3363
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
3419
3364
|
// `Object.getOwnPropertySymbols` method
|
|
3420
|
-
// https://tc39.
|
|
3365
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertysymbols
|
|
3421
3366
|
getOwnPropertySymbols: $getOwnPropertySymbols
|
|
3422
3367
|
});
|
|
3423
3368
|
|
|
@@ -3430,7 +3375,7 @@
|
|
|
3430
3375
|
});
|
|
3431
3376
|
|
|
3432
3377
|
// `JSON.stringify` method behavior with symbols
|
|
3433
|
-
// https://tc39.
|
|
3378
|
+
// https://tc39.es/ecma262/#sec-json.stringify
|
|
3434
3379
|
if ($stringify) {
|
|
3435
3380
|
var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
|
|
3436
3381
|
var symbol = $Symbol();
|
|
@@ -3462,12 +3407,12 @@
|
|
|
3462
3407
|
}
|
|
3463
3408
|
|
|
3464
3409
|
// `Symbol.prototype[@@toPrimitive]` method
|
|
3465
|
-
// https://tc39.
|
|
3410
|
+
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
3466
3411
|
if (!$Symbol[PROTOTYPE$1][TO_PRIMITIVE]) {
|
|
3467
3412
|
createNonEnumerableProperty($Symbol[PROTOTYPE$1], TO_PRIMITIVE, $Symbol[PROTOTYPE$1].valueOf);
|
|
3468
3413
|
}
|
|
3469
3414
|
// `Symbol.prototype[@@toStringTag]` property
|
|
3470
|
-
// https://tc39.
|
|
3415
|
+
// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
|
|
3471
3416
|
setToStringTag($Symbol, SYMBOL);
|
|
3472
3417
|
|
|
3473
3418
|
hiddenKeys[HIDDEN] = true;
|
|
@@ -3516,11 +3461,11 @@
|
|
|
3516
3461
|
}
|
|
3517
3462
|
|
|
3518
3463
|
// `Symbol.species` well-known symbol
|
|
3519
|
-
// https://tc39.
|
|
3464
|
+
// https://tc39.es/ecma262/#sec-symbol.species
|
|
3520
3465
|
defineWellKnownSymbol('species');
|
|
3521
3466
|
|
|
3522
3467
|
// `Array.prototype.fill` method implementation
|
|
3523
|
-
// https://tc39.
|
|
3468
|
+
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
3524
3469
|
var arrayFill = function fill(value /* , start = 0, end = @length */) {
|
|
3525
3470
|
var O = toObject(this);
|
|
3526
3471
|
var length = toLength(O.length);
|
|
@@ -3536,7 +3481,7 @@
|
|
|
3536
3481
|
var ArrayPrototype = Array.prototype;
|
|
3537
3482
|
|
|
3538
3483
|
// Array.prototype[@@unscopables]
|
|
3539
|
-
// https://tc39.
|
|
3484
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3540
3485
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
3541
3486
|
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
|
3542
3487
|
configurable: true,
|
|
@@ -3550,29 +3495,29 @@
|
|
|
3550
3495
|
};
|
|
3551
3496
|
|
|
3552
3497
|
// `Array.prototype.fill` method
|
|
3553
|
-
// https://tc39.
|
|
3498
|
+
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
3554
3499
|
_export({ target: 'Array', proto: true }, {
|
|
3555
3500
|
fill: arrayFill
|
|
3556
3501
|
});
|
|
3557
3502
|
|
|
3558
|
-
// https://tc39.
|
|
3503
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3559
3504
|
addToUnscopables('fill');
|
|
3560
3505
|
|
|
3561
3506
|
var $includes = arrayIncludes.includes;
|
|
3562
3507
|
|
|
3563
3508
|
|
|
3564
3509
|
|
|
3565
|
-
var USES_TO_LENGTH$
|
|
3510
|
+
var USES_TO_LENGTH$4 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
3566
3511
|
|
|
3567
3512
|
// `Array.prototype.includes` method
|
|
3568
|
-
// https://tc39.
|
|
3569
|
-
_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$
|
|
3513
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
3514
|
+
_export({ target: 'Array', proto: true, forced: !USES_TO_LENGTH$4 }, {
|
|
3570
3515
|
includes: function includes(el /* , fromIndex = 0 */) {
|
|
3571
3516
|
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
|
|
3572
3517
|
}
|
|
3573
3518
|
});
|
|
3574
3519
|
|
|
3575
|
-
// https://tc39.
|
|
3520
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3576
3521
|
addToUnscopables('includes');
|
|
3577
3522
|
|
|
3578
3523
|
var iterators = {};
|
|
@@ -3583,7 +3528,7 @@
|
|
|
3583
3528
|
var returnThis = function () { return this; };
|
|
3584
3529
|
|
|
3585
3530
|
// `%IteratorPrototype%` object
|
|
3586
|
-
// https://tc39.
|
|
3531
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
3587
3532
|
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
3588
3533
|
|
|
3589
3534
|
if ([].keys) {
|
|
@@ -3596,7 +3541,13 @@
|
|
|
3596
3541
|
}
|
|
3597
3542
|
}
|
|
3598
3543
|
|
|
3599
|
-
|
|
3544
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
|
|
3545
|
+
var test = {};
|
|
3546
|
+
// FF44- legacy iterators case
|
|
3547
|
+
return IteratorPrototype[ITERATOR].call(test) !== test;
|
|
3548
|
+
});
|
|
3549
|
+
|
|
3550
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};
|
|
3600
3551
|
|
|
3601
3552
|
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
3602
3553
|
if ( !has(IteratorPrototype, ITERATOR)) {
|
|
@@ -3706,15 +3657,15 @@
|
|
|
3706
3657
|
var getInternalState$1 = internalState.getterFor(ARRAY_ITERATOR);
|
|
3707
3658
|
|
|
3708
3659
|
// `Array.prototype.entries` method
|
|
3709
|
-
// https://tc39.
|
|
3660
|
+
// https://tc39.es/ecma262/#sec-array.prototype.entries
|
|
3710
3661
|
// `Array.prototype.keys` method
|
|
3711
|
-
// https://tc39.
|
|
3662
|
+
// https://tc39.es/ecma262/#sec-array.prototype.keys
|
|
3712
3663
|
// `Array.prototype.values` method
|
|
3713
|
-
// https://tc39.
|
|
3664
|
+
// https://tc39.es/ecma262/#sec-array.prototype.values
|
|
3714
3665
|
// `Array.prototype[@@iterator]` method
|
|
3715
|
-
// https://tc39.
|
|
3666
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@iterator
|
|
3716
3667
|
// `CreateArrayIterator` internal method
|
|
3717
|
-
// https://tc39.
|
|
3668
|
+
// https://tc39.es/ecma262/#sec-createarrayiterator
|
|
3718
3669
|
var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
|
|
3719
3670
|
setInternalState$2(this, {
|
|
3720
3671
|
type: ARRAY_ITERATOR,
|
|
@@ -3723,7 +3674,7 @@
|
|
|
3723
3674
|
kind: kind // kind
|
|
3724
3675
|
});
|
|
3725
3676
|
// `%ArrayIteratorPrototype%.next` method
|
|
3726
|
-
// https://tc39.
|
|
3677
|
+
// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
|
|
3727
3678
|
}, function () {
|
|
3728
3679
|
var state = getInternalState$1(this);
|
|
3729
3680
|
var target = state.target;
|
|
@@ -3739,54 +3690,26 @@
|
|
|
3739
3690
|
}, 'values');
|
|
3740
3691
|
|
|
3741
3692
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
3742
|
-
// https://tc39.
|
|
3743
|
-
// https://tc39.
|
|
3693
|
+
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
3694
|
+
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
3744
3695
|
iterators.Arguments = iterators.Array;
|
|
3745
3696
|
|
|
3746
|
-
// https://tc39.
|
|
3697
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3747
3698
|
addToUnscopables('keys');
|
|
3748
3699
|
addToUnscopables('values');
|
|
3749
3700
|
addToUnscopables('entries');
|
|
3750
3701
|
|
|
3751
|
-
var min$5 = Math.min;
|
|
3752
|
-
var nativeLastIndexOf = [].lastIndexOf;
|
|
3753
|
-
var NEGATIVE_ZERO$1 = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
|
|
3754
|
-
var STRICT_METHOD$4 = arrayMethodIsStrict('lastIndexOf');
|
|
3755
|
-
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
|
|
3756
|
-
var USES_TO_LENGTH$7 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
3757
|
-
var FORCED$3 = NEGATIVE_ZERO$1 || !STRICT_METHOD$4 || !USES_TO_LENGTH$7;
|
|
3758
|
-
|
|
3759
|
-
// `Array.prototype.lastIndexOf` method implementation
|
|
3760
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
|
|
3761
|
-
var arrayLastIndexOf = FORCED$3 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
|
|
3762
|
-
// convert -0 to +0
|
|
3763
|
-
if (NEGATIVE_ZERO$1) return nativeLastIndexOf.apply(this, arguments) || 0;
|
|
3764
|
-
var O = toIndexedObject(this);
|
|
3765
|
-
var length = toLength(O.length);
|
|
3766
|
-
var index = length - 1;
|
|
3767
|
-
if (arguments.length > 1) index = min$5(index, toInteger(arguments[1]));
|
|
3768
|
-
if (index < 0) index = length + index;
|
|
3769
|
-
for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
|
|
3770
|
-
return -1;
|
|
3771
|
-
} : nativeLastIndexOf;
|
|
3772
|
-
|
|
3773
|
-
// `Array.prototype.lastIndexOf` method
|
|
3774
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
|
|
3775
|
-
_export({ target: 'Array', proto: true, forced: arrayLastIndexOf !== [].lastIndexOf }, {
|
|
3776
|
-
lastIndexOf: arrayLastIndexOf
|
|
3777
|
-
});
|
|
3778
|
-
|
|
3779
3702
|
var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('slice');
|
|
3780
|
-
var USES_TO_LENGTH$
|
|
3703
|
+
var USES_TO_LENGTH$5 = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
|
|
3781
3704
|
|
|
3782
3705
|
var SPECIES$5 = wellKnownSymbol('species');
|
|
3783
3706
|
var nativeSlice = [].slice;
|
|
3784
3707
|
var max$3 = Math.max;
|
|
3785
3708
|
|
|
3786
3709
|
// `Array.prototype.slice` method
|
|
3787
|
-
// https://tc39.
|
|
3710
|
+
// https://tc39.es/ecma262/#sec-array.prototype.slice
|
|
3788
3711
|
// fallback for not array-like ES3 strings and DOM objects
|
|
3789
|
-
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$
|
|
3712
|
+
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 || !USES_TO_LENGTH$5 }, {
|
|
3790
3713
|
slice: function slice(start, end) {
|
|
3791
3714
|
var O = toIndexedObject(this);
|
|
3792
3715
|
var length = toLength(O.length);
|
|
@@ -3815,7 +3738,7 @@
|
|
|
3815
3738
|
});
|
|
3816
3739
|
|
|
3817
3740
|
// `Array[@@species]` getter
|
|
3818
|
-
// https://tc39.
|
|
3741
|
+
// https://tc39.es/ecma262/#sec-get-array-@@species
|
|
3819
3742
|
setSpecies('Array');
|
|
3820
3743
|
|
|
3821
3744
|
var arrayBufferNative = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
|
|
@@ -3832,7 +3755,7 @@
|
|
|
3832
3755
|
};
|
|
3833
3756
|
|
|
3834
3757
|
// `ToIndex` abstract operation
|
|
3835
|
-
// https://tc39.
|
|
3758
|
+
// https://tc39.es/ecma262/#sec-toindex
|
|
3836
3759
|
var toIndex = function (it) {
|
|
3837
3760
|
if (it === undefined) return 0;
|
|
3838
3761
|
var number = toInteger(it);
|
|
@@ -4148,7 +4071,7 @@
|
|
|
4148
4071
|
var NativeArrayBuffer$1 = global_1[ARRAY_BUFFER$1];
|
|
4149
4072
|
|
|
4150
4073
|
// `ArrayBuffer` constructor
|
|
4151
|
-
// https://tc39.
|
|
4074
|
+
// https://tc39.es/ecma262/#sec-arraybuffer-constructor
|
|
4152
4075
|
_export({ global: true, forced: NativeArrayBuffer$1 !== ArrayBuffer$1 }, {
|
|
4153
4076
|
ArrayBuffer: ArrayBuffer$1
|
|
4154
4077
|
});
|
|
@@ -4167,16 +4090,16 @@
|
|
|
4167
4090
|
var regexp = /./;
|
|
4168
4091
|
try {
|
|
4169
4092
|
'/./'[METHOD_NAME](regexp);
|
|
4170
|
-
} catch (
|
|
4093
|
+
} catch (error1) {
|
|
4171
4094
|
try {
|
|
4172
4095
|
regexp[MATCH$2] = false;
|
|
4173
4096
|
return '/./'[METHOD_NAME](regexp);
|
|
4174
|
-
} catch (
|
|
4097
|
+
} catch (error2) { /* empty */ }
|
|
4175
4098
|
} return false;
|
|
4176
4099
|
};
|
|
4177
4100
|
|
|
4178
4101
|
// `String.prototype.includes` method
|
|
4179
|
-
// https://tc39.
|
|
4102
|
+
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
4180
4103
|
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
|
4181
4104
|
includes: function includes(searchString /* , position = 0 */) {
|
|
4182
4105
|
return !!~String(requireObjectCoercible(this))
|
|
@@ -4198,7 +4121,7 @@
|
|
|
4198
4121
|
|
|
4199
4122
|
|
|
4200
4123
|
// `String.prototype.trim` method
|
|
4201
|
-
// https://tc39.
|
|
4124
|
+
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
4202
4125
|
_export({ target: 'String', proto: true, forced: stringTrimForced('trim') }, {
|
|
4203
4126
|
trim: function trim() {
|
|
4204
4127
|
return $trim(this);
|
|
@@ -4276,13 +4199,24 @@
|
|
|
4276
4199
|
Float64Array: 8
|
|
4277
4200
|
};
|
|
4278
4201
|
|
|
4202
|
+
var BigIntArrayConstructorsList = {
|
|
4203
|
+
BigInt64Array: 8,
|
|
4204
|
+
BigUint64Array: 8
|
|
4205
|
+
};
|
|
4206
|
+
|
|
4279
4207
|
var isView = function isView(it) {
|
|
4208
|
+
if (!isObject(it)) return false;
|
|
4280
4209
|
var klass = classof(it);
|
|
4281
|
-
return klass === 'DataView'
|
|
4210
|
+
return klass === 'DataView'
|
|
4211
|
+
|| has(TypedArrayConstructorsList, klass)
|
|
4212
|
+
|| has(BigIntArrayConstructorsList, klass);
|
|
4282
4213
|
};
|
|
4283
4214
|
|
|
4284
4215
|
var isTypedArray = function (it) {
|
|
4285
|
-
|
|
4216
|
+
if (!isObject(it)) return false;
|
|
4217
|
+
var klass = classof(it);
|
|
4218
|
+
return has(TypedArrayConstructorsList, klass)
|
|
4219
|
+
|| has(BigIntArrayConstructorsList, klass);
|
|
4286
4220
|
};
|
|
4287
4221
|
|
|
4288
4222
|
var aTypedArray = function (it) {
|
|
@@ -4702,24 +4636,24 @@
|
|
|
4702
4636
|
});
|
|
4703
4637
|
|
|
4704
4638
|
// `Uint8Array` constructor
|
|
4705
|
-
// https://tc39.
|
|
4639
|
+
// https://tc39.es/ecma262/#sec-typedarray-objects
|
|
4706
4640
|
typedArrayConstructor('Uint8', function (init) {
|
|
4707
4641
|
return function Uint8Array(data, byteOffset, length) {
|
|
4708
4642
|
return init(this, data, byteOffset, length);
|
|
4709
4643
|
};
|
|
4710
4644
|
});
|
|
4711
4645
|
|
|
4712
|
-
var min$
|
|
4646
|
+
var min$5 = Math.min;
|
|
4713
4647
|
|
|
4714
4648
|
// `Array.prototype.copyWithin` method implementation
|
|
4715
|
-
// https://tc39.
|
|
4649
|
+
// https://tc39.es/ecma262/#sec-array.prototype.copywithin
|
|
4716
4650
|
var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
|
|
4717
4651
|
var O = toObject(this);
|
|
4718
4652
|
var len = toLength(O.length);
|
|
4719
4653
|
var to = toAbsoluteIndex(target, len);
|
|
4720
4654
|
var from = toAbsoluteIndex(start, len);
|
|
4721
4655
|
var end = arguments.length > 2 ? arguments[2] : undefined;
|
|
4722
|
-
var count = min$
|
|
4656
|
+
var count = min$5((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
|
|
4723
4657
|
var inc = 1;
|
|
4724
4658
|
if (from < to && to < from + count) {
|
|
4725
4659
|
inc = -1;
|
|
@@ -4738,7 +4672,7 @@
|
|
|
4738
4672
|
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4739
4673
|
|
|
4740
4674
|
// `%TypedArray%.prototype.copyWithin` method
|
|
4741
|
-
// https://tc39.
|
|
4675
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
|
|
4742
4676
|
exportTypedArrayMethod$1('copyWithin', function copyWithin(target, start /* , end */) {
|
|
4743
4677
|
return arrayCopyWithin.call(aTypedArray$1(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
|
|
4744
4678
|
});
|
|
@@ -4749,7 +4683,7 @@
|
|
|
4749
4683
|
var exportTypedArrayMethod$2 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4750
4684
|
|
|
4751
4685
|
// `%TypedArray%.prototype.every` method
|
|
4752
|
-
// https://tc39.
|
|
4686
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
|
|
4753
4687
|
exportTypedArrayMethod$2('every', function every(callbackfn /* , thisArg */) {
|
|
4754
4688
|
return $every(aTypedArray$2(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4755
4689
|
});
|
|
@@ -4758,7 +4692,7 @@
|
|
|
4758
4692
|
var exportTypedArrayMethod$3 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4759
4693
|
|
|
4760
4694
|
// `%TypedArray%.prototype.fill` method
|
|
4761
|
-
// https://tc39.
|
|
4695
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
|
|
4762
4696
|
// eslint-disable-next-line no-unused-vars
|
|
4763
4697
|
exportTypedArrayMethod$3('fill', function fill(value /* , start, end */) {
|
|
4764
4698
|
return arrayFill.apply(aTypedArray$3(this), arguments);
|
|
@@ -4772,7 +4706,7 @@
|
|
|
4772
4706
|
var exportTypedArrayMethod$4 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4773
4707
|
|
|
4774
4708
|
// `%TypedArray%.prototype.filter` method
|
|
4775
|
-
// https://tc39.
|
|
4709
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
|
|
4776
4710
|
exportTypedArrayMethod$4('filter', function filter(callbackfn /* , thisArg */) {
|
|
4777
4711
|
var list = $filter$1(aTypedArray$4(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4778
4712
|
var C = speciesConstructor(this, this.constructor);
|
|
@@ -4789,7 +4723,7 @@
|
|
|
4789
4723
|
var exportTypedArrayMethod$5 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4790
4724
|
|
|
4791
4725
|
// `%TypedArray%.prototype.find` method
|
|
4792
|
-
// https://tc39.
|
|
4726
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
|
|
4793
4727
|
exportTypedArrayMethod$5('find', function find(predicate /* , thisArg */) {
|
|
4794
4728
|
return $find(aTypedArray$5(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
|
|
4795
4729
|
});
|
|
@@ -4800,7 +4734,7 @@
|
|
|
4800
4734
|
var exportTypedArrayMethod$6 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4801
4735
|
|
|
4802
4736
|
// `%TypedArray%.prototype.findIndex` method
|
|
4803
|
-
// https://tc39.
|
|
4737
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
|
|
4804
4738
|
exportTypedArrayMethod$6('findIndex', function findIndex(predicate /* , thisArg */) {
|
|
4805
4739
|
return $findIndex(aTypedArray$6(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
|
|
4806
4740
|
});
|
|
@@ -4811,7 +4745,7 @@
|
|
|
4811
4745
|
var exportTypedArrayMethod$7 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4812
4746
|
|
|
4813
4747
|
// `%TypedArray%.prototype.forEach` method
|
|
4814
|
-
// https://tc39.
|
|
4748
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
|
|
4815
4749
|
exportTypedArrayMethod$7('forEach', function forEach(callbackfn /* , thisArg */) {
|
|
4816
4750
|
$forEach$2(aTypedArray$7(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4817
4751
|
});
|
|
@@ -4822,20 +4756,20 @@
|
|
|
4822
4756
|
var exportTypedArrayMethod$8 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4823
4757
|
|
|
4824
4758
|
// `%TypedArray%.prototype.includes` method
|
|
4825
|
-
// https://tc39.
|
|
4759
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
|
|
4826
4760
|
exportTypedArrayMethod$8('includes', function includes(searchElement /* , fromIndex */) {
|
|
4827
4761
|
return $includes$1(aTypedArray$8(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
4828
4762
|
});
|
|
4829
4763
|
|
|
4830
|
-
var $indexOf
|
|
4764
|
+
var $indexOf = arrayIncludes.indexOf;
|
|
4831
4765
|
|
|
4832
4766
|
var aTypedArray$9 = arrayBufferViewCore.aTypedArray;
|
|
4833
4767
|
var exportTypedArrayMethod$9 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4834
4768
|
|
|
4835
4769
|
// `%TypedArray%.prototype.indexOf` method
|
|
4836
|
-
// https://tc39.
|
|
4770
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
|
|
4837
4771
|
exportTypedArrayMethod$9('indexOf', function indexOf(searchElement /* , fromIndex */) {
|
|
4838
|
-
return $indexOf
|
|
4772
|
+
return $indexOf(aTypedArray$9(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
4839
4773
|
});
|
|
4840
4774
|
|
|
4841
4775
|
var ITERATOR$5 = wellKnownSymbol('iterator');
|
|
@@ -4855,20 +4789,20 @@
|
|
|
4855
4789
|
};
|
|
4856
4790
|
|
|
4857
4791
|
// `%TypedArray%.prototype.entries` method
|
|
4858
|
-
// https://tc39.
|
|
4792
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
|
|
4859
4793
|
exportTypedArrayMethod$a('entries', function entries() {
|
|
4860
4794
|
return arrayEntries.call(aTypedArray$a(this));
|
|
4861
4795
|
});
|
|
4862
4796
|
// `%TypedArray%.prototype.keys` method
|
|
4863
|
-
// https://tc39.
|
|
4797
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
|
|
4864
4798
|
exportTypedArrayMethod$a('keys', function keys() {
|
|
4865
4799
|
return arrayKeys.call(aTypedArray$a(this));
|
|
4866
4800
|
});
|
|
4867
4801
|
// `%TypedArray%.prototype.values` method
|
|
4868
|
-
// https://tc39.
|
|
4802
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
|
|
4869
4803
|
exportTypedArrayMethod$a('values', typedArrayValues, !CORRECT_ITER_NAME);
|
|
4870
4804
|
// `%TypedArray%.prototype[@@iterator]` method
|
|
4871
|
-
// https://tc39.
|
|
4805
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
|
|
4872
4806
|
exportTypedArrayMethod$a(ITERATOR$5, typedArrayValues, !CORRECT_ITER_NAME);
|
|
4873
4807
|
|
|
4874
4808
|
var aTypedArray$b = arrayBufferViewCore.aTypedArray;
|
|
@@ -4876,17 +4810,39 @@
|
|
|
4876
4810
|
var $join = [].join;
|
|
4877
4811
|
|
|
4878
4812
|
// `%TypedArray%.prototype.join` method
|
|
4879
|
-
// https://tc39.
|
|
4813
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
|
|
4880
4814
|
// eslint-disable-next-line no-unused-vars
|
|
4881
4815
|
exportTypedArrayMethod$b('join', function join(separator) {
|
|
4882
4816
|
return $join.apply(aTypedArray$b(this), arguments);
|
|
4883
4817
|
});
|
|
4884
4818
|
|
|
4819
|
+
var min$6 = Math.min;
|
|
4820
|
+
var nativeLastIndexOf = [].lastIndexOf;
|
|
4821
|
+
var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
|
|
4822
|
+
var STRICT_METHOD$2 = arrayMethodIsStrict('lastIndexOf');
|
|
4823
|
+
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
|
|
4824
|
+
var USES_TO_LENGTH$6 = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
|
|
4825
|
+
var FORCED$3 = NEGATIVE_ZERO || !STRICT_METHOD$2 || !USES_TO_LENGTH$6;
|
|
4826
|
+
|
|
4827
|
+
// `Array.prototype.lastIndexOf` method implementation
|
|
4828
|
+
// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
|
|
4829
|
+
var arrayLastIndexOf = FORCED$3 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
|
|
4830
|
+
// convert -0 to +0
|
|
4831
|
+
if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
|
|
4832
|
+
var O = toIndexedObject(this);
|
|
4833
|
+
var length = toLength(O.length);
|
|
4834
|
+
var index = length - 1;
|
|
4835
|
+
if (arguments.length > 1) index = min$6(index, toInteger(arguments[1]));
|
|
4836
|
+
if (index < 0) index = length + index;
|
|
4837
|
+
for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
|
|
4838
|
+
return -1;
|
|
4839
|
+
} : nativeLastIndexOf;
|
|
4840
|
+
|
|
4885
4841
|
var aTypedArray$c = arrayBufferViewCore.aTypedArray;
|
|
4886
4842
|
var exportTypedArrayMethod$c = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4887
4843
|
|
|
4888
4844
|
// `%TypedArray%.prototype.lastIndexOf` method
|
|
4889
|
-
// https://tc39.
|
|
4845
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
|
|
4890
4846
|
// eslint-disable-next-line no-unused-vars
|
|
4891
4847
|
exportTypedArrayMethod$c('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
|
|
4892
4848
|
return arrayLastIndexOf.apply(aTypedArray$c(this), arguments);
|
|
@@ -4900,22 +4856,58 @@
|
|
|
4900
4856
|
var exportTypedArrayMethod$d = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4901
4857
|
|
|
4902
4858
|
// `%TypedArray%.prototype.map` method
|
|
4903
|
-
// https://tc39.
|
|
4859
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
|
|
4904
4860
|
exportTypedArrayMethod$d('map', function map(mapfn /* , thisArg */) {
|
|
4905
4861
|
return $map$1(aTypedArray$d(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
|
|
4906
4862
|
return new (aTypedArrayConstructor$3(speciesConstructor(O, O.constructor)))(length);
|
|
4907
4863
|
});
|
|
4908
4864
|
});
|
|
4909
4865
|
|
|
4910
|
-
|
|
4866
|
+
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
4867
|
+
var createMethod$4 = function (IS_RIGHT) {
|
|
4868
|
+
return function (that, callbackfn, argumentsLength, memo) {
|
|
4869
|
+
aFunction$1(callbackfn);
|
|
4870
|
+
var O = toObject(that);
|
|
4871
|
+
var self = indexedObject(O);
|
|
4872
|
+
var length = toLength(O.length);
|
|
4873
|
+
var index = IS_RIGHT ? length - 1 : 0;
|
|
4874
|
+
var i = IS_RIGHT ? -1 : 1;
|
|
4875
|
+
if (argumentsLength < 2) while (true) {
|
|
4876
|
+
if (index in self) {
|
|
4877
|
+
memo = self[index];
|
|
4878
|
+
index += i;
|
|
4879
|
+
break;
|
|
4880
|
+
}
|
|
4881
|
+
index += i;
|
|
4882
|
+
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
4883
|
+
throw TypeError('Reduce of empty array with no initial value');
|
|
4884
|
+
}
|
|
4885
|
+
}
|
|
4886
|
+
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
4887
|
+
memo = callbackfn(memo, self[index], index, O);
|
|
4888
|
+
}
|
|
4889
|
+
return memo;
|
|
4890
|
+
};
|
|
4891
|
+
};
|
|
4892
|
+
|
|
4893
|
+
var arrayReduce = {
|
|
4894
|
+
// `Array.prototype.reduce` method
|
|
4895
|
+
// https://tc39.es/ecma262/#sec-array.prototype.reduce
|
|
4896
|
+
left: createMethod$4(false),
|
|
4897
|
+
// `Array.prototype.reduceRight` method
|
|
4898
|
+
// https://tc39.es/ecma262/#sec-array.prototype.reduceright
|
|
4899
|
+
right: createMethod$4(true)
|
|
4900
|
+
};
|
|
4901
|
+
|
|
4902
|
+
var $reduce = arrayReduce.left;
|
|
4911
4903
|
|
|
4912
4904
|
var aTypedArray$e = arrayBufferViewCore.aTypedArray;
|
|
4913
4905
|
var exportTypedArrayMethod$e = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4914
4906
|
|
|
4915
4907
|
// `%TypedArray%.prototype.reduce` method
|
|
4916
|
-
// https://tc39.
|
|
4908
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
|
|
4917
4909
|
exportTypedArrayMethod$e('reduce', function reduce(callbackfn /* , initialValue */) {
|
|
4918
|
-
return $reduce
|
|
4910
|
+
return $reduce(aTypedArray$e(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
4919
4911
|
});
|
|
4920
4912
|
|
|
4921
4913
|
var $reduceRight = arrayReduce.right;
|
|
@@ -4924,7 +4916,7 @@
|
|
|
4924
4916
|
var exportTypedArrayMethod$f = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4925
4917
|
|
|
4926
4918
|
// `%TypedArray%.prototype.reduceRicht` method
|
|
4927
|
-
// https://tc39.
|
|
4919
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
|
|
4928
4920
|
exportTypedArrayMethod$f('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
|
|
4929
4921
|
return $reduceRight(aTypedArray$f(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
|
|
4930
4922
|
});
|
|
@@ -4934,7 +4926,7 @@
|
|
|
4934
4926
|
var floor$3 = Math.floor;
|
|
4935
4927
|
|
|
4936
4928
|
// `%TypedArray%.prototype.reverse` method
|
|
4937
|
-
// https://tc39.
|
|
4929
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
|
|
4938
4930
|
exportTypedArrayMethod$g('reverse', function reverse() {
|
|
4939
4931
|
var that = this;
|
|
4940
4932
|
var length = aTypedArray$g(that).length;
|
|
@@ -4957,7 +4949,7 @@
|
|
|
4957
4949
|
});
|
|
4958
4950
|
|
|
4959
4951
|
// `%TypedArray%.prototype.set` method
|
|
4960
|
-
// https://tc39.
|
|
4952
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
|
|
4961
4953
|
exportTypedArrayMethod$h('set', function set(arrayLike /* , offset */) {
|
|
4962
4954
|
aTypedArray$h(this);
|
|
4963
4955
|
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
|
|
@@ -4980,7 +4972,7 @@
|
|
|
4980
4972
|
});
|
|
4981
4973
|
|
|
4982
4974
|
// `%TypedArray%.prototype.slice` method
|
|
4983
|
-
// https://tc39.
|
|
4975
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
|
|
4984
4976
|
exportTypedArrayMethod$i('slice', function slice(start, end) {
|
|
4985
4977
|
var list = $slice.call(aTypedArray$i(this), start, end);
|
|
4986
4978
|
var C = speciesConstructor(this, this.constructor);
|
|
@@ -4997,7 +4989,7 @@
|
|
|
4997
4989
|
var exportTypedArrayMethod$j = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4998
4990
|
|
|
4999
4991
|
// `%TypedArray%.prototype.some` method
|
|
5000
|
-
// https://tc39.
|
|
4992
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
|
|
5001
4993
|
exportTypedArrayMethod$j('some', function some(callbackfn /* , thisArg */) {
|
|
5002
4994
|
return $some(aTypedArray$j(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
5003
4995
|
});
|
|
@@ -5007,7 +4999,7 @@
|
|
|
5007
4999
|
var $sort = [].sort;
|
|
5008
5000
|
|
|
5009
5001
|
// `%TypedArray%.prototype.sort` method
|
|
5010
|
-
// https://tc39.
|
|
5002
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
|
|
5011
5003
|
exportTypedArrayMethod$k('sort', function sort(comparefn) {
|
|
5012
5004
|
return $sort.call(aTypedArray$k(this), comparefn);
|
|
5013
5005
|
});
|
|
@@ -5016,7 +5008,7 @@
|
|
|
5016
5008
|
var exportTypedArrayMethod$l = arrayBufferViewCore.exportTypedArrayMethod;
|
|
5017
5009
|
|
|
5018
5010
|
// `%TypedArray%.prototype.subarray` method
|
|
5019
|
-
// https://tc39.
|
|
5011
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
|
|
5020
5012
|
exportTypedArrayMethod$l('subarray', function subarray(begin, end) {
|
|
5021
5013
|
var O = aTypedArray$l(this);
|
|
5022
5014
|
var length = O.length;
|
|
@@ -5046,7 +5038,7 @@
|
|
|
5046
5038
|
});
|
|
5047
5039
|
|
|
5048
5040
|
// `%TypedArray%.prototype.toLocaleString` method
|
|
5049
|
-
// https://tc39.
|
|
5041
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
|
|
5050
5042
|
exportTypedArrayMethod$m('toLocaleString', function toLocaleString() {
|
|
5051
5043
|
return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice$1.call(aTypedArray$m(this)) : aTypedArray$m(this), arguments);
|
|
5052
5044
|
}, FORCED$6);
|
|
@@ -5069,7 +5061,7 @@
|
|
|
5069
5061
|
var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
|
|
5070
5062
|
|
|
5071
5063
|
// `%TypedArray%.prototype.toString` method
|
|
5072
|
-
// https://tc39.
|
|
5064
|
+
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
|
|
5073
5065
|
exportTypedArrayMethod$n('toString', arrayToString, IS_NOT_ARRAY_METHOD);
|
|
5074
5066
|
|
|
5075
5067
|
// `URL.prototype.toJSON` method
|
|
@@ -7253,7 +7245,7 @@
|
|
|
7253
7245
|
|
|
7254
7246
|
var performance$1 = global$2.performance || {};
|
|
7255
7247
|
|
|
7256
|
-
|
|
7248
|
+
performance$1.now || performance$1.mozNow || performance$1.msNow || performance$1.oNow || performance$1.webkitNow || function () {
|
|
7257
7249
|
return new Date().getTime();
|
|
7258
7250
|
}; // generate timestamp or delta
|
|
7259
7251
|
|
|
@@ -10995,6 +10987,7 @@
|
|
|
10995
10987
|
return -1;
|
|
10996
10988
|
}
|
|
10997
10989
|
|
|
10990
|
+
// A bit simpler than readable streams.
|
|
10998
10991
|
Writable.WritableState = WritableState;
|
|
10999
10992
|
inherits$1(Writable, EventEmitter);
|
|
11000
10993
|
|
|
@@ -11741,28 +11734,38 @@
|
|
|
11741
11734
|
|
|
11742
11735
|
var nativePromiseConstructor = global_1.Promise;
|
|
11743
11736
|
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
return
|
|
11748
|
-
// 7.4.6 IteratorClose(iterator, completion)
|
|
11749
|
-
} catch (error) {
|
|
11750
|
-
var returnMethod = iterator['return'];
|
|
11751
|
-
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
|
|
11752
|
-
throw error;
|
|
11737
|
+
var iteratorClose = function (iterator) {
|
|
11738
|
+
var returnMethod = iterator['return'];
|
|
11739
|
+
if (returnMethod !== undefined) {
|
|
11740
|
+
return anObject(returnMethod.call(iterator)).value;
|
|
11753
11741
|
}
|
|
11754
11742
|
};
|
|
11755
11743
|
|
|
11756
|
-
var iterate_1 = createCommonjsModule(function (module) {
|
|
11757
11744
|
var Result = function (stopped, result) {
|
|
11758
11745
|
this.stopped = stopped;
|
|
11759
11746
|
this.result = result;
|
|
11760
11747
|
};
|
|
11761
11748
|
|
|
11762
|
-
var iterate =
|
|
11763
|
-
var
|
|
11749
|
+
var iterate = function (iterable, unboundFunction, options) {
|
|
11750
|
+
var that = options && options.that;
|
|
11751
|
+
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
11752
|
+
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
11753
|
+
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
11754
|
+
var fn = functionBindContext(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);
|
|
11764
11755
|
var iterator, iterFn, index, length, result, next, step;
|
|
11765
11756
|
|
|
11757
|
+
var stop = function (condition) {
|
|
11758
|
+
if (iterator) iteratorClose(iterator);
|
|
11759
|
+
return new Result(true, condition);
|
|
11760
|
+
};
|
|
11761
|
+
|
|
11762
|
+
var callFn = function (value) {
|
|
11763
|
+
if (AS_ENTRIES) {
|
|
11764
|
+
anObject(value);
|
|
11765
|
+
return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
|
|
11766
|
+
} return INTERRUPTED ? fn(value, stop) : fn(value);
|
|
11767
|
+
};
|
|
11768
|
+
|
|
11766
11769
|
if (IS_ITERATOR) {
|
|
11767
11770
|
iterator = iterable;
|
|
11768
11771
|
} else {
|
|
@@ -11771,9 +11774,7 @@
|
|
|
11771
11774
|
// optimisation for array iterators
|
|
11772
11775
|
if (isArrayIteratorMethod(iterFn)) {
|
|
11773
11776
|
for (index = 0, length = toLength(iterable.length); length > index; index++) {
|
|
11774
|
-
result =
|
|
11775
|
-
? boundFunction(anObject(step = iterable[index])[0], step[1])
|
|
11776
|
-
: boundFunction(iterable[index]);
|
|
11777
|
+
result = callFn(iterable[index]);
|
|
11777
11778
|
if (result && result instanceof Result) return result;
|
|
11778
11779
|
} return new Result(false);
|
|
11779
11780
|
}
|
|
@@ -11782,18 +11783,20 @@
|
|
|
11782
11783
|
|
|
11783
11784
|
next = iterator.next;
|
|
11784
11785
|
while (!(step = next.call(iterator)).done) {
|
|
11785
|
-
|
|
11786
|
+
try {
|
|
11787
|
+
result = callFn(step.value);
|
|
11788
|
+
} catch (error) {
|
|
11789
|
+
iteratorClose(iterator);
|
|
11790
|
+
throw error;
|
|
11791
|
+
}
|
|
11786
11792
|
if (typeof result == 'object' && result && result instanceof Result) return result;
|
|
11787
11793
|
} return new Result(false);
|
|
11788
11794
|
};
|
|
11789
11795
|
|
|
11790
|
-
iterate.stop = function (result) {
|
|
11791
|
-
return new Result(true, result);
|
|
11792
|
-
};
|
|
11793
|
-
});
|
|
11794
|
-
|
|
11795
11796
|
var engineIsIos = /(iphone|ipod|ipad).*applewebkit/i.test(engineUserAgent);
|
|
11796
11797
|
|
|
11798
|
+
var engineIsNode = classofRaw(global_1.process) == 'process';
|
|
11799
|
+
|
|
11797
11800
|
var location$1 = global_1.location;
|
|
11798
11801
|
var set$2 = global_1.setImmediate;
|
|
11799
11802
|
var clear = global_1.clearImmediate;
|
|
@@ -11846,7 +11849,7 @@
|
|
|
11846
11849
|
delete queue$2[id];
|
|
11847
11850
|
};
|
|
11848
11851
|
// Node.js 0.8-
|
|
11849
|
-
if (
|
|
11852
|
+
if (engineIsNode) {
|
|
11850
11853
|
defer = function (id) {
|
|
11851
11854
|
process$2.nextTick(runner(id));
|
|
11852
11855
|
};
|
|
@@ -11868,8 +11871,8 @@
|
|
|
11868
11871
|
global_1.addEventListener &&
|
|
11869
11872
|
typeof postMessage == 'function' &&
|
|
11870
11873
|
!global_1.importScripts &&
|
|
11871
|
-
|
|
11872
|
-
|
|
11874
|
+
location$1 && location$1.protocol !== 'file:' &&
|
|
11875
|
+
!fails(post)
|
|
11873
11876
|
) {
|
|
11874
11877
|
defer = post;
|
|
11875
11878
|
global_1.addEventListener('message', listener, false);
|
|
@@ -11894,15 +11897,18 @@
|
|
|
11894
11897
|
clear: clear
|
|
11895
11898
|
};
|
|
11896
11899
|
|
|
11897
|
-
var
|
|
11900
|
+
var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(engineUserAgent);
|
|
11898
11901
|
|
|
11902
|
+
var getOwnPropertyDescriptor$3 = objectGetOwnPropertyDescriptor.f;
|
|
11899
11903
|
var macrotask = task.set;
|
|
11900
11904
|
|
|
11901
11905
|
|
|
11906
|
+
|
|
11907
|
+
|
|
11902
11908
|
var MutationObserver = global_1.MutationObserver || global_1.WebKitMutationObserver;
|
|
11909
|
+
var document$2 = global_1.document;
|
|
11903
11910
|
var process$3 = global_1.process;
|
|
11904
11911
|
var Promise$1 = global_1.Promise;
|
|
11905
|
-
var IS_NODE = classofRaw(process$3) == 'process';
|
|
11906
11912
|
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
|
|
11907
11913
|
var queueMicrotaskDescriptor = getOwnPropertyDescriptor$3(global_1, 'queueMicrotask');
|
|
11908
11914
|
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
|
|
@@ -11913,7 +11919,7 @@
|
|
|
11913
11919
|
if (!queueMicrotask) {
|
|
11914
11920
|
flush = function () {
|
|
11915
11921
|
var parent, fn;
|
|
11916
|
-
if (
|
|
11922
|
+
if (engineIsNode && (parent = process$3.domain)) parent.exit();
|
|
11917
11923
|
while (head) {
|
|
11918
11924
|
fn = head.fn;
|
|
11919
11925
|
head = head.next;
|
|
@@ -11928,15 +11934,11 @@
|
|
|
11928
11934
|
if (parent) parent.enter();
|
|
11929
11935
|
};
|
|
11930
11936
|
|
|
11931
|
-
// Node.js
|
|
11932
|
-
if (IS_NODE) {
|
|
11933
|
-
notify = function () {
|
|
11934
|
-
process$3.nextTick(flush);
|
|
11935
|
-
};
|
|
11936
11937
|
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
|
|
11937
|
-
|
|
11938
|
+
// also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
|
|
11939
|
+
if (!engineIsIos && !engineIsNode && !engineIsWebosWebkit && MutationObserver && document$2) {
|
|
11938
11940
|
toggle = true;
|
|
11939
|
-
node = document.createTextNode('');
|
|
11941
|
+
node = document$2.createTextNode('');
|
|
11940
11942
|
new MutationObserver(flush).observe(node, { characterData: true });
|
|
11941
11943
|
notify = function () {
|
|
11942
11944
|
node.data = toggle = !toggle;
|
|
@@ -11949,6 +11951,11 @@
|
|
|
11949
11951
|
notify = function () {
|
|
11950
11952
|
then.call(promise, flush);
|
|
11951
11953
|
};
|
|
11954
|
+
// Node.js without promises
|
|
11955
|
+
} else if (engineIsNode) {
|
|
11956
|
+
notify = function () {
|
|
11957
|
+
process$3.nextTick(flush);
|
|
11958
|
+
};
|
|
11952
11959
|
// for other environments - macrotask based on:
|
|
11953
11960
|
// - setImmediate
|
|
11954
11961
|
// - MessageChannel
|
|
@@ -12027,6 +12034,7 @@
|
|
|
12027
12034
|
|
|
12028
12035
|
|
|
12029
12036
|
|
|
12037
|
+
|
|
12030
12038
|
var SPECIES$6 = wellKnownSymbol('species');
|
|
12031
12039
|
var PROMISE = 'Promise';
|
|
12032
12040
|
var getInternalState$3 = internalState.get;
|
|
@@ -12034,13 +12042,13 @@
|
|
|
12034
12042
|
var getInternalPromiseState = internalState.getterFor(PROMISE);
|
|
12035
12043
|
var PromiseConstructor = nativePromiseConstructor;
|
|
12036
12044
|
var TypeError$1 = global_1.TypeError;
|
|
12037
|
-
var document$
|
|
12045
|
+
var document$3 = global_1.document;
|
|
12038
12046
|
var process$4 = global_1.process;
|
|
12039
12047
|
var $fetch = getBuiltIn('fetch');
|
|
12040
12048
|
var newPromiseCapability$1 = newPromiseCapability.f;
|
|
12041
12049
|
var newGenericPromiseCapability = newPromiseCapability$1;
|
|
12042
|
-
var
|
|
12043
|
-
var
|
|
12050
|
+
var DISPATCH_EVENT = !!(document$3 && document$3.createEvent && global_1.dispatchEvent);
|
|
12051
|
+
var NATIVE_REJECTION_EVENT = typeof PromiseRejectionEvent == 'function';
|
|
12044
12052
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
12045
12053
|
var REJECTION_HANDLED = 'rejectionhandled';
|
|
12046
12054
|
var PENDING = 0;
|
|
@@ -12058,7 +12066,7 @@
|
|
|
12058
12066
|
// We can't detect it synchronously, so just check versions
|
|
12059
12067
|
if (engineV8Version === 66) return true;
|
|
12060
12068
|
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
12061
|
-
if (!
|
|
12069
|
+
if (!engineIsNode && !NATIVE_REJECTION_EVENT) return true;
|
|
12062
12070
|
}
|
|
12063
12071
|
// We can't use @@species feature detection in V8 since it causes
|
|
12064
12072
|
// deoptimization and performance degradation
|
|
@@ -12084,7 +12092,7 @@
|
|
|
12084
12092
|
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
12085
12093
|
};
|
|
12086
12094
|
|
|
12087
|
-
var notify$1 = function (
|
|
12095
|
+
var notify$1 = function (state, isReject) {
|
|
12088
12096
|
if (state.notified) return;
|
|
12089
12097
|
state.notified = true;
|
|
12090
12098
|
var chain = state.reactions;
|
|
@@ -12103,7 +12111,7 @@
|
|
|
12103
12111
|
try {
|
|
12104
12112
|
if (handler) {
|
|
12105
12113
|
if (!ok) {
|
|
12106
|
-
if (state.rejection === UNHANDLED) onHandleUnhandled(
|
|
12114
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
12107
12115
|
state.rejection = HANDLED;
|
|
12108
12116
|
}
|
|
12109
12117
|
if (handler === true) result = value;
|
|
@@ -12128,36 +12136,37 @@
|
|
|
12128
12136
|
}
|
|
12129
12137
|
state.reactions = [];
|
|
12130
12138
|
state.notified = false;
|
|
12131
|
-
if (isReject && !state.rejection) onUnhandled(
|
|
12139
|
+
if (isReject && !state.rejection) onUnhandled(state);
|
|
12132
12140
|
});
|
|
12133
12141
|
};
|
|
12134
12142
|
|
|
12135
12143
|
var dispatchEvent = function (name, promise, reason) {
|
|
12136
12144
|
var event, handler;
|
|
12137
12145
|
if (DISPATCH_EVENT) {
|
|
12138
|
-
event = document$
|
|
12146
|
+
event = document$3.createEvent('Event');
|
|
12139
12147
|
event.promise = promise;
|
|
12140
12148
|
event.reason = reason;
|
|
12141
12149
|
event.initEvent(name, false, true);
|
|
12142
12150
|
global_1.dispatchEvent(event);
|
|
12143
12151
|
} else event = { promise: promise, reason: reason };
|
|
12144
|
-
if (handler = global_1['on' + name]) handler(event);
|
|
12152
|
+
if (!NATIVE_REJECTION_EVENT && (handler = global_1['on' + name])) handler(event);
|
|
12145
12153
|
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
|
|
12146
12154
|
};
|
|
12147
12155
|
|
|
12148
|
-
var onUnhandled = function (
|
|
12156
|
+
var onUnhandled = function (state) {
|
|
12149
12157
|
task$1.call(global_1, function () {
|
|
12158
|
+
var promise = state.facade;
|
|
12150
12159
|
var value = state.value;
|
|
12151
12160
|
var IS_UNHANDLED = isUnhandled(state);
|
|
12152
12161
|
var result;
|
|
12153
12162
|
if (IS_UNHANDLED) {
|
|
12154
12163
|
result = perform(function () {
|
|
12155
|
-
if (
|
|
12164
|
+
if (engineIsNode) {
|
|
12156
12165
|
process$4.emit('unhandledRejection', value, promise);
|
|
12157
12166
|
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
|
|
12158
12167
|
});
|
|
12159
12168
|
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
12160
|
-
state.rejection =
|
|
12169
|
+
state.rejection = engineIsNode || isUnhandled(state) ? UNHANDLED : HANDLED;
|
|
12161
12170
|
if (result.error) throw result.value;
|
|
12162
12171
|
}
|
|
12163
12172
|
});
|
|
@@ -12167,55 +12176,56 @@
|
|
|
12167
12176
|
return state.rejection !== HANDLED && !state.parent;
|
|
12168
12177
|
};
|
|
12169
12178
|
|
|
12170
|
-
var onHandleUnhandled = function (
|
|
12179
|
+
var onHandleUnhandled = function (state) {
|
|
12171
12180
|
task$1.call(global_1, function () {
|
|
12172
|
-
|
|
12181
|
+
var promise = state.facade;
|
|
12182
|
+
if (engineIsNode) {
|
|
12173
12183
|
process$4.emit('rejectionHandled', promise);
|
|
12174
12184
|
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
|
|
12175
12185
|
});
|
|
12176
12186
|
};
|
|
12177
12187
|
|
|
12178
|
-
var bind = function (fn,
|
|
12188
|
+
var bind = function (fn, state, unwrap) {
|
|
12179
12189
|
return function (value) {
|
|
12180
|
-
fn(
|
|
12190
|
+
fn(state, value, unwrap);
|
|
12181
12191
|
};
|
|
12182
12192
|
};
|
|
12183
12193
|
|
|
12184
|
-
var internalReject = function (
|
|
12194
|
+
var internalReject = function (state, value, unwrap) {
|
|
12185
12195
|
if (state.done) return;
|
|
12186
12196
|
state.done = true;
|
|
12187
12197
|
if (unwrap) state = unwrap;
|
|
12188
12198
|
state.value = value;
|
|
12189
12199
|
state.state = REJECTED;
|
|
12190
|
-
notify$1(
|
|
12200
|
+
notify$1(state, true);
|
|
12191
12201
|
};
|
|
12192
12202
|
|
|
12193
|
-
var internalResolve = function (
|
|
12203
|
+
var internalResolve = function (state, value, unwrap) {
|
|
12194
12204
|
if (state.done) return;
|
|
12195
12205
|
state.done = true;
|
|
12196
12206
|
if (unwrap) state = unwrap;
|
|
12197
12207
|
try {
|
|
12198
|
-
if (
|
|
12208
|
+
if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
|
|
12199
12209
|
var then = isThenable(value);
|
|
12200
12210
|
if (then) {
|
|
12201
12211
|
microtask(function () {
|
|
12202
12212
|
var wrapper = { done: false };
|
|
12203
12213
|
try {
|
|
12204
12214
|
then.call(value,
|
|
12205
|
-
bind(internalResolve,
|
|
12206
|
-
bind(internalReject,
|
|
12215
|
+
bind(internalResolve, wrapper, state),
|
|
12216
|
+
bind(internalReject, wrapper, state)
|
|
12207
12217
|
);
|
|
12208
12218
|
} catch (error) {
|
|
12209
|
-
internalReject(
|
|
12219
|
+
internalReject(wrapper, error, state);
|
|
12210
12220
|
}
|
|
12211
12221
|
});
|
|
12212
12222
|
} else {
|
|
12213
12223
|
state.value = value;
|
|
12214
12224
|
state.state = FULFILLED;
|
|
12215
|
-
notify$1(
|
|
12225
|
+
notify$1(state, false);
|
|
12216
12226
|
}
|
|
12217
12227
|
} catch (error) {
|
|
12218
|
-
internalReject(
|
|
12228
|
+
internalReject({ done: false }, error, state);
|
|
12219
12229
|
}
|
|
12220
12230
|
};
|
|
12221
12231
|
|
|
@@ -12228,9 +12238,9 @@
|
|
|
12228
12238
|
Internal.call(this);
|
|
12229
12239
|
var state = getInternalState$3(this);
|
|
12230
12240
|
try {
|
|
12231
|
-
executor(bind(internalResolve,
|
|
12241
|
+
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
12232
12242
|
} catch (error) {
|
|
12233
|
-
internalReject(
|
|
12243
|
+
internalReject(state, error);
|
|
12234
12244
|
}
|
|
12235
12245
|
};
|
|
12236
12246
|
// eslint-disable-next-line no-unused-vars
|
|
@@ -12248,20 +12258,20 @@
|
|
|
12248
12258
|
};
|
|
12249
12259
|
Internal.prototype = redefineAll(PromiseConstructor.prototype, {
|
|
12250
12260
|
// `Promise.prototype.then` method
|
|
12251
|
-
// https://tc39.
|
|
12261
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
12252
12262
|
then: function then(onFulfilled, onRejected) {
|
|
12253
12263
|
var state = getInternalPromiseState(this);
|
|
12254
12264
|
var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
|
|
12255
12265
|
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
|
|
12256
12266
|
reaction.fail = typeof onRejected == 'function' && onRejected;
|
|
12257
|
-
reaction.domain =
|
|
12267
|
+
reaction.domain = engineIsNode ? process$4.domain : undefined;
|
|
12258
12268
|
state.parent = true;
|
|
12259
12269
|
state.reactions.push(reaction);
|
|
12260
|
-
if (state.state != PENDING) notify$1(
|
|
12270
|
+
if (state.state != PENDING) notify$1(state, false);
|
|
12261
12271
|
return reaction.promise;
|
|
12262
12272
|
},
|
|
12263
12273
|
// `Promise.prototype.catch` method
|
|
12264
|
-
// https://tc39.
|
|
12274
|
+
// https://tc39.es/ecma262/#sec-promise.prototype.catch
|
|
12265
12275
|
'catch': function (onRejected) {
|
|
12266
12276
|
return this.then(undefined, onRejected);
|
|
12267
12277
|
}
|
|
@@ -12270,8 +12280,8 @@
|
|
|
12270
12280
|
var promise = new Internal();
|
|
12271
12281
|
var state = getInternalState$3(promise);
|
|
12272
12282
|
this.promise = promise;
|
|
12273
|
-
this.resolve = bind(internalResolve,
|
|
12274
|
-
this.reject = bind(internalReject,
|
|
12283
|
+
this.resolve = bind(internalResolve, state);
|
|
12284
|
+
this.reject = bind(internalReject, state);
|
|
12275
12285
|
};
|
|
12276
12286
|
newPromiseCapability.f = newPromiseCapability$1 = function (C) {
|
|
12277
12287
|
return C === PromiseConstructor || C === PromiseWrapper
|
|
@@ -12313,7 +12323,7 @@
|
|
|
12313
12323
|
// statics
|
|
12314
12324
|
_export({ target: PROMISE, stat: true, forced: FORCED$7 }, {
|
|
12315
12325
|
// `Promise.reject` method
|
|
12316
|
-
// https://tc39.
|
|
12326
|
+
// https://tc39.es/ecma262/#sec-promise.reject
|
|
12317
12327
|
reject: function reject(r) {
|
|
12318
12328
|
var capability = newPromiseCapability$1(this);
|
|
12319
12329
|
capability.reject.call(undefined, r);
|
|
@@ -12323,7 +12333,7 @@
|
|
|
12323
12333
|
|
|
12324
12334
|
_export({ target: PROMISE, stat: true, forced: FORCED$7 }, {
|
|
12325
12335
|
// `Promise.resolve` method
|
|
12326
|
-
// https://tc39.
|
|
12336
|
+
// https://tc39.es/ecma262/#sec-promise.resolve
|
|
12327
12337
|
resolve: function resolve(x) {
|
|
12328
12338
|
return promiseResolve( this, x);
|
|
12329
12339
|
}
|
|
@@ -12331,7 +12341,7 @@
|
|
|
12331
12341
|
|
|
12332
12342
|
_export({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
|
|
12333
12343
|
// `Promise.all` method
|
|
12334
|
-
// https://tc39.
|
|
12344
|
+
// https://tc39.es/ecma262/#sec-promise.all
|
|
12335
12345
|
all: function all(iterable) {
|
|
12336
12346
|
var C = this;
|
|
12337
12347
|
var capability = newPromiseCapability$1(C);
|
|
@@ -12342,7 +12352,7 @@
|
|
|
12342
12352
|
var values = [];
|
|
12343
12353
|
var counter = 0;
|
|
12344
12354
|
var remaining = 1;
|
|
12345
|
-
|
|
12355
|
+
iterate(iterable, function (promise) {
|
|
12346
12356
|
var index = counter++;
|
|
12347
12357
|
var alreadyCalled = false;
|
|
12348
12358
|
values.push(undefined);
|
|
@@ -12360,14 +12370,14 @@
|
|
|
12360
12370
|
return capability.promise;
|
|
12361
12371
|
},
|
|
12362
12372
|
// `Promise.race` method
|
|
12363
|
-
// https://tc39.
|
|
12373
|
+
// https://tc39.es/ecma262/#sec-promise.race
|
|
12364
12374
|
race: function race(iterable) {
|
|
12365
12375
|
var C = this;
|
|
12366
12376
|
var capability = newPromiseCapability$1(C);
|
|
12367
12377
|
var reject = capability.reject;
|
|
12368
12378
|
var result = perform(function () {
|
|
12369
12379
|
var $promiseResolve = aFunction$1(C.resolve);
|
|
12370
|
-
|
|
12380
|
+
iterate(iterable, function (promise) {
|
|
12371
12381
|
$promiseResolve.call(C, promise).then(capability.resolve, reject);
|
|
12372
12382
|
});
|
|
12373
12383
|
});
|
|
@@ -12377,23 +12387,23 @@
|
|
|
12377
12387
|
});
|
|
12378
12388
|
|
|
12379
12389
|
// `Symbol.asyncIterator` well-known symbol
|
|
12380
|
-
// https://tc39.
|
|
12390
|
+
// https://tc39.es/ecma262/#sec-symbol.asynciterator
|
|
12381
12391
|
defineWellKnownSymbol('asyncIterator');
|
|
12382
12392
|
|
|
12383
12393
|
// `Symbol.iterator` well-known symbol
|
|
12384
|
-
// https://tc39.
|
|
12394
|
+
// https://tc39.es/ecma262/#sec-symbol.iterator
|
|
12385
12395
|
defineWellKnownSymbol('iterator');
|
|
12386
12396
|
|
|
12387
12397
|
// `Symbol.toStringTag` well-known symbol
|
|
12388
|
-
// https://tc39.
|
|
12398
|
+
// https://tc39.es/ecma262/#sec-symbol.tostringtag
|
|
12389
12399
|
defineWellKnownSymbol('toStringTag');
|
|
12390
12400
|
|
|
12391
12401
|
// JSON[@@toStringTag] property
|
|
12392
|
-
// https://tc39.
|
|
12402
|
+
// https://tc39.es/ecma262/#sec-json-@@tostringtag
|
|
12393
12403
|
setToStringTag(global_1.JSON, 'JSON', true);
|
|
12394
12404
|
|
|
12395
12405
|
// Math[@@toStringTag] property
|
|
12396
|
-
// https://tc39.
|
|
12406
|
+
// https://tc39.es/ecma262/#sec-math-@@tostringtag
|
|
12397
12407
|
setToStringTag(Math, 'Math', true);
|
|
12398
12408
|
|
|
12399
12409
|
var charAt$1 = stringMultibyte.charAt;
|
|
@@ -12405,7 +12415,7 @@
|
|
|
12405
12415
|
var getInternalState$4 = internalState.getterFor(STRING_ITERATOR);
|
|
12406
12416
|
|
|
12407
12417
|
// `String.prototype[@@iterator]` method
|
|
12408
|
-
// https://tc39.
|
|
12418
|
+
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
|
|
12409
12419
|
defineIterator(String, 'String', function (iterated) {
|
|
12410
12420
|
setInternalState$5(this, {
|
|
12411
12421
|
type: STRING_ITERATOR,
|
|
@@ -12413,7 +12423,7 @@
|
|
|
12413
12423
|
index: 0
|
|
12414
12424
|
});
|
|
12415
12425
|
// `%StringIteratorPrototype%.next` method
|
|
12416
|
-
// https://tc39.
|
|
12426
|
+
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
|
|
12417
12427
|
}, function next() {
|
|
12418
12428
|
var state = getInternalState$4(this);
|
|
12419
12429
|
var string = state.string;
|
|
@@ -12453,14 +12463,14 @@
|
|
|
12453
12463
|
}
|
|
12454
12464
|
}
|
|
12455
12465
|
|
|
12456
|
-
|
|
12466
|
+
createCommonjsModule(function (module) {
|
|
12457
12467
|
/**
|
|
12458
12468
|
* Copyright (c) 2014-present, Facebook, Inc.
|
|
12459
12469
|
*
|
|
12460
12470
|
* This source code is licensed under the MIT license found in the
|
|
12461
12471
|
* LICENSE file in the root directory of this source tree.
|
|
12462
12472
|
*/
|
|
12463
|
-
|
|
12473
|
+
var runtime = function (exports) {
|
|
12464
12474
|
|
|
12465
12475
|
var Op = Object.prototype;
|
|
12466
12476
|
var hasOwn = Op.hasOwnProperty;
|
|
@@ -12470,23 +12480,25 @@
|
|
|
12470
12480
|
var iteratorSymbol = $Symbol.iterator || "@@iterator";
|
|
12471
12481
|
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
|
|
12472
12482
|
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
|
|
12473
|
-
var runtime = global.regeneratorRuntime;
|
|
12474
|
-
|
|
12475
|
-
if (runtime) {
|
|
12476
|
-
{
|
|
12477
|
-
// If regeneratorRuntime is defined globally and we're in a module,
|
|
12478
|
-
// make the exports object identical to regeneratorRuntime.
|
|
12479
|
-
module.exports = runtime;
|
|
12480
|
-
} // Don't bother evaluating the rest of this file if the runtime was
|
|
12481
|
-
// already defined globally.
|
|
12482
|
-
|
|
12483
|
-
|
|
12484
|
-
return;
|
|
12485
|
-
} // Define the runtime globally (as expected by generated code) as either
|
|
12486
|
-
// module.exports (if we're in a module) or a new, empty object.
|
|
12487
12483
|
|
|
12484
|
+
function define(obj, key, value) {
|
|
12485
|
+
Object.defineProperty(obj, key, {
|
|
12486
|
+
value: value,
|
|
12487
|
+
enumerable: true,
|
|
12488
|
+
configurable: true,
|
|
12489
|
+
writable: true
|
|
12490
|
+
});
|
|
12491
|
+
return obj[key];
|
|
12492
|
+
}
|
|
12488
12493
|
|
|
12489
|
-
|
|
12494
|
+
try {
|
|
12495
|
+
// IE 8 has a broken Object.defineProperty that only works on DOM objects.
|
|
12496
|
+
define({}, "");
|
|
12497
|
+
} catch (err) {
|
|
12498
|
+
define = function define(obj, key, value) {
|
|
12499
|
+
return obj[key] = value;
|
|
12500
|
+
};
|
|
12501
|
+
}
|
|
12490
12502
|
|
|
12491
12503
|
function wrap(innerFn, outerFn, self, tryLocsList) {
|
|
12492
12504
|
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
|
|
@@ -12499,7 +12511,7 @@
|
|
|
12499
12511
|
return generator;
|
|
12500
12512
|
}
|
|
12501
12513
|
|
|
12502
|
-
|
|
12514
|
+
exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion
|
|
12503
12515
|
// record like context.tryEntries[i].completion. This interface could
|
|
12504
12516
|
// have been (and was previously) designed to take a closure to be
|
|
12505
12517
|
// invoked without arguments, but in all the cases we care about we
|
|
@@ -12561,33 +12573,30 @@
|
|
|
12561
12573
|
var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
|
|
12562
12574
|
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
|
|
12563
12575
|
GeneratorFunctionPrototype.constructor = GeneratorFunction;
|
|
12564
|
-
|
|
12576
|
+
GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"); // Helper for defining the .next, .throw, and .return methods of the
|
|
12565
12577
|
// Iterator interface in terms of a single ._invoke method.
|
|
12566
12578
|
|
|
12567
12579
|
function defineIteratorMethods(prototype) {
|
|
12568
12580
|
["next", "throw", "return"].forEach(function (method) {
|
|
12569
|
-
prototype
|
|
12581
|
+
define(prototype, method, function (arg) {
|
|
12570
12582
|
return this._invoke(method, arg);
|
|
12571
|
-
};
|
|
12583
|
+
});
|
|
12572
12584
|
});
|
|
12573
12585
|
}
|
|
12574
12586
|
|
|
12575
|
-
|
|
12587
|
+
exports.isGeneratorFunction = function (genFun) {
|
|
12576
12588
|
var ctor = typeof genFun === "function" && genFun.constructor;
|
|
12577
12589
|
return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can
|
|
12578
12590
|
// do is to check its .name property.
|
|
12579
12591
|
(ctor.displayName || ctor.name) === "GeneratorFunction" : false;
|
|
12580
12592
|
};
|
|
12581
12593
|
|
|
12582
|
-
|
|
12594
|
+
exports.mark = function (genFun) {
|
|
12583
12595
|
if (Object.setPrototypeOf) {
|
|
12584
12596
|
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
|
|
12585
12597
|
} else {
|
|
12586
12598
|
genFun.__proto__ = GeneratorFunctionPrototype;
|
|
12587
|
-
|
|
12588
|
-
if (!(toStringTagSymbol in genFun)) {
|
|
12589
|
-
genFun[toStringTagSymbol] = "GeneratorFunction";
|
|
12590
|
-
}
|
|
12599
|
+
define(genFun, toStringTagSymbol, "GeneratorFunction");
|
|
12591
12600
|
}
|
|
12592
12601
|
|
|
12593
12602
|
genFun.prototype = Object.create(Gp);
|
|
@@ -12598,13 +12607,13 @@
|
|
|
12598
12607
|
// meant to be awaited.
|
|
12599
12608
|
|
|
12600
12609
|
|
|
12601
|
-
|
|
12610
|
+
exports.awrap = function (arg) {
|
|
12602
12611
|
return {
|
|
12603
12612
|
__await: arg
|
|
12604
12613
|
};
|
|
12605
12614
|
};
|
|
12606
12615
|
|
|
12607
|
-
function AsyncIterator(generator) {
|
|
12616
|
+
function AsyncIterator(generator, PromiseImpl) {
|
|
12608
12617
|
function invoke(method, arg, resolve, reject) {
|
|
12609
12618
|
var record = tryCatch(generator[method], generator, arg);
|
|
12610
12619
|
|
|
@@ -12615,32 +12624,24 @@
|
|
|
12615
12624
|
var value = result.value;
|
|
12616
12625
|
|
|
12617
12626
|
if (value && _typeof(value) === "object" && hasOwn.call(value, "__await")) {
|
|
12618
|
-
return
|
|
12627
|
+
return PromiseImpl.resolve(value.__await).then(function (value) {
|
|
12619
12628
|
invoke("next", value, resolve, reject);
|
|
12620
12629
|
}, function (err) {
|
|
12621
12630
|
invoke("throw", err, resolve, reject);
|
|
12622
12631
|
});
|
|
12623
12632
|
}
|
|
12624
12633
|
|
|
12625
|
-
return
|
|
12634
|
+
return PromiseImpl.resolve(value).then(function (unwrapped) {
|
|
12626
12635
|
// When a yielded Promise is resolved, its final value becomes
|
|
12627
12636
|
// the .value of the Promise<{value,done}> result for the
|
|
12628
|
-
// current iteration.
|
|
12629
|
-
// result for this iteration will be rejected with the same
|
|
12630
|
-
// reason. Note that rejections of yielded Promises are not
|
|
12631
|
-
// thrown back into the generator function, as is the case
|
|
12632
|
-
// when an awaited Promise is rejected. This difference in
|
|
12633
|
-
// behavior between yield and await is important, because it
|
|
12634
|
-
// allows the consumer to decide what to do with the yielded
|
|
12635
|
-
// rejection (swallow it and continue, manually .throw it back
|
|
12636
|
-
// into the generator, abandon iteration, whatever). With
|
|
12637
|
-
// await, by contrast, there is no opportunity to examine the
|
|
12638
|
-
// rejection reason outside the generator function, so the
|
|
12639
|
-
// only option is to throw it from the await expression, and
|
|
12640
|
-
// let the generator function handle the exception.
|
|
12637
|
+
// current iteration.
|
|
12641
12638
|
result.value = unwrapped;
|
|
12642
12639
|
resolve(result);
|
|
12643
|
-
},
|
|
12640
|
+
}, function (error) {
|
|
12641
|
+
// If a rejected Promise was yielded, throw the rejection back
|
|
12642
|
+
// into the async generator function so it can be handled there.
|
|
12643
|
+
return invoke("throw", error, resolve, reject);
|
|
12644
|
+
});
|
|
12644
12645
|
}
|
|
12645
12646
|
}
|
|
12646
12647
|
|
|
@@ -12648,7 +12649,7 @@
|
|
|
12648
12649
|
|
|
12649
12650
|
function enqueue(method, arg) {
|
|
12650
12651
|
function callInvokeWithMethodAndArg() {
|
|
12651
|
-
return new
|
|
12652
|
+
return new PromiseImpl(function (resolve, reject) {
|
|
12652
12653
|
invoke(method, arg, resolve, reject);
|
|
12653
12654
|
});
|
|
12654
12655
|
}
|
|
@@ -12681,13 +12682,14 @@
|
|
|
12681
12682
|
return this;
|
|
12682
12683
|
};
|
|
12683
12684
|
|
|
12684
|
-
|
|
12685
|
+
exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of
|
|
12685
12686
|
// AsyncIterator objects; they just return a Promise for the value of
|
|
12686
12687
|
// the final result produced by the iterator.
|
|
12687
12688
|
|
|
12688
|
-
|
|
12689
|
-
|
|
12690
|
-
|
|
12689
|
+
exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
|
|
12690
|
+
if (PromiseImpl === void 0) PromiseImpl = Promise;
|
|
12691
|
+
var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
|
|
12692
|
+
return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator.
|
|
12691
12693
|
: iter.next().then(function (result) {
|
|
12692
12694
|
return result.done ? result.value : iter.next();
|
|
12693
12695
|
});
|
|
@@ -12780,6 +12782,7 @@
|
|
|
12780
12782
|
context.delegate = null;
|
|
12781
12783
|
|
|
12782
12784
|
if (context.method === "throw") {
|
|
12785
|
+
// Note: ["return"] must be used for ES3 parsing compatibility.
|
|
12783
12786
|
if (delegate.iterator["return"]) {
|
|
12784
12787
|
// If the delegate iterator has a return method, give it a
|
|
12785
12788
|
// chance to clean up.
|
|
@@ -12849,7 +12852,7 @@
|
|
|
12849
12852
|
|
|
12850
12853
|
|
|
12851
12854
|
defineIteratorMethods(Gp);
|
|
12852
|
-
Gp
|
|
12855
|
+
define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the
|
|
12853
12856
|
// @@iterator function is called on it. Some browsers' implementations of the
|
|
12854
12857
|
// iterator prototype chain incorrectly implement this, causing the Generator
|
|
12855
12858
|
// object to not be returned from this call. This ensures that doesn't happen.
|
|
@@ -12898,7 +12901,7 @@
|
|
|
12898
12901
|
this.reset(true);
|
|
12899
12902
|
}
|
|
12900
12903
|
|
|
12901
|
-
|
|
12904
|
+
exports.keys = function (object) {
|
|
12902
12905
|
var keys = [];
|
|
12903
12906
|
|
|
12904
12907
|
for (var key in object) {
|
|
@@ -12965,7 +12968,7 @@
|
|
|
12965
12968
|
};
|
|
12966
12969
|
}
|
|
12967
12970
|
|
|
12968
|
-
|
|
12971
|
+
exports.values = values;
|
|
12969
12972
|
|
|
12970
12973
|
function doneResult() {
|
|
12971
12974
|
return {
|
|
@@ -13156,13 +13159,32 @@
|
|
|
13156
13159
|
|
|
13157
13160
|
return ContinueSentinel;
|
|
13158
13161
|
}
|
|
13159
|
-
};
|
|
13160
|
-
|
|
13161
|
-
|
|
13162
|
-
|
|
13163
|
-
|
|
13164
|
-
return
|
|
13165
|
-
}(
|
|
13162
|
+
}; // Regardless of whether this script is executing as a CommonJS module
|
|
13163
|
+
// or not, return the runtime object so that we can declare the variable
|
|
13164
|
+
// regeneratorRuntime in the outer scope, which allows this module to be
|
|
13165
|
+
// injected easily by `bin/regenerator --include-runtime script.js`.
|
|
13166
|
+
|
|
13167
|
+
return exports;
|
|
13168
|
+
}( // If this script is executing as a CommonJS module, use module.exports
|
|
13169
|
+
// as the regeneratorRuntime namespace. Otherwise create a new empty
|
|
13170
|
+
// object. Either way, the resulting object will be used to initialize
|
|
13171
|
+
// the regeneratorRuntime variable at the top of this file.
|
|
13172
|
+
module.exports );
|
|
13173
|
+
|
|
13174
|
+
try {
|
|
13175
|
+
regeneratorRuntime = runtime;
|
|
13176
|
+
} catch (accidentalStrictMode) {
|
|
13177
|
+
// This module should not be running in strict mode, so the above
|
|
13178
|
+
// assignment should always work unless something is misconfigured. Just
|
|
13179
|
+
// in case runtime.js accidentally runs in strict mode, we can escape
|
|
13180
|
+
// strict mode using a global Function call. This could conceivably fail
|
|
13181
|
+
// if a Content Security Policy forbids using Function, but in that case
|
|
13182
|
+
// the proper solution is to fix the accidental strict mode problem. If
|
|
13183
|
+
// you've misconfigured your bundler to force strict mode and applied a
|
|
13184
|
+
// CSP to forbid Function, and you're not willing to fix either of those
|
|
13185
|
+
// problems, please detail your unique predicament in a GitHub issue.
|
|
13186
|
+
Function("r", "regeneratorRuntime = r")(runtime);
|
|
13187
|
+
}
|
|
13166
13188
|
});
|
|
13167
13189
|
|
|
13168
13190
|
var escapeStringRegexp = function escapeStringRegexp(string) {
|
|
@@ -13404,8 +13426,19 @@
|
|
|
13404
13426
|
return str.substr(start, len);
|
|
13405
13427
|
};
|
|
13406
13428
|
|
|
13429
|
+
// call something on iterator step with safe closing on error
|
|
13430
|
+
var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
|
|
13431
|
+
try {
|
|
13432
|
+
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
13433
|
+
// 7.4.6 IteratorClose(iterator, completion)
|
|
13434
|
+
} catch (error) {
|
|
13435
|
+
iteratorClose(iterator);
|
|
13436
|
+
throw error;
|
|
13437
|
+
}
|
|
13438
|
+
};
|
|
13439
|
+
|
|
13407
13440
|
// `Array.from` method implementation
|
|
13408
|
-
// https://tc39.
|
|
13441
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
13409
13442
|
var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
13410
13443
|
var O = toObject(arrayLike);
|
|
13411
13444
|
var C = typeof this == 'function' ? this : Array;
|
|
@@ -13442,49 +13475,12 @@
|
|
|
13442
13475
|
});
|
|
13443
13476
|
|
|
13444
13477
|
// `Array.from` method
|
|
13445
|
-
// https://tc39.
|
|
13478
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
13446
13479
|
_export({ target: 'Array', stat: true, forced: INCORRECT_ITERATION$1 }, {
|
|
13447
13480
|
from: arrayFrom
|
|
13448
13481
|
});
|
|
13449
13482
|
|
|
13450
13483
|
var diff = createCommonjsModule(function (module, exports) {
|
|
13451
|
-
/*!
|
|
13452
|
-
|
|
13453
|
-
diff v4.0.1
|
|
13454
|
-
|
|
13455
|
-
Software License Agreement (BSD License)
|
|
13456
|
-
|
|
13457
|
-
Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
|
|
13458
|
-
|
|
13459
|
-
All rights reserved.
|
|
13460
|
-
|
|
13461
|
-
Redistribution and use of this software in source and binary forms, with or without modification,
|
|
13462
|
-
are permitted provided that the following conditions are met:
|
|
13463
|
-
|
|
13464
|
-
* Redistributions of source code must retain the above
|
|
13465
|
-
copyright notice, this list of conditions and the
|
|
13466
|
-
following disclaimer.
|
|
13467
|
-
|
|
13468
|
-
* Redistributions in binary form must reproduce the above
|
|
13469
|
-
copyright notice, this list of conditions and the
|
|
13470
|
-
following disclaimer in the documentation and/or other
|
|
13471
|
-
materials provided with the distribution.
|
|
13472
|
-
|
|
13473
|
-
* Neither the name of Kevin Decker nor the names of its
|
|
13474
|
-
contributors may be used to endorse or promote products
|
|
13475
|
-
derived from this software without specific prior
|
|
13476
|
-
written permission.
|
|
13477
|
-
|
|
13478
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
|
|
13479
|
-
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
13480
|
-
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
13481
|
-
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
13482
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
13483
|
-
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
|
|
13484
|
-
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
13485
|
-
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
13486
|
-
@license
|
|
13487
|
-
*/
|
|
13488
13484
|
(function (global, factory) {
|
|
13489
13485
|
factory(exports) ;
|
|
13490
13486
|
})(commonjsGlobal, function (exports) {
|
|
@@ -13798,7 +13794,8 @@
|
|
|
13798
13794
|
};
|
|
13799
13795
|
|
|
13800
13796
|
wordDiff.tokenize = function (value) {
|
|
13801
|
-
|
|
13797
|
+
// All whitespace symbols except newline group into one token, each newline - in separate token
|
|
13798
|
+
var tokens = value.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/); // Join the boundary splits that we do not consider to be boundaries. This is primarily the extended Latin character set.
|
|
13802
13799
|
|
|
13803
13800
|
for (var i = 0; i < tokens.length - 1; i++) {
|
|
13804
13801
|
// If we have an empty string in the next field and we have only word chars before and after, merge
|
|
@@ -13882,40 +13879,55 @@
|
|
|
13882
13879
|
return cssDiff.diff(oldStr, newStr, callback);
|
|
13883
13880
|
}
|
|
13884
13881
|
|
|
13885
|
-
function _typeof
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
13882
|
+
function _typeof(obj) {
|
|
13883
|
+
"@babel/helpers - typeof";
|
|
13884
|
+
|
|
13885
|
+
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
|
|
13886
|
+
_typeof = function _typeof(obj) {
|
|
13887
|
+
return typeof obj;
|
|
13889
13888
|
};
|
|
13890
13889
|
} else {
|
|
13891
|
-
_typeof
|
|
13892
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" :
|
|
13890
|
+
_typeof = function _typeof(obj) {
|
|
13891
|
+
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
13893
13892
|
};
|
|
13894
13893
|
}
|
|
13895
13894
|
|
|
13896
|
-
return _typeof
|
|
13895
|
+
return _typeof(obj);
|
|
13897
13896
|
}
|
|
13898
13897
|
|
|
13899
13898
|
function _toConsumableArray(arr) {
|
|
13900
|
-
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();
|
|
13899
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
13901
13900
|
}
|
|
13902
13901
|
|
|
13903
13902
|
function _arrayWithoutHoles(arr) {
|
|
13904
|
-
if (Array.isArray(arr))
|
|
13905
|
-
for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {
|
|
13906
|
-
arr2[i] = arr[i];
|
|
13907
|
-
}
|
|
13908
|
-
|
|
13909
|
-
return arr2;
|
|
13910
|
-
}
|
|
13903
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
13911
13904
|
}
|
|
13912
13905
|
|
|
13913
13906
|
function _iterableToArray(iter) {
|
|
13914
|
-
if (Symbol.iterator in Object(iter)
|
|
13907
|
+
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
|
|
13908
|
+
}
|
|
13909
|
+
|
|
13910
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
13911
|
+
if (!o) return;
|
|
13912
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
13913
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13914
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
13915
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
13916
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
13917
|
+
}
|
|
13918
|
+
|
|
13919
|
+
function _arrayLikeToArray(arr, len) {
|
|
13920
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
13921
|
+
|
|
13922
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
13923
|
+
arr2[i] = arr[i];
|
|
13924
|
+
}
|
|
13925
|
+
|
|
13926
|
+
return arr2;
|
|
13915
13927
|
}
|
|
13916
13928
|
|
|
13917
13929
|
function _nonIterableSpread() {
|
|
13918
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance");
|
|
13930
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13919
13931
|
}
|
|
13920
13932
|
|
|
13921
13933
|
var objectPrototypeToString = Object.prototype.toString;
|
|
@@ -13981,7 +13993,7 @@
|
|
|
13981
13993
|
obj = obj.toJSON();
|
|
13982
13994
|
}
|
|
13983
13995
|
|
|
13984
|
-
if (_typeof
|
|
13996
|
+
if (_typeof(obj) === 'object' && obj !== null) {
|
|
13985
13997
|
stack.push(obj);
|
|
13986
13998
|
canonicalizedObj = {};
|
|
13987
13999
|
replacementStack.push(canonicalizedObj);
|
|
@@ -14105,12 +14117,23 @@
|
|
|
14105
14117
|
chunkHeader = chunkHeaderLine.split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/);
|
|
14106
14118
|
var hunk = {
|
|
14107
14119
|
oldStart: +chunkHeader[1],
|
|
14108
|
-
oldLines:
|
|
14120
|
+
oldLines: typeof chunkHeader[2] === 'undefined' ? 1 : +chunkHeader[2],
|
|
14109
14121
|
newStart: +chunkHeader[3],
|
|
14110
|
-
newLines:
|
|
14122
|
+
newLines: typeof chunkHeader[4] === 'undefined' ? 1 : +chunkHeader[4],
|
|
14111
14123
|
lines: [],
|
|
14112
14124
|
linedelimiters: []
|
|
14113
|
-
};
|
|
14125
|
+
}; // Unified Diff Format quirk: If the chunk size is 0,
|
|
14126
|
+
// the first number is one lower than one would expect.
|
|
14127
|
+
// https://www.artima.com/weblogs/viewpost.jsp?thread=164293
|
|
14128
|
+
|
|
14129
|
+
if (hunk.oldLines === 0) {
|
|
14130
|
+
hunk.oldStart += 1;
|
|
14131
|
+
}
|
|
14132
|
+
|
|
14133
|
+
if (hunk.newLines === 0) {
|
|
14134
|
+
hunk.newStart += 1;
|
|
14135
|
+
}
|
|
14136
|
+
|
|
14114
14137
|
var addCount = 0,
|
|
14115
14138
|
removeCount = 0;
|
|
14116
14139
|
|
|
@@ -14303,11 +14326,6 @@
|
|
|
14303
14326
|
|
|
14304
14327
|
diffOffset += _hunk.newLines - _hunk.oldLines;
|
|
14305
14328
|
|
|
14306
|
-
if (_toPos < 0) {
|
|
14307
|
-
// Creating a new file
|
|
14308
|
-
_toPos = 0;
|
|
14309
|
-
}
|
|
14310
|
-
|
|
14311
14329
|
for (var j = 0; j < _hunk.lines.length; j++) {
|
|
14312
14330
|
var line = _hunk.lines[j],
|
|
14313
14331
|
operation = line.length > 0 ? line[0] : ' ',
|
|
@@ -14479,8 +14497,9 @@
|
|
|
14479
14497
|
var newEOFNewline = /\n$/.test(newStr);
|
|
14480
14498
|
var noNlBeforeAdds = lines.length == 0 && curRange.length > hunk.oldLines;
|
|
14481
14499
|
|
|
14482
|
-
if (!oldEOFNewline && noNlBeforeAdds) {
|
|
14500
|
+
if (!oldEOFNewline && noNlBeforeAdds && oldStr.length > 0) {
|
|
14483
14501
|
// special case: old has no eol and no trailing context; no-nl can end up before adds
|
|
14502
|
+
// however, if the old file is empty, do not output the no-nl line
|
|
14484
14503
|
curRange.splice(hunk.oldLines, 0, '\');
|
|
14485
14504
|
}
|
|
14486
14505
|
|
|
@@ -14514,12 +14533,11 @@
|
|
|
14514
14533
|
};
|
|
14515
14534
|
}
|
|
14516
14535
|
|
|
14517
|
-
function
|
|
14518
|
-
var diff = structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
14536
|
+
function formatPatch(diff) {
|
|
14519
14537
|
var ret = [];
|
|
14520
14538
|
|
|
14521
|
-
if (oldFileName == newFileName) {
|
|
14522
|
-
ret.push('Index: ' + oldFileName);
|
|
14539
|
+
if (diff.oldFileName == diff.newFileName) {
|
|
14540
|
+
ret.push('Index: ' + diff.oldFileName);
|
|
14523
14541
|
}
|
|
14524
14542
|
|
|
14525
14543
|
ret.push('===================================================================');
|
|
@@ -14527,7 +14545,18 @@
|
|
|
14527
14545
|
ret.push('+++ ' + diff.newFileName + (typeof diff.newHeader === 'undefined' ? '' : '\t' + diff.newHeader));
|
|
14528
14546
|
|
|
14529
14547
|
for (var i = 0; i < diff.hunks.length; i++) {
|
|
14530
|
-
var hunk = diff.hunks[i];
|
|
14548
|
+
var hunk = diff.hunks[i]; // Unified Diff Format quirk: If the chunk size is 0,
|
|
14549
|
+
// the first number is one lower than one would expect.
|
|
14550
|
+
// https://www.artima.com/weblogs/viewpost.jsp?thread=164293
|
|
14551
|
+
|
|
14552
|
+
if (hunk.oldLines === 0) {
|
|
14553
|
+
hunk.oldStart -= 1;
|
|
14554
|
+
}
|
|
14555
|
+
|
|
14556
|
+
if (hunk.newLines === 0) {
|
|
14557
|
+
hunk.newStart -= 1;
|
|
14558
|
+
}
|
|
14559
|
+
|
|
14531
14560
|
ret.push('@@ -' + hunk.oldStart + ',' + hunk.oldLines + ' +' + hunk.newStart + ',' + hunk.newLines + ' @@');
|
|
14532
14561
|
ret.push.apply(ret, hunk.lines);
|
|
14533
14562
|
}
|
|
@@ -14535,6 +14564,10 @@
|
|
|
14535
14564
|
return ret.join('\n') + '\n';
|
|
14536
14565
|
}
|
|
14537
14566
|
|
|
14567
|
+
function createTwoFilesPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
14568
|
+
return formatPatch(structuredPatch(oldFileName, newFileName, oldStr, newStr, oldHeader, newHeader, options));
|
|
14569
|
+
}
|
|
14570
|
+
|
|
14538
14571
|
function createPatch(fileName, oldStr, newStr, oldHeader, newHeader, options) {
|
|
14539
14572
|
return createTwoFilesPatch(fileName, fileName, oldStr, newStr, oldHeader, newHeader, options);
|
|
14540
14573
|
}
|
|
@@ -15015,29 +15048,27 @@
|
|
|
15015
15048
|
n = n.replace(/"/g, '"');
|
|
15016
15049
|
return n;
|
|
15017
15050
|
}
|
|
15018
|
-
/* See LICENSE file for terms of use */
|
|
15019
|
-
|
|
15020
15051
|
|
|
15021
15052
|
exports.Diff = Diff;
|
|
15022
|
-
exports.diffChars = diffChars;
|
|
15023
|
-
exports.diffWords = diffWords;
|
|
15024
|
-
exports.diffWordsWithSpace = diffWordsWithSpace;
|
|
15025
|
-
exports.diffLines = diffLines;
|
|
15026
|
-
exports.diffTrimmedLines = diffTrimmedLines;
|
|
15027
|
-
exports.diffSentences = diffSentences;
|
|
15028
|
-
exports.diffCss = diffCss;
|
|
15029
|
-
exports.diffJson = diffJson;
|
|
15030
|
-
exports.diffArrays = diffArrays;
|
|
15031
|
-
exports.structuredPatch = structuredPatch;
|
|
15032
|
-
exports.createTwoFilesPatch = createTwoFilesPatch;
|
|
15033
|
-
exports.createPatch = createPatch;
|
|
15034
15053
|
exports.applyPatch = applyPatch;
|
|
15035
15054
|
exports.applyPatches = applyPatches;
|
|
15036
|
-
exports.
|
|
15037
|
-
exports.merge = merge;
|
|
15055
|
+
exports.canonicalize = canonicalize;
|
|
15038
15056
|
exports.convertChangesToDMP = convertChangesToDMP;
|
|
15039
15057
|
exports.convertChangesToXML = convertChangesToXML;
|
|
15040
|
-
exports.
|
|
15058
|
+
exports.createPatch = createPatch;
|
|
15059
|
+
exports.createTwoFilesPatch = createTwoFilesPatch;
|
|
15060
|
+
exports.diffArrays = diffArrays;
|
|
15061
|
+
exports.diffChars = diffChars;
|
|
15062
|
+
exports.diffCss = diffCss;
|
|
15063
|
+
exports.diffJson = diffJson;
|
|
15064
|
+
exports.diffLines = diffLines;
|
|
15065
|
+
exports.diffSentences = diffSentences;
|
|
15066
|
+
exports.diffTrimmedLines = diffTrimmedLines;
|
|
15067
|
+
exports.diffWords = diffWords;
|
|
15068
|
+
exports.diffWordsWithSpace = diffWordsWithSpace;
|
|
15069
|
+
exports.merge = merge;
|
|
15070
|
+
exports.parsePatch = parsePatch;
|
|
15071
|
+
exports.structuredPatch = structuredPatch;
|
|
15041
15072
|
Object.defineProperty(exports, '__esModule', {
|
|
15042
15073
|
value: true
|
|
15043
15074
|
});
|
|
@@ -15296,7 +15327,7 @@
|
|
|
15296
15327
|
var FAILS_ON_PRIMITIVES$4 = fails(function () { nativeFreeze(1); });
|
|
15297
15328
|
|
|
15298
15329
|
// `Object.freeze` method
|
|
15299
|
-
// https://tc39.
|
|
15330
|
+
// https://tc39.es/ecma262/#sec-object.freeze
|
|
15300
15331
|
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4, sham: !freezing }, {
|
|
15301
15332
|
freeze: function freeze(it) {
|
|
15302
15333
|
return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
|
|
@@ -15360,7 +15391,7 @@
|
|
|
15360
15391
|
Constructor = wrapper(function (dummy, iterable) {
|
|
15361
15392
|
anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
|
|
15362
15393
|
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
|
15363
|
-
if (iterable != undefined)
|
|
15394
|
+
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
15364
15395
|
return that;
|
|
15365
15396
|
});
|
|
15366
15397
|
Constructor.prototype = NativePrototype;
|
|
@@ -15416,7 +15447,7 @@
|
|
|
15416
15447
|
size: 0
|
|
15417
15448
|
});
|
|
15418
15449
|
if (!descriptors) that.size = 0;
|
|
15419
|
-
if (iterable != undefined)
|
|
15450
|
+
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
15420
15451
|
});
|
|
15421
15452
|
|
|
15422
15453
|
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
@@ -15576,8 +15607,8 @@
|
|
|
15576
15607
|
};
|
|
15577
15608
|
|
|
15578
15609
|
// `Set` constructor
|
|
15579
|
-
// https://tc39.
|
|
15580
|
-
|
|
15610
|
+
// https://tc39.es/ecma262/#sec-set-objects
|
|
15611
|
+
collection('Set', function (init) {
|
|
15581
15612
|
return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
|
|
15582
15613
|
}, collectionStrong);
|
|
15583
15614
|
|
|
@@ -19772,17 +19803,17 @@
|
|
|
19772
19803
|
|
|
19773
19804
|
var objectToArray = {
|
|
19774
19805
|
// `Object.entries` method
|
|
19775
|
-
// https://tc39.
|
|
19806
|
+
// https://tc39.es/ecma262/#sec-object.entries
|
|
19776
19807
|
entries: createMethod$5(true),
|
|
19777
19808
|
// `Object.values` method
|
|
19778
|
-
// https://tc39.
|
|
19809
|
+
// https://tc39.es/ecma262/#sec-object.values
|
|
19779
19810
|
values: createMethod$5(false)
|
|
19780
19811
|
};
|
|
19781
19812
|
|
|
19782
19813
|
var $values = objectToArray.values;
|
|
19783
19814
|
|
|
19784
19815
|
// `Object.values` method
|
|
19785
|
-
// https://tc39.
|
|
19816
|
+
// https://tc39.es/ecma262/#sec-object.values
|
|
19786
19817
|
_export({ target: 'Object', stat: true }, {
|
|
19787
19818
|
values: function values(O) {
|
|
19788
19819
|
return $values(O);
|
|
@@ -19806,6 +19837,7 @@
|
|
|
19806
19837
|
if (process$1.emitWarning) {
|
|
19807
19838
|
process$1.emitWarning(msg, type);
|
|
19808
19839
|
} else {
|
|
19840
|
+
/* istanbul ignore next */
|
|
19809
19841
|
nextTick(function () {
|
|
19810
19842
|
console.warn(type + ': ' + msg);
|
|
19811
19843
|
});
|
|
@@ -19844,88 +19876,137 @@
|
|
|
19844
19876
|
}
|
|
19845
19877
|
};
|
|
19846
19878
|
/**
|
|
19847
|
-
* When Mocha
|
|
19848
|
-
*
|
|
19849
|
-
*
|
|
19879
|
+
* When Mocha throws exceptions (or rejects `Promise`s), it attempts to assign a `code` property to the `Error` object, for easier handling. These are the potential values of `code`.
|
|
19880
|
+
* @public
|
|
19881
|
+
* @namespace
|
|
19882
|
+
* @memberof module:lib/errors
|
|
19850
19883
|
*/
|
|
19851
19884
|
|
|
19852
19885
|
|
|
19853
19886
|
var constants = {
|
|
19854
19887
|
/**
|
|
19855
19888
|
* An unrecoverable error.
|
|
19889
|
+
* @constant
|
|
19890
|
+
* @default
|
|
19856
19891
|
*/
|
|
19857
19892
|
FATAL: 'ERR_MOCHA_FATAL',
|
|
19858
19893
|
|
|
19859
19894
|
/**
|
|
19860
19895
|
* The type of an argument to a function call is invalid
|
|
19896
|
+
* @constant
|
|
19897
|
+
* @default
|
|
19861
19898
|
*/
|
|
19862
19899
|
INVALID_ARG_TYPE: 'ERR_MOCHA_INVALID_ARG_TYPE',
|
|
19863
19900
|
|
|
19864
19901
|
/**
|
|
19865
19902
|
* The value of an argument to a function call is invalid
|
|
19903
|
+
* @constant
|
|
19904
|
+
* @default
|
|
19866
19905
|
*/
|
|
19867
19906
|
INVALID_ARG_VALUE: 'ERR_MOCHA_INVALID_ARG_VALUE',
|
|
19868
19907
|
|
|
19869
19908
|
/**
|
|
19870
19909
|
* Something was thrown, but it wasn't an `Error`
|
|
19910
|
+
* @constant
|
|
19911
|
+
* @default
|
|
19871
19912
|
*/
|
|
19872
19913
|
INVALID_EXCEPTION: 'ERR_MOCHA_INVALID_EXCEPTION',
|
|
19873
19914
|
|
|
19874
19915
|
/**
|
|
19875
19916
|
* An interface (e.g., `Mocha.interfaces`) is unknown or invalid
|
|
19917
|
+
* @constant
|
|
19918
|
+
* @default
|
|
19876
19919
|
*/
|
|
19877
19920
|
INVALID_INTERFACE: 'ERR_MOCHA_INVALID_INTERFACE',
|
|
19878
19921
|
|
|
19879
19922
|
/**
|
|
19880
19923
|
* A reporter (.e.g, `Mocha.reporters`) is unknown or invalid
|
|
19924
|
+
* @constant
|
|
19925
|
+
* @default
|
|
19881
19926
|
*/
|
|
19882
19927
|
INVALID_REPORTER: 'ERR_MOCHA_INVALID_REPORTER',
|
|
19883
19928
|
|
|
19884
19929
|
/**
|
|
19885
19930
|
* `done()` was called twice in a `Test` or `Hook` callback
|
|
19931
|
+
* @constant
|
|
19932
|
+
* @default
|
|
19886
19933
|
*/
|
|
19887
19934
|
MULTIPLE_DONE: 'ERR_MOCHA_MULTIPLE_DONE',
|
|
19888
19935
|
|
|
19889
19936
|
/**
|
|
19890
19937
|
* No files matched the pattern provided by the user
|
|
19938
|
+
* @constant
|
|
19939
|
+
* @default
|
|
19891
19940
|
*/
|
|
19892
19941
|
NO_FILES_MATCH_PATTERN: 'ERR_MOCHA_NO_FILES_MATCH_PATTERN',
|
|
19893
19942
|
|
|
19894
19943
|
/**
|
|
19895
19944
|
* Known, but unsupported behavior of some kind
|
|
19945
|
+
* @constant
|
|
19946
|
+
* @default
|
|
19896
19947
|
*/
|
|
19897
19948
|
UNSUPPORTED: 'ERR_MOCHA_UNSUPPORTED',
|
|
19898
19949
|
|
|
19899
19950
|
/**
|
|
19900
19951
|
* Invalid state transition occurring in `Mocha` instance
|
|
19952
|
+
* @constant
|
|
19953
|
+
* @default
|
|
19901
19954
|
*/
|
|
19902
19955
|
INSTANCE_ALREADY_RUNNING: 'ERR_MOCHA_INSTANCE_ALREADY_RUNNING',
|
|
19903
19956
|
|
|
19904
19957
|
/**
|
|
19905
19958
|
* Invalid state transition occurring in `Mocha` instance
|
|
19959
|
+
* @constant
|
|
19960
|
+
* @default
|
|
19906
19961
|
*/
|
|
19907
19962
|
INSTANCE_ALREADY_DISPOSED: 'ERR_MOCHA_INSTANCE_ALREADY_DISPOSED',
|
|
19908
19963
|
|
|
19909
19964
|
/**
|
|
19910
19965
|
* Use of `only()` w/ `--forbid-only` results in this error.
|
|
19966
|
+
* @constant
|
|
19967
|
+
* @default
|
|
19911
19968
|
*/
|
|
19912
19969
|
FORBIDDEN_EXCLUSIVITY: 'ERR_MOCHA_FORBIDDEN_EXCLUSIVITY',
|
|
19913
19970
|
|
|
19914
19971
|
/**
|
|
19915
19972
|
* To be thrown when a user-defined plugin implementation (e.g., `mochaHooks`) is invalid
|
|
19973
|
+
* @constant
|
|
19974
|
+
* @default
|
|
19916
19975
|
*/
|
|
19917
19976
|
INVALID_PLUGIN_IMPLEMENTATION: 'ERR_MOCHA_INVALID_PLUGIN_IMPLEMENTATION',
|
|
19918
19977
|
|
|
19919
19978
|
/**
|
|
19920
19979
|
* To be thrown when a builtin or third-party plugin definition (the _definition_ of `mochaHooks`) is invalid
|
|
19980
|
+
* @constant
|
|
19981
|
+
* @default
|
|
19982
|
+
*/
|
|
19983
|
+
INVALID_PLUGIN_DEFINITION: 'ERR_MOCHA_INVALID_PLUGIN_DEFINITION',
|
|
19984
|
+
|
|
19985
|
+
/**
|
|
19986
|
+
* When a runnable exceeds its allowed run time.
|
|
19987
|
+
* @constant
|
|
19988
|
+
* @default
|
|
19989
|
+
*/
|
|
19990
|
+
TIMEOUT: 'ERR_MOCHA_TIMEOUT',
|
|
19991
|
+
|
|
19992
|
+
/**
|
|
19993
|
+
* Input file is not able to be parsed
|
|
19994
|
+
* @constant
|
|
19995
|
+
* @default
|
|
19921
19996
|
*/
|
|
19922
|
-
|
|
19997
|
+
UNPARSABLE_FILE: 'ERR_MOCHA_UNPARSABLE_FILE'
|
|
19923
19998
|
};
|
|
19999
|
+
/**
|
|
20000
|
+
* A set containing all string values of all Mocha error constants, for use by {@link isMochaError}.
|
|
20001
|
+
* @private
|
|
20002
|
+
*/
|
|
20003
|
+
|
|
19924
20004
|
var MOCHA_ERRORS = new Set(Object.values(constants));
|
|
19925
20005
|
/**
|
|
19926
20006
|
* Creates an error object to be thrown when no files to be tested could be found using specified pattern.
|
|
19927
20007
|
*
|
|
19928
20008
|
* @public
|
|
20009
|
+
* @static
|
|
19929
20010
|
* @param {string} message - Error message to be displayed.
|
|
19930
20011
|
* @param {string} pattern - User-specified argument value.
|
|
19931
20012
|
* @returns {Error} instance detailing the error condition
|
|
@@ -19957,6 +20038,7 @@
|
|
|
19957
20038
|
* Creates an error object to be thrown when the interface specified in the options was not found.
|
|
19958
20039
|
*
|
|
19959
20040
|
* @public
|
|
20041
|
+
* @static
|
|
19960
20042
|
* @param {string} message - Error message to be displayed.
|
|
19961
20043
|
* @param {string} ui - User-specified interface value.
|
|
19962
20044
|
* @returns {Error} instance detailing the error condition
|
|
@@ -19973,6 +20055,7 @@
|
|
|
19973
20055
|
* Creates an error object to be thrown when a behavior, option, or parameter is unsupported.
|
|
19974
20056
|
*
|
|
19975
20057
|
* @public
|
|
20058
|
+
* @static
|
|
19976
20059
|
* @param {string} message - Error message to be displayed.
|
|
19977
20060
|
* @returns {Error} instance detailing the error condition
|
|
19978
20061
|
*/
|
|
@@ -19987,6 +20070,7 @@
|
|
|
19987
20070
|
* Creates an error object to be thrown when an argument is missing.
|
|
19988
20071
|
*
|
|
19989
20072
|
* @public
|
|
20073
|
+
* @static
|
|
19990
20074
|
* @param {string} message - Error message to be displayed.
|
|
19991
20075
|
* @param {string} argument - Argument name.
|
|
19992
20076
|
* @param {string} expected - Expected argument datatype.
|
|
@@ -20001,6 +20085,7 @@
|
|
|
20001
20085
|
* Creates an error object to be thrown when an argument did not use the supported type
|
|
20002
20086
|
*
|
|
20003
20087
|
* @public
|
|
20088
|
+
* @static
|
|
20004
20089
|
* @param {string} message - Error message to be displayed.
|
|
20005
20090
|
* @param {string} argument - Argument name.
|
|
20006
20091
|
* @param {string} expected - Expected argument datatype.
|
|
@@ -20020,6 +20105,7 @@
|
|
|
20020
20105
|
* Creates an error object to be thrown when an argument did not use the supported value
|
|
20021
20106
|
*
|
|
20022
20107
|
* @public
|
|
20108
|
+
* @static
|
|
20023
20109
|
* @param {string} message - Error message to be displayed.
|
|
20024
20110
|
* @param {string} argument - Argument name.
|
|
20025
20111
|
* @param {string} value - Argument value.
|
|
@@ -20040,6 +20126,7 @@
|
|
|
20040
20126
|
* Creates an error object to be thrown when an exception was caught, but the `Error` is falsy or undefined.
|
|
20041
20127
|
*
|
|
20042
20128
|
* @public
|
|
20129
|
+
* @static
|
|
20043
20130
|
* @param {string} message - Error message to be displayed.
|
|
20044
20131
|
* @returns {Error} instance detailing the error condition
|
|
20045
20132
|
*/
|
|
@@ -20056,6 +20143,7 @@
|
|
|
20056
20143
|
* Creates an error object to be thrown when an unrecoverable error occurs.
|
|
20057
20144
|
*
|
|
20058
20145
|
* @public
|
|
20146
|
+
* @static
|
|
20059
20147
|
* @param {string} message - Error message to be displayed.
|
|
20060
20148
|
* @returns {Error} instance detailing the error condition
|
|
20061
20149
|
*/
|
|
@@ -20075,6 +20163,7 @@
|
|
|
20075
20163
|
* @param {string} [pluginId] - Name/path of plugin, if any
|
|
20076
20164
|
* @throws When `pluginType` is not known
|
|
20077
20165
|
* @public
|
|
20166
|
+
* @static
|
|
20078
20167
|
* @returns {Error}
|
|
20079
20168
|
*/
|
|
20080
20169
|
|
|
@@ -20099,6 +20188,7 @@
|
|
|
20099
20188
|
* @param {string} [pluginId] - Name/path of plugin, if any
|
|
20100
20189
|
* @throws When `pluginType` is not known
|
|
20101
20190
|
* @public
|
|
20191
|
+
* @static
|
|
20102
20192
|
* @returns {Error}
|
|
20103
20193
|
*/
|
|
20104
20194
|
|
|
@@ -20112,6 +20202,7 @@
|
|
|
20112
20202
|
* @param {string} message The error message to be displayed.
|
|
20113
20203
|
* @param {boolean} cleanReferencesAfterRun the value of `cleanReferencesAfterRun`
|
|
20114
20204
|
* @param {Mocha} instance the mocha instance that throw this error
|
|
20205
|
+
* @static
|
|
20115
20206
|
*/
|
|
20116
20207
|
|
|
20117
20208
|
|
|
@@ -20125,6 +20216,8 @@
|
|
|
20125
20216
|
/**
|
|
20126
20217
|
* Creates an error object to be thrown when a mocha object's `run` method is called while a test run is in progress.
|
|
20127
20218
|
* @param {string} message The error message to be displayed.
|
|
20219
|
+
* @static
|
|
20220
|
+
* @public
|
|
20128
20221
|
*/
|
|
20129
20222
|
|
|
20130
20223
|
|
|
@@ -20134,13 +20227,14 @@
|
|
|
20134
20227
|
err.instance = instance;
|
|
20135
20228
|
return err;
|
|
20136
20229
|
}
|
|
20137
|
-
|
|
20230
|
+
/**
|
|
20138
20231
|
* Creates an error object to be thrown when done() is called multiple times in a test
|
|
20139
20232
|
*
|
|
20140
20233
|
* @public
|
|
20141
20234
|
* @param {Runnable} runnable - Original runnable
|
|
20142
20235
|
* @param {Error} [originalErr] - Original error, if any
|
|
20143
20236
|
* @returns {Error} instance detailing the error condition
|
|
20237
|
+
* @static
|
|
20144
20238
|
*/
|
|
20145
20239
|
|
|
20146
20240
|
|
|
@@ -20176,6 +20270,7 @@
|
|
|
20176
20270
|
/**
|
|
20177
20271
|
* Creates an error object to be thrown when `.only()` is used with
|
|
20178
20272
|
* `--forbid-only`.
|
|
20273
|
+
* @static
|
|
20179
20274
|
* @public
|
|
20180
20275
|
* @param {Mocha} mocha - Mocha instance
|
|
20181
20276
|
* @returns {Error} Error with code {@link constants.FORBIDDEN_EXCLUSIVITY}
|
|
@@ -20189,6 +20284,7 @@
|
|
|
20189
20284
|
}
|
|
20190
20285
|
/**
|
|
20191
20286
|
* Creates an error object to be thrown when a plugin definition is invalid
|
|
20287
|
+
* @static
|
|
20192
20288
|
* @param {string} msg - Error message
|
|
20193
20289
|
* @param {PluginDefinition} [pluginDef] - Problematic plugin definition
|
|
20194
20290
|
* @public
|
|
@@ -20204,6 +20300,7 @@
|
|
|
20204
20300
|
}
|
|
20205
20301
|
/**
|
|
20206
20302
|
* Creates an error object to be thrown when a plugin implementation (user code) is invalid
|
|
20303
|
+
* @static
|
|
20207
20304
|
* @param {string} msg - Error message
|
|
20208
20305
|
* @param {Object} [opts] - Plugin definition and user-supplied implementation
|
|
20209
20306
|
* @param {PluginDefinition} [opts.pluginDef] - Plugin Definition
|
|
@@ -20224,9 +20321,42 @@
|
|
|
20224
20321
|
err.pluginImpl = pluginImpl;
|
|
20225
20322
|
return err;
|
|
20226
20323
|
}
|
|
20324
|
+
/**
|
|
20325
|
+
* Creates an error object to be thrown when a runnable exceeds its allowed run time.
|
|
20326
|
+
* @static
|
|
20327
|
+
* @param {string} msg - Error message
|
|
20328
|
+
* @param {number} [timeout] - Timeout in ms
|
|
20329
|
+
* @param {string} [file] - File, if given
|
|
20330
|
+
* @returns {MochaTimeoutError}
|
|
20331
|
+
*/
|
|
20332
|
+
|
|
20333
|
+
|
|
20334
|
+
function createTimeoutError(msg, timeout, file) {
|
|
20335
|
+
var err = new Error(msg);
|
|
20336
|
+
err.code = constants.TIMEOUT;
|
|
20337
|
+
err.timeout = timeout;
|
|
20338
|
+
err.file = file;
|
|
20339
|
+
return err;
|
|
20340
|
+
}
|
|
20341
|
+
/**
|
|
20342
|
+
* Creates an error object to be thrown when file is unparsable
|
|
20343
|
+
* @public
|
|
20344
|
+
* @static
|
|
20345
|
+
* @param {string} message - Error message to be displayed.
|
|
20346
|
+
* @param {string} filename - File name
|
|
20347
|
+
* @returns {Error} Error with code {@link constants.UNPARSABLE_FILE}
|
|
20348
|
+
*/
|
|
20349
|
+
|
|
20350
|
+
|
|
20351
|
+
function createUnparsableFileError(message, filename) {
|
|
20352
|
+
var err = new Error(message);
|
|
20353
|
+
err.code = constants.UNPARSABLE_FILE;
|
|
20354
|
+
return err;
|
|
20355
|
+
}
|
|
20227
20356
|
/**
|
|
20228
20357
|
* Returns `true` if an error came out of Mocha.
|
|
20229
20358
|
* _Can suffer from false negatives, but not false positives._
|
|
20359
|
+
* @static
|
|
20230
20360
|
* @public
|
|
20231
20361
|
* @param {*} err - Error, or anything
|
|
20232
20362
|
* @returns {boolean}
|
|
@@ -20255,6 +20385,8 @@
|
|
|
20255
20385
|
createMochaInstanceAlreadyRunningError: createMochaInstanceAlreadyRunningError,
|
|
20256
20386
|
createMultipleDoneError: createMultipleDoneError,
|
|
20257
20387
|
createNoFilesMatchPatternError: createNoFilesMatchPatternError,
|
|
20388
|
+
createTimeoutError: createTimeoutError,
|
|
20389
|
+
createUnparsableFileError: createUnparsableFileError,
|
|
20258
20390
|
createUnsupportedError: createUnsupportedError,
|
|
20259
20391
|
deprecate: deprecate$1,
|
|
20260
20392
|
isMochaError: isMochaError,
|
|
@@ -20545,6 +20677,10 @@
|
|
|
20545
20677
|
? '-0' : val.toString();
|
|
20546
20678
|
break;
|
|
20547
20679
|
|
|
20680
|
+
case 'bigint':
|
|
20681
|
+
val = val.toString() + 'n';
|
|
20682
|
+
break;
|
|
20683
|
+
|
|
20548
20684
|
case 'date':
|
|
20549
20685
|
var sDate = isNaN(val.getTime()) ? val.toString() : val.toISOString();
|
|
20550
20686
|
val = '[Date: ' + sDate + ']';
|
|
@@ -20983,8 +21119,8 @@
|
|
|
20983
21119
|
});
|
|
20984
21120
|
|
|
20985
21121
|
// `Map` constructor
|
|
20986
|
-
// https://tc39.
|
|
20987
|
-
|
|
21122
|
+
// https://tc39.es/ecma262/#sec-map-objects
|
|
21123
|
+
collection('Map', function (init) {
|
|
20988
21124
|
return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
|
|
20989
21125
|
}, collectionStrong);
|
|
20990
21126
|
|
|
@@ -21003,6 +21139,187 @@
|
|
|
21003
21139
|
this.message = message;
|
|
21004
21140
|
}
|
|
21005
21141
|
|
|
21142
|
+
/**
|
|
21143
|
+
* Helpers.
|
|
21144
|
+
*/
|
|
21145
|
+
var s$1 = 1000;
|
|
21146
|
+
var m$1 = s$1 * 60;
|
|
21147
|
+
var h$1 = m$1 * 60;
|
|
21148
|
+
var d$1 = h$1 * 24;
|
|
21149
|
+
var w$1 = d$1 * 7;
|
|
21150
|
+
var y$1 = d$1 * 365.25;
|
|
21151
|
+
/**
|
|
21152
|
+
* Parse or format the given `val`.
|
|
21153
|
+
*
|
|
21154
|
+
* Options:
|
|
21155
|
+
*
|
|
21156
|
+
* - `long` verbose formatting [false]
|
|
21157
|
+
*
|
|
21158
|
+
* @param {String|Number} val
|
|
21159
|
+
* @param {Object} [options]
|
|
21160
|
+
* @throws {Error} throw an error if val is not a non-empty string or a number
|
|
21161
|
+
* @return {String|Number}
|
|
21162
|
+
* @api public
|
|
21163
|
+
*/
|
|
21164
|
+
|
|
21165
|
+
var ms$1 = function ms(val, options) {
|
|
21166
|
+
options = options || {};
|
|
21167
|
+
|
|
21168
|
+
var type = _typeof(val);
|
|
21169
|
+
|
|
21170
|
+
if (type === 'string' && val.length > 0) {
|
|
21171
|
+
return parse$1(val);
|
|
21172
|
+
} else if (type === 'number' && isFinite(val)) {
|
|
21173
|
+
return options["long"] ? fmtLong$1(val) : fmtShort$1(val);
|
|
21174
|
+
}
|
|
21175
|
+
|
|
21176
|
+
throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val));
|
|
21177
|
+
};
|
|
21178
|
+
/**
|
|
21179
|
+
* Parse the given `str` and return milliseconds.
|
|
21180
|
+
*
|
|
21181
|
+
* @param {String} str
|
|
21182
|
+
* @return {Number}
|
|
21183
|
+
* @api private
|
|
21184
|
+
*/
|
|
21185
|
+
|
|
21186
|
+
|
|
21187
|
+
function parse$1(str) {
|
|
21188
|
+
str = String(str);
|
|
21189
|
+
|
|
21190
|
+
if (str.length > 100) {
|
|
21191
|
+
return;
|
|
21192
|
+
}
|
|
21193
|
+
|
|
21194
|
+
var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(str);
|
|
21195
|
+
|
|
21196
|
+
if (!match) {
|
|
21197
|
+
return;
|
|
21198
|
+
}
|
|
21199
|
+
|
|
21200
|
+
var n = parseFloat(match[1]);
|
|
21201
|
+
var type = (match[2] || 'ms').toLowerCase();
|
|
21202
|
+
|
|
21203
|
+
switch (type) {
|
|
21204
|
+
case 'years':
|
|
21205
|
+
case 'year':
|
|
21206
|
+
case 'yrs':
|
|
21207
|
+
case 'yr':
|
|
21208
|
+
case 'y':
|
|
21209
|
+
return n * y$1;
|
|
21210
|
+
|
|
21211
|
+
case 'weeks':
|
|
21212
|
+
case 'week':
|
|
21213
|
+
case 'w':
|
|
21214
|
+
return n * w$1;
|
|
21215
|
+
|
|
21216
|
+
case 'days':
|
|
21217
|
+
case 'day':
|
|
21218
|
+
case 'd':
|
|
21219
|
+
return n * d$1;
|
|
21220
|
+
|
|
21221
|
+
case 'hours':
|
|
21222
|
+
case 'hour':
|
|
21223
|
+
case 'hrs':
|
|
21224
|
+
case 'hr':
|
|
21225
|
+
case 'h':
|
|
21226
|
+
return n * h$1;
|
|
21227
|
+
|
|
21228
|
+
case 'minutes':
|
|
21229
|
+
case 'minute':
|
|
21230
|
+
case 'mins':
|
|
21231
|
+
case 'min':
|
|
21232
|
+
case 'm':
|
|
21233
|
+
return n * m$1;
|
|
21234
|
+
|
|
21235
|
+
case 'seconds':
|
|
21236
|
+
case 'second':
|
|
21237
|
+
case 'secs':
|
|
21238
|
+
case 'sec':
|
|
21239
|
+
case 's':
|
|
21240
|
+
return n * s$1;
|
|
21241
|
+
|
|
21242
|
+
case 'milliseconds':
|
|
21243
|
+
case 'millisecond':
|
|
21244
|
+
case 'msecs':
|
|
21245
|
+
case 'msec':
|
|
21246
|
+
case 'ms':
|
|
21247
|
+
return n;
|
|
21248
|
+
|
|
21249
|
+
default:
|
|
21250
|
+
return undefined;
|
|
21251
|
+
}
|
|
21252
|
+
}
|
|
21253
|
+
/**
|
|
21254
|
+
* Short format for `ms`.
|
|
21255
|
+
*
|
|
21256
|
+
* @param {Number} ms
|
|
21257
|
+
* @return {String}
|
|
21258
|
+
* @api private
|
|
21259
|
+
*/
|
|
21260
|
+
|
|
21261
|
+
|
|
21262
|
+
function fmtShort$1(ms) {
|
|
21263
|
+
var msAbs = Math.abs(ms);
|
|
21264
|
+
|
|
21265
|
+
if (msAbs >= d$1) {
|
|
21266
|
+
return Math.round(ms / d$1) + 'd';
|
|
21267
|
+
}
|
|
21268
|
+
|
|
21269
|
+
if (msAbs >= h$1) {
|
|
21270
|
+
return Math.round(ms / h$1) + 'h';
|
|
21271
|
+
}
|
|
21272
|
+
|
|
21273
|
+
if (msAbs >= m$1) {
|
|
21274
|
+
return Math.round(ms / m$1) + 'm';
|
|
21275
|
+
}
|
|
21276
|
+
|
|
21277
|
+
if (msAbs >= s$1) {
|
|
21278
|
+
return Math.round(ms / s$1) + 's';
|
|
21279
|
+
}
|
|
21280
|
+
|
|
21281
|
+
return ms + 'ms';
|
|
21282
|
+
}
|
|
21283
|
+
/**
|
|
21284
|
+
* Long format for `ms`.
|
|
21285
|
+
*
|
|
21286
|
+
* @param {Number} ms
|
|
21287
|
+
* @return {String}
|
|
21288
|
+
* @api private
|
|
21289
|
+
*/
|
|
21290
|
+
|
|
21291
|
+
|
|
21292
|
+
function fmtLong$1(ms) {
|
|
21293
|
+
var msAbs = Math.abs(ms);
|
|
21294
|
+
|
|
21295
|
+
if (msAbs >= d$1) {
|
|
21296
|
+
return plural$1(ms, msAbs, d$1, 'day');
|
|
21297
|
+
}
|
|
21298
|
+
|
|
21299
|
+
if (msAbs >= h$1) {
|
|
21300
|
+
return plural$1(ms, msAbs, h$1, 'hour');
|
|
21301
|
+
}
|
|
21302
|
+
|
|
21303
|
+
if (msAbs >= m$1) {
|
|
21304
|
+
return plural$1(ms, msAbs, m$1, 'minute');
|
|
21305
|
+
}
|
|
21306
|
+
|
|
21307
|
+
if (msAbs >= s$1) {
|
|
21308
|
+
return plural$1(ms, msAbs, s$1, 'second');
|
|
21309
|
+
}
|
|
21310
|
+
|
|
21311
|
+
return ms + ' ms';
|
|
21312
|
+
}
|
|
21313
|
+
/**
|
|
21314
|
+
* Pluralization helper.
|
|
21315
|
+
*/
|
|
21316
|
+
|
|
21317
|
+
|
|
21318
|
+
function plural$1(ms, msAbs, n, name) {
|
|
21319
|
+
var isPlural = msAbs >= n * 1.5;
|
|
21320
|
+
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
21321
|
+
}
|
|
21322
|
+
|
|
21006
21323
|
/**
|
|
21007
21324
|
* This is the common logic for both the Node.js and web browser
|
|
21008
21325
|
* implementations of `debug()`.
|
|
@@ -21015,16 +21332,12 @@
|
|
|
21015
21332
|
createDebug.disable = disable;
|
|
21016
21333
|
createDebug.enable = enable;
|
|
21017
21334
|
createDebug.enabled = enabled;
|
|
21018
|
-
createDebug.humanize = ms;
|
|
21335
|
+
createDebug.humanize = ms$1;
|
|
21336
|
+
createDebug.destroy = destroy;
|
|
21019
21337
|
Object.keys(env).forEach(function (key) {
|
|
21020
21338
|
createDebug[key] = env[key];
|
|
21021
21339
|
});
|
|
21022
21340
|
/**
|
|
21023
|
-
* Active `debug` instances.
|
|
21024
|
-
*/
|
|
21025
|
-
|
|
21026
|
-
createDebug.instances = [];
|
|
21027
|
-
/**
|
|
21028
21341
|
* The currently active debug mode names, and names to skip.
|
|
21029
21342
|
*/
|
|
21030
21343
|
|
|
@@ -21066,6 +21379,7 @@
|
|
|
21066
21379
|
|
|
21067
21380
|
function createDebug(namespace) {
|
|
21068
21381
|
var prevTime;
|
|
21382
|
+
var enableOverride = null;
|
|
21069
21383
|
|
|
21070
21384
|
function debug() {
|
|
21071
21385
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
@@ -21097,7 +21411,7 @@
|
|
|
21097
21411
|
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
|
21098
21412
|
// If we encounter an escaped % then don't increase the array index
|
|
21099
21413
|
if (match === '%%') {
|
|
21100
|
-
return
|
|
21414
|
+
return '%';
|
|
21101
21415
|
}
|
|
21102
21416
|
|
|
21103
21417
|
index++;
|
|
@@ -21120,31 +21434,29 @@
|
|
|
21120
21434
|
}
|
|
21121
21435
|
|
|
21122
21436
|
debug.namespace = namespace;
|
|
21123
|
-
debug.enabled = createDebug.enabled(namespace);
|
|
21124
21437
|
debug.useColors = createDebug.useColors();
|
|
21125
21438
|
debug.color = createDebug.selectColor(namespace);
|
|
21126
|
-
debug.
|
|
21127
|
-
debug.
|
|
21439
|
+
debug.extend = extend;
|
|
21440
|
+
debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
|
|
21441
|
+
|
|
21442
|
+
Object.defineProperty(debug, 'enabled', {
|
|
21443
|
+
enumerable: true,
|
|
21444
|
+
configurable: false,
|
|
21445
|
+
get: function get() {
|
|
21446
|
+
return enableOverride === null ? createDebug.enabled(namespace) : enableOverride;
|
|
21447
|
+
},
|
|
21448
|
+
set: function set(v) {
|
|
21449
|
+
enableOverride = v;
|
|
21450
|
+
}
|
|
21451
|
+
}); // Env-specific initialization logic for debug instances
|
|
21128
21452
|
|
|
21129
21453
|
if (typeof createDebug.init === 'function') {
|
|
21130
21454
|
createDebug.init(debug);
|
|
21131
21455
|
}
|
|
21132
21456
|
|
|
21133
|
-
createDebug.instances.push(debug);
|
|
21134
21457
|
return debug;
|
|
21135
21458
|
}
|
|
21136
21459
|
|
|
21137
|
-
function destroy() {
|
|
21138
|
-
var index = createDebug.instances.indexOf(this);
|
|
21139
|
-
|
|
21140
|
-
if (index !== -1) {
|
|
21141
|
-
createDebug.instances.splice(index, 1);
|
|
21142
|
-
return true;
|
|
21143
|
-
}
|
|
21144
|
-
|
|
21145
|
-
return false;
|
|
21146
|
-
}
|
|
21147
|
-
|
|
21148
21460
|
function extend(namespace, delimiter) {
|
|
21149
21461
|
var newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
|
21150
21462
|
newDebug.log = this.log;
|
|
@@ -21181,11 +21493,6 @@
|
|
|
21181
21493
|
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
|
21182
21494
|
}
|
|
21183
21495
|
}
|
|
21184
|
-
|
|
21185
|
-
for (i = 0; i < createDebug.instances.length; i++) {
|
|
21186
|
-
var instance = createDebug.instances[i];
|
|
21187
|
-
instance.enabled = createDebug.enabled(instance.namespace);
|
|
21188
|
-
}
|
|
21189
21496
|
}
|
|
21190
21497
|
/**
|
|
21191
21498
|
* Disable debug output.
|
|
@@ -21261,6 +21568,15 @@
|
|
|
21261
21568
|
|
|
21262
21569
|
return val;
|
|
21263
21570
|
}
|
|
21571
|
+
/**
|
|
21572
|
+
* XXX DO NOT USE. This is a temporary stub function.
|
|
21573
|
+
* XXX It WILL be removed in the next major release.
|
|
21574
|
+
*/
|
|
21575
|
+
|
|
21576
|
+
|
|
21577
|
+
function destroy() {
|
|
21578
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
21579
|
+
}
|
|
21264
21580
|
|
|
21265
21581
|
createDebug.enable(createDebug.load());
|
|
21266
21582
|
return createDebug;
|
|
@@ -21279,10 +21595,21 @@
|
|
|
21279
21595
|
exports.load = load;
|
|
21280
21596
|
exports.useColors = useColors;
|
|
21281
21597
|
exports.storage = localstorage();
|
|
21598
|
+
|
|
21599
|
+
exports.destroy = function () {
|
|
21600
|
+
var warned = false;
|
|
21601
|
+
return function () {
|
|
21602
|
+
if (!warned) {
|
|
21603
|
+
warned = true;
|
|
21604
|
+
console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
|
|
21605
|
+
}
|
|
21606
|
+
};
|
|
21607
|
+
}();
|
|
21282
21608
|
/**
|
|
21283
21609
|
* Colors.
|
|
21284
21610
|
*/
|
|
21285
21611
|
|
|
21612
|
+
|
|
21286
21613
|
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
|
21287
21614
|
/**
|
|
21288
21615
|
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
|
@@ -21443,8 +21770,9 @@
|
|
|
21443
21770
|
|
|
21444
21771
|
var EventEmitter$1 = EventEmitter.EventEmitter;
|
|
21445
21772
|
var debug$1 = browser$2('mocha:runnable');
|
|
21446
|
-
var createInvalidExceptionError$1 = errors.createInvalidExceptionError
|
|
21447
|
-
|
|
21773
|
+
var createInvalidExceptionError$1 = errors.createInvalidExceptionError,
|
|
21774
|
+
createMultipleDoneError$1 = errors.createMultipleDoneError,
|
|
21775
|
+
createTimeoutError$1 = errors.createTimeoutError;
|
|
21448
21776
|
/**
|
|
21449
21777
|
* Save timer references to avoid Sinon interfering (see GH-237).
|
|
21450
21778
|
* @private
|
|
@@ -21877,13 +22205,13 @@
|
|
|
21877
22205
|
|
|
21878
22206
|
|
|
21879
22207
|
Runnable.prototype._timeoutError = function (ms) {
|
|
21880
|
-
var msg =
|
|
22208
|
+
var msg = "Timeout of ".concat(ms, "ms exceeded. For async tests and hooks, ensure \"done()\" is called; if returning a Promise, ensure it resolves.");
|
|
21881
22209
|
|
|
21882
22210
|
if (this.file) {
|
|
21883
22211
|
msg += ' (' + this.file + ')';
|
|
21884
22212
|
}
|
|
21885
22213
|
|
|
21886
|
-
return
|
|
22214
|
+
return createTimeoutError$1(msg, ms, this.file);
|
|
21887
22215
|
};
|
|
21888
22216
|
|
|
21889
22217
|
var constants$1 = utils.defineConstants(
|
|
@@ -21925,21 +22253,6 @@
|
|
|
21925
22253
|
|
|
21926
22254
|
Runnable.constants = constants$1;
|
|
21927
22255
|
|
|
21928
|
-
var $some$1 = arrayIteration.some;
|
|
21929
|
-
|
|
21930
|
-
|
|
21931
|
-
|
|
21932
|
-
var STRICT_METHOD$5 = arrayMethodIsStrict('some');
|
|
21933
|
-
var USES_TO_LENGTH$9 = arrayMethodUsesToLength('some');
|
|
21934
|
-
|
|
21935
|
-
// `Array.prototype.some` method
|
|
21936
|
-
// https://tc39.github.io/ecma262/#sec-array.prototype.some
|
|
21937
|
-
_export({ target: 'Array', proto: true, forced: !STRICT_METHOD$5 || !USES_TO_LENGTH$9 }, {
|
|
21938
|
-
some: function some(callbackfn /* , thisArg */) {
|
|
21939
|
-
return $some$1(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
21940
|
-
}
|
|
21941
|
-
});
|
|
21942
|
-
|
|
21943
22256
|
var inherits$3 = utils.inherits,
|
|
21944
22257
|
constants$2 = utils.constants;
|
|
21945
22258
|
var MOCHA_ID_PROP_NAME = constants$2.MOCHA_ID_PROP_NAME;
|
|
@@ -22038,7 +22351,7 @@
|
|
|
22038
22351
|
* Expose `Suite`.
|
|
22039
22352
|
*/
|
|
22040
22353
|
|
|
22041
|
-
|
|
22354
|
+
module.exports = Suite;
|
|
22042
22355
|
/**
|
|
22043
22356
|
* Create a new `Suite` with the given `title` and parent `Suite`.
|
|
22044
22357
|
*
|
|
@@ -24614,7 +24927,7 @@
|
|
|
24614
24927
|
* Expose `Dot`.
|
|
24615
24928
|
*/
|
|
24616
24929
|
|
|
24617
|
-
|
|
24930
|
+
module.exports = Dot;
|
|
24618
24931
|
/**
|
|
24619
24932
|
* Constructs a new `Dot` reporter instance.
|
|
24620
24933
|
*
|
|
@@ -24691,7 +25004,7 @@
|
|
|
24691
25004
|
* Expose `Doc`.
|
|
24692
25005
|
*/
|
|
24693
25006
|
|
|
24694
|
-
|
|
25007
|
+
module.exports = Doc;
|
|
24695
25008
|
/**
|
|
24696
25009
|
* Constructs a new `Doc` reporter instance.
|
|
24697
25010
|
*
|
|
@@ -24772,7 +25085,7 @@
|
|
|
24772
25085
|
* Expose `TAP`.
|
|
24773
25086
|
*/
|
|
24774
25087
|
|
|
24775
|
-
|
|
25088
|
+
module.exports = TAP;
|
|
24776
25089
|
/**
|
|
24777
25090
|
* Constructs a new `TAP` reporter instance.
|
|
24778
25091
|
*
|
|
@@ -25072,7 +25385,7 @@
|
|
|
25072
25385
|
* Expose `JSON`.
|
|
25073
25386
|
*/
|
|
25074
25387
|
|
|
25075
|
-
|
|
25388
|
+
module.exports = JSONReporter;
|
|
25076
25389
|
/**
|
|
25077
25390
|
* Constructs a new `JSON` reporter instance.
|
|
25078
25391
|
*
|
|
@@ -25187,7 +25500,7 @@
|
|
|
25187
25500
|
});
|
|
25188
25501
|
|
|
25189
25502
|
// `thisNumberValue` abstract operation
|
|
25190
|
-
// https://tc39.
|
|
25503
|
+
// https://tc39.es/ecma262/#sec-thisnumbervalue
|
|
25191
25504
|
var thisNumberValue = function (value) {
|
|
25192
25505
|
if (typeof value != 'number' && classofRaw(value) != 'Number') {
|
|
25193
25506
|
throw TypeError('Incorrect invocation');
|
|
@@ -25196,7 +25509,7 @@
|
|
|
25196
25509
|
};
|
|
25197
25510
|
|
|
25198
25511
|
// `String.prototype.repeat` method implementation
|
|
25199
|
-
// https://tc39.
|
|
25512
|
+
// https://tc39.es/ecma262/#sec-string.prototype.repeat
|
|
25200
25513
|
var stringRepeat = ''.repeat || function repeat(count) {
|
|
25201
25514
|
var str = String(requireObjectCoercible(this));
|
|
25202
25515
|
var result = '';
|
|
@@ -25237,7 +25550,7 @@
|
|
|
25237
25550
|
});
|
|
25238
25551
|
|
|
25239
25552
|
// `Number.prototype.toFixed` method
|
|
25240
|
-
// https://tc39.
|
|
25553
|
+
// https://tc39.es/ecma262/#sec-number.prototype.tofixed
|
|
25241
25554
|
_export({ target: 'Number', proto: true, forced: FORCED$8 }, {
|
|
25242
25555
|
// eslint-disable-next-line max-statements
|
|
25243
25556
|
toFixed: function toFixed(fractionDigits) {
|
|
@@ -25475,7 +25788,7 @@
|
|
|
25475
25788
|
* Expose `HTML`.
|
|
25476
25789
|
*/
|
|
25477
25790
|
|
|
25478
|
-
|
|
25791
|
+
module.exports = HTML;
|
|
25479
25792
|
/**
|
|
25480
25793
|
* Stats template.
|
|
25481
25794
|
*/
|
|
@@ -25822,7 +26135,7 @@
|
|
|
25822
26135
|
* Expose `List`.
|
|
25823
26136
|
*/
|
|
25824
26137
|
|
|
25825
|
-
|
|
26138
|
+
module.exports = List;
|
|
25826
26139
|
/**
|
|
25827
26140
|
* Constructs a new `List` reporter instance.
|
|
25828
26141
|
*
|
|
@@ -25885,7 +26198,7 @@
|
|
|
25885
26198
|
* Expose `Min`.
|
|
25886
26199
|
*/
|
|
25887
26200
|
|
|
25888
|
-
|
|
26201
|
+
module.exports = Min;
|
|
25889
26202
|
/**
|
|
25890
26203
|
* Constructs a new `Min` reporter instance.
|
|
25891
26204
|
*
|
|
@@ -25942,7 +26255,7 @@
|
|
|
25942
26255
|
* Expose `Spec`.
|
|
25943
26256
|
*/
|
|
25944
26257
|
|
|
25945
|
-
|
|
26258
|
+
module.exports = Spec;
|
|
25946
26259
|
/**
|
|
25947
26260
|
* Constructs a new `Spec` reporter instance.
|
|
25948
26261
|
*
|
|
@@ -26027,7 +26340,7 @@
|
|
|
26027
26340
|
* Expose `Dot`.
|
|
26028
26341
|
*/
|
|
26029
26342
|
|
|
26030
|
-
|
|
26343
|
+
module.exports = NyanCat;
|
|
26031
26344
|
/**
|
|
26032
26345
|
* Constructs a new `Nyan` reporter instance.
|
|
26033
26346
|
*
|
|
@@ -26309,7 +26622,7 @@
|
|
|
26309
26622
|
* Expose `XUnit`.
|
|
26310
26623
|
*/
|
|
26311
26624
|
|
|
26312
|
-
|
|
26625
|
+
module.exports = XUnit;
|
|
26313
26626
|
/**
|
|
26314
26627
|
* Constructs a new `XUnit` reporter instance.
|
|
26315
26628
|
*
|
|
@@ -26494,7 +26807,7 @@
|
|
|
26494
26807
|
* Expose `Markdown`.
|
|
26495
26808
|
*/
|
|
26496
26809
|
|
|
26497
|
-
|
|
26810
|
+
module.exports = Markdown;
|
|
26498
26811
|
/**
|
|
26499
26812
|
* Constructs a new `Markdown` reporter instance.
|
|
26500
26813
|
*
|
|
@@ -26601,7 +26914,7 @@
|
|
|
26601
26914
|
* Expose `Progress`.
|
|
26602
26915
|
*/
|
|
26603
26916
|
|
|
26604
|
-
|
|
26917
|
+
module.exports = Progress;
|
|
26605
26918
|
/**
|
|
26606
26919
|
* General progress bar color.
|
|
26607
26920
|
*/
|
|
@@ -26700,7 +27013,7 @@
|
|
|
26700
27013
|
* Expose `Landing`.
|
|
26701
27014
|
*/
|
|
26702
27015
|
|
|
26703
|
-
|
|
27016
|
+
module.exports = Landing;
|
|
26704
27017
|
/**
|
|
26705
27018
|
* Airplane color.
|
|
26706
27019
|
*/
|
|
@@ -26805,7 +27118,7 @@
|
|
|
26805
27118
|
* Expose `JSONStream`.
|
|
26806
27119
|
*/
|
|
26807
27120
|
|
|
26808
|
-
|
|
27121
|
+
module.exports = JSONStream;
|
|
26809
27122
|
/**
|
|
26810
27123
|
* Constructs a new `JSONStream` reporter instance.
|
|
26811
27124
|
*
|
|
@@ -26900,7 +27213,7 @@
|
|
|
26900
27213
|
});
|
|
26901
27214
|
|
|
26902
27215
|
var name = "mocha";
|
|
26903
|
-
var version$2 = "8.
|
|
27216
|
+
var version$2 = "8.4.0";
|
|
26904
27217
|
var homepage = "https://mochajs.org/";
|
|
26905
27218
|
var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
|
|
26906
27219
|
var _package = {
|
|
@@ -27494,15 +27807,6 @@
|
|
|
27494
27807
|
*/
|
|
27495
27808
|
skip: function skip(title) {
|
|
27496
27809
|
context.test(title);
|
|
27497
|
-
},
|
|
27498
|
-
|
|
27499
|
-
/**
|
|
27500
|
-
* Number of retry attempts
|
|
27501
|
-
*
|
|
27502
|
-
* @param {number} n
|
|
27503
|
-
*/
|
|
27504
|
-
retries: function retries(n) {
|
|
27505
|
-
context.retries(n);
|
|
27506
27810
|
}
|
|
27507
27811
|
}
|
|
27508
27812
|
};
|
|
@@ -27608,14 +27912,6 @@
|
|
|
27608
27912
|
context.xit = context.xspecify = context.it.skip = function (title) {
|
|
27609
27913
|
return context.it(title);
|
|
27610
27914
|
};
|
|
27611
|
-
/**
|
|
27612
|
-
* Number of attempts to retry.
|
|
27613
|
-
*/
|
|
27614
|
-
|
|
27615
|
-
|
|
27616
|
-
context.it.retries = function (n) {
|
|
27617
|
-
context.retries(n);
|
|
27618
|
-
};
|
|
27619
27915
|
});
|
|
27620
27916
|
};
|
|
27621
27917
|
|
|
@@ -27722,7 +28018,6 @@
|
|
|
27722
28018
|
};
|
|
27723
28019
|
|
|
27724
28020
|
context.test.skip = common.test.skip;
|
|
27725
|
-
context.test.retries = common.test.retries;
|
|
27726
28021
|
});
|
|
27727
28022
|
};
|
|
27728
28023
|
|
|
@@ -27819,7 +28114,6 @@
|
|
|
27819
28114
|
};
|
|
27820
28115
|
|
|
27821
28116
|
context.test.skip = common.test.skip;
|
|
27822
|
-
context.test.retries = common.test.retries;
|
|
27823
28117
|
});
|
|
27824
28118
|
};
|
|
27825
28119
|
|
|
@@ -28086,6 +28380,104 @@
|
|
|
28086
28380
|
exports.Suite = suite;
|
|
28087
28381
|
exports.Hook = hook;
|
|
28088
28382
|
exports.Test = test$1;
|
|
28383
|
+
var currentContext;
|
|
28384
|
+
|
|
28385
|
+
exports.afterEach = function () {
|
|
28386
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
28387
|
+
args[_key] = arguments[_key];
|
|
28388
|
+
}
|
|
28389
|
+
|
|
28390
|
+
return (currentContext.afterEach || currentContext.teardown).apply(this, args);
|
|
28391
|
+
};
|
|
28392
|
+
|
|
28393
|
+
exports.after = function () {
|
|
28394
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
28395
|
+
args[_key2] = arguments[_key2];
|
|
28396
|
+
}
|
|
28397
|
+
|
|
28398
|
+
return (currentContext.after || currentContext.suiteTeardown).apply(this, args);
|
|
28399
|
+
};
|
|
28400
|
+
|
|
28401
|
+
exports.beforeEach = function () {
|
|
28402
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
28403
|
+
args[_key3] = arguments[_key3];
|
|
28404
|
+
}
|
|
28405
|
+
|
|
28406
|
+
return (currentContext.beforeEach || currentContext.setup).apply(this, args);
|
|
28407
|
+
};
|
|
28408
|
+
|
|
28409
|
+
exports.before = function () {
|
|
28410
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
28411
|
+
args[_key4] = arguments[_key4];
|
|
28412
|
+
}
|
|
28413
|
+
|
|
28414
|
+
return (currentContext.before || currentContext.suiteSetup).apply(this, args);
|
|
28415
|
+
};
|
|
28416
|
+
|
|
28417
|
+
exports.describe = function () {
|
|
28418
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
28419
|
+
args[_key5] = arguments[_key5];
|
|
28420
|
+
}
|
|
28421
|
+
|
|
28422
|
+
return (currentContext.describe || currentContext.suite).apply(this, args);
|
|
28423
|
+
};
|
|
28424
|
+
|
|
28425
|
+
exports.describe.only = function () {
|
|
28426
|
+
for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
28427
|
+
args[_key6] = arguments[_key6];
|
|
28428
|
+
}
|
|
28429
|
+
|
|
28430
|
+
return (currentContext.describe || currentContext.suite).only.apply(this, args);
|
|
28431
|
+
};
|
|
28432
|
+
|
|
28433
|
+
exports.describe.skip = function () {
|
|
28434
|
+
for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
28435
|
+
args[_key7] = arguments[_key7];
|
|
28436
|
+
}
|
|
28437
|
+
|
|
28438
|
+
return (currentContext.describe || currentContext.suite).skip.apply(this, args);
|
|
28439
|
+
};
|
|
28440
|
+
|
|
28441
|
+
exports.it = function () {
|
|
28442
|
+
for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
|
|
28443
|
+
args[_key8] = arguments[_key8];
|
|
28444
|
+
}
|
|
28445
|
+
|
|
28446
|
+
return (currentContext.it || currentContext.test).apply(this, args);
|
|
28447
|
+
};
|
|
28448
|
+
|
|
28449
|
+
exports.it.only = function () {
|
|
28450
|
+
for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
|
|
28451
|
+
args[_key9] = arguments[_key9];
|
|
28452
|
+
}
|
|
28453
|
+
|
|
28454
|
+
return (currentContext.it || currentContext.test).only.apply(this, args);
|
|
28455
|
+
};
|
|
28456
|
+
|
|
28457
|
+
exports.it.skip = function () {
|
|
28458
|
+
for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
|
|
28459
|
+
args[_key10] = arguments[_key10];
|
|
28460
|
+
}
|
|
28461
|
+
|
|
28462
|
+
return (currentContext.it || currentContext.test).skip.apply(this, args);
|
|
28463
|
+
};
|
|
28464
|
+
|
|
28465
|
+
exports.xdescribe = exports.describe.skip;
|
|
28466
|
+
exports.xit = exports.it.skip;
|
|
28467
|
+
exports.setup = exports.beforeEach;
|
|
28468
|
+
exports.suiteSetup = exports.before;
|
|
28469
|
+
exports.suiteTeardown = exports.after;
|
|
28470
|
+
exports.suite = exports.describe;
|
|
28471
|
+
exports.teardown = exports.afterEach;
|
|
28472
|
+
exports.test = exports.it;
|
|
28473
|
+
|
|
28474
|
+
exports.run = function () {
|
|
28475
|
+
for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
|
|
28476
|
+
args[_key11] = arguments[_key11];
|
|
28477
|
+
}
|
|
28478
|
+
|
|
28479
|
+
return currentContext.run.apply(this, args);
|
|
28480
|
+
};
|
|
28089
28481
|
/**
|
|
28090
28482
|
* Constructs a new Mocha instance with `options`.
|
|
28091
28483
|
*
|
|
@@ -28115,13 +28507,14 @@
|
|
|
28115
28507
|
* @param {number} [options.slow] - Slow threshold value.
|
|
28116
28508
|
* @param {number|string} [options.timeout] - Timeout threshold value.
|
|
28117
28509
|
* @param {string} [options.ui] - Interface name.
|
|
28118
|
-
* @param {boolean} [options.parallel] - Run jobs in parallel
|
|
28119
|
-
* @param {number} [options.jobs] - Max number of worker processes for parallel runs
|
|
28120
|
-
* @param {MochaRootHookObject} [options.rootHooks] - Hooks to bootstrap the root
|
|
28121
|
-
*
|
|
28510
|
+
* @param {boolean} [options.parallel] - Run jobs in parallel.
|
|
28511
|
+
* @param {number} [options.jobs] - Max number of worker processes for parallel runs.
|
|
28512
|
+
* @param {MochaRootHookObject} [options.rootHooks] - Hooks to bootstrap the root suite with.
|
|
28513
|
+
* @param {string[]} [options.require] - Pathname of `rootHooks` plugin for parallel runs.
|
|
28122
28514
|
* @param {boolean} [options.isWorker] - Should be `true` if `Mocha` process is running in a worker process.
|
|
28123
28515
|
*/
|
|
28124
28516
|
|
|
28517
|
+
|
|
28125
28518
|
function Mocha() {
|
|
28126
28519
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
28127
28520
|
options = _objectSpread2(_objectSpread2({}, mocharc$2), options);
|
|
@@ -28310,20 +28703,7 @@
|
|
|
28310
28703
|
|
|
28311
28704
|
bindInterface(this.suite);
|
|
28312
28705
|
this.suite.on(EVENT_FILE_PRE_REQUIRE, function (context) {
|
|
28313
|
-
|
|
28314
|
-
exports.after = context.after || context.suiteTeardown;
|
|
28315
|
-
exports.beforeEach = context.beforeEach || context.setup;
|
|
28316
|
-
exports.before = context.before || context.suiteSetup;
|
|
28317
|
-
exports.describe = context.describe || context.suite;
|
|
28318
|
-
exports.it = context.it || context.test;
|
|
28319
|
-
exports.xit = context.xit || context.test && context.test.skip;
|
|
28320
|
-
exports.setup = context.setup || context.beforeEach;
|
|
28321
|
-
exports.suiteSetup = context.suiteSetup || context.before;
|
|
28322
|
-
exports.suiteTeardown = context.suiteTeardown || context.after;
|
|
28323
|
-
exports.suite = context.suite || context.describe;
|
|
28324
|
-
exports.teardown = context.teardown || context.afterEach;
|
|
28325
|
-
exports.test = context.test || context.it;
|
|
28326
|
-
exports.run = context.run;
|
|
28706
|
+
currentContext = context;
|
|
28327
28707
|
});
|
|
28328
28708
|
return this;
|
|
28329
28709
|
};
|
|
@@ -29492,7 +29872,7 @@
|
|
|
29492
29872
|
* A (sync) function to assert a user-supplied plugin implementation is valid.
|
|
29493
29873
|
*
|
|
29494
29874
|
* Defined in a {@link PluginDefinition}.
|
|
29495
|
-
|
|
29875
|
+
|
|
29496
29876
|
* @callback PluginValidator
|
|
29497
29877
|
* @param {*} value - Value to check
|
|
29498
29878
|
* @this {PluginDefinition}
|