@bigbinary/neeto-team-members-frontend 4.4.1 → 4.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/app/javascript/src/translations/en.json +1 -1
  2. package/dist/Groups.js +24 -25
  3. package/dist/Groups.js.map +1 -1
  4. package/dist/ManageMember.js +12 -14
  5. package/dist/ManageMember.js.map +1 -1
  6. package/dist/MembersDropdown.js +9 -8
  7. package/dist/MembersDropdown.js.map +1 -1
  8. package/dist/{Permissions-952ec2fa.js → Permissions-B2pWJYB4.js} +25 -31
  9. package/dist/{Permissions-952ec2fa.js.map → Permissions-B2pWJYB4.js.map} +1 -1
  10. package/dist/{Permissions-1b52172b.js → Permissions-r2Kb80Y_.js} +14 -14
  11. package/dist/{Permissions-1b52172b.js.map → Permissions-r2Kb80Y_.js.map} +1 -1
  12. package/dist/Permissions.js +4 -5
  13. package/dist/Permissions.js.map +1 -1
  14. package/dist/Profile.js +9 -389
  15. package/dist/Profile.js.map +1 -1
  16. package/dist/Roles.js +60 -66
  17. package/dist/Roles.js.map +1 -1
  18. package/dist/{RolesRadioGroup-94aca05f.js → RolesRadioGroup-DFPWhs-4.js} +24 -32
  19. package/dist/{RolesRadioGroup-94aca05f.js.map → RolesRadioGroup-DFPWhs-4.js.map} +1 -1
  20. package/dist/{RolesRadioGroup-c8486be1.js → RolesRadioGroup-DJ4pOHcX.js} +8 -8
  21. package/dist/{RolesRadioGroup-c8486be1.js.map → RolesRadioGroup-DJ4pOHcX.js.map} +1 -1
  22. package/dist/RolesRadioGroup.js +6 -7
  23. package/dist/RolesRadioGroup.js.map +1 -1
  24. package/dist/TeamMembers.js +27 -29
  25. package/dist/TeamMembers.js.map +1 -1
  26. package/dist/TeamsAndMembersDropdown.js +2 -3
  27. package/dist/TeamsAndMembersDropdown.js.map +1 -1
  28. package/dist/TeamsDropdown.js +7 -8
  29. package/dist/TeamsDropdown.js.map +1 -1
  30. package/dist/{_commonjsHelpers-1789f0cf.js → _commonjsHelpers-BFTU3MAI.js} +1 -1
  31. package/dist/_commonjsHelpers-BFTU3MAI.js.map +1 -0
  32. package/dist/{_commonjsHelpers-b3309d7b.js → _commonjsHelpers-BJu3ubxk.js} +1 -1
  33. package/dist/_commonjsHelpers-BJu3ubxk.js.map +1 -0
  34. package/dist/cjs/Groups.js +76 -100
  35. package/dist/cjs/Groups.js.map +1 -1
  36. package/dist/cjs/ManageMember.js +12 -14
  37. package/dist/cjs/ManageMember.js.map +1 -1
  38. package/dist/cjs/MembersDropdown.js +19 -27
  39. package/dist/cjs/MembersDropdown.js.map +1 -1
  40. package/dist/cjs/Permissions.js +4 -5
  41. package/dist/cjs/Permissions.js.map +1 -1
  42. package/dist/cjs/Profile.js +50 -450
  43. package/dist/cjs/Profile.js.map +1 -1
  44. package/dist/cjs/Roles.js +102 -134
  45. package/dist/cjs/Roles.js.map +1 -1
  46. package/dist/cjs/RolesRadioGroup.js +6 -7
  47. package/dist/cjs/RolesRadioGroup.js.map +1 -1
  48. package/dist/cjs/TeamMembers.js +73 -93
  49. package/dist/cjs/TeamMembers.js.map +1 -1
  50. package/dist/cjs/TeamsAndMembersDropdown.js +19 -31
  51. package/dist/cjs/TeamsAndMembersDropdown.js.map +1 -1
  52. package/dist/cjs/TeamsDropdown.js +13 -21
  53. package/dist/cjs/TeamsDropdown.js.map +1 -1
  54. package/dist/cjs/constants.js +1 -3
  55. package/dist/cjs/constants.js.map +1 -1
  56. package/dist/cjs/hooks.js +7 -10
  57. package/dist/cjs/hooks.js.map +1 -1
  58. package/dist/cjs/index.js +23 -22
  59. package/dist/cjs/index.js.map +1 -1
  60. package/dist/cjs/utils.js +8 -11
  61. package/dist/cjs/utils.js.map +1 -1
  62. package/dist/{constants-2685e5d6.js → constants-DK60kZoX.js} +1 -1
  63. package/dist/{constants-2685e5d6.js.map → constants-DK60kZoX.js.map} +1 -1
  64. package/dist/{constants-576b89ac.js → constants-Dq8t7rmL.js} +2 -2
  65. package/dist/{constants-576b89ac.js.map → constants-Dq8t7rmL.js.map} +1 -1
  66. package/dist/constants.js +1 -1
  67. package/dist/hooks.js +7 -8
  68. package/dist/hooks.js.map +1 -1
  69. package/dist/{index-98835f14.js → index-B6-BCFEc.js} +8 -6
  70. package/dist/index-B6-BCFEc.js.map +1 -0
  71. package/dist/{index-753ce55b.js → index-D0ixFK_p.js} +76 -102
  72. package/dist/index-D0ixFK_p.js.map +1 -0
  73. package/dist/{index-7b978a0f.js → index-D9EElQrM.js} +26 -34
  74. package/dist/index-D9EElQrM.js.map +1 -0
  75. package/dist/{index-5f1a8667.js → index-DGXXNU_W.js} +25 -29
  76. package/dist/index-DGXXNU_W.js.map +1 -0
  77. package/dist/{index-7d531bf6.js → index-DcjmIrWp.js} +14 -14
  78. package/dist/{index-7d531bf6.js.map → index-DcjmIrWp.js.map} +1 -1
  79. package/dist/{index-fc3b88e2.js → index-DduR7qdk.js} +17 -17
  80. package/dist/index-DduR7qdk.js.map +1 -0
  81. package/dist/index.js +23 -20
  82. package/dist/index.js.map +1 -1
  83. package/dist/{inject-css-c86de496.js → inject-css-DmrvuTKK.js} +1 -1
  84. package/dist/{inject-css-c86de496.js.map → inject-css-DmrvuTKK.js.map} +1 -1
  85. package/dist/{inject-css-80a5faa3.js → inject-css-vQvjPR2x.js} +1 -1
  86. package/dist/{inject-css-80a5faa3.js.map → inject-css-vQvjPR2x.js.map} +1 -1
  87. package/dist/{queryClient-febad37e.js → queryClient-4vAFE3bx.js} +1 -1
  88. package/dist/{queryClient-febad37e.js.map → queryClient-4vAFE3bx.js.map} +1 -1
  89. package/dist/{queryClient-71ecdd08.js → queryClient-Dsu-gu4Y.js} +1 -1
  90. package/dist/{queryClient-71ecdd08.js.map → queryClient-Dsu-gu4Y.js.map} +1 -1
  91. package/dist/{useMembersSidenav-68b9f94e.js → useMembersSidenav-C1ZO3xIl.js} +2 -2
  92. package/dist/{useMembersSidenav-68b9f94e.js.map → useMembersSidenav-C1ZO3xIl.js.map} +1 -1
  93. package/dist/{useMembersSidenav-7aaa6f93.js → useMembersSidenav-uuIPy4H_.js} +3 -7
  94. package/dist/{useMembersSidenav-7aaa6f93.js.map → useMembersSidenav-uuIPy4H_.js.map} +1 -1
  95. package/dist/useTeamsApi-BTrW3Vtj.js +143 -0
  96. package/dist/useTeamsApi-BTrW3Vtj.js.map +1 -0
  97. package/dist/useTeamsApi-CasIc4Xx.js +152 -0
  98. package/dist/useTeamsApi-CasIc4Xx.js.map +1 -0
  99. package/dist/utils.js +8 -9
  100. package/dist/utils.js.map +1 -1
  101. package/dist/{withReactQuery-efba53ba.js → withReactQuery-C7a_pGxf.js} +4 -4
  102. package/dist/{withReactQuery-efba53ba.js.map → withReactQuery-C7a_pGxf.js.map} +1 -1
  103. package/dist/{withReactQuery-e3d0bd1f.js → withReactQuery-CHybbL5V.js} +3 -3
  104. package/dist/{withReactQuery-e3d0bd1f.js.map → withReactQuery-CHybbL5V.js.map} +1 -1
  105. package/package.json +103 -86
  106. package/dist/_commonjsHelpers-1789f0cf.js.map +0 -1
  107. package/dist/_commonjsHelpers-b3309d7b.js.map +0 -1
  108. package/dist/defineProperty-9b13c73c.js +0 -46
  109. package/dist/defineProperty-9b13c73c.js.map +0 -1
  110. package/dist/defineProperty-b85f2e0f.js +0 -43
  111. package/dist/defineProperty-b85f2e0f.js.map +0 -1
  112. package/dist/index-5f1a8667.js.map +0 -1
  113. package/dist/index-753ce55b.js.map +0 -1
  114. package/dist/index-7b978a0f.js.map +0 -1
  115. package/dist/index-98835f14.js.map +0 -1
  116. package/dist/index-fc3b88e2.js.map +0 -1
  117. package/dist/objectWithoutProperties-2fed2d7d.js +0 -33
  118. package/dist/objectWithoutProperties-2fed2d7d.js.map +0 -1
  119. package/dist/objectWithoutProperties-a0edb288.js +0 -31
  120. package/dist/objectWithoutProperties-a0edb288.js.map +0 -1
  121. package/dist/slicedToArray-6674c4b8.js +0 -44
  122. package/dist/slicedToArray-6674c4b8.js.map +0 -1
  123. package/dist/slicedToArray-8e69d42b.js +0 -46
  124. package/dist/slicedToArray-8e69d42b.js.map +0 -1
  125. package/dist/toConsumableArray-0e395868.js +0 -20
  126. package/dist/toConsumableArray-0e395868.js.map +0 -1
  127. package/dist/toConsumableArray-e41a15ba.js +0 -22
  128. package/dist/toConsumableArray-e41a15ba.js.map +0 -1
  129. package/dist/unsupportedIterableToArray-7c7192e5.js +0 -17
  130. package/dist/unsupportedIterableToArray-7c7192e5.js.map +0 -1
  131. package/dist/unsupportedIterableToArray-fa2816fd.js +0 -20
  132. package/dist/unsupportedIterableToArray-fa2816fd.js.map +0 -1
  133. package/dist/useTeamsApi-6277d3a1.js +0 -3860
  134. package/dist/useTeamsApi-6277d3a1.js.map +0 -1
  135. package/dist/useTeamsApi-bc52172a.js +0 -3874
  136. package/dist/useTeamsApi-bc52172a.js.map +0 -1
