@allthings/sdk 7.0.1 → 7.2.0-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -21,7 +21,7 @@ function createTokenStore(initialToken) {
21
21
  };
22
22
  }
23
23
 
24
- const version = "7.0.1";
24
+ const version = "7.2.0-dev.0";
25
25
 
26
26
  const REST_API_URL = 'https://api.allthings.me';
27
27
  const OAUTH_URL = 'https://accounts.allthings.me';
@@ -194,7 +194,7 @@ async function del(request, method, body, returnRawResultObject, headers) {
194
194
  return request('delete', method, { body, headers }, returnRawResultObject);
195
195
  }
196
196
 
197
- async function get(request, method, query, returnRawResultObject, headers) {
197
+ async function get$1(request, method, query, returnRawResultObject, headers) {
198
198
  return request('get', method, { headers, query }, returnRawResultObject);
199
199
  }
200
200
 
@@ -484,7 +484,10 @@ async function getGroups(client, page = 1, limit = -1, filter = {}) {
484
484
  }
485
485
 
486
486
  async function lookupIds(client, appId, data) {
487
- return client.post(`/v1/id-lookup/${appId}/${data.resource}`, Object.assign(Object.assign({ externalIds: typeof data.externalIds === 'string'
487
+ const url = data.dataSource
488
+ ? `/v1/id-lookup/${appId}/${data.resource}/${data.dataSource}`
489
+ : `/v1/id-lookup/${appId}/${data.resource}`;
490
+ return client.post(url, Object.assign(Object.assign({ externalIds: typeof data.externalIds === 'string'
488
491
  ? [data.externalIds]
489
492
  : data.externalIds }, (data.parentId ? { parentId: data.parentId } : {})), (data.userType ? { userType: data.userType } : {})));
490
493
  }
@@ -12572,6 +12575,1081 @@ function requireAsynckit () {
12572
12575
  return asynckit;
12573
12576
  }
12574
12577
 
12578
+ var esObjectAtoms;
12579
+ var hasRequiredEsObjectAtoms;
12580
+
12581
+ function requireEsObjectAtoms () {
12582
+ if (hasRequiredEsObjectAtoms) return esObjectAtoms;
12583
+ hasRequiredEsObjectAtoms = 1;
12584
+
12585
+ /** @type {import('.')} */
12586
+ esObjectAtoms = Object;
12587
+ return esObjectAtoms;
12588
+ }
12589
+
12590
+ var esErrors;
12591
+ var hasRequiredEsErrors;
12592
+
12593
+ function requireEsErrors () {
12594
+ if (hasRequiredEsErrors) return esErrors;
12595
+ hasRequiredEsErrors = 1;
12596
+
12597
+ /** @type {import('.')} */
12598
+ esErrors = Error;
12599
+ return esErrors;
12600
+ }
12601
+
12602
+ var _eval;
12603
+ var hasRequired_eval;
12604
+
12605
+ function require_eval () {
12606
+ if (hasRequired_eval) return _eval;
12607
+ hasRequired_eval = 1;
12608
+
12609
+ /** @type {import('./eval')} */
12610
+ _eval = EvalError;
12611
+ return _eval;
12612
+ }
12613
+
12614
+ var range;
12615
+ var hasRequiredRange;
12616
+
12617
+ function requireRange () {
12618
+ if (hasRequiredRange) return range;
12619
+ hasRequiredRange = 1;
12620
+
12621
+ /** @type {import('./range')} */
12622
+ range = RangeError;
12623
+ return range;
12624
+ }
12625
+
12626
+ var ref;
12627
+ var hasRequiredRef;
12628
+
12629
+ function requireRef () {
12630
+ if (hasRequiredRef) return ref;
12631
+ hasRequiredRef = 1;
12632
+
12633
+ /** @type {import('./ref')} */
12634
+ ref = ReferenceError;
12635
+ return ref;
12636
+ }
12637
+
12638
+ var syntax;
12639
+ var hasRequiredSyntax;
12640
+
12641
+ function requireSyntax () {
12642
+ if (hasRequiredSyntax) return syntax;
12643
+ hasRequiredSyntax = 1;
12644
+
12645
+ /** @type {import('./syntax')} */
12646
+ syntax = SyntaxError;
12647
+ return syntax;
12648
+ }
12649
+
12650
+ var type;
12651
+ var hasRequiredType;
12652
+
12653
+ function requireType () {
12654
+ if (hasRequiredType) return type;
12655
+ hasRequiredType = 1;
12656
+
12657
+ /** @type {import('./type')} */
12658
+ type = TypeError;
12659
+ return type;
12660
+ }
12661
+
12662
+ var uri;
12663
+ var hasRequiredUri;
12664
+
12665
+ function requireUri () {
12666
+ if (hasRequiredUri) return uri;
12667
+ hasRequiredUri = 1;
12668
+
12669
+ /** @type {import('./uri')} */
12670
+ uri = URIError;
12671
+ return uri;
12672
+ }
12673
+
12674
+ var abs;
12675
+ var hasRequiredAbs;
12676
+
12677
+ function requireAbs () {
12678
+ if (hasRequiredAbs) return abs;
12679
+ hasRequiredAbs = 1;
12680
+
12681
+ /** @type {import('./abs')} */
12682
+ abs = Math.abs;
12683
+ return abs;
12684
+ }
12685
+
12686
+ var floor;
12687
+ var hasRequiredFloor;
12688
+
12689
+ function requireFloor () {
12690
+ if (hasRequiredFloor) return floor;
12691
+ hasRequiredFloor = 1;
12692
+
12693
+ /** @type {import('./floor')} */
12694
+ floor = Math.floor;
12695
+ return floor;
12696
+ }
12697
+
12698
+ var max;
12699
+ var hasRequiredMax;
12700
+
12701
+ function requireMax () {
12702
+ if (hasRequiredMax) return max;
12703
+ hasRequiredMax = 1;
12704
+
12705
+ /** @type {import('./max')} */
12706
+ max = Math.max;
12707
+ return max;
12708
+ }
12709
+
12710
+ var min;
12711
+ var hasRequiredMin;
12712
+
12713
+ function requireMin () {
12714
+ if (hasRequiredMin) return min;
12715
+ hasRequiredMin = 1;
12716
+
12717
+ /** @type {import('./min')} */
12718
+ min = Math.min;
12719
+ return min;
12720
+ }
12721
+
12722
+ var pow;
12723
+ var hasRequiredPow;
12724
+
12725
+ function requirePow () {
12726
+ if (hasRequiredPow) return pow;
12727
+ hasRequiredPow = 1;
12728
+
12729
+ /** @type {import('./pow')} */
12730
+ pow = Math.pow;
12731
+ return pow;
12732
+ }
12733
+
12734
+ var round;
12735
+ var hasRequiredRound;
12736
+
12737
+ function requireRound () {
12738
+ if (hasRequiredRound) return round;
12739
+ hasRequiredRound = 1;
12740
+
12741
+ /** @type {import('./round')} */
12742
+ round = Math.round;
12743
+ return round;
12744
+ }
12745
+
12746
+ var _isNaN;
12747
+ var hasRequired_isNaN;
12748
+
12749
+ function require_isNaN () {
12750
+ if (hasRequired_isNaN) return _isNaN;
12751
+ hasRequired_isNaN = 1;
12752
+
12753
+ /** @type {import('./isNaN')} */
12754
+ _isNaN = Number.isNaN || function isNaN(a) {
12755
+ return a !== a;
12756
+ };
12757
+ return _isNaN;
12758
+ }
12759
+
12760
+ var sign;
12761
+ var hasRequiredSign;
12762
+
12763
+ function requireSign () {
12764
+ if (hasRequiredSign) return sign;
12765
+ hasRequiredSign = 1;
12766
+
12767
+ var $isNaN = /*@__PURE__*/ require_isNaN();
12768
+
12769
+ /** @type {import('./sign')} */
12770
+ sign = function sign(number) {
12771
+ if ($isNaN(number) || number === 0) {
12772
+ return number;
12773
+ }
12774
+ return number < 0 ? -1 : 1;
12775
+ };
12776
+ return sign;
12777
+ }
12778
+
12779
+ var gOPD;
12780
+ var hasRequiredGOPD;
12781
+
12782
+ function requireGOPD () {
12783
+ if (hasRequiredGOPD) return gOPD;
12784
+ hasRequiredGOPD = 1;
12785
+
12786
+ /** @type {import('./gOPD')} */
12787
+ gOPD = Object.getOwnPropertyDescriptor;
12788
+ return gOPD;
12789
+ }
12790
+
12791
+ var gopd;
12792
+ var hasRequiredGopd;
12793
+
12794
+ function requireGopd () {
12795
+ if (hasRequiredGopd) return gopd;
12796
+ hasRequiredGopd = 1;
12797
+
12798
+ /** @type {import('.')} */
12799
+ var $gOPD = /*@__PURE__*/ requireGOPD();
12800
+
12801
+ if ($gOPD) {
12802
+ try {
12803
+ $gOPD([], 'length');
12804
+ } catch (e) {
12805
+ // IE 8 has a broken gOPD
12806
+ $gOPD = null;
12807
+ }
12808
+ }
12809
+
12810
+ gopd = $gOPD;
12811
+ return gopd;
12812
+ }
12813
+
12814
+ var esDefineProperty;
12815
+ var hasRequiredEsDefineProperty;
12816
+
12817
+ function requireEsDefineProperty () {
12818
+ if (hasRequiredEsDefineProperty) return esDefineProperty;
12819
+ hasRequiredEsDefineProperty = 1;
12820
+
12821
+ /** @type {import('.')} */
12822
+ var $defineProperty = Object.defineProperty || false;
12823
+ if ($defineProperty) {
12824
+ try {
12825
+ $defineProperty({}, 'a', { value: 1 });
12826
+ } catch (e) {
12827
+ // IE 8 has a broken defineProperty
12828
+ $defineProperty = false;
12829
+ }
12830
+ }
12831
+
12832
+ esDefineProperty = $defineProperty;
12833
+ return esDefineProperty;
12834
+ }
12835
+
12836
+ var shams$1;
12837
+ var hasRequiredShams$1;
12838
+
12839
+ function requireShams$1 () {
12840
+ if (hasRequiredShams$1) return shams$1;
12841
+ hasRequiredShams$1 = 1;
12842
+
12843
+ /** @type {import('./shams')} */
12844
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
12845
+ shams$1 = function hasSymbols() {
12846
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
12847
+ if (typeof Symbol.iterator === 'symbol') { return true; }
12848
+
12849
+ /** @type {{ [k in symbol]?: unknown }} */
12850
+ var obj = {};
12851
+ var sym = Symbol('test');
12852
+ var symObj = Object(sym);
12853
+ if (typeof sym === 'string') { return false; }
12854
+
12855
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
12856
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
12857
+
12858
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
12859
+ // if (sym instanceof Symbol) { return false; }
12860
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
12861
+ // if (!(symObj instanceof Symbol)) { return false; }
12862
+
12863
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
12864
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
12865
+
12866
+ var symVal = 42;
12867
+ obj[sym] = symVal;
12868
+ for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
12869
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
12870
+
12871
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
12872
+
12873
+ var syms = Object.getOwnPropertySymbols(obj);
12874
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
12875
+
12876
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
12877
+
12878
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
12879
+ // eslint-disable-next-line no-extra-parens
12880
+ var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
12881
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
12882
+ }
12883
+
12884
+ return true;
12885
+ };
12886
+ return shams$1;
12887
+ }
12888
+
12889
+ var hasSymbols;
12890
+ var hasRequiredHasSymbols;
12891
+
12892
+ function requireHasSymbols () {
12893
+ if (hasRequiredHasSymbols) return hasSymbols;
12894
+ hasRequiredHasSymbols = 1;
12895
+
12896
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
12897
+ var hasSymbolSham = requireShams$1();
12898
+
12899
+ /** @type {import('.')} */
12900
+ hasSymbols = function hasNativeSymbols() {
12901
+ if (typeof origSymbol !== 'function') { return false; }
12902
+ if (typeof Symbol !== 'function') { return false; }
12903
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
12904
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
12905
+
12906
+ return hasSymbolSham();
12907
+ };
12908
+ return hasSymbols;
12909
+ }
12910
+
12911
+ var Reflect_getPrototypeOf;
12912
+ var hasRequiredReflect_getPrototypeOf;
12913
+
12914
+ function requireReflect_getPrototypeOf () {
12915
+ if (hasRequiredReflect_getPrototypeOf) return Reflect_getPrototypeOf;
12916
+ hasRequiredReflect_getPrototypeOf = 1;
12917
+
12918
+ /** @type {import('./Reflect.getPrototypeOf')} */
12919
+ Reflect_getPrototypeOf = (typeof Reflect !== 'undefined' && Reflect.getPrototypeOf) || null;
12920
+ return Reflect_getPrototypeOf;
12921
+ }
12922
+
12923
+ var Object_getPrototypeOf;
12924
+ var hasRequiredObject_getPrototypeOf;
12925
+
12926
+ function requireObject_getPrototypeOf () {
12927
+ if (hasRequiredObject_getPrototypeOf) return Object_getPrototypeOf;
12928
+ hasRequiredObject_getPrototypeOf = 1;
12929
+
12930
+ var $Object = /*@__PURE__*/ requireEsObjectAtoms();
12931
+
12932
+ /** @type {import('./Object.getPrototypeOf')} */
12933
+ Object_getPrototypeOf = $Object.getPrototypeOf || null;
12934
+ return Object_getPrototypeOf;
12935
+ }
12936
+
12937
+ var implementation;
12938
+ var hasRequiredImplementation;
12939
+
12940
+ function requireImplementation () {
12941
+ if (hasRequiredImplementation) return implementation;
12942
+ hasRequiredImplementation = 1;
12943
+
12944
+ /* eslint no-invalid-this: 1 */
12945
+
12946
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
12947
+ var toStr = Object.prototype.toString;
12948
+ var max = Math.max;
12949
+ var funcType = '[object Function]';
12950
+
12951
+ var concatty = function concatty(a, b) {
12952
+ var arr = [];
12953
+
12954
+ for (var i = 0; i < a.length; i += 1) {
12955
+ arr[i] = a[i];
12956
+ }
12957
+ for (var j = 0; j < b.length; j += 1) {
12958
+ arr[j + a.length] = b[j];
12959
+ }
12960
+
12961
+ return arr;
12962
+ };
12963
+
12964
+ var slicy = function slicy(arrLike, offset) {
12965
+ var arr = [];
12966
+ for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
12967
+ arr[j] = arrLike[i];
12968
+ }
12969
+ return arr;
12970
+ };
12971
+
12972
+ var joiny = function (arr, joiner) {
12973
+ var str = '';
12974
+ for (var i = 0; i < arr.length; i += 1) {
12975
+ str += arr[i];
12976
+ if (i + 1 < arr.length) {
12977
+ str += joiner;
12978
+ }
12979
+ }
12980
+ return str;
12981
+ };
12982
+
12983
+ implementation = function bind(that) {
12984
+ var target = this;
12985
+ if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
12986
+ throw new TypeError(ERROR_MESSAGE + target);
12987
+ }
12988
+ var args = slicy(arguments, 1);
12989
+
12990
+ var bound;
12991
+ var binder = function () {
12992
+ if (this instanceof bound) {
12993
+ var result = target.apply(
12994
+ this,
12995
+ concatty(args, arguments)
12996
+ );
12997
+ if (Object(result) === result) {
12998
+ return result;
12999
+ }
13000
+ return this;
13001
+ }
13002
+ return target.apply(
13003
+ that,
13004
+ concatty(args, arguments)
13005
+ );
13006
+
13007
+ };
13008
+
13009
+ var boundLength = max(0, target.length - args.length);
13010
+ var boundArgs = [];
13011
+ for (var i = 0; i < boundLength; i++) {
13012
+ boundArgs[i] = '$' + i;
13013
+ }
13014
+
13015
+ bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
13016
+
13017
+ if (target.prototype) {
13018
+ var Empty = function Empty() {};
13019
+ Empty.prototype = target.prototype;
13020
+ bound.prototype = new Empty();
13021
+ Empty.prototype = null;
13022
+ }
13023
+
13024
+ return bound;
13025
+ };
13026
+ return implementation;
13027
+ }
13028
+
13029
+ var functionBind;
13030
+ var hasRequiredFunctionBind;
13031
+
13032
+ function requireFunctionBind () {
13033
+ if (hasRequiredFunctionBind) return functionBind;
13034
+ hasRequiredFunctionBind = 1;
13035
+
13036
+ var implementation = requireImplementation();
13037
+
13038
+ functionBind = Function.prototype.bind || implementation;
13039
+ return functionBind;
13040
+ }
13041
+
13042
+ var functionCall;
13043
+ var hasRequiredFunctionCall;
13044
+
13045
+ function requireFunctionCall () {
13046
+ if (hasRequiredFunctionCall) return functionCall;
13047
+ hasRequiredFunctionCall = 1;
13048
+
13049
+ /** @type {import('./functionCall')} */
13050
+ functionCall = Function.prototype.call;
13051
+ return functionCall;
13052
+ }
13053
+
13054
+ var functionApply;
13055
+ var hasRequiredFunctionApply;
13056
+
13057
+ function requireFunctionApply () {
13058
+ if (hasRequiredFunctionApply) return functionApply;
13059
+ hasRequiredFunctionApply = 1;
13060
+
13061
+ /** @type {import('./functionApply')} */
13062
+ functionApply = Function.prototype.apply;
13063
+ return functionApply;
13064
+ }
13065
+
13066
+ var reflectApply;
13067
+ var hasRequiredReflectApply;
13068
+
13069
+ function requireReflectApply () {
13070
+ if (hasRequiredReflectApply) return reflectApply;
13071
+ hasRequiredReflectApply = 1;
13072
+
13073
+ /** @type {import('./reflectApply')} */
13074
+ reflectApply = typeof Reflect !== 'undefined' && Reflect && Reflect.apply;
13075
+ return reflectApply;
13076
+ }
13077
+
13078
+ var actualApply;
13079
+ var hasRequiredActualApply;
13080
+
13081
+ function requireActualApply () {
13082
+ if (hasRequiredActualApply) return actualApply;
13083
+ hasRequiredActualApply = 1;
13084
+
13085
+ var bind = requireFunctionBind();
13086
+
13087
+ var $apply = requireFunctionApply();
13088
+ var $call = requireFunctionCall();
13089
+ var $reflectApply = requireReflectApply();
13090
+
13091
+ /** @type {import('./actualApply')} */
13092
+ actualApply = $reflectApply || bind.call($call, $apply);
13093
+ return actualApply;
13094
+ }
13095
+
13096
+ var callBindApplyHelpers;
13097
+ var hasRequiredCallBindApplyHelpers;
13098
+
13099
+ function requireCallBindApplyHelpers () {
13100
+ if (hasRequiredCallBindApplyHelpers) return callBindApplyHelpers;
13101
+ hasRequiredCallBindApplyHelpers = 1;
13102
+
13103
+ var bind = requireFunctionBind();
13104
+ var $TypeError = /*@__PURE__*/ requireType();
13105
+
13106
+ var $call = requireFunctionCall();
13107
+ var $actualApply = requireActualApply();
13108
+
13109
+ /** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
13110
+ callBindApplyHelpers = function callBindBasic(args) {
13111
+ if (args.length < 1 || typeof args[0] !== 'function') {
13112
+ throw new $TypeError('a function is required');
13113
+ }
13114
+ return $actualApply(bind, $call, args);
13115
+ };
13116
+ return callBindApplyHelpers;
13117
+ }
13118
+
13119
+ var get;
13120
+ var hasRequiredGet;
13121
+
13122
+ function requireGet () {
13123
+ if (hasRequiredGet) return get;
13124
+ hasRequiredGet = 1;
13125
+
13126
+ var callBind = requireCallBindApplyHelpers();
13127
+ var gOPD = /*@__PURE__*/ requireGopd();
13128
+
13129
+ var hasProtoAccessor;
13130
+ try {
13131
+ // eslint-disable-next-line no-extra-parens, no-proto
13132
+ hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
13133
+ } catch (e) {
13134
+ if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
13135
+ throw e;
13136
+ }
13137
+ }
13138
+
13139
+ // eslint-disable-next-line no-extra-parens
13140
+ var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
13141
+
13142
+ var $Object = Object;
13143
+ var $getPrototypeOf = $Object.getPrototypeOf;
13144
+
13145
+ /** @type {import('./get')} */
13146
+ get = desc && typeof desc.get === 'function'
13147
+ ? callBind([desc.get])
13148
+ : typeof $getPrototypeOf === 'function'
13149
+ ? /** @type {import('./get')} */ function getDunder(value) {
13150
+ // eslint-disable-next-line eqeqeq
13151
+ return $getPrototypeOf(value == null ? value : $Object(value));
13152
+ }
13153
+ : false;
13154
+ return get;
13155
+ }
13156
+
13157
+ var getProto;
13158
+ var hasRequiredGetProto;
13159
+
13160
+ function requireGetProto () {
13161
+ if (hasRequiredGetProto) return getProto;
13162
+ hasRequiredGetProto = 1;
13163
+
13164
+ var reflectGetProto = requireReflect_getPrototypeOf();
13165
+ var originalGetProto = requireObject_getPrototypeOf();
13166
+
13167
+ var getDunderProto = /*@__PURE__*/ requireGet();
13168
+
13169
+ /** @type {import('.')} */
13170
+ getProto = reflectGetProto
13171
+ ? function getProto(O) {
13172
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
13173
+ return reflectGetProto(O);
13174
+ }
13175
+ : originalGetProto
13176
+ ? function getProto(O) {
13177
+ if (!O || (typeof O !== 'object' && typeof O !== 'function')) {
13178
+ throw new TypeError('getProto: not an object');
13179
+ }
13180
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
13181
+ return originalGetProto(O);
13182
+ }
13183
+ : getDunderProto
13184
+ ? function getProto(O) {
13185
+ // @ts-expect-error TS can't narrow inside a closure, for some reason
13186
+ return getDunderProto(O);
13187
+ }
13188
+ : null;
13189
+ return getProto;
13190
+ }
13191
+
13192
+ var hasown;
13193
+ var hasRequiredHasown;
13194
+
13195
+ function requireHasown () {
13196
+ if (hasRequiredHasown) return hasown;
13197
+ hasRequiredHasown = 1;
13198
+
13199
+ var call = Function.prototype.call;
13200
+ var $hasOwn = Object.prototype.hasOwnProperty;
13201
+ var bind = requireFunctionBind();
13202
+
13203
+ /** @type {import('.')} */
13204
+ hasown = bind.call(call, $hasOwn);
13205
+ return hasown;
13206
+ }
13207
+
13208
+ var getIntrinsic;
13209
+ var hasRequiredGetIntrinsic;
13210
+
13211
+ function requireGetIntrinsic () {
13212
+ if (hasRequiredGetIntrinsic) return getIntrinsic;
13213
+ hasRequiredGetIntrinsic = 1;
13214
+
13215
+ var undefined$1;
13216
+
13217
+ var $Object = /*@__PURE__*/ requireEsObjectAtoms();
13218
+
13219
+ var $Error = /*@__PURE__*/ requireEsErrors();
13220
+ var $EvalError = /*@__PURE__*/ require_eval();
13221
+ var $RangeError = /*@__PURE__*/ requireRange();
13222
+ var $ReferenceError = /*@__PURE__*/ requireRef();
13223
+ var $SyntaxError = /*@__PURE__*/ requireSyntax();
13224
+ var $TypeError = /*@__PURE__*/ requireType();
13225
+ var $URIError = /*@__PURE__*/ requireUri();
13226
+
13227
+ var abs = /*@__PURE__*/ requireAbs();
13228
+ var floor = /*@__PURE__*/ requireFloor();
13229
+ var max = /*@__PURE__*/ requireMax();
13230
+ var min = /*@__PURE__*/ requireMin();
13231
+ var pow = /*@__PURE__*/ requirePow();
13232
+ var round = /*@__PURE__*/ requireRound();
13233
+ var sign = /*@__PURE__*/ requireSign();
13234
+
13235
+ var $Function = Function;
13236
+
13237
+ // eslint-disable-next-line consistent-return
13238
+ var getEvalledConstructor = function (expressionSyntax) {
13239
+ try {
13240
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
13241
+ } catch (e) {}
13242
+ };
13243
+
13244
+ var $gOPD = /*@__PURE__*/ requireGopd();
13245
+ var $defineProperty = /*@__PURE__*/ requireEsDefineProperty();
13246
+
13247
+ var throwTypeError = function () {
13248
+ throw new $TypeError();
13249
+ };
13250
+ var ThrowTypeError = $gOPD
13251
+ ? (function () {
13252
+ try {
13253
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
13254
+ arguments.callee; // IE 8 does not throw here
13255
+ return throwTypeError;
13256
+ } catch (calleeThrows) {
13257
+ try {
13258
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
13259
+ return $gOPD(arguments, 'callee').get;
13260
+ } catch (gOPDthrows) {
13261
+ return throwTypeError;
13262
+ }
13263
+ }
13264
+ }())
13265
+ : throwTypeError;
13266
+
13267
+ var hasSymbols = requireHasSymbols()();
13268
+
13269
+ var getProto = requireGetProto();
13270
+ var $ObjectGPO = requireObject_getPrototypeOf();
13271
+ var $ReflectGPO = requireReflect_getPrototypeOf();
13272
+
13273
+ var $apply = requireFunctionApply();
13274
+ var $call = requireFunctionCall();
13275
+
13276
+ var needsEval = {};
13277
+
13278
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
13279
+
13280
+ var INTRINSICS = {
13281
+ __proto__: null,
13282
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
13283
+ '%Array%': Array,
13284
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
13285
+ '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
13286
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
13287
+ '%AsyncFunction%': needsEval,
13288
+ '%AsyncGenerator%': needsEval,
13289
+ '%AsyncGeneratorFunction%': needsEval,
13290
+ '%AsyncIteratorPrototype%': needsEval,
13291
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
13292
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
13293
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
13294
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
13295
+ '%Boolean%': Boolean,
13296
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
13297
+ '%Date%': Date,
13298
+ '%decodeURI%': decodeURI,
13299
+ '%decodeURIComponent%': decodeURIComponent,
13300
+ '%encodeURI%': encodeURI,
13301
+ '%encodeURIComponent%': encodeURIComponent,
13302
+ '%Error%': $Error,
13303
+ '%eval%': eval, // eslint-disable-line no-eval
13304
+ '%EvalError%': $EvalError,
13305
+ '%Float16Array%': typeof Float16Array === 'undefined' ? undefined$1 : Float16Array,
13306
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
13307
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
13308
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
13309
+ '%Function%': $Function,
13310
+ '%GeneratorFunction%': needsEval,
13311
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
13312
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
13313
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
13314
+ '%isFinite%': isFinite,
13315
+ '%isNaN%': isNaN,
13316
+ '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
13317
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
13318
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
13319
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
13320
+ '%Math%': Math,
13321
+ '%Number%': Number,
13322
+ '%Object%': $Object,
13323
+ '%Object.getOwnPropertyDescriptor%': $gOPD,
13324
+ '%parseFloat%': parseFloat,
13325
+ '%parseInt%': parseInt,
13326
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
13327
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
13328
+ '%RangeError%': $RangeError,
13329
+ '%ReferenceError%': $ReferenceError,
13330
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
13331
+ '%RegExp%': RegExp,
13332
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
13333
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
13334
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
13335
+ '%String%': String,
13336
+ '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
13337
+ '%Symbol%': hasSymbols ? Symbol : undefined$1,
13338
+ '%SyntaxError%': $SyntaxError,
13339
+ '%ThrowTypeError%': ThrowTypeError,
13340
+ '%TypedArray%': TypedArray,
13341
+ '%TypeError%': $TypeError,
13342
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
13343
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
13344
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
13345
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
13346
+ '%URIError%': $URIError,
13347
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
13348
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
13349
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
13350
+
13351
+ '%Function.prototype.call%': $call,
13352
+ '%Function.prototype.apply%': $apply,
13353
+ '%Object.defineProperty%': $defineProperty,
13354
+ '%Object.getPrototypeOf%': $ObjectGPO,
13355
+ '%Math.abs%': abs,
13356
+ '%Math.floor%': floor,
13357
+ '%Math.max%': max,
13358
+ '%Math.min%': min,
13359
+ '%Math.pow%': pow,
13360
+ '%Math.round%': round,
13361
+ '%Math.sign%': sign,
13362
+ '%Reflect.getPrototypeOf%': $ReflectGPO
13363
+ };
13364
+
13365
+ if (getProto) {
13366
+ try {
13367
+ null.error; // eslint-disable-line no-unused-expressions
13368
+ } catch (e) {
13369
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
13370
+ var errorProto = getProto(getProto(e));
13371
+ INTRINSICS['%Error.prototype%'] = errorProto;
13372
+ }
13373
+ }
13374
+
13375
+ var doEval = function doEval(name) {
13376
+ var value;
13377
+ if (name === '%AsyncFunction%') {
13378
+ value = getEvalledConstructor('async function () {}');
13379
+ } else if (name === '%GeneratorFunction%') {
13380
+ value = getEvalledConstructor('function* () {}');
13381
+ } else if (name === '%AsyncGeneratorFunction%') {
13382
+ value = getEvalledConstructor('async function* () {}');
13383
+ } else if (name === '%AsyncGenerator%') {
13384
+ var fn = doEval('%AsyncGeneratorFunction%');
13385
+ if (fn) {
13386
+ value = fn.prototype;
13387
+ }
13388
+ } else if (name === '%AsyncIteratorPrototype%') {
13389
+ var gen = doEval('%AsyncGenerator%');
13390
+ if (gen && getProto) {
13391
+ value = getProto(gen.prototype);
13392
+ }
13393
+ }
13394
+
13395
+ INTRINSICS[name] = value;
13396
+
13397
+ return value;
13398
+ };
13399
+
13400
+ var LEGACY_ALIASES = {
13401
+ __proto__: null,
13402
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
13403
+ '%ArrayPrototype%': ['Array', 'prototype'],
13404
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
13405
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
13406
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
13407
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
13408
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
13409
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
13410
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
13411
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
13412
+ '%DataViewPrototype%': ['DataView', 'prototype'],
13413
+ '%DatePrototype%': ['Date', 'prototype'],
13414
+ '%ErrorPrototype%': ['Error', 'prototype'],
13415
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
13416
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
13417
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
13418
+ '%FunctionPrototype%': ['Function', 'prototype'],
13419
+ '%Generator%': ['GeneratorFunction', 'prototype'],
13420
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
13421
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
13422
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
13423
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
13424
+ '%JSONParse%': ['JSON', 'parse'],
13425
+ '%JSONStringify%': ['JSON', 'stringify'],
13426
+ '%MapPrototype%': ['Map', 'prototype'],
13427
+ '%NumberPrototype%': ['Number', 'prototype'],
13428
+ '%ObjectPrototype%': ['Object', 'prototype'],
13429
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
13430
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
13431
+ '%PromisePrototype%': ['Promise', 'prototype'],
13432
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
13433
+ '%Promise_all%': ['Promise', 'all'],
13434
+ '%Promise_reject%': ['Promise', 'reject'],
13435
+ '%Promise_resolve%': ['Promise', 'resolve'],
13436
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
13437
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
13438
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
13439
+ '%SetPrototype%': ['Set', 'prototype'],
13440
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
13441
+ '%StringPrototype%': ['String', 'prototype'],
13442
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
13443
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
13444
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
13445
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
13446
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
13447
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
13448
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
13449
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
13450
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
13451
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
13452
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
13453
+ };
13454
+
13455
+ var bind = requireFunctionBind();
13456
+ var hasOwn = /*@__PURE__*/ requireHasown();
13457
+ var $concat = bind.call($call, Array.prototype.concat);
13458
+ var $spliceApply = bind.call($apply, Array.prototype.splice);
13459
+ var $replace = bind.call($call, String.prototype.replace);
13460
+ var $strSlice = bind.call($call, String.prototype.slice);
13461
+ var $exec = bind.call($call, RegExp.prototype.exec);
13462
+
13463
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
13464
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
13465
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
13466
+ var stringToPath = function stringToPath(string) {
13467
+ var first = $strSlice(string, 0, 1);
13468
+ var last = $strSlice(string, -1);
13469
+ if (first === '%' && last !== '%') {
13470
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
13471
+ } else if (last === '%' && first !== '%') {
13472
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
13473
+ }
13474
+ var result = [];
13475
+ $replace(string, rePropName, function (match, number, quote, subString) {
13476
+ result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
13477
+ });
13478
+ return result;
13479
+ };
13480
+ /* end adaptation */
13481
+
13482
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
13483
+ var intrinsicName = name;
13484
+ var alias;
13485
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
13486
+ alias = LEGACY_ALIASES[intrinsicName];
13487
+ intrinsicName = '%' + alias[0] + '%';
13488
+ }
13489
+
13490
+ if (hasOwn(INTRINSICS, intrinsicName)) {
13491
+ var value = INTRINSICS[intrinsicName];
13492
+ if (value === needsEval) {
13493
+ value = doEval(intrinsicName);
13494
+ }
13495
+ if (typeof value === 'undefined' && !allowMissing) {
13496
+ throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
13497
+ }
13498
+
13499
+ return {
13500
+ alias: alias,
13501
+ name: intrinsicName,
13502
+ value: value
13503
+ };
13504
+ }
13505
+
13506
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
13507
+ };
13508
+
13509
+ getIntrinsic = function GetIntrinsic(name, allowMissing) {
13510
+ if (typeof name !== 'string' || name.length === 0) {
13511
+ throw new $TypeError('intrinsic name must be a non-empty string');
13512
+ }
13513
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
13514
+ throw new $TypeError('"allowMissing" argument must be a boolean');
13515
+ }
13516
+
13517
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
13518
+ throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
13519
+ }
13520
+ var parts = stringToPath(name);
13521
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
13522
+
13523
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
13524
+ var intrinsicRealName = intrinsic.name;
13525
+ var value = intrinsic.value;
13526
+ var skipFurtherCaching = false;
13527
+
13528
+ var alias = intrinsic.alias;
13529
+ if (alias) {
13530
+ intrinsicBaseName = alias[0];
13531
+ $spliceApply(parts, $concat([0, 1], alias));
13532
+ }
13533
+
13534
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
13535
+ var part = parts[i];
13536
+ var first = $strSlice(part, 0, 1);
13537
+ var last = $strSlice(part, -1);
13538
+ if (
13539
+ (
13540
+ (first === '"' || first === "'" || first === '`')
13541
+ || (last === '"' || last === "'" || last === '`')
13542
+ )
13543
+ && first !== last
13544
+ ) {
13545
+ throw new $SyntaxError('property names with quotes must have matching quotes');
13546
+ }
13547
+ if (part === 'constructor' || !isOwn) {
13548
+ skipFurtherCaching = true;
13549
+ }
13550
+
13551
+ intrinsicBaseName += '.' + part;
13552
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
13553
+
13554
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
13555
+ value = INTRINSICS[intrinsicRealName];
13556
+ } else if (value != null) {
13557
+ if (!(part in value)) {
13558
+ if (!allowMissing) {
13559
+ throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
13560
+ }
13561
+ return void 0;
13562
+ }
13563
+ if ($gOPD && (i + 1) >= parts.length) {
13564
+ var desc = $gOPD(value, part);
13565
+ isOwn = !!desc;
13566
+
13567
+ // By convention, when a data property is converted to an accessor
13568
+ // property to emulate a data property that does not suffer from
13569
+ // the override mistake, that accessor's getter is marked with
13570
+ // an `originalValue` property. Here, when we detect this, we
13571
+ // uphold the illusion by pretending to see that original data
13572
+ // property, i.e., returning the value rather than the getter
13573
+ // itself.
13574
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
13575
+ value = desc.get;
13576
+ } else {
13577
+ value = value[part];
13578
+ }
13579
+ } else {
13580
+ isOwn = hasOwn(value, part);
13581
+ value = value[part];
13582
+ }
13583
+
13584
+ if (isOwn && !skipFurtherCaching) {
13585
+ INTRINSICS[intrinsicRealName] = value;
13586
+ }
13587
+ }
13588
+ }
13589
+ return value;
13590
+ };
13591
+ return getIntrinsic;
13592
+ }
13593
+
13594
+ var shams;
13595
+ var hasRequiredShams;
13596
+
13597
+ function requireShams () {
13598
+ if (hasRequiredShams) return shams;
13599
+ hasRequiredShams = 1;
13600
+
13601
+ var hasSymbols = requireShams$1();
13602
+
13603
+ /** @type {import('.')} */
13604
+ shams = function hasToStringTagShams() {
13605
+ return hasSymbols() && !!Symbol.toStringTag;
13606
+ };
13607
+ return shams;
13608
+ }
13609
+
13610
+ var esSetTostringtag;
13611
+ var hasRequiredEsSetTostringtag;
13612
+
13613
+ function requireEsSetTostringtag () {
13614
+ if (hasRequiredEsSetTostringtag) return esSetTostringtag;
13615
+ hasRequiredEsSetTostringtag = 1;
13616
+
13617
+ var GetIntrinsic = /*@__PURE__*/ requireGetIntrinsic();
13618
+
13619
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
13620
+
13621
+ var hasToStringTag = requireShams()();
13622
+ var hasOwn = /*@__PURE__*/ requireHasown();
13623
+ var $TypeError = /*@__PURE__*/ requireType();
13624
+
13625
+ var toStringTag = hasToStringTag ? Symbol.toStringTag : null;
13626
+
13627
+ /** @type {import('.')} */
13628
+ esSetTostringtag = function setToStringTag(object, value) {
13629
+ var overrideIfSet = arguments.length > 2 && !!arguments[2] && arguments[2].force;
13630
+ var nonConfigurable = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
13631
+ if (
13632
+ (typeof overrideIfSet !== 'undefined' && typeof overrideIfSet !== 'boolean')
13633
+ || (typeof nonConfigurable !== 'undefined' && typeof nonConfigurable !== 'boolean')
13634
+ ) {
13635
+ throw new $TypeError('if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans');
13636
+ }
13637
+ if (toStringTag && (overrideIfSet || !hasOwn(object, toStringTag))) {
13638
+ if ($defineProperty) {
13639
+ $defineProperty(object, toStringTag, {
13640
+ configurable: !nonConfigurable,
13641
+ enumerable: false,
13642
+ value: value,
13643
+ writable: false
13644
+ });
13645
+ } else {
13646
+ object[toStringTag] = value; // eslint-disable-line no-param-reassign
13647
+ }
13648
+ }
13649
+ };
13650
+ return esSetTostringtag;
13651
+ }
13652
+
12575
13653
  var populate;
