@sourcegraph/cody-web 0.22.0 → 0.23.1

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.
@@ -0,0 +1,1811 @@
1
+ import { c as commonjsGlobal } from "./browser-C8ruBrnx.mjs";
2
+ function _mergeNamespaces(n, m) {
3
+ for (var i = 0; i < m.length; i++) {
4
+ const e = m[i];
5
+ if (typeof e !== "string" && !Array.isArray(e)) {
6
+ for (const k in e) {
7
+ if (k !== "default" && !(k in n)) {
8
+ const d = Object.getOwnPropertyDescriptor(e, k);
9
+ if (d) {
10
+ Object.defineProperty(n, k, d.get ? d : {
11
+ enumerable: true,
12
+ get: () => e[k]
13
+ });
14
+ }
15
+ }
16
+ }
17
+ }
18
+ }
19
+ return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
20
+ }
21
+ var inherits_browser = { exports: {} };
22
+ if (typeof Object.create === "function") {
23
+ inherits_browser.exports = function inherits(ctor, superCtor) {
24
+ if (superCtor) {
25
+ ctor.super_ = superCtor;
26
+ ctor.prototype = Object.create(superCtor.prototype, {
27
+ constructor: {
28
+ value: ctor,
29
+ enumerable: false,
30
+ writable: true,
31
+ configurable: true
32
+ }
33
+ });
34
+ }
35
+ };
36
+ } else {
37
+ inherits_browser.exports = function inherits(ctor, superCtor) {
38
+ if (superCtor) {
39
+ ctor.super_ = superCtor;
40
+ var TempCtor = function() {
41
+ };
42
+ TempCtor.prototype = superCtor.prototype;
43
+ ctor.prototype = new TempCtor();
44
+ ctor.prototype.constructor = ctor;
45
+ }
46
+ };
47
+ }
48
+ var inherits_browserExports = inherits_browser.exports;
49
+ var util$1 = {};
50
+ var types = {};
51
+ var shams$1 = function hasSymbols() {
52
+ if (typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function") {
53
+ return false;
54
+ }
55
+ if (typeof Symbol.iterator === "symbol") {
56
+ return true;
57
+ }
58
+ var obj = {};
59
+ var sym = Symbol("test");
60
+ var symObj = Object(sym);
61
+ if (typeof sym === "string") {
62
+ return false;
63
+ }
64
+ if (Object.prototype.toString.call(sym) !== "[object Symbol]") {
65
+ return false;
66
+ }
67
+ if (Object.prototype.toString.call(symObj) !== "[object Symbol]") {
68
+ return false;
69
+ }
70
+ var symVal = 42;
71
+ obj[sym] = symVal;
72
+ for (sym in obj) {
73
+ return false;
74
+ }
75
+ if (typeof Object.keys === "function" && Object.keys(obj).length !== 0) {
76
+ return false;
77
+ }
78
+ if (typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(obj).length !== 0) {
79
+ return false;
80
+ }
81
+ var syms = Object.getOwnPropertySymbols(obj);
82
+ if (syms.length !== 1 || syms[0] !== sym) {
83
+ return false;
84
+ }
85
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) {
86
+ return false;
87
+ }
88
+ if (typeof Object.getOwnPropertyDescriptor === "function") {
89
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
90
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) {
91
+ return false;
92
+ }
93
+ }
94
+ return true;
95
+ };
96
+ var hasSymbols$2 = shams$1;
97
+ var shams = function hasToStringTagShams() {
98
+ return hasSymbols$2() && !!Symbol.toStringTag;
99
+ };
100
+ var esErrors = Error;
101
+ var _eval = EvalError;
102
+ var range = RangeError;
103
+ var ref = ReferenceError;
104
+ var syntax = SyntaxError;
105
+ var type = TypeError;
106
+ var uri = URIError;
107
+ var origSymbol = typeof Symbol !== "undefined" && Symbol;
108
+ var hasSymbolSham = shams$1;
109
+ var hasSymbols$1 = function hasNativeSymbols() {
110
+ if (typeof origSymbol !== "function") {
111
+ return false;
112
+ }
113
+ if (typeof Symbol !== "function") {
114
+ return false;
115
+ }
116
+ if (typeof origSymbol("foo") !== "symbol") {
117
+ return false;
118
+ }
119
+ if (typeof Symbol("bar") !== "symbol") {
120
+ return false;
121
+ }
122
+ return hasSymbolSham();
123
+ };
124
+ var test = {
125
+ __proto__: null,
126
+ foo: {}
127
+ };
128
+ var $Object = Object;
129
+ var hasProto$1 = function hasProto() {
130
+ return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
131
+ };
132
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
133
+ var toStr$3 = Object.prototype.toString;
134
+ var max = Math.max;
135
+ var funcType = "[object Function]";
136
+ var concatty = function concatty2(a, b) {
137
+ var arr = [];
138
+ for (var i = 0; i < a.length; i += 1) {
139
+ arr[i] = a[i];
140
+ }
141
+ for (var j = 0; j < b.length; j += 1) {
142
+ arr[j + a.length] = b[j];
143
+ }
144
+ return arr;
145
+ };
146
+ var slicy = function slicy2(arrLike, offset) {
147
+ var arr = [];
148
+ for (var i = offset, j = 0; i < arrLike.length; i += 1, j += 1) {
149
+ arr[j] = arrLike[i];
150
+ }
151
+ return arr;
152
+ };
153
+ var joiny = function(arr, joiner) {
154
+ var str = "";
155
+ for (var i = 0; i < arr.length; i += 1) {
156
+ str += arr[i];
157
+ if (i + 1 < arr.length) {
158
+ str += joiner;
159
+ }
160
+ }
161
+ return str;
162
+ };
163
+ var implementation$1 = function bind(that) {
164
+ var target = this;
165
+ if (typeof target !== "function" || toStr$3.apply(target) !== funcType) {
166
+ throw new TypeError(ERROR_MESSAGE + target);
167
+ }
168
+ var args = slicy(arguments, 1);
169
+ var bound;
170
+ var binder = function() {
171
+ if (this instanceof bound) {
172
+ var result = target.apply(
173
+ this,
174
+ concatty(args, arguments)
175
+ );
176
+ if (Object(result) === result) {
177
+ return result;
178
+ }
179
+ return this;
180
+ }
181
+ return target.apply(
182
+ that,
183
+ concatty(args, arguments)
184
+ );
185
+ };
186
+ var boundLength = max(0, target.length - args.length);
187
+ var boundArgs = [];
188
+ for (var i = 0; i < boundLength; i++) {
189
+ boundArgs[i] = "$" + i;
190
+ }
191
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
192
+ if (target.prototype) {
193
+ var Empty = function Empty2() {
194
+ };
195
+ Empty.prototype = target.prototype;
196
+ bound.prototype = new Empty();
197
+ Empty.prototype = null;
198
+ }
199
+ return bound;
200
+ };
201
+ var implementation = implementation$1;
202
+ var functionBind = Function.prototype.bind || implementation;
203
+ var call = Function.prototype.call;
204
+ var $hasOwn = Object.prototype.hasOwnProperty;
205
+ var bind$1 = functionBind;
206
+ var hasown = bind$1.call(call, $hasOwn);
207
+ var undefined$1;
208
+ var $Error = esErrors;
209
+ var $EvalError = _eval;
210
+ var $RangeError = range;
211
+ var $ReferenceError = ref;
212
+ var $SyntaxError$1 = syntax;
213
+ var $TypeError$2 = type;
214
+ var $URIError = uri;
215
+ var $Function = Function;
216
+ var getEvalledConstructor = function(expressionSyntax) {
217
+ try {
218
+ return $Function('"use strict"; return (' + expressionSyntax + ").constructor;")();
219
+ } catch (e) {
220
+ }
221
+ };
222
+ var $gOPD$1 = Object.getOwnPropertyDescriptor;
223
+ if ($gOPD$1) {
224
+ try {
225
+ $gOPD$1({}, "");
226
+ } catch (e) {
227
+ $gOPD$1 = null;
228
+ }
229
+ }
230
+ var throwTypeError = function() {
231
+ throw new $TypeError$2();
232
+ };
233
+ var ThrowTypeError = $gOPD$1 ? function() {
234
+ try {
235
+ arguments.callee;
236
+ return throwTypeError;
237
+ } catch (calleeThrows) {
238
+ try {
239
+ return $gOPD$1(arguments, "callee").get;
240
+ } catch (gOPDthrows) {
241
+ return throwTypeError;
242
+ }
243
+ }
244
+ }() : throwTypeError;
245
+ var hasSymbols2 = hasSymbols$1();
246
+ var hasProto2 = hasProto$1();
247
+ var getProto$1 = Object.getPrototypeOf || (hasProto2 ? function(x) {
248
+ return x.__proto__;
249
+ } : null);
250
+ var needsEval = {};
251
+ var TypedArray = typeof Uint8Array === "undefined" || !getProto$1 ? undefined$1 : getProto$1(Uint8Array);
252
+ var INTRINSICS = {
253
+ __proto__: null,
254
+ "%AggregateError%": typeof AggregateError === "undefined" ? undefined$1 : AggregateError,
255
+ "%Array%": Array,
256
+ "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? undefined$1 : ArrayBuffer,
257
+ "%ArrayIteratorPrototype%": hasSymbols2 && getProto$1 ? getProto$1([][Symbol.iterator]()) : undefined$1,
258
+ "%AsyncFromSyncIteratorPrototype%": undefined$1,
259
+ "%AsyncFunction%": needsEval,
260
+ "%AsyncGenerator%": needsEval,
261
+ "%AsyncGeneratorFunction%": needsEval,
262
+ "%AsyncIteratorPrototype%": needsEval,
263
+ "%Atomics%": typeof Atomics === "undefined" ? undefined$1 : Atomics,
264
+ "%BigInt%": typeof BigInt === "undefined" ? undefined$1 : BigInt,
265
+ "%BigInt64Array%": typeof BigInt64Array === "undefined" ? undefined$1 : BigInt64Array,
266
+ "%BigUint64Array%": typeof BigUint64Array === "undefined" ? undefined$1 : BigUint64Array,
267
+ "%Boolean%": Boolean,
268
+ "%DataView%": typeof DataView === "undefined" ? undefined$1 : DataView,
269
+ "%Date%": Date,
270
+ "%decodeURI%": decodeURI,
271
+ "%decodeURIComponent%": decodeURIComponent,
272
+ "%encodeURI%": encodeURI,
273
+ "%encodeURIComponent%": encodeURIComponent,
274
+ "%Error%": $Error,
275
+ "%eval%": eval,
276
+ // eslint-disable-line no-eval
277
+ "%EvalError%": $EvalError,
278
+ "%Float32Array%": typeof Float32Array === "undefined" ? undefined$1 : Float32Array,
279
+ "%Float64Array%": typeof Float64Array === "undefined" ? undefined$1 : Float64Array,
280
+ "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? undefined$1 : FinalizationRegistry,
281
+ "%Function%": $Function,
282
+ "%GeneratorFunction%": needsEval,
283
+ "%Int8Array%": typeof Int8Array === "undefined" ? undefined$1 : Int8Array,
284
+ "%Int16Array%": typeof Int16Array === "undefined" ? undefined$1 : Int16Array,
285
+ "%Int32Array%": typeof Int32Array === "undefined" ? undefined$1 : Int32Array,
286
+ "%isFinite%": isFinite,
287
+ "%isNaN%": isNaN,
288
+ "%IteratorPrototype%": hasSymbols2 && getProto$1 ? getProto$1(getProto$1([][Symbol.iterator]())) : undefined$1,
289
+ "%JSON%": typeof JSON === "object" ? JSON : undefined$1,
290
+ "%Map%": typeof Map === "undefined" ? undefined$1 : Map,
291
+ "%MapIteratorPrototype%": typeof Map === "undefined" || !hasSymbols2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Map())[Symbol.iterator]()),
292
+ "%Math%": Math,
293
+ "%Number%": Number,
294
+ "%Object%": Object,
295
+ "%parseFloat%": parseFloat,
296
+ "%parseInt%": parseInt,
297
+ "%Promise%": typeof Promise === "undefined" ? undefined$1 : Promise,
298
+ "%Proxy%": typeof Proxy === "undefined" ? undefined$1 : Proxy,
299
+ "%RangeError%": $RangeError,
300
+ "%ReferenceError%": $ReferenceError,
301
+ "%Reflect%": typeof Reflect === "undefined" ? undefined$1 : Reflect,
302
+ "%RegExp%": RegExp,
303
+ "%Set%": typeof Set === "undefined" ? undefined$1 : Set,
304
+ "%SetIteratorPrototype%": typeof Set === "undefined" || !hasSymbols2 || !getProto$1 ? undefined$1 : getProto$1((/* @__PURE__ */ new Set())[Symbol.iterator]()),
305
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? undefined$1 : SharedArrayBuffer,
306
+ "%String%": String,
307
+ "%StringIteratorPrototype%": hasSymbols2 && getProto$1 ? getProto$1(""[Symbol.iterator]()) : undefined$1,
308
+ "%Symbol%": hasSymbols2 ? Symbol : undefined$1,
309
+ "%SyntaxError%": $SyntaxError$1,
310
+ "%ThrowTypeError%": ThrowTypeError,
311
+ "%TypedArray%": TypedArray,
312
+ "%TypeError%": $TypeError$2,
313
+ "%Uint8Array%": typeof Uint8Array === "undefined" ? undefined$1 : Uint8Array,
314
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? undefined$1 : Uint8ClampedArray,
315
+ "%Uint16Array%": typeof Uint16Array === "undefined" ? undefined$1 : Uint16Array,
316
+ "%Uint32Array%": typeof Uint32Array === "undefined" ? undefined$1 : Uint32Array,
317
+ "%URIError%": $URIError,
318
+ "%WeakMap%": typeof WeakMap === "undefined" ? undefined$1 : WeakMap,
319
+ "%WeakRef%": typeof WeakRef === "undefined" ? undefined$1 : WeakRef,
320
+ "%WeakSet%": typeof WeakSet === "undefined" ? undefined$1 : WeakSet
321
+ };
322
+ if (getProto$1) {
323
+ try {
324
+ null.error;
325
+ } catch (e) {
326
+ var errorProto = getProto$1(getProto$1(e));
327
+ INTRINSICS["%Error.prototype%"] = errorProto;
328
+ }
329
+ }
330
+ var doEval = function doEval2(name) {
331
+ var value;
332
+ if (name === "%AsyncFunction%") {
333
+ value = getEvalledConstructor("async function () {}");
334
+ } else if (name === "%GeneratorFunction%") {
335
+ value = getEvalledConstructor("function* () {}");
336
+ } else if (name === "%AsyncGeneratorFunction%") {
337
+ value = getEvalledConstructor("async function* () {}");
338
+ } else if (name === "%AsyncGenerator%") {
339
+ var fn = doEval2("%AsyncGeneratorFunction%");
340
+ if (fn) {
341
+ value = fn.prototype;
342
+ }
343
+ } else if (name === "%AsyncIteratorPrototype%") {
344
+ var gen = doEval2("%AsyncGenerator%");
345
+ if (gen && getProto$1) {
346
+ value = getProto$1(gen.prototype);
347
+ }
348
+ }
349
+ INTRINSICS[name] = value;
350
+ return value;
351
+ };
352
+ var LEGACY_ALIASES = {
353
+ __proto__: null,
354
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
355
+ "%ArrayPrototype%": ["Array", "prototype"],
356
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
357
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
358
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
359
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
360
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
361
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
362
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
363
+ "%BooleanPrototype%": ["Boolean", "prototype"],
364
+ "%DataViewPrototype%": ["DataView", "prototype"],
365
+ "%DatePrototype%": ["Date", "prototype"],
366
+ "%ErrorPrototype%": ["Error", "prototype"],
367
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
368
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
369
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
370
+ "%FunctionPrototype%": ["Function", "prototype"],
371
+ "%Generator%": ["GeneratorFunction", "prototype"],
372
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
373
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
374
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
375
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
376
+ "%JSONParse%": ["JSON", "parse"],
377
+ "%JSONStringify%": ["JSON", "stringify"],
378
+ "%MapPrototype%": ["Map", "prototype"],
379
+ "%NumberPrototype%": ["Number", "prototype"],
380
+ "%ObjectPrototype%": ["Object", "prototype"],
381
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
382
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
383
+ "%PromisePrototype%": ["Promise", "prototype"],
384
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
385
+ "%Promise_all%": ["Promise", "all"],
386
+ "%Promise_reject%": ["Promise", "reject"],
387
+ "%Promise_resolve%": ["Promise", "resolve"],
388
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
389
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
390
+ "%RegExpPrototype%": ["RegExp", "prototype"],
391
+ "%SetPrototype%": ["Set", "prototype"],
392
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
393
+ "%StringPrototype%": ["String", "prototype"],
394
+ "%SymbolPrototype%": ["Symbol", "prototype"],
395
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
396
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
397
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
398
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
399
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
400
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
401
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
402
+ "%URIErrorPrototype%": ["URIError", "prototype"],
403
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
404
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
405
+ };
406
+ var bind2 = functionBind;
407
+ var hasOwn = hasown;
408
+ var $concat = bind2.call(Function.call, Array.prototype.concat);
409
+ var $spliceApply = bind2.call(Function.apply, Array.prototype.splice);
410
+ var $replace = bind2.call(Function.call, String.prototype.replace);
411
+ var $strSlice = bind2.call(Function.call, String.prototype.slice);
412
+ var $exec = bind2.call(Function.call, RegExp.prototype.exec);
413
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
414
+ var reEscapeChar = /\\(\\)?/g;
415
+ var stringToPath = function stringToPath2(string) {
416
+ var first = $strSlice(string, 0, 1);
417
+ var last = $strSlice(string, -1);
418
+ if (first === "%" && last !== "%") {
419
+ throw new $SyntaxError$1("invalid intrinsic syntax, expected closing `%`");
420
+ } else if (last === "%" && first !== "%") {
421
+ throw new $SyntaxError$1("invalid intrinsic syntax, expected opening `%`");
422
+ }
423
+ var result = [];
424
+ $replace(string, rePropName, function(match, number, quote, subString) {
425
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number || match;
426
+ });
427
+ return result;
428
+ };
429
+ var getBaseIntrinsic = function getBaseIntrinsic2(name, allowMissing) {
430
+ var intrinsicName = name;
431
+ var alias;
432
+ if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
433
+ alias = LEGACY_ALIASES[intrinsicName];
434
+ intrinsicName = "%" + alias[0] + "%";
435
+ }
436
+ if (hasOwn(INTRINSICS, intrinsicName)) {
437
+ var value = INTRINSICS[intrinsicName];
438
+ if (value === needsEval) {
439
+ value = doEval(intrinsicName);
440
+ }
441
+ if (typeof value === "undefined" && !allowMissing) {
442
+ throw new $TypeError$2("intrinsic " + name + " exists, but is not available. Please file an issue!");
443
+ }
444
+ return {
445
+ alias,
446
+ name: intrinsicName,
447
+ value
448
+ };
449
+ }
450
+ throw new $SyntaxError$1("intrinsic " + name + " does not exist!");
451
+ };
452
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
453
+ if (typeof name !== "string" || name.length === 0) {
454
+ throw new $TypeError$2("intrinsic name must be a non-empty string");
455
+ }
456
+ if (arguments.length > 1 && typeof allowMissing !== "boolean") {
457
+ throw new $TypeError$2('"allowMissing" argument must be a boolean');
458
+ }
459
+ if ($exec(/^%?[^%]*%?$/, name) === null) {
460
+ throw new $SyntaxError$1("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
461
+ }
462
+ var parts = stringToPath(name);
463
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : "";
464
+ var intrinsic = getBaseIntrinsic("%" + intrinsicBaseName + "%", allowMissing);
465
+ var intrinsicRealName = intrinsic.name;
466
+ var value = intrinsic.value;
467
+ var skipFurtherCaching = false;
468
+ var alias = intrinsic.alias;
469
+ if (alias) {
470
+ intrinsicBaseName = alias[0];
471
+ $spliceApply(parts, $concat([0, 1], alias));
472
+ }
473
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
474
+ var part = parts[i];
475
+ var first = $strSlice(part, 0, 1);
476
+ var last = $strSlice(part, -1);
477
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
478
+ throw new $SyntaxError$1("property names with quotes must have matching quotes");
479
+ }
480
+ if (part === "constructor" || !isOwn) {
481
+ skipFurtherCaching = true;
482
+ }
483
+ intrinsicBaseName += "." + part;
484
+ intrinsicRealName = "%" + intrinsicBaseName + "%";
485
+ if (hasOwn(INTRINSICS, intrinsicRealName)) {
486
+ value = INTRINSICS[intrinsicRealName];
487
+ } else if (value != null) {
488
+ if (!(part in value)) {
489
+ if (!allowMissing) {
490
+ throw new $TypeError$2("base intrinsic for " + name + " exists, but the property is not available.");
491
+ }
492
+ return void 0;
493
+ }
494
+ if ($gOPD$1 && i + 1 >= parts.length) {
495
+ var desc = $gOPD$1(value, part);
496
+ isOwn = !!desc;
497
+ if (isOwn && "get" in desc && !("originalValue" in desc.get)) {
498
+ value = desc.get;
499
+ } else {
500
+ value = value[part];
501
+ }
502
+ } else {
503
+ isOwn = hasOwn(value, part);
504
+ value = value[part];
505
+ }
506
+ if (isOwn && !skipFurtherCaching) {
507
+ INTRINSICS[intrinsicRealName] = value;
508
+ }
509
+ }
510
+ }
511
+ return value;
512
+ };
513
+ var callBind$2 = { exports: {} };
514
+ var esDefineProperty;
515
+ var hasRequiredEsDefineProperty;
516
+ function requireEsDefineProperty() {
517
+ if (hasRequiredEsDefineProperty) return esDefineProperty;
518
+ hasRequiredEsDefineProperty = 1;
519
+ var GetIntrinsic3 = getIntrinsic;
520
+ var $defineProperty2 = GetIntrinsic3("%Object.defineProperty%", true) || false;
521
+ if ($defineProperty2) {
522
+ try {
523
+ $defineProperty2({}, "a", { value: 1 });
524
+ } catch (e) {
525
+ $defineProperty2 = false;
526
+ }
527
+ }
528
+ esDefineProperty = $defineProperty2;
529
+ return esDefineProperty;
530
+ }
531
+ var GetIntrinsic$2 = getIntrinsic;
532
+ var $gOPD = GetIntrinsic$2("%Object.getOwnPropertyDescriptor%", true);
533
+ if ($gOPD) {
534
+ try {
535
+ $gOPD([], "length");
536
+ } catch (e) {
537
+ $gOPD = null;
538
+ }
539
+ }
540
+ var gopd$1 = $gOPD;
541
+ var $defineProperty$1 = requireEsDefineProperty();
542
+ var $SyntaxError = syntax;
543
+ var $TypeError$1 = type;
544
+ var gopd = gopd$1;
545
+ var defineDataProperty = function defineDataProperty2(obj, property, value) {
546
+ if (!obj || typeof obj !== "object" && typeof obj !== "function") {
547
+ throw new $TypeError$1("`obj` must be an object or a function`");
548
+ }
549
+ if (typeof property !== "string" && typeof property !== "symbol") {
550
+ throw new $TypeError$1("`property` must be a string or a symbol`");
551
+ }
552
+ if (arguments.length > 3 && typeof arguments[3] !== "boolean" && arguments[3] !== null) {
553
+ throw new $TypeError$1("`nonEnumerable`, if provided, must be a boolean or null");
554
+ }
555
+ if (arguments.length > 4 && typeof arguments[4] !== "boolean" && arguments[4] !== null) {
556
+ throw new $TypeError$1("`nonWritable`, if provided, must be a boolean or null");
557
+ }
558
+ if (arguments.length > 5 && typeof arguments[5] !== "boolean" && arguments[5] !== null) {
559
+ throw new $TypeError$1("`nonConfigurable`, if provided, must be a boolean or null");
560
+ }
561
+ if (arguments.length > 6 && typeof arguments[6] !== "boolean") {
562
+ throw new $TypeError$1("`loose`, if provided, must be a boolean");
563
+ }
564
+ var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
565
+ var nonWritable = arguments.length > 4 ? arguments[4] : null;
566
+ var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
567
+ var loose = arguments.length > 6 ? arguments[6] : false;
568
+ var desc = !!gopd && gopd(obj, property);
569
+ if ($defineProperty$1) {
570
+ $defineProperty$1(obj, property, {
571
+ configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
572
+ enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
573
+ value,
574
+ writable: nonWritable === null && desc ? desc.writable : !nonWritable
575
+ });
576
+ } else if (loose || !nonEnumerable && !nonWritable && !nonConfigurable) {
577
+ obj[property] = value;
578
+ } else {
579
+ throw new $SyntaxError("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
580
+ }
581
+ };
582
+ var $defineProperty = requireEsDefineProperty();
583
+ var hasPropertyDescriptors = function hasPropertyDescriptors2() {
584
+ return !!$defineProperty;
585
+ };
586
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
587
+ if (!$defineProperty) {
588
+ return null;
589
+ }
590
+ try {
591
+ return $defineProperty([], "length", { value: 1 }).length !== 1;
592
+ } catch (e) {
593
+ return true;
594
+ }
595
+ };
596
+ var hasPropertyDescriptors_1 = hasPropertyDescriptors;
597
+ var GetIntrinsic$1 = getIntrinsic;
598
+ var define = defineDataProperty;
599
+ var hasDescriptors = hasPropertyDescriptors_1();
600
+ var gOPD$1 = gopd$1;
601
+ var $TypeError = type;
602
+ var $floor = GetIntrinsic$1("%Math.floor%");
603
+ var setFunctionLength = function setFunctionLength2(fn, length) {
604
+ if (typeof fn !== "function") {
605
+ throw new $TypeError("`fn` is not a function");
606
+ }
607
+ if (typeof length !== "number" || length < 0 || length > 4294967295 || $floor(length) !== length) {
608
+ throw new $TypeError("`length` must be a positive 32-bit integer");
609
+ }
610
+ var loose = arguments.length > 2 && !!arguments[2];
611
+ var functionLengthIsConfigurable = true;
612
+ var functionLengthIsWritable = true;
613
+ if ("length" in fn && gOPD$1) {
614
+ var desc = gOPD$1(fn, "length");
615
+ if (desc && !desc.configurable) {
616
+ functionLengthIsConfigurable = false;
617
+ }
618
+ if (desc && !desc.writable) {
619
+ functionLengthIsWritable = false;
620
+ }
621
+ }
622
+ if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
623
+ if (hasDescriptors) {
624
+ define(
625
+ /** @type {Parameters<define>[0]} */
626
+ fn,
627
+ "length",
628
+ length,
629
+ true,
630
+ true
631
+ );
632
+ } else {
633
+ define(
634
+ /** @type {Parameters<define>[0]} */
635
+ fn,
636
+ "length",
637
+ length
638
+ );
639
+ }
640
+ }
641
+ return fn;
642
+ };
643
+ (function(module) {
644
+ var bind3 = functionBind;
645
+ var GetIntrinsic3 = getIntrinsic;
646
+ var setFunctionLength$1 = setFunctionLength;
647
+ var $TypeError2 = type;
648
+ var $apply = GetIntrinsic3("%Function.prototype.apply%");
649
+ var $call = GetIntrinsic3("%Function.prototype.call%");
650
+ var $reflectApply = GetIntrinsic3("%Reflect.apply%", true) || bind3.call($call, $apply);
651
+ var $defineProperty2 = requireEsDefineProperty();
652
+ var $max = GetIntrinsic3("%Math.max%");
653
+ module.exports = function callBind2(originalFunction) {
654
+ if (typeof originalFunction !== "function") {
655
+ throw new $TypeError2("a function is required");
656
+ }
657
+ var func = $reflectApply(bind3, $call, arguments);
658
+ return setFunctionLength$1(
659
+ func,
660
+ 1 + $max(0, originalFunction.length - (arguments.length - 1)),
661
+ true
662
+ );
663
+ };
664
+ var applyBind = function applyBind2() {
665
+ return $reflectApply(bind3, $apply, arguments);
666
+ };
667
+ if ($defineProperty2) {
668
+ $defineProperty2(module.exports, "apply", { value: applyBind });
669
+ } else {
670
+ module.exports.apply = applyBind;
671
+ }
672
+ })(callBind$2);
673
+ var callBindExports = callBind$2.exports;
674
+ var GetIntrinsic2 = getIntrinsic;
675
+ var callBind$1 = callBindExports;
676
+ var $indexOf$1 = callBind$1(GetIntrinsic2("String.prototype.indexOf"));
677
+ var callBound$2 = function callBoundIntrinsic(name, allowMissing) {
678
+ var intrinsic = GetIntrinsic2(name, !!allowMissing);
679
+ if (typeof intrinsic === "function" && $indexOf$1(name, ".prototype.") > -1) {
680
+ return callBind$1(intrinsic);
681
+ }
682
+ return intrinsic;
683
+ };
684
+ var hasToStringTag$3 = shams();
685
+ var callBound$1 = callBound$2;
686
+ var $toString$1 = callBound$1("Object.prototype.toString");
687
+ var isStandardArguments = function isArguments(value) {
688
+ if (hasToStringTag$3 && value && typeof value === "object" && Symbol.toStringTag in value) {
689
+ return false;
690
+ }
691
+ return $toString$1(value) === "[object Arguments]";
692
+ };
693
+ var isLegacyArguments = function isArguments2(value) {
694
+ if (isStandardArguments(value)) {
695
+ return true;
696
+ }
697
+ return value !== null && typeof value === "object" && typeof value.length === "number" && value.length >= 0 && $toString$1(value) !== "[object Array]" && $toString$1(value.callee) === "[object Function]";
698
+ };
699
+ var supportsStandardArguments = function() {
700
+ return isStandardArguments(arguments);
701
+ }();
702
+ isStandardArguments.isLegacyArguments = isLegacyArguments;
703
+ var isArguments3 = supportsStandardArguments ? isStandardArguments : isLegacyArguments;
704
+ var toStr$2 = Object.prototype.toString;
705
+ var fnToStr$1 = Function.prototype.toString;
706
+ var isFnRegex = /^\s*(?:function)?\*/;
707
+ var hasToStringTag$2 = shams();
708
+ var getProto = Object.getPrototypeOf;
709
+ var getGeneratorFunc = function() {
710
+ if (!hasToStringTag$2) {
711
+ return false;
712
+ }
713
+ try {
714
+ return Function("return function*() {}")();
715
+ } catch (e) {
716
+ }
717
+ };
718
+ var GeneratorFunction;
719
+ var isGeneratorFunction = function isGeneratorFunction2(fn) {
720
+ if (typeof fn !== "function") {
721
+ return false;
722
+ }
723
+ if (isFnRegex.test(fnToStr$1.call(fn))) {
724
+ return true;
725
+ }
726
+ if (!hasToStringTag$2) {
727
+ var str = toStr$2.call(fn);
728
+ return str === "[object GeneratorFunction]";
729
+ }
730
+ if (!getProto) {
731
+ return false;
732
+ }
733
+ if (typeof GeneratorFunction === "undefined") {
734
+ var generatorFunc = getGeneratorFunc();
735
+ GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;
736
+ }
737
+ return getProto(fn) === GeneratorFunction;
738
+ };
739
+ var fnToStr = Function.prototype.toString;
740
+ var reflectApply = typeof Reflect === "object" && Reflect !== null && Reflect.apply;
741
+ var badArrayLike;
742
+ var isCallableMarker;
743
+ if (typeof reflectApply === "function" && typeof Object.defineProperty === "function") {
744
+ try {
745
+ badArrayLike = Object.defineProperty({}, "length", {
746
+ get: function() {
747
+ throw isCallableMarker;
748
+ }
749
+ });
750
+ isCallableMarker = {};
751
+ reflectApply(function() {
752
+ throw 42;
753
+ }, null, badArrayLike);
754
+ } catch (_) {
755
+ if (_ !== isCallableMarker) {
756
+ reflectApply = null;
757
+ }
758
+ }
759
+ } else {
760
+ reflectApply = null;
761
+ }
762
+ var constructorRegex = /^\s*class\b/;
763
+ var isES6ClassFn = function isES6ClassFunction(value) {
764
+ try {
765
+ var fnStr = fnToStr.call(value);
766
+ return constructorRegex.test(fnStr);
767
+ } catch (e) {
768
+ return false;
769
+ }
770
+ };
771
+ var tryFunctionObject = function tryFunctionToStr(value) {
772
+ try {
773
+ if (isES6ClassFn(value)) {
774
+ return false;
775
+ }
776
+ fnToStr.call(value);
777
+ return true;
778
+ } catch (e) {
779
+ return false;
780
+ }
781
+ };
782
+ var toStr$1 = Object.prototype.toString;
783
+ var objectClass = "[object Object]";
784
+ var fnClass = "[object Function]";
785
+ var genClass = "[object GeneratorFunction]";
786
+ var ddaClass = "[object HTMLAllCollection]";
787
+ var ddaClass2 = "[object HTML document.all class]";
788
+ var ddaClass3 = "[object HTMLCollection]";
789
+ var hasToStringTag$1 = typeof Symbol === "function" && !!Symbol.toStringTag;
790
+ var isIE68 = !(0 in [,]);
791
+ var isDDA = function isDocumentDotAll() {
792
+ return false;
793
+ };
794
+ if (typeof document === "object") {
795
+ var all = document.all;
796
+ if (toStr$1.call(all) === toStr$1.call(document.all)) {
797
+ isDDA = function isDocumentDotAll2(value) {
798
+ if ((isIE68 || !value) && (typeof value === "undefined" || typeof value === "object")) {
799
+ try {
800
+ var str = toStr$1.call(value);
801
+ return (str === ddaClass || str === ddaClass2 || str === ddaClass3 || str === objectClass) && value("") == null;
802
+ } catch (e) {
803
+ }
804
+ }
805
+ return false;
806
+ };
807
+ }
808
+ }
809
+ var isCallable$1 = reflectApply ? function isCallable(value) {
810
+ if (isDDA(value)) {
811
+ return true;
812
+ }
813
+ if (!value) {
814
+ return false;
815
+ }
816
+ if (typeof value !== "function" && typeof value !== "object") {
817
+ return false;
818
+ }
819
+ try {
820
+ reflectApply(value, null, badArrayLike);
821
+ } catch (e) {
822
+ if (e !== isCallableMarker) {
823
+ return false;
824
+ }
825
+ }
826
+ return !isES6ClassFn(value) && tryFunctionObject(value);
827
+ } : function isCallable2(value) {
828
+ if (isDDA(value)) {
829
+ return true;
830
+ }
831
+ if (!value) {
832
+ return false;
833
+ }
834
+ if (typeof value !== "function" && typeof value !== "object") {
835
+ return false;
836
+ }
837
+ if (hasToStringTag$1) {
838
+ return tryFunctionObject(value);
839
+ }
840
+ if (isES6ClassFn(value)) {
841
+ return false;
842
+ }
843
+ var strClass = toStr$1.call(value);
844
+ if (strClass !== fnClass && strClass !== genClass && !/^\[object HTML/.test(strClass)) {
845
+ return false;
846
+ }
847
+ return tryFunctionObject(value);
848
+ };
849
+ var isCallable3 = isCallable$1;
850
+ var toStr = Object.prototype.toString;
851
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
852
+ var forEachArray = function forEachArray2(array, iterator, receiver) {
853
+ for (var i = 0, len = array.length; i < len; i++) {
854
+ if (hasOwnProperty.call(array, i)) {
855
+ if (receiver == null) {
856
+ iterator(array[i], i, array);
857
+ } else {
858
+ iterator.call(receiver, array[i], i, array);
859
+ }
860
+ }
861
+ }
862
+ };
863
+ var forEachString = function forEachString2(string, iterator, receiver) {
864
+ for (var i = 0, len = string.length; i < len; i++) {
865
+ if (receiver == null) {
866
+ iterator(string.charAt(i), i, string);
867
+ } else {
868
+ iterator.call(receiver, string.charAt(i), i, string);
869
+ }
870
+ }
871
+ };
872
+ var forEachObject = function forEachObject2(object, iterator, receiver) {
873
+ for (var k in object) {
874
+ if (hasOwnProperty.call(object, k)) {
875
+ if (receiver == null) {
876
+ iterator(object[k], k, object);
877
+ } else {
878
+ iterator.call(receiver, object[k], k, object);
879
+ }
880
+ }
881
+ }
882
+ };
883
+ var forEach$1 = function forEach(list, iterator, thisArg) {
884
+ if (!isCallable3(iterator)) {
885
+ throw new TypeError("iterator must be a function");
886
+ }
887
+ var receiver;
888
+ if (arguments.length >= 3) {
889
+ receiver = thisArg;
890
+ }
891
+ if (toStr.call(list) === "[object Array]") {
892
+ forEachArray(list, iterator, receiver);
893
+ } else if (typeof list === "string") {
894
+ forEachString(list, iterator, receiver);
895
+ } else {
896
+ forEachObject(list, iterator, receiver);
897
+ }
898
+ };
899
+ var forEach_1 = forEach$1;
900
+ var possibleTypedArrayNames = [
901
+ "Float32Array",
902
+ "Float64Array",
903
+ "Int8Array",
904
+ "Int16Array",
905
+ "Int32Array",
906
+ "Uint8Array",
907
+ "Uint8ClampedArray",
908
+ "Uint16Array",
909
+ "Uint32Array",
910
+ "BigInt64Array",
911
+ "BigUint64Array"
912
+ ];
913
+ var possibleNames = possibleTypedArrayNames;
914
+ var g$1 = typeof globalThis === "undefined" ? commonjsGlobal : globalThis;
915
+ var availableTypedArrays$1 = function availableTypedArrays() {
916
+ var out = [];
917
+ for (var i = 0; i < possibleNames.length; i++) {
918
+ if (typeof g$1[possibleNames[i]] === "function") {
919
+ out[out.length] = possibleNames[i];
920
+ }
921
+ }
922
+ return out;
923
+ };
924
+ var forEach2 = forEach_1;
925
+ var availableTypedArrays2 = availableTypedArrays$1;
926
+ var callBind = callBindExports;
927
+ var callBound = callBound$2;
928
+ var gOPD = gopd$1;
929
+ var $toString = callBound("Object.prototype.toString");
930
+ var hasToStringTag = shams();
931
+ var g = typeof globalThis === "undefined" ? commonjsGlobal : globalThis;
932
+ var typedArrays = availableTypedArrays2();
933
+ var $slice = callBound("String.prototype.slice");
934
+ var getPrototypeOf = Object.getPrototypeOf;
935
+ var $indexOf = callBound("Array.prototype.indexOf", true) || function indexOf(array, value) {
936
+ for (var i = 0; i < array.length; i += 1) {
937
+ if (array[i] === value) {
938
+ return i;
939
+ }
940
+ }
941
+ return -1;
942
+ };
943
+ var cache = { __proto__: null };
944
+ if (hasToStringTag && gOPD && getPrototypeOf) {
945
+ forEach2(typedArrays, function(typedArray) {
946
+ var arr = new g[typedArray]();
947
+ if (Symbol.toStringTag in arr) {
948
+ var proto = getPrototypeOf(arr);
949
+ var descriptor = gOPD(proto, Symbol.toStringTag);
950
+ if (!descriptor) {
951
+ var superProto = getPrototypeOf(proto);
952
+ descriptor = gOPD(superProto, Symbol.toStringTag);
953
+ }
954
+ cache["$" + typedArray] = callBind(descriptor.get);
955
+ }
956
+ });
957
+ } else {
958
+ forEach2(typedArrays, function(typedArray) {
959
+ var arr = new g[typedArray]();
960
+ var fn = arr.slice || arr.set;
961
+ if (fn) {
962
+ cache["$" + typedArray] = callBind(fn);
963
+ }
964
+ });
965
+ }
966
+ var tryTypedArrays = function tryAllTypedArrays(value) {
967
+ var found = false;
968
+ forEach2(
969
+ // eslint-disable-next-line no-extra-parens
970
+ /** @type {Record<`\$${TypedArrayName}`, Getter>} */
971
+ /** @type {any} */
972
+ cache,
973
+ /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
974
+ function(getter, typedArray) {
975
+ if (!found) {
976
+ try {
977
+ if ("$" + getter(value) === typedArray) {
978
+ found = $slice(typedArray, 1);
979
+ }
980
+ } catch (e) {
981
+ }
982
+ }
983
+ }
984
+ );
985
+ return found;
986
+ };
987
+ var trySlices = function tryAllSlices(value) {
988
+ var found = false;
989
+ forEach2(
990
+ // eslint-disable-next-line no-extra-parens
991
+ /** @type {Record<`\$${TypedArrayName}`, Getter>} */
992
+ /** @type {any} */
993
+ cache,
994
+ /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
995
+ function(getter, name) {
996
+ if (!found) {
997
+ try {
998
+ getter(value);
999
+ found = $slice(name, 1);
1000
+ } catch (e) {
1001
+ }
1002
+ }
1003
+ }
1004
+ );
1005
+ return found;
1006
+ };
1007
+ var whichTypedArray$1 = function whichTypedArray(value) {
1008
+ if (!value || typeof value !== "object") {
1009
+ return false;
1010
+ }
1011
+ if (!hasToStringTag) {
1012
+ var tag = $slice($toString(value), 8, -1);
1013
+ if ($indexOf(typedArrays, tag) > -1) {
1014
+ return tag;
1015
+ }
1016
+ if (tag !== "Object") {
1017
+ return false;
1018
+ }
1019
+ return trySlices(value);
1020
+ }
1021
+ if (!gOPD) {
1022
+ return null;
1023
+ }
1024
+ return tryTypedArrays(value);
1025
+ };
1026
+ var whichTypedArray2 = whichTypedArray$1;
1027
+ var isTypedArray = function isTypedArray2(value) {
1028
+ return !!whichTypedArray2(value);
1029
+ };
1030
+ (function(exports) {
1031
+ var isArgumentsObject = isArguments3;
1032
+ var isGeneratorFunction$1 = isGeneratorFunction;
1033
+ var whichTypedArray3 = whichTypedArray$1;
1034
+ var isTypedArray$1 = isTypedArray;
1035
+ function uncurryThis(f) {
1036
+ return f.call.bind(f);
1037
+ }
1038
+ var BigIntSupported = typeof BigInt !== "undefined";
1039
+ var SymbolSupported = typeof Symbol !== "undefined";
1040
+ var ObjectToString = uncurryThis(Object.prototype.toString);
1041
+ var numberValue = uncurryThis(Number.prototype.valueOf);
1042
+ var stringValue = uncurryThis(String.prototype.valueOf);
1043
+ var booleanValue = uncurryThis(Boolean.prototype.valueOf);
1044
+ if (BigIntSupported) {
1045
+ var bigIntValue = uncurryThis(BigInt.prototype.valueOf);
1046
+ }
1047
+ if (SymbolSupported) {
1048
+ var symbolValue = uncurryThis(Symbol.prototype.valueOf);
1049
+ }
1050
+ function checkBoxedPrimitive(value, prototypeValueOf) {
1051
+ if (typeof value !== "object") {
1052
+ return false;
1053
+ }
1054
+ try {
1055
+ prototypeValueOf(value);
1056
+ return true;
1057
+ } catch (e) {
1058
+ return false;
1059
+ }
1060
+ }
1061
+ exports.isArgumentsObject = isArgumentsObject;
1062
+ exports.isGeneratorFunction = isGeneratorFunction$1;
1063
+ exports.isTypedArray = isTypedArray$1;
1064
+ function isPromise(input) {
1065
+ return typeof Promise !== "undefined" && input instanceof Promise || input !== null && typeof input === "object" && typeof input.then === "function" && typeof input.catch === "function";
1066
+ }
1067
+ exports.isPromise = isPromise;
1068
+ function isArrayBufferView(value) {
1069
+ if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
1070
+ return ArrayBuffer.isView(value);
1071
+ }
1072
+ return isTypedArray$1(value) || isDataView(value);
1073
+ }
1074
+ exports.isArrayBufferView = isArrayBufferView;
1075
+ function isUint8Array(value) {
1076
+ return whichTypedArray3(value) === "Uint8Array";
1077
+ }
1078
+ exports.isUint8Array = isUint8Array;
1079
+ function isUint8ClampedArray(value) {
1080
+ return whichTypedArray3(value) === "Uint8ClampedArray";
1081
+ }
1082
+ exports.isUint8ClampedArray = isUint8ClampedArray;
1083
+ function isUint16Array(value) {
1084
+ return whichTypedArray3(value) === "Uint16Array";
1085
+ }
1086
+ exports.isUint16Array = isUint16Array;
1087
+ function isUint32Array(value) {
1088
+ return whichTypedArray3(value) === "Uint32Array";
1089
+ }
1090
+ exports.isUint32Array = isUint32Array;
1091
+ function isInt8Array(value) {
1092
+ return whichTypedArray3(value) === "Int8Array";
1093
+ }
1094
+ exports.isInt8Array = isInt8Array;
1095
+ function isInt16Array(value) {
1096
+ return whichTypedArray3(value) === "Int16Array";
1097
+ }
1098
+ exports.isInt16Array = isInt16Array;
1099
+ function isInt32Array(value) {
1100
+ return whichTypedArray3(value) === "Int32Array";
1101
+ }
1102
+ exports.isInt32Array = isInt32Array;
1103
+ function isFloat32Array(value) {
1104
+ return whichTypedArray3(value) === "Float32Array";
1105
+ }
1106
+ exports.isFloat32Array = isFloat32Array;
1107
+ function isFloat64Array(value) {
1108
+ return whichTypedArray3(value) === "Float64Array";
1109
+ }
1110
+ exports.isFloat64Array = isFloat64Array;
1111
+ function isBigInt64Array(value) {
1112
+ return whichTypedArray3(value) === "BigInt64Array";
1113
+ }
1114
+ exports.isBigInt64Array = isBigInt64Array;
1115
+ function isBigUint64Array(value) {
1116
+ return whichTypedArray3(value) === "BigUint64Array";
1117
+ }
1118
+ exports.isBigUint64Array = isBigUint64Array;
1119
+ function isMapToString(value) {
1120
+ return ObjectToString(value) === "[object Map]";
1121
+ }
1122
+ isMapToString.working = typeof Map !== "undefined" && isMapToString(/* @__PURE__ */ new Map());
1123
+ function isMap(value) {
1124
+ if (typeof Map === "undefined") {
1125
+ return false;
1126
+ }
1127
+ return isMapToString.working ? isMapToString(value) : value instanceof Map;
1128
+ }
1129
+ exports.isMap = isMap;
1130
+ function isSetToString(value) {
1131
+ return ObjectToString(value) === "[object Set]";
1132
+ }
1133
+ isSetToString.working = typeof Set !== "undefined" && isSetToString(/* @__PURE__ */ new Set());
1134
+ function isSet(value) {
1135
+ if (typeof Set === "undefined") {
1136
+ return false;
1137
+ }
1138
+ return isSetToString.working ? isSetToString(value) : value instanceof Set;
1139
+ }
1140
+ exports.isSet = isSet;
1141
+ function isWeakMapToString(value) {
1142
+ return ObjectToString(value) === "[object WeakMap]";
1143
+ }
1144
+ isWeakMapToString.working = typeof WeakMap !== "undefined" && isWeakMapToString(/* @__PURE__ */ new WeakMap());
1145
+ function isWeakMap(value) {
1146
+ if (typeof WeakMap === "undefined") {
1147
+ return false;
1148
+ }
1149
+ return isWeakMapToString.working ? isWeakMapToString(value) : value instanceof WeakMap;
1150
+ }
1151
+ exports.isWeakMap = isWeakMap;
1152
+ function isWeakSetToString(value) {
1153
+ return ObjectToString(value) === "[object WeakSet]";
1154
+ }
1155
+ isWeakSetToString.working = typeof WeakSet !== "undefined" && isWeakSetToString(/* @__PURE__ */ new WeakSet());
1156
+ function isWeakSet(value) {
1157
+ return isWeakSetToString(value);
1158
+ }
1159
+ exports.isWeakSet = isWeakSet;
1160
+ function isArrayBufferToString(value) {
1161
+ return ObjectToString(value) === "[object ArrayBuffer]";
1162
+ }
1163
+ isArrayBufferToString.working = typeof ArrayBuffer !== "undefined" && isArrayBufferToString(new ArrayBuffer());
1164
+ function isArrayBuffer(value) {
1165
+ if (typeof ArrayBuffer === "undefined") {
1166
+ return false;
1167
+ }
1168
+ return isArrayBufferToString.working ? isArrayBufferToString(value) : value instanceof ArrayBuffer;
1169
+ }
1170
+ exports.isArrayBuffer = isArrayBuffer;
1171
+ function isDataViewToString(value) {
1172
+ return ObjectToString(value) === "[object DataView]";
1173
+ }
1174
+ isDataViewToString.working = typeof ArrayBuffer !== "undefined" && typeof DataView !== "undefined" && isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1));
1175
+ function isDataView(value) {
1176
+ if (typeof DataView === "undefined") {
1177
+ return false;
1178
+ }
1179
+ return isDataViewToString.working ? isDataViewToString(value) : value instanceof DataView;
1180
+ }
1181
+ exports.isDataView = isDataView;
1182
+ var SharedArrayBufferCopy = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : void 0;
1183
+ function isSharedArrayBufferToString(value) {
1184
+ return ObjectToString(value) === "[object SharedArrayBuffer]";
1185
+ }
1186
+ function isSharedArrayBuffer(value) {
1187
+ if (typeof SharedArrayBufferCopy === "undefined") {
1188
+ return false;
1189
+ }
1190
+ if (typeof isSharedArrayBufferToString.working === "undefined") {
1191
+ isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());
1192
+ }
1193
+ return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(value) : value instanceof SharedArrayBufferCopy;
1194
+ }
1195
+ exports.isSharedArrayBuffer = isSharedArrayBuffer;
1196
+ function isAsyncFunction(value) {
1197
+ return ObjectToString(value) === "[object AsyncFunction]";
1198
+ }
1199
+ exports.isAsyncFunction = isAsyncFunction;
1200
+ function isMapIterator(value) {
1201
+ return ObjectToString(value) === "[object Map Iterator]";
1202
+ }
1203
+ exports.isMapIterator = isMapIterator;
1204
+ function isSetIterator(value) {
1205
+ return ObjectToString(value) === "[object Set Iterator]";
1206
+ }
1207
+ exports.isSetIterator = isSetIterator;
1208
+ function isGeneratorObject(value) {
1209
+ return ObjectToString(value) === "[object Generator]";
1210
+ }
1211
+ exports.isGeneratorObject = isGeneratorObject;
1212
+ function isWebAssemblyCompiledModule(value) {
1213
+ return ObjectToString(value) === "[object WebAssembly.Module]";
1214
+ }
1215
+ exports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;
1216
+ function isNumberObject(value) {
1217
+ return checkBoxedPrimitive(value, numberValue);
1218
+ }
1219
+ exports.isNumberObject = isNumberObject;
1220
+ function isStringObject(value) {
1221
+ return checkBoxedPrimitive(value, stringValue);
1222
+ }
1223
+ exports.isStringObject = isStringObject;
1224
+ function isBooleanObject(value) {
1225
+ return checkBoxedPrimitive(value, booleanValue);
1226
+ }
1227
+ exports.isBooleanObject = isBooleanObject;
1228
+ function isBigIntObject(value) {
1229
+ return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);
1230
+ }
1231
+ exports.isBigIntObject = isBigIntObject;
1232
+ function isSymbolObject(value) {
1233
+ return SymbolSupported && checkBoxedPrimitive(value, symbolValue);
1234
+ }
1235
+ exports.isSymbolObject = isSymbolObject;
1236
+ function isBoxedPrimitive(value) {
1237
+ return isNumberObject(value) || isStringObject(value) || isBooleanObject(value) || isBigIntObject(value) || isSymbolObject(value);
1238
+ }
1239
+ exports.isBoxedPrimitive = isBoxedPrimitive;
1240
+ function isAnyArrayBuffer(value) {
1241
+ return typeof Uint8Array !== "undefined" && (isArrayBuffer(value) || isSharedArrayBuffer(value));
1242
+ }
1243
+ exports.isAnyArrayBuffer = isAnyArrayBuffer;
1244
+ ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(method) {
1245
+ Object.defineProperty(exports, method, {
1246
+ enumerable: false,
1247
+ value: function() {
1248
+ throw new Error(method + " is not supported in userland");
1249
+ }
1250
+ });
1251
+ });
1252
+ })(types);
1253
+ var isBufferBrowser = function isBuffer(arg) {
1254
+ return arg && typeof arg === "object" && typeof arg.copy === "function" && typeof arg.fill === "function" && typeof arg.readUInt8 === "function";
1255
+ };
1256
+ (function(exports) {
1257
+ var define_process_default = { env: {} };
1258
+ var getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors2(obj) {
1259
+ var keys = Object.keys(obj);
1260
+ var descriptors = {};
1261
+ for (var i = 0; i < keys.length; i++) {
1262
+ descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);
1263
+ }
1264
+ return descriptors;
1265
+ };
1266
+ var formatRegExp = /%[sdj%]/g;
1267
+ exports.format = function(f) {
1268
+ if (!isString(f)) {
1269
+ var objects = [];
1270
+ for (var i = 0; i < arguments.length; i++) {
1271
+ objects.push(inspect(arguments[i]));
1272
+ }
1273
+ return objects.join(" ");
1274
+ }
1275
+ var i = 1;
1276
+ var args = arguments;
1277
+ var len = args.length;
1278
+ var str = String(f).replace(formatRegExp, function(x2) {
1279
+ if (x2 === "%%") return "%";
1280
+ if (i >= len) return x2;
1281
+ switch (x2) {
1282
+ case "%s":
1283
+ return String(args[i++]);
1284
+ case "%d":
1285
+ return Number(args[i++]);
1286
+ case "%j":
1287
+ try {
1288
+ return JSON.stringify(args[i++]);
1289
+ } catch (_) {
1290
+ return "[Circular]";
1291
+ }
1292
+ default:
1293
+ return x2;
1294
+ }
1295
+ });
1296
+ for (var x = args[i]; i < len; x = args[++i]) {
1297
+ if (isNull(x) || !isObject(x)) {
1298
+ str += " " + x;
1299
+ } else {
1300
+ str += " " + inspect(x);
1301
+ }
1302
+ }
1303
+ return str;
1304
+ };
1305
+ exports.deprecate = function(fn, msg) {
1306
+ if (typeof define_process_default !== "undefined" && define_process_default.noDeprecation === true) {
1307
+ return fn;
1308
+ }
1309
+ if (typeof define_process_default === "undefined") {
1310
+ return function() {
1311
+ return exports.deprecate(fn, msg).apply(this, arguments);
1312
+ };
1313
+ }
1314
+ var warned = false;
1315
+ function deprecated() {
1316
+ if (!warned) {
1317
+ if (define_process_default.throwDeprecation) {
1318
+ throw new Error(msg);
1319
+ } else if (define_process_default.traceDeprecation) {
1320
+ console.trace(msg);
1321
+ } else {
1322
+ console.error(msg);
1323
+ }
1324
+ warned = true;
1325
+ }
1326
+ return fn.apply(this, arguments);
1327
+ }
1328
+ return deprecated;
1329
+ };
1330
+ var debugs = {};
1331
+ var debugEnvRegex = /^$/;
1332
+ exports.debuglog = function(set) {
1333
+ set = set.toUpperCase();
1334
+ if (!debugs[set]) {
1335
+ if (debugEnvRegex.test(set)) {
1336
+ var pid = define_process_default.pid;
1337
+ debugs[set] = function() {
1338
+ var msg = exports.format.apply(exports, arguments);
1339
+ console.error("%s %d: %s", set, pid, msg);
1340
+ };
1341
+ } else {
1342
+ debugs[set] = function() {
1343
+ };
1344
+ }
1345
+ }
1346
+ return debugs[set];
1347
+ };
1348
+ function inspect(obj, opts) {
1349
+ var ctx = {
1350
+ seen: [],
1351
+ stylize: stylizeNoColor
1352
+ };
1353
+ if (arguments.length >= 3) ctx.depth = arguments[2];
1354
+ if (arguments.length >= 4) ctx.colors = arguments[3];
1355
+ if (isBoolean(opts)) {
1356
+ ctx.showHidden = opts;
1357
+ } else if (opts) {
1358
+ exports._extend(ctx, opts);
1359
+ }
1360
+ if (isUndefined(ctx.showHidden)) ctx.showHidden = false;
1361
+ if (isUndefined(ctx.depth)) ctx.depth = 2;
1362
+ if (isUndefined(ctx.colors)) ctx.colors = false;
1363
+ if (isUndefined(ctx.customInspect)) ctx.customInspect = true;
1364
+ if (ctx.colors) ctx.stylize = stylizeWithColor;
1365
+ return formatValue(ctx, obj, ctx.depth);
1366
+ }
1367
+ exports.inspect = inspect;
1368
+ inspect.colors = {
1369
+ "bold": [1, 22],
1370
+ "italic": [3, 23],
1371
+ "underline": [4, 24],
1372
+ "inverse": [7, 27],
1373
+ "white": [37, 39],
1374
+ "grey": [90, 39],
1375
+ "black": [30, 39],
1376
+ "blue": [34, 39],
1377
+ "cyan": [36, 39],
1378
+ "green": [32, 39],
1379
+ "magenta": [35, 39],
1380
+ "red": [31, 39],
1381
+ "yellow": [33, 39]
1382
+ };
1383
+ inspect.styles = {
1384
+ "special": "cyan",
1385
+ "number": "yellow",
1386
+ "boolean": "yellow",
1387
+ "undefined": "grey",
1388
+ "null": "bold",
1389
+ "string": "green",
1390
+ "date": "magenta",
1391
+ // "name": intentionally not styling
1392
+ "regexp": "red"
1393
+ };
1394
+ function stylizeWithColor(str, styleType) {
1395
+ var style = inspect.styles[styleType];
1396
+ if (style) {
1397
+ return "\x1B[" + inspect.colors[style][0] + "m" + str + "\x1B[" + inspect.colors[style][1] + "m";
1398
+ } else {
1399
+ return str;
1400
+ }
1401
+ }
1402
+ function stylizeNoColor(str, styleType) {
1403
+ return str;
1404
+ }
1405
+ function arrayToHash(array) {
1406
+ var hash = {};
1407
+ array.forEach(function(val, idx) {
1408
+ hash[val] = true;
1409
+ });
1410
+ return hash;
1411
+ }
1412
+ function formatValue(ctx, value, recurseTimes) {
1413
+ if (ctx.customInspect && value && isFunction(value.inspect) && // Filter out the util module, it's inspect function is special
1414
+ value.inspect !== exports.inspect && // Also filter out any prototype objects using the circular check.
1415
+ !(value.constructor && value.constructor.prototype === value)) {
1416
+ var ret = value.inspect(recurseTimes, ctx);
1417
+ if (!isString(ret)) {
1418
+ ret = formatValue(ctx, ret, recurseTimes);
1419
+ }
1420
+ return ret;
1421
+ }
1422
+ var primitive = formatPrimitive(ctx, value);
1423
+ if (primitive) {
1424
+ return primitive;
1425
+ }
1426
+ var keys = Object.keys(value);
1427
+ var visibleKeys = arrayToHash(keys);
1428
+ if (ctx.showHidden) {
1429
+ keys = Object.getOwnPropertyNames(value);
1430
+ }
1431
+ if (isError(value) && (keys.indexOf("message") >= 0 || keys.indexOf("description") >= 0)) {
1432
+ return formatError(value);
1433
+ }
1434
+ if (keys.length === 0) {
1435
+ if (isFunction(value)) {
1436
+ var name = value.name ? ": " + value.name : "";
1437
+ return ctx.stylize("[Function" + name + "]", "special");
1438
+ }
1439
+ if (isRegExp(value)) {
1440
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
1441
+ }
1442
+ if (isDate(value)) {
1443
+ return ctx.stylize(Date.prototype.toString.call(value), "date");
1444
+ }
1445
+ if (isError(value)) {
1446
+ return formatError(value);
1447
+ }
1448
+ }
1449
+ var base = "", array = false, braces = ["{", "}"];
1450
+ if (isArray(value)) {
1451
+ array = true;
1452
+ braces = ["[", "]"];
1453
+ }
1454
+ if (isFunction(value)) {
1455
+ var n = value.name ? ": " + value.name : "";
1456
+ base = " [Function" + n + "]";
1457
+ }
1458
+ if (isRegExp(value)) {
1459
+ base = " " + RegExp.prototype.toString.call(value);
1460
+ }
1461
+ if (isDate(value)) {
1462
+ base = " " + Date.prototype.toUTCString.call(value);
1463
+ }
1464
+ if (isError(value)) {
1465
+ base = " " + formatError(value);
1466
+ }
1467
+ if (keys.length === 0 && (!array || value.length == 0)) {
1468
+ return braces[0] + base + braces[1];
1469
+ }
1470
+ if (recurseTimes < 0) {
1471
+ if (isRegExp(value)) {
1472
+ return ctx.stylize(RegExp.prototype.toString.call(value), "regexp");
1473
+ } else {
1474
+ return ctx.stylize("[Object]", "special");
1475
+ }
1476
+ }
1477
+ ctx.seen.push(value);
1478
+ var output;
1479
+ if (array) {
1480
+ output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);
1481
+ } else {
1482
+ output = keys.map(function(key) {
1483
+ return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);
1484
+ });
1485
+ }
1486
+ ctx.seen.pop();
1487
+ return reduceToSingleString(output, base, braces);
1488
+ }
1489
+ function formatPrimitive(ctx, value) {
1490
+ if (isUndefined(value))
1491
+ return ctx.stylize("undefined", "undefined");
1492
+ if (isString(value)) {
1493
+ var simple = "'" + JSON.stringify(value).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
1494
+ return ctx.stylize(simple, "string");
1495
+ }
1496
+ if (isNumber(value))
1497
+ return ctx.stylize("" + value, "number");
1498
+ if (isBoolean(value))
1499
+ return ctx.stylize("" + value, "boolean");
1500
+ if (isNull(value))
1501
+ return ctx.stylize("null", "null");
1502
+ }
1503
+ function formatError(value) {
1504
+ return "[" + Error.prototype.toString.call(value) + "]";
1505
+ }
1506
+ function formatArray(ctx, value, recurseTimes, visibleKeys, keys) {
1507
+ var output = [];
1508
+ for (var i = 0, l = value.length; i < l; ++i) {
1509
+ if (hasOwnProperty2(value, String(i))) {
1510
+ output.push(formatProperty(
1511
+ ctx,
1512
+ value,
1513
+ recurseTimes,
1514
+ visibleKeys,
1515
+ String(i),
1516
+ true
1517
+ ));
1518
+ } else {
1519
+ output.push("");
1520
+ }
1521
+ }
1522
+ keys.forEach(function(key) {
1523
+ if (!key.match(/^\d+$/)) {
1524
+ output.push(formatProperty(
1525
+ ctx,
1526
+ value,
1527
+ recurseTimes,
1528
+ visibleKeys,
1529
+ key,
1530
+ true
1531
+ ));
1532
+ }
1533
+ });
1534
+ return output;
1535
+ }
1536
+ function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {
1537
+ var name, str, desc;
1538
+ desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };
1539
+ if (desc.get) {
1540
+ if (desc.set) {
1541
+ str = ctx.stylize("[Getter/Setter]", "special");
1542
+ } else {
1543
+ str = ctx.stylize("[Getter]", "special");
1544
+ }
1545
+ } else {
1546
+ if (desc.set) {
1547
+ str = ctx.stylize("[Setter]", "special");
1548
+ }
1549
+ }
1550
+ if (!hasOwnProperty2(visibleKeys, key)) {
1551
+ name = "[" + key + "]";
1552
+ }
1553
+ if (!str) {
1554
+ if (ctx.seen.indexOf(desc.value) < 0) {
1555
+ if (isNull(recurseTimes)) {
1556
+ str = formatValue(ctx, desc.value, null);
1557
+ } else {
1558
+ str = formatValue(ctx, desc.value, recurseTimes - 1);
1559
+ }
1560
+ if (str.indexOf("\n") > -1) {
1561
+ if (array) {
1562
+ str = str.split("\n").map(function(line) {
1563
+ return " " + line;
1564
+ }).join("\n").slice(2);
1565
+ } else {
1566
+ str = "\n" + str.split("\n").map(function(line) {
1567
+ return " " + line;
1568
+ }).join("\n");
1569
+ }
1570
+ }
1571
+ } else {
1572
+ str = ctx.stylize("[Circular]", "special");
1573
+ }
1574
+ }
1575
+ if (isUndefined(name)) {
1576
+ if (array && key.match(/^\d+$/)) {
1577
+ return str;
1578
+ }
1579
+ name = JSON.stringify("" + key);
1580
+ if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
1581
+ name = name.slice(1, -1);
1582
+ name = ctx.stylize(name, "name");
1583
+ } else {
1584
+ name = name.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'");
1585
+ name = ctx.stylize(name, "string");
1586
+ }
1587
+ }
1588
+ return name + ": " + str;
1589
+ }
1590
+ function reduceToSingleString(output, base, braces) {
1591
+ var length = output.reduce(function(prev, cur) {
1592
+ if (cur.indexOf("\n") >= 0) ;
1593
+ return prev + cur.replace(/\u001b\[\d\d?m/g, "").length + 1;
1594
+ }, 0);
1595
+ if (length > 60) {
1596
+ return braces[0] + (base === "" ? "" : base + "\n ") + " " + output.join(",\n ") + " " + braces[1];
1597
+ }
1598
+ return braces[0] + base + " " + output.join(", ") + " " + braces[1];
1599
+ }
1600
+ exports.types = types;
1601
+ function isArray(ar) {
1602
+ return Array.isArray(ar);
1603
+ }
1604
+ exports.isArray = isArray;
1605
+ function isBoolean(arg) {
1606
+ return typeof arg === "boolean";
1607
+ }
1608
+ exports.isBoolean = isBoolean;
1609
+ function isNull(arg) {
1610
+ return arg === null;
1611
+ }
1612
+ exports.isNull = isNull;
1613
+ function isNullOrUndefined(arg) {
1614
+ return arg == null;
1615
+ }
1616
+ exports.isNullOrUndefined = isNullOrUndefined;
1617
+ function isNumber(arg) {
1618
+ return typeof arg === "number";
1619
+ }
1620
+ exports.isNumber = isNumber;
1621
+ function isString(arg) {
1622
+ return typeof arg === "string";
1623
+ }
1624
+ exports.isString = isString;
1625
+ function isSymbol(arg) {
1626
+ return typeof arg === "symbol";
1627
+ }
1628
+ exports.isSymbol = isSymbol;
1629
+ function isUndefined(arg) {
1630
+ return arg === void 0;
1631
+ }
1632
+ exports.isUndefined = isUndefined;
1633
+ function isRegExp(re) {
1634
+ return isObject(re) && objectToString(re) === "[object RegExp]";
1635
+ }
1636
+ exports.isRegExp = isRegExp;
1637
+ exports.types.isRegExp = isRegExp;
1638
+ function isObject(arg) {
1639
+ return typeof arg === "object" && arg !== null;
1640
+ }
1641
+ exports.isObject = isObject;
1642
+ function isDate(d) {
1643
+ return isObject(d) && objectToString(d) === "[object Date]";
1644
+ }
1645
+ exports.isDate = isDate;
1646
+ exports.types.isDate = isDate;
1647
+ function isError(e) {
1648
+ return isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error);
1649
+ }
1650
+ exports.isError = isError;
1651
+ exports.types.isNativeError = isError;
1652
+ function isFunction(arg) {
1653
+ return typeof arg === "function";
1654
+ }
1655
+ exports.isFunction = isFunction;
1656
+ function isPrimitive(arg) {
1657
+ return arg === null || typeof arg === "boolean" || typeof arg === "number" || typeof arg === "string" || typeof arg === "symbol" || // ES6 symbol
1658
+ typeof arg === "undefined";
1659
+ }
1660
+ exports.isPrimitive = isPrimitive;
1661
+ exports.isBuffer = isBufferBrowser;
1662
+ function objectToString(o) {
1663
+ return Object.prototype.toString.call(o);
1664
+ }
1665
+ function pad(n) {
1666
+ return n < 10 ? "0" + n.toString(10) : n.toString(10);
1667
+ }
1668
+ var months = [
1669
+ "Jan",
1670
+ "Feb",
1671
+ "Mar",
1672
+ "Apr",
1673
+ "May",
1674
+ "Jun",
1675
+ "Jul",
1676
+ "Aug",
1677
+ "Sep",
1678
+ "Oct",
1679
+ "Nov",
1680
+ "Dec"
1681
+ ];
1682
+ function timestamp() {
1683
+ var d = /* @__PURE__ */ new Date();
1684
+ var time = [
1685
+ pad(d.getHours()),
1686
+ pad(d.getMinutes()),
1687
+ pad(d.getSeconds())
1688
+ ].join(":");
1689
+ return [d.getDate(), months[d.getMonth()], time].join(" ");
1690
+ }
1691
+ exports.log = function() {
1692
+ console.log("%s - %s", timestamp(), exports.format.apply(exports, arguments));
1693
+ };
1694
+ exports.inherits = inherits_browserExports;
1695
+ exports._extend = function(origin, add) {
1696
+ if (!add || !isObject(add)) return origin;
1697
+ var keys = Object.keys(add);
1698
+ var i = keys.length;
1699
+ while (i--) {
1700
+ origin[keys[i]] = add[keys[i]];
1701
+ }
1702
+ return origin;
1703
+ };
1704
+ function hasOwnProperty2(obj, prop) {
1705
+ return Object.prototype.hasOwnProperty.call(obj, prop);
1706
+ }
1707
+ var kCustomPromisifiedSymbol = typeof Symbol !== "undefined" ? Symbol("util.promisify.custom") : void 0;
1708
+ exports.promisify = function promisify(original) {
1709
+ if (typeof original !== "function")
1710
+ throw new TypeError('The "original" argument must be of type Function');
1711
+ if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {
1712
+ var fn = original[kCustomPromisifiedSymbol];
1713
+ if (typeof fn !== "function") {
1714
+ throw new TypeError('The "util.promisify.custom" argument must be of type Function');
1715
+ }
1716
+ Object.defineProperty(fn, kCustomPromisifiedSymbol, {
1717
+ value: fn,
1718
+ enumerable: false,
1719
+ writable: false,
1720
+ configurable: true
1721
+ });
1722
+ return fn;
1723
+ }
1724
+ function fn() {
1725
+ var promiseResolve, promiseReject;
1726
+ var promise = new Promise(function(resolve, reject) {
1727
+ promiseResolve = resolve;
1728
+ promiseReject = reject;
1729
+ });
1730
+ var args = [];
1731
+ for (var i = 0; i < arguments.length; i++) {
1732
+ args.push(arguments[i]);
1733
+ }
1734
+ args.push(function(err, value) {
1735
+ if (err) {
1736
+ promiseReject(err);
1737
+ } else {
1738
+ promiseResolve(value);
1739
+ }
1740
+ });
1741
+ try {
1742
+ original.apply(this, args);
1743
+ } catch (err) {
1744
+ promiseReject(err);
1745
+ }
1746
+ return promise;
1747
+ }
1748
+ Object.setPrototypeOf(fn, Object.getPrototypeOf(original));
1749
+ if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {
1750
+ value: fn,
1751
+ enumerable: false,
1752
+ writable: false,
1753
+ configurable: true
1754
+ });
1755
+ return Object.defineProperties(
1756
+ fn,
1757
+ getOwnPropertyDescriptors(original)
1758
+ );
1759
+ };
1760
+ exports.promisify.custom = kCustomPromisifiedSymbol;
1761
+ function callbackifyOnRejected(reason, cb) {
1762
+ if (!reason) {
1763
+ var newReason = new Error("Promise was rejected with a falsy value");
1764
+ newReason.reason = reason;
1765
+ reason = newReason;
1766
+ }
1767
+ return cb(reason);
1768
+ }
1769
+ function callbackify(original) {
1770
+ if (typeof original !== "function") {
1771
+ throw new TypeError('The "original" argument must be of type Function');
1772
+ }
1773
+ function callbackified() {
1774
+ var args = [];
1775
+ for (var i = 0; i < arguments.length; i++) {
1776
+ args.push(arguments[i]);
1777
+ }
1778
+ var maybeCb = args.pop();
1779
+ if (typeof maybeCb !== "function") {
1780
+ throw new TypeError("The last argument must be of type Function");
1781
+ }
1782
+ var self = this;
1783
+ var cb = function() {
1784
+ return maybeCb.apply(self, arguments);
1785
+ };
1786
+ original.apply(this, args).then(
1787
+ function(ret) {
1788
+ define_process_default.nextTick(cb.bind(null, null, ret));
1789
+ },
1790
+ function(rej) {
1791
+ define_process_default.nextTick(callbackifyOnRejected.bind(null, rej, cb));
1792
+ }
1793
+ );
1794
+ }
1795
+ Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));
1796
+ Object.defineProperties(
1797
+ callbackified,
1798
+ getOwnPropertyDescriptors(original)
1799
+ );
1800
+ return callbackified;
1801
+ }
1802
+ exports.callbackify = callbackify;
1803
+ })(util$1);
1804
+ const util = /* @__PURE__ */ _mergeNamespaces({
1805
+ __proto__: null
1806
+ }, [util$1]);
1807
+ export {
1808
+ util$1 as a,
1809
+ inherits_browserExports as i,
1810
+ util as u
1811
+ };