@bigbinary/neeto-playwright-commons 1.9.11 → 1.9.13
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/index.cjs.js +987 -185
- package/index.cjs.js.map +1 -1
- package/index.d.ts +25 -19
- package/index.js +982 -180
- package/index.js.map +1 -1
- package/package.json +13 -13
package/index.js
CHANGED
|
@@ -9,21 +9,21 @@ import Path__default from 'path';
|
|
|
9
9
|
import { faker } from '@faker-js/faker';
|
|
10
10
|
import MailosaurClient from 'mailosaur';
|
|
11
11
|
import dayjs from 'dayjs';
|
|
12
|
-
import require$$
|
|
12
|
+
import require$$0$4 from 'tty';
|
|
13
13
|
import require$$0$3 from 'os';
|
|
14
14
|
import Stream$4 from 'stream';
|
|
15
|
-
import require$$0$
|
|
15
|
+
import require$$0$5 from 'events';
|
|
16
16
|
import { getI18nInstance, initI18n } from 'playwright-i18next-fixture';
|
|
17
17
|
import { isNotEmpty, humanize, isPresent, dynamicArray, isNotPresent } from '@bigbinary/neeto-cist';
|
|
18
18
|
import http$1 from 'http';
|
|
19
19
|
import Url from 'url';
|
|
20
|
-
import require$$0$
|
|
20
|
+
import require$$0$6 from 'punycode';
|
|
21
21
|
import https$1 from 'https';
|
|
22
22
|
import zlib$5 from 'zlib';
|
|
23
|
-
import require$$0$
|
|
23
|
+
import require$$0$7 from 'assert';
|
|
24
24
|
import require$$3 from 'buffer';
|
|
25
25
|
import require$$3$1 from 'querystring';
|
|
26
|
-
import require$$1$
|
|
26
|
+
import require$$1$1 from 'string_decoder';
|
|
27
27
|
import require$$4$1 from 'timers';
|
|
28
28
|
import require$$3$2 from 'crypto';
|
|
29
29
|
|
|
@@ -345,6 +345,27 @@ function getAugmentedNamespace(n) {
|
|
|
345
345
|
return a;
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
+
/** @type {import('.')} */
|
|
349
|
+
var esErrors = Error;
|
|
350
|
+
|
|
351
|
+
/** @type {import('./eval')} */
|
|
352
|
+
var _eval = EvalError;
|
|
353
|
+
|
|
354
|
+
/** @type {import('./range')} */
|
|
355
|
+
var range = RangeError;
|
|
356
|
+
|
|
357
|
+
/** @type {import('./ref')} */
|
|
358
|
+
var ref = ReferenceError;
|
|
359
|
+
|
|
360
|
+
/** @type {import('./syntax')} */
|
|
361
|
+
var syntax = SyntaxError;
|
|
362
|
+
|
|
363
|
+
/** @type {import('./type')} */
|
|
364
|
+
var type = TypeError;
|
|
365
|
+
|
|
366
|
+
/** @type {import('./uri')} */
|
|
367
|
+
var uri = URIError;
|
|
368
|
+
|
|
348
369
|
/* eslint complexity: [2, 18], max-statements: [2, 33] */
|
|
349
370
|
var shams = function hasSymbols() {
|
|
350
371
|
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
|
|
@@ -389,7 +410,7 @@ var shams = function hasSymbols() {
|
|
|
389
410
|
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
|
|
390
411
|
var hasSymbolSham = shams;
|
|
391
412
|
|
|
392
|
-
var hasSymbols$
|
|
413
|
+
var hasSymbols$2 = function hasNativeSymbols() {
|
|
393
414
|
if (typeof origSymbol !== 'function') { return false; }
|
|
394
415
|
if (typeof Symbol !== 'function') { return false; }
|
|
395
416
|
if (typeof origSymbol('foo') !== 'symbol') { return false; }
|
|
@@ -404,7 +425,7 @@ var test = {
|
|
|
404
425
|
|
|
405
426
|
var $Object = Object;
|
|
406
427
|
|
|
407
|
-
var hasProto$
|
|
428
|
+
var hasProto$2 = function hasProto() {
|
|
408
429
|
return { __proto__: test }.foo === test.foo && !({ __proto__: null } instanceof $Object);
|
|
409
430
|
};
|
|
410
431
|
|
|
@@ -497,10 +518,761 @@ var functionBind = Function.prototype.bind || implementation;
|
|
|
497
518
|
|
|
498
519
|
var call = Function.prototype.call;
|
|
499
520
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
500
|
-
var bind$
|
|
521
|
+
var bind$2 = functionBind;
|
|
501
522
|
|
|
502
523
|
/** @type {(o: {}, p: PropertyKey) => p is keyof o} */
|
|
503
|
-
var hasown = bind$
|
|
524
|
+
var hasown = bind$2.call(call, $hasOwn);
|
|
525
|
+
|
|
526
|
+
var undefined$2;
|
|
527
|
+
|
|
528
|
+
var $Error = esErrors;
|
|
529
|
+
var $EvalError = _eval;
|
|
530
|
+
var $RangeError = range;
|
|
531
|
+
var $ReferenceError = ref;
|
|
532
|
+
var $SyntaxError$2 = syntax;
|
|
533
|
+
var $TypeError$4 = type;
|
|
534
|
+
var $URIError = uri;
|
|
535
|
+
|
|
536
|
+
var $Function$1 = Function;
|
|
537
|
+
|
|
538
|
+
// eslint-disable-next-line consistent-return
|
|
539
|
+
var getEvalledConstructor$1 = function (expressionSyntax) {
|
|
540
|
+
try {
|
|
541
|
+
return $Function$1('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
542
|
+
} catch (e) {}
|
|
543
|
+
};
|
|
544
|
+
|
|
545
|
+
var $gOPD$2 = Object.getOwnPropertyDescriptor;
|
|
546
|
+
if ($gOPD$2) {
|
|
547
|
+
try {
|
|
548
|
+
$gOPD$2({}, '');
|
|
549
|
+
} catch (e) {
|
|
550
|
+
$gOPD$2 = null; // this is IE 8, which has a broken gOPD
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
var throwTypeError$1 = function () {
|
|
555
|
+
throw new $TypeError$4();
|
|
556
|
+
};
|
|
557
|
+
var ThrowTypeError$1 = $gOPD$2
|
|
558
|
+
? (function () {
|
|
559
|
+
try {
|
|
560
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
561
|
+
arguments.callee; // IE 8 does not throw here
|
|
562
|
+
return throwTypeError$1;
|
|
563
|
+
} catch (calleeThrows) {
|
|
564
|
+
try {
|
|
565
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
566
|
+
return $gOPD$2(arguments, 'callee').get;
|
|
567
|
+
} catch (gOPDthrows) {
|
|
568
|
+
return throwTypeError$1;
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}())
|
|
572
|
+
: throwTypeError$1;
|
|
573
|
+
|
|
574
|
+
var hasSymbols$1 = hasSymbols$2();
|
|
575
|
+
var hasProto$1 = hasProto$2();
|
|
576
|
+
|
|
577
|
+
var getProto$1 = Object.getPrototypeOf || (
|
|
578
|
+
hasProto$1
|
|
579
|
+
? function (x) { return x.__proto__; } // eslint-disable-line no-proto
|
|
580
|
+
: null
|
|
581
|
+
);
|
|
582
|
+
|
|
583
|
+
var needsEval$1 = {};
|
|
584
|
+
|
|
585
|
+
var TypedArray$1 = typeof Uint8Array === 'undefined' || !getProto$1 ? undefined$2 : getProto$1(Uint8Array);
|
|
586
|
+
|
|
587
|
+
var INTRINSICS$1 = {
|
|
588
|
+
__proto__: null,
|
|
589
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$2 : AggregateError,
|
|
590
|
+
'%Array%': Array,
|
|
591
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$2 : ArrayBuffer,
|
|
592
|
+
'%ArrayIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$2,
|
|
593
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$2,
|
|
594
|
+
'%AsyncFunction%': needsEval$1,
|
|
595
|
+
'%AsyncGenerator%': needsEval$1,
|
|
596
|
+
'%AsyncGeneratorFunction%': needsEval$1,
|
|
597
|
+
'%AsyncIteratorPrototype%': needsEval$1,
|
|
598
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$2 : Atomics,
|
|
599
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$2 : BigInt,
|
|
600
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$2 : BigInt64Array,
|
|
601
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$2 : BigUint64Array,
|
|
602
|
+
'%Boolean%': Boolean,
|
|
603
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$2 : DataView,
|
|
604
|
+
'%Date%': Date,
|
|
605
|
+
'%decodeURI%': decodeURI,
|
|
606
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
607
|
+
'%encodeURI%': encodeURI,
|
|
608
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
609
|
+
'%Error%': $Error,
|
|
610
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
611
|
+
'%EvalError%': $EvalError,
|
|
612
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$2 : Float32Array,
|
|
613
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$2 : Float64Array,
|
|
614
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$2 : FinalizationRegistry,
|
|
615
|
+
'%Function%': $Function$1,
|
|
616
|
+
'%GeneratorFunction%': needsEval$1,
|
|
617
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$2 : Int8Array,
|
|
618
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$2 : Int16Array,
|
|
619
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$2 : Int32Array,
|
|
620
|
+
'%isFinite%': isFinite,
|
|
621
|
+
'%isNaN%': isNaN,
|
|
622
|
+
'%IteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$2,
|
|
623
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined$2,
|
|
624
|
+
'%Map%': typeof Map === 'undefined' ? undefined$2 : Map,
|
|
625
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 || !getProto$1 ? undefined$2 : getProto$1(new Map()[Symbol.iterator]()),
|
|
626
|
+
'%Math%': Math,
|
|
627
|
+
'%Number%': Number,
|
|
628
|
+
'%Object%': Object,
|
|
629
|
+
'%parseFloat%': parseFloat,
|
|
630
|
+
'%parseInt%': parseInt,
|
|
631
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$2 : Promise,
|
|
632
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$2 : Proxy,
|
|
633
|
+
'%RangeError%': $RangeError,
|
|
634
|
+
'%ReferenceError%': $ReferenceError,
|
|
635
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$2 : Reflect,
|
|
636
|
+
'%RegExp%': RegExp,
|
|
637
|
+
'%Set%': typeof Set === 'undefined' ? undefined$2 : Set,
|
|
638
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 || !getProto$1 ? undefined$2 : getProto$1(new Set()[Symbol.iterator]()),
|
|
639
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$2 : SharedArrayBuffer,
|
|
640
|
+
'%String%': String,
|
|
641
|
+
'%StringIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$2,
|
|
642
|
+
'%Symbol%': hasSymbols$1 ? Symbol : undefined$2,
|
|
643
|
+
'%SyntaxError%': $SyntaxError$2,
|
|
644
|
+
'%ThrowTypeError%': ThrowTypeError$1,
|
|
645
|
+
'%TypedArray%': TypedArray$1,
|
|
646
|
+
'%TypeError%': $TypeError$4,
|
|
647
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$2 : Uint8Array,
|
|
648
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$2 : Uint8ClampedArray,
|
|
649
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$2 : Uint16Array,
|
|
650
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$2 : Uint32Array,
|
|
651
|
+
'%URIError%': $URIError,
|
|
652
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$2 : WeakMap,
|
|
653
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$2 : WeakRef,
|
|
654
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$2 : WeakSet
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
if (getProto$1) {
|
|
658
|
+
try {
|
|
659
|
+
null.error; // eslint-disable-line no-unused-expressions
|
|
660
|
+
} catch (e) {
|
|
661
|
+
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
662
|
+
var errorProto$1 = getProto$1(getProto$1(e));
|
|
663
|
+
INTRINSICS$1['%Error.prototype%'] = errorProto$1;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
var doEval$1 = function doEval(name) {
|
|
668
|
+
var value;
|
|
669
|
+
if (name === '%AsyncFunction%') {
|
|
670
|
+
value = getEvalledConstructor$1('async function () {}');
|
|
671
|
+
} else if (name === '%GeneratorFunction%') {
|
|
672
|
+
value = getEvalledConstructor$1('function* () {}');
|
|
673
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
674
|
+
value = getEvalledConstructor$1('async function* () {}');
|
|
675
|
+
} else if (name === '%AsyncGenerator%') {
|
|
676
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
677
|
+
if (fn) {
|
|
678
|
+
value = fn.prototype;
|
|
679
|
+
}
|
|
680
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
681
|
+
var gen = doEval('%AsyncGenerator%');
|
|
682
|
+
if (gen && getProto$1) {
|
|
683
|
+
value = getProto$1(gen.prototype);
|
|
684
|
+
}
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
INTRINSICS$1[name] = value;
|
|
688
|
+
|
|
689
|
+
return value;
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
var LEGACY_ALIASES$1 = {
|
|
693
|
+
__proto__: null,
|
|
694
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
695
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
696
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
697
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
698
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
699
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
700
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
701
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
702
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
703
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
704
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
705
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
706
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
707
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
708
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
709
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
710
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
711
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
712
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
713
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
714
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
715
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
716
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
717
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
718
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
719
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
720
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
721
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
722
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
723
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
724
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
725
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
726
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
727
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
728
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
729
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
730
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
731
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
732
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
733
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
734
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
735
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
736
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
737
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
738
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
739
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
740
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
741
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
742
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
743
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
744
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
745
|
+
};
|
|
746
|
+
|
|
747
|
+
var bind$1 = functionBind;
|
|
748
|
+
var hasOwn$2 = hasown;
|
|
749
|
+
var $concat$2 = bind$1.call(Function.call, Array.prototype.concat);
|
|
750
|
+
var $spliceApply$1 = bind$1.call(Function.apply, Array.prototype.splice);
|
|
751
|
+
var $replace$2 = bind$1.call(Function.call, String.prototype.replace);
|
|
752
|
+
var $strSlice$1 = bind$1.call(Function.call, String.prototype.slice);
|
|
753
|
+
var $exec$1 = bind$1.call(Function.call, RegExp.prototype.exec);
|
|
754
|
+
|
|
755
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
756
|
+
var rePropName$1 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
757
|
+
var reEscapeChar$1 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
758
|
+
var stringToPath$1 = function stringToPath(string) {
|
|
759
|
+
var first = $strSlice$1(string, 0, 1);
|
|
760
|
+
var last = $strSlice$1(string, -1);
|
|
761
|
+
if (first === '%' && last !== '%') {
|
|
762
|
+
throw new $SyntaxError$2('invalid intrinsic syntax, expected closing `%`');
|
|
763
|
+
} else if (last === '%' && first !== '%') {
|
|
764
|
+
throw new $SyntaxError$2('invalid intrinsic syntax, expected opening `%`');
|
|
765
|
+
}
|
|
766
|
+
var result = [];
|
|
767
|
+
$replace$2(string, rePropName$1, function (match, number, quote, subString) {
|
|
768
|
+
result[result.length] = quote ? $replace$2(subString, reEscapeChar$1, '$1') : number || match;
|
|
769
|
+
});
|
|
770
|
+
return result;
|
|
771
|
+
};
|
|
772
|
+
/* end adaptation */
|
|
773
|
+
|
|
774
|
+
var getBaseIntrinsic$1 = function getBaseIntrinsic(name, allowMissing) {
|
|
775
|
+
var intrinsicName = name;
|
|
776
|
+
var alias;
|
|
777
|
+
if (hasOwn$2(LEGACY_ALIASES$1, intrinsicName)) {
|
|
778
|
+
alias = LEGACY_ALIASES$1[intrinsicName];
|
|
779
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
if (hasOwn$2(INTRINSICS$1, intrinsicName)) {
|
|
783
|
+
var value = INTRINSICS$1[intrinsicName];
|
|
784
|
+
if (value === needsEval$1) {
|
|
785
|
+
value = doEval$1(intrinsicName);
|
|
786
|
+
}
|
|
787
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
788
|
+
throw new $TypeError$4('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
return {
|
|
792
|
+
alias: alias,
|
|
793
|
+
name: intrinsicName,
|
|
794
|
+
value: value
|
|
795
|
+
};
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
throw new $SyntaxError$2('intrinsic ' + name + ' does not exist!');
|
|
799
|
+
};
|
|
800
|
+
|
|
801
|
+
var getIntrinsic$2 = function GetIntrinsic(name, allowMissing) {
|
|
802
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
803
|
+
throw new $TypeError$4('intrinsic name must be a non-empty string');
|
|
804
|
+
}
|
|
805
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
806
|
+
throw new $TypeError$4('"allowMissing" argument must be a boolean');
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
if ($exec$1(/^%?[^%]*%?$/, name) === null) {
|
|
810
|
+
throw new $SyntaxError$2('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
811
|
+
}
|
|
812
|
+
var parts = stringToPath$1(name);
|
|
813
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
814
|
+
|
|
815
|
+
var intrinsic = getBaseIntrinsic$1('%' + intrinsicBaseName + '%', allowMissing);
|
|
816
|
+
var intrinsicRealName = intrinsic.name;
|
|
817
|
+
var value = intrinsic.value;
|
|
818
|
+
var skipFurtherCaching = false;
|
|
819
|
+
|
|
820
|
+
var alias = intrinsic.alias;
|
|
821
|
+
if (alias) {
|
|
822
|
+
intrinsicBaseName = alias[0];
|
|
823
|
+
$spliceApply$1(parts, $concat$2([0, 1], alias));
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
827
|
+
var part = parts[i];
|
|
828
|
+
var first = $strSlice$1(part, 0, 1);
|
|
829
|
+
var last = $strSlice$1(part, -1);
|
|
830
|
+
if (
|
|
831
|
+
(
|
|
832
|
+
(first === '"' || first === "'" || first === '`')
|
|
833
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
834
|
+
)
|
|
835
|
+
&& first !== last
|
|
836
|
+
) {
|
|
837
|
+
throw new $SyntaxError$2('property names with quotes must have matching quotes');
|
|
838
|
+
}
|
|
839
|
+
if (part === 'constructor' || !isOwn) {
|
|
840
|
+
skipFurtherCaching = true;
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
intrinsicBaseName += '.' + part;
|
|
844
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
845
|
+
|
|
846
|
+
if (hasOwn$2(INTRINSICS$1, intrinsicRealName)) {
|
|
847
|
+
value = INTRINSICS$1[intrinsicRealName];
|
|
848
|
+
} else if (value != null) {
|
|
849
|
+
if (!(part in value)) {
|
|
850
|
+
if (!allowMissing) {
|
|
851
|
+
throw new $TypeError$4('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
852
|
+
}
|
|
853
|
+
return void undefined$2;
|
|
854
|
+
}
|
|
855
|
+
if ($gOPD$2 && (i + 1) >= parts.length) {
|
|
856
|
+
var desc = $gOPD$2(value, part);
|
|
857
|
+
isOwn = !!desc;
|
|
858
|
+
|
|
859
|
+
// By convention, when a data property is converted to an accessor
|
|
860
|
+
// property to emulate a data property that does not suffer from
|
|
861
|
+
// the override mistake, that accessor's getter is marked with
|
|
862
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
863
|
+
// uphold the illusion by pretending to see that original data
|
|
864
|
+
// property, i.e., returning the value rather than the getter
|
|
865
|
+
// itself.
|
|
866
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
867
|
+
value = desc.get;
|
|
868
|
+
} else {
|
|
869
|
+
value = value[part];
|
|
870
|
+
}
|
|
871
|
+
} else {
|
|
872
|
+
isOwn = hasOwn$2(value, part);
|
|
873
|
+
value = value[part];
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
if (isOwn && !skipFurtherCaching) {
|
|
877
|
+
INTRINSICS$1[intrinsicRealName] = value;
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
return value;
|
|
882
|
+
};
|
|
883
|
+
|
|
884
|
+
var callBind$1 = {exports: {}};
|
|
885
|
+
|
|
886
|
+
var getIntrinsic$1;
|
|
887
|
+
var hasRequiredGetIntrinsic;
|
|
888
|
+
|
|
889
|
+
function requireGetIntrinsic () {
|
|
890
|
+
if (hasRequiredGetIntrinsic) return getIntrinsic$1;
|
|
891
|
+
hasRequiredGetIntrinsic = 1;
|
|
892
|
+
|
|
893
|
+
var undefined$1;
|
|
894
|
+
|
|
895
|
+
var $Error = esErrors;
|
|
896
|
+
var $EvalError = _eval;
|
|
897
|
+
var $RangeError = range;
|
|
898
|
+
var $ReferenceError = ref;
|
|
899
|
+
var $SyntaxError = syntax;
|
|
900
|
+
var $TypeError = type;
|
|
901
|
+
var $URIError = uri;
|
|
902
|
+
|
|
903
|
+
var $Function = Function;
|
|
904
|
+
|
|
905
|
+
// eslint-disable-next-line consistent-return
|
|
906
|
+
var getEvalledConstructor = function (expressionSyntax) {
|
|
907
|
+
try {
|
|
908
|
+
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
|
|
909
|
+
} catch (e) {}
|
|
910
|
+
};
|
|
911
|
+
|
|
912
|
+
var $gOPD = Object.getOwnPropertyDescriptor;
|
|
913
|
+
if ($gOPD) {
|
|
914
|
+
try {
|
|
915
|
+
$gOPD({}, '');
|
|
916
|
+
} catch (e) {
|
|
917
|
+
$gOPD = null; // this is IE 8, which has a broken gOPD
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
var throwTypeError = function () {
|
|
922
|
+
throw new $TypeError();
|
|
923
|
+
};
|
|
924
|
+
var ThrowTypeError = $gOPD
|
|
925
|
+
? (function () {
|
|
926
|
+
try {
|
|
927
|
+
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
|
|
928
|
+
arguments.callee; // IE 8 does not throw here
|
|
929
|
+
return throwTypeError;
|
|
930
|
+
} catch (calleeThrows) {
|
|
931
|
+
try {
|
|
932
|
+
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
|
|
933
|
+
return $gOPD(arguments, 'callee').get;
|
|
934
|
+
} catch (gOPDthrows) {
|
|
935
|
+
return throwTypeError;
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
}())
|
|
939
|
+
: throwTypeError;
|
|
940
|
+
|
|
941
|
+
var hasSymbols = hasSymbols$2();
|
|
942
|
+
var hasProto = hasProto$2();
|
|
943
|
+
|
|
944
|
+
var getProto = Object.getPrototypeOf || (
|
|
945
|
+
hasProto
|
|
946
|
+
? function (x) { return x.__proto__; } // eslint-disable-line no-proto
|
|
947
|
+
: null
|
|
948
|
+
);
|
|
949
|
+
|
|
950
|
+
var needsEval = {};
|
|
951
|
+
|
|
952
|
+
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
953
|
+
|
|
954
|
+
var INTRINSICS = {
|
|
955
|
+
__proto__: null,
|
|
956
|
+
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
|
|
957
|
+
'%Array%': Array,
|
|
958
|
+
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
|
|
959
|
+
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
|
|
960
|
+
'%AsyncFromSyncIteratorPrototype%': undefined$1,
|
|
961
|
+
'%AsyncFunction%': needsEval,
|
|
962
|
+
'%AsyncGenerator%': needsEval,
|
|
963
|
+
'%AsyncGeneratorFunction%': needsEval,
|
|
964
|
+
'%AsyncIteratorPrototype%': needsEval,
|
|
965
|
+
'%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
|
|
966
|
+
'%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
|
|
967
|
+
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
|
|
968
|
+
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
|
|
969
|
+
'%Boolean%': Boolean,
|
|
970
|
+
'%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
|
|
971
|
+
'%Date%': Date,
|
|
972
|
+
'%decodeURI%': decodeURI,
|
|
973
|
+
'%decodeURIComponent%': decodeURIComponent,
|
|
974
|
+
'%encodeURI%': encodeURI,
|
|
975
|
+
'%encodeURIComponent%': encodeURIComponent,
|
|
976
|
+
'%Error%': $Error,
|
|
977
|
+
'%eval%': eval, // eslint-disable-line no-eval
|
|
978
|
+
'%EvalError%': $EvalError,
|
|
979
|
+
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
|
|
980
|
+
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
|
|
981
|
+
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
|
|
982
|
+
'%Function%': $Function,
|
|
983
|
+
'%GeneratorFunction%': needsEval,
|
|
984
|
+
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
|
|
985
|
+
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
|
|
986
|
+
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
|
|
987
|
+
'%isFinite%': isFinite,
|
|
988
|
+
'%isNaN%': isNaN,
|
|
989
|
+
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
|
|
990
|
+
'%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
|
|
991
|
+
'%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
|
|
992
|
+
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
|
|
993
|
+
'%Math%': Math,
|
|
994
|
+
'%Number%': Number,
|
|
995
|
+
'%Object%': Object,
|
|
996
|
+
'%parseFloat%': parseFloat,
|
|
997
|
+
'%parseInt%': parseInt,
|
|
998
|
+
'%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
|
|
999
|
+
'%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
|
|
1000
|
+
'%RangeError%': $RangeError,
|
|
1001
|
+
'%ReferenceError%': $ReferenceError,
|
|
1002
|
+
'%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
|
|
1003
|
+
'%RegExp%': RegExp,
|
|
1004
|
+
'%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
|
|
1005
|
+
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
|
|
1006
|
+
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
|
|
1007
|
+
'%String%': String,
|
|
1008
|
+
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
|
|
1009
|
+
'%Symbol%': hasSymbols ? Symbol : undefined$1,
|
|
1010
|
+
'%SyntaxError%': $SyntaxError,
|
|
1011
|
+
'%ThrowTypeError%': ThrowTypeError,
|
|
1012
|
+
'%TypedArray%': TypedArray,
|
|
1013
|
+
'%TypeError%': $TypeError,
|
|
1014
|
+
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
|
|
1015
|
+
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
|
|
1016
|
+
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
|
|
1017
|
+
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
|
|
1018
|
+
'%URIError%': $URIError,
|
|
1019
|
+
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
|
|
1020
|
+
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
|
|
1021
|
+
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
|
|
1022
|
+
};
|
|
1023
|
+
|
|
1024
|
+
if (getProto) {
|
|
1025
|
+
try {
|
|
1026
|
+
null.error; // eslint-disable-line no-unused-expressions
|
|
1027
|
+
} catch (e) {
|
|
1028
|
+
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
|
|
1029
|
+
var errorProto = getProto(getProto(e));
|
|
1030
|
+
INTRINSICS['%Error.prototype%'] = errorProto;
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
|
|
1034
|
+
var doEval = function doEval(name) {
|
|
1035
|
+
var value;
|
|
1036
|
+
if (name === '%AsyncFunction%') {
|
|
1037
|
+
value = getEvalledConstructor('async function () {}');
|
|
1038
|
+
} else if (name === '%GeneratorFunction%') {
|
|
1039
|
+
value = getEvalledConstructor('function* () {}');
|
|
1040
|
+
} else if (name === '%AsyncGeneratorFunction%') {
|
|
1041
|
+
value = getEvalledConstructor('async function* () {}');
|
|
1042
|
+
} else if (name === '%AsyncGenerator%') {
|
|
1043
|
+
var fn = doEval('%AsyncGeneratorFunction%');
|
|
1044
|
+
if (fn) {
|
|
1045
|
+
value = fn.prototype;
|
|
1046
|
+
}
|
|
1047
|
+
} else if (name === '%AsyncIteratorPrototype%') {
|
|
1048
|
+
var gen = doEval('%AsyncGenerator%');
|
|
1049
|
+
if (gen && getProto) {
|
|
1050
|
+
value = getProto(gen.prototype);
|
|
1051
|
+
}
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
INTRINSICS[name] = value;
|
|
1055
|
+
|
|
1056
|
+
return value;
|
|
1057
|
+
};
|
|
1058
|
+
|
|
1059
|
+
var LEGACY_ALIASES = {
|
|
1060
|
+
__proto__: null,
|
|
1061
|
+
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
|
|
1062
|
+
'%ArrayPrototype%': ['Array', 'prototype'],
|
|
1063
|
+
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
|
|
1064
|
+
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
|
|
1065
|
+
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
|
|
1066
|
+
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
|
|
1067
|
+
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
|
|
1068
|
+
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
|
|
1069
|
+
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
|
|
1070
|
+
'%BooleanPrototype%': ['Boolean', 'prototype'],
|
|
1071
|
+
'%DataViewPrototype%': ['DataView', 'prototype'],
|
|
1072
|
+
'%DatePrototype%': ['Date', 'prototype'],
|
|
1073
|
+
'%ErrorPrototype%': ['Error', 'prototype'],
|
|
1074
|
+
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
|
|
1075
|
+
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
|
|
1076
|
+
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
|
|
1077
|
+
'%FunctionPrototype%': ['Function', 'prototype'],
|
|
1078
|
+
'%Generator%': ['GeneratorFunction', 'prototype'],
|
|
1079
|
+
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
|
|
1080
|
+
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
|
|
1081
|
+
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
|
|
1082
|
+
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
|
|
1083
|
+
'%JSONParse%': ['JSON', 'parse'],
|
|
1084
|
+
'%JSONStringify%': ['JSON', 'stringify'],
|
|
1085
|
+
'%MapPrototype%': ['Map', 'prototype'],
|
|
1086
|
+
'%NumberPrototype%': ['Number', 'prototype'],
|
|
1087
|
+
'%ObjectPrototype%': ['Object', 'prototype'],
|
|
1088
|
+
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
|
|
1089
|
+
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
|
|
1090
|
+
'%PromisePrototype%': ['Promise', 'prototype'],
|
|
1091
|
+
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
|
|
1092
|
+
'%Promise_all%': ['Promise', 'all'],
|
|
1093
|
+
'%Promise_reject%': ['Promise', 'reject'],
|
|
1094
|
+
'%Promise_resolve%': ['Promise', 'resolve'],
|
|
1095
|
+
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
|
|
1096
|
+
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
|
|
1097
|
+
'%RegExpPrototype%': ['RegExp', 'prototype'],
|
|
1098
|
+
'%SetPrototype%': ['Set', 'prototype'],
|
|
1099
|
+
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
|
|
1100
|
+
'%StringPrototype%': ['String', 'prototype'],
|
|
1101
|
+
'%SymbolPrototype%': ['Symbol', 'prototype'],
|
|
1102
|
+
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
|
|
1103
|
+
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
|
|
1104
|
+
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
|
|
1105
|
+
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
|
|
1106
|
+
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
|
|
1107
|
+
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
|
|
1108
|
+
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
|
|
1109
|
+
'%URIErrorPrototype%': ['URIError', 'prototype'],
|
|
1110
|
+
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
|
|
1111
|
+
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
1112
|
+
};
|
|
1113
|
+
|
|
1114
|
+
var bind = functionBind;
|
|
1115
|
+
var hasOwn = hasown;
|
|
1116
|
+
var $concat = bind.call(Function.call, Array.prototype.concat);
|
|
1117
|
+
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
|
|
1118
|
+
var $replace = bind.call(Function.call, String.prototype.replace);
|
|
1119
|
+
var $strSlice = bind.call(Function.call, String.prototype.slice);
|
|
1120
|
+
var $exec = bind.call(Function.call, RegExp.prototype.exec);
|
|
1121
|
+
|
|
1122
|
+
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
1123
|
+
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
1124
|
+
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
|
|
1125
|
+
var stringToPath = function stringToPath(string) {
|
|
1126
|
+
var first = $strSlice(string, 0, 1);
|
|
1127
|
+
var last = $strSlice(string, -1);
|
|
1128
|
+
if (first === '%' && last !== '%') {
|
|
1129
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
|
|
1130
|
+
} else if (last === '%' && first !== '%') {
|
|
1131
|
+
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
|
|
1132
|
+
}
|
|
1133
|
+
var result = [];
|
|
1134
|
+
$replace(string, rePropName, function (match, number, quote, subString) {
|
|
1135
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
|
|
1136
|
+
});
|
|
1137
|
+
return result;
|
|
1138
|
+
};
|
|
1139
|
+
/* end adaptation */
|
|
1140
|
+
|
|
1141
|
+
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
|
|
1142
|
+
var intrinsicName = name;
|
|
1143
|
+
var alias;
|
|
1144
|
+
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
|
|
1145
|
+
alias = LEGACY_ALIASES[intrinsicName];
|
|
1146
|
+
intrinsicName = '%' + alias[0] + '%';
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
if (hasOwn(INTRINSICS, intrinsicName)) {
|
|
1150
|
+
var value = INTRINSICS[intrinsicName];
|
|
1151
|
+
if (value === needsEval) {
|
|
1152
|
+
value = doEval(intrinsicName);
|
|
1153
|
+
}
|
|
1154
|
+
if (typeof value === 'undefined' && !allowMissing) {
|
|
1155
|
+
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
return {
|
|
1159
|
+
alias: alias,
|
|
1160
|
+
name: intrinsicName,
|
|
1161
|
+
value: value
|
|
1162
|
+
};
|
|
1163
|
+
}
|
|
1164
|
+
|
|
1165
|
+
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
|
|
1166
|
+
};
|
|
1167
|
+
|
|
1168
|
+
getIntrinsic$1 = function GetIntrinsic(name, allowMissing) {
|
|
1169
|
+
if (typeof name !== 'string' || name.length === 0) {
|
|
1170
|
+
throw new $TypeError('intrinsic name must be a non-empty string');
|
|
1171
|
+
}
|
|
1172
|
+
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
|
|
1173
|
+
throw new $TypeError('"allowMissing" argument must be a boolean');
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
if ($exec(/^%?[^%]*%?$/, name) === null) {
|
|
1177
|
+
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
|
|
1178
|
+
}
|
|
1179
|
+
var parts = stringToPath(name);
|
|
1180
|
+
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
|
|
1181
|
+
|
|
1182
|
+
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
|
|
1183
|
+
var intrinsicRealName = intrinsic.name;
|
|
1184
|
+
var value = intrinsic.value;
|
|
1185
|
+
var skipFurtherCaching = false;
|
|
1186
|
+
|
|
1187
|
+
var alias = intrinsic.alias;
|
|
1188
|
+
if (alias) {
|
|
1189
|
+
intrinsicBaseName = alias[0];
|
|
1190
|
+
$spliceApply(parts, $concat([0, 1], alias));
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
|
|
1194
|
+
var part = parts[i];
|
|
1195
|
+
var first = $strSlice(part, 0, 1);
|
|
1196
|
+
var last = $strSlice(part, -1);
|
|
1197
|
+
if (
|
|
1198
|
+
(
|
|
1199
|
+
(first === '"' || first === "'" || first === '`')
|
|
1200
|
+
|| (last === '"' || last === "'" || last === '`')
|
|
1201
|
+
)
|
|
1202
|
+
&& first !== last
|
|
1203
|
+
) {
|
|
1204
|
+
throw new $SyntaxError('property names with quotes must have matching quotes');
|
|
1205
|
+
}
|
|
1206
|
+
if (part === 'constructor' || !isOwn) {
|
|
1207
|
+
skipFurtherCaching = true;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
intrinsicBaseName += '.' + part;
|
|
1211
|
+
intrinsicRealName = '%' + intrinsicBaseName + '%';
|
|
1212
|
+
|
|
1213
|
+
if (hasOwn(INTRINSICS, intrinsicRealName)) {
|
|
1214
|
+
value = INTRINSICS[intrinsicRealName];
|
|
1215
|
+
} else if (value != null) {
|
|
1216
|
+
if (!(part in value)) {
|
|
1217
|
+
if (!allowMissing) {
|
|
1218
|
+
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
|
|
1219
|
+
}
|
|
1220
|
+
return void undefined$1;
|
|
1221
|
+
}
|
|
1222
|
+
if ($gOPD && (i + 1) >= parts.length) {
|
|
1223
|
+
var desc = $gOPD(value, part);
|
|
1224
|
+
isOwn = !!desc;
|
|
1225
|
+
|
|
1226
|
+
// By convention, when a data property is converted to an accessor
|
|
1227
|
+
// property to emulate a data property that does not suffer from
|
|
1228
|
+
// the override mistake, that accessor's getter is marked with
|
|
1229
|
+
// an `originalValue` property. Here, when we detect this, we
|
|
1230
|
+
// uphold the illusion by pretending to see that original data
|
|
1231
|
+
// property, i.e., returning the value rather than the getter
|
|
1232
|
+
// itself.
|
|
1233
|
+
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
|
|
1234
|
+
value = desc.get;
|
|
1235
|
+
} else {
|
|
1236
|
+
value = value[part];
|
|
1237
|
+
}
|
|
1238
|
+
} else {
|
|
1239
|
+
isOwn = hasOwn(value, part);
|
|
1240
|
+
value = value[part];
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
if (isOwn && !skipFurtherCaching) {
|
|
1244
|
+
INTRINSICS[intrinsicRealName] = value;
|
|
1245
|
+
}
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1248
|
+
return value;
|
|
1249
|
+
};
|
|
1250
|
+
return getIntrinsic$1;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
var esDefineProperty;
|
|
1254
|
+
var hasRequiredEsDefineProperty;
|
|
1255
|
+
|
|
1256
|
+
function requireEsDefineProperty () {
|
|
1257
|
+
if (hasRequiredEsDefineProperty) return esDefineProperty;
|
|
1258
|
+
hasRequiredEsDefineProperty = 1;
|
|
1259
|
+
|
|
1260
|
+
var GetIntrinsic = requireGetIntrinsic();
|
|
1261
|
+
|
|
1262
|
+
/** @type {import('.')} */
|
|
1263
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
|
|
1264
|
+
if ($defineProperty) {
|
|
1265
|
+
try {
|
|
1266
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
1267
|
+
} catch (e) {
|
|
1268
|
+
// IE 8 has a broken defineProperty
|
|
1269
|
+
$defineProperty = false;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
esDefineProperty = $defineProperty;
|
|
1274
|
+
return esDefineProperty;
|
|
1275
|
+
}
|
|
504
1276
|
|
|
505
1277
|
var undefined$1;
|
|
506
1278
|
|
|
@@ -544,8 +1316,8 @@ var ThrowTypeError = $gOPD$1
|
|
|
544
1316
|
}())
|
|
545
1317
|
: throwTypeError;
|
|
546
1318
|
|
|
547
|
-
var hasSymbols = hasSymbols$
|
|
548
|
-
var hasProto = hasProto$
|
|
1319
|
+
var hasSymbols = hasSymbols$2();
|
|
1320
|
+
var hasProto = hasProto$2();
|
|
549
1321
|
|
|
550
1322
|
var getProto = Object.getPrototypeOf || (
|
|
551
1323
|
hasProto
|
|
@@ -852,43 +1624,9 @@ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
|
|
|
852
1624
|
return value;
|
|
853
1625
|
};
|
|
854
1626
|
|
|
855
|
-
var
|
|
856
|
-
|
|
857
|
-
var GetIntrinsic$5 = getIntrinsic;
|
|
858
|
-
|
|
859
|
-
var $defineProperty$1 = GetIntrinsic$5('%Object.defineProperty%', true);
|
|
860
|
-
|
|
861
|
-
var hasPropertyDescriptors$1 = function hasPropertyDescriptors() {
|
|
862
|
-
if ($defineProperty$1) {
|
|
863
|
-
try {
|
|
864
|
-
$defineProperty$1({}, 'a', { value: 1 });
|
|
865
|
-
return true;
|
|
866
|
-
} catch (e) {
|
|
867
|
-
// IE 8 has a broken defineProperty
|
|
868
|
-
return false;
|
|
869
|
-
}
|
|
870
|
-
}
|
|
871
|
-
return false;
|
|
872
|
-
};
|
|
873
|
-
|
|
874
|
-
hasPropertyDescriptors$1.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
875
|
-
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
876
|
-
if (!hasPropertyDescriptors$1()) {
|
|
877
|
-
return null;
|
|
878
|
-
}
|
|
879
|
-
try {
|
|
880
|
-
return $defineProperty$1([], 'length', { value: 1 }).length !== 1;
|
|
881
|
-
} catch (e) {
|
|
882
|
-
// In Firefox 4-22, defining length on an array throws an exception.
|
|
883
|
-
return true;
|
|
884
|
-
}
|
|
885
|
-
};
|
|
886
|
-
|
|
887
|
-
var hasPropertyDescriptors_1 = hasPropertyDescriptors$1;
|
|
888
|
-
|
|
889
|
-
var GetIntrinsic$4 = getIntrinsic;
|
|
1627
|
+
var GetIntrinsic$3 = getIntrinsic;
|
|
890
1628
|
|
|
891
|
-
var $gOPD = GetIntrinsic$
|
|
1629
|
+
var $gOPD = GetIntrinsic$3('%Object.getOwnPropertyDescriptor%', true);
|
|
892
1630
|
|
|
893
1631
|
if ($gOPD) {
|
|
894
1632
|
try {
|
|
@@ -901,26 +1639,14 @@ if ($gOPD) {
|
|
|
901
1639
|
|
|
902
1640
|
var gopd$1 = $gOPD;
|
|
903
1641
|
|
|
904
|
-
var
|
|
905
|
-
|
|
906
|
-
var GetIntrinsic$3 = getIntrinsic;
|
|
907
|
-
|
|
908
|
-
var $defineProperty = hasPropertyDescriptors && GetIntrinsic$3('%Object.defineProperty%', true);
|
|
909
|
-
if ($defineProperty) {
|
|
910
|
-
try {
|
|
911
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
912
|
-
} catch (e) {
|
|
913
|
-
// IE 8 has a broken defineProperty
|
|
914
|
-
$defineProperty = false;
|
|
915
|
-
}
|
|
916
|
-
}
|
|
1642
|
+
var $defineProperty$1 = requireEsDefineProperty();
|
|
917
1643
|
|
|
918
|
-
var $SyntaxError =
|
|
919
|
-
var $TypeError$2 =
|
|
1644
|
+
var $SyntaxError = syntax;
|
|
1645
|
+
var $TypeError$2 = type;
|
|
920
1646
|
|
|
921
1647
|
var gopd = gopd$1;
|
|
922
1648
|
|
|
923
|
-
/** @type {(
|
|
1649
|
+
/** @type {import('.')} */
|
|
924
1650
|
var defineDataProperty = function defineDataProperty(
|
|
925
1651
|
obj,
|
|
926
1652
|
property,
|
|
@@ -953,8 +1679,8 @@ var defineDataProperty = function defineDataProperty(
|
|
|
953
1679
|
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
|
954
1680
|
var desc = !!gopd && gopd(obj, property);
|
|
955
1681
|
|
|
956
|
-
if ($defineProperty) {
|
|
957
|
-
$defineProperty(obj, property, {
|
|
1682
|
+
if ($defineProperty$1) {
|
|
1683
|
+
$defineProperty$1(obj, property, {
|
|
958
1684
|
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
|
959
1685
|
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
|
960
1686
|
value: value,
|
|
@@ -968,14 +1694,38 @@ var defineDataProperty = function defineDataProperty(
|
|
|
968
1694
|
}
|
|
969
1695
|
};
|
|
970
1696
|
|
|
971
|
-
var
|
|
1697
|
+
var $defineProperty = requireEsDefineProperty();
|
|
1698
|
+
|
|
1699
|
+
var hasPropertyDescriptors = function hasPropertyDescriptors() {
|
|
1700
|
+
return !!$defineProperty;
|
|
1701
|
+
};
|
|
1702
|
+
|
|
1703
|
+
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
|
|
1704
|
+
// node v0.6 has a bug where array lengths can be Set but not Defined
|
|
1705
|
+
if (!$defineProperty) {
|
|
1706
|
+
return null;
|
|
1707
|
+
}
|
|
1708
|
+
try {
|
|
1709
|
+
return $defineProperty([], 'length', { value: 1 }).length !== 1;
|
|
1710
|
+
} catch (e) {
|
|
1711
|
+
// In Firefox 4-22, defining length on an array throws an exception.
|
|
1712
|
+
return true;
|
|
1713
|
+
}
|
|
1714
|
+
};
|
|
1715
|
+
|
|
1716
|
+
var hasPropertyDescriptors_1 = hasPropertyDescriptors;
|
|
1717
|
+
|
|
1718
|
+
var GetIntrinsic$2 = getIntrinsic$2;
|
|
972
1719
|
var define = defineDataProperty;
|
|
973
1720
|
var hasDescriptors = hasPropertyDescriptors_1();
|
|
974
1721
|
var gOPD = gopd$1;
|
|
975
1722
|
|
|
976
|
-
var $TypeError$1 =
|
|
1723
|
+
var $TypeError$1 = type;
|
|
977
1724
|
var $floor$1 = GetIntrinsic$2('%Math.floor%');
|
|
978
1725
|
|
|
1726
|
+
/** @typedef {(...args: unknown[]) => unknown} Func */
|
|
1727
|
+
|
|
1728
|
+
/** @type {<T extends Func = Func>(fn: T, length: number, loose?: boolean) => T} */
|
|
979
1729
|
var setFunctionLength = function setFunctionLength(fn, length) {
|
|
980
1730
|
if (typeof fn !== 'function') {
|
|
981
1731
|
throw new $TypeError$1('`fn` is not a function');
|
|
@@ -1000,9 +1750,9 @@ var setFunctionLength = function setFunctionLength(fn, length) {
|
|
|
1000
1750
|
|
|
1001
1751
|
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
|
|
1002
1752
|
if (hasDescriptors) {
|
|
1003
|
-
define(fn, 'length', length, true, true);
|
|
1753
|
+
define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
|
|
1004
1754
|
} else {
|
|
1005
|
-
define(fn, 'length', length);
|
|
1755
|
+
define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
|
|
1006
1756
|
}
|
|
1007
1757
|
}
|
|
1008
1758
|
return fn;
|
|
@@ -1013,26 +1763,17 @@ callBind$1.exports;
|
|
|
1013
1763
|
(function (module) {
|
|
1014
1764
|
|
|
1015
1765
|
var bind = functionBind;
|
|
1016
|
-
var GetIntrinsic = getIntrinsic;
|
|
1766
|
+
var GetIntrinsic = getIntrinsic$2;
|
|
1017
1767
|
var setFunctionLength$1 = setFunctionLength;
|
|
1018
1768
|
|
|
1019
|
-
var $TypeError =
|
|
1769
|
+
var $TypeError = type;
|
|
1020
1770
|
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
1021
1771
|
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
1022
1772
|
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
1023
1773
|
|
|
1024
|
-
var $defineProperty =
|
|
1774
|
+
var $defineProperty = requireEsDefineProperty();
|
|
1025
1775
|
var $max = GetIntrinsic('%Math.max%');
|
|
1026
1776
|
|
|
1027
|
-
if ($defineProperty) {
|
|
1028
|
-
try {
|
|
1029
|
-
$defineProperty({}, 'a', { value: 1 });
|
|
1030
|
-
} catch (e) {
|
|
1031
|
-
// IE 8 has a broken defineProperty
|
|
1032
|
-
$defineProperty = null;
|
|
1033
|
-
}
|
|
1034
|
-
}
|
|
1035
|
-
|
|
1036
1777
|
module.exports = function callBind(originalFunction) {
|
|
1037
1778
|
if (typeof originalFunction !== 'function') {
|
|
1038
1779
|
throw new $TypeError('a function is required');
|
|
@@ -1058,7 +1799,7 @@ callBind$1.exports;
|
|
|
1058
1799
|
|
|
1059
1800
|
var callBindExports = callBind$1.exports;
|
|
1060
1801
|
|
|
1061
|
-
var GetIntrinsic$1 = getIntrinsic;
|
|
1802
|
+
var GetIntrinsic$1 = getIntrinsic$2;
|
|
1062
1803
|
|
|
1063
1804
|
var callBind = callBindExports;
|
|
1064
1805
|
|
|
@@ -1599,11 +2340,11 @@ function arrObjKeys(obj, inspect) {
|
|
|
1599
2340
|
return xs;
|
|
1600
2341
|
}
|
|
1601
2342
|
|
|
1602
|
-
var GetIntrinsic = getIntrinsic;
|
|
2343
|
+
var GetIntrinsic = getIntrinsic$2;
|
|
1603
2344
|
var callBound = callBound$1;
|
|
1604
2345
|
var inspect = objectInspect;
|
|
1605
2346
|
|
|
1606
|
-
var $TypeError =
|
|
2347
|
+
var $TypeError = type;
|
|
1607
2348
|
var $WeakMap = GetIntrinsic('%WeakMap%', true);
|
|
1608
2349
|
var $Map = GetIntrinsic('%Map%', true);
|
|
1609
2350
|
|
|
@@ -1615,49 +2356,58 @@ var $mapSet = callBound('Map.prototype.set', true);
|
|
|
1615
2356
|
var $mapHas = callBound('Map.prototype.has', true);
|
|
1616
2357
|
|
|
1617
2358
|
/*
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
* used nodes can be accessed relatively quickly.
|
|
1624
|
-
*/
|
|
2359
|
+
* This function traverses the list returning the node corresponding to the given key.
|
|
2360
|
+
*
|
|
2361
|
+
* 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. By doing so, all the recently used nodes can be accessed relatively quickly.
|
|
2362
|
+
*/
|
|
2363
|
+
/** @type {import('.').listGetNode} */
|
|
1625
2364
|
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
|
|
1626
|
-
|
|
2365
|
+
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
|
|
2366
|
+
var prev = list;
|
|
2367
|
+
/** @type {(typeof list)['next']} */
|
|
2368
|
+
var curr;
|
|
2369
|
+
for (; (curr = prev.next) !== null; prev = curr) {
|
|
1627
2370
|
if (curr.key === key) {
|
|
1628
2371
|
prev.next = curr.next;
|
|
1629
|
-
|
|
2372
|
+
// eslint-disable-next-line no-extra-parens
|
|
2373
|
+
curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
|
|
1630
2374
|
list.next = curr; // eslint-disable-line no-param-reassign
|
|
1631
2375
|
return curr;
|
|
1632
2376
|
}
|
|
1633
2377
|
}
|
|
1634
2378
|
};
|
|
1635
2379
|
|
|
2380
|
+
/** @type {import('.').listGet} */
|
|
1636
2381
|
var listGet = function (objects, key) {
|
|
1637
2382
|
var node = listGetNode(objects, key);
|
|
1638
2383
|
return node && node.value;
|
|
1639
2384
|
};
|
|
2385
|
+
/** @type {import('.').listSet} */
|
|
1640
2386
|
var listSet = function (objects, key, value) {
|
|
1641
2387
|
var node = listGetNode(objects, key);
|
|
1642
2388
|
if (node) {
|
|
1643
2389
|
node.value = value;
|
|
1644
2390
|
} else {
|
|
1645
2391
|
// Prepend the new node to the beginning of the list
|
|
1646
|
-
objects.next = { // eslint-disable-line no-param-reassign
|
|
2392
|
+
objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
|
|
1647
2393
|
key: key,
|
|
1648
2394
|
next: objects.next,
|
|
1649
2395
|
value: value
|
|
1650
|
-
};
|
|
2396
|
+
});
|
|
1651
2397
|
}
|
|
1652
2398
|
};
|
|
2399
|
+
/** @type {import('.').listHas} */
|
|
1653
2400
|
var listHas = function (objects, key) {
|
|
1654
2401
|
return !!listGetNode(objects, key);
|
|
1655
2402
|
};
|
|
1656
2403
|
|
|
2404
|
+
/** @type {import('.')} */
|
|
1657
2405
|
var sideChannel = function getSideChannel() {
|
|
1658
|
-
var $wm;
|
|
1659
|
-
var $m;
|
|
1660
|
-
var $o;
|
|
2406
|
+
/** @type {WeakMap<object, unknown>} */ var $wm;
|
|
2407
|
+
/** @type {Map<object, unknown>} */ var $m;
|
|
2408
|
+
/** @type {import('.').RootNode<unknown>} */ var $o;
|
|
2409
|
+
|
|
2410
|
+
/** @type {import('.').Channel} */
|
|
1661
2411
|
var channel = {
|
|
1662
2412
|
assert: function (key) {
|
|
1663
2413
|
if (!channel.has(key)) {
|
|
@@ -1708,11 +2458,7 @@ var sideChannel = function getSideChannel() {
|
|
|
1708
2458
|
$mapSet($m, key, value);
|
|
1709
2459
|
} else {
|
|
1710
2460
|
if (!$o) {
|
|
1711
|
-
|
|
1712
|
-
* Initialize the linked list as an empty node, so that we don't have
|
|
1713
|
-
* to special-case handling of the first node: we can always refer to
|
|
1714
|
-
* it as (previous node).next, instead of something like (list).head
|
|
1715
|
-
*/
|
|
2461
|
+
// 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
|
|
1716
2462
|
$o = { key: {}, next: null };
|
|
1717
2463
|
}
|
|
1718
2464
|
listSet($o, key, value);
|
|
@@ -2025,10 +2771,13 @@ var defaultFormat = formats$1['default'];
|
|
|
2025
2771
|
var defaults$2 = {
|
|
2026
2772
|
addQueryPrefix: false,
|
|
2027
2773
|
allowDots: false,
|
|
2774
|
+
allowEmptyArrays: false,
|
|
2775
|
+
arrayFormat: 'indices',
|
|
2028
2776
|
charset: 'utf-8',
|
|
2029
2777
|
charsetSentinel: false,
|
|
2030
2778
|
delimiter: '&',
|
|
2031
2779
|
encode: true,
|
|
2780
|
+
encodeDotInKeys: false,
|
|
2032
2781
|
encoder: utils$n.encode,
|
|
2033
2782
|
encodeValuesOnly: false,
|
|
2034
2783
|
format: defaultFormat,
|
|
@@ -2057,8 +2806,10 @@ var stringify$6 = function stringify(
|
|
|
2057
2806
|
prefix,
|
|
2058
2807
|
generateArrayPrefix,
|
|
2059
2808
|
commaRoundTrip,
|
|
2809
|
+
allowEmptyArrays,
|
|
2060
2810
|
strictNullHandling,
|
|
2061
2811
|
skipNulls,
|
|
2812
|
+
encodeDotInKeys,
|
|
2062
2813
|
encoder,
|
|
2063
2814
|
filter,
|
|
2064
2815
|
sort,
|
|
@@ -2140,7 +2891,13 @@ var stringify$6 = function stringify(
|
|
|
2140
2891
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
2141
2892
|
}
|
|
2142
2893
|
|
|
2143
|
-
var
|
|
2894
|
+
var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
|
|
2895
|
+
|
|
2896
|
+
var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
|
|
2897
|
+
|
|
2898
|
+
if (allowEmptyArrays && isArray$1(obj) && obj.length === 0) {
|
|
2899
|
+
return adjustedPrefix + '[]';
|
|
2900
|
+
}
|
|
2144
2901
|
|
|
2145
2902
|
for (var j = 0; j < objKeys.length; ++j) {
|
|
2146
2903
|
var key = objKeys[j];
|
|
@@ -2150,9 +2907,10 @@ var stringify$6 = function stringify(
|
|
|
2150
2907
|
continue;
|
|
2151
2908
|
}
|
|
2152
2909
|
|
|
2910
|
+
var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
|
|
2153
2911
|
var keyPrefix = isArray$1(obj)
|
|
2154
|
-
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix,
|
|
2155
|
-
: adjustedPrefix + (allowDots ? '.' +
|
|
2912
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
|
|
2913
|
+
: adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
|
|
2156
2914
|
|
|
2157
2915
|
sideChannel.set(object, step);
|
|
2158
2916
|
var valueSideChannel = getSideChannel();
|
|
@@ -2162,8 +2920,10 @@ var stringify$6 = function stringify(
|
|
|
2162
2920
|
keyPrefix,
|
|
2163
2921
|
generateArrayPrefix,
|
|
2164
2922
|
commaRoundTrip,
|
|
2923
|
+
allowEmptyArrays,
|
|
2165
2924
|
strictNullHandling,
|
|
2166
2925
|
skipNulls,
|
|
2926
|
+
encodeDotInKeys,
|
|
2167
2927
|
generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
|
|
2168
2928
|
filter,
|
|
2169
2929
|
sort,
|
|
@@ -2185,6 +2945,14 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
|
2185
2945
|
return defaults$2;
|
|
2186
2946
|
}
|
|
2187
2947
|
|
|
2948
|
+
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
|
|
2949
|
+
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2952
|
+
if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {
|
|
2953
|
+
throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2188
2956
|
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
|
|
2189
2957
|
throw new TypeError('Encoder has to be a function.');
|
|
2190
2958
|
}
|
|
@@ -2208,13 +2976,32 @@ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
|
|
|
2208
2976
|
filter = opts.filter;
|
|
2209
2977
|
}
|
|
2210
2978
|
|
|
2979
|
+
var arrayFormat;
|
|
2980
|
+
if (opts.arrayFormat in arrayPrefixGenerators) {
|
|
2981
|
+
arrayFormat = opts.arrayFormat;
|
|
2982
|
+
} else if ('indices' in opts) {
|
|
2983
|
+
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
2984
|
+
} else {
|
|
2985
|
+
arrayFormat = defaults$2.arrayFormat;
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
2989
|
+
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults$2.allowDots : !!opts.allowDots;
|
|
2993
|
+
|
|
2211
2994
|
return {
|
|
2212
2995
|
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$2.addQueryPrefix,
|
|
2213
|
-
allowDots:
|
|
2996
|
+
allowDots: allowDots,
|
|
2997
|
+
allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults$2.allowEmptyArrays,
|
|
2998
|
+
arrayFormat: arrayFormat,
|
|
2214
2999
|
charset: charset,
|
|
2215
3000
|
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$2.charsetSentinel,
|
|
3001
|
+
commaRoundTrip: opts.commaRoundTrip,
|
|
2216
3002
|
delimiter: typeof opts.delimiter === 'undefined' ? defaults$2.delimiter : opts.delimiter,
|
|
2217
3003
|
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$2.encode,
|
|
3004
|
+
encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults$2.encodeDotInKeys,
|
|
2218
3005
|
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$2.encoder,
|
|
2219
3006
|
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$2.encodeValuesOnly,
|
|
2220
3007
|
filter: filter,
|
|
@@ -2248,20 +3035,8 @@ var stringify_1 = function (object, opts) {
|
|
|
2248
3035
|
return '';
|
|
2249
3036
|
}
|
|
2250
3037
|
|
|
2251
|
-
var arrayFormat;
|
|
2252
|
-
|
|
2253
|
-
arrayFormat = opts.arrayFormat;
|
|
2254
|
-
} else if (opts && 'indices' in opts) {
|
|
2255
|
-
arrayFormat = opts.indices ? 'indices' : 'repeat';
|
|
2256
|
-
} else {
|
|
2257
|
-
arrayFormat = 'indices';
|
|
2258
|
-
}
|
|
2259
|
-
|
|
2260
|
-
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
2261
|
-
if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
2262
|
-
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
2263
|
-
}
|
|
2264
|
-
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
3038
|
+
var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
|
|
3039
|
+
var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;
|
|
2265
3040
|
|
|
2266
3041
|
if (!objKeys) {
|
|
2267
3042
|
objKeys = Object.keys(obj);
|
|
@@ -2283,8 +3058,10 @@ var stringify_1 = function (object, opts) {
|
|
|
2283
3058
|
key,
|
|
2284
3059
|
generateArrayPrefix,
|
|
2285
3060
|
commaRoundTrip,
|
|
3061
|
+
options.allowEmptyArrays,
|
|
2286
3062
|
options.strictNullHandling,
|
|
2287
3063
|
options.skipNulls,
|
|
3064
|
+
options.encodeDotInKeys,
|
|
2288
3065
|
options.encode ? options.encoder : null,
|
|
2289
3066
|
options.filter,
|
|
2290
3067
|
options.sort,
|
|
@@ -2321,15 +3098,18 @@ var isArray = Array.isArray;
|
|
|
2321
3098
|
|
|
2322
3099
|
var defaults$1 = {
|
|
2323
3100
|
allowDots: false,
|
|
3101
|
+
allowEmptyArrays: false,
|
|
2324
3102
|
allowPrototypes: false,
|
|
2325
3103
|
allowSparse: false,
|
|
2326
3104
|
arrayLimit: 20,
|
|
2327
3105
|
charset: 'utf-8',
|
|
2328
3106
|
charsetSentinel: false,
|
|
2329
3107
|
comma: false,
|
|
3108
|
+
decodeDotInKeys: true,
|
|
2330
3109
|
decoder: utils$m.decode,
|
|
2331
3110
|
delimiter: '&',
|
|
2332
3111
|
depth: 5,
|
|
3112
|
+
duplicates: 'combine',
|
|
2333
3113
|
ignoreQueryPrefix: false,
|
|
2334
3114
|
interpretNumericEntities: false,
|
|
2335
3115
|
parameterLimit: 1000,
|
|
@@ -2417,9 +3197,10 @@ var parseValues = function parseQueryStringValues(str, options) {
|
|
|
2417
3197
|
val = isArray(val) ? [val] : val;
|
|
2418
3198
|
}
|
|
2419
3199
|
|
|
2420
|
-
|
|
3200
|
+
var existing = has.call(obj, key);
|
|
3201
|
+
if (existing && options.duplicates === 'combine') {
|
|
2421
3202
|
obj[key] = utils$m.combine(obj[key], val);
|
|
2422
|
-
} else {
|
|
3203
|
+
} else if (!existing || options.duplicates === 'last') {
|
|
2423
3204
|
obj[key] = val;
|
|
2424
3205
|
}
|
|
2425
3206
|
}
|
|
@@ -2435,24 +3216,25 @@ var parseObject = function (chain, val, options, valuesParsed) {
|
|
|
2435
3216
|
var root = chain[i];
|
|
2436
3217
|
|
|
2437
3218
|
if (root === '[]' && options.parseArrays) {
|
|
2438
|
-
obj = [].concat(leaf);
|
|
3219
|
+
obj = options.allowEmptyArrays && leaf === '' ? [] : [].concat(leaf);
|
|
2439
3220
|
} else {
|
|
2440
3221
|
obj = options.plainObjects ? Object.create(null) : {};
|
|
2441
3222
|
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
|
|
2442
|
-
var
|
|
2443
|
-
|
|
3223
|
+
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
|
|
3224
|
+
var index = parseInt(decodedRoot, 10);
|
|
3225
|
+
if (!options.parseArrays && decodedRoot === '') {
|
|
2444
3226
|
obj = { 0: leaf };
|
|
2445
3227
|
} else if (
|
|
2446
3228
|
!isNaN(index)
|
|
2447
|
-
&& root !==
|
|
2448
|
-
&& String(index) ===
|
|
3229
|
+
&& root !== decodedRoot
|
|
3230
|
+
&& String(index) === decodedRoot
|
|
2449
3231
|
&& index >= 0
|
|
2450
3232
|
&& (options.parseArrays && index <= options.arrayLimit)
|
|
2451
3233
|
) {
|
|
2452
3234
|
obj = [];
|
|
2453
3235
|
obj[index] = leaf;
|
|
2454
|
-
} else if (
|
|
2455
|
-
obj[
|
|
3236
|
+
} else if (decodedRoot !== '__proto__') {
|
|
3237
|
+
obj[decodedRoot] = leaf;
|
|
2456
3238
|
}
|
|
2457
3239
|
}
|
|
2458
3240
|
|
|
@@ -2521,7 +3303,15 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
2521
3303
|
return defaults$1;
|
|
2522
3304
|
}
|
|
2523
3305
|
|
|
2524
|
-
if (
|
|
3306
|
+
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
|
|
3307
|
+
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
|
|
3308
|
+
}
|
|
3309
|
+
|
|
3310
|
+
if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
|
|
3311
|
+
throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');
|
|
3312
|
+
}
|
|
3313
|
+
|
|
3314
|
+
if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {
|
|
2525
3315
|
throw new TypeError('Decoder has to be a function.');
|
|
2526
3316
|
}
|
|
2527
3317
|
|
|
@@ -2530,18 +3320,29 @@ var normalizeParseOptions = function normalizeParseOptions(opts) {
|
|
|
2530
3320
|
}
|
|
2531
3321
|
var charset = typeof opts.charset === 'undefined' ? defaults$1.charset : opts.charset;
|
|
2532
3322
|
|
|
3323
|
+
var duplicates = typeof opts.duplicates === 'undefined' ? defaults$1.duplicates : opts.duplicates;
|
|
3324
|
+
|
|
3325
|
+
if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
|
|
3326
|
+
throw new TypeError('The duplicates option must be either combine, first, or last');
|
|
3327
|
+
}
|
|
3328
|
+
|
|
3329
|
+
var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults$1.allowDots : !!opts.allowDots;
|
|
3330
|
+
|
|
2533
3331
|
return {
|
|
2534
|
-
allowDots:
|
|
3332
|
+
allowDots: allowDots,
|
|
3333
|
+
allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults$1.allowEmptyArrays,
|
|
2535
3334
|
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults$1.allowPrototypes,
|
|
2536
3335
|
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults$1.allowSparse,
|
|
2537
3336
|
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults$1.arrayLimit,
|
|
2538
3337
|
charset: charset,
|
|
2539
3338
|
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
|
|
2540
3339
|
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults$1.comma,
|
|
3340
|
+
decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults$1.decodeDotInKeys,
|
|
2541
3341
|
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults$1.decoder,
|
|
2542
3342
|
delimiter: typeof opts.delimiter === 'string' || utils$m.isRegExp(opts.delimiter) ? opts.delimiter : defaults$1.delimiter,
|
|
2543
3343
|
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
|
|
2544
3344
|
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults$1.depth,
|
|
3345
|
+
duplicates: duplicates,
|
|
2545
3346
|
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
|
|
2546
3347
|
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults$1.interpretNumericEntities,
|
|
2547
3348
|
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults$1.parameterLimit,
|
|
@@ -3557,12 +4358,12 @@ var hasRequiredHasFlag;
|
|
|
3557
4358
|
function requireHasFlag () {
|
|
3558
4359
|
if (hasRequiredHasFlag) return hasFlag;
|
|
3559
4360
|
hasRequiredHasFlag = 1;
|
|
3560
|
-
|
|
3561
|
-
|
|
4361
|
+
hasFlag = (flag, argv) => {
|
|
4362
|
+
argv = argv || process.argv;
|
|
3562
4363
|
const prefix = flag.startsWith('-') ? '' : (flag.length === 1 ? '-' : '--');
|
|
3563
|
-
const
|
|
3564
|
-
const
|
|
3565
|
-
return
|
|
4364
|
+
const pos = argv.indexOf(prefix + flag);
|
|
4365
|
+
const terminatorPos = argv.indexOf('--');
|
|
4366
|
+
return pos !== -1 && (terminatorPos === -1 ? true : pos < terminatorPos);
|
|
3566
4367
|
};
|
|
3567
4368
|
return hasFlag;
|
|
3568
4369
|
}
|
|
@@ -3574,32 +4375,23 @@ function requireSupportsColor () {
|
|
|
3574
4375
|
if (hasRequiredSupportsColor) return supportsColor_1;
|
|
3575
4376
|
hasRequiredSupportsColor = 1;
|
|
3576
4377
|
const os = require$$0$3;
|
|
3577
|
-
const tty = require$$1$1;
|
|
3578
4378
|
const hasFlag = requireHasFlag();
|
|
3579
4379
|
|
|
3580
|
-
const
|
|
4380
|
+
const env = process.env;
|
|
3581
4381
|
|
|
3582
4382
|
let forceColor;
|
|
3583
4383
|
if (hasFlag('no-color') ||
|
|
3584
4384
|
hasFlag('no-colors') ||
|
|
3585
|
-
hasFlag('color=false')
|
|
3586
|
-
|
|
3587
|
-
forceColor = 0;
|
|
4385
|
+
hasFlag('color=false')) {
|
|
4386
|
+
forceColor = false;
|
|
3588
4387
|
} else if (hasFlag('color') ||
|
|
3589
4388
|
hasFlag('colors') ||
|
|
3590
4389
|
hasFlag('color=true') ||
|
|
3591
4390
|
hasFlag('color=always')) {
|
|
3592
|
-
forceColor =
|
|
4391
|
+
forceColor = true;
|
|
3593
4392
|
}
|
|
3594
|
-
|
|
3595
4393
|
if ('FORCE_COLOR' in env) {
|
|
3596
|
-
|
|
3597
|
-
forceColor = 1;
|
|
3598
|
-
} else if (env.FORCE_COLOR === 'false') {
|
|
3599
|
-
forceColor = 0;
|
|
3600
|
-
} else {
|
|
3601
|
-
forceColor = env.FORCE_COLOR.length === 0 ? 1 : Math.min(parseInt(env.FORCE_COLOR, 10), 3);
|
|
3602
|
-
}
|
|
4394
|
+
forceColor = env.FORCE_COLOR.length === 0 || parseInt(env.FORCE_COLOR, 10) !== 0;
|
|
3603
4395
|
}
|
|
3604
4396
|
|
|
3605
4397
|
function translateLevel(level) {
|
|
@@ -3615,8 +4407,8 @@ function requireSupportsColor () {
|
|
|
3615
4407
|
};
|
|
3616
4408
|
}
|
|
3617
4409
|
|
|
3618
|
-
function supportsColor(
|
|
3619
|
-
if (forceColor ===
|
|
4410
|
+
function supportsColor(stream) {
|
|
4411
|
+
if (forceColor === false) {
|
|
3620
4412
|
return 0;
|
|
3621
4413
|
}
|
|
3622
4414
|
|
|
@@ -3630,21 +4422,22 @@ function requireSupportsColor () {
|
|
|
3630
4422
|
return 2;
|
|
3631
4423
|
}
|
|
3632
4424
|
|
|
3633
|
-
if (
|
|
4425
|
+
if (stream && !stream.isTTY && forceColor !== true) {
|
|
3634
4426
|
return 0;
|
|
3635
4427
|
}
|
|
3636
4428
|
|
|
3637
|
-
const min = forceColor
|
|
3638
|
-
|
|
3639
|
-
if (env.TERM === 'dumb') {
|
|
3640
|
-
return min;
|
|
3641
|
-
}
|
|
4429
|
+
const min = forceColor ? 1 : 0;
|
|
3642
4430
|
|
|
3643
4431
|
if (process.platform === 'win32') {
|
|
3644
|
-
//
|
|
3645
|
-
//
|
|
4432
|
+
// Node.js 7.5.0 is the first version of Node.js to include a patch to
|
|
4433
|
+
// libuv that enables 256 color output on Windows. Anything earlier and it
|
|
4434
|
+
// won't work. However, here we target Node.js 8 at minimum as it is an LTS
|
|
4435
|
+
// release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
|
|
4436
|
+
// release that supports 256 colors. Windows 10 build 14931 is the first release
|
|
4437
|
+
// that supports 16m/TrueColor.
|
|
3646
4438
|
const osRelease = os.release().split('.');
|
|
3647
4439
|
if (
|
|
4440
|
+
Number(process.versions.node.split('.')[0]) >= 8 &&
|
|
3648
4441
|
Number(osRelease[0]) >= 10 &&
|
|
3649
4442
|
Number(osRelease[2]) >= 10586
|
|
3650
4443
|
) {
|
|
@@ -3655,7 +4448,7 @@ function requireSupportsColor () {
|
|
|
3655
4448
|
}
|
|
3656
4449
|
|
|
3657
4450
|
if ('CI' in env) {
|
|
3658
|
-
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'
|
|
4451
|
+
if (['TRAVIS', 'CIRCLECI', 'APPVEYOR', 'GITLAB_CI'].some(sign => sign in env) || env.CI_NAME === 'codeship') {
|
|
3659
4452
|
return 1;
|
|
3660
4453
|
}
|
|
3661
4454
|
|
|
@@ -3694,18 +4487,22 @@ function requireSupportsColor () {
|
|
|
3694
4487
|
return 1;
|
|
3695
4488
|
}
|
|
3696
4489
|
|
|
4490
|
+
if (env.TERM === 'dumb') {
|
|
4491
|
+
return min;
|
|
4492
|
+
}
|
|
4493
|
+
|
|
3697
4494
|
return min;
|
|
3698
4495
|
}
|
|
3699
4496
|
|
|
3700
4497
|
function getSupportLevel(stream) {
|
|
3701
|
-
const level = supportsColor(stream
|
|
4498
|
+
const level = supportsColor(stream);
|
|
3702
4499
|
return translateLevel(level);
|
|
3703
4500
|
}
|
|
3704
4501
|
|
|
3705
4502
|
supportsColor_1 = {
|
|
3706
4503
|
supportsColor: getSupportLevel,
|
|
3707
|
-
stdout:
|
|
3708
|
-
stderr:
|
|
4504
|
+
stdout: getSupportLevel(process.stdout),
|
|
4505
|
+
stderr: getSupportLevel(process.stderr)
|
|
3709
4506
|
};
|
|
3710
4507
|
return supportsColor_1;
|
|
3711
4508
|
}
|
|
@@ -3721,7 +4518,7 @@ function requireNode () {
|
|
|
3721
4518
|
if (hasRequiredNode) return node.exports;
|
|
3722
4519
|
hasRequiredNode = 1;
|
|
3723
4520
|
(function (module, exports) {
|
|
3724
|
-
const tty = require$$
|
|
4521
|
+
const tty = require$$0$4;
|
|
3725
4522
|
const util = require$$0$2;
|
|
3726
4523
|
|
|
3727
4524
|
/**
|
|
@@ -11329,7 +12126,7 @@ class Reader$1 {
|
|
|
11329
12126
|
reader$1.default = Reader$1;
|
|
11330
12127
|
|
|
11331
12128
|
Object.defineProperty(async$4, "__esModule", { value: true });
|
|
11332
|
-
const events_1 = require$$0$
|
|
12129
|
+
const events_1 = require$$0$5;
|
|
11333
12130
|
const fsScandir$2 = out$2;
|
|
11334
12131
|
const fastq = queueExports;
|
|
11335
12132
|
const common$2 = common$4;
|
|
@@ -14045,8 +14842,9 @@ const MEMBER_FORM_SELECTORS = {
|
|
|
14045
14842
|
|
|
14046
14843
|
class TeamMembers {
|
|
14047
14844
|
constructor({ page, neetoPlaywrightUtilities, }) {
|
|
14048
|
-
this.navigateToTeamMembersSublink = async (sublink = "all") => {
|
|
14049
|
-
|
|
14845
|
+
this.navigateToTeamMembersSublink = async ({ clickMembersTab = true, sublink = "all", } = {}) => {
|
|
14846
|
+
clickMembersTab &&
|
|
14847
|
+
(await this.page.getByTestId(MEMBER_SELECTORS.membersTab).click());
|
|
14050
14848
|
await this.page
|
|
14051
14849
|
.getByTestId(MEMBER_SELECTORS.menubarSubLink(sublink))
|
|
14052
14850
|
.click();
|
|
@@ -14058,12 +14856,14 @@ class TeamMembers {
|
|
|
14058
14856
|
.getByTestId(MEMBER_FORM_SELECTORS.emailTextField)
|
|
14059
14857
|
.fill(emails.join(", "));
|
|
14060
14858
|
await this.page.getByTestId(MEMBER_SELECTORS.roleLabel(role)).click();
|
|
14061
|
-
|
|
14062
|
-
|
|
14859
|
+
await this.page.getByTestId(MEMBER_SELECTORS.continueButton).click();
|
|
14860
|
+
if (IS_STAGING_ENV) {
|
|
14861
|
+
await this.page
|
|
14063
14862
|
.getByTestId(COMMON_SELECTORS.paneBody)
|
|
14064
14863
|
.getByTestId(COMMON_SELECTORS.checkboxLabel)
|
|
14065
|
-
.click()
|
|
14066
|
-
|
|
14864
|
+
.click();
|
|
14865
|
+
await this.page.getByTestId(MEMBER_SELECTORS.continueButton).click();
|
|
14866
|
+
}
|
|
14067
14867
|
await this.page.getByTestId(MEMBER_SELECTORS.submitButton).click();
|
|
14068
14868
|
await this.neetoPlaywrightUtilities.waitForPageLoad();
|
|
14069
14869
|
await this.neetoPlaywrightUtilities.verifySuccessToast();
|
|
@@ -14159,7 +14959,9 @@ class TeamMembers {
|
|
|
14159
14959
|
.click();
|
|
14160
14960
|
};
|
|
14161
14961
|
// TODO: Change the selector after this issue is resolved: https://github.com/bigbinary/neeto-team-members-nano/issues/258
|
|
14162
|
-
this.getMemberRowByName = (name) => this.page.getByRole("row", {
|
|
14962
|
+
this.getMemberRowByName = (name) => this.page.getByRole("row", {
|
|
14963
|
+
name: IS_STAGING_ENV ? name : `avatar--${name}`,
|
|
14964
|
+
});
|
|
14163
14965
|
this.takeActionOnMembers = async ({ names = [], state, action, }) => {
|
|
14164
14966
|
if (isPresent(names)) {
|
|
14165
14967
|
for (const name of names) {
|
|
@@ -94244,7 +95046,7 @@ var require$$1 = [
|
|
|
94244
95046
|
]
|
|
94245
95047
|
];
|
|
94246
95048
|
|
|
94247
|
-
var punycode = require$$0$
|
|
95049
|
+
var punycode = require$$0$6;
|
|
94248
95050
|
var mappingTable = require$$1;
|
|
94249
95051
|
|
|
94250
95052
|
var PROCESSING_OPTIONS = {
|
|
@@ -94439,7 +95241,7 @@ tr46.PROCESSING_OPTIONS = PROCESSING_OPTIONS;
|
|
|
94439
95241
|
urlStateMachine.exports;
|
|
94440
95242
|
|
|
94441
95243
|
(function (module) {
|
|
94442
|
-
const punycode = require$$0$
|
|
95244
|
+
const punycode = require$$0$6;
|
|
94443
95245
|
const tr46$1 = tr46;
|
|
94444
95246
|
|
|
94445
95247
|
const specialSchemes = {
|
|
@@ -102995,7 +103797,7 @@ const emptyBitmap = {
|
|
|
102995
103797
|
* @param {function(Error, Jimp)} cb (optional) a function to call when the image is parsed to a bitmap
|
|
102996
103798
|
*/
|
|
102997
103799
|
|
|
102998
|
-
class Jimp$1 extends require$$0$
|
|
103800
|
+
class Jimp$1 extends require$$0$5 {
|
|
102999
103801
|
// An object representing a bitmap in memory, comprising:
|
|
103000
103802
|
// - data: a buffer of the bitmap data
|
|
103001
103803
|
// - width: the width of the image in pixels
|
|
@@ -108532,7 +109334,7 @@ syncInflate.exports;
|
|
|
108532
109334
|
|
|
108533
109335
|
(function (module, exports) {
|
|
108534
109336
|
|
|
108535
|
-
let assert = require$$0$
|
|
109337
|
+
let assert = require$$0$7.ok;
|
|
108536
109338
|
let zlib = zlib$5;
|
|
108537
109339
|
let util = require$$0$2;
|
|
108538
109340
|
|
|
@@ -129668,7 +130470,7 @@ function requireSax () {
|
|
|
129668
130470
|
typeof Buffer.isBuffer === 'function' &&
|
|
129669
130471
|
Buffer.isBuffer(data)) {
|
|
129670
130472
|
if (!this._decoder) {
|
|
129671
|
-
var SD = require$$1$
|
|
130473
|
+
var SD = require$$1$1.StringDecoder;
|
|
129672
130474
|
this._decoder = new SD('utf8');
|
|
129673
130475
|
}
|
|
129674
130476
|
data = this._decoder.write(data);
|
|
@@ -131090,7 +131892,7 @@ function requireParser () {
|
|
|
131090
131892
|
|
|
131091
131893
|
sax = requireSax();
|
|
131092
131894
|
|
|
131093
|
-
events = require$$0$
|
|
131895
|
+
events = require$$0$5;
|
|
131094
131896
|
|
|
131095
131897
|
bom = requireBom();
|
|
131096
131898
|
|