@bigbinary/neeto-payments-frontend 2.5.7 → 3.0.0

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