12576
13654
  var hasRequiredPopulate;
12577
13655
 
@@ -12607,6 +13685,7 @@ function requireForm_data () {
12607
13685
  var Stream = require$$0$1.Stream;
12608
13686
  var mime = requireMimeTypes();
12609
13687
  var asynckit = requireAsynckit();
13688
+ var setToStringTag = /*@__PURE__*/ requireEsSetTostringtag();
12610
13689
  var populate = requirePopulate();
12611
13690
 
12612
13691
  // Public API
@@ -12701,7 +13780,7 @@ function requireForm_data () {
12701
13780
  FormData.LINE_BREAK.length;
12702
13781
 
12703
13782
  // empty or either doesn't have path or not an http response or not a stream
12704
- if (!value || ( !value.path && !(value.readable && value.hasOwnProperty('httpVersion')) && !(value instanceof Stream))) {
13783
+ if (!value || ( !value.path && !(value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) && !(value instanceof Stream))) {
12705
13784
  return;
12706
13785
  }
12707
13786
 
@@ -12712,8 +13791,7 @@ function requireForm_data () {
12712
13791
  };
12713
13792
 
12714
13793
  FormData.prototype._lengthRetriever = function(value, callback) {
12715
-
12716
- if (value.hasOwnProperty('fd')) {
13794
+ if (Object.prototype.hasOwnProperty.call(value, 'fd')) {
12717
13795
 
12718
13796
  // take read range into a account
12719
13797
  // `end` = Infinity –> read file till the end
@@ -12748,11 +13826,11 @@ function requireForm_data () {
12748
13826
  }
12749
13827
 
12750
13828
  // or http response
12751
- } else if (value.hasOwnProperty('httpVersion')) {
13829
+ } else if (Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {
12752
13830
  callback(null, +value.headers['content-length']);
12753
13831
 
12754
13832
  // or request stream http://github.com/mikeal/request
12755
- } else if (value.hasOwnProperty('httpModule')) {
13833
+ } else if (Object.prototype.hasOwnProperty.call(value, 'httpModule')) {
12756
13834
  // wait till response come back
12757
13835
  value.on('response', function(response) {
12758
13836
  value.pause();
@@ -12792,22 +13870,23 @@ function requireForm_data () {
12792
13870
 
12793
13871
  var header;
12794
13872
  for (var prop in headers) {
12795
- if (!headers.hasOwnProperty(prop)) continue;
12796
- header = headers[prop];
13873
+ if (Object.prototype.hasOwnProperty.call(headers, prop)) {
13874
+ header = headers[prop];
12797
13875
 
12798
- // skip nullish headers.
12799
- if (header == null) {
12800
- continue;
12801
- }
13876
+ // skip nullish headers.
13877
+ if (header == null) {
13878
+ continue;
13879
+ }
12802
13880
 
12803
- // convert all headers to arrays.
12804
- if (!Array.isArray(header)) {
12805
- header = [header];
12806
- }
13881
+ // convert all headers to arrays.
13882
+ if (!Array.isArray(header)) {
13883
+ header = [header];
13884
+ }
12807
13885
 
12808
- // add non-empty headers.
12809
- if (header.length) {
12810
- contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
13886
+ // add non-empty headers.
13887
+ if (header.length) {
13888
+ contents += prop + ': ' + header.join('; ') + FormData.LINE_BREAK;
13889
+ }
12811
13890
  }
12812
13891
  }
12813
13892
 
@@ -12828,7 +13907,7 @@ function requireForm_data () {
12828
13907
  // formidable and the browser add a name property
12829
13908
  // fs- and request- streams have path property
12830
13909
  filename = path.basename(options.filename || value.name || value.path);
12831
- } else if (value.readable && value.hasOwnProperty('httpVersion')) {
13910
+ } else if (value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {
12832
13911
  // or try http response
12833
13912
  filename = path.basename(value.client._httpMessage.path || '');
12834
13913
  }
@@ -12856,7 +13935,7 @@ function requireForm_data () {
12856
13935
  }
12857
13936
 
12858
13937
  // or if it's http-reponse
12859
- if (!contentType && value.readable && value.hasOwnProperty('httpVersion')) {
13938
+ if (!contentType && value.readable && Object.prototype.hasOwnProperty.call(value, 'httpVersion')) {
12860
13939
  contentType = value.headers['content-type'];
12861
13940
  }
12862
13941
 
@@ -12897,7 +13976,7 @@ function requireForm_data () {
12897
13976
  };
12898
13977
 
12899
13978
  for (header in userHeaders) {
12900
- if (userHeaders.hasOwnProperty(header)) {
13979
+ if (Object.prototype.hasOwnProperty.call(userHeaders, header)) {
12901
13980
  formHeaders[header.toLowerCase()] = userHeaders[header];
12902
13981
  }
12903
13982
  }
@@ -12918,7 +13997,7 @@ function requireForm_data () {
12918
13997
  };
12919
13998
 
12920
13999
  FormData.prototype.getBuffer = function() {
12921
- var dataBuffer = new Buffer.alloc( 0 );
14000
+ var dataBuffer = new Buffer.alloc(0);
12922
14001
  var boundary = this.getBoundary();
12923
14002
 
12924
14003
  // Create the form content. Add Line breaks to the end of data.
@@ -13098,6 +14177,7 @@ function requireForm_data () {
13098
14177
  FormData.prototype.toString = function () {
13099
14178
  return '[object FormData]';
13100
14179
  };
14180
+ setToStringTag(FormData, 'FormData');
13101
14181
  return form_data;
13102
14182
  }
13103
14183
 
@@ -13434,7 +14514,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
13434
14514
  });
13435
14515
  const request$1 = partial(request, tokenStore, tokenRequester, options);
13436
14516
  const del$1 = partial(del, request$1);
13437
- const get$1 = partial(get, request$1);
14517
+ const get = partial(get$1, request$1);
13438
14518
  const post$1 = partial(post, request$1);
13439
14519
  const patch$1 = partial(patch, request$1);
13440
14520
  const put$1 = partial(put, request$1);
@@ -13448,7 +14528,7 @@ function restClient(userOptions = DEFAULT_API_WRAPPER_OPTIONS) {
13448
14528
  };
13449
14529
  const client = API_METHODS.reduce((methods, method) => (Object.assign(Object.assign({}, methods), { [method.name]: (...args) => method(client, ...args) })), {
13450
14530
  delete: del$1,
13451
- get: get$1,
14531
+ get,
13452
14532
  oauth,
13453
14533
  options,
13454
14534
  patch: patch$1,