@@ -1,3860 +0,0 @@
1
- import { _ as _objectWithoutProperties } from './objectWithoutProperties-a0edb288.js';
2
- import { _ as _defineProperty } from './defineProperty-b85f2e0f.js';
3
- import { useQuery, keepPreviousData, useMutation } from '@tanstack/react-query';
4
- import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
5
- import { identity } from 'ramda';
6
- import axios from 'axios';
7
- import { keysToSnakeCase } from '@bigbinary/neeto-cist';
8
- import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers-1789f0cf.js';
9
- import require$$0 from 'util';
10
- import { B as BASE_URL, Q as QUERY_KEYS } from './constants-576b89ac.js';
11
- import { q as queryClient } from './queryClient-71ecdd08.js';
12
-
13
- /** @type {import('.')} */
14
- var esErrors = Error;
15
-
16
- /** @type {import('./eval')} */
17
- var _eval = EvalError;
18
-
19
- /** @type {import('./range')} */
20
- var range = RangeError;
21
-
22
- /** @type {import('./ref')} */
23
- var ref = ReferenceError;
24
-
25
- /** @type {import('./syntax')} */
26
- var syntax = SyntaxError;
27
-
28
- /** @type {import('./type')} */
29
- var type = TypeError;
30
-
31
- /** @type {import('./uri')} */
32
- var uri = URIError;
33
-
34
- /* eslint complexity: [2, 18], max-statements: [2, 33] */
35
- var shams = function hasSymbols() {
36
- if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
37
- if (typeof Symbol.iterator === 'symbol') { return true; }
38
-
39
- var obj = {};
40
- var sym = Symbol('test');
41
- var symObj = Object(sym);
42
- if (typeof sym === 'string') { return false; }
43
-
44
- if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
45
- if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
46
-
47
- // temp disabled per https://github.com/ljharb/object.assign/issues/17
48
- // if (sym instanceof Symbol) { return false; }
49
- // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
50
- // if (!(symObj instanceof Symbol)) { return false; }
51
-
52
- // if (typeof Symbol.prototype.toString !== 'function') { return false; }
53
- // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
54
-
55
- var symVal = 42;
56
- obj[sym] = symVal;
57
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
58
- if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
59
-
60
- if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
61
-
62
- var syms = Object.getOwnPropertySymbols(obj);
63
- if (syms.length !== 1 || syms[0] !== sym) { return false; }
64
-
65
- if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
66
-
67
- if (typeof Object.getOwnPropertyDescriptor === 'function') {
68
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
69
- if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
70
- }
71
-
72
- return true;
73
- };
74
-
75
- var origSymbol = typeof Symbol !== 'undefined' && Symbol;
76
- var hasSymbolSham = shams;
77
-
78
- var hasSymbols$4 = function hasNativeSymbols() {
79
- if (typeof origSymbol !== 'function') { return false; }
80
- if (typeof Symbol !== 'function') { return false; }
81
- if (typeof origSymbol('foo') !== 'symbol') { return false; }
82
- if (typeof Symbol('bar') !== 'symbol') { return false; }
83
-
84
- return hasSymbolSham();
85
- };
86
-
87
- var test = {
88
- __proto__: null,
89
- foo: {}
90
- };
91
-
92
- var $Object = Object;
93
-
94
- /** @type {import('.')} */
95
- var hasProto$4 = function hasProto() {
96
- // @ts-expect-error: TS errors on an inherited property for some reason
97
- return { __proto__: test }.foo === test.foo
98
- && !(test instanceof $Object);
99
- };
100
-
101
- /* eslint no-invalid-this: 1 */
102
-
103
- var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
104
- var toStr$1 = Object.prototype.toString;
105
- var max = Math.max;
106
- var funcType = '[object Function]';
107
-
108
- var concatty = function concatty(a, b) {
109
- var arr = [];
110
-
111
- for (var i = 0; i < a.length; i += 1) {
112
- arr[i] = a[i];
113
- }
114
- for (var j = 0; j < b.length; j += 1) {
115
- arr[j + a.length] = b[j];
116
- }
117
-
118
- return arr;
119
- };
120
-
121
- var slicy = function slicy(arrLike, offset) {
122
- var arr = [];
123
- for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
124
- arr[j] = arrLike[i];
125
- }
126
- return arr;
127
- };
128
-
129
- var joiny = function (arr, joiner) {
130
- var str = '';
131
- for (var i = 0; i < arr.length; i += 1) {
132
- str += arr[i];
133
- if (i + 1 < arr.length) {
134
- str += joiner;
135
- }
136
- }
137
- return str;
138
- };
139
-
140
- var implementation$1 = function bind(that) {
141
- var target = this;
142
- if (typeof target !== 'function' || toStr$1.apply(target) !== funcType) {
143
- throw new TypeError(ERROR_MESSAGE + target);
144
- }
145
- var args = slicy(arguments, 1);
146
-
147
- var bound;
148
- var binder = function () {
149
- if (this instanceof bound) {
150
- var result = target.apply(
151
- this,
152
- concatty(args, arguments)
153
- );
154
- if (Object(result) === result) {
155
- return result;
156
- }
157
- return this;
158
- }
159
- return target.apply(
160
- that,
161
- concatty(args, arguments)
162
- );
163
-
164
- };
165
-
166
- var boundLength = max(0, target.length - args.length);
167
- var boundArgs = [];
168
- for (var i = 0; i < boundLength; i++) {
169
- boundArgs[i] = '$' + i;
170
- }
171
-
172
- bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
173
-
174
- if (target.prototype) {
175
- var Empty = function Empty() {};
176
- Empty.prototype = target.prototype;
177
- bound.prototype = new Empty();
178
- Empty.prototype = null;
179
- }
180
-
181
- return bound;
182
- };
183
-
184
- var implementation = implementation$1;
185
-
186
- var functionBind = Function.prototype.bind || implementation;
187
-
188
- var call = Function.prototype.call;
189
- var $hasOwn = Object.prototype.hasOwnProperty;
190
- var bind$4 = functionBind;
191
-
192
- /** @type {(o: {}, p: PropertyKey) => p is keyof o} */
193
- var hasown = bind$4.call(call, $hasOwn);
194
-
195
- var undefined$4;
196
-
197
- var $Error$3 = esErrors;
198
- var $EvalError$3 = _eval;
199
- var $RangeError$3 = range;
200
- var $ReferenceError$3 = ref;
201
- var $SyntaxError$4 = syntax;
202
- var $TypeError$6 = type;
203
- var $URIError$3 = uri;
204
-
205
- var $Function$3 = Function;
206
-
207
- // eslint-disable-next-line consistent-return
208
- var getEvalledConstructor$3 = function (expressionSyntax) {
209
- try {
210
- return $Function$3('"use strict"; return (' + expressionSyntax + ').constructor;')();
211
- } catch (e) {}
212
- };
213
-
214
- var $gOPD$4 = Object.getOwnPropertyDescriptor;
215
- if ($gOPD$4) {
216
- try {
217
- $gOPD$4({}, '');
218
- } catch (e) {
219
- $gOPD$4 = null; // this is IE 8, which has a broken gOPD
220
- }
221
- }
222
-
223
- var throwTypeError$3 = function () {
224
- throw new $TypeError$6();
225
- };
226
- var ThrowTypeError$3 = $gOPD$4
227
- ? (function () {
228
- try {
229
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
230
- arguments.callee; // IE 8 does not throw here
231
- return throwTypeError$3;
232
- } catch (calleeThrows) {
233
- try {
234
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
235
- return $gOPD$4(arguments, 'callee').get;
236
- } catch (gOPDthrows) {
237
- return throwTypeError$3;
238
- }
239
- }
240
- }())
241
- : throwTypeError$3;
242
-
243
- var hasSymbols$3 = hasSymbols$4();
244
- var hasProto$3 = hasProto$4();
245
-
246
- var getProto$3 = Object.getPrototypeOf || (
247
- hasProto$3
248
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
249
- : null
250
- );
251
-
252
- var needsEval$3 = {};
253
-
254
- var TypedArray$3 = typeof Uint8Array === 'undefined' || !getProto$3 ? undefined$4 : getProto$3(Uint8Array);
255
-
256
- var INTRINSICS$3 = {
257
- __proto__: null,
258
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$4 : AggregateError,
259
- '%Array%': Array,
260
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$4 : ArrayBuffer,
261
- '%ArrayIteratorPrototype%': hasSymbols$3 && getProto$3 ? getProto$3([][Symbol.iterator]()) : undefined$4,
262
- '%AsyncFromSyncIteratorPrototype%': undefined$4,
263
- '%AsyncFunction%': needsEval$3,
264
- '%AsyncGenerator%': needsEval$3,
265
- '%AsyncGeneratorFunction%': needsEval$3,
266
- '%AsyncIteratorPrototype%': needsEval$3,
267
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$4 : Atomics,
268
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$4 : BigInt,
269
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$4 : BigInt64Array,
270
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$4 : BigUint64Array,
271
- '%Boolean%': Boolean,
272
- '%DataView%': typeof DataView === 'undefined' ? undefined$4 : DataView,
273
- '%Date%': Date,
274
- '%decodeURI%': decodeURI,
275
- '%decodeURIComponent%': decodeURIComponent,
276
- '%encodeURI%': encodeURI,
277
- '%encodeURIComponent%': encodeURIComponent,
278
- '%Error%': $Error$3,
279
- '%eval%': eval, // eslint-disable-line no-eval
280
- '%EvalError%': $EvalError$3,
281
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$4 : Float32Array,
282
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$4 : Float64Array,
283
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$4 : FinalizationRegistry,
284
- '%Function%': $Function$3,
285
- '%GeneratorFunction%': needsEval$3,
286
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$4 : Int8Array,
287
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$4 : Int16Array,
288
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$4 : Int32Array,
289
- '%isFinite%': isFinite,
290
- '%isNaN%': isNaN,
291
- '%IteratorPrototype%': hasSymbols$3 && getProto$3 ? getProto$3(getProto$3([][Symbol.iterator]())) : undefined$4,
292
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$4,
293
- '%Map%': typeof Map === 'undefined' ? undefined$4 : Map,
294
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 || !getProto$3 ? undefined$4 : getProto$3(new Map()[Symbol.iterator]()),
295
- '%Math%': Math,
296
- '%Number%': Number,
297
- '%Object%': Object,
298
- '%parseFloat%': parseFloat,
299
- '%parseInt%': parseInt,
300
- '%Promise%': typeof Promise === 'undefined' ? undefined$4 : Promise,
301
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$4 : Proxy,
302
- '%RangeError%': $RangeError$3,
303
- '%ReferenceError%': $ReferenceError$3,
304
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$4 : Reflect,
305
- '%RegExp%': RegExp,
306
- '%Set%': typeof Set === 'undefined' ? undefined$4 : Set,
307
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 || !getProto$3 ? undefined$4 : getProto$3(new Set()[Symbol.iterator]()),
308
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$4 : SharedArrayBuffer,
309
- '%String%': String,
310
- '%StringIteratorPrototype%': hasSymbols$3 && getProto$3 ? getProto$3(''[Symbol.iterator]()) : undefined$4,
311
- '%Symbol%': hasSymbols$3 ? Symbol : undefined$4,
312
- '%SyntaxError%': $SyntaxError$4,
313
- '%ThrowTypeError%': ThrowTypeError$3,
314
- '%TypedArray%': TypedArray$3,
315
- '%TypeError%': $TypeError$6,
316
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$4 : Uint8Array,
317
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$4 : Uint8ClampedArray,
318
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$4 : Uint16Array,
319
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$4 : Uint32Array,
320
- '%URIError%': $URIError$3,
321
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$4 : WeakMap,
322
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$4 : WeakRef,
323
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$4 : WeakSet
324
- };
325
-
326
- if (getProto$3) {
327
- try {
328
- null.error; // eslint-disable-line no-unused-expressions
329
- } catch (e) {
330
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
331
- var errorProto$3 = getProto$3(getProto$3(e));
332
- INTRINSICS$3['%Error.prototype%'] = errorProto$3;
333
- }
334
- }
335
-
336
- var doEval$3 = function doEval(name) {
337
- var value;
338
- if (name === '%AsyncFunction%') {
339
- value = getEvalledConstructor$3('async function () {}');
340
- } else if (name === '%GeneratorFunction%') {
341
- value = getEvalledConstructor$3('function* () {}');
342
- } else if (name === '%AsyncGeneratorFunction%') {
343
- value = getEvalledConstructor$3('async function* () {}');
344
- } else if (name === '%AsyncGenerator%') {
345
- var fn = doEval('%AsyncGeneratorFunction%');
346
- if (fn) {
347
- value = fn.prototype;
348
- }
349
- } else if (name === '%AsyncIteratorPrototype%') {
350
- var gen = doEval('%AsyncGenerator%');
351
- if (gen && getProto$3) {
352
- value = getProto$3(gen.prototype);
353
- }
354
- }
355
-
356
- INTRINSICS$3[name] = value;
357
-
358
- return value;
359
- };
360
-
361
- var LEGACY_ALIASES$3 = {
362
- __proto__: null,
363
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
364
- '%ArrayPrototype%': ['Array', 'prototype'],
365
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
366
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
367
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
368
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
369
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
370
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
371
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
372
- '%BooleanPrototype%': ['Boolean', 'prototype'],
373
- '%DataViewPrototype%': ['DataView', 'prototype'],
374
- '%DatePrototype%': ['Date', 'prototype'],
375
- '%ErrorPrototype%': ['Error', 'prototype'],
376
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
377
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
378
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
379
- '%FunctionPrototype%': ['Function', 'prototype'],
380
- '%Generator%': ['GeneratorFunction', 'prototype'],
381
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
382
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
383
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
384
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
385
- '%JSONParse%': ['JSON', 'parse'],
386
- '%JSONStringify%': ['JSON', 'stringify'],
387
- '%MapPrototype%': ['Map', 'prototype'],
388
- '%NumberPrototype%': ['Number', 'prototype'],
389
- '%ObjectPrototype%': ['Object', 'prototype'],
390
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
391
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
392
- '%PromisePrototype%': ['Promise', 'prototype'],
393
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
394
- '%Promise_all%': ['Promise', 'all'],
395
- '%Promise_reject%': ['Promise', 'reject'],
396
- '%Promise_resolve%': ['Promise', 'resolve'],
397
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
398
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
399
- '%RegExpPrototype%': ['RegExp', 'prototype'],
400
- '%SetPrototype%': ['Set', 'prototype'],
401
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
402
- '%StringPrototype%': ['String', 'prototype'],
403
- '%SymbolPrototype%': ['Symbol', 'prototype'],
404
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
405
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
406
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
407
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
408
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
409
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
410
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
411
- '%URIErrorPrototype%': ['URIError', 'prototype'],
412
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
413
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
414
- };
415
-
416
- var bind$3 = functionBind;
417
- var hasOwn$4 = hasown;
418
- var $concat$4 = bind$3.call(Function.call, Array.prototype.concat);
419
- var $spliceApply$3 = bind$3.call(Function.apply, Array.prototype.splice);
420
- var $replace$4 = bind$3.call(Function.call, String.prototype.replace);
421
- var $strSlice$3 = bind$3.call(Function.call, String.prototype.slice);
422
- var $exec$3 = bind$3.call(Function.call, RegExp.prototype.exec);
423
-
424
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
425
- var rePropName$3 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
426
- var reEscapeChar$3 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
427
- var stringToPath$3 = function stringToPath(string) {
428
- var first = $strSlice$3(string, 0, 1);
429
- var last = $strSlice$3(string, -1);
430
- if (first === '%' && last !== '%') {
431
- throw new $SyntaxError$4('invalid intrinsic syntax, expected closing `%`');
432
- } else if (last === '%' && first !== '%') {
433
- throw new $SyntaxError$4('invalid intrinsic syntax, expected opening `%`');
434
- }
435
- var result = [];
436
- $replace$4(string, rePropName$3, function (match, number, quote, subString) {
437
- result[result.length] = quote ? $replace$4(subString, reEscapeChar$3, '$1') : number || match;
438
- });
439
- return result;
440
- };
441
- /* end adaptation */
442
-
443
- var getBaseIntrinsic$3 = function getBaseIntrinsic(name, allowMissing) {
444
- var intrinsicName = name;
445
- var alias;
446
- if (hasOwn$4(LEGACY_ALIASES$3, intrinsicName)) {
447
- alias = LEGACY_ALIASES$3[intrinsicName];
448
- intrinsicName = '%' + alias[0] + '%';
449
- }
450
-
451
- if (hasOwn$4(INTRINSICS$3, intrinsicName)) {
452
- var value = INTRINSICS$3[intrinsicName];
453
- if (value === needsEval$3) {
454
- value = doEval$3(intrinsicName);
455
- }
456
- if (typeof value === 'undefined' && !allowMissing) {
457
- throw new $TypeError$6('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
458
- }
459
-
460
- return {
461
- alias: alias,
462
- name: intrinsicName,
463
- value: value
464
- };
465
- }
466
-
467
- throw new $SyntaxError$4('intrinsic ' + name + ' does not exist!');
468
- };
469
-
470
- var getIntrinsic$4 = function GetIntrinsic(name, allowMissing) {
471
- if (typeof name !== 'string' || name.length === 0) {
472
- throw new $TypeError$6('intrinsic name must be a non-empty string');
473
- }
474
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
475
- throw new $TypeError$6('"allowMissing" argument must be a boolean');
476
- }
477
-
478
- if ($exec$3(/^%?[^%]*%?$/, name) === null) {
479
- throw new $SyntaxError$4('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
480
- }
481
- var parts = stringToPath$3(name);
482
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
483
-
484
- var intrinsic = getBaseIntrinsic$3('%' + intrinsicBaseName + '%', allowMissing);
485
- var intrinsicRealName = intrinsic.name;
486
- var value = intrinsic.value;
487
- var skipFurtherCaching = false;
488
-
489
- var alias = intrinsic.alias;
490
- if (alias) {
491
- intrinsicBaseName = alias[0];
492
- $spliceApply$3(parts, $concat$4([0, 1], alias));
493
- }
494
-
495
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
496
- var part = parts[i];
497
- var first = $strSlice$3(part, 0, 1);
498
- var last = $strSlice$3(part, -1);
499
- if (
500
- (
501
- (first === '"' || first === "'" || first === '`')
502
- || (last === '"' || last === "'" || last === '`')
503
- )
504
- && first !== last
505
- ) {
506
- throw new $SyntaxError$4('property names with quotes must have matching quotes');
507
- }
508
- if (part === 'constructor' || !isOwn) {
509
- skipFurtherCaching = true;
510
- }
511
-
512
- intrinsicBaseName += '.' + part;
513
- intrinsicRealName = '%' + intrinsicBaseName + '%';
514
-
515
- if (hasOwn$4(INTRINSICS$3, intrinsicRealName)) {
516
- value = INTRINSICS$3[intrinsicRealName];
517
- } else if (value != null) {
518
- if (!(part in value)) {
519
- if (!allowMissing) {
520
- throw new $TypeError$6('base intrinsic for ' + name + ' exists, but the property is not available.');
521
- }
522
- return void undefined$4;
523
- }
524
- if ($gOPD$4 && (i + 1) >= parts.length) {
525
- var desc = $gOPD$4(value, part);
526
- isOwn = !!desc;
527
-
528
- // By convention, when a data property is converted to an accessor
529
- // property to emulate a data property that does not suffer from
530
- // the override mistake, that accessor's getter is marked with
531
- // an `originalValue` property. Here, when we detect this, we
532
- // uphold the illusion by pretending to see that original data
533
- // property, i.e., returning the value rather than the getter
534
- // itself.
535
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
536
- value = desc.get;
537
- } else {
538
- value = value[part];
539
- }
540
- } else {
541
- isOwn = hasOwn$4(value, part);
542
- value = value[part];
543
- }
544
-
545
- if (isOwn && !skipFurtherCaching) {
546
- INTRINSICS$3[intrinsicRealName] = value;
547
- }
548
- }
549
- }
550
- return value;
551
- };
552
-
553
- var undefined$3;
554
-
555
- var $Error$2 = esErrors;
556
- var $EvalError$2 = _eval;
557
- var $RangeError$2 = range;
558
- var $ReferenceError$2 = ref;
559
- var $SyntaxError$3 = syntax;
560
- var $TypeError$5 = type;
561
- var $URIError$2 = uri;
562
-
563
- var $Function$2 = Function;
564
-
565
- // eslint-disable-next-line consistent-return
566
- var getEvalledConstructor$2 = function (expressionSyntax) {
567
- try {
568
- return $Function$2('"use strict"; return (' + expressionSyntax + ').constructor;')();
569
- } catch (e) {}
570
- };
571
-
572
- var $gOPD$3 = Object.getOwnPropertyDescriptor;
573
- if ($gOPD$3) {
574
- try {
575
- $gOPD$3({}, '');
576
- } catch (e) {
577
- $gOPD$3 = null; // this is IE 8, which has a broken gOPD
578
- }
579
- }
580
-
581
- var throwTypeError$2 = function () {
582
- throw new $TypeError$5();
583
- };
584
- var ThrowTypeError$2 = $gOPD$3
585
- ? (function () {
586
- try {
587
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
588
- arguments.callee; // IE 8 does not throw here
589
- return throwTypeError$2;
590
- } catch (calleeThrows) {
591
- try {
592
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
593
- return $gOPD$3(arguments, 'callee').get;
594
- } catch (gOPDthrows) {
595
- return throwTypeError$2;
596
- }
597
- }
598
- }())
599
- : throwTypeError$2;
600
-
601
- var hasSymbols$2 = hasSymbols$4();
602
- var hasProto$2 = hasProto$4();
603
-
604
- var getProto$2 = Object.getPrototypeOf || (
605
- hasProto$2
606
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
607
- : null
608
- );
609
-
610
- var needsEval$2 = {};
611
-
612
- var TypedArray$2 = typeof Uint8Array === 'undefined' || !getProto$2 ? undefined$3 : getProto$2(Uint8Array);
613
-
614
- var INTRINSICS$2 = {
615
- __proto__: null,
616
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$3 : AggregateError,
617
- '%Array%': Array,
618
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$3 : ArrayBuffer,
619
- '%ArrayIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2([][Symbol.iterator]()) : undefined$3,
620
- '%AsyncFromSyncIteratorPrototype%': undefined$3,
621
- '%AsyncFunction%': needsEval$2,
622
- '%AsyncGenerator%': needsEval$2,
623
- '%AsyncGeneratorFunction%': needsEval$2,
624
- '%AsyncIteratorPrototype%': needsEval$2,
625
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$3 : Atomics,
626
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$3 : BigInt,
627
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$3 : BigInt64Array,
628
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$3 : BigUint64Array,
629
- '%Boolean%': Boolean,
630
- '%DataView%': typeof DataView === 'undefined' ? undefined$3 : DataView,
631
- '%Date%': Date,
632
- '%decodeURI%': decodeURI,
633
- '%decodeURIComponent%': decodeURIComponent,
634
- '%encodeURI%': encodeURI,
635
- '%encodeURIComponent%': encodeURIComponent,
636
- '%Error%': $Error$2,
637
- '%eval%': eval, // eslint-disable-line no-eval
638
- '%EvalError%': $EvalError$2,
639
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$3 : Float32Array,
640
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$3 : Float64Array,
641
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$3 : FinalizationRegistry,
642
- '%Function%': $Function$2,
643
- '%GeneratorFunction%': needsEval$2,
644
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$3 : Int8Array,
645
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$3 : Int16Array,
646
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$3 : Int32Array,
647
- '%isFinite%': isFinite,
648
- '%isNaN%': isNaN,
649
- '%IteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(getProto$2([][Symbol.iterator]())) : undefined$3,
650
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$3,
651
- '%Map%': typeof Map === 'undefined' ? undefined$3 : Map,
652
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$3 : getProto$2(new Map()[Symbol.iterator]()),
653
- '%Math%': Math,
654
- '%Number%': Number,
655
- '%Object%': Object,
656
- '%parseFloat%': parseFloat,
657
- '%parseInt%': parseInt,
658
- '%Promise%': typeof Promise === 'undefined' ? undefined$3 : Promise,
659
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$3 : Proxy,
660
- '%RangeError%': $RangeError$2,
661
- '%ReferenceError%': $ReferenceError$2,
662
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$3 : Reflect,
663
- '%RegExp%': RegExp,
664
- '%Set%': typeof Set === 'undefined' ? undefined$3 : Set,
665
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$2 || !getProto$2 ? undefined$3 : getProto$2(new Set()[Symbol.iterator]()),
666
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$3 : SharedArrayBuffer,
667
- '%String%': String,
668
- '%StringIteratorPrototype%': hasSymbols$2 && getProto$2 ? getProto$2(''[Symbol.iterator]()) : undefined$3,
669
- '%Symbol%': hasSymbols$2 ? Symbol : undefined$3,
670
- '%SyntaxError%': $SyntaxError$3,
671
- '%ThrowTypeError%': ThrowTypeError$2,
672
- '%TypedArray%': TypedArray$2,
673
- '%TypeError%': $TypeError$5,
674
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$3 : Uint8Array,
675
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$3 : Uint8ClampedArray,
676
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$3 : Uint16Array,
677
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$3 : Uint32Array,
678
- '%URIError%': $URIError$2,
679
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$3 : WeakMap,
680
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$3 : WeakRef,
681
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$3 : WeakSet
682
- };
683
-
684
- if (getProto$2) {
685
- try {
686
- null.error; // eslint-disable-line no-unused-expressions
687
- } catch (e) {
688
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
689
- var errorProto$2 = getProto$2(getProto$2(e));
690
- INTRINSICS$2['%Error.prototype%'] = errorProto$2;
691
- }
692
- }
693
-
694
- var doEval$2 = function doEval(name) {
695
- var value;
696
- if (name === '%AsyncFunction%') {
697
- value = getEvalledConstructor$2('async function () {}');
698
- } else if (name === '%GeneratorFunction%') {
699
- value = getEvalledConstructor$2('function* () {}');
700
- } else if (name === '%AsyncGeneratorFunction%') {
701
- value = getEvalledConstructor$2('async function* () {}');
702
- } else if (name === '%AsyncGenerator%') {
703
- var fn = doEval('%AsyncGeneratorFunction%');
704
- if (fn) {
705
- value = fn.prototype;
706
- }
707
- } else if (name === '%AsyncIteratorPrototype%') {
708
- var gen = doEval('%AsyncGenerator%');
709
- if (gen && getProto$2) {
710
- value = getProto$2(gen.prototype);
711
- }
712
- }
713
-
714
- INTRINSICS$2[name] = value;
715
-
716
- return value;
717
- };
718
-
719
- var LEGACY_ALIASES$2 = {
720
- __proto__: null,
721
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
722
- '%ArrayPrototype%': ['Array', 'prototype'],
723
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
724
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
725
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
726
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
727
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
728
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
729
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
730
- '%BooleanPrototype%': ['Boolean', 'prototype'],
731
- '%DataViewPrototype%': ['DataView', 'prototype'],
732
- '%DatePrototype%': ['Date', 'prototype'],
733
- '%ErrorPrototype%': ['Error', 'prototype'],
734
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
735
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
736
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
737
- '%FunctionPrototype%': ['Function', 'prototype'],
738
- '%Generator%': ['GeneratorFunction', 'prototype'],
739
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
740
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
741
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
742
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
743
- '%JSONParse%': ['JSON', 'parse'],
744
- '%JSONStringify%': ['JSON', 'stringify'],
745
- '%MapPrototype%': ['Map', 'prototype'],
746
- '%NumberPrototype%': ['Number', 'prototype'],
747
- '%ObjectPrototype%': ['Object', 'prototype'],
748
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
749
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
750
- '%PromisePrototype%': ['Promise', 'prototype'],
751
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
752
- '%Promise_all%': ['Promise', 'all'],
753
- '%Promise_reject%': ['Promise', 'reject'],
754
- '%Promise_resolve%': ['Promise', 'resolve'],
755
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
756
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
757
- '%RegExpPrototype%': ['RegExp', 'prototype'],
758
- '%SetPrototype%': ['Set', 'prototype'],
759
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
760
- '%StringPrototype%': ['String', 'prototype'],
761
- '%SymbolPrototype%': ['Symbol', 'prototype'],
762
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
763
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
764
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
765
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
766
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
767
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
768
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
769
- '%URIErrorPrototype%': ['URIError', 'prototype'],
770
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
771
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
772
- };
773
-
774
- var bind$2 = functionBind;
775
- var hasOwn$3 = hasown;
776
- var $concat$3 = bind$2.call(Function.call, Array.prototype.concat);
777
- var $spliceApply$2 = bind$2.call(Function.apply, Array.prototype.splice);
778
- var $replace$3 = bind$2.call(Function.call, String.prototype.replace);
779
- var $strSlice$2 = bind$2.call(Function.call, String.prototype.slice);
780
- var $exec$2 = bind$2.call(Function.call, RegExp.prototype.exec);
781
-
782
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
783
- var rePropName$2 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
784
- var reEscapeChar$2 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
785
- var stringToPath$2 = function stringToPath(string) {
786
- var first = $strSlice$2(string, 0, 1);
787
- var last = $strSlice$2(string, -1);
788
- if (first === '%' && last !== '%') {
789
- throw new $SyntaxError$3('invalid intrinsic syntax, expected closing `%`');
790
- } else if (last === '%' && first !== '%') {
791
- throw new $SyntaxError$3('invalid intrinsic syntax, expected opening `%`');
792
- }
793
- var result = [];
794
- $replace$3(string, rePropName$2, function (match, number, quote, subString) {
795
- result[result.length] = quote ? $replace$3(subString, reEscapeChar$2, '$1') : number || match;
796
- });
797
- return result;
798
- };
799
- /* end adaptation */
800
-
801
- var getBaseIntrinsic$2 = function getBaseIntrinsic(name, allowMissing) {
802
- var intrinsicName = name;
803
- var alias;
804
- if (hasOwn$3(LEGACY_ALIASES$2, intrinsicName)) {
805
- alias = LEGACY_ALIASES$2[intrinsicName];
806
- intrinsicName = '%' + alias[0] + '%';
807
- }
808
-
809
- if (hasOwn$3(INTRINSICS$2, intrinsicName)) {
810
- var value = INTRINSICS$2[intrinsicName];
811
- if (value === needsEval$2) {
812
- value = doEval$2(intrinsicName);
813
- }
814
- if (typeof value === 'undefined' && !allowMissing) {
815
- throw new $TypeError$5('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
816
- }
817
-
818
- return {
819
- alias: alias,
820
- name: intrinsicName,
821
- value: value
822
- };
823
- }
824
-
825
- throw new $SyntaxError$3('intrinsic ' + name + ' does not exist!');
826
- };
827
-
828
- var getIntrinsic$3 = function GetIntrinsic(name, allowMissing) {
829
- if (typeof name !== 'string' || name.length === 0) {
830
- throw new $TypeError$5('intrinsic name must be a non-empty string');
831
- }
832
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
833
- throw new $TypeError$5('"allowMissing" argument must be a boolean');
834
- }
835
-
836
- if ($exec$2(/^%?[^%]*%?$/, name) === null) {
837
- throw new $SyntaxError$3('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
838
- }
839
- var parts = stringToPath$2(name);
840
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
841
-
842
- var intrinsic = getBaseIntrinsic$2('%' + intrinsicBaseName + '%', allowMissing);
843
- var intrinsicRealName = intrinsic.name;
844
- var value = intrinsic.value;
845
- var skipFurtherCaching = false;
846
-
847
- var alias = intrinsic.alias;
848
- if (alias) {
849
- intrinsicBaseName = alias[0];
850
- $spliceApply$2(parts, $concat$3([0, 1], alias));
851
- }
852
-
853
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
854
- var part = parts[i];
855
- var first = $strSlice$2(part, 0, 1);
856
- var last = $strSlice$2(part, -1);
857
- if (
858
- (
859
- (first === '"' || first === "'" || first === '`')
860
- || (last === '"' || last === "'" || last === '`')
861
- )
862
- && first !== last
863
- ) {
864
- throw new $SyntaxError$3('property names with quotes must have matching quotes');
865
- }
866
- if (part === 'constructor' || !isOwn) {
867
- skipFurtherCaching = true;
868
- }
869
-
870
- intrinsicBaseName += '.' + part;
871
- intrinsicRealName = '%' + intrinsicBaseName + '%';
872
-
873
- if (hasOwn$3(INTRINSICS$2, intrinsicRealName)) {
874
- value = INTRINSICS$2[intrinsicRealName];
875
- } else if (value != null) {
876
- if (!(part in value)) {
877
- if (!allowMissing) {
878
- throw new $TypeError$5('base intrinsic for ' + name + ' exists, but the property is not available.');
879
- }
880
- return void undefined$3;
881
- }
882
- if ($gOPD$3 && (i + 1) >= parts.length) {
883
- var desc = $gOPD$3(value, part);
884
- isOwn = !!desc;
885
-
886
- // By convention, when a data property is converted to an accessor
887
- // property to emulate a data property that does not suffer from
888
- // the override mistake, that accessor's getter is marked with
889
- // an `originalValue` property. Here, when we detect this, we
890
- // uphold the illusion by pretending to see that original data
891
- // property, i.e., returning the value rather than the getter
892
- // itself.
893
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
894
- value = desc.get;
895
- } else {
896
- value = value[part];
897
- }
898
- } else {
899
- isOwn = hasOwn$3(value, part);
900
- value = value[part];
901
- }
902
-
903
- if (isOwn && !skipFurtherCaching) {
904
- INTRINSICS$2[intrinsicRealName] = value;
905
- }
906
- }
907
- }
908
- return value;
909
- };
910
-
911
- var callBind$1 = {exports: {}};
912
-
913
- var undefined$2;
914
-
915
- var $Error$1 = esErrors;
916
- var $EvalError$1 = _eval;
917
- var $RangeError$1 = range;
918
- var $ReferenceError$1 = ref;
919
- var $SyntaxError$2 = syntax;
920
- var $TypeError$4 = type;
921
- var $URIError$1 = uri;
922
-
923
- var $Function$1 = Function;
924
-
925
- // eslint-disable-next-line consistent-return
926
- var getEvalledConstructor$1 = function (expressionSyntax) {
927
- try {
928
- return $Function$1('"use strict"; return (' + expressionSyntax + ').constructor;')();
929
- } catch (e) {}
930
- };
931
-
932
- var $gOPD$2 = Object.getOwnPropertyDescriptor;
933
- if ($gOPD$2) {
934
- try {
935
- $gOPD$2({}, '');
936
- } catch (e) {
937
- $gOPD$2 = null; // this is IE 8, which has a broken gOPD
938
- }
939
- }
940
-
941
- var throwTypeError$1 = function () {
942
- throw new $TypeError$4();
943
- };
944
- var ThrowTypeError$1 = $gOPD$2
945
- ? (function () {
946
- try {
947
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
948
- arguments.callee; // IE 8 does not throw here
949
- return throwTypeError$1;
950
- } catch (calleeThrows) {
951
- try {
952
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
953
- return $gOPD$2(arguments, 'callee').get;
954
- } catch (gOPDthrows) {
955
- return throwTypeError$1;
956
- }
957
- }
958
- }())
959
- : throwTypeError$1;
960
-
961
- var hasSymbols$1 = hasSymbols$4();
962
- var hasProto$1 = hasProto$4();
963
-
964
- var getProto$1 = Object.getPrototypeOf || (
965
- hasProto$1
966
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
967
- : null
968
- );
969
-
970
- var needsEval$1 = {};
971
-
972
- var TypedArray$1 = typeof Uint8Array === 'undefined' || !getProto$1 ? undefined$2 : getProto$1(Uint8Array);
973
-
974
- var INTRINSICS$1 = {
975
- __proto__: null,
976
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$2 : AggregateError,
977
- '%Array%': Array,
978
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$2 : ArrayBuffer,
979
- '%ArrayIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$2,
980
- '%AsyncFromSyncIteratorPrototype%': undefined$2,
981
- '%AsyncFunction%': needsEval$1,
982
- '%AsyncGenerator%': needsEval$1,
983
- '%AsyncGeneratorFunction%': needsEval$1,
984
- '%AsyncIteratorPrototype%': needsEval$1,
985
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$2 : Atomics,
986
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$2 : BigInt,
987
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$2 : BigInt64Array,
988
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$2 : BigUint64Array,
989
- '%Boolean%': Boolean,
990
- '%DataView%': typeof DataView === 'undefined' ? undefined$2 : DataView,
991
- '%Date%': Date,
992
- '%decodeURI%': decodeURI,
993
- '%decodeURIComponent%': decodeURIComponent,
994
- '%encodeURI%': encodeURI,
995
- '%encodeURIComponent%': encodeURIComponent,
996
- '%Error%': $Error$1,
997
- '%eval%': eval, // eslint-disable-line no-eval
998
- '%EvalError%': $EvalError$1,
999
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$2 : Float32Array,
1000
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$2 : Float64Array,
1001
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$2 : FinalizationRegistry,
1002
- '%Function%': $Function$1,
1003
- '%GeneratorFunction%': needsEval$1,
1004
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$2 : Int8Array,
1005
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$2 : Int16Array,
1006
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$2 : Int32Array,
1007
- '%isFinite%': isFinite,
1008
- '%isNaN%': isNaN,
1009
- '%IteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$2,
1010
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$2,
1011
- '%Map%': typeof Map === 'undefined' ? undefined$2 : Map,
1012
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$1 || !getProto$1 ? undefined$2 : getProto$1(new Map()[Symbol.iterator]()),
1013
- '%Math%': Math,
1014
- '%Number%': Number,
1015
- '%Object%': Object,
1016
- '%parseFloat%': parseFloat,
1017
- '%parseInt%': parseInt,
1018
- '%Promise%': typeof Promise === 'undefined' ? undefined$2 : Promise,
1019
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$2 : Proxy,
1020
- '%RangeError%': $RangeError$1,
1021
- '%ReferenceError%': $ReferenceError$1,
1022
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$2 : Reflect,
1023
- '%RegExp%': RegExp,
1024
- '%Set%': typeof Set === 'undefined' ? undefined$2 : Set,
1025
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$1 || !getProto$1 ? undefined$2 : getProto$1(new Set()[Symbol.iterator]()),
1026
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$2 : SharedArrayBuffer,
1027
- '%String%': String,
1028
- '%StringIteratorPrototype%': hasSymbols$1 && getProto$1 ? getProto$1(''[Symbol.iterator]()) : undefined$2,
1029
- '%Symbol%': hasSymbols$1 ? Symbol : undefined$2,
1030
- '%SyntaxError%': $SyntaxError$2,
1031
- '%ThrowTypeError%': ThrowTypeError$1,
1032
- '%TypedArray%': TypedArray$1,
1033
- '%TypeError%': $TypeError$4,
1034
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$2 : Uint8Array,
1035
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$2 : Uint8ClampedArray,
1036
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$2 : Uint16Array,
1037
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$2 : Uint32Array,
1038
- '%URIError%': $URIError$1,
1039
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$2 : WeakMap,
1040
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$2 : WeakRef,
1041
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$2 : WeakSet
1042
- };
1043
-
1044
- if (getProto$1) {
1045
- try {
1046
- null.error; // eslint-disable-line no-unused-expressions
1047
- } catch (e) {
1048
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
1049
- var errorProto$1 = getProto$1(getProto$1(e));
1050
- INTRINSICS$1['%Error.prototype%'] = errorProto$1;
1051
- }
1052
- }
1053
-
1054
- var doEval$1 = function doEval(name) {
1055
- var value;
1056
- if (name === '%AsyncFunction%') {
1057
- value = getEvalledConstructor$1('async function () {}');
1058
- } else if (name === '%GeneratorFunction%') {
1059
- value = getEvalledConstructor$1('function* () {}');
1060
- } else if (name === '%AsyncGeneratorFunction%') {
1061
- value = getEvalledConstructor$1('async function* () {}');
1062
- } else if (name === '%AsyncGenerator%') {
1063
- var fn = doEval('%AsyncGeneratorFunction%');
1064
- if (fn) {
1065
- value = fn.prototype;
1066
- }
1067
- } else if (name === '%AsyncIteratorPrototype%') {
1068
- var gen = doEval('%AsyncGenerator%');
1069
- if (gen && getProto$1) {
1070
- value = getProto$1(gen.prototype);
1071
- }
1072
- }
1073
-
1074
- INTRINSICS$1[name] = value;
1075
-
1076
- return value;
1077
- };
1078
-
1079
- var LEGACY_ALIASES$1 = {
1080
- __proto__: null,
1081
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1082
- '%ArrayPrototype%': ['Array', 'prototype'],
1083
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1084
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1085
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1086
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1087
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1088
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1089
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1090
- '%BooleanPrototype%': ['Boolean', 'prototype'],
1091
- '%DataViewPrototype%': ['DataView', 'prototype'],
1092
- '%DatePrototype%': ['Date', 'prototype'],
1093
- '%ErrorPrototype%': ['Error', 'prototype'],
1094
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1095
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1096
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1097
- '%FunctionPrototype%': ['Function', 'prototype'],
1098
- '%Generator%': ['GeneratorFunction', 'prototype'],
1099
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1100
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1101
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1102
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1103
- '%JSONParse%': ['JSON', 'parse'],
1104
- '%JSONStringify%': ['JSON', 'stringify'],
1105
- '%MapPrototype%': ['Map', 'prototype'],
1106
- '%NumberPrototype%': ['Number', 'prototype'],
1107
- '%ObjectPrototype%': ['Object', 'prototype'],
1108
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1109
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1110
- '%PromisePrototype%': ['Promise', 'prototype'],
1111
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1112
- '%Promise_all%': ['Promise', 'all'],
1113
- '%Promise_reject%': ['Promise', 'reject'],
1114
- '%Promise_resolve%': ['Promise', 'resolve'],
1115
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1116
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1117
- '%RegExpPrototype%': ['RegExp', 'prototype'],
1118
- '%SetPrototype%': ['Set', 'prototype'],
1119
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1120
- '%StringPrototype%': ['String', 'prototype'],
1121
- '%SymbolPrototype%': ['Symbol', 'prototype'],
1122
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1123
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1124
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1125
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1126
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1127
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1128
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1129
- '%URIErrorPrototype%': ['URIError', 'prototype'],
1130
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1131
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
1132
- };
1133
-
1134
- var bind$1 = functionBind;
1135
- var hasOwn$2 = hasown;
1136
- var $concat$2 = bind$1.call(Function.call, Array.prototype.concat);
1137
- var $spliceApply$1 = bind$1.call(Function.apply, Array.prototype.splice);
1138
- var $replace$2 = bind$1.call(Function.call, String.prototype.replace);
1139
- var $strSlice$1 = bind$1.call(Function.call, String.prototype.slice);
1140
- var $exec$1 = bind$1.call(Function.call, RegExp.prototype.exec);
1141
-
1142
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1143
- var rePropName$1 = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1144
- var reEscapeChar$1 = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1145
- var stringToPath$1 = function stringToPath(string) {
1146
- var first = $strSlice$1(string, 0, 1);
1147
- var last = $strSlice$1(string, -1);
1148
- if (first === '%' && last !== '%') {
1149
- throw new $SyntaxError$2('invalid intrinsic syntax, expected closing `%`');
1150
- } else if (last === '%' && first !== '%') {
1151
- throw new $SyntaxError$2('invalid intrinsic syntax, expected opening `%`');
1152
- }
1153
- var result = [];
1154
- $replace$2(string, rePropName$1, function (match, number, quote, subString) {
1155
- result[result.length] = quote ? $replace$2(subString, reEscapeChar$1, '$1') : number || match;
1156
- });
1157
- return result;
1158
- };
1159
- /* end adaptation */
1160
-
1161
- var getBaseIntrinsic$1 = function getBaseIntrinsic(name, allowMissing) {
1162
- var intrinsicName = name;
1163
- var alias;
1164
- if (hasOwn$2(LEGACY_ALIASES$1, intrinsicName)) {
1165
- alias = LEGACY_ALIASES$1[intrinsicName];
1166
- intrinsicName = '%' + alias[0] + '%';
1167
- }
1168
-
1169
- if (hasOwn$2(INTRINSICS$1, intrinsicName)) {
1170
- var value = INTRINSICS$1[intrinsicName];
1171
- if (value === needsEval$1) {
1172
- value = doEval$1(intrinsicName);
1173
- }
1174
- if (typeof value === 'undefined' && !allowMissing) {
1175
- throw new $TypeError$4('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1176
- }
1177
-
1178
- return {
1179
- alias: alias,
1180
- name: intrinsicName,
1181
- value: value
1182
- };
1183
- }
1184
-
1185
- throw new $SyntaxError$2('intrinsic ' + name + ' does not exist!');
1186
- };
1187
-
1188
- var getIntrinsic$2 = function GetIntrinsic(name, allowMissing) {
1189
- if (typeof name !== 'string' || name.length === 0) {
1190
- throw new $TypeError$4('intrinsic name must be a non-empty string');
1191
- }
1192
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1193
- throw new $TypeError$4('"allowMissing" argument must be a boolean');
1194
- }
1195
-
1196
- if ($exec$1(/^%?[^%]*%?$/, name) === null) {
1197
- throw new $SyntaxError$2('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
1198
- }
1199
- var parts = stringToPath$1(name);
1200
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1201
-
1202
- var intrinsic = getBaseIntrinsic$1('%' + intrinsicBaseName + '%', allowMissing);
1203
- var intrinsicRealName = intrinsic.name;
1204
- var value = intrinsic.value;
1205
- var skipFurtherCaching = false;
1206
-
1207
- var alias = intrinsic.alias;
1208
- if (alias) {
1209
- intrinsicBaseName = alias[0];
1210
- $spliceApply$1(parts, $concat$2([0, 1], alias));
1211
- }
1212
-
1213
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1214
- var part = parts[i];
1215
- var first = $strSlice$1(part, 0, 1);
1216
- var last = $strSlice$1(part, -1);
1217
- if (
1218
- (
1219
- (first === '"' || first === "'" || first === '`')
1220
- || (last === '"' || last === "'" || last === '`')
1221
- )
1222
- && first !== last
1223
- ) {
1224
- throw new $SyntaxError$2('property names with quotes must have matching quotes');
1225
- }
1226
- if (part === 'constructor' || !isOwn) {
1227
- skipFurtherCaching = true;
1228
- }
1229
-
1230
- intrinsicBaseName += '.' + part;
1231
- intrinsicRealName = '%' + intrinsicBaseName + '%';
1232
-
1233
- if (hasOwn$2(INTRINSICS$1, intrinsicRealName)) {
1234
- value = INTRINSICS$1[intrinsicRealName];
1235
- } else if (value != null) {
1236
- if (!(part in value)) {
1237
- if (!allowMissing) {
1238
- throw new $TypeError$4('base intrinsic for ' + name + ' exists, but the property is not available.');
1239
- }
1240
- return void undefined$2;
1241
- }
1242
- if ($gOPD$2 && (i + 1) >= parts.length) {
1243
- var desc = $gOPD$2(value, part);
1244
- isOwn = !!desc;
1245
-
1246
- // By convention, when a data property is converted to an accessor
1247
- // property to emulate a data property that does not suffer from
1248
- // the override mistake, that accessor's getter is marked with
1249
- // an `originalValue` property. Here, when we detect this, we
1250
- // uphold the illusion by pretending to see that original data
1251
- // property, i.e., returning the value rather than the getter
1252
- // itself.
1253
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1254
- value = desc.get;
1255
- } else {
1256
- value = value[part];
1257
- }
1258
- } else {
1259
- isOwn = hasOwn$2(value, part);
1260
- value = value[part];
1261
- }
1262
-
1263
- if (isOwn && !skipFurtherCaching) {
1264
- INTRINSICS$1[intrinsicRealName] = value;
1265
- }
1266
- }
1267
- }
1268
- return value;
1269
- };
1270
-
1271
- var getIntrinsic$1;
1272
- var hasRequiredGetIntrinsic;
1273
-
1274
- function requireGetIntrinsic () {
1275
- if (hasRequiredGetIntrinsic) return getIntrinsic$1;
1276
- hasRequiredGetIntrinsic = 1;
1277
-
1278
- var undefined$1;
1279
-
1280
- var $Error = esErrors;
1281
- var $EvalError = _eval;
1282
- var $RangeError = range;
1283
- var $ReferenceError = ref;
1284
- var $SyntaxError = syntax;
1285
- var $TypeError = type;
1286
- var $URIError = uri;
1287
-
1288
- var $Function = Function;
1289
-
1290
- // eslint-disable-next-line consistent-return
1291
- var getEvalledConstructor = function (expressionSyntax) {
1292
- try {
1293
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1294
- } catch (e) {}
1295
- };
1296
-
1297
- var $gOPD = Object.getOwnPropertyDescriptor;
1298
- if ($gOPD) {
1299
- try {
1300
- $gOPD({}, '');
1301
- } catch (e) {
1302
- $gOPD = null; // this is IE 8, which has a broken gOPD
1303
- }
1304
- }
1305
-
1306
- var throwTypeError = function () {
1307
- throw new $TypeError();
1308
- };
1309
- var ThrowTypeError = $gOPD
1310
- ? (function () {
1311
- try {
1312
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
1313
- arguments.callee; // IE 8 does not throw here
1314
- return throwTypeError;
1315
- } catch (calleeThrows) {
1316
- try {
1317
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1318
- return $gOPD(arguments, 'callee').get;
1319
- } catch (gOPDthrows) {
1320
- return throwTypeError;
1321
- }
1322
- }
1323
- }())
1324
- : throwTypeError;
1325
-
1326
- var hasSymbols = hasSymbols$4();
1327
- var hasProto = hasProto$4();
1328
-
1329
- var getProto = Object.getPrototypeOf || (
1330
- hasProto
1331
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
1332
- : null
1333
- );
1334
-
1335
- var needsEval = {};
1336
-
1337
- var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
1338
-
1339
- var INTRINSICS = {
1340
- __proto__: null,
1341
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1342
- '%Array%': Array,
1343
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1344
- '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
1345
- '%AsyncFromSyncIteratorPrototype%': undefined$1,
1346
- '%AsyncFunction%': needsEval,
1347
- '%AsyncGenerator%': needsEval,
1348
- '%AsyncGeneratorFunction%': needsEval,
1349
- '%AsyncIteratorPrototype%': needsEval,
1350
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1351
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1352
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
1353
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
1354
- '%Boolean%': Boolean,
1355
- '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
1356
- '%Date%': Date,
1357
- '%decodeURI%': decodeURI,
1358
- '%decodeURIComponent%': decodeURIComponent,
1359
- '%encodeURI%': encodeURI,
1360
- '%encodeURIComponent%': encodeURIComponent,
1361
- '%Error%': $Error,
1362
- '%eval%': eval, // eslint-disable-line no-eval
1363
- '%EvalError%': $EvalError,
1364
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
1365
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1366
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1367
- '%Function%': $Function,
1368
- '%GeneratorFunction%': needsEval,
1369
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
1370
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
1371
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
1372
- '%isFinite%': isFinite,
1373
- '%isNaN%': isNaN,
1374
- '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1375
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
1376
- '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1377
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
1378
- '%Math%': Math,
1379
- '%Number%': Number,
1380
- '%Object%': Object,
1381
- '%parseFloat%': parseFloat,
1382
- '%parseInt%': parseInt,
1383
- '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
1384
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1385
- '%RangeError%': $RangeError,
1386
- '%ReferenceError%': $ReferenceError,
1387
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1388
- '%RegExp%': RegExp,
1389
- '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1390
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
1391
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
1392
- '%String%': String,
1393
- '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
1394
- '%Symbol%': hasSymbols ? Symbol : undefined$1,
1395
- '%SyntaxError%': $SyntaxError,
1396
- '%ThrowTypeError%': ThrowTypeError,
1397
- '%TypedArray%': TypedArray,
1398
- '%TypeError%': $TypeError,
1399
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
1400
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
1401
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
1402
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
1403
- '%URIError%': $URIError,
1404
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1405
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1406
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1407
- };
1408
-
1409
- if (getProto) {
1410
- try {
1411
- null.error; // eslint-disable-line no-unused-expressions
1412
- } catch (e) {
1413
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
1414
- var errorProto = getProto(getProto(e));
1415
- INTRINSICS['%Error.prototype%'] = errorProto;
1416
- }
1417
- }
1418
-
1419
- var doEval = function doEval(name) {
1420
- var value;
1421
- if (name === '%AsyncFunction%') {
1422
- value = getEvalledConstructor('async function () {}');
1423
- } else if (name === '%GeneratorFunction%') {
1424
- value = getEvalledConstructor('function* () {}');
1425
- } else if (name === '%AsyncGeneratorFunction%') {
1426
- value = getEvalledConstructor('async function* () {}');
1427
- } else if (name === '%AsyncGenerator%') {
1428
- var fn = doEval('%AsyncGeneratorFunction%');
1429
- if (fn) {
1430
- value = fn.prototype;
1431
- }
1432
- } else if (name === '%AsyncIteratorPrototype%') {
1433
- var gen = doEval('%AsyncGenerator%');
1434
- if (gen && getProto) {
1435
- value = getProto(gen.prototype);
1436
- }
1437
- }
1438
-
1439
- INTRINSICS[name] = value;
1440
-
1441
- return value;
1442
- };
1443
-
1444
- var LEGACY_ALIASES = {
1445
- __proto__: null,
1446
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1447
- '%ArrayPrototype%': ['Array', 'prototype'],
1448
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1449
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1450
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1451
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1452
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1453
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1454
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1455
- '%BooleanPrototype%': ['Boolean', 'prototype'],
1456
- '%DataViewPrototype%': ['DataView', 'prototype'],
1457
- '%DatePrototype%': ['Date', 'prototype'],
1458
- '%ErrorPrototype%': ['Error', 'prototype'],
1459
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1460
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1461
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1462
- '%FunctionPrototype%': ['Function', 'prototype'],
1463
- '%Generator%': ['GeneratorFunction', 'prototype'],
1464
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1465
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1466
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1467
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1468
- '%JSONParse%': ['JSON', 'parse'],
1469
- '%JSONStringify%': ['JSON', 'stringify'],
1470
- '%MapPrototype%': ['Map', 'prototype'],
1471
- '%NumberPrototype%': ['Number', 'prototype'],
1472
- '%ObjectPrototype%': ['Object', 'prototype'],
1473
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1474
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1475
- '%PromisePrototype%': ['Promise', 'prototype'],
1476
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1477
- '%Promise_all%': ['Promise', 'all'],
1478
- '%Promise_reject%': ['Promise', 'reject'],
1479
- '%Promise_resolve%': ['Promise', 'resolve'],
1480
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1481
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1482
- '%RegExpPrototype%': ['RegExp', 'prototype'],
1483
- '%SetPrototype%': ['Set', 'prototype'],
1484
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1485
- '%StringPrototype%': ['String', 'prototype'],
1486
- '%SymbolPrototype%': ['Symbol', 'prototype'],
1487
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1488
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1489
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1490
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1491
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1492
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1493
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1494
- '%URIErrorPrototype%': ['URIError', 'prototype'],
1495
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1496
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
1497
- };
1498
-
1499
- var bind = functionBind;
1500
- var hasOwn = hasown;
1501
- var $concat = bind.call(Function.call, Array.prototype.concat);
1502
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
1503
- var $replace = bind.call(Function.call, String.prototype.replace);
1504
- var $strSlice = bind.call(Function.call, String.prototype.slice);
1505
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
1506
-
1507
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1508
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1509
- var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1510
- var stringToPath = function stringToPath(string) {
1511
- var first = $strSlice(string, 0, 1);
1512
- var last = $strSlice(string, -1);
1513
- if (first === '%' && last !== '%') {
1514
- throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
1515
- } else if (last === '%' && first !== '%') {
1516
- throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
1517
- }
1518
- var result = [];
1519
- $replace(string, rePropName, function (match, number, quote, subString) {
1520
- result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
1521
- });
1522
- return result;
1523
- };
1524
- /* end adaptation */
1525
-
1526
- var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1527
- var intrinsicName = name;
1528
- var alias;
1529
- if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
1530
- alias = LEGACY_ALIASES[intrinsicName];
1531
- intrinsicName = '%' + alias[0] + '%';
1532
- }
1533
-
1534
- if (hasOwn(INTRINSICS, intrinsicName)) {
1535
- var value = INTRINSICS[intrinsicName];
1536
- if (value === needsEval) {
1537
- value = doEval(intrinsicName);
1538
- }
1539
- if (typeof value === 'undefined' && !allowMissing) {
1540
- throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1541
- }
1542
-
1543
- return {
1544
- alias: alias,
1545
- name: intrinsicName,
1546
- value: value
1547
- };
1548
- }
1549
-
1550
- throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
1551
- };
1552
-
1553
- getIntrinsic$1 = function GetIntrinsic(name, allowMissing) {
1554
- if (typeof name !== 'string' || name.length === 0) {
1555
- throw new $TypeError('intrinsic name must be a non-empty string');
1556
- }
1557
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1558
- throw new $TypeError('"allowMissing" argument must be a boolean');
1559
- }
1560
-
1561
- if ($exec(/^%?[^%]*%?$/, name) === null) {
1562
- throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
1563
- }
1564
- var parts = stringToPath(name);
1565
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1566
-
1567
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1568
- var intrinsicRealName = intrinsic.name;
1569
- var value = intrinsic.value;
1570
- var skipFurtherCaching = false;
1571
-
1572
- var alias = intrinsic.alias;
1573
- if (alias) {
1574
- intrinsicBaseName = alias[0];
1575
- $spliceApply(parts, $concat([0, 1], alias));
1576
- }
1577
-
1578
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1579
- var part = parts[i];
1580
- var first = $strSlice(part, 0, 1);
1581
- var last = $strSlice(part, -1);
1582
- if (
1583
- (
1584
- (first === '"' || first === "'" || first === '`')
1585
- || (last === '"' || last === "'" || last === '`')
1586
- )
1587
- && first !== last
1588
- ) {
1589
- throw new $SyntaxError('property names with quotes must have matching quotes');
1590
- }
1591
- if (part === 'constructor' || !isOwn) {
1592
- skipFurtherCaching = true;
1593
- }
1594
-
1595
- intrinsicBaseName += '.' + part;
1596
- intrinsicRealName = '%' + intrinsicBaseName + '%';
1597
-
1598
- if (hasOwn(INTRINSICS, intrinsicRealName)) {
1599
- value = INTRINSICS[intrinsicRealName];
1600
- } else if (value != null) {
1601
- if (!(part in value)) {
1602
- if (!allowMissing) {
1603
- throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
1604
- }
1605
- return void undefined$1;
1606
- }
1607
- if ($gOPD && (i + 1) >= parts.length) {
1608
- var desc = $gOPD(value, part);
1609
- isOwn = !!desc;
1610
-
1611
- // By convention, when a data property is converted to an accessor
1612
- // property to emulate a data property that does not suffer from
1613
- // the override mistake, that accessor's getter is marked with
1614
- // an `originalValue` property. Here, when we detect this, we
1615
- // uphold the illusion by pretending to see that original data
1616
- // property, i.e., returning the value rather than the getter
1617
- // itself.
1618
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1619
- value = desc.get;
1620
- } else {
1621
- value = value[part];
1622
- }
1623
- } else {
1624
- isOwn = hasOwn(value, part);
1625
- value = value[part];
1626
- }
1627
-
1628
- if (isOwn && !skipFurtherCaching) {
1629
- INTRINSICS[intrinsicRealName] = value;
1630
- }
1631
- }
1632
- }
1633
- return value;
1634
- };
1635
- return getIntrinsic$1;
1636
- }
1637
-
1638
- var esDefineProperty;
1639
- var hasRequiredEsDefineProperty;
1640
-
1641
- function requireEsDefineProperty () {
1642
- if (hasRequiredEsDefineProperty) return esDefineProperty;
1643
- hasRequiredEsDefineProperty = 1;
1644
-
1645
- var GetIntrinsic = requireGetIntrinsic();
1646
-
1647
- /** @type {import('.')} */
1648
- var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
1649
- if ($defineProperty) {
1650
- try {
1651
- $defineProperty({}, 'a', { value: 1 });
1652
- } catch (e) {
1653
- // IE 8 has a broken defineProperty
1654
- $defineProperty = false;
1655
- }
1656
- }
1657
-
1658
- esDefineProperty = $defineProperty;
1659
- return esDefineProperty;
1660
- }
1661
-
1662
- var undefined$1;
1663
-
1664
- var $Error = esErrors;
1665
- var $EvalError = _eval;
1666
- var $RangeError = range;
1667
- var $ReferenceError = ref;
1668
- var $SyntaxError$1 = syntax;
1669
- var $TypeError$3 = type;
1670
- var $URIError = uri;
1671
-
1672
- var $Function = Function;
1673
-
1674
- // eslint-disable-next-line consistent-return
1675
- var getEvalledConstructor = function (expressionSyntax) {
1676
- try {
1677
- return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
1678
- } catch (e) {}
1679
- };
1680
-
1681
- var $gOPD$1 = Object.getOwnPropertyDescriptor;
1682
- if ($gOPD$1) {
1683
- try {
1684
- $gOPD$1({}, '');
1685
- } catch (e) {
1686
- $gOPD$1 = null; // this is IE 8, which has a broken gOPD
1687
- }
1688
- }
1689
-
1690
- var throwTypeError = function () {
1691
- throw new $TypeError$3();
1692
- };
1693
- var ThrowTypeError = $gOPD$1
1694
- ? (function () {
1695
- try {
1696
- // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
1697
- arguments.callee; // IE 8 does not throw here
1698
- return throwTypeError;
1699
- } catch (calleeThrows) {
1700
- try {
1701
- // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
1702
- return $gOPD$1(arguments, 'callee').get;
1703
- } catch (gOPDthrows) {
1704
- return throwTypeError;
1705
- }
1706
- }
1707
- }())
1708
- : throwTypeError;
1709
-
1710
- var hasSymbols = hasSymbols$4();
1711
- var hasProto = hasProto$4();
1712
-
1713
- var getProto = Object.getPrototypeOf || (
1714
- hasProto
1715
- ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
1716
- : null
1717
- );
1718
-
1719
- var needsEval = {};
1720
-
1721
- var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined$1 : getProto(Uint8Array);
1722
-
1723
- var INTRINSICS = {
1724
- __proto__: null,
1725
- '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
1726
- '%Array%': Array,
1727
- '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
1728
- '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined$1,
1729
- '%AsyncFromSyncIteratorPrototype%': undefined$1,
1730
- '%AsyncFunction%': needsEval,
1731
- '%AsyncGenerator%': needsEval,
1732
- '%AsyncGeneratorFunction%': needsEval,
1733
- '%AsyncIteratorPrototype%': needsEval,
1734
- '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
1735
- '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
1736
- '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
1737
- '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
1738
- '%Boolean%': Boolean,
1739
- '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
1740
- '%Date%': Date,
1741
- '%decodeURI%': decodeURI,
1742
- '%decodeURIComponent%': decodeURIComponent,
1743
- '%encodeURI%': encodeURI,
1744
- '%encodeURIComponent%': encodeURIComponent,
1745
- '%Error%': $Error,
1746
- '%eval%': eval, // eslint-disable-line no-eval
1747
- '%EvalError%': $EvalError,
1748
- '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
1749
- '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
1750
- '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
1751
- '%Function%': $Function,
1752
- '%GeneratorFunction%': needsEval,
1753
- '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
1754
- '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
1755
- '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
1756
- '%isFinite%': isFinite,
1757
- '%isNaN%': isNaN,
1758
- '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
1759
- '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
1760
- '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
1761
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
1762
- '%Math%': Math,
1763
- '%Number%': Number,
1764
- '%Object%': Object,
1765
- '%parseFloat%': parseFloat,
1766
- '%parseInt%': parseInt,
1767
- '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
1768
- '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
1769
- '%RangeError%': $RangeError,
1770
- '%ReferenceError%': $ReferenceError,
1771
- '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
1772
- '%RegExp%': RegExp,
1773
- '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
1774
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
1775
- '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
1776
- '%String%': String,
1777
- '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined$1,
1778
- '%Symbol%': hasSymbols ? Symbol : undefined$1,
1779
- '%SyntaxError%': $SyntaxError$1,
1780
- '%ThrowTypeError%': ThrowTypeError,
1781
- '%TypedArray%': TypedArray,
1782
- '%TypeError%': $TypeError$3,
1783
- '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
1784
- '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
1785
- '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
1786
- '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
1787
- '%URIError%': $URIError,
1788
- '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
1789
- '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
1790
- '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
1791
- };
1792
-
1793
- if (getProto) {
1794
- try {
1795
- null.error; // eslint-disable-line no-unused-expressions
1796
- } catch (e) {
1797
- // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
1798
- var errorProto = getProto(getProto(e));
1799
- INTRINSICS['%Error.prototype%'] = errorProto;
1800
- }
1801
- }
1802
-
1803
- var doEval = function doEval(name) {
1804
- var value;
1805
- if (name === '%AsyncFunction%') {
1806
- value = getEvalledConstructor('async function () {}');
1807
- } else if (name === '%GeneratorFunction%') {
1808
- value = getEvalledConstructor('function* () {}');
1809
- } else if (name === '%AsyncGeneratorFunction%') {
1810
- value = getEvalledConstructor('async function* () {}');
1811
- } else if (name === '%AsyncGenerator%') {
1812
- var fn = doEval('%AsyncGeneratorFunction%');
1813
- if (fn) {
1814
- value = fn.prototype;
1815
- }
1816
- } else if (name === '%AsyncIteratorPrototype%') {
1817
- var gen = doEval('%AsyncGenerator%');
1818
- if (gen && getProto) {
1819
- value = getProto(gen.prototype);
1820
- }
1821
- }
1822
-
1823
- INTRINSICS[name] = value;
1824
-
1825
- return value;
1826
- };
1827
-
1828
- var LEGACY_ALIASES = {
1829
- __proto__: null,
1830
- '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
1831
- '%ArrayPrototype%': ['Array', 'prototype'],
1832
- '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
1833
- '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
1834
- '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
1835
- '%ArrayProto_values%': ['Array', 'prototype', 'values'],
1836
- '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
1837
- '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
1838
- '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
1839
- '%BooleanPrototype%': ['Boolean', 'prototype'],
1840
- '%DataViewPrototype%': ['DataView', 'prototype'],
1841
- '%DatePrototype%': ['Date', 'prototype'],
1842
- '%ErrorPrototype%': ['Error', 'prototype'],
1843
- '%EvalErrorPrototype%': ['EvalError', 'prototype'],
1844
- '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
1845
- '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
1846
- '%FunctionPrototype%': ['Function', 'prototype'],
1847
- '%Generator%': ['GeneratorFunction', 'prototype'],
1848
- '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
1849
- '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
1850
- '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
1851
- '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
1852
- '%JSONParse%': ['JSON', 'parse'],
1853
- '%JSONStringify%': ['JSON', 'stringify'],
1854
- '%MapPrototype%': ['Map', 'prototype'],
1855
- '%NumberPrototype%': ['Number', 'prototype'],
1856
- '%ObjectPrototype%': ['Object', 'prototype'],
1857
- '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
1858
- '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
1859
- '%PromisePrototype%': ['Promise', 'prototype'],
1860
- '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
1861
- '%Promise_all%': ['Promise', 'all'],
1862
- '%Promise_reject%': ['Promise', 'reject'],
1863
- '%Promise_resolve%': ['Promise', 'resolve'],
1864
- '%RangeErrorPrototype%': ['RangeError', 'prototype'],
1865
- '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
1866
- '%RegExpPrototype%': ['RegExp', 'prototype'],
1867
- '%SetPrototype%': ['Set', 'prototype'],
1868
- '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
1869
- '%StringPrototype%': ['String', 'prototype'],
1870
- '%SymbolPrototype%': ['Symbol', 'prototype'],
1871
- '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
1872
- '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
1873
- '%TypeErrorPrototype%': ['TypeError', 'prototype'],
1874
- '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
1875
- '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
1876
- '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
1877
- '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
1878
- '%URIErrorPrototype%': ['URIError', 'prototype'],
1879
- '%WeakMapPrototype%': ['WeakMap', 'prototype'],
1880
- '%WeakSetPrototype%': ['WeakSet', 'prototype']
1881
- };
1882
-
1883
- var bind = functionBind;
1884
- var hasOwn$1 = hasown;
1885
- var $concat$1 = bind.call(Function.call, Array.prototype.concat);
1886
- var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
1887
- var $replace$1 = bind.call(Function.call, String.prototype.replace);
1888
- var $strSlice = bind.call(Function.call, String.prototype.slice);
1889
- var $exec = bind.call(Function.call, RegExp.prototype.exec);
1890
-
1891
- /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
1892
- var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
1893
- var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
1894
- var stringToPath = function stringToPath(string) {
1895
- var first = $strSlice(string, 0, 1);
1896
- var last = $strSlice(string, -1);
1897
- if (first === '%' && last !== '%') {
1898
- throw new $SyntaxError$1('invalid intrinsic syntax, expected closing `%`');
1899
- } else if (last === '%' && first !== '%') {
1900
- throw new $SyntaxError$1('invalid intrinsic syntax, expected opening `%`');
1901
- }
1902
- var result = [];
1903
- $replace$1(string, rePropName, function (match, number, quote, subString) {
1904
- result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
1905
- });
1906
- return result;
1907
- };
1908
- /* end adaptation */
1909
-
1910
- var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
1911
- var intrinsicName = name;
1912
- var alias;
1913
- if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
1914
- alias = LEGACY_ALIASES[intrinsicName];
1915
- intrinsicName = '%' + alias[0] + '%';
1916
- }
1917
-
1918
- if (hasOwn$1(INTRINSICS, intrinsicName)) {
1919
- var value = INTRINSICS[intrinsicName];
1920
- if (value === needsEval) {
1921
- value = doEval(intrinsicName);
1922
- }
1923
- if (typeof value === 'undefined' && !allowMissing) {
1924
- throw new $TypeError$3('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
1925
- }
1926
-
1927
- return {
1928
- alias: alias,
1929
- name: intrinsicName,
1930
- value: value
1931
- };
1932
- }
1933
-
1934
- throw new $SyntaxError$1('intrinsic ' + name + ' does not exist!');
1935
- };
1936
-
1937
- var getIntrinsic = function GetIntrinsic(name, allowMissing) {
1938
- if (typeof name !== 'string' || name.length === 0) {
1939
- throw new $TypeError$3('intrinsic name must be a non-empty string');
1940
- }
1941
- if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
1942
- throw new $TypeError$3('"allowMissing" argument must be a boolean');
1943
- }
1944
-
1945
- if ($exec(/^%?[^%]*%?$/, name) === null) {
1946
- throw new $SyntaxError$1('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
1947
- }
1948
- var parts = stringToPath(name);
1949
- var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
1950
-
1951
- var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
1952
- var intrinsicRealName = intrinsic.name;
1953
- var value = intrinsic.value;
1954
- var skipFurtherCaching = false;
1955
-
1956
- var alias = intrinsic.alias;
1957
- if (alias) {
1958
- intrinsicBaseName = alias[0];
1959
- $spliceApply(parts, $concat$1([0, 1], alias));
1960
- }
1961
-
1962
- for (var i = 1, isOwn = true; i < parts.length; i += 1) {
1963
- var part = parts[i];
1964
- var first = $strSlice(part, 0, 1);
1965
- var last = $strSlice(part, -1);
1966
- if (
1967
- (
1968
- (first === '"' || first === "'" || first === '`')
1969
- || (last === '"' || last === "'" || last === '`')
1970
- )
1971
- && first !== last
1972
- ) {
1973
- throw new $SyntaxError$1('property names with quotes must have matching quotes');
1974
- }
1975
- if (part === 'constructor' || !isOwn) {
1976
- skipFurtherCaching = true;
1977
- }
1978
-
1979
- intrinsicBaseName += '.' + part;
1980
- intrinsicRealName = '%' + intrinsicBaseName + '%';
1981
-
1982
- if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
1983
- value = INTRINSICS[intrinsicRealName];
1984
- } else if (value != null) {
1985
- if (!(part in value)) {
1986
- if (!allowMissing) {
1987
- throw new $TypeError$3('base intrinsic for ' + name + ' exists, but the property is not available.');
1988
- }
1989
- return void undefined$1;
1990
- }
1991
- if ($gOPD$1 && (i + 1) >= parts.length) {
1992
- var desc = $gOPD$1(value, part);
1993
- isOwn = !!desc;
1994
-
1995
- // By convention, when a data property is converted to an accessor
1996
- // property to emulate a data property that does not suffer from
1997
- // the override mistake, that accessor's getter is marked with
1998
- // an `originalValue` property. Here, when we detect this, we
1999
- // uphold the illusion by pretending to see that original data
2000
- // property, i.e., returning the value rather than the getter
2001
- // itself.
2002
- if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
2003
- value = desc.get;
2004
- } else {
2005
- value = value[part];
2006
- }
2007
- } else {
2008
- isOwn = hasOwn$1(value, part);
2009
- value = value[part];
2010
- }
2011
-
2012
- if (isOwn && !skipFurtherCaching) {
2013
- INTRINSICS[intrinsicRealName] = value;
2014
- }
2015
- }
2016
- }
2017
- return value;
2018
- };
2019
-
2020
- var GetIntrinsic$3 = getIntrinsic;
2021
-
2022
- var $gOPD = GetIntrinsic$3('%Object.getOwnPropertyDescriptor%', true);
2023
-
2024
- if ($gOPD) {
2025
- try {
2026
- $gOPD([], 'length');
2027
- } catch (e) {
2028
- // IE 8 has a broken gOPD
2029
- $gOPD = null;
2030
- }
2031
- }
2032
-
2033
- var gopd$1 = $gOPD;
2034
-
2035
- var $defineProperty$1 = requireEsDefineProperty();
2036
-
2037
- var $SyntaxError = syntax;
2038
- var $TypeError$2 = type;
2039
-
2040
- var gopd = gopd$1;
2041
-
2042
- /** @type {import('.')} */
2043
- var defineDataProperty = function defineDataProperty(
2044
- obj,
2045
- property,
2046
- value
2047
- ) {
2048
- if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
2049
- throw new $TypeError$2('`obj` must be an object or a function`');
2050
- }
2051
- if (typeof property !== 'string' && typeof property !== 'symbol') {
2052
- throw new $TypeError$2('`property` must be a string or a symbol`');
2053
- }
2054
- if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
2055
- throw new $TypeError$2('`nonEnumerable`, if provided, must be a boolean or null');
2056
- }
2057
- if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
2058
- throw new $TypeError$2('`nonWritable`, if provided, must be a boolean or null');
2059
- }
2060
- if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
2061
- throw new $TypeError$2('`nonConfigurable`, if provided, must be a boolean or null');
2062
- }
2063
- if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
2064
- throw new $TypeError$2('`loose`, if provided, must be a boolean');
2065
- }
2066
-
2067
- var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
2068
- var nonWritable = arguments.length > 4 ? arguments[4] : null;
2069
- var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
2070
- var loose = arguments.length > 6 ? arguments[6] : false;
2071
-
2072
- /* @type {false | TypedPropertyDescriptor<unknown>} */
2073
- var desc = !!gopd && gopd(obj, property);
2074
-
2075
- if ($defineProperty$1) {
2076
- $defineProperty$1(obj, property, {
2077
- configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
2078
- enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
2079
- value: value,
2080
- writable: nonWritable === null && desc ? desc.writable : !nonWritable
2081
- });
2082
- } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
2083
- // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
2084
- obj[property] = value; // eslint-disable-line no-param-reassign
2085
- } else {
2086
- throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
2087
- }
2088
- };
2089
-
2090
- var $defineProperty = requireEsDefineProperty();
2091
-
2092
- var hasPropertyDescriptors = function hasPropertyDescriptors() {
2093
- return !!$defineProperty;
2094
- };
2095
-
2096
- hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
2097
- // node v0.6 has a bug where array lengths can be Set but not Defined
2098
- if (!$defineProperty) {
2099
- return null;
2100
- }
2101
- try {
2102
- return $defineProperty([], 'length', { value: 1 }).length !== 1;
2103
- } catch (e) {
2104
- // In Firefox 4-22, defining length on an array throws an exception.
2105
- return true;
2106
- }
2107
- };
2108
-
2109
- var hasPropertyDescriptors_1 = hasPropertyDescriptors;
2110
-
2111
- var GetIntrinsic$2 = getIntrinsic$2;
2112
- var define = defineDataProperty;
2113
- var hasDescriptors = hasPropertyDescriptors_1();
2114
- var gOPD = gopd$1;
2115
-
2116
- var $TypeError$1 = type;
2117
- var $floor$1 = GetIntrinsic$2('%Math.floor%');
2118
-
2119
- /** @type {import('.')} */
2120
- var setFunctionLength = function setFunctionLength(fn, length) {
2121
- if (typeof fn !== 'function') {
2122
- throw new $TypeError$1('`fn` is not a function');
2123
- }
2124
- if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor$1(length) !== length) {
2125
- throw new $TypeError$1('`length` must be a positive 32-bit integer');
2126
- }
2127
-
2128
- var loose = arguments.length > 2 && !!arguments[2];
2129
-
2130
- var functionLengthIsConfigurable = true;
2131
- var functionLengthIsWritable = true;
2132
- if ('length' in fn && gOPD) {
2133
- var desc = gOPD(fn, 'length');
2134
- if (desc && !desc.configurable) {
2135
- functionLengthIsConfigurable = false;
2136
- }
2137
- if (desc && !desc.writable) {
2138
- functionLengthIsWritable = false;
2139
- }
2140
- }
2141
-
2142
- if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
2143
- if (hasDescriptors) {
2144
- define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
2145
- } else {
2146
- define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
2147
- }
2148
- }
2149
- return fn;
2150
- };
2151
-
2152
- callBind$1.exports;
2153
-
2154
- (function (module) {
2155
-
2156
- var bind = functionBind;
2157
- var GetIntrinsic = getIntrinsic$3;
2158
- var setFunctionLength$1 = setFunctionLength;
2159
-
2160
- var $TypeError = type;
2161
- var $apply = GetIntrinsic('%Function.prototype.apply%');
2162
- var $call = GetIntrinsic('%Function.prototype.call%');
2163
- var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
2164
-
2165
- var $defineProperty = requireEsDefineProperty();
2166
- var $max = GetIntrinsic('%Math.max%');
2167
-
2168
- module.exports = function callBind(originalFunction) {
2169
- if (typeof originalFunction !== 'function') {
2170
- throw new $TypeError('a function is required');
2171
- }
2172
- var func = $reflectApply(bind, $call, arguments);
2173
- return setFunctionLength$1(
2174
- func,
2175
- 1 + $max(0, originalFunction.length - (arguments.length - 1)),
2176
- true
2177
- );
2178
- };
2179
-
2180
- var applyBind = function applyBind() {
2181
- return $reflectApply(bind, $apply, arguments);
2182
- };
2183
-
2184
- if ($defineProperty) {
2185
- $defineProperty(module.exports, 'apply', { value: applyBind });
2186
- } else {
2187
- module.exports.apply = applyBind;
2188
- }
2189
- } (callBind$1));
2190
-
2191
- var callBindExports = callBind$1.exports;
2192
-
2193
- var GetIntrinsic$1 = getIntrinsic$3;
2194
-
2195
- var callBind = callBindExports;
2196
-
2197
- var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
2198
-
2199
- var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
2200
- var intrinsic = GetIntrinsic$1(name, !!allowMissing);
2201
- if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
2202
- return callBind(intrinsic);
2203
- }
2204
- return intrinsic;
2205
- };
2206
-
2207
- var util_inspect = require$$0.inspect;
2208
-
2209
- var hasMap = typeof Map === 'function' && Map.prototype;
2210
- var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
2211
- var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
2212
- var mapForEach = hasMap && Map.prototype.forEach;
2213
- var hasSet = typeof Set === 'function' && Set.prototype;
2214
- var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
2215
- var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
2216
- var setForEach = hasSet && Set.prototype.forEach;
2217
- var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
2218
- var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
2219
- var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
2220
- var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
2221
- var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
2222
- var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
2223
- var booleanValueOf = Boolean.prototype.valueOf;
2224
- var objectToString = Object.prototype.toString;
2225
- var functionToString = Function.prototype.toString;
2226
- var $match = String.prototype.match;
2227
- var $slice = String.prototype.slice;
2228
- var $replace = String.prototype.replace;
2229
- var $toUpperCase = String.prototype.toUpperCase;
2230
- var $toLowerCase = String.prototype.toLowerCase;
2231
- var $test = RegExp.prototype.test;
2232
- var $concat = Array.prototype.concat;
2233
- var $join = Array.prototype.join;
2234
- var $arrSlice = Array.prototype.slice;
2235
- var $floor = Math.floor;
2236
- var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
2237
- var gOPS = Object.getOwnPropertySymbols;
2238
- var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
2239
- var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
2240
- // ie, `has-tostringtag/shams
2241
- var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
2242
- ? Symbol.toStringTag
2243
- : null;
2244
- var isEnumerable = Object.prototype.propertyIsEnumerable;
2245
-
2246
- var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
2247
- [].__proto__ === Array.prototype // eslint-disable-line no-proto
2248
- ? function (O) {
2249
- return O.__proto__; // eslint-disable-line no-proto
2250
- }
2251
- : null
2252
- );
2253
-
2254
- function addNumericSeparator(num, str) {
2255
- if (
2256
- num === Infinity
2257
- || num === -Infinity
2258
- || num !== num
2259
- || (num && num > -1000 && num < 1000)
2260
- || $test.call(/e/, str)
2261
- ) {
2262
- return str;
2263
- }
2264
- var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
2265
- if (typeof num === 'number') {
2266
- var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
2267
- if (int !== num) {
2268
- var intStr = String(int);
2269
- var dec = $slice.call(str, intStr.length + 1);
2270
- return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
2271
- }
2272
- }
2273
- return $replace.call(str, sepRegex, '$&_');
2274
- }
2275
-
2276
- var utilInspect = util_inspect;
2277
- var inspectCustom = utilInspect.custom;
2278
- var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
2279
-
2280
- var objectInspect = function inspect_(obj, options, depth, seen) {
2281
- var opts = options || {};
2282
-
2283
- if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
2284
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
2285
- }
2286
- if (
2287
- has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
2288
- ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
2289
- : opts.maxStringLength !== null
2290
- )
2291
- ) {
2292
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
2293
- }
2294
- var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
2295
- if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
2296
- throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
2297
- }
2298
-
2299
- if (
2300
- has$3(opts, 'indent')
2301
- && opts.indent !== null
2302
- && opts.indent !== '\t'
2303
- && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
2304
- ) {
2305
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
2306
- }
2307
- if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
2308
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
2309
- }
2310
- var numericSeparator = opts.numericSeparator;
2311
-
2312
- if (typeof obj === 'undefined') {
2313
- return 'undefined';
2314
- }
2315
- if (obj === null) {
2316
- return 'null';
2317
- }
2318
- if (typeof obj === 'boolean') {
2319
- return obj ? 'true' : 'false';
2320
- }
2321
-
2322
- if (typeof obj === 'string') {
2323
- return inspectString(obj, opts);
2324
- }
2325
- if (typeof obj === 'number') {
2326
- if (obj === 0) {
2327
- return Infinity / obj > 0 ? '0' : '-0';
2328
- }
2329
- var str = String(obj);
2330
- return numericSeparator ? addNumericSeparator(obj, str) : str;
2331
- }
2332
- if (typeof obj === 'bigint') {
2333
- var bigIntStr = String(obj) + 'n';
2334
- return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
2335
- }
2336
-
2337
- var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
2338
- if (typeof depth === 'undefined') { depth = 0; }
2339
- if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
2340
- return isArray$3(obj) ? '[Array]' : '[Object]';
2341
- }
2342
-
2343
- var indent = getIndent(opts, depth);
2344
-
2345
- if (typeof seen === 'undefined') {
2346
- seen = [];
2347
- } else if (indexOf(seen, obj) >= 0) {
2348
- return '[Circular]';
2349
- }
2350
-
2351
- function inspect(value, from, noIndent) {
2352
- if (from) {
2353
- seen = $arrSlice.call(seen);
2354
- seen.push(from);
2355
- }
2356
- if (noIndent) {
2357
- var newOpts = {
2358
- depth: opts.depth
2359
- };
2360
- if (has$3(opts, 'quoteStyle')) {
2361
- newOpts.quoteStyle = opts.quoteStyle;
2362
- }
2363
- return inspect_(value, newOpts, depth + 1, seen);
2364
- }
2365
- return inspect_(value, opts, depth + 1, seen);
2366
- }
2367
-
2368
- if (typeof obj === 'function' && !isRegExp$1(obj)) { // in older engines, regexes are callable
2369
- var name = nameOf(obj);
2370
- var keys = arrObjKeys(obj, inspect);
2371
- return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
2372
- }
2373
- if (isSymbol(obj)) {
2374
- var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
2375
- return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
2376
- }
2377
- if (isElement(obj)) {
2378
- var s = '<' + $toLowerCase.call(String(obj.nodeName));
2379
- var attrs = obj.attributes || [];
2380
- for (var i = 0; i < attrs.length; i++) {
2381
- s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
2382
- }
2383
- s += '>';
2384
- if (obj.childNodes && obj.childNodes.length) { s += '...'; }
2385
- s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
2386
- return s;
2387
- }
2388
- if (isArray$3(obj)) {
2389
- if (obj.length === 0) { return '[]'; }
2390
- var xs = arrObjKeys(obj, inspect);
2391
- if (indent && !singleLineValues(xs)) {
2392
- return '[' + indentedJoin(xs, indent) + ']';
2393
- }
2394
- return '[ ' + $join.call(xs, ', ') + ' ]';
2395
- }
2396
- if (isError(obj)) {
2397
- var parts = arrObjKeys(obj, inspect);
2398
- if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
2399
- return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
2400
- }
2401
- if (parts.length === 0) { return '[' + String(obj) + ']'; }
2402
- return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
2403
- }
2404
- if (typeof obj === 'object' && customInspect) {
2405
- if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
2406
- return utilInspect(obj, { depth: maxDepth - depth });
2407
- } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
2408
- return obj.inspect();
2409
- }
2410
- }
2411
- if (isMap(obj)) {
2412
- var mapParts = [];
2413
- if (mapForEach) {
2414
- mapForEach.call(obj, function (value, key) {
2415
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
2416
- });
2417
- }
2418
- return collectionOf('Map', mapSize.call(obj), mapParts, indent);
2419
- }
2420
- if (isSet(obj)) {
2421
- var setParts = [];
2422
- if (setForEach) {
2423
- setForEach.call(obj, function (value) {
2424
- setParts.push(inspect(value, obj));
2425
- });
2426
- }
2427
- return collectionOf('Set', setSize.call(obj), setParts, indent);
2428
- }
2429
- if (isWeakMap(obj)) {
2430
- return weakCollectionOf('WeakMap');
2431
- }
2432
- if (isWeakSet(obj)) {
2433
- return weakCollectionOf('WeakSet');
2434
- }
2435
- if (isWeakRef(obj)) {
2436
- return weakCollectionOf('WeakRef');
2437
- }
2438
- if (isNumber(obj)) {
2439
- return markBoxed(inspect(Number(obj)));
2440
- }
2441
- if (isBigInt(obj)) {
2442
- return markBoxed(inspect(bigIntValueOf.call(obj)));
2443
- }
2444
- if (isBoolean(obj)) {
2445
- return markBoxed(booleanValueOf.call(obj));
2446
- }
2447
- if (isString(obj)) {
2448
- return markBoxed(inspect(String(obj)));
2449
- }
2450
- // note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
2451
- /* eslint-env browser */
2452
- if (typeof window !== 'undefined' && obj === window) {
2453
- return '{ [object Window] }';
2454
- }
2455
- if (obj === commonjsGlobal) {
2456
- return '{ [object globalThis] }';
2457
- }
2458
- if (!isDate(obj) && !isRegExp$1(obj)) {
2459
- var ys = arrObjKeys(obj, inspect);
2460
- var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
2461
- var protoTag = obj instanceof Object ? '' : 'null prototype';
2462
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
2463
- var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
2464
- var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
2465
- if (ys.length === 0) { return tag + '{}'; }
2466
- if (indent) {
2467
- return tag + '{' + indentedJoin(ys, indent) + '}';
2468
- }
2469
- return tag + '{ ' + $join.call(ys, ', ') + ' }';
2470
- }
2471
- return String(obj);
2472
- };
2473
-
2474
- function wrapQuotes(s, defaultStyle, opts) {
2475
- var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
2476
- return quoteChar + s + quoteChar;
2477
- }
2478
-
2479
- function quote(s) {
2480
- return $replace.call(String(s), /"/g, '&quot;');
2481
- }
2482
-
2483
- function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2484
- function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2485
- function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2486
- function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2487
- function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2488
- function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2489
- function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
2490
-
2491
- // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
2492
- function isSymbol(obj) {
2493
- if (hasShammedSymbols) {
2494
- return obj && typeof obj === 'object' && obj instanceof Symbol;
2495
- }
2496
- if (typeof obj === 'symbol') {
2497
- return true;
2498
- }
2499
- if (!obj || typeof obj !== 'object' || !symToString) {
2500
- return false;
2501
- }
2502
- try {
2503
- symToString.call(obj);
2504
- return true;
2505
- } catch (e) {}
2506
- return false;
2507
- }
2508
-
2509
- function isBigInt(obj) {
2510
- if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
2511
- return false;
2512
- }
2513
- try {
2514
- bigIntValueOf.call(obj);
2515
- return true;
2516
- } catch (e) {}
2517
- return false;
2518
- }
2519
-
2520
- var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
2521
- function has$3(obj, key) {
2522
- return hasOwn.call(obj, key);
2523
- }
2524
-
2525
- function toStr(obj) {
2526
- return objectToString.call(obj);
2527
- }
2528
-
2529
- function nameOf(f) {
2530
- if (f.name) { return f.name; }
2531
- var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
2532
- if (m) { return m[1]; }
2533
- return null;
2534
- }
2535
-
2536
- function indexOf(xs, x) {
2537
- if (xs.indexOf) { return xs.indexOf(x); }
2538
- for (var i = 0, l = xs.length; i < l; i++) {
2539
- if (xs[i] === x) { return i; }
2540
- }
2541
- return -1;
2542
- }
2543
-
2544
- function isMap(x) {
2545
- if (!mapSize || !x || typeof x !== 'object') {
2546
- return false;
2547
- }
2548
- try {
2549
- mapSize.call(x);
2550
- try {
2551
- setSize.call(x);
2552
- } catch (s) {
2553
- return true;
2554
- }
2555
- return x instanceof Map; // core-js workaround, pre-v2.5.0
2556
- } catch (e) {}
2557
- return false;
2558
- }
2559
-
2560
- function isWeakMap(x) {
2561
- if (!weakMapHas || !x || typeof x !== 'object') {
2562
- return false;
2563
- }
2564
- try {
2565
- weakMapHas.call(x, weakMapHas);
2566
- try {
2567
- weakSetHas.call(x, weakSetHas);
2568
- } catch (s) {
2569
- return true;
2570
- }
2571
- return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
2572
- } catch (e) {}
2573
- return false;
2574
- }
2575
-
2576
- function isWeakRef(x) {
2577
- if (!weakRefDeref || !x || typeof x !== 'object') {
2578
- return false;
2579
- }
2580
- try {
2581
- weakRefDeref.call(x);
2582
- return true;
2583
- } catch (e) {}
2584
- return false;
2585
- }
2586
-
2587
- function isSet(x) {
2588
- if (!setSize || !x || typeof x !== 'object') {
2589
- return false;
2590
- }
2591
- try {
2592
- setSize.call(x);
2593
- try {
2594
- mapSize.call(x);
2595
- } catch (m) {
2596
- return true;
2597
- }
2598
- return x instanceof Set; // core-js workaround, pre-v2.5.0
2599
- } catch (e) {}
2600
- return false;
2601
- }
2602
-
2603
- function isWeakSet(x) {
2604
- if (!weakSetHas || !x || typeof x !== 'object') {
2605
- return false;
2606
- }
2607
- try {
2608
- weakSetHas.call(x, weakSetHas);
2609
- try {
2610
- weakMapHas.call(x, weakMapHas);
2611
- } catch (s) {
2612
- return true;
2613
- }
2614
- return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
2615
- } catch (e) {}
2616
- return false;
2617
- }
2618
-
2619
- function isElement(x) {
2620
- if (!x || typeof x !== 'object') { return false; }
2621
- if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
2622
- return true;
2623
- }
2624
- return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
2625
- }
2626
-
2627
- function inspectString(str, opts) {
2628
- if (str.length > opts.maxStringLength) {
2629
- var remaining = str.length - opts.maxStringLength;
2630
- var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
2631
- return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
2632
- }
2633
- // eslint-disable-next-line no-control-regex
2634
- var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
2635
- return wrapQuotes(s, 'single', opts);
2636
- }
2637
-
2638
- function lowbyte(c) {
2639
- var n = c.charCodeAt(0);
2640
- var x = {
2641
- 8: 'b',
2642
- 9: 't',
2643
- 10: 'n',
2644
- 12: 'f',
2645
- 13: 'r'
2646
- }[n];
2647
- if (x) { return '\\' + x; }
2648
- return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
2649
- }
2650
-
2651
- function markBoxed(str) {
2652
- return 'Object(' + str + ')';
2653
- }
2654
-
2655
- function weakCollectionOf(type) {
2656
- return type + ' { ? }';
2657
- }
2658
-
2659
- function collectionOf(type, size, entries, indent) {
2660
- var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
2661
- return type + ' (' + size + ') {' + joinedEntries + '}';
2662
- }
2663
-
2664
- function singleLineValues(xs) {
2665
- for (var i = 0; i < xs.length; i++) {
2666
- if (indexOf(xs[i], '\n') >= 0) {
2667
- return false;
2668
- }
2669
- }
2670
- return true;
2671
- }
2672
-
2673
- function getIndent(opts, depth) {
2674
- var baseIndent;
2675
- if (opts.indent === '\t') {
2676
- baseIndent = '\t';
2677
- } else if (typeof opts.indent === 'number' && opts.indent > 0) {
2678
- baseIndent = $join.call(Array(opts.indent + 1), ' ');
2679
- } else {
2680
- return null;
2681
- }
2682
- return {
2683
- base: baseIndent,
2684
- prev: $join.call(Array(depth + 1), baseIndent)
2685
- };
2686
- }
2687
-
2688
- function indentedJoin(xs, indent) {
2689
- if (xs.length === 0) { return ''; }
2690
- var lineJoiner = '\n' + indent.prev + indent.base;
2691
- return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
2692
- }
2693
-
2694
- function arrObjKeys(obj, inspect) {
2695
- var isArr = isArray$3(obj);
2696
- var xs = [];
2697
- if (isArr) {
2698
- xs.length = obj.length;
2699
- for (var i = 0; i < obj.length; i++) {
2700
- xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
2701
- }
2702
- }
2703
- var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
2704
- var symMap;
2705
- if (hasShammedSymbols) {
2706
- symMap = {};
2707
- for (var k = 0; k < syms.length; k++) {
2708
- symMap['$' + syms[k]] = syms[k];
2709
- }
2710
- }
2711
-
2712
- for (var key in obj) { // eslint-disable-line no-restricted-syntax
2713
- if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
2714
- if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
2715
- if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
2716
- // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
2717
- continue; // eslint-disable-line no-restricted-syntax, no-continue
2718
- } else if ($test.call(/[^\w$]/, key)) {
2719
- xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
2720
- } else {
2721
- xs.push(key + ': ' + inspect(obj[key], obj));
2722
- }
2723
- }
2724
- if (typeof gOPS === 'function') {
2725
- for (var j = 0; j < syms.length; j++) {
2726
- if (isEnumerable.call(obj, syms[j])) {
2727
- xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
2728
- }
2729
- }
2730
- }
2731
- return xs;
2732
- }
2733
-
2734
- var GetIntrinsic = getIntrinsic$4;
2735
- var callBound = callBound$1;
2736
- var inspect = objectInspect;
2737
-
2738
- var $TypeError = type;
2739
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
2740
- var $Map = GetIntrinsic('%Map%', true);
2741
-
2742
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
2743
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
2744
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
2745
- var $mapGet = callBound('Map.prototype.get', true);
2746
- var $mapSet = callBound('Map.prototype.set', true);
2747
- var $mapHas = callBound('Map.prototype.has', true);
2748
-
2749
- /*
2750
- * This function traverses the list returning the node corresponding to the given key.
2751
- *
2752
- * 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.
2753
- */
2754
- /** @type {import('.').listGetNode} */
2755
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
2756
- /** @type {typeof list | NonNullable<(typeof list)['next']>} */
2757
- var prev = list;
2758
- /** @type {(typeof list)['next']} */
2759
- var curr;
2760
- for (; (curr = prev.next) !== null; prev = curr) {
2761
- if (curr.key === key) {
2762
- prev.next = curr.next;
2763
- // eslint-disable-next-line no-extra-parens
2764
- curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
2765
- list.next = curr; // eslint-disable-line no-param-reassign
2766
- return curr;
2767
- }
2768
- }
2769
- };
2770
-
2771
- /** @type {import('.').listGet} */
2772
- var listGet = function (objects, key) {
2773
- var node = listGetNode(objects, key);
2774
- return node && node.value;
2775
- };
2776
- /** @type {import('.').listSet} */
2777
- var listSet = function (objects, key, value) {
2778
- var node = listGetNode(objects, key);
2779
- if (node) {
2780
- node.value = value;
2781
- } else {
2782
- // Prepend the new node to the beginning of the list
2783
- objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
2784
- key: key,
2785
- next: objects.next,
2786
- value: value
2787
- });
2788
- }
2789
- };
2790
- /** @type {import('.').listHas} */
2791
- var listHas = function (objects, key) {
2792
- return !!listGetNode(objects, key);
2793
- };
2794
-
2795
- /** @type {import('.')} */
2796
- var sideChannel = function getSideChannel() {
2797
- /** @type {WeakMap<object, unknown>} */ var $wm;
2798
- /** @type {Map<object, unknown>} */ var $m;
2799
- /** @type {import('.').RootNode<unknown>} */ var $o;
2800
-
2801
- /** @type {import('.').Channel} */
2802
- var channel = {
2803
- assert: function (key) {
2804
- if (!channel.has(key)) {
2805
- throw new $TypeError('Side channel does not contain ' + inspect(key));
2806
- }
2807
- },
2808
- get: function (key) { // eslint-disable-line consistent-return
2809
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
2810
- if ($wm) {
2811
- return $weakMapGet($wm, key);
2812
- }
2813
- } else if ($Map) {
2814
- if ($m) {
2815
- return $mapGet($m, key);
2816
- }
2817
- } else {
2818
- if ($o) { // eslint-disable-line no-lonely-if
2819
- return listGet($o, key);
2820
- }
2821
- }
2822
- },
2823
- has: function (key) {
2824
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
2825
- if ($wm) {
2826
- return $weakMapHas($wm, key);
2827
- }
2828
- } else if ($Map) {
2829
- if ($m) {
2830
- return $mapHas($m, key);
2831
- }
2832
- } else {
2833
- if ($o) { // eslint-disable-line no-lonely-if
2834
- return listHas($o, key);
2835
- }
2836
- }
2837
- return false;
2838
- },
2839
- set: function (key, value) {
2840
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
2841
- if (!$wm) {
2842
- $wm = new $WeakMap();
2843
- }
2844
- $weakMapSet($wm, key, value);
2845
- } else if ($Map) {
2846
- if (!$m) {
2847
- $m = new $Map();
2848
- }
2849
- $mapSet($m, key, value);
2850
- } else {
2851
- if (!$o) {
2852
- // 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
2853
- $o = { key: {}, next: null };
2854
- }
2855
- listSet($o, key, value);
2856
- }
2857
- }
2858
- };
2859
- return channel;
2860
- };
2861
-
2862
- var replace = String.prototype.replace;
2863
- var percentTwenties = /%20/g;
2864
-
2865
- var Format = {
2866
- RFC1738: 'RFC1738',
2867
- RFC3986: 'RFC3986'
2868
- };
2869
-
2870
- var formats$3 = {
2871
- 'default': Format.RFC3986,
2872
- formatters: {
2873
- RFC1738: function (value) {
2874
- return replace.call(value, percentTwenties, '+');
2875
- },
2876
- RFC3986: function (value) {
2877
- return String(value);
2878
- }
2879
- },
2880
- RFC1738: Format.RFC1738,
2881
- RFC3986: Format.RFC3986
2882
- };
2883
-
2884
- var formats$2 = formats$3;
2885
-
2886
- var has$2 = Object.prototype.hasOwnProperty;
2887
- var isArray$2 = Array.isArray;
2888
-
2889
- var hexTable = (function () {
2890
- var array = [];
2891
- for (var i = 0; i < 256; ++i) {
2892
- array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
2893
- }
2894
-
2895
- return array;
2896
- }());
2897
-
2898
- var compactQueue = function compactQueue(queue) {
2899
- while (queue.length > 1) {
2900
- var item = queue.pop();
2901
- var obj = item.obj[item.prop];
2902
-
2903
- if (isArray$2(obj)) {
2904
- var compacted = [];
2905
-
2906
- for (var j = 0; j < obj.length; ++j) {
2907
- if (typeof obj[j] !== 'undefined') {
2908
- compacted.push(obj[j]);
2909
- }
2910
- }
2911
-
2912
- item.obj[item.prop] = compacted;
2913
- }
2914
- }
2915
- };
2916
-
2917
- var arrayToObject = function arrayToObject(source, options) {
2918
- var obj = options && options.plainObjects ? Object.create(null) : {};
2919
- for (var i = 0; i < source.length; ++i) {
2920
- if (typeof source[i] !== 'undefined') {
2921
- obj[i] = source[i];
2922
- }
2923
- }
2924
-
2925
- return obj;
2926
- };
2927
-
2928
- var merge = function merge(target, source, options) {
2929
- /* eslint no-param-reassign: 0 */
2930
- if (!source) {
2931
- return target;
2932
- }
2933
-
2934
- if (typeof source !== 'object') {
2935
- if (isArray$2(target)) {
2936
- target.push(source);
2937
- } else if (target && typeof target === 'object') {
2938
- if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
2939
- target[source] = true;
2940
- }
2941
- } else {
2942
- return [target, source];
2943
- }
2944
-
2945
- return target;
2946
- }
2947
-
2948
- if (!target || typeof target !== 'object') {
2949
- return [target].concat(source);
2950
- }
2951
-
2952
- var mergeTarget = target;
2953
- if (isArray$2(target) && !isArray$2(source)) {
2954
- mergeTarget = arrayToObject(target, options);
2955
- }
2956
-
2957
- if (isArray$2(target) && isArray$2(source)) {
2958
- source.forEach(function (item, i) {
2959
- if (has$2.call(target, i)) {
2960
- var targetItem = target[i];
2961
- if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
2962
- target[i] = merge(targetItem, item, options);
2963
- } else {
2964
- target.push(item);
2965
- }
2966
- } else {
2967
- target[i] = item;
2968
- }
2969
- });
2970
- return target;
2971
- }
2972
-
2973
- return Object.keys(source).reduce(function (acc, key) {
2974
- var value = source[key];
2975
-
2976
- if (has$2.call(acc, key)) {
2977
- acc[key] = merge(acc[key], value, options);
2978
- } else {
2979
- acc[key] = value;
2980
- }
2981
- return acc;
2982
- }, mergeTarget);
2983
- };
2984
-
2985
- var assign = function assignSingleSource(target, source) {
2986
- return Object.keys(source).reduce(function (acc, key) {
2987
- acc[key] = source[key];
2988
- return acc;
2989
- }, target);
2990
- };
2991
-
2992
- var decode = function (str, decoder, charset) {
2993
- var strWithoutPlus = str.replace(/\+/g, ' ');
2994
- if (charset === 'iso-8859-1') {
2995
- // unescape never throws, no try...catch needed:
2996
- return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
2997
- }
2998
- // utf-8
2999
- try {
3000
- return decodeURIComponent(strWithoutPlus);
3001
- } catch (e) {
3002
- return strWithoutPlus;
3003
- }
3004
- };
3005
-
3006
- var encode = function encode(str, defaultEncoder, charset, kind, format) {
3007
- // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
3008
- // It has been adapted here for stricter adherence to RFC 3986
3009
- if (str.length === 0) {
3010
- return str;
3011
- }
3012
-
3013
- var string = str;
3014
- if (typeof str === 'symbol') {
3015
- string = Symbol.prototype.toString.call(str);
3016
- } else if (typeof str !== 'string') {
3017
- string = String(str);
3018
- }
3019
-
3020
- if (charset === 'iso-8859-1') {
3021
- return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
3022
- return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
3023
- });
3024
- }
3025
-
3026
- var out = '';
3027
- for (var i = 0; i < string.length; ++i) {
3028
- var c = string.charCodeAt(i);
3029
-
3030
- if (
3031
- c === 0x2D // -
3032
- || c === 0x2E // .
3033
- || c === 0x5F // _
3034
- || c === 0x7E // ~
3035
- || (c >= 0x30 && c <= 0x39) // 0-9
3036
- || (c >= 0x41 && c <= 0x5A) // a-z
3037
- || (c >= 0x61 && c <= 0x7A) // A-Z
3038
- || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
3039
- ) {
3040
- out += string.charAt(i);
3041
- continue;
3042
- }
3043
-
3044
- if (c < 0x80) {
3045
- out = out + hexTable[c];
3046
- continue;
3047
- }
3048
-
3049
- if (c < 0x800) {
3050
- out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
3051
- continue;
3052
- }
3053
-
3054
- if (c < 0xD800 || c >= 0xE000) {
3055
- out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
3056
- continue;
3057
- }
3058
-
3059
- i += 1;
3060
- c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
3061
- /* eslint operator-linebreak: [2, "before"] */
3062
- out += hexTable[0xF0 | (c >> 18)]
3063
- + hexTable[0x80 | ((c >> 12) & 0x3F)]
3064
- + hexTable[0x80 | ((c >> 6) & 0x3F)]
3065
- + hexTable[0x80 | (c & 0x3F)];
3066
- }
3067
-
3068
- return out;
3069
- };
3070
-
3071
- var compact = function compact(value) {
3072
- var queue = [{ obj: { o: value }, prop: 'o' }];
3073
- var refs = [];
3074
-
3075
- for (var i = 0; i < queue.length; ++i) {
3076
- var item = queue[i];
3077
- var obj = item.obj[item.prop];
3078
-
3079
- var keys = Object.keys(obj);
3080
- for (var j = 0; j < keys.length; ++j) {
3081
- var key = keys[j];
3082
- var val = obj[key];
3083
- if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
3084
- queue.push({ obj: obj, prop: key });
3085
- refs.push(val);
3086
- }
3087
- }
3088
- }
3089
-
3090
- compactQueue(queue);
3091
-
3092
- return value;
3093
- };
3094
-
3095
- var isRegExp = function isRegExp(obj) {
3096
- return Object.prototype.toString.call(obj) === '[object RegExp]';
3097
- };
3098
-
3099
- var isBuffer = function isBuffer(obj) {
3100
- if (!obj || typeof obj !== 'object') {
3101
- return false;
3102
- }
3103
-
3104
- return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
3105
- };
3106
-
3107
- var combine = function combine(a, b) {
3108
- return [].concat(a, b);
3109
- };
3110
-
3111
- var maybeMap = function maybeMap(val, fn) {
3112
- if (isArray$2(val)) {
3113
- var mapped = [];
3114
- for (var i = 0; i < val.length; i += 1) {
3115
- mapped.push(fn(val[i]));
3116
- }
3117
- return mapped;
3118
- }
3119
- return fn(val);
3120
- };
3121
-
3122
- var utils$2 = {
3123
- arrayToObject: arrayToObject,
3124
- assign: assign,
3125
- combine: combine,
3126
- compact: compact,
3127
- decode: decode,
3128
- encode: encode,
3129
- isBuffer: isBuffer,
3130
- isRegExp: isRegExp,
3131
- maybeMap: maybeMap,
3132
- merge: merge
3133
- };
3134
-
3135
- var getSideChannel = sideChannel;
3136
- var utils$1 = utils$2;
3137
- var formats$1 = formats$3;
3138
- var has$1 = Object.prototype.hasOwnProperty;
3139
-
3140
- var arrayPrefixGenerators = {
3141
- brackets: function brackets(prefix) {
3142
- return prefix + '[]';
3143
- },
3144
- comma: 'comma',
3145
- indices: function indices(prefix, key) {
3146
- return prefix + '[' + key + ']';
3147
- },
3148
- repeat: function repeat(prefix) {
3149
- return prefix;
3150
- }
3151
- };
3152
-
3153
- var isArray$1 = Array.isArray;
3154
- var push = Array.prototype.push;
3155
- var pushToArray = function (arr, valueOrArray) {
3156
- push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
3157
- };
3158
-
3159
- var toISO = Date.prototype.toISOString;
3160
-
3161
- var defaultFormat = formats$1['default'];
3162
- var defaults$1 = {
3163
- addQueryPrefix: false,
3164
- allowDots: false,
3165
- charset: 'utf-8',
3166
- charsetSentinel: false,
3167
- delimiter: '&',
3168
- encode: true,
3169
- encoder: utils$1.encode,
3170
- encodeValuesOnly: false,
3171
- format: defaultFormat,
3172
- formatter: formats$1.formatters[defaultFormat],
3173
- // deprecated
3174
- indices: false,
3175
- serializeDate: function serializeDate(date) {
3176
- return toISO.call(date);
3177
- },
3178
- skipNulls: false,
3179
- strictNullHandling: false
3180
- };
3181
-
3182
- var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
3183
- return typeof v === 'string'
3184
- || typeof v === 'number'
3185
- || typeof v === 'boolean'
3186
- || typeof v === 'symbol'
3187
- || typeof v === 'bigint';
3188
- };
3189
-
3190
- var sentinel = {};
3191
-
3192
- var stringify$1 = function stringify(
3193
- object,
3194
- prefix,
3195
- generateArrayPrefix,
3196
- commaRoundTrip,
3197
- strictNullHandling,
3198
- skipNulls,
3199
- encoder,
3200
- filter,
3201
- sort,
3202
- allowDots,
3203
- serializeDate,
3204
- format,
3205
- formatter,
3206
- encodeValuesOnly,
3207
- charset,
3208
- sideChannel
3209
- ) {
3210
- var obj = object;
3211
-
3212
- var tmpSc = sideChannel;
3213
- var step = 0;
3214
- var findFlag = false;
3215
- while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
3216
- // Where object last appeared in the ref tree
3217
- var pos = tmpSc.get(object);
3218
- step += 1;
3219
- if (typeof pos !== 'undefined') {
3220
- if (pos === step) {
3221
- throw new RangeError('Cyclic object value');
3222
- } else {
3223
- findFlag = true; // Break while
3224
- }
3225
- }
3226
- if (typeof tmpSc.get(sentinel) === 'undefined') {
3227
- step = 0;
3228
- }
3229
- }
3230
-
3231
- if (typeof filter === 'function') {
3232
- obj = filter(prefix, obj);
3233
- } else if (obj instanceof Date) {
3234
- obj = serializeDate(obj);
3235
- } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
3236
- obj = utils$1.maybeMap(obj, function (value) {
3237
- if (value instanceof Date) {
3238
- return serializeDate(value);
3239
- }
3240
- return value;
3241
- });
3242
- }
3243
-
3244
- if (obj === null) {
3245
- if (strictNullHandling) {
3246
- return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
3247
- }
3248
-
3249
- obj = '';
3250
- }
3251
-
3252
- if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
3253
- if (encoder) {
3254
- var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
3255
- return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
3256
- }
3257
- return [formatter(prefix) + '=' + formatter(String(obj))];
3258
- }
3259
-
3260
- var values = [];
3261
-
3262
- if (typeof obj === 'undefined') {
3263
- return values;
3264
- }
3265
-
3266
- var objKeys;
3267
- if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
3268
- // we need to join elements in
3269
- if (encodeValuesOnly && encoder) {
3270
- obj = utils$1.maybeMap(obj, encoder);
3271
- }
3272
- objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
3273
- } else if (isArray$1(filter)) {
3274
- objKeys = filter;
3275
- } else {
3276
- var keys = Object.keys(obj);
3277
- objKeys = sort ? keys.sort(sort) : keys;
3278
- }
3279
-
3280
- var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
3281
-
3282
- for (var j = 0; j < objKeys.length; ++j) {
3283
- var key = objKeys[j];
3284
- var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
3285
-
3286
- if (skipNulls && value === null) {
3287
- continue;
3288
- }
3289
-
3290
- var keyPrefix = isArray$1(obj)
3291
- ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
3292
- : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
3293
-
3294
- sideChannel.set(object, step);
3295
- var valueSideChannel = getSideChannel();
3296
- valueSideChannel.set(sentinel, sideChannel);
3297
- pushToArray(values, stringify(
3298
- value,
3299
- keyPrefix,
3300
- generateArrayPrefix,
3301
- commaRoundTrip,
3302
- strictNullHandling,
3303
- skipNulls,
3304
- generateArrayPrefix === 'comma' && encodeValuesOnly && isArray$1(obj) ? null : encoder,
3305
- filter,
3306
- sort,
3307
- allowDots,
3308
- serializeDate,
3309
- format,
3310
- formatter,
3311
- encodeValuesOnly,
3312
- charset,
3313
- valueSideChannel
3314
- ));
3315
- }
3316
-
3317
- return values;
3318
- };
3319
-
3320
- var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
3321
- if (!opts) {
3322
- return defaults$1;
3323
- }
3324
-
3325
- if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
3326
- throw new TypeError('Encoder has to be a function.');
3327
- }
3328
-
3329
- var charset = opts.charset || defaults$1.charset;
3330
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
3331
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
3332
- }
3333
-
3334
- var format = formats$1['default'];
3335
- if (typeof opts.format !== 'undefined') {
3336
- if (!has$1.call(formats$1.formatters, opts.format)) {
3337
- throw new TypeError('Unknown format option provided.');
3338
- }
3339
- format = opts.format;
3340
- }
3341
- var formatter = formats$1.formatters[format];
3342
-
3343
- var filter = defaults$1.filter;
3344
- if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
3345
- filter = opts.filter;
3346
- }
3347
-
3348
- return {
3349
- addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
3350
- allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
3351
- charset: charset,
3352
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
3353
- delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
3354
- encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
3355
- encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
3356
- encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
3357
- filter: filter,
3358
- format: format,
3359
- formatter: formatter,
3360
- serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
3361
- skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
3362
- sort: typeof opts.sort === 'function' ? opts.sort : null,
3363
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
3364
- };
3365
- };
3366
-
3367
- var stringify_1 = function (object, opts) {
3368
- var obj = object;
3369
- var options = normalizeStringifyOptions(opts);
3370
-
3371
- var objKeys;
3372
- var filter;
3373
-
3374
- if (typeof options.filter === 'function') {
3375
- filter = options.filter;
3376
- obj = filter('', obj);
3377
- } else if (isArray$1(options.filter)) {
3378
- filter = options.filter;
3379
- objKeys = filter;
3380
- }
3381
-
3382
- var keys = [];
3383
-
3384
- if (typeof obj !== 'object' || obj === null) {
3385
- return '';
3386
- }
3387
-
3388
- var arrayFormat;
3389
- if (opts && opts.arrayFormat in arrayPrefixGenerators) {
3390
- arrayFormat = opts.arrayFormat;
3391
- } else if (opts && 'indices' in opts) {
3392
- arrayFormat = opts.indices ? 'indices' : 'repeat';
3393
- } else {
3394
- arrayFormat = 'indices';
3395
- }
3396
-
3397
- var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
3398
- if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
3399
- throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
3400
- }
3401
- var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
3402
-
3403
- if (!objKeys) {
3404
- objKeys = Object.keys(obj);
3405
- }
3406
-
3407
- if (options.sort) {
3408
- objKeys.sort(options.sort);
3409
- }
3410
-
3411
- var sideChannel = getSideChannel();
3412
- for (var i = 0; i < objKeys.length; ++i) {
3413
- var key = objKeys[i];
3414
-
3415
- if (options.skipNulls && obj[key] === null) {
3416
- continue;
3417
- }
3418
- pushToArray(keys, stringify$1(
3419
- obj[key],
3420
- key,
3421
- generateArrayPrefix,
3422
- commaRoundTrip,
3423
- options.strictNullHandling,
3424
- options.skipNulls,
3425
- options.encode ? options.encoder : null,
3426
- options.filter,
3427
- options.sort,
3428
- options.allowDots,
3429
- options.serializeDate,
3430
- options.format,
3431
- options.formatter,
3432
- options.encodeValuesOnly,
3433
- options.charset,
3434
- sideChannel
3435
- ));
3436
- }
3437
-
3438
- var joined = keys.join(options.delimiter);
3439
- var prefix = options.addQueryPrefix === true ? '?' : '';
3440
-
3441
- if (options.charsetSentinel) {
3442
- if (options.charset === 'iso-8859-1') {
3443
- // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
3444
- prefix += 'utf8=%26%2310003%3B&';
3445
- } else {
3446
- // encodeURIComponent('✓')
3447
- prefix += 'utf8=%E2%9C%93&';
3448
- }
3449
- }
3450
-
3451
- return joined.length > 0 ? prefix + joined : '';
3452
- };
3453
-
3454
- var utils = utils$2;
3455
-
3456
- var has = Object.prototype.hasOwnProperty;
3457
- var isArray = Array.isArray;
3458
-
3459
- var defaults = {
3460
- allowDots: false,
3461
- allowPrototypes: false,
3462
- allowSparse: false,
3463
- arrayLimit: 20,
3464
- charset: 'utf-8',
3465
- charsetSentinel: false,
3466
- comma: false,
3467
- decoder: utils.decode,
3468
- delimiter: '&',
3469
- depth: 5,
3470
- ignoreQueryPrefix: false,
3471
- interpretNumericEntities: false,
3472
- parameterLimit: 1000,
3473
- parseArrays: true,
3474
- plainObjects: false,
3475
- strictNullHandling: false
3476
- };
3477
-
3478
- var interpretNumericEntities = function (str) {
3479
- return str.replace(/&#(\d+);/g, function ($0, numberStr) {
3480
- return String.fromCharCode(parseInt(numberStr, 10));
3481
- });
3482
- };
3483
-
3484
- var parseArrayValue = function (val, options) {
3485
- if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
3486
- return val.split(',');
3487
- }
3488
-
3489
- return val;
3490
- };
3491
-
3492
- // This is what browsers will submit when the ✓ character occurs in an
3493
- // application/x-www-form-urlencoded body and the encoding of the page containing
3494
- // the form is iso-8859-1, or when the submitted form has an accept-charset
3495
- // attribute of iso-8859-1. Presumably also with other charsets that do not contain
3496
- // the ✓ character, such as us-ascii.
3497
- var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
3498
-
3499
- // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
3500
- var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
3501
-
3502
- var parseValues = function parseQueryStringValues(str, options) {
3503
- var obj = { __proto__: null };
3504
-
3505
- var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
3506
- var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
3507
- var parts = cleanStr.split(options.delimiter, limit);
3508
- var skipIndex = -1; // Keep track of where the utf8 sentinel was found
3509
- var i;
3510
-
3511
- var charset = options.charset;
3512
- if (options.charsetSentinel) {
3513
- for (i = 0; i < parts.length; ++i) {
3514
- if (parts[i].indexOf('utf8=') === 0) {
3515
- if (parts[i] === charsetSentinel) {
3516
- charset = 'utf-8';
3517
- } else if (parts[i] === isoSentinel) {
3518
- charset = 'iso-8859-1';
3519
- }
3520
- skipIndex = i;
3521
- i = parts.length; // The eslint settings do not allow break;
3522
- }
3523
- }
3524
- }
3525
-
3526
- for (i = 0; i < parts.length; ++i) {
3527
- if (i === skipIndex) {
3528
- continue;
3529
- }
3530
- var part = parts[i];
3531
-
3532
- var bracketEqualsPos = part.indexOf(']=');
3533
- var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
3534
-
3535
- var key, val;
3536
- if (pos === -1) {
3537
- key = options.decoder(part, defaults.decoder, charset, 'key');
3538
- val = options.strictNullHandling ? null : '';
3539
- } else {
3540
- key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
3541
- val = utils.maybeMap(
3542
- parseArrayValue(part.slice(pos + 1), options),
3543
- function (encodedVal) {
3544
- return options.decoder(encodedVal, defaults.decoder, charset, 'value');
3545
- }
3546
- );
3547
- }
3548
-
3549
- if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
3550
- val = interpretNumericEntities(val);
3551
- }
3552
-
3553
- if (part.indexOf('[]=') > -1) {
3554
- val = isArray(val) ? [val] : val;
3555
- }
3556
-
3557
- if (has.call(obj, key)) {
3558
- obj[key] = utils.combine(obj[key], val);
3559
- } else {
3560
- obj[key] = val;
3561
- }
3562
- }
3563
-
3564
- return obj;
3565
- };
3566
-
3567
- var parseObject = function (chain, val, options, valuesParsed) {
3568
- var leaf = valuesParsed ? val : parseArrayValue(val, options);
3569
-
3570
- for (var i = chain.length - 1; i >= 0; --i) {
3571
- var obj;
3572
- var root = chain[i];
3573
-
3574
- if (root === '[]' && options.parseArrays) {
3575
- obj = [].concat(leaf);
3576
- } else {
3577
- obj = options.plainObjects ? Object.create(null) : {};
3578
- var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
3579
- var index = parseInt(cleanRoot, 10);
3580
- if (!options.parseArrays && cleanRoot === '') {
3581
- obj = { 0: leaf };
3582
- } else if (
3583
- !isNaN(index)
3584
- && root !== cleanRoot
3585
- && String(index) === cleanRoot
3586
- && index >= 0
3587
- && (options.parseArrays && index <= options.arrayLimit)
3588
- ) {
3589
- obj = [];
3590
- obj[index] = leaf;
3591
- } else if (cleanRoot !== '__proto__') {
3592
- obj[cleanRoot] = leaf;
3593
- }
3594
- }
3595
-
3596
- leaf = obj;
3597
- }
3598
-
3599
- return leaf;
3600
- };
3601
-
3602
- var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
3603
- if (!givenKey) {
3604
- return;
3605
- }
3606
-
3607
- // Transform dot notation to bracket notation
3608
- var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
3609
-
3610
- // The regex chunks
3611
-
3612
- var brackets = /(\[[^[\]]*])/;
3613
- var child = /(\[[^[\]]*])/g;
3614
-
3615
- // Get the parent
3616
-
3617
- var segment = options.depth > 0 && brackets.exec(key);
3618
- var parent = segment ? key.slice(0, segment.index) : key;
3619
-
3620
- // Stash the parent if it exists
3621
-
3622
- var keys = [];
3623
- if (parent) {
3624
- // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
3625
- if (!options.plainObjects && has.call(Object.prototype, parent)) {
3626
- if (!options.allowPrototypes) {
3627
- return;
3628
- }
3629
- }
3630
-
3631
- keys.push(parent);
3632
- }
3633
-
3634
- // Loop through children appending to the array until we hit depth
3635
-
3636
- var i = 0;
3637
- while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
3638
- i += 1;
3639
- if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
3640
- if (!options.allowPrototypes) {
3641
- return;
3642
- }
3643
- }
3644
- keys.push(segment[1]);
3645
- }
3646
-
3647
- // If there's a remainder, just add whatever is left
3648
-
3649
- if (segment) {
3650
- keys.push('[' + key.slice(segment.index) + ']');
3651
- }
3652
-
3653
- return parseObject(keys, val, options, valuesParsed);
3654
- };
3655
-
3656
- var normalizeParseOptions = function normalizeParseOptions(opts) {
3657
- if (!opts) {
3658
- return defaults;
3659
- }
3660
-
3661
- if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
3662
- throw new TypeError('Decoder has to be a function.');
3663
- }
3664
-
3665
- if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
3666
- throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
3667
- }
3668
- var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
3669
-
3670
- return {
3671
- allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
3672
- allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
3673
- allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
3674
- arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
3675
- charset: charset,
3676
- charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
3677
- comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
3678
- decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
3679
- delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
3680
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
3681
- depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
3682
- ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
3683
- interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
3684
- parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
3685
- parseArrays: opts.parseArrays !== false,
3686
- plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
3687
- strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
3688
- };
3689
- };
3690
-
3691
- var parse$1 = function (str, opts) {
3692
- var options = normalizeParseOptions(opts);
3693
-
3694
- if (str === '' || str === null || typeof str === 'undefined') {
3695
- return options.plainObjects ? Object.create(null) : {};
3696
- }
3697
-
3698
- var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
3699
- var obj = options.plainObjects ? Object.create(null) : {};
3700
-
3701
- // Iterate over the keys and setup the new object
3702
-
3703
- var keys = Object.keys(tempObj);
3704
- for (var i = 0; i < keys.length; ++i) {
3705
- var key = keys[i];
3706
- var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
3707
- obj = utils.merge(obj, newObj, options);
3708
- }
3709
-
3710
- if (options.allowSparse === true) {
3711
- return obj;
3712
- }
3713
-
3714
- return utils.compact(obj);
3715
- };
3716
-
3717
- var stringify = stringify_1;
3718
- var parse = parse$1;
3719
- var formats = formats$3;
3720
-
3721
- var lib = {
3722
- formats: formats,
3723
- parse: parse,
3724
- stringify: stringify
3725
- };
3726
-
3727
- var qs = /*@__PURE__*/getDefaultExportFromCjs(lib);
3728
-
3729
- var fetch = function fetch(params) {
3730
- var serializedParams = qs.stringify(keysToSnakeCase(params), {
3731
- arrayFormat: "brackets",
3732
- encode: false
3733
- });
3734
- return axios.get("".concat(BASE_URL, "/teams?").concat(serializedParams));
3735
- };
3736
- var fetchCountsPerCategory = function fetchCountsPerCategory() {
3737
- return axios.get("".concat(BASE_URL, "/teams/counts_per_category"));
3738
- };
3739
- var create = function create(payload) {
3740
- return axios.post("".concat(BASE_URL, "/teams"), payload);
3741
- };
3742
- var update = function update(id, payload) {
3743
- return axios.put("".concat(BASE_URL, "/teams/").concat(id), {
3744
- team: payload
3745
- });
3746
- };
3747
- var bulkUpdate = function bulkUpdate(payload) {
3748
- return axios.patch("".concat(BASE_URL, "/teams/bulk_update"), payload);
3749
- };
3750
- var fetchFilterOptions = function fetchFilterOptions(params) {
3751
- return axios.get("".concat(BASE_URL, "/teams/filter_options"), {
3752
- params: keysToSnakeCase(params)
3753
- });
3754
- };
3755
- var creationStatus = function creationStatus(jobId) {
3756
- return axios.get("".concat(BASE_URL, "/teams/creation_status/").concat(jobId));
3757
- };
3758
- var teamsApi = {
3759
- bulkUpdate: bulkUpdate,
3760
- create: create,
3761
- fetch: fetch,
3762
- update: update,
3763
- fetchFilterOptions: fetchFilterOptions,
3764
- fetchCountsPerCategory: fetchCountsPerCategory,
3765
- creationStatus: creationStatus
3766
- };
3767
-
3768
- var _excluded = ["onSuccess"],
3769
- _excluded2 = ["onSuccess"];
3770
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3771
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
3772
- var useFetchMembers = function useFetchMembers() {
3773
- var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3774
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
3775
- return useQuery(_objectSpread(_objectSpread({
3776
- queryKey: [QUERY_KEYS.TEAMS, params],
3777
- queryFn: function queryFn() {
3778
- return teamsApi.fetch(params);
3779
- },
3780
- select: identity,
3781
- placeholderData: keepPreviousData
3782
- }, options), {}, {
3783
- refetchOnWindowFocus: false
3784
- }));
3785
- };
3786
- var useFetchMembersCountsPerCategory = function useFetchMembersCountsPerCategory() {
3787
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3788
- return useQuery(_objectSpread(_objectSpread({
3789
- queryKey: [QUERY_KEYS.TEAMS],
3790
- queryFn: teamsApi.fetchCountsPerCategory,
3791
- select: identity,
3792
- placeholderData: keepPreviousData
3793
- }, options), {}, {
3794
- refetchOnWindowFocus: false
3795
- }));
3796
- };
3797
- var useCreateMember = function useCreateMember() {
3798
- var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3799
- return useMutation(_objectSpread({
3800
- mutationFn: teamsApi.create
3801
- }, options));
3802
- };
3803
- var useUpdateMember = function useUpdateMember(_ref) {
3804
- var _onSuccess = _ref.onSuccess,
3805
- options = _objectWithoutProperties(_ref, _excluded);
3806
- return useMutationWithInvalidation(function (_ref2) {
3807
- var id = _ref2.id,
3808
- payload = _ref2.payload;
3809
- return teamsApi.update(id, payload);
3810
- }, _objectSpread({
3811
- keysToInvalidate: [[QUERY_KEYS.TEAMS], [QUERY_KEYS.TEAMS_DEPENDENCIES]],
3812
- onSuccess: function onSuccess() {
3813
- _onSuccess === null || _onSuccess === void 0 || _onSuccess();
3814
- }
3815
- }, options));
3816
- };
3817
- var useBulkUpdateMembers = function useBulkUpdateMembers(_ref3) {
3818
- var _onSuccess2 = _ref3.onSuccess,
3819
- options = _objectWithoutProperties(_ref3, _excluded2);
3820
- return useMutationWithInvalidation(teamsApi.bulkUpdate, _objectSpread({
3821
- keysToInvalidate: [[QUERY_KEYS.TEAMS], [QUERY_KEYS.TEAMS_DEPENDENCIES]],
3822
- onSuccess: function onSuccess() {
3823
- _onSuccess2 === null || _onSuccess2 === void 0 || _onSuccess2();
3824
- }
3825
- }, options));
3826
- };
3827
- var refetchMembers = function refetchMembers() {
3828
- queryClient.invalidateQueries({
3829
- queryKey: [QUERY_KEYS.TEAMS]
3830
- });
3831
- queryClient.invalidateQueries({
3832
- queryKey: [QUERY_KEYS.TEAMS_DEPENDENCIES]
3833
- });
3834
- };
3835
- var useFetchFilterOptions = function useFetchFilterOptions(_ref4) {
3836
- var _ref4$params = _ref4.params,
3837
- params = _ref4$params === void 0 ? {} : _ref4$params,
3838
- _ref4$options = _ref4.options,
3839
- options = _ref4$options === void 0 ? {} : _ref4$options;
3840
- return useQuery(_objectSpread(_objectSpread({
3841
- queryKey: [QUERY_KEYS.TEAMS_DEPENDENCIES, params],
3842
- queryFn: function queryFn() {
3843
- return teamsApi.fetchFilterOptions(params);
3844
- },
3845
- select: identity
3846
- }, options), {}, {
3847
- refetchOnWindowFocus: false
3848
- }));
3849
- };
3850
- var useMembersCreationStatus = function useMembersCreationStatus(jobId, options) {
3851
- return useQuery(_objectSpread({
3852
- queryKey: [QUERY_KEYS.CREATION_STATUS, jobId],
3853
- queryFn: function queryFn() {
3854
- return teamsApi.creationStatus(jobId);
3855
- }
3856
- }, options));
3857
- };
3858
-
3859
- export { useFetchMembersCountsPerCategory as a, useFetchFilterOptions as b, useBulkUpdateMembers as c, useUpdateMember as d, useCreateMember as e, useMembersCreationStatus as f, refetchMembers as r, useFetchMembers as u };
3860
- //# sourceMappingURL=useTeamsApi-6277d3a1.js.map