@auth0/auth0-spa-js 1.19.0 → 1.19.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auth0-spa-js.development.js +445 -250
- package/dist/auth0-spa-js.development.js.map +1 -1
- package/dist/auth0-spa-js.production.esm.js +1 -1
- package/dist/auth0-spa-js.production.esm.js.map +1 -1
- package/dist/auth0-spa-js.production.js +1 -1
- package/dist/auth0-spa-js.production.js.map +1 -1
- package/dist/lib/auth0-spa-js.cjs.js +445 -250
- package/dist/lib/auth0-spa-js.cjs.js.map +1 -1
- package/dist/typings/Auth0Client.d.ts +9 -3
- package/dist/typings/global.d.ts +5 -5
- package/dist/typings/index.d.ts +9 -0
- package/dist/typings/storage.d.ts +1 -1
- package/dist/typings/transaction-manager.d.ts +2 -1
- package/dist/typings/version.d.ts +1 -1
- package/package.json +15 -15
- package/src/Auth0Client.ts +46 -18
- package/src/global.ts +6 -5
- package/src/index.ts +9 -0
- package/src/storage.ts +1 -1
- package/src/transaction-manager.ts +4 -3
- package/src/version.ts +1 -1
|
@@ -162,6 +162,12 @@
|
|
|
162
162
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
163
163
|
});
|
|
164
164
|
|
|
165
|
+
var call$2 = Function.prototype.call;
|
|
166
|
+
|
|
167
|
+
var functionCall = call$2.bind ? call$2.bind(call$2) : function () {
|
|
168
|
+
return call$2.apply(call$2, arguments);
|
|
169
|
+
};
|
|
170
|
+
|
|
165
171
|
var $propertyIsEnumerable$1 = {}.propertyIsEnumerable;
|
|
166
172
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
167
173
|
var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
|
|
@@ -189,27 +195,44 @@
|
|
|
189
195
|
};
|
|
190
196
|
};
|
|
191
197
|
|
|
192
|
-
var
|
|
198
|
+
var FunctionPrototype$2 = Function.prototype;
|
|
199
|
+
var bind$3 = FunctionPrototype$2.bind;
|
|
200
|
+
var call$1 = FunctionPrototype$2.call;
|
|
201
|
+
var callBind = bind$3 && bind$3.bind(call$1);
|
|
202
|
+
|
|
203
|
+
var functionUncurryThis = bind$3 ? function (fn) {
|
|
204
|
+
return fn && callBind(call$1, fn);
|
|
205
|
+
} : function (fn) {
|
|
206
|
+
return fn && function () {
|
|
207
|
+
return call$1.apply(fn, arguments);
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
var toString$1 = functionUncurryThis({}.toString);
|
|
212
|
+
var stringSlice$3 = functionUncurryThis(''.slice);
|
|
193
213
|
|
|
194
214
|
var classofRaw = function (it) {
|
|
195
|
-
return toString$1
|
|
215
|
+
return stringSlice$3(toString$1(it), 8, -1);
|
|
196
216
|
};
|
|
197
217
|
|
|
198
|
-
var
|
|
218
|
+
var Object$5 = global_1.Object;
|
|
219
|
+
var split = functionUncurryThis(''.split);
|
|
199
220
|
|
|
200
221
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
201
222
|
var indexedObject = fails(function () {
|
|
202
223
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
203
224
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
204
|
-
return !Object('z').propertyIsEnumerable(0);
|
|
225
|
+
return !Object$5('z').propertyIsEnumerable(0);
|
|
205
226
|
}) ? function (it) {
|
|
206
|
-
return classofRaw(it) == 'String' ? split
|
|
207
|
-
} : Object;
|
|
227
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$5(it);
|
|
228
|
+
} : Object$5;
|
|
229
|
+
|
|
230
|
+
var TypeError$g = global_1.TypeError;
|
|
208
231
|
|
|
209
232
|
// `RequireObjectCoercible` abstract operation
|
|
210
233
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
211
234
|
var requireObjectCoercible = function (it) {
|
|
212
|
-
if (it == undefined) throw TypeError("Can't call method on " + it);
|
|
235
|
+
if (it == undefined) throw TypeError$g("Can't call method on " + it);
|
|
213
236
|
return it;
|
|
214
237
|
};
|
|
215
238
|
|
|
@@ -224,11 +247,11 @@
|
|
|
224
247
|
// `IsCallable` abstract operation
|
|
225
248
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
226
249
|
var isCallable = function (argument) {
|
|
227
|
-
return typeof argument
|
|
250
|
+
return typeof argument == 'function';
|
|
228
251
|
};
|
|
229
252
|
|
|
230
253
|
var isObject = function (it) {
|
|
231
|
-
return typeof it
|
|
254
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
232
255
|
};
|
|
233
256
|
|
|
234
257
|
var aFunction = function (argument) {
|
|
@@ -239,6 +262,8 @@
|
|
|
239
262
|
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
|
240
263
|
};
|
|
241
264
|
|
|
265
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
266
|
+
|
|
242
267
|
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
243
268
|
|
|
244
269
|
var process = global_1.process;
|
|
@@ -249,23 +274,29 @@
|
|
|
249
274
|
|
|
250
275
|
if (v8) {
|
|
251
276
|
match = v8.split('.');
|
|
252
|
-
|
|
253
|
-
|
|
277
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
278
|
+
// but their correct versions are not interesting for us
|
|
279
|
+
version$1 = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
283
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
284
|
+
if (!version$1 && engineUserAgent) {
|
|
254
285
|
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
255
286
|
if (!match || match[1] >= 74) {
|
|
256
287
|
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
257
|
-
if (match) version$1 = match[1];
|
|
288
|
+
if (match) version$1 = +match[1];
|
|
258
289
|
}
|
|
259
290
|
}
|
|
260
291
|
|
|
261
|
-
var engineV8Version = version$1
|
|
292
|
+
var engineV8Version = version$1;
|
|
262
293
|
|
|
263
294
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
264
295
|
|
|
265
296
|
|
|
266
297
|
|
|
267
298
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
268
|
-
var nativeSymbol
|
|
299
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
269
300
|
var symbol = Symbol();
|
|
270
301
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
271
302
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -277,29 +308,35 @@
|
|
|
277
308
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
278
309
|
|
|
279
310
|
|
|
280
|
-
var useSymbolAsUid = nativeSymbol
|
|
311
|
+
var useSymbolAsUid = nativeSymbol
|
|
281
312
|
&& !Symbol.sham
|
|
282
313
|
&& typeof Symbol.iterator == 'symbol';
|
|
283
314
|
|
|
315
|
+
var Object$4 = global_1.Object;
|
|
316
|
+
|
|
284
317
|
var isSymbol = useSymbolAsUid ? function (it) {
|
|
285
318
|
return typeof it == 'symbol';
|
|
286
319
|
} : function (it) {
|
|
287
320
|
var $Symbol = getBuiltIn('Symbol');
|
|
288
|
-
return isCallable($Symbol) && Object(it)
|
|
321
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$4(it));
|
|
289
322
|
};
|
|
290
323
|
|
|
324
|
+
var String$4 = global_1.String;
|
|
325
|
+
|
|
291
326
|
var tryToString = function (argument) {
|
|
292
327
|
try {
|
|
293
|
-
return String(argument);
|
|
328
|
+
return String$4(argument);
|
|
294
329
|
} catch (error) {
|
|
295
330
|
return 'Object';
|
|
296
331
|
}
|
|
297
332
|
};
|
|
298
333
|
|
|
334
|
+
var TypeError$f = global_1.TypeError;
|
|
335
|
+
|
|
299
336
|
// `Assert: IsCallable(argument) is true`
|
|
300
337
|
var aCallable = function (argument) {
|
|
301
338
|
if (isCallable(argument)) return argument;
|
|
302
|
-
throw TypeError(tryToString(argument) + ' is not a function');
|
|
339
|
+
throw TypeError$f(tryToString(argument) + ' is not a function');
|
|
303
340
|
};
|
|
304
341
|
|
|
305
342
|
// `GetMethod` abstract operation
|
|
@@ -309,20 +346,24 @@
|
|
|
309
346
|
return func == null ? undefined : aCallable(func);
|
|
310
347
|
};
|
|
311
348
|
|
|
349
|
+
var TypeError$e = global_1.TypeError;
|
|
350
|
+
|
|
312
351
|
// `OrdinaryToPrimitive` abstract operation
|
|
313
352
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
314
353
|
var ordinaryToPrimitive = function (input, pref) {
|
|
315
354
|
var fn, val;
|
|
316
|
-
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = fn
|
|
317
|
-
if (isCallable(fn = input.valueOf) && !isObject(val = fn
|
|
318
|
-
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = fn
|
|
319
|
-
throw TypeError("Can't convert object to primitive value");
|
|
355
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
356
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
357
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
358
|
+
throw TypeError$e("Can't convert object to primitive value");
|
|
320
359
|
};
|
|
321
360
|
|
|
361
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
362
|
+
var defineProperty$6 = Object.defineProperty;
|
|
363
|
+
|
|
322
364
|
var setGlobal = function (key, value) {
|
|
323
365
|
try {
|
|
324
|
-
|
|
325
|
-
Object.defineProperty(global_1, key, { value: value, configurable: true, writable: true });
|
|
366
|
+
defineProperty$6(global_1, key, { value: value, configurable: true, writable: true });
|
|
326
367
|
} catch (error) {
|
|
327
368
|
global_1[key] = value;
|
|
328
369
|
} return value;
|
|
@@ -337,47 +378,55 @@
|
|
|
337
378
|
(module.exports = function (key, value) {
|
|
338
379
|
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
339
380
|
})('versions', []).push({
|
|
340
|
-
version: '3.
|
|
381
|
+
version: '3.20.0',
|
|
341
382
|
mode: 'global',
|
|
342
383
|
copyright: '© 2021 Denis Pushkarev (zloirock.ru)'
|
|
343
384
|
});
|
|
344
385
|
});
|
|
345
386
|
|
|
387
|
+
var Object$3 = global_1.Object;
|
|
388
|
+
|
|
346
389
|
// `ToObject` abstract operation
|
|
347
390
|
// https://tc39.es/ecma262/#sec-toobject
|
|
348
391
|
var toObject = function (argument) {
|
|
349
|
-
return Object(requireObjectCoercible(argument));
|
|
392
|
+
return Object$3(requireObjectCoercible(argument));
|
|
350
393
|
};
|
|
351
394
|
|
|
352
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
395
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
353
396
|
|
|
354
397
|
// `HasOwnProperty` abstract operation
|
|
355
398
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
356
399
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
357
|
-
return hasOwnProperty
|
|
400
|
+
return hasOwnProperty(toObject(it), key);
|
|
358
401
|
};
|
|
359
402
|
|
|
360
403
|
var id = 0;
|
|
361
404
|
var postfix = Math.random();
|
|
405
|
+
var toString = functionUncurryThis(1.0.toString);
|
|
362
406
|
|
|
363
407
|
var uid = function (key) {
|
|
364
|
-
return 'Symbol(' +
|
|
408
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
365
409
|
};
|
|
366
410
|
|
|
367
411
|
var WellKnownSymbolsStore$1 = shared('wks');
|
|
368
412
|
var Symbol$1 = global_1.Symbol;
|
|
413
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
369
414
|
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
370
415
|
|
|
371
416
|
var wellKnownSymbol = function (name) {
|
|
372
|
-
if (!hasOwnProperty_1(WellKnownSymbolsStore$1, name) || !(nativeSymbol
|
|
373
|
-
|
|
417
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore$1, name) || !(nativeSymbol || typeof WellKnownSymbolsStore$1[name] == 'string')) {
|
|
418
|
+
var description = 'Symbol.' + name;
|
|
419
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
374
420
|
WellKnownSymbolsStore$1[name] = Symbol$1[name];
|
|
421
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
422
|
+
WellKnownSymbolsStore$1[name] = symbolFor(description);
|
|
375
423
|
} else {
|
|
376
|
-
WellKnownSymbolsStore$1[name] = createWellKnownSymbol(
|
|
424
|
+
WellKnownSymbolsStore$1[name] = createWellKnownSymbol(description);
|
|
377
425
|
}
|
|
378
426
|
} return WellKnownSymbolsStore$1[name];
|
|
379
427
|
};
|
|
380
428
|
|
|
429
|
+
var TypeError$d = global_1.TypeError;
|
|
381
430
|
var TO_PRIMITIVE$1 = wellKnownSymbol('toPrimitive');
|
|
382
431
|
|
|
383
432
|
// `ToPrimitive` abstract operation
|
|
@@ -388,9 +437,9 @@
|
|
|
388
437
|
var result;
|
|
389
438
|
if (exoticToPrim) {
|
|
390
439
|
if (pref === undefined) pref = 'default';
|
|
391
|
-
result = exoticToPrim
|
|
440
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
392
441
|
if (!isObject(result) || isSymbol(result)) return result;
|
|
393
|
-
throw TypeError("Can't convert object to primitive value");
|
|
442
|
+
throw TypeError$d("Can't convert object to primitive value");
|
|
394
443
|
}
|
|
395
444
|
if (pref === undefined) pref = 'number';
|
|
396
445
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -400,7 +449,7 @@
|
|
|
400
449
|
// https://tc39.es/ecma262/#sec-topropertykey
|
|
401
450
|
var toPropertyKey = function (argument) {
|
|
402
451
|
var key = toPrimitive(argument, 'string');
|
|
403
|
-
return isSymbol(key) ? key :
|
|
452
|
+
return isSymbol(key) ? key : key + '';
|
|
404
453
|
};
|
|
405
454
|
|
|
406
455
|
var document$1 = global_1.document;
|
|
@@ -430,19 +479,23 @@
|
|
|
430
479
|
if (ie8DomDefine) try {
|
|
431
480
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
432
481
|
} catch (error) { /* empty */ }
|
|
433
|
-
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f
|
|
482
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
434
483
|
};
|
|
435
484
|
|
|
436
485
|
var objectGetOwnPropertyDescriptor = {
|
|
437
486
|
f: f$5
|
|
438
487
|
};
|
|
439
488
|
|
|
489
|
+
var String$3 = global_1.String;
|
|
490
|
+
var TypeError$c = global_1.TypeError;
|
|
491
|
+
|
|
440
492
|
// `Assert: Type(argument) is Object`
|
|
441
493
|
var anObject = function (argument) {
|
|
442
494
|
if (isObject(argument)) return argument;
|
|
443
|
-
throw TypeError(String(argument) + ' is not an object');
|
|
495
|
+
throw TypeError$c(String$3(argument) + ' is not an object');
|
|
444
496
|
};
|
|
445
497
|
|
|
498
|
+
var TypeError$b = global_1.TypeError;
|
|
446
499
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
447
500
|
var $defineProperty$1 = Object.defineProperty;
|
|
448
501
|
|
|
@@ -455,7 +508,7 @@
|
|
|
455
508
|
if (ie8DomDefine) try {
|
|
456
509
|
return $defineProperty$1(O, P, Attributes);
|
|
457
510
|
} catch (error) { /* empty */ }
|
|
458
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
511
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$b('Accessors not supported');
|
|
459
512
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
460
513
|
return O;
|
|
461
514
|
};
|
|
@@ -471,12 +524,12 @@
|
|
|
471
524
|
return object;
|
|
472
525
|
};
|
|
473
526
|
|
|
474
|
-
var functionToString = Function.toString;
|
|
527
|
+
var functionToString = functionUncurryThis(Function.toString);
|
|
475
528
|
|
|
476
529
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
477
530
|
if (!isCallable(sharedStore.inspectSource)) {
|
|
478
531
|
sharedStore.inspectSource = function (it) {
|
|
479
|
-
return functionToString
|
|
532
|
+
return functionToString(it);
|
|
480
533
|
};
|
|
481
534
|
}
|
|
482
535
|
|
|
@@ -495,6 +548,7 @@
|
|
|
495
548
|
var hiddenKeys$1 = {};
|
|
496
549
|
|
|
497
550
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
551
|
+
var TypeError$a = global_1.TypeError;
|
|
498
552
|
var WeakMap = global_1.WeakMap;
|
|
499
553
|
var set, get, has;
|
|
500
554
|
|
|
@@ -506,33 +560,33 @@
|
|
|
506
560
|
return function (it) {
|
|
507
561
|
var state;
|
|
508
562
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
509
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
563
|
+
throw TypeError$a('Incompatible receiver, ' + TYPE + ' required');
|
|
510
564
|
} return state;
|
|
511
565
|
};
|
|
512
566
|
};
|
|
513
567
|
|
|
514
568
|
if (nativeWeakMap || sharedStore.state) {
|
|
515
569
|
var store = sharedStore.state || (sharedStore.state = new WeakMap());
|
|
516
|
-
var wmget = store.get;
|
|
517
|
-
var wmhas = store.has;
|
|
518
|
-
var wmset = store.set;
|
|
570
|
+
var wmget = functionUncurryThis(store.get);
|
|
571
|
+
var wmhas = functionUncurryThis(store.has);
|
|
572
|
+
var wmset = functionUncurryThis(store.set);
|
|
519
573
|
set = function (it, metadata) {
|
|
520
|
-
if (wmhas
|
|
574
|
+
if (wmhas(store, it)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
|
|
521
575
|
metadata.facade = it;
|
|
522
|
-
wmset
|
|
576
|
+
wmset(store, it, metadata);
|
|
523
577
|
return metadata;
|
|
524
578
|
};
|
|
525
579
|
get = function (it) {
|
|
526
|
-
return wmget
|
|
580
|
+
return wmget(store, it) || {};
|
|
527
581
|
};
|
|
528
582
|
has = function (it) {
|
|
529
|
-
return wmhas
|
|
583
|
+
return wmhas(store, it);
|
|
530
584
|
};
|
|
531
585
|
} else {
|
|
532
586
|
var STATE = sharedKey('state');
|
|
533
587
|
hiddenKeys$1[STATE] = true;
|
|
534
588
|
set = function (it, metadata) {
|
|
535
|
-
if (hasOwnProperty_1(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);
|
|
589
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
|
|
536
590
|
metadata.facade = it;
|
|
537
591
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
538
592
|
return metadata;
|
|
@@ -553,14 +607,14 @@
|
|
|
553
607
|
getterFor: getterFor
|
|
554
608
|
};
|
|
555
609
|
|
|
556
|
-
var FunctionPrototype = Function.prototype;
|
|
610
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
557
611
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
558
612
|
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
559
613
|
|
|
560
|
-
var EXISTS = hasOwnProperty_1(FunctionPrototype, 'name');
|
|
614
|
+
var EXISTS = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
561
615
|
// additional protection from minified / mangled / dropped function names
|
|
562
616
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
563
|
-
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
617
|
+
var CONFIGURABLE = EXISTS && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
564
618
|
|
|
565
619
|
var functionName = {
|
|
566
620
|
EXISTS: EXISTS,
|
|
@@ -621,7 +675,7 @@
|
|
|
621
675
|
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
622
676
|
};
|
|
623
677
|
|
|
624
|
-
var max = Math.max;
|
|
678
|
+
var max$1 = Math.max;
|
|
625
679
|
var min$2 = Math.min;
|
|
626
680
|
|
|
627
681
|
// Helper for a popular repeating case of the spec:
|
|
@@ -629,7 +683,7 @@
|
|
|
629
683
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
630
684
|
var toAbsoluteIndex = function (index, length) {
|
|
631
685
|
var integer = toIntegerOrInfinity(index);
|
|
632
|
-
return integer < 0 ? max(integer + length, 0) : min$2(integer, length);
|
|
686
|
+
return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
|
|
633
687
|
};
|
|
634
688
|
|
|
635
689
|
var min$1 = Math.min;
|
|
@@ -678,15 +732,17 @@
|
|
|
678
732
|
var indexOf = arrayIncludes.indexOf;
|
|
679
733
|
|
|
680
734
|
|
|
735
|
+
var push$2 = functionUncurryThis([].push);
|
|
736
|
+
|
|
681
737
|
var objectKeysInternal = function (object, names) {
|
|
682
738
|
var O = toIndexedObject(object);
|
|
683
739
|
var i = 0;
|
|
684
740
|
var result = [];
|
|
685
741
|
var key;
|
|
686
|
-
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) &&
|
|
742
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys$1, key) && hasOwnProperty_1(O, key) && push$2(result, key);
|
|
687
743
|
// Don't enum bug & hidden keys
|
|
688
744
|
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
689
|
-
~indexOf(result, key) ||
|
|
745
|
+
~indexOf(result, key) || push$2(result, key);
|
|
690
746
|
}
|
|
691
747
|
return result;
|
|
692
748
|
};
|
|
@@ -722,20 +778,24 @@
|
|
|
722
778
|
f: f$2
|
|
723
779
|
};
|
|
724
780
|
|
|
781
|
+
var concat = functionUncurryThis([].concat);
|
|
782
|
+
|
|
725
783
|
// all object keys, includes non-enumerable and symbols
|
|
726
784
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
727
785
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
728
786
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
729
|
-
return getOwnPropertySymbols ?
|
|
787
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
730
788
|
};
|
|
731
789
|
|
|
732
|
-
var copyConstructorProperties = function (target, source) {
|
|
790
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
733
791
|
var keys = ownKeys(source);
|
|
734
792
|
var defineProperty = objectDefineProperty.f;
|
|
735
793
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
736
794
|
for (var i = 0; i < keys.length; i++) {
|
|
737
795
|
var key = keys[i];
|
|
738
|
-
if (!hasOwnProperty_1(target, key)
|
|
796
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
797
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
798
|
+
}
|
|
739
799
|
}
|
|
740
800
|
};
|
|
741
801
|
|
|
@@ -802,7 +862,7 @@
|
|
|
802
862
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
803
863
|
// contained in target
|
|
804
864
|
if (!FORCED && targetProperty !== undefined) {
|
|
805
|
-
if (typeof sourceProperty
|
|
865
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
806
866
|
copyConstructorProperties(sourceProperty, targetProperty);
|
|
807
867
|
}
|
|
808
868
|
// add a flag to not completely full polyfills
|
|
@@ -822,6 +882,8 @@
|
|
|
822
882
|
var toStringTagSupport = String(test) === '[object z]';
|
|
823
883
|
|
|
824
884
|
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
885
|
+
var Object$2 = global_1.Object;
|
|
886
|
+
|
|
825
887
|
// ES3 wrong here
|
|
826
888
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
827
889
|
|
|
@@ -837,16 +899,18 @@
|
|
|
837
899
|
var O, tag, result;
|
|
838
900
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
839
901
|
// @@toStringTag case
|
|
840
|
-
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$2)) == 'string' ? tag
|
|
902
|
+
: typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$2)) == 'string' ? tag
|
|
841
903
|
// builtinTag case
|
|
842
904
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
843
905
|
// ES3 arguments fallback
|
|
844
906
|
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
845
907
|
};
|
|
846
908
|
|
|
909
|
+
var String$2 = global_1.String;
|
|
910
|
+
|
|
847
911
|
var toString_1 = function (argument) {
|
|
848
912
|
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
849
|
-
return String(argument);
|
|
913
|
+
return String$2(argument);
|
|
850
914
|
};
|
|
851
915
|
|
|
852
916
|
var MATCH$1 = wellKnownSymbol('match');
|
|
@@ -858,9 +922,11 @@
|
|
|
858
922
|
return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classofRaw(it) == 'RegExp');
|
|
859
923
|
};
|
|
860
924
|
|
|
925
|
+
var TypeError$9 = global_1.TypeError;
|
|
926
|
+
|
|
861
927
|
var notARegexp = function (it) {
|
|
862
928
|
if (isRegexp(it)) {
|
|
863
|
-
throw TypeError("The method doesn't accept regular expressions");
|
|
929
|
+
throw TypeError$9("The method doesn't accept regular expressions");
|
|
864
930
|
} return it;
|
|
865
931
|
};
|
|
866
932
|
|
|
@@ -887,7 +953,8 @@
|
|
|
887
953
|
|
|
888
954
|
|
|
889
955
|
// eslint-disable-next-line es/no-string-prototype-startswith -- safe
|
|
890
|
-
var $
|
|
956
|
+
var un$StartsWith = functionUncurryThis(''.startsWith);
|
|
957
|
+
var stringSlice$2 = functionUncurryThis(''.slice);
|
|
891
958
|
var min = Math.min;
|
|
892
959
|
|
|
893
960
|
var CORRECT_IS_REGEXP_LOGIC = correctIsRegexpLogic('startsWith');
|
|
@@ -905,39 +972,14 @@
|
|
|
905
972
|
notARegexp(searchString);
|
|
906
973
|
var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
|
|
907
974
|
var search = toString_1(searchString);
|
|
908
|
-
return $
|
|
909
|
-
? $
|
|
910
|
-
: that
|
|
975
|
+
return un$StartsWith
|
|
976
|
+
? un$StartsWith(that, search, index)
|
|
977
|
+
: stringSlice$2(that, index, index + search.length) === search;
|
|
911
978
|
}
|
|
912
979
|
});
|
|
913
980
|
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
aCallable(fn);
|
|
917
|
-
if (that === undefined) return fn;
|
|
918
|
-
switch (length) {
|
|
919
|
-
case 0: return function () {
|
|
920
|
-
return fn.call(that);
|
|
921
|
-
};
|
|
922
|
-
case 1: return function (a) {
|
|
923
|
-
return fn.call(that, a);
|
|
924
|
-
};
|
|
925
|
-
case 2: return function (a, b) {
|
|
926
|
-
return fn.call(that, a, b);
|
|
927
|
-
};
|
|
928
|
-
case 3: return function (a, b, c) {
|
|
929
|
-
return fn.call(that, a, b, c);
|
|
930
|
-
};
|
|
931
|
-
}
|
|
932
|
-
return function (/* ...args */) {
|
|
933
|
-
return fn.apply(that, arguments);
|
|
934
|
-
};
|
|
935
|
-
};
|
|
936
|
-
|
|
937
|
-
var call = Function.call;
|
|
938
|
-
|
|
939
|
-
var entryUnbind = function (CONSTRUCTOR, METHOD, length) {
|
|
940
|
-
return functionBindContext(call, global_1[CONSTRUCTOR].prototype[METHOD], length);
|
|
981
|
+
var entryUnbind = function (CONSTRUCTOR, METHOD) {
|
|
982
|
+
return functionUncurryThis(global_1[CONSTRUCTOR].prototype[METHOD]);
|
|
941
983
|
};
|
|
942
984
|
|
|
943
985
|
entryUnbind('String', 'startsWith');
|
|
@@ -955,32 +997,42 @@
|
|
|
955
997
|
else object[propertyKey] = value;
|
|
956
998
|
};
|
|
957
999
|
|
|
1000
|
+
var noop$1 = function () { /* empty */ };
|
|
958
1001
|
var empty = [];
|
|
959
1002
|
var construct = getBuiltIn('Reflect', 'construct');
|
|
960
1003
|
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
961
|
-
var exec = constructorRegExp.exec;
|
|
962
|
-
var INCORRECT_TO_STRING = !constructorRegExp.exec(
|
|
1004
|
+
var exec = functionUncurryThis(constructorRegExp.exec);
|
|
1005
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop$1);
|
|
963
1006
|
|
|
964
|
-
var isConstructorModern = function (argument) {
|
|
1007
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
965
1008
|
if (!isCallable(argument)) return false;
|
|
966
1009
|
try {
|
|
967
|
-
construct(
|
|
1010
|
+
construct(noop$1, empty, argument);
|
|
968
1011
|
return true;
|
|
969
1012
|
} catch (error) {
|
|
970
1013
|
return false;
|
|
971
1014
|
}
|
|
972
1015
|
};
|
|
973
1016
|
|
|
974
|
-
var isConstructorLegacy = function (argument) {
|
|
1017
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
975
1018
|
if (!isCallable(argument)) return false;
|
|
976
1019
|
switch (classof(argument)) {
|
|
977
1020
|
case 'AsyncFunction':
|
|
978
1021
|
case 'GeneratorFunction':
|
|
979
1022
|
case 'AsyncGeneratorFunction': return false;
|
|
1023
|
+
}
|
|
1024
|
+
try {
|
|
980
1025
|
// we can't check .prototype since constructors produced by .bind haven't it
|
|
981
|
-
|
|
1026
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1027
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
1028
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
1029
|
+
} catch (error) {
|
|
1030
|
+
return true;
|
|
1031
|
+
}
|
|
982
1032
|
};
|
|
983
1033
|
|
|
1034
|
+
isConstructorLegacy.sham = true;
|
|
1035
|
+
|
|
984
1036
|
// `IsConstructor` abstract operation
|
|
985
1037
|
// https://tc39.es/ecma262/#sec-isconstructor
|
|
986
1038
|
var isConstructor = !construct || fails(function () {
|
|
@@ -992,6 +1044,7 @@
|
|
|
992
1044
|
}) ? isConstructorLegacy : isConstructorModern;
|
|
993
1045
|
|
|
994
1046
|
var SPECIES$3 = wellKnownSymbol('species');
|
|
1047
|
+
var Array$3 = global_1.Array;
|
|
995
1048
|
|
|
996
1049
|
// a part of `ArraySpeciesCreate` abstract operation
|
|
997
1050
|
// https://tc39.es/ecma262/#sec-arrayspeciescreate
|
|
@@ -1000,12 +1053,12 @@
|
|
|
1000
1053
|
if (isArray$1(originalArray)) {
|
|
1001
1054
|
C = originalArray.constructor;
|
|
1002
1055
|
// cross-realm fallback
|
|
1003
|
-
if (isConstructor(C) && (C === Array || isArray$1(C.prototype))) C = undefined;
|
|
1056
|
+
if (isConstructor(C) && (C === Array$3 || isArray$1(C.prototype))) C = undefined;
|
|
1004
1057
|
else if (isObject(C)) {
|
|
1005
1058
|
C = C[SPECIES$3];
|
|
1006
1059
|
if (C === null) C = undefined;
|
|
1007
1060
|
}
|
|
1008
|
-
} return C === undefined ? Array : C;
|
|
1061
|
+
} return C === undefined ? Array$3 : C;
|
|
1009
1062
|
};
|
|
1010
1063
|
|
|
1011
1064
|
// `ArraySpeciesCreate` abstract operation
|
|
@@ -1033,6 +1086,7 @@
|
|
|
1033
1086
|
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
|
|
1034
1087
|
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
|
|
1035
1088
|
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
|
|
1089
|
+
var TypeError$8 = global_1.TypeError;
|
|
1036
1090
|
|
|
1037
1091
|
// We can't use this feature detection in V8 since it causes
|
|
1038
1092
|
// deoptimization and serious performance degradation
|
|
@@ -1067,10 +1121,10 @@
|
|
|
1067
1121
|
E = i === -1 ? O : arguments[i];
|
|
1068
1122
|
if (isConcatSpreadable(E)) {
|
|
1069
1123
|
len = lengthOfArrayLike(E);
|
|
1070
|
-
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1124
|
+
if (n + len > MAX_SAFE_INTEGER) throw TypeError$8(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1071
1125
|
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
|
|
1072
1126
|
} else {
|
|
1073
|
-
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1127
|
+
if (n >= MAX_SAFE_INTEGER) throw TypeError$8(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
|
|
1074
1128
|
createProperty(A, n++, E);
|
|
1075
1129
|
}
|
|
1076
1130
|
}
|
|
@@ -1091,6 +1145,16 @@
|
|
|
1091
1145
|
redefine(Object.prototype, 'toString', objectToString, { unsafe: true });
|
|
1092
1146
|
}
|
|
1093
1147
|
|
|
1148
|
+
var FunctionPrototype = Function.prototype;
|
|
1149
|
+
var apply = FunctionPrototype.apply;
|
|
1150
|
+
var bind$2 = FunctionPrototype.bind;
|
|
1151
|
+
var call = FunctionPrototype.call;
|
|
1152
|
+
|
|
1153
|
+
// eslint-disable-next-line es/no-reflect -- safe
|
|
1154
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (bind$2 ? call.bind(apply) : function () {
|
|
1155
|
+
return call.apply(apply, arguments);
|
|
1156
|
+
});
|
|
1157
|
+
|
|
1094
1158
|
// `Object.keys` method
|
|
1095
1159
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
1096
1160
|
// eslint-disable-next-line es/no-object-keys -- safe
|
|
@@ -1103,11 +1167,12 @@
|
|
|
1103
1167
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1104
1168
|
var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1105
1169
|
anObject(O);
|
|
1170
|
+
var props = toIndexedObject(Properties);
|
|
1106
1171
|
var keys = objectKeys(Properties);
|
|
1107
1172
|
var length = keys.length;
|
|
1108
1173
|
var index = 0;
|
|
1109
1174
|
var key;
|
|
1110
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++],
|
|
1175
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
1111
1176
|
return O;
|
|
1112
1177
|
};
|
|
1113
1178
|
|
|
@@ -1196,11 +1261,24 @@
|
|
|
1196
1261
|
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
|
1197
1262
|
};
|
|
1198
1263
|
|
|
1264
|
+
var Array$2 = global_1.Array;
|
|
1265
|
+
var max = Math.max;
|
|
1266
|
+
|
|
1267
|
+
var arraySliceSimple = function (O, start, end) {
|
|
1268
|
+
var length = lengthOfArrayLike(O);
|
|
1269
|
+
var k = toAbsoluteIndex(start, length);
|
|
1270
|
+
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
|
|
1271
|
+
var result = Array$2(max(fin - k, 0));
|
|
1272
|
+
for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);
|
|
1273
|
+
result.length = n;
|
|
1274
|
+
return result;
|
|
1275
|
+
};
|
|
1276
|
+
|
|
1199
1277
|
/* eslint-disable es/no-object-getownpropertynames -- safe */
|
|
1200
1278
|
|
|
1279
|
+
|
|
1201
1280
|
var $getOwnPropertyNames$1 = objectGetOwnPropertyNames.f;
|
|
1202
1281
|
|
|
1203
|
-
var toString = {}.toString;
|
|
1204
1282
|
|
|
1205
1283
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
1206
1284
|
? Object.getOwnPropertyNames(window) : [];
|
|
@@ -1209,13 +1287,13 @@
|
|
|
1209
1287
|
try {
|
|
1210
1288
|
return $getOwnPropertyNames$1(it);
|
|
1211
1289
|
} catch (error) {
|
|
1212
|
-
return windowNames
|
|
1290
|
+
return arraySliceSimple(windowNames);
|
|
1213
1291
|
}
|
|
1214
1292
|
};
|
|
1215
1293
|
|
|
1216
1294
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
1217
1295
|
var f$1 = function getOwnPropertyNames(it) {
|
|
1218
|
-
return windowNames &&
|
|
1296
|
+
return windowNames && classofRaw(it) == 'Window'
|
|
1219
1297
|
? getWindowNames(it)
|
|
1220
1298
|
: $getOwnPropertyNames$1(toIndexedObject(it));
|
|
1221
1299
|
};
|
|
@@ -1224,6 +1302,8 @@
|
|
|
1224
1302
|
f: f$1
|
|
1225
1303
|
};
|
|
1226
1304
|
|
|
1305
|
+
var arraySlice = functionUncurryThis([].slice);
|
|
1306
|
+
|
|
1227
1307
|
var f = wellKnownSymbol;
|
|
1228
1308
|
|
|
1229
1309
|
var wellKnownSymbolWrapped = {
|
|
@@ -1232,28 +1312,39 @@
|
|
|
1232
1312
|
|
|
1233
1313
|
var path = global_1;
|
|
1234
1314
|
|
|
1235
|
-
var defineProperty$
|
|
1315
|
+
var defineProperty$5 = objectDefineProperty.f;
|
|
1236
1316
|
|
|
1237
1317
|
var defineWellKnownSymbol = function (NAME) {
|
|
1238
1318
|
var Symbol = path.Symbol || (path.Symbol = {});
|
|
1239
|
-
if (!hasOwnProperty_1(Symbol, NAME)) defineProperty$
|
|
1319
|
+
if (!hasOwnProperty_1(Symbol, NAME)) defineProperty$5(Symbol, NAME, {
|
|
1240
1320
|
value: wellKnownSymbolWrapped.f(NAME)
|
|
1241
1321
|
});
|
|
1242
1322
|
};
|
|
1243
1323
|
|
|
1244
|
-
var defineProperty$
|
|
1324
|
+
var defineProperty$4 = objectDefineProperty.f;
|
|
1245
1325
|
|
|
1246
1326
|
|
|
1247
1327
|
|
|
1248
1328
|
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
1249
1329
|
|
|
1250
|
-
var setToStringTag = function (
|
|
1251
|
-
if (
|
|
1252
|
-
|
|
1330
|
+
var setToStringTag = function (target, TAG, STATIC) {
|
|
1331
|
+
if (target && !STATIC) target = target.prototype;
|
|
1332
|
+
if (target && !hasOwnProperty_1(target, TO_STRING_TAG$1)) {
|
|
1333
|
+
defineProperty$4(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
|
|
1253
1334
|
}
|
|
1254
1335
|
};
|
|
1255
1336
|
|
|
1256
|
-
var
|
|
1337
|
+
var bind$1 = functionUncurryThis(functionUncurryThis.bind);
|
|
1338
|
+
|
|
1339
|
+
// optional / simple context binding
|
|
1340
|
+
var functionBindContext = function (fn, that) {
|
|
1341
|
+
aCallable(fn);
|
|
1342
|
+
return that === undefined ? fn : bind$1 ? bind$1(fn, that) : function (/* ...args */) {
|
|
1343
|
+
return fn.apply(that, arguments);
|
|
1344
|
+
};
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
var push$1 = functionUncurryThis([].push);
|
|
1257
1348
|
|
|
1258
1349
|
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation
|
|
1259
1350
|
var createMethod$1 = function (TYPE) {
|
|
@@ -1267,7 +1358,7 @@
|
|
|
1267
1358
|
return function ($this, callbackfn, that, specificCreate) {
|
|
1268
1359
|
var O = toObject($this);
|
|
1269
1360
|
var self = indexedObject(O);
|
|
1270
|
-
var boundFunction = functionBindContext(callbackfn, that
|
|
1361
|
+
var boundFunction = functionBindContext(callbackfn, that);
|
|
1271
1362
|
var length = lengthOfArrayLike(self);
|
|
1272
1363
|
var index = 0;
|
|
1273
1364
|
var create = specificCreate || arraySpeciesCreate;
|
|
@@ -1282,10 +1373,10 @@
|
|
|
1282
1373
|
case 3: return true; // some
|
|
1283
1374
|
case 5: return value; // find
|
|
1284
1375
|
case 6: return index; // findIndex
|
|
1285
|
-
case 2: push
|
|
1376
|
+
case 2: push$1(target, value); // filter
|
|
1286
1377
|
} else switch (TYPE) {
|
|
1287
1378
|
case 4: return false; // every
|
|
1288
|
-
case 7: push
|
|
1379
|
+
case 7: push$1(target, value); // filterReject
|
|
1289
1380
|
}
|
|
1290
1381
|
}
|
|
1291
1382
|
}
|
|
@@ -1326,21 +1417,28 @@
|
|
|
1326
1417
|
var SYMBOL = 'Symbol';
|
|
1327
1418
|
var PROTOTYPE = 'prototype';
|
|
1328
1419
|
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
1420
|
+
|
|
1329
1421
|
var setInternalState$3 = internalState.set;
|
|
1330
1422
|
var getInternalState$2 = internalState.getterFor(SYMBOL);
|
|
1423
|
+
|
|
1331
1424
|
var ObjectPrototype$2 = Object[PROTOTYPE];
|
|
1332
1425
|
var $Symbol = global_1.Symbol;
|
|
1426
|
+
var SymbolPrototype$1 = $Symbol && $Symbol[PROTOTYPE];
|
|
1427
|
+
var TypeError$7 = global_1.TypeError;
|
|
1428
|
+
var QObject = global_1.QObject;
|
|
1333
1429
|
var $stringify = getBuiltIn('JSON', 'stringify');
|
|
1334
1430
|
var nativeGetOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
1335
1431
|
var nativeDefineProperty = objectDefineProperty.f;
|
|
1336
1432
|
var nativeGetOwnPropertyNames = objectGetOwnPropertyNamesExternal.f;
|
|
1337
1433
|
var nativePropertyIsEnumerable = objectPropertyIsEnumerable.f;
|
|
1434
|
+
var push = functionUncurryThis([].push);
|
|
1435
|
+
|
|
1338
1436
|
var AllSymbols = shared('symbols');
|
|
1339
1437
|
var ObjectPrototypeSymbols = shared('op-symbols');
|
|
1340
1438
|
var StringToSymbolRegistry = shared('string-to-symbol-registry');
|
|
1341
1439
|
var SymbolToStringRegistry = shared('symbol-to-string-registry');
|
|
1342
1440
|
var WellKnownSymbolsStore = shared('wks');
|
|
1343
|
-
|
|
1441
|
+
|
|
1344
1442
|
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
|
|
1345
1443
|
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
|
|
1346
1444
|
|
|
@@ -1359,7 +1457,7 @@
|
|
|
1359
1457
|
} : nativeDefineProperty;
|
|
1360
1458
|
|
|
1361
1459
|
var wrap = function (tag, description) {
|
|
1362
|
-
var symbol = AllSymbols[tag] = objectCreate($
|
|
1460
|
+
var symbol = AllSymbols[tag] = objectCreate(SymbolPrototype$1);
|
|
1363
1461
|
setInternalState$3(symbol, {
|
|
1364
1462
|
type: SYMBOL,
|
|
1365
1463
|
tag: tag,
|
|
@@ -1390,7 +1488,7 @@
|
|
|
1390
1488
|
var properties = toIndexedObject(Properties);
|
|
1391
1489
|
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
|
|
1392
1490
|
$forEach(keys, function (key) {
|
|
1393
|
-
if (!descriptors || $propertyIsEnumerable
|
|
1491
|
+
if (!descriptors || functionCall($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]);
|
|
1394
1492
|
});
|
|
1395
1493
|
return O;
|
|
1396
1494
|
};
|
|
@@ -1401,7 +1499,7 @@
|
|
|
1401
1499
|
|
|
1402
1500
|
var $propertyIsEnumerable = function propertyIsEnumerable(V) {
|
|
1403
1501
|
var P = toPropertyKey(V);
|
|
1404
|
-
var enumerable = nativePropertyIsEnumerable
|
|
1502
|
+
var enumerable = functionCall(nativePropertyIsEnumerable, this, P);
|
|
1405
1503
|
if (this === ObjectPrototype$2 && hasOwnProperty_1(AllSymbols, P) && !hasOwnProperty_1(ObjectPrototypeSymbols, P)) return false;
|
|
1406
1504
|
return enumerable || !hasOwnProperty_1(this, P) || !hasOwnProperty_1(AllSymbols, P) || hasOwnProperty_1(this, HIDDEN) && this[HIDDEN][P]
|
|
1407
1505
|
? enumerable : true;
|
|
@@ -1422,7 +1520,7 @@
|
|
|
1422
1520
|
var names = nativeGetOwnPropertyNames(toIndexedObject(O));
|
|
1423
1521
|
var result = [];
|
|
1424
1522
|
$forEach(names, function (key) {
|
|
1425
|
-
if (!hasOwnProperty_1(AllSymbols, key) && !hasOwnProperty_1(hiddenKeys$1, key))
|
|
1523
|
+
if (!hasOwnProperty_1(AllSymbols, key) && !hasOwnProperty_1(hiddenKeys$1, key)) push(result, key);
|
|
1426
1524
|
});
|
|
1427
1525
|
return result;
|
|
1428
1526
|
};
|
|
@@ -1433,7 +1531,7 @@
|
|
|
1433
1531
|
var result = [];
|
|
1434
1532
|
$forEach(names, function (key) {
|
|
1435
1533
|
if (hasOwnProperty_1(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwnProperty_1(ObjectPrototype$2, key))) {
|
|
1436
|
-
|
|
1534
|
+
push(result, AllSymbols[key]);
|
|
1437
1535
|
}
|
|
1438
1536
|
});
|
|
1439
1537
|
return result;
|
|
@@ -1441,13 +1539,13 @@
|
|
|
1441
1539
|
|
|
1442
1540
|
// `Symbol` constructor
|
|
1443
1541
|
// https://tc39.es/ecma262/#sec-symbol-constructor
|
|
1444
|
-
if (!nativeSymbol
|
|
1542
|
+
if (!nativeSymbol) {
|
|
1445
1543
|
$Symbol = function Symbol() {
|
|
1446
|
-
if (this
|
|
1544
|
+
if (objectIsPrototypeOf(SymbolPrototype$1, this)) throw TypeError$7('Symbol is not a constructor');
|
|
1447
1545
|
var description = !arguments.length || arguments[0] === undefined ? undefined : toString_1(arguments[0]);
|
|
1448
1546
|
var tag = uid(description);
|
|
1449
1547
|
var setter = function (value) {
|
|
1450
|
-
if (this === ObjectPrototype$2) setter
|
|
1548
|
+
if (this === ObjectPrototype$2) functionCall(setter, ObjectPrototypeSymbols, value);
|
|
1451
1549
|
if (hasOwnProperty_1(this, HIDDEN) && hasOwnProperty_1(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
|
|
1452
1550
|
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
|
|
1453
1551
|
};
|
|
@@ -1455,7 +1553,9 @@
|
|
|
1455
1553
|
return wrap(tag, description);
|
|
1456
1554
|
};
|
|
1457
1555
|
|
|
1458
|
-
|
|
1556
|
+
SymbolPrototype$1 = $Symbol[PROTOTYPE];
|
|
1557
|
+
|
|
1558
|
+
redefine(SymbolPrototype$1, 'toString', function toString() {
|
|
1459
1559
|
return getInternalState$2(this).tag;
|
|
1460
1560
|
});
|
|
1461
1561
|
|
|
@@ -1475,7 +1575,7 @@
|
|
|
1475
1575
|
|
|
1476
1576
|
if (descriptors) {
|
|
1477
1577
|
// https://github.com/tc39/proposal-Symbol-description
|
|
1478
|
-
nativeDefineProperty($
|
|
1578
|
+
nativeDefineProperty(SymbolPrototype$1, 'description', {
|
|
1479
1579
|
configurable: true,
|
|
1480
1580
|
get: function description() {
|
|
1481
1581
|
return getInternalState$2(this).description;
|
|
@@ -1487,7 +1587,7 @@
|
|
|
1487
1587
|
}
|
|
1488
1588
|
}
|
|
1489
1589
|
|
|
1490
|
-
_export({ global: true, wrap: true, forced: !nativeSymbol
|
|
1590
|
+
_export({ global: true, wrap: true, forced: !nativeSymbol, sham: !nativeSymbol }, {
|
|
1491
1591
|
Symbol: $Symbol
|
|
1492
1592
|
});
|
|
1493
1593
|
|
|
@@ -1495,7 +1595,7 @@
|
|
|
1495
1595
|
defineWellKnownSymbol(name);
|
|
1496
1596
|
});
|
|
1497
1597
|
|
|
1498
|
-
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol
|
|
1598
|
+
_export({ target: SYMBOL, stat: true, forced: !nativeSymbol }, {
|
|
1499
1599
|
// `Symbol.for` method
|
|
1500
1600
|
// https://tc39.es/ecma262/#sec-symbol.for
|
|
1501
1601
|
'for': function (key) {
|
|
@@ -1509,14 +1609,14 @@
|
|
|
1509
1609
|
// `Symbol.keyFor` method
|
|
1510
1610
|
// https://tc39.es/ecma262/#sec-symbol.keyfor
|
|
1511
1611
|
keyFor: function keyFor(sym) {
|
|
1512
|
-
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
|
|
1612
|
+
if (!isSymbol(sym)) throw TypeError$7(sym + ' is not a symbol');
|
|
1513
1613
|
if (hasOwnProperty_1(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
|
|
1514
1614
|
},
|
|
1515
1615
|
useSetter: function () { USE_SETTER = true; },
|
|
1516
1616
|
useSimple: function () { USE_SETTER = false; }
|
|
1517
1617
|
});
|
|
1518
1618
|
|
|
1519
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol
|
|
1619
|
+
_export({ target: 'Object', stat: true, forced: !nativeSymbol, sham: !descriptors }, {
|
|
1520
1620
|
// `Object.create` method
|
|
1521
1621
|
// https://tc39.es/ecma262/#sec-object.create
|
|
1522
1622
|
create: $create,
|
|
@@ -1531,7 +1631,7 @@
|
|
|
1531
1631
|
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
|
|
1532
1632
|
});
|
|
1533
1633
|
|
|
1534
|
-
_export({ target: 'Object', stat: true, forced: !nativeSymbol
|
|
1634
|
+
_export({ target: 'Object', stat: true, forced: !nativeSymbol }, {
|
|
1535
1635
|
// `Object.getOwnPropertyNames` method
|
|
1536
1636
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
1537
1637
|
getOwnPropertyNames: $getOwnPropertyNames,
|
|
@@ -1551,7 +1651,7 @@
|
|
|
1551
1651
|
// `JSON.stringify` method behavior with symbols
|
|
1552
1652
|
// https://tc39.es/ecma262/#sec-json.stringify
|
|
1553
1653
|
if ($stringify) {
|
|
1554
|
-
var FORCED_JSON_STRINGIFY = !nativeSymbol
|
|
1654
|
+
var FORCED_JSON_STRINGIFY = !nativeSymbol || fails(function () {
|
|
1555
1655
|
var symbol = $Symbol();
|
|
1556
1656
|
// MS Edge converts symbol values to JSON as {}
|
|
1557
1657
|
return $stringify([symbol]) != '[null]'
|
|
@@ -1564,28 +1664,27 @@
|
|
|
1564
1664
|
_export({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
|
|
1565
1665
|
// eslint-disable-next-line no-unused-vars -- required for `.length`
|
|
1566
1666
|
stringify: function stringify(it, replacer, space) {
|
|
1567
|
-
var args =
|
|
1568
|
-
var
|
|
1569
|
-
var $replacer;
|
|
1570
|
-
while (arguments.length > index) args.push(arguments[index++]);
|
|
1571
|
-
$replacer = replacer;
|
|
1667
|
+
var args = arraySlice(arguments);
|
|
1668
|
+
var $replacer = replacer;
|
|
1572
1669
|
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
|
|
1573
1670
|
if (!isArray$1(replacer)) replacer = function (key, value) {
|
|
1574
|
-
if (isCallable($replacer)) value = $replacer
|
|
1671
|
+
if (isCallable($replacer)) value = functionCall($replacer, this, key, value);
|
|
1575
1672
|
if (!isSymbol(value)) return value;
|
|
1576
1673
|
};
|
|
1577
1674
|
args[1] = replacer;
|
|
1578
|
-
return $stringify
|
|
1675
|
+
return functionApply($stringify, null, args);
|
|
1579
1676
|
}
|
|
1580
1677
|
});
|
|
1581
1678
|
}
|
|
1582
1679
|
|
|
1583
1680
|
// `Symbol.prototype[@@toPrimitive]` method
|
|
1584
1681
|
// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
|
|
1585
|
-
if (
|
|
1586
|
-
var valueOf = $
|
|
1587
|
-
|
|
1588
|
-
|
|
1682
|
+
if (!SymbolPrototype$1[TO_PRIMITIVE]) {
|
|
1683
|
+
var valueOf = SymbolPrototype$1.valueOf;
|
|
1684
|
+
// eslint-disable-next-line no-unused-vars -- required for .length
|
|
1685
|
+
redefine(SymbolPrototype$1, TO_PRIMITIVE, function (hint) {
|
|
1686
|
+
// TODO: improve hint logic
|
|
1687
|
+
return functionCall(valueOf, this);
|
|
1589
1688
|
});
|
|
1590
1689
|
}
|
|
1591
1690
|
// `Symbol.prototype[@@toStringTag]` property
|
|
@@ -1598,40 +1697,46 @@
|
|
|
1598
1697
|
// https://tc39.es/ecma262/#sec-symbol.asynciterator
|
|
1599
1698
|
defineWellKnownSymbol('asyncIterator');
|
|
1600
1699
|
|
|
1601
|
-
var defineProperty$
|
|
1700
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
1602
1701
|
|
|
1603
1702
|
|
|
1604
1703
|
var NativeSymbol = global_1.Symbol;
|
|
1704
|
+
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
1605
1705
|
|
|
1606
|
-
if (descriptors && isCallable(NativeSymbol) && (!('description' in
|
|
1706
|
+
if (descriptors && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
1607
1707
|
// Safari 12 bug
|
|
1608
1708
|
NativeSymbol().description !== undefined
|
|
1609
1709
|
)) {
|
|
1610
1710
|
var EmptyStringDescriptionStore = {};
|
|
1611
1711
|
// wrap Symbol constructor for correct work with undefined description
|
|
1612
1712
|
var SymbolWrapper = function Symbol() {
|
|
1613
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined :
|
|
1614
|
-
var result = this
|
|
1713
|
+
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString_1(arguments[0]);
|
|
1714
|
+
var result = objectIsPrototypeOf(SymbolPrototype, this)
|
|
1615
1715
|
? new NativeSymbol(description)
|
|
1616
1716
|
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
1617
1717
|
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
1618
1718
|
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
1619
1719
|
return result;
|
|
1620
1720
|
};
|
|
1721
|
+
|
|
1621
1722
|
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
1622
|
-
|
|
1623
|
-
|
|
1723
|
+
SymbolWrapper.prototype = SymbolPrototype;
|
|
1724
|
+
SymbolPrototype.constructor = SymbolWrapper;
|
|
1624
1725
|
|
|
1625
|
-
var
|
|
1626
|
-
var
|
|
1726
|
+
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
1727
|
+
var symbolToString = functionUncurryThis(SymbolPrototype.toString);
|
|
1728
|
+
var symbolValueOf = functionUncurryThis(SymbolPrototype.valueOf);
|
|
1627
1729
|
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
1628
|
-
|
|
1730
|
+
var replace = functionUncurryThis(''.replace);
|
|
1731
|
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
|
1732
|
+
|
|
1733
|
+
defineProperty$3(SymbolPrototype, 'description', {
|
|
1629
1734
|
configurable: true,
|
|
1630
1735
|
get: function description() {
|
|
1631
|
-
var symbol =
|
|
1632
|
-
var string = symbolToString
|
|
1736
|
+
var symbol = symbolValueOf(this);
|
|
1737
|
+
var string = symbolToString(symbol);
|
|
1633
1738
|
if (hasOwnProperty_1(EmptyStringDescriptionStore, symbol)) return '';
|
|
1634
|
-
var desc =
|
|
1739
|
+
var desc = NATIVE_SYMBOL ? stringSlice$1(string, 7, -1) : replace(string, regexp, '$1');
|
|
1635
1740
|
return desc === '' ? undefined : desc;
|
|
1636
1741
|
}
|
|
1637
1742
|
});
|
|
@@ -1705,6 +1810,10 @@
|
|
|
1705
1810
|
|
|
1706
1811
|
path.Symbol;
|
|
1707
1812
|
|
|
1813
|
+
var charAt$1 = functionUncurryThis(''.charAt);
|
|
1814
|
+
var charCodeAt = functionUncurryThis(''.charCodeAt);
|
|
1815
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
1816
|
+
|
|
1708
1817
|
var createMethod = function (CONVERT_TO_STRING) {
|
|
1709
1818
|
return function ($this, pos) {
|
|
1710
1819
|
var S = toString_1(requireObjectCoercible($this));
|
|
@@ -1712,11 +1821,15 @@
|
|
|
1712
1821
|
var size = S.length;
|
|
1713
1822
|
var first, second;
|
|
1714
1823
|
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
1715
|
-
first =
|
|
1824
|
+
first = charCodeAt(S, position);
|
|
1716
1825
|
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|
|
1717
|
-
|| (second =
|
|
1718
|
-
? CONVERT_TO_STRING
|
|
1719
|
-
|
|
1826
|
+
|| (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
|
|
1827
|
+
? CONVERT_TO_STRING
|
|
1828
|
+
? charAt$1(S, position)
|
|
1829
|
+
: first
|
|
1830
|
+
: CONVERT_TO_STRING
|
|
1831
|
+
? stringSlice(S, position, position + 2)
|
|
1832
|
+
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
1720
1833
|
};
|
|
1721
1834
|
};
|
|
1722
1835
|
|
|
@@ -1737,18 +1850,18 @@
|
|
|
1737
1850
|
});
|
|
1738
1851
|
|
|
1739
1852
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1740
|
-
var
|
|
1853
|
+
var Object$1 = global_1.Object;
|
|
1854
|
+
var ObjectPrototype$1 = Object$1.prototype;
|
|
1741
1855
|
|
|
1742
1856
|
// `Object.getPrototypeOf` method
|
|
1743
1857
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1744
|
-
|
|
1745
|
-
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
|
1858
|
+
var objectGetPrototypeOf = correctPrototypeGetter ? Object$1.getPrototypeOf : function (O) {
|
|
1746
1859
|
var object = toObject(O);
|
|
1747
1860
|
if (hasOwnProperty_1(object, IE_PROTO)) return object[IE_PROTO];
|
|
1748
1861
|
var constructor = object.constructor;
|
|
1749
1862
|
if (isCallable(constructor) && object instanceof constructor) {
|
|
1750
1863
|
return constructor.prototype;
|
|
1751
|
-
} return object instanceof Object ? ObjectPrototype$1 : null;
|
|
1864
|
+
} return object instanceof Object$1 ? ObjectPrototype$1 : null;
|
|
1752
1865
|
};
|
|
1753
1866
|
|
|
1754
1867
|
var ITERATOR$4 = wellKnownSymbol('iterator');
|
|
@@ -1800,23 +1913,27 @@
|
|
|
1800
1913
|
|
|
1801
1914
|
var returnThis$1 = function () { return this; };
|
|
1802
1915
|
|
|
1803
|
-
var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
|
|
1916
|
+
var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1804
1917
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1805
|
-
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(
|
|
1918
|
+
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
1806
1919
|
setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
|
|
1807
1920
|
iterators[TO_STRING_TAG] = returnThis$1;
|
|
1808
1921
|
return IteratorConstructor;
|
|
1809
1922
|
};
|
|
1810
1923
|
|
|
1924
|
+
var String$1 = global_1.String;
|
|
1925
|
+
var TypeError$6 = global_1.TypeError;
|
|
1926
|
+
|
|
1811
1927
|
var aPossiblePrototype = function (argument) {
|
|
1812
|
-
if (typeof argument
|
|
1813
|
-
throw TypeError("Can't set " + String(argument) + ' as a prototype');
|
|
1928
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
1929
|
+
throw TypeError$6("Can't set " + String$1(argument) + ' as a prototype');
|
|
1814
1930
|
};
|
|
1815
1931
|
|
|
1816
1932
|
/* eslint-disable no-proto -- safe */
|
|
1817
1933
|
|
|
1818
1934
|
|
|
1819
1935
|
|
|
1936
|
+
|
|
1820
1937
|
// `Object.setPrototypeOf` method
|
|
1821
1938
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1822
1939
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
@@ -1827,14 +1944,14 @@
|
|
|
1827
1944
|
var setter;
|
|
1828
1945
|
try {
|
|
1829
1946
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1830
|
-
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
|
|
1831
|
-
setter
|
|
1947
|
+
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1948
|
+
setter(test, []);
|
|
1832
1949
|
CORRECT_SETTER = test instanceof Array;
|
|
1833
1950
|
} catch (error) { /* empty */ }
|
|
1834
1951
|
return function setPrototypeOf(O, proto) {
|
|
1835
1952
|
anObject(O);
|
|
1836
1953
|
aPossiblePrototype(proto);
|
|
1837
|
-
if (CORRECT_SETTER) setter
|
|
1954
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
1838
1955
|
else O.__proto__ = proto;
|
|
1839
1956
|
return O;
|
|
1840
1957
|
};
|
|
@@ -1896,7 +2013,7 @@
|
|
|
1896
2013
|
createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
|
|
1897
2014
|
} else {
|
|
1898
2015
|
INCORRECT_VALUES_NAME = true;
|
|
1899
|
-
defaultIterator = function values() { return nativeIterator
|
|
2016
|
+
defaultIterator = function values() { return functionCall(nativeIterator, this); };
|
|
1900
2017
|
}
|
|
1901
2018
|
}
|
|
1902
2019
|
|
|
@@ -1962,7 +2079,7 @@
|
|
|
1962
2079
|
if (kind === 'throw') throw value;
|
|
1963
2080
|
return value;
|
|
1964
2081
|
}
|
|
1965
|
-
innerResult = innerResult
|
|
2082
|
+
innerResult = functionCall(innerResult, iterator);
|
|
1966
2083
|
} catch (error) {
|
|
1967
2084
|
innerError = true;
|
|
1968
2085
|
innerResult = error;
|
|
@@ -1998,12 +2115,16 @@
|
|
|
1998
2115
|
|| iterators[classof(it)];
|
|
1999
2116
|
};
|
|
2000
2117
|
|
|
2118
|
+
var TypeError$5 = global_1.TypeError;
|
|
2119
|
+
|
|
2001
2120
|
var getIterator = function (argument, usingIterator) {
|
|
2002
2121
|
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
2003
|
-
if (aCallable(iteratorMethod)) return anObject(iteratorMethod
|
|
2004
|
-
throw TypeError(
|
|
2122
|
+
if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
|
|
2123
|
+
throw TypeError$5(tryToString(argument) + ' is not iterable');
|
|
2005
2124
|
};
|
|
2006
2125
|
|
|
2126
|
+
var Array$1 = global_1.Array;
|
|
2127
|
+
|
|
2007
2128
|
// `Array.from` method implementation
|
|
2008
2129
|
// https://tc39.es/ecma262/#sec-array.from
|
|
2009
2130
|
var arrayFrom = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
|
|
@@ -2012,22 +2133,22 @@
|
|
|
2012
2133
|
var argumentsLength = arguments.length;
|
|
2013
2134
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
2014
2135
|
var mapping = mapfn !== undefined;
|
|
2015
|
-
if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined
|
|
2136
|
+
if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
|
|
2016
2137
|
var iteratorMethod = getIteratorMethod(O);
|
|
2017
2138
|
var index = 0;
|
|
2018
2139
|
var length, result, step, iterator, next, value;
|
|
2019
2140
|
// if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
2020
|
-
if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) {
|
|
2141
|
+
if (iteratorMethod && !(this == Array$1 && isArrayIteratorMethod(iteratorMethod))) {
|
|
2021
2142
|
iterator = getIterator(O, iteratorMethod);
|
|
2022
2143
|
next = iterator.next;
|
|
2023
2144
|
result = IS_CONSTRUCTOR ? new this() : [];
|
|
2024
|
-
for (;!(step = next
|
|
2145
|
+
for (;!(step = functionCall(next, iterator)).done; index++) {
|
|
2025
2146
|
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
|
2026
2147
|
createProperty(result, index, value);
|
|
2027
2148
|
}
|
|
2028
2149
|
} else {
|
|
2029
2150
|
length = lengthOfArrayLike(O);
|
|
2030
|
-
result = IS_CONSTRUCTOR ? new this(length) : Array(length);
|
|
2151
|
+
result = IS_CONSTRUCTOR ? new this(length) : Array$1(length);
|
|
2031
2152
|
for (;length > index; index++) {
|
|
2032
2153
|
value = mapping ? mapfn(O[index], index) : O[index];
|
|
2033
2154
|
createProperty(result, index, value);
|
|
@@ -2088,9 +2209,10 @@
|
|
|
2088
2209
|
path.Array.from;
|
|
2089
2210
|
|
|
2090
2211
|
// eslint-disable-next-line es/no-typed-arrays -- safe
|
|
2091
|
-
var arrayBufferNative = typeof ArrayBuffer
|
|
2212
|
+
var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
2213
|
+
|
|
2214
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
2092
2215
|
|
|
2093
|
-
var defineProperty$1 = objectDefineProperty.f;
|
|
2094
2216
|
|
|
2095
2217
|
|
|
2096
2218
|
|
|
@@ -2103,7 +2225,7 @@
|
|
|
2103
2225
|
var TypedArray = Int8Array$1 && objectGetPrototypeOf(Int8Array$1);
|
|
2104
2226
|
var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
|
|
2105
2227
|
var ObjectPrototype = Object.prototype;
|
|
2106
|
-
var
|
|
2228
|
+
var TypeError$4 = global_1.TypeError;
|
|
2107
2229
|
|
|
2108
2230
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
2109
2231
|
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
@@ -2147,15 +2269,15 @@
|
|
|
2147
2269
|
|
|
2148
2270
|
var aTypedArray$1 = function (it) {
|
|
2149
2271
|
if (isTypedArray(it)) return it;
|
|
2150
|
-
throw TypeError('Target is not a typed array');
|
|
2272
|
+
throw TypeError$4('Target is not a typed array');
|
|
2151
2273
|
};
|
|
2152
2274
|
|
|
2153
2275
|
var aTypedArrayConstructor$1 = function (C) {
|
|
2154
|
-
if (isCallable(C) && (!objectSetPrototypeOf ||
|
|
2155
|
-
throw TypeError(tryToString(C) + ' is not a typed array constructor');
|
|
2276
|
+
if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
|
|
2277
|
+
throw TypeError$4(tryToString(C) + ' is not a typed array constructor');
|
|
2156
2278
|
};
|
|
2157
2279
|
|
|
2158
|
-
var exportTypedArrayMethod$1 = function (KEY, property, forced) {
|
|
2280
|
+
var exportTypedArrayMethod$1 = function (KEY, property, forced, options) {
|
|
2159
2281
|
if (!descriptors) return;
|
|
2160
2282
|
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
|
|
2161
2283
|
var TypedArrayConstructor = global_1[ARRAY];
|
|
@@ -2165,7 +2287,7 @@
|
|
|
2165
2287
|
}
|
|
2166
2288
|
if (!TypedArrayPrototype[KEY] || forced) {
|
|
2167
2289
|
redefine(TypedArrayPrototype, KEY, forced ? property
|
|
2168
|
-
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
|
|
2290
|
+
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
|
|
2169
2291
|
}
|
|
2170
2292
|
};
|
|
2171
2293
|
|
|
@@ -2211,7 +2333,7 @@
|
|
|
2211
2333
|
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
2212
2334
|
// eslint-disable-next-line no-shadow -- safe
|
|
2213
2335
|
TypedArray = function TypedArray() {
|
|
2214
|
-
throw TypeError('Incorrect invocation');
|
|
2336
|
+
throw TypeError$4('Incorrect invocation');
|
|
2215
2337
|
};
|
|
2216
2338
|
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
2217
2339
|
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
|
|
@@ -2232,7 +2354,7 @@
|
|
|
2232
2354
|
|
|
2233
2355
|
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG)) {
|
|
2234
2356
|
TYPED_ARRAY_TAG_REQIRED = true;
|
|
2235
|
-
defineProperty$
|
|
2357
|
+
defineProperty$2(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
|
|
2236
2358
|
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
2237
2359
|
} });
|
|
2238
2360
|
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
@@ -2254,10 +2376,12 @@
|
|
|
2254
2376
|
TypedArrayPrototype: TypedArrayPrototype
|
|
2255
2377
|
};
|
|
2256
2378
|
|
|
2379
|
+
var TypeError$3 = global_1.TypeError;
|
|
2380
|
+
|
|
2257
2381
|
// `Assert: IsConstructor(argument) is true`
|
|
2258
2382
|
var aConstructor = function (argument) {
|
|
2259
2383
|
if (isConstructor(argument)) return argument;
|
|
2260
|
-
throw TypeError(tryToString(argument) + ' is not a constructor');
|
|
2384
|
+
throw TypeError$3(tryToString(argument) + ' is not a constructor');
|
|
2261
2385
|
};
|
|
2262
2386
|
|
|
2263
2387
|
var SPECIES$1 = wellKnownSymbol('species');
|
|
@@ -2281,7 +2405,6 @@
|
|
|
2281
2405
|
|
|
2282
2406
|
var aTypedArray = arrayBufferViewCore.aTypedArray;
|
|
2283
2407
|
var exportTypedArrayMethod = arrayBufferViewCore.exportTypedArrayMethod;
|
|
2284
|
-
var $slice = [].slice;
|
|
2285
2408
|
|
|
2286
2409
|
var FORCED = fails(function () {
|
|
2287
2410
|
// eslint-disable-next-line es/no-typed-arrays -- required for testing
|
|
@@ -2291,7 +2414,7 @@
|
|
|
2291
2414
|
// `%TypedArray%.prototype.slice` method
|
|
2292
2415
|
// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
|
|
2293
2416
|
exportTypedArrayMethod('slice', function slice(start, end) {
|
|
2294
|
-
var list =
|
|
2417
|
+
var list = arraySlice(aTypedArray(this), start, end);
|
|
2295
2418
|
var C = typedArraySpeciesConstructor(this);
|
|
2296
2419
|
var index = 0;
|
|
2297
2420
|
var length = list.length;
|
|
@@ -2333,17 +2456,27 @@
|
|
|
2333
2456
|
|
|
2334
2457
|
entryUnbind('Array', 'includes');
|
|
2335
2458
|
|
|
2459
|
+
var stringIndexOf = functionUncurryThis(''.indexOf);
|
|
2460
|
+
|
|
2336
2461
|
// `String.prototype.includes` method
|
|
2337
2462
|
// https://tc39.es/ecma262/#sec-string.prototype.includes
|
|
2338
2463
|
_export({ target: 'String', proto: true, forced: !correctIsRegexpLogic('includes') }, {
|
|
2339
2464
|
includes: function includes(searchString /* , position = 0 */) {
|
|
2340
|
-
return !!~
|
|
2341
|
-
|
|
2465
|
+
return !!~stringIndexOf(
|
|
2466
|
+
toString_1(requireObjectCoercible(this)),
|
|
2467
|
+
toString_1(notARegexp(searchString)),
|
|
2468
|
+
arguments.length > 1 ? arguments[1] : undefined
|
|
2469
|
+
);
|
|
2342
2470
|
}
|
|
2343
2471
|
});
|
|
2344
2472
|
|
|
2345
2473
|
entryUnbind('String', 'includes');
|
|
2346
2474
|
|
|
2475
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
2476
|
+
|
|
2477
|
+
|
|
2478
|
+
|
|
2479
|
+
|
|
2347
2480
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
2348
2481
|
var setInternalState$1 = internalState.set;
|
|
2349
2482
|
var getInternalState = internalState.getterFor(ARRAY_ITERATOR);
|
|
@@ -2384,13 +2517,41 @@
|
|
|
2384
2517
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
2385
2518
|
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
2386
2519
|
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
2387
|
-
iterators.Arguments = iterators.Array;
|
|
2520
|
+
var values = iterators.Arguments = iterators.Array;
|
|
2388
2521
|
|
|
2389
2522
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
2390
2523
|
addToUnscopables('keys');
|
|
2391
2524
|
addToUnscopables('values');
|
|
2392
2525
|
addToUnscopables('entries');
|
|
2393
2526
|
|
|
2527
|
+
// V8 ~ Chrome 45- bug
|
|
2528
|
+
if (descriptors && values.name !== 'values') try {
|
|
2529
|
+
defineProperty$1(values, 'name', { value: 'values' });
|
|
2530
|
+
} catch (error) { /* empty */ }
|
|
2531
|
+
|
|
2532
|
+
// FF26- bug: ArrayBuffers are non-extensible, but Object.isExtensible does not report it
|
|
2533
|
+
|
|
2534
|
+
|
|
2535
|
+
var arrayBufferNonExtensible = fails(function () {
|
|
2536
|
+
if (typeof ArrayBuffer == 'function') {
|
|
2537
|
+
var buffer = new ArrayBuffer(8);
|
|
2538
|
+
// eslint-disable-next-line es/no-object-isextensible, es/no-object-defineproperty -- safe
|
|
2539
|
+
if (Object.isExtensible(buffer)) Object.defineProperty(buffer, 'a', { value: 8 });
|
|
2540
|
+
}
|
|
2541
|
+
});
|
|
2542
|
+
|
|
2543
|
+
// eslint-disable-next-line es/no-object-isextensible -- safe
|
|
2544
|
+
var $isExtensible = Object.isExtensible;
|
|
2545
|
+
var FAILS_ON_PRIMITIVES = fails(function () { $isExtensible(1); });
|
|
2546
|
+
|
|
2547
|
+
// `Object.isExtensible` method
|
|
2548
|
+
// https://tc39.es/ecma262/#sec-object.isextensible
|
|
2549
|
+
var objectIsExtensible = (FAILS_ON_PRIMITIVES || arrayBufferNonExtensible) ? function isExtensible(it) {
|
|
2550
|
+
if (!isObject(it)) return false;
|
|
2551
|
+
if (arrayBufferNonExtensible && classofRaw(it) == 'ArrayBuffer') return false;
|
|
2552
|
+
return $isExtensible ? $isExtensible(it) : true;
|
|
2553
|
+
} : $isExtensible;
|
|
2554
|
+
|
|
2394
2555
|
var freezing = !fails(function () {
|
|
2395
2556
|
// eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing
|
|
2396
2557
|
return Object.isExtensible(Object.preventExtensions({}));
|
|
@@ -2403,15 +2564,11 @@
|
|
|
2403
2564
|
|
|
2404
2565
|
|
|
2405
2566
|
|
|
2567
|
+
|
|
2406
2568
|
var REQUIRED = false;
|
|
2407
2569
|
var METADATA = uid('meta');
|
|
2408
2570
|
var id = 0;
|
|
2409
2571
|
|
|
2410
|
-
// eslint-disable-next-line es/no-object-isextensible -- safe
|
|
2411
|
-
var isExtensible = Object.isExtensible || function () {
|
|
2412
|
-
return true;
|
|
2413
|
-
};
|
|
2414
|
-
|
|
2415
2572
|
var setMetadata = function (it) {
|
|
2416
2573
|
defineProperty(it, METADATA, { value: {
|
|
2417
2574
|
objectID: 'O' + id++, // object ID
|
|
@@ -2424,7 +2581,7 @@
|
|
|
2424
2581
|
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
|
|
2425
2582
|
if (!hasOwnProperty_1(it, METADATA)) {
|
|
2426
2583
|
// can't set metadata to uncaught frozen object
|
|
2427
|
-
if (!
|
|
2584
|
+
if (!objectIsExtensible(it)) return 'F';
|
|
2428
2585
|
// not necessary to add metadata
|
|
2429
2586
|
if (!create) return 'E';
|
|
2430
2587
|
// add missing metadata
|
|
@@ -2436,7 +2593,7 @@
|
|
|
2436
2593
|
var getWeakData = function (it, create) {
|
|
2437
2594
|
if (!hasOwnProperty_1(it, METADATA)) {
|
|
2438
2595
|
// can't set metadata to uncaught frozen object
|
|
2439
|
-
if (!
|
|
2596
|
+
if (!objectIsExtensible(it)) return true;
|
|
2440
2597
|
// not necessary to add metadata
|
|
2441
2598
|
if (!create) return false;
|
|
2442
2599
|
// add missing metadata
|
|
@@ -2447,7 +2604,7 @@
|
|
|
2447
2604
|
|
|
2448
2605
|
// add metadata on freeze-family methods calling
|
|
2449
2606
|
var onFreeze = function (it) {
|
|
2450
|
-
if (freezing && REQUIRED &&
|
|
2607
|
+
if (freezing && REQUIRED && objectIsExtensible(it) && !hasOwnProperty_1(it, METADATA)) setMetadata(it);
|
|
2451
2608
|
return it;
|
|
2452
2609
|
};
|
|
2453
2610
|
|
|
@@ -2455,7 +2612,7 @@
|
|
|
2455
2612
|
meta.enable = function () { /* empty */ };
|
|
2456
2613
|
REQUIRED = true;
|
|
2457
2614
|
var getOwnPropertyNames = objectGetOwnPropertyNames.f;
|
|
2458
|
-
var splice = [].splice;
|
|
2615
|
+
var splice = functionUncurryThis([].splice);
|
|
2459
2616
|
var test = {};
|
|
2460
2617
|
test[METADATA] = 1;
|
|
2461
2618
|
|
|
@@ -2465,7 +2622,7 @@
|
|
|
2465
2622
|
var result = getOwnPropertyNames(it);
|
|
2466
2623
|
for (var i = 0, length = result.length; i < length; i++) {
|
|
2467
2624
|
if (result[i] === METADATA) {
|
|
2468
|
-
splice
|
|
2625
|
+
splice(result, i, 1);
|
|
2469
2626
|
break;
|
|
2470
2627
|
}
|
|
2471
2628
|
} return result;
|
|
@@ -2491,17 +2648,21 @@
|
|
|
2491
2648
|
internalMetadata.getWeakData;
|
|
2492
2649
|
internalMetadata.onFreeze;
|
|
2493
2650
|
|
|
2651
|
+
var TypeError$2 = global_1.TypeError;
|
|
2652
|
+
|
|
2494
2653
|
var Result = function (stopped, result) {
|
|
2495
2654
|
this.stopped = stopped;
|
|
2496
2655
|
this.result = result;
|
|
2497
2656
|
};
|
|
2498
2657
|
|
|
2658
|
+
var ResultPrototype = Result.prototype;
|
|
2659
|
+
|
|
2499
2660
|
var iterate = function (iterable, unboundFunction, options) {
|
|
2500
2661
|
var that = options && options.that;
|
|
2501
2662
|
var AS_ENTRIES = !!(options && options.AS_ENTRIES);
|
|
2502
2663
|
var IS_ITERATOR = !!(options && options.IS_ITERATOR);
|
|
2503
2664
|
var INTERRUPTED = !!(options && options.INTERRUPTED);
|
|
2504
|
-
var fn = functionBindContext(unboundFunction, that
|
|
2665
|
+
var fn = functionBindContext(unboundFunction, that);
|
|
2505
2666
|
var iterator, iterFn, index, length, result, next, step;
|
|
2506
2667
|
|
|
2507
2668
|
var stop = function (condition) {
|
|
@@ -2520,31 +2681,33 @@
|
|
|
2520
2681
|
iterator = iterable;
|
|
2521
2682
|
} else {
|
|
2522
2683
|
iterFn = getIteratorMethod(iterable);
|
|
2523
|
-
if (!iterFn) throw TypeError(
|
|
2684
|
+
if (!iterFn) throw TypeError$2(tryToString(iterable) + ' is not iterable');
|
|
2524
2685
|
// optimisation for array iterators
|
|
2525
2686
|
if (isArrayIteratorMethod(iterFn)) {
|
|
2526
2687
|
for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
|
|
2527
2688
|
result = callFn(iterable[index]);
|
|
2528
|
-
if (result && result
|
|
2689
|
+
if (result && objectIsPrototypeOf(ResultPrototype, result)) return result;
|
|
2529
2690
|
} return new Result(false);
|
|
2530
2691
|
}
|
|
2531
2692
|
iterator = getIterator(iterable, iterFn);
|
|
2532
2693
|
}
|
|
2533
2694
|
|
|
2534
2695
|
next = iterator.next;
|
|
2535
|
-
while (!(step = next
|
|
2696
|
+
while (!(step = functionCall(next, iterator)).done) {
|
|
2536
2697
|
try {
|
|
2537
2698
|
result = callFn(step.value);
|
|
2538
2699
|
} catch (error) {
|
|
2539
2700
|
iteratorClose(iterator, 'throw', error);
|
|
2540
2701
|
}
|
|
2541
|
-
if (typeof result == 'object' && result && result
|
|
2702
|
+
if (typeof result == 'object' && result && objectIsPrototypeOf(ResultPrototype, result)) return result;
|
|
2542
2703
|
} return new Result(false);
|
|
2543
2704
|
};
|
|
2544
2705
|
|
|
2545
|
-
var
|
|
2546
|
-
|
|
2547
|
-
|
|
2706
|
+
var TypeError$1 = global_1.TypeError;
|
|
2707
|
+
|
|
2708
|
+
var anInstance = function (it, Prototype) {
|
|
2709
|
+
if (objectIsPrototypeOf(Prototype, it)) return it;
|
|
2710
|
+
throw TypeError$1('Incorrect invocation');
|
|
2548
2711
|
};
|
|
2549
2712
|
|
|
2550
2713
|
// makes subclassing work correct for wrapped built-ins
|
|
@@ -2572,19 +2735,19 @@
|
|
|
2572
2735
|
var exported = {};
|
|
2573
2736
|
|
|
2574
2737
|
var fixMethod = function (KEY) {
|
|
2575
|
-
var
|
|
2738
|
+
var uncurriedNativeMethod = functionUncurryThis(NativePrototype[KEY]);
|
|
2576
2739
|
redefine(NativePrototype, KEY,
|
|
2577
2740
|
KEY == 'add' ? function add(value) {
|
|
2578
|
-
|
|
2741
|
+
uncurriedNativeMethod(this, value === 0 ? 0 : value);
|
|
2579
2742
|
return this;
|
|
2580
2743
|
} : KEY == 'delete' ? function (key) {
|
|
2581
|
-
return IS_WEAK && !isObject(key) ? false :
|
|
2744
|
+
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
2582
2745
|
} : KEY == 'get' ? function get(key) {
|
|
2583
|
-
return IS_WEAK && !isObject(key) ? undefined :
|
|
2746
|
+
return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
2584
2747
|
} : KEY == 'has' ? function has(key) {
|
|
2585
|
-
return IS_WEAK && !isObject(key) ? false :
|
|
2748
|
+
return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key);
|
|
2586
2749
|
} : function set(key, value) {
|
|
2587
|
-
|
|
2750
|
+
uncurriedNativeMethod(this, key === 0 ? 0 : key, value);
|
|
2588
2751
|
return this;
|
|
2589
2752
|
}
|
|
2590
2753
|
);
|
|
@@ -2621,7 +2784,7 @@
|
|
|
2621
2784
|
|
|
2622
2785
|
if (!ACCEPT_ITERABLES) {
|
|
2623
2786
|
Constructor = wrapper(function (dummy, iterable) {
|
|
2624
|
-
anInstance(dummy,
|
|
2787
|
+
anInstance(dummy, NativePrototype);
|
|
2625
2788
|
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
|
|
2626
2789
|
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
2627
2790
|
return that;
|
|
@@ -2688,8 +2851,8 @@
|
|
|
2688
2851
|
|
|
2689
2852
|
var collectionStrong = {
|
|
2690
2853
|
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
|
|
2691
|
-
var
|
|
2692
|
-
anInstance(that,
|
|
2854
|
+
var Constructor = wrapper(function (that, iterable) {
|
|
2855
|
+
anInstance(that, Prototype);
|
|
2693
2856
|
setInternalState(that, {
|
|
2694
2857
|
type: CONSTRUCTOR_NAME,
|
|
2695
2858
|
index: objectCreate(null),
|
|
@@ -2701,6 +2864,8 @@
|
|
|
2701
2864
|
if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });
|
|
2702
2865
|
});
|
|
2703
2866
|
|
|
2867
|
+
var Prototype = Constructor.prototype;
|
|
2868
|
+
|
|
2704
2869
|
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
2705
2870
|
|
|
2706
2871
|
var define = function (that, key, value) {
|
|
@@ -2741,7 +2906,7 @@
|
|
|
2741
2906
|
}
|
|
2742
2907
|
};
|
|
2743
2908
|
|
|
2744
|
-
redefineAll(
|
|
2909
|
+
redefineAll(Prototype, {
|
|
2745
2910
|
// `{ Map, Set }.prototype.clear()` methods
|
|
2746
2911
|
// https://tc39.es/ecma262/#sec-map.prototype.clear
|
|
2747
2912
|
// https://tc39.es/ecma262/#sec-set.prototype.clear
|
|
@@ -2785,7 +2950,7 @@
|
|
|
2785
2950
|
// https://tc39.es/ecma262/#sec-set.prototype.foreach
|
|
2786
2951
|
forEach: function forEach(callbackfn /* , that = undefined */) {
|
|
2787
2952
|
var state = getInternalState(this);
|
|
2788
|
-
var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined
|
|
2953
|
+
var boundFunction = functionBindContext(callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
2789
2954
|
var entry;
|
|
2790
2955
|
while (entry = entry ? entry.next : state.first) {
|
|
2791
2956
|
boundFunction(entry.value, entry.key, this);
|
|
@@ -2801,7 +2966,7 @@
|
|
|
2801
2966
|
}
|
|
2802
2967
|
});
|
|
2803
2968
|
|
|
2804
|
-
redefineAll(
|
|
2969
|
+
redefineAll(Prototype, IS_MAP ? {
|
|
2805
2970
|
// `Map.prototype.get(key)` method
|
|
2806
2971
|
// https://tc39.es/ecma262/#sec-map.prototype.get
|
|
2807
2972
|
get: function get(key) {
|
|
@@ -2820,14 +2985,14 @@
|
|
|
2820
2985
|
return define(this, value = value === 0 ? 0 : value, value);
|
|
2821
2986
|
}
|
|
2822
2987
|
});
|
|
2823
|
-
if (descriptors) defineProperty(
|
|
2988
|
+
if (descriptors) defineProperty(Prototype, 'size', {
|
|
2824
2989
|
get: function () {
|
|
2825
2990
|
return getInternalState(this).size;
|
|
2826
2991
|
}
|
|
2827
2992
|
});
|
|
2828
|
-
return
|
|
2993
|
+
return Constructor;
|
|
2829
2994
|
},
|
|
2830
|
-
setStrong: function (
|
|
2995
|
+
setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) {
|
|
2831
2996
|
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
|
|
2832
2997
|
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
|
|
2833
2998
|
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
|
|
@@ -2840,7 +3005,7 @@
|
|
|
2840
3005
|
// https://tc39.es/ecma262/#sec-set.prototype.keys
|
|
2841
3006
|
// https://tc39.es/ecma262/#sec-set.prototype.values
|
|
2842
3007
|
// https://tc39.es/ecma262/#sec-set.prototype-@@iterator
|
|
2843
|
-
defineIterator(
|
|
3008
|
+
defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) {
|
|
2844
3009
|
setInternalState(this, {
|
|
2845
3010
|
type: ITERATOR_NAME,
|
|
2846
3011
|
target: iterated,
|
|
@@ -2956,6 +3121,8 @@
|
|
|
2956
3121
|
// Store setTimeout reference so promise-polyfill will be unaffected by
|
|
2957
3122
|
// other code modifying setTimeout (like sinon.useFakeTimers())
|
|
2958
3123
|
var setTimeoutFunc = setTimeout;
|
|
3124
|
+
// @ts-ignore
|
|
3125
|
+
var setImmediateFunc = typeof setImmediate !== 'undefined' ? setImmediate : null;
|
|
2959
3126
|
|
|
2960
3127
|
function isArray(x) {
|
|
2961
3128
|
return Boolean(x && typeof x.length !== 'undefined');
|
|
@@ -3189,10 +3356,10 @@
|
|
|
3189
3356
|
// Use polyfill for setImmediate for performance gains
|
|
3190
3357
|
Promise$1._immediateFn =
|
|
3191
3358
|
// @ts-ignore
|
|
3192
|
-
(typeof
|
|
3359
|
+
(typeof setImmediateFunc === 'function' &&
|
|
3193
3360
|
function(fn) {
|
|
3194
3361
|
// @ts-ignore
|
|
3195
|
-
|
|
3362
|
+
setImmediateFunc(fn);
|
|
3196
3363
|
}) ||
|
|
3197
3364
|
function(fn) {
|
|
3198
3365
|
setTimeoutFunc(fn, 0);
|
|
@@ -3227,10 +3394,13 @@
|
|
|
3227
3394
|
// https://github.com/taylorhakes/promise-polyfill/issues/114
|
|
3228
3395
|
if (typeof globalNS['Promise'] !== 'function') {
|
|
3229
3396
|
globalNS['Promise'] = Promise$1;
|
|
3230
|
-
} else
|
|
3231
|
-
globalNS.Promise.prototype['finally']
|
|
3232
|
-
|
|
3233
|
-
|
|
3397
|
+
} else {
|
|
3398
|
+
if (!globalNS.Promise.prototype['finally']) {
|
|
3399
|
+
globalNS.Promise.prototype['finally'] = finallyConstructor;
|
|
3400
|
+
}
|
|
3401
|
+
if (!globalNS.Promise.allSettled) {
|
|
3402
|
+
globalNS.Promise.allSettled = allSettled;
|
|
3403
|
+
}
|
|
3234
3404
|
}
|
|
3235
3405
|
|
|
3236
3406
|
(function(l){function m(){}function k(a,c){a=void 0===a?"utf-8":a;c=void 0===c?{fatal:!1}:c;if(-1===r.indexOf(a.toLowerCase()))throw new RangeError("Failed to construct 'TextDecoder': The encoding label provided ('"+a+"') is invalid.");if(c.fatal)throw Error("Failed to construct 'TextDecoder': the 'fatal' option is unsupported.");}function t(a){return Buffer.from(a.buffer,a.byteOffset,a.byteLength).toString("utf-8")}function u(a){var c=URL.createObjectURL(new Blob([a],{type:"text/plain;charset=UTF-8"}));
|
|
@@ -4008,7 +4178,7 @@
|
|
|
4008
4178
|
|
|
4009
4179
|
var Lock = unwrapExports(browserTabsLock);
|
|
4010
4180
|
|
|
4011
|
-
var version = '1.19.
|
|
4181
|
+
var version = '1.19.4';
|
|
4012
4182
|
|
|
4013
4183
|
/**
|
|
4014
4184
|
* @ignore
|
|
@@ -4839,7 +5009,7 @@
|
|
|
4839
5009
|
function TransactionManager(storage, clientId) {
|
|
4840
5010
|
this.storage = storage;
|
|
4841
5011
|
this.clientId = clientId;
|
|
4842
|
-
this.storageKey = TRANSACTION_STORAGE_KEY_PREFIX + "." + clientId;
|
|
5012
|
+
this.storageKey = TRANSACTION_STORAGE_KEY_PREFIX + "." + this.clientId;
|
|
4843
5013
|
this.transaction = this.storage.get(this.storageKey);
|
|
4844
5014
|
}
|
|
4845
5015
|
TransactionManager.prototype.create = function (transaction) {
|
|
@@ -5437,8 +5607,11 @@
|
|
|
5437
5607
|
return "" + this.domainUrl + path + "&auth0Client=" + auth0Client;
|
|
5438
5608
|
};
|
|
5439
5609
|
Auth0Client.prototype._getParams = function (authorizeOptions, state, nonce, code_challenge, redirect_uri) {
|
|
5440
|
-
|
|
5441
|
-
|
|
5610
|
+
// These options should be excluded from the authorize URL,
|
|
5611
|
+
// as they're options for the client and not for the IdP.
|
|
5612
|
+
// ** IMPORTANT ** If adding a new client option, include it in this destructure list.
|
|
5613
|
+
var _a = this.options; _a.useRefreshTokens; _a.useCookiesForTransactions; _a.useFormData; _a.auth0Client; _a.cacheLocation; _a.advancedOptions; _a.detailedResponse; _a.nowProvider; _a.authorizeTimeoutInSeconds; _a.legacySameSiteCookie; _a.sessionCheckExpiryDays; _a.domain; _a.leeway; var loginOptions = __rest(_a, ["useRefreshTokens", "useCookiesForTransactions", "useFormData", "auth0Client", "cacheLocation", "advancedOptions", "detailedResponse", "nowProvider", "authorizeTimeoutInSeconds", "legacySameSiteCookie", "sessionCheckExpiryDays", "domain", "leeway"]);
|
|
5614
|
+
return __assign(__assign(__assign({}, loginOptions), authorizeOptions), { scope: getUniqueScopes(this.defaultScope, this.scope, authorizeOptions.scope), response_type: 'code', response_mode: 'query', state: state, nonce: nonce, redirect_uri: redirect_uri || this.options.redirect_uri, code_challenge: code_challenge, code_challenge_method: 'S256' });
|
|
5442
5615
|
};
|
|
5443
5616
|
Auth0Client.prototype._authorizeUrl = function (authorizeOptions) {
|
|
5444
5617
|
return this._url("/authorize?" + createQueryParams(authorizeOptions));
|
|
@@ -5473,7 +5646,9 @@
|
|
|
5473
5646
|
};
|
|
5474
5647
|
Auth0Client.prototype._processOrgIdHint = function (organizationId) {
|
|
5475
5648
|
if (organizationId) {
|
|
5476
|
-
this.cookieStorage.save(this.orgHintCookieName, organizationId
|
|
5649
|
+
this.cookieStorage.save(this.orgHintCookieName, organizationId, {
|
|
5650
|
+
daysUntilExpire: this.sessionCheckExpiryDays
|
|
5651
|
+
});
|
|
5477
5652
|
}
|
|
5478
5653
|
else {
|
|
5479
5654
|
this.cookieStorage.remove(this.orgHintCookieName);
|
|
@@ -5509,7 +5684,7 @@
|
|
|
5509
5684
|
params = this._getParams(authorizeOptions, stateIn, nonceIn, code_challenge, redirect_uri);
|
|
5510
5685
|
url = this._authorizeUrl(params);
|
|
5511
5686
|
organizationId = options.organization || this.options.organization;
|
|
5512
|
-
this.transactionManager.create(__assign({ nonce: nonceIn, code_verifier: code_verifier, appState: appState, scope: params.scope, audience: params.audience || 'default', redirect_uri: params.redirect_uri }, (organizationId && { organizationId: organizationId })));
|
|
5687
|
+
this.transactionManager.create(__assign({ nonce: nonceIn, code_verifier: code_verifier, appState: appState, scope: params.scope, audience: params.audience || 'default', redirect_uri: params.redirect_uri, state: stateIn }, (organizationId && { organizationId: organizationId })));
|
|
5513
5688
|
return [2 /*return*/, url + fragment];
|
|
5514
5689
|
}
|
|
5515
5690
|
});
|
|
@@ -5716,14 +5891,18 @@
|
|
|
5716
5891
|
}
|
|
5717
5892
|
_a = parseQueryResult(queryStringFragments.join('')), state = _a.state, code = _a.code, error = _a.error, error_description = _a.error_description;
|
|
5718
5893
|
transaction = this.transactionManager.get();
|
|
5719
|
-
|
|
5720
|
-
if (!transaction || !transaction.code_verifier) {
|
|
5894
|
+
if (!transaction) {
|
|
5721
5895
|
throw new Error('Invalid state');
|
|
5722
5896
|
}
|
|
5723
5897
|
this.transactionManager.remove();
|
|
5724
5898
|
if (error) {
|
|
5725
5899
|
throw new AuthenticationError(error, error_description, state, transaction.appState);
|
|
5726
5900
|
}
|
|
5901
|
+
// Transaction should have a `code_verifier` to do PKCE for CSRF protection
|
|
5902
|
+
if (!transaction.code_verifier ||
|
|
5903
|
+
(transaction.state && transaction.state !== state)) {
|
|
5904
|
+
throw new Error('Invalid state');
|
|
5905
|
+
}
|
|
5727
5906
|
tokenOptions = {
|
|
5728
5907
|
audience: transaction.audience,
|
|
5729
5908
|
scope: transaction.scope,
|
|
@@ -5746,7 +5925,7 @@
|
|
|
5746
5925
|
return [4 /*yield*/, this._verifyIdToken(authResult.id_token, transaction.nonce, transaction.organizationId)];
|
|
5747
5926
|
case 2:
|
|
5748
5927
|
decodedToken = _b.sent();
|
|
5749
|
-
return [4 /*yield*/, this.cacheManager.set(__assign(__assign({}, authResult), { decodedToken: decodedToken, audience: transaction.audience, scope: transaction.scope, client_id: this.options.client_id }))];
|
|
5928
|
+
return [4 /*yield*/, this.cacheManager.set(__assign(__assign(__assign(__assign({}, authResult), { decodedToken: decodedToken, audience: transaction.audience, scope: transaction.scope }), (authResult.scope ? { oauthTokenScope: authResult.scope } : null)), { client_id: this.options.client_id }))];
|
|
5750
5929
|
case 3:
|
|
5751
5930
|
_b.sent();
|
|
5752
5931
|
this.cookieStorage.save(this.isAuthenticatedCookieName, true, {
|
|
@@ -5777,6 +5956,12 @@
|
|
|
5777
5956
|
* `Auth0Client` constructor. You should not need this if you are using the
|
|
5778
5957
|
* `createAuth0Client` factory.
|
|
5779
5958
|
*
|
|
5959
|
+
* **Note:** the cookie **may not** be present if running an app using a private tab, as some
|
|
5960
|
+
* browsers clear JS cookie data and local storage when the tab or page is closed, or on page reload. This effectively
|
|
5961
|
+
* means that `checkSession` could silently return without authenticating the user on page refresh when
|
|
5962
|
+
* using a private tab, despite having previously logged in. As a workaround, use `getTokenSilently` instead
|
|
5963
|
+
* and handle the possible `login_required` error [as shown in the readme](https://github.com/auth0/auth0-spa-js#creating-the-client).
|
|
5964
|
+
*
|
|
5780
5965
|
* @param options
|
|
5781
5966
|
*/
|
|
5782
5967
|
Auth0Client.prototype.checkSession = function (options) {
|
|
@@ -6055,7 +6240,7 @@
|
|
|
6055
6240
|
};
|
|
6056
6241
|
Auth0Client.prototype._getTokenFromIFrame = function (options) {
|
|
6057
6242
|
return __awaiter(this, void 0, void 0, function () {
|
|
6058
|
-
var stateIn, nonceIn, code_verifier, code_challengeBuffer, code_challenge, params, orgIdHint, url, timeout, codeResult, scope, audience, customOptions, tokenResult, decodedToken, e_1;
|
|
6243
|
+
var stateIn, nonceIn, code_verifier, code_challengeBuffer, code_challenge, withoutClientOptions, params, orgIdHint, url, timeout, codeResult, scope, audience, customOptions, tokenResult, decodedToken, e_1;
|
|
6059
6244
|
return __generator(this, function (_a) {
|
|
6060
6245
|
switch (_a.label) {
|
|
6061
6246
|
case 0:
|
|
@@ -6066,7 +6251,8 @@
|
|
|
6066
6251
|
case 1:
|
|
6067
6252
|
code_challengeBuffer = _a.sent();
|
|
6068
6253
|
code_challenge = bufferToBase64UrlEncoded(code_challengeBuffer);
|
|
6069
|
-
|
|
6254
|
+
withoutClientOptions = __rest(options, ["detailedResponse"]);
|
|
6255
|
+
params = this._getParams(withoutClientOptions, stateIn, nonceIn, code_challenge, options.redirect_uri ||
|
|
6070
6256
|
this.options.redirect_uri ||
|
|
6071
6257
|
window.location.origin);
|
|
6072
6258
|
orgIdHint = this.cookieStorage.get(this.orgHintCookieName);
|
|
@@ -6090,7 +6276,7 @@
|
|
|
6090
6276
|
if (stateIn !== codeResult.state) {
|
|
6091
6277
|
throw new Error('Invalid state');
|
|
6092
6278
|
}
|
|
6093
|
-
scope = options.scope, audience = options.audience, customOptions = __rest(options, ["scope", "audience", "redirect_uri", "ignoreCache", "timeoutInSeconds"]);
|
|
6279
|
+
scope = options.scope, audience = options.audience, customOptions = __rest(options, ["scope", "audience", "redirect_uri", "ignoreCache", "timeoutInSeconds", "detailedResponse"]);
|
|
6094
6280
|
return [4 /*yield*/, oauthToken(__assign(__assign(__assign({}, this.customOptions), customOptions), { scope: scope, audience: audience, baseUrl: this.domainUrl, client_id: this.options.client_id, code_verifier: code_verifier, code: codeResult.code, grant_type: 'authorization_code', redirect_uri: params.redirect_uri, auth0Client: this.options.auth0Client, useFormData: this.options.useFormData }), this.worker)];
|
|
6095
6281
|
case 4:
|
|
6096
6282
|
tokenResult = _a.sent();
|
|
@@ -6133,7 +6319,7 @@
|
|
|
6133
6319
|
redirect_uri = options.redirect_uri ||
|
|
6134
6320
|
this.options.redirect_uri ||
|
|
6135
6321
|
window.location.origin;
|
|
6136
|
-
scope = options.scope, audience = options.audience, customOptions = __rest(options, ["scope", "audience", "ignoreCache", "timeoutInSeconds"]);
|
|
6322
|
+
scope = options.scope, audience = options.audience, customOptions = __rest(options, ["scope", "audience", "ignoreCache", "timeoutInSeconds", "detailedResponse"]);
|
|
6137
6323
|
timeout = typeof options.timeoutInSeconds === 'number'
|
|
6138
6324
|
? options.timeoutInSeconds * 1000
|
|
6139
6325
|
: null;
|
|
@@ -6197,6 +6383,15 @@
|
|
|
6197
6383
|
return Auth0Client;
|
|
6198
6384
|
}());
|
|
6199
6385
|
|
|
6386
|
+
/**
|
|
6387
|
+
* Asynchronously creates the Auth0Client instance and calls `checkSession`.
|
|
6388
|
+
*
|
|
6389
|
+
* **Note:** There are caveats to using this in a private browser tab, which may not silently authenticae
|
|
6390
|
+
* a user on page refresh. Please see [the checkSession docs](https://auth0.github.io/auth0-spa-js/classes/auth0client.html#checksession) for more info.
|
|
6391
|
+
*
|
|
6392
|
+
* @param options The client options
|
|
6393
|
+
* @returns An instance of Auth0Client
|
|
6394
|
+
*/
|
|
6200
6395
|
function createAuth0Client(options) {
|
|
6201
6396
|
return __awaiter(this, void 0, void 0, function () {
|
|
6202
6397
|
var auth0;
|