mocha 9.1.2 → 9.2.1
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/LICENSE +1 -1
- package/README.md +1 -1
- package/browser-entry.js +26 -16
- package/lib/browser/growl.js +5 -5
- package/lib/browser/parse-query.js +1 -1
- package/lib/browser/progress.js +6 -6
- package/lib/cli/config.js +7 -12
- package/lib/cli/run.js +1 -1
- package/lib/cli/watch-run.js +1 -4
- package/lib/context.js +5 -5
- package/lib/errors.js +1 -1
- package/lib/hook.js +2 -2
- package/lib/interfaces/bdd.js +23 -20
- package/lib/interfaces/common.js +7 -7
- package/lib/interfaces/exports.js +1 -1
- package/lib/interfaces/qunit.js +7 -7
- package/lib/interfaces/tdd.js +9 -9
- package/lib/mocha.js +56 -58
- package/lib/nodejs/buffered-worker-pool.js +17 -1
- package/lib/nodejs/esm-utils.js +18 -3
- package/lib/reporters/base.js +41 -28
- package/lib/reporters/doc.js +4 -4
- package/lib/reporters/dot.js +5 -5
- package/lib/reporters/html.js +12 -12
- package/lib/reporters/json-stream.js +4 -4
- package/lib/reporters/json.js +7 -7
- package/lib/reporters/landing.js +5 -5
- package/lib/reporters/list.js +5 -5
- package/lib/reporters/markdown.js +5 -5
- package/lib/reporters/min.js +1 -1
- package/lib/reporters/nyan.js +16 -16
- package/lib/reporters/progress.js +3 -3
- package/lib/reporters/spec.js +6 -6
- package/lib/reporters/tap.js +17 -17
- package/lib/reporters/xunit.js +9 -9
- package/lib/runnable.js +21 -21
- package/lib/runner.js +44 -47
- package/lib/stats-collector.js +7 -7
- package/lib/suite.js +44 -73
- package/lib/test.js +4 -4
- package/lib/utils.js +18 -19
- package/mocha-es2018.js +432 -449
- package/mocha.js +1246 -851
- package/mocha.js.map +1 -1
- package/package.json +38 -38
- package/CHANGELOG.md +0 -1015
package/mocha.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// mocha@9.1
|
|
1
|
+
// mocha@9.2.1 transpiled to javascript ES5
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
|
@@ -56,22 +56,34 @@
|
|
|
56
56
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
var
|
|
59
|
+
var functionBindNative = !fails(function () {
|
|
60
|
+
var test = (function () { /* empty */ }).bind();
|
|
61
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
62
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
var call$2 = Function.prototype.call;
|
|
66
|
+
|
|
67
|
+
var functionCall = functionBindNative ? call$2.bind(call$2) : function () {
|
|
68
|
+
return call$2.apply(call$2, arguments);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
var $propertyIsEnumerable$2 = {}.propertyIsEnumerable;
|
|
60
72
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
61
73
|
var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
|
|
62
74
|
|
|
63
75
|
// Nashorn ~ JDK8 bug
|
|
64
|
-
var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable$
|
|
76
|
+
var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable$2.call({ 1: 2 }, 1);
|
|
65
77
|
|
|
66
78
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
67
79
|
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
68
|
-
var f$
|
|
80
|
+
var f$8 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
69
81
|
var descriptor = getOwnPropertyDescriptor$3(this, V);
|
|
70
82
|
return !!descriptor && descriptor.enumerable;
|
|
71
|
-
} : $propertyIsEnumerable$
|
|
83
|
+
} : $propertyIsEnumerable$2;
|
|
72
84
|
|
|
73
85
|
var objectPropertyIsEnumerable = {
|
|
74
|
-
f: f$
|
|
86
|
+
f: f$8
|
|
75
87
|
};
|
|
76
88
|
|
|
77
89
|
var createPropertyDescriptor = function (bitmap, value) {
|
|
@@ -83,27 +95,44 @@
|
|
|
83
95
|
};
|
|
84
96
|
};
|
|
85
97
|
|
|
86
|
-
var
|
|
98
|
+
var FunctionPrototype$3 = Function.prototype;
|
|
99
|
+
var bind$2 = FunctionPrototype$3.bind;
|
|
100
|
+
var call$1 = FunctionPrototype$3.call;
|
|
101
|
+
var uncurryThis = functionBindNative && bind$2.bind(call$1, call$1);
|
|
102
|
+
|
|
103
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
104
|
+
return fn && uncurryThis(fn);
|
|
105
|
+
} : function (fn) {
|
|
106
|
+
return fn && function () {
|
|
107
|
+
return call$1.apply(fn, arguments);
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
var toString$4 = functionUncurryThis({}.toString);
|
|
112
|
+
var stringSlice$8 = functionUncurryThis(''.slice);
|
|
87
113
|
|
|
88
114
|
var classofRaw = function (it) {
|
|
89
|
-
return toString$4
|
|
115
|
+
return stringSlice$8(toString$4(it), 8, -1);
|
|
90
116
|
};
|
|
91
117
|
|
|
92
|
-
var
|
|
118
|
+
var Object$5 = global_1.Object;
|
|
119
|
+
var split = functionUncurryThis(''.split);
|
|
93
120
|
|
|
94
121
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
95
122
|
var indexedObject = fails(function () {
|
|
96
123
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
97
124
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
98
|
-
return !Object('z').propertyIsEnumerable(0);
|
|
125
|
+
return !Object$5('z').propertyIsEnumerable(0);
|
|
99
126
|
}) ? function (it) {
|
|
100
|
-
return classofRaw(it) == 'String' ? split
|
|
101
|
-
} : Object;
|
|
127
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$5(it);
|
|
128
|
+
} : Object$5;
|
|
129
|
+
|
|
130
|
+
var TypeError$l = global_1.TypeError;
|
|
102
131
|
|
|
103
132
|
// `RequireObjectCoercible` abstract operation
|
|
104
133
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
105
134
|
var requireObjectCoercible = function (it) {
|
|
106
|
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
135
|
+
if (it == undefined) throw TypeError$l("Can't call method on " + it);
|
|
107
136
|
return it;
|
|
108
137
|
};
|
|
109
138
|
|
|
@@ -115,14 +144,14 @@
|
|
|
115
144
|
return indexedObject(requireObjectCoercible(it));
|
|
116
145
|
};
|
|
117
146
|
|
|
118
|
-
// `
|
|
147
|
+
// `IsCallable` abstract operation
|
|
119
148
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
120
149
|
var isCallable = function (argument) {
|
|
121
|
-
return typeof argument
|
|
150
|
+
return typeof argument == 'function';
|
|
122
151
|
};
|
|
123
152
|
|
|
124
153
|
var isObject$1 = function (it) {
|
|
125
|
-
return typeof it
|
|
154
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
126
155
|
};
|
|
127
156
|
|
|
128
157
|
var aFunction = function (argument) {
|
|
@@ -133,6 +162,8 @@
|
|
|
133
162
|
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
|
134
163
|
};
|
|
135
164
|
|
|
165
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
166
|
+
|
|
136
167
|
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
137
168
|
|
|
138
169
|
var process$5 = global_1.process;
|
|
@@ -143,23 +174,29 @@
|
|
|
143
174
|
|
|
144
175
|
if (v8) {
|
|
145
176
|
match = v8.split('.');
|
|
146
|
-
|
|
147
|
-
|
|
177
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
178
|
+
// but their correct versions are not interesting for us
|
|
179
|
+
version$3 = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
183
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
184
|
+
if (!version$3 && engineUserAgent) {
|
|
148
185
|
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
149
186
|
if (!match || match[1] >= 74) {
|
|
150
187
|
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
151
|
-
if (match) version$3 = match[1];
|
|
188
|
+
if (match) version$3 = +match[1];
|
|
152
189
|
}
|
|
153
190
|
}
|
|
154
191
|
|
|
155
|
-
var engineV8Version = version$3
|
|
192
|
+
var engineV8Version = version$3;
|
|
156
193
|
|
|
157
194
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
158
195
|
|
|
159
196
|
|
|
160
197
|
|
|
161
198
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
162
|
-
var nativeSymbol
|
|
199
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
163
200
|
var symbol = Symbol();
|
|
164
201
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
165
202
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -171,29 +208,35 @@
|
|
|
171
208
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
172
209
|
|
|
173
210
|
|
|
174
|
-
var useSymbolAsUid = nativeSymbol
|
|
211
|
+
var useSymbolAsUid = nativeSymbol
|
|
175
212
|
&& !Symbol.sham
|
|
176
213
|
&& typeof Symbol.iterator == 'symbol';
|
|
177
214
|
|
|
215
|
+
var Object$4 = global_1.Object;
|
|
216
|
+
|
|
178
217
|
var isSymbol$1 = useSymbolAsUid ? function (it) {
|
|
179
218
|
return typeof it == 'symbol';
|
|
180
219
|
} : function (it) {
|
|
181
220
|
var $Symbol = getBuiltIn('Symbol');
|
|
182
|
-
return isCallable($Symbol) && Object(it)
|
|
221
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$4(it));
|
|
183
222
|
};
|
|
184
223
|
|
|
224
|
+
var String$6 = global_1.String;
|
|
225
|
+
|
|
185
226
|
var tryToString = function (argument) {
|
|
186
227
|
try {
|
|
187
|
-
return String(argument);
|
|
228
|
+
return String$6(argument);
|
|
188
229
|
} catch (error) {
|
|
189
230
|
return 'Object';
|
|
190
231
|
}
|
|
191
232
|
};
|
|
192
233
|
|
|
234
|
+
var TypeError$k = global_1.TypeError;
|
|
235
|
+
|
|
193
236
|
// `Assert: IsCallable(argument) is true`
|
|
194
237
|
var aCallable = function (argument) {
|
|
195
238
|
if (isCallable(argument)) return argument;
|
|
196
|
-
throw TypeError(tryToString(argument) + ' is not a function');
|
|
239
|
+
throw TypeError$k(tryToString(argument) + ' is not a function');
|
|
197
240
|
};
|
|
198
241
|
|
|
199
242
|
// `GetMethod` abstract operation
|
|
@@ -203,20 +246,24 @@
|
|
|
203
246
|
return func == null ? undefined : aCallable(func);
|
|
204
247
|
};
|
|
205
248
|
|
|
249
|
+
var TypeError$j = global_1.TypeError;
|
|
250
|
+
|
|
206
251
|
// `OrdinaryToPrimitive` abstract operation
|
|
207
252
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
208
253
|
var ordinaryToPrimitive = function (input, pref) {
|
|
209
254
|
var fn, val;
|
|
210
|
-
if (pref === 'string' && isCallable(fn = input.toString) && !isObject$1(val = fn
|
|
211
|
-
if (isCallable(fn = input.valueOf) && !isObject$1(val = fn
|
|
212
|
-
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$1(val = fn
|
|
213
|
-
throw TypeError("Can't convert object to primitive value");
|
|
255
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
|
|
256
|
+
if (isCallable(fn = input.valueOf) && !isObject$1(val = functionCall(fn, input))) return val;
|
|
257
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject$1(val = functionCall(fn, input))) return val;
|
|
258
|
+
throw TypeError$j("Can't convert object to primitive value");
|
|
214
259
|
};
|
|
215
260
|
|
|
261
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
262
|
+
var defineProperty$b = Object.defineProperty;
|
|
263
|
+
|
|
216
264
|
var setGlobal = function (key, value) {
|
|
217
265
|
try {
|
|
218
|
-
|
|
219
|
-
Object.defineProperty(global_1, key, { value: value, configurable: true, writable: true });
|
|
266
|
+
defineProperty$b(global_1, key, { value: value, configurable: true, writable: true });
|
|
220
267
|
} catch (error) {
|
|
221
268
|
global_1[key] = value;
|
|
222
269
|
} return value;
|
|
@@ -231,45 +278,57 @@
|
|
|
231
278
|
(module.exports = function (key, value) {
|
|
232
279
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
233
280
|
})('versions', []).push({
|
|
234
|
-
version: '3.
|
|
281
|
+
version: '3.20.3',
|
|
235
282
|
mode: 'global',
|
|
236
|
-
copyright: '©
|
|
283
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
284
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.20.3/LICENSE',
|
|
285
|
+
source: 'https://github.com/zloirock/core-js'
|
|
237
286
|
});
|
|
238
287
|
});
|
|
239
288
|
|
|
289
|
+
var Object$3 = global_1.Object;
|
|
290
|
+
|
|
240
291
|
// `ToObject` abstract operation
|
|
241
292
|
// https://tc39.es/ecma262/#sec-toobject
|
|
242
293
|
var toObject = function (argument) {
|
|
243
|
-
return Object(requireObjectCoercible(argument));
|
|
294
|
+
return Object$3(requireObjectCoercible(argument));
|
|
244
295
|
};
|
|
245
296
|
|
|
246
|
-
var hasOwnProperty$1 = {}.hasOwnProperty;
|
|
297
|
+
var hasOwnProperty$1 = functionUncurryThis({}.hasOwnProperty);
|
|
247
298
|
|
|
248
|
-
|
|
249
|
-
|
|
299
|
+
// `HasOwnProperty` abstract operation
|
|
300
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
301
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
302
|
+
return hasOwnProperty$1(toObject(it), key);
|
|
250
303
|
};
|
|
251
304
|
|
|
252
305
|
var id = 0;
|
|
253
306
|
var postfix = Math.random();
|
|
307
|
+
var toString$3 = functionUncurryThis(1.0.toString);
|
|
254
308
|
|
|
255
309
|
var uid = function (key) {
|
|
256
|
-
return 'Symbol(' +
|
|
310
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
257
311
|
};
|
|
258
312
|
|
|
259
313
|
var WellKnownSymbolsStore$1 = shared('wks');
|
|
260
314
|
var Symbol$1 = global_1.Symbol;
|
|
315
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
261
316
|
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
262
317
|
|
|
263
318
|
var wellKnownSymbol = function (name) {
|
|
264
|
-
if (!
|
|
265
|
-
|
|
319
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore$1, name) || !(nativeSymbol || typeof WellKnownSymbolsStore$1[name] == 'string')) {
|
|
320
|
+
var description = 'Symbol.' + name;
|
|
321
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
266
322
|
WellKnownSymbolsStore$1[name] = Symbol$1[name];
|
|
323
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
324
|
+
WellKnownSymbolsStore$1[name] = symbolFor(description);
|
|
267
325
|
} else {
|
|
268
|
-
WellKnownSymbolsStore$1[name] = createWellKnownSymbol(
|
|
326
|
+
WellKnownSymbolsStore$1[name] = createWellKnownSymbol(description);
|
|
269
327
|
}
|
|
270
328
|
} return WellKnownSymbolsStore$1[name];
|
|
271
329
|
};
|
|
272
330
|
|
|
331
|
+
var TypeError$i = global_1.TypeError;
|
|
273
332
|
var TO_PRIMITIVE$1 = wellKnownSymbol('toPrimitive');
|
|
274
333
|
|
|
275
334
|
// `ToPrimitive` abstract operation
|
|
@@ -280,9 +339,9 @@
|
|
|
280
339
|
var result;
|
|
281
340
|
if (exoticToPrim) {
|
|
282
341
|
if (pref === undefined) pref = 'default';
|
|
283
|
-
result = exoticToPrim
|
|
342
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
284
343
|
if (!isObject$1(result) || isSymbol$1(result)) return result;
|
|
285
|
-
throw TypeError("Can't convert object to primitive value");
|
|
344
|
+
throw TypeError$i("Can't convert object to primitive value");
|
|
286
345
|
}
|
|
287
346
|
if (pref === undefined) pref = 'number';
|
|
288
347
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -292,7 +351,7 @@
|
|
|
292
351
|
// https://tc39.es/ecma262/#sec-topropertykey
|
|
293
352
|
var toPropertyKey = function (argument) {
|
|
294
353
|
var key = toPrimitive(argument, 'string');
|
|
295
|
-
return isSymbol$1(key) ? key :
|
|
354
|
+
return isSymbol$1(key) ? key : key + '';
|
|
296
355
|
};
|
|
297
356
|
|
|
298
357
|
var document$3 = global_1.document;
|
|
@@ -303,57 +362,91 @@
|
|
|
303
362
|
return EXISTS$1 ? document$3.createElement(it) : {};
|
|
304
363
|
};
|
|
305
364
|
|
|
306
|
-
//
|
|
365
|
+
// Thanks to IE8 for its funny defineProperty
|
|
307
366
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
308
|
-
// eslint-disable-next-line es/no-object-defineproperty --
|
|
367
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
309
368
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
310
369
|
get: function () { return 7; }
|
|
311
370
|
}).a != 7;
|
|
312
371
|
});
|
|
313
372
|
|
|
314
373
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
315
|
-
var $getOwnPropertyDescriptor$
|
|
374
|
+
var $getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
316
375
|
|
|
317
376
|
// `Object.getOwnPropertyDescriptor` method
|
|
318
377
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
319
|
-
var f$
|
|
378
|
+
var f$7 = descriptors ? $getOwnPropertyDescriptor$2 : function getOwnPropertyDescriptor(O, P) {
|
|
320
379
|
O = toIndexedObject(O);
|
|
321
380
|
P = toPropertyKey(P);
|
|
322
381
|
if (ie8DomDefine) try {
|
|
323
|
-
return $getOwnPropertyDescriptor$
|
|
382
|
+
return $getOwnPropertyDescriptor$2(O, P);
|
|
324
383
|
} catch (error) { /* empty */ }
|
|
325
|
-
if (
|
|
384
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
326
385
|
};
|
|
327
386
|
|
|
328
387
|
var objectGetOwnPropertyDescriptor = {
|
|
329
|
-
f: f$
|
|
388
|
+
f: f$7
|
|
330
389
|
};
|
|
331
390
|
|
|
391
|
+
// V8 ~ Chrome 36-
|
|
392
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
393
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
394
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
395
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
396
|
+
value: 42,
|
|
397
|
+
writable: false
|
|
398
|
+
}).prototype != 42;
|
|
399
|
+
});
|
|
400
|
+
|
|
401
|
+
var String$5 = global_1.String;
|
|
402
|
+
var TypeError$h = global_1.TypeError;
|
|
403
|
+
|
|
332
404
|
// `Assert: Type(argument) is Object`
|
|
333
405
|
var anObject = function (argument) {
|
|
334
406
|
if (isObject$1(argument)) return argument;
|
|
335
|
-
throw TypeError(String(argument) + ' is not an object');
|
|
407
|
+
throw TypeError$h(String$5(argument) + ' is not an object');
|
|
336
408
|
};
|
|
337
409
|
|
|
410
|
+
var TypeError$g = global_1.TypeError;
|
|
338
411
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
339
412
|
var $defineProperty$1 = Object.defineProperty;
|
|
413
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
414
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
415
|
+
var ENUMERABLE = 'enumerable';
|
|
416
|
+
var CONFIGURABLE$1 = 'configurable';
|
|
417
|
+
var WRITABLE = 'writable';
|
|
340
418
|
|
|
341
419
|
// `Object.defineProperty` method
|
|
342
420
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
343
|
-
var f$
|
|
421
|
+
var f$6 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
422
|
+
anObject(O);
|
|
423
|
+
P = toPropertyKey(P);
|
|
424
|
+
anObject(Attributes);
|
|
425
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
426
|
+
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
427
|
+
if (current && current[WRITABLE]) {
|
|
428
|
+
O[P] = Attributes.value;
|
|
429
|
+
Attributes = {
|
|
430
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
431
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
432
|
+
writable: false
|
|
433
|
+
};
|
|
434
|
+
}
|
|
435
|
+
} return $defineProperty$1(O, P, Attributes);
|
|
436
|
+
} : $defineProperty$1 : function defineProperty(O, P, Attributes) {
|
|
344
437
|
anObject(O);
|
|
345
438
|
P = toPropertyKey(P);
|
|
346
439
|
anObject(Attributes);
|
|
347
440
|
if (ie8DomDefine) try {
|
|
348
441
|
return $defineProperty$1(O, P, Attributes);
|
|
349
442
|
} catch (error) { /* empty */ }
|
|
350
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
443
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$g('Accessors not supported');
|
|
351
444
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
352
445
|
return O;
|
|
353
446
|
};
|
|
354
447
|
|
|
355
448
|
var objectDefineProperty = {
|
|
356
|
-
f: f$
|
|
449
|
+
f: f$6
|
|
357
450
|
};
|
|
358
451
|
|
|
359
452
|
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
@@ -363,12 +456,12 @@
|
|
|
363
456
|
return object;
|
|
364
457
|
};
|
|
365
458
|
|
|
366
|
-
var functionToString = Function.toString;
|
|
459
|
+
var functionToString$1 = functionUncurryThis(Function.toString);
|
|
367
460
|
|
|
368
461
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
369
462
|
if (!isCallable(sharedStore.inspectSource)) {
|
|
370
463
|
sharedStore.inspectSource = function (it) {
|
|
371
|
-
return functionToString
|
|
464
|
+
return functionToString$1(it);
|
|
372
465
|
};
|
|
373
466
|
}
|
|
374
467
|
|
|
@@ -387,6 +480,7 @@
|
|
|
387
480
|
var hiddenKeys$1 = {};
|
|
388
481
|
|
|
389
482
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
483
|
+
var TypeError$f = global_1.TypeError;
|
|
390
484
|
var WeakMap = global_1.WeakMap;
|
|
391
485
|
var set$2, get$1, has;
|
|
392
486
|
|
|
@@ -398,42 +492,42 @@
|
|
|
398
492
|
return function (it) {
|
|
399
493
|
var state;
|
|
400
494
|
if (!isObject$1(it) || (state = get$1(it)).type !== TYPE) {
|
|
401
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
495
|
+
throw TypeError$f('Incompatible receiver, ' + TYPE + ' required');
|
|
402
496
|
} return state;
|
|
403
497
|
};
|
|
404
498
|
};
|
|
405
499
|
|
|
406
500
|
if (nativeWeakMap || sharedStore.state) {
|
|
407
501
|
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
|
408
|
-
var wmget = store.get;
|
|
409
|
-
var wmhas = store.has;
|
|
410
|
-
var wmset = store.set;
|
|
502
|
+
var wmget = functionUncurryThis(store.get);
|
|
503
|
+
var wmhas = functionUncurryThis(store.has);
|
|
504
|
+
var wmset = functionUncurryThis(store.set);
|
|
411
505
|
set$2 = function (it, metadata) {
|
|
412
|
-
if (wmhas
|
|
506
|
+
if (wmhas(store, it)) throw new TypeError$f(OBJECT_ALREADY_INITIALIZED);
|
|
413
507
|
metadata.facade = it;
|
|
414
|
-
wmset
|
|
508
|
+
wmset(store, it, metadata);
|
|
415
509
|
return metadata;
|
|
416
510
|
};
|
|
417
511
|
get$1 = function (it) {
|
|
418
|
-
return wmget
|
|
512
|
+
return wmget(store, it) || {};
|
|
419
513
|
};
|
|
420
514
|
has = function (it) {
|
|
421
|
-
return wmhas
|
|
515
|
+
return wmhas(store, it);
|
|
422
516
|
};
|
|
423
517
|
} else {
|
|
424
518
|
var STATE = sharedKey('state');
|
|
425
519
|
hiddenKeys$1[STATE] = true;
|
|
426
520
|
set$2 = function (it, metadata) {
|
|
427
|
-
if (
|
|
521
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$f(OBJECT_ALREADY_INITIALIZED);
|
|
428
522
|
metadata.facade = it;
|
|
429
523
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
430
524
|
return metadata;
|
|
431
525
|
};
|
|
432
526
|
get$1 = function (it) {
|
|
433
|
-
return
|
|
527
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
434
528
|
};
|
|
435
529
|
has = function (it) {
|
|
436
|
-
return
|
|
530
|
+
return hasOwnProperty_1(it, STATE);
|
|
437
531
|
};
|
|
438
532
|
}
|
|
439
533
|
|
|
@@ -445,14 +539,14 @@
|
|
|
445
539
|
getterFor: getterFor
|
|
446
540
|
};
|
|
447
541
|
|
|
448
|
-
var FunctionPrototype$
|
|
542
|
+
var FunctionPrototype$2 = Function.prototype;
|
|
449
543
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
450
544
|
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
451
545
|
|
|
452
|
-
var EXISTS =
|
|
546
|
+
var EXISTS = hasOwnProperty_1(FunctionPrototype$2, 'name');
|
|
453
547
|
// additional protection from minified / mangled / dropped function names
|
|
454
548
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
455
|
-
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$
|
|
549
|
+
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$2, 'name').configurable));
|
|
456
550
|
|
|
457
551
|
var functionName = {
|
|
458
552
|
EXISTS: EXISTS,
|
|
@@ -477,7 +571,7 @@
|
|
|
477
571
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
478
572
|
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
479
573
|
}
|
|
480
|
-
if (!
|
|
574
|
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
481
575
|
createNonEnumerableProperty(value, 'name', name);
|
|
482
576
|
}
|
|
483
577
|
state = enforceInternalState(value);
|
|
@@ -505,36 +599,44 @@
|
|
|
505
599
|
var ceil = Math.ceil;
|
|
506
600
|
var floor$6 = Math.floor;
|
|
507
601
|
|
|
508
|
-
// `
|
|
509
|
-
// https://tc39.es/ecma262/#sec-
|
|
510
|
-
var
|
|
511
|
-
|
|
602
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
603
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
604
|
+
var toIntegerOrInfinity = function (argument) {
|
|
605
|
+
var number = +argument;
|
|
606
|
+
// eslint-disable-next-line no-self-compare -- safe
|
|
607
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor$6 : ceil)(number);
|
|
512
608
|
};
|
|
513
609
|
|
|
610
|
+
var max$4 = Math.max;
|
|
514
611
|
var min$7 = Math.min;
|
|
515
612
|
|
|
613
|
+
// Helper for a popular repeating case of the spec:
|
|
614
|
+
// Let integer be ? ToInteger(index).
|
|
615
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
616
|
+
var toAbsoluteIndex = function (index, length) {
|
|
617
|
+
var integer = toIntegerOrInfinity(index);
|
|
618
|
+
return integer < 0 ? max$4(integer + length, 0) : min$7(integer, length);
|
|
619
|
+
};
|
|
620
|
+
|
|
621
|
+
var min$6 = Math.min;
|
|
622
|
+
|
|
516
623
|
// `ToLength` abstract operation
|
|
517
624
|
// https://tc39.es/ecma262/#sec-tolength
|
|
518
625
|
var toLength = function (argument) {
|
|
519
|
-
return argument > 0 ? min$
|
|
626
|
+
return argument > 0 ? min$6(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
520
627
|
};
|
|
521
628
|
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
// Let integer be ? ToInteger(index).
|
|
527
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
528
|
-
var toAbsoluteIndex = function (index, length) {
|
|
529
|
-
var integer = toInteger(index);
|
|
530
|
-
return integer < 0 ? max$3(integer + length, 0) : min$6(integer, length);
|
|
629
|
+
// `LengthOfArrayLike` abstract operation
|
|
630
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
631
|
+
var lengthOfArrayLike = function (obj) {
|
|
632
|
+
return toLength(obj.length);
|
|
531
633
|
};
|
|
532
634
|
|
|
533
635
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
534
636
|
var createMethod$5 = function (IS_INCLUDES) {
|
|
535
637
|
return function ($this, el, fromIndex) {
|
|
536
638
|
var O = toIndexedObject($this);
|
|
537
|
-
var length =
|
|
639
|
+
var length = lengthOfArrayLike(O);
|
|
538
640
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
539
641
|
var value;
|
|
540
642
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -559,18 +661,20 @@
|
|
|
559
661
|
indexOf: createMethod$5(false)
|
|
560
662
|
};
|
|
561
663
|
|
|
562
|
-
var indexOf$
|
|
664
|
+
var indexOf$2 = arrayIncludes.indexOf;
|
|
563
665
|
|
|
564
666
|
|
|
667
|
+
var push$6 = functionUncurryThis([].push);
|
|
668
|
+
|
|
565
669
|
var objectKeysInternal = function (object, names) {
|
|
566
670
|
var O = toIndexedObject(object);
|
|
567
671
|
var i = 0;
|
|
568
672
|
var result = [];
|
|
569
673
|
var key;
|
|
570
|
-
for (key in O) !
|
|
674
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$6(result, key);
|
|
571
675
|
// Don't enum bug & hidden keys
|
|
572
|
-
while (names.length > i) if (
|
|
573
|
-
~indexOf$
|
|
676
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
677
|
+
~indexOf$2(result, key) || push$6(result, key);
|
|
574
678
|
}
|
|
575
679
|
return result;
|
|
576
680
|
};
|
|
@@ -591,35 +695,39 @@
|
|
|
591
695
|
// `Object.getOwnPropertyNames` method
|
|
592
696
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
593
697
|
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
594
|
-
var f$
|
|
698
|
+
var f$5 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
595
699
|
return objectKeysInternal(O, hiddenKeys);
|
|
596
700
|
};
|
|
597
701
|
|
|
598
702
|
var objectGetOwnPropertyNames = {
|
|
599
|
-
f: f$
|
|
703
|
+
f: f$5
|
|
600
704
|
};
|
|
601
705
|
|
|
602
706
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
603
|
-
var f$
|
|
707
|
+
var f$4 = Object.getOwnPropertySymbols;
|
|
604
708
|
|
|
605
709
|
var objectGetOwnPropertySymbols = {
|
|
606
|
-
f: f$
|
|
710
|
+
f: f$4
|
|
607
711
|
};
|
|
608
712
|
|
|
713
|
+
var concat$2 = functionUncurryThis([].concat);
|
|
714
|
+
|
|
609
715
|
// all object keys, includes non-enumerable and symbols
|
|
610
716
|
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
611
717
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
612
718
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
613
|
-
return getOwnPropertySymbols ?
|
|
719
|
+
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
|
614
720
|
};
|
|
615
721
|
|
|
616
|
-
var copyConstructorProperties = function (target, source) {
|
|
722
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
617
723
|
var keys = ownKeys$1(source);
|
|
618
724
|
var defineProperty = objectDefineProperty.f;
|
|
619
725
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
620
726
|
for (var i = 0; i < keys.length; i++) {
|
|
621
727
|
var key = keys[i];
|
|
622
|
-
if (!
|
|
728
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
729
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
730
|
+
}
|
|
623
731
|
}
|
|
624
732
|
};
|
|
625
733
|
|
|
@@ -686,7 +794,7 @@
|
|
|
686
794
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
687
795
|
// contained in target
|
|
688
796
|
if (!FORCED && targetProperty !== undefined) {
|
|
689
|
-
if (typeof sourceProperty
|
|
797
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
690
798
|
copyConstructorProperties(sourceProperty, targetProperty);
|
|
691
799
|
}
|
|
692
800
|
// add a flag to not completely full polyfills
|
|
@@ -713,6 +821,8 @@
|
|
|
713
821
|
var toStringTagSupport = String(test$2) === '[object z]';
|
|
714
822
|
|
|
715
823
|
var TO_STRING_TAG$3 = wellKnownSymbol('toStringTag');
|
|
824
|
+
var Object$2 = global_1.Object;
|
|
825
|
+
|
|
716
826
|
// ES3 wrong here
|
|
717
827
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
718
828
|
|
|
@@ -728,39 +838,49 @@
|
|
|
728
838
|
var O, tag, result;
|
|
729
839
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
730
840
|
// @@toStringTag case
|
|
731
|
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$3)) == 'string' ? tag
|
|
841
|
+
: typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$3)) == 'string' ? tag
|
|
732
842
|
// builtinTag case
|
|
733
843
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
734
844
|
// ES3 arguments fallback
|
|
735
845
|
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
736
846
|
};
|
|
737
847
|
|
|
848
|
+
var noop$2 = function () { /* empty */ };
|
|
738
849
|
var empty = [];
|
|
739
850
|
var construct = getBuiltIn('Reflect', 'construct');
|
|
740
851
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
741
|
-
var exec = constructorRegExp.exec;
|
|
742
|
-
var INCORRECT_TO_STRING = !constructorRegExp.exec(
|
|
852
|
+
var exec$2 = functionUncurryThis(constructorRegExp.exec);
|
|
853
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop$2);
|
|
743
854
|
|
|
744
|
-
var isConstructorModern = function (argument) {
|
|
855
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
745
856
|
if (!isCallable(argument)) return false;
|
|
746
857
|
try {
|
|
747
|
-
construct(
|
|
858
|
+
construct(noop$2, empty, argument);
|
|
748
859
|
return true;
|
|
749
860
|
} catch (error) {
|
|
750
861
|
return false;
|
|
751
862
|
}
|
|
752
863
|
};
|
|
753
864
|
|
|
754
|
-
var isConstructorLegacy = function (argument) {
|
|
865
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
755
866
|
if (!isCallable(argument)) return false;
|
|
756
867
|
switch (classof(argument)) {
|
|
757
868
|
case 'AsyncFunction':
|
|
758
869
|
case 'GeneratorFunction':
|
|
759
870
|
case 'AsyncGeneratorFunction': return false;
|
|
871
|
+
}
|
|
872
|
+
try {
|
|
760
873
|
// we can't check .prototype since constructors produced by .bind haven't it
|
|
761
|
-
|
|
874
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
875
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
876
|
+
return INCORRECT_TO_STRING || !!exec$2(constructorRegExp, inspectSource(argument));
|
|
877
|
+
} catch (error) {
|
|
878
|
+
return true;
|
|
879
|
+
}
|
|
762
880
|
};
|
|
763
881
|
|
|
882
|
+
isConstructorLegacy.sham = true;
|
|
883
|
+
|
|
764
884
|
// `IsConstructor` abstract operation
|
|
765
885
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
766
886
|
var isConstructor = !construct || fails(function () {
|
|
@@ -772,6 +892,7 @@
|
|
|
772
892
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
773
893
|
|
|
774
894
|
var SPECIES$6 = wellKnownSymbol('species');
|
|
895
|
+
var Array$7 = global_1.Array;
|
|
775
896
|
|
|
776
897
|
// a part of `ArraySpeciesCreate` abstract operation
|
|
777
898
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
@@ -780,12 +901,12 @@
|
|
|
780
901
|
if (isArray$3(originalArray)) {
|
|
781
902
|
C = originalArray.constructor;
|
|
782
903
|
// cross-realm fallback
|
|
783
|
-
if (isConstructor(C) && (C === Array || isArray$3(C.prototype))) C = undefined;
|
|
904
|
+
if (isConstructor(C) && (C === Array$7 || isArray$3(C.prototype))) C = undefined;
|
|
784
905
|
else if (isObject$1(C)) {
|
|
785
906
|
C = C[SPECIES$6];
|
|
786
907
|
if (C === null) C = undefined;
|
|
787
908
|
}
|
|
788
|
-
} return C === undefined ? Array : C;
|
|
909
|
+
} return C === undefined ? Array$7 : C;
|
|
789
910
|
};
|
|
790
911
|
|
|
791
912
|
// `ArraySpeciesCreate` abstract operation
|
|
@@ -818,7 +939,8 @@
|
|
|
818
939
|
|
|
819
940
|
var HAS_SPECIES_SUPPORT$3 = arrayMethodHasSpeciesSupport('splice');
|
|
820
941
|
|
|
821
|
-
var
|
|
942
|
+
var TypeError$e = global_1.TypeError;
|
|
943
|
+
var max$3 = Math.max;
|
|
822
944
|
var min$5 = Math.min;
|
|
823
945
|
var MAX_SAFE_INTEGER$1 = 0x1FFFFFFFFFFFFF;
|
|
824
946
|
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
|
|
@@ -829,7 +951,7 @@
|
|
|
829
951
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT$3 }, {
|
|
830
952
|
splice: function splice(start, deleteCount /* , ...items */) {
|
|
831
953
|
var O = toObject(this);
|
|
832
|
-
var len =
|
|
954
|
+
var len = lengthOfArrayLike(O);
|
|
833
955
|
var actualStart = toAbsoluteIndex(start, len);
|
|
834
956
|
var argumentsLength = arguments.length;
|
|
835
957
|
var insertCount, actualDeleteCount, A, k, from, to;
|
|
@@ -840,10 +962,10 @@
|
|
|
840
962
|
actualDeleteCount = len - actualStart;
|
|
841
963
|
} else {
|
|
842
964
|
insertCount = argumentsLength - 2;
|
|
843
|
-
actualDeleteCount = min$5(max$
|
|
965
|
+
actualDeleteCount = min$5(max$3(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
|
|
844
966
|
}
|
|
845
967
|
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER$1) {
|
|
846
|
-
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
|
|
968
|
+
throw TypeError$e(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
|
|
847
969
|
}
|
|
848
970
|
A = arraySpeciesCreate(O, actualDeleteCount);
|
|
849
971
|
for (k = 0; k < actualDeleteCount; k++) {
|
|
@@ -875,6 +997,18 @@
|
|
|
875
997
|
}
|
|
876
998
|
});
|
|
877
999
|
|
|
1000
|
+
// `Object.prototype.toString` method implementation
|
|
1001
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1002
|
+
var objectToString$1 = toStringTagSupport ? {}.toString : function toString() {
|
|
1003
|
+
return '[object ' + classof(this) + ']';
|
|
1004
|
+
};
|
|
1005
|
+
|
|
1006
|
+
// `Object.prototype.toString` method
|
|
1007
|
+
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1008
|
+
if (!toStringTagSupport) {
|
|
1009
|
+
redefine(Object.prototype, 'toString', objectToString$1, { unsafe: true });
|
|
1010
|
+
}
|
|
1011
|
+
|
|
878
1012
|
// iterable DOM collections
|
|
879
1013
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
880
1014
|
var domIterables = {
|
|
@@ -919,30 +1053,17 @@
|
|
|
919
1053
|
|
|
920
1054
|
var domTokenListPrototype = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype;
|
|
921
1055
|
|
|
1056
|
+
var bind$1 = functionUncurryThis(functionUncurryThis.bind);
|
|
1057
|
+
|
|
922
1058
|
// optional / simple context binding
|
|
923
|
-
var functionBindContext = function (fn, that
|
|
1059
|
+
var functionBindContext = function (fn, that) {
|
|
924
1060
|
aCallable(fn);
|
|
925
|
-
|
|
926
|
-
switch (length) {
|
|
927
|
-
case 0: return function () {
|
|
928
|
-
return fn.call(that);
|
|
929
|
-
};
|
|
930
|
-
case 1: return function (a) {
|
|
931
|
-
return fn.call(that, a);
|
|
932
|
-
};
|
|
933
|
-
case 2: return function (a, b) {
|
|
934
|
-
return fn.call(that, a, b);
|
|
935
|
-
};
|
|
936
|
-
case 3: return function (a, b, c) {
|
|
937
|
-
return fn.call(that, a, b, c);
|
|
938
|
-
};
|
|
939
|
-
}
|
|
940
|
-
return function (/* ...args */) {
|
|
1061
|
+
return that === undefined ? fn : functionBindNative ? bind$1(fn, that) : function (/* ...args */) {
|
|
941
1062
|
return fn.apply(that, arguments);
|
|
942
1063
|
};
|
|
943
1064
|
};
|
|
944
1065
|
|
|
945
|
-
var push = [].push;
|
|
1066
|
+
var push$5 = functionUncurryThis([].push);
|
|
946
1067
|
|
|
947
1068
|
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
|
948
1069
|
var createMethod$4 = function (TYPE) {
|
|
@@ -956,8 +1077,8 @@
|
|
|
956
1077
|
return function ($this, callbackfn, that, specificCreate) {
|
|
957
1078
|
var O = toObject($this);
|
|
958
1079
|
var self = indexedObject(O);
|
|
959
|
-
var boundFunction = functionBindContext(callbackfn, that
|
|
960
|
-
var length =
|
|
1080
|
+
var boundFunction = functionBindContext(callbackfn, that);
|
|
1081
|
+
var length = lengthOfArrayLike(self);
|
|
961
1082
|
var index = 0;
|
|
962
1083
|
var create = specificCreate || arraySpeciesCreate;
|
|
963
1084
|
var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined;
|
|
@@ -971,10 +1092,10 @@
|
|
|
971
1092
|
case 3: return true; // some
|
|
972
1093
|
case 5: return value; // find
|
|
973
1094
|
case 6: return index; // findIndex
|
|
974
|
-
case 2: push
|
|
1095
|
+
case 2: push$5(target, value); // filter
|
|
975
1096
|
} else switch (TYPE) {
|
|
976
1097
|
case 4: return false; // every
|
|
977
|
-
case 7: push
|
|
1098
|
+
case 7: push$5(target, value); // filterReject
|
|
978
1099
|
}
|
|
979
1100
|
}
|
|
980
1101
|
}
|
|
@@ -1039,7 +1160,9 @@
|
|
|
1039
1160
|
};
|
|
1040
1161
|
|
|
1041
1162
|
for (var COLLECTION_NAME$1 in domIterables) {
|
|
1042
|
-
|
|
1163
|
+
if (domIterables[COLLECTION_NAME$1]) {
|
|
1164
|
+
handlePrototype$1(global_1[COLLECTION_NAME$1] && global_1[COLLECTION_NAME$1].prototype);
|
|
1165
|
+
}
|
|
1043
1166
|
}
|
|
1044
1167
|
|
|
1045
1168
|
handlePrototype$1(domTokenListPrototype);
|
|
@@ -1065,19 +1188,21 @@
|
|
|
1065
1188
|
return objectKeysInternal(O, enumBugKeys);
|
|
1066
1189
|
};
|
|
1067
1190
|
|
|
1068
|
-
var FAILS_ON_PRIMITIVES$
|
|
1191
|
+
var FAILS_ON_PRIMITIVES$5 = fails(function () { objectKeys(1); });
|
|
1069
1192
|
|
|
1070
1193
|
// `Object.keys` method
|
|
1071
1194
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
1072
|
-
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$
|
|
1195
|
+
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$5 }, {
|
|
1073
1196
|
keys: function keys(it) {
|
|
1074
1197
|
return objectKeys(toObject(it));
|
|
1075
1198
|
}
|
|
1076
1199
|
});
|
|
1077
1200
|
|
|
1201
|
+
var String$4 = global_1.String;
|
|
1202
|
+
|
|
1078
1203
|
var toString_1 = function (argument) {
|
|
1079
1204
|
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
1080
|
-
return String(argument);
|
|
1205
|
+
return String$4(argument);
|
|
1081
1206
|
};
|
|
1082
1207
|
|
|
1083
1208
|
// `RegExp.prototype.flags` getter implementation
|
|
@@ -1103,7 +1228,13 @@
|
|
|
1103
1228
|
return re.exec('abcd') != null;
|
|
1104
1229
|
});
|
|
1105
1230
|
|
|
1106
|
-
|
|
1231
|
+
// UC Browser bug
|
|
1232
|
+
// https://github.com/zloirock/core-js/issues/1008
|
|
1233
|
+
var MISSED_STICKY$1 = UNSUPPORTED_Y$3 || fails(function () {
|
|
1234
|
+
return !$RegExp$2('a', 'y').sticky;
|
|
1235
|
+
});
|
|
1236
|
+
|
|
1237
|
+
var BROKEN_CARET = UNSUPPORTED_Y$3 || fails(function () {
|
|
1107
1238
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1108
1239
|
var re = $RegExp$2('^r', 'gy');
|
|
1109
1240
|
re.lastIndex = 2;
|
|
@@ -1111,23 +1242,29 @@
|
|
|
1111
1242
|
});
|
|
1112
1243
|
|
|
1113
1244
|
var regexpStickyHelpers = {
|
|
1114
|
-
|
|
1115
|
-
|
|
1245
|
+
BROKEN_CARET: BROKEN_CARET,
|
|
1246
|
+
MISSED_STICKY: MISSED_STICKY$1,
|
|
1247
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$3
|
|
1116
1248
|
};
|
|
1117
1249
|
|
|
1118
1250
|
// `Object.defineProperties` method
|
|
1119
1251
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1120
1252
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1121
|
-
var
|
|
1253
|
+
var f$3 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1122
1254
|
anObject(O);
|
|
1255
|
+
var props = toIndexedObject(Properties);
|
|
1123
1256
|
var keys = objectKeys(Properties);
|
|
1124
1257
|
var length = keys.length;
|
|
1125
1258
|
var index = 0;
|
|
1126
1259
|
var key;
|
|
1127
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++],
|
|
1260
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
1128
1261
|
return O;
|
|
1129
1262
|
};
|
|
1130
1263
|
|
|
1264
|
+
var objectDefineProperties = {
|
|
1265
|
+
f: f$3
|
|
1266
|
+
};
|
|
1267
|
+
|
|
1131
1268
|
var html$1 = getBuiltIn('document', 'documentElement');
|
|
1132
1269
|
|
|
1133
1270
|
/* global ActiveXObject -- old IE, WSH */
|
|
@@ -1210,7 +1347,7 @@
|
|
|
1210
1347
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1211
1348
|
result[IE_PROTO$1] = O;
|
|
1212
1349
|
} else result = NullProtoObject();
|
|
1213
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
|
1350
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
1214
1351
|
};
|
|
1215
1352
|
|
|
1216
1353
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
@@ -1237,24 +1374,29 @@
|
|
|
1237
1374
|
|
|
1238
1375
|
|
|
1239
1376
|
|
|
1377
|
+
|
|
1378
|
+
|
|
1240
1379
|
var getInternalState$5 = internalState.get;
|
|
1241
1380
|
|
|
1242
1381
|
|
|
1243
1382
|
|
|
1244
|
-
var nativeExec = RegExp.prototype.exec;
|
|
1245
1383
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
1246
|
-
|
|
1384
|
+
var nativeExec = RegExp.prototype.exec;
|
|
1247
1385
|
var patchedExec = nativeExec;
|
|
1386
|
+
var charAt$5 = functionUncurryThis(''.charAt);
|
|
1387
|
+
var indexOf$1 = functionUncurryThis(''.indexOf);
|
|
1388
|
+
var replace$4 = functionUncurryThis(''.replace);
|
|
1389
|
+
var stringSlice$7 = functionUncurryThis(''.slice);
|
|
1248
1390
|
|
|
1249
1391
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
1250
1392
|
var re1 = /a/;
|
|
1251
1393
|
var re2 = /b*/g;
|
|
1252
|
-
nativeExec
|
|
1253
|
-
nativeExec
|
|
1394
|
+
functionCall(nativeExec, re1, 'a');
|
|
1395
|
+
functionCall(nativeExec, re2, 'a');
|
|
1254
1396
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
1255
1397
|
})();
|
|
1256
1398
|
|
|
1257
|
-
var UNSUPPORTED_Y$2 = regexpStickyHelpers.
|
|
1399
|
+
var UNSUPPORTED_Y$2 = regexpStickyHelpers.BROKEN_CARET;
|
|
1258
1400
|
|
|
1259
1401
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
1260
1402
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
@@ -1262,7 +1404,6 @@
|
|
|
1262
1404
|
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$2 || regexpUnsupportedDotAll || regexpUnsupportedNcg;
|
|
1263
1405
|
|
|
1264
1406
|
if (PATCH) {
|
|
1265
|
-
// eslint-disable-next-line max-statements -- TODO
|
|
1266
1407
|
patchedExec = function exec(string) {
|
|
1267
1408
|
var re = this;
|
|
1268
1409
|
var state = getInternalState$5(re);
|
|
@@ -1272,27 +1413,27 @@
|
|
|
1272
1413
|
|
|
1273
1414
|
if (raw) {
|
|
1274
1415
|
raw.lastIndex = re.lastIndex;
|
|
1275
|
-
result = patchedExec
|
|
1416
|
+
result = functionCall(patchedExec, raw, str);
|
|
1276
1417
|
re.lastIndex = raw.lastIndex;
|
|
1277
1418
|
return result;
|
|
1278
1419
|
}
|
|
1279
1420
|
|
|
1280
1421
|
var groups = state.groups;
|
|
1281
1422
|
var sticky = UNSUPPORTED_Y$2 && re.sticky;
|
|
1282
|
-
var flags = regexpFlags
|
|
1423
|
+
var flags = functionCall(regexpFlags, re);
|
|
1283
1424
|
var source = re.source;
|
|
1284
1425
|
var charsAdded = 0;
|
|
1285
1426
|
var strCopy = str;
|
|
1286
1427
|
|
|
1287
1428
|
if (sticky) {
|
|
1288
|
-
flags =
|
|
1289
|
-
if (
|
|
1429
|
+
flags = replace$4(flags, 'y', '');
|
|
1430
|
+
if (indexOf$1(flags, 'g') === -1) {
|
|
1290
1431
|
flags += 'g';
|
|
1291
1432
|
}
|
|
1292
1433
|
|
|
1293
|
-
strCopy = str
|
|
1434
|
+
strCopy = stringSlice$7(str, re.lastIndex);
|
|
1294
1435
|
// Support anchored sticky behavior.
|
|
1295
|
-
if (re.lastIndex > 0 && (!re.multiline || re.multiline &&
|
|
1436
|
+
if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$5(str, re.lastIndex - 1) !== '\n')) {
|
|
1296
1437
|
source = '(?: ' + source + ')';
|
|
1297
1438
|
strCopy = ' ' + strCopy;
|
|
1298
1439
|
charsAdded++;
|
|
@@ -1307,12 +1448,12 @@
|
|
|
1307
1448
|
}
|
|
1308
1449
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
1309
1450
|
|
|
1310
|
-
match = nativeExec
|
|
1451
|
+
match = functionCall(nativeExec, sticky ? reCopy : re, strCopy);
|
|
1311
1452
|
|
|
1312
1453
|
if (sticky) {
|
|
1313
1454
|
if (match) {
|
|
1314
|
-
match.input = match.input
|
|
1315
|
-
match[0] = match[0]
|
|
1455
|
+
match.input = stringSlice$7(match.input, charsAdded);
|
|
1456
|
+
match[0] = stringSlice$7(match[0], charsAdded);
|
|
1316
1457
|
match.index = re.lastIndex;
|
|
1317
1458
|
re.lastIndex += match[0].length;
|
|
1318
1459
|
} else re.lastIndex = 0;
|
|
@@ -1322,7 +1463,7 @@
|
|
|
1322
1463
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
1323
1464
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
1324
1465
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
1325
|
-
nativeReplace
|
|
1466
|
+
functionCall(nativeReplace, match[0], reCopy, function () {
|
|
1326
1467
|
for (i = 1; i < arguments.length - 2; i++) {
|
|
1327
1468
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
1328
1469
|
}
|
|
@@ -1357,6 +1498,7 @@
|
|
|
1357
1498
|
|
|
1358
1499
|
|
|
1359
1500
|
|
|
1501
|
+
|
|
1360
1502
|
var SPECIES$4 = wellKnownSymbol('species');
|
|
1361
1503
|
var RegExpPrototype$2 = RegExp.prototype;
|
|
1362
1504
|
|
|
@@ -1399,17 +1541,18 @@
|
|
|
1399
1541
|
!DELEGATES_TO_EXEC ||
|
|
1400
1542
|
FORCED
|
|
1401
1543
|
) {
|
|
1402
|
-
var
|
|
1544
|
+
var uncurriedNativeRegExpMethod = functionUncurryThis(/./[SYMBOL]);
|
|
1403
1545
|
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
|
|
1546
|
+
var uncurriedNativeMethod = functionUncurryThis(nativeMethod);
|
|
1404
1547
|
var $exec = regexp.exec;
|
|
1405
1548
|
if ($exec === regexpExec || $exec === RegExpPrototype$2.exec) {
|
|
1406
1549
|
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
|
|
1407
1550
|
// The native String method already delegates to @@method (this
|
|
1408
1551
|
// polyfilled function), leasing to infinite recursion.
|
|
1409
1552
|
// We avoid it by directly calling the native @@method method.
|
|
1410
|
-
return { done: true, value:
|
|
1553
|
+
return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
|
|
1411
1554
|
}
|
|
1412
|
-
return { done: true, value:
|
|
1555
|
+
return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
|
|
1413
1556
|
}
|
|
1414
1557
|
return { done: false };
|
|
1415
1558
|
});
|
|
@@ -1429,17 +1572,19 @@
|
|
|
1429
1572
|
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
|
|
1430
1573
|
};
|
|
1431
1574
|
|
|
1575
|
+
var TypeError$d = global_1.TypeError;
|
|
1576
|
+
|
|
1432
1577
|
// `RegExpExec` abstract operation
|
|
1433
1578
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
1434
1579
|
var regexpExecAbstract = function (R, S) {
|
|
1435
1580
|
var exec = R.exec;
|
|
1436
1581
|
if (isCallable(exec)) {
|
|
1437
|
-
var result = exec
|
|
1582
|
+
var result = functionCall(exec, R, S);
|
|
1438
1583
|
if (result !== null) anObject(result);
|
|
1439
1584
|
return result;
|
|
1440
1585
|
}
|
|
1441
|
-
if (classofRaw(R) === 'RegExp') return regexpExec
|
|
1442
|
-
throw TypeError('RegExp#exec called on incompatible receiver');
|
|
1586
|
+
if (classofRaw(R) === 'RegExp') return functionCall(regexpExec, R, S);
|
|
1587
|
+
throw TypeError$d('RegExp#exec called on incompatible receiver');
|
|
1443
1588
|
};
|
|
1444
1589
|
|
|
1445
1590
|
// @@search logic
|
|
@@ -1450,7 +1595,7 @@
|
|
|
1450
1595
|
function search(regexp) {
|
|
1451
1596
|
var O = requireObjectCoercible(this);
|
|
1452
1597
|
var searcher = regexp == undefined ? undefined : getMethod(regexp, SEARCH);
|
|
1453
|
-
return searcher ? searcher
|
|
1598
|
+
return searcher ? functionCall(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString_1(O));
|
|
1454
1599
|
},
|
|
1455
1600
|
// `RegExp.prototype[@@search]` method
|
|
1456
1601
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@search
|
|
@@ -1473,6 +1618,7 @@
|
|
|
1473
1618
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
|
1474
1619
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
|
1475
1620
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
|
1621
|
+
var TypeError$c = global_1.TypeError;
|
|
1476
1622
|
|
|
1477
1623
|
// We can't use this feature detection in V8 since it causes
|
|
1478
1624
|
// deoptimization and serious performance degradation
|
|
@@ -1491,12 +1637,12 @@
|
|
|
1491
1637
|
return spreadable !== undefined ? !!spreadable : isArray$3(O);
|
|
1492
1638
|
};
|
|
1493
1639
|
|
|
1494
|
-
var FORCED$
|
|
1640
|
+
var FORCED$7 = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
|
|
1495
1641
|
|
|
1496
1642
|
// `Array.prototype.concat` method
|
|
1497
1643
|
// https://tc39.es/ecma262/#sec-array.prototype.concat
|
|
1498
1644
|
// with adding support of @@isConcatSpreadable and @@species
|
|
1499
|
-
_export({ target: 'Array', proto: true, forced: FORCED$
|
|
1645
|
+
_export({ target: 'Array', proto: true, forced: FORCED$7 }, {
|
|
1500
1646
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1501
1647
|
concat: function concat(arg) {
|
|
1502
1648
|
var O = toObject(this);
|
|
@@ -1506,11 +1652,11 @@
|
|
|
1506
1652
|
for (i = -1, length = arguments.length; i < length; i++) {
|
|
1507
1653
|
E = i === -1 ? O : arguments[i];
|
|
1508
1654
|
if (isConcatSpreadable(E)) {
|
|
1509
|
-
len =
|
|
1510
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1655
|
+
len = lengthOfArrayLike(E);
|
|
1656
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError$c(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1511
1657
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
1512
1658
|
} else {
|
|
1513
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1659
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError$c(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1514
1660
|
createProperty(A, n++, E);
|
|
1515
1661
|
}
|
|
1516
1662
|
}
|
|
@@ -1597,7 +1743,7 @@
|
|
|
1597
1743
|
}
|
|
1598
1744
|
}
|
|
1599
1745
|
|
|
1600
|
-
var queue$
|
|
1746
|
+
var queue$3 = [];
|
|
1601
1747
|
var draining$1 = false;
|
|
1602
1748
|
var currentQueue$1;
|
|
1603
1749
|
var queueIndex$1 = -1;
|
|
@@ -1610,12 +1756,12 @@
|
|
|
1610
1756
|
draining$1 = false;
|
|
1611
1757
|
|
|
1612
1758
|
if (currentQueue$1.length) {
|
|
1613
|
-
queue$
|
|
1759
|
+
queue$3 = currentQueue$1.concat(queue$3);
|
|
1614
1760
|
} else {
|
|
1615
1761
|
queueIndex$1 = -1;
|
|
1616
1762
|
}
|
|
1617
1763
|
|
|
1618
|
-
if (queue$
|
|
1764
|
+
if (queue$3.length) {
|
|
1619
1765
|
drainQueue$1();
|
|
1620
1766
|
}
|
|
1621
1767
|
}
|
|
@@ -1627,11 +1773,11 @@
|
|
|
1627
1773
|
|
|
1628
1774
|
var timeout = runTimeout$1(cleanUpNextTick$1);
|
|
1629
1775
|
draining$1 = true;
|
|
1630
|
-
var len = queue$
|
|
1776
|
+
var len = queue$3.length;
|
|
1631
1777
|
|
|
1632
1778
|
while (len) {
|
|
1633
|
-
currentQueue$1 = queue$
|
|
1634
|
-
queue$
|
|
1779
|
+
currentQueue$1 = queue$3;
|
|
1780
|
+
queue$3 = [];
|
|
1635
1781
|
|
|
1636
1782
|
while (++queueIndex$1 < len) {
|
|
1637
1783
|
if (currentQueue$1) {
|
|
@@ -1640,7 +1786,7 @@
|
|
|
1640
1786
|
}
|
|
1641
1787
|
|
|
1642
1788
|
queueIndex$1 = -1;
|
|
1643
|
-
len = queue$
|
|
1789
|
+
len = queue$3.length;
|
|
1644
1790
|
}
|
|
1645
1791
|
|
|
1646
1792
|
currentQueue$1 = null;
|
|
@@ -1657,9 +1803,9 @@
|
|
|
1657
1803
|
}
|
|
1658
1804
|
}
|
|
1659
1805
|
|
|
1660
|
-
queue$
|
|
1806
|
+
queue$3.push(new Item$1(fun, args));
|
|
1661
1807
|
|
|
1662
|
-
if (queue$
|
|
1808
|
+
if (queue$3.length === 1 && !draining$1) {
|
|
1663
1809
|
runTimeout$1(drainQueue$1);
|
|
1664
1810
|
}
|
|
1665
1811
|
} // v8 likes predictible objects
|
|
@@ -1763,19 +1909,8 @@
|
|
|
1763
1909
|
uptime: uptime$1
|
|
1764
1910
|
};
|
|
1765
1911
|
|
|
1766
|
-
|
|
1767
|
-
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1768
|
-
var objectToString$1 = toStringTagSupport ? {}.toString : function toString() {
|
|
1769
|
-
return '[object ' + classof(this) + ']';
|
|
1770
|
-
};
|
|
1771
|
-
|
|
1772
|
-
// `Object.prototype.toString` method
|
|
1773
|
-
// https://tc39.es/ecma262/#sec-object.prototype.tostring
|
|
1774
|
-
if (!toStringTagSupport) {
|
|
1775
|
-
redefine(Object.prototype, 'toString', objectToString$1, { unsafe: true });
|
|
1776
|
-
}
|
|
1912
|
+
var PROPER_FUNCTION_NAME$3 = functionName.PROPER;
|
|
1777
1913
|
|
|
1778
|
-
var PROPER_FUNCTION_NAME$4 = functionName.PROPER;
|
|
1779
1914
|
|
|
1780
1915
|
|
|
1781
1916
|
|
|
@@ -1784,11 +1919,12 @@
|
|
|
1784
1919
|
|
|
1785
1920
|
var TO_STRING = 'toString';
|
|
1786
1921
|
var RegExpPrototype$1 = RegExp.prototype;
|
|
1787
|
-
var
|
|
1922
|
+
var n$ToString = RegExpPrototype$1[TO_STRING];
|
|
1923
|
+
var getFlags$1 = functionUncurryThis(regexpFlags);
|
|
1788
1924
|
|
|
1789
|
-
var NOT_GENERIC = fails(function () { return
|
|
1925
|
+
var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
|
|
1790
1926
|
// FF44- RegExp#toString has a wrong name
|
|
1791
|
-
var INCORRECT_NAME = PROPER_FUNCTION_NAME$
|
|
1927
|
+
var INCORRECT_NAME = PROPER_FUNCTION_NAME$3 && n$ToString.name != TO_STRING;
|
|
1792
1928
|
|
|
1793
1929
|
// `RegExp.prototype.toString` method
|
|
1794
1930
|
// https://tc39.es/ecma262/#sec-regexp.prototype.tostring
|
|
@@ -1797,7 +1933,7 @@
|
|
|
1797
1933
|
var R = anObject(this);
|
|
1798
1934
|
var p = toString_1(R.source);
|
|
1799
1935
|
var rf = R.flags;
|
|
1800
|
-
var f = toString_1(rf === undefined && R
|
|
1936
|
+
var f = toString_1(rf === undefined && objectIsPrototypeOf(RegExpPrototype$1, R) && !('flags' in RegExpPrototype$1) ? getFlags$1(R) : rf);
|
|
1801
1937
|
return '/' + p + '/' + f;
|
|
1802
1938
|
}, { unsafe: true });
|
|
1803
1939
|
}
|
|
@@ -1810,46 +1946,48 @@
|
|
|
1810
1946
|
});
|
|
1811
1947
|
|
|
1812
1948
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1813
|
-
var
|
|
1949
|
+
var Object$1 = global_1.Object;
|
|
1950
|
+
var ObjectPrototype$3 = Object$1.prototype;
|
|
1814
1951
|
|
|
1815
1952
|
// `Object.getPrototypeOf` method
|
|
1816
1953
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1817
|
-
|
|
1818
|
-
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
|
1954
|
+
var objectGetPrototypeOf = correctPrototypeGetter ? Object$1.getPrototypeOf : function (O) {
|
|
1819
1955
|
var object = toObject(O);
|
|
1820
|
-
if (
|
|
1956
|
+
if (hasOwnProperty_1(object, IE_PROTO)) return object[IE_PROTO];
|
|
1821
1957
|
var constructor = object.constructor;
|
|
1822
1958
|
if (isCallable(constructor) && object instanceof constructor) {
|
|
1823
1959
|
return constructor.prototype;
|
|
1824
|
-
} return object instanceof Object ? ObjectPrototype$3 : null;
|
|
1960
|
+
} return object instanceof Object$1 ? ObjectPrototype$3 : null;
|
|
1825
1961
|
};
|
|
1826
1962
|
|
|
1827
|
-
var FAILS_ON_PRIMITIVES$
|
|
1963
|
+
var FAILS_ON_PRIMITIVES$4 = fails(function () { objectGetPrototypeOf(1); });
|
|
1828
1964
|
|
|
1829
1965
|
// `Object.getPrototypeOf` method
|
|
1830
1966
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1831
|
-
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$
|
|
1967
|
+
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$4, sham: !correctPrototypeGetter }, {
|
|
1832
1968
|
getPrototypeOf: function getPrototypeOf(it) {
|
|
1833
1969
|
return objectGetPrototypeOf(toObject(it));
|
|
1834
1970
|
}
|
|
1835
1971
|
});
|
|
1836
1972
|
|
|
1837
1973
|
var FUNCTION_NAME_EXISTS = functionName.EXISTS;
|
|
1838
|
-
var defineProperty$9 = objectDefineProperty.f;
|
|
1839
1974
|
|
|
1840
|
-
var
|
|
1841
|
-
|
|
1842
|
-
var
|
|
1975
|
+
var defineProperty$a = objectDefineProperty.f;
|
|
1976
|
+
|
|
1977
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
1978
|
+
var functionToString = functionUncurryThis(FunctionPrototype$1.toString);
|
|
1979
|
+
var nameRE = /function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/;
|
|
1980
|
+
var regExpExec = functionUncurryThis(nameRE.exec);
|
|
1843
1981
|
var NAME$1 = 'name';
|
|
1844
1982
|
|
|
1845
1983
|
// Function instances `.name` property
|
|
1846
1984
|
// https://tc39.es/ecma262/#sec-function-instances-name
|
|
1847
1985
|
if (descriptors && !FUNCTION_NAME_EXISTS) {
|
|
1848
|
-
defineProperty$
|
|
1986
|
+
defineProperty$a(FunctionPrototype$1, NAME$1, {
|
|
1849
1987
|
configurable: true,
|
|
1850
1988
|
get: function () {
|
|
1851
1989
|
try {
|
|
1852
|
-
return
|
|
1990
|
+
return regExpExec(nameRE, functionToString(this))[1];
|
|
1853
1991
|
} catch (error) {
|
|
1854
1992
|
return '';
|
|
1855
1993
|
}
|
|
@@ -2305,19 +2443,63 @@
|
|
|
2305
2443
|
return ret;
|
|
2306
2444
|
}
|
|
2307
2445
|
|
|
2446
|
+
function _asyncIterator(iterable) {
|
|
2447
|
+
var method,
|
|
2448
|
+
async,
|
|
2449
|
+
sync,
|
|
2450
|
+
retry = 2;
|
|
2451
|
+
|
|
2452
|
+
for ("undefined" != typeof Symbol && (async = Symbol.asyncIterator, sync = Symbol.iterator); retry--;) {
|
|
2453
|
+
if (async && null != (method = iterable[async])) return method.call(iterable);
|
|
2454
|
+
if (sync && null != (method = iterable[sync])) return new AsyncFromSyncIterator(method.call(iterable));
|
|
2455
|
+
async = "@@asyncIterator", sync = "@@iterator";
|
|
2456
|
+
}
|
|
2457
|
+
|
|
2458
|
+
throw new TypeError("Object is not async iterable");
|
|
2459
|
+
}
|
|
2460
|
+
|
|
2461
|
+
function AsyncFromSyncIterator(s) {
|
|
2462
|
+
function AsyncFromSyncIteratorContinuation(r) {
|
|
2463
|
+
if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object."));
|
|
2464
|
+
var done = r.done;
|
|
2465
|
+
return Promise.resolve(r.value).then(function (value) {
|
|
2466
|
+
return {
|
|
2467
|
+
value: value,
|
|
2468
|
+
done: done
|
|
2469
|
+
};
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
return AsyncFromSyncIterator = function (s) {
|
|
2474
|
+
this.s = s, this.n = s.next;
|
|
2475
|
+
}, AsyncFromSyncIterator.prototype = {
|
|
2476
|
+
s: null,
|
|
2477
|
+
n: null,
|
|
2478
|
+
next: function () {
|
|
2479
|
+
return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments));
|
|
2480
|
+
},
|
|
2481
|
+
return: function (value) {
|
|
2482
|
+
var ret = this.s.return;
|
|
2483
|
+
return void 0 === ret ? Promise.resolve({
|
|
2484
|
+
value: value,
|
|
2485
|
+
done: !0
|
|
2486
|
+
}) : AsyncFromSyncIteratorContinuation(ret.apply(this.s, arguments));
|
|
2487
|
+
},
|
|
2488
|
+
throw: function (value) {
|
|
2489
|
+
var thr = this.s.return;
|
|
2490
|
+
return void 0 === thr ? Promise.reject(value) : AsyncFromSyncIteratorContinuation(thr.apply(this.s, arguments));
|
|
2491
|
+
}
|
|
2492
|
+
}, new AsyncFromSyncIterator(s);
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2308
2495
|
function ownKeys(object, enumerableOnly) {
|
|
2309
2496
|
var keys = Object.keys(object);
|
|
2310
2497
|
|
|
2311
2498
|
if (Object.getOwnPropertySymbols) {
|
|
2312
2499
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
2317
|
-
});
|
|
2318
|
-
}
|
|
2319
|
-
|
|
2320
|
-
keys.push.apply(keys, symbols);
|
|
2500
|
+
enumerableOnly && (symbols = symbols.filter(function (sym) {
|
|
2501
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
2502
|
+
})), keys.push.apply(keys, symbols);
|
|
2321
2503
|
}
|
|
2322
2504
|
|
|
2323
2505
|
return keys;
|
|
@@ -2325,19 +2507,12 @@
|
|
|
2325
2507
|
|
|
2326
2508
|
function _objectSpread2(target) {
|
|
2327
2509
|
for (var i = 1; i < arguments.length; i++) {
|
|
2328
|
-
var source = arguments[i]
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
2335
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
2336
|
-
} else {
|
|
2337
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
2338
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
2339
|
-
});
|
|
2340
|
-
}
|
|
2510
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
2511
|
+
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
2512
|
+
_defineProperty(target, key, source[key]);
|
|
2513
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
|
|
2514
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
2515
|
+
});
|
|
2341
2516
|
}
|
|
2342
2517
|
|
|
2343
2518
|
return target;
|
|
@@ -2346,31 +2521,11 @@
|
|
|
2346
2521
|
function _typeof(obj) {
|
|
2347
2522
|
"@babel/helpers - typeof";
|
|
2348
2523
|
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
}
|
|
2354
|
-
_typeof = function (obj) {
|
|
2355
|
-
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2356
|
-
};
|
|
2357
|
-
}
|
|
2358
|
-
|
|
2359
|
-
return _typeof(obj);
|
|
2360
|
-
}
|
|
2361
|
-
|
|
2362
|
-
function _asyncIterator(iterable) {
|
|
2363
|
-
var method;
|
|
2364
|
-
|
|
2365
|
-
if (typeof Symbol !== "undefined") {
|
|
2366
|
-
if (Symbol.asyncIterator) method = iterable[Symbol.asyncIterator];
|
|
2367
|
-
if (method == null && Symbol.iterator) method = iterable[Symbol.iterator];
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2370
|
-
if (method == null) method = iterable["@@asyncIterator"];
|
|
2371
|
-
if (method == null) method = iterable["@@iterator"];
|
|
2372
|
-
if (method == null) throw new TypeError("Object is not async iterable");
|
|
2373
|
-
return method.call(iterable);
|
|
2524
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
2525
|
+
return typeof obj;
|
|
2526
|
+
} : function (obj) {
|
|
2527
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
2528
|
+
}, _typeof(obj);
|
|
2374
2529
|
}
|
|
2375
2530
|
|
|
2376
2531
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
@@ -2415,6 +2570,25 @@
|
|
|
2415
2570
|
}
|
|
2416
2571
|
}
|
|
2417
2572
|
|
|
2573
|
+
function _defineProperties(target, props) {
|
|
2574
|
+
for (var i = 0; i < props.length; i++) {
|
|
2575
|
+
var descriptor = props[i];
|
|
2576
|
+
descriptor.enumerable = descriptor.enumerable || false;
|
|
2577
|
+
descriptor.configurable = true;
|
|
2578
|
+
if ("value" in descriptor) descriptor.writable = true;
|
|
2579
|
+
Object.defineProperty(target, descriptor.key, descriptor);
|
|
2580
|
+
}
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
function _createClass(Constructor, protoProps, staticProps) {
|
|
2584
|
+
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
2585
|
+
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
2586
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
2587
|
+
writable: false
|
|
2588
|
+
});
|
|
2589
|
+
return Constructor;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2418
2592
|
function _defineProperty(obj, key, value) {
|
|
2419
2593
|
if (key in obj) {
|
|
2420
2594
|
Object.defineProperty(obj, key, {
|
|
@@ -2442,6 +2616,9 @@
|
|
|
2442
2616
|
configurable: true
|
|
2443
2617
|
}
|
|
2444
2618
|
});
|
|
2619
|
+
Object.defineProperty(subClass, "prototype", {
|
|
2620
|
+
writable: false
|
|
2621
|
+
});
|
|
2445
2622
|
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
2446
2623
|
}
|
|
2447
2624
|
|
|
@@ -2544,7 +2721,7 @@
|
|
|
2544
2721
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
2545
2722
|
}
|
|
2546
2723
|
|
|
2547
|
-
var
|
|
2724
|
+
var un$Join = functionUncurryThis([].join);
|
|
2548
2725
|
|
|
2549
2726
|
var ES3_STRINGS = indexedObject != Object;
|
|
2550
2727
|
var STRICT_METHOD$2 = arrayMethodIsStrict('join', ',');
|
|
@@ -2553,23 +2730,39 @@
|
|
|
2553
2730
|
// https://tc39.es/ecma262/#sec-array.prototype.join
|
|
2554
2731
|
_export({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD$2 }, {
|
|
2555
2732
|
join: function join(separator) {
|
|
2556
|
-
return
|
|
2733
|
+
return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator);
|
|
2557
2734
|
}
|
|
2558
2735
|
});
|
|
2559
2736
|
|
|
2560
|
-
|
|
2737
|
+
var FunctionPrototype = Function.prototype;
|
|
2738
|
+
var apply = FunctionPrototype.apply;
|
|
2739
|
+
var call = FunctionPrototype.call;
|
|
2740
|
+
|
|
2741
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
2742
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (functionBindNative ? call.bind(apply) : function () {
|
|
2743
|
+
return call.apply(apply, arguments);
|
|
2744
|
+
});
|
|
2745
|
+
|
|
2746
|
+
var charAt$4 = functionUncurryThis(''.charAt);
|
|
2747
|
+
var charCodeAt$1 = functionUncurryThis(''.charCodeAt);
|
|
2748
|
+
var stringSlice$6 = functionUncurryThis(''.slice);
|
|
2749
|
+
|
|
2561
2750
|
var createMethod$3 = function (CONVERT_TO_STRING) {
|
|
2562
2751
|
return function ($this, pos) {
|
|
2563
2752
|
var S = toString_1(requireObjectCoercible($this));
|
|
2564
|
-
var position =
|
|
2753
|
+
var position = toIntegerOrInfinity(pos);
|
|
2565
2754
|
var size = S.length;
|
|
2566
2755
|
var first, second;
|
|
2567
2756
|
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
2568
|
-
first =
|
|
2757
|
+
first = charCodeAt$1(S, position);
|
|
2569
2758
|
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
2570
|
-
|| (second =
|
|
2571
|
-
? CONVERT_TO_STRING
|
|
2572
|
-
|
|
2759
|
+
|| (second = charCodeAt$1(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
2760
|
+
? CONVERT_TO_STRING
|
|
2761
|
+
? charAt$4(S, position)
|
|
2762
|
+
: first
|
|
2763
|
+
: CONVERT_TO_STRING
|
|
2764
|
+
? stringSlice$6(S, position, position + 2)
|
|
2765
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
2573
2766
|
};
|
|
2574
2767
|
};
|
|
2575
2768
|
|
|
@@ -2582,16 +2775,18 @@
|
|
|
2582
2775
|
charAt: createMethod$3(true)
|
|
2583
2776
|
};
|
|
2584
2777
|
|
|
2585
|
-
var charAt$
|
|
2778
|
+
var charAt$3 = stringMultibyte.charAt;
|
|
2586
2779
|
|
|
2587
2780
|
// `AdvanceStringIndex` abstract operation
|
|
2588
2781
|
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
2589
2782
|
var advanceStringIndex = function (S, index, unicode) {
|
|
2590
|
-
return index + (unicode ? charAt$
|
|
2783
|
+
return index + (unicode ? charAt$3(S, index).length : 1);
|
|
2591
2784
|
};
|
|
2592
2785
|
|
|
2593
2786
|
var floor$5 = Math.floor;
|
|
2594
|
-
var
|
|
2787
|
+
var charAt$2 = functionUncurryThis(''.charAt);
|
|
2788
|
+
var replace$3 = functionUncurryThis(''.replace);
|
|
2789
|
+
var stringSlice$5 = functionUncurryThis(''.slice);
|
|
2595
2790
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
2596
2791
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
2597
2792
|
|
|
@@ -2605,15 +2800,15 @@
|
|
|
2605
2800
|
namedCaptures = toObject(namedCaptures);
|
|
2606
2801
|
symbols = SUBSTITUTION_SYMBOLS;
|
|
2607
2802
|
}
|
|
2608
|
-
return replace
|
|
2803
|
+
return replace$3(replacement, symbols, function (match, ch) {
|
|
2609
2804
|
var capture;
|
|
2610
|
-
switch (
|
|
2805
|
+
switch (charAt$2(ch, 0)) {
|
|
2611
2806
|
case '$': return '$';
|
|
2612
2807
|
case '&': return matched;
|
|
2613
|
-
case '`': return str
|
|
2614
|
-
case "'": return str
|
|
2808
|
+
case '`': return stringSlice$5(str, 0, position);
|
|
2809
|
+
case "'": return stringSlice$5(str, tailPos);
|
|
2615
2810
|
case '<':
|
|
2616
|
-
capture = namedCaptures[ch
|
|
2811
|
+
capture = namedCaptures[stringSlice$5(ch, 1, -1)];
|
|
2617
2812
|
break;
|
|
2618
2813
|
default: // \d\d?
|
|
2619
2814
|
var n = +ch;
|
|
@@ -2621,7 +2816,7 @@
|
|
|
2621
2816
|
if (n > m) {
|
|
2622
2817
|
var f = floor$5(n / 10);
|
|
2623
2818
|
if (f === 0) return match;
|
|
2624
|
-
if (f <= m) return captures[f - 1] === undefined ?
|
|
2819
|
+
if (f <= m) return captures[f - 1] === undefined ? charAt$2(ch, 1) : captures[f - 1] + charAt$2(ch, 1);
|
|
2625
2820
|
return match;
|
|
2626
2821
|
}
|
|
2627
2822
|
capture = captures[n - 1];
|
|
@@ -2631,8 +2826,12 @@
|
|
|
2631
2826
|
};
|
|
2632
2827
|
|
|
2633
2828
|
var REPLACE = wellKnownSymbol('replace');
|
|
2634
|
-
var max$
|
|
2829
|
+
var max$2 = Math.max;
|
|
2635
2830
|
var min$4 = Math.min;
|
|
2831
|
+
var concat$1 = functionUncurryThis([].concat);
|
|
2832
|
+
var push$4 = functionUncurryThis([].push);
|
|
2833
|
+
var stringIndexOf$2 = functionUncurryThis(''.indexOf);
|
|
2834
|
+
var stringSlice$4 = functionUncurryThis(''.slice);
|
|
2636
2835
|
|
|
2637
2836
|
var maybeToString = function (it) {
|
|
2638
2837
|
return it === undefined ? it : String(it);
|
|
@@ -2675,8 +2874,8 @@
|
|
|
2675
2874
|
var O = requireObjectCoercible(this);
|
|
2676
2875
|
var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
|
|
2677
2876
|
return replacer
|
|
2678
|
-
? replacer
|
|
2679
|
-
: nativeReplace
|
|
2877
|
+
? functionCall(replacer, searchValue, O, replaceValue)
|
|
2878
|
+
: functionCall(nativeReplace, toString_1(O), searchValue, replaceValue);
|
|
2680
2879
|
},
|
|
2681
2880
|
// `RegExp.prototype[@@replace]` method
|
|
2682
2881
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
@@ -2685,9 +2884,9 @@
|
|
|
2685
2884
|
var S = toString_1(string);
|
|
2686
2885
|
|
|
2687
2886
|
if (
|
|
2688
|
-
typeof replaceValue
|
|
2689
|
-
replaceValue
|
|
2690
|
-
replaceValue
|
|
2887
|
+
typeof replaceValue == 'string' &&
|
|
2888
|
+
stringIndexOf$2(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
|
|
2889
|
+
stringIndexOf$2(replaceValue, '$<') === -1
|
|
2691
2890
|
) {
|
|
2692
2891
|
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
|
2693
2892
|
if (res.done) return res.value;
|
|
@@ -2706,7 +2905,7 @@
|
|
|
2706
2905
|
var result = regexpExecAbstract(rx, S);
|
|
2707
2906
|
if (result === null) break;
|
|
2708
2907
|
|
|
2709
|
-
|
|
2908
|
+
push$4(results, result);
|
|
2710
2909
|
if (!global) break;
|
|
2711
2910
|
|
|
2712
2911
|
var matchStr = toString_1(result[0]);
|
|
@@ -2719,41 +2918,45 @@
|
|
|
2719
2918
|
result = results[i];
|
|
2720
2919
|
|
|
2721
2920
|
var matched = toString_1(result[0]);
|
|
2722
|
-
var position = max$
|
|
2921
|
+
var position = max$2(min$4(toIntegerOrInfinity(result.index), S.length), 0);
|
|
2723
2922
|
var captures = [];
|
|
2724
2923
|
// NOTE: This is equivalent to
|
|
2725
2924
|
// captures = result.slice(1).map(maybeToString)
|
|
2726
2925
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
2727
2926
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
2728
2927
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
2729
|
-
for (var j = 1; j < result.length; j++)
|
|
2928
|
+
for (var j = 1; j < result.length; j++) push$4(captures, maybeToString(result[j]));
|
|
2730
2929
|
var namedCaptures = result.groups;
|
|
2731
2930
|
if (functionalReplace) {
|
|
2732
|
-
var replacerArgs = [matched]
|
|
2733
|
-
if (namedCaptures !== undefined)
|
|
2734
|
-
var replacement = toString_1(replaceValue
|
|
2931
|
+
var replacerArgs = concat$1([matched], captures, position, S);
|
|
2932
|
+
if (namedCaptures !== undefined) push$4(replacerArgs, namedCaptures);
|
|
2933
|
+
var replacement = toString_1(functionApply(replaceValue, undefined, replacerArgs));
|
|
2735
2934
|
} else {
|
|
2736
2935
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
2737
2936
|
}
|
|
2738
2937
|
if (position >= nextSourcePosition) {
|
|
2739
|
-
accumulatedResult += S
|
|
2938
|
+
accumulatedResult += stringSlice$4(S, nextSourcePosition, position) + replacement;
|
|
2740
2939
|
nextSourcePosition = position + matched.length;
|
|
2741
2940
|
}
|
|
2742
2941
|
}
|
|
2743
|
-
return accumulatedResult + S
|
|
2942
|
+
return accumulatedResult + stringSlice$4(S, nextSourcePosition);
|
|
2744
2943
|
}
|
|
2745
2944
|
];
|
|
2746
2945
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
2747
2946
|
|
|
2947
|
+
var String$3 = global_1.String;
|
|
2948
|
+
var TypeError$b = global_1.TypeError;
|
|
2949
|
+
|
|
2748
2950
|
var aPossiblePrototype = function (argument) {
|
|
2749
|
-
if (typeof argument
|
|
2750
|
-
throw TypeError("Can't set " + String(argument) + ' as a prototype');
|
|
2951
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
2952
|
+
throw TypeError$b("Can't set " + String$3(argument) + ' as a prototype');
|
|
2751
2953
|
};
|
|
2752
2954
|
|
|
2753
2955
|
/* eslint-disable no-proto -- safe */
|
|
2754
2956
|
|
|
2755
2957
|
|
|
2756
2958
|
|
|
2959
|
+
|
|
2757
2960
|
// `Object.setPrototypeOf` method
|
|
2758
2961
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
2759
2962
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
@@ -2764,14 +2967,14 @@
|
|
|
2764
2967
|
var setter;
|
|
2765
2968
|
try {
|
|
2766
2969
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
2767
|
-
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
|
2768
|
-
setter
|
|
2970
|
+
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
2971
|
+
setter(test, []);
|
|
2769
2972
|
CORRECT_SETTER = test instanceof Array;
|
|
2770
2973
|
} catch (error) { /* empty */ }
|
|
2771
2974
|
return function setPrototypeOf(O, proto) {
|
|
2772
2975
|
anObject(O);
|
|
2773
2976
|
aPossiblePrototype(proto);
|
|
2774
|
-
if (CORRECT_SETTER) setter
|
|
2977
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
2775
2978
|
else O.__proto__ = proto;
|
|
2776
2979
|
return O;
|
|
2777
2980
|
};
|
|
@@ -2792,10 +2995,15 @@
|
|
|
2792
2995
|
return $this;
|
|
2793
2996
|
};
|
|
2794
2997
|
|
|
2998
|
+
// `thisNumberValue` abstract operation
|
|
2999
|
+
// https://tc39.es/ecma262/#sec-thisnumbervalue
|
|
3000
|
+
var thisNumberValue = functionUncurryThis(1.0.valueOf);
|
|
3001
|
+
|
|
2795
3002
|
// a string of all valid unicode whitespaces
|
|
2796
3003
|
var whitespaces = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
|
|
2797
3004
|
'\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
2798
3005
|
|
|
3006
|
+
var replace$2 = functionUncurryThis(''.replace);
|
|
2799
3007
|
var whitespace = '[' + whitespaces + ']';
|
|
2800
3008
|
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
2801
3009
|
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
@@ -2804,8 +3012,8 @@
|
|
|
2804
3012
|
var createMethod$2 = function (TYPE) {
|
|
2805
3013
|
return function ($this) {
|
|
2806
3014
|
var string = toString_1(requireObjectCoercible($this));
|
|
2807
|
-
if (TYPE & 1) string =
|
|
2808
|
-
if (TYPE & 2) string =
|
|
3015
|
+
if (TYPE & 1) string = replace$2(string, ltrim, '');
|
|
3016
|
+
if (TYPE & 2) string = replace$2(string, rtrim, '');
|
|
2809
3017
|
return string;
|
|
2810
3018
|
};
|
|
2811
3019
|
};
|
|
@@ -2824,38 +3032,46 @@
|
|
|
2824
3032
|
|
|
2825
3033
|
var getOwnPropertyNames$3 = objectGetOwnPropertyNames.f;
|
|
2826
3034
|
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
2827
|
-
var defineProperty$
|
|
3035
|
+
var defineProperty$9 = objectDefineProperty.f;
|
|
3036
|
+
|
|
2828
3037
|
var trim = stringTrim.trim;
|
|
2829
3038
|
|
|
2830
3039
|
var NUMBER = 'Number';
|
|
2831
3040
|
var NativeNumber = global_1[NUMBER];
|
|
2832
3041
|
var NumberPrototype = NativeNumber.prototype;
|
|
3042
|
+
var TypeError$a = global_1.TypeError;
|
|
3043
|
+
var arraySlice$1 = functionUncurryThis(''.slice);
|
|
3044
|
+
var charCodeAt = functionUncurryThis(''.charCodeAt);
|
|
2833
3045
|
|
|
2834
|
-
//
|
|
2835
|
-
|
|
3046
|
+
// `ToNumeric` abstract operation
|
|
3047
|
+
// https://tc39.es/ecma262/#sec-tonumeric
|
|
3048
|
+
var toNumeric = function (value) {
|
|
3049
|
+
var primValue = toPrimitive(value, 'number');
|
|
3050
|
+
return typeof primValue == 'bigint' ? primValue : toNumber(primValue);
|
|
3051
|
+
};
|
|
2836
3052
|
|
|
2837
3053
|
// `ToNumber` abstract operation
|
|
2838
3054
|
// https://tc39.es/ecma262/#sec-tonumber
|
|
2839
3055
|
var toNumber = function (argument) {
|
|
2840
|
-
if (isSymbol$1(argument)) throw TypeError('Cannot convert a Symbol value to a number');
|
|
2841
3056
|
var it = toPrimitive(argument, 'number');
|
|
2842
3057
|
var first, third, radix, maxCode, digits, length, index, code;
|
|
3058
|
+
if (isSymbol$1(it)) throw TypeError$a('Cannot convert a Symbol value to a number');
|
|
2843
3059
|
if (typeof it == 'string' && it.length > 2) {
|
|
2844
3060
|
it = trim(it);
|
|
2845
|
-
first =
|
|
3061
|
+
first = charCodeAt(it, 0);
|
|
2846
3062
|
if (first === 43 || first === 45) {
|
|
2847
|
-
third =
|
|
3063
|
+
third = charCodeAt(it, 2);
|
|
2848
3064
|
if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix
|
|
2849
3065
|
} else if (first === 48) {
|
|
2850
|
-
switch (
|
|
3066
|
+
switch (charCodeAt(it, 1)) {
|
|
2851
3067
|
case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i
|
|
2852
3068
|
case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
|
|
2853
3069
|
default: return +it;
|
|
2854
3070
|
}
|
|
2855
|
-
digits = it
|
|
3071
|
+
digits = arraySlice$1(it, 2);
|
|
2856
3072
|
length = digits.length;
|
|
2857
3073
|
for (index = 0; index < length; index++) {
|
|
2858
|
-
code =
|
|
3074
|
+
code = charCodeAt(digits, index);
|
|
2859
3075
|
// parseInt parses a string to a first unavailable symbol
|
|
2860
3076
|
// but ToNumber should return NaN if a string contains unavailable symbols
|
|
2861
3077
|
if (code < 48 || code > maxCode) return NaN;
|
|
@@ -2868,24 +3084,22 @@
|
|
|
2868
3084
|
// https://tc39.es/ecma262/#sec-number-constructor
|
|
2869
3085
|
if (isForced_1(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) {
|
|
2870
3086
|
var NumberWrapper = function Number(value) {
|
|
2871
|
-
var
|
|
3087
|
+
var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value));
|
|
2872
3088
|
var dummy = this;
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
? inheritIfRequired(new NativeNumber(toNumber(it)), dummy, NumberWrapper) : toNumber(it);
|
|
3089
|
+
// check on 1..constructor(foo) case
|
|
3090
|
+
return objectIsPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); })
|
|
3091
|
+
? inheritIfRequired(Object(n), dummy, NumberWrapper) : n;
|
|
2877
3092
|
};
|
|
2878
3093
|
for (var keys$3 = descriptors ? getOwnPropertyNames$3(NativeNumber) : (
|
|
2879
3094
|
// ES3:
|
|
2880
3095
|
'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' +
|
|
2881
3096
|
// ES2015 (in case, if modules with ES2015 Number statics required before):
|
|
2882
|
-
'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,
|
|
2883
|
-
'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,' +
|
|
3097
|
+
'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' +
|
|
2884
3098
|
// ESNext
|
|
2885
3099
|
'fromString,range'
|
|
2886
3100
|
).split(','), j$1 = 0, key$1; keys$3.length > j$1; j$1++) {
|
|
2887
|
-
if (
|
|
2888
|
-
defineProperty$
|
|
3101
|
+
if (hasOwnProperty_1(NativeNumber, key$1 = keys$3[j$1]) && !hasOwnProperty_1(NumberWrapper, key$1)) {
|
|
3102
|
+
defineProperty$9(NumberWrapper, key$1, getOwnPropertyDescriptor$1(NativeNumber, key$1));
|
|
2889
3103
|
}
|
|
2890
3104
|
}
|
|
2891
3105
|
NumberWrapper.prototype = NumberPrototype;
|
|
@@ -2916,7 +3130,7 @@
|
|
|
2916
3130
|
}
|
|
2917
3131
|
};
|
|
2918
3132
|
|
|
2919
|
-
var defineProperty$
|
|
3133
|
+
var defineProperty$8 = objectDefineProperty.f;
|
|
2920
3134
|
var getOwnPropertyNames$2 = objectGetOwnPropertyNames.f;
|
|
2921
3135
|
|
|
2922
3136
|
|
|
@@ -2925,6 +3139,7 @@
|
|
|
2925
3139
|
|
|
2926
3140
|
|
|
2927
3141
|
|
|
3142
|
+
|
|
2928
3143
|
var enforceInternalState = internalState.enforce;
|
|
2929
3144
|
|
|
2930
3145
|
|
|
@@ -2934,6 +3149,13 @@
|
|
|
2934
3149
|
var MATCH$1 = wellKnownSymbol('match');
|
|
2935
3150
|
var NativeRegExp = global_1.RegExp;
|
|
2936
3151
|
var RegExpPrototype = NativeRegExp.prototype;
|
|
3152
|
+
var SyntaxError = global_1.SyntaxError;
|
|
3153
|
+
var getFlags = functionUncurryThis(regexpFlags);
|
|
3154
|
+
var exec$1 = functionUncurryThis(RegExpPrototype.exec);
|
|
3155
|
+
var charAt$1 = functionUncurryThis(''.charAt);
|
|
3156
|
+
var replace$1 = functionUncurryThis(''.replace);
|
|
3157
|
+
var stringIndexOf$1 = functionUncurryThis(''.indexOf);
|
|
3158
|
+
var stringSlice$3 = functionUncurryThis(''.slice);
|
|
2937
3159
|
// TODO: Use only propper RegExpIdentifierName
|
|
2938
3160
|
var IS_NCG = /^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/;
|
|
2939
3161
|
var re1 = /a/g;
|
|
@@ -2942,10 +3164,11 @@
|
|
|
2942
3164
|
// "new" should create a new object, old webkit bug
|
|
2943
3165
|
var CORRECT_NEW = new NativeRegExp(re1) !== re1;
|
|
2944
3166
|
|
|
3167
|
+
var MISSED_STICKY = regexpStickyHelpers.MISSED_STICKY;
|
|
2945
3168
|
var UNSUPPORTED_Y$1 = regexpStickyHelpers.UNSUPPORTED_Y;
|
|
2946
3169
|
|
|
2947
3170
|
var BASE_FORCED = descriptors &&
|
|
2948
|
-
(!CORRECT_NEW ||
|
|
3171
|
+
(!CORRECT_NEW || MISSED_STICKY || regexpUnsupportedDotAll || regexpUnsupportedNcg || fails(function () {
|
|
2949
3172
|
re2[MATCH$1] = false;
|
|
2950
3173
|
// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
|
2951
3174
|
return NativeRegExp(re1) != re1 || NativeRegExp(re2) == re2 || NativeRegExp(re1, 'i') != '/a/i';
|
|
@@ -2958,9 +3181,9 @@
|
|
|
2958
3181
|
var brackets = false;
|
|
2959
3182
|
var chr;
|
|
2960
3183
|
for (; index <= length; index++) {
|
|
2961
|
-
chr =
|
|
3184
|
+
chr = charAt$1(string, index);
|
|
2962
3185
|
if (chr === '\\') {
|
|
2963
|
-
result += chr +
|
|
3186
|
+
result += chr + charAt$1(string, ++index);
|
|
2964
3187
|
continue;
|
|
2965
3188
|
}
|
|
2966
3189
|
if (!brackets && chr === '.') {
|
|
@@ -2987,9 +3210,9 @@
|
|
|
2987
3210
|
var groupname = '';
|
|
2988
3211
|
var chr;
|
|
2989
3212
|
for (; index <= length; index++) {
|
|
2990
|
-
chr =
|
|
3213
|
+
chr = charAt$1(string, index);
|
|
2991
3214
|
if (chr === '\\') {
|
|
2992
|
-
chr = chr +
|
|
3215
|
+
chr = chr + charAt$1(string, ++index);
|
|
2993
3216
|
} else if (chr === ']') {
|
|
2994
3217
|
brackets = false;
|
|
2995
3218
|
} else if (!brackets) switch (true) {
|
|
@@ -2997,7 +3220,7 @@
|
|
|
2997
3220
|
brackets = true;
|
|
2998
3221
|
break;
|
|
2999
3222
|
case chr === '(':
|
|
3000
|
-
if (IS_NCG
|
|
3223
|
+
if (exec$1(IS_NCG, stringSlice$3(string, index + 1))) {
|
|
3001
3224
|
index += 2;
|
|
3002
3225
|
ncg = true;
|
|
3003
3226
|
}
|
|
@@ -3005,11 +3228,11 @@
|
|
|
3005
3228
|
groupid++;
|
|
3006
3229
|
continue;
|
|
3007
3230
|
case chr === '>' && ncg:
|
|
3008
|
-
if (groupname === '' ||
|
|
3231
|
+
if (groupname === '' || hasOwnProperty_1(names, groupname)) {
|
|
3009
3232
|
throw new SyntaxError('Invalid capture group name');
|
|
3010
3233
|
}
|
|
3011
3234
|
names[groupname] = true;
|
|
3012
|
-
named.
|
|
3235
|
+
named[named.length] = [groupname, groupid];
|
|
3013
3236
|
ncg = false;
|
|
3014
3237
|
groupname = '';
|
|
3015
3238
|
continue;
|
|
@@ -3023,7 +3246,7 @@
|
|
|
3023
3246
|
// https://tc39.es/ecma262/#sec-regexp-constructor
|
|
3024
3247
|
if (isForced_1('RegExp', BASE_FORCED)) {
|
|
3025
3248
|
var RegExpWrapper = function RegExp(pattern, flags) {
|
|
3026
|
-
var thisIsRegExp = this
|
|
3249
|
+
var thisIsRegExp = objectIsPrototypeOf(RegExpPrototype, this);
|
|
3027
3250
|
var patternIsRegExp = isRegexp(pattern);
|
|
3028
3251
|
var flagsAreUndefined = flags === undefined;
|
|
3029
3252
|
var groups = [];
|
|
@@ -3034,9 +3257,9 @@
|
|
|
3034
3257
|
return pattern;
|
|
3035
3258
|
}
|
|
3036
3259
|
|
|
3037
|
-
if (patternIsRegExp || pattern
|
|
3260
|
+
if (patternIsRegExp || objectIsPrototypeOf(RegExpPrototype, pattern)) {
|
|
3038
3261
|
pattern = pattern.source;
|
|
3039
|
-
if (flagsAreUndefined) flags = 'flags' in rawPattern ? rawPattern.flags :
|
|
3262
|
+
if (flagsAreUndefined) flags = 'flags' in rawPattern ? rawPattern.flags : getFlags(rawPattern);
|
|
3040
3263
|
}
|
|
3041
3264
|
|
|
3042
3265
|
pattern = pattern === undefined ? '' : toString_1(pattern);
|
|
@@ -3044,15 +3267,15 @@
|
|
|
3044
3267
|
rawPattern = pattern;
|
|
3045
3268
|
|
|
3046
3269
|
if (regexpUnsupportedDotAll && 'dotAll' in re1) {
|
|
3047
|
-
dotAll = !!flags && flags
|
|
3048
|
-
if (dotAll) flags =
|
|
3270
|
+
dotAll = !!flags && stringIndexOf$1(flags, 's') > -1;
|
|
3271
|
+
if (dotAll) flags = replace$1(flags, /s/g, '');
|
|
3049
3272
|
}
|
|
3050
3273
|
|
|
3051
3274
|
rawFlags = flags;
|
|
3052
3275
|
|
|
3053
|
-
if (
|
|
3054
|
-
sticky = !!flags && flags
|
|
3055
|
-
if (sticky) flags =
|
|
3276
|
+
if (MISSED_STICKY && 'sticky' in re1) {
|
|
3277
|
+
sticky = !!flags && stringIndexOf$1(flags, 'y') > -1;
|
|
3278
|
+
if (sticky && UNSUPPORTED_Y$1) flags = replace$1(flags, /y/g, '');
|
|
3056
3279
|
}
|
|
3057
3280
|
|
|
3058
3281
|
if (regexpUnsupportedNcg) {
|
|
@@ -3082,7 +3305,7 @@
|
|
|
3082
3305
|
};
|
|
3083
3306
|
|
|
3084
3307
|
var proxy = function (key) {
|
|
3085
|
-
key in RegExpWrapper || defineProperty$
|
|
3308
|
+
key in RegExpWrapper || defineProperty$8(RegExpWrapper, key, {
|
|
3086
3309
|
configurable: true,
|
|
3087
3310
|
get: function () { return NativeRegExp[key]; },
|
|
3088
3311
|
set: function (it) { NativeRegExp[key] = it; }
|
|
@@ -3101,11 +3324,24 @@
|
|
|
3101
3324
|
// https://tc39.es/ecma262/#sec-get-regexp-@@species
|
|
3102
3325
|
setSpecies('RegExp');
|
|
3103
3326
|
|
|
3327
|
+
var Array$6 = global_1.Array;
|
|
3328
|
+
var max$1 = Math.max;
|
|
3329
|
+
|
|
3330
|
+
var arraySliceSimple = function (O, start, end) {
|
|
3331
|
+
var length = lengthOfArrayLike(O);
|
|
3332
|
+
var k = toAbsoluteIndex(start, length);
|
|
3333
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
3334
|
+
var result = Array$6(max$1(fin - k, 0));
|
|
3335
|
+
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
3336
|
+
result.length = n;
|
|
3337
|
+
return result;
|
|
3338
|
+
};
|
|
3339
|
+
|
|
3104
3340
|
/* eslint-disable es/no-object-getownpropertynames -- safe */
|
|
3105
3341
|
|
|
3342
|
+
|
|
3106
3343
|
var $getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;
|
|
3107
3344
|
|
|
3108
|
-
var toString$3 = {}.toString;
|
|
3109
3345
|
|
|
3110
3346
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
3111
3347
|
? Object.getOwnPropertyNames(window) : [];
|
|
@@ -3114,13 +3350,13 @@
|
|
|
3114
3350
|
try {
|
|
3115
3351
|
return $getOwnPropertyNames$1(it);
|
|
3116
3352
|
} catch (error) {
|
|
3117
|
-
return windowNames
|
|
3353
|
+
return arraySliceSimple(windowNames);
|
|
3118
3354
|
}
|
|
3119
3355
|
};
|
|
3120
3356
|
|
|
3121
3357
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
3122
3358
|
var f$2 = function getOwnPropertyNames(it) {
|
|
3123
|
-
return windowNames &&
|
|
3359
|
+
return windowNames && classofRaw(it) == 'Window'
|
|
3124
3360
|
? getWindowNames(it)
|
|
3125
3361
|
: $getOwnPropertyNames$1(toIndexedObject(it));
|
|
3126
3362
|
};
|
|
@@ -3132,11 +3368,11 @@
|
|
|
3132
3368
|
var getOwnPropertyNames$1 = objectGetOwnPropertyNamesExternal.f;
|
|
3133
3369
|
|
|
3134
3370
|
// eslint-disable-next-line es/no-object-getownpropertynames -- required for testing
|
|
3135
|
-
var FAILS_ON_PRIMITIVES$
|
|
3371
|
+
var FAILS_ON_PRIMITIVES$3 = fails(function () { return !Object.getOwnPropertyNames(1); });
|
|
3136
3372
|
|
|
3137
3373
|
// `Object.getOwnPropertyNames` method
|
|
3138
3374
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
3139
|
-
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$
|
|
3375
|
+
_export({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES$3 }, {
|
|
3140
3376
|
getOwnPropertyNames: getOwnPropertyNames$1
|
|
3141
3377
|
});
|
|
3142
3378
|
|
|
@@ -3162,7 +3398,7 @@
|
|
|
3162
3398
|
function match(regexp) {
|
|
3163
3399
|
var O = requireObjectCoercible(this);
|
|
3164
3400
|
var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH);
|
|
3165
|
-
return matcher ? matcher
|
|
3401
|
+
return matcher ? functionCall(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString_1(O));
|
|
3166
3402
|
},
|
|
3167
3403
|
// `RegExp.prototype[@@match]` method
|
|
3168
3404
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@match
|
|
@@ -3194,21 +3430,23 @@
|
|
|
3194
3430
|
var nativeGetOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
3195
3431
|
|
|
3196
3432
|
|
|
3197
|
-
var FAILS_ON_PRIMITIVES$
|
|
3198
|
-
var FORCED$
|
|
3433
|
+
var FAILS_ON_PRIMITIVES$2 = fails(function () { nativeGetOwnPropertyDescriptor$1(1); });
|
|
3434
|
+
var FORCED$6 = !descriptors || FAILS_ON_PRIMITIVES$2;
|
|
3199
3435
|
|
|
3200
3436
|
// `Object.getOwnPropertyDescriptor` method
|
|
3201
3437
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
3202
|
-
_export({ target: 'Object', stat: true, forced: FORCED$
|
|
3438
|
+
_export({ target: 'Object', stat: true, forced: FORCED$6, sham: !descriptors }, {
|
|
3203
3439
|
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
|
3204
3440
|
return nativeGetOwnPropertyDescriptor$1(toIndexedObject(it), key);
|
|
3205
3441
|
}
|
|
3206
3442
|
});
|
|
3207
3443
|
|
|
3444
|
+
var TypeError$9 = global_1.TypeError;
|
|
3445
|
+
|
|
3208
3446
|
// `Assert: IsConstructor(argument) is true`
|
|
3209
3447
|
var aConstructor = function (argument) {
|
|
3210
3448
|
if (isConstructor(argument)) return argument;
|
|
3211
|
-
throw TypeError(tryToString(argument) + ' is not a constructor');
|
|
3449
|
+
throw TypeError$9(tryToString(argument) + ' is not a constructor');
|
|
3212
3450
|
};
|
|
3213
3451
|
|
|
3214
3452
|
var SPECIES$2 = wellKnownSymbol('species');
|
|
@@ -3222,9 +3460,12 @@
|
|
|
3222
3460
|
};
|
|
3223
3461
|
|
|
3224
3462
|
var UNSUPPORTED_Y = regexpStickyHelpers.UNSUPPORTED_Y;
|
|
3225
|
-
var arrayPush = [].push;
|
|
3226
|
-
var min$3 = Math.min;
|
|
3227
3463
|
var MAX_UINT32 = 0xFFFFFFFF;
|
|
3464
|
+
var min$3 = Math.min;
|
|
3465
|
+
var $push = [].push;
|
|
3466
|
+
var exec = functionUncurryThis(/./.exec);
|
|
3467
|
+
var push$3 = functionUncurryThis($push);
|
|
3468
|
+
var stringSlice$2 = functionUncurryThis(''.slice);
|
|
3228
3469
|
|
|
3229
3470
|
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
3230
3471
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
@@ -3258,7 +3499,7 @@
|
|
|
3258
3499
|
if (separator === undefined) return [string];
|
|
3259
3500
|
// If `separator` is not a regex, use native split
|
|
3260
3501
|
if (!isRegexp(separator)) {
|
|
3261
|
-
return nativeSplit
|
|
3502
|
+
return functionCall(nativeSplit, string, separator, lim);
|
|
3262
3503
|
}
|
|
3263
3504
|
var output = [];
|
|
3264
3505
|
var flags = (separator.ignoreCase ? 'i' : '') +
|
|
@@ -3269,11 +3510,11 @@
|
|
|
3269
3510
|
// Make `global` and avoid `lastIndex` issues by working with a copy
|
|
3270
3511
|
var separatorCopy = new RegExp(separator.source, flags + 'g');
|
|
3271
3512
|
var match, lastIndex, lastLength;
|
|
3272
|
-
while (match = regexpExec
|
|
3513
|
+
while (match = functionCall(regexpExec, separatorCopy, string)) {
|
|
3273
3514
|
lastIndex = separatorCopy.lastIndex;
|
|
3274
3515
|
if (lastIndex > lastLastIndex) {
|
|
3275
|
-
|
|
3276
|
-
if (match.length > 1 && match.index < string.length)
|
|
3516
|
+
push$3(output, stringSlice$2(string, lastLastIndex, match.index));
|
|
3517
|
+
if (match.length > 1 && match.index < string.length) functionApply($push, output, arraySliceSimple(match, 1));
|
|
3277
3518
|
lastLength = match[0].length;
|
|
3278
3519
|
lastLastIndex = lastIndex;
|
|
3279
3520
|
if (output.length >= lim) break;
|
|
@@ -3281,14 +3522,14 @@
|
|
|
3281
3522
|
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
|
|
3282
3523
|
}
|
|
3283
3524
|
if (lastLastIndex === string.length) {
|
|
3284
|
-
if (lastLength || !separatorCopy
|
|
3285
|
-
} else
|
|
3286
|
-
return output.length > lim ? output
|
|
3525
|
+
if (lastLength || !exec(separatorCopy, '')) push$3(output, '');
|
|
3526
|
+
} else push$3(output, stringSlice$2(string, lastLastIndex));
|
|
3527
|
+
return output.length > lim ? arraySliceSimple(output, 0, lim) : output;
|
|
3287
3528
|
};
|
|
3288
3529
|
// Chakra, V8
|
|
3289
3530
|
} else if ('0'.split(undefined, 0).length) {
|
|
3290
3531
|
internalSplit = function (separator, limit) {
|
|
3291
|
-
return separator === undefined && limit === 0 ? [] : nativeSplit
|
|
3532
|
+
return separator === undefined && limit === 0 ? [] : functionCall(nativeSplit, this, separator, limit);
|
|
3292
3533
|
};
|
|
3293
3534
|
} else internalSplit = nativeSplit;
|
|
3294
3535
|
|
|
@@ -3299,8 +3540,8 @@
|
|
|
3299
3540
|
var O = requireObjectCoercible(this);
|
|
3300
3541
|
var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT);
|
|
3301
3542
|
return splitter
|
|
3302
|
-
? splitter
|
|
3303
|
-
: internalSplit
|
|
3543
|
+
? functionCall(splitter, separator, O, limit)
|
|
3544
|
+
: functionCall(internalSplit, toString_1(O), separator, limit);
|
|
3304
3545
|
},
|
|
3305
3546
|
// `RegExp.prototype[@@split]` method
|
|
3306
3547
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
@@ -3333,7 +3574,7 @@
|
|
|
3333
3574
|
var A = [];
|
|
3334
3575
|
while (q < S.length) {
|
|
3335
3576
|
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
|
3336
|
-
var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? S
|
|
3577
|
+
var z = regexpExecAbstract(splitter, UNSUPPORTED_Y ? stringSlice$2(S, q) : S);
|
|
3337
3578
|
var e;
|
|
3338
3579
|
if (
|
|
3339
3580
|
z === null ||
|
|
@@ -3341,16 +3582,16 @@
|
|
|
3341
3582
|
) {
|
|
3342
3583
|
q = advanceStringIndex(S, q, unicodeMatching);
|
|
3343
3584
|
} else {
|
|
3344
|
-
|
|
3585
|
+
push$3(A, stringSlice$2(S, p, q));
|
|
3345
3586
|
if (A.length === lim) return A;
|
|
3346
3587
|
for (var i = 1; i <= z.length - 1; i++) {
|
|
3347
|
-
|
|
3588
|
+
push$3(A, z[i]);
|
|
3348
3589
|
if (A.length === lim) return A;
|
|
3349
3590
|
}
|
|
3350
3591
|
q = p = e;
|
|
3351
3592
|
}
|
|
3352
3593
|
}
|
|
3353
|
-
|
|
3594
|
+
push$3(A, stringSlice$2(S, p));
|
|
3354
3595
|
return A;
|
|
3355
3596
|
}
|
|
3356
3597
|
];
|
|
@@ -3414,15 +3655,16 @@
|
|
|
3414
3655
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
3415
3656
|
};
|
|
3416
3657
|
|
|
3417
|
-
var defineProperty$
|
|
3658
|
+
var defineProperty$7 = objectDefineProperty.f;
|
|
3418
3659
|
|
|
3419
3660
|
|
|
3420
3661
|
|
|
3421
3662
|
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
3422
3663
|
|
|
3423
|
-
var setToStringTag = function (
|
|
3424
|
-
if (
|
|
3425
|
-
|
|
3664
|
+
var setToStringTag = function (target, TAG, STATIC) {
|
|
3665
|
+
if (target && !STATIC) target = target.prototype;
|
|
3666
|
+
if (target && !hasOwnProperty_1(target, TO_STRING_TAG$2)) {
|
|
3667
|
+
defineProperty$7(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
|
|
3426
3668
|
}
|
|
3427
3669
|
};
|
|
3428
3670
|
|
|
@@ -3434,15 +3676,15 @@
|
|
|
3434
3676
|
|
|
3435
3677
|
var returnThis$1 = function () { return this; };
|
|
3436
3678
|
|
|
3437
|
-
var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
|
|
3679
|
+
var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
3438
3680
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
3439
|
-
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(
|
|
3681
|
+
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
3440
3682
|
setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
|
|
3441
3683
|
iterators[TO_STRING_TAG] = returnThis$1;
|
|
3442
3684
|
return IteratorConstructor;
|
|
3443
3685
|
};
|
|
3444
3686
|
|
|
3445
|
-
var PROPER_FUNCTION_NAME$
|
|
3687
|
+
var PROPER_FUNCTION_NAME$2 = functionName.PROPER;
|
|
3446
3688
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
3447
3689
|
var IteratorPrototype = iteratorsCore.IteratorPrototype;
|
|
3448
3690
|
var BUGGY_SAFARI_ITERATORS = iteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
@@ -3493,12 +3735,12 @@
|
|
|
3493
3735
|
}
|
|
3494
3736
|
|
|
3495
3737
|
// fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
3496
|
-
if (PROPER_FUNCTION_NAME$
|
|
3738
|
+
if (PROPER_FUNCTION_NAME$2 && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
3497
3739
|
if (CONFIGURABLE_FUNCTION_NAME$1) {
|
|
3498
3740
|
createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
|
|
3499
3741
|
} else {
|
|
3500
3742
|
INCORRECT_VALUES_NAME = true;
|
|
3501
|
-
defaultIterator = function values() { return nativeIterator
|
|
3743
|
+
defaultIterator = function values() { return functionCall(nativeIterator, this); };
|
|
3502
3744
|
}
|
|
3503
3745
|
}
|
|
3504
3746
|
|
|
@@ -3525,6 +3767,11 @@
|
|
|
3525
3767
|
return methods;
|
|
3526
3768
|
};
|
|
3527
3769
|
|
|
3770
|
+
var defineProperty$6 = objectDefineProperty.f;
|
|
3771
|
+
|
|
3772
|
+
|
|
3773
|
+
|
|
3774
|
+
|
|
3528
3775
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
3529
3776
|
var setInternalState$5 = internalState.set;
|
|
3530
3777
|
var getInternalState$4 = internalState.getterFor(ARRAY_ITERATOR);
|
|
@@ -3565,13 +3812,18 @@
|
|
|
3565
3812
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
3566
3813
|
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
3567
3814
|
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
3568
|
-
iterators.Arguments = iterators.Array;
|
|
3815
|
+
var values = iterators.Arguments = iterators.Array;
|
|
3569
3816
|
|
|
3570
3817
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
3571
3818
|
addToUnscopables('keys');
|
|
3572
3819
|
addToUnscopables('values');
|
|
3573
3820
|
addToUnscopables('entries');
|
|
3574
3821
|
|
|
3822
|
+
// V8 ~ Chrome 45- bug
|
|
3823
|
+
if (descriptors && values.name !== 'values') try {
|
|
3824
|
+
defineProperty$6(values, 'name', { value: 'values' });
|
|
3825
|
+
} catch (error) { /* empty */ }
|
|
3826
|
+
|
|
3575
3827
|
var ITERATOR$4 = wellKnownSymbol('iterator');
|
|
3576
3828
|
var SAFE_CLOSING = false;
|
|
3577
3829
|
|
|
@@ -3610,7 +3862,7 @@
|
|
|
3610
3862
|
};
|
|
3611
3863
|
|
|
3612
3864
|
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
3613
|
-
var arrayBufferNative = typeof ArrayBuffer
|
|
3865
|
+
var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
3614
3866
|
|
|
3615
3867
|
var defineProperty$5 = objectDefineProperty.f;
|
|
3616
3868
|
|
|
@@ -3618,21 +3870,22 @@
|
|
|
3618
3870
|
|
|
3619
3871
|
|
|
3620
3872
|
|
|
3621
|
-
|
|
3622
|
-
var
|
|
3623
|
-
var
|
|
3624
|
-
var
|
|
3625
|
-
var
|
|
3626
|
-
var
|
|
3873
|
+
|
|
3874
|
+
var Int8Array$4 = global_1.Int8Array;
|
|
3875
|
+
var Int8ArrayPrototype$1 = Int8Array$4 && Int8Array$4.prototype;
|
|
3876
|
+
var Uint8ClampedArray$1 = global_1.Uint8ClampedArray;
|
|
3877
|
+
var Uint8ClampedArrayPrototype = Uint8ClampedArray$1 && Uint8ClampedArray$1.prototype;
|
|
3878
|
+
var TypedArray = Int8Array$4 && objectGetPrototypeOf(Int8Array$4);
|
|
3879
|
+
var TypedArrayPrototype$1 = Int8ArrayPrototype$1 && objectGetPrototypeOf(Int8ArrayPrototype$1);
|
|
3627
3880
|
var ObjectPrototype$2 = Object.prototype;
|
|
3628
|
-
var
|
|
3881
|
+
var TypeError$8 = global_1.TypeError;
|
|
3629
3882
|
|
|
3630
3883
|
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
3631
3884
|
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
3632
3885
|
var TYPED_ARRAY_CONSTRUCTOR$1 = uid('TYPED_ARRAY_CONSTRUCTOR');
|
|
3633
3886
|
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
3634
3887
|
var NATIVE_ARRAY_BUFFER_VIEWS$1 = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
3635
|
-
var
|
|
3888
|
+
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
3636
3889
|
var NAME, Constructor, Prototype;
|
|
3637
3890
|
|
|
3638
3891
|
var TypedArrayConstructorsList = {
|
|
@@ -3656,38 +3909,43 @@
|
|
|
3656
3909
|
if (!isObject$1(it)) return false;
|
|
3657
3910
|
var klass = classof(it);
|
|
3658
3911
|
return klass === 'DataView'
|
|
3659
|
-
||
|
|
3660
|
-
||
|
|
3912
|
+
|| hasOwnProperty_1(TypedArrayConstructorsList, klass)
|
|
3913
|
+
|| hasOwnProperty_1(BigIntArrayConstructorsList, klass);
|
|
3661
3914
|
};
|
|
3662
3915
|
|
|
3663
3916
|
var isTypedArray = function (it) {
|
|
3664
3917
|
if (!isObject$1(it)) return false;
|
|
3665
3918
|
var klass = classof(it);
|
|
3666
|
-
return
|
|
3667
|
-
||
|
|
3919
|
+
return hasOwnProperty_1(TypedArrayConstructorsList, klass)
|
|
3920
|
+
|| hasOwnProperty_1(BigIntArrayConstructorsList, klass);
|
|
3668
3921
|
};
|
|
3669
3922
|
|
|
3670
3923
|
var aTypedArray$m = function (it) {
|
|
3671
3924
|
if (isTypedArray(it)) return it;
|
|
3672
|
-
throw TypeError('Target is not a typed array');
|
|
3925
|
+
throw TypeError$8('Target is not a typed array');
|
|
3673
3926
|
};
|
|
3674
3927
|
|
|
3675
3928
|
var aTypedArrayConstructor$2 = function (C) {
|
|
3676
|
-
if (isCallable(C) && (!objectSetPrototypeOf ||
|
|
3677
|
-
throw TypeError(tryToString(C) + ' is not a typed array constructor');
|
|
3929
|
+
if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
|
|
3930
|
+
throw TypeError$8(tryToString(C) + ' is not a typed array constructor');
|
|
3678
3931
|
};
|
|
3679
3932
|
|
|
3680
|
-
var exportTypedArrayMethod$n = function (KEY, property, forced) {
|
|
3933
|
+
var exportTypedArrayMethod$n = function (KEY, property, forced, options) {
|
|
3681
3934
|
if (!descriptors) return;
|
|
3682
3935
|
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
|
|
3683
3936
|
var TypedArrayConstructor = global_1[ARRAY];
|
|
3684
|
-
if (TypedArrayConstructor &&
|
|
3937
|
+
if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor.prototype, KEY)) try {
|
|
3685
3938
|
delete TypedArrayConstructor.prototype[KEY];
|
|
3686
|
-
} catch (error) {
|
|
3939
|
+
} catch (error) {
|
|
3940
|
+
// old WebKit bug - some methods are non-configurable
|
|
3941
|
+
try {
|
|
3942
|
+
TypedArrayConstructor.prototype[KEY] = property;
|
|
3943
|
+
} catch (error2) { /* empty */ }
|
|
3944
|
+
}
|
|
3687
3945
|
}
|
|
3688
|
-
if (!TypedArrayPrototype[KEY] || forced) {
|
|
3689
|
-
redefine(TypedArrayPrototype, KEY, forced ? property
|
|
3690
|
-
: NATIVE_ARRAY_BUFFER_VIEWS$1 && Int8ArrayPrototype[KEY] || property);
|
|
3946
|
+
if (!TypedArrayPrototype$1[KEY] || forced) {
|
|
3947
|
+
redefine(TypedArrayPrototype$1, KEY, forced ? property
|
|
3948
|
+
: NATIVE_ARRAY_BUFFER_VIEWS$1 && Int8ArrayPrototype$1[KEY] || property, options);
|
|
3691
3949
|
}
|
|
3692
3950
|
};
|
|
3693
3951
|
|
|
@@ -3697,7 +3955,7 @@
|
|
|
3697
3955
|
if (objectSetPrototypeOf) {
|
|
3698
3956
|
if (forced) for (ARRAY in TypedArrayConstructorsList) {
|
|
3699
3957
|
TypedArrayConstructor = global_1[ARRAY];
|
|
3700
|
-
if (TypedArrayConstructor &&
|
|
3958
|
+
if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor, KEY)) try {
|
|
3701
3959
|
delete TypedArrayConstructor[KEY];
|
|
3702
3960
|
} catch (error) { /* empty */ }
|
|
3703
3961
|
}
|
|
@@ -3733,28 +3991,28 @@
|
|
|
3733
3991
|
if (!NATIVE_ARRAY_BUFFER_VIEWS$1 || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
3734
3992
|
// eslint-disable-next-line no-shadow -- safe
|
|
3735
3993
|
TypedArray = function TypedArray() {
|
|
3736
|
-
throw TypeError('Incorrect invocation');
|
|
3994
|
+
throw TypeError$8('Incorrect invocation');
|
|
3737
3995
|
};
|
|
3738
3996
|
if (NATIVE_ARRAY_BUFFER_VIEWS$1) for (NAME in TypedArrayConstructorsList) {
|
|
3739
3997
|
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
|
|
3740
3998
|
}
|
|
3741
3999
|
}
|
|
3742
4000
|
|
|
3743
|
-
if (!NATIVE_ARRAY_BUFFER_VIEWS$1 || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$2) {
|
|
3744
|
-
TypedArrayPrototype = TypedArray.prototype;
|
|
4001
|
+
if (!NATIVE_ARRAY_BUFFER_VIEWS$1 || !TypedArrayPrototype$1 || TypedArrayPrototype$1 === ObjectPrototype$2) {
|
|
4002
|
+
TypedArrayPrototype$1 = TypedArray.prototype;
|
|
3745
4003
|
if (NATIVE_ARRAY_BUFFER_VIEWS$1) for (NAME in TypedArrayConstructorsList) {
|
|
3746
|
-
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype);
|
|
4004
|
+
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype$1);
|
|
3747
4005
|
}
|
|
3748
4006
|
}
|
|
3749
4007
|
|
|
3750
4008
|
// WebKit bug - one more object in Uint8ClampedArray prototype chain
|
|
3751
|
-
if (NATIVE_ARRAY_BUFFER_VIEWS$1 && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
|
|
3752
|
-
objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
|
|
4009
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS$1 && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype$1) {
|
|
4010
|
+
objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype$1);
|
|
3753
4011
|
}
|
|
3754
4012
|
|
|
3755
|
-
if (descriptors && !
|
|
3756
|
-
|
|
3757
|
-
defineProperty$5(TypedArrayPrototype, TO_STRING_TAG$1, { get: function () {
|
|
4013
|
+
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype$1, TO_STRING_TAG$1)) {
|
|
4014
|
+
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
4015
|
+
defineProperty$5(TypedArrayPrototype$1, TO_STRING_TAG$1, { get: function () {
|
|
3758
4016
|
return isObject$1(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
3759
4017
|
} });
|
|
3760
4018
|
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
@@ -3765,7 +4023,7 @@
|
|
|
3765
4023
|
var arrayBufferViewCore = {
|
|
3766
4024
|
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS$1,
|
|
3767
4025
|
TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR$1,
|
|
3768
|
-
TYPED_ARRAY_TAG:
|
|
4026
|
+
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
|
|
3769
4027
|
aTypedArray: aTypedArray$m,
|
|
3770
4028
|
aTypedArrayConstructor: aTypedArrayConstructor$2,
|
|
3771
4029
|
exportTypedArrayMethod: exportTypedArrayMethod$n,
|
|
@@ -3773,7 +4031,7 @@
|
|
|
3773
4031
|
isView: isView,
|
|
3774
4032
|
isTypedArray: isTypedArray,
|
|
3775
4033
|
TypedArray: TypedArray,
|
|
3776
|
-
TypedArrayPrototype: TypedArrayPrototype
|
|
4034
|
+
TypedArrayPrototype: TypedArrayPrototype$1
|
|
3777
4035
|
};
|
|
3778
4036
|
|
|
3779
4037
|
/* eslint-disable no-new -- required for testing */
|
|
@@ -3783,20 +4041,20 @@
|
|
|
3783
4041
|
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
|
|
3784
4042
|
|
|
3785
4043
|
var ArrayBuffer$2 = global_1.ArrayBuffer;
|
|
3786
|
-
var Int8Array$
|
|
4044
|
+
var Int8Array$3 = global_1.Int8Array;
|
|
3787
4045
|
|
|
3788
4046
|
var typedArrayConstructorsRequireWrappers = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
|
|
3789
|
-
Int8Array$
|
|
4047
|
+
Int8Array$3(1);
|
|
3790
4048
|
}) || !fails(function () {
|
|
3791
|
-
new Int8Array$
|
|
4049
|
+
new Int8Array$3(-1);
|
|
3792
4050
|
}) || !checkCorrectnessOfIteration(function (iterable) {
|
|
3793
|
-
new Int8Array$
|
|
3794
|
-
new Int8Array$
|
|
3795
|
-
new Int8Array$
|
|
3796
|
-
new Int8Array$
|
|
4051
|
+
new Int8Array$3();
|
|
4052
|
+
new Int8Array$3(null);
|
|
4053
|
+
new Int8Array$3(1.5);
|
|
4054
|
+
new Int8Array$3(iterable);
|
|
3797
4055
|
}, true) || fails(function () {
|
|
3798
4056
|
// Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
|
|
3799
|
-
return new Int8Array$
|
|
4057
|
+
return new Int8Array$3(new ArrayBuffer$2(2), 1, undefined).length !== 1;
|
|
3800
4058
|
});
|
|
3801
4059
|
|
|
3802
4060
|
var redefineAll = function (target, src, options) {
|
|
@@ -3804,22 +4062,29 @@
|
|
|
3804
4062
|
return target;
|
|
3805
4063
|
};
|
|
3806
4064
|
|
|
3807
|
-
var
|
|
3808
|
-
|
|
3809
|
-
|
|
4065
|
+
var TypeError$7 = global_1.TypeError;
|
|
4066
|
+
|
|
4067
|
+
var anInstance = function (it, Prototype) {
|
|
4068
|
+
if (objectIsPrototypeOf(Prototype, it)) return it;
|
|
4069
|
+
throw TypeError$7('Incorrect invocation');
|
|
3810
4070
|
};
|
|
3811
4071
|
|
|
4072
|
+
var RangeError$7 = global_1.RangeError;
|
|
4073
|
+
|
|
3812
4074
|
// `ToIndex` abstract operation
|
|
3813
4075
|
// https://tc39.es/ecma262/#sec-toindex
|
|
3814
4076
|
var toIndex = function (it) {
|
|
3815
4077
|
if (it === undefined) return 0;
|
|
3816
|
-
var number =
|
|
4078
|
+
var number = toIntegerOrInfinity(it);
|
|
3817
4079
|
var length = toLength(number);
|
|
3818
|
-
if (number !== length) throw RangeError('Wrong length or index');
|
|
4080
|
+
if (number !== length) throw RangeError$7('Wrong length or index');
|
|
3819
4081
|
return length;
|
|
3820
4082
|
};
|
|
3821
4083
|
|
|
3822
4084
|
// IEEE754 conversions based on https://github.com/feross/ieee754
|
|
4085
|
+
|
|
4086
|
+
|
|
4087
|
+
var Array$5 = global_1.Array;
|
|
3823
4088
|
var abs = Math.abs;
|
|
3824
4089
|
var pow$1 = Math.pow;
|
|
3825
4090
|
var floor$4 = Math.floor;
|
|
@@ -3827,7 +4092,7 @@
|
|
|
3827
4092
|
var LN2 = Math.LN2;
|
|
3828
4093
|
|
|
3829
4094
|
var pack = function (number, mantissaLength, bytes) {
|
|
3830
|
-
var buffer =
|
|
4095
|
+
var buffer = Array$5(bytes);
|
|
3831
4096
|
var exponentLength = bytes * 8 - mantissaLength - 1;
|
|
3832
4097
|
var eMax = (1 << exponentLength) - 1;
|
|
3833
4098
|
var eBias = eMax >> 1;
|
|
@@ -3843,7 +4108,8 @@
|
|
|
3843
4108
|
exponent = eMax;
|
|
3844
4109
|
} else {
|
|
3845
4110
|
exponent = floor$4(log$2(number) / LN2);
|
|
3846
|
-
|
|
4111
|
+
c = pow$1(2, -exponent);
|
|
4112
|
+
if (number * c < 1) {
|
|
3847
4113
|
exponent--;
|
|
3848
4114
|
c *= 2;
|
|
3849
4115
|
}
|
|
@@ -3867,10 +4133,18 @@
|
|
|
3867
4133
|
exponent = 0;
|
|
3868
4134
|
}
|
|
3869
4135
|
}
|
|
3870
|
-
|
|
4136
|
+
while (mantissaLength >= 8) {
|
|
4137
|
+
buffer[index++] = mantissa & 255;
|
|
4138
|
+
mantissa /= 256;
|
|
4139
|
+
mantissaLength -= 8;
|
|
4140
|
+
}
|
|
3871
4141
|
exponent = exponent << mantissaLength | mantissa;
|
|
3872
4142
|
exponentLength += mantissaLength;
|
|
3873
|
-
|
|
4143
|
+
while (exponentLength > 0) {
|
|
4144
|
+
buffer[index++] = exponent & 255;
|
|
4145
|
+
exponent /= 256;
|
|
4146
|
+
exponentLength -= 8;
|
|
4147
|
+
}
|
|
3874
4148
|
buffer[--index] |= sign * 128;
|
|
3875
4149
|
return buffer;
|
|
3876
4150
|
};
|
|
@@ -3886,11 +4160,17 @@
|
|
|
3886
4160
|
var exponent = sign & 127;
|
|
3887
4161
|
var mantissa;
|
|
3888
4162
|
sign >>= 7;
|
|
3889
|
-
|
|
4163
|
+
while (nBits > 0) {
|
|
4164
|
+
exponent = exponent * 256 + buffer[index--];
|
|
4165
|
+
nBits -= 8;
|
|
4166
|
+
}
|
|
3890
4167
|
mantissa = exponent & (1 << -nBits) - 1;
|
|
3891
4168
|
exponent >>= -nBits;
|
|
3892
4169
|
nBits += mantissaLength;
|
|
3893
|
-
|
|
4170
|
+
while (nBits > 0) {
|
|
4171
|
+
mantissa = mantissa * 256 + buffer[index--];
|
|
4172
|
+
nBits -= 8;
|
|
4173
|
+
}
|
|
3894
4174
|
if (exponent === 0) {
|
|
3895
4175
|
exponent = 1 - eBias;
|
|
3896
4176
|
} else if (exponent === eMax) {
|
|
@@ -3910,7 +4190,7 @@
|
|
|
3910
4190
|
// https://tc39.es/ecma262/#sec-array.prototype.fill
|
|
3911
4191
|
var arrayFill = function fill(value /* , start = 0, end = @length */) {
|
|
3912
4192
|
var O = toObject(this);
|
|
3913
|
-
var length =
|
|
4193
|
+
var length = lengthOfArrayLike(O);
|
|
3914
4194
|
var argumentsLength = arguments.length;
|
|
3915
4195
|
var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
|
|
3916
4196
|
var end = argumentsLength > 2 ? arguments[2] : undefined;
|
|
@@ -3925,7 +4205,8 @@
|
|
|
3925
4205
|
|
|
3926
4206
|
|
|
3927
4207
|
|
|
3928
|
-
|
|
4208
|
+
|
|
4209
|
+
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
3929
4210
|
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
3930
4211
|
var getInternalState$3 = internalState.get;
|
|
3931
4212
|
var setInternalState$4 = internalState.set;
|
|
@@ -3936,10 +4217,14 @@
|
|
|
3936
4217
|
var WRONG_INDEX = 'Wrong index';
|
|
3937
4218
|
var NativeArrayBuffer$1 = global_1[ARRAY_BUFFER$1];
|
|
3938
4219
|
var $ArrayBuffer = NativeArrayBuffer$1;
|
|
4220
|
+
var ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE$1];
|
|
3939
4221
|
var $DataView = global_1[DATA_VIEW];
|
|
3940
|
-
var
|
|
4222
|
+
var DataViewPrototype = $DataView && $DataView[PROTOTYPE$1];
|
|
3941
4223
|
var ObjectPrototype$1 = Object.prototype;
|
|
3942
|
-
var
|
|
4224
|
+
var Array$4 = global_1.Array;
|
|
4225
|
+
var RangeError$6 = global_1.RangeError;
|
|
4226
|
+
var fill = functionUncurryThis(arrayFill);
|
|
4227
|
+
var reverse = functionUncurryThis([].reverse);
|
|
3943
4228
|
|
|
3944
4229
|
var packIEEE754 = ieee754.pack;
|
|
3945
4230
|
var unpackIEEE754 = ieee754.unpack;
|
|
@@ -3975,17 +4260,17 @@
|
|
|
3975
4260
|
var get = function (view, count, index, isLittleEndian) {
|
|
3976
4261
|
var intIndex = toIndex(index);
|
|
3977
4262
|
var store = getInternalState$3(view);
|
|
3978
|
-
if (intIndex + count > store.byteLength) throw RangeError$
|
|
4263
|
+
if (intIndex + count > store.byteLength) throw RangeError$6(WRONG_INDEX);
|
|
3979
4264
|
var bytes = getInternalState$3(store.buffer).bytes;
|
|
3980
4265
|
var start = intIndex + store.byteOffset;
|
|
3981
|
-
var pack = bytes
|
|
3982
|
-
return isLittleEndian ? pack :
|
|
4266
|
+
var pack = arraySliceSimple(bytes, start, start + count);
|
|
4267
|
+
return isLittleEndian ? pack : reverse(pack);
|
|
3983
4268
|
};
|
|
3984
4269
|
|
|
3985
4270
|
var set$1 = function (view, count, index, conversion, value, isLittleEndian) {
|
|
3986
4271
|
var intIndex = toIndex(index);
|
|
3987
4272
|
var store = getInternalState$3(view);
|
|
3988
|
-
if (intIndex + count > store.byteLength) throw RangeError$
|
|
4273
|
+
if (intIndex + count > store.byteLength) throw RangeError$6(WRONG_INDEX);
|
|
3989
4274
|
var bytes = getInternalState$3(store.buffer).bytes;
|
|
3990
4275
|
var start = intIndex + store.byteOffset;
|
|
3991
4276
|
var pack = conversion(+value);
|
|
@@ -3994,23 +4279,25 @@
|
|
|
3994
4279
|
|
|
3995
4280
|
if (!arrayBufferNative) {
|
|
3996
4281
|
$ArrayBuffer = function ArrayBuffer(length) {
|
|
3997
|
-
anInstance(this,
|
|
4282
|
+
anInstance(this, ArrayBufferPrototype);
|
|
3998
4283
|
var byteLength = toIndex(length);
|
|
3999
4284
|
setInternalState$4(this, {
|
|
4000
|
-
bytes:
|
|
4285
|
+
bytes: fill(Array$4(byteLength), 0),
|
|
4001
4286
|
byteLength: byteLength
|
|
4002
4287
|
});
|
|
4003
4288
|
if (!descriptors) this.byteLength = byteLength;
|
|
4004
4289
|
};
|
|
4005
4290
|
|
|
4291
|
+
ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE$1];
|
|
4292
|
+
|
|
4006
4293
|
$DataView = function DataView(buffer, byteOffset, byteLength) {
|
|
4007
|
-
anInstance(this,
|
|
4008
|
-
anInstance(buffer,
|
|
4294
|
+
anInstance(this, DataViewPrototype);
|
|
4295
|
+
anInstance(buffer, ArrayBufferPrototype);
|
|
4009
4296
|
var bufferLength = getInternalState$3(buffer).byteLength;
|
|
4010
|
-
var offset =
|
|
4011
|
-
if (offset < 0 || offset > bufferLength) throw RangeError$
|
|
4297
|
+
var offset = toIntegerOrInfinity(byteOffset);
|
|
4298
|
+
if (offset < 0 || offset > bufferLength) throw RangeError$6('Wrong offset');
|
|
4012
4299
|
byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
|
|
4013
|
-
if (offset + byteLength > bufferLength) throw RangeError$
|
|
4300
|
+
if (offset + byteLength > bufferLength) throw RangeError$6(WRONG_LENGTH);
|
|
4014
4301
|
setInternalState$4(this, {
|
|
4015
4302
|
buffer: buffer,
|
|
4016
4303
|
byteLength: byteLength,
|
|
@@ -4023,6 +4310,8 @@
|
|
|
4023
4310
|
}
|
|
4024
4311
|
};
|
|
4025
4312
|
|
|
4313
|
+
DataViewPrototype = $DataView[PROTOTYPE$1];
|
|
4314
|
+
|
|
4026
4315
|
if (descriptors) {
|
|
4027
4316
|
addGetter($ArrayBuffer, 'byteLength');
|
|
4028
4317
|
addGetter($DataView, 'buffer');
|
|
@@ -4030,7 +4319,7 @@
|
|
|
4030
4319
|
addGetter($DataView, 'byteOffset');
|
|
4031
4320
|
}
|
|
4032
4321
|
|
|
4033
|
-
redefineAll(
|
|
4322
|
+
redefineAll(DataViewPrototype, {
|
|
4034
4323
|
getInt8: function getInt8(byteOffset) {
|
|
4035
4324
|
return get(this, 1, byteOffset)[0] << 24 >> 24;
|
|
4036
4325
|
},
|
|
@@ -4083,7 +4372,7 @@
|
|
|
4083
4372
|
}
|
|
4084
4373
|
});
|
|
4085
4374
|
} else {
|
|
4086
|
-
var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME$
|
|
4375
|
+
var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME$1 && NativeArrayBuffer$1.name !== ARRAY_BUFFER$1;
|
|
4087
4376
|
/* eslint-disable no-new -- required for testing */
|
|
4088
4377
|
if (!fails(function () {
|
|
4089
4378
|
NativeArrayBuffer$1(1);
|
|
@@ -4097,36 +4386,39 @@
|
|
|
4097
4386
|
})) {
|
|
4098
4387
|
/* eslint-enable no-new -- required for testing */
|
|
4099
4388
|
$ArrayBuffer = function ArrayBuffer(length) {
|
|
4100
|
-
anInstance(this,
|
|
4389
|
+
anInstance(this, ArrayBufferPrototype);
|
|
4101
4390
|
return new NativeArrayBuffer$1(toIndex(length));
|
|
4102
4391
|
};
|
|
4103
|
-
|
|
4392
|
+
|
|
4393
|
+
$ArrayBuffer[PROTOTYPE$1] = ArrayBufferPrototype;
|
|
4394
|
+
|
|
4104
4395
|
for (var keys$1 = getOwnPropertyNames(NativeArrayBuffer$1), j = 0, key; keys$1.length > j;) {
|
|
4105
4396
|
if (!((key = keys$1[j++]) in $ArrayBuffer)) {
|
|
4106
4397
|
createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer$1[key]);
|
|
4107
4398
|
}
|
|
4108
4399
|
}
|
|
4400
|
+
|
|
4109
4401
|
ArrayBufferPrototype.constructor = $ArrayBuffer;
|
|
4110
4402
|
} else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) {
|
|
4111
4403
|
createNonEnumerableProperty(NativeArrayBuffer$1, 'name', ARRAY_BUFFER$1);
|
|
4112
4404
|
}
|
|
4113
4405
|
|
|
4114
4406
|
// WebKit bug - the same parent prototype for typed arrays and data view
|
|
4115
|
-
if (objectSetPrototypeOf && objectGetPrototypeOf(
|
|
4116
|
-
objectSetPrototypeOf(
|
|
4407
|
+
if (objectSetPrototypeOf && objectGetPrototypeOf(DataViewPrototype) !== ObjectPrototype$1) {
|
|
4408
|
+
objectSetPrototypeOf(DataViewPrototype, ObjectPrototype$1);
|
|
4117
4409
|
}
|
|
4118
4410
|
|
|
4119
4411
|
// iOS Safari 7.x bug
|
|
4120
4412
|
var testView = new $DataView(new $ArrayBuffer(2));
|
|
4121
|
-
var $setInt8 =
|
|
4413
|
+
var $setInt8 = functionUncurryThis(DataViewPrototype.setInt8);
|
|
4122
4414
|
testView.setInt8(0, 2147483648);
|
|
4123
4415
|
testView.setInt8(1, 2147483649);
|
|
4124
|
-
if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll(
|
|
4416
|
+
if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll(DataViewPrototype, {
|
|
4125
4417
|
setInt8: function setInt8(byteOffset, value) {
|
|
4126
|
-
$setInt8
|
|
4418
|
+
$setInt8(this, byteOffset, value << 24 >> 24);
|
|
4127
4419
|
},
|
|
4128
4420
|
setUint8: function setUint8(byteOffset, value) {
|
|
4129
|
-
$setInt8
|
|
4421
|
+
$setInt8(this, byteOffset, value << 24 >> 24);
|
|
4130
4422
|
}
|
|
4131
4423
|
}, { unsafe: true });
|
|
4132
4424
|
}
|
|
@@ -4141,21 +4433,26 @@
|
|
|
4141
4433
|
|
|
4142
4434
|
var floor$3 = Math.floor;
|
|
4143
4435
|
|
|
4144
|
-
// `
|
|
4145
|
-
// https://tc39.es/ecma262/#sec-
|
|
4146
|
-
|
|
4436
|
+
// `IsIntegralNumber` abstract operation
|
|
4437
|
+
// https://tc39.es/ecma262/#sec-isintegralnumber
|
|
4438
|
+
// eslint-disable-next-line es/no-number-isinteger -- safe
|
|
4439
|
+
var isIntegralNumber = Number.isInteger || function isInteger(it) {
|
|
4147
4440
|
return !isObject$1(it) && isFinite(it) && floor$3(it) === it;
|
|
4148
4441
|
};
|
|
4149
4442
|
|
|
4443
|
+
var RangeError$5 = global_1.RangeError;
|
|
4444
|
+
|
|
4150
4445
|
var toPositiveInteger = function (it) {
|
|
4151
|
-
var result =
|
|
4152
|
-
if (result < 0) throw RangeError("The argument can't be less than 0");
|
|
4446
|
+
var result = toIntegerOrInfinity(it);
|
|
4447
|
+
if (result < 0) throw RangeError$5("The argument can't be less than 0");
|
|
4153
4448
|
return result;
|
|
4154
4449
|
};
|
|
4155
4450
|
|
|
4451
|
+
var RangeError$4 = global_1.RangeError;
|
|
4452
|
+
|
|
4156
4453
|
var toOffset = function (it, BYTES) {
|
|
4157
4454
|
var offset = toPositiveInteger(it);
|
|
4158
|
-
if (offset % BYTES) throw RangeError('Wrong offset');
|
|
4455
|
+
if (offset % BYTES) throw RangeError$4('Wrong offset');
|
|
4159
4456
|
return offset;
|
|
4160
4457
|
};
|
|
4161
4458
|
|
|
@@ -4167,10 +4464,12 @@
|
|
|
4167
4464
|
|| iterators[classof(it)];
|
|
4168
4465
|
};
|
|
4169
4466
|
|
|
4467
|
+
var TypeError$6 = global_1.TypeError;
|
|
4468
|
+
|
|
4170
4469
|
var getIterator = function (argument, usingIterator) {
|
|
4171
4470
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
4172
|
-
if (aCallable(iteratorMethod)) return anObject(iteratorMethod
|
|
4173
|
-
throw TypeError(
|
|
4471
|
+
if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
|
|
4472
|
+
throw TypeError$6(tryToString(argument) + ' is not iterable');
|
|
4174
4473
|
};
|
|
4175
4474
|
|
|
4176
4475
|
var ITERATOR$2 = wellKnownSymbol('iterator');
|
|
@@ -4195,14 +4494,14 @@
|
|
|
4195
4494
|
iterator = getIterator(O, iteratorMethod);
|
|
4196
4495
|
next = iterator.next;
|
|
4197
4496
|
O = [];
|
|
4198
|
-
while (!(step = next
|
|
4497
|
+
while (!(step = functionCall(next, iterator)).done) {
|
|
4199
4498
|
O.push(step.value);
|
|
4200
4499
|
}
|
|
4201
4500
|
}
|
|
4202
4501
|
if (mapping && argumentsLength > 2) {
|
|
4203
|
-
mapfn = functionBindContext(mapfn, arguments[2]
|
|
4502
|
+
mapfn = functionBindContext(mapfn, arguments[2]);
|
|
4204
4503
|
}
|
|
4205
|
-
length =
|
|
4504
|
+
length = lengthOfArrayLike(O);
|
|
4206
4505
|
result = new (aTypedArrayConstructor$1(C))(length);
|
|
4207
4506
|
for (i = 0; length > i; i++) {
|
|
4208
4507
|
result[i] = mapping ? mapfn(O[i], i) : O[i];
|
|
@@ -4229,6 +4528,8 @@
|
|
|
4229
4528
|
|
|
4230
4529
|
|
|
4231
4530
|
|
|
4531
|
+
|
|
4532
|
+
|
|
4232
4533
|
|
|
4233
4534
|
|
|
4234
4535
|
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
@@ -4247,6 +4548,7 @@
|
|
|
4247
4548
|
var round = Math.round;
|
|
4248
4549
|
var RangeError = global_1.RangeError;
|
|
4249
4550
|
var ArrayBuffer = arrayBuffer.ArrayBuffer;
|
|
4551
|
+
var ArrayBufferPrototype = ArrayBuffer.prototype;
|
|
4250
4552
|
var DataView = arrayBuffer.DataView;
|
|
4251
4553
|
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
|
|
4252
4554
|
var TYPED_ARRAY_CONSTRUCTOR = arrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR;
|
|
@@ -4259,9 +4561,10 @@
|
|
|
4259
4561
|
var WRONG_LENGTH = 'Wrong length';
|
|
4260
4562
|
|
|
4261
4563
|
var fromList = function (C, list) {
|
|
4564
|
+
aTypedArrayConstructor(C);
|
|
4262
4565
|
var index = 0;
|
|
4263
4566
|
var length = list.length;
|
|
4264
|
-
var result = new
|
|
4567
|
+
var result = new C(length);
|
|
4265
4568
|
while (length > index) result[index] = list[index++];
|
|
4266
4569
|
return result;
|
|
4267
4570
|
};
|
|
@@ -4274,14 +4577,14 @@
|
|
|
4274
4577
|
|
|
4275
4578
|
var isArrayBuffer = function (it) {
|
|
4276
4579
|
var klass;
|
|
4277
|
-
return it
|
|
4580
|
+
return objectIsPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
|
|
4278
4581
|
};
|
|
4279
4582
|
|
|
4280
4583
|
var isTypedArrayIndex = function (target, key) {
|
|
4281
4584
|
return isTypedArray(target)
|
|
4282
4585
|
&& !isSymbol$1(key)
|
|
4283
4586
|
&& key in target
|
|
4284
|
-
&&
|
|
4587
|
+
&& isIntegralNumber(+key)
|
|
4285
4588
|
&& key >= 0;
|
|
4286
4589
|
};
|
|
4287
4590
|
|
|
@@ -4296,13 +4599,13 @@
|
|
|
4296
4599
|
key = toPropertyKey(key);
|
|
4297
4600
|
if (isTypedArrayIndex(target, key)
|
|
4298
4601
|
&& isObject$1(descriptor)
|
|
4299
|
-
&&
|
|
4300
|
-
&& !
|
|
4301
|
-
&& !
|
|
4602
|
+
&& hasOwnProperty_1(descriptor, 'value')
|
|
4603
|
+
&& !hasOwnProperty_1(descriptor, 'get')
|
|
4604
|
+
&& !hasOwnProperty_1(descriptor, 'set')
|
|
4302
4605
|
// TODO: add validation descriptor w/o calling accessors
|
|
4303
4606
|
&& !descriptor.configurable
|
|
4304
|
-
&& (!
|
|
4305
|
-
&& (!
|
|
4607
|
+
&& (!hasOwnProperty_1(descriptor, 'writable') || descriptor.writable)
|
|
4608
|
+
&& (!hasOwnProperty_1(descriptor, 'enumerable') || descriptor.enumerable)
|
|
4306
4609
|
) {
|
|
4307
4610
|
target[key] = descriptor.value;
|
|
4308
4611
|
return target;
|
|
@@ -4359,7 +4662,7 @@
|
|
|
4359
4662
|
|
|
4360
4663
|
if (!NATIVE_ARRAY_BUFFER_VIEWS) {
|
|
4361
4664
|
TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
|
|
4362
|
-
anInstance(that,
|
|
4665
|
+
anInstance(that, TypedArrayConstructorPrototype);
|
|
4363
4666
|
var index = 0;
|
|
4364
4667
|
var byteOffset = 0;
|
|
4365
4668
|
var buffer, byteLength, length;
|
|
@@ -4383,7 +4686,7 @@
|
|
|
4383
4686
|
} else if (isTypedArray(data)) {
|
|
4384
4687
|
return fromList(TypedArrayConstructor, data);
|
|
4385
4688
|
} else {
|
|
4386
|
-
return typedArrayFrom
|
|
4689
|
+
return functionCall(typedArrayFrom, TypedArrayConstructor, data);
|
|
4387
4690
|
}
|
|
4388
4691
|
setInternalState(that, {
|
|
4389
4692
|
buffer: buffer,
|
|
@@ -4399,7 +4702,7 @@
|
|
|
4399
4702
|
TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = objectCreate(TypedArrayPrototype);
|
|
4400
4703
|
} else if (typedArrayConstructorsRequireWrappers) {
|
|
4401
4704
|
TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
|
|
4402
|
-
anInstance(dummy,
|
|
4705
|
+
anInstance(dummy, TypedArrayConstructorPrototype);
|
|
4403
4706
|
return inheritIfRequired(function () {
|
|
4404
4707
|
if (!isObject$1(data)) return new NativeTypedArrayConstructor(toIndex(data));
|
|
4405
4708
|
if (isArrayBuffer(data)) return $length !== undefined
|
|
@@ -4408,7 +4711,7 @@
|
|
|
4408
4711
|
? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
|
|
4409
4712
|
: new NativeTypedArrayConstructor(data);
|
|
4410
4713
|
if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
|
|
4411
|
-
return typedArrayFrom
|
|
4714
|
+
return functionCall(typedArrayFrom, TypedArrayConstructor, data);
|
|
4412
4715
|
}(), dummy, TypedArrayConstructor);
|
|
4413
4716
|
});
|
|
4414
4717
|
|
|
@@ -4465,7 +4768,7 @@
|
|
|
4465
4768
|
// eslint-disable-next-line es/no-array-prototype-copywithin -- safe
|
|
4466
4769
|
var arrayCopyWithin = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
|
|
4467
4770
|
var O = toObject(this);
|
|
4468
|
-
var len =
|
|
4771
|
+
var len = lengthOfArrayLike(O);
|
|
4469
4772
|
var to = toAbsoluteIndex(target, len);
|
|
4470
4773
|
var from = toAbsoluteIndex(start, len);
|
|
4471
4774
|
var end = arguments.length > 2 ? arguments[2] : undefined;
|
|
@@ -4484,13 +4787,14 @@
|
|
|
4484
4787
|
} return O;
|
|
4485
4788
|
};
|
|
4486
4789
|
|
|
4790
|
+
var u$ArrayCopyWithin = functionUncurryThis(arrayCopyWithin);
|
|
4487
4791
|
var aTypedArray$l = arrayBufferViewCore.aTypedArray;
|
|
4488
4792
|
var exportTypedArrayMethod$m = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4489
4793
|
|
|
4490
4794
|
// `%TypedArray%.prototype.copyWithin` method
|
|
4491
4795
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
|
|
4492
4796
|
exportTypedArrayMethod$m('copyWithin', function copyWithin(target, start /* , end */) {
|
|
4493
|
-
return
|
|
4797
|
+
return u$ArrayCopyWithin(aTypedArray$l(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
|
|
4494
4798
|
});
|
|
4495
4799
|
|
|
4496
4800
|
var $every = arrayIteration.every;
|
|
@@ -4509,14 +4813,20 @@
|
|
|
4509
4813
|
|
|
4510
4814
|
// `%TypedArray%.prototype.fill` method
|
|
4511
4815
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
|
|
4512
|
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
4513
4816
|
exportTypedArrayMethod$k('fill', function fill(value /* , start, end */) {
|
|
4514
|
-
|
|
4817
|
+
var length = arguments.length;
|
|
4818
|
+
return functionCall(
|
|
4819
|
+
arrayFill,
|
|
4820
|
+
aTypedArray$j(this),
|
|
4821
|
+
value,
|
|
4822
|
+
length > 1 ? arguments[1] : undefined,
|
|
4823
|
+
length > 2 ? arguments[2] : undefined
|
|
4824
|
+
);
|
|
4515
4825
|
});
|
|
4516
4826
|
|
|
4517
4827
|
var arrayFromConstructorAndList = function (Constructor, list) {
|
|
4518
4828
|
var index = 0;
|
|
4519
|
-
var length = list
|
|
4829
|
+
var length = lengthOfArrayLike(list);
|
|
4520
4830
|
var result = new Constructor(length);
|
|
4521
4831
|
while (length > index) result[index] = list[index++];
|
|
4522
4832
|
return result;
|
|
@@ -4603,52 +4913,53 @@
|
|
|
4603
4913
|
return $indexOf(aTypedArray$d(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
|
|
4604
4914
|
});
|
|
4605
4915
|
|
|
4606
|
-
var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
|
|
4607
|
-
|
|
4608
|
-
|
|
4609
|
-
|
|
4610
|
-
|
|
4611
4916
|
var ITERATOR$1 = wellKnownSymbol('iterator');
|
|
4612
4917
|
var Uint8Array$2 = global_1.Uint8Array;
|
|
4613
|
-
var arrayValues = es_array_iterator.values;
|
|
4614
|
-
var arrayKeys = es_array_iterator.keys;
|
|
4615
|
-
var arrayEntries = es_array_iterator.entries;
|
|
4918
|
+
var arrayValues = functionUncurryThis(es_array_iterator.values);
|
|
4919
|
+
var arrayKeys = functionUncurryThis(es_array_iterator.keys);
|
|
4920
|
+
var arrayEntries = functionUncurryThis(es_array_iterator.entries);
|
|
4616
4921
|
var aTypedArray$c = arrayBufferViewCore.aTypedArray;
|
|
4617
4922
|
var exportTypedArrayMethod$d = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4618
|
-
var
|
|
4923
|
+
var TypedArrayPrototype = Uint8Array$2 && Uint8Array$2.prototype;
|
|
4619
4924
|
|
|
4620
|
-
var
|
|
4925
|
+
var GENERIC = !fails(function () {
|
|
4926
|
+
TypedArrayPrototype[ITERATOR$1].call([1]);
|
|
4927
|
+
});
|
|
4928
|
+
|
|
4929
|
+
var ITERATOR_IS_VALUES = !!TypedArrayPrototype
|
|
4930
|
+
&& TypedArrayPrototype.values
|
|
4931
|
+
&& TypedArrayPrototype[ITERATOR$1] === TypedArrayPrototype.values
|
|
4932
|
+
&& TypedArrayPrototype.values.name === 'values';
|
|
4621
4933
|
|
|
4622
4934
|
var typedArrayValues = function values() {
|
|
4623
|
-
return arrayValues
|
|
4935
|
+
return arrayValues(aTypedArray$c(this));
|
|
4624
4936
|
};
|
|
4625
4937
|
|
|
4626
4938
|
// `%TypedArray%.prototype.entries` method
|
|
4627
4939
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
|
|
4628
4940
|
exportTypedArrayMethod$d('entries', function entries() {
|
|
4629
|
-
return arrayEntries
|
|
4630
|
-
});
|
|
4941
|
+
return arrayEntries(aTypedArray$c(this));
|
|
4942
|
+
}, GENERIC);
|
|
4631
4943
|
// `%TypedArray%.prototype.keys` method
|
|
4632
4944
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
|
|
4633
4945
|
exportTypedArrayMethod$d('keys', function keys() {
|
|
4634
|
-
return arrayKeys
|
|
4635
|
-
});
|
|
4946
|
+
return arrayKeys(aTypedArray$c(this));
|
|
4947
|
+
}, GENERIC);
|
|
4636
4948
|
// `%TypedArray%.prototype.values` method
|
|
4637
4949
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
|
|
4638
|
-
exportTypedArrayMethod$d('values', typedArrayValues,
|
|
4950
|
+
exportTypedArrayMethod$d('values', typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });
|
|
4639
4951
|
// `%TypedArray%.prototype[@@iterator]` method
|
|
4640
4952
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
|
|
4641
|
-
exportTypedArrayMethod$d(ITERATOR$1, typedArrayValues,
|
|
4953
|
+
exportTypedArrayMethod$d(ITERATOR$1, typedArrayValues, GENERIC || !ITERATOR_IS_VALUES, { name: 'values' });
|
|
4642
4954
|
|
|
4643
4955
|
var aTypedArray$b = arrayBufferViewCore.aTypedArray;
|
|
4644
4956
|
var exportTypedArrayMethod$c = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4645
|
-
var $join = [].join;
|
|
4957
|
+
var $join = functionUncurryThis([].join);
|
|
4646
4958
|
|
|
4647
4959
|
// `%TypedArray%.prototype.join` method
|
|
4648
4960
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
|
|
4649
|
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
4650
4961
|
exportTypedArrayMethod$c('join', function join(separator) {
|
|
4651
|
-
return $join
|
|
4962
|
+
return $join(aTypedArray$b(this), separator);
|
|
4652
4963
|
});
|
|
4653
4964
|
|
|
4654
4965
|
/* eslint-disable es/no-array-prototype-lastindexof -- safe */
|
|
@@ -4657,21 +4968,22 @@
|
|
|
4657
4968
|
|
|
4658
4969
|
|
|
4659
4970
|
|
|
4971
|
+
|
|
4660
4972
|
var min$1 = Math.min;
|
|
4661
4973
|
var $lastIndexOf = [].lastIndexOf;
|
|
4662
4974
|
var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
|
|
4663
4975
|
var STRICT_METHOD$1 = arrayMethodIsStrict('lastIndexOf');
|
|
4664
|
-
var FORCED$
|
|
4976
|
+
var FORCED$5 = NEGATIVE_ZERO || !STRICT_METHOD$1;
|
|
4665
4977
|
|
|
4666
4978
|
// `Array.prototype.lastIndexOf` method implementation
|
|
4667
4979
|
// https://tc39.es/ecma262/#sec-array.prototype.lastindexof
|
|
4668
|
-
var arrayLastIndexOf = FORCED$
|
|
4980
|
+
var arrayLastIndexOf = FORCED$5 ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
|
|
4669
4981
|
// convert -0 to +0
|
|
4670
|
-
if (NEGATIVE_ZERO) return $lastIndexOf
|
|
4982
|
+
if (NEGATIVE_ZERO) return functionApply($lastIndexOf, this, arguments) || 0;
|
|
4671
4983
|
var O = toIndexedObject(this);
|
|
4672
|
-
var length =
|
|
4984
|
+
var length = lengthOfArrayLike(O);
|
|
4673
4985
|
var index = length - 1;
|
|
4674
|
-
if (arguments.length > 1) index = min$1(index,
|
|
4986
|
+
if (arguments.length > 1) index = min$1(index, toIntegerOrInfinity(arguments[1]));
|
|
4675
4987
|
if (index < 0) index = length + index;
|
|
4676
4988
|
for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
|
|
4677
4989
|
return -1;
|
|
@@ -4682,9 +4994,9 @@
|
|
|
4682
4994
|
|
|
4683
4995
|
// `%TypedArray%.prototype.lastIndexOf` method
|
|
4684
4996
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
|
|
4685
|
-
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
4686
4997
|
exportTypedArrayMethod$b('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
|
|
4687
|
-
|
|
4998
|
+
var length = arguments.length;
|
|
4999
|
+
return functionApply(arrayLastIndexOf, aTypedArray$a(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]);
|
|
4688
5000
|
});
|
|
4689
5001
|
|
|
4690
5002
|
var $map = arrayIteration.map;
|
|
@@ -4701,13 +5013,15 @@
|
|
|
4701
5013
|
});
|
|
4702
5014
|
});
|
|
4703
5015
|
|
|
5016
|
+
var TypeError$5 = global_1.TypeError;
|
|
5017
|
+
|
|
4704
5018
|
// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
4705
5019
|
var createMethod$1 = function (IS_RIGHT) {
|
|
4706
5020
|
return function (that, callbackfn, argumentsLength, memo) {
|
|
4707
5021
|
aCallable(callbackfn);
|
|
4708
5022
|
var O = toObject(that);
|
|
4709
5023
|
var self = indexedObject(O);
|
|
4710
|
-
var length =
|
|
5024
|
+
var length = lengthOfArrayLike(O);
|
|
4711
5025
|
var index = IS_RIGHT ? length - 1 : 0;
|
|
4712
5026
|
var i = IS_RIGHT ? -1 : 1;
|
|
4713
5027
|
if (argumentsLength < 2) while (true) {
|
|
@@ -4718,7 +5032,7 @@
|
|
|
4718
5032
|
}
|
|
4719
5033
|
index += i;
|
|
4720
5034
|
if (IS_RIGHT ? index < 0 : length <= index) {
|
|
4721
|
-
throw TypeError('Reduce of empty array with no initial value');
|
|
5035
|
+
throw TypeError$5('Reduce of empty array with no initial value');
|
|
4722
5036
|
}
|
|
4723
5037
|
}
|
|
4724
5038
|
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
|
|
@@ -4745,7 +5059,8 @@
|
|
|
4745
5059
|
// `%TypedArray%.prototype.reduce` method
|
|
4746
5060
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
|
|
4747
5061
|
exportTypedArrayMethod$9('reduce', function reduce(callbackfn /* , initialValue */) {
|
|
4748
|
-
|
|
5062
|
+
var length = arguments.length;
|
|
5063
|
+
return $reduce(aTypedArray$8(this), callbackfn, length, length > 1 ? arguments[1] : undefined);
|
|
4749
5064
|
});
|
|
4750
5065
|
|
|
4751
5066
|
var $reduceRight = arrayReduce.right;
|
|
@@ -4756,7 +5071,8 @@
|
|
|
4756
5071
|
// `%TypedArray%.prototype.reduceRicht` method
|
|
4757
5072
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
|
|
4758
5073
|
exportTypedArrayMethod$8('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
|
|
4759
|
-
|
|
5074
|
+
var length = arguments.length;
|
|
5075
|
+
return $reduceRight(aTypedArray$7(this), callbackfn, length, length > 1 ? arguments[1] : undefined);
|
|
4760
5076
|
});
|
|
4761
5077
|
|
|
4762
5078
|
var aTypedArray$6 = arrayBufferViewCore.aTypedArray;
|
|
@@ -4778,12 +5094,26 @@
|
|
|
4778
5094
|
} return that;
|
|
4779
5095
|
});
|
|
4780
5096
|
|
|
5097
|
+
var RangeError$3 = global_1.RangeError;
|
|
5098
|
+
var Int8Array$2 = global_1.Int8Array;
|
|
5099
|
+
var Int8ArrayPrototype = Int8Array$2 && Int8Array$2.prototype;
|
|
5100
|
+
var $set = Int8ArrayPrototype && Int8ArrayPrototype.set;
|
|
4781
5101
|
var aTypedArray$5 = arrayBufferViewCore.aTypedArray;
|
|
4782
5102
|
var exportTypedArrayMethod$6 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4783
5103
|
|
|
4784
|
-
var
|
|
5104
|
+
var WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS = !fails(function () {
|
|
4785
5105
|
// eslint-disable-next-line es/no-typed-arrays -- required for testing
|
|
4786
|
-
new
|
|
5106
|
+
var array = new Uint8ClampedArray(2);
|
|
5107
|
+
functionCall($set, array, { length: 1, 0: 3 }, 1);
|
|
5108
|
+
return array[1] !== 3;
|
|
5109
|
+
});
|
|
5110
|
+
|
|
5111
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=11294 and other
|
|
5112
|
+
var TO_OBJECT_BUG = WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS && arrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS && fails(function () {
|
|
5113
|
+
var array = new Int8Array$2(2);
|
|
5114
|
+
array.set(1);
|
|
5115
|
+
array.set('2', 1);
|
|
5116
|
+
return array[0] !== 0 || array[1] !== 2;
|
|
4787
5117
|
});
|
|
4788
5118
|
|
|
4789
5119
|
// `%TypedArray%.prototype.set` method
|
|
@@ -4791,17 +5121,19 @@
|
|
|
4791
5121
|
exportTypedArrayMethod$6('set', function set(arrayLike /* , offset */) {
|
|
4792
5122
|
aTypedArray$5(this);
|
|
4793
5123
|
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
|
|
4794
|
-
var length = this.length;
|
|
4795
5124
|
var src = toObject(arrayLike);
|
|
4796
|
-
|
|
5125
|
+
if (WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS) return functionCall($set, this, src, offset);
|
|
5126
|
+
var length = this.length;
|
|
5127
|
+
var len = lengthOfArrayLike(src);
|
|
4797
5128
|
var index = 0;
|
|
4798
|
-
if (len + offset > length) throw RangeError('Wrong length');
|
|
5129
|
+
if (len + offset > length) throw RangeError$3('Wrong length');
|
|
4799
5130
|
while (index < len) this[offset + index] = src[index++];
|
|
4800
|
-
},
|
|
5131
|
+
}, !WORKS_WITH_OBJECTS_AND_GEERIC_ON_TYPED_ARRAYS || TO_OBJECT_BUG);
|
|
5132
|
+
|
|
5133
|
+
var arraySlice = functionUncurryThis([].slice);
|
|
4801
5134
|
|
|
4802
5135
|
var aTypedArray$4 = arrayBufferViewCore.aTypedArray;
|
|
4803
5136
|
var exportTypedArrayMethod$5 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4804
|
-
var $slice$1 = [].slice;
|
|
4805
5137
|
|
|
4806
5138
|
var FORCED$4 = fails(function () {
|
|
4807
5139
|
// eslint-disable-next-line es/no-typed-arrays -- required for testing
|
|
@@ -4811,7 +5143,7 @@
|
|
|
4811
5143
|
// `%TypedArray%.prototype.slice` method
|
|
4812
5144
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
|
|
4813
5145
|
exportTypedArrayMethod$5('slice', function slice(start, end) {
|
|
4814
|
-
var list =
|
|
5146
|
+
var list = arraySlice(aTypedArray$4(this), start, end);
|
|
4815
5147
|
var C = typedArraySpeciesConstructor(this);
|
|
4816
5148
|
var index = 0;
|
|
4817
5149
|
var length = list.length;
|
|
@@ -4831,15 +5163,15 @@
|
|
|
4831
5163
|
return $some(aTypedArray$3(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
4832
5164
|
});
|
|
4833
5165
|
|
|
4834
|
-
// TODO: use something more complex like timsort?
|
|
4835
5166
|
var floor$1 = Math.floor;
|
|
4836
5167
|
|
|
4837
5168
|
var mergeSort = function (array, comparefn) {
|
|
4838
5169
|
var length = array.length;
|
|
4839
5170
|
var middle = floor$1(length / 2);
|
|
4840
5171
|
return length < 8 ? insertionSort(array, comparefn) : merge(
|
|
4841
|
-
|
|
4842
|
-
mergeSort(array
|
|
5172
|
+
array,
|
|
5173
|
+
mergeSort(arraySliceSimple(array, 0, middle), comparefn),
|
|
5174
|
+
mergeSort(arraySliceSimple(array, middle), comparefn),
|
|
4843
5175
|
comparefn
|
|
4844
5176
|
);
|
|
4845
5177
|
};
|
|
@@ -4859,20 +5191,17 @@
|
|
|
4859
5191
|
} return array;
|
|
4860
5192
|
};
|
|
4861
5193
|
|
|
4862
|
-
var merge = function (left, right, comparefn) {
|
|
5194
|
+
var merge = function (array, left, right, comparefn) {
|
|
4863
5195
|
var llength = left.length;
|
|
4864
5196
|
var rlength = right.length;
|
|
4865
5197
|
var lindex = 0;
|
|
4866
5198
|
var rindex = 0;
|
|
4867
|
-
var result = [];
|
|
4868
5199
|
|
|
4869
5200
|
while (lindex < llength || rindex < rlength) {
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
}
|
|
4875
|
-
} return result;
|
|
5201
|
+
array[lindex + rindex] = (lindex < llength && rindex < rlength)
|
|
5202
|
+
? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]
|
|
5203
|
+
: lindex < llength ? left[lindex++] : right[rindex++];
|
|
5204
|
+
} return array;
|
|
4876
5205
|
};
|
|
4877
5206
|
|
|
4878
5207
|
var arraySort = mergeSort;
|
|
@@ -4887,19 +5216,20 @@
|
|
|
4887
5216
|
|
|
4888
5217
|
var engineWebkitVersion = !!webkit && +webkit[1];
|
|
4889
5218
|
|
|
5219
|
+
var Array$3 = global_1.Array;
|
|
4890
5220
|
var aTypedArray$2 = arrayBufferViewCore.aTypedArray;
|
|
4891
5221
|
var exportTypedArrayMethod$3 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4892
5222
|
var Uint16Array = global_1.Uint16Array;
|
|
4893
|
-
var
|
|
5223
|
+
var un$Sort$1 = Uint16Array && functionUncurryThis(Uint16Array.prototype.sort);
|
|
4894
5224
|
|
|
4895
5225
|
// WebKit
|
|
4896
|
-
var ACCEPT_INCORRECT_ARGUMENTS = !!
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
});
|
|
5226
|
+
var ACCEPT_INCORRECT_ARGUMENTS = !!un$Sort$1 && !(fails(function () {
|
|
5227
|
+
un$Sort$1(new Uint16Array(2), null);
|
|
5228
|
+
}) && fails(function () {
|
|
5229
|
+
un$Sort$1(new Uint16Array(2), {});
|
|
5230
|
+
}));
|
|
4901
5231
|
|
|
4902
|
-
var STABLE_SORT$1 = !!
|
|
5232
|
+
var STABLE_SORT$1 = !!un$Sort$1 && !fails(function () {
|
|
4903
5233
|
// feature detection can be too slow, so check engines versions
|
|
4904
5234
|
if (engineV8Version) return engineV8Version < 74;
|
|
4905
5235
|
if (engineFfVersion) return engineFfVersion < 67;
|
|
@@ -4907,7 +5237,7 @@
|
|
|
4907
5237
|
if (engineWebkitVersion) return engineWebkitVersion < 602;
|
|
4908
5238
|
|
|
4909
5239
|
var array = new Uint16Array(516);
|
|
4910
|
-
var expected = Array(516);
|
|
5240
|
+
var expected = Array$3(516);
|
|
4911
5241
|
var index, mod;
|
|
4912
5242
|
|
|
4913
5243
|
for (index = 0; index < 516; index++) {
|
|
@@ -4916,7 +5246,7 @@
|
|
|
4916
5246
|
expected[index] = index - 2 * mod + 3;
|
|
4917
5247
|
}
|
|
4918
5248
|
|
|
4919
|
-
array
|
|
5249
|
+
un$Sort$1(array, function (a, b) {
|
|
4920
5250
|
return (a / 4 | 0) - (b / 4 | 0);
|
|
4921
5251
|
});
|
|
4922
5252
|
|
|
@@ -4940,26 +5270,10 @@
|
|
|
4940
5270
|
// `%TypedArray%.prototype.sort` method
|
|
4941
5271
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
|
|
4942
5272
|
exportTypedArrayMethod$3('sort', function sort(comparefn) {
|
|
4943
|
-
var array = this;
|
|
4944
5273
|
if (comparefn !== undefined) aCallable(comparefn);
|
|
4945
|
-
if (STABLE_SORT$1) return
|
|
5274
|
+
if (STABLE_SORT$1) return un$Sort$1(this, comparefn);
|
|
4946
5275
|
|
|
4947
|
-
aTypedArray$2(
|
|
4948
|
-
var arrayLength = toLength(array.length);
|
|
4949
|
-
var items = Array(arrayLength);
|
|
4950
|
-
var index;
|
|
4951
|
-
|
|
4952
|
-
for (index = 0; index < arrayLength; index++) {
|
|
4953
|
-
items[index] = array[index];
|
|
4954
|
-
}
|
|
4955
|
-
|
|
4956
|
-
items = arraySort(array, getSortCompare$1(comparefn));
|
|
4957
|
-
|
|
4958
|
-
for (index = 0; index < arrayLength; index++) {
|
|
4959
|
-
array[index] = items[index];
|
|
4960
|
-
}
|
|
4961
|
-
|
|
4962
|
-
return array;
|
|
5276
|
+
return arraySort(aTypedArray$2(this), getSortCompare$1(comparefn));
|
|
4963
5277
|
}, !STABLE_SORT$1 || ACCEPT_INCORRECT_ARGUMENTS);
|
|
4964
5278
|
|
|
4965
5279
|
var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
|
|
@@ -4983,7 +5297,6 @@
|
|
|
4983
5297
|
var aTypedArray = arrayBufferViewCore.aTypedArray;
|
|
4984
5298
|
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
4985
5299
|
var $toLocaleString = [].toLocaleString;
|
|
4986
|
-
var $slice = [].slice;
|
|
4987
5300
|
|
|
4988
5301
|
// iOS Safari 6.x fails here
|
|
4989
5302
|
var TO_LOCALE_STRING_BUG = !!Int8Array$1 && fails(function () {
|
|
@@ -4999,21 +5312,26 @@
|
|
|
4999
5312
|
// `%TypedArray%.prototype.toLocaleString` method
|
|
5000
5313
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
|
|
5001
5314
|
exportTypedArrayMethod$1('toLocaleString', function toLocaleString() {
|
|
5002
|
-
return
|
|
5315
|
+
return functionApply(
|
|
5316
|
+
$toLocaleString,
|
|
5317
|
+
TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this),
|
|
5318
|
+
arraySlice(arguments)
|
|
5319
|
+
);
|
|
5003
5320
|
}, FORCED$3);
|
|
5004
5321
|
|
|
5005
5322
|
var exportTypedArrayMethod = arrayBufferViewCore.exportTypedArrayMethod;
|
|
5006
5323
|
|
|
5007
5324
|
|
|
5008
5325
|
|
|
5326
|
+
|
|
5009
5327
|
var Uint8Array$1 = global_1.Uint8Array;
|
|
5010
5328
|
var Uint8ArrayPrototype = Uint8Array$1 && Uint8Array$1.prototype || {};
|
|
5011
5329
|
var arrayToString = [].toString;
|
|
5012
|
-
var
|
|
5330
|
+
var join$1 = functionUncurryThis([].join);
|
|
5013
5331
|
|
|
5014
5332
|
if (fails(function () { arrayToString.call({}); })) {
|
|
5015
5333
|
arrayToString = function toString() {
|
|
5016
|
-
return
|
|
5334
|
+
return join$1(this);
|
|
5017
5335
|
};
|
|
5018
5336
|
}
|
|
5019
5337
|
|
|
@@ -5047,7 +5365,7 @@
|
|
|
5047
5365
|
|
|
5048
5366
|
var defineWellKnownSymbol = function (NAME) {
|
|
5049
5367
|
var Symbol = path$1.Symbol || (path$1.Symbol = {});
|
|
5050
|
-
if (!
|
|
5368
|
+
if (!hasOwnProperty_1(Symbol, NAME)) defineProperty$3(Symbol, NAME, {
|
|
5051
5369
|
value: wellKnownSymbolWrapped.f(NAME)
|
|
5052
5370
|
});
|
|
5053
5371
|
};
|
|
@@ -5058,21 +5376,28 @@
|
|
|
5058
5376
|
var SYMBOL = 'Symbol';
|
|
5059
5377
|
var PROTOTYPE = 'prototype';
|
|
5060
5378
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
5379
|
+
|
|
5061
5380
|
var setInternalState$3 = internalState.set;
|
|
5062
5381
|
var getInternalState$2 = internalState.getterFor(SYMBOL);
|
|
5382
|
+
|
|
5063
5383
|
var ObjectPrototype = Object[PROTOTYPE];
|
|
5064
5384
|
var $Symbol = global_1.Symbol;
|
|
5385
|
+
var SymbolPrototype$1 = $Symbol && $Symbol[PROTOTYPE];
|
|
5386
|
+
var TypeError$4 = global_1.TypeError;
|
|
5387
|
+
var QObject = global_1.QObject;
|
|
5065
5388
|
var $stringify = getBuiltIn('JSON', 'stringify');
|
|
5066
5389
|
var nativeGetOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
5067
5390
|
var nativeDefineProperty = objectDefineProperty.f;
|
|
5068
5391
|
var nativeGetOwnPropertyNames = objectGetOwnPropertyNamesExternal.f;
|
|
5069
5392
|
var nativePropertyIsEnumerable = objectPropertyIsEnumerable.f;
|
|
5393
|
+
var push$2 = functionUncurryThis([].push);
|
|
5394
|
+
|
|
5070
5395
|
var AllSymbols = shared('symbols');
|
|
5071
5396
|
var ObjectPrototypeSymbols = shared('op-symbols');
|
|
5072
5397
|
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
|
5073
5398
|
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
|
5074
5399
|
var WellKnownSymbolsStore = shared('wks');
|
|
5075
|
-
|
|
5400
|
+
|
|
5076
5401
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
5077
5402
|
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
5078
5403
|
|
|
@@ -5091,7 +5416,7 @@
|
|
|
5091
5416
|
} : nativeDefineProperty;
|
|
5092
5417
|
|
|
5093
5418
|
var wrap = function (tag, description) {
|
|
5094
|
-
var symbol = AllSymbols[tag] = objectCreate($
|
|
5419
|
+
var symbol = AllSymbols[tag] = objectCreate(SymbolPrototype$1);
|
|
5095
5420
|
setInternalState$3(symbol, {
|
|
5096
5421
|
type: SYMBOL,
|
|
5097
5422
|
tag: tag,
|
|
@@ -5106,12 +5431,12 @@
|
|
|
5106
5431
|
anObject(O);
|
|
5107
5432
|
var key = toPropertyKey(P);
|
|
5108
5433
|
anObject(Attributes);
|
|
5109
|
-
if (
|
|
5434
|
+
if (hasOwnProperty_1(AllSymbols, key)) {
|
|
5110
5435
|
if (!Attributes.enumerable) {
|
|
5111
|
-
if (!
|
|
5436
|
+
if (!hasOwnProperty_1(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
|
|
5112
5437
|
O[HIDDEN][key] = true;
|
|
5113
5438
|
} else {
|
|
5114
|
-
if (
|
|
5439
|
+
if (hasOwnProperty_1(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
|
|
5115
5440
|
Attributes = objectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
|
|
5116
5441
|
} return setSymbolDescriptor(O, key, Attributes);
|
|
5117
5442
|
} return nativeDefineProperty(O, key, Attributes);
|
|
@@ -5122,7 +5447,7 @@
|
|
|
5122
5447
|
var properties = toIndexedObject(Properties);
|
|
5123
5448
|
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
|
5124
5449
|
$forEach(keys, function (key) {
|
|
5125
|
-
if (!descriptors || $propertyIsEnumerable
|
|
5450
|
+
if (!descriptors || functionCall($propertyIsEnumerable$1, properties, key)) $defineProperty(O, key, properties[key]);
|
|
5126
5451
|
});
|
|
5127
5452
|
return O;
|
|
5128
5453
|
};
|
|
@@ -5131,19 +5456,20 @@
|
|
|
5131
5456
|
return Properties === undefined ? objectCreate(O) : $defineProperties(objectCreate(O), Properties);
|
|
5132
5457
|
};
|
|
5133
5458
|
|
|
5134
|
-
var $propertyIsEnumerable = function propertyIsEnumerable(V) {
|
|
5459
|
+
var $propertyIsEnumerable$1 = function propertyIsEnumerable(V) {
|
|
5135
5460
|
var P = toPropertyKey(V);
|
|
5136
|
-
var enumerable = nativePropertyIsEnumerable
|
|
5137
|
-
if (this === ObjectPrototype &&
|
|
5138
|
-
return enumerable || !
|
|
5461
|
+
var enumerable = functionCall(nativePropertyIsEnumerable, this, P);
|
|
5462
|
+
if (this === ObjectPrototype && hasOwnProperty_1(AllSymbols, P) && !hasOwnProperty_1(ObjectPrototypeSymbols, P)) return false;
|
|
5463
|
+
return enumerable || !hasOwnProperty_1(this, P) || !hasOwnProperty_1(AllSymbols, P) || hasOwnProperty_1(this, HIDDEN) && this[HIDDEN][P]
|
|
5464
|
+
? enumerable : true;
|
|
5139
5465
|
};
|
|
5140
5466
|
|
|
5141
5467
|
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
|
|
5142
5468
|
var it = toIndexedObject(O);
|
|
5143
5469
|
var key = toPropertyKey(P);
|
|
5144
|
-
if (it === ObjectPrototype &&
|
|
5470
|
+
if (it === ObjectPrototype && hasOwnProperty_1(AllSymbols, key) && !hasOwnProperty_1(ObjectPrototypeSymbols, key)) return;
|
|
5145
5471
|
var descriptor = nativeGetOwnPropertyDescriptor(it, key);
|
|
5146
|
-
if (descriptor &&
|
|
5472
|
+
if (descriptor && hasOwnProperty_1(AllSymbols, key) && !(hasOwnProperty_1(it, HIDDEN) && it[HIDDEN][key])) {
|
|
5147
5473
|
descriptor.enumerable = true;
|
|
5148
5474
|
}
|
|
5149
5475
|
return descriptor;
|
|
@@ -5153,7 +5479,7 @@
|
|
|
5153
5479
|
var names = nativeGetOwnPropertyNames(toIndexedObject(O));
|
|
5154
5480
|
var result = [];
|
|
5155
5481
|
$forEach(names, function (key) {
|
|
5156
|
-
if (!
|
|
5482
|
+
if (!hasOwnProperty_1(AllSymbols, key) && !hasOwnProperty_1(hiddenKeys$1, key)) push$2(result, key);
|
|
5157
5483
|
});
|
|
5158
5484
|
return result;
|
|
5159
5485
|
};
|
|
@@ -5163,8 +5489,8 @@
|
|
|
5163
5489
|
var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
|
|
5164
5490
|
var result = [];
|
|
5165
5491
|
$forEach(names, function (key) {
|
|
5166
|
-
if (
|
|
5167
|
-
|
|
5492
|
+
if (hasOwnProperty_1(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwnProperty_1(ObjectPrototype, key))) {
|
|
5493
|
+
push$2(result, AllSymbols[key]);
|
|
5168
5494
|
}
|
|
5169
5495
|
});
|
|
5170
5496
|
return result;
|
|
@@ -5172,21 +5498,23 @@
|
|
|
5172
5498
|
|
|
5173
5499
|
// `Symbol` constructor
|
|
5174
5500
|
// https://tc39.es/ecma262/#sec-symbol-constructor
|
|
5175
|
-
if (!nativeSymbol
|
|
5501
|
+
if (!nativeSymbol) {
|
|
5176
5502
|
$Symbol = function Symbol() {
|
|
5177
|
-
if (this
|
|
5503
|
+
if (objectIsPrototypeOf(SymbolPrototype$1, this)) throw TypeError$4('Symbol is not a constructor');
|
|
5178
5504
|
var description = !arguments.length || arguments[0] === undefined ? undefined : toString_1(arguments[0]);
|
|
5179
5505
|
var tag = uid(description);
|
|
5180
5506
|
var setter = function (value) {
|
|
5181
|
-
if (this === ObjectPrototype) setter
|
|
5182
|
-
if (
|
|
5507
|
+
if (this === ObjectPrototype) functionCall(setter, ObjectPrototypeSymbols, value);
|
|
5508
|
+
if (hasOwnProperty_1(this, HIDDEN) && hasOwnProperty_1(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
|
5183
5509
|
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
|
|
5184
5510
|
};
|
|
5185
5511
|
if (descriptors && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
|
|
5186
5512
|
return wrap(tag, description);
|
|
5187
5513
|
};
|
|
5188
5514
|
|
|
5189
|
-
|
|
5515
|
+
SymbolPrototype$1 = $Symbol[PROTOTYPE];
|
|
5516
|
+
|
|
5517
|
+
redefine(SymbolPrototype$1, 'toString', function toString() {
|
|
5190
5518
|
return getInternalState$2(this).tag;
|
|
5191
5519
|
});
|
|
5192
5520
|
|
|
@@ -5194,8 +5522,9 @@
|
|
|
5194
5522
|
return wrap(uid(description), description);
|
|
5195
5523
|
});
|
|
5196
5524
|
|
|
5197
|
-
objectPropertyIsEnumerable.f = $propertyIsEnumerable;
|
|
5525
|
+
objectPropertyIsEnumerable.f = $propertyIsEnumerable$1;
|
|
5198
5526
|
objectDefineProperty.f = $defineProperty;
|
|
5527
|
+
objectDefineProperties.f = $defineProperties;
|
|
5199
5528
|
objectGetOwnPropertyDescriptor.f = $getOwnPropertyDescriptor;
|
|
5200
5529
|
objectGetOwnPropertyNames.f = objectGetOwnPropertyNamesExternal.f = $getOwnPropertyNames;
|
|
5201
5530
|
objectGetOwnPropertySymbols.f = $getOwnPropertySymbols;
|
|
@@ -5206,19 +5535,19 @@
|
|
|
5206
5535
|
|
|
5207
5536
|
if (descriptors) {
|
|
5208
5537
|
// https://github.com/tc39/proposal-Symbol-description
|
|
5209
|
-
nativeDefineProperty($
|
|
5538
|
+
nativeDefineProperty(SymbolPrototype$1, 'description', {
|
|
5210
5539
|
configurable: true,
|
|
5211
5540
|
get: function description() {
|
|
5212
5541
|
return getInternalState$2(this).description;
|
|
5213
5542
|
}
|
|
5214
5543
|
});
|
|
5215
5544
|
{
|
|
5216
|
-
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
|
|
5545
|
+
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable$1, { unsafe: true });
|
|
5217
5546
|
}
|
|
5218
5547
|
}
|
|
5219
5548
|
}
|
|
5220
5549
|
|
|
5221
|
-
_export({ global: true, wrap: true, forced: !nativeSymbol
|
|
5550
|
+
_export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
|
|
5222
5551
|
Symbol: $Symbol
|
|
5223
5552
|
});
|
|
5224
5553
|
|
|
@@ -5226,12 +5555,12 @@
|
|
|
5226
5555
|
defineWellKnownSymbol(name);
|
|
5227
5556
|
});
|
|
5228
5557
|
|
|
5229
|
-
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol
|
|
5558
|
+
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
|
|
5230
5559
|
// `Symbol.for` method
|
|
5231
5560
|
// https://tc39.es/ecma262/#sec-symbol.for
|
|
5232
5561
|
'for': function (key) {
|
|
5233
5562
|
var string = toString_1(key);
|
|
5234
|
-
if (
|
|
5563
|
+
if (hasOwnProperty_1(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
|
|
5235
5564
|
var symbol = $Symbol(string);
|
|
5236
5565
|
StringToSymbolRegistry[string] = symbol;
|
|
5237
5566
|
SymbolToStringRegistry[symbol] = string;
|
|
@@ -5240,14 +5569,14 @@
|
|
|
5240
5569
|
// `Symbol.keyFor` method
|
|
5241
5570
|
// https://tc39.es/ecma262/#sec-symbol.keyfor
|
|
5242
5571
|
keyFor: function keyFor(sym) {
|
|
5243
|
-
if (!isSymbol$1(sym)) throw TypeError(sym + ' is not a symbol');
|
|
5244
|
-
if (
|
|
5572
|
+
if (!isSymbol$1(sym)) throw TypeError$4(sym + ' is not a symbol');
|
|
5573
|
+
if (hasOwnProperty_1(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
|
5245
5574
|
},
|
|
5246
5575
|
useSetter: function () { USE_SETTER = true; },
|
|
5247
5576
|
useSimple: function () { USE_SETTER = false; }
|
|
5248
5577
|
});
|
|
5249
5578
|
|
|
5250
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol
|
|
5579
|
+
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
|
|
5251
5580
|
// `Object.create` method
|
|
5252
5581
|
// https://tc39.es/ecma262/#sec-object.create
|
|
5253
5582
|
create: $create,
|
|
@@ -5262,7 +5591,7 @@
|
|
|
5262
5591
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
|
5263
5592
|
});
|
|
5264
5593
|
|
|
5265
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol
|
|
5594
|
+
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
|
|
5266
5595
|
// `Object.getOwnPropertyNames` method
|
|
5267
5596
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
5268
5597
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
@@ -5282,7 +5611,7 @@
|
|
|
5282
5611
|
// `JSON.stringify` method behavior with symbols
|
|
5283
5612
|
// https://tc39.es/ecma262/#sec-json.stringify
|
|
5284
5613
|
if ($stringify) {
|
|
5285
|
-
var FORCED_JSON_STRINGIFY = !nativeSymbol
|
|
5614
|
+
var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
|
|
5286
5615
|
var symbol = $Symbol();
|
|
5287
5616
|
// MS Edge converts symbol values to JSON as {}
|
|
5288
5617
|
return $stringify([symbol]) != '[null]'
|
|
@@ -5295,28 +5624,27 @@
|
|
|
5295
5624
|
_export({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
|
|
5296
5625
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
5297
5626
|
stringify: function stringify(it, replacer, space) {
|
|
5298
|
-
var args =
|
|
5299
|
-
var
|
|
5300
|
-
var $replacer;
|
|
5301
|
-
while (arguments.length > index) args.push(arguments[index++]);
|
|
5302
|
-
$replacer = replacer;
|
|
5627
|
+
var args = arraySlice(arguments);
|
|
5628
|
+
var $replacer = replacer;
|
|
5303
5629
|
if (!isObject$1(replacer) && it === undefined || isSymbol$1(it)) return; // IE8 returns string on undefined
|
|
5304
5630
|
if (!isArray$3(replacer)) replacer = function (key, value) {
|
|
5305
|
-
if (isCallable($replacer)) value = $replacer
|
|
5631
|
+
if (isCallable($replacer)) value = functionCall($replacer, this, key, value);
|
|
5306
5632
|
if (!isSymbol$1(value)) return value;
|
|
5307
5633
|
};
|
|
5308
5634
|
args[1] = replacer;
|
|
5309
|
-
return $stringify
|
|
5635
|
+
return functionApply($stringify, null, args);
|
|
5310
5636
|
}
|
|
5311
5637
|
});
|
|
5312
5638
|
}
|
|
5313
5639
|
|
|
5314
5640
|
// `Symbol.prototype[@@toPrimitive]` method
|
|
5315
5641
|
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
5316
|
-
if (
|
|
5317
|
-
var valueOf
|
|
5318
|
-
|
|
5319
|
-
|
|
5642
|
+
if (!SymbolPrototype$1[TO_PRIMITIVE]) {
|
|
5643
|
+
var valueOf = SymbolPrototype$1.valueOf;
|
|
5644
|
+
// eslint-disable-next-line no-unused-vars -- required for .length
|
|
5645
|
+
redefine(SymbolPrototype$1, TO_PRIMITIVE, function (hint) {
|
|
5646
|
+
// TODO: improve hint logic
|
|
5647
|
+
return functionCall(valueOf, this);
|
|
5320
5648
|
});
|
|
5321
5649
|
}
|
|
5322
5650
|
// `Symbol.prototype[@@toStringTag]` property
|
|
@@ -5329,36 +5657,42 @@
|
|
|
5329
5657
|
|
|
5330
5658
|
|
|
5331
5659
|
var NativeSymbol = global_1.Symbol;
|
|
5660
|
+
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
5332
5661
|
|
|
5333
|
-
if (descriptors && isCallable(NativeSymbol) && (!('description' in
|
|
5662
|
+
if (descriptors && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
5334
5663
|
// Safari 12 bug
|
|
5335
5664
|
NativeSymbol().description !== undefined
|
|
5336
5665
|
)) {
|
|
5337
5666
|
var EmptyStringDescriptionStore = {};
|
|
5338
5667
|
// wrap Symbol constructor for correct work with undefined description
|
|
5339
5668
|
var SymbolWrapper = function Symbol() {
|
|
5340
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined :
|
|
5341
|
-
var result = this
|
|
5669
|
+
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString_1(arguments[0]);
|
|
5670
|
+
var result = objectIsPrototypeOf(SymbolPrototype, this)
|
|
5342
5671
|
? new NativeSymbol(description)
|
|
5343
5672
|
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
5344
5673
|
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
5345
5674
|
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
5346
5675
|
return result;
|
|
5347
5676
|
};
|
|
5677
|
+
|
|
5348
5678
|
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
5349
|
-
|
|
5350
|
-
|
|
5679
|
+
SymbolWrapper.prototype = SymbolPrototype;
|
|
5680
|
+
SymbolPrototype.constructor = SymbolWrapper;
|
|
5351
5681
|
|
|
5352
|
-
var
|
|
5353
|
-
var
|
|
5682
|
+
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
5683
|
+
var symbolToString = functionUncurryThis(SymbolPrototype.toString);
|
|
5684
|
+
var symbolValueOf = functionUncurryThis(SymbolPrototype.valueOf);
|
|
5354
5685
|
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
5355
|
-
|
|
5686
|
+
var replace = functionUncurryThis(''.replace);
|
|
5687
|
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
|
5688
|
+
|
|
5689
|
+
defineProperty$2(SymbolPrototype, 'description', {
|
|
5356
5690
|
configurable: true,
|
|
5357
5691
|
get: function description() {
|
|
5358
|
-
var symbol =
|
|
5359
|
-
var string = symbolToString
|
|
5360
|
-
if (
|
|
5361
|
-
var desc =
|
|
5692
|
+
var symbol = symbolValueOf(this);
|
|
5693
|
+
var string = symbolToString(symbol);
|
|
5694
|
+
if (hasOwnProperty_1(EmptyStringDescriptionStore, symbol)) return '';
|
|
5695
|
+
var desc = NATIVE_SYMBOL ? stringSlice$1(string, 7, -1) : replace(string, regexp, '$1');
|
|
5362
5696
|
return desc === '' ? undefined : desc;
|
|
5363
5697
|
}
|
|
5364
5698
|
});
|
|
@@ -5388,7 +5722,7 @@
|
|
|
5388
5722
|
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
|
|
5389
5723
|
|
|
5390
5724
|
var SPECIES$1 = wellKnownSymbol('species');
|
|
5391
|
-
var
|
|
5725
|
+
var Array$2 = global_1.Array;
|
|
5392
5726
|
var max = Math.max;
|
|
5393
5727
|
|
|
5394
5728
|
// `Array.prototype.slice` method
|
|
@@ -5397,7 +5731,7 @@
|
|
|
5397
5731
|
_export({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
|
5398
5732
|
slice: function slice(start, end) {
|
|
5399
5733
|
var O = toIndexedObject(this);
|
|
5400
|
-
var length =
|
|
5734
|
+
var length = lengthOfArrayLike(O);
|
|
5401
5735
|
var k = toAbsoluteIndex(start, length);
|
|
5402
5736
|
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
5403
5737
|
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
|
|
@@ -5405,17 +5739,17 @@
|
|
|
5405
5739
|
if (isArray$3(O)) {
|
|
5406
5740
|
Constructor = O.constructor;
|
|
5407
5741
|
// cross-realm fallback
|
|
5408
|
-
if (isConstructor(Constructor) && (Constructor === Array || isArray$3(Constructor.prototype))) {
|
|
5742
|
+
if (isConstructor(Constructor) && (Constructor === Array$2 || isArray$3(Constructor.prototype))) {
|
|
5409
5743
|
Constructor = undefined;
|
|
5410
5744
|
} else if (isObject$1(Constructor)) {
|
|
5411
5745
|
Constructor = Constructor[SPECIES$1];
|
|
5412
5746
|
if (Constructor === null) Constructor = undefined;
|
|
5413
5747
|
}
|
|
5414
|
-
if (Constructor === Array || Constructor === undefined) {
|
|
5415
|
-
return
|
|
5748
|
+
if (Constructor === Array$2 || Constructor === undefined) {
|
|
5749
|
+
return arraySlice(O, k, fin);
|
|
5416
5750
|
}
|
|
5417
5751
|
}
|
|
5418
|
-
result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
|
|
5752
|
+
result = new (Constructor === undefined ? Array$2 : Constructor)(max(fin - k, 0));
|
|
5419
5753
|
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
|
|
5420
5754
|
result.length = n;
|
|
5421
5755
|
return result;
|
|
@@ -5436,9 +5770,11 @@
|
|
|
5436
5770
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
5437
5771
|
addToUnscopables('includes');
|
|
5438
5772
|
|
|
5773
|
+
var TypeError$3 = global_1.TypeError;
|
|
5774
|
+
|
|
5439
5775
|
var notARegexp = function (it) {
|
|
5440
5776
|
if (isRegexp(it)) {
|
|
5441
|
-
throw TypeError("The method doesn't accept regular expressions");
|
|
5777
|
+
throw TypeError$3("The method doesn't accept regular expressions");
|
|
5442
5778
|
} return it;
|
|
5443
5779
|
};
|
|
5444
5780
|
|
|
@@ -5456,12 +5792,17 @@
|
|
|
5456
5792
|
} return false;
|
|
5457
5793
|
};
|
|
5458
5794
|
|
|
5795
|
+
var stringIndexOf = functionUncurryThis(''.indexOf);
|
|
5796
|
+
|
|
5459
5797
|
// `String.prototype.includes` method
|
|
5460
5798
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
5461
5799
|
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
|
5462
5800
|
includes: function includes(searchString /* , position = 0 */) {
|
|
5463
|
-
return !!~
|
|
5464
|
-
|
|
5801
|
+
return !!~stringIndexOf(
|
|
5802
|
+
toString_1(requireObjectCoercible(this)),
|
|
5803
|
+
toString_1(notARegexp(searchString)),
|
|
5804
|
+
arguments.length > 1 ? arguments[1] : undefined
|
|
5805
|
+
);
|
|
5465
5806
|
}
|
|
5466
5807
|
});
|
|
5467
5808
|
|
|
@@ -5469,7 +5810,7 @@
|
|
|
5469
5810
|
// https://url.spec.whatwg.org/#dom-url-tojson
|
|
5470
5811
|
_export({ target: 'URL', proto: true, enumerable: true }, {
|
|
5471
5812
|
toJSON: function toJSON() {
|
|
5472
|
-
return URL.prototype.toString
|
|
5813
|
+
return functionCall(URL.prototype.toString, this);
|
|
5473
5814
|
}
|
|
5474
5815
|
});
|
|
5475
5816
|
|
|
@@ -7593,7 +7934,7 @@
|
|
|
7593
7934
|
}
|
|
7594
7935
|
}
|
|
7595
7936
|
|
|
7596
|
-
var queue$
|
|
7937
|
+
var queue$2 = [];
|
|
7597
7938
|
var draining = false;
|
|
7598
7939
|
var currentQueue;
|
|
7599
7940
|
var queueIndex = -1;
|
|
@@ -7606,12 +7947,12 @@
|
|
|
7606
7947
|
draining = false;
|
|
7607
7948
|
|
|
7608
7949
|
if (currentQueue.length) {
|
|
7609
|
-
queue$
|
|
7950
|
+
queue$2 = currentQueue.concat(queue$2);
|
|
7610
7951
|
} else {
|
|
7611
7952
|
queueIndex = -1;
|
|
7612
7953
|
}
|
|
7613
7954
|
|
|
7614
|
-
if (queue$
|
|
7955
|
+
if (queue$2.length) {
|
|
7615
7956
|
drainQueue();
|
|
7616
7957
|
}
|
|
7617
7958
|
}
|
|
@@ -7623,11 +7964,11 @@
|
|
|
7623
7964
|
|
|
7624
7965
|
var timeout = runTimeout(cleanUpNextTick);
|
|
7625
7966
|
draining = true;
|
|
7626
|
-
var len = queue$
|
|
7967
|
+
var len = queue$2.length;
|
|
7627
7968
|
|
|
7628
7969
|
while (len) {
|
|
7629
|
-
currentQueue = queue$
|
|
7630
|
-
queue$
|
|
7970
|
+
currentQueue = queue$2;
|
|
7971
|
+
queue$2 = [];
|
|
7631
7972
|
|
|
7632
7973
|
while (++queueIndex < len) {
|
|
7633
7974
|
if (currentQueue) {
|
|
@@ -7636,7 +7977,7 @@
|
|
|
7636
7977
|
}
|
|
7637
7978
|
|
|
7638
7979
|
queueIndex = -1;
|
|
7639
|
-
len = queue$
|
|
7980
|
+
len = queue$2.length;
|
|
7640
7981
|
}
|
|
7641
7982
|
|
|
7642
7983
|
currentQueue = null;
|
|
@@ -7653,9 +7994,9 @@
|
|
|
7653
7994
|
}
|
|
7654
7995
|
}
|
|
7655
7996
|
|
|
7656
|
-
queue$
|
|
7997
|
+
queue$2.push(new Item(fun, args));
|
|
7657
7998
|
|
|
7658
|
-
if (queue$
|
|
7999
|
+
if (queue$2.length === 1 && !draining) {
|
|
7659
8000
|
runTimeout(drainQueue);
|
|
7660
8001
|
}
|
|
7661
8002
|
} // v8 likes predictible objects
|
|
@@ -12353,7 +12694,7 @@
|
|
|
12353
12694
|
if (kind === 'throw') throw value;
|
|
12354
12695
|
return value;
|
|
12355
12696
|
}
|
|
12356
|
-
innerResult = innerResult
|
|
12697
|
+
innerResult = functionCall(innerResult, iterator);
|
|
12357
12698
|
} catch (error) {
|
|
12358
12699
|
innerError = true;
|
|
12359
12700
|
innerResult = error;
|
|
@@ -12364,17 +12705,21 @@
|
|
|
12364
12705
|
return value;
|
|
12365
12706
|
};
|
|
12366
12707
|
|
|
12708
|
+
var TypeError$2 = global_1.TypeError;
|
|
12709
|
+
|
|
12367
12710
|
var Result = function (stopped, result) {
|
|
12368
12711
|
this.stopped = stopped;
|
|
12369
12712
|
this.result = result;
|
|
12370
12713
|
};
|
|
12371
12714
|
|
|
12715
|
+
var ResultPrototype = Result.prototype;
|
|
12716
|
+
|
|
12372
12717
|
var iterate = function (iterable, unboundFunction, options) {
|
|
12373
12718
|
var that = options && options.that;
|
|
12374
12719
|
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
12375
12720
|
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
12376
12721
|
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
12377
|
-
var fn = functionBindContext(unboundFunction, that
|
|
12722
|
+
var fn = functionBindContext(unboundFunction, that);
|
|
12378
12723
|
var iterator, iterFn, index, length, result, next, step;
|
|
12379
12724
|
|
|
12380
12725
|
var stop = function (condition) {
|
|
@@ -12393,25 +12738,25 @@
|
|
|
12393
12738
|
iterator = iterable;
|
|
12394
12739
|
} else {
|
|
12395
12740
|
iterFn = getIteratorMethod(iterable);
|
|
12396
|
-
if (!iterFn) throw TypeError(
|
|
12741
|
+
if (!iterFn) throw TypeError$2(tryToString(iterable) + ' is not iterable');
|
|
12397
12742
|
// optimisation for array iterators
|
|
12398
12743
|
if (isArrayIteratorMethod(iterFn)) {
|
|
12399
|
-
for (index = 0, length =
|
|
12744
|
+
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
12400
12745
|
result = callFn(iterable[index]);
|
|
12401
|
-
if (result && result
|
|
12746
|
+
if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
|
|
12402
12747
|
} return new Result(false);
|
|
12403
12748
|
}
|
|
12404
12749
|
iterator = getIterator(iterable, iterFn);
|
|
12405
12750
|
}
|
|
12406
12751
|
|
|
12407
12752
|
next = iterator.next;
|
|
12408
|
-
while (!(step = next
|
|
12753
|
+
while (!(step = functionCall(next, iterator)).done) {
|
|
12409
12754
|
try {
|
|
12410
12755
|
result = callFn(step.value);
|
|
12411
12756
|
} catch (error) {
|
|
12412
12757
|
iteratorClose(iterator, 'throw', error);
|
|
12413
12758
|
}
|
|
12414
|
-
if (typeof result == 'object' && result && result
|
|
12759
|
+
if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
|
|
12415
12760
|
} return new Result(false);
|
|
12416
12761
|
};
|
|
12417
12762
|
|
|
@@ -12422,10 +12767,12 @@
|
|
|
12422
12767
|
var set = global_1.setImmediate;
|
|
12423
12768
|
var clear = global_1.clearImmediate;
|
|
12424
12769
|
var process$2 = global_1.process;
|
|
12425
|
-
var MessageChannel = global_1.MessageChannel;
|
|
12426
12770
|
var Dispatch = global_1.Dispatch;
|
|
12771
|
+
var Function$1 = global_1.Function;
|
|
12772
|
+
var MessageChannel = global_1.MessageChannel;
|
|
12773
|
+
var String$2 = global_1.String;
|
|
12427
12774
|
var counter = 0;
|
|
12428
|
-
var queue = {};
|
|
12775
|
+
var queue$1 = {};
|
|
12429
12776
|
var ONREADYSTATECHANGE = 'onreadystatechange';
|
|
12430
12777
|
var location$1, defer, channel, port;
|
|
12431
12778
|
|
|
@@ -12435,10 +12782,9 @@
|
|
|
12435
12782
|
} catch (error) { /* empty */ }
|
|
12436
12783
|
|
|
12437
12784
|
var run = function (id) {
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12441
|
-
delete queue[id];
|
|
12785
|
+
if (hasOwnProperty_1(queue$1, id)) {
|
|
12786
|
+
var fn = queue$1[id];
|
|
12787
|
+
delete queue$1[id];
|
|
12442
12788
|
fn();
|
|
12443
12789
|
}
|
|
12444
12790
|
};
|
|
@@ -12455,25 +12801,21 @@
|
|
|
12455
12801
|
|
|
12456
12802
|
var post = function (id) {
|
|
12457
12803
|
// old engines have not location.origin
|
|
12458
|
-
global_1.postMessage(String(id), location$1.protocol + '//' + location$1.host);
|
|
12804
|
+
global_1.postMessage(String$2(id), location$1.protocol + '//' + location$1.host);
|
|
12459
12805
|
};
|
|
12460
12806
|
|
|
12461
12807
|
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
12462
12808
|
if (!set || !clear) {
|
|
12463
12809
|
set = function setImmediate(fn) {
|
|
12464
|
-
var args =
|
|
12465
|
-
|
|
12466
|
-
|
|
12467
|
-
while (argumentsLength > i) args.push(arguments[i++]);
|
|
12468
|
-
queue[++counter] = function () {
|
|
12469
|
-
// eslint-disable-next-line no-new-func -- spec requirement
|
|
12470
|
-
(isCallable(fn) ? fn : Function(fn)).apply(undefined, args);
|
|
12810
|
+
var args = arraySlice(arguments, 1);
|
|
12811
|
+
queue$1[++counter] = function () {
|
|
12812
|
+
functionApply(isCallable(fn) ? fn : Function$1(fn), undefined, args);
|
|
12471
12813
|
};
|
|
12472
12814
|
defer(counter);
|
|
12473
12815
|
return counter;
|
|
12474
12816
|
};
|
|
12475
12817
|
clear = function clearImmediate(id) {
|
|
12476
|
-
delete queue[id];
|
|
12818
|
+
delete queue$1[id];
|
|
12477
12819
|
};
|
|
12478
12820
|
// Node.js 0.8-
|
|
12479
12821
|
if (engineIsNode) {
|
|
@@ -12491,7 +12833,7 @@
|
|
|
12491
12833
|
channel = new MessageChannel();
|
|
12492
12834
|
port = channel.port2;
|
|
12493
12835
|
channel.port1.onmessage = listener;
|
|
12494
|
-
defer = functionBindContext(port.postMessage, port
|
|
12836
|
+
defer = functionBindContext(port.postMessage, port);
|
|
12495
12837
|
// Browsers with postMessage, skip WebWorkers
|
|
12496
12838
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
12497
12839
|
} else if (
|
|
@@ -12579,9 +12921,9 @@
|
|
|
12579
12921
|
promise = Promise$1.resolve(undefined);
|
|
12580
12922
|
// workaround of WebKit ~ iOS Safari 10.1 bug
|
|
12581
12923
|
promise.constructor = Promise$1;
|
|
12582
|
-
then = promise.then;
|
|
12924
|
+
then = functionBindContext(promise.then, promise);
|
|
12583
12925
|
notify$2 = function () {
|
|
12584
|
-
then
|
|
12926
|
+
then(flush);
|
|
12585
12927
|
};
|
|
12586
12928
|
// Node.js without promises
|
|
12587
12929
|
} else if (engineIsNode) {
|
|
@@ -12595,9 +12937,10 @@
|
|
|
12595
12937
|
// - onreadystatechange
|
|
12596
12938
|
// - setTimeout
|
|
12597
12939
|
} else {
|
|
12940
|
+
// strange IE + webpack dev server bug - use .bind(global)
|
|
12941
|
+
macrotask = functionBindContext(macrotask, global_1);
|
|
12598
12942
|
notify$2 = function () {
|
|
12599
|
-
|
|
12600
|
-
macrotask.call(global_1, flush);
|
|
12943
|
+
macrotask(flush);
|
|
12601
12944
|
};
|
|
12602
12945
|
}
|
|
12603
12946
|
}
|
|
@@ -12644,7 +12987,7 @@
|
|
|
12644
12987
|
var hostReportErrors = function (a, b) {
|
|
12645
12988
|
var console = global_1.console;
|
|
12646
12989
|
if (console && console.error) {
|
|
12647
|
-
arguments.length
|
|
12990
|
+
arguments.length == 1 ? console.error(a) : console.error(a, b);
|
|
12648
12991
|
}
|
|
12649
12992
|
};
|
|
12650
12993
|
|
|
@@ -12656,6 +12999,30 @@
|
|
|
12656
12999
|
}
|
|
12657
13000
|
};
|
|
12658
13001
|
|
|
13002
|
+
var Queue = function () {
|
|
13003
|
+
this.head = null;
|
|
13004
|
+
this.tail = null;
|
|
13005
|
+
};
|
|
13006
|
+
|
|
13007
|
+
Queue.prototype = {
|
|
13008
|
+
add: function (item) {
|
|
13009
|
+
var entry = { item: item, next: null };
|
|
13010
|
+
if (this.head) this.tail.next = entry;
|
|
13011
|
+
else this.head = entry;
|
|
13012
|
+
this.tail = entry;
|
|
13013
|
+
},
|
|
13014
|
+
get: function () {
|
|
13015
|
+
var entry = this.head;
|
|
13016
|
+
if (entry) {
|
|
13017
|
+
this.head = entry.next;
|
|
13018
|
+
if (this.tail === entry) this.tail = null;
|
|
13019
|
+
return entry.item;
|
|
13020
|
+
}
|
|
13021
|
+
}
|
|
13022
|
+
};
|
|
13023
|
+
|
|
13024
|
+
var queue = Queue;
|
|
13025
|
+
|
|
12659
13026
|
var engineIsBrowser = typeof window == 'object';
|
|
12660
13027
|
|
|
12661
13028
|
var task = task$1.set;
|
|
@@ -12671,19 +13038,22 @@
|
|
|
12671
13038
|
|
|
12672
13039
|
|
|
12673
13040
|
|
|
13041
|
+
|
|
12674
13042
|
var SPECIES = wellKnownSymbol('species');
|
|
12675
13043
|
var PROMISE = 'Promise';
|
|
12676
|
-
|
|
13044
|
+
|
|
13045
|
+
var getInternalState = internalState.getterFor(PROMISE);
|
|
12677
13046
|
var setInternalState$1 = internalState.set;
|
|
12678
13047
|
var getInternalPromiseState = internalState.getterFor(PROMISE);
|
|
12679
13048
|
var NativePromisePrototype = nativePromiseConstructor && nativePromiseConstructor.prototype;
|
|
12680
13049
|
var PromiseConstructor = nativePromiseConstructor;
|
|
12681
|
-
var
|
|
13050
|
+
var PromisePrototype = NativePromisePrototype;
|
|
12682
13051
|
var TypeError$1 = global_1.TypeError;
|
|
12683
13052
|
var document$1 = global_1.document;
|
|
12684
13053
|
var process = global_1.process;
|
|
12685
13054
|
var newPromiseCapability = newPromiseCapability$1.f;
|
|
12686
13055
|
var newGenericPromiseCapability = newPromiseCapability;
|
|
13056
|
+
|
|
12687
13057
|
var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global_1.dispatchEvent);
|
|
12688
13058
|
var NATIVE_REJECTION_EVENT = isCallable(global_1.PromiseRejectionEvent);
|
|
12689
13059
|
var UNHANDLED_REJECTION = 'unhandledrejection';
|
|
@@ -12694,6 +13064,7 @@
|
|
|
12694
13064
|
var HANDLED = 1;
|
|
12695
13065
|
var UNHANDLED = 2;
|
|
12696
13066
|
var SUBCLASSING = false;
|
|
13067
|
+
|
|
12697
13068
|
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
|
|
12698
13069
|
|
|
12699
13070
|
var FORCED$2 = isForced_1(PROMISE, function () {
|
|
@@ -12730,49 +13101,50 @@
|
|
|
12730
13101
|
return isObject$1(it) && isCallable(then = it.then) ? then : false;
|
|
12731
13102
|
};
|
|
12732
13103
|
|
|
13104
|
+
var callReaction = function (reaction, state) {
|
|
13105
|
+
var value = state.value;
|
|
13106
|
+
var ok = state.state == FULFILLED;
|
|
13107
|
+
var handler = ok ? reaction.ok : reaction.fail;
|
|
13108
|
+
var resolve = reaction.resolve;
|
|
13109
|
+
var reject = reaction.reject;
|
|
13110
|
+
var domain = reaction.domain;
|
|
13111
|
+
var result, then, exited;
|
|
13112
|
+
try {
|
|
13113
|
+
if (handler) {
|
|
13114
|
+
if (!ok) {
|
|
13115
|
+
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
13116
|
+
state.rejection = HANDLED;
|
|
13117
|
+
}
|
|
13118
|
+
if (handler === true) result = value;
|
|
13119
|
+
else {
|
|
13120
|
+
if (domain) domain.enter();
|
|
13121
|
+
result = handler(value); // can throw
|
|
13122
|
+
if (domain) {
|
|
13123
|
+
domain.exit();
|
|
13124
|
+
exited = true;
|
|
13125
|
+
}
|
|
13126
|
+
}
|
|
13127
|
+
if (result === reaction.promise) {
|
|
13128
|
+
reject(TypeError$1('Promise-chain cycle'));
|
|
13129
|
+
} else if (then = isThenable(result)) {
|
|
13130
|
+
functionCall(then, result, resolve, reject);
|
|
13131
|
+
} else resolve(result);
|
|
13132
|
+
} else reject(value);
|
|
13133
|
+
} catch (error) {
|
|
13134
|
+
if (domain && !exited) domain.exit();
|
|
13135
|
+
reject(error);
|
|
13136
|
+
}
|
|
13137
|
+
};
|
|
13138
|
+
|
|
12733
13139
|
var notify$1 = function (state, isReject) {
|
|
12734
13140
|
if (state.notified) return;
|
|
12735
13141
|
state.notified = true;
|
|
12736
|
-
var chain = state.reactions;
|
|
12737
13142
|
microtask(function () {
|
|
12738
|
-
var
|
|
12739
|
-
var
|
|
12740
|
-
|
|
12741
|
-
|
|
12742
|
-
while (chain.length > index) {
|
|
12743
|
-
var reaction = chain[index++];
|
|
12744
|
-
var handler = ok ? reaction.ok : reaction.fail;
|
|
12745
|
-
var resolve = reaction.resolve;
|
|
12746
|
-
var reject = reaction.reject;
|
|
12747
|
-
var domain = reaction.domain;
|
|
12748
|
-
var result, then, exited;
|
|
12749
|
-
try {
|
|
12750
|
-
if (handler) {
|
|
12751
|
-
if (!ok) {
|
|
12752
|
-
if (state.rejection === UNHANDLED) onHandleUnhandled(state);
|
|
12753
|
-
state.rejection = HANDLED;
|
|
12754
|
-
}
|
|
12755
|
-
if (handler === true) result = value;
|
|
12756
|
-
else {
|
|
12757
|
-
if (domain) domain.enter();
|
|
12758
|
-
result = handler(value); // can throw
|
|
12759
|
-
if (domain) {
|
|
12760
|
-
domain.exit();
|
|
12761
|
-
exited = true;
|
|
12762
|
-
}
|
|
12763
|
-
}
|
|
12764
|
-
if (result === reaction.promise) {
|
|
12765
|
-
reject(TypeError$1('Promise-chain cycle'));
|
|
12766
|
-
} else if (then = isThenable(result)) {
|
|
12767
|
-
then.call(result, resolve, reject);
|
|
12768
|
-
} else resolve(result);
|
|
12769
|
-
} else reject(value);
|
|
12770
|
-
} catch (error) {
|
|
12771
|
-
if (domain && !exited) domain.exit();
|
|
12772
|
-
reject(error);
|
|
12773
|
-
}
|
|
13143
|
+
var reactions = state.reactions;
|
|
13144
|
+
var reaction;
|
|
13145
|
+
while (reaction = reactions.get()) {
|
|
13146
|
+
callReaction(reaction, state);
|
|
12774
13147
|
}
|
|
12775
|
-
state.reactions = [];
|
|
12776
13148
|
state.notified = false;
|
|
12777
13149
|
if (isReject && !state.rejection) onUnhandled(state);
|
|
12778
13150
|
});
|
|
@@ -12792,7 +13164,7 @@
|
|
|
12792
13164
|
};
|
|
12793
13165
|
|
|
12794
13166
|
var onUnhandled = function (state) {
|
|
12795
|
-
task
|
|
13167
|
+
functionCall(task, global_1, function () {
|
|
12796
13168
|
var promise = state.facade;
|
|
12797
13169
|
var value = state.value;
|
|
12798
13170
|
var IS_UNHANDLED = isUnhandled(state);
|
|
@@ -12815,7 +13187,7 @@
|
|
|
12815
13187
|
};
|
|
12816
13188
|
|
|
12817
13189
|
var onHandleUnhandled = function (state) {
|
|
12818
|
-
task
|
|
13190
|
+
functionCall(task, global_1, function () {
|
|
12819
13191
|
var promise = state.facade;
|
|
12820
13192
|
if (engineIsNode) {
|
|
12821
13193
|
process.emit('rejectionHandled', promise);
|
|
@@ -12849,7 +13221,7 @@
|
|
|
12849
13221
|
microtask(function () {
|
|
12850
13222
|
var wrapper = { done: false };
|
|
12851
13223
|
try {
|
|
12852
|
-
then
|
|
13224
|
+
functionCall(then, value,
|
|
12853
13225
|
bind(internalResolve, wrapper, state),
|
|
12854
13226
|
bind(internalReject, wrapper, state)
|
|
12855
13227
|
);
|
|
@@ -12871,9 +13243,9 @@
|
|
|
12871
13243
|
if (FORCED$2) {
|
|
12872
13244
|
// 25.4.3.1 Promise(executor)
|
|
12873
13245
|
PromiseConstructor = function Promise(executor) {
|
|
12874
|
-
anInstance(this,
|
|
13246
|
+
anInstance(this, PromisePrototype);
|
|
12875
13247
|
aCallable(executor);
|
|
12876
|
-
Internal
|
|
13248
|
+
functionCall(Internal, this);
|
|
12877
13249
|
var state = getInternalState(this);
|
|
12878
13250
|
try {
|
|
12879
13251
|
executor(bind(internalResolve, state), bind(internalReject, state));
|
|
@@ -12881,7 +13253,7 @@
|
|
|
12881
13253
|
internalReject(state, error);
|
|
12882
13254
|
}
|
|
12883
13255
|
};
|
|
12884
|
-
|
|
13256
|
+
PromisePrototype = PromiseConstructor.prototype;
|
|
12885
13257
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
12886
13258
|
Internal = function Promise(executor) {
|
|
12887
13259
|
setInternalState$1(this, {
|
|
@@ -12889,24 +13261,27 @@
|
|
|
12889
13261
|
done: false,
|
|
12890
13262
|
notified: false,
|
|
12891
13263
|
parent: false,
|
|
12892
|
-
reactions:
|
|
13264
|
+
reactions: new queue(),
|
|
12893
13265
|
rejection: false,
|
|
12894
13266
|
state: PENDING,
|
|
12895
13267
|
value: undefined
|
|
12896
13268
|
});
|
|
12897
13269
|
};
|
|
12898
|
-
Internal.prototype = redefineAll(
|
|
13270
|
+
Internal.prototype = redefineAll(PromisePrototype, {
|
|
12899
13271
|
// `Promise.prototype.then` method
|
|
12900
13272
|
// https://tc39.es/ecma262/#sec-promise.prototype.then
|
|
13273
|
+
// eslint-disable-next-line unicorn/no-thenable -- safe
|
|
12901
13274
|
then: function then(onFulfilled, onRejected) {
|
|
12902
13275
|
var state = getInternalPromiseState(this);
|
|
12903
13276
|
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
|
|
13277
|
+
state.parent = true;
|
|
12904
13278
|
reaction.ok = isCallable(onFulfilled) ? onFulfilled : true;
|
|
12905
13279
|
reaction.fail = isCallable(onRejected) && onRejected;
|
|
12906
13280
|
reaction.domain = engineIsNode ? process.domain : undefined;
|
|
12907
|
-
state.
|
|
12908
|
-
|
|
12909
|
-
|
|
13281
|
+
if (state.state == PENDING) state.reactions.add(reaction);
|
|
13282
|
+
else microtask(function () {
|
|
13283
|
+
callReaction(reaction, state);
|
|
13284
|
+
});
|
|
12910
13285
|
return reaction.promise;
|
|
12911
13286
|
},
|
|
12912
13287
|
// `Promise.prototype.catch` method
|
|
@@ -12936,13 +13311,13 @@
|
|
|
12936
13311
|
redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
|
|
12937
13312
|
var that = this;
|
|
12938
13313
|
return new PromiseConstructor(function (resolve, reject) {
|
|
12939
|
-
nativeThen
|
|
13314
|
+
functionCall(nativeThen, that, resolve, reject);
|
|
12940
13315
|
}).then(onFulfilled, onRejected);
|
|
12941
13316
|
// https://github.com/zloirock/core-js/issues/640
|
|
12942
13317
|
}, { unsafe: true });
|
|
12943
13318
|
|
|
12944
13319
|
// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
|
|
12945
|
-
redefine(NativePromisePrototype, 'catch',
|
|
13320
|
+
redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
|
|
12946
13321
|
}
|
|
12947
13322
|
|
|
12948
13323
|
// make `.constructor === Promise` work for native promise-based APIs
|
|
@@ -12952,7 +13327,7 @@
|
|
|
12952
13327
|
|
|
12953
13328
|
// make `instanceof Promise` work for native promise-based APIs
|
|
12954
13329
|
if (objectSetPrototypeOf) {
|
|
12955
|
-
objectSetPrototypeOf(NativePromisePrototype,
|
|
13330
|
+
objectSetPrototypeOf(NativePromisePrototype, PromisePrototype);
|
|
12956
13331
|
}
|
|
12957
13332
|
}
|
|
12958
13333
|
}
|
|
@@ -12972,7 +13347,7 @@
|
|
|
12972
13347
|
// https://tc39.es/ecma262/#sec-promise.reject
|
|
12973
13348
|
reject: function reject(r) {
|
|
12974
13349
|
var capability = newPromiseCapability(this);
|
|
12975
|
-
capability.reject
|
|
13350
|
+
functionCall(capability.reject, undefined, r);
|
|
12976
13351
|
return capability.promise;
|
|
12977
13352
|
}
|
|
12978
13353
|
});
|
|
@@ -13001,9 +13376,8 @@
|
|
|
13001
13376
|
iterate(iterable, function (promise) {
|
|
13002
13377
|
var index = counter++;
|
|
13003
13378
|
var alreadyCalled = false;
|
|
13004
|
-
values.push(undefined);
|
|
13005
13379
|
remaining++;
|
|
13006
|
-
$promiseResolve
|
|
13380
|
+
functionCall($promiseResolve, C, promise).then(function (value) {
|
|
13007
13381
|
if (alreadyCalled) return;
|
|
13008
13382
|
alreadyCalled = true;
|
|
13009
13383
|
values[index] = value;
|
|
@@ -13024,7 +13398,7 @@
|
|
|
13024
13398
|
var result = perform(function () {
|
|
13025
13399
|
var $promiseResolve = aCallable(C.resolve);
|
|
13026
13400
|
iterate(iterable, function (promise) {
|
|
13027
|
-
$promiseResolve
|
|
13401
|
+
functionCall($promiseResolve, C, promise).then(capability.resolve, reject);
|
|
13028
13402
|
});
|
|
13029
13403
|
});
|
|
13030
13404
|
if (result.error) reject(result.value);
|
|
@@ -14004,6 +14378,8 @@
|
|
|
14004
14378
|
}
|
|
14005
14379
|
};
|
|
14006
14380
|
|
|
14381
|
+
var Array$1 = global_1.Array;
|
|
14382
|
+
|
|
14007
14383
|
// `Array.from` method implementation
|
|
14008
14384
|
// https://tc39.es/ecma262/#sec-array.from
|
|
14009
14385
|
var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
@@ -14012,22 +14388,22 @@
|
|
|
14012
14388
|
var argumentsLength = arguments.length;
|
|
14013
14389
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
14014
14390
|
var mapping = mapfn !== undefined;
|
|
14015
|
-
if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined
|
|
14391
|
+
if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
|
|
14016
14392
|
var iteratorMethod = getIteratorMethod(O);
|
|
14017
14393
|
var index = 0;
|
|
14018
14394
|
var length, result, step, iterator, next, value;
|
|
14019
14395
|
// if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
14020
|
-
if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {
|
|
14396
|
+
if (iteratorMethod && !(this == Array$1 && isArrayIteratorMethod(iteratorMethod))) {
|
|
14021
14397
|
iterator = getIterator(O, iteratorMethod);
|
|
14022
14398
|
next = iterator.next;
|
|
14023
14399
|
result = IS_CONSTRUCTOR ? new this() : [];
|
|
14024
|
-
for (;!(step = next
|
|
14400
|
+
for (;!(step = functionCall(next, iterator)).done; index++) {
|
|
14025
14401
|
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
|
14026
14402
|
createProperty(result, index, value);
|
|
14027
14403
|
}
|
|
14028
14404
|
} else {
|
|
14029
|
-
length =
|
|
14030
|
-
result = IS_CONSTRUCTOR ? new this(length) : Array(length);
|
|
14405
|
+
length = lengthOfArrayLike(O);
|
|
14406
|
+
result = IS_CONSTRUCTOR ? new this(length) : Array$1(length);
|
|
14031
14407
|
for (;length > index; index++) {
|
|
14032
14408
|
value = mapping ? mapfn(O[index], index) : O[index];
|
|
14033
14409
|
createProperty(result, index, value);
|
|
@@ -14049,7 +14425,8 @@
|
|
|
14049
14425
|
});
|
|
14050
14426
|
|
|
14051
14427
|
var test$1 = [];
|
|
14052
|
-
var
|
|
14428
|
+
var un$Sort = functionUncurryThis(test$1.sort);
|
|
14429
|
+
var push$1 = functionUncurryThis(test$1.push);
|
|
14053
14430
|
|
|
14054
14431
|
// IE8-
|
|
14055
14432
|
var FAILS_ON_UNDEFINED = fails(function () {
|
|
@@ -14116,17 +14493,18 @@
|
|
|
14116
14493
|
|
|
14117
14494
|
var array = toObject(this);
|
|
14118
14495
|
|
|
14119
|
-
if (STABLE_SORT) return comparefn === undefined ?
|
|
14496
|
+
if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);
|
|
14120
14497
|
|
|
14121
14498
|
var items = [];
|
|
14122
|
-
var arrayLength =
|
|
14499
|
+
var arrayLength = lengthOfArrayLike(array);
|
|
14123
14500
|
var itemsLength, index;
|
|
14124
14501
|
|
|
14125
14502
|
for (index = 0; index < arrayLength; index++) {
|
|
14126
|
-
if (index in array)
|
|
14503
|
+
if (index in array) push$1(items, array[index]);
|
|
14127
14504
|
}
|
|
14128
14505
|
|
|
14129
|
-
|
|
14506
|
+
arraySort(items, getSortCompare(comparefn));
|
|
14507
|
+
|
|
14130
14508
|
itemsLength = items.length;
|
|
14131
14509
|
index = 0;
|
|
14132
14510
|
|
|
@@ -15913,6 +16291,29 @@
|
|
|
15913
16291
|
return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
|
|
15914
16292
|
}
|
|
15915
16293
|
|
|
16294
|
+
// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
|
|
16295
|
+
|
|
16296
|
+
|
|
16297
|
+
var arrayBufferNonExtensible = fails(function () {
|
|
16298
|
+
if (typeof ArrayBuffer == 'function') {
|
|
16299
|
+
var buffer = new ArrayBuffer(8);
|
|
16300
|
+
// eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
|
|
16301
|
+
if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
|
|
16302
|
+
}
|
|
16303
|
+
});
|
|
16304
|
+
|
|
16305
|
+
// eslint-disable-next-line es/no-object-isextensible -- safe
|
|
16306
|
+
var $isExtensible = Object.isExtensible;
|
|
16307
|
+
var FAILS_ON_PRIMITIVES$1 = fails(function () { $isExtensible(1); });
|
|
16308
|
+
|
|
16309
|
+
// `Object.isExtensible` method
|
|
16310
|
+
// https://tc39.es/ecma262/#sec-object.isextensible
|
|
16311
|
+
var objectIsExtensible = (FAILS_ON_PRIMITIVES$1 || arrayBufferNonExtensible) ? function isExtensible(it) {
|
|
16312
|
+
if (!isObject$1(it)) return false;
|
|
16313
|
+
if (arrayBufferNonExtensible && classofRaw(it) == 'ArrayBuffer') return false;
|
|
16314
|
+
return $isExtensible ? $isExtensible(it) : true;
|
|
16315
|
+
} : $isExtensible;
|
|
16316
|
+
|
|
15916
16317
|
var freezing = !fails(function () {
|
|
15917
16318
|
// eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
|
|
15918
16319
|
return Object.isExtensible(Object.preventExtensions({}));
|
|
@@ -15925,15 +16326,11 @@
|
|
|
15925
16326
|
|
|
15926
16327
|
|
|
15927
16328
|
|
|
16329
|
+
|
|
15928
16330
|
var REQUIRED = false;
|
|
15929
16331
|
var METADATA = uid('meta');
|
|
15930
16332
|
var id = 0;
|
|
15931
16333
|
|
|
15932
|
-
// eslint-disable-next-line es/no-object-isextensible -- safe
|
|
15933
|
-
var isExtensible = Object.isExtensible || function () {
|
|
15934
|
-
return true;
|
|
15935
|
-
};
|
|
15936
|
-
|
|
15937
16334
|
var setMetadata = function (it) {
|
|
15938
16335
|
defineProperty(it, METADATA, { value: {
|
|
15939
16336
|
objectID: 'O' + id++, // object ID
|
|
@@ -15944,9 +16341,9 @@
|
|
|
15944
16341
|
var fastKey = function (it, create) {
|
|
15945
16342
|
// return a primitive with prefix
|
|
15946
16343
|
if (!isObject$1(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
|
15947
|
-
if (!
|
|
16344
|
+
if (!hasOwnProperty_1(it, METADATA)) {
|
|
15948
16345
|
// can't set metadata to uncaught frozen object
|
|
15949
|
-
if (!
|
|
16346
|
+
if (!objectIsExtensible(it)) return 'F';
|
|
15950
16347
|
// not necessary to add metadata
|
|
15951
16348
|
if (!create) return 'E';
|
|
15952
16349
|
// add missing metadata
|
|
@@ -15956,9 +16353,9 @@
|
|
|
15956
16353
|
};
|
|
15957
16354
|
|
|
15958
16355
|
var getWeakData = function (it, create) {
|
|
15959
|
-
if (!
|
|
16356
|
+
if (!hasOwnProperty_1(it, METADATA)) {
|
|
15960
16357
|
// can't set metadata to uncaught frozen object
|
|
15961
|
-
if (!
|
|
16358
|
+
if (!objectIsExtensible(it)) return true;
|
|
15962
16359
|
// not necessary to add metadata
|
|
15963
16360
|
if (!create) return false;
|
|
15964
16361
|
// add missing metadata
|
|
@@ -15969,7 +16366,7 @@
|
|
|
15969
16366
|
|
|
15970
16367
|
// add metadata on freeze-family methods calling
|
|
15971
16368
|
var onFreeze = function (it) {
|
|
15972
|
-
if (freezing && REQUIRED &&
|
|
16369
|
+
if (freezing && REQUIRED && objectIsExtensible(it) && !hasOwnProperty_1(it, METADATA)) setMetadata(it);
|
|
15973
16370
|
return it;
|
|
15974
16371
|
};
|
|
15975
16372
|
|
|
@@ -15977,7 +16374,7 @@
|
|
|
15977
16374
|
meta.enable = function () { /* empty */ };
|
|
15978
16375
|
REQUIRED = true;
|
|
15979
16376
|
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
15980
|
-
var splice = [].splice;
|
|
16377
|
+
var splice = functionUncurryThis([].splice);
|
|
15981
16378
|
var test = {};
|
|
15982
16379
|
test[METADATA] = 1;
|
|
15983
16380
|
|
|
@@ -15987,7 +16384,7 @@
|
|
|
15987
16384
|
var result = getOwnPropertyNames(it);
|
|
15988
16385
|
for (var i = 0, length = result.length; i < length; i++) {
|
|
15989
16386
|
if (result[i] === METADATA) {
|
|
15990
|
-
splice
|
|
16387
|
+
splice(result, i, 1);
|
|
15991
16388
|
break;
|
|
15992
16389
|
}
|
|
15993
16390
|
} return result;
|
|
@@ -16019,19 +16416,19 @@
|
|
|
16019
16416
|
var exported = {};
|
|
16020
16417
|
|
|
16021
16418
|
var fixMethod = function (KEY) {
|
|
16022
|
-
var
|
|
16419
|
+
var uncurriedNativeMethod = functionUncurryThis(NativePrototype[KEY]);
|
|
16023
16420
|
redefine(NativePrototype, KEY,
|
|
16024
16421
|
KEY == 'add' ? function add(value) {
|
|
16025
|
-
|
|
16422
|
+
uncurriedNativeMethod(this, value === 0 ? 0 : value);
|
|
16026
16423
|
return this;
|
|
16027
16424
|
} : KEY == 'delete' ? function (key) {
|
|
16028
|
-
return IS_WEAK && !isObject$1(key) ? false :
|
|
16425
|
+
return IS_WEAK && !isObject$1(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
16029
16426
|
} : KEY == 'get' ? function get(key) {
|
|
16030
|
-
return IS_WEAK && !isObject$1(key) ? undefined :
|
|
16427
|
+
return IS_WEAK && !isObject$1(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
16031
16428
|
} : KEY == 'has' ? function has(key) {
|
|
16032
|
-
return IS_WEAK && !isObject$1(key) ? false :
|
|
16429
|
+
return IS_WEAK && !isObject$1(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
16033
16430
|
} : function set(key, value) {
|
|
16034
|
-
|
|
16431
|
+
uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
|
|
16035
16432
|
return this;
|
|
16036
16433
|
}
|
|
16037
16434
|
);
|
|
@@ -16068,7 +16465,7 @@
|
|
|
16068
16465
|
|
|
16069
16466
|
if (!ACCEPT_ITERABLES) {
|
|
16070
16467
|
Constructor = wrapper(function (dummy, iterable) {
|
|
16071
|
-
anInstance(dummy,
|
|
16468
|
+
anInstance(dummy, NativePrototype);
|
|
16072
16469
|
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
|
16073
16470
|
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
16074
16471
|
return that;
|
|
@@ -16116,8 +16513,8 @@
|
|
|
16116
16513
|
|
|
16117
16514
|
var collectionStrong = {
|
|
16118
16515
|
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
|
16119
|
-
var
|
|
16120
|
-
anInstance(that,
|
|
16516
|
+
var Constructor = wrapper(function (that, iterable) {
|
|
16517
|
+
anInstance(that, Prototype);
|
|
16121
16518
|
setInternalState(that, {
|
|
16122
16519
|
type: CONSTRUCTOR_NAME,
|
|
16123
16520
|
index: objectCreate(null),
|
|
@@ -16129,6 +16526,8 @@
|
|
|
16129
16526
|
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
16130
16527
|
});
|
|
16131
16528
|
|
|
16529
|
+
var Prototype = Constructor.prototype;
|
|
16530
|
+
|
|
16132
16531
|
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
16133
16532
|
|
|
16134
16533
|
var define = function (that, key, value) {
|
|
@@ -16169,7 +16568,7 @@
|
|
|
16169
16568
|
}
|
|
16170
16569
|
};
|
|
16171
16570
|
|
|
16172
|
-
redefineAll(
|
|
16571
|
+
redefineAll(Prototype, {
|
|
16173
16572
|
// `{ Map, Set }.prototype.clear()` methods
|
|
16174
16573
|
// https://tc39.es/ecma262/#sec-map.prototype.clear
|
|
16175
16574
|
// https://tc39.es/ecma262/#sec-set.prototype.clear
|
|
@@ -16213,7 +16612,7 @@
|
|
|
16213
16612
|
// https://tc39.es/ecma262/#sec-set.prototype.foreach
|
|
16214
16613
|
forEach: function forEach(callbackfn /* , that = undefined */) {
|
|
16215
16614
|
var state = getInternalState(this);
|
|
16216
|
-
var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined
|
|
16615
|
+
var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
16217
16616
|
var entry;
|
|
16218
16617
|
while (entry = entry ? entry.next : state.first) {
|
|
16219
16618
|
boundFunction(entry.value, entry.key, this);
|
|
@@ -16229,7 +16628,7 @@
|
|
|
16229
16628
|
}
|
|
16230
16629
|
});
|
|
16231
16630
|
|
|
16232
|
-
redefineAll(
|
|
16631
|
+
redefineAll(Prototype, IS_MAP ? {
|
|
16233
16632
|
// `Map.prototype.get(key)` method
|
|
16234
16633
|
// https://tc39.es/ecma262/#sec-map.prototype.get
|
|
16235
16634
|
get: function get(key) {
|
|
@@ -16248,14 +16647,14 @@
|
|
|
16248
16647
|
return define(this, value = value === 0 ? 0 : value, value);
|
|
16249
16648
|
}
|
|
16250
16649
|
});
|
|
16251
|
-
if (descriptors) defineProperty$1(
|
|
16650
|
+
if (descriptors) defineProperty$1(Prototype, 'size', {
|
|
16252
16651
|
get: function () {
|
|
16253
16652
|
return getInternalState(this).size;
|
|
16254
16653
|
}
|
|
16255
16654
|
});
|
|
16256
|
-
return
|
|
16655
|
+
return Constructor;
|
|
16257
16656
|
},
|
|
16258
|
-
setStrong: function (
|
|
16657
|
+
setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
|
|
16259
16658
|
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
|
|
16260
16659
|
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
16261
16660
|
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
|
|
@@ -16268,7 +16667,7 @@
|
|
|
16268
16667
|
// https://tc39.es/ecma262/#sec-set.prototype.keys
|
|
16269
16668
|
// https://tc39.es/ecma262/#sec-set.prototype.values
|
|
16270
16669
|
// https://tc39.es/ecma262/#sec-set.prototype-@@iterator
|
|
16271
|
-
defineIterator(
|
|
16670
|
+
defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
|
|
16272
16671
|
setInternalState(this, {
|
|
16273
16672
|
type: ITERATOR_NAME,
|
|
16274
16673
|
target: iterated,
|
|
@@ -16311,6 +16710,7 @@
|
|
|
16311
16710
|
var $assign = Object.assign;
|
|
16312
16711
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
16313
16712
|
var defineProperty = Object.defineProperty;
|
|
16713
|
+
var concat = functionUncurryThis([].concat);
|
|
16314
16714
|
|
|
16315
16715
|
// `Object.assign` method
|
|
16316
16716
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
@@ -16342,13 +16742,13 @@
|
|
|
16342
16742
|
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
|
16343
16743
|
while (argumentsLength > index) {
|
|
16344
16744
|
var S = indexedObject(arguments[index++]);
|
|
16345
|
-
var keys = getOwnPropertySymbols ? objectKeys(S)
|
|
16745
|
+
var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
|
|
16346
16746
|
var length = keys.length;
|
|
16347
16747
|
var j = 0;
|
|
16348
16748
|
var key;
|
|
16349
16749
|
while (length > j) {
|
|
16350
16750
|
key = keys[j++];
|
|
16351
|
-
if (!descriptors || propertyIsEnumerable
|
|
16751
|
+
if (!descriptors || functionCall(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
16352
16752
|
}
|
|
16353
16753
|
} return T;
|
|
16354
16754
|
} : $assign;
|
|
@@ -16376,18 +16776,14 @@
|
|
|
16376
16776
|
|
|
16377
16777
|
var browser$2 = true;
|
|
16378
16778
|
|
|
16379
|
-
|
|
16380
|
-
// optimize the gzip compression for this alphabet.
|
|
16381
|
-
var urlAlphabet = 'ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW';
|
|
16779
|
+
var urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
|
|
16382
16780
|
|
|
16383
16781
|
var customAlphabet = function customAlphabet(alphabet, size) {
|
|
16384
16782
|
return function () {
|
|
16385
|
-
var id = '';
|
|
16386
|
-
|
|
16783
|
+
var id = '';
|
|
16387
16784
|
var i = size;
|
|
16388
16785
|
|
|
16389
16786
|
while (i--) {
|
|
16390
|
-
// `| 0` is more compact and faster than `Math.floor()`.
|
|
16391
16787
|
id += alphabet[Math.random() * alphabet.length | 0];
|
|
16392
16788
|
}
|
|
16393
16789
|
|
|
@@ -16397,12 +16793,10 @@
|
|
|
16397
16793
|
|
|
16398
16794
|
var nanoid = function nanoid() {
|
|
16399
16795
|
var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
|
|
16400
|
-
var id = '';
|
|
16401
|
-
|
|
16796
|
+
var id = '';
|
|
16402
16797
|
var i = size;
|
|
16403
16798
|
|
|
16404
16799
|
while (i--) {
|
|
16405
|
-
// `| 0` is more compact and faster than `Math.floor()`.
|
|
16406
16800
|
id += urlAlphabet[Math.random() * 64 | 0];
|
|
16407
16801
|
}
|
|
16408
16802
|
|
|
@@ -20848,10 +21242,12 @@
|
|
|
20848
21242
|
|
|
20849
21243
|
--length;
|
|
20850
21244
|
str += '\n ' + repeat(' ', space) + (Array.isArray(object) ? '' : '"' + i + '": ') + // key
|
|
20851
|
-
_stringify(object[i]) + (
|
|
21245
|
+
_stringify(object[i]) + ( // value
|
|
21246
|
+
length ? ',' : ''); // comma
|
|
20852
21247
|
}
|
|
20853
21248
|
|
|
20854
|
-
return str + (
|
|
21249
|
+
return str + ( // [], {}
|
|
21250
|
+
str.length !== 1 ? '\n' + repeat(' ', --space) + end : end);
|
|
20855
21251
|
}
|
|
20856
21252
|
/**
|
|
20857
21253
|
* Return a new Thing that has the keys in sorted order. Recursive.
|
|
@@ -21410,7 +21806,7 @@
|
|
|
21410
21806
|
createDebug.formatters = {};
|
|
21411
21807
|
/**
|
|
21412
21808
|
* Selects a color for a debug namespace
|
|
21413
|
-
* @param {String} namespace The namespace string for the
|
|
21809
|
+
* @param {String} namespace The namespace string for the debug instance to be colored
|
|
21414
21810
|
* @return {Number|String} An ANSI color code for the given namespace
|
|
21415
21811
|
* @api private
|
|
21416
21812
|
*/
|
|
@@ -21705,7 +22101,11 @@
|
|
|
21705
22101
|
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
|
21706
22102
|
|
|
21707
22103
|
|
|
21708
|
-
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance ||
|
|
22104
|
+
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
|
22105
|
+
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
|
22106
|
+
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
|
22107
|
+
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
|
22108
|
+
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
|
21709
22109
|
}
|
|
21710
22110
|
/**
|
|
21711
22111
|
* Colorize log arguments if enabled.
|
|
@@ -21834,7 +22234,10 @@
|
|
|
21834
22234
|
};
|
|
21835
22235
|
});
|
|
21836
22236
|
|
|
21837
|
-
var propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
|
22237
|
+
var $propertyIsEnumerable = objectPropertyIsEnumerable.f;
|
|
22238
|
+
|
|
22239
|
+
var propertyIsEnumerable = functionUncurryThis($propertyIsEnumerable);
|
|
22240
|
+
var push = functionUncurryThis([].push);
|
|
21838
22241
|
|
|
21839
22242
|
// `Object.{ entries, values }` methods implementation
|
|
21840
22243
|
var createMethod = function (TO_ENTRIES) {
|
|
@@ -21847,8 +22250,8 @@
|
|
|
21847
22250
|
var key;
|
|
21848
22251
|
while (length > i) {
|
|
21849
22252
|
key = keys[i++];
|
|
21850
|
-
if (!descriptors || propertyIsEnumerable
|
|
21851
|
-
|
|
22253
|
+
if (!descriptors || propertyIsEnumerable(O, key)) {
|
|
22254
|
+
push(result, TO_ENTRIES ? [key, O[key]] : O[key]);
|
|
21852
22255
|
}
|
|
21853
22256
|
}
|
|
21854
22257
|
return result;
|
|
@@ -23026,7 +23429,6 @@
|
|
|
23026
23429
|
var assignNewMochaID = utils.assignNewMochaID,
|
|
23027
23430
|
clamp = utils.clamp,
|
|
23028
23431
|
utilsConstants = utils.constants,
|
|
23029
|
-
createMap = utils.createMap,
|
|
23030
23432
|
defineConstants = utils.defineConstants,
|
|
23031
23433
|
getMochaID = utils.getMochaID,
|
|
23032
23434
|
inherits = utils.inherits,
|
|
@@ -23099,11 +23501,6 @@
|
|
|
23099
23501
|
}
|
|
23100
23502
|
});
|
|
23101
23503
|
this.reset();
|
|
23102
|
-
this.on('newListener', function (event) {
|
|
23103
|
-
if (deprecatedEvents[event]) {
|
|
23104
|
-
errors.deprecate('Event "' + event + '" is deprecated. Please let the Mocha team know about your use case: https://git.io/v6Lwm');
|
|
23105
|
-
}
|
|
23106
|
-
});
|
|
23107
23504
|
}
|
|
23108
23505
|
/**
|
|
23109
23506
|
* Inherit from `EventEmitter.prototype`.
|
|
@@ -23670,7 +24067,7 @@
|
|
|
23670
24067
|
*/
|
|
23671
24068
|
{
|
|
23672
24069
|
/**
|
|
23673
|
-
* Event emitted after a test file has been loaded Not emitted in browser.
|
|
24070
|
+
* Event emitted after a test file has been loaded. Not emitted in browser.
|
|
23674
24071
|
*/
|
|
23675
24072
|
EVENT_FILE_POST_REQUIRE: 'post-require',
|
|
23676
24073
|
|
|
@@ -23685,75 +24082,60 @@
|
|
|
23685
24082
|
EVENT_FILE_REQUIRE: 'require',
|
|
23686
24083
|
|
|
23687
24084
|
/**
|
|
23688
|
-
* Event emitted when `global.run()` is called (use with `delay` option)
|
|
24085
|
+
* Event emitted when `global.run()` is called (use with `delay` option).
|
|
23689
24086
|
*/
|
|
23690
24087
|
EVENT_ROOT_SUITE_RUN: 'run',
|
|
23691
24088
|
|
|
23692
24089
|
/**
|
|
23693
|
-
* Namespace for collection of a `Suite`'s "after all" hooks
|
|
24090
|
+
* Namespace for collection of a `Suite`'s "after all" hooks.
|
|
23694
24091
|
*/
|
|
23695
24092
|
HOOK_TYPE_AFTER_ALL: 'afterAll',
|
|
23696
24093
|
|
|
23697
24094
|
/**
|
|
23698
|
-
* Namespace for collection of a `Suite`'s "after each" hooks
|
|
24095
|
+
* Namespace for collection of a `Suite`'s "after each" hooks.
|
|
23699
24096
|
*/
|
|
23700
24097
|
HOOK_TYPE_AFTER_EACH: 'afterEach',
|
|
23701
24098
|
|
|
23702
24099
|
/**
|
|
23703
|
-
* Namespace for collection of a `Suite`'s "before all" hooks
|
|
24100
|
+
* Namespace for collection of a `Suite`'s "before all" hooks.
|
|
23704
24101
|
*/
|
|
23705
24102
|
HOOK_TYPE_BEFORE_ALL: 'beforeAll',
|
|
23706
24103
|
|
|
23707
24104
|
/**
|
|
23708
|
-
* Namespace for collection of a `Suite`'s "before
|
|
24105
|
+
* Namespace for collection of a `Suite`'s "before each" hooks.
|
|
23709
24106
|
*/
|
|
23710
24107
|
HOOK_TYPE_BEFORE_EACH: 'beforeEach',
|
|
23711
|
-
// the following events are all deprecated
|
|
23712
24108
|
|
|
23713
24109
|
/**
|
|
23714
|
-
* Emitted after
|
|
24110
|
+
* Emitted after a child `Suite` has been added to a `Suite`.
|
|
24111
|
+
*/
|
|
24112
|
+
EVENT_SUITE_ADD_SUITE: 'suite',
|
|
24113
|
+
|
|
24114
|
+
/**
|
|
24115
|
+
* Emitted after an "after all" `Hook` has been added to a `Suite`.
|
|
23715
24116
|
*/
|
|
23716
24117
|
EVENT_SUITE_ADD_HOOK_AFTER_ALL: 'afterAll',
|
|
23717
24118
|
|
|
23718
24119
|
/**
|
|
23719
|
-
* Emitted after an "after each" `Hook` has been added to a `Suite
|
|
24120
|
+
* Emitted after an "after each" `Hook` has been added to a `Suite`.
|
|
23720
24121
|
*/
|
|
23721
24122
|
EVENT_SUITE_ADD_HOOK_AFTER_EACH: 'afterEach',
|
|
23722
24123
|
|
|
23723
24124
|
/**
|
|
23724
|
-
* Emitted after an "before all" `Hook` has been added to a `Suite
|
|
24125
|
+
* Emitted after an "before all" `Hook` has been added to a `Suite`.
|
|
23725
24126
|
*/
|
|
23726
24127
|
EVENT_SUITE_ADD_HOOK_BEFORE_ALL: 'beforeAll',
|
|
23727
24128
|
|
|
23728
24129
|
/**
|
|
23729
|
-
* Emitted after an "before each" `Hook` has been added to a `Suite
|
|
24130
|
+
* Emitted after an "before each" `Hook` has been added to a `Suite`.
|
|
23730
24131
|
*/
|
|
23731
24132
|
EVENT_SUITE_ADD_HOOK_BEFORE_EACH: 'beforeEach',
|
|
23732
24133
|
|
|
23733
24134
|
/**
|
|
23734
|
-
* Emitted after a
|
|
23735
|
-
*/
|
|
23736
|
-
EVENT_SUITE_ADD_SUITE: 'suite',
|
|
23737
|
-
|
|
23738
|
-
/**
|
|
23739
|
-
* Emitted after a `Test` has been added to a `Suite`. Deprecated
|
|
24135
|
+
* Emitted after a `Test` has been added to a `Suite`.
|
|
23740
24136
|
*/
|
|
23741
24137
|
EVENT_SUITE_ADD_TEST: 'test'
|
|
23742
24138
|
});
|
|
23743
|
-
/**
|
|
23744
|
-
* @summary There are no known use cases for these events.
|
|
23745
|
-
* @desc This is a `Set`-like object having all keys being the constant's string value and the value being `true`.
|
|
23746
|
-
* @todo Remove eventually
|
|
23747
|
-
* @type {Object<string,boolean>}
|
|
23748
|
-
* @ignore
|
|
23749
|
-
*/
|
|
23750
|
-
|
|
23751
|
-
var deprecatedEvents = Object.keys(constants).filter(function (constant) {
|
|
23752
|
-
return constant.substring(0, 15) === 'EVENT_SUITE_ADD';
|
|
23753
|
-
}).reduce(function (acc, constant) {
|
|
23754
|
-
acc[constants[constant]] = true;
|
|
23755
|
-
return acc;
|
|
23756
|
-
}, createMap());
|
|
23757
24139
|
Suite.constants = constants;
|
|
23758
24140
|
});
|
|
23759
24141
|
|
|
@@ -23900,7 +24282,7 @@
|
|
|
23900
24282
|
* @param {boolean} [opts.cleanReferencesAfterRun] - Whether to clean references to test fns and hooks when a suite is done.
|
|
23901
24283
|
* @param {boolean} [opts.delay] - Whether to delay execution of root suite until ready.
|
|
23902
24284
|
* @param {boolean} [opts.dryRun] - Whether to report tests without running them.
|
|
23903
|
-
* @param {boolean} [
|
|
24285
|
+
* @param {boolean} [opts.failZero] - Whether to fail test run if zero tests encountered.
|
|
23904
24286
|
*/
|
|
23905
24287
|
function Runner(suite, opts) {
|
|
23906
24288
|
var _this;
|
|
@@ -23979,7 +24361,7 @@
|
|
|
23979
24361
|
return _this;
|
|
23980
24362
|
}
|
|
23981
24363
|
|
|
23982
|
-
return Runner;
|
|
24364
|
+
return _createClass(Runner);
|
|
23983
24365
|
}(EventEmitter);
|
|
23984
24366
|
/**
|
|
23985
24367
|
* Wrapper for setImmediate, process.nextTick, or browser polyfill.
|
|
@@ -25150,6 +25532,11 @@
|
|
|
25150
25532
|
*/
|
|
25151
25533
|
|
|
25152
25534
|
exports.inlineDiffs = false;
|
|
25535
|
+
/**
|
|
25536
|
+
* Truncate diffs longer than this value to avoid slow performance
|
|
25537
|
+
*/
|
|
25538
|
+
|
|
25539
|
+
exports.maxDiffSize = 8192;
|
|
25153
25540
|
/**
|
|
25154
25541
|
* Default color map.
|
|
25155
25542
|
*/
|
|
@@ -25276,17 +25663,22 @@
|
|
|
25276
25663
|
|
|
25277
25664
|
var generateDiff = exports.generateDiff = function (actual, expected) {
|
|
25278
25665
|
try {
|
|
25279
|
-
var
|
|
25666
|
+
var maxLen = exports.maxDiffSize;
|
|
25667
|
+
var skipped = 0;
|
|
25280
25668
|
|
|
25281
|
-
if (
|
|
25282
|
-
|
|
25669
|
+
if (maxLen > 0) {
|
|
25670
|
+
skipped = Math.max(actual.length - maxLen, expected.length - maxLen);
|
|
25671
|
+
actual = actual.slice(0, maxLen);
|
|
25672
|
+
expected = expected.slice(0, maxLen);
|
|
25283
25673
|
}
|
|
25284
25674
|
|
|
25285
|
-
|
|
25286
|
-
|
|
25675
|
+
var result = exports.inlineDiffs ? inlineDiff(actual, expected) : unifiedDiff(actual, expected);
|
|
25676
|
+
|
|
25677
|
+
if (skipped > 0) {
|
|
25678
|
+
result = "".concat(result, "\n [mocha] output truncated to ").concat(maxLen, " characters, see \"maxDiffSize\" reporter-option\n");
|
|
25287
25679
|
}
|
|
25288
25680
|
|
|
25289
|
-
return
|
|
25681
|
+
return result;
|
|
25290
25682
|
} catch (err) {
|
|
25291
25683
|
var msg = '\n ' + color('diff added', '+ expected') + ' ' + color('diff removed', '- actual: failed to generate Mocha diff') + '\n';
|
|
25292
25684
|
return msg;
|
|
@@ -25403,6 +25795,12 @@
|
|
|
25403
25795
|
this.runner = runner;
|
|
25404
25796
|
this.stats = runner.stats; // assigned so Reporters keep a closer reference
|
|
25405
25797
|
|
|
25798
|
+
var maxDiffSizeOpt = this.options.reporterOption && this.options.reporterOption.maxDiffSize;
|
|
25799
|
+
|
|
25800
|
+
if (maxDiffSizeOpt !== undefined && !isNaN(Number(maxDiffSizeOpt))) {
|
|
25801
|
+
exports.maxDiffSize = Number(maxDiffSizeOpt);
|
|
25802
|
+
}
|
|
25803
|
+
|
|
25406
25804
|
runner.on(EVENT_TEST_PASS, function (test) {
|
|
25407
25805
|
if (test.duration > test.slow()) {
|
|
25408
25806
|
test.speed = 'slow';
|
|
@@ -25867,8 +26265,8 @@
|
|
|
25867
26265
|
|
|
25868
26266
|
function createProducer(tapVersion) {
|
|
25869
26267
|
var producers = {
|
|
25870
|
-
|
|
25871
|
-
|
|
26268
|
+
12: new TAP12Producer(),
|
|
26269
|
+
13: new TAP13Producer()
|
|
25872
26270
|
};
|
|
25873
26271
|
var producer = producers[tapVersion];
|
|
25874
26272
|
|
|
@@ -26222,27 +26620,25 @@
|
|
|
26222
26620
|
JSONReporter.description = 'single JSON object';
|
|
26223
26621
|
});
|
|
26224
26622
|
|
|
26225
|
-
var
|
|
26226
|
-
|
|
26227
|
-
// `thisNumberValue` abstract operation
|
|
26228
|
-
// https://tc39.es/ecma262/#sec-thisnumbervalue
|
|
26229
|
-
var thisNumberValue = function (value) {
|
|
26230
|
-
return valueOf.call(value);
|
|
26231
|
-
};
|
|
26623
|
+
var RangeError$2 = global_1.RangeError;
|
|
26232
26624
|
|
|
26233
26625
|
// `String.prototype.repeat` method implementation
|
|
26234
26626
|
// https://tc39.es/ecma262/#sec-string.prototype.repeat
|
|
26235
26627
|
var stringRepeat = function repeat(count) {
|
|
26236
26628
|
var str = toString_1(requireObjectCoercible(this));
|
|
26237
26629
|
var result = '';
|
|
26238
|
-
var n =
|
|
26239
|
-
if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
|
|
26630
|
+
var n = toIntegerOrInfinity(count);
|
|
26631
|
+
if (n < 0 || n == Infinity) throw RangeError$2('Wrong number of repetitions');
|
|
26240
26632
|
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
|
|
26241
26633
|
return result;
|
|
26242
26634
|
};
|
|
26243
26635
|
|
|
26244
|
-
var
|
|
26636
|
+
var RangeError$1 = global_1.RangeError;
|
|
26637
|
+
var String$1 = global_1.String;
|
|
26245
26638
|
var floor = Math.floor;
|
|
26639
|
+
var repeat = functionUncurryThis(stringRepeat);
|
|
26640
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
26641
|
+
var un$ToFixed = functionUncurryThis(1.0.toFixed);
|
|
26246
26642
|
|
|
26247
26643
|
var pow = function (x, n, acc) {
|
|
26248
26644
|
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
|
|
@@ -26286,20 +26682,20 @@
|
|
|
26286
26682
|
var s = '';
|
|
26287
26683
|
while (--index >= 0) {
|
|
26288
26684
|
if (s !== '' || index === 0 || data[index] !== 0) {
|
|
26289
|
-
var t = String(data[index]);
|
|
26290
|
-
s = s === '' ? t : s +
|
|
26685
|
+
var t = String$1(data[index]);
|
|
26686
|
+
s = s === '' ? t : s + repeat('0', 7 - t.length) + t;
|
|
26291
26687
|
}
|
|
26292
26688
|
} return s;
|
|
26293
26689
|
};
|
|
26294
26690
|
|
|
26295
|
-
var FORCED =
|
|
26296
|
-
0.00008
|
|
26297
|
-
|
|
26298
|
-
|
|
26299
|
-
|
|
26300
|
-
) || !fails(function () {
|
|
26691
|
+
var FORCED = fails(function () {
|
|
26692
|
+
return un$ToFixed(0.00008, 3) !== '0.000' ||
|
|
26693
|
+
un$ToFixed(0.9, 0) !== '1' ||
|
|
26694
|
+
un$ToFixed(1.255, 2) !== '1.25' ||
|
|
26695
|
+
un$ToFixed(1000000000000000128.0, 0) !== '1000000000000000128';
|
|
26696
|
+
}) || !fails(function () {
|
|
26301
26697
|
// V8 ~ Android 4.3-
|
|
26302
|
-
|
|
26698
|
+
un$ToFixed({});
|
|
26303
26699
|
});
|
|
26304
26700
|
|
|
26305
26701
|
// `Number.prototype.toFixed` method
|
|
@@ -26307,16 +26703,17 @@
|
|
|
26307
26703
|
_export({ target: 'Number', proto: true, forced: FORCED }, {
|
|
26308
26704
|
toFixed: function toFixed(fractionDigits) {
|
|
26309
26705
|
var number = thisNumberValue(this);
|
|
26310
|
-
var fractDigits =
|
|
26706
|
+
var fractDigits = toIntegerOrInfinity(fractionDigits);
|
|
26311
26707
|
var data = [0, 0, 0, 0, 0, 0];
|
|
26312
26708
|
var sign = '';
|
|
26313
26709
|
var result = '0';
|
|
26314
26710
|
var e, z, j, k;
|
|
26315
26711
|
|
|
26316
|
-
|
|
26712
|
+
// TODO: ES2018 increased the maximum number of fraction digits to 100, need to improve the implementation
|
|
26713
|
+
if (fractDigits < 0 || fractDigits > 20) throw RangeError$1('Incorrect fraction digits');
|
|
26317
26714
|
// eslint-disable-next-line no-self-compare -- NaN check
|
|
26318
26715
|
if (number != number) return 'NaN';
|
|
26319
|
-
if (number <= -1e21 || number >= 1e21) return String(number);
|
|
26716
|
+
if (number <= -1e21 || number >= 1e21) return String$1(number);
|
|
26320
26717
|
if (number < 0) {
|
|
26321
26718
|
sign = '-';
|
|
26322
26719
|
number = -number;
|
|
@@ -26346,14 +26743,14 @@
|
|
|
26346
26743
|
} else {
|
|
26347
26744
|
multiply(data, 0, z);
|
|
26348
26745
|
multiply(data, 1 << -e, 0);
|
|
26349
|
-
result = dataToString(data) +
|
|
26746
|
+
result = dataToString(data) + repeat('0', fractDigits);
|
|
26350
26747
|
}
|
|
26351
26748
|
}
|
|
26352
26749
|
if (fractDigits > 0) {
|
|
26353
26750
|
k = result.length;
|
|
26354
26751
|
result = sign + (k <= fractDigits
|
|
26355
|
-
? '0.' +
|
|
26356
|
-
: result
|
|
26752
|
+
? '0.' + repeat('0', fractDigits - k) + result
|
|
26753
|
+
: stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));
|
|
26357
26754
|
} else {
|
|
26358
26755
|
result = sign + result;
|
|
26359
26756
|
} return result;
|
|
@@ -27927,7 +28324,7 @@
|
|
|
27927
28324
|
});
|
|
27928
28325
|
|
|
27929
28326
|
var name = "mocha";
|
|
27930
|
-
var version = "9.1
|
|
28327
|
+
var version = "9.2.1";
|
|
27931
28328
|
var homepage = "https://mochajs.org/";
|
|
27932
28329
|
var notifyLogo = "https://ibin.co/4QuRuGjXvl36.png";
|
|
27933
28330
|
var _package = {
|
|
@@ -28910,14 +29307,6 @@
|
|
|
28910
29307
|
exports: exports$1
|
|
28911
29308
|
};
|
|
28912
29309
|
|
|
28913
|
-
/**
|
|
28914
|
-
* @module Context
|
|
28915
|
-
*/
|
|
28916
|
-
|
|
28917
|
-
/**
|
|
28918
|
-
* Expose `Context`.
|
|
28919
|
-
*/
|
|
28920
|
-
|
|
28921
29310
|
var context = Context;
|
|
28922
29311
|
/**
|
|
28923
29312
|
* Initialize a new `Context`.
|
|
@@ -30835,7 +31224,13 @@
|
|
|
30835
31224
|
*/
|
|
30836
31225
|
|
|
30837
31226
|
commonjsGlobal.Mocha = mocha$1;
|
|
30838
|
-
commonjsGlobal.mocha = mocha;
|
|
31227
|
+
commonjsGlobal.mocha = mocha; // for bundlers: enable `import {describe, it} from 'mocha'`
|
|
31228
|
+
// `bdd` interface only
|
|
31229
|
+
// prettier-ignore
|
|
31230
|
+
|
|
31231
|
+
['describe', 'context', 'it', 'specify', 'xdescribe', 'xcontext', 'xit', 'xspecify', 'before', 'beforeEach', 'afterEach', 'after'].forEach(function (key) {
|
|
31232
|
+
mocha[key] = commonjsGlobal[key];
|
|
31233
|
+
});
|
|
30839
31234
|
var browserEntry = mocha;
|
|
30840
31235
|
|
|
30841
31236
|
return browserEntry;
|