@strkfarm/sdk 1.0.6 → 1.0.8

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.
@@ -42,6 +42,2339 @@ var strkfarm_risk_engine = (() => {
42
42
  var __toCommonJS = (mod3) => __copyProps(__defProp({}, "__esModule", { value: true }), mod3);
43
43
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
44
44
 
45
+ // node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/browser.js
46
+ var require_browser = __commonJS({
47
+ "node_modules/.pnpm/node-fetch@2.7.0/node_modules/node-fetch/browser.js"(exports, module) {
48
+ "use strict";
49
+ var getGlobal = function() {
50
+ if (typeof self !== "undefined") {
51
+ return self;
52
+ }
53
+ if (typeof window !== "undefined") {
54
+ return window;
55
+ }
56
+ if (typeof global !== "undefined") {
57
+ return global;
58
+ }
59
+ throw new Error("unable to locate global object");
60
+ };
61
+ var globalObject = getGlobal();
62
+ module.exports = exports = globalObject.fetch;
63
+ if (globalObject.fetch) {
64
+ exports.default = globalObject.fetch.bind(globalObject);
65
+ }
66
+ exports.Headers = globalObject.Headers;
67
+ exports.Request = globalObject.Request;
68
+ exports.Response = globalObject.Response;
69
+ }
70
+ });
71
+
72
+ // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js
73
+ var require_es_errors = __commonJS({
74
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/index.js"(exports, module) {
75
+ "use strict";
76
+ module.exports = Error;
77
+ }
78
+ });
79
+
80
+ // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js
81
+ var require_eval = __commonJS({
82
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/eval.js"(exports, module) {
83
+ "use strict";
84
+ module.exports = EvalError;
85
+ }
86
+ });
87
+
88
+ // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js
89
+ var require_range = __commonJS({
90
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/range.js"(exports, module) {
91
+ "use strict";
92
+ module.exports = RangeError;
93
+ }
94
+ });
95
+
96
+ // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js
97
+ var require_ref = __commonJS({
98
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/ref.js"(exports, module) {
99
+ "use strict";
100
+ module.exports = ReferenceError;
101
+ }
102
+ });
103
+
104
+ // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js
105
+ var require_syntax = __commonJS({
106
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/syntax.js"(exports, module) {
107
+ "use strict";
108
+ module.exports = SyntaxError;
109
+ }
110
+ });
111
+
112
+ // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js
113
+ var require_type = __commonJS({
114
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/type.js"(exports, module) {
115
+ "use strict";
116
+ module.exports = TypeError;
117
+ }
118
+ });
119
+
120
+ // node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js
121
+ var require_uri = __commonJS({
122
+ "node_modules/.pnpm/es-errors@1.3.0/node_modules/es-errors/uri.js"(exports, module) {
123
+ "use strict";
124
+ module.exports = URIError;
125
+ }
126
+ });
127
+
128
+ // node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js
129
+ var require_shams = __commonJS({
130
+ "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/shams.js"(exports, module) {
131
+ "use strict";
132
+ module.exports = function hasSymbols() {
133
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
134
+ return false;
135
+ }
136
+ if (typeof Symbol.iterator === "symbol") {
137
+ return true;
138
+ }
139
+ var obj = {};
140
+ var sym = Symbol("test");
141
+ var symObj = Object(sym);
142
+ if (typeof sym === "string") {
143
+ return false;
144
+ }
145
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
146
+ return false;
147
+ }
148
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
149
+ return false;
150
+ }
151
+ var symVal = 42;
152
+ obj[sym] = symVal;
153
+ for (sym in obj) {
154
+ return false;
155
+ }
156
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
157
+ return false;
158
+ }
159
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
160
+ return false;
161
+ }
162
+ var syms = Object.getOwnPropertySymbols(obj);
163
+ if (syms.length !== 1 || syms[0] !== sym) {
164
+ return false;
165
+ }
166
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
167
+ return false;
168
+ }
169
+ if (typeof Object.getOwnPropertyDescriptor === "function") {
170
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
171
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) {
172
+ return false;
173
+ }
174
+ }
175
+ return true;
176
+ };
177
+ }
178
+ });
179
+
180
+ // node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js
181
+ var require_has_symbols = __commonJS({
182
+ "node_modules/.pnpm/has-symbols@1.0.3/node_modules/has-symbols/index.js"(exports, module) {
183
+ "use strict";
184
+ var origSymbol = typeof Symbol !== "undefined" && Symbol;
185
+ var hasSymbolSham = require_shams();
186
+ module.exports = function hasNativeSymbols() {
187
+ if (typeof origSymbol !== "function") {
188
+ return false;
189
+ }
190
+ if (typeof Symbol !== "function") {
191
+ return false;
192
+ }
193
+ if (typeof origSymbol("foo") !== "symbol") {
194
+ return false;
195
+ }
196
+ if (typeof Symbol("bar") !== "symbol") {
197
+ return false;
198
+ }
199
+ return hasSymbolSham();
200
+ };
201
+ }
202
+ });
203
+
204
+ // node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js
205
+ var require_has_proto = __commonJS({
206
+ "node_modules/.pnpm/has-proto@1.0.3/node_modules/has-proto/index.js"(exports, module) {
207
+ "use strict";
208
+ var test = {
209
+ __proto__: null,
210
+ foo: {}
211
+ };
212
+ var $Object = Object;
213
+ module.exports = function hasProto() {
214
+ return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
215
+ };
216
+ }
217
+ });
218
+
219
+ // node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js
220
+ var require_implementation = __commonJS({
221
+ "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module) {
222
+ "use strict";
223
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
224
+ var toStr3 = Object.prototype.toString;
225
+ var max = Math.max;
226
+ var funcType = "[object Function]";
227
+ var concatty = function concatty2(a, b) {
228
+ var arr = [];
229
+ for (var i = 0; i < a.length; i += 1) {
230
+ arr[i] = a[i];
231
+ }
232
+ for (var j = 0; j < b.length; j += 1) {
233
+ arr[j + a.length] = b[j];
234
+ }
235
+ return arr;
236
+ };
237
+ var slicy = function slicy2(arrLike, offset) {
238
+ var arr = [];
239
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
240
+ arr[j] = arrLike[i];
241
+ }
242
+ return arr;
243
+ };
244
+ var joiny = function(arr, joiner) {
245
+ var str = "";
246
+ for (var i = 0; i < arr.length; i += 1) {
247
+ str += arr[i];
248
+ if (i + 1 < arr.length) {
249
+ str += joiner;
250
+ }
251
+ }
252
+ return str;
253
+ };
254
+ module.exports = function bind2(that) {
255
+ var target = this;
256
+ if (typeof target !== "function" || toStr3.apply(target) !== funcType) {
257
+ throw new TypeError(ERROR_MESSAGE + target);
258
+ }
259
+ var args = slicy(arguments, 1);
260
+ var bound;
261
+ var binder = function() {
262
+ if (this instanceof bound) {
263
+ var result = target.apply(
264
+ this,
265
+ concatty(args, arguments)
266
+ );
267
+ if (Object(result) === result) {
268
+ return result;
269
+ }
270
+ return this;
271
+ }
272
+ return target.apply(
273
+ that,
274
+ concatty(args, arguments)
275
+ );
276
+ };
277
+ var boundLength = max(0, target.length - args.length);
278
+ var boundArgs = [];
279
+ for (var i = 0; i < boundLength; i++) {
280
+ boundArgs[i] = "$" + i;
281
+ }
282
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
283
+ if (target.prototype) {
284
+ var Empty = function Empty2() {
285
+ };
286
+ Empty.prototype = target.prototype;
287
+ bound.prototype = new Empty();
288
+ Empty.prototype = null;
289
+ }
290
+ return bound;
291
+ };
292
+ }
293
+ });
294
+
295
+ // node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js
296
+ var require_function_bind = __commonJS({
297
+ "node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module) {
298
+ "use strict";
299
+ var implementation = require_implementation();
300
+ module.exports = Function.prototype.bind || implementation;
301
+ }
302
+ });
303
+
304
+ // node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js
305
+ var require_hasown = __commonJS({
306
+ "node_modules/.pnpm/hasown@2.0.2/node_modules/hasown/index.js"(exports, module) {
307
+ "use strict";
308
+ var call = Function.prototype.call;
309
+ var $hasOwn = Object.prototype.hasOwnProperty;
310
+ var bind2 = require_function_bind();
311
+ module.exports = bind2.call(call, $hasOwn);
312
+ }
313
+ });
314
+
315
+ // node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js
316
+ var require_get_intrinsic = __commonJS({
317
+ "node_modules/.pnpm/get-intrinsic@1.2.4/node_modules/get-intrinsic/index.js"(exports, module) {
318
+ "use strict";
319
+ var undefined2;
320
+ var $Error = require_es_errors();
321
+ var $EvalError = require_eval();
322
+ var $RangeError = require_range();
323
+ var $ReferenceError = require_ref();
324
+ var $SyntaxError = require_syntax();
325
+ var $TypeError = require_type();
326
+ var $URIError = require_uri();
327
+ var $Function = Function;
328
+ var getEvalledConstructor = function(expressionSyntax) {
329
+ try {
330
+ return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
331
+ } catch (e) {
332
+ }
333
+ };
334
+ var $gOPD = Object.getOwnPropertyDescriptor;
335
+ if ($gOPD) {
336
+ try {
337
+ $gOPD({}, "");
338
+ } catch (e) {
339
+ $gOPD = null;
340
+ }
341
+ }
342
+ var throwTypeError = function() {
343
+ throw new $TypeError();
344
+ };
345
+ var ThrowTypeError = $gOPD ? function() {
346
+ try {
347
+ arguments.callee;
348
+ return throwTypeError;
349
+ } catch (calleeThrows) {
350
+ try {
351
+ return $gOPD(arguments, "callee").get;
352
+ } catch (gOPDthrows) {
353
+ return throwTypeError;
354
+ }
355
+ }
356
+ }() : throwTypeError;
357
+ var hasSymbols = require_has_symbols()();
358
+ var hasProto = require_has_proto()();
359
+ var getProto = Object.getPrototypeOf || (hasProto ? function(x) {
360
+ return x.__proto__;
361
+ } : null);
362
+ var needsEval = {};
363
+ var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined2 : getProto(Uint8Array);
364
+ var INTRINSICS = {
365
+ __proto__: null,
366
+ "%AggregateError%": typeof AggregateError === "undefined" ? undefined2 : AggregateError,
367
+ "%Array%": Array,
368
+ "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined2 : ArrayBuffer,
369
+ "%ArrayIteratorPrototype%": hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined2,
370
+ "%AsyncFromSyncIteratorPrototype%": undefined2,
371
+ "%AsyncFunction%": needsEval,
372
+ "%AsyncGenerator%": needsEval,
373
+ "%AsyncGeneratorFunction%": needsEval,
374
+ "%AsyncIteratorPrototype%": needsEval,
375
+ "%Atomics%": typeof Atomics === "undefined" ? undefined2 : Atomics,
376
+ "%BigInt%": typeof BigInt === "undefined" ? undefined2 : BigInt,
377
+ "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined2 : BigInt64Array,
378
+ "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined2 : BigUint64Array,
379
+ "%Boolean%": Boolean,
380
+ "%DataView%": typeof DataView === "undefined" ? undefined2 : DataView,
381
+ "%Date%": Date,
382
+ "%decodeURI%": decodeURI,
383
+ "%decodeURIComponent%": decodeURIComponent,
384
+ "%encodeURI%": encodeURI,
385
+ "%encodeURIComponent%": encodeURIComponent,
386
+ "%Error%": $Error,
387
+ "%eval%": eval,
388
+ // eslint-disable-line no-eval
389
+ "%EvalError%": $EvalError,
390
+ "%Float32Array%": typeof Float32Array === "undefined" ? undefined2 : Float32Array,
391
+ "%Float64Array%": typeof Float64Array === "undefined" ? undefined2 : Float64Array,
392
+ "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined2 : FinalizationRegistry,
393
+ "%Function%": $Function,
394
+ "%GeneratorFunction%": needsEval,
395
+ "%Int8Array%": typeof Int8Array === "undefined" ? undefined2 : Int8Array,
396
+ "%Int16Array%": typeof Int16Array === "undefined" ? undefined2 : Int16Array,
397
+ "%Int32Array%": typeof Int32Array === "undefined" ? undefined2 : Int32Array,
398
+ "%isFinite%": isFinite,
399
+ "%isNaN%": isNaN,
400
+ "%IteratorPrototype%": hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined2,
401
+ "%JSON%": typeof JSON === "object" ? JSON : undefined2,
402
+ "%Map%": typeof Map === "undefined" ? undefined2 : Map,
403
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Map())[Symbol.iterator]()),
404
+ "%Math%": Math,
405
+ "%Number%": Number,
406
+ "%Object%": Object,
407
+ "%parseFloat%": parseFloat,
408
+ "%parseInt%": parseInt,
409
+ "%Promise%": typeof Promise === "undefined" ? undefined2 : Promise,
410
+ "%Proxy%": typeof Proxy === "undefined" ? undefined2 : Proxy,
411
+ "%RangeError%": $RangeError,
412
+ "%ReferenceError%": $ReferenceError,
413
+ "%Reflect%": typeof Reflect === "undefined" ? undefined2 : Reflect,
414
+ "%RegExp%": RegExp,
415
+ "%Set%": typeof Set === "undefined" ? undefined2 : Set,
416
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols || !getProto ? undefined2 : getProto((/* @__PURE__ */ new Set())[Symbol.iterator]()),
417
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined2 : SharedArrayBuffer,
418
+ "%String%": String,
419
+ "%StringIteratorPrototype%": hasSymbols && getProto ? getProto(""[Symbol.iterator]()) : undefined2,
420
+ "%Symbol%": hasSymbols ? Symbol : undefined2,
421
+ "%SyntaxError%": $SyntaxError,
422
+ "%ThrowTypeError%": ThrowTypeError,
423
+ "%TypedArray%": TypedArray,
424
+ "%TypeError%": $TypeError,
425
+ "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined2 : Uint8Array,
426
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined2 : Uint8ClampedArray,
427
+ "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined2 : Uint16Array,
428
+ "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined2 : Uint32Array,
429
+ "%URIError%": $URIError,
430
+ "%WeakMap%": typeof WeakMap === "undefined" ? undefined2 : WeakMap,
431
+ "%WeakRef%": typeof WeakRef === "undefined" ? undefined2 : WeakRef,
432
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined2 : WeakSet
433
+ };
434
+ if (getProto) {
435
+ try {
436
+ null.error;
437
+ } catch (e) {
438
+ errorProto = getProto(getProto(e));
439
+ INTRINSICS["%Error.prototype%"] = errorProto;
440
+ }
441
+ }
442
+ var errorProto;
443
+ var doEval = function doEval2(name) {
444
+ var value;
445
+ if (name === "%AsyncFunction%") {
446
+ value = getEvalledConstructor("async function () {}");
447
+ } else if (name === "%GeneratorFunction%") {
448
+ value = getEvalledConstructor("function* () {}");
449
+ } else if (name === "%AsyncGeneratorFunction%") {
450
+ value = getEvalledConstructor("async function* () {}");
451
+ } else if (name === "%AsyncGenerator%") {
452
+ var fn = doEval2("%AsyncGeneratorFunction%");
453
+ if (fn) {
454
+ value = fn.prototype;
455
+ }
456
+ } else if (name === "%AsyncIteratorPrototype%") {
457
+ var gen3 = doEval2("%AsyncGenerator%");
458
+ if (gen3 && getProto) {
459
+ value = getProto(gen3.prototype);
460
+ }
461
+ }
462
+ INTRINSICS[name] = value;
463
+ return value;
464
+ };
465
+ var LEGACY_ALIASES = {
466
+ __proto__: null,
467
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
468
+ "%ArrayPrototype%": ["Array", "prototype"],
469
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
470
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
471
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
472
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
473
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
474
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
475
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
476
+ "%BooleanPrototype%": ["Boolean", "prototype"],
477
+ "%DataViewPrototype%": ["DataView", "prototype"],
478
+ "%DatePrototype%": ["Date", "prototype"],
479
+ "%ErrorPrototype%": ["Error", "prototype"],
480
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
481
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
482
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
483
+ "%FunctionPrototype%": ["Function", "prototype"],
484
+ "%Generator%": ["GeneratorFunction", "prototype"],
485
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
486
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
487
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
488
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
489
+ "%JSONParse%": ["JSON", "parse"],
490
+ "%JSONStringify%": ["JSON", "stringify"],
491
+ "%MapPrototype%": ["Map", "prototype"],
492
+ "%NumberPrototype%": ["Number", "prototype"],
493
+ "%ObjectPrototype%": ["Object", "prototype"],
494
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
495
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
496
+ "%PromisePrototype%": ["Promise", "prototype"],
497
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
498
+ "%Promise_all%": ["Promise", "all"],
499
+ "%Promise_reject%": ["Promise", "reject"],
500
+ "%Promise_resolve%": ["Promise", "resolve"],
501
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
502
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
503
+ "%RegExpPrototype%": ["RegExp", "prototype"],
504
+ "%SetPrototype%": ["Set", "prototype"],
505
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
506
+ "%StringPrototype%": ["String", "prototype"],
507
+ "%SymbolPrototype%": ["Symbol", "prototype"],
508
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
509
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
510
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
511
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
512
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
513
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
514
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
515
+ "%URIErrorPrototype%": ["URIError", "prototype"],
516
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
517
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
518
+ };
519
+ var bind2 = require_function_bind();
520
+ var hasOwn = require_hasown();
521
+ var $concat = bind2.call(Function.call, Array.prototype.concat);
522
+ var $spliceApply = bind2.call(Function.apply, Array.prototype.splice);
523
+ var $replace = bind2.call(Function.call, String.prototype.replace);
524
+ var $strSlice = bind2.call(Function.call, String.prototype.slice);
525
+ var $exec = bind2.call(Function.call, RegExp.prototype.exec);
526
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
527
+ var reEscapeChar = /\\(\\)?/g;
528
+ var stringToPath = function stringToPath2(string) {
529
+ var first = $strSlice(string, 0, 1);
530
+ var last = $strSlice(string, -1);
531
+ if (first === "%" && last !== "%") {
532
+ throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
533
+ } else if (last === "%" && first !== "%") {
534
+ throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
535
+ }
536
+ var result = [];
537
+ $replace(string, rePropName, function(match, number3, quote, subString) {
538
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number3 || match;
539
+ });
540
+ return result;
541
+ };
542
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
543
+ var intrinsicName = name;
544
+ var alias;
545
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
546
+ alias = LEGACY_ALIASES[intrinsicName];
547
+ intrinsicName = "%" + alias[0] + "%";
548
+ }
549
+ if (hasOwn(INTRINSICS, intrinsicName)) {
550
+ var value = INTRINSICS[intrinsicName];
551
+ if (value === needsEval) {
552
+ value = doEval(intrinsicName);
553
+ }
554
+ if (typeof value === "undefined" && !allowMissing) {
555
+ throw new $TypeError("intrinsic " + name + " exists, but is not available. Please file an issue!");
556
+ }
557
+ return {
558
+ alias,
559
+ name: intrinsicName,
560
+ value
561
+ };
562
+ }
563
+ throw new $SyntaxError("intrinsic " + name + " does not exist!");
564
+ };
565
+ module.exports = function GetIntrinsic(name, allowMissing) {
566
+ if (typeof name !== "string" || name.length === 0) {
567
+ throw new $TypeError("intrinsic name must be a non-empty string");
568
+ }
569
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") {
570
+ throw new $TypeError('"allowMissing" argument must be a boolean');
571
+ }
572
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
573
+ throw new $SyntaxError("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
574
+ }
575
+ var parts = stringToPath(name);
576
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
577
+ var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
578
+ var intrinsicRealName = intrinsic.name;
579
+ var value = intrinsic.value;
580
+ var skipFurtherCaching = false;
581
+ var alias = intrinsic.alias;
582
+ if (alias) {
583
+ intrinsicBaseName = alias[0];
584
+ $spliceApply(parts, $concat([0, 1], alias));
585
+ }
586
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
587
+ var part = parts[i];
588
+ var first = $strSlice(part, 0, 1);
589
+ var last = $strSlice(part, -1);
590
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
591
+ throw new $SyntaxError("property names with quotes must have matching quotes");
592
+ }
593
+ if (part === "constructor" || !isOwn) {
594
+ skipFurtherCaching = true;
595
+ }
596
+ intrinsicBaseName += "." + part;
597
+ intrinsicRealName = "%" + intrinsicBaseName + "%";
598
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
599
+ value = INTRINSICS[intrinsicRealName];
600
+ } else if (value != null) {
601
+ if (!(part in value)) {
602
+ if (!allowMissing) {
603
+ throw new $TypeError("base intrinsic for " + name + " exists, but the property is not available.");
604
+ }
605
+ return void 0;
606
+ }
607
+ if ($gOPD && i + 1 >= parts.length) {
608
+ var desc = $gOPD(value, part);
609
+ isOwn = !!desc;
610
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
611
+ value = desc.get;
612
+ } else {
613
+ value = value[part];
614
+ }
615
+ } else {
616
+ isOwn = hasOwn(value, part);
617
+ value = value[part];
618
+ }
619
+ if (isOwn && !skipFurtherCaching) {
620
+ INTRINSICS[intrinsicRealName] = value;
621
+ }
622
+ }
623
+ }
624
+ return value;
625
+ };
626
+ }
627
+ });
628
+
629
+ // node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js
630
+ var require_es_define_property = __commonJS({
631
+ "node_modules/.pnpm/es-define-property@1.0.0/node_modules/es-define-property/index.js"(exports, module) {
632
+ "use strict";
633
+ var GetIntrinsic = require_get_intrinsic();
634
+ var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
635
+ if ($defineProperty) {
636
+ try {
637
+ $defineProperty({}, "a", { value: 1 });
638
+ } catch (e) {
639
+ $defineProperty = false;
640
+ }
641
+ }
642
+ module.exports = $defineProperty;
643
+ }
644
+ });
645
+
646
+ // node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js
647
+ var require_gopd = __commonJS({
648
+ "node_modules/.pnpm/gopd@1.0.1/node_modules/gopd/index.js"(exports, module) {
649
+ "use strict";
650
+ var GetIntrinsic = require_get_intrinsic();
651
+ var $gOPD = GetIntrinsic("%Object.getOwnPropertyDescriptor%", true);
652
+ if ($gOPD) {
653
+ try {
654
+ $gOPD([], "length");
655
+ } catch (e) {
656
+ $gOPD = null;
657
+ }
658
+ }
659
+ module.exports = $gOPD;
660
+ }
661
+ });
662
+
663
+ // node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js
664
+ var require_define_data_property = __commonJS({
665
+ "node_modules/.pnpm/define-data-property@1.1.4/node_modules/define-data-property/index.js"(exports, module) {
666
+ "use strict";
667
+ var $defineProperty = require_es_define_property();
668
+ var $SyntaxError = require_syntax();
669
+ var $TypeError = require_type();
670
+ var gopd = require_gopd();
671
+ module.exports = function defineDataProperty(obj, property, value) {
672
+ if (!obj || typeof obj !== "object" && typeof obj !== "function") {
673
+ throw new $TypeError("`obj` must be an object or a function`");
674
+ }
675
+ if (typeof property !== "string" && typeof property !== "symbol") {
676
+ throw new $TypeError("`property` must be a string or a symbol`");
677
+ }
678
+ if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
679
+ throw new $TypeError("`nonEnumerable`, if provided, must be a boolean or null");
680
+ }
681
+ if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
682
+ throw new $TypeError("`nonWritable`, if provided, must be a boolean or null");
683
+ }
684
+ if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
685
+ throw new $TypeError("`nonConfigurable`, if provided, must be a boolean or null");
686
+ }
687
+ if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
688
+ throw new $TypeError("`loose`, if provided, must be a boolean");
689
+ }
690
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
691
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
692
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
693
+ var loose = arguments.length > 6 ? arguments[6] : false;
694
+ var desc = !!gopd && gopd(obj, property);
695
+ if ($defineProperty) {
696
+ $defineProperty(obj, property, {
697
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
698
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
699
+ value,
700
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
701
+ });
702
+ } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
703
+ obj[property] = value;
704
+ } else {
705
+ throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
706
+ }
707
+ };
708
+ }
709
+ });
710
+
711
+ // node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js
712
+ var require_has_property_descriptors = __commonJS({
713
+ "node_modules/.pnpm/has-property-descriptors@1.0.2/node_modules/has-property-descriptors/index.js"(exports, module) {
714
+ "use strict";
715
+ var $defineProperty = require_es_define_property();
716
+ var hasPropertyDescriptors = function hasPropertyDescriptors2() {
717
+ return !!$defineProperty;
718
+ };
719
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
720
+ if (!$defineProperty) {
721
+ return null;
722
+ }
723
+ try {
724
+ return $defineProperty([], "length", { value: 1 }).length !== 1;
725
+ } catch (e) {
726
+ return true;
727
+ }
728
+ };
729
+ module.exports = hasPropertyDescriptors;
730
+ }
731
+ });
732
+
733
+ // node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js
734
+ var require_set_function_length = __commonJS({
735
+ "node_modules/.pnpm/set-function-length@1.2.2/node_modules/set-function-length/index.js"(exports, module) {
736
+ "use strict";
737
+ var GetIntrinsic = require_get_intrinsic();
738
+ var define2 = require_define_data_property();
739
+ var hasDescriptors = require_has_property_descriptors()();
740
+ var gOPD = require_gopd();
741
+ var $TypeError = require_type();
742
+ var $floor = GetIntrinsic("%Math.floor%");
743
+ module.exports = function setFunctionLength(fn, length) {
744
+ if (typeof fn !== "function") {
745
+ throw new $TypeError("`fn` is not a function");
746
+ }
747
+ if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
748
+ throw new $TypeError("`length` must be a positive 32-bit integer");
749
+ }
750
+ var loose = arguments.length > 2 && !!arguments[2];
751
+ var functionLengthIsConfigurable = true;
752
+ var functionLengthIsWritable = true;
753
+ if ("length" in fn && gOPD) {
754
+ var desc = gOPD(fn, "length");
755
+ if (desc && !desc.configurable) {
756
+ functionLengthIsConfigurable = false;
757
+ }
758
+ if (desc && !desc.writable) {
759
+ functionLengthIsWritable = false;
760
+ }
761
+ }
762
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
763
+ if (hasDescriptors) {
764
+ define2(
765
+ /** @type {Parameters<define>[0]} */
766
+ fn,
767
+ "length",
768
+ length,
769
+ true,
770
+ true
771
+ );
772
+ } else {
773
+ define2(
774
+ /** @type {Parameters<define>[0]} */
775
+ fn,
776
+ "length",
777
+ length
778
+ );
779
+ }
780
+ }
781
+ return fn;
782
+ };
783
+ }
784
+ });
785
+
786
+ // node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js
787
+ var require_call_bind = __commonJS({
788
+ "node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/index.js"(exports, module) {
789
+ "use strict";
790
+ var bind2 = require_function_bind();
791
+ var GetIntrinsic = require_get_intrinsic();
792
+ var setFunctionLength = require_set_function_length();
793
+ var $TypeError = require_type();
794
+ var $apply = GetIntrinsic("%Function.prototype.apply%");
795
+ var $call = GetIntrinsic("%Function.prototype.call%");
796
+ var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind2.call($call, $apply);
797
+ var $defineProperty = require_es_define_property();
798
+ var $max = GetIntrinsic("%Math.max%");
799
+ module.exports = function callBind(originalFunction) {
800
+ if (typeof originalFunction !== "function") {
801
+ throw new $TypeError("a function is required");
802
+ }
803
+ var func = $reflectApply(bind2, $call, arguments);
804
+ return setFunctionLength(
805
+ func,
806
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
807
+ true
808
+ );
809
+ };
810
+ var applyBind = function applyBind2() {
811
+ return $reflectApply(bind2, $apply, arguments);
812
+ };
813
+ if ($defineProperty) {
814
+ $defineProperty(module.exports, "apply", { value: applyBind });
815
+ } else {
816
+ module.exports.apply = applyBind;
817
+ }
818
+ }
819
+ });
820
+
821
+ // node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js
822
+ var require_callBound = __commonJS({
823
+ "node_modules/.pnpm/call-bind@1.0.7/node_modules/call-bind/callBound.js"(exports, module) {
824
+ "use strict";
825
+ var GetIntrinsic = require_get_intrinsic();
826
+ var callBind = require_call_bind();
827
+ var $indexOf = callBind(GetIntrinsic("String.prototype.indexOf"));
828
+ module.exports = function callBoundIntrinsic(name, allowMissing) {
829
+ var intrinsic = GetIntrinsic(name, !!allowMissing);
830
+ if (typeof intrinsic === "function" && $indexOf(name, ".prototype.") > -1) {
831
+ return callBind(intrinsic);
832
+ }
833
+ return intrinsic;
834
+ };
835
+ }
836
+ });
837
+
838
+ // (disabled):node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/util.inspect
839
+ var require_util = __commonJS({
840
+ "(disabled):node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/util.inspect"() {
841
+ "use strict";
842
+ }
843
+ });
844
+
845
+ // node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/index.js
846
+ var require_object_inspect = __commonJS({
847
+ "node_modules/.pnpm/object-inspect@1.13.2/node_modules/object-inspect/index.js"(exports, module) {
848
+ "use strict";
849
+ var hasMap = typeof Map === "function" && Map.prototype;
850
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null;
851
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === "function" ? mapSizeDescriptor.get : null;
852
+ var mapForEach = hasMap && Map.prototype.forEach;
853
+ var hasSet = typeof Set === "function" && Set.prototype;
854
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null;
855
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === "function" ? setSizeDescriptor.get : null;
856
+ var setForEach = hasSet && Set.prototype.forEach;
857
+ var hasWeakMap = typeof WeakMap === "function" && WeakMap.prototype;
858
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
859
+ var hasWeakSet = typeof WeakSet === "function" && WeakSet.prototype;
860
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
861
+ var hasWeakRef = typeof WeakRef === "function" && WeakRef.prototype;
862
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
863
+ var booleanValueOf = Boolean.prototype.valueOf;
864
+ var objectToString = Object.prototype.toString;
865
+ var functionToString = Function.prototype.toString;
866
+ var $match = String.prototype.match;
867
+ var $slice = String.prototype.slice;
868
+ var $replace = String.prototype.replace;
869
+ var $toUpperCase = String.prototype.toUpperCase;
870
+ var $toLowerCase = String.prototype.toLowerCase;
871
+ var $test = RegExp.prototype.test;
872
+ var $concat = Array.prototype.concat;
873
+ var $join = Array.prototype.join;
874
+ var $arrSlice = Array.prototype.slice;
875
+ var $floor = Math.floor;
876
+ var bigIntValueOf = typeof BigInt === "function" ? BigInt.prototype.valueOf : null;
877
+ var gOPS = Object.getOwnPropertySymbols;
878
+ var symToString = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? Symbol.prototype.toString : null;
879
+ var hasShammedSymbols = typeof Symbol === "function" && typeof Symbol.iterator === "object";
880
+ var toStringTag = typeof Symbol === "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? "object" : "symbol") ? Symbol.toStringTag : null;
881
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
882
+ var gPO = (typeof Reflect === "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(O) {
883
+ return O.__proto__;
884
+ } : null);
885
+ function addNumericSeparator(num, str) {
886
+ if (num === Infinity || num === -Infinity || num !== num || num && num > -1e3 && num < 1e3 || $test.call(/e/, str)) {
887
+ return str;
888
+ }
889
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
890
+ if (typeof num === "number") {
891
+ var int = num < 0 ? -$floor(-num) : $floor(num);
892
+ if (int !== num) {
893
+ var intStr = String(int);
894
+ var dec = $slice.call(str, intStr.length + 1);
895
+ return $replace.call(intStr, sepRegex, "$&_") + "." + $replace.call($replace.call(dec, /([0-9]{3})/g, "$&_"), /_$/, "");
896
+ }
897
+ }
898
+ return $replace.call(str, sepRegex, "$&_");
899
+ }
900
+ var utilInspect = require_util();
901
+ var inspectCustom = utilInspect.custom;
902
+ var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
903
+ module.exports = function inspect_(obj, options, depth, seen) {
904
+ var opts = options || {};
905
+ if (has(opts, "quoteStyle") && (opts.quoteStyle !== "single" && opts.quoteStyle !== "double")) {
906
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
907
+ }
908
+ if (has(opts, "maxStringLength") && (typeof opts.maxStringLength === "number" ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity : opts.maxStringLength !== null)) {
909
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
910
+ }
911
+ var customInspect = has(opts, "customInspect") ? opts.customInspect : true;
912
+ if (typeof customInspect !== "boolean" && customInspect !== "symbol") {
913
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
914
+ }
915
+ if (has(opts, "indent") && opts.indent !== null && opts.indent !== " " && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)) {
916
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
917
+ }
918
+ if (has(opts, "numericSeparator") && typeof opts.numericSeparator !== "boolean") {
919
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
920
+ }
921
+ var numericSeparator = opts.numericSeparator;
922
+ if (typeof obj === "undefined") {
923
+ return "undefined";
924
+ }
925
+ if (obj === null) {
926
+ return "null";
927
+ }
928
+ if (typeof obj === "boolean") {
929
+ return obj ? "true" : "false";
930
+ }
931
+ if (typeof obj === "string") {
932
+ return inspectString(obj, opts);
933
+ }
934
+ if (typeof obj === "number") {
935
+ if (obj === 0) {
936
+ return Infinity / obj > 0 ? "0" : "-0";
937
+ }
938
+ var str = String(obj);
939
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
940
+ }
941
+ if (typeof obj === "bigint") {
942
+ var bigIntStr = String(obj) + "n";
943
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
944
+ }
945
+ var maxDepth = typeof opts.depth === "undefined" ? 5 : opts.depth;
946
+ if (typeof depth === "undefined") {
947
+ depth = 0;
948
+ }
949
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === "object") {
950
+ return isArray2(obj) ? "[Array]" : "[Object]";
951
+ }
952
+ var indent = getIndent(opts, depth);
953
+ if (typeof seen === "undefined") {
954
+ seen = [];
955
+ } else if (indexOf(seen, obj) >= 0) {
956
+ return "[Circular]";
957
+ }
958
+ function inspect(value, from, noIndent) {
959
+ if (from) {
960
+ seen = $arrSlice.call(seen);
961
+ seen.push(from);
962
+ }
963
+ if (noIndent) {
964
+ var newOpts = {
965
+ depth: opts.depth
966
+ };
967
+ if (has(opts, "quoteStyle")) {
968
+ newOpts.quoteStyle = opts.quoteStyle;
969
+ }
970
+ return inspect_(value, newOpts, depth + 1, seen);
971
+ }
972
+ return inspect_(value, opts, depth + 1, seen);
973
+ }
974
+ if (typeof obj === "function" && !isRegExp2(obj)) {
975
+ var name = nameOf(obj);
976
+ var keys = arrObjKeys(obj, inspect);
977
+ return "[Function" + (name ? ": " + name : " (anonymous)") + "]" + (keys.length > 0 ? " { " + $join.call(keys, ", ") + " }" : "");
978
+ }
979
+ if (isSymbol(obj)) {
980
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, "$1") : symToString.call(obj);
981
+ return typeof obj === "object" && !hasShammedSymbols ? markBoxed(symString) : symString;
982
+ }
983
+ if (isElement(obj)) {
984
+ var s = "<" + $toLowerCase.call(String(obj.nodeName));
985
+ var attrs = obj.attributes || [];
986
+ for (var i = 0; i < attrs.length; i++) {
987
+ s += " " + attrs[i].name + "=" + wrapQuotes(quote(attrs[i].value), "double", opts);
988
+ }
989
+ s += ">";
990
+ if (obj.childNodes && obj.childNodes.length) {
991
+ s += "...";
992
+ }
993
+ s += "</" + $toLowerCase.call(String(obj.nodeName)) + ">";
994
+ return s;
995
+ }
996
+ if (isArray2(obj)) {
997
+ if (obj.length === 0) {
998
+ return "[]";
999
+ }
1000
+ var xs = arrObjKeys(obj, inspect);
1001
+ if (indent && !singleLineValues(xs)) {
1002
+ return "[" + indentedJoin(xs, indent) + "]";
1003
+ }
1004
+ return "[ " + $join.call(xs, ", ") + " ]";
1005
+ }
1006
+ if (isError(obj)) {
1007
+ var parts = arrObjKeys(obj, inspect);
1008
+ if (!("cause" in Error.prototype) && "cause" in obj && !isEnumerable.call(obj, "cause")) {
1009
+ return "{ [" + String(obj) + "] " + $join.call($concat.call("[cause]: " + inspect(obj.cause), parts), ", ") + " }";
1010
+ }
1011
+ if (parts.length === 0) {
1012
+ return "[" + String(obj) + "]";
1013
+ }
1014
+ return "{ [" + String(obj) + "] " + $join.call(parts, ", ") + " }";
1015
+ }
1016
+ if (typeof obj === "object" && customInspect) {
1017
+ if (inspectSymbol && typeof obj[inspectSymbol] === "function" && utilInspect) {
1018
+ return utilInspect(obj, { depth: maxDepth - depth });
1019
+ } else if (customInspect !== "symbol" && typeof obj.inspect === "function") {
1020
+ return obj.inspect();
1021
+ }
1022
+ }
1023
+ if (isMap(obj)) {
1024
+ var mapParts = [];
1025
+ if (mapForEach) {
1026
+ mapForEach.call(obj, function(value, key) {
1027
+ mapParts.push(inspect(key, obj, true) + " => " + inspect(value, obj));
1028
+ });
1029
+ }
1030
+ return collectionOf("Map", mapSize.call(obj), mapParts, indent);
1031
+ }
1032
+ if (isSet(obj)) {
1033
+ var setParts = [];
1034
+ if (setForEach) {
1035
+ setForEach.call(obj, function(value) {
1036
+ setParts.push(inspect(value, obj));
1037
+ });
1038
+ }
1039
+ return collectionOf("Set", setSize.call(obj), setParts, indent);
1040
+ }
1041
+ if (isWeakMap(obj)) {
1042
+ return weakCollectionOf("WeakMap");
1043
+ }
1044
+ if (isWeakSet(obj)) {
1045
+ return weakCollectionOf("WeakSet");
1046
+ }
1047
+ if (isWeakRef(obj)) {
1048
+ return weakCollectionOf("WeakRef");
1049
+ }
1050
+ if (isNumber4(obj)) {
1051
+ return markBoxed(inspect(Number(obj)));
1052
+ }
1053
+ if (isBigInt2(obj)) {
1054
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
1055
+ }
1056
+ if (isBoolean3(obj)) {
1057
+ return markBoxed(booleanValueOf.call(obj));
1058
+ }
1059
+ if (isString3(obj)) {
1060
+ return markBoxed(inspect(String(obj)));
1061
+ }
1062
+ if (typeof window !== "undefined" && obj === window) {
1063
+ return "{ [object Window] }";
1064
+ }
1065
+ if (typeof globalThis !== "undefined" && obj === globalThis || typeof global !== "undefined" && obj === global) {
1066
+ return "{ [object globalThis] }";
1067
+ }
1068
+ if (!isDate2(obj) && !isRegExp2(obj)) {
1069
+ var ys = arrObjKeys(obj, inspect);
1070
+ var isPlainObject2 = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1071
+ var protoTag = obj instanceof Object ? "" : "null prototype";
1072
+ var stringTag = !isPlainObject2 && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr3(obj), 8, -1) : protoTag ? "Object" : "";
1073
+ var constructorTag = isPlainObject2 || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
1074
+ var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
1075
+ if (ys.length === 0) {
1076
+ return tag + "{}";
1077
+ }
1078
+ if (indent) {
1079
+ return tag + "{" + indentedJoin(ys, indent) + "}";
1080
+ }
1081
+ return tag + "{ " + $join.call(ys, ", ") + " }";
1082
+ }
1083
+ return String(obj);
1084
+ };
1085
+ function wrapQuotes(s, defaultStyle, opts) {
1086
+ var quoteChar = (opts.quoteStyle || defaultStyle) === "double" ? '"' : "'";
1087
+ return quoteChar + s + quoteChar;
1088
+ }
1089
+ function quote(s) {
1090
+ return $replace.call(String(s), /"/g, "&quot;");
1091
+ }
1092
+ function isArray2(obj) {
1093
+ return toStr3(obj) === "[object Array]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1094
+ }
1095
+ function isDate2(obj) {
1096
+ return toStr3(obj) === "[object Date]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1097
+ }
1098
+ function isRegExp2(obj) {
1099
+ return toStr3(obj) === "[object RegExp]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1100
+ }
1101
+ function isError(obj) {
1102
+ return toStr3(obj) === "[object Error]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1103
+ }
1104
+ function isString3(obj) {
1105
+ return toStr3(obj) === "[object String]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1106
+ }
1107
+ function isNumber4(obj) {
1108
+ return toStr3(obj) === "[object Number]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1109
+ }
1110
+ function isBoolean3(obj) {
1111
+ return toStr3(obj) === "[object Boolean]" && (!toStringTag || !(typeof obj === "object" && toStringTag in obj));
1112
+ }
1113
+ function isSymbol(obj) {
1114
+ if (hasShammedSymbols) {
1115
+ return obj && typeof obj === "object" && obj instanceof Symbol;
1116
+ }
1117
+ if (typeof obj === "symbol") {
1118
+ return true;
1119
+ }
1120
+ if (!obj || typeof obj !== "object" || !symToString) {
1121
+ return false;
1122
+ }
1123
+ try {
1124
+ symToString.call(obj);
1125
+ return true;
1126
+ } catch (e) {
1127
+ }
1128
+ return false;
1129
+ }
1130
+ function isBigInt2(obj) {
1131
+ if (!obj || typeof obj !== "object" || !bigIntValueOf) {
1132
+ return false;
1133
+ }
1134
+ try {
1135
+ bigIntValueOf.call(obj);
1136
+ return true;
1137
+ } catch (e) {
1138
+ }
1139
+ return false;
1140
+ }
1141
+ var hasOwn = Object.prototype.hasOwnProperty || function(key) {
1142
+ return key in this;
1143
+ };
1144
+ function has(obj, key) {
1145
+ return hasOwn.call(obj, key);
1146
+ }
1147
+ function toStr3(obj) {
1148
+ return objectToString.call(obj);
1149
+ }
1150
+ function nameOf(f) {
1151
+ if (f.name) {
1152
+ return f.name;
1153
+ }
1154
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
1155
+ if (m) {
1156
+ return m[1];
1157
+ }
1158
+ return null;
1159
+ }
1160
+ function indexOf(xs, x) {
1161
+ if (xs.indexOf) {
1162
+ return xs.indexOf(x);
1163
+ }
1164
+ for (var i = 0, l = xs.length; i < l; i++) {
1165
+ if (xs[i] === x) {
1166
+ return i;
1167
+ }
1168
+ }
1169
+ return -1;
1170
+ }
1171
+ function isMap(x) {
1172
+ if (!mapSize || !x || typeof x !== "object") {
1173
+ return false;
1174
+ }
1175
+ try {
1176
+ mapSize.call(x);
1177
+ try {
1178
+ setSize.call(x);
1179
+ } catch (s) {
1180
+ return true;
1181
+ }
1182
+ return x instanceof Map;
1183
+ } catch (e) {
1184
+ }
1185
+ return false;
1186
+ }
1187
+ function isWeakMap(x) {
1188
+ if (!weakMapHas || !x || typeof x !== "object") {
1189
+ return false;
1190
+ }
1191
+ try {
1192
+ weakMapHas.call(x, weakMapHas);
1193
+ try {
1194
+ weakSetHas.call(x, weakSetHas);
1195
+ } catch (s) {
1196
+ return true;
1197
+ }
1198
+ return x instanceof WeakMap;
1199
+ } catch (e) {
1200
+ }
1201
+ return false;
1202
+ }
1203
+ function isWeakRef(x) {
1204
+ if (!weakRefDeref || !x || typeof x !== "object") {
1205
+ return false;
1206
+ }
1207
+ try {
1208
+ weakRefDeref.call(x);
1209
+ return true;
1210
+ } catch (e) {
1211
+ }
1212
+ return false;
1213
+ }
1214
+ function isSet(x) {
1215
+ if (!setSize || !x || typeof x !== "object") {
1216
+ return false;
1217
+ }
1218
+ try {
1219
+ setSize.call(x);
1220
+ try {
1221
+ mapSize.call(x);
1222
+ } catch (m) {
1223
+ return true;
1224
+ }
1225
+ return x instanceof Set;
1226
+ } catch (e) {
1227
+ }
1228
+ return false;
1229
+ }
1230
+ function isWeakSet(x) {
1231
+ if (!weakSetHas || !x || typeof x !== "object") {
1232
+ return false;
1233
+ }
1234
+ try {
1235
+ weakSetHas.call(x, weakSetHas);
1236
+ try {
1237
+ weakMapHas.call(x, weakMapHas);
1238
+ } catch (s) {
1239
+ return true;
1240
+ }
1241
+ return x instanceof WeakSet;
1242
+ } catch (e) {
1243
+ }
1244
+ return false;
1245
+ }
1246
+ function isElement(x) {
1247
+ if (!x || typeof x !== "object") {
1248
+ return false;
1249
+ }
1250
+ if (typeof HTMLElement !== "undefined" && x instanceof HTMLElement) {
1251
+ return true;
1252
+ }
1253
+ return typeof x.nodeName === "string" && typeof x.getAttribute === "function";
1254
+ }
1255
+ function inspectString(str, opts) {
1256
+ if (str.length > opts.maxStringLength) {
1257
+ var remaining = str.length - opts.maxStringLength;
1258
+ var trailer = "... " + remaining + " more character" + (remaining > 1 ? "s" : "");
1259
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1260
+ }
1261
+ var s = $replace.call($replace.call(str, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, lowbyte);
1262
+ return wrapQuotes(s, "single", opts);
1263
+ }
1264
+ function lowbyte(c) {
1265
+ var n = c.charCodeAt(0);
1266
+ var x = {
1267
+ 8: "b",
1268
+ 9: "t",
1269
+ 10: "n",
1270
+ 12: "f",
1271
+ 13: "r"
1272
+ }[n];
1273
+ if (x) {
1274
+ return "\\" + x;
1275
+ }
1276
+ return "\\x" + (n < 16 ? "0" : "") + $toUpperCase.call(n.toString(16));
1277
+ }
1278
+ function markBoxed(str) {
1279
+ return "Object(" + str + ")";
1280
+ }
1281
+ function weakCollectionOf(type) {
1282
+ return type + " { ? }";
1283
+ }
1284
+ function collectionOf(type, size, entries, indent) {
1285
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ", ");
1286
+ return type + " (" + size + ") {" + joinedEntries + "}";
1287
+ }
1288
+ function singleLineValues(xs) {
1289
+ for (var i = 0; i < xs.length; i++) {
1290
+ if (indexOf(xs[i], "\n") >= 0) {
1291
+ return false;
1292
+ }
1293
+ }
1294
+ return true;
1295
+ }
1296
+ function getIndent(opts, depth) {
1297
+ var baseIndent;
1298
+ if (opts.indent === " ") {
1299
+ baseIndent = " ";
1300
+ } else if (typeof opts.indent === "number" && opts.indent > 0) {
1301
+ baseIndent = $join.call(Array(opts.indent + 1), " ");
1302
+ } else {
1303
+ return null;
1304
+ }
1305
+ return {
1306
+ base: baseIndent,
1307
+ prev: $join.call(Array(depth + 1), baseIndent)
1308
+ };
1309
+ }
1310
+ function indentedJoin(xs, indent) {
1311
+ if (xs.length === 0) {
1312
+ return "";
1313
+ }
1314
+ var lineJoiner = "\n" + indent.prev + indent.base;
1315
+ return lineJoiner + $join.call(xs, "," + lineJoiner) + "\n" + indent.prev;
1316
+ }
1317
+ function arrObjKeys(obj, inspect) {
1318
+ var isArr = isArray2(obj);
1319
+ var xs = [];
1320
+ if (isArr) {
1321
+ xs.length = obj.length;
1322
+ for (var i = 0; i < obj.length; i++) {
1323
+ xs[i] = has(obj, i) ? inspect(obj[i], obj) : "";
1324
+ }
1325
+ }
1326
+ var syms = typeof gOPS === "function" ? gOPS(obj) : [];
1327
+ var symMap;
1328
+ if (hasShammedSymbols) {
1329
+ symMap = {};
1330
+ for (var k = 0; k < syms.length; k++) {
1331
+ symMap["$" + syms[k]] = syms[k];
1332
+ }
1333
+ }
1334
+ for (var key in obj) {
1335
+ if (!has(obj, key)) {
1336
+ continue;
1337
+ }
1338
+ if (isArr && String(Number(key)) === key && key < obj.length) {
1339
+ continue;
1340
+ }
1341
+ if (hasShammedSymbols && symMap["$" + key] instanceof Symbol) {
1342
+ continue;
1343
+ } else if ($test.call(/[^\w$]/, key)) {
1344
+ xs.push(inspect(key, obj) + ": " + inspect(obj[key], obj));
1345
+ } else {
1346
+ xs.push(key + ": " + inspect(obj[key], obj));
1347
+ }
1348
+ }
1349
+ if (typeof gOPS === "function") {
1350
+ for (var j = 0; j < syms.length; j++) {
1351
+ if (isEnumerable.call(obj, syms[j])) {
1352
+ xs.push("[" + inspect(syms[j]) + "]: " + inspect(obj[syms[j]], obj));
1353
+ }
1354
+ }
1355
+ }
1356
+ return xs;
1357
+ }
1358
+ }
1359
+ });
1360
+
1361
+ // node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js
1362
+ var require_side_channel = __commonJS({
1363
+ "node_modules/.pnpm/side-channel@1.0.6/node_modules/side-channel/index.js"(exports, module) {
1364
+ "use strict";
1365
+ var GetIntrinsic = require_get_intrinsic();
1366
+ var callBound = require_callBound();
1367
+ var inspect = require_object_inspect();
1368
+ var $TypeError = require_type();
1369
+ var $WeakMap = GetIntrinsic("%WeakMap%", true);
1370
+ var $Map = GetIntrinsic("%Map%", true);
1371
+ var $weakMapGet = callBound("WeakMap.prototype.get", true);
1372
+ var $weakMapSet = callBound("WeakMap.prototype.set", true);
1373
+ var $weakMapHas = callBound("WeakMap.prototype.has", true);
1374
+ var $mapGet = callBound("Map.prototype.get", true);
1375
+ var $mapSet = callBound("Map.prototype.set", true);
1376
+ var $mapHas = callBound("Map.prototype.has", true);
1377
+ var listGetNode = function(list, key) {
1378
+ var prev = list;
1379
+ var curr;
1380
+ for (; (curr = prev.next) !== null; prev = curr) {
1381
+ if (curr.key === key) {
1382
+ prev.next = curr.next;
1383
+ curr.next = /** @type {NonNullable<typeof list.next>} */
1384
+ list.next;
1385
+ list.next = curr;
1386
+ return curr;
1387
+ }
1388
+ }
1389
+ };
1390
+ var listGet = function(objects, key) {
1391
+ var node = listGetNode(objects, key);
1392
+ return node && node.value;
1393
+ };
1394
+ var listSet = function(objects, key, value) {
1395
+ var node = listGetNode(objects, key);
1396
+ if (node) {
1397
+ node.value = value;
1398
+ } else {
1399
+ objects.next = /** @type {import('.').ListNode<typeof value>} */
1400
+ {
1401
+ // eslint-disable-line no-param-reassign, no-extra-parens
1402
+ key,
1403
+ next: objects.next,
1404
+ value
1405
+ };
1406
+ }
1407
+ };
1408
+ var listHas = function(objects, key) {
1409
+ return !!listGetNode(objects, key);
1410
+ };
1411
+ module.exports = function getSideChannel() {
1412
+ var $wm;
1413
+ var $m;
1414
+ var $o;
1415
+ var channel = {
1416
+ assert: function(key) {
1417
+ if (!channel.has(key)) {
1418
+ throw new $TypeError("Side channel does not contain " + inspect(key));
1419
+ }
1420
+ },
1421
+ get: function(key) {
1422
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1423
+ if ($wm) {
1424
+ return $weakMapGet($wm, key);
1425
+ }
1426
+ } else if ($Map) {
1427
+ if ($m) {
1428
+ return $mapGet($m, key);
1429
+ }
1430
+ } else {
1431
+ if ($o) {
1432
+ return listGet($o, key);
1433
+ }
1434
+ }
1435
+ },
1436
+ has: function(key) {
1437
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1438
+ if ($wm) {
1439
+ return $weakMapHas($wm, key);
1440
+ }
1441
+ } else if ($Map) {
1442
+ if ($m) {
1443
+ return $mapHas($m, key);
1444
+ }
1445
+ } else {
1446
+ if ($o) {
1447
+ return listHas($o, key);
1448
+ }
1449
+ }
1450
+ return false;
1451
+ },
1452
+ set: function(key, value) {
1453
+ if ($WeakMap && key && (typeof key === "object" || typeof key === "function")) {
1454
+ if (!$wm) {
1455
+ $wm = new $WeakMap();
1456
+ }
1457
+ $weakMapSet($wm, key, value);
1458
+ } else if ($Map) {
1459
+ if (!$m) {
1460
+ $m = new $Map();
1461
+ }
1462
+ $mapSet($m, key, value);
1463
+ } else {
1464
+ if (!$o) {
1465
+ $o = { key: {}, next: null };
1466
+ }
1467
+ listSet($o, key, value);
1468
+ }
1469
+ }
1470
+ };
1471
+ return channel;
1472
+ };
1473
+ }
1474
+ });
1475
+
1476
+ // node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/formats.js
1477
+ var require_formats = __commonJS({
1478
+ "node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/formats.js"(exports, module) {
1479
+ "use strict";
1480
+ var replace = String.prototype.replace;
1481
+ var percentTwenties = /%20/g;
1482
+ var Format = {
1483
+ RFC1738: "RFC1738",
1484
+ RFC3986: "RFC3986"
1485
+ };
1486
+ module.exports = {
1487
+ "default": Format.RFC3986,
1488
+ formatters: {
1489
+ RFC1738: function(value) {
1490
+ return replace.call(value, percentTwenties, "+");
1491
+ },
1492
+ RFC3986: function(value) {
1493
+ return String(value);
1494
+ }
1495
+ },
1496
+ RFC1738: Format.RFC1738,
1497
+ RFC3986: Format.RFC3986
1498
+ };
1499
+ }
1500
+ });
1501
+
1502
+ // node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/utils.js
1503
+ var require_utils = __commonJS({
1504
+ "node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/utils.js"(exports, module) {
1505
+ "use strict";
1506
+ var formats = require_formats();
1507
+ var has = Object.prototype.hasOwnProperty;
1508
+ var isArray2 = Array.isArray;
1509
+ var hexTable = function() {
1510
+ var array = [];
1511
+ for (var i = 0; i < 256; ++i) {
1512
+ array.push("%" + ((i < 16 ? "0" : "") + i.toString(16)).toUpperCase());
1513
+ }
1514
+ return array;
1515
+ }();
1516
+ var compactQueue = function compactQueue2(queue) {
1517
+ while (queue.length > 1) {
1518
+ var item = queue.pop();
1519
+ var obj = item.obj[item.prop];
1520
+ if (isArray2(obj)) {
1521
+ var compacted = [];
1522
+ for (var j = 0; j < obj.length; ++j) {
1523
+ if (typeof obj[j] !== "undefined") {
1524
+ compacted.push(obj[j]);
1525
+ }
1526
+ }
1527
+ item.obj[item.prop] = compacted;
1528
+ }
1529
+ }
1530
+ };
1531
+ var arrayToObject2 = function arrayToObject3(source, options) {
1532
+ var obj = options && options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1533
+ for (var i = 0; i < source.length; ++i) {
1534
+ if (typeof source[i] !== "undefined") {
1535
+ obj[i] = source[i];
1536
+ }
1537
+ }
1538
+ return obj;
1539
+ };
1540
+ var merge2 = function merge3(target, source, options) {
1541
+ if (!source) {
1542
+ return target;
1543
+ }
1544
+ if (typeof source !== "object") {
1545
+ if (isArray2(target)) {
1546
+ target.push(source);
1547
+ } else if (target && typeof target === "object") {
1548
+ if (options && (options.plainObjects || options.allowPrototypes) || !has.call(Object.prototype, source)) {
1549
+ target[source] = true;
1550
+ }
1551
+ } else {
1552
+ return [target, source];
1553
+ }
1554
+ return target;
1555
+ }
1556
+ if (!target || typeof target !== "object") {
1557
+ return [target].concat(source);
1558
+ }
1559
+ var mergeTarget = target;
1560
+ if (isArray2(target) && !isArray2(source)) {
1561
+ mergeTarget = arrayToObject2(target, options);
1562
+ }
1563
+ if (isArray2(target) && isArray2(source)) {
1564
+ source.forEach(function(item, i) {
1565
+ if (has.call(target, i)) {
1566
+ var targetItem = target[i];
1567
+ if (targetItem && typeof targetItem === "object" && item && typeof item === "object") {
1568
+ target[i] = merge3(targetItem, item, options);
1569
+ } else {
1570
+ target.push(item);
1571
+ }
1572
+ } else {
1573
+ target[i] = item;
1574
+ }
1575
+ });
1576
+ return target;
1577
+ }
1578
+ return Object.keys(source).reduce(function(acc, key) {
1579
+ var value = source[key];
1580
+ if (has.call(acc, key)) {
1581
+ acc[key] = merge3(acc[key], value, options);
1582
+ } else {
1583
+ acc[key] = value;
1584
+ }
1585
+ return acc;
1586
+ }, mergeTarget);
1587
+ };
1588
+ var assign2 = function assignSingleSource(target, source) {
1589
+ return Object.keys(source).reduce(function(acc, key) {
1590
+ acc[key] = source[key];
1591
+ return acc;
1592
+ }, target);
1593
+ };
1594
+ var decode3 = function(str, decoder, charset) {
1595
+ var strWithoutPlus = str.replace(/\+/g, " ");
1596
+ if (charset === "iso-8859-1") {
1597
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1598
+ }
1599
+ try {
1600
+ return decodeURIComponent(strWithoutPlus);
1601
+ } catch (e) {
1602
+ return strWithoutPlus;
1603
+ }
1604
+ };
1605
+ var encode4 = function encode5(str, defaultEncoder, charset, kind, format) {
1606
+ if (str.length === 0) {
1607
+ return str;
1608
+ }
1609
+ var string = str;
1610
+ if (typeof str === "symbol") {
1611
+ string = Symbol.prototype.toString.call(str);
1612
+ } else if (typeof str !== "string") {
1613
+ string = String(str);
1614
+ }
1615
+ if (charset === "iso-8859-1") {
1616
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function($0) {
1617
+ return "%26%23" + parseInt($0.slice(2), 16) + "%3B";
1618
+ });
1619
+ }
1620
+ var out = "";
1621
+ for (var i = 0; i < string.length; ++i) {
1622
+ var c = string.charCodeAt(i);
1623
+ if (c === 45 || c === 46 || c === 95 || c === 126 || c >= 48 && c <= 57 || c >= 65 && c <= 90 || c >= 97 && c <= 122 || format === formats.RFC1738 && (c === 40 || c === 41)) {
1624
+ out += string.charAt(i);
1625
+ continue;
1626
+ }
1627
+ if (c < 128) {
1628
+ out = out + hexTable[c];
1629
+ continue;
1630
+ }
1631
+ if (c < 2048) {
1632
+ out = out + (hexTable[192 | c >> 6] + hexTable[128 | c & 63]);
1633
+ continue;
1634
+ }
1635
+ if (c < 55296 || c >= 57344) {
1636
+ out = out + (hexTable[224 | c >> 12] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63]);
1637
+ continue;
1638
+ }
1639
+ i += 1;
1640
+ c = 65536 + ((c & 1023) << 10 | string.charCodeAt(i) & 1023);
1641
+ out += hexTable[240 | c >> 18] + hexTable[128 | c >> 12 & 63] + hexTable[128 | c >> 6 & 63] + hexTable[128 | c & 63];
1642
+ }
1643
+ return out;
1644
+ };
1645
+ var compact = function compact2(value) {
1646
+ var queue = [{ obj: { o: value }, prop: "o" }];
1647
+ var refs = [];
1648
+ for (var i = 0; i < queue.length; ++i) {
1649
+ var item = queue[i];
1650
+ var obj = item.obj[item.prop];
1651
+ var keys = Object.keys(obj);
1652
+ for (var j = 0; j < keys.length; ++j) {
1653
+ var key = keys[j];
1654
+ var val = obj[key];
1655
+ if (typeof val === "object" && val !== null && refs.indexOf(val) === -1) {
1656
+ queue.push({ obj, prop: key });
1657
+ refs.push(val);
1658
+ }
1659
+ }
1660
+ }
1661
+ compactQueue(queue);
1662
+ return value;
1663
+ };
1664
+ var isRegExp2 = function isRegExp3(obj) {
1665
+ return Object.prototype.toString.call(obj) === "[object RegExp]";
1666
+ };
1667
+ var isBuffer2 = function isBuffer3(obj) {
1668
+ if (!obj || typeof obj !== "object") {
1669
+ return false;
1670
+ }
1671
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
1672
+ };
1673
+ var combine = function combine2(a, b) {
1674
+ return [].concat(a, b);
1675
+ };
1676
+ var maybeMap = function maybeMap2(val, fn) {
1677
+ if (isArray2(val)) {
1678
+ var mapped = [];
1679
+ for (var i = 0; i < val.length; i += 1) {
1680
+ mapped.push(fn(val[i]));
1681
+ }
1682
+ return mapped;
1683
+ }
1684
+ return fn(val);
1685
+ };
1686
+ module.exports = {
1687
+ arrayToObject: arrayToObject2,
1688
+ assign: assign2,
1689
+ combine,
1690
+ compact,
1691
+ decode: decode3,
1692
+ encode: encode4,
1693
+ isBuffer: isBuffer2,
1694
+ isRegExp: isRegExp2,
1695
+ maybeMap,
1696
+ merge: merge2
1697
+ };
1698
+ }
1699
+ });
1700
+
1701
+ // node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/stringify.js
1702
+ var require_stringify = __commonJS({
1703
+ "node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/stringify.js"(exports, module) {
1704
+ "use strict";
1705
+ var getSideChannel = require_side_channel();
1706
+ var utils2 = require_utils();
1707
+ var formats = require_formats();
1708
+ var has = Object.prototype.hasOwnProperty;
1709
+ var arrayPrefixGenerators = {
1710
+ brackets: function brackets(prefix) {
1711
+ return prefix + "[]";
1712
+ },
1713
+ comma: "comma",
1714
+ indices: function indices(prefix, key) {
1715
+ return prefix + "[" + key + "]";
1716
+ },
1717
+ repeat: function repeat(prefix) {
1718
+ return prefix;
1719
+ }
1720
+ };
1721
+ var isArray2 = Array.isArray;
1722
+ var split3 = String.prototype.split;
1723
+ var push = Array.prototype.push;
1724
+ var pushToArray = function(arr, valueOrArray) {
1725
+ push.apply(arr, isArray2(valueOrArray) ? valueOrArray : [valueOrArray]);
1726
+ };
1727
+ var toISO = Date.prototype.toISOString;
1728
+ var defaultFormat = formats["default"];
1729
+ var defaults2 = {
1730
+ addQueryPrefix: false,
1731
+ allowDots: false,
1732
+ charset: "utf-8",
1733
+ charsetSentinel: false,
1734
+ delimiter: "&",
1735
+ encode: true,
1736
+ encoder: utils2.encode,
1737
+ encodeValuesOnly: false,
1738
+ format: defaultFormat,
1739
+ formatter: formats.formatters[defaultFormat],
1740
+ // deprecated
1741
+ indices: false,
1742
+ serializeDate: function serializeDate(date) {
1743
+ return toISO.call(date);
1744
+ },
1745
+ skipNulls: false,
1746
+ strictNullHandling: false
1747
+ };
1748
+ var isNonNullishPrimitive = function isNonNullishPrimitive2(v) {
1749
+ return typeof v === "string" || typeof v === "number" || typeof v === "boolean" || typeof v === "symbol" || typeof v === "bigint";
1750
+ };
1751
+ var sentinel = {};
1752
+ var stringify3 = function stringify4(object, prefix, generateArrayPrefix, strictNullHandling, skipNulls, encoder, filter2, sort, allowDots, serializeDate, format, formatter2, encodeValuesOnly, charset, sideChannel) {
1753
+ var obj = object;
1754
+ var tmpSc = sideChannel;
1755
+ var step = 0;
1756
+ var findFlag = false;
1757
+ while ((tmpSc = tmpSc.get(sentinel)) !== void 0 && !findFlag) {
1758
+ var pos = tmpSc.get(object);
1759
+ step += 1;
1760
+ if (typeof pos !== "undefined") {
1761
+ if (pos === step) {
1762
+ throw new RangeError("Cyclic object value");
1763
+ } else {
1764
+ findFlag = true;
1765
+ }
1766
+ }
1767
+ if (typeof tmpSc.get(sentinel) === "undefined") {
1768
+ step = 0;
1769
+ }
1770
+ }
1771
+ if (typeof filter2 === "function") {
1772
+ obj = filter2(prefix, obj);
1773
+ } else if (obj instanceof Date) {
1774
+ obj = serializeDate(obj);
1775
+ } else if (generateArrayPrefix === "comma" && isArray2(obj)) {
1776
+ obj = utils2.maybeMap(obj, function(value2) {
1777
+ if (value2 instanceof Date) {
1778
+ return serializeDate(value2);
1779
+ }
1780
+ return value2;
1781
+ });
1782
+ }
1783
+ if (obj === null) {
1784
+ if (strictNullHandling) {
1785
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults2.encoder, charset, "key", format) : prefix;
1786
+ }
1787
+ obj = "";
1788
+ }
1789
+ if (isNonNullishPrimitive(obj) || utils2.isBuffer(obj)) {
1790
+ if (encoder) {
1791
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults2.encoder, charset, "key", format);
1792
+ if (generateArrayPrefix === "comma" && encodeValuesOnly) {
1793
+ var valuesArray = split3.call(String(obj), ",");
1794
+ var valuesJoined = "";
1795
+ for (var i = 0; i < valuesArray.length; ++i) {
1796
+ valuesJoined += (i === 0 ? "" : ",") + formatter2(encoder(valuesArray[i], defaults2.encoder, charset, "value", format));
1797
+ }
1798
+ return [formatter2(keyValue) + (i === 1 ? "[]" : "") + "=" + valuesJoined];
1799
+ }
1800
+ return [formatter2(keyValue) + "=" + formatter2(encoder(obj, defaults2.encoder, charset, "value", format))];
1801
+ }
1802
+ return [formatter2(prefix) + "=" + formatter2(String(obj))];
1803
+ }
1804
+ var values = [];
1805
+ if (typeof obj === "undefined") {
1806
+ return values;
1807
+ }
1808
+ var objKeys;
1809
+ if (generateArrayPrefix === "comma" && isArray2(obj)) {
1810
+ objKeys = [{ value: obj.length > 0 ? obj.join(",") || null : void 0 }];
1811
+ } else if (isArray2(filter2)) {
1812
+ objKeys = filter2;
1813
+ } else {
1814
+ var keys = Object.keys(obj);
1815
+ objKeys = sort ? keys.sort(sort) : keys;
1816
+ }
1817
+ for (var j = 0; j < objKeys.length; ++j) {
1818
+ var key = objKeys[j];
1819
+ var value = typeof key === "object" && typeof key.value !== "undefined" ? key.value : obj[key];
1820
+ if (skipNulls && value === null) {
1821
+ continue;
1822
+ }
1823
+ var keyPrefix = isArray2(obj) ? typeof generateArrayPrefix === "function" ? generateArrayPrefix(prefix, key) : prefix : prefix + (allowDots ? "." + key : "[" + key + "]");
1824
+ sideChannel.set(object, step);
1825
+ var valueSideChannel = getSideChannel();
1826
+ valueSideChannel.set(sentinel, sideChannel);
1827
+ pushToArray(values, stringify4(
1828
+ value,
1829
+ keyPrefix,
1830
+ generateArrayPrefix,
1831
+ strictNullHandling,
1832
+ skipNulls,
1833
+ encoder,
1834
+ filter2,
1835
+ sort,
1836
+ allowDots,
1837
+ serializeDate,
1838
+ format,
1839
+ formatter2,
1840
+ encodeValuesOnly,
1841
+ charset,
1842
+ valueSideChannel
1843
+ ));
1844
+ }
1845
+ return values;
1846
+ };
1847
+ var normalizeStringifyOptions = function normalizeStringifyOptions2(opts) {
1848
+ if (!opts) {
1849
+ return defaults2;
1850
+ }
1851
+ if (opts.encoder !== null && typeof opts.encoder !== "undefined" && typeof opts.encoder !== "function") {
1852
+ throw new TypeError("Encoder has to be a function.");
1853
+ }
1854
+ var charset = opts.charset || defaults2.charset;
1855
+ if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
1856
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1857
+ }
1858
+ var format = formats["default"];
1859
+ if (typeof opts.format !== "undefined") {
1860
+ if (!has.call(formats.formatters, opts.format)) {
1861
+ throw new TypeError("Unknown format option provided.");
1862
+ }
1863
+ format = opts.format;
1864
+ }
1865
+ var formatter2 = formats.formatters[format];
1866
+ var filter2 = defaults2.filter;
1867
+ if (typeof opts.filter === "function" || isArray2(opts.filter)) {
1868
+ filter2 = opts.filter;
1869
+ }
1870
+ return {
1871
+ addQueryPrefix: typeof opts.addQueryPrefix === "boolean" ? opts.addQueryPrefix : defaults2.addQueryPrefix,
1872
+ allowDots: typeof opts.allowDots === "undefined" ? defaults2.allowDots : !!opts.allowDots,
1873
+ charset,
1874
+ charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults2.charsetSentinel,
1875
+ delimiter: typeof opts.delimiter === "undefined" ? defaults2.delimiter : opts.delimiter,
1876
+ encode: typeof opts.encode === "boolean" ? opts.encode : defaults2.encode,
1877
+ encoder: typeof opts.encoder === "function" ? opts.encoder : defaults2.encoder,
1878
+ encodeValuesOnly: typeof opts.encodeValuesOnly === "boolean" ? opts.encodeValuesOnly : defaults2.encodeValuesOnly,
1879
+ filter: filter2,
1880
+ format,
1881
+ formatter: formatter2,
1882
+ serializeDate: typeof opts.serializeDate === "function" ? opts.serializeDate : defaults2.serializeDate,
1883
+ skipNulls: typeof opts.skipNulls === "boolean" ? opts.skipNulls : defaults2.skipNulls,
1884
+ sort: typeof opts.sort === "function" ? opts.sort : null,
1885
+ strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults2.strictNullHandling
1886
+ };
1887
+ };
1888
+ module.exports = function(object, opts) {
1889
+ var obj = object;
1890
+ var options = normalizeStringifyOptions(opts);
1891
+ var objKeys;
1892
+ var filter2;
1893
+ if (typeof options.filter === "function") {
1894
+ filter2 = options.filter;
1895
+ obj = filter2("", obj);
1896
+ } else if (isArray2(options.filter)) {
1897
+ filter2 = options.filter;
1898
+ objKeys = filter2;
1899
+ }
1900
+ var keys = [];
1901
+ if (typeof obj !== "object" || obj === null) {
1902
+ return "";
1903
+ }
1904
+ var arrayFormat;
1905
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
1906
+ arrayFormat = opts.arrayFormat;
1907
+ } else if (opts && "indices" in opts) {
1908
+ arrayFormat = opts.indices ? "indices" : "repeat";
1909
+ } else {
1910
+ arrayFormat = "indices";
1911
+ }
1912
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
1913
+ if (!objKeys) {
1914
+ objKeys = Object.keys(obj);
1915
+ }
1916
+ if (options.sort) {
1917
+ objKeys.sort(options.sort);
1918
+ }
1919
+ var sideChannel = getSideChannel();
1920
+ for (var i = 0; i < objKeys.length; ++i) {
1921
+ var key = objKeys[i];
1922
+ if (options.skipNulls && obj[key] === null) {
1923
+ continue;
1924
+ }
1925
+ pushToArray(keys, stringify3(
1926
+ obj[key],
1927
+ key,
1928
+ generateArrayPrefix,
1929
+ options.strictNullHandling,
1930
+ options.skipNulls,
1931
+ options.encode ? options.encoder : null,
1932
+ options.filter,
1933
+ options.sort,
1934
+ options.allowDots,
1935
+ options.serializeDate,
1936
+ options.format,
1937
+ options.formatter,
1938
+ options.encodeValuesOnly,
1939
+ options.charset,
1940
+ sideChannel
1941
+ ));
1942
+ }
1943
+ var joined = keys.join(options.delimiter);
1944
+ var prefix = options.addQueryPrefix === true ? "?" : "";
1945
+ if (options.charsetSentinel) {
1946
+ if (options.charset === "iso-8859-1") {
1947
+ prefix += "utf8=%26%2310003%3B&";
1948
+ } else {
1949
+ prefix += "utf8=%E2%9C%93&";
1950
+ }
1951
+ }
1952
+ return joined.length > 0 ? prefix + joined : "";
1953
+ };
1954
+ }
1955
+ });
1956
+
1957
+ // node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/parse.js
1958
+ var require_parse = __commonJS({
1959
+ "node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/parse.js"(exports, module) {
1960
+ "use strict";
1961
+ var utils2 = require_utils();
1962
+ var has = Object.prototype.hasOwnProperty;
1963
+ var isArray2 = Array.isArray;
1964
+ var defaults2 = {
1965
+ allowDots: false,
1966
+ allowPrototypes: false,
1967
+ allowSparse: false,
1968
+ arrayLimit: 20,
1969
+ charset: "utf-8",
1970
+ charsetSentinel: false,
1971
+ comma: false,
1972
+ decoder: utils2.decode,
1973
+ delimiter: "&",
1974
+ depth: 5,
1975
+ ignoreQueryPrefix: false,
1976
+ interpretNumericEntities: false,
1977
+ parameterLimit: 1e3,
1978
+ parseArrays: true,
1979
+ plainObjects: false,
1980
+ strictNullHandling: false
1981
+ };
1982
+ var interpretNumericEntities = function(str) {
1983
+ return str.replace(/&#(\d+);/g, function($0, numberStr) {
1984
+ return String.fromCharCode(parseInt(numberStr, 10));
1985
+ });
1986
+ };
1987
+ var parseArrayValue = function(val, options) {
1988
+ if (val && typeof val === "string" && options.comma && val.indexOf(",") > -1) {
1989
+ return val.split(",");
1990
+ }
1991
+ return val;
1992
+ };
1993
+ var isoSentinel = "utf8=%26%2310003%3B";
1994
+ var charsetSentinel = "utf8=%E2%9C%93";
1995
+ var parseValues = function parseQueryStringValues(str, options) {
1996
+ var obj = {};
1997
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, "") : str;
1998
+ var limit = options.parameterLimit === Infinity ? void 0 : options.parameterLimit;
1999
+ var parts = cleanStr.split(options.delimiter, limit);
2000
+ var skipIndex = -1;
2001
+ var i;
2002
+ var charset = options.charset;
2003
+ if (options.charsetSentinel) {
2004
+ for (i = 0; i < parts.length; ++i) {
2005
+ if (parts[i].indexOf("utf8=") === 0) {
2006
+ if (parts[i] === charsetSentinel) {
2007
+ charset = "utf-8";
2008
+ } else if (parts[i] === isoSentinel) {
2009
+ charset = "iso-8859-1";
2010
+ }
2011
+ skipIndex = i;
2012
+ i = parts.length;
2013
+ }
2014
+ }
2015
+ }
2016
+ for (i = 0; i < parts.length; ++i) {
2017
+ if (i === skipIndex) {
2018
+ continue;
2019
+ }
2020
+ var part = parts[i];
2021
+ var bracketEqualsPos = part.indexOf("]=");
2022
+ var pos = bracketEqualsPos === -1 ? part.indexOf("=") : bracketEqualsPos + 1;
2023
+ var key, val;
2024
+ if (pos === -1) {
2025
+ key = options.decoder(part, defaults2.decoder, charset, "key");
2026
+ val = options.strictNullHandling ? null : "";
2027
+ } else {
2028
+ key = options.decoder(part.slice(0, pos), defaults2.decoder, charset, "key");
2029
+ val = utils2.maybeMap(
2030
+ parseArrayValue(part.slice(pos + 1), options),
2031
+ function(encodedVal) {
2032
+ return options.decoder(encodedVal, defaults2.decoder, charset, "value");
2033
+ }
2034
+ );
2035
+ }
2036
+ if (val && options.interpretNumericEntities && charset === "iso-8859-1") {
2037
+ val = interpretNumericEntities(val);
2038
+ }
2039
+ if (part.indexOf("[]=") > -1) {
2040
+ val = isArray2(val) ? [val] : val;
2041
+ }
2042
+ if (has.call(obj, key)) {
2043
+ obj[key] = utils2.combine(obj[key], val);
2044
+ } else {
2045
+ obj[key] = val;
2046
+ }
2047
+ }
2048
+ return obj;
2049
+ };
2050
+ var parseObject = function(chain2, val, options, valuesParsed) {
2051
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
2052
+ for (var i = chain2.length - 1; i >= 0; --i) {
2053
+ var obj;
2054
+ var root = chain2[i];
2055
+ if (root === "[]" && options.parseArrays) {
2056
+ obj = [].concat(leaf);
2057
+ } else {
2058
+ obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
2059
+ var cleanRoot = root.charAt(0) === "[" && root.charAt(root.length - 1) === "]" ? root.slice(1, -1) : root;
2060
+ var index = parseInt(cleanRoot, 10);
2061
+ if (!options.parseArrays && cleanRoot === "") {
2062
+ obj = { 0: leaf };
2063
+ } else if (!isNaN(index) && root !== cleanRoot && String(index) === cleanRoot && index >= 0 && (options.parseArrays && index <= options.arrayLimit)) {
2064
+ obj = [];
2065
+ obj[index] = leaf;
2066
+ } else if (cleanRoot !== "__proto__") {
2067
+ obj[cleanRoot] = leaf;
2068
+ }
2069
+ }
2070
+ leaf = obj;
2071
+ }
2072
+ return leaf;
2073
+ };
2074
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
2075
+ if (!givenKey) {
2076
+ return;
2077
+ }
2078
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, "[$1]") : givenKey;
2079
+ var brackets = /(\[[^[\]]*])/;
2080
+ var child = /(\[[^[\]]*])/g;
2081
+ var segment = options.depth > 0 && brackets.exec(key);
2082
+ var parent = segment ? key.slice(0, segment.index) : key;
2083
+ var keys = [];
2084
+ if (parent) {
2085
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
2086
+ if (!options.allowPrototypes) {
2087
+ return;
2088
+ }
2089
+ }
2090
+ keys.push(parent);
2091
+ }
2092
+ var i = 0;
2093
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
2094
+ i += 1;
2095
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
2096
+ if (!options.allowPrototypes) {
2097
+ return;
2098
+ }
2099
+ }
2100
+ keys.push(segment[1]);
2101
+ }
2102
+ if (segment) {
2103
+ keys.push("[" + key.slice(segment.index) + "]");
2104
+ }
2105
+ return parseObject(keys, val, options, valuesParsed);
2106
+ };
2107
+ var normalizeParseOptions = function normalizeParseOptions2(opts) {
2108
+ if (!opts) {
2109
+ return defaults2;
2110
+ }
2111
+ if (opts.decoder !== null && opts.decoder !== void 0 && typeof opts.decoder !== "function") {
2112
+ throw new TypeError("Decoder has to be a function.");
2113
+ }
2114
+ if (typeof opts.charset !== "undefined" && opts.charset !== "utf-8" && opts.charset !== "iso-8859-1") {
2115
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2116
+ }
2117
+ var charset = typeof opts.charset === "undefined" ? defaults2.charset : opts.charset;
2118
+ return {
2119
+ allowDots: typeof opts.allowDots === "undefined" ? defaults2.allowDots : !!opts.allowDots,
2120
+ allowPrototypes: typeof opts.allowPrototypes === "boolean" ? opts.allowPrototypes : defaults2.allowPrototypes,
2121
+ allowSparse: typeof opts.allowSparse === "boolean" ? opts.allowSparse : defaults2.allowSparse,
2122
+ arrayLimit: typeof opts.arrayLimit === "number" ? opts.arrayLimit : defaults2.arrayLimit,
2123
+ charset,
2124
+ charsetSentinel: typeof opts.charsetSentinel === "boolean" ? opts.charsetSentinel : defaults2.charsetSentinel,
2125
+ comma: typeof opts.comma === "boolean" ? opts.comma : defaults2.comma,
2126
+ decoder: typeof opts.decoder === "function" ? opts.decoder : defaults2.decoder,
2127
+ delimiter: typeof opts.delimiter === "string" || utils2.isRegExp(opts.delimiter) ? opts.delimiter : defaults2.delimiter,
2128
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2129
+ depth: typeof opts.depth === "number" || opts.depth === false ? +opts.depth : defaults2.depth,
2130
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2131
+ interpretNumericEntities: typeof opts.interpretNumericEntities === "boolean" ? opts.interpretNumericEntities : defaults2.interpretNumericEntities,
2132
+ parameterLimit: typeof opts.parameterLimit === "number" ? opts.parameterLimit : defaults2.parameterLimit,
2133
+ parseArrays: opts.parseArrays !== false,
2134
+ plainObjects: typeof opts.plainObjects === "boolean" ? opts.plainObjects : defaults2.plainObjects,
2135
+ strictNullHandling: typeof opts.strictNullHandling === "boolean" ? opts.strictNullHandling : defaults2.strictNullHandling
2136
+ };
2137
+ };
2138
+ module.exports = function(str, opts) {
2139
+ var options = normalizeParseOptions(opts);
2140
+ if (str === "" || str === null || typeof str === "undefined") {
2141
+ return options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
2142
+ }
2143
+ var tempObj = typeof str === "string" ? parseValues(str, options) : str;
2144
+ var obj = options.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
2145
+ var keys = Object.keys(tempObj);
2146
+ for (var i = 0; i < keys.length; ++i) {
2147
+ var key = keys[i];
2148
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === "string");
2149
+ obj = utils2.merge(obj, newObj, options);
2150
+ }
2151
+ if (options.allowSparse === true) {
2152
+ return obj;
2153
+ }
2154
+ return utils2.compact(obj);
2155
+ };
2156
+ }
2157
+ });
2158
+
2159
+ // node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/index.js
2160
+ var require_lib = __commonJS({
2161
+ "node_modules/.pnpm/qs@6.10.4/node_modules/qs/lib/index.js"(exports, module) {
2162
+ "use strict";
2163
+ var stringify3 = require_stringify();
2164
+ var parse3 = require_parse();
2165
+ var formats = require_formats();
2166
+ module.exports = {
2167
+ formats,
2168
+ parse: parse3,
2169
+ stringify: stringify3
2170
+ };
2171
+ }
2172
+ });
2173
+
2174
+ // node_modules/.pnpm/coinmarketcap-api@3.1.1/node_modules/coinmarketcap-api/index.js
2175
+ var require_coinmarketcap_api = __commonJS({
2176
+ "node_modules/.pnpm/coinmarketcap-api@3.1.1/node_modules/coinmarketcap-api/index.js"(exports, module) {
2177
+ "use strict";
2178
+ var fetch3 = require_browser();
2179
+ var qs = require_lib();
2180
+ var BASE_URL = "https://pro-api.coinmarketcap.com";
2181
+ var CoinMarketCap2 = class {
2182
+ /**
2183
+ *
2184
+ * @param {String} apiKey API key for accessing the CoinMarketCap API
2185
+ * @param {Object=} Options Options for the CoinMarketCap instance
2186
+ * @param {String=} options.version Version of API. Defaults to 'v2'
2187
+ * @param {Function=} options.fetcher fetch function to use. Defaults to node-fetch
2188
+ * @param {Object=} options.config = Configuration for fetch request
2189
+ *
2190
+ */
2191
+ constructor(apiKey, { version = "v1", fetcher = fetch3, config: config2 = {} } = {}) {
2192
+ this.apiKey = apiKey;
2193
+ this.config = Object.assign({}, {
2194
+ method: "GET",
2195
+ headers: {
2196
+ "X-CMC_PRO_API_KEY": this.apiKey,
2197
+ Accept: "application/json",
2198
+ "Accept-Charset": "utf-8",
2199
+ "Accept-Encoding": "deflate, gzip"
2200
+ }
2201
+ }, config2);
2202
+ this.fetcher = fetcher;
2203
+ this.url = `${BASE_URL}/${version}`;
2204
+ }
2205
+ /**
2206
+ * Get a paginated list of all cryptocurrencies by CoinMarketCap ID.
2207
+ *
2208
+ * @param {Object=} options Options for the request:
2209
+ * @param {String=} [options.listingStatus="active"] active or inactive coins
2210
+ * @param {Number|String=} [options.start=1] Return results from rank start and above
2211
+ * @param {Number|String=} options.limit Only returns limit number of results
2212
+ * @param {String[]|String=} options.symbol Comma separated list of symbols, will ignore the other options
2213
+ * @param {String=} [options.sort="id"] Sort results by the options at https://coinmarketcap.com/api/documentation/v1/#operation/getV1CryptocurrencyMap
2214
+ *
2215
+ * @example
2216
+ * const client = new CoinMarketCap('api key')
2217
+ * client.getIdMap().then(console.log).catch(console.error)
2218
+ * client.getIdMap({listingStatus: 'inactive', limit: 10}).then(console.log).catch(console.error)
2219
+ * client.getIdMap({symbol: 'BTC,ETH'}).then(console.log).catch(console.error)
2220
+ * client.getIdMap({symbol: ['BTC', 'ETH']}).then(console.log).catch(console.error)
2221
+ * client.getIdMap({sort: 'cmc_rank'}).then(console.log).catch(console.error)
2222
+ */
2223
+ getIdMap(args = {}) {
2224
+ let { listingStatus, start, limit, symbol, sort } = args;
2225
+ if (symbol instanceof Array) {
2226
+ symbol = symbol.join(",");
2227
+ }
2228
+ return createRequest({
2229
+ fetcher: this.fetcher,
2230
+ url: `${this.url}/cryptocurrency/map`,
2231
+ config: this.config,
2232
+ query: { listing_status: listingStatus, start, limit, symbol, sort }
2233
+ });
2234
+ }
2235
+ /**
2236
+ * Get static metadata for one or more cryptocurrencies.
2237
+ * Either id or symbol is required, but passing in both is not allowed.
2238
+ *
2239
+ * @param {Object=} options Options for the request:
2240
+ * @param {Array|String|Number=} options.id One or more comma separated cryptocurrency IDs
2241
+ * @param {String[]|String} options.symbol One or more comma separated cryptocurrency symbols
2242
+ *
2243
+ * @example
2244
+ * const client = new CoinMarketCap('api key')
2245
+ * client.getMetadata({id: '1'}).then(console.log).catch(console.error)
2246
+ * client.getMetadata({id: [1, 2]}).then(console.log).catch(console.error)
2247
+ * client.getMetadata({symbol: 'BTC,ETH'}).then(console.log).catch(console.error)
2248
+ * client.getMetadata({symbol: ['BTC', 'ETH']}).then(console.log).catch(console.error)
2249
+ */
2250
+ getMetadata(args = {}) {
2251
+ return createRequest({
2252
+ fetcher: this.fetcher,
2253
+ url: `${this.url}/cryptocurrency/info`,
2254
+ config: this.config,
2255
+ query: sanitizeIdAndSymbol(args.id, args.symbol)
2256
+ });
2257
+ }
2258
+ /**
2259
+ * Get information on all tickers.
2260
+ * Start and limit options can only be used when currency or ID is not given.
2261
+ * Currency and ID cannot be passed in at the same time.
2262
+ *
2263
+ * @param {Object=} options Options for the request
2264
+ * @param {Number|String=} [options.start=1] Return results from rank start and above
2265
+ * @param {Number|String=} [options.limit=100] Only returns limit number of results [1..5000]
2266
+ * @param {String[]|String=} [options.convert="USD"] Return info in terms of another currency
2267
+ * @param {String=} [options.sort="market_cap"] Sort results by the options at https://pro.coinmarketcap.com/api/v1#operation/getV1CryptocurrencyListingsLatest
2268
+ * @param {String=} options.sortDir Direction in which to order cryptocurrencies ("asc" | "desc")
2269
+ * @param {String=} [options.cryptocurrencyType="all"] Type of cryptocurrency to include ("all" | "coins" | "tokens")
2270
+ *
2271
+ * @example
2272
+ * const client = new CoinMarketCap('api key')
2273
+ * client.getTickers({limit: 3}).then(console.log).catch(console.error)
2274
+ * client.getTickers({convert: 'EUR'}).then(console.log).catch(console.error)
2275
+ * client.getTickers({start: 0, limit: 5}).then(console.log).catch(console.error)
2276
+ * client.getTickers({sort: 'name'}).then(console.log).catch(console.error)
2277
+ */
2278
+ getTickers(args = {}) {
2279
+ let { start, limit, convert, sort, sortDir, cryptocurrencyType } = args;
2280
+ if (start && limit == 0) {
2281
+ throw new Error("Start and limit = 0 cannot be passed in at the same time.");
2282
+ }
2283
+ if (limit == 0) {
2284
+ limit = 5e3;
2285
+ }
2286
+ if (convert && convert instanceof Array) {
2287
+ convert = convert.join(",");
2288
+ }
2289
+ return createRequest({
2290
+ fetcher: this.fetcher,
2291
+ url: `${this.url}/cryptocurrency/listings/latest`,
2292
+ config: this.config,
2293
+ query: { start, limit, convert, sort, sort_dir: sortDir, cryptocurrency_type: cryptocurrencyType }
2294
+ });
2295
+ }
2296
+ /**
2297
+ * Get latest market quote for 1 or more cryptocurrencies.
2298
+ *
2299
+ * @param {Object=} options Options for the request:
2300
+ * @param {Array|String|Number=} options.id One or more comma separated cryptocurrency IDs
2301
+ * @param {String[]|String=} options.symbol One or more comma separated cryptocurrency symbols
2302
+ * @param {String[]|String=} [options.convert="USD"] Return quotes in terms of another currency
2303
+ *
2304
+ * @example
2305
+ * const client = new CoinMarketCap('api key')
2306
+ * client.getQuotes({id: '1'}).then(console.log).catch(console.error)
2307
+ * client.getQuotes({id: [1, 2], convert: 'USD,EUR'}).then(console.log).catch(console.error)
2308
+ * client.getQuotes({symbol: 'BTC,ETH'}).then(console.log).catch(console.error)
2309
+ * client.getQuotes({symbol: ['BTC', 'ETH']}).then(console.log).catch(console.error)
2310
+ */
2311
+ getQuotes(args = {}) {
2312
+ let convert = args.convert;
2313
+ const { id, symbol } = sanitizeIdAndSymbol(args.id, args.symbol);
2314
+ if (convert instanceof Array) {
2315
+ convert = convert.join(",");
2316
+ }
2317
+ return createRequest({
2318
+ fetcher: this.fetcher,
2319
+ url: `${this.url}/cryptocurrency/quotes/latest`,
2320
+ config: this.config,
2321
+ query: { id, symbol, convert }
2322
+ });
2323
+ }
2324
+ /**
2325
+ * Get global information
2326
+ *
2327
+ * @param {Object|String[]|String=} options Options for the request:
2328
+ * @param {String[]|String=} [options.convert="USD"] Return quotes in terms of another currency
2329
+ *
2330
+ * @example
2331
+ * const client = new CoinMarketCap()
2332
+ * client.getGlobal('GBP').then(console.log).catch(console.error)
2333
+ * client.getGlobal({convert: 'GBP'}).then(console.log).catch(console.error)
2334
+ */
2335
+ getGlobal(convert) {
2336
+ if (typeof convert === "string") {
2337
+ convert = { convert: convert.toUpperCase() };
2338
+ }
2339
+ if (convert instanceof Array) {
2340
+ convert = { convert: convert.map((currency) => currency.toUpperCase()) };
2341
+ }
2342
+ if (convert && convert.convert instanceof Array) {
2343
+ convert.convert = convert.convert.join(",");
2344
+ }
2345
+ return createRequest({
2346
+ fetcher: this.fetcher,
2347
+ url: `${this.url}/global-metrics/quotes/latest`,
2348
+ config: this.config,
2349
+ query: convert
2350
+ });
2351
+ }
2352
+ };
2353
+ var sanitizeIdAndSymbol = (id, symbol) => {
2354
+ if (id && symbol) {
2355
+ throw new Error("ID and symbol cannot be passed in at the same time.");
2356
+ }
2357
+ if (!id && !symbol) {
2358
+ throw new Error("Either ID or symbol is required to be passed in.");
2359
+ }
2360
+ if (id instanceof Array) {
2361
+ id = id.join(",");
2362
+ }
2363
+ if (symbol instanceof Array) {
2364
+ symbol = symbol.join(",");
2365
+ }
2366
+ return { id, symbol };
2367
+ };
2368
+ var createRequest = (args = {}) => {
2369
+ const { url, config: config2, query, fetcher } = args;
2370
+ return fetcher(`${url}${query ? `?${qs.stringify(query)}` : ""}`, config2).then(
2371
+ (res) => res.json()
2372
+ );
2373
+ };
2374
+ module.exports = CoinMarketCap2;
2375
+ }
2376
+ });
2377
+
45
2378
  // node_modules/.pnpm/punycode@2.3.1/node_modules/punycode/punycode.es6.js
