contentful 11.10.1 → 11.10.3
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/contentful.browser.js +1615 -1461
- package/dist/contentful.browser.min.js +1 -1
- package/dist/contentful.cjs +484 -309
- package/dist/stats-browser-min.html +1 -1
- package/package.json +3 -2
|
@@ -624,7 +624,7 @@ var contentful = (function (exports) {
|
|
|
624
624
|
* @param {*} thisArg - The value to be passed as the `this` parameter
|
|
625
625
|
* @returns {Function} A new function that will call the original function with the specified `this` context
|
|
626
626
|
*/
|
|
627
|
-
function bind$
|
|
627
|
+
function bind$3(fn, thisArg) {
|
|
628
628
|
return function wrap() {
|
|
629
629
|
return fn.apply(thisArg, arguments);
|
|
630
630
|
};
|
|
@@ -1012,7 +1012,7 @@ var contentful = (function (exports) {
|
|
|
1012
1012
|
allOwnKeys = _ref5.allOwnKeys;
|
|
1013
1013
|
forEach(b, function (val, key) {
|
|
1014
1014
|
if (thisArg && isFunction$1(val)) {
|
|
1015
|
-
a[key] = bind$
|
|
1015
|
+
a[key] = bind$3(val, thisArg);
|
|
1016
1016
|
} else {
|
|
1017
1017
|
a[key] = val;
|
|
1018
1018
|
}
|
|
@@ -4327,7 +4327,7 @@ var contentful = (function (exports) {
|
|
|
4327
4327
|
*/
|
|
4328
4328
|
function createInstance(defaultConfig) {
|
|
4329
4329
|
var context = new Axios$1(defaultConfig);
|
|
4330
|
-
var instance = bind$
|
|
4330
|
+
var instance = bind$3(Axios$1.prototype.request, context);
|
|
4331
4331
|
|
|
4332
4332
|
// Copy axios.prototype to instance
|
|
4333
4333
|
utils$1$1.extend(instance, Axios$1.prototype, context, {
|
|
@@ -5356,12 +5356,50 @@ var contentful = (function (exports) {
|
|
|
5356
5356
|
var _this;
|
|
5357
5357
|
_classCallCheck(this, AbortError);
|
|
5358
5358
|
_this = _callSuper$2(this, AbortError, ['Throttled function aborted']);
|
|
5359
|
-
_this
|
|
5359
|
+
_defineProperty(_this, "name", 'AbortError');
|
|
5360
5360
|
return _this;
|
|
5361
5361
|
}
|
|
5362
5362
|
_inherits(AbortError, _Error);
|
|
5363
5363
|
return _createClass(AbortError);
|
|
5364
5364
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
5365
|
+
/**
|
|
5366
|
+
* Throttle promise-returning/async/normal functions.
|
|
5367
|
+
*
|
|
5368
|
+
* It rate-limits function calls without discarding them, making it ideal for external API interactions where avoiding call loss is crucial.
|
|
5369
|
+
*
|
|
5370
|
+
* @returns A throttle function.
|
|
5371
|
+
*
|
|
5372
|
+
* Both the `limit` and `interval` options must be specified.
|
|
5373
|
+
*
|
|
5374
|
+
* @example
|
|
5375
|
+
* ```
|
|
5376
|
+
* import pThrottle from './PThrottle';
|
|
5377
|
+
*
|
|
5378
|
+
* const now = Date.now();
|
|
5379
|
+
*
|
|
5380
|
+
* const throttle = pThrottle({
|
|
5381
|
+
* limit: 2,
|
|
5382
|
+
* interval: 1000
|
|
5383
|
+
* });
|
|
5384
|
+
*
|
|
5385
|
+
* const throttled = throttle(async index => {
|
|
5386
|
+
* const secDiff = ((Date.now() - now) / 1000).toFixed();
|
|
5387
|
+
* return `${index}: ${secDiff}s`;
|
|
5388
|
+
* });
|
|
5389
|
+
*
|
|
5390
|
+
* for (let index = 1; index <= 6; index++) {
|
|
5391
|
+
* (async () => {
|
|
5392
|
+
* console.log(await throttled(index));
|
|
5393
|
+
* })();
|
|
5394
|
+
* }
|
|
5395
|
+
* //=> 1: 0s
|
|
5396
|
+
* //=> 2: 0s
|
|
5397
|
+
* //=> 3: 1s
|
|
5398
|
+
* //=> 4: 1s
|
|
5399
|
+
* //=> 5: 2s
|
|
5400
|
+
* //=> 6: 2s
|
|
5401
|
+
* ```
|
|
5402
|
+
*/
|
|
5365
5403
|
function pThrottle(_ref) {
|
|
5366
5404
|
var limit = _ref.limit,
|
|
5367
5405
|
interval = _ref.interval,
|
|
@@ -5420,7 +5458,7 @@ var contentful = (function (exports) {
|
|
|
5420
5458
|
if (delay > 0) {
|
|
5421
5459
|
timeoutId = setTimeout(execute, delay);
|
|
5422
5460
|
queue.set(timeoutId, reject);
|
|
5423
|
-
onDelay === null || onDelay === void 0 || onDelay
|
|
5461
|
+
onDelay === null || onDelay === void 0 || onDelay();
|
|
5424
5462
|
} else {
|
|
5425
5463
|
execute();
|
|
5426
5464
|
}
|
|
@@ -5475,7 +5513,7 @@ var contentful = (function (exports) {
|
|
|
5475
5513
|
limit: limit,
|
|
5476
5514
|
interval: 1000});
|
|
5477
5515
|
}
|
|
5478
|
-
var rateLimitThrottle =
|
|
5516
|
+
var rateLimitThrottle = function rateLimitThrottle(axiosInstance) {
|
|
5479
5517
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'auto';
|
|
5480
5518
|
var _axiosInstance$defaul = axiosInstance.defaults.logHandler,
|
|
5481
5519
|
logHandler = _axiosInstance$defaul === void 0 ? noop : _axiosInstance$defaul;
|
|
@@ -5517,1554 +5555,1547 @@ var contentful = (function (exports) {
|
|
|
5517
5555
|
axiosInstance.interceptors.request.eject(requestInterceptorId);
|
|
5518
5556
|
axiosInstance.interceptors.response.eject(responseInterceptorId);
|
|
5519
5557
|
};
|
|
5520
|
-
}
|
|
5521
|
-
|
|
5522
|
-
/** @type {import('.')} */
|
|
5523
|
-
var esObjectAtoms = Object;
|
|
5524
|
-
|
|
5525
|
-
/** @type {import('.')} */
|
|
5526
|
-
var esErrors = Error;
|
|
5527
|
-
|
|
5528
|
-
/** @type {import('./eval')} */
|
|
5529
|
-
var _eval = EvalError;
|
|
5530
|
-
|
|
5531
|
-
/** @type {import('./range')} */
|
|
5532
|
-
var range = RangeError;
|
|
5533
|
-
|
|
5534
|
-
/** @type {import('./ref')} */
|
|
5535
|
-
var ref = ReferenceError;
|
|
5536
|
-
|
|
5537
|
-
/** @type {import('./syntax')} */
|
|
5538
|
-
var syntax = SyntaxError;
|
|
5558
|
+
};
|
|
5539
5559
|
|
|
5540
5560
|
/** @type {import('./type')} */
|
|
5541
5561
|
var type = TypeError;
|
|
5542
5562
|
|
|
5543
|
-
|
|
5544
|
-
var uri = URIError;
|
|
5545
|
-
|
|
5546
|
-
/** @type {import('./abs')} */
|
|
5547
|
-
var abs$1 = Math.abs;
|
|
5548
|
-
|
|
5549
|
-
/** @type {import('./floor')} */
|
|
5550
|
-
var floor$1 = Math.floor;
|
|
5551
|
-
|
|
5552
|
-
/** @type {import('./max')} */
|
|
5553
|
-
var max$1 = Math.max;
|
|
5554
|
-
|
|
5555
|
-
/** @type {import('./min')} */
|
|
5556
|
-
var min$1 = Math.min;
|
|
5557
|
-
|
|
5558
|
-
/** @type {import('./pow')} */
|
|
5559
|
-
var pow$1 = Math.pow;
|
|
5560
|
-
|
|
5561
|
-
/** @type {import('./round')} */
|
|
5562
|
-
var round$1 = Math.round;
|
|
5563
|
+
var _nodeResolve_empty = {};
|
|
5563
5564
|
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5567
|
-
};
|
|
5565
|
+
var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
|
|
5566
|
+
__proto__: null,
|
|
5567
|
+
default: _nodeResolve_empty
|
|
5568
|
+
});
|
|
5568
5569
|
|
|
5569
|
-
var
|
|
5570
|
+
var require$$0 = /*@__PURE__*/getDefaultExportFromNamespaceIfNotNamed(_nodeResolve_empty$1);
|
|
5570
5571
|
|
|
5571
|
-
|
|
5572
|
-
var
|
|
5573
|
-
|
|
5574
|
-
|
|
5572
|
+
var hasMap = typeof Map === 'function' && Map.prototype;
|
|
5573
|
+
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
|
|
5574
|
+
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
|
|
5575
|
+
var mapForEach = hasMap && Map.prototype.forEach;
|
|
5576
|
+
var hasSet = typeof Set === 'function' && Set.prototype;
|
|
5577
|
+
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
|
|
5578
|
+
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
|
|
5579
|
+
var setForEach = hasSet && Set.prototype.forEach;
|
|
5580
|
+
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
5581
|
+
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
5582
|
+
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
5583
|
+
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
5584
|
+
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
5585
|
+
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
5586
|
+
var booleanValueOf = Boolean.prototype.valueOf;
|
|
5587
|
+
var objectToString = Object.prototype.toString;
|
|
5588
|
+
var functionToString = Function.prototype.toString;
|
|
5589
|
+
var $match = String.prototype.match;
|
|
5590
|
+
var $slice = String.prototype.slice;
|
|
5591
|
+
var $replace$1 = String.prototype.replace;
|
|
5592
|
+
var $toUpperCase = String.prototype.toUpperCase;
|
|
5593
|
+
var $toLowerCase = String.prototype.toLowerCase;
|
|
5594
|
+
var $test = RegExp.prototype.test;
|
|
5595
|
+
var $concat$1 = Array.prototype.concat;
|
|
5596
|
+
var $join = Array.prototype.join;
|
|
5597
|
+
var $arrSlice = Array.prototype.slice;
|
|
5598
|
+
var $floor = Math.floor;
|
|
5599
|
+
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
5600
|
+
var gOPS = Object.getOwnPropertySymbols;
|
|
5601
|
+
var symToString = typeof Symbol === 'function' && _typeof$2(Symbol.iterator) === 'symbol' ? Symbol.prototype.toString : null;
|
|
5602
|
+
var hasShammedSymbols = typeof Symbol === 'function' && _typeof$2(Symbol.iterator) === 'object';
|
|
5603
|
+
// ie, `has-tostringtag/shams
|
|
5604
|
+
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (_typeof$2(Symbol.toStringTag) === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null;
|
|
5605
|
+
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
5606
|
+
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
5607
|
+
? function (O) {
|
|
5608
|
+
return O.__proto__; // eslint-disable-line no-proto
|
|
5609
|
+
} : null);
|
|
5610
|
+
function addNumericSeparator(num, str) {
|
|
5611
|
+
if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1000 || $test.call(/e/, str)) {
|
|
5612
|
+
return str;
|
|
5575
5613
|
}
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
if ($gOPD$1) {
|
|
5585
|
-
try {
|
|
5586
|
-
$gOPD$1([], 'length');
|
|
5587
|
-
} catch (e) {
|
|
5588
|
-
// IE 8 has a broken gOPD
|
|
5589
|
-
$gOPD$1 = null;
|
|
5614
|
+
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
5615
|
+
if (typeof num === 'number') {
|
|
5616
|
+
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
5617
|
+
if (int !== num) {
|
|
5618
|
+
var intStr = String(int);
|
|
5619
|
+
var dec = $slice.call(str, intStr.length + 1);
|
|
5620
|
+
return $replace$1.call(intStr, sepRegex, '$&_') + '.' + $replace$1.call($replace$1.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
5621
|
+
}
|
|
5590
5622
|
}
|
|
5623
|
+
return $replace$1.call(str, sepRegex, '$&_');
|
|
5591
5624
|
}
|
|
5592
|
-
var
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
var
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5625
|
+
var utilInspect = require$$0;
|
|
5626
|
+
var inspectCustom = utilInspect.custom;
|
|
5627
|
+
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
5628
|
+
var quotes = {
|
|
5629
|
+
__proto__: null,
|
|
5630
|
+
'double': '"',
|
|
5631
|
+
single: "'"
|
|
5632
|
+
};
|
|
5633
|
+
var quoteREs = {
|
|
5634
|
+
__proto__: null,
|
|
5635
|
+
'double': /(["\\])/g,
|
|
5636
|
+
single: /(['\\])/g
|
|
5637
|
+
};
|
|
5638
|
+
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
5639
|
+
var opts = options || {};
|
|
5640
|
+
if (has$3(opts, 'quoteStyle') && !has$3(quotes, opts.quoteStyle)) {
|
|
5641
|
+
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
5604
5642
|
}
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5643
|
+
if (has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
|
|
5644
|
+
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
5645
|
+
}
|
|
5646
|
+
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
5647
|
+
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
5648
|
+
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
5649
|
+
}
|
|
5650
|
+
if (has$3(opts, 'indent') && opts.indent !== null && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
|
|
5651
|
+
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
5652
|
+
}
|
|
5653
|
+
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
5654
|
+
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
5655
|
+
}
|
|
5656
|
+
var numericSeparator = opts.numericSeparator;
|
|
5657
|
+
if (typeof obj === 'undefined') {
|
|
5658
|
+
return 'undefined';
|
|
5659
|
+
}
|
|
5660
|
+
if (obj === null) {
|
|
5661
|
+
return 'null';
|
|
5662
|
+
}
|
|
5663
|
+
if (typeof obj === 'boolean') {
|
|
5664
|
+
return obj ? 'true' : 'false';
|
|
5665
|
+
}
|
|
5666
|
+
if (typeof obj === 'string') {
|
|
5667
|
+
return inspectString(obj, opts);
|
|
5668
|
+
}
|
|
5669
|
+
if (typeof obj === 'number') {
|
|
5670
|
+
if (obj === 0) {
|
|
5671
|
+
return Infinity / obj > 0 ? '0' : '-0';
|
|
5619
5672
|
}
|
|
5620
|
-
|
|
5621
|
-
|
|
5673
|
+
var str = String(obj);
|
|
5674
|
+
return numericSeparator ? addNumericSeparator(obj, str) : str;
|
|
5675
|
+
}
|
|
5676
|
+
if (typeof obj === 'bigint') {
|
|
5677
|
+
var bigIntStr = String(obj) + 'n';
|
|
5678
|
+
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
|
|
5679
|
+
}
|
|
5680
|
+
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
|
|
5681
|
+
if (typeof depth === 'undefined') {
|
|
5682
|
+
depth = 0;
|
|
5683
|
+
}
|
|
5684
|
+
if (depth >= maxDepth && maxDepth > 0 && _typeof$2(obj) === 'object') {
|
|
5685
|
+
return isArray$3(obj) ? '[Array]' : '[Object]';
|
|
5686
|
+
}
|
|
5687
|
+
var indent = getIndent(opts, depth);
|
|
5688
|
+
if (typeof seen === 'undefined') {
|
|
5689
|
+
seen = [];
|
|
5690
|
+
} else if (indexOf(seen, obj) >= 0) {
|
|
5691
|
+
return '[Circular]';
|
|
5692
|
+
}
|
|
5693
|
+
function inspect(value, from, noIndent) {
|
|
5694
|
+
if (from) {
|
|
5695
|
+
seen = $arrSlice.call(seen);
|
|
5696
|
+
seen.push(from);
|
|
5622
5697
|
}
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5698
|
+
if (noIndent) {
|
|
5699
|
+
var newOpts = {
|
|
5700
|
+
depth: opts.depth
|
|
5701
|
+
};
|
|
5702
|
+
if (has$3(opts, 'quoteStyle')) {
|
|
5703
|
+
newOpts.quoteStyle = opts.quoteStyle;
|
|
5704
|
+
}
|
|
5705
|
+
return inspect_(value, newOpts, depth + 1, seen);
|
|
5630
5706
|
}
|
|
5631
|
-
|
|
5632
|
-
|
|
5707
|
+
return inspect_(value, opts, depth + 1, seen);
|
|
5708
|
+
}
|
|
5709
|
+
if (typeof obj === 'function' && !isRegExp$1(obj)) {
|
|
5710
|
+
// in older engines, regexes are callable
|
|
5711
|
+
var name = nameOf(obj);
|
|
5712
|
+
var keys = arrObjKeys(obj, inspect);
|
|
5713
|
+
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
5714
|
+
}
|
|
5715
|
+
if (isSymbol(obj)) {
|
|
5716
|
+
var symString = hasShammedSymbols ? $replace$1.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
5717
|
+
return _typeof$2(obj) === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
5718
|
+
}
|
|
5719
|
+
if (isElement(obj)) {
|
|
5720
|
+
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
5721
|
+
var attrs = obj.attributes || [];
|
|
5722
|
+
for (var i = 0; i < attrs.length; i++) {
|
|
5723
|
+
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
5633
5724
|
}
|
|
5634
|
-
|
|
5635
|
-
|
|
5725
|
+
s += '>';
|
|
5726
|
+
if (obj.childNodes && obj.childNodes.length) {
|
|
5727
|
+
s += '...';
|
|
5636
5728
|
}
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
5644
|
-
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
5645
|
-
|
|
5646
|
-
var symVal = 42;
|
|
5647
|
-
obj[sym] = symVal;
|
|
5648
|
-
for (var _ in obj) {
|
|
5649
|
-
return false;
|
|
5650
|
-
} // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
5651
|
-
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) {
|
|
5652
|
-
return false;
|
|
5729
|
+
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
|
|
5730
|
+
return s;
|
|
5731
|
+
}
|
|
5732
|
+
if (isArray$3(obj)) {
|
|
5733
|
+
if (obj.length === 0) {
|
|
5734
|
+
return '[]';
|
|
5653
5735
|
}
|
|
5654
|
-
|
|
5655
|
-
|
|
5736
|
+
var xs = arrObjKeys(obj, inspect);
|
|
5737
|
+
if (indent && !singleLineValues(xs)) {
|
|
5738
|
+
return '[' + indentedJoin(xs, indent) + ']';
|
|
5656
5739
|
}
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5740
|
+
return '[ ' + $join.call(xs, ', ') + ' ]';
|
|
5741
|
+
}
|
|
5742
|
+
if (isError(obj)) {
|
|
5743
|
+
var parts = arrObjKeys(obj, inspect);
|
|
5744
|
+
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
|
|
5745
|
+
return '{ [' + String(obj) + '] ' + $join.call($concat$1.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
|
|
5660
5746
|
}
|
|
5661
|
-
if (
|
|
5662
|
-
return
|
|
5747
|
+
if (parts.length === 0) {
|
|
5748
|
+
return '[' + String(obj) + ']';
|
|
5663
5749
|
}
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
|
|
5750
|
+
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
|
|
5751
|
+
}
|
|
5752
|
+
if (_typeof$2(obj) === 'object' && customInspect) {
|
|
5753
|
+
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
|
|
5754
|
+
return utilInspect(obj, {
|
|
5755
|
+
depth: maxDepth - depth
|
|
5756
|
+
});
|
|
5757
|
+
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
5758
|
+
return obj.inspect();
|
|
5670
5759
|
}
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
function requireHasSymbols() {
|
|
5679
|
-
if (hasRequiredHasSymbols) return hasSymbols$1;
|
|
5680
|
-
hasRequiredHasSymbols = 1;
|
|
5681
|
-
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
5682
|
-
var hasSymbolSham = requireShams();
|
|
5683
|
-
|
|
5684
|
-
/** @type {import('.')} */
|
|
5685
|
-
hasSymbols$1 = function hasNativeSymbols() {
|
|
5686
|
-
if (typeof origSymbol !== 'function') {
|
|
5687
|
-
return false;
|
|
5760
|
+
}
|
|
5761
|
+
if (isMap(obj)) {
|
|
5762
|
+
var mapParts = [];
|
|
5763
|
+
if (mapForEach) {
|
|
5764
|
+
mapForEach.call(obj, function (value, key) {
|
|
5765
|
+
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
|
|
5766
|
+
});
|
|
5688
5767
|
}
|
|
5689
|
-
|
|
5690
|
-
|
|
5768
|
+
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
|
|
5769
|
+
}
|
|
5770
|
+
if (isSet(obj)) {
|
|
5771
|
+
var setParts = [];
|
|
5772
|
+
if (setForEach) {
|
|
5773
|
+
setForEach.call(obj, function (value) {
|
|
5774
|
+
setParts.push(inspect(value, obj));
|
|
5775
|
+
});
|
|
5691
5776
|
}
|
|
5692
|
-
|
|
5693
|
-
|
|
5777
|
+
return collectionOf('Set', setSize.call(obj), setParts, indent);
|
|
5778
|
+
}
|
|
5779
|
+
if (isWeakMap(obj)) {
|
|
5780
|
+
return weakCollectionOf('WeakMap');
|
|
5781
|
+
}
|
|
5782
|
+
if (isWeakSet(obj)) {
|
|
5783
|
+
return weakCollectionOf('WeakSet');
|
|
5784
|
+
}
|
|
5785
|
+
if (isWeakRef(obj)) {
|
|
5786
|
+
return weakCollectionOf('WeakRef');
|
|
5787
|
+
}
|
|
5788
|
+
if (isNumber(obj)) {
|
|
5789
|
+
return markBoxed(inspect(Number(obj)));
|
|
5790
|
+
}
|
|
5791
|
+
if (isBigInt(obj)) {
|
|
5792
|
+
return markBoxed(inspect(bigIntValueOf.call(obj)));
|
|
5793
|
+
}
|
|
5794
|
+
if (isBoolean(obj)) {
|
|
5795
|
+
return markBoxed(booleanValueOf.call(obj));
|
|
5796
|
+
}
|
|
5797
|
+
if (isString(obj)) {
|
|
5798
|
+
return markBoxed(inspect(String(obj)));
|
|
5799
|
+
}
|
|
5800
|
+
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
|
|
5801
|
+
/* eslint-env browser */
|
|
5802
|
+
if (typeof window !== 'undefined' && obj === window) {
|
|
5803
|
+
return '{ [object Window] }';
|
|
5804
|
+
}
|
|
5805
|
+
if (typeof globalThis !== 'undefined' && obj === globalThis || typeof global !== 'undefined' && obj === global) {
|
|
5806
|
+
return '{ [object globalThis] }';
|
|
5807
|
+
}
|
|
5808
|
+
if (!isDate(obj) && !isRegExp$1(obj)) {
|
|
5809
|
+
var ys = arrObjKeys(obj, inspect);
|
|
5810
|
+
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
5811
|
+
var protoTag = obj instanceof Object ? '' : 'null prototype';
|
|
5812
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
|
|
5813
|
+
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
|
|
5814
|
+
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat$1.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
|
|
5815
|
+
if (ys.length === 0) {
|
|
5816
|
+
return tag + '{}';
|
|
5694
5817
|
}
|
|
5695
|
-
if (
|
|
5696
|
-
return
|
|
5818
|
+
if (indent) {
|
|
5819
|
+
return tag + '{' + indentedJoin(ys, indent) + '}';
|
|
5697
5820
|
}
|
|
5698
|
-
return
|
|
5699
|
-
}
|
|
5700
|
-
return
|
|
5821
|
+
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
5822
|
+
}
|
|
5823
|
+
return String(obj);
|
|
5824
|
+
};
|
|
5825
|
+
function wrapQuotes(s, defaultStyle, opts) {
|
|
5826
|
+
var style = opts.quoteStyle || defaultStyle;
|
|
5827
|
+
var quoteChar = quotes[style];
|
|
5828
|
+
return quoteChar + s + quoteChar;
|
|
5701
5829
|
}
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
var hasRequiredReflect_getPrototypeOf;
|
|
5705
|
-
function requireReflect_getPrototypeOf() {
|
|
5706
|
-
if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
|
|
5707
|
-
hasRequiredReflect_getPrototypeOf = 1;
|
|
5708
|
-
|
|
5709
|
-
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
5710
|
-
Reflect_getPrototypeOf = typeof Reflect !== 'undefined' && Reflect.getPrototypeOf || null;
|
|
5711
|
-
return Reflect_getPrototypeOf;
|
|
5830
|
+
function quote(s) {
|
|
5831
|
+
return $replace$1.call(String(s), /"/g, '"');
|
|
5712
5832
|
}
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
var hasRequiredObject_getPrototypeOf;
|
|
5716
|
-
function requireObject_getPrototypeOf() {
|
|
5717
|
-
if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
|
|
5718
|
-
hasRequiredObject_getPrototypeOf = 1;
|
|
5719
|
-
var $Object = esObjectAtoms;
|
|
5720
|
-
|
|
5721
|
-
/** @type {import('./Object.getPrototypeOf')} */
|
|
5722
|
-
Object_getPrototypeOf = $Object.getPrototypeOf || null;
|
|
5723
|
-
return Object_getPrototypeOf;
|
|
5833
|
+
function canTrustToString(obj) {
|
|
5834
|
+
return !toStringTag || !(_typeof$2(obj) === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));
|
|
5724
5835
|
}
|
|
5725
|
-
|
|
5726
|
-
|
|
5727
|
-
var hasRequiredImplementation;
|
|
5728
|
-
function requireImplementation() {
|
|
5729
|
-
if (hasRequiredImplementation) return implementation;
|
|
5730
|
-
hasRequiredImplementation = 1;
|
|
5731
|
-
|
|
5732
|
-
/* eslint no-invalid-this: 1 */
|
|
5733
|
-
|
|
5734
|
-
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
5735
|
-
var toStr = Object.prototype.toString;
|
|
5736
|
-
var max = Math.max;
|
|
5737
|
-
var funcType = '[object Function]';
|
|
5738
|
-
var concatty = function concatty(a, b) {
|
|
5739
|
-
var arr = [];
|
|
5740
|
-
for (var i = 0; i < a.length; i += 1) {
|
|
5741
|
-
arr[i] = a[i];
|
|
5742
|
-
}
|
|
5743
|
-
for (var j = 0; j < b.length; j += 1) {
|
|
5744
|
-
arr[j + a.length] = b[j];
|
|
5745
|
-
}
|
|
5746
|
-
return arr;
|
|
5747
|
-
};
|
|
5748
|
-
var slicy = function slicy(arrLike, offset) {
|
|
5749
|
-
var arr = [];
|
|
5750
|
-
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
5751
|
-
arr[j] = arrLike[i];
|
|
5752
|
-
}
|
|
5753
|
-
return arr;
|
|
5754
|
-
};
|
|
5755
|
-
var joiny = function joiny(arr, joiner) {
|
|
5756
|
-
var str = '';
|
|
5757
|
-
for (var i = 0; i < arr.length; i += 1) {
|
|
5758
|
-
str += arr[i];
|
|
5759
|
-
if (i + 1 < arr.length) {
|
|
5760
|
-
str += joiner;
|
|
5761
|
-
}
|
|
5762
|
-
}
|
|
5763
|
-
return str;
|
|
5764
|
-
};
|
|
5765
|
-
implementation = function bind(that) {
|
|
5766
|
-
var target = this;
|
|
5767
|
-
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
|
5768
|
-
throw new TypeError(ERROR_MESSAGE + target);
|
|
5769
|
-
}
|
|
5770
|
-
var args = slicy(arguments, 1);
|
|
5771
|
-
var bound;
|
|
5772
|
-
var binder = function binder() {
|
|
5773
|
-
if (this instanceof bound) {
|
|
5774
|
-
var result = target.apply(this, concatty(args, arguments));
|
|
5775
|
-
if (Object(result) === result) {
|
|
5776
|
-
return result;
|
|
5777
|
-
}
|
|
5778
|
-
return this;
|
|
5779
|
-
}
|
|
5780
|
-
return target.apply(that, concatty(args, arguments));
|
|
5781
|
-
};
|
|
5782
|
-
var boundLength = max(0, target.length - args.length);
|
|
5783
|
-
var boundArgs = [];
|
|
5784
|
-
for (var i = 0; i < boundLength; i++) {
|
|
5785
|
-
boundArgs[i] = '$' + i;
|
|
5786
|
-
}
|
|
5787
|
-
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
5788
|
-
if (target.prototype) {
|
|
5789
|
-
var Empty = function Empty() {};
|
|
5790
|
-
Empty.prototype = target.prototype;
|
|
5791
|
-
bound.prototype = new Empty();
|
|
5792
|
-
Empty.prototype = null;
|
|
5793
|
-
}
|
|
5794
|
-
return bound;
|
|
5795
|
-
};
|
|
5796
|
-
return implementation;
|
|
5836
|
+
function isArray$3(obj) {
|
|
5837
|
+
return toStr(obj) === '[object Array]' && canTrustToString(obj);
|
|
5797
5838
|
}
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
var hasRequiredFunctionBind;
|
|
5801
|
-
function requireFunctionBind() {
|
|
5802
|
-
if (hasRequiredFunctionBind) return functionBind;
|
|
5803
|
-
hasRequiredFunctionBind = 1;
|
|
5804
|
-
var implementation = requireImplementation();
|
|
5805
|
-
functionBind = Function.prototype.bind || implementation;
|
|
5806
|
-
return functionBind;
|
|
5839
|
+
function isDate(obj) {
|
|
5840
|
+
return toStr(obj) === '[object Date]' && canTrustToString(obj);
|
|
5807
5841
|
}
|
|
5808
|
-
|
|
5809
|
-
|
|
5810
|
-
var hasRequiredFunctionCall;
|
|
5811
|
-
function requireFunctionCall() {
|
|
5812
|
-
if (hasRequiredFunctionCall) return functionCall;
|
|
5813
|
-
hasRequiredFunctionCall = 1;
|
|
5814
|
-
|
|
5815
|
-
/** @type {import('./functionCall')} */
|
|
5816
|
-
functionCall = Function.prototype.call;
|
|
5817
|
-
return functionCall;
|
|
5842
|
+
function isRegExp$1(obj) {
|
|
5843
|
+
return toStr(obj) === '[object RegExp]' && canTrustToString(obj);
|
|
5818
5844
|
}
|
|
5819
|
-
|
|
5820
|
-
|
|
5821
|
-
var hasRequiredFunctionApply;
|
|
5822
|
-
function requireFunctionApply() {
|
|
5823
|
-
if (hasRequiredFunctionApply) return functionApply;
|
|
5824
|
-
hasRequiredFunctionApply = 1;
|
|
5825
|
-
|
|
5826
|
-
/** @type {import('./functionApply')} */
|
|
5827
|
-
functionApply = Function.prototype.apply;
|
|
5828
|
-
return functionApply;
|
|
5845
|
+
function isError(obj) {
|
|
5846
|
+
return toStr(obj) === '[object Error]' && canTrustToString(obj);
|
|
5829
5847
|
}
|
|
5830
|
-
|
|
5831
|
-
|
|
5832
|
-
var hasRequiredReflectApply;
|
|
5833
|
-
function requireReflectApply() {
|
|
5834
|
-
if (hasRequiredReflectApply) return reflectApply;
|
|
5835
|
-
hasRequiredReflectApply = 1;
|
|
5836
|
-
|
|
5837
|
-
/** @type {import('./reflectApply')} */
|
|
5838
|
-
reflectApply = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
5839
|
-
return reflectApply;
|
|
5848
|
+
function isString(obj) {
|
|
5849
|
+
return toStr(obj) === '[object String]' && canTrustToString(obj);
|
|
5840
5850
|
}
|
|
5841
|
-
|
|
5842
|
-
|
|
5843
|
-
var hasRequiredActualApply;
|
|
5844
|
-
function requireActualApply() {
|
|
5845
|
-
if (hasRequiredActualApply) return actualApply;
|
|
5846
|
-
hasRequiredActualApply = 1;
|
|
5847
|
-
var bind = requireFunctionBind();
|
|
5848
|
-
var $apply = requireFunctionApply();
|
|
5849
|
-
var $call = requireFunctionCall();
|
|
5850
|
-
var $reflectApply = requireReflectApply();
|
|
5851
|
-
|
|
5852
|
-
/** @type {import('./actualApply')} */
|
|
5853
|
-
actualApply = $reflectApply || bind.call($call, $apply);
|
|
5854
|
-
return actualApply;
|
|
5851
|
+
function isNumber(obj) {
|
|
5852
|
+
return toStr(obj) === '[object Number]' && canTrustToString(obj);
|
|
5855
5853
|
}
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
var hasRequiredCallBindApplyHelpers;
|
|
5859
|
-
function requireCallBindApplyHelpers() {
|
|
5860
|
-
if (hasRequiredCallBindApplyHelpers) return callBindApplyHelpers;
|
|
5861
|
-
hasRequiredCallBindApplyHelpers = 1;
|
|
5862
|
-
var bind = requireFunctionBind();
|
|
5863
|
-
var $TypeError = type;
|
|
5864
|
-
var $call = requireFunctionCall();
|
|
5865
|
-
var $actualApply = requireActualApply();
|
|
5866
|
-
|
|
5867
|
-
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
5868
|
-
callBindApplyHelpers = function callBindBasic(args) {
|
|
5869
|
-
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
5870
|
-
throw new $TypeError('a function is required');
|
|
5871
|
-
}
|
|
5872
|
-
return $actualApply(bind, $call, args);
|
|
5873
|
-
};
|
|
5874
|
-
return callBindApplyHelpers;
|
|
5854
|
+
function isBoolean(obj) {
|
|
5855
|
+
return toStr(obj) === '[object Boolean]' && canTrustToString(obj);
|
|
5875
5856
|
}
|
|
5876
5857
|
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5858
|
+
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
5859
|
+
function isSymbol(obj) {
|
|
5860
|
+
if (hasShammedSymbols) {
|
|
5861
|
+
return obj && _typeof$2(obj) === 'object' && obj instanceof Symbol;
|
|
5862
|
+
}
|
|
5863
|
+
if (_typeof$2(obj) === 'symbol') {
|
|
5864
|
+
return true;
|
|
5865
|
+
}
|
|
5866
|
+
if (!obj || _typeof$2(obj) !== 'object' || !symToString) {
|
|
5867
|
+
return false;
|
|
5868
|
+
}
|
|
5885
5869
|
try {
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
} catch (e) {
|
|
5889
|
-
|
|
5890
|
-
|
|
5870
|
+
symToString.call(obj);
|
|
5871
|
+
return true;
|
|
5872
|
+
} catch (e) {}
|
|
5873
|
+
return false;
|
|
5874
|
+
}
|
|
5875
|
+
function isBigInt(obj) {
|
|
5876
|
+
if (!obj || _typeof$2(obj) !== 'object' || !bigIntValueOf) {
|
|
5877
|
+
return false;
|
|
5878
|
+
}
|
|
5879
|
+
try {
|
|
5880
|
+
bigIntValueOf.call(obj);
|
|
5881
|
+
return true;
|
|
5882
|
+
} catch (e) {}
|
|
5883
|
+
return false;
|
|
5884
|
+
}
|
|
5885
|
+
var hasOwn$1 = Object.prototype.hasOwnProperty || function (key) {
|
|
5886
|
+
return key in this;
|
|
5887
|
+
};
|
|
5888
|
+
function has$3(obj, key) {
|
|
5889
|
+
return hasOwn$1.call(obj, key);
|
|
5890
|
+
}
|
|
5891
|
+
function toStr(obj) {
|
|
5892
|
+
return objectToString.call(obj);
|
|
5893
|
+
}
|
|
5894
|
+
function nameOf(f) {
|
|
5895
|
+
if (f.name) {
|
|
5896
|
+
return f.name;
|
|
5897
|
+
}
|
|
5898
|
+
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
5899
|
+
if (m) {
|
|
5900
|
+
return m[1];
|
|
5901
|
+
}
|
|
5902
|
+
return null;
|
|
5903
|
+
}
|
|
5904
|
+
function indexOf(xs, x) {
|
|
5905
|
+
if (xs.indexOf) {
|
|
5906
|
+
return xs.indexOf(x);
|
|
5907
|
+
}
|
|
5908
|
+
for (var i = 0, l = xs.length; i < l; i++) {
|
|
5909
|
+
if (xs[i] === x) {
|
|
5910
|
+
return i;
|
|
5891
5911
|
}
|
|
5892
5912
|
}
|
|
5893
|
-
|
|
5894
|
-
// eslint-disable-next-line no-extra-parens
|
|
5895
|
-
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */'__proto__');
|
|
5896
|
-
var $Object = Object;
|
|
5897
|
-
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
5898
|
-
|
|
5899
|
-
/** @type {import('./get')} */
|
|
5900
|
-
get = desc && typeof desc.get === 'function' ? callBind([desc.get]) : typeof $getPrototypeOf === 'function' ? /** @type {import('./get')} */function getDunder(value) {
|
|
5901
|
-
// eslint-disable-next-line eqeqeq
|
|
5902
|
-
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
5903
|
-
} : false;
|
|
5904
|
-
return get;
|
|
5913
|
+
return -1;
|
|
5905
5914
|
}
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
/** @type {import('.')} */
|
|
5917
|
-
getProto$1 = reflectGetProto ? function getProto(O) {
|
|
5918
|
-
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
5919
|
-
return reflectGetProto(O);
|
|
5920
|
-
} : originalGetProto ? function getProto(O) {
|
|
5921
|
-
if (!O || _typeof$2(O) !== 'object' && typeof O !== 'function') {
|
|
5922
|
-
throw new TypeError('getProto: not an object');
|
|
5915
|
+
function isMap(x) {
|
|
5916
|
+
if (!mapSize || !x || _typeof$2(x) !== 'object') {
|
|
5917
|
+
return false;
|
|
5918
|
+
}
|
|
5919
|
+
try {
|
|
5920
|
+
mapSize.call(x);
|
|
5921
|
+
try {
|
|
5922
|
+
setSize.call(x);
|
|
5923
|
+
} catch (s) {
|
|
5924
|
+
return true;
|
|
5923
5925
|
}
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
5928
|
-
return getDunderProto(O);
|
|
5929
|
-
} : null;
|
|
5930
|
-
return getProto$1;
|
|
5926
|
+
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
5927
|
+
} catch (e) {}
|
|
5928
|
+
return false;
|
|
5931
5929
|
}
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5930
|
+
function isWeakMap(x) {
|
|
5931
|
+
if (!weakMapHas || !x || _typeof$2(x) !== 'object') {
|
|
5932
|
+
return false;
|
|
5933
|
+
}
|
|
5934
|
+
try {
|
|
5935
|
+
weakMapHas.call(x, weakMapHas);
|
|
5936
|
+
try {
|
|
5937
|
+
weakSetHas.call(x, weakSetHas);
|
|
5938
|
+
} catch (s) {
|
|
5939
|
+
return true;
|
|
5940
|
+
}
|
|
5941
|
+
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
5942
|
+
} catch (e) {}
|
|
5943
|
+
return false;
|
|
5945
5944
|
}
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
var $EvalError = _eval;
|
|
5951
|
-
var $RangeError = range;
|
|
5952
|
-
var $ReferenceError = ref;
|
|
5953
|
-
var $SyntaxError$1 = syntax;
|
|
5954
|
-
var $TypeError$3 = type;
|
|
5955
|
-
var $URIError = uri;
|
|
5956
|
-
var abs = abs$1;
|
|
5957
|
-
var floor = floor$1;
|
|
5958
|
-
var max = max$1;
|
|
5959
|
-
var min = min$1;
|
|
5960
|
-
var pow = pow$1;
|
|
5961
|
-
var round = round$1;
|
|
5962
|
-
var sign = sign$1;
|
|
5963
|
-
var $Function = Function;
|
|
5964
|
-
|
|
5965
|
-
// eslint-disable-next-line consistent-return
|
|
5966
|
-
var getEvalledConstructor = function getEvalledConstructor(expressionSyntax) {
|
|
5945
|
+
function isWeakRef(x) {
|
|
5946
|
+
if (!weakRefDeref || !x || _typeof$2(x) !== 'object') {
|
|
5947
|
+
return false;
|
|
5948
|
+
}
|
|
5967
5949
|
try {
|
|
5968
|
-
|
|
5950
|
+
weakRefDeref.call(x);
|
|
5951
|
+
return true;
|
|
5969
5952
|
} catch (e) {}
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
var ThrowTypeError = $gOPD ? function () {
|
|
5953
|
+
return false;
|
|
5954
|
+
}
|
|
5955
|
+
function isSet(x) {
|
|
5956
|
+
if (!setSize || !x || _typeof$2(x) !== 'object') {
|
|
5957
|
+
return false;
|
|
5958
|
+
}
|
|
5977
5959
|
try {
|
|
5978
|
-
|
|
5979
|
-
arguments.callee; // IE 8 does not throw here
|
|
5980
|
-
return throwTypeError;
|
|
5981
|
-
} catch (calleeThrows) {
|
|
5960
|
+
setSize.call(x);
|
|
5982
5961
|
try {
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
return throwTypeError;
|
|
5962
|
+
mapSize.call(x);
|
|
5963
|
+
} catch (m) {
|
|
5964
|
+
return true;
|
|
5987
5965
|
}
|
|
5966
|
+
return x instanceof Set; // core-js workaround, pre-v2.5.0
|
|
5967
|
+
} catch (e) {}
|
|
5968
|
+
return false;
|
|
5969
|
+
}
|
|
5970
|
+
function isWeakSet(x) {
|
|
5971
|
+
if (!weakSetHas || !x || _typeof$2(x) !== 'object') {
|
|
5972
|
+
return false;
|
|
5988
5973
|
}
|
|
5989
|
-
}() : throwTypeError;
|
|
5990
|
-
var hasSymbols = requireHasSymbols()();
|
|
5991
|
-
var getProto = requireGetProto();
|
|
5992
|
-
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
5993
|
-
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
5994
|
-
var $apply = requireFunctionApply();
|
|
5995
|
-
var $call = requireFunctionCall();
|
|
5996
|
-
var needsEval = {};
|
|
5997
|
-
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
5998
|
-
var INTRINSICS = {
|
|
5999
|
-
__proto__: null,
|
|
6000
|
-
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
6001
|
-
'%Array%': Array,
|
|
6002
|
-
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
6003
|
-
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
6004
|
-
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
6005
|
-
'%AsyncFunction%': needsEval,
|
|
6006
|
-
'%AsyncGenerator%': needsEval,
|
|
6007
|
-
'%AsyncGeneratorFunction%': needsEval,
|
|
6008
|
-
'%AsyncIteratorPrototype%': needsEval,
|
|
6009
|
-
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
6010
|
-
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
6011
|
-
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
6012
|
-
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
6013
|
-
'%Boolean%': Boolean,
|
|
6014
|
-
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
6015
|
-
'%Date%': Date,
|
|
6016
|
-
'%decodeURI%': decodeURI,
|
|
6017
|
-
'%decodeURIComponent%': decodeURIComponent,
|
|
6018
|
-
'%encodeURI%': encodeURI,
|
|
6019
|
-
'%encodeURIComponent%': encodeURIComponent,
|
|
6020
|
-
'%Error%': $Error,
|
|
6021
|
-
'%eval%': eval,
|
|
6022
|
-
// eslint-disable-line no-eval
|
|
6023
|
-
'%EvalError%': $EvalError,
|
|
6024
|
-
'%Float16Array%': typeof Float16Array === 'undefined' ? undefined$1 : Float16Array,
|
|
6025
|
-
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
6026
|
-
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
6027
|
-
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
6028
|
-
'%Function%': $Function,
|
|
6029
|
-
'%GeneratorFunction%': needsEval,
|
|
6030
|
-
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
6031
|
-
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
6032
|
-
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
6033
|
-
'%isFinite%': isFinite,
|
|
6034
|
-
'%isNaN%': isNaN,
|
|
6035
|
-
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
6036
|
-
'%JSON%': (typeof JSON === "undefined" ? "undefined" : _typeof$2(JSON)) === 'object' ? JSON : undefined$1,
|
|
6037
|
-
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
6038
|
-
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
6039
|
-
'%Math%': Math,
|
|
6040
|
-
'%Number%': Number,
|
|
6041
|
-
'%Object%': $Object,
|
|
6042
|
-
'%Object.getOwnPropertyDescriptor%': $gOPD,
|
|
6043
|
-
'%parseFloat%': parseFloat,
|
|
6044
|
-
'%parseInt%': parseInt,
|
|
6045
|
-
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
6046
|
-
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
6047
|
-
'%RangeError%': $RangeError,
|
|
6048
|
-
'%ReferenceError%': $ReferenceError,
|
|
6049
|
-
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
6050
|
-
'%RegExp%': RegExp,
|
|
6051
|
-
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
6052
|
-
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
6053
|
-
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
6054
|
-
'%String%': String,
|
|
6055
|
-
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
6056
|
-
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
6057
|
-
'%SyntaxError%': $SyntaxError$1,
|
|
6058
|
-
'%ThrowTypeError%': ThrowTypeError,
|
|
6059
|
-
'%TypedArray%': TypedArray,
|
|
6060
|
-
'%TypeError%': $TypeError$3,
|
|
6061
|
-
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
6062
|
-
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
6063
|
-
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
6064
|
-
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
6065
|
-
'%URIError%': $URIError,
|
|
6066
|
-
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
6067
|
-
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
6068
|
-
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
|
|
6069
|
-
'%Function.prototype.call%': $call,
|
|
6070
|
-
'%Function.prototype.apply%': $apply,
|
|
6071
|
-
'%Object.defineProperty%': $defineProperty$2,
|
|
6072
|
-
'%Object.getPrototypeOf%': $ObjectGPO,
|
|
6073
|
-
'%Math.abs%': abs,
|
|
6074
|
-
'%Math.floor%': floor,
|
|
6075
|
-
'%Math.max%': max,
|
|
6076
|
-
'%Math.min%': min,
|
|
6077
|
-
'%Math.pow%': pow,
|
|
6078
|
-
'%Math.round%': round,
|
|
6079
|
-
'%Math.sign%': sign,
|
|
6080
|
-
'%Reflect.getPrototypeOf%': $ReflectGPO
|
|
6081
|
-
};
|
|
6082
|
-
if (getProto) {
|
|
6083
5974
|
try {
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
5975
|
+
weakSetHas.call(x, weakSetHas);
|
|
5976
|
+
try {
|
|
5977
|
+
weakMapHas.call(x, weakMapHas);
|
|
5978
|
+
} catch (s) {
|
|
5979
|
+
return true;
|
|
5980
|
+
}
|
|
5981
|
+
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
5982
|
+
} catch (e) {}
|
|
5983
|
+
return false;
|
|
5984
|
+
}
|
|
5985
|
+
function isElement(x) {
|
|
5986
|
+
if (!x || _typeof$2(x) !== 'object') {
|
|
5987
|
+
return false;
|
|
6089
5988
|
}
|
|
5989
|
+
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
5990
|
+
return true;
|
|
5991
|
+
}
|
|
5992
|
+
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
|
|
6090
5993
|
}
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
5994
|
+
function inspectString(str, opts) {
|
|
5995
|
+
if (str.length > opts.maxStringLength) {
|
|
5996
|
+
var remaining = str.length - opts.maxStringLength;
|
|
5997
|
+
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
|
|
5998
|
+
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
|
|
5999
|
+
}
|
|
6000
|
+
var quoteRE = quoteREs[opts.quoteStyle || 'single'];
|
|
6001
|
+
quoteRE.lastIndex = 0;
|
|
6002
|
+
// eslint-disable-next-line no-control-regex
|
|
6003
|
+
var s = $replace$1.call($replace$1.call(str, quoteRE, '\\$1'), /[\x00-\x1f]/g, lowbyte);
|
|
6004
|
+
return wrapQuotes(s, 'single', opts);
|
|
6005
|
+
}
|
|
6006
|
+
function lowbyte(c) {
|
|
6007
|
+
var n = c.charCodeAt(0);
|
|
6008
|
+
var x = {
|
|
6009
|
+
8: 'b',
|
|
6010
|
+
9: 't',
|
|
6011
|
+
10: 'n',
|
|
6012
|
+
12: 'f',
|
|
6013
|
+
13: 'r'
|
|
6014
|
+
}[n];
|
|
6015
|
+
if (x) {
|
|
6016
|
+
return '\\' + x;
|
|
6017
|
+
}
|
|
6018
|
+
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
|
|
6019
|
+
}
|
|
6020
|
+
function markBoxed(str) {
|
|
6021
|
+
return 'Object(' + str + ')';
|
|
6022
|
+
}
|
|
6023
|
+
function weakCollectionOf(type) {
|
|
6024
|
+
return type + ' { ? }';
|
|
6025
|
+
}
|
|
6026
|
+
function collectionOf(type, size, entries, indent) {
|
|
6027
|
+
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
6028
|
+
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
6029
|
+
}
|
|
6030
|
+
function singleLineValues(xs) {
|
|
6031
|
+
for (var i = 0; i < xs.length; i++) {
|
|
6032
|
+
if (indexOf(xs[i], '\n') >= 0) {
|
|
6033
|
+
return false;
|
|
6103
6034
|
}
|
|
6104
|
-
}
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6035
|
+
}
|
|
6036
|
+
return true;
|
|
6037
|
+
}
|
|
6038
|
+
function getIndent(opts, depth) {
|
|
6039
|
+
var baseIndent;
|
|
6040
|
+
if (opts.indent === '\t') {
|
|
6041
|
+
baseIndent = '\t';
|
|
6042
|
+
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
6043
|
+
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
6044
|
+
} else {
|
|
6045
|
+
return null;
|
|
6046
|
+
}
|
|
6047
|
+
return {
|
|
6048
|
+
base: baseIndent,
|
|
6049
|
+
prev: $join.call(Array(depth + 1), baseIndent)
|
|
6050
|
+
};
|
|
6051
|
+
}
|
|
6052
|
+
function indentedJoin(xs, indent) {
|
|
6053
|
+
if (xs.length === 0) {
|
|
6054
|
+
return '';
|
|
6055
|
+
}
|
|
6056
|
+
var lineJoiner = '\n' + indent.prev + indent.base;
|
|
6057
|
+
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
|
|
6058
|
+
}
|
|
6059
|
+
function arrObjKeys(obj, inspect) {
|
|
6060
|
+
var isArr = isArray$3(obj);
|
|
6061
|
+
var xs = [];
|
|
6062
|
+
if (isArr) {
|
|
6063
|
+
xs.length = obj.length;
|
|
6064
|
+
for (var i = 0; i < obj.length; i++) {
|
|
6065
|
+
xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
|
|
6108
6066
|
}
|
|
6109
6067
|
}
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
6145
|
-
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
6146
|
-
'%Promise_all%': ['Promise', 'all'],
|
|
6147
|
-
'%Promise_reject%': ['Promise', 'reject'],
|
|
6148
|
-
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
6149
|
-
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
6150
|
-
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
6151
|
-
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
6152
|
-
'%SetPrototype%': ['Set', 'prototype'],
|
|
6153
|
-
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
6154
|
-
'%StringPrototype%': ['String', 'prototype'],
|
|
6155
|
-
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
6156
|
-
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
6157
|
-
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
6158
|
-
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
6159
|
-
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
6160
|
-
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
6161
|
-
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
6162
|
-
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
6163
|
-
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
6164
|
-
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
6165
|
-
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
6166
|
-
};
|
|
6167
|
-
var bind = requireFunctionBind();
|
|
6168
|
-
var hasOwn$1 = requireHasown();
|
|
6169
|
-
var $concat$1 = bind.call($call, Array.prototype.concat);
|
|
6170
|
-
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
6171
|
-
var $replace$1 = bind.call($call, String.prototype.replace);
|
|
6172
|
-
var $strSlice = bind.call($call, String.prototype.slice);
|
|
6173
|
-
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
6068
|
+
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
|
|
6069
|
+
var symMap;
|
|
6070
|
+
if (hasShammedSymbols) {
|
|
6071
|
+
symMap = {};
|
|
6072
|
+
for (var k = 0; k < syms.length; k++) {
|
|
6073
|
+
symMap['$' + syms[k]] = syms[k];
|
|
6074
|
+
}
|
|
6075
|
+
}
|
|
6076
|
+
for (var key in obj) {
|
|
6077
|
+
// eslint-disable-line no-restricted-syntax
|
|
6078
|
+
if (!has$3(obj, key)) {
|
|
6079
|
+
continue;
|
|
6080
|
+
} // eslint-disable-line no-restricted-syntax, no-continue
|
|
6081
|
+
if (isArr && String(Number(key)) === key && key < obj.length) {
|
|
6082
|
+
continue;
|
|
6083
|
+
} // eslint-disable-line no-restricted-syntax, no-continue
|
|
6084
|
+
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
6085
|
+
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
6086
|
+
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
6087
|
+
} else if ($test.call(/[^\w$]/, key)) {
|
|
6088
|
+
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
6089
|
+
} else {
|
|
6090
|
+
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
6091
|
+
}
|
|
6092
|
+
}
|
|
6093
|
+
if (typeof gOPS === 'function') {
|
|
6094
|
+
for (var j = 0; j < syms.length; j++) {
|
|
6095
|
+
if (isEnumerable.call(obj, syms[j])) {
|
|
6096
|
+
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
|
|
6097
|
+
}
|
|
6098
|
+
}
|
|
6099
|
+
}
|
|
6100
|
+
return xs;
|
|
6101
|
+
}
|
|
6174
6102
|
|
|
6175
|
-
|
|
6176
|
-
var
|
|
6177
|
-
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6103
|
+
var inspect$3 = objectInspect;
|
|
6104
|
+
var $TypeError$5 = type;
|
|
6105
|
+
|
|
6106
|
+
/*
|
|
6107
|
+
* This function traverses the list returning the node corresponding to the given key.
|
|
6108
|
+
*
|
|
6109
|
+
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list.
|
|
6110
|
+
* By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
6111
|
+
*/
|
|
6112
|
+
/** @type {import('./list.d.ts').listGetNode} */
|
|
6113
|
+
// eslint-disable-next-line consistent-return
|
|
6114
|
+
var listGetNode = function listGetNode(list, key, isDelete) {
|
|
6115
|
+
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
|
|
6116
|
+
var prev = list;
|
|
6117
|
+
/** @type {(typeof list)['next']} */
|
|
6118
|
+
var curr;
|
|
6119
|
+
// eslint-disable-next-line eqeqeq
|
|
6120
|
+
for (; (curr = prev.next) != null; prev = curr) {
|
|
6121
|
+
if (curr.key === key) {
|
|
6122
|
+
prev.next = curr.next;
|
|
6123
|
+
if (!isDelete) {
|
|
6124
|
+
// eslint-disable-next-line no-extra-parens
|
|
6125
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */list.next;
|
|
6126
|
+
list.next = curr; // eslint-disable-line no-param-reassign
|
|
6127
|
+
}
|
|
6128
|
+
return curr;
|
|
6129
|
+
}
|
|
6185
6130
|
}
|
|
6186
|
-
var result = [];
|
|
6187
|
-
$replace$1(string, rePropName, function (match, number, quote, subString) {
|
|
6188
|
-
result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
|
|
6189
|
-
});
|
|
6190
|
-
return result;
|
|
6191
6131
|
};
|
|
6192
|
-
/* end adaptation */
|
|
6193
6132
|
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
alias = LEGACY_ALIASES[intrinsicName];
|
|
6199
|
-
intrinsicName = '%' + alias[0] + '%';
|
|
6133
|
+
/** @type {import('./list.d.ts').listGet} */
|
|
6134
|
+
var listGet = function listGet(objects, key) {
|
|
6135
|
+
if (!objects) {
|
|
6136
|
+
return void undefined;
|
|
6200
6137
|
}
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6204
|
-
|
|
6205
|
-
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6138
|
+
var node = listGetNode(objects, key);
|
|
6139
|
+
return node && node.value;
|
|
6140
|
+
};
|
|
6141
|
+
/** @type {import('./list.d.ts').listSet} */
|
|
6142
|
+
var listSet = function listSet(objects, key, value) {
|
|
6143
|
+
var node = listGetNode(objects, key);
|
|
6144
|
+
if (node) {
|
|
6145
|
+
node.value = value;
|
|
6146
|
+
} else {
|
|
6147
|
+
// Prepend the new node to the beginning of the list
|
|
6148
|
+
objects.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */{
|
|
6149
|
+
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
6150
|
+
key: key,
|
|
6151
|
+
next: objects.next,
|
|
6212
6152
|
value: value
|
|
6213
6153
|
};
|
|
6214
6154
|
}
|
|
6215
|
-
throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
|
|
6216
6155
|
};
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
6222
|
-
throw new $TypeError$3('"allowMissing" argument must be a boolean');
|
|
6223
|
-
}
|
|
6224
|
-
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
6225
|
-
throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
6156
|
+
/** @type {import('./list.d.ts').listHas} */
|
|
6157
|
+
var listHas = function listHas(objects, key) {
|
|
6158
|
+
if (!objects) {
|
|
6159
|
+
return false;
|
|
6226
6160
|
}
|
|
6227
|
-
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
if (alias) {
|
|
6235
|
-
intrinsicBaseName = alias[0];
|
|
6236
|
-
$spliceApply(parts, $concat$1([0, 1], alias));
|
|
6161
|
+
return !!listGetNode(objects, key);
|
|
6162
|
+
};
|
|
6163
|
+
/** @type {import('./list.d.ts').listDelete} */
|
|
6164
|
+
// eslint-disable-next-line consistent-return
|
|
6165
|
+
var listDelete = function listDelete(objects, key) {
|
|
6166
|
+
if (objects) {
|
|
6167
|
+
return listGetNode(objects, key, true);
|
|
6237
6168
|
}
|
|
6238
|
-
|
|
6239
|
-
|
|
6240
|
-
|
|
6241
|
-
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
|
|
6245
|
-
|
|
6246
|
-
|
|
6247
|
-
|
|
6248
|
-
|
|
6249
|
-
|
|
6250
|
-
|
|
6251
|
-
|
|
6252
|
-
|
|
6253
|
-
if (!(part in value)) {
|
|
6254
|
-
if (!allowMissing) {
|
|
6255
|
-
throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
6256
|
-
}
|
|
6257
|
-
return void undefined$1;
|
|
6169
|
+
};
|
|
6170
|
+
|
|
6171
|
+
/** @type {import('.')} */
|
|
6172
|
+
var sideChannelList = function getSideChannelList() {
|
|
6173
|
+
/** @typedef {ReturnType<typeof getSideChannelList>} Channel */
|
|
6174
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
6175
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
6176
|
+
|
|
6177
|
+
/** @type {import('./list.d.ts').RootNode<V, K> | undefined} */var $o;
|
|
6178
|
+
|
|
6179
|
+
/** @type {Channel} */
|
|
6180
|
+
var channel = {
|
|
6181
|
+
assert: function assert(key) {
|
|
6182
|
+
if (!channel.has(key)) {
|
|
6183
|
+
throw new $TypeError$5('Side channel does not contain ' + inspect$3(key));
|
|
6258
6184
|
}
|
|
6259
|
-
|
|
6260
|
-
|
|
6261
|
-
|
|
6185
|
+
},
|
|
6186
|
+
'delete': function _delete(key) {
|
|
6187
|
+
var root = $o && $o.next;
|
|
6188
|
+
var deletedNode = listDelete($o, key);
|
|
6189
|
+
if (deletedNode && root && root === deletedNode) {
|
|
6190
|
+
$o = void undefined;
|
|
6191
|
+
}
|
|
6192
|
+
return !!deletedNode;
|
|
6193
|
+
},
|
|
6194
|
+
get: function get(key) {
|
|
6195
|
+
return listGet($o, key);
|
|
6196
|
+
},
|
|
6197
|
+
has: function has(key) {
|
|
6198
|
+
return listHas($o, key);
|
|
6199
|
+
},
|
|
6200
|
+
set: function set(key, value) {
|
|
6201
|
+
if (!$o) {
|
|
6202
|
+
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
|
|
6203
|
+
$o = {
|
|
6204
|
+
next: void undefined
|
|
6205
|
+
};
|
|
6206
|
+
}
|
|
6207
|
+
// eslint-disable-next-line no-extra-parens
|
|
6208
|
+
listSet(/** @type {NonNullable<typeof $o>} */$o, key, value);
|
|
6209
|
+
}
|
|
6210
|
+
};
|
|
6211
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
6212
|
+
return channel;
|
|
6213
|
+
};
|
|
6214
|
+
|
|
6215
|
+
/** @type {import('.')} */
|
|
6216
|
+
var esObjectAtoms = Object;
|
|
6217
|
+
|
|
6218
|
+
/** @type {import('.')} */
|
|
6219
|
+
var esErrors = Error;
|
|
6220
|
+
|
|
6221
|
+
/** @type {import('./eval')} */
|
|
6222
|
+
var _eval = EvalError;
|
|
6223
|
+
|
|
6224
|
+
/** @type {import('./range')} */
|
|
6225
|
+
var range = RangeError;
|
|
6226
|
+
|
|
6227
|
+
/** @type {import('./ref')} */
|
|
6228
|
+
var ref = ReferenceError;
|
|
6229
|
+
|
|
6230
|
+
/** @type {import('./syntax')} */
|
|
6231
|
+
var syntax = SyntaxError;
|
|
6232
|
+
|
|
6233
|
+
/** @type {import('./uri')} */
|
|
6234
|
+
var uri = URIError;
|
|
6235
|
+
|
|
6236
|
+
/** @type {import('./abs')} */
|
|
6237
|
+
var abs$1 = Math.abs;
|
|
6238
|
+
|
|
6239
|
+
/** @type {import('./floor')} */
|
|
6240
|
+
var floor$1 = Math.floor;
|
|
6241
|
+
|
|
6242
|
+
/** @type {import('./max')} */
|
|
6243
|
+
var max$1 = Math.max;
|
|
6244
|
+
|
|
6245
|
+
/** @type {import('./min')} */
|
|
6246
|
+
var min$1 = Math.min;
|
|
6247
|
+
|
|
6248
|
+
/** @type {import('./pow')} */
|
|
6249
|
+
var pow$1 = Math.pow;
|
|
6250
|
+
|
|
6251
|
+
/** @type {import('./round')} */
|
|
6252
|
+
var round$1 = Math.round;
|
|
6253
|
+
|
|
6254
|
+
/** @type {import('./isNaN')} */
|
|
6255
|
+
var _isNaN = Number.isNaN || function isNaN(a) {
|
|
6256
|
+
return a !== a;
|
|
6257
|
+
};
|
|
6258
|
+
|
|
6259
|
+
var $isNaN = _isNaN;
|
|
6262
6260
|
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
|
|
6266
|
-
|
|
6267
|
-
// uphold the illusion by pretending to see that original data
|
|
6268
|
-
// property, i.e., returning the value rather than the getter
|
|
6269
|
-
// itself.
|
|
6270
|
-
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
6271
|
-
value = desc.get;
|
|
6272
|
-
} else {
|
|
6273
|
-
value = value[part];
|
|
6274
|
-
}
|
|
6275
|
-
} else {
|
|
6276
|
-
isOwn = hasOwn$1(value, part);
|
|
6277
|
-
value = value[part];
|
|
6278
|
-
}
|
|
6279
|
-
if (isOwn && !skipFurtherCaching) {
|
|
6280
|
-
INTRINSICS[intrinsicRealName] = value;
|
|
6281
|
-
}
|
|
6282
|
-
}
|
|
6261
|
+
/** @type {import('./sign')} */
|
|
6262
|
+
var sign$1 = function sign(number) {
|
|
6263
|
+
if ($isNaN(number) || number === 0) {
|
|
6264
|
+
return number;
|
|
6283
6265
|
}
|
|
6284
|
-
return
|
|
6266
|
+
return number < 0 ? -1 : 1;
|
|
6285
6267
|
};
|
|
6286
6268
|
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
var $defineProperty$1 = esDefineProperty;
|
|
6290
|
-
var $SyntaxError = syntax;
|
|
6291
|
-
var $TypeError$2 = type;
|
|
6292
|
-
var gopd = gopd$1;
|
|
6269
|
+
/** @type {import('./gOPD')} */
|
|
6270
|
+
var gOPD = Object.getOwnPropertyDescriptor;
|
|
6293
6271
|
|
|
6294
6272
|
/** @type {import('.')} */
|
|
6295
|
-
var
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
|
6303
|
-
throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
|
|
6304
|
-
}
|
|
6305
|
-
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
|
6306
|
-
throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
|
|
6307
|
-
}
|
|
6308
|
-
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
|
6309
|
-
throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
|
|
6310
|
-
}
|
|
6311
|
-
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
|
6312
|
-
throw new $TypeError$2('`loose`, if provided, must be a boolean');
|
|
6313
|
-
}
|
|
6314
|
-
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
|
6315
|
-
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
|
6316
|
-
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
|
6317
|
-
var loose = arguments.length > 6 ? arguments[6] : false;
|
|
6318
|
-
|
|
6319
|
-
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
6320
|
-
var desc = !!gopd && gopd(obj, property);
|
|
6321
|
-
if ($defineProperty$1) {
|
|
6322
|
-
$defineProperty$1(obj, property, {
|
|
6323
|
-
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
6324
|
-
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
6325
|
-
value: value,
|
|
6326
|
-
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
|
6327
|
-
});
|
|
6328
|
-
} else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
|
|
6329
|
-
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
|
6330
|
-
obj[property] = value; // eslint-disable-line no-param-reassign
|
|
6331
|
-
} else {
|
|
6332
|
-
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
|
6273
|
+
var $gOPD$1 = gOPD;
|
|
6274
|
+
if ($gOPD$1) {
|
|
6275
|
+
try {
|
|
6276
|
+
$gOPD$1([], 'length');
|
|
6277
|
+
} catch (e) {
|
|
6278
|
+
// IE 8 has a broken gOPD
|
|
6279
|
+
$gOPD$1 = null;
|
|
6333
6280
|
}
|
|
6334
|
-
}
|
|
6281
|
+
}
|
|
6282
|
+
var gopd = $gOPD$1;
|
|
6335
6283
|
|
|
6336
|
-
|
|
6337
|
-
var
|
|
6338
|
-
|
|
6339
|
-
};
|
|
6340
|
-
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
6341
|
-
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
6342
|
-
if (!$defineProperty) {
|
|
6343
|
-
return null;
|
|
6344
|
-
}
|
|
6284
|
+
/** @type {import('.')} */
|
|
6285
|
+
var $defineProperty$1 = Object.defineProperty || false;
|
|
6286
|
+
if ($defineProperty$1) {
|
|
6345
6287
|
try {
|
|
6346
|
-
|
|
6288
|
+
$defineProperty$1({}, 'a', {
|
|
6347
6289
|
value: 1
|
|
6348
|
-
})
|
|
6290
|
+
});
|
|
6349
6291
|
} catch (e) {
|
|
6350
|
-
//
|
|
6351
|
-
|
|
6292
|
+
// IE 8 has a broken defineProperty
|
|
6293
|
+
$defineProperty$1 = false;
|
|
6352
6294
|
}
|
|
6353
|
-
}
|
|
6354
|
-
var
|
|
6295
|
+
}
|
|
6296
|
+
var esDefineProperty = $defineProperty$1;
|
|
6355
6297
|
|
|
6356
|
-
var
|
|
6357
|
-
var
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
var $floor$1 = GetIntrinsic$2('%Math.floor%');
|
|
6298
|
+
var shams;
|
|
6299
|
+
var hasRequiredShams;
|
|
6300
|
+
function requireShams() {
|
|
6301
|
+
if (hasRequiredShams) return shams;
|
|
6302
|
+
hasRequiredShams = 1;
|
|
6362
6303
|
|
|
6363
|
-
|
|
6364
|
-
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
|
|
6369
|
-
throw new $TypeError$1('`length` must be a positive 32-bit integer');
|
|
6370
|
-
}
|
|
6371
|
-
var loose = arguments.length > 2 && !!arguments[2];
|
|
6372
|
-
var functionLengthIsConfigurable = true;
|
|
6373
|
-
var functionLengthIsWritable = true;
|
|
6374
|
-
if ('length' in fn && gOPD) {
|
|
6375
|
-
var desc = gOPD(fn, 'length');
|
|
6376
|
-
if (desc && !desc.configurable) {
|
|
6377
|
-
functionLengthIsConfigurable = false;
|
|
6378
|
-
}
|
|
6379
|
-
if (desc && !desc.writable) {
|
|
6380
|
-
functionLengthIsWritable = false;
|
|
6304
|
+
/** @type {import('./shams')} */
|
|
6305
|
+
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
6306
|
+
shams = function hasSymbols() {
|
|
6307
|
+
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') {
|
|
6308
|
+
return false;
|
|
6381
6309
|
}
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
if (hasDescriptors) {
|
|
6385
|
-
define(/** @type {Parameters<define>[0]} */fn, 'length', length, true, true);
|
|
6386
|
-
} else {
|
|
6387
|
-
define(/** @type {Parameters<define>[0]} */fn, 'length', length);
|
|
6310
|
+
if (_typeof$2(Symbol.iterator) === 'symbol') {
|
|
6311
|
+
return true;
|
|
6388
6312
|
}
|
|
6389
|
-
}
|
|
6390
|
-
return fn;
|
|
6391
|
-
};
|
|
6392
|
-
|
|
6393
|
-
(function (module) {
|
|
6394
|
-
|
|
6395
|
-
var bind = requireFunctionBind();
|
|
6396
|
-
var GetIntrinsic = getIntrinsic;
|
|
6397
|
-
var setFunctionLength$1 = setFunctionLength;
|
|
6398
|
-
var $TypeError = type;
|
|
6399
|
-
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
6400
|
-
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
6401
|
-
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
6402
|
-
var $defineProperty = esDefineProperty;
|
|
6403
|
-
var $max = GetIntrinsic('%Math.max%');
|
|
6404
|
-
module.exports = function callBind(originalFunction) {
|
|
6405
|
-
if (typeof originalFunction !== 'function') {
|
|
6406
|
-
throw new $TypeError('a function is required');
|
|
6407
|
-
}
|
|
6408
|
-
var func = $reflectApply(bind, $call, arguments);
|
|
6409
|
-
return setFunctionLength$1(func, 1 + $max(0, originalFunction.length - (arguments.length - 1)), true);
|
|
6410
|
-
};
|
|
6411
|
-
var applyBind = function applyBind() {
|
|
6412
|
-
return $reflectApply(bind, $apply, arguments);
|
|
6413
|
-
};
|
|
6414
|
-
if ($defineProperty) {
|
|
6415
|
-
$defineProperty(module.exports, 'apply', {
|
|
6416
|
-
value: applyBind
|
|
6417
|
-
});
|
|
6418
|
-
} else {
|
|
6419
|
-
module.exports.apply = applyBind;
|
|
6420
|
-
}
|
|
6421
|
-
})(callBind$1);
|
|
6422
|
-
var callBindExports = callBind$1.exports;
|
|
6423
6313
|
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6314
|
+
/** @type {{ [k in symbol]?: unknown }} */
|
|
6315
|
+
var obj = {};
|
|
6316
|
+
var sym = Symbol('test');
|
|
6317
|
+
var symObj = Object(sym);
|
|
6318
|
+
if (typeof sym === 'string') {
|
|
6319
|
+
return false;
|
|
6320
|
+
}
|
|
6321
|
+
if (Object.prototype.toString.call(sym) !== '[object Symbol]') {
|
|
6322
|
+
return false;
|
|
6323
|
+
}
|
|
6324
|
+
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') {
|
|
6325
|
+
return false;
|
|
6326
|
+
}
|
|
6436
6327
|
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6328
|
+
// temp disabled per https://github.com/ljharb/object.assign/issues/17
|
|
6329
|
+
// if (sym instanceof Symbol) { return false; }
|
|
6330
|
+
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
|
|
6331
|
+
// if (!(symObj instanceof Symbol)) { return false; }
|
|
6441
6332
|
|
|
6442
|
-
|
|
6333
|
+
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
|
|
6334
|
+
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
|
|
6443
6335
|
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
|
|
6451
|
-
var setForEach = hasSet && Set.prototype.forEach;
|
|
6452
|
-
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
|
|
6453
|
-
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
|
|
6454
|
-
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
|
|
6455
|
-
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
|
|
6456
|
-
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
|
|
6457
|
-
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
|
|
6458
|
-
var booleanValueOf = Boolean.prototype.valueOf;
|
|
6459
|
-
var objectToString = Object.prototype.toString;
|
|
6460
|
-
var functionToString = Function.prototype.toString;
|
|
6461
|
-
var $match = String.prototype.match;
|
|
6462
|
-
var $slice = String.prototype.slice;
|
|
6463
|
-
var $replace = String.prototype.replace;
|
|
6464
|
-
var $toUpperCase = String.prototype.toUpperCase;
|
|
6465
|
-
var $toLowerCase = String.prototype.toLowerCase;
|
|
6466
|
-
var $test = RegExp.prototype.test;
|
|
6467
|
-
var $concat = Array.prototype.concat;
|
|
6468
|
-
var $join = Array.prototype.join;
|
|
6469
|
-
var $arrSlice = Array.prototype.slice;
|
|
6470
|
-
var $floor = Math.floor;
|
|
6471
|
-
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
|
|
6472
|
-
var gOPS = Object.getOwnPropertySymbols;
|
|
6473
|
-
var symToString = typeof Symbol === 'function' && _typeof$2(Symbol.iterator) === 'symbol' ? Symbol.prototype.toString : null;
|
|
6474
|
-
var hasShammedSymbols = typeof Symbol === 'function' && _typeof$2(Symbol.iterator) === 'object';
|
|
6475
|
-
// ie, `has-tostringtag/shams
|
|
6476
|
-
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (_typeof$2(Symbol.toStringTag) === hasShammedSymbols ? 'object' : 'symbol') ? Symbol.toStringTag : null;
|
|
6477
|
-
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
|
6478
|
-
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype // eslint-disable-line no-proto
|
|
6479
|
-
? function (O) {
|
|
6480
|
-
return O.__proto__; // eslint-disable-line no-proto
|
|
6481
|
-
} : null);
|
|
6482
|
-
function addNumericSeparator(num, str) {
|
|
6483
|
-
if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1000 || $test.call(/e/, str)) {
|
|
6484
|
-
return str;
|
|
6485
|
-
}
|
|
6486
|
-
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
|
|
6487
|
-
if (typeof num === 'number') {
|
|
6488
|
-
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
|
|
6489
|
-
if (int !== num) {
|
|
6490
|
-
var intStr = String(int);
|
|
6491
|
-
var dec = $slice.call(str, intStr.length + 1);
|
|
6492
|
-
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
|
|
6336
|
+
var symVal = 42;
|
|
6337
|
+
obj[sym] = symVal;
|
|
6338
|
+
for (var _ in obj) {
|
|
6339
|
+
return false;
|
|
6340
|
+
} // eslint-disable-line no-restricted-syntax, no-unreachable-loop
|
|
6341
|
+
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) {
|
|
6342
|
+
return false;
|
|
6493
6343
|
}
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
}
|
|
6497
|
-
var utilInspect = require$$0;
|
|
6498
|
-
var inspectCustom = utilInspect.custom;
|
|
6499
|
-
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
|
|
6500
|
-
var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
6501
|
-
var opts = options || {};
|
|
6502
|
-
if (has$3(opts, 'quoteStyle') && opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double') {
|
|
6503
|
-
throw new TypeError('option "quoteStyle" must be "single" or "double"');
|
|
6504
|
-
}
|
|
6505
|
-
if (has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number' ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
|
|
6506
|
-
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
|
|
6507
|
-
}
|
|
6508
|
-
var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
|
|
6509
|
-
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
|
|
6510
|
-
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
|
|
6511
|
-
}
|
|
6512
|
-
if (has$3(opts, 'indent') && opts.indent !== null && opts.indent !== '\t' && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
|
|
6513
|
-
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
|
|
6514
|
-
}
|
|
6515
|
-
if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
|
|
6516
|
-
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
|
|
6517
|
-
}
|
|
6518
|
-
var numericSeparator = opts.numericSeparator;
|
|
6519
|
-
if (typeof obj === 'undefined') {
|
|
6520
|
-
return 'undefined';
|
|
6521
|
-
}
|
|
6522
|
-
if (obj === null) {
|
|
6523
|
-
return 'null';
|
|
6524
|
-
}
|
|
6525
|
-
if (typeof obj === 'boolean') {
|
|
6526
|
-
return obj ? 'true' : 'false';
|
|
6527
|
-
}
|
|
6528
|
-
if (typeof obj === 'string') {
|
|
6529
|
-
return inspectString(obj, opts);
|
|
6530
|
-
}
|
|
6531
|
-
if (typeof obj === 'number') {
|
|
6532
|
-
if (obj === 0) {
|
|
6533
|
-
return Infinity / obj > 0 ? '0' : '-0';
|
|
6344
|
+
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) {
|
|
6345
|
+
return false;
|
|
6534
6346
|
}
|
|
6535
|
-
var
|
|
6536
|
-
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6347
|
+
var syms = Object.getOwnPropertySymbols(obj);
|
|
6348
|
+
if (syms.length !== 1 || syms[0] !== sym) {
|
|
6349
|
+
return false;
|
|
6350
|
+
}
|
|
6351
|
+
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
|
|
6352
|
+
return false;
|
|
6353
|
+
}
|
|
6354
|
+
if (typeof Object.getOwnPropertyDescriptor === 'function') {
|
|
6355
|
+
// eslint-disable-next-line no-extra-parens
|
|
6356
|
+
var descriptor = /** @type {PropertyDescriptor} */Object.getOwnPropertyDescriptor(obj, sym);
|
|
6357
|
+
if (descriptor.value !== symVal || descriptor.enumerable !== true) {
|
|
6358
|
+
return false;
|
|
6359
|
+
}
|
|
6360
|
+
}
|
|
6361
|
+
return true;
|
|
6362
|
+
};
|
|
6363
|
+
return shams;
|
|
6364
|
+
}
|
|
6365
|
+
|
|
6366
|
+
var hasSymbols$1;
|
|
6367
|
+
var hasRequiredHasSymbols;
|
|
6368
|
+
function requireHasSymbols() {
|
|
6369
|
+
if (hasRequiredHasSymbols) return hasSymbols$1;
|
|
6370
|
+
hasRequiredHasSymbols = 1;
|
|
6371
|
+
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
6372
|
+
var hasSymbolSham = requireShams();
|
|
6373
|
+
|
|
6374
|
+
/** @type {import('.')} */
|
|
6375
|
+
hasSymbols$1 = function hasNativeSymbols() {
|
|
6376
|
+
if (typeof origSymbol !== 'function') {
|
|
6377
|
+
return false;
|
|
6559
6378
|
}
|
|
6560
|
-
if (
|
|
6561
|
-
|
|
6562
|
-
depth: opts.depth
|
|
6563
|
-
};
|
|
6564
|
-
if (has$3(opts, 'quoteStyle')) {
|
|
6565
|
-
newOpts.quoteStyle = opts.quoteStyle;
|
|
6566
|
-
}
|
|
6567
|
-
return inspect_(value, newOpts, depth + 1, seen);
|
|
6379
|
+
if (typeof Symbol !== 'function') {
|
|
6380
|
+
return false;
|
|
6568
6381
|
}
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
if (typeof obj === 'function' && !isRegExp$1(obj)) {
|
|
6572
|
-
// in older engines, regexes are callable
|
|
6573
|
-
var name = nameOf(obj);
|
|
6574
|
-
var keys = arrObjKeys(obj, inspect);
|
|
6575
|
-
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
|
|
6576
|
-
}
|
|
6577
|
-
if (isSymbol(obj)) {
|
|
6578
|
-
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
|
|
6579
|
-
return _typeof$2(obj) === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
|
|
6580
|
-
}
|
|
6581
|
-
if (isElement(obj)) {
|
|
6582
|
-
var s = '<' + $toLowerCase.call(String(obj.nodeName));
|
|
6583
|
-
var attrs = obj.attributes || [];
|
|
6584
|
-
for (var i = 0; i < attrs.length; i++) {
|
|
6585
|
-
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
|
|
6382
|
+
if (_typeof$2(origSymbol('foo')) !== 'symbol') {
|
|
6383
|
+
return false;
|
|
6586
6384
|
}
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
s += '...';
|
|
6385
|
+
if (_typeof$2(Symbol('bar')) !== 'symbol') {
|
|
6386
|
+
return false;
|
|
6590
6387
|
}
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6388
|
+
return hasSymbolSham();
|
|
6389
|
+
};
|
|
6390
|
+
return hasSymbols$1;
|
|
6391
|
+
}
|
|
6392
|
+
|
|
6393
|
+
var Reflect_getPrototypeOf;
|
|
6394
|
+
var hasRequiredReflect_getPrototypeOf;
|
|
6395
|
+
function requireReflect_getPrototypeOf() {
|
|
6396
|
+
if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
|
|
6397
|
+
hasRequiredReflect_getPrototypeOf = 1;
|
|
6398
|
+
|
|
6399
|
+
/** @type {import('./Reflect.getPrototypeOf')} */
|
|
6400
|
+
Reflect_getPrototypeOf = typeof Reflect !== 'undefined' && Reflect.getPrototypeOf || null;
|
|
6401
|
+
return Reflect_getPrototypeOf;
|
|
6402
|
+
}
|
|
6403
|
+
|
|
6404
|
+
var Object_getPrototypeOf;
|
|
6405
|
+
var hasRequiredObject_getPrototypeOf;
|
|
6406
|
+
function requireObject_getPrototypeOf() {
|
|
6407
|
+
if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
|
|
6408
|
+
hasRequiredObject_getPrototypeOf = 1;
|
|
6409
|
+
var $Object = esObjectAtoms;
|
|
6410
|
+
|
|
6411
|
+
/** @type {import('./Object.getPrototypeOf')} */
|
|
6412
|
+
Object_getPrototypeOf = $Object.getPrototypeOf || null;
|
|
6413
|
+
return Object_getPrototypeOf;
|
|
6414
|
+
}
|
|
6415
|
+
|
|
6416
|
+
var implementation;
|
|
6417
|
+
var hasRequiredImplementation;
|
|
6418
|
+
function requireImplementation() {
|
|
6419
|
+
if (hasRequiredImplementation) return implementation;
|
|
6420
|
+
hasRequiredImplementation = 1;
|
|
6421
|
+
|
|
6422
|
+
/* eslint no-invalid-this: 1 */
|
|
6423
|
+
|
|
6424
|
+
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
|
|
6425
|
+
var toStr = Object.prototype.toString;
|
|
6426
|
+
var max = Math.max;
|
|
6427
|
+
var funcType = '[object Function]';
|
|
6428
|
+
var concatty = function concatty(a, b) {
|
|
6429
|
+
var arr = [];
|
|
6430
|
+
for (var i = 0; i < a.length; i += 1) {
|
|
6431
|
+
arr[i] = a[i];
|
|
6597
6432
|
}
|
|
6598
|
-
var
|
|
6599
|
-
|
|
6600
|
-
return '[' + indentedJoin(xs, indent) + ']';
|
|
6433
|
+
for (var j = 0; j < b.length; j += 1) {
|
|
6434
|
+
arr[j + a.length] = b[j];
|
|
6601
6435
|
}
|
|
6602
|
-
return
|
|
6603
|
-
}
|
|
6604
|
-
|
|
6605
|
-
var
|
|
6606
|
-
|
|
6607
|
-
|
|
6436
|
+
return arr;
|
|
6437
|
+
};
|
|
6438
|
+
var slicy = function slicy(arrLike, offset) {
|
|
6439
|
+
var arr = [];
|
|
6440
|
+
for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
|
|
6441
|
+
arr[j] = arrLike[i];
|
|
6608
6442
|
}
|
|
6609
|
-
|
|
6610
|
-
|
|
6443
|
+
return arr;
|
|
6444
|
+
};
|
|
6445
|
+
var joiny = function joiny(arr, joiner) {
|
|
6446
|
+
var str = '';
|
|
6447
|
+
for (var i = 0; i < arr.length; i += 1) {
|
|
6448
|
+
str += arr[i];
|
|
6449
|
+
if (i + 1 < arr.length) {
|
|
6450
|
+
str += joiner;
|
|
6451
|
+
}
|
|
6611
6452
|
}
|
|
6612
|
-
return
|
|
6613
|
-
}
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
});
|
|
6619
|
-
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
|
|
6620
|
-
return obj.inspect();
|
|
6453
|
+
return str;
|
|
6454
|
+
};
|
|
6455
|
+
implementation = function bind(that) {
|
|
6456
|
+
var target = this;
|
|
6457
|
+
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
|
|
6458
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
6621
6459
|
}
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
var
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
|
|
6460
|
+
var args = slicy(arguments, 1);
|
|
6461
|
+
var bound;
|
|
6462
|
+
var binder = function binder() {
|
|
6463
|
+
if (this instanceof bound) {
|
|
6464
|
+
var result = target.apply(this, concatty(args, arguments));
|
|
6465
|
+
if (Object(result) === result) {
|
|
6466
|
+
return result;
|
|
6467
|
+
}
|
|
6468
|
+
return this;
|
|
6469
|
+
}
|
|
6470
|
+
return target.apply(that, concatty(args, arguments));
|
|
6471
|
+
};
|
|
6472
|
+
var boundLength = max(0, target.length - args.length);
|
|
6473
|
+
var boundArgs = [];
|
|
6474
|
+
for (var i = 0; i < boundLength; i++) {
|
|
6475
|
+
boundArgs[i] = '$' + i;
|
|
6629
6476
|
}
|
|
6630
|
-
|
|
6631
|
-
|
|
6632
|
-
|
|
6633
|
-
|
|
6634
|
-
|
|
6635
|
-
|
|
6636
|
-
setParts.push(inspect(value, obj));
|
|
6637
|
-
});
|
|
6477
|
+
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
|
|
6478
|
+
if (target.prototype) {
|
|
6479
|
+
var Empty = function Empty() {};
|
|
6480
|
+
Empty.prototype = target.prototype;
|
|
6481
|
+
bound.prototype = new Empty();
|
|
6482
|
+
Empty.prototype = null;
|
|
6638
6483
|
}
|
|
6639
|
-
return
|
|
6640
|
-
}
|
|
6641
|
-
|
|
6642
|
-
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
|
|
6646
|
-
|
|
6647
|
-
if (
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6654
|
-
|
|
6655
|
-
|
|
6656
|
-
|
|
6657
|
-
|
|
6658
|
-
|
|
6659
|
-
|
|
6660
|
-
|
|
6661
|
-
|
|
6662
|
-
|
|
6663
|
-
|
|
6664
|
-
|
|
6665
|
-
|
|
6666
|
-
|
|
6667
|
-
|
|
6668
|
-
|
|
6484
|
+
return bound;
|
|
6485
|
+
};
|
|
6486
|
+
return implementation;
|
|
6487
|
+
}
|
|
6488
|
+
|
|
6489
|
+
var functionBind;
|
|
6490
|
+
var hasRequiredFunctionBind;
|
|
6491
|
+
function requireFunctionBind() {
|
|
6492
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
6493
|
+
hasRequiredFunctionBind = 1;
|
|
6494
|
+
var implementation = requireImplementation();
|
|
6495
|
+
functionBind = Function.prototype.bind || implementation;
|
|
6496
|
+
return functionBind;
|
|
6497
|
+
}
|
|
6498
|
+
|
|
6499
|
+
var functionCall;
|
|
6500
|
+
var hasRequiredFunctionCall;
|
|
6501
|
+
function requireFunctionCall() {
|
|
6502
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
6503
|
+
hasRequiredFunctionCall = 1;
|
|
6504
|
+
|
|
6505
|
+
/** @type {import('./functionCall')} */
|
|
6506
|
+
functionCall = Function.prototype.call;
|
|
6507
|
+
return functionCall;
|
|
6508
|
+
}
|
|
6509
|
+
|
|
6510
|
+
var functionApply;
|
|
6511
|
+
var hasRequiredFunctionApply;
|
|
6512
|
+
function requireFunctionApply() {
|
|
6513
|
+
if (hasRequiredFunctionApply) return functionApply;
|
|
6514
|
+
hasRequiredFunctionApply = 1;
|
|
6515
|
+
|
|
6516
|
+
/** @type {import('./functionApply')} */
|
|
6517
|
+
functionApply = Function.prototype.apply;
|
|
6518
|
+
return functionApply;
|
|
6519
|
+
}
|
|
6520
|
+
|
|
6521
|
+
/** @type {import('./reflectApply')} */
|
|
6522
|
+
var reflectApply = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
|
|
6523
|
+
|
|
6524
|
+
var bind$2 = requireFunctionBind();
|
|
6525
|
+
var $apply$1 = requireFunctionApply();
|
|
6526
|
+
var $call$2 = requireFunctionCall();
|
|
6527
|
+
var $reflectApply = reflectApply;
|
|
6528
|
+
|
|
6529
|
+
/** @type {import('./actualApply')} */
|
|
6530
|
+
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
6531
|
+
|
|
6532
|
+
var bind$1 = requireFunctionBind();
|
|
6533
|
+
var $TypeError$4 = type;
|
|
6534
|
+
var $call$1 = requireFunctionCall();
|
|
6535
|
+
var $actualApply = actualApply;
|
|
6536
|
+
|
|
6537
|
+
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
6538
|
+
var callBindApplyHelpers = function callBindBasic(args) {
|
|
6539
|
+
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
6540
|
+
throw new $TypeError$4('a function is required');
|
|
6669
6541
|
}
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6676
|
-
|
|
6677
|
-
|
|
6678
|
-
|
|
6679
|
-
|
|
6680
|
-
|
|
6681
|
-
|
|
6542
|
+
return $actualApply(bind$1, $call$1, args);
|
|
6543
|
+
};
|
|
6544
|
+
|
|
6545
|
+
var get;
|
|
6546
|
+
var hasRequiredGet;
|
|
6547
|
+
function requireGet() {
|
|
6548
|
+
if (hasRequiredGet) return get;
|
|
6549
|
+
hasRequiredGet = 1;
|
|
6550
|
+
var callBind = callBindApplyHelpers;
|
|
6551
|
+
var gOPD = gopd;
|
|
6552
|
+
var hasProtoAccessor;
|
|
6553
|
+
try {
|
|
6554
|
+
// eslint-disable-next-line no-extra-parens, no-proto
|
|
6555
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */[].__proto__ === Array.prototype;
|
|
6556
|
+
} catch (e) {
|
|
6557
|
+
if (!e || _typeof$2(e) !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
|
6558
|
+
throw e;
|
|
6682
6559
|
}
|
|
6683
|
-
return tag + '{ ' + $join.call(ys, ', ') + ' }';
|
|
6684
6560
|
}
|
|
6685
|
-
|
|
6686
|
-
|
|
6687
|
-
|
|
6688
|
-
var
|
|
6689
|
-
|
|
6690
|
-
|
|
6691
|
-
|
|
6692
|
-
|
|
6693
|
-
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
|
|
6697
|
-
function isDate(obj) {
|
|
6698
|
-
return toStr(obj) === '[object Date]' && (!toStringTag || !(_typeof$2(obj) === 'object' && toStringTag in obj));
|
|
6699
|
-
}
|
|
6700
|
-
function isRegExp$1(obj) {
|
|
6701
|
-
return toStr(obj) === '[object RegExp]' && (!toStringTag || !(_typeof$2(obj) === 'object' && toStringTag in obj));
|
|
6702
|
-
}
|
|
6703
|
-
function isError(obj) {
|
|
6704
|
-
return toStr(obj) === '[object Error]' && (!toStringTag || !(_typeof$2(obj) === 'object' && toStringTag in obj));
|
|
6705
|
-
}
|
|
6706
|
-
function isString(obj) {
|
|
6707
|
-
return toStr(obj) === '[object String]' && (!toStringTag || !(_typeof$2(obj) === 'object' && toStringTag in obj));
|
|
6708
|
-
}
|
|
6709
|
-
function isNumber(obj) {
|
|
6710
|
-
return toStr(obj) === '[object Number]' && (!toStringTag || !(_typeof$2(obj) === 'object' && toStringTag in obj));
|
|
6561
|
+
|
|
6562
|
+
// eslint-disable-next-line no-extra-parens
|
|
6563
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */'__proto__');
|
|
6564
|
+
var $Object = Object;
|
|
6565
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
|
6566
|
+
|
|
6567
|
+
/** @type {import('./get')} */
|
|
6568
|
+
get = desc && typeof desc.get === 'function' ? callBind([desc.get]) : typeof $getPrototypeOf === 'function' ? /** @type {import('./get')} */function getDunder(value) {
|
|
6569
|
+
// eslint-disable-next-line eqeqeq
|
|
6570
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
|
6571
|
+
} : false;
|
|
6572
|
+
return get;
|
|
6711
6573
|
}
|
|
6712
|
-
|
|
6713
|
-
|
|
6574
|
+
|
|
6575
|
+
var getProto$1;
|
|
6576
|
+
var hasRequiredGetProto;
|
|
6577
|
+
function requireGetProto() {
|
|
6578
|
+
if (hasRequiredGetProto) return getProto$1;
|
|
6579
|
+
hasRequiredGetProto = 1;
|
|
6580
|
+
var reflectGetProto = requireReflect_getPrototypeOf();
|
|
6581
|
+
var originalGetProto = requireObject_getPrototypeOf();
|
|
6582
|
+
var getDunderProto = requireGet();
|
|
6583
|
+
|
|
6584
|
+
/** @type {import('.')} */
|
|
6585
|
+
getProto$1 = reflectGetProto ? function getProto(O) {
|
|
6586
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
6587
|
+
return reflectGetProto(O);
|
|
6588
|
+
} : originalGetProto ? function getProto(O) {
|
|
6589
|
+
if (!O || _typeof$2(O) !== 'object' && typeof O !== 'function') {
|
|
6590
|
+
throw new TypeError('getProto: not an object');
|
|
6591
|
+
}
|
|
6592
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
6593
|
+
return originalGetProto(O);
|
|
6594
|
+
} : getDunderProto ? function getProto(O) {
|
|
6595
|
+
// @ts-expect-error TS can't narrow inside a closure, for some reason
|
|
6596
|
+
return getDunderProto(O);
|
|
6597
|
+
} : null;
|
|
6598
|
+
return getProto$1;
|
|
6714
6599
|
}
|
|
6715
6600
|
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
symToString.call(obj);
|
|
6729
|
-
return true;
|
|
6730
|
-
} catch (e) {}
|
|
6731
|
-
return false;
|
|
6601
|
+
var hasown;
|
|
6602
|
+
var hasRequiredHasown;
|
|
6603
|
+
function requireHasown() {
|
|
6604
|
+
if (hasRequiredHasown) return hasown;
|
|
6605
|
+
hasRequiredHasown = 1;
|
|
6606
|
+
var call = Function.prototype.call;
|
|
6607
|
+
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
6608
|
+
var bind = requireFunctionBind();
|
|
6609
|
+
|
|
6610
|
+
/** @type {import('.')} */
|
|
6611
|
+
hasown = bind.call(call, $hasOwn);
|
|
6612
|
+
return hasown;
|
|
6732
6613
|
}
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6614
|
+
|
|
6615
|
+
var undefined$1;
|
|
6616
|
+
var $Object = esObjectAtoms;
|
|
6617
|
+
var $Error = esErrors;
|
|
6618
|
+
var $EvalError = _eval;
|
|
6619
|
+
var $RangeError = range;
|
|
6620
|
+
var $ReferenceError = ref;
|
|
6621
|
+
var $SyntaxError = syntax;
|
|
6622
|
+
var $TypeError$3 = type;
|
|
6623
|
+
var $URIError = uri;
|
|
6624
|
+
var abs = abs$1;
|
|
6625
|
+
var floor = floor$1;
|
|
6626
|
+
var max = max$1;
|
|
6627
|
+
var min = min$1;
|
|
6628
|
+
var pow = pow$1;
|
|
6629
|
+
var round = round$1;
|
|
6630
|
+
var sign = sign$1;
|
|
6631
|
+
var $Function = Function;
|
|
6632
|
+
|
|
6633
|
+
// eslint-disable-next-line consistent-return
|
|
6634
|
+
var getEvalledConstructor = function getEvalledConstructor(expressionSyntax) {
|
|
6737
6635
|
try {
|
|
6738
|
-
|
|
6739
|
-
return true;
|
|
6636
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
6740
6637
|
} catch (e) {}
|
|
6741
|
-
return false;
|
|
6742
|
-
}
|
|
6743
|
-
var hasOwn = Object.prototype.hasOwnProperty || function (key) {
|
|
6744
|
-
return key in this;
|
|
6745
6638
|
};
|
|
6746
|
-
|
|
6747
|
-
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6752
|
-
function nameOf(f) {
|
|
6753
|
-
if (f.name) {
|
|
6754
|
-
return f.name;
|
|
6755
|
-
}
|
|
6756
|
-
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
|
|
6757
|
-
if (m) {
|
|
6758
|
-
return m[1];
|
|
6759
|
-
}
|
|
6760
|
-
return null;
|
|
6761
|
-
}
|
|
6762
|
-
function indexOf(xs, x) {
|
|
6763
|
-
if (xs.indexOf) {
|
|
6764
|
-
return xs.indexOf(x);
|
|
6765
|
-
}
|
|
6766
|
-
for (var i = 0, l = xs.length; i < l; i++) {
|
|
6767
|
-
if (xs[i] === x) {
|
|
6768
|
-
return i;
|
|
6769
|
-
}
|
|
6770
|
-
}
|
|
6771
|
-
return -1;
|
|
6772
|
-
}
|
|
6773
|
-
function isMap(x) {
|
|
6774
|
-
if (!mapSize || !x || _typeof$2(x) !== 'object') {
|
|
6775
|
-
return false;
|
|
6776
|
-
}
|
|
6639
|
+
var $gOPD = gopd;
|
|
6640
|
+
var $defineProperty = esDefineProperty;
|
|
6641
|
+
var throwTypeError = function throwTypeError() {
|
|
6642
|
+
throw new $TypeError$3();
|
|
6643
|
+
};
|
|
6644
|
+
var ThrowTypeError = $gOPD ? function () {
|
|
6777
6645
|
try {
|
|
6778
|
-
|
|
6646
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
6647
|
+
arguments.callee; // IE 8 does not throw here
|
|
6648
|
+
return throwTypeError;
|
|
6649
|
+
} catch (calleeThrows) {
|
|
6779
6650
|
try {
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6651
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
6652
|
+
return $gOPD(arguments, 'callee').get;
|
|
6653
|
+
} catch (gOPDthrows) {
|
|
6654
|
+
return throwTypeError;
|
|
6783
6655
|
}
|
|
6784
|
-
return x instanceof Map; // core-js workaround, pre-v2.5.0
|
|
6785
|
-
} catch (e) {}
|
|
6786
|
-
return false;
|
|
6787
|
-
}
|
|
6788
|
-
function isWeakMap(x) {
|
|
6789
|
-
if (!weakMapHas || !x || _typeof$2(x) !== 'object') {
|
|
6790
|
-
return false;
|
|
6791
6656
|
}
|
|
6657
|
+
}() : throwTypeError;
|
|
6658
|
+
var hasSymbols = requireHasSymbols()();
|
|
6659
|
+
var getProto = requireGetProto();
|
|
6660
|
+
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
6661
|
+
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
6662
|
+
var $apply = requireFunctionApply();
|
|
6663
|
+
var $call = requireFunctionCall();
|
|
6664
|
+
var needsEval = {};
|
|
6665
|
+
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
6666
|
+
var INTRINSICS = {
|
|
6667
|
+
__proto__: null,
|
|
6668
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
6669
|
+
'%Array%': Array,
|
|
6670
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
6671
|
+
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
6672
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
6673
|
+
'%AsyncFunction%': needsEval,
|
|
6674
|
+
'%AsyncGenerator%': needsEval,
|
|
6675
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
6676
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
6677
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
6678
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
6679
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
6680
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
6681
|
+
'%Boolean%': Boolean,
|
|
6682
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
6683
|
+
'%Date%': Date,
|
|
6684
|
+
'%decodeURI%': decodeURI,
|
|
6685
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
6686
|
+
'%encodeURI%': encodeURI,
|
|
6687
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
6688
|
+
'%Error%': $Error,
|
|
6689
|
+
'%eval%': eval,
|
|
6690
|
+
// eslint-disable-line no-eval
|
|
6691
|
+
'%EvalError%': $EvalError,
|
|
6692
|
+
'%Float16Array%': typeof Float16Array === 'undefined' ? undefined$1 : Float16Array,
|
|
6693
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
6694
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
6695
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
6696
|
+
'%Function%': $Function,
|
|
6697
|
+
'%GeneratorFunction%': needsEval,
|
|
6698
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
6699
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
6700
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
6701
|
+
'%isFinite%': isFinite,
|
|
6702
|
+
'%isNaN%': isNaN,
|
|
6703
|
+
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
6704
|
+
'%JSON%': (typeof JSON === "undefined" ? "undefined" : _typeof$2(JSON)) === 'object' ? JSON : undefined$1,
|
|
6705
|
+
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
6706
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
6707
|
+
'%Math%': Math,
|
|
6708
|
+
'%Number%': Number,
|
|
6709
|
+
'%Object%': $Object,
|
|
6710
|
+
'%Object.getOwnPropertyDescriptor%': $gOPD,
|
|
6711
|
+
'%parseFloat%': parseFloat,
|
|
6712
|
+
'%parseInt%': parseInt,
|
|
6713
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
6714
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
6715
|
+
'%RangeError%': $RangeError,
|
|
6716
|
+
'%ReferenceError%': $ReferenceError,
|
|
6717
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
6718
|
+
'%RegExp%': RegExp,
|
|
6719
|
+
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
6720
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
6721
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
6722
|
+
'%String%': String,
|
|
6723
|
+
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
6724
|
+
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
6725
|
+
'%SyntaxError%': $SyntaxError,
|
|
6726
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
6727
|
+
'%TypedArray%': TypedArray,
|
|
6728
|
+
'%TypeError%': $TypeError$3,
|
|
6729
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
6730
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
6731
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
6732
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
6733
|
+
'%URIError%': $URIError,
|
|
6734
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
6735
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
6736
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
|
|
6737
|
+
'%Function.prototype.call%': $call,
|
|
6738
|
+
'%Function.prototype.apply%': $apply,
|
|
6739
|
+
'%Object.defineProperty%': $defineProperty,
|
|
6740
|
+
'%Object.getPrototypeOf%': $ObjectGPO,
|
|
6741
|
+
'%Math.abs%': abs,
|
|
6742
|
+
'%Math.floor%': floor,
|
|
6743
|
+
'%Math.max%': max,
|
|
6744
|
+
'%Math.min%': min,
|
|
6745
|
+
'%Math.pow%': pow,
|
|
6746
|
+
'%Math.round%': round,
|
|
6747
|
+
'%Math.sign%': sign,
|
|
6748
|
+
'%Reflect.getPrototypeOf%': $ReflectGPO
|
|
6749
|
+
};
|
|
6750
|
+
if (getProto) {
|
|
6792
6751
|
try {
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6797
|
-
|
|
6798
|
-
}
|
|
6799
|
-
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
|
|
6800
|
-
} catch (e) {}
|
|
6801
|
-
return false;
|
|
6802
|
-
}
|
|
6803
|
-
function isWeakRef(x) {
|
|
6804
|
-
if (!weakRefDeref || !x || _typeof$2(x) !== 'object') {
|
|
6805
|
-
return false;
|
|
6752
|
+
null.error; // eslint-disable-line no-unused-expressions
|
|
6753
|
+
} catch (e) {
|
|
6754
|
+
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
6755
|
+
var errorProto = getProto(getProto(e));
|
|
6756
|
+
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
6806
6757
|
}
|
|
6807
|
-
try {
|
|
6808
|
-
weakRefDeref.call(x);
|
|
6809
|
-
return true;
|
|
6810
|
-
} catch (e) {}
|
|
6811
|
-
return false;
|
|
6812
6758
|
}
|
|
6813
|
-
function
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6759
|
+
var doEval = function doEval(name) {
|
|
6760
|
+
var value;
|
|
6761
|
+
if (name === '%AsyncFunction%') {
|
|
6762
|
+
value = getEvalledConstructor('async function () {}');
|
|
6763
|
+
} else if (name === '%GeneratorFunction%') {
|
|
6764
|
+
value = getEvalledConstructor('function* () {}');
|
|
6765
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
6766
|
+
value = getEvalledConstructor('async function* () {}');
|
|
6767
|
+
} else if (name === '%AsyncGenerator%') {
|
|
6768
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
6769
|
+
if (fn) {
|
|
6770
|
+
value = fn.prototype;
|
|
6823
6771
|
}
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6827
|
-
|
|
6828
|
-
function isWeakSet(x) {
|
|
6829
|
-
if (!weakSetHas || !x || _typeof$2(x) !== 'object') {
|
|
6830
|
-
return false;
|
|
6831
|
-
}
|
|
6832
|
-
try {
|
|
6833
|
-
weakSetHas.call(x, weakSetHas);
|
|
6834
|
-
try {
|
|
6835
|
-
weakMapHas.call(x, weakMapHas);
|
|
6836
|
-
} catch (s) {
|
|
6837
|
-
return true;
|
|
6772
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
6773
|
+
var gen = doEval('%AsyncGenerator%');
|
|
6774
|
+
if (gen && getProto) {
|
|
6775
|
+
value = getProto(gen.prototype);
|
|
6838
6776
|
}
|
|
6839
|
-
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
|
|
6840
|
-
} catch (e) {}
|
|
6841
|
-
return false;
|
|
6842
|
-
}
|
|
6843
|
-
function isElement(x) {
|
|
6844
|
-
if (!x || _typeof$2(x) !== 'object') {
|
|
6845
|
-
return false;
|
|
6846
|
-
}
|
|
6847
|
-
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
|
|
6848
|
-
return true;
|
|
6849
6777
|
}
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6778
|
+
INTRINSICS[name] = value;
|
|
6779
|
+
return value;
|
|
6780
|
+
};
|
|
6781
|
+
var LEGACY_ALIASES = {
|
|
6782
|
+
__proto__: null,
|
|
6783
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
6784
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
6785
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
6786
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
6787
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
6788
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
6789
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
6790
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
6791
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
6792
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
6793
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
6794
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
6795
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
6796
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
6797
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
6798
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
6799
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
6800
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
6801
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
6802
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
6803
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
6804
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
6805
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
6806
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
6807
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
6808
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
6809
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
6810
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
6811
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
6812
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
6813
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
6814
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
6815
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
6816
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
6817
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
6818
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
6819
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
6820
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
6821
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
6822
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
6823
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
6824
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
6825
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
6826
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
6827
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
6828
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
6829
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
6830
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
6831
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
6832
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
6833
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
6834
|
+
};
|
|
6835
|
+
var bind = requireFunctionBind();
|
|
6836
|
+
var hasOwn = requireHasown();
|
|
6837
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
6838
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
6839
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
6840
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
6841
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
6842
|
+
|
|
6843
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
6844
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
6845
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
6846
|
+
var stringToPath = function stringToPath(string) {
|
|
6847
|
+
var first = $strSlice(string, 0, 1);
|
|
6848
|
+
var last = $strSlice(string, -1);
|
|
6849
|
+
if (first === '%' && last !== '%') {
|
|
6850
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
6851
|
+
} else if (last === '%' && first !== '%') {
|
|
6852
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
6857
6853
|
}
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
return '\\' + x;
|
|
6854
|
+
var result = [];
|
|
6855
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
6856
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
6857
|
+
});
|
|
6858
|
+
return result;
|
|
6859
|
+
};
|
|
6860
|
+
/* end adaptation */
|
|
6861
|
+
|
|
6862
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
6863
|
+
var intrinsicName = name;
|
|
6864
|
+
var alias;
|
|
6865
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
6866
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
6867
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
6873
6868
|
}
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
}
|
|
6882
|
-
function collectionOf(type, size, entries, indent) {
|
|
6883
|
-
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
|
|
6884
|
-
return type + ' (' + size + ') {' + joinedEntries + '}';
|
|
6885
|
-
}
|
|
6886
|
-
function singleLineValues(xs) {
|
|
6887
|
-
for (var i = 0; i < xs.length; i++) {
|
|
6888
|
-
if (indexOf(xs[i], '\n') >= 0) {
|
|
6889
|
-
return false;
|
|
6869
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
6870
|
+
var value = INTRINSICS[intrinsicName];
|
|
6871
|
+
if (value === needsEval) {
|
|
6872
|
+
value = doEval(intrinsicName);
|
|
6873
|
+
}
|
|
6874
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
6875
|
+
throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
6890
6876
|
}
|
|
6877
|
+
return {
|
|
6878
|
+
alias: alias,
|
|
6879
|
+
name: intrinsicName,
|
|
6880
|
+
value: value
|
|
6881
|
+
};
|
|
6891
6882
|
}
|
|
6892
|
-
|
|
6893
|
-
}
|
|
6894
|
-
function
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
baseIndent = '\t';
|
|
6898
|
-
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
|
|
6899
|
-
baseIndent = $join.call(Array(opts.indent + 1), ' ');
|
|
6900
|
-
} else {
|
|
6901
|
-
return null;
|
|
6883
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
6884
|
+
};
|
|
6885
|
+
var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
6886
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
6887
|
+
throw new $TypeError$3('intrinsic name must be a non-empty string');
|
|
6902
6888
|
}
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
prev: $join.call(Array(depth + 1), baseIndent)
|
|
6906
|
-
};
|
|
6907
|
-
}
|
|
6908
|
-
function indentedJoin(xs, indent) {
|
|
6909
|
-
if (xs.length === 0) {
|
|
6910
|
-
return '';
|
|
6889
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
6890
|
+
throw new $TypeError$3('"allowMissing" argument must be a boolean');
|
|
6911
6891
|
}
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
var
|
|
6917
|
-
var
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6892
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
6893
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
6894
|
+
}
|
|
6895
|
+
var parts = stringToPath(name);
|
|
6896
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
6897
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
6898
|
+
var intrinsicRealName = intrinsic.name;
|
|
6899
|
+
var value = intrinsic.value;
|
|
6900
|
+
var skipFurtherCaching = false;
|
|
6901
|
+
var alias = intrinsic.alias;
|
|
6902
|
+
if (alias) {
|
|
6903
|
+
intrinsicBaseName = alias[0];
|
|
6904
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
6923
6905
|
}
|
|
6924
|
-
var
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6906
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
6907
|
+
var part = parts[i];
|
|
6908
|
+
var first = $strSlice(part, 0, 1);
|
|
6909
|
+
var last = $strSlice(part, -1);
|
|
6910
|
+
if ((first === '"' || first === "'" || first === '`' || last === '"' || last === "'" || last === '`') && first !== last) {
|
|
6911
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
6930
6912
|
}
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
// eslint-disable-line no-restricted-syntax
|
|
6934
|
-
if (!has$3(obj, key)) {
|
|
6935
|
-
continue;
|
|
6936
|
-
} // eslint-disable-line no-restricted-syntax, no-continue
|
|
6937
|
-
if (isArr && String(Number(key)) === key && key < obj.length) {
|
|
6938
|
-
continue;
|
|
6939
|
-
} // eslint-disable-line no-restricted-syntax, no-continue
|
|
6940
|
-
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
|
|
6941
|
-
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
|
|
6942
|
-
continue; // eslint-disable-line no-restricted-syntax, no-continue
|
|
6943
|
-
} else if ($test.call(/[^\w$]/, key)) {
|
|
6944
|
-
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
|
|
6945
|
-
} else {
|
|
6946
|
-
xs.push(key + ': ' + inspect(obj[key], obj));
|
|
6913
|
+
if (part === 'constructor' || !isOwn) {
|
|
6914
|
+
skipFurtherCaching = true;
|
|
6947
6915
|
}
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6952
|
-
|
|
6916
|
+
intrinsicBaseName += '.' + part;
|
|
6917
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
6918
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
6919
|
+
value = INTRINSICS[intrinsicRealName];
|
|
6920
|
+
} else if (value != null) {
|
|
6921
|
+
if (!(part in value)) {
|
|
6922
|
+
if (!allowMissing) {
|
|
6923
|
+
throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
6924
|
+
}
|
|
6925
|
+
return void undefined$1;
|
|
6953
6926
|
}
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
}
|
|
6958
|
-
|
|
6959
|
-
var GetIntrinsic = getIntrinsic;
|
|
6960
|
-
var callBound = callBound$1;
|
|
6961
|
-
var inspect = objectInspect;
|
|
6962
|
-
var $TypeError = type;
|
|
6963
|
-
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
6964
|
-
var $Map = GetIntrinsic('%Map%', true);
|
|
6965
|
-
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
6966
|
-
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
6967
|
-
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
6968
|
-
var $mapGet = callBound('Map.prototype.get', true);
|
|
6969
|
-
var $mapSet = callBound('Map.prototype.set', true);
|
|
6970
|
-
var $mapHas = callBound('Map.prototype.has', true);
|
|
6927
|
+
if ($gOPD && i + 1 >= parts.length) {
|
|
6928
|
+
var desc = $gOPD(value, part);
|
|
6929
|
+
isOwn = !!desc;
|
|
6971
6930
|
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6931
|
+
// By convention, when a data property is converted to an accessor
|
|
6932
|
+
// property to emulate a data property that does not suffer from
|
|
6933
|
+
// the override mistake, that accessor's getter is marked with
|
|
6934
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
6935
|
+
// uphold the illusion by pretending to see that original data
|
|
6936
|
+
// property, i.e., returning the value rather than the getter
|
|
6937
|
+
// itself.
|
|
6938
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
6939
|
+
value = desc.get;
|
|
6940
|
+
} else {
|
|
6941
|
+
value = value[part];
|
|
6942
|
+
}
|
|
6943
|
+
} else {
|
|
6944
|
+
isOwn = hasOwn(value, part);
|
|
6945
|
+
value = value[part];
|
|
6946
|
+
}
|
|
6947
|
+
if (isOwn && !skipFurtherCaching) {
|
|
6948
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
6949
|
+
}
|
|
6991
6950
|
}
|
|
6992
6951
|
}
|
|
6952
|
+
return value;
|
|
6993
6953
|
};
|
|
6994
6954
|
|
|
6995
|
-
|
|
6996
|
-
var
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
}
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
// eslint-disable-line no-param-reassign, no-extra-parens
|
|
7009
|
-
key: key,
|
|
7010
|
-
next: objects.next,
|
|
7011
|
-
value: value
|
|
7012
|
-
};
|
|
6955
|
+
var GetIntrinsic$2 = getIntrinsic;
|
|
6956
|
+
var callBindBasic = callBindApplyHelpers;
|
|
6957
|
+
|
|
6958
|
+
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
|
6959
|
+
var $indexOf = callBindBasic([GetIntrinsic$2('%String.prototype.indexOf%')]);
|
|
6960
|
+
|
|
6961
|
+
/** @type {import('.')} */
|
|
6962
|
+
var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
|
|
6963
|
+
/* eslint no-extra-parens: 0 */
|
|
6964
|
+
|
|
6965
|
+
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */GetIntrinsic$2(name, !!allowMissing);
|
|
6966
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
6967
|
+
return callBindBasic(/** @type {const} */[intrinsic]);
|
|
7013
6968
|
}
|
|
6969
|
+
return intrinsic;
|
|
7014
6970
|
};
|
|
7015
|
-
|
|
7016
|
-
var
|
|
7017
|
-
|
|
7018
|
-
|
|
6971
|
+
|
|
6972
|
+
var GetIntrinsic$1 = getIntrinsic;
|
|
6973
|
+
var callBound$1 = callBound$2;
|
|
6974
|
+
var inspect$2 = objectInspect;
|
|
6975
|
+
var $TypeError$2 = type;
|
|
6976
|
+
var $Map = GetIntrinsic$1('%Map%', true);
|
|
6977
|
+
|
|
6978
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => V} */
|
|
6979
|
+
var $mapGet = callBound$1('Map.prototype.get', true);
|
|
6980
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K, value: V) => void} */
|
|
6981
|
+
var $mapSet = callBound$1('Map.prototype.set', true);
|
|
6982
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
6983
|
+
var $mapHas = callBound$1('Map.prototype.has', true);
|
|
6984
|
+
/** @type {<K, V>(thisArg: Map<K, V>, key: K) => boolean} */
|
|
6985
|
+
var $mapDelete = callBound$1('Map.prototype.delete', true);
|
|
6986
|
+
/** @type {<K, V>(thisArg: Map<K, V>) => number} */
|
|
6987
|
+
var $mapSize = callBound$1('Map.prototype.size', true);
|
|
7019
6988
|
|
|
7020
6989
|
/** @type {import('.')} */
|
|
7021
|
-
var
|
|
7022
|
-
/** @
|
|
7023
|
-
/** @
|
|
7024
|
-
|
|
7025
|
-
/** @type {import('.').RootNode<unknown>} */
|
|
7026
|
-
var $o;
|
|
6990
|
+
var sideChannelMap = !!$Map && /** @type {Exclude<import('.'), false>} */function getSideChannelMap() {
|
|
6991
|
+
/** @typedef {ReturnType<typeof getSideChannelMap>} Channel */
|
|
6992
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
6993
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
7027
6994
|
|
|
7028
|
-
/** @type {
|
|
6995
|
+
/** @type {Map<K, V> | undefined} */var $m;
|
|
6996
|
+
|
|
6997
|
+
/** @type {Channel} */
|
|
7029
6998
|
var channel = {
|
|
7030
6999
|
assert: function assert(key) {
|
|
7031
7000
|
if (!channel.has(key)) {
|
|
7032
|
-
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
7001
|
+
throw new $TypeError$2('Side channel does not contain ' + inspect$2(key));
|
|
7033
7002
|
}
|
|
7034
7003
|
},
|
|
7004
|
+
'delete': function _delete(key) {
|
|
7005
|
+
if ($m) {
|
|
7006
|
+
var result = $mapDelete($m, key);
|
|
7007
|
+
if ($mapSize($m) === 0) {
|
|
7008
|
+
$m = void undefined;
|
|
7009
|
+
}
|
|
7010
|
+
return result;
|
|
7011
|
+
}
|
|
7012
|
+
return false;
|
|
7013
|
+
},
|
|
7035
7014
|
get: function get(key) {
|
|
7036
7015
|
// eslint-disable-line consistent-return
|
|
7016
|
+
if ($m) {
|
|
7017
|
+
return $mapGet($m, key);
|
|
7018
|
+
}
|
|
7019
|
+
},
|
|
7020
|
+
has: function has(key) {
|
|
7021
|
+
if ($m) {
|
|
7022
|
+
return $mapHas($m, key);
|
|
7023
|
+
}
|
|
7024
|
+
return false;
|
|
7025
|
+
},
|
|
7026
|
+
set: function set(key, value) {
|
|
7027
|
+
if (!$m) {
|
|
7028
|
+
// @ts-expect-error TS can't handle narrowing a variable inside a closure
|
|
7029
|
+
$m = new $Map();
|
|
7030
|
+
}
|
|
7031
|
+
$mapSet($m, key, value);
|
|
7032
|
+
}
|
|
7033
|
+
};
|
|
7034
|
+
|
|
7035
|
+
// @ts-expect-error TODO: figure out why TS is erroring here
|
|
7036
|
+
return channel;
|
|
7037
|
+
};
|
|
7038
|
+
|
|
7039
|
+
var GetIntrinsic = getIntrinsic;
|
|
7040
|
+
var callBound = callBound$2;
|
|
7041
|
+
var inspect$1 = objectInspect;
|
|
7042
|
+
var getSideChannelMap$1 = sideChannelMap;
|
|
7043
|
+
var $TypeError$1 = type;
|
|
7044
|
+
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
7045
|
+
|
|
7046
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => V} */
|
|
7047
|
+
var $weakMapGet = callBound('WeakMap.prototype.get', true);
|
|
7048
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K, value: V) => void} */
|
|
7049
|
+
var $weakMapSet = callBound('WeakMap.prototype.set', true);
|
|
7050
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
7051
|
+
var $weakMapHas = callBound('WeakMap.prototype.has', true);
|
|
7052
|
+
/** @type {<K extends object, V>(thisArg: WeakMap<K, V>, key: K) => boolean} */
|
|
7053
|
+
var $weakMapDelete = callBound('WeakMap.prototype.delete', true);
|
|
7054
|
+
|
|
7055
|
+
/** @type {import('.')} */
|
|
7056
|
+
var sideChannelWeakmap = $WeakMap ? /** @type {Exclude<import('.'), false>} */function getSideChannelWeakMap() {
|
|
7057
|
+
/** @typedef {ReturnType<typeof getSideChannelWeakMap>} Channel */
|
|
7058
|
+
/** @typedef {Parameters<Channel['get']>[0]} K */
|
|
7059
|
+
/** @typedef {Parameters<Channel['set']>[1]} V */
|
|
7060
|
+
|
|
7061
|
+
/** @type {WeakMap<K & object, V> | undefined} */var $wm;
|
|
7062
|
+
/** @type {Channel | undefined} */
|
|
7063
|
+
var $m;
|
|
7064
|
+
|
|
7065
|
+
/** @type {Channel} */
|
|
7066
|
+
var channel = {
|
|
7067
|
+
assert: function assert(key) {
|
|
7068
|
+
if (!channel.has(key)) {
|
|
7069
|
+
throw new $TypeError$1('Side channel does not contain ' + inspect$1(key));
|
|
7070
|
+
}
|
|
7071
|
+
},
|
|
7072
|
+
'delete': function _delete(key) {
|
|
7037
7073
|
if ($WeakMap && key && (_typeof$2(key) === 'object' || typeof key === 'function')) {
|
|
7038
7074
|
if ($wm) {
|
|
7039
|
-
return $
|
|
7075
|
+
return $weakMapDelete($wm, key);
|
|
7040
7076
|
}
|
|
7041
|
-
} else if ($
|
|
7077
|
+
} else if (getSideChannelMap$1) {
|
|
7042
7078
|
if ($m) {
|
|
7043
|
-
return $
|
|
7079
|
+
return $m['delete'](key);
|
|
7044
7080
|
}
|
|
7045
|
-
}
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
|
|
7081
|
+
}
|
|
7082
|
+
return false;
|
|
7083
|
+
},
|
|
7084
|
+
get: function get(key) {
|
|
7085
|
+
if ($WeakMap && key && (_typeof$2(key) === 'object' || typeof key === 'function')) {
|
|
7086
|
+
if ($wm) {
|
|
7087
|
+
return $weakMapGet($wm, key);
|
|
7049
7088
|
}
|
|
7050
7089
|
}
|
|
7090
|
+
return $m && $m.get(key);
|
|
7051
7091
|
},
|
|
7052
7092
|
has: function has(key) {
|
|
7053
7093
|
if ($WeakMap && key && (_typeof$2(key) === 'object' || typeof key === 'function')) {
|
|
7054
7094
|
if ($wm) {
|
|
7055
7095
|
return $weakMapHas($wm, key);
|
|
7056
7096
|
}
|
|
7057
|
-
} else if ($Map) {
|
|
7058
|
-
if ($m) {
|
|
7059
|
-
return $mapHas($m, key);
|
|
7060
|
-
}
|
|
7061
|
-
} else {
|
|
7062
|
-
if ($o) {
|
|
7063
|
-
// eslint-disable-line no-lonely-if
|
|
7064
|
-
return listHas($o, key);
|
|
7065
|
-
}
|
|
7066
7097
|
}
|
|
7067
|
-
return
|
|
7098
|
+
return !!$m && $m.has(key);
|
|
7068
7099
|
},
|
|
7069
7100
|
set: function set(key, value) {
|
|
7070
7101
|
if ($WeakMap && key && (_typeof$2(key) === 'object' || typeof key === 'function')) {
|
|
@@ -7072,23 +7103,58 @@ var contentful = (function (exports) {
|
|
|
7072
7103
|
$wm = new $WeakMap();
|
|
7073
7104
|
}
|
|
7074
7105
|
$weakMapSet($wm, key, value);
|
|
7075
|
-
} else if ($
|
|
7106
|
+
} else if (getSideChannelMap$1) {
|
|
7076
7107
|
if (!$m) {
|
|
7077
|
-
$m =
|
|
7078
|
-
}
|
|
7079
|
-
$mapSet($m, key, value);
|
|
7080
|
-
} else {
|
|
7081
|
-
if (!$o) {
|
|
7082
|
-
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
|
|
7083
|
-
$o = {
|
|
7084
|
-
key: {},
|
|
7085
|
-
next: null
|
|
7086
|
-
};
|
|
7108
|
+
$m = getSideChannelMap$1();
|
|
7087
7109
|
}
|
|
7088
|
-
|
|
7110
|
+
// eslint-disable-next-line no-extra-parens
|
|
7111
|
+
/** @type {NonNullable<typeof $m>} */
|
|
7112
|
+
$m.set(key, value);
|
|
7113
|
+
}
|
|
7114
|
+
}
|
|
7115
|
+
};
|
|
7116
|
+
|
|
7117
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
7118
|
+
return channel;
|
|
7119
|
+
} : getSideChannelMap$1;
|
|
7120
|
+
|
|
7121
|
+
var $TypeError = type;
|
|
7122
|
+
var inspect = objectInspect;
|
|
7123
|
+
var getSideChannelList = sideChannelList;
|
|
7124
|
+
var getSideChannelMap = sideChannelMap;
|
|
7125
|
+
var getSideChannelWeakMap = sideChannelWeakmap;
|
|
7126
|
+
var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
|
|
7127
|
+
|
|
7128
|
+
/** @type {import('.')} */
|
|
7129
|
+
var sideChannel = function getSideChannel() {
|
|
7130
|
+
/** @typedef {ReturnType<typeof getSideChannel>} Channel */
|
|
7131
|
+
|
|
7132
|
+
/** @type {Channel | undefined} */var $channelData;
|
|
7133
|
+
|
|
7134
|
+
/** @type {Channel} */
|
|
7135
|
+
var channel = {
|
|
7136
|
+
assert: function assert(key) {
|
|
7137
|
+
if (!channel.has(key)) {
|
|
7138
|
+
throw new $TypeError('Side channel does not contain ' + inspect(key));
|
|
7139
|
+
}
|
|
7140
|
+
},
|
|
7141
|
+
'delete': function _delete(key) {
|
|
7142
|
+
return !!$channelData && $channelData['delete'](key);
|
|
7143
|
+
},
|
|
7144
|
+
get: function get(key) {
|
|
7145
|
+
return $channelData && $channelData.get(key);
|
|
7146
|
+
},
|
|
7147
|
+
has: function has(key) {
|
|
7148
|
+
return !!$channelData && $channelData.has(key);
|
|
7149
|
+
},
|
|
7150
|
+
set: function set(key, value) {
|
|
7151
|
+
if (!$channelData) {
|
|
7152
|
+
$channelData = makeChannel();
|
|
7089
7153
|
}
|
|
7154
|
+
$channelData.set(key, value);
|
|
7090
7155
|
}
|
|
7091
7156
|
};
|
|
7157
|
+
// @ts-expect-error TODO: figure out why this is erroring
|
|
7092
7158
|
return channel;
|
|
7093
7159
|
};
|
|
7094
7160
|
|
|
@@ -7113,8 +7179,26 @@ var contentful = (function (exports) {
|
|
|
7113
7179
|
};
|
|
7114
7180
|
|
|
7115
7181
|
var formats$2 = formats$3;
|
|
7182
|
+
var getSideChannel$1 = sideChannel;
|
|
7116
7183
|
var has$2 = Object.prototype.hasOwnProperty;
|
|
7117
7184
|
var isArray$2 = Array.isArray;
|
|
7185
|
+
|
|
7186
|
+
// Track objects created from arrayLimit overflow using side-channel
|
|
7187
|
+
// Stores the current max numeric index for O(1) lookup
|
|
7188
|
+
var overflowChannel = getSideChannel$1();
|
|
7189
|
+
var markOverflow = function markOverflow(obj, maxIndex) {
|
|
7190
|
+
overflowChannel.set(obj, maxIndex);
|
|
7191
|
+
return obj;
|
|
7192
|
+
};
|
|
7193
|
+
var isOverflow = function isOverflow(obj) {
|
|
7194
|
+
return overflowChannel.has(obj);
|
|
7195
|
+
};
|
|
7196
|
+
var getMaxIndex = function getMaxIndex(obj) {
|
|
7197
|
+
return overflowChannel.get(obj);
|
|
7198
|
+
};
|
|
7199
|
+
var setMaxIndex = function setMaxIndex(obj, maxIndex) {
|
|
7200
|
+
overflowChannel.set(obj, maxIndex);
|
|
7201
|
+
};
|
|
7118
7202
|
var hexTable = function () {
|
|
7119
7203
|
var array = [];
|
|
7120
7204
|
for (var i = 0; i < 256; ++i) {
|
|
@@ -7138,7 +7222,9 @@ var contentful = (function (exports) {
|
|
|
7138
7222
|
}
|
|
7139
7223
|
};
|
|
7140
7224
|
var arrayToObject = function arrayToObject(source, options) {
|
|
7141
|
-
var obj = options && options.plainObjects ?
|
|
7225
|
+
var obj = options && options.plainObjects ? {
|
|
7226
|
+
__proto__: null
|
|
7227
|
+
} : {};
|
|
7142
7228
|
for (var i = 0; i < source.length; ++i) {
|
|
7143
7229
|
if (typeof source[i] !== 'undefined') {
|
|
7144
7230
|
obj[i] = source[i];
|
|
@@ -7151,11 +7237,16 @@ var contentful = (function (exports) {
|
|
|
7151
7237
|
if (!source) {
|
|
7152
7238
|
return target;
|
|
7153
7239
|
}
|
|
7154
|
-
if (_typeof$2(source) !== 'object') {
|
|
7240
|
+
if (_typeof$2(source) !== 'object' && typeof source !== 'function') {
|
|
7155
7241
|
if (isArray$2(target)) {
|
|
7156
7242
|
target.push(source);
|
|
7157
7243
|
} else if (target && _typeof$2(target) === 'object') {
|
|
7158
|
-
if (
|
|
7244
|
+
if (isOverflow(target)) {
|
|
7245
|
+
// Add at next numeric index for overflow objects
|
|
7246
|
+
var newIndex = getMaxIndex(target) + 1;
|
|
7247
|
+
target[newIndex] = source;
|
|
7248
|
+
setMaxIndex(target, newIndex);
|
|
7249
|
+
} else if (options && (options.plainObjects || options.allowPrototypes) || !has$2.call(Object.prototype, source)) {
|
|
7159
7250
|
target[source] = true;
|
|
7160
7251
|
}
|
|
7161
7252
|
} else {
|
|
@@ -7164,6 +7255,21 @@ var contentful = (function (exports) {
|
|
|
7164
7255
|
return target;
|
|
7165
7256
|
}
|
|
7166
7257
|
if (!target || _typeof$2(target) !== 'object') {
|
|
7258
|
+
if (isOverflow(source)) {
|
|
7259
|
+
// Create new object with target at 0, source values shifted by 1
|
|
7260
|
+
var sourceKeys = Object.keys(source);
|
|
7261
|
+
var result = options && options.plainObjects ? {
|
|
7262
|
+
__proto__: null,
|
|
7263
|
+
0: target
|
|
7264
|
+
} : {
|
|
7265
|
+
0: target
|
|
7266
|
+
};
|
|
7267
|
+
for (var m = 0; m < sourceKeys.length; m++) {
|
|
7268
|
+
var oldKey = parseInt(sourceKeys[m], 10);
|
|
7269
|
+
result[oldKey + 1] = source[sourceKeys[m]];
|
|
7270
|
+
}
|
|
7271
|
+
return markOverflow(result, getMaxIndex(source) + 1);
|
|
7272
|
+
}
|
|
7167
7273
|
return [target].concat(source);
|
|
7168
7274
|
}
|
|
7169
7275
|
var mergeTarget = target;
|
|
@@ -7201,7 +7307,7 @@ var contentful = (function (exports) {
|
|
|
7201
7307
|
return acc;
|
|
7202
7308
|
}, target);
|
|
7203
7309
|
};
|
|
7204
|
-
var decode = function decode(str,
|
|
7310
|
+
var decode = function decode(str, defaultDecoder, charset) {
|
|
7205
7311
|
var strWithoutPlus = str.replace(/\+/g, ' ');
|
|
7206
7312
|
if (charset === 'iso-8859-1') {
|
|
7207
7313
|
// unescape never throws, no try...catch needed:
|
|
@@ -7309,8 +7415,21 @@ var contentful = (function (exports) {
|
|
|
7309
7415
|
}
|
|
7310
7416
|
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
|
|
7311
7417
|
};
|
|
7312
|
-
var combine = function combine(a, b) {
|
|
7313
|
-
|
|
7418
|
+
var combine = function combine(a, b, arrayLimit, plainObjects) {
|
|
7419
|
+
// If 'a' is already an overflow object, add to it
|
|
7420
|
+
if (isOverflow(a)) {
|
|
7421
|
+
var newIndex = getMaxIndex(a) + 1;
|
|
7422
|
+
a[newIndex] = b;
|
|
7423
|
+
setMaxIndex(a, newIndex);
|
|
7424
|
+
return a;
|
|
7425
|
+
}
|
|
7426
|
+
var result = [].concat(a, b);
|
|
7427
|
+
if (result.length > arrayLimit) {
|
|
7428
|
+
return markOverflow(arrayToObject(result, {
|
|
7429
|
+
plainObjects: plainObjects
|
|
7430
|
+
}), result.length - 1);
|
|
7431
|
+
}
|
|
7432
|
+
return result;
|
|
7314
7433
|
};
|
|
7315
7434
|
var maybeMap = function maybeMap(val, fn) {
|
|
7316
7435
|
if (isArray$2(val)) {
|
|
@@ -7330,6 +7449,7 @@ var contentful = (function (exports) {
|
|
|
7330
7449
|
decode: decode,
|
|
7331
7450
|
encode: encode,
|
|
7332
7451
|
isBuffer: isBuffer,
|
|
7452
|
+
isOverflow: isOverflow,
|
|
7333
7453
|
isRegExp: isRegExp,
|
|
7334
7454
|
maybeMap: maybeMap,
|
|
7335
7455
|
merge: merge
|
|
@@ -7365,11 +7485,13 @@ var contentful = (function (exports) {
|
|
|
7365
7485
|
arrayFormat: 'indices',
|
|
7366
7486
|
charset: 'utf-8',
|
|
7367
7487
|
charsetSentinel: false,
|
|
7488
|
+
commaRoundTrip: false,
|
|
7368
7489
|
delimiter: '&',
|
|
7369
7490
|
encode: true,
|
|
7370
7491
|
encodeDotInKeys: false,
|
|
7371
7492
|
encoder: utils$1.encode,
|
|
7372
7493
|
encodeValuesOnly: false,
|
|
7494
|
+
filter: void undefined,
|
|
7373
7495
|
format: defaultFormat,
|
|
7374
7496
|
formatter: formats$1.formatters[defaultFormat],
|
|
7375
7497
|
// deprecated
|
|
@@ -7448,18 +7570,18 @@ var contentful = (function (exports) {
|
|
|
7448
7570
|
var keys = Object.keys(obj);
|
|
7449
7571
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
7450
7572
|
}
|
|
7451
|
-
var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
|
|
7573
|
+
var encodedPrefix = encodeDotInKeys ? String(prefix).replace(/\./g, '%2E') : String(prefix);
|
|
7452
7574
|
var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
|
|
7453
7575
|
if (allowEmptyArrays && isArray$1(obj) && obj.length === 0) {
|
|
7454
7576
|
return adjustedPrefix + '[]';
|
|
7455
7577
|
}
|
|
7456
7578
|
for (var j = 0; j < objKeys.length; ++j) {
|
|
7457
7579
|
var key = objKeys[j];
|
|
7458
|
-
var value = _typeof$2(key) === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
7580
|
+
var value = _typeof$2(key) === 'object' && key && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
7459
7581
|
if (skipNulls && value === null) {
|
|
7460
7582
|
continue;
|
|
7461
7583
|
}
|
|
7462
|
-
var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
|
|
7584
|
+
var encodedKey = allowDots && encodeDotInKeys ? String(key).replace(/\./g, '%2E') : String(key);
|
|
7463
7585
|
var keyPrefix = isArray$1(obj) ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix : adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
|
|
7464
7586
|
sideChannel.set(object, step);
|
|
7465
7587
|
var valueSideChannel = getSideChannel();
|
|
@@ -7516,7 +7638,7 @@ var contentful = (function (exports) {
|
|
|
7516
7638
|
arrayFormat: arrayFormat,
|
|
7517
7639
|
charset: charset,
|
|
7518
7640
|
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
7519
|
-
commaRoundTrip: opts.commaRoundTrip,
|
|
7641
|
+
commaRoundTrip: !!opts.commaRoundTrip,
|
|
7520
7642
|
delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
|
|
7521
7643
|
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
|
|
7522
7644
|
encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults$1.encodeDotInKeys,
|
|
@@ -7558,10 +7680,11 @@ var contentful = (function (exports) {
|
|
|
7558
7680
|
var sideChannel = getSideChannel();
|
|
7559
7681
|
for (var i = 0; i < objKeys.length; ++i) {
|
|
7560
7682
|
var key = objKeys[i];
|
|
7561
|
-
|
|
7683
|
+
var value = obj[key];
|
|
7684
|
+
if (options.skipNulls && value === null) {
|
|
7562
7685
|
continue;
|
|
7563
7686
|
}
|
|
7564
|
-
pushToArray(keys, stringify$2(
|
|
7687
|
+
pushToArray(keys, stringify$2(value, key, generateArrayPrefix, commaRoundTrip, options.allowEmptyArrays, options.strictNullHandling, options.skipNulls, options.encodeDotInKeys, options.encode ? options.encoder : null, options.filter, options.sort, options.allowDots, options.serializeDate, options.format, options.formatter, options.encodeValuesOnly, options.charset, sideChannel));
|
|
7565
7688
|
}
|
|
7566
7689
|
var joined = keys.join(options.delimiter);
|
|
7567
7690
|
var prefix = options.addQueryPrefix === true ? '?' : '';
|
|
@@ -7600,17 +7723,21 @@ var contentful = (function (exports) {
|
|
|
7600
7723
|
parseArrays: true,
|
|
7601
7724
|
plainObjects: false,
|
|
7602
7725
|
strictDepth: false,
|
|
7603
|
-
strictNullHandling: false
|
|
7726
|
+
strictNullHandling: false,
|
|
7727
|
+
throwOnLimitExceeded: false
|
|
7604
7728
|
};
|
|
7605
7729
|
var interpretNumericEntities = function interpretNumericEntities(str) {
|
|
7606
7730
|
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
|
|
7607
7731
|
return String.fromCharCode(parseInt(numberStr, 10));
|
|
7608
7732
|
});
|
|
7609
7733
|
};
|
|
7610
|
-
var parseArrayValue = function parseArrayValue(val, options) {
|
|
7734
|
+
var parseArrayValue = function parseArrayValue(val, options, currentArrayLength) {
|
|
7611
7735
|
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
|
|
7612
7736
|
return val.split(',');
|
|
7613
7737
|
}
|
|
7738
|
+
if (options.throwOnLimitExceeded && currentArrayLength >= options.arrayLimit) {
|
|
7739
|
+
throw new RangeError('Array limit exceeded. Only ' + options.arrayLimit + ' element' + (options.arrayLimit === 1 ? '' : 's') + ' allowed in an array.');
|
|
7740
|
+
}
|
|
7614
7741
|
return val;
|
|
7615
7742
|
};
|
|
7616
7743
|
|
|
@@ -7631,7 +7758,10 @@ var contentful = (function (exports) {
|
|
|
7631
7758
|
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
|
|
7632
7759
|
cleanStr = cleanStr.replace(/%5B/gi, '[').replace(/%5D/gi, ']');
|
|
7633
7760
|
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
|
|
7634
|
-
var parts = cleanStr.split(options.delimiter, limit);
|
|
7761
|
+
var parts = cleanStr.split(options.delimiter, options.throwOnLimitExceeded ? limit + 1 : limit);
|
|
7762
|
+
if (options.throwOnLimitExceeded && parts.length > limit) {
|
|
7763
|
+
throw new RangeError('Parameter limit exceeded. Only ' + limit + ' parameter' + (limit === 1 ? '' : 's') + ' allowed.');
|
|
7764
|
+
}
|
|
7635
7765
|
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
|
|
7636
7766
|
var i;
|
|
7637
7767
|
var charset = options.charset;
|
|
@@ -7655,40 +7785,57 @@ var contentful = (function (exports) {
|
|
|
7655
7785
|
var part = parts[i];
|
|
7656
7786
|
var bracketEqualsPos = part.indexOf(']=');
|
|
7657
7787
|
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
|
|
7658
|
-
var key
|
|
7788
|
+
var key;
|
|
7789
|
+
var val;
|
|
7659
7790
|
if (pos === -1) {
|
|
7660
7791
|
key = options.decoder(part, defaults.decoder, charset, 'key');
|
|
7661
7792
|
val = options.strictNullHandling ? null : '';
|
|
7662
7793
|
} else {
|
|
7663
7794
|
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
|
|
7664
|
-
|
|
7665
|
-
|
|
7666
|
-
|
|
7795
|
+
if (key !== null) {
|
|
7796
|
+
val = utils.maybeMap(parseArrayValue(part.slice(pos + 1), options, isArray(obj[key]) ? obj[key].length : 0), function (encodedVal) {
|
|
7797
|
+
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
|
|
7798
|
+
});
|
|
7799
|
+
}
|
|
7667
7800
|
}
|
|
7668
7801
|
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
|
|
7669
|
-
val = interpretNumericEntities(val);
|
|
7802
|
+
val = interpretNumericEntities(String(val));
|
|
7670
7803
|
}
|
|
7671
7804
|
if (part.indexOf('[]=') > -1) {
|
|
7672
7805
|
val = isArray(val) ? [val] : val;
|
|
7673
7806
|
}
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7807
|
+
if (key !== null) {
|
|
7808
|
+
var existing = has.call(obj, key);
|
|
7809
|
+
if (existing && options.duplicates === 'combine') {
|
|
7810
|
+
obj[key] = utils.combine(obj[key], val, options.arrayLimit, options.plainObjects);
|
|
7811
|
+
} else if (!existing || options.duplicates === 'last') {
|
|
7812
|
+
obj[key] = val;
|
|
7813
|
+
}
|
|
7679
7814
|
}
|
|
7680
7815
|
}
|
|
7681
7816
|
return obj;
|
|
7682
7817
|
};
|
|
7683
7818
|
var parseObject = function parseObject(chain, val, options, valuesParsed) {
|
|
7684
|
-
var
|
|
7819
|
+
var currentArrayLength = 0;
|
|
7820
|
+
if (chain.length > 0 && chain[chain.length - 1] === '[]') {
|
|
7821
|
+
var parentKey = chain.slice(0, -1).join('');
|
|
7822
|
+
currentArrayLength = Array.isArray(val) && val[parentKey] ? val[parentKey].length : 0;
|
|
7823
|
+
}
|
|
7824
|
+
var leaf = valuesParsed ? val : parseArrayValue(val, options, currentArrayLength);
|
|
7685
7825
|
for (var i = chain.length - 1; i >= 0; --i) {
|
|
7686
7826
|
var obj;
|
|
7687
7827
|
var root = chain[i];
|
|
7688
7828
|
if (root === '[]' && options.parseArrays) {
|
|
7689
|
-
|
|
7829
|
+
if (utils.isOverflow(leaf)) {
|
|
7830
|
+
// leaf is already an overflow object, preserve it
|
|
7831
|
+
obj = leaf;
|
|
7832
|
+
} else {
|
|
7833
|
+
obj = options.allowEmptyArrays && (leaf === '' || options.strictNullHandling && leaf === null) ? [] : utils.combine([], leaf, options.arrayLimit, options.plainObjects);
|
|
7834
|
+
}
|
|
7690
7835
|
} else {
|
|
7691
|
-
obj = options.plainObjects ?
|
|
7836
|
+
obj = options.plainObjects ? {
|
|
7837
|
+
__proto__: null
|
|
7838
|
+
} : {};
|
|
7692
7839
|
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
7693
7840
|
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
|
|
7694
7841
|
var index = parseInt(decodedRoot, 10);
|
|
@@ -7707,29 +7854,22 @@ var contentful = (function (exports) {
|
|
|
7707
7854
|
}
|
|
7708
7855
|
return leaf;
|
|
7709
7856
|
};
|
|
7710
|
-
var
|
|
7711
|
-
if (!givenKey) {
|
|
7712
|
-
return;
|
|
7713
|
-
}
|
|
7714
|
-
|
|
7715
|
-
// Transform dot notation to bracket notation
|
|
7857
|
+
var splitKeyIntoSegments = function splitKeyIntoSegments(givenKey, options) {
|
|
7716
7858
|
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7859
|
+
if (options.depth <= 0) {
|
|
7860
|
+
if (!options.plainObjects && has.call(Object.prototype, key)) {
|
|
7861
|
+
if (!options.allowPrototypes) {
|
|
7862
|
+
return;
|
|
7863
|
+
}
|
|
7864
|
+
}
|
|
7865
|
+
return [key];
|
|
7866
|
+
}
|
|
7720
7867
|
var brackets = /(\[[^[\]]*])/;
|
|
7721
7868
|
var child = /(\[[^[\]]*])/g;
|
|
7722
|
-
|
|
7723
|
-
// Get the parent
|
|
7724
|
-
|
|
7725
|
-
var segment = options.depth > 0 && brackets.exec(key);
|
|
7869
|
+
var segment = brackets.exec(key);
|
|
7726
7870
|
var parent = segment ? key.slice(0, segment.index) : key;
|
|
7727
|
-
|
|
7728
|
-
// Stash the parent if it exists
|
|
7729
|
-
|
|
7730
7871
|
var keys = [];
|
|
7731
7872
|
if (parent) {
|
|
7732
|
-
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
|
|
7733
7873
|
if (!options.plainObjects && has.call(Object.prototype, parent)) {
|
|
7734
7874
|
if (!options.allowPrototypes) {
|
|
7735
7875
|
return;
|
|
@@ -7737,28 +7877,33 @@ var contentful = (function (exports) {
|
|
|
7737
7877
|
}
|
|
7738
7878
|
keys.push(parent);
|
|
7739
7879
|
}
|
|
7740
|
-
|
|
7741
|
-
// Loop through children appending to the array until we hit depth
|
|
7742
|
-
|
|
7743
7880
|
var i = 0;
|
|
7744
|
-
while (
|
|
7881
|
+
while ((segment = child.exec(key)) !== null && i < options.depth) {
|
|
7745
7882
|
i += 1;
|
|
7746
|
-
|
|
7883
|
+
var segmentContent = segment[1].slice(1, -1);
|
|
7884
|
+
if (!options.plainObjects && has.call(Object.prototype, segmentContent)) {
|
|
7747
7885
|
if (!options.allowPrototypes) {
|
|
7748
7886
|
return;
|
|
7749
7887
|
}
|
|
7750
7888
|
}
|
|
7751
7889
|
keys.push(segment[1]);
|
|
7752
7890
|
}
|
|
7753
|
-
|
|
7754
|
-
// If there's a remainder, check strictDepth option for throw, else just add whatever is left
|
|
7755
|
-
|
|
7756
7891
|
if (segment) {
|
|
7757
7892
|
if (options.strictDepth === true) {
|
|
7758
7893
|
throw new RangeError('Input depth exceeded depth option of ' + options.depth + ' and strictDepth is true');
|
|
7759
7894
|
}
|
|
7760
7895
|
keys.push('[' + key.slice(segment.index) + ']');
|
|
7761
7896
|
}
|
|
7897
|
+
return keys;
|
|
7898
|
+
};
|
|
7899
|
+
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
|
|
7900
|
+
if (!givenKey) {
|
|
7901
|
+
return;
|
|
7902
|
+
}
|
|
7903
|
+
var keys = splitKeyIntoSegments(givenKey, options);
|
|
7904
|
+
if (!keys) {
|
|
7905
|
+
return;
|
|
7906
|
+
}
|
|
7762
7907
|
return parseObject(keys, val, options, valuesParsed);
|
|
7763
7908
|
};
|
|
7764
7909
|
var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
@@ -7777,6 +7922,9 @@ var contentful = (function (exports) {
|
|
|
7777
7922
|
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
|
|
7778
7923
|
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
|
|
7779
7924
|
}
|
|
7925
|
+
if (typeof opts.throwOnLimitExceeded !== 'undefined' && typeof opts.throwOnLimitExceeded !== 'boolean') {
|
|
7926
|
+
throw new TypeError('`throwOnLimitExceeded` option must be a boolean');
|
|
7927
|
+
}
|
|
7780
7928
|
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
|
|
7781
7929
|
var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;
|
|
7782
7930
|
if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
|
|
@@ -7804,16 +7952,21 @@ var contentful = (function (exports) {
|
|
|
7804
7952
|
parseArrays: opts.parseArrays !== false,
|
|
7805
7953
|
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
|
|
7806
7954
|
strictDepth: typeof opts.strictDepth === 'boolean' ? !!opts.strictDepth : defaults.strictDepth,
|
|
7807
|
-
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
|
|
7955
|
+
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling,
|
|
7956
|
+
throwOnLimitExceeded: typeof opts.throwOnLimitExceeded === 'boolean' ? opts.throwOnLimitExceeded : false
|
|
7808
7957
|
};
|
|
7809
7958
|
};
|
|
7810
7959
|
var parse$1 = function parse(str, opts) {
|
|
7811
7960
|
var options = normalizeParseOptions(opts);
|
|
7812
7961
|
if (str === '' || str === null || typeof str === 'undefined') {
|
|
7813
|
-
return options.plainObjects ?
|
|
7962
|
+
return options.plainObjects ? {
|
|
7963
|
+
__proto__: null
|
|
7964
|
+
} : {};
|
|
7814
7965
|
}
|
|
7815
7966
|
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
|
|
7816
|
-
var obj = options.plainObjects ?
|
|
7967
|
+
var obj = options.plainObjects ? {
|
|
7968
|
+
__proto__: null
|
|
7969
|
+
} : {};
|
|
7817
7970
|
|
|
7818
7971
|
// Iterate over the keys and setup the new object
|
|
7819
7972
|
|
|
@@ -7841,6 +7994,7 @@ var contentful = (function (exports) {
|
|
|
7841
7994
|
|
|
7842
7995
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7843
7996
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
7997
|
+
|
|
7844
7998
|
// Matches 'sub.host:port' or 'host:port' and extracts hostname and port
|
|
7845
7999
|
// Also enforces toplevel domain specified, no spaces and no protocol
|
|
7846
8000
|
var HOST_REGEX = /^(?!\w+:\/\/)([^\s:]+\.?[^\s:]+)(?::(\d+))?(?!:)$/;
|