@harbour-enterprises/superdoc 1.0.0-alpha.65 → 1.0.0-alpha.67

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.
@@ -1,2901 +0,0 @@
1
- import { c as G, a as Ft, d as br, p as U, B as ue, g as vr } from "./index-Cf7MTA2B.js";
2
- import { s as _r, c as qt, g as mr, a as wr, u as Sr } from "./url-Bfw08-P9.js";
3
- function Er(e, t) {
4
- for (var r = 0; r < t.length; r++) {
5
- const o = t[r];
6
- if (typeof o != "string" && !Array.isArray(o)) {
7
- for (const a in o)
8
- if (a !== "default" && !(a in e)) {
9
- const h = Object.getOwnPropertyDescriptor(o, a);
10
- h && Object.defineProperty(e, a, h.get ? h : {
11
- enumerable: !0,
12
- get: () => o[a]
13
- });
14
- }
15
- }
16
- }
17
- return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
18
- }
19
- var ot = {}, Wt = { exports: {} }, ft = {};
20
- (function(e) {
21
- e.fetch = a(G.fetch) && a(G.ReadableStream), e.writableStream = a(G.WritableStream), e.abortController = a(G.AbortController);
22
- var t;
23
- function r() {
24
- if (t !== void 0) return t;
25
- if (G.XMLHttpRequest) {
26
- t = new G.XMLHttpRequest();
27
- try {
28
- t.open("GET", G.XDomainRequest ? "/" : "https://example.com");
29
- } catch {
30
- t = null;
31
- }
32
- } else
33
- t = null;
34
- return t;
35
- }
36
- function o(h) {
37
- var c = r();
38
- if (!c) return !1;
39
- try {
40
- return c.responseType = h, c.responseType === h;
41
- } catch {
42
- }
43
- return !1;
44
- }
45
- e.arraybuffer = e.fetch || o("arraybuffer"), e.msstream = !e.fetch && o("ms-stream"), e.mozchunkedarraybuffer = !e.fetch && o("moz-chunked-arraybuffer"), e.overrideMimeType = e.fetch || (r() ? a(r().overrideMimeType) : !1);
46
- function a(h) {
47
- return typeof h == "function";
48
- }
49
- t = null;
50
- })(ft);
51
- var Ze = { exports: {} };
52
- typeof Object.create == "function" ? Ze.exports = function(t, r) {
53
- r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
54
- constructor: {
55
- value: t,
56
- enumerable: !1,
57
- writable: !0,
58
- configurable: !0
59
- }
60
- }));
61
- } : Ze.exports = function(t, r) {
62
- if (r) {
63
- t.super_ = r;
64
- var o = function() {
65
- };
66
- o.prototype = r.prototype, t.prototype = new o(), t.prototype.constructor = t;
67
- }
68
- };
69
- var se = Ze.exports, Le = {}, Qe = { exports: {} }, st = { exports: {} }, ye = typeof Reflect == "object" ? Reflect : null, vt = ye && typeof ye.apply == "function" ? ye.apply : function(t, r, o) {
70
- return Function.prototype.apply.call(t, r, o);
71
- }, Se;
72
- ye && typeof ye.ownKeys == "function" ? Se = ye.ownKeys : Object.getOwnPropertySymbols ? Se = function(t) {
73
- return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t));
74
- } : Se = function(t) {
75
- return Object.getOwnPropertyNames(t);
76
- };
77
- function Rr(e) {
78
- console && console.warn && console.warn(e);
79
- }
80
- var Ht = Number.isNaN || function(t) {
81
- return t !== t;
82
- };
83
- function H() {
84
- H.init.call(this);
85
- }
86
- st.exports = H;
87
- st.exports.once = Mr;
88
- H.EventEmitter = H;
89
- H.prototype._events = void 0;
90
- H.prototype._eventsCount = 0;
91
- H.prototype._maxListeners = void 0;
92
- var _t = 10;
93
- function je(e) {
94
- if (typeof e != "function")
95
- throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof e);
96
- }
97
- Object.defineProperty(H, "defaultMaxListeners", {
98
- enumerable: !0,
99
- get: function() {
100
- return _t;
101
- },
102
- set: function(e) {
103
- if (typeof e != "number" || e < 0 || Ht(e))
104
- throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + ".");
105
- _t = e;
106
- }
107
- });
108
- H.init = function() {
109
- (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) && (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
110
- };
111
- H.prototype.setMaxListeners = function(t) {
112
- if (typeof t != "number" || t < 0 || Ht(t))
113
- throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + t + ".");
114
- return this._maxListeners = t, this;
115
- };
116
- function $t(e) {
117
- return e._maxListeners === void 0 ? H.defaultMaxListeners : e._maxListeners;
118
- }
119
- H.prototype.getMaxListeners = function() {
120
- return $t(this);
121
- };
122
- H.prototype.emit = function(t) {
123
- for (var r = [], o = 1; o < arguments.length; o++) r.push(arguments[o]);
124
- var a = t === "error", h = this._events;
125
- if (h !== void 0)
126
- a = a && h.error === void 0;
127
- else if (!a)
128
- return !1;
129
- if (a) {
130
- var c;
131
- if (r.length > 0 && (c = r[0]), c instanceof Error)
132
- throw c;
133
- var b = new Error("Unhandled error." + (c ? " (" + c.message + ")" : ""));
134
- throw b.context = c, b;
135
- }
136
- var y = h[t];
137
- if (y === void 0)
138
- return !1;
139
- if (typeof y == "function")
140
- vt(y, this, r);
141
- else
142
- for (var M = y.length, N = Kt(y, M), o = 0; o < M; ++o)
143
- vt(N[o], this, r);
144
- return !0;
145
- };
146
- function xt(e, t, r, o) {
147
- var a, h, c;
148
- if (je(r), h = e._events, h === void 0 ? (h = e._events = /* @__PURE__ */ Object.create(null), e._eventsCount = 0) : (h.newListener !== void 0 && (e.emit(
149
- "newListener",
150
- t,
151
- r.listener ? r.listener : r
152
- ), h = e._events), c = h[t]), c === void 0)
153
- c = h[t] = r, ++e._eventsCount;
154
- else if (typeof c == "function" ? c = h[t] = o ? [r, c] : [c, r] : o ? c.unshift(r) : c.push(r), a = $t(e), a > 0 && c.length > a && !c.warned) {
155
- c.warned = !0;
156
- var b = new Error("Possible EventEmitter memory leak detected. " + c.length + " " + String(t) + " listeners added. Use emitter.setMaxListeners() to increase limit");
157
- b.name = "MaxListenersExceededWarning", b.emitter = e, b.type = t, b.count = c.length, Rr(b);
158
- }
159
- return e;
160
- }
161
- H.prototype.addListener = function(t, r) {
162
- return xt(this, t, r, !1);
163
- };
164
- H.prototype.on = H.prototype.addListener;
165
- H.prototype.prependListener = function(t, r) {
166
- return xt(this, t, r, !0);
167
- };
168
- function Tr() {
169
- if (!this.fired)
170
- return this.target.removeListener(this.type, this.wrapFn), this.fired = !0, arguments.length === 0 ? this.listener.call(this.target) : this.listener.apply(this.target, arguments);
171
- }
172
- function Gt(e, t, r) {
173
- var o = { fired: !1, wrapFn: void 0, target: e, type: t, listener: r }, a = Tr.bind(o);
174
- return a.listener = r, o.wrapFn = a, a;
175
- }
176
- H.prototype.once = function(t, r) {
177
- return je(r), this.on(t, Gt(this, t, r)), this;
178
- };
179
- H.prototype.prependOnceListener = function(t, r) {
180
- return je(r), this.prependListener(t, Gt(this, t, r)), this;
181
- };
182
- H.prototype.removeListener = function(t, r) {
183
- var o, a, h, c, b;
184
- if (je(r), a = this._events, a === void 0)
185
- return this;
186
- if (o = a[t], o === void 0)
187
- return this;
188
- if (o === r || o.listener === r)
189
- --this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : (delete a[t], a.removeListener && this.emit("removeListener", t, o.listener || r));
190
- else if (typeof o != "function") {
191
- for (h = -1, c = o.length - 1; c >= 0; c--)
192
- if (o[c] === r || o[c].listener === r) {
193
- b = o[c].listener, h = c;
194
- break;
195
- }
196
- if (h < 0)
197
- return this;
198
- h === 0 ? o.shift() : Ar(o, h), o.length === 1 && (a[t] = o[0]), a.removeListener !== void 0 && this.emit("removeListener", t, b || r);
199
- }
200
- return this;
201
- };
202
- H.prototype.off = H.prototype.removeListener;
203
- H.prototype.removeAllListeners = function(t) {
204
- var r, o, a;
205
- if (o = this._events, o === void 0)
206
- return this;
207
- if (o.removeListener === void 0)
208
- return arguments.length === 0 ? (this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0) : o[t] !== void 0 && (--this._eventsCount === 0 ? this._events = /* @__PURE__ */ Object.create(null) : delete o[t]), this;
209
- if (arguments.length === 0) {
210
- var h = Object.keys(o), c;
211
- for (a = 0; a < h.length; ++a)
212
- c = h[a], c !== "removeListener" && this.removeAllListeners(c);
213
- return this.removeAllListeners("removeListener"), this._events = /* @__PURE__ */ Object.create(null), this._eventsCount = 0, this;
214
- }
215
- if (r = o[t], typeof r == "function")
216
- this.removeListener(t, r);
217
- else if (r !== void 0)
218
- for (a = r.length - 1; a >= 0; a--)
219
- this.removeListener(t, r[a]);
220
- return this;
221
- };
222
- function Vt(e, t, r) {
223
- var o = e._events;
224
- if (o === void 0)
225
- return [];
226
- var a = o[t];
227
- return a === void 0 ? [] : typeof a == "function" ? r ? [a.listener || a] : [a] : r ? Or(a) : Kt(a, a.length);
228
- }
229
- H.prototype.listeners = function(t) {
230
- return Vt(this, t, !0);
231
- };
232
- H.prototype.rawListeners = function(t) {
233
- return Vt(this, t, !1);
234
- };
235
- H.listenerCount = function(e, t) {
236
- return typeof e.listenerCount == "function" ? e.listenerCount(t) : zt.call(e, t);
237
- };
238
- H.prototype.listenerCount = zt;
239
- function zt(e) {
240
- var t = this._events;
241
- if (t !== void 0) {
242
- var r = t[e];
243
- if (typeof r == "function")
244
- return 1;
245
- if (r !== void 0)
246
- return r.length;
247
- }
248
- return 0;
249
- }
250
- H.prototype.eventNames = function() {
251
- return this._eventsCount > 0 ? Se(this._events) : [];
252
- };
253
- function Kt(e, t) {
254
- for (var r = new Array(t), o = 0; o < t; ++o)
255
- r[o] = e[o];
256
- return r;
257
- }
258
- function Ar(e, t) {
259
- for (; t + 1 < e.length; t++)
260
- e[t] = e[t + 1];
261
- e.pop();
262
- }
263
- function Or(e) {
264
- for (var t = new Array(e.length), r = 0; r < t.length; ++r)
265
- t[r] = e[r].listener || e[r];
266
- return t;
267
- }
268
- function Mr(e, t) {
269
- return new Promise(function(r, o) {
270
- function a(c) {
271
- e.removeListener(t, h), o(c);
272
- }
273
- function h() {
274
- typeof e.removeListener == "function" && e.removeListener("error", a), r([].slice.call(arguments));
275
- }
276
- Yt(e, t, h, { once: !0 }), t !== "error" && Lr(e, a, { once: !0 });
277
- });
278
- }
279
- function Lr(e, t, r) {
280
- typeof e.on == "function" && Yt(e, "error", t, r);
281
- }
282
- function Yt(e, t, r, o) {
283
- if (typeof e.on == "function")
284
- o.once ? e.once(t, r) : e.on(t, r);
285
- else if (typeof e.addEventListener == "function")
286
- e.addEventListener(t, function a(h) {
287
- o.once && e.removeEventListener(t, a), r(h);
288
- });
289
- else
290
- throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof e);
291
- }
292
- var Xt = st.exports, Jt = Xt.EventEmitter;
293
- const Ce = /* @__PURE__ */ Ft(br);
294
- var ut = {}, Zt = {}, jr = _r, lt = function() {
295
- return jr() && !!Symbol.toStringTag;
296
- }, Cr = lt(), Pr = qt, et = Pr("Object.prototype.toString"), Pe = function(t) {
297
- return Cr && t && typeof t == "object" && Symbol.toStringTag in t ? !1 : et(t) === "[object Arguments]";
298
- }, Qt = function(t) {
299
- return Pe(t) ? !0 : t !== null && typeof t == "object" && typeof t.length == "number" && t.length >= 0 && et(t) !== "[object Array]" && et(t.callee) === "[object Function]";
300
- }, Nr = function() {
301
- return Pe(arguments);
302
- }();
303
- Pe.isLegacyArguments = Qt;
304
- var Dr = Nr ? Pe : Qt, Br = Object.prototype.toString, Ir = Function.prototype.toString, kr = /^\s*(?:function)?\*/, er = lt(), Ue = Object.getPrototypeOf, Ur = function() {
305
- if (!er)
306
- return !1;
307
- try {
308
- return Function("return function*() {}")();
309
- } catch {
310
- }
311
- }, Fe, Fr = function(t) {
312
- if (typeof t != "function")
313
- return !1;
314
- if (kr.test(Ir.call(t)))
315
- return !0;
316
- if (!er) {
317
- var r = Br.call(t);
318
- return r === "[object GeneratorFunction]";
319
- }
320
- if (!Ue)
321
- return !1;
322
- if (typeof Fe > "u") {
323
- var o = Ur();
324
- Fe = o ? Ue(o) : !1;
325
- }
326
- return Ue(t) === Fe;
327
- }, tr = Function.prototype.toString, pe = typeof Reflect == "object" && Reflect !== null && Reflect.apply, tt, Ee;
328
- if (typeof pe == "function" && typeof Object.defineProperty == "function")
329
- try {
330
- tt = Object.defineProperty({}, "length", {
331
- get: function() {
332
- throw Ee;
333
- }
334
- }), Ee = {}, pe(function() {
335
- throw 42;
336
- }, null, tt);
337
- } catch (e) {
338
- e !== Ee && (pe = null);
339
- }
340
- else
341
- pe = null;
342
- var qr = /^\s*class\b/, rt = function(t) {
343
- try {
344
- var r = tr.call(t);
345
- return qr.test(r);
346
- } catch {
347
- return !1;
348
- }
349
- }, qe = function(t) {
350
- try {
351
- return rt(t) ? !1 : (tr.call(t), !0);
352
- } catch {
353
- return !1;
354
- }
355
- }, Re = Object.prototype.toString, Wr = "[object Object]", Hr = "[object Function]", $r = "[object GeneratorFunction]", xr = "[object HTMLAllCollection]", Gr = "[object HTML document.all class]", Vr = "[object HTMLCollection]", zr = typeof Symbol == "function" && !!Symbol.toStringTag, Kr = !(0 in [,]), nt = function() {
356
- return !1;
357
- };
358
- if (typeof document == "object") {
359
- var Yr = document.all;
360
- Re.call(Yr) === Re.call(document.all) && (nt = function(t) {
361
- if ((Kr || !t) && (typeof t > "u" || typeof t == "object"))
362
- try {
363
- var r = Re.call(t);
364
- return (r === xr || r === Gr || r === Vr || r === Wr) && t("") == null;
365
- } catch {
366
- }
367
- return !1;
368
- });
369
- }
370
- var Xr = pe ? function(t) {
371
- if (nt(t))
372
- return !0;
373
- if (!t || typeof t != "function" && typeof t != "object")
374
- return !1;
375
- try {
376
- pe(t, null, tt);
377
- } catch (r) {
378
- if (r !== Ee)
379
- return !1;
380
- }
381
- return !rt(t) && qe(t);
382
- } : function(t) {
383
- if (nt(t))
384
- return !0;
385
- if (!t || typeof t != "function" && typeof t != "object")
386
- return !1;
387
- if (zr)
388
- return qe(t);
389
- if (rt(t))
390
- return !1;
391
- var r = Re.call(t);
392
- return r !== Hr && r !== $r && !/^\[object HTML/.test(r) ? !1 : qe(t);
393
- }, Jr = Xr, Zr = Object.prototype.toString, rr = Object.prototype.hasOwnProperty, Qr = function(t, r, o) {
394
- for (var a = 0, h = t.length; a < h; a++)
395
- rr.call(t, a) && (o == null ? r(t[a], a, t) : r.call(o, t[a], a, t));
396
- }, en = function(t, r, o) {
397
- for (var a = 0, h = t.length; a < h; a++)
398
- o == null ? r(t.charAt(a), a, t) : r.call(o, t.charAt(a), a, t);
399
- }, tn = function(t, r, o) {
400
- for (var a in t)
401
- rr.call(t, a) && (o == null ? r(t[a], a, t) : r.call(o, t[a], a, t));
402
- }, rn = function(t, r, o) {
403
- if (!Jr(r))
404
- throw new TypeError("iterator must be a function");
405
- var a;
406
- arguments.length >= 3 && (a = o), Zr.call(t) === "[object Array]" ? Qr(t, r, a) : typeof t == "string" ? en(t, r, a) : tn(t, r, a);
407
- }, nn = rn, an = [
408
- "Float32Array",
409
- "Float64Array",
410
- "Int8Array",
411
- "Int16Array",
412
- "Int32Array",
413
- "Uint8Array",
414
- "Uint8ClampedArray",
415
- "Uint16Array",
416
- "Uint32Array",
417
- "BigInt64Array",
418
- "BigUint64Array"
419
- ], We = an, on = typeof globalThis > "u" ? G : globalThis, fn = function() {
420
- for (var t = [], r = 0; r < We.length; r++)
421
- typeof on[We[r]] == "function" && (t[t.length] = We[r]);
422
- return t;
423
- }, Oe = nn, sn = fn, mt = wr, ct = qt, Te = mr, un = ct("Object.prototype.toString"), nr = lt(), wt = typeof globalThis > "u" ? G : globalThis, it = sn(), dt = ct("String.prototype.slice"), He = Object.getPrototypeOf, ln = ct("Array.prototype.indexOf", !0) || function(t, r) {
424
- for (var o = 0; o < t.length; o += 1)
425
- if (t[o] === r)
426
- return o;
427
- return -1;
428
- }, Me = { __proto__: null };
429
- nr && Te && He ? Oe(it, function(e) {
430
- var t = new wt[e]();
431
- if (Symbol.toStringTag in t) {
432
- var r = He(t), o = Te(r, Symbol.toStringTag);
433
- if (!o) {
434
- var a = He(r);
435
- o = Te(a, Symbol.toStringTag);
436
- }
437
- Me["$" + e] = mt(o.get);
438
- }
439
- }) : Oe(it, function(e) {
440
- var t = new wt[e](), r = t.slice || t.set;
441
- r && (Me["$" + e] = mt(r));
442
- });
443
- var cn = function(t) {
444
- var r = !1;
445
- return Oe(
446
- // eslint-disable-next-line no-extra-parens
447
- /** @type {Record<`\$${TypedArrayName}`, Getter>} */
448
- /** @type {any} */
449
- Me,
450
- /** @type {(getter: Getter, name: `\$${import('.').TypedArrayName}`) => void} */
451
- function(o, a) {
452
- if (!r)
453
- try {
454
- "$" + o(t) === a && (r = dt(a, 1));
455
- } catch {
456
- }
457
- }
458
- ), r;
459
- }, dn = function(t) {
460
- var r = !1;
461
- return Oe(
462
- // eslint-disable-next-line no-extra-parens
463
- /** @type {Record<`\$${TypedArrayName}`, Getter>} */
464
- /** @type {any} */
465
- Me,
466
- /** @type {(getter: typeof cache, name: `\$${import('.').TypedArrayName}`) => void} */
467
- function(o, a) {
468
- if (!r)
469
- try {
470
- o(t), r = dt(a, 1);
471
- } catch {
472
- }
473
- }
474
- ), r;
475
- }, ir = function(t) {
476
- if (!t || typeof t != "object")
477
- return !1;
478
- if (!nr) {
479
- var r = dt(un(t), 8, -1);
480
- return ln(it, r) > -1 ? r : r !== "Object" ? !1 : dn(t);
481
- }
482
- return Te ? cn(t) : null;
483
- }, hn = ir, pn = function(t) {
484
- return !!hn(t);
485
- };
486
- (function(e) {
487
- var t = Dr, r = Fr, o = ir, a = pn;
488
- function h(g) {
489
- return g.call.bind(g);
490
- }
491
- var c = typeof BigInt < "u", b = typeof Symbol < "u", y = h(Object.prototype.toString), M = h(Number.prototype.valueOf), N = h(String.prototype.valueOf), A = h(Boolean.prototype.valueOf);
492
- if (c)
493
- var I = h(BigInt.prototype.valueOf);
494
- if (b)
495
- var x = h(Symbol.prototype.valueOf);
496
- function L(g, _e) {
497
- if (typeof g != "object")
498
- return !1;
499
- try {
500
- return _e(g), !0;
501
- } catch {
502
- return !1;
503
- }
504
- }
505
- e.isArgumentsObject = t, e.isGeneratorFunction = r, e.isTypedArray = a;
506
- function C(g) {
507
- return typeof Promise < "u" && g instanceof Promise || g !== null && typeof g == "object" && typeof g.then == "function" && typeof g.catch == "function";
508
- }
509
- e.isPromise = C;
510
- function O(g) {
511
- return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? ArrayBuffer.isView(g) : a(g) || p(g);
512
- }
513
- e.isArrayBufferView = O;
514
- function u(g) {
515
- return o(g) === "Uint8Array";
516
- }
517
- e.isUint8Array = u;
518
- function _(g) {
519
- return o(g) === "Uint8ClampedArray";
520
- }
521
- e.isUint8ClampedArray = _;
522
- function S(g) {
523
- return o(g) === "Uint16Array";
524
- }
525
- e.isUint16Array = S;
526
- function E(g) {
527
- return o(g) === "Uint32Array";
528
- }
529
- e.isUint32Array = E;
530
- function T(g) {
531
- return o(g) === "Int8Array";
532
- }
533
- e.isInt8Array = T;
534
- function B(g) {
535
- return o(g) === "Int16Array";
536
- }
537
- e.isInt16Array = B;
538
- function q(g) {
539
- return o(g) === "Int32Array";
540
- }
541
- e.isInt32Array = q;
542
- function k(g) {
543
- return o(g) === "Float32Array";
544
- }
545
- e.isFloat32Array = k;
546
- function P(g) {
547
- return o(g) === "Float64Array";
548
- }
549
- e.isFloat64Array = P;
550
- function V(g) {
551
- return o(g) === "BigInt64Array";
552
- }
553
- e.isBigInt64Array = V;
554
- function Y(g) {
555
- return o(g) === "BigUint64Array";
556
- }
557
- e.isBigUint64Array = Y;
558
- function X(g) {
559
- return y(g) === "[object Map]";
560
- }
561
- X.working = typeof Map < "u" && X(/* @__PURE__ */ new Map());
562
- function re(g) {
563
- return typeof Map > "u" ? !1 : X.working ? X(g) : g instanceof Map;
564
- }
565
- e.isMap = re;
566
- function J(g) {
567
- return y(g) === "[object Set]";
568
- }
569
- J.working = typeof Set < "u" && J(/* @__PURE__ */ new Set());
570
- function ne(g) {
571
- return typeof Set > "u" ? !1 : J.working ? J(g) : g instanceof Set;
572
- }
573
- e.isSet = ne;
574
- function ie(g) {
575
- return y(g) === "[object WeakMap]";
576
- }
577
- ie.working = typeof WeakMap < "u" && ie(/* @__PURE__ */ new WeakMap());
578
- function Q(g) {
579
- return typeof WeakMap > "u" ? !1 : ie.working ? ie(g) : g instanceof WeakMap;
580
- }
581
- e.isWeakMap = Q;
582
- function ee(g) {
583
- return y(g) === "[object WeakSet]";
584
- }
585
- ee.working = typeof WeakSet < "u" && ee(/* @__PURE__ */ new WeakSet());
586
- function z(g) {
587
- return ee(g);
588
- }
589
- e.isWeakSet = z;
590
- function te(g) {
591
- return y(g) === "[object ArrayBuffer]";
592
- }
593
- te.working = typeof ArrayBuffer < "u" && te(new ArrayBuffer());
594
- function oe(g) {
595
- return typeof ArrayBuffer > "u" ? !1 : te.working ? te(g) : g instanceof ArrayBuffer;
596
- }
597
- e.isArrayBuffer = oe;
598
- function l(g) {
599
- return y(g) === "[object DataView]";
600
- }
601
- l.working = typeof ArrayBuffer < "u" && typeof DataView < "u" && l(new DataView(new ArrayBuffer(1), 0, 1));
602
- function p(g) {
603
- return typeof DataView > "u" ? !1 : l.working ? l(g) : g instanceof DataView;
604
- }
605
- e.isDataView = p;
606
- var m = typeof SharedArrayBuffer < "u" ? SharedArrayBuffer : void 0;
607
- function D(g) {
608
- return y(g) === "[object SharedArrayBuffer]";
609
- }
610
- function s(g) {
611
- return typeof m > "u" ? !1 : (typeof D.working > "u" && (D.working = D(new m())), D.working ? D(g) : g instanceof m);
612
- }
613
- e.isSharedArrayBuffer = s;
614
- function f(g) {
615
- return y(g) === "[object AsyncFunction]";
616
- }
617
- e.isAsyncFunction = f;
618
- function d(g) {
619
- return y(g) === "[object Map Iterator]";
620
- }
621
- e.isMapIterator = d;
622
- function w(g) {
623
- return y(g) === "[object Set Iterator]";
624
- }
625
- e.isSetIterator = w;
626
- function j(g) {
627
- return y(g) === "[object Generator]";
628
- }
629
- e.isGeneratorObject = j;
630
- function n(g) {
631
- return y(g) === "[object WebAssembly.Module]";
632
- }
633
- e.isWebAssemblyCompiledModule = n;
634
- function i(g) {
635
- return L(g, M);
636
- }
637
- e.isNumberObject = i;
638
- function v(g) {
639
- return L(g, N);
640
- }
641
- e.isStringObject = v;
642
- function R(g) {
643
- return L(g, A);
644
- }
645
- e.isBooleanObject = R;
646
- function $(g) {
647
- return c && L(g, I);
648
- }
649
- e.isBigIntObject = $;
650
- function F(g) {
651
- return b && L(g, x);
652
- }
653
- e.isSymbolObject = F;
654
- function W(g) {
655
- return i(g) || v(g) || R(g) || $(g) || F(g);
656
- }
657
- e.isBoxedPrimitive = W;
658
- function fe(g) {
659
- return typeof Uint8Array < "u" && (oe(g) || s(g));
660
- }
661
- e.isAnyArrayBuffer = fe, ["isProxy", "isExternal", "isModuleNamespaceObject"].forEach(function(g) {
662
- Object.defineProperty(e, g, {
663
- enumerable: !1,
664
- value: function() {
665
- throw new Error(g + " is not supported in userland");
666
- }
667
- });
668
- });
669
- })(Zt);
670
- var yn = function(t) {
671
- return t && typeof t == "object" && typeof t.copy == "function" && typeof t.fill == "function" && typeof t.readUInt8 == "function";
672
- };
673
- (function(e) {
674
- var t = Object.getOwnPropertyDescriptors || function(p) {
675
- for (var m = Object.keys(p), D = {}, s = 0; s < m.length; s++)
676
- D[m[s]] = Object.getOwnPropertyDescriptor(p, m[s]);
677
- return D;
678
- }, r = /%[sdj%]/g;
679
- e.format = function(l) {
680
- if (!T(l)) {
681
- for (var p = [], m = 0; m < arguments.length; m++)
682
- p.push(c(arguments[m]));
683
- return p.join(" ");
684
- }
685
- for (var m = 1, D = arguments, s = D.length, f = String(l).replace(r, function(w) {
686
- if (w === "%%") return "%";
687
- if (m >= s) return w;
688
- switch (w) {
689
- case "%s":
690
- return String(D[m++]);
691
- case "%d":
692
- return Number(D[m++]);
693
- case "%j":
694
- try {
695
- return JSON.stringify(D[m++]);
696
- } catch {
697
- return "[Circular]";
698
- }
699
- default:
700
- return w;
701
- }
702
- }), d = D[m]; m < s; d = D[++m])
703
- _(d) || !P(d) ? f += " " + d : f += " " + c(d);
704
- return f;
705
- }, e.deprecate = function(l, p) {
706
- if (typeof U < "u" && U.noDeprecation === !0)
707
- return l;
708
- if (typeof U > "u")
709
- return function() {
710
- return e.deprecate(l, p).apply(this, arguments);
711
- };
712
- var m = !1;
713
- function D() {
714
- if (!m) {
715
- if (U.throwDeprecation)
716
- throw new Error(p);
717
- U.traceDeprecation ? console.trace(p) : console.error(p), m = !0;
718
- }
719
- return l.apply(this, arguments);
720
- }
721
- return D;
722
- };
723
- var o = {}, a = /^$/;
724
- if (U.env.NODE_DEBUG) {
725
- var h = U.env.NODE_DEBUG;
726
- h = h.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), a = new RegExp("^" + h + "$", "i");
727
- }
728
- e.debuglog = function(l) {
729
- if (l = l.toUpperCase(), !o[l])
730
- if (a.test(l)) {
731
- var p = U.pid;
732
- o[l] = function() {
733
- var m = e.format.apply(e, arguments);
734
- console.error("%s %d: %s", l, p, m);
735
- };
736
- } else
737
- o[l] = function() {
738
- };
739
- return o[l];
740
- };
741
- function c(l, p) {
742
- var m = {
743
- seen: [],
744
- stylize: y
745
- };
746
- return arguments.length >= 3 && (m.depth = arguments[2]), arguments.length >= 4 && (m.colors = arguments[3]), u(p) ? m.showHidden = p : p && e._extend(m, p), q(m.showHidden) && (m.showHidden = !1), q(m.depth) && (m.depth = 2), q(m.colors) && (m.colors = !1), q(m.customInspect) && (m.customInspect = !0), m.colors && (m.stylize = b), N(m, l, m.depth);
747
- }
748
- e.inspect = c, c.colors = {
749
- bold: [1, 22],
750
- italic: [3, 23],
751
- underline: [4, 24],
752
- inverse: [7, 27],
753
- white: [37, 39],
754
- grey: [90, 39],
755
- black: [30, 39],
756
- blue: [34, 39],
757
- cyan: [36, 39],
758
- green: [32, 39],
759
- magenta: [35, 39],
760
- red: [31, 39],
761
- yellow: [33, 39]
762
- }, c.styles = {
763
- special: "cyan",
764
- number: "yellow",
765
- boolean: "yellow",
766
- undefined: "grey",
767
- null: "bold",
768
- string: "green",
769
- date: "magenta",
770
- // "name": intentionally not styling
771
- regexp: "red"
772
- };
773
- function b(l, p) {
774
- var m = c.styles[p];
775
- return m ? "\x1B[" + c.colors[m][0] + "m" + l + "\x1B[" + c.colors[m][1] + "m" : l;
776
- }
777
- function y(l, p) {
778
- return l;
779
- }
780
- function M(l) {
781
- var p = {};
782
- return l.forEach(function(m, D) {
783
- p[m] = !0;
784
- }), p;
785
- }
786
- function N(l, p, m) {
787
- if (l.customInspect && p && X(p.inspect) && // Filter out the util module, it's inspect function is special
788
- p.inspect !== e.inspect && // Also filter out any prototype objects using the circular check.
789
- !(p.constructor && p.constructor.prototype === p)) {
790
- var D = p.inspect(m, l);
791
- return T(D) || (D = N(l, D, m)), D;
792
- }
793
- var s = A(l, p);
794
- if (s)
795
- return s;
796
- var f = Object.keys(p), d = M(f);
797
- if (l.showHidden && (f = Object.getOwnPropertyNames(p)), Y(p) && (f.indexOf("message") >= 0 || f.indexOf("description") >= 0))
798
- return I(p);
799
- if (f.length === 0) {
800
- if (X(p)) {
801
- var w = p.name ? ": " + p.name : "";
802
- return l.stylize("[Function" + w + "]", "special");
803
- }
804
- if (k(p))
805
- return l.stylize(RegExp.prototype.toString.call(p), "regexp");
806
- if (V(p))
807
- return l.stylize(Date.prototype.toString.call(p), "date");
808
- if (Y(p))
809
- return I(p);
810
- }
811
- var j = "", n = !1, i = ["{", "}"];
812
- if (O(p) && (n = !0, i = ["[", "]"]), X(p)) {
813
- var v = p.name ? ": " + p.name : "";
814
- j = " [Function" + v + "]";
815
- }
816
- if (k(p) && (j = " " + RegExp.prototype.toString.call(p)), V(p) && (j = " " + Date.prototype.toUTCString.call(p)), Y(p) && (j = " " + I(p)), f.length === 0 && (!n || p.length == 0))
817
- return i[0] + j + i[1];
818
- if (m < 0)
819
- return k(p) ? l.stylize(RegExp.prototype.toString.call(p), "regexp") : l.stylize("[Object]", "special");
820
- l.seen.push(p);
821
- var R;
822
- return n ? R = x(l, p, m, d, f) : R = f.map(function($) {
823
- return L(l, p, m, d, $, n);
824
- }), l.seen.pop(), C(R, j, i);
825
- }
826
- function A(l, p) {
827
- if (q(p))
828
- return l.stylize("undefined", "undefined");
829
- if (T(p)) {
830
- var m = "'" + JSON.stringify(p).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
831
- return l.stylize(m, "string");
832
- }
833
- if (E(p))
834
- return l.stylize("" + p, "number");
835
- if (u(p))
836
- return l.stylize("" + p, "boolean");
837
- if (_(p))
838
- return l.stylize("null", "null");
839
- }
840
- function I(l) {
841
- return "[" + Error.prototype.toString.call(l) + "]";
842
- }
843
- function x(l, p, m, D, s) {
844
- for (var f = [], d = 0, w = p.length; d < w; ++d)
845
- ee(p, String(d)) ? f.push(L(
846
- l,
847
- p,
848
- m,
849
- D,
850
- String(d),
851
- !0
852
- )) : f.push("");
853
- return s.forEach(function(j) {
854
- j.match(/^\d+$/) || f.push(L(
855
- l,
856
- p,
857
- m,
858
- D,
859
- j,
860
- !0
861
- ));
862
- }), f;
863
- }
864
- function L(l, p, m, D, s, f) {
865
- var d, w, j;
866
- if (j = Object.getOwnPropertyDescriptor(p, s) || { value: p[s] }, j.get ? j.set ? w = l.stylize("[Getter/Setter]", "special") : w = l.stylize("[Getter]", "special") : j.set && (w = l.stylize("[Setter]", "special")), ee(D, s) || (d = "[" + s + "]"), w || (l.seen.indexOf(j.value) < 0 ? (_(m) ? w = N(l, j.value, null) : w = N(l, j.value, m - 1), w.indexOf(`
867
- `) > -1 && (f ? w = w.split(`
868
- `).map(function(n) {
869
- return " " + n;
870
- }).join(`
871
- `).slice(2) : w = `
872
- ` + w.split(`
873
- `).map(function(n) {
874
- return " " + n;
875
- }).join(`
876
- `))) : w = l.stylize("[Circular]", "special")), q(d)) {
877
- if (f && s.match(/^\d+$/))
878
- return w;
879
- d = JSON.stringify("" + s), d.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (d = d.slice(1, -1), d = l.stylize(d, "name")) : (d = d.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), d = l.stylize(d, "string"));
880
- }
881
- return d + ": " + w;
882
- }
883
- function C(l, p, m) {
884
- var D = l.reduce(function(s, f) {
885
- return f.indexOf(`
886
- `) >= 0, s + f.replace(/\u001b\[\d\d?m/g, "").length + 1;
887
- }, 0);
888
- return D > 60 ? m[0] + (p === "" ? "" : p + `
889
- `) + " " + l.join(`,
890
- `) + " " + m[1] : m[0] + p + " " + l.join(", ") + " " + m[1];
891
- }
892
- e.types = Zt;
893
- function O(l) {
894
- return Array.isArray(l);
895
- }
896
- e.isArray = O;
897
- function u(l) {
898
- return typeof l == "boolean";
899
- }
900
- e.isBoolean = u;
901
- function _(l) {
902
- return l === null;
903
- }
904
- e.isNull = _;
905
- function S(l) {
906
- return l == null;
907
- }
908
- e.isNullOrUndefined = S;
909
- function E(l) {
910
- return typeof l == "number";
911
- }
912
- e.isNumber = E;
913
- function T(l) {
914
- return typeof l == "string";
915
- }
916
- e.isString = T;
917
- function B(l) {
918
- return typeof l == "symbol";
919
- }
920
- e.isSymbol = B;
921
- function q(l) {
922
- return l === void 0;
923
- }
924
- e.isUndefined = q;
925
- function k(l) {
926
- return P(l) && J(l) === "[object RegExp]";
927
- }
928
- e.isRegExp = k, e.types.isRegExp = k;
929
- function P(l) {
930
- return typeof l == "object" && l !== null;
931
- }
932
- e.isObject = P;
933
- function V(l) {
934
- return P(l) && J(l) === "[object Date]";
935
- }
936
- e.isDate = V, e.types.isDate = V;
937
- function Y(l) {
938
- return P(l) && (J(l) === "[object Error]" || l instanceof Error);
939
- }
940
- e.isError = Y, e.types.isNativeError = Y;
941
- function X(l) {
942
- return typeof l == "function";
943
- }
944
- e.isFunction = X;
945
- function re(l) {
946
- return l === null || typeof l == "boolean" || typeof l == "number" || typeof l == "string" || typeof l == "symbol" || // ES6 symbol
947
- typeof l > "u";
948
- }
949
- e.isPrimitive = re, e.isBuffer = yn;
950
- function J(l) {
951
- return Object.prototype.toString.call(l);
952
- }
953
- function ne(l) {
954
- return l < 10 ? "0" + l.toString(10) : l.toString(10);
955
- }
956
- var ie = [
957
- "Jan",
958
- "Feb",
959
- "Mar",
960
- "Apr",
961
- "May",
962
- "Jun",
963
- "Jul",
964
- "Aug",
965
- "Sep",
966
- "Oct",
967
- "Nov",
968
- "Dec"
969
- ];
970
- function Q() {
971
- var l = /* @__PURE__ */ new Date(), p = [
972
- ne(l.getHours()),
973
- ne(l.getMinutes()),
974
- ne(l.getSeconds())
975
- ].join(":");
976
- return [l.getDate(), ie[l.getMonth()], p].join(" ");
977
- }
978
- e.log = function() {
979
- console.log("%s - %s", Q(), e.format.apply(e, arguments));
980
- }, e.inherits = se, e._extend = function(l, p) {
981
- if (!p || !P(p)) return l;
982
- for (var m = Object.keys(p), D = m.length; D--; )
983
- l[m[D]] = p[m[D]];
984
- return l;
985
- };
986
- function ee(l, p) {
987
- return Object.prototype.hasOwnProperty.call(l, p);
988
- }
989
- var z = typeof Symbol < "u" ? Symbol("util.promisify.custom") : void 0;
990
- e.promisify = function(p) {
991
- if (typeof p != "function")
992
- throw new TypeError('The "original" argument must be of type Function');
993
- if (z && p[z]) {
994
- var m = p[z];
995
- if (typeof m != "function")
996
- throw new TypeError('The "util.promisify.custom" argument must be of type Function');
997
- return Object.defineProperty(m, z, {
998
- value: m,
999
- enumerable: !1,
1000
- writable: !1,
1001
- configurable: !0
1002
- }), m;
1003
- }
1004
- function m() {
1005
- for (var D, s, f = new Promise(function(j, n) {
1006
- D = j, s = n;
1007
- }), d = [], w = 0; w < arguments.length; w++)
1008
- d.push(arguments[w]);
1009
- d.push(function(j, n) {
1010
- j ? s(j) : D(n);
1011
- });
1012
- try {
1013
- p.apply(this, d);
1014
- } catch (j) {
1015
- s(j);
1016
- }
1017
- return f;
1018
- }
1019
- return Object.setPrototypeOf(m, Object.getPrototypeOf(p)), z && Object.defineProperty(m, z, {
1020
- value: m,
1021
- enumerable: !1,
1022
- writable: !1,
1023
- configurable: !0
1024
- }), Object.defineProperties(
1025
- m,
1026
- t(p)
1027
- );
1028
- }, e.promisify.custom = z;
1029
- function te(l, p) {
1030
- if (!l) {
1031
- var m = new Error("Promise was rejected with a falsy value");
1032
- m.reason = l, l = m;
1033
- }
1034
- return p(l);
1035
- }
1036
- function oe(l) {
1037
- if (typeof l != "function")
1038
- throw new TypeError('The "original" argument must be of type Function');
1039
- function p() {
1040
- for (var m = [], D = 0; D < arguments.length; D++)
1041
- m.push(arguments[D]);
1042
- var s = m.pop();
1043
- if (typeof s != "function")
1044
- throw new TypeError("The last argument must be of type Function");
1045
- var f = this, d = function() {
1046
- return s.apply(f, arguments);
1047
- };
1048
- l.apply(this, m).then(
1049
- function(w) {
1050
- U.nextTick(d.bind(null, null, w));
1051
- },
1052
- function(w) {
1053
- U.nextTick(te.bind(null, w, d));
1054
- }
1055
- );
1056
- }
1057
- return Object.setPrototypeOf(p, Object.getPrototypeOf(l)), Object.defineProperties(
1058
- p,
1059
- t(l)
1060
- ), p;
1061
- }
1062
- e.callbackify = oe;
1063
- })(ut);
1064
- var $e, St;
1065
- function gn() {
1066
- if (St) return $e;
1067
- St = 1;
1068
- function e(L, C) {
1069
- var O = Object.keys(L);
1070
- if (Object.getOwnPropertySymbols) {
1071
- var u = Object.getOwnPropertySymbols(L);
1072
- C && (u = u.filter(function(_) {
1073
- return Object.getOwnPropertyDescriptor(L, _).enumerable;
1074
- })), O.push.apply(O, u);
1075
- }
1076
- return O;
1077
- }
1078
- function t(L) {
1079
- for (var C = 1; C < arguments.length; C++) {
1080
- var O = arguments[C] != null ? arguments[C] : {};
1081
- C % 2 ? e(Object(O), !0).forEach(function(u) {
1082
- r(L, u, O[u]);
1083
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(L, Object.getOwnPropertyDescriptors(O)) : e(Object(O)).forEach(function(u) {
1084
- Object.defineProperty(L, u, Object.getOwnPropertyDescriptor(O, u));
1085
- });
1086
- }
1087
- return L;
1088
- }
1089
- function r(L, C, O) {
1090
- return C = c(C), C in L ? Object.defineProperty(L, C, { value: O, enumerable: !0, configurable: !0, writable: !0 }) : L[C] = O, L;
1091
- }
1092
- function o(L, C) {
1093
- if (!(L instanceof C))
1094
- throw new TypeError("Cannot call a class as a function");
1095
- }
1096
- function a(L, C) {
1097
- for (var O = 0; O < C.length; O++) {
1098
- var u = C[O];
1099
- u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(L, c(u.key), u);
1100
- }
1101
- }
1102
- function h(L, C, O) {
1103
- return C && a(L.prototype, C), Object.defineProperty(L, "prototype", { writable: !1 }), L;
1104
- }
1105
- function c(L) {
1106
- var C = b(L, "string");
1107
- return typeof C == "symbol" ? C : String(C);
1108
- }
1109
- function b(L, C) {
1110
- if (typeof L != "object" || L === null) return L;
1111
- var O = L[Symbol.toPrimitive];
1112
- if (O !== void 0) {
1113
- var u = O.call(L, C || "default");
1114
- if (typeof u != "object") return u;
1115
- throw new TypeError("@@toPrimitive must return a primitive value.");
1116
- }
1117
- return (C === "string" ? String : Number)(L);
1118
- }
1119
- var y = Ce, M = y.Buffer, N = ut, A = N.inspect, I = A && A.custom || "inspect";
1120
- function x(L, C, O) {
1121
- M.prototype.copy.call(L, C, O);
1122
- }
1123
- return $e = /* @__PURE__ */ function() {
1124
- function L() {
1125
- o(this, L), this.head = null, this.tail = null, this.length = 0;
1126
- }
1127
- return h(L, [{
1128
- key: "push",
1129
- value: function(O) {
1130
- var u = {
1131
- data: O,
1132
- next: null
1133
- };
1134
- this.length > 0 ? this.tail.next = u : this.head = u, this.tail = u, ++this.length;
1135
- }
1136
- }, {
1137
- key: "unshift",
1138
- value: function(O) {
1139
- var u = {
1140
- data: O,
1141
- next: this.head
1142
- };
1143
- this.length === 0 && (this.tail = u), this.head = u, ++this.length;
1144
- }
1145
- }, {
1146
- key: "shift",
1147
- value: function() {
1148
- if (this.length !== 0) {
1149
- var O = this.head.data;
1150
- return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, O;
1151
- }
1152
- }
1153
- }, {
1154
- key: "clear",
1155
- value: function() {
1156
- this.head = this.tail = null, this.length = 0;
1157
- }
1158
- }, {
1159
- key: "join",
1160
- value: function(O) {
1161
- if (this.length === 0) return "";
1162
- for (var u = this.head, _ = "" + u.data; u = u.next; ) _ += O + u.data;
1163
- return _;
1164
- }
1165
- }, {
1166
- key: "concat",
1167
- value: function(O) {
1168
- if (this.length === 0) return M.alloc(0);
1169
- for (var u = M.allocUnsafe(O >>> 0), _ = this.head, S = 0; _; )
1170
- x(_.data, u, S), S += _.data.length, _ = _.next;
1171
- return u;
1172
- }
1173
- // Consumes a specified amount of bytes or characters from the buffered data.
1174
- }, {
1175
- key: "consume",
1176
- value: function(O, u) {
1177
- var _;
1178
- return O < this.head.data.length ? (_ = this.head.data.slice(0, O), this.head.data = this.head.data.slice(O)) : O === this.head.data.length ? _ = this.shift() : _ = u ? this._getString(O) : this._getBuffer(O), _;
1179
- }
1180
- }, {
1181
- key: "first",
1182
- value: function() {
1183
- return this.head.data;
1184
- }
1185
- // Consumes a specified amount of characters from the buffered data.
1186
- }, {
1187
- key: "_getString",
1188
- value: function(O) {
1189
- var u = this.head, _ = 1, S = u.data;
1190
- for (O -= S.length; u = u.next; ) {
1191
- var E = u.data, T = O > E.length ? E.length : O;
1192
- if (T === E.length ? S += E : S += E.slice(0, O), O -= T, O === 0) {
1193
- T === E.length ? (++_, u.next ? this.head = u.next : this.head = this.tail = null) : (this.head = u, u.data = E.slice(T));
1194
- break;
1195
- }
1196
- ++_;
1197
- }
1198
- return this.length -= _, S;
1199
- }
1200
- // Consumes a specified amount of bytes from the buffered data.
1201
- }, {
1202
- key: "_getBuffer",
1203
- value: function(O) {
1204
- var u = M.allocUnsafe(O), _ = this.head, S = 1;
1205
- for (_.data.copy(u), O -= _.data.length; _ = _.next; ) {
1206
- var E = _.data, T = O > E.length ? E.length : O;
1207
- if (E.copy(u, u.length - O, 0, T), O -= T, O === 0) {
1208
- T === E.length ? (++S, _.next ? this.head = _.next : this.head = this.tail = null) : (this.head = _, _.data = E.slice(T));
1209
- break;
1210
- }
1211
- ++S;
1212
- }
1213
- return this.length -= S, u;
1214
- }
1215
- // Make sure the linked list only shows the minimal necessary information.
1216
- }, {
1217
- key: I,
1218
- value: function(O, u) {
1219
- return A(this, t(t({}, u), {}, {
1220
- // Only inspect one level.
1221
- depth: 0,
1222
- // It should not recurse.
1223
- customInspect: !1
1224
- }));
1225
- }
1226
- }]), L;
1227
- }(), $e;
1228
- }
1229
- function bn(e, t) {
1230
- var r = this, o = this._readableState && this._readableState.destroyed, a = this._writableState && this._writableState.destroyed;
1231
- return o || a ? (t ? t(e) : e && (this._writableState ? this._writableState.errorEmitted || (this._writableState.errorEmitted = !0, U.nextTick(at, this, e)) : U.nextTick(at, this, e)), this) : (this._readableState && (this._readableState.destroyed = !0), this._writableState && (this._writableState.destroyed = !0), this._destroy(e || null, function(h) {
1232
- !t && h ? r._writableState ? r._writableState.errorEmitted ? U.nextTick(Ae, r) : (r._writableState.errorEmitted = !0, U.nextTick(Et, r, h)) : U.nextTick(Et, r, h) : t ? (U.nextTick(Ae, r), t(h)) : U.nextTick(Ae, r);
1233
- }), this);
1234
- }
1235
- function Et(e, t) {
1236
- at(e, t), Ae(e);
1237
- }
1238
- function Ae(e) {
1239
- e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
1240
- }
1241
- function vn() {
1242
- this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
1243
- }
1244
- function at(e, t) {
1245
- e.emit("error", t);
1246
- }
1247
- function _n(e, t) {
1248
- var r = e._readableState, o = e._writableState;
1249
- r && r.autoDestroy || o && o.autoDestroy ? e.destroy(t) : e.emit("error", t);
1250
- }
1251
- var ar = {
1252
- destroy: bn,
1253
- undestroy: vn,
1254
- errorOrDestroy: _n
1255
- }, ce = {};
1256
- function mn(e, t) {
1257
- e.prototype = Object.create(t.prototype), e.prototype.constructor = e, e.__proto__ = t;
1258
- }
1259
- var or = {};
1260
- function Z(e, t, r) {
1261
- r || (r = Error);
1262
- function o(h, c, b) {
1263
- return typeof t == "string" ? t : t(h, c, b);
1264
- }
1265
- var a = /* @__PURE__ */ function(h) {
1266
- mn(c, h);
1267
- function c(b, y, M) {
1268
- return h.call(this, o(b, y, M)) || this;
1269
- }
1270
- return c;
1271
- }(r);
1272
- a.prototype.name = r.name, a.prototype.code = e, or[e] = a;
1273
- }
1274
- function Rt(e, t) {
1275
- if (Array.isArray(e)) {
1276
- var r = e.length;
1277
- return e = e.map(function(o) {
1278
- return String(o);
1279
- }), r > 2 ? "one of ".concat(t, " ").concat(e.slice(0, r - 1).join(", "), ", or ") + e[r - 1] : r === 2 ? "one of ".concat(t, " ").concat(e[0], " or ").concat(e[1]) : "of ".concat(t, " ").concat(e[0]);
1280
- } else
1281
- return "of ".concat(t, " ").concat(String(e));
1282
- }
1283
- function wn(e, t, r) {
1284
- return e.substr(0, t.length) === t;
1285
- }
1286
- function Sn(e, t, r) {
1287
- return (r === void 0 || r > e.length) && (r = e.length), e.substring(r - t.length, r) === t;
1288
- }
1289
- function En(e, t, r) {
1290
- return typeof r != "number" && (r = 0), r + t.length > e.length ? !1 : e.indexOf(t, r) !== -1;
1291
- }
1292
- Z("ERR_INVALID_OPT_VALUE", function(e, t) {
1293
- return 'The value "' + t + '" is invalid for option "' + e + '"';
1294
- }, TypeError);
1295
- Z("ERR_INVALID_ARG_TYPE", function(e, t, r) {
1296
- var o;
1297
- typeof t == "string" && wn(t, "not ") ? (o = "must not be", t = t.replace(/^not /, "")) : o = "must be";
1298
- var a;
1299
- if (Sn(e, " argument"))
1300
- a = "The ".concat(e, " ").concat(o, " ").concat(Rt(t, "type"));
1301
- else {
1302
- var h = En(e, ".") ? "property" : "argument";
1303
- a = 'The "'.concat(e, '" ').concat(h, " ").concat(o, " ").concat(Rt(t, "type"));
1304
- }
1305
- return a += ". Received type ".concat(typeof r), a;
1306
- }, TypeError);
1307
- Z("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF");
1308
- Z("ERR_METHOD_NOT_IMPLEMENTED", function(e) {
1309
- return "The " + e + " method is not implemented";
1310
- });
1311
- Z("ERR_STREAM_PREMATURE_CLOSE", "Premature close");
1312
- Z("ERR_STREAM_DESTROYED", function(e) {
1313
- return "Cannot call " + e + " after a stream was destroyed";
1314
- });
1315
- Z("ERR_MULTIPLE_CALLBACK", "Callback called multiple times");
1316
- Z("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable");
1317
- Z("ERR_STREAM_WRITE_AFTER_END", "write after end");
1318
- Z("ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError);
1319
- Z("ERR_UNKNOWN_ENCODING", function(e) {
1320
- return "Unknown encoding: " + e;
1321
- }, TypeError);
1322
- Z("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event");
1323
- ce.codes = or;
1324
- var Rn = ce.codes.ERR_INVALID_OPT_VALUE;
1325
- function Tn(e, t, r) {
1326
- return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null;
1327
- }
1328
- function An(e, t, r, o) {
1329
- var a = Tn(t, o, r);
1330
- if (a != null) {
1331
- if (!(isFinite(a) && Math.floor(a) === a) || a < 0) {
1332
- var h = o ? r : "highWaterMark";
1333
- throw new Rn(h, a);
1334
- }
1335
- return Math.floor(a);
1336
- }
1337
- return e.objectMode ? 16 : 16 * 1024;
1338
- }
1339
- var fr = {
1340
- getHighWaterMark: An
1341
- }, On = Mn;
1342
- function Mn(e, t) {
1343
- if (xe("noDeprecation"))
1344
- return e;
1345
- var r = !1;
1346
- function o() {
1347
- if (!r) {
1348
- if (xe("throwDeprecation"))
1349
- throw new Error(t);
1350
- xe("traceDeprecation") ? console.trace(t) : console.warn(t), r = !0;
1351
- }
1352
- return e.apply(this, arguments);
1353
- }
1354
- return o;
1355
- }
1356
- function xe(e) {
1357
- try {
1358
- if (!G.localStorage) return !1;
1359
- } catch {
1360
- return !1;
1361
- }
1362
- var t = G.localStorage[e];
1363
- return t == null ? !1 : String(t).toLowerCase() === "true";
1364
- }
1365
- var Ge, Tt;
1366
- function sr() {
1367
- if (Tt) return Ge;
1368
- Tt = 1, Ge = k;
1369
- function e(s) {
1370
- var f = this;
1371
- this.next = null, this.entry = null, this.finish = function() {
1372
- D(f, s);
1373
- };
1374
- }
1375
- var t;
1376
- k.WritableState = B;
1377
- var r = {
1378
- deprecate: On
1379
- }, o = Jt, a = Ce.Buffer, h = (typeof G < "u" ? G : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
1380
- };
1381
- function c(s) {
1382
- return a.from(s);
1383
- }
1384
- function b(s) {
1385
- return a.isBuffer(s) || s instanceof h;
1386
- }
1387
- var y = ar, M = fr, N = M.getHighWaterMark, A = ce.codes, I = A.ERR_INVALID_ARG_TYPE, x = A.ERR_METHOD_NOT_IMPLEMENTED, L = A.ERR_MULTIPLE_CALLBACK, C = A.ERR_STREAM_CANNOT_PIPE, O = A.ERR_STREAM_DESTROYED, u = A.ERR_STREAM_NULL_VALUES, _ = A.ERR_STREAM_WRITE_AFTER_END, S = A.ERR_UNKNOWN_ENCODING, E = y.errorOrDestroy;
1388
- se(k, o);
1389
- function T() {
1390
- }
1391
- function B(s, f, d) {
1392
- t = t || ge(), s = s || {}, typeof d != "boolean" && (d = f instanceof t), this.objectMode = !!s.objectMode, d && (this.objectMode = this.objectMode || !!s.writableObjectMode), this.highWaterMark = N(this, s, "writableHighWaterMark", d), this.finalCalled = !1, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1, this.destroyed = !1;
1393
- var w = s.decodeStrings === !1;
1394
- this.decodeStrings = !w, this.defaultEncoding = s.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(j) {
1395
- ie(f, j);
1396
- }, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.emitClose = s.emitClose !== !1, this.autoDestroy = !!s.autoDestroy, this.bufferedRequestCount = 0, this.corkedRequestsFree = new e(this);
1397
- }
1398
- B.prototype.getBuffer = function() {
1399
- for (var f = this.bufferedRequest, d = []; f; )
1400
- d.push(f), f = f.next;
1401
- return d;
1402
- }, function() {
1403
- try {
1404
- Object.defineProperty(B.prototype, "buffer", {
1405
- get: r.deprecate(function() {
1406
- return this.getBuffer();
1407
- }, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.", "DEP0003")
1408
- });
1409
- } catch {
1410
- }
1411
- }();
1412
- var q;
1413
- typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (q = Function.prototype[Symbol.hasInstance], Object.defineProperty(k, Symbol.hasInstance, {
1414
- value: function(f) {
1415
- return q.call(this, f) ? !0 : this !== k ? !1 : f && f._writableState instanceof B;
1416
- }
1417
- })) : q = function(f) {
1418
- return f instanceof this;
1419
- };
1420
- function k(s) {
1421
- t = t || ge();
1422
- var f = this instanceof t;
1423
- if (!f && !q.call(k, this)) return new k(s);
1424
- this._writableState = new B(s, this, f), this.writable = !0, s && (typeof s.write == "function" && (this._write = s.write), typeof s.writev == "function" && (this._writev = s.writev), typeof s.destroy == "function" && (this._destroy = s.destroy), typeof s.final == "function" && (this._final = s.final)), o.call(this);
1425
- }
1426
- k.prototype.pipe = function() {
1427
- E(this, new C());
1428
- };
1429
- function P(s, f) {
1430
- var d = new _();
1431
- E(s, d), U.nextTick(f, d);
1432
- }
1433
- function V(s, f, d, w) {
1434
- var j;
1435
- return d === null ? j = new u() : typeof d != "string" && !f.objectMode && (j = new I("chunk", ["string", "Buffer"], d)), j ? (E(s, j), U.nextTick(w, j), !1) : !0;
1436
- }
1437
- k.prototype.write = function(s, f, d) {
1438
- var w = this._writableState, j = !1, n = !w.objectMode && b(s);
1439
- return n && !a.isBuffer(s) && (s = c(s)), typeof f == "function" && (d = f, f = null), n ? f = "buffer" : f || (f = w.defaultEncoding), typeof d != "function" && (d = T), w.ending ? P(this, d) : (n || V(this, w, s, d)) && (w.pendingcb++, j = X(this, w, n, s, f, d)), j;
1440
- }, k.prototype.cork = function() {
1441
- this._writableState.corked++;
1442
- }, k.prototype.uncork = function() {
1443
- var s = this._writableState;
1444
- s.corked && (s.corked--, !s.writing && !s.corked && !s.bufferProcessing && s.bufferedRequest && z(this, s));
1445
- }, k.prototype.setDefaultEncoding = function(f) {
1446
- if (typeof f == "string" && (f = f.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((f + "").toLowerCase()) > -1)) throw new S(f);
1447
- return this._writableState.defaultEncoding = f, this;
1448
- }, Object.defineProperty(k.prototype, "writableBuffer", {
1449
- // making it explicit this property is not enumerable
1450
- // because otherwise some prototype manipulation in
1451
- // userland will fail
1452
- enumerable: !1,
1453
- get: function() {
1454
- return this._writableState && this._writableState.getBuffer();
1455
- }
1456
- });
1457
- function Y(s, f, d) {
1458
- return !s.objectMode && s.decodeStrings !== !1 && typeof f == "string" && (f = a.from(f, d)), f;
1459
- }
1460
- Object.defineProperty(k.prototype, "writableHighWaterMark", {
1461
- // making it explicit this property is not enumerable
1462
- // because otherwise some prototype manipulation in
1463
- // userland will fail
1464
- enumerable: !1,
1465
- get: function() {
1466
- return this._writableState.highWaterMark;
1467
- }
1468
- });
1469
- function X(s, f, d, w, j, n) {
1470
- if (!d) {
1471
- var i = Y(f, w, j);
1472
- w !== i && (d = !0, j = "buffer", w = i);
1473
- }
1474
- var v = f.objectMode ? 1 : w.length;
1475
- f.length += v;
1476
- var R = f.length < f.highWaterMark;
1477
- if (R || (f.needDrain = !0), f.writing || f.corked) {
1478
- var $ = f.lastBufferedRequest;
1479
- f.lastBufferedRequest = {
1480
- chunk: w,
1481
- encoding: j,
1482
- isBuf: d,
1483
- callback: n,
1484
- next: null
1485
- }, $ ? $.next = f.lastBufferedRequest : f.bufferedRequest = f.lastBufferedRequest, f.bufferedRequestCount += 1;
1486
- } else
1487
- re(s, f, !1, v, w, j, n);
1488
- return R;
1489
- }
1490
- function re(s, f, d, w, j, n, i) {
1491
- f.writelen = w, f.writecb = i, f.writing = !0, f.sync = !0, f.destroyed ? f.onwrite(new O("write")) : d ? s._writev(j, f.onwrite) : s._write(j, n, f.onwrite), f.sync = !1;
1492
- }
1493
- function J(s, f, d, w, j) {
1494
- --f.pendingcb, d ? (U.nextTick(j, w), U.nextTick(p, s, f), s._writableState.errorEmitted = !0, E(s, w)) : (j(w), s._writableState.errorEmitted = !0, E(s, w), p(s, f));
1495
- }
1496
- function ne(s) {
1497
- s.writing = !1, s.writecb = null, s.length -= s.writelen, s.writelen = 0;
1498
- }
1499
- function ie(s, f) {
1500
- var d = s._writableState, w = d.sync, j = d.writecb;
1501
- if (typeof j != "function") throw new L();
1502
- if (ne(d), f) J(s, d, w, f, j);
1503
- else {
1504
- var n = te(d) || s.destroyed;
1505
- !n && !d.corked && !d.bufferProcessing && d.bufferedRequest && z(s, d), w ? U.nextTick(Q, s, d, n, j) : Q(s, d, n, j);
1506
- }
1507
- }
1508
- function Q(s, f, d, w) {
1509
- d || ee(s, f), f.pendingcb--, w(), p(s, f);
1510
- }
1511
- function ee(s, f) {
1512
- f.length === 0 && f.needDrain && (f.needDrain = !1, s.emit("drain"));
1513
- }
1514
- function z(s, f) {
1515
- f.bufferProcessing = !0;
1516
- var d = f.bufferedRequest;
1517
- if (s._writev && d && d.next) {
1518
- var w = f.bufferedRequestCount, j = new Array(w), n = f.corkedRequestsFree;
1519
- n.entry = d;
1520
- for (var i = 0, v = !0; d; )
1521
- j[i] = d, d.isBuf || (v = !1), d = d.next, i += 1;
1522
- j.allBuffers = v, re(s, f, !0, f.length, j, "", n.finish), f.pendingcb++, f.lastBufferedRequest = null, n.next ? (f.corkedRequestsFree = n.next, n.next = null) : f.corkedRequestsFree = new e(f), f.bufferedRequestCount = 0;
1523
- } else {
1524
- for (; d; ) {
1525
- var R = d.chunk, $ = d.encoding, F = d.callback, W = f.objectMode ? 1 : R.length;
1526
- if (re(s, f, !1, W, R, $, F), d = d.next, f.bufferedRequestCount--, f.writing)
1527
- break;
1528
- }
1529
- d === null && (f.lastBufferedRequest = null);
1530
- }
1531
- f.bufferedRequest = d, f.bufferProcessing = !1;
1532
- }
1533
- k.prototype._write = function(s, f, d) {
1534
- d(new x("_write()"));
1535
- }, k.prototype._writev = null, k.prototype.end = function(s, f, d) {
1536
- var w = this._writableState;
1537
- return typeof s == "function" ? (d = s, s = null, f = null) : typeof f == "function" && (d = f, f = null), s != null && this.write(s, f), w.corked && (w.corked = 1, this.uncork()), w.ending || m(this, w, d), this;
1538
- }, Object.defineProperty(k.prototype, "writableLength", {
1539
- // making it explicit this property is not enumerable
1540
- // because otherwise some prototype manipulation in
1541
- // userland will fail
1542
- enumerable: !1,
1543
- get: function() {
1544
- return this._writableState.length;
1545
- }
1546
- });
1547
- function te(s) {
1548
- return s.ending && s.length === 0 && s.bufferedRequest === null && !s.finished && !s.writing;
1549
- }
1550
- function oe(s, f) {
1551
- s._final(function(d) {
1552
- f.pendingcb--, d && E(s, d), f.prefinished = !0, s.emit("prefinish"), p(s, f);
1553
- });
1554
- }
1555
- function l(s, f) {
1556
- !f.prefinished && !f.finalCalled && (typeof s._final == "function" && !f.destroyed ? (f.pendingcb++, f.finalCalled = !0, U.nextTick(oe, s, f)) : (f.prefinished = !0, s.emit("prefinish")));
1557
- }
1558
- function p(s, f) {
1559
- var d = te(f);
1560
- if (d && (l(s, f), f.pendingcb === 0 && (f.finished = !0, s.emit("finish"), f.autoDestroy))) {
1561
- var w = s._readableState;
1562
- (!w || w.autoDestroy && w.endEmitted) && s.destroy();
1563
- }
1564
- return d;
1565
- }
1566
- function m(s, f, d) {
1567
- f.ending = !0, p(s, f), d && (f.finished ? U.nextTick(d) : s.once("finish", d)), f.ended = !0, s.writable = !1;
1568
- }
1569
- function D(s, f, d) {
1570
- var w = s.entry;
1571
- for (s.entry = null; w; ) {
1572
- var j = w.callback;
1573
- f.pendingcb--, j(d), w = w.next;
1574
- }
1575
- f.corkedRequestsFree.next = s;
1576
- }
1577
- return Object.defineProperty(k.prototype, "destroyed", {
1578
- // making it explicit this property is not enumerable
1579
- // because otherwise some prototype manipulation in
1580
- // userland will fail
1581
- enumerable: !1,
1582
- get: function() {
1583
- return this._writableState === void 0 ? !1 : this._writableState.destroyed;
1584
- },
1585
- set: function(f) {
1586
- this._writableState && (this._writableState.destroyed = f);
1587
- }
1588
- }), k.prototype.destroy = y.destroy, k.prototype._undestroy = y.undestroy, k.prototype._destroy = function(s, f) {
1589
- f(s);
1590
- }, Ge;
1591
- }
1592
- var Ve, At;
1593
- function ge() {
1594
- if (At) return Ve;
1595
- At = 1;
1596
- var e = Object.keys || function(M) {
1597
- var N = [];
1598
- for (var A in M) N.push(A);
1599
- return N;
1600
- };
1601
- Ve = c;
1602
- var t = lr(), r = sr();
1603
- se(c, t);
1604
- for (var o = e(r.prototype), a = 0; a < o.length; a++) {
1605
- var h = o[a];
1606
- c.prototype[h] || (c.prototype[h] = r.prototype[h]);
1607
- }
1608
- function c(M) {
1609
- if (!(this instanceof c)) return new c(M);
1610
- t.call(this, M), r.call(this, M), this.allowHalfOpen = !0, M && (M.readable === !1 && (this.readable = !1), M.writable === !1 && (this.writable = !1), M.allowHalfOpen === !1 && (this.allowHalfOpen = !1, this.once("end", b)));
1611
- }
1612
- Object.defineProperty(c.prototype, "writableHighWaterMark", {
1613
- // making it explicit this property is not enumerable
1614
- // because otherwise some prototype manipulation in
1615
- // userland will fail
1616
- enumerable: !1,
1617
- get: function() {
1618
- return this._writableState.highWaterMark;
1619
- }
1620
- }), Object.defineProperty(c.prototype, "writableBuffer", {
1621
- // making it explicit this property is not enumerable
1622
- // because otherwise some prototype manipulation in
1623
- // userland will fail
1624
- enumerable: !1,
1625
- get: function() {
1626
- return this._writableState && this._writableState.getBuffer();
1627
- }
1628
- }), Object.defineProperty(c.prototype, "writableLength", {
1629
- // making it explicit this property is not enumerable
1630
- // because otherwise some prototype manipulation in
1631
- // userland will fail
1632
- enumerable: !1,
1633
- get: function() {
1634
- return this._writableState.length;
1635
- }
1636
- });
1637
- function b() {
1638
- this._writableState.ended || U.nextTick(y, this);
1639
- }
1640
- function y(M) {
1641
- M.end();
1642
- }
1643
- return Object.defineProperty(c.prototype, "destroyed", {
1644
- // making it explicit this property is not enumerable
1645
- // because otherwise some prototype manipulation in
1646
- // userland will fail
1647
- enumerable: !1,
1648
- get: function() {
1649
- return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
1650
- },
1651
- set: function(N) {
1652
- this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = N, this._writableState.destroyed = N);
1653
- }
1654
- }), Ve;
1655
- }
1656
- var ze = {}, me = { exports: {} }, Ot;
1657
- function Ln() {
1658
- return Ot || (Ot = 1, function(e, t) {
1659
- var r = Ce, o = r.Buffer;
1660
- function a(c, b) {
1661
- for (var y in c)
1662
- b[y] = c[y];
1663
- }
1664
- o.from && o.alloc && o.allocUnsafe && o.allocUnsafeSlow ? e.exports = r : (a(r, t), t.Buffer = h);
1665
- function h(c, b, y) {
1666
- return o(c, b, y);
1667
- }
1668
- a(o, h), h.from = function(c, b, y) {
1669
- if (typeof c == "number")
1670
- throw new TypeError("Argument must not be a number");
1671
- return o(c, b, y);
1672
- }, h.alloc = function(c, b, y) {
1673
- if (typeof c != "number")
1674
- throw new TypeError("Argument must be a number");
1675
- var M = o(c);
1676
- return b !== void 0 ? typeof y == "string" ? M.fill(b, y) : M.fill(b) : M.fill(0), M;
1677
- }, h.allocUnsafe = function(c) {
1678
- if (typeof c != "number")
1679
- throw new TypeError("Argument must be a number");
1680
- return o(c);
1681
- }, h.allocUnsafeSlow = function(c) {
1682
- if (typeof c != "number")
1683
- throw new TypeError("Argument must be a number");
1684
- return r.SlowBuffer(c);
1685
- };
1686
- }(me, me.exports)), me.exports;
1687
- }
1688
- var Mt;
1689
- function Lt() {
1690
- if (Mt) return ze;
1691
- Mt = 1;
1692
- var e = Ln().Buffer, t = e.isEncoding || function(u) {
1693
- switch (u = "" + u, u && u.toLowerCase()) {
1694
- case "hex":
1695
- case "utf8":
1696
- case "utf-8":
1697
- case "ascii":
1698
- case "binary":
1699
- case "base64":
1700
- case "ucs2":
1701
- case "ucs-2":
1702
- case "utf16le":
1703
- case "utf-16le":
1704
- case "raw":
1705
- return !0;
1706
- default:
1707
- return !1;
1708
- }
1709
- };
1710
- function r(u) {
1711
- if (!u) return "utf8";
1712
- for (var _; ; )
1713
- switch (u) {
1714
- case "utf8":
1715
- case "utf-8":
1716
- return "utf8";
1717
- case "ucs2":
1718
- case "ucs-2":
1719
- case "utf16le":
1720
- case "utf-16le":
1721
- return "utf16le";
1722
- case "latin1":
1723
- case "binary":
1724
- return "latin1";
1725
- case "base64":
1726
- case "ascii":
1727
- case "hex":
1728
- return u;
1729
- default:
1730
- if (_) return;
1731
- u = ("" + u).toLowerCase(), _ = !0;
1732
- }
1733
- }
1734
- function o(u) {
1735
- var _ = r(u);
1736
- if (typeof _ != "string" && (e.isEncoding === t || !t(u))) throw new Error("Unknown encoding: " + u);
1737
- return _ || u;
1738
- }
1739
- ze.StringDecoder = a;
1740
- function a(u) {
1741
- this.encoding = o(u);
1742
- var _;
1743
- switch (this.encoding) {
1744
- case "utf16le":
1745
- this.text = A, this.end = I, _ = 4;
1746
- break;
1747
- case "utf8":
1748
- this.fillLast = y, _ = 4;
1749
- break;
1750
- case "base64":
1751
- this.text = x, this.end = L, _ = 3;
1752
- break;
1753
- default:
1754
- this.write = C, this.end = O;
1755
- return;
1756
- }
1757
- this.lastNeed = 0, this.lastTotal = 0, this.lastChar = e.allocUnsafe(_);
1758
- }
1759
- a.prototype.write = function(u) {
1760
- if (u.length === 0) return "";
1761
- var _, S;
1762
- if (this.lastNeed) {
1763
- if (_ = this.fillLast(u), _ === void 0) return "";
1764
- S = this.lastNeed, this.lastNeed = 0;
1765
- } else
1766
- S = 0;
1767
- return S < u.length ? _ ? _ + this.text(u, S) : this.text(u, S) : _ || "";
1768
- }, a.prototype.end = N, a.prototype.text = M, a.prototype.fillLast = function(u) {
1769
- if (this.lastNeed <= u.length)
1770
- return u.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
1771
- u.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, u.length), this.lastNeed -= u.length;
1772
- };
1773
- function h(u) {
1774
- return u <= 127 ? 0 : u >> 5 === 6 ? 2 : u >> 4 === 14 ? 3 : u >> 3 === 30 ? 4 : u >> 6 === 2 ? -1 : -2;
1775
- }
1776
- function c(u, _, S) {
1777
- var E = _.length - 1;
1778
- if (E < S) return 0;
1779
- var T = h(_[E]);
1780
- return T >= 0 ? (T > 0 && (u.lastNeed = T - 1), T) : --E < S || T === -2 ? 0 : (T = h(_[E]), T >= 0 ? (T > 0 && (u.lastNeed = T - 2), T) : --E < S || T === -2 ? 0 : (T = h(_[E]), T >= 0 ? (T > 0 && (T === 2 ? T = 0 : u.lastNeed = T - 3), T) : 0));
1781
- }
1782
- function b(u, _, S) {
1783
- if ((_[0] & 192) !== 128)
1784
- return u.lastNeed = 0, "�";
1785
- if (u.lastNeed > 1 && _.length > 1) {
1786
- if ((_[1] & 192) !== 128)
1787
- return u.lastNeed = 1, "�";
1788
- if (u.lastNeed > 2 && _.length > 2 && (_[2] & 192) !== 128)
1789
- return u.lastNeed = 2, "�";
1790
- }
1791
- }
1792
- function y(u) {
1793
- var _ = this.lastTotal - this.lastNeed, S = b(this, u);
1794
- if (S !== void 0) return S;
1795
- if (this.lastNeed <= u.length)
1796
- return u.copy(this.lastChar, _, 0, this.lastNeed), this.lastChar.toString(this.encoding, 0, this.lastTotal);
1797
- u.copy(this.lastChar, _, 0, u.length), this.lastNeed -= u.length;
1798
- }
1799
- function M(u, _) {
1800
- var S = c(this, u, _);
1801
- if (!this.lastNeed) return u.toString("utf8", _);
1802
- this.lastTotal = S;
1803
- var E = u.length - (S - this.lastNeed);
1804
- return u.copy(this.lastChar, 0, E), u.toString("utf8", _, E);
1805
- }
1806
- function N(u) {
1807
- var _ = u && u.length ? this.write(u) : "";
1808
- return this.lastNeed ? _ + "�" : _;
1809
- }
1810
- function A(u, _) {
1811
- if ((u.length - _) % 2 === 0) {
1812
- var S = u.toString("utf16le", _);
1813
- if (S) {
1814
- var E = S.charCodeAt(S.length - 1);
1815
- if (E >= 55296 && E <= 56319)
1816
- return this.lastNeed = 2, this.lastTotal = 4, this.lastChar[0] = u[u.length - 2], this.lastChar[1] = u[u.length - 1], S.slice(0, -1);
1817
- }
1818
- return S;
1819
- }
1820
- return this.lastNeed = 1, this.lastTotal = 2, this.lastChar[0] = u[u.length - 1], u.toString("utf16le", _, u.length - 1);
1821
- }
1822
- function I(u) {
1823
- var _ = u && u.length ? this.write(u) : "";
1824
- if (this.lastNeed) {
1825
- var S = this.lastTotal - this.lastNeed;
1826
- return _ + this.lastChar.toString("utf16le", 0, S);
1827
- }
1828
- return _;
1829
- }
1830
- function x(u, _) {
1831
- var S = (u.length - _) % 3;
1832
- return S === 0 ? u.toString("base64", _) : (this.lastNeed = 3 - S, this.lastTotal = 3, S === 1 ? this.lastChar[0] = u[u.length - 1] : (this.lastChar[0] = u[u.length - 2], this.lastChar[1] = u[u.length - 1]), u.toString("base64", _, u.length - S));
1833
- }
1834
- function L(u) {
1835
- var _ = u && u.length ? this.write(u) : "";
1836
- return this.lastNeed ? _ + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : _;
1837
- }
1838
- function C(u) {
1839
- return u.toString(this.encoding);
1840
- }
1841
- function O(u) {
1842
- return u && u.length ? this.write(u) : "";
1843
- }
1844
- return ze;
1845
- }
1846
- var jt = ce.codes.ERR_STREAM_PREMATURE_CLOSE;
1847
- function jn(e) {
1848
- var t = !1;
1849
- return function() {
1850
- if (!t) {
1851
- t = !0;
1852
- for (var r = arguments.length, o = new Array(r), a = 0; a < r; a++)
1853
- o[a] = arguments[a];
1854
- e.apply(this, o);
1855
- }
1856
- };
1857
- }
1858
- function Cn() {
1859
- }
1860
- function Pn(e) {
1861
- return e.setHeader && typeof e.abort == "function";
1862
- }
1863
- function ur(e, t, r) {
1864
- if (typeof t == "function") return ur(e, null, t);
1865
- t || (t = {}), r = jn(r || Cn);
1866
- var o = t.readable || t.readable !== !1 && e.readable, a = t.writable || t.writable !== !1 && e.writable, h = function() {
1867
- e.writable || b();
1868
- }, c = e._writableState && e._writableState.finished, b = function() {
1869
- a = !1, c = !0, o || r.call(e);
1870
- }, y = e._readableState && e._readableState.endEmitted, M = function() {
1871
- o = !1, y = !0, a || r.call(e);
1872
- }, N = function(L) {
1873
- r.call(e, L);
1874
- }, A = function() {
1875
- var L;
1876
- if (o && !y)
1877
- return (!e._readableState || !e._readableState.ended) && (L = new jt()), r.call(e, L);
1878
- if (a && !c)
1879
- return (!e._writableState || !e._writableState.ended) && (L = new jt()), r.call(e, L);
1880
- }, I = function() {
1881
- e.req.on("finish", b);
1882
- };
1883
- return Pn(e) ? (e.on("complete", b), e.on("abort", A), e.req ? I() : e.on("request", I)) : a && !e._writableState && (e.on("end", h), e.on("close", h)), e.on("end", M), e.on("finish", b), t.error !== !1 && e.on("error", N), e.on("close", A), function() {
1884
- e.removeListener("complete", b), e.removeListener("abort", A), e.removeListener("request", I), e.req && e.req.removeListener("finish", b), e.removeListener("end", h), e.removeListener("close", h), e.removeListener("finish", b), e.removeListener("end", M), e.removeListener("error", N), e.removeListener("close", A);
1885
- };
1886
- }
1887
- var ht = ur, Ke, Ct;
1888
- function Nn() {
1889
- if (Ct) return Ke;
1890
- Ct = 1;
1891
- var e;
1892
- function t(S, E, T) {
1893
- return E = r(E), E in S ? Object.defineProperty(S, E, { value: T, enumerable: !0, configurable: !0, writable: !0 }) : S[E] = T, S;
1894
- }
1895
- function r(S) {
1896
- var E = o(S, "string");
1897
- return typeof E == "symbol" ? E : String(E);
1898
- }
1899
- function o(S, E) {
1900
- if (typeof S != "object" || S === null) return S;
1901
- var T = S[Symbol.toPrimitive];
1902
- if (T !== void 0) {
1903
- var B = T.call(S, E || "default");
1904
- if (typeof B != "object") return B;
1905
- throw new TypeError("@@toPrimitive must return a primitive value.");
1906
- }
1907
- return (E === "string" ? String : Number)(S);
1908
- }
1909
- var a = ht, h = Symbol("lastResolve"), c = Symbol("lastReject"), b = Symbol("error"), y = Symbol("ended"), M = Symbol("lastPromise"), N = Symbol("handlePromise"), A = Symbol("stream");
1910
- function I(S, E) {
1911
- return {
1912
- value: S,
1913
- done: E
1914
- };
1915
- }
1916
- function x(S) {
1917
- var E = S[h];
1918
- if (E !== null) {
1919
- var T = S[A].read();
1920
- T !== null && (S[M] = null, S[h] = null, S[c] = null, E(I(T, !1)));
1921
- }
1922
- }
1923
- function L(S) {
1924
- U.nextTick(x, S);
1925
- }
1926
- function C(S, E) {
1927
- return function(T, B) {
1928
- S.then(function() {
1929
- if (E[y]) {
1930
- T(I(void 0, !0));
1931
- return;
1932
- }
1933
- E[N](T, B);
1934
- }, B);
1935
- };
1936
- }
1937
- var O = Object.getPrototypeOf(function() {
1938
- }), u = Object.setPrototypeOf((e = {
1939
- get stream() {
1940
- return this[A];
1941
- },
1942
- next: function() {
1943
- var E = this, T = this[b];
1944
- if (T !== null)
1945
- return Promise.reject(T);
1946
- if (this[y])
1947
- return Promise.resolve(I(void 0, !0));
1948
- if (this[A].destroyed)
1949
- return new Promise(function(P, V) {
1950
- U.nextTick(function() {
1951
- E[b] ? V(E[b]) : P(I(void 0, !0));
1952
- });
1953
- });
1954
- var B = this[M], q;
1955
- if (B)
1956
- q = new Promise(C(B, this));
1957
- else {
1958
- var k = this[A].read();
1959
- if (k !== null)
1960
- return Promise.resolve(I(k, !1));
1961
- q = new Promise(this[N]);
1962
- }
1963
- return this[M] = q, q;
1964
- }
1965
- }, t(e, Symbol.asyncIterator, function() {
1966
- return this;
1967
- }), t(e, "return", function() {
1968
- var E = this;
1969
- return new Promise(function(T, B) {
1970
- E[A].destroy(null, function(q) {
1971
- if (q) {
1972
- B(q);
1973
- return;
1974
- }
1975
- T(I(void 0, !0));
1976
- });
1977
- });
1978
- }), e), O), _ = function(E) {
1979
- var T, B = Object.create(u, (T = {}, t(T, A, {
1980
- value: E,
1981
- writable: !0
1982
- }), t(T, h, {
1983
- value: null,
1984
- writable: !0
1985
- }), t(T, c, {
1986
- value: null,
1987
- writable: !0
1988
- }), t(T, b, {
1989
- value: null,
1990
- writable: !0
1991
- }), t(T, y, {
1992
- value: E._readableState.endEmitted,
1993
- writable: !0
1994
- }), t(T, N, {
1995
- value: function(k, P) {
1996
- var V = B[A].read();
1997
- V ? (B[M] = null, B[h] = null, B[c] = null, k(I(V, !1))) : (B[h] = k, B[c] = P);
1998
- },
1999
- writable: !0
2000
- }), T));
2001
- return B[M] = null, a(E, function(q) {
2002
- if (q && q.code !== "ERR_STREAM_PREMATURE_CLOSE") {
2003
- var k = B[c];
2004
- k !== null && (B[M] = null, B[h] = null, B[c] = null, k(q)), B[b] = q;
2005
- return;
2006
- }
2007
- var P = B[h];
2008
- P !== null && (B[M] = null, B[h] = null, B[c] = null, P(I(void 0, !0))), B[y] = !0;
2009
- }), E.on("readable", L.bind(null, B)), B;
2010
- };
2011
- return Ke = _, Ke;
2012
- }
2013
- var Ye, Pt;
2014
- function Dn() {
2015
- return Pt || (Pt = 1, Ye = function() {
2016
- throw new Error("Readable.from is not available in the browser");
2017
- }), Ye;
2018
- }
2019
- var Xe, Nt;
2020
- function lr() {
2021
- if (Nt) return Xe;
2022
- Nt = 1, Xe = P;
2023
- var e;
2024
- P.ReadableState = k, Xt.EventEmitter;
2025
- var t = function(i, v) {
2026
- return i.listeners(v).length;
2027
- }, r = Jt, o = Ce.Buffer, a = (typeof G < "u" ? G : typeof window < "u" ? window : typeof self < "u" ? self : {}).Uint8Array || function() {
2028
- };
2029
- function h(n) {
2030
- return o.from(n);
2031
- }
2032
- function c(n) {
2033
- return o.isBuffer(n) || n instanceof a;
2034
- }
2035
- var b = ut, y;
2036
- b && b.debuglog ? y = b.debuglog("stream") : y = function() {
2037
- };
2038
- var M = gn(), N = ar, A = fr, I = A.getHighWaterMark, x = ce.codes, L = x.ERR_INVALID_ARG_TYPE, C = x.ERR_STREAM_PUSH_AFTER_EOF, O = x.ERR_METHOD_NOT_IMPLEMENTED, u = x.ERR_STREAM_UNSHIFT_AFTER_END_EVENT, _, S, E;
2039
- se(P, r);
2040
- var T = N.errorOrDestroy, B = ["error", "close", "destroy", "pause", "resume"];
2041
- function q(n, i, v) {
2042
- if (typeof n.prependListener == "function") return n.prependListener(i, v);
2043
- !n._events || !n._events[i] ? n.on(i, v) : Array.isArray(n._events[i]) ? n._events[i].unshift(v) : n._events[i] = [v, n._events[i]];
2044
- }
2045
- function k(n, i, v) {
2046
- e = e || ge(), n = n || {}, typeof v != "boolean" && (v = i instanceof e), this.objectMode = !!n.objectMode, v && (this.objectMode = this.objectMode || !!n.readableObjectMode), this.highWaterMark = I(this, n, "readableHighWaterMark", v), this.buffer = new M(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.paused = !0, this.emitClose = n.emitClose !== !1, this.autoDestroy = !!n.autoDestroy, this.destroyed = !1, this.defaultEncoding = n.defaultEncoding || "utf8", this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, n.encoding && (_ || (_ = Lt().StringDecoder), this.decoder = new _(n.encoding), this.encoding = n.encoding);
2047
- }
2048
- function P(n) {
2049
- if (e = e || ge(), !(this instanceof P)) return new P(n);
2050
- var i = this instanceof e;
2051
- this._readableState = new k(n, this, i), this.readable = !0, n && (typeof n.read == "function" && (this._read = n.read), typeof n.destroy == "function" && (this._destroy = n.destroy)), r.call(this);
2052
- }
2053
- Object.defineProperty(P.prototype, "destroyed", {
2054
- // making it explicit this property is not enumerable
2055
- // because otherwise some prototype manipulation in
2056
- // userland will fail
2057
- enumerable: !1,
2058
- get: function() {
2059
- return this._readableState === void 0 ? !1 : this._readableState.destroyed;
2060
- },
2061
- set: function(i) {
2062
- this._readableState && (this._readableState.destroyed = i);
2063
- }
2064
- }), P.prototype.destroy = N.destroy, P.prototype._undestroy = N.undestroy, P.prototype._destroy = function(n, i) {
2065
- i(n);
2066
- }, P.prototype.push = function(n, i) {
2067
- var v = this._readableState, R;
2068
- return v.objectMode ? R = !0 : typeof n == "string" && (i = i || v.defaultEncoding, i !== v.encoding && (n = o.from(n, i), i = ""), R = !0), V(this, n, i, !1, R);
2069
- }, P.prototype.unshift = function(n) {
2070
- return V(this, n, null, !0, !1);
2071
- };
2072
- function V(n, i, v, R, $) {
2073
- y("readableAddChunk", i);
2074
- var F = n._readableState;
2075
- if (i === null)
2076
- F.reading = !1, ie(n, F);
2077
- else {
2078
- var W;
2079
- if ($ || (W = X(F, i)), W)
2080
- T(n, W);
2081
- else if (F.objectMode || i && i.length > 0)
2082
- if (typeof i != "string" && !F.objectMode && Object.getPrototypeOf(i) !== o.prototype && (i = h(i)), R)
2083
- F.endEmitted ? T(n, new u()) : Y(n, F, i, !0);
2084
- else if (F.ended)
2085
- T(n, new C());
2086
- else {
2087
- if (F.destroyed)
2088
- return !1;
2089
- F.reading = !1, F.decoder && !v ? (i = F.decoder.write(i), F.objectMode || i.length !== 0 ? Y(n, F, i, !1) : z(n, F)) : Y(n, F, i, !1);
2090
- }
2091
- else R || (F.reading = !1, z(n, F));
2092
- }
2093
- return !F.ended && (F.length < F.highWaterMark || F.length === 0);
2094
- }
2095
- function Y(n, i, v, R) {
2096
- i.flowing && i.length === 0 && !i.sync ? (i.awaitDrain = 0, n.emit("data", v)) : (i.length += i.objectMode ? 1 : v.length, R ? i.buffer.unshift(v) : i.buffer.push(v), i.needReadable && Q(n)), z(n, i);
2097
- }
2098
- function X(n, i) {
2099
- var v;
2100
- return !c(i) && typeof i != "string" && i !== void 0 && !n.objectMode && (v = new L("chunk", ["string", "Buffer", "Uint8Array"], i)), v;
2101
- }
2102
- P.prototype.isPaused = function() {
2103
- return this._readableState.flowing === !1;
2104
- }, P.prototype.setEncoding = function(n) {
2105
- _ || (_ = Lt().StringDecoder);
2106
- var i = new _(n);
2107
- this._readableState.decoder = i, this._readableState.encoding = this._readableState.decoder.encoding;
2108
- for (var v = this._readableState.buffer.head, R = ""; v !== null; )
2109
- R += i.write(v.data), v = v.next;
2110
- return this._readableState.buffer.clear(), R !== "" && this._readableState.buffer.push(R), this._readableState.length = R.length, this;
2111
- };
2112
- var re = 1073741824;
2113
- function J(n) {
2114
- return n >= re ? n = re : (n--, n |= n >>> 1, n |= n >>> 2, n |= n >>> 4, n |= n >>> 8, n |= n >>> 16, n++), n;
2115
- }
2116
- function ne(n, i) {
2117
- return n <= 0 || i.length === 0 && i.ended ? 0 : i.objectMode ? 1 : n !== n ? i.flowing && i.length ? i.buffer.head.data.length : i.length : (n > i.highWaterMark && (i.highWaterMark = J(n)), n <= i.length ? n : i.ended ? i.length : (i.needReadable = !0, 0));
2118
- }
2119
- P.prototype.read = function(n) {
2120
- y("read", n), n = parseInt(n, 10);
2121
- var i = this._readableState, v = n;
2122
- if (n !== 0 && (i.emittedReadable = !1), n === 0 && i.needReadable && ((i.highWaterMark !== 0 ? i.length >= i.highWaterMark : i.length > 0) || i.ended))
2123
- return y("read: emitReadable", i.length, i.ended), i.length === 0 && i.ended ? d(this) : Q(this), null;
2124
- if (n = ne(n, i), n === 0 && i.ended)
2125
- return i.length === 0 && d(this), null;
2126
- var R = i.needReadable;
2127
- y("need readable", R), (i.length === 0 || i.length - n < i.highWaterMark) && (R = !0, y("length less than watermark", R)), i.ended || i.reading ? (R = !1, y("reading or ended", R)) : R && (y("do read"), i.reading = !0, i.sync = !0, i.length === 0 && (i.needReadable = !0), this._read(i.highWaterMark), i.sync = !1, i.reading || (n = ne(v, i)));
2128
- var $;
2129
- return n > 0 ? $ = f(n, i) : $ = null, $ === null ? (i.needReadable = i.length <= i.highWaterMark, n = 0) : (i.length -= n, i.awaitDrain = 0), i.length === 0 && (i.ended || (i.needReadable = !0), v !== n && i.ended && d(this)), $ !== null && this.emit("data", $), $;
2130
- };
2131
- function ie(n, i) {
2132
- if (y("onEofChunk"), !i.ended) {
2133
- if (i.decoder) {
2134
- var v = i.decoder.end();
2135
- v && v.length && (i.buffer.push(v), i.length += i.objectMode ? 1 : v.length);
2136
- }
2137
- i.ended = !0, i.sync ? Q(n) : (i.needReadable = !1, i.emittedReadable || (i.emittedReadable = !0, ee(n)));
2138
- }
2139
- }
2140
- function Q(n) {
2141
- var i = n._readableState;
2142
- y("emitReadable", i.needReadable, i.emittedReadable), i.needReadable = !1, i.emittedReadable || (y("emitReadable", i.flowing), i.emittedReadable = !0, U.nextTick(ee, n));
2143
- }
2144
- function ee(n) {
2145
- var i = n._readableState;
2146
- y("emitReadable_", i.destroyed, i.length, i.ended), !i.destroyed && (i.length || i.ended) && (n.emit("readable"), i.emittedReadable = !1), i.needReadable = !i.flowing && !i.ended && i.length <= i.highWaterMark, s(n);
2147
- }
2148
- function z(n, i) {
2149
- i.readingMore || (i.readingMore = !0, U.nextTick(te, n, i));
2150
- }
2151
- function te(n, i) {
2152
- for (; !i.reading && !i.ended && (i.length < i.highWaterMark || i.flowing && i.length === 0); ) {
2153
- var v = i.length;
2154
- if (y("maybeReadMore read 0"), n.read(0), v === i.length)
2155
- break;
2156
- }
2157
- i.readingMore = !1;
2158
- }
2159
- P.prototype._read = function(n) {
2160
- T(this, new O("_read()"));
2161
- }, P.prototype.pipe = function(n, i) {
2162
- var v = this, R = this._readableState;
2163
- switch (R.pipesCount) {
2164
- case 0:
2165
- R.pipes = n;
2166
- break;
2167
- case 1:
2168
- R.pipes = [R.pipes, n];
2169
- break;
2170
- default:
2171
- R.pipes.push(n);
2172
- break;
2173
- }
2174
- R.pipesCount += 1, y("pipe count=%d opts=%j", R.pipesCount, i);
2175
- var $ = (!i || i.end !== !1) && n !== U.stdout && n !== U.stderr, F = $ ? fe : be;
2176
- R.endEmitted ? U.nextTick(F) : v.once("end", F), n.on("unpipe", W);
2177
- function W(de, he) {
2178
- y("onunpipe"), de === v && he && he.hasUnpiped === !1 && (he.hasUnpiped = !0, gt());
2179
- }
2180
- function fe() {
2181
- y("onend"), n.end();
2182
- }
2183
- var g = oe(v);
2184
- n.on("drain", g);
2185
- var _e = !1;
2186
- function gt() {
2187
- y("cleanup"), n.removeListener("close", Ie), n.removeListener("finish", ke), n.removeListener("drain", g), n.removeListener("error", Be), n.removeListener("unpipe", W), v.removeListener("end", fe), v.removeListener("end", be), v.removeListener("data", bt), _e = !0, R.awaitDrain && (!n._writableState || n._writableState.needDrain) && g();
2188
- }
2189
- v.on("data", bt);
2190
- function bt(de) {
2191
- y("ondata");
2192
- var he = n.write(de);
2193
- y("dest.write", he), he === !1 && ((R.pipesCount === 1 && R.pipes === n || R.pipesCount > 1 && j(R.pipes, n) !== -1) && !_e && (y("false write response, pause", R.awaitDrain), R.awaitDrain++), v.pause());
2194
- }
2195
- function Be(de) {
2196
- y("onerror", de), be(), n.removeListener("error", Be), t(n, "error") === 0 && T(n, de);
2197
- }
2198
- q(n, "error", Be);
2199
- function Ie() {
2200
- n.removeListener("finish", ke), be();
2201
- }
2202
- n.once("close", Ie);
2203
- function ke() {
2204
- y("onfinish"), n.removeListener("close", Ie), be();
2205
- }
2206
- n.once("finish", ke);
2207
- function be() {
2208
- y("unpipe"), v.unpipe(n);
2209
- }
2210
- return n.emit("pipe", v), R.flowing || (y("pipe resume"), v.resume()), n;
2211
- };
2212
- function oe(n) {
2213
- return function() {
2214
- var v = n._readableState;
2215
- y("pipeOnDrain", v.awaitDrain), v.awaitDrain && v.awaitDrain--, v.awaitDrain === 0 && t(n, "data") && (v.flowing = !0, s(n));
2216
- };
2217
- }
2218
- P.prototype.unpipe = function(n) {
2219
- var i = this._readableState, v = {
2220
- hasUnpiped: !1
2221
- };
2222
- if (i.pipesCount === 0) return this;
2223
- if (i.pipesCount === 1)
2224
- return n && n !== i.pipes ? this : (n || (n = i.pipes), i.pipes = null, i.pipesCount = 0, i.flowing = !1, n && n.emit("unpipe", this, v), this);
2225
- if (!n) {
2226
- var R = i.pipes, $ = i.pipesCount;
2227
- i.pipes = null, i.pipesCount = 0, i.flowing = !1;
2228
- for (var F = 0; F < $; F++) R[F].emit("unpipe", this, {
2229
- hasUnpiped: !1
2230
- });
2231
- return this;
2232
- }
2233
- var W = j(i.pipes, n);
2234
- return W === -1 ? this : (i.pipes.splice(W, 1), i.pipesCount -= 1, i.pipesCount === 1 && (i.pipes = i.pipes[0]), n.emit("unpipe", this, v), this);
2235
- }, P.prototype.on = function(n, i) {
2236
- var v = r.prototype.on.call(this, n, i), R = this._readableState;
2237
- return n === "data" ? (R.readableListening = this.listenerCount("readable") > 0, R.flowing !== !1 && this.resume()) : n === "readable" && !R.endEmitted && !R.readableListening && (R.readableListening = R.needReadable = !0, R.flowing = !1, R.emittedReadable = !1, y("on readable", R.length, R.reading), R.length ? Q(this) : R.reading || U.nextTick(p, this)), v;
2238
- }, P.prototype.addListener = P.prototype.on, P.prototype.removeListener = function(n, i) {
2239
- var v = r.prototype.removeListener.call(this, n, i);
2240
- return n === "readable" && U.nextTick(l, this), v;
2241
- }, P.prototype.removeAllListeners = function(n) {
2242
- var i = r.prototype.removeAllListeners.apply(this, arguments);
2243
- return (n === "readable" || n === void 0) && U.nextTick(l, this), i;
2244
- };
2245
- function l(n) {
2246
- var i = n._readableState;
2247
- i.readableListening = n.listenerCount("readable") > 0, i.resumeScheduled && !i.paused ? i.flowing = !0 : n.listenerCount("data") > 0 && n.resume();
2248
- }
2249
- function p(n) {
2250
- y("readable nexttick read 0"), n.read(0);
2251
- }
2252
- P.prototype.resume = function() {
2253
- var n = this._readableState;
2254
- return n.flowing || (y("resume"), n.flowing = !n.readableListening, m(this, n)), n.paused = !1, this;
2255
- };
2256
- function m(n, i) {
2257
- i.resumeScheduled || (i.resumeScheduled = !0, U.nextTick(D, n, i));
2258
- }
2259
- function D(n, i) {
2260
- y("resume", i.reading), i.reading || n.read(0), i.resumeScheduled = !1, n.emit("resume"), s(n), i.flowing && !i.reading && n.read(0);
2261
- }
2262
- P.prototype.pause = function() {
2263
- return y("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (y("pause"), this._readableState.flowing = !1, this.emit("pause")), this._readableState.paused = !0, this;
2264
- };
2265
- function s(n) {
2266
- var i = n._readableState;
2267
- for (y("flow", i.flowing); i.flowing && n.read() !== null; ) ;
2268
- }
2269
- P.prototype.wrap = function(n) {
2270
- var i = this, v = this._readableState, R = !1;
2271
- n.on("end", function() {
2272
- if (y("wrapped end"), v.decoder && !v.ended) {
2273
- var W = v.decoder.end();
2274
- W && W.length && i.push(W);
2275
- }
2276
- i.push(null);
2277
- }), n.on("data", function(W) {
2278
- if (y("wrapped data"), v.decoder && (W = v.decoder.write(W)), !(v.objectMode && W == null) && !(!v.objectMode && (!W || !W.length))) {
2279
- var fe = i.push(W);
2280
- fe || (R = !0, n.pause());
2281
- }
2282
- });
2283
- for (var $ in n)
2284
- this[$] === void 0 && typeof n[$] == "function" && (this[$] = /* @__PURE__ */ function(fe) {
2285
- return function() {
2286
- return n[fe].apply(n, arguments);
2287
- };
2288
- }($));
2289
- for (var F = 0; F < B.length; F++)
2290
- n.on(B[F], this.emit.bind(this, B[F]));
2291
- return this._read = function(W) {
2292
- y("wrapped _read", W), R && (R = !1, n.resume());
2293
- }, this;
2294
- }, typeof Symbol == "function" && (P.prototype[Symbol.asyncIterator] = function() {
2295
- return S === void 0 && (S = Nn()), S(this);
2296
- }), Object.defineProperty(P.prototype, "readableHighWaterMark", {
2297
- // making it explicit this property is not enumerable
2298
- // because otherwise some prototype manipulation in
2299
- // userland will fail
2300
- enumerable: !1,
2301
- get: function() {
2302
- return this._readableState.highWaterMark;
2303
- }
2304
- }), Object.defineProperty(P.prototype, "readableBuffer", {
2305
- // making it explicit this property is not enumerable
2306
- // because otherwise some prototype manipulation in
2307
- // userland will fail
2308
- enumerable: !1,
2309
- get: function() {
2310
- return this._readableState && this._readableState.buffer;
2311
- }
2312
- }), Object.defineProperty(P.prototype, "readableFlowing", {
2313
- // making it explicit this property is not enumerable
2314
- // because otherwise some prototype manipulation in
2315
- // userland will fail
2316
- enumerable: !1,
2317
- get: function() {
2318
- return this._readableState.flowing;
2319
- },
2320
- set: function(i) {
2321
- this._readableState && (this._readableState.flowing = i);
2322
- }
2323
- }), P._fromList = f, Object.defineProperty(P.prototype, "readableLength", {
2324
- // making it explicit this property is not enumerable
2325
- // because otherwise some prototype manipulation in
2326
- // userland will fail
2327
- enumerable: !1,
2328
- get: function() {
2329
- return this._readableState.length;
2330
- }
2331
- });
2332
- function f(n, i) {
2333
- if (i.length === 0) return null;
2334
- var v;
2335
- return i.objectMode ? v = i.buffer.shift() : !n || n >= i.length ? (i.decoder ? v = i.buffer.join("") : i.buffer.length === 1 ? v = i.buffer.first() : v = i.buffer.concat(i.length), i.buffer.clear()) : v = i.buffer.consume(n, i.decoder), v;
2336
- }
2337
- function d(n) {
2338
- var i = n._readableState;
2339
- y("endReadable", i.endEmitted), i.endEmitted || (i.ended = !0, U.nextTick(w, i, n));
2340
- }
2341
- function w(n, i) {
2342
- if (y("endReadableNT", n.endEmitted, n.length), !n.endEmitted && n.length === 0 && (n.endEmitted = !0, i.readable = !1, i.emit("end"), n.autoDestroy)) {
2343
- var v = i._writableState;
2344
- (!v || v.autoDestroy && v.finished) && i.destroy();
2345
- }
2346
- }
2347
- typeof Symbol == "function" && (P.from = function(n, i) {
2348
- return E === void 0 && (E = Dn()), E(P, n, i);
2349
- });
2350
- function j(n, i) {
2351
- for (var v = 0, R = n.length; v < R; v++)
2352
- if (n[v] === i) return v;
2353
- return -1;
2354
- }
2355
- return Xe;
2356
- }
2357
- var cr = ae, Ne = ce.codes, Bn = Ne.ERR_METHOD_NOT_IMPLEMENTED, In = Ne.ERR_MULTIPLE_CALLBACK, kn = Ne.ERR_TRANSFORM_ALREADY_TRANSFORMING, Un = Ne.ERR_TRANSFORM_WITH_LENGTH_0, De = ge();
2358
- se(ae, De);
2359
- function Fn(e, t) {
2360
- var r = this._transformState;
2361
- r.transforming = !1;
2362
- var o = r.writecb;
2363
- if (o === null)
2364
- return this.emit("error", new In());
2365
- r.writechunk = null, r.writecb = null, t != null && this.push(t), o(e);
2366
- var a = this._readableState;
2367
- a.reading = !1, (a.needReadable || a.length < a.highWaterMark) && this._read(a.highWaterMark);
2368
- }
2369
- function ae(e) {
2370
- if (!(this instanceof ae)) return new ae(e);
2371
- De.call(this, e), this._transformState = {
2372
- afterTransform: Fn.bind(this),
2373
- needTransform: !1,
2374
- transforming: !1,
2375
- writecb: null,
2376
- writechunk: null,
2377
- writeencoding: null
2378
- }, this._readableState.needReadable = !0, this._readableState.sync = !1, e && (typeof e.transform == "function" && (this._transform = e.transform), typeof e.flush == "function" && (this._flush = e.flush)), this.on("prefinish", qn);
2379
- }
2380
- function qn() {
2381
- var e = this;
2382
- typeof this._flush == "function" && !this._readableState.destroyed ? this._flush(function(t, r) {
2383
- Dt(e, t, r);
2384
- }) : Dt(this, null, null);
2385
- }
2386
- ae.prototype.push = function(e, t) {
2387
- return this._transformState.needTransform = !1, De.prototype.push.call(this, e, t);
2388
- };
2389
- ae.prototype._transform = function(e, t, r) {
2390
- r(new Bn("_transform()"));
2391
- };
2392
- ae.prototype._write = function(e, t, r) {
2393
- var o = this._transformState;
2394
- if (o.writecb = r, o.writechunk = e, o.writeencoding = t, !o.transforming) {
2395
- var a = this._readableState;
2396
- (o.needTransform || a.needReadable || a.length < a.highWaterMark) && this._read(a.highWaterMark);
2397
- }
2398
- };
2399
- ae.prototype._read = function(e) {
2400
- var t = this._transformState;
2401
- t.writechunk !== null && !t.transforming ? (t.transforming = !0, this._transform(t.writechunk, t.writeencoding, t.afterTransform)) : t.needTransform = !0;
2402
- };
2403
- ae.prototype._destroy = function(e, t) {
2404
- De.prototype._destroy.call(this, e, function(r) {
2405
- t(r);
2406
- });
2407
- };
2408
- function Dt(e, t, r) {
2409
- if (t) return e.emit("error", t);
2410
- if (r != null && e.push(r), e._writableState.length) throw new Un();
2411
- if (e._transformState.transforming) throw new kn();
2412
- return e.push(null);
2413
- }
2414
- var Wn = ve, dr = cr;
2415
- se(ve, dr);
2416
- function ve(e) {
2417
- if (!(this instanceof ve)) return new ve(e);
2418
- dr.call(this, e);
2419
- }
2420
- ve.prototype._transform = function(e, t, r) {
2421
- r(null, e);
2422
- };
2423
- var Je;
2424
- function Hn(e) {
2425
- var t = !1;
2426
- return function() {
2427
- t || (t = !0, e.apply(void 0, arguments));
2428
- };
2429
- }
2430
- var hr = ce.codes, $n = hr.ERR_MISSING_ARGS, xn = hr.ERR_STREAM_DESTROYED;
2431
- function Bt(e) {
2432
- if (e) throw e;
2433
- }
2434
- function Gn(e) {
2435
- return e.setHeader && typeof e.abort == "function";
2436
- }
2437
- function Vn(e, t, r, o) {
2438
- o = Hn(o);
2439
- var a = !1;
2440
- e.on("close", function() {
2441
- a = !0;
2442
- }), Je === void 0 && (Je = ht), Je(e, {
2443
- readable: t,
2444
- writable: r
2445
- }, function(c) {
2446
- if (c) return o(c);
2447
- a = !0, o();
2448
- });
2449
- var h = !1;
2450
- return function(c) {
2451
- if (!a && !h) {
2452
- if (h = !0, Gn(e)) return e.abort();
2453
- if (typeof e.destroy == "function") return e.destroy();
2454
- o(c || new xn("pipe"));
2455
- }
2456
- };
2457
- }
2458
- function It(e) {
2459
- e();
2460
- }
2461
- function zn(e, t) {
2462
- return e.pipe(t);
2463
- }
2464
- function Kn(e) {
2465
- return !e.length || typeof e[e.length - 1] != "function" ? Bt : e.pop();
2466
- }
2467
- function Yn() {
2468
- for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
2469
- t[r] = arguments[r];
2470
- var o = Kn(t);
2471
- if (Array.isArray(t[0]) && (t = t[0]), t.length < 2)
2472
- throw new $n("streams");
2473
- var a, h = t.map(function(c, b) {
2474
- var y = b < t.length - 1, M = b > 0;
2475
- return Vn(c, y, M, function(N) {
2476
- a || (a = N), N && h.forEach(It), !y && (h.forEach(It), o(a));
2477
- });
2478
- });
2479
- return t.reduce(zn);
2480
- }
2481
- var Xn = Yn;
2482
- (function(e, t) {
2483
- t = e.exports = lr(), t.Stream = t, t.Readable = t, t.Writable = sr(), t.Duplex = ge(), t.Transform = cr, t.PassThrough = Wn, t.finished = ht, t.pipeline = Xn;
2484
- })(Qe, Qe.exports);
2485
- var pr = Qe.exports, kt = ft, Jn = se, yr = pr, we = Le.readyStates = {
2486
- UNSENT: 0,
2487
- OPENED: 1,
2488
- HEADERS_RECEIVED: 2,
2489
- LOADING: 3,
2490
- DONE: 4
2491
- }, pt = Le.IncomingMessage = function(e, t, r, o) {
2492
- var a = this;
2493
- if (yr.Readable.call(a), a._mode = r, a.headers = {}, a.rawHeaders = [], a.trailers = {}, a.rawTrailers = [], a.on("end", function() {
2494
- U.nextTick(function() {
2495
- a.emit("close");
2496
- });
2497
- }), r === "fetch") {
2498
- let N = function() {
2499
- c.read().then(function(A) {
2500
- if (!a._destroyed) {
2501
- if (o(A.done), A.done) {
2502
- a.push(null);
2503
- return;
2504
- }
2505
- a.push(ue.from(A.value)), N();
2506
- }
2507
- }).catch(function(A) {
2508
- o(!0), a._destroyed || a.emit("error", A);
2509
- });
2510
- };
2511
- if (a._fetchResponse = t, a.url = t.url, a.statusCode = t.status, a.statusMessage = t.statusText, t.headers.forEach(function(A, I) {
2512
- a.headers[I.toLowerCase()] = A, a.rawHeaders.push(I, A);
2513
- }), kt.writableStream) {
2514
- var h = new WritableStream({
2515
- write: function(A) {
2516
- return o(!1), new Promise(function(I, x) {
2517
- a._destroyed ? x() : a.push(ue.from(A)) ? I() : a._resumeFetch = I;
2518
- });
2519
- },
2520
- close: function() {
2521
- o(!0), a._destroyed || a.push(null);
2522
- },
2523
- abort: function(A) {
2524
- o(!0), a._destroyed || a.emit("error", A);
2525
- }
2526
- });
2527
- try {
2528
- t.body.pipeTo(h).catch(function(A) {
2529
- o(!0), a._destroyed || a.emit("error", A);
2530
- });
2531
- return;
2532
- } catch {
2533
- }
2534
- }
2535
- var c = t.body.getReader();
2536
- N();
2537
- } else {
2538
- a._xhr = e, a._pos = 0, a.url = e.responseURL, a.statusCode = e.status, a.statusMessage = e.statusText;
2539
- var b = e.getAllResponseHeaders().split(/\r?\n/);
2540
- if (b.forEach(function(N) {
2541
- var A = N.match(/^([^:]+):\s*(.*)/);
2542
- if (A) {
2543
- var I = A[1].toLowerCase();
2544
- I === "set-cookie" ? (a.headers[I] === void 0 && (a.headers[I] = []), a.headers[I].push(A[2])) : a.headers[I] !== void 0 ? a.headers[I] += ", " + A[2] : a.headers[I] = A[2], a.rawHeaders.push(A[1], A[2]);
2545
- }
2546
- }), a._charset = "x-user-defined", !kt.overrideMimeType) {
2547
- var y = a.rawHeaders["mime-type"];
2548
- if (y) {
2549
- var M = y.match(/;\s*charset=([^;])(;|$)/);
2550
- M && (a._charset = M[1].toLowerCase());
2551
- }
2552
- a._charset || (a._charset = "utf-8");
2553
- }
2554
- }
2555
- };
2556
- Jn(pt, yr.Readable);
2557
- pt.prototype._read = function() {
2558
- var e = this, t = e._resumeFetch;
2559
- t && (e._resumeFetch = null, t());
2560
- };
2561
- pt.prototype._onXHRProgress = function(e) {
2562
- var t = this, r = t._xhr, o = null;
2563
- switch (t._mode) {
2564
- case "text":
2565
- if (o = r.responseText, o.length > t._pos) {
2566
- var a = o.substr(t._pos);
2567
- if (t._charset === "x-user-defined") {
2568
- for (var h = ue.alloc(a.length), c = 0; c < a.length; c++)
2569
- h[c] = a.charCodeAt(c) & 255;
2570
- t.push(h);
2571
- } else
2572
- t.push(a, t._charset);
2573
- t._pos = o.length;
2574
- }
2575
- break;
2576
- case "arraybuffer":
2577
- if (r.readyState !== we.DONE || !r.response)
2578
- break;
2579
- o = r.response, t.push(ue.from(new Uint8Array(o)));
2580
- break;
2581
- case "moz-chunked-arraybuffer":
2582
- if (o = r.response, r.readyState !== we.LOADING || !o)
2583
- break;
2584
- t.push(ue.from(new Uint8Array(o)));
2585
- break;
2586
- case "ms-stream":
2587
- if (o = r.response, r.readyState !== we.LOADING)
2588
- break;
2589
- var b = new G.MSStreamReader();
2590
- b.onprogress = function() {
2591
- b.result.byteLength > t._pos && (t.push(ue.from(new Uint8Array(b.result.slice(t._pos)))), t._pos = b.result.byteLength);
2592
- }, b.onload = function() {
2593
- e(!0), t.push(null);
2594
- }, b.readAsArrayBuffer(o);
2595
- break;
2596
- }
2597
- t._xhr.readyState === we.DONE && t._mode !== "ms-stream" && (e(!0), t.push(null));
2598
- };
2599
- var le = ft, Zn = se, gr = Le, yt = pr, Qn = gr.IncomingMessage, Ut = gr.readyStates;
2600
- function ei(e, t) {
2601
- return le.fetch && t ? "fetch" : le.mozchunkedarraybuffer ? "moz-chunked-arraybuffer" : le.msstream ? "ms-stream" : le.arraybuffer && e ? "arraybuffer" : "text";
2602
- }
2603
- var K = Wt.exports = function(e) {
2604
- var t = this;
2605
- yt.Writable.call(t), t._opts = e, t._body = [], t._headers = {}, e.auth && t.setHeader("Authorization", "Basic " + ue.from(e.auth).toString("base64")), Object.keys(e.headers).forEach(function(a) {
2606
- t.setHeader(a, e.headers[a]);
2607
- });
2608
- var r, o = !0;
2609
- if (e.mode === "disable-fetch" || "requestTimeout" in e && !le.abortController)
2610
- o = !1, r = !0;
2611
- else if (e.mode === "prefer-streaming")
2612
- r = !1;
2613
- else if (e.mode === "allow-wrong-content-type")
2614
- r = !le.overrideMimeType;
2615
- else if (!e.mode || e.mode === "default" || e.mode === "prefer-fast")
2616
- r = !0;
2617
- else
2618
- throw new Error("Invalid value for opts.mode");
2619
- t._mode = ei(r, o), t._fetchTimer = null, t._socketTimeout = null, t._socketTimer = null, t.on("finish", function() {
2620
- t._onFinish();
2621
- });
2622
- };
2623
- Zn(K, yt.Writable);
2624
- K.prototype.setHeader = function(e, t) {
2625
- var r = this, o = e.toLowerCase();
2626
- ri.indexOf(o) === -1 && (r._headers[o] = {
2627
- name: e,
2628
- value: t
2629
- });
2630
- };
2631
- K.prototype.getHeader = function(e) {
2632
- var t = this._headers[e.toLowerCase()];
2633
- return t ? t.value : null;
2634
- };
2635
- K.prototype.removeHeader = function(e) {
2636
- var t = this;
2637
- delete t._headers[e.toLowerCase()];
2638
- };
2639
- K.prototype._onFinish = function() {
2640
- var e = this;
2641
- if (!e._destroyed) {
2642
- var t = e._opts;
2643
- "timeout" in t && t.timeout !== 0 && e.setTimeout(t.timeout);
2644
- var r = e._headers, o = null;
2645
- t.method !== "GET" && t.method !== "HEAD" && (o = new Blob(e._body, {
2646
- type: (r["content-type"] || {}).value || ""
2647
- }));
2648
- var a = [];
2649
- if (Object.keys(r).forEach(function(y) {
2650
- var M = r[y].name, N = r[y].value;
2651
- Array.isArray(N) ? N.forEach(function(A) {
2652
- a.push([M, A]);
2653
- }) : a.push([M, N]);
2654
- }), e._mode === "fetch") {
2655
- var h = null;
2656
- if (le.abortController) {
2657
- var c = new AbortController();
2658
- h = c.signal, e._fetchAbortController = c, "requestTimeout" in t && t.requestTimeout !== 0 && (e._fetchTimer = G.setTimeout(function() {
2659
- e.emit("requestTimeout"), e._fetchAbortController && e._fetchAbortController.abort();
2660
- }, t.requestTimeout));
2661
- }
2662
- G.fetch(e._opts.url, {
2663
- method: e._opts.method,
2664
- headers: a,
2665
- body: o || void 0,
2666
- mode: "cors",
2667
- credentials: t.withCredentials ? "include" : "same-origin",
2668
- signal: h
2669
- }).then(function(y) {
2670
- e._fetchResponse = y, e._resetTimers(!1), e._connect();
2671
- }, function(y) {
2672
- e._resetTimers(!0), e._destroyed || e.emit("error", y);
2673
- });
2674
- } else {
2675
- var b = e._xhr = new G.XMLHttpRequest();
2676
- try {
2677
- b.open(e._opts.method, e._opts.url, !0);
2678
- } catch (y) {
2679
- U.nextTick(function() {
2680
- e.emit("error", y);
2681
- });
2682
- return;
2683
- }
2684
- "responseType" in b && (b.responseType = e._mode), "withCredentials" in b && (b.withCredentials = !!t.withCredentials), e._mode === "text" && "overrideMimeType" in b && b.overrideMimeType("text/plain; charset=x-user-defined"), "requestTimeout" in t && (b.timeout = t.requestTimeout, b.ontimeout = function() {
2685
- e.emit("requestTimeout");
2686
- }), a.forEach(function(y) {
2687
- b.setRequestHeader(y[0], y[1]);
2688
- }), e._response = null, b.onreadystatechange = function() {
2689
- switch (b.readyState) {
2690
- case Ut.LOADING:
2691
- case Ut.DONE:
2692
- e._onXHRProgress();
2693
- break;
2694
- }
2695
- }, e._mode === "moz-chunked-arraybuffer" && (b.onprogress = function() {
2696
- e._onXHRProgress();
2697
- }), b.onerror = function() {
2698
- e._destroyed || (e._resetTimers(!0), e.emit("error", new Error("XHR error")));
2699
- };
2700
- try {
2701
- b.send(o);
2702
- } catch (y) {
2703
- U.nextTick(function() {
2704
- e.emit("error", y);
2705
- });
2706
- return;
2707
- }
2708
- }
2709
- }
2710
- };
2711
- function ti(e) {
2712
- try {
2713
- var t = e.status;
2714
- return t !== null && t !== 0;
2715
- } catch {
2716
- return !1;
2717
- }
2718
- }
2719
- K.prototype._onXHRProgress = function() {
2720
- var e = this;
2721
- e._resetTimers(!1), !(!ti(e._xhr) || e._destroyed) && (e._response || e._connect(), e._response._onXHRProgress(e._resetTimers.bind(e)));
2722
- };
2723
- K.prototype._connect = function() {
2724
- var e = this;
2725
- e._destroyed || (e._response = new Qn(e._xhr, e._fetchResponse, e._mode, e._resetTimers.bind(e)), e._response.on("error", function(t) {
2726
- e.emit("error", t);
2727
- }), e.emit("response", e._response));
2728
- };
2729
- K.prototype._write = function(e, t, r) {
2730
- var o = this;
2731
- o._body.push(e), r();
2732
- };
2733
- K.prototype._resetTimers = function(e) {
2734
- var t = this;
2735
- G.clearTimeout(t._socketTimer), t._socketTimer = null, e ? (G.clearTimeout(t._fetchTimer), t._fetchTimer = null) : t._socketTimeout && (t._socketTimer = G.setTimeout(function() {
2736
- t.emit("timeout");
2737
- }, t._socketTimeout));
2738
- };
2739
- K.prototype.abort = K.prototype.destroy = function(e) {
2740
- var t = this;
2741
- t._destroyed = !0, t._resetTimers(!0), t._response && (t._response._destroyed = !0), t._xhr ? t._xhr.abort() : t._fetchAbortController && t._fetchAbortController.abort(), e && t.emit("error", e);
2742
- };
2743
- K.prototype.end = function(e, t, r) {
2744
- var o = this;
2745
- typeof e == "function" && (r = e, e = void 0), yt.Writable.prototype.end.call(o, e, t, r);
2746
- };
2747
- K.prototype.setTimeout = function(e, t) {
2748
- var r = this;
2749
- t && r.once("timeout", t), r._socketTimeout = e, r._resetTimers(!1);
2750
- };
2751
- K.prototype.flushHeaders = function() {
2752
- };
2753
- K.prototype.setNoDelay = function() {
2754
- };
2755
- K.prototype.setSocketKeepAlive = function() {
2756
- };
2757
- var ri = [
2758
- "accept-charset",
2759
- "accept-encoding",
2760
- "access-control-request-headers",
2761
- "access-control-request-method",
2762
- "connection",
2763
- "content-length",
2764
- "cookie",
2765
- "cookie2",
2766
- "date",
2767
- "dnt",
2768
- "expect",
2769
- "host",
2770
- "keep-alive",
2771
- "origin",
2772
- "referer",
2773
- "te",
2774
- "trailer",
2775
- "transfer-encoding",
2776
- "upgrade",
2777
- "via"
2778
- ], ni = Wt.exports, ii = oi, ai = Object.prototype.hasOwnProperty;
2779
- function oi() {
2780
- for (var e = {}, t = 0; t < arguments.length; t++) {
2781
- var r = arguments[t];
2782
- for (var o in r)
2783
- ai.call(r, o) && (e[o] = r[o]);
2784
- }
2785
- return e;
2786
- }
2787
- var fi = {
2788
- 100: "Continue",
2789
- 101: "Switching Protocols",
2790
- 102: "Processing",
2791
- 200: "OK",
2792
- 201: "Created",
2793
- 202: "Accepted",
2794
- 203: "Non-Authoritative Information",
2795
- 204: "No Content",
2796
- 205: "Reset Content",
2797
- 206: "Partial Content",
2798
- 207: "Multi-Status",
2799
- 208: "Already Reported",
2800
- 226: "IM Used",
2801
- 300: "Multiple Choices",
2802
- 301: "Moved Permanently",
2803
- 302: "Found",
2804
- 303: "See Other",
2805
- 304: "Not Modified",
2806
- 305: "Use Proxy",
2807
- 307: "Temporary Redirect",
2808
- 308: "Permanent Redirect",
2809
- 400: "Bad Request",
2810
- 401: "Unauthorized",
2811
- 402: "Payment Required",
2812
- 403: "Forbidden",
2813
- 404: "Not Found",
2814
- 405: "Method Not Allowed",
2815
- 406: "Not Acceptable",
2816
- 407: "Proxy Authentication Required",
2817
- 408: "Request Timeout",
2818
- 409: "Conflict",
2819
- 410: "Gone",
2820
- 411: "Length Required",
2821
- 412: "Precondition Failed",
2822
- 413: "Payload Too Large",
2823
- 414: "URI Too Long",
2824
- 415: "Unsupported Media Type",
2825
- 416: "Range Not Satisfiable",
2826
- 417: "Expectation Failed",
2827
- 418: "I'm a teapot",
2828
- 421: "Misdirected Request",
2829
- 422: "Unprocessable Entity",
2830
- 423: "Locked",
2831
- 424: "Failed Dependency",
2832
- 425: "Unordered Collection",
2833
- 426: "Upgrade Required",
2834
- 428: "Precondition Required",
2835
- 429: "Too Many Requests",
2836
- 431: "Request Header Fields Too Large",
2837
- 451: "Unavailable For Legal Reasons",
2838
- 500: "Internal Server Error",
2839
- 501: "Not Implemented",
2840
- 502: "Bad Gateway",
2841
- 503: "Service Unavailable",
2842
- 504: "Gateway Timeout",
2843
- 505: "HTTP Version Not Supported",
2844
- 506: "Variant Also Negotiates",
2845
- 507: "Insufficient Storage",
2846
- 508: "Loop Detected",
2847
- 509: "Bandwidth Limit Exceeded",
2848
- 510: "Not Extended",
2849
- 511: "Network Authentication Required"
2850
- };
2851
- const si = /* @__PURE__ */ Ft(Sr);
2852
- (function(e) {
2853
- var t = ni, r = Le, o = ii, a = fi, h = si, c = e;
2854
- c.request = function(b, y) {
2855
- typeof b == "string" ? b = h.parse(b) : b = o(b);
2856
- var M = G.location.protocol.search(/^https?:$/) === -1 ? "http:" : "", N = b.protocol || M, A = b.hostname || b.host, I = b.port, x = b.path || "/";
2857
- A && A.indexOf(":") !== -1 && (A = "[" + A + "]"), b.url = (A ? N + "//" + A : "") + (I ? ":" + I : "") + x, b.method = (b.method || "GET").toUpperCase(), b.headers = b.headers || {};
2858
- var L = new t(b);
2859
- return y && L.on("response", y), L;
2860
- }, c.get = function(y, M) {
2861
- var N = c.request(y, M);
2862
- return N.end(), N;
2863
- }, c.ClientRequest = t, c.IncomingMessage = r.IncomingMessage, c.Agent = function() {
2864
- }, c.Agent.defaultMaxSockets = 4, c.globalAgent = new c.Agent(), c.STATUS_CODES = a, c.METHODS = [
2865
- "CHECKOUT",
2866
- "CONNECT",
2867
- "COPY",
2868
- "DELETE",
2869
- "GET",
2870
- "HEAD",
2871
- "LOCK",
2872
- "M-SEARCH",
2873
- "MERGE",
2874
- "MKACTIVITY",
2875
- "MKCOL",
2876
- "MOVE",
2877
- "NOTIFY",
2878
- "OPTIONS",
2879
- "PATCH",
2880
- "POST",
2881
- "PROPFIND",
2882
- "PROPPATCH",
2883
- "PURGE",
2884
- "PUT",
2885
- "REPORT",
2886
- "SEARCH",
2887
- "SUBSCRIBE",
2888
- "TRACE",
2889
- "UNLOCK",
2890
- "UNSUBSCRIBE"
2891
- ];
2892
- })(ot);
2893
- const ui = /* @__PURE__ */ vr(ot), di = /* @__PURE__ */ Er({
2894
- __proto__: null,
2895
- default: ui
2896
- }, [ot]);
2897
- export {
2898
- di as i,
2899
- si as r,
2900
- ot as s
2901
- };