46
2379
  var punycode_es6_exports = {};
47
2380
  __export(punycode_es6_exports, {
@@ -16495,6 +18828,7 @@ var strkfarm_risk_engine = (() => {
16495
18828
  };
16496
18829
 
16497
18830
  // src/modules/pricer.ts
18831
+ var CoinMarketCap = require_coinmarketcap_api();
16498
18832
  var Pricer = class {
16499
18833
  constructor(config2, tokens) {
16500
18834
  this.tokens = [];
@@ -16503,6 +18837,8 @@ var strkfarm_risk_engine = (() => {
16503
18837
  * TOKENA and TOKENB are the two token names to get price of TokenA in terms of TokenB
16504
18838
  */
16505
18839
  this.PRICE_API = `https://api.coinbase.com/v2/prices/{{PRICER_KEY}}/buy`;
18840
+ // backup oracle
18841
+ this.client = new CoinMarketCap(process.env.COINMARKETCAP_KEY);
16506
18842
  this.config = config2;
16507
18843
  this.tokens = tokens;
16508
18844
  }
@@ -16566,13 +18902,7 @@ var strkfarm_risk_engine = (() => {
16566
18902
  onUpdate(token.symbol);
16567
18903
  return;
16568
18904
  }
16569
- if (!token.pricerKey) {
16570
- throw new FatalError(`Pricer key not found for ${token.name}`);
16571
- }
16572
- const url = this.PRICE_API.replace("{{PRICER_KEY}}", token.pricerKey);
16573
- const result = await axios_default.get(url);
16574
- const data = result.data;
16575
- const price = Number(data.data.amount);
18905
+ const price = await this._getPrice(token);
16576
18906
  this.prices[token.symbol] = {
16577
18907
  price,
16578
18908
  timestamp: /* @__PURE__ */ new Date()
@@ -16599,6 +18929,30 @@ var strkfarm_risk_engine = (() => {
16599
18929
  });
16600
18930
  }
16601
18931
  }
18932
+ async _getPrice(token) {
18933
+ try {
18934
+ return await this._getPriceCoinbase(token);
18935
+ } catch (error2) {
18936
+ }
18937
+ try {
18938
+ return await this._getPriceCoinMarketCap(token);
18939
+ } catch (error2) {
18940
+ }
18941
+ throw new FatalError(`Price not found for ${token.name}`);
18942
+ }
18943
+ async _getPriceCoinbase(token) {
18944
+ if (!token.pricerKey) {
18945
+ throw new FatalError(`Pricer key not found for ${token.name}`);
18946
+ }
18947
+ const url = this.PRICE_API.replace("{{PRICER_KEY}}", token.pricerKey);
18948
+ const result = await axios_default.get(url);
18949
+ const data = result.data;
18950
+ return Number(data.data.amount);
18951
+ }
18952
+ async _getPriceCoinMarketCap(token) {
18953
+ const result = await this.client.getQuotes({ symbol: token.symbol });
18954
+ return result.data[token.symbol].quote.USD.price;
18955
+ }
16602
18956
  };
16603
18957
 
16604
18958
  // node_modules/.pnpm/@starknet-io+types-js@0.7.7/node_modules/@starknet-io/types-js/dist/esm/index.js