@harbour-enterprises/superdoc 0.9.34 → 0.9.35

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