brsh 2.8.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/release.yml +3 -1
- package/CHANGELOG.md +25 -0
- package/bin/brsh-shell.js +16 -131
- package/bin/exportFileSystem.js +4 -0
- package/bin/zsh-server.js +261 -0
- package/dist/brsh.css +1 -1
- package/dist/shell.es.js +783 -418
- package/dist/shell.es.js.map +1 -1
- package/dist/shell.min.js +30 -15
- package/dist/shell.min.js.map +1 -1
- package/dist/terminal.cjs.js +77 -100
- package/dist/terminal.cjs.js.map +1 -1
- package/dist/terminal.es.js +1382 -603
- package/dist/terminal.es.js.map +1 -1
- package/dist/terminal.min.js +77 -100
- package/dist/terminal.min.js.map +1 -1
- package/dist/wbt.es.js +266 -116
- package/dist/wbt.es.js.map +1 -1
- package/dist/wbt.min.js +7 -5
- package/dist/wbt.min.js.map +1 -1
- package/index.js +472 -0
- package/lib/Command.js +30 -0
- package/lib/InteractiveCommand.js +28 -0
- package/lib/ReplCommand.js +15 -0
- package/lib/Terminal.js +769 -510
- package/lib/TtyStream.js +181 -0
- package/lib/builtins/cat.js +2 -2
- package/lib/builtins/grep.js +2 -2
- package/lib/local/clear.js +3 -0
- package/lib/terminal/DomRenderer.js +325 -0
- package/lib/terminal/PtyBridge.js +169 -0
- package/lib/terminal/ScreenBuffer.js +594 -0
- package/lib/terminal/VtParser.js +728 -0
- package/package.json +4 -2
- package/styles/terminal.css +33 -4
- package/test/terminal.test.js +762 -40
package/dist/shell.es.js
CHANGED
|
@@ -96,7 +96,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
96
96
|
if (typeof e == "string") return g(e, t);
|
|
97
97
|
if (o.isView(e)) return y(e);
|
|
98
98
|
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
99
|
-
if (
|
|
99
|
+
if (Y(e, o) || e && Y(e.buffer, o) || s !== void 0 && (Y(e, s) || e && Y(e.buffer, s))) return b(e, t, n);
|
|
100
100
|
if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
|
|
101
101
|
let r = e.valueOf && e.valueOf();
|
|
102
102
|
if (r != null && r !== e) return u.from(r, t, n);
|
|
@@ -137,7 +137,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
137
137
|
return n;
|
|
138
138
|
}
|
|
139
139
|
function y(e) {
|
|
140
|
-
if (
|
|
140
|
+
if (Y(e, a)) {
|
|
141
141
|
let t = new a(e);
|
|
142
142
|
return b(t.buffer, t.byteOffset, t.byteLength);
|
|
143
143
|
}
|
|
@@ -154,7 +154,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
154
154
|
let t = S(e.length) | 0, n = l(t);
|
|
155
155
|
return n.length === 0 || e.copy(n, 0, 0, t), n;
|
|
156
156
|
}
|
|
157
|
-
if (e.length !== void 0) return typeof e.length != "number" ||
|
|
157
|
+
if (e.length !== void 0) return typeof e.length != "number" || me(e.length) ? l(0) : _(e);
|
|
158
158
|
if (e.type === "Buffer" && Array.isArray(e.data)) return _(e.data);
|
|
159
159
|
}
|
|
160
160
|
function S(e) {
|
|
@@ -167,7 +167,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
167
167
|
u.isBuffer = function(e) {
|
|
168
168
|
return e != null && e._isBuffer === !0 && e !== u.prototype;
|
|
169
169
|
}, u.compare = function(e, t) {
|
|
170
|
-
if (
|
|
170
|
+
if (Y(e, a) && (e = u.from(e, e.offset, e.byteLength)), Y(t, a) && (t = u.from(t, t.offset, t.byteLength)), !u.isBuffer(e) || !u.isBuffer(t)) throw TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
|
|
171
171
|
if (e === t) return 0;
|
|
172
172
|
let n = e.length, r = t.length;
|
|
173
173
|
for (let i = 0, a = Math.min(n, r); i < a; ++i) if (e[i] !== t[i]) {
|
|
@@ -198,7 +198,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
198
198
|
let r = u.allocUnsafe(t), i = 0;
|
|
199
199
|
for (n = 0; n < e.length; ++n) {
|
|
200
200
|
let t = e[n];
|
|
201
|
-
if (
|
|
201
|
+
if (Y(t, a)) i + t.length > r.length ? (u.isBuffer(t) || (t = u.from(t)), t.copy(r, i)) : a.prototype.set.call(r, t, i);
|
|
202
202
|
else if (u.isBuffer(t)) t.copy(r, i);
|
|
203
203
|
else throw TypeError("\"list\" argument must be an Array of Buffers");
|
|
204
204
|
i += t.length;
|
|
@@ -207,7 +207,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
207
207
|
};
|
|
208
208
|
function w(e, t) {
|
|
209
209
|
if (u.isBuffer(e)) return e.length;
|
|
210
|
-
if (o.isView(e) ||
|
|
210
|
+
if (o.isView(e) || Y(e, o)) return e.byteLength;
|
|
211
211
|
if (typeof e != "string") throw TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
|
|
212
212
|
let n = e.length, r = arguments.length > 2 && arguments[2] === !0;
|
|
213
213
|
if (!r && n === 0) return 0;
|
|
@@ -217,15 +217,15 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
217
217
|
case "latin1":
|
|
218
218
|
case "binary": return n;
|
|
219
219
|
case "utf8":
|
|
220
|
-
case "utf-8": return
|
|
220
|
+
case "utf-8": return le(e).length;
|
|
221
221
|
case "ucs2":
|
|
222
222
|
case "ucs-2":
|
|
223
223
|
case "utf16le":
|
|
224
224
|
case "utf-16le": return n * 2;
|
|
225
225
|
case "hex": return n >>> 1;
|
|
226
|
-
case "base64": return
|
|
226
|
+
case "base64": return fe(e).length;
|
|
227
227
|
default:
|
|
228
|
-
if (i) return r ? -1 :
|
|
228
|
+
if (i) return r ? -1 : le(e).length;
|
|
229
229
|
t = ("" + t).toLowerCase(), i = !0;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
@@ -280,7 +280,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
280
280
|
let t = "", n = e.INSPECT_MAX_BYTES;
|
|
281
281
|
return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
|
|
282
282
|
}, r && (u.prototype[r] = u.prototype.inspect), u.prototype.compare = function(e, t, n, r, i) {
|
|
283
|
-
if (
|
|
283
|
+
if (Y(e, a) && (e = u.from(e, e.offset, e.byteLength)), !u.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
|
|
284
284
|
if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), i === void 0 && (i = this.length), t < 0 || n > e.length || r < 0 || i > this.length) throw RangeError("out of range index");
|
|
285
285
|
if (r >= i && t >= n) return 0;
|
|
286
286
|
if (r >= i) return -1;
|
|
@@ -295,7 +295,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
295
295
|
};
|
|
296
296
|
function D(e, t, n, r, i) {
|
|
297
297
|
if (e.length === 0) return -1;
|
|
298
|
-
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n,
|
|
298
|
+
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, me(n) && (n = i ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
|
|
299
299
|
if (i) return -1;
|
|
300
300
|
n = e.length - 1;
|
|
301
301
|
} else if (n < 0) if (i) n = 0;
|
|
@@ -345,22 +345,22 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
345
345
|
let o;
|
|
346
346
|
for (o = 0; o < r; ++o) {
|
|
347
347
|
let r = parseInt(t.substr(o * 2, 2), 16);
|
|
348
|
-
if (
|
|
348
|
+
if (me(r)) return o;
|
|
349
349
|
e[n + o] = r;
|
|
350
350
|
}
|
|
351
351
|
return o;
|
|
352
352
|
}
|
|
353
353
|
function A(e, t, n, r) {
|
|
354
|
-
return
|
|
354
|
+
return pe(le(t, e.length - n), e, n, r);
|
|
355
355
|
}
|
|
356
356
|
function j(e, t, n, r) {
|
|
357
|
-
return
|
|
357
|
+
return pe(ue(t), e, n, r);
|
|
358
358
|
}
|
|
359
359
|
function M(e, t, n, r) {
|
|
360
|
-
return
|
|
360
|
+
return pe(fe(t), e, n, r);
|
|
361
361
|
}
|
|
362
362
|
function N(e, t, n, r) {
|
|
363
|
-
return
|
|
363
|
+
return pe(de(t, e.length - n), e, n, r);
|
|
364
364
|
}
|
|
365
365
|
u.prototype.write = function(e, t, n, r) {
|
|
366
366
|
if (t === void 0) r = "utf8", n = this.length, t = 0;
|
|
@@ -444,7 +444,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
444
444
|
let r = e.length;
|
|
445
445
|
(!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
|
|
446
446
|
let i = "";
|
|
447
|
-
for (let r = t; r < n; ++r) i +=
|
|
447
|
+
for (let r = t; r < n; ++r) i += he[e[r]];
|
|
448
448
|
return i;
|
|
449
449
|
}
|
|
450
450
|
function B(e, t, n) {
|
|
@@ -482,16 +482,16 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
482
482
|
return e >>>= 0, t || V(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
483
483
|
}, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(e, t) {
|
|
484
484
|
return e >>>= 0, t || V(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
485
|
-
}, u.prototype.readBigUInt64LE =
|
|
486
|
-
e >>>= 0,
|
|
485
|
+
}, u.prototype.readBigUInt64LE = X(function(e) {
|
|
486
|
+
e >>>= 0, J(e, "offset");
|
|
487
487
|
let t = this[e], n = this[e + 7];
|
|
488
|
-
(t === void 0 || n === void 0) &&
|
|
488
|
+
(t === void 0 || n === void 0) && oe(e, this.length - 8);
|
|
489
489
|
let r = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, i = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + n * 2 ** 24;
|
|
490
490
|
return BigInt(r) + (BigInt(i) << BigInt(32));
|
|
491
|
-
}), u.prototype.readBigUInt64BE =
|
|
492
|
-
e >>>= 0,
|
|
491
|
+
}), u.prototype.readBigUInt64BE = X(function(e) {
|
|
492
|
+
e >>>= 0, J(e, "offset");
|
|
493
493
|
let t = this[e], n = this[e + 7];
|
|
494
|
-
(t === void 0 || n === void 0) &&
|
|
494
|
+
(t === void 0 || n === void 0) && oe(e, this.length - 8);
|
|
495
495
|
let r = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n;
|
|
496
496
|
return (BigInt(r) << BigInt(32)) + BigInt(i);
|
|
497
497
|
}), u.prototype.readIntLE = function(e, t, n) {
|
|
@@ -518,16 +518,16 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
518
518
|
return e >>>= 0, t || V(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
519
519
|
}, u.prototype.readInt32BE = function(e, t) {
|
|
520
520
|
return e >>>= 0, t || V(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
521
|
-
}, u.prototype.readBigInt64LE =
|
|
522
|
-
e >>>= 0,
|
|
521
|
+
}, u.prototype.readBigInt64LE = X(function(e) {
|
|
522
|
+
e >>>= 0, J(e, "offset");
|
|
523
523
|
let t = this[e], n = this[e + 7];
|
|
524
|
-
(t === void 0 || n === void 0) &&
|
|
524
|
+
(t === void 0 || n === void 0) && oe(e, this.length - 8);
|
|
525
525
|
let r = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (n << 24);
|
|
526
526
|
return (BigInt(r) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
|
|
527
|
-
}), u.prototype.readBigInt64BE =
|
|
528
|
-
e >>>= 0,
|
|
527
|
+
}), u.prototype.readBigInt64BE = X(function(e) {
|
|
528
|
+
e >>>= 0, J(e, "offset");
|
|
529
529
|
let t = this[e], n = this[e + 7];
|
|
530
|
-
(t === void 0 || n === void 0) &&
|
|
530
|
+
(t === void 0 || n === void 0) && oe(e, this.length - 8);
|
|
531
531
|
let r = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
|
|
532
532
|
return (BigInt(r) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n);
|
|
533
533
|
}), u.prototype.readFloatLE = function(e, t) {
|
|
@@ -572,23 +572,23 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
572
572
|
return e = +e, t >>>= 0, n || H(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
573
573
|
};
|
|
574
574
|
function te(e, t, n, r, i) {
|
|
575
|
-
|
|
575
|
+
q(t, r, i, e, n, 7);
|
|
576
576
|
let a = Number(t & BigInt(4294967295));
|
|
577
577
|
e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a;
|
|
578
578
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
579
579
|
return e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, n;
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
|
|
581
|
+
function ne(e, t, n, r, i) {
|
|
582
|
+
q(t, r, i, e, n, 7);
|
|
583
583
|
let a = Number(t & BigInt(4294967295));
|
|
584
584
|
e[n + 7] = a, a >>= 8, e[n + 6] = a, a >>= 8, e[n + 5] = a, a >>= 8, e[n + 4] = a;
|
|
585
585
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
586
586
|
return e[n + 3] = o, o >>= 8, e[n + 2] = o, o >>= 8, e[n + 1] = o, o >>= 8, e[n] = o, n + 8;
|
|
587
587
|
}
|
|
588
|
-
u.prototype.writeBigUInt64LE =
|
|
588
|
+
u.prototype.writeBigUInt64LE = X(function(e, t = 0) {
|
|
589
589
|
return te(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
590
|
-
}), u.prototype.writeBigUInt64BE =
|
|
591
|
-
return
|
|
590
|
+
}), u.prototype.writeBigUInt64BE = X(function(e, t = 0) {
|
|
591
|
+
return ne(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
592
592
|
}), u.prototype.writeIntLE = function(e, t, n, r) {
|
|
593
593
|
if (e = +e, t >>>= 0, !r) {
|
|
594
594
|
let r = 2 ** (8 * n - 1);
|
|
@@ -615,16 +615,16 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
615
615
|
return e = +e, t >>>= 0, n || H(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
|
|
616
616
|
}, u.prototype.writeInt32BE = function(e, t, n) {
|
|
617
617
|
return e = +e, t >>>= 0, n || H(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
618
|
-
}, u.prototype.writeBigInt64LE =
|
|
618
|
+
}, u.prototype.writeBigInt64LE = X(function(e, t = 0) {
|
|
619
619
|
return te(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
620
|
-
}), u.prototype.writeBigInt64BE =
|
|
621
|
-
return
|
|
620
|
+
}), u.prototype.writeBigInt64BE = X(function(e, t = 0) {
|
|
621
|
+
return ne(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
622
622
|
});
|
|
623
|
-
function
|
|
623
|
+
function U(e, t, n, r, i, a) {
|
|
624
624
|
if (n + r > e.length || n < 0) throw RangeError("Index out of range");
|
|
625
625
|
}
|
|
626
626
|
function re(e, t, r, i, a) {
|
|
627
|
-
return t = +t, r >>>= 0, a ||
|
|
627
|
+
return t = +t, r >>>= 0, a || U(e, t, r, 4), n.write(e, t, r, i, 23, 4), r + 4;
|
|
628
628
|
}
|
|
629
629
|
u.prototype.writeFloatLE = function(e, t, n) {
|
|
630
630
|
return re(this, e, t, !0, n);
|
|
@@ -632,7 +632,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
632
632
|
return re(this, e, t, !1, n);
|
|
633
633
|
};
|
|
634
634
|
function ie(e, t, r, i, a) {
|
|
635
|
-
return t = +t, r >>>= 0, a ||
|
|
635
|
+
return t = +t, r >>>= 0, a || U(e, t, r, 8), n.write(e, t, r, i, 52, 8), r + 8;
|
|
636
636
|
}
|
|
637
637
|
u.prototype.writeDoubleLE = function(e, t, n) {
|
|
638
638
|
return ie(this, e, t, !0, n);
|
|
@@ -669,7 +669,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
669
669
|
return this;
|
|
670
670
|
};
|
|
671
671
|
let W = {};
|
|
672
|
-
function
|
|
672
|
+
function G(e, t, n) {
|
|
673
673
|
W[e] = class extends n {
|
|
674
674
|
constructor() {
|
|
675
675
|
super(), Object.defineProperty(this, "message", {
|
|
@@ -694,42 +694,42 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
|
|
697
|
+
G("ERR_BUFFER_OUT_OF_BOUNDS", function(e) {
|
|
698
698
|
return e ? `${e} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
699
|
-
}, RangeError),
|
|
699
|
+
}, RangeError), G("ERR_INVALID_ARG_TYPE", function(e, t) {
|
|
700
700
|
return `The "${e}" argument must be of type number. Received type ${typeof t}`;
|
|
701
|
-
}, TypeError),
|
|
701
|
+
}, TypeError), G("ERR_OUT_OF_RANGE", function(e, t, n) {
|
|
702
702
|
let r = `The value of "${e}" is out of range.`, i = n;
|
|
703
|
-
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i =
|
|
703
|
+
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i = ae(String(n)) : typeof n == "bigint" && (i = String(n), (n > BigInt(2) ** BigInt(32) || n < -(BigInt(2) ** BigInt(32))) && (i = ae(i)), i += "n"), r += ` It must be ${t}. Received ${i}`, r;
|
|
704
704
|
}, RangeError);
|
|
705
|
-
function
|
|
705
|
+
function ae(e) {
|
|
706
706
|
let t = "", n = e.length, r = +(e[0] === "-");
|
|
707
707
|
for (; n >= r + 4; n -= 3) t = `_${e.slice(n - 3, n)}${t}`;
|
|
708
708
|
return `${e.slice(0, n)}${t}`;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
|
|
710
|
+
function K(e, t, n) {
|
|
711
|
+
J(t, "offset"), (e[t] === void 0 || e[t + n] === void 0) && oe(t, e.length - (n + 1));
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function q(e, t, n, r, i, a) {
|
|
714
714
|
if (e > n || e < t) {
|
|
715
715
|
let r = typeof t == "bigint" ? "n" : "", i;
|
|
716
716
|
throw i = a > 3 ? t === 0 || t === BigInt(0) ? `>= 0${r} and < 2${r} ** ${(a + 1) * 8}${r}` : `>= -(2${r} ** ${(a + 1) * 8 - 1}${r}) and < 2 ** ${(a + 1) * 8 - 1}${r}` : `>= ${t}${r} and <= ${n}${r}`, new W.ERR_OUT_OF_RANGE("value", i, e);
|
|
717
717
|
}
|
|
718
|
-
|
|
718
|
+
K(r, i, a);
|
|
719
719
|
}
|
|
720
|
-
function
|
|
720
|
+
function J(e, t) {
|
|
721
721
|
if (typeof e != "number") throw new W.ERR_INVALID_ARG_TYPE(t, "number", e);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
throw Math.floor(e) === e ? t < 0 ? new W.ERR_BUFFER_OUT_OF_BOUNDS() : new W.ERR_OUT_OF_RANGE(n || "offset", `>= ${+!!n} and <= ${t}`, e) : (
|
|
723
|
+
function oe(e, t, n) {
|
|
724
|
+
throw Math.floor(e) === e ? t < 0 ? new W.ERR_BUFFER_OUT_OF_BOUNDS() : new W.ERR_OUT_OF_RANGE(n || "offset", `>= ${+!!n} and <= ${t}`, e) : (J(e, n), new W.ERR_OUT_OF_RANGE(n || "offset", "an integer", e));
|
|
725
725
|
}
|
|
726
|
-
let
|
|
727
|
-
function
|
|
728
|
-
if (e = e.split("=")[0], e = e.trim().replace(
|
|
726
|
+
let se = /[^+/0-9A-Za-z-_]/g;
|
|
727
|
+
function ce(e) {
|
|
728
|
+
if (e = e.split("=")[0], e = e.trim().replace(se, ""), e.length < 2) return "";
|
|
729
729
|
for (; e.length % 4 != 0;) e += "=";
|
|
730
730
|
return e;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function le(e, t) {
|
|
733
733
|
t ||= Infinity;
|
|
734
734
|
let n, r = e.length, i = null, a = [];
|
|
735
735
|
for (let o = 0; o < r; ++o) {
|
|
@@ -767,31 +767,31 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
767
767
|
}
|
|
768
768
|
return a;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function ue(e) {
|
|
771
771
|
let t = [];
|
|
772
772
|
for (let n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
|
|
773
773
|
return t;
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function de(e, t) {
|
|
776
776
|
let n, r, i, a = [];
|
|
777
777
|
for (let o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o), r = n >> 8, i = n % 256, a.push(i), a.push(r);
|
|
778
778
|
return a;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
781
|
-
return t.toByteArray(
|
|
780
|
+
function fe(e) {
|
|
781
|
+
return t.toByteArray(ce(e));
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function pe(e, t, n, r) {
|
|
784
784
|
let i;
|
|
785
785
|
for (i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
|
|
786
786
|
return i;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function Y(e, t) {
|
|
789
789
|
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function me(e) {
|
|
792
792
|
return e !== e;
|
|
793
793
|
}
|
|
794
|
-
let
|
|
794
|
+
let he = (function() {
|
|
795
795
|
let e = "0123456789abcdef", t = Array(256);
|
|
796
796
|
for (let n = 0; n < 16; ++n) {
|
|
797
797
|
let r = n * 16;
|
|
@@ -799,10 +799,10 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
799
799
|
}
|
|
800
800
|
return t;
|
|
801
801
|
})();
|
|
802
|
-
function
|
|
803
|
-
return typeof BigInt > "u" ?
|
|
802
|
+
function X(e) {
|
|
803
|
+
return typeof BigInt > "u" ? ge : e;
|
|
804
804
|
}
|
|
805
|
-
function
|
|
805
|
+
function ge() {
|
|
806
806
|
throw Error("BigInt not supported");
|
|
807
807
|
}
|
|
808
808
|
})(u), y = u.Buffer, u.Blob, u.BlobOptions, u.Buffer, u.File, u.FileOptions, u.INSPECT_MAX_BYTES, u.SlowBuffer, u.TranscodeEncoding, u.atob, u.btoa, u.constants, u.isAscii, u.isUtf8, u.kMaxLength, u.kStringMaxLength, u.resolveObjectURL, u.transcode;
|
|
@@ -1174,11 +1174,140 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1174
1174
|
return this.std = [], e;
|
|
1175
1175
|
}
|
|
1176
1176
|
};
|
|
1177
|
+
})), ne = /* @__PURE__ */ t(((e, t) => {
|
|
1178
|
+
b();
|
|
1179
|
+
var n = V(), r = n.EventEmitter || n.default || n;
|
|
1180
|
+
function i(e) {
|
|
1181
|
+
if (!e) return [];
|
|
1182
|
+
let t = typeof e == "string" ? e : e instanceof Uint8Array || y !== void 0 && y.isBuffer(e) ? new TextDecoder().decode(e) : String(e), n = [], r = 0;
|
|
1183
|
+
for (; r < t.length;) {
|
|
1184
|
+
let e = t[r], i = t.charCodeAt(r);
|
|
1185
|
+
if (i === 27) {
|
|
1186
|
+
if (t.charCodeAt(r + 1) === 127 || t.charCodeAt(r + 1) === 8) {
|
|
1187
|
+
n.push("^W"), r += 2;
|
|
1188
|
+
continue;
|
|
1189
|
+
}
|
|
1190
|
+
if (t[r + 1] === "[" || t[r + 1] === "O") {
|
|
1191
|
+
let e = r + 2;
|
|
1192
|
+
for (; e < t.length && t.charCodeAt(e) >= 32 && t.charCodeAt(e) <= 63;) e++;
|
|
1193
|
+
if (e < t.length) {
|
|
1194
|
+
let i = t.slice(r + 2, e + 1), a = {
|
|
1195
|
+
A: "ArrowUp",
|
|
1196
|
+
B: "ArrowDown",
|
|
1197
|
+
C: "ArrowRight",
|
|
1198
|
+
D: "ArrowLeft",
|
|
1199
|
+
H: "Home",
|
|
1200
|
+
F: "End",
|
|
1201
|
+
"1~": "Home",
|
|
1202
|
+
"3~": "Delete",
|
|
1203
|
+
"4~": "End",
|
|
1204
|
+
"5~": "PageUp",
|
|
1205
|
+
"6~": "PageDown",
|
|
1206
|
+
"7~": "Home",
|
|
1207
|
+
"8~": "End"
|
|
1208
|
+
};
|
|
1209
|
+
a[i] && n.push(a[i]), r = e + 1;
|
|
1210
|
+
continue;
|
|
1211
|
+
}
|
|
1212
|
+
}
|
|
1213
|
+
n.push("Escape"), r++;
|
|
1214
|
+
continue;
|
|
1215
|
+
}
|
|
1216
|
+
if (i === 13 || i === 10) {
|
|
1217
|
+
n.push("Enter"), i === 13 && t[r + 1] === "\n" && r++, r++;
|
|
1218
|
+
continue;
|
|
1219
|
+
}
|
|
1220
|
+
if (i === 127 || i === 8) {
|
|
1221
|
+
n.push("Backspace"), r++;
|
|
1222
|
+
continue;
|
|
1223
|
+
}
|
|
1224
|
+
if (i === 9) {
|
|
1225
|
+
n.push("Tab"), r++;
|
|
1226
|
+
continue;
|
|
1227
|
+
}
|
|
1228
|
+
if (i >= 1 && i <= 26) {
|
|
1229
|
+
n.push("^" + String.fromCharCode(i + 64)), r++;
|
|
1230
|
+
continue;
|
|
1231
|
+
}
|
|
1232
|
+
n.push(e), r++;
|
|
1233
|
+
}
|
|
1234
|
+
return n;
|
|
1235
|
+
}
|
|
1236
|
+
t.exports = {
|
|
1237
|
+
TtyStream: class extends r {
|
|
1238
|
+
constructor(e = {}) {
|
|
1239
|
+
super(), this.isTTY = e.isTTY !== !1, this.readable = !0, this.writable = !0, this.columns = e.columns || 80, this.rows = e.rows || 24, this.isRaw = !1, this._encoding = null, this._onWrite = e.onWrite || null;
|
|
1240
|
+
}
|
|
1241
|
+
write(e, t, n) {
|
|
1242
|
+
return e == null ? !0 : (typeof this._onWrite == "function" && this._onWrite(e), this.emit("data", this._formatChunk(e)), typeof t == "function" ? t() : typeof n == "function" && n(), !0);
|
|
1243
|
+
}
|
|
1244
|
+
pushData(e) {
|
|
1245
|
+
e != null && this.emit("data", this._formatChunk(e));
|
|
1246
|
+
}
|
|
1247
|
+
_formatChunk(e) {
|
|
1248
|
+
return this._encoding ? typeof e == "string" ? e : e instanceof Uint8Array || y !== void 0 && y.isBuffer(e) ? new TextDecoder().decode(e) : String(e) : e;
|
|
1249
|
+
}
|
|
1250
|
+
setRawMode(e) {
|
|
1251
|
+
return this.isRaw = !!e, this;
|
|
1252
|
+
}
|
|
1253
|
+
setEncoding(e) {
|
|
1254
|
+
return this._encoding = e, this;
|
|
1255
|
+
}
|
|
1256
|
+
getWindowSize() {
|
|
1257
|
+
return [this.columns, this.rows];
|
|
1258
|
+
}
|
|
1259
|
+
resize(e, t) {
|
|
1260
|
+
this.columns = e, this.rows = t, this.emit("resize");
|
|
1261
|
+
}
|
|
1262
|
+
resume() {
|
|
1263
|
+
return this;
|
|
1264
|
+
}
|
|
1265
|
+
pause() {
|
|
1266
|
+
return this;
|
|
1267
|
+
}
|
|
1268
|
+
pipe(e) {
|
|
1269
|
+
return this.on("data", (t) => e.write(t)), e;
|
|
1270
|
+
}
|
|
1271
|
+
unpipe() {
|
|
1272
|
+
return this;
|
|
1273
|
+
}
|
|
1274
|
+
end(e, t, n) {
|
|
1275
|
+
return e != null && this.write(e, typeof t == "string" ? t : void 0), this.emit("end"), typeof t == "function" ? t() : typeof n == "function" && n(), this;
|
|
1276
|
+
}
|
|
1277
|
+
destroy() {
|
|
1278
|
+
this.removeAllListeners();
|
|
1279
|
+
}
|
|
1280
|
+
toString() {
|
|
1281
|
+
return "";
|
|
1282
|
+
}
|
|
1283
|
+
valueOf() {
|
|
1284
|
+
return "";
|
|
1285
|
+
}
|
|
1286
|
+
},
|
|
1287
|
+
parseVtKeys: i
|
|
1288
|
+
};
|
|
1177
1289
|
})), U = /* @__PURE__ */ t(((e, t) => {
|
|
1178
|
-
var n = V(), r = te(), i = n.EventEmitter || n.default || n;
|
|
1179
|
-
t.exports = class extends
|
|
1290
|
+
var n = V(), r = te(), { TtyStream: i, parseVtKeys: a } = ne(), o = n.EventEmitter || n.default || n;
|
|
1291
|
+
t.exports = class extends o {
|
|
1180
1292
|
constructor(e, t) {
|
|
1181
1293
|
super(), this.arguments = e, this.result = new r(), this.context = t || null;
|
|
1294
|
+
let n = this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("COLUMNS"), 10) || 80, o = this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("LINES"), 10) || 24;
|
|
1295
|
+
this.stdinStream = new i({
|
|
1296
|
+
columns: n,
|
|
1297
|
+
rows: o
|
|
1298
|
+
}), this.stdin = this.stdinStream, this.stdout = new i({
|
|
1299
|
+
columns: n,
|
|
1300
|
+
rows: o,
|
|
1301
|
+
onWrite: (e) => this.emit("stdout", e)
|
|
1302
|
+
}), this.stderr = new i({
|
|
1303
|
+
columns: n,
|
|
1304
|
+
rows: o,
|
|
1305
|
+
onWrite: (e) => this.emit("stderr", e)
|
|
1306
|
+
}), this.stdinStream.on("data", (e) => {
|
|
1307
|
+
if (!this.captureInput) return;
|
|
1308
|
+
let t = a(e);
|
|
1309
|
+
for (let e of t) !this.interactive && !this.stdinStream.isRaw && (e === "Enter" ? this.stdout.write("\r\n") : e === "Backspace" ? this.stdout.write("\b \b") : e.length === 1 && this.stdout.write(e)), this.onInput(e);
|
|
1310
|
+
});
|
|
1182
1311
|
}
|
|
1183
1312
|
get name() {
|
|
1184
1313
|
return "unnamed";
|
|
@@ -1206,7 +1335,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1206
1335
|
this.emit("flush", this.result.flush());
|
|
1207
1336
|
}
|
|
1208
1337
|
};
|
|
1209
|
-
})),
|
|
1338
|
+
})), re = /* @__PURE__ */ t(((e, t) => {
|
|
1210
1339
|
var n = U();
|
|
1211
1340
|
t.exports = class extends n {
|
|
1212
1341
|
get captureInput() {
|
|
@@ -1216,13 +1345,27 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1216
1345
|
return !0;
|
|
1217
1346
|
}
|
|
1218
1347
|
get terminalSize() {
|
|
1219
|
-
return {
|
|
1348
|
+
return this.stdout && this.stdout.columns && this.stdout.rows ? {
|
|
1349
|
+
cols: parseInt(this.context && this.context.getVar && this.context.getVar("COLUMNS"), 10) || this.stdout.columns || 80,
|
|
1350
|
+
rows: parseInt(this.context && this.context.getVar && this.context.getVar("LINES"), 10) || this.stdout.rows || 24
|
|
1351
|
+
} : {
|
|
1220
1352
|
cols: parseInt(this.context.getVar("COLUMNS"), 10) || 80,
|
|
1221
1353
|
rows: parseInt(this.context.getVar("LINES"), 10) || 24
|
|
1222
1354
|
};
|
|
1223
1355
|
}
|
|
1356
|
+
_enterAltScreen() {
|
|
1357
|
+
this._inAltScreen || (this._inAltScreen = !0, this.stdinStream && this.stdinStream.setRawMode(!0), this.stdout && this.stdout.write("\x1B[?1049h\x1B[2J\x1B[H"));
|
|
1358
|
+
}
|
|
1359
|
+
_exitAltScreen() {
|
|
1360
|
+
this._inAltScreen && (this._inAltScreen = !1, this.stdinStream && this.stdinStream.setRawMode(!1), this.stdout && this.stdout.write("\x1B[?1049l\x1B[?25h"));
|
|
1361
|
+
}
|
|
1362
|
+
runCommand() {
|
|
1363
|
+
return this.interactive && this._enterAltScreen(), super.runCommand().finally(() => {
|
|
1364
|
+
this._exitAltScreen();
|
|
1365
|
+
});
|
|
1366
|
+
}
|
|
1224
1367
|
};
|
|
1225
|
-
})),
|
|
1368
|
+
})), ie = /* @__PURE__ */ t(((e, t) => {
|
|
1226
1369
|
b(), B();
|
|
1227
1370
|
var { BinaryFile: n, SymlinkRef: r } = x(), i = new Uint8Array([
|
|
1228
1371
|
66,
|
|
@@ -1328,7 +1471,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1328
1471
|
let t = e.$c;
|
|
1329
1472
|
if (m[t]) return m[t];
|
|
1330
1473
|
if (f.inlineCommands && f.inlineCommands[t]) try {
|
|
1331
|
-
let e = U(), n =
|
|
1474
|
+
let e = U(), n = re();
|
|
1332
1475
|
return Function("Command", "InteractiveCommand", `return (${f.inlineCommands[t]});`)(e, n);
|
|
1333
1476
|
} catch {
|
|
1334
1477
|
return null;
|
|
@@ -1493,7 +1636,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1493
1636
|
}
|
|
1494
1637
|
}
|
|
1495
1638
|
};
|
|
1496
|
-
})),
|
|
1639
|
+
})), W = /* @__PURE__ */ t(((e, t) => {
|
|
1497
1640
|
b();
|
|
1498
1641
|
var n = x(), { BinaryFile: r, SymlinkRef: i } = n;
|
|
1499
1642
|
function a(e) {
|
|
@@ -1518,20 +1661,20 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1518
1661
|
t.exports = class extends n {
|
|
1519
1662
|
constructor(e = "/", t = {}, n = {}, r = null) {
|
|
1520
1663
|
if (super(), t instanceof Uint8Array || t instanceof ArrayBuffer) {
|
|
1521
|
-
let { deserializeBinaryFilesystem: e } =
|
|
1664
|
+
let { deserializeBinaryFilesystem: e } = ie(), r = e(t);
|
|
1522
1665
|
t = r.filesystem, n = Object.assign({}, r.permissions, n);
|
|
1523
1666
|
} else if (t && typeof t == "object" && t.filesystem && (t.filesystem instanceof Uint8Array || typeof t.filesystem == "object") && (n = Object.assign({}, t.permissions || {}, n), t = t.filesystem, t instanceof Uint8Array || t instanceof ArrayBuffer)) {
|
|
1524
|
-
let { deserializeBinaryFilesystem: e } =
|
|
1667
|
+
let { deserializeBinaryFilesystem: e } = ie(), r = e(t);
|
|
1525
1668
|
t = r.filesystem, n = Object.assign({}, r.permissions, n);
|
|
1526
1669
|
}
|
|
1527
1670
|
a(t), this.fileSystem = t, this.permissions = Object.assign({}, n), this.cwd = e, this._onChange = r, this._changeScheduled = !1;
|
|
1528
1671
|
}
|
|
1529
1672
|
toBinaryContainer(e = {}) {
|
|
1530
|
-
let { serializeBinaryFilesystem: t } =
|
|
1673
|
+
let { serializeBinaryFilesystem: t } = ie();
|
|
1531
1674
|
return t(this.fileSystem, this.permissions, e);
|
|
1532
1675
|
}
|
|
1533
1676
|
static fromBinaryContainer(e, t = {}) {
|
|
1534
|
-
let { deserializeBinaryFilesystem: n } =
|
|
1677
|
+
let { deserializeBinaryFilesystem: n } = ie();
|
|
1535
1678
|
return n(e, t);
|
|
1536
1679
|
}
|
|
1537
1680
|
getFileByPath(e) {
|
|
@@ -1709,7 +1852,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1709
1852
|
return null;
|
|
1710
1853
|
}
|
|
1711
1854
|
}, t.exports.BinaryFile = r, t.exports.SymlinkRef = i;
|
|
1712
|
-
})),
|
|
1855
|
+
})), G = /* @__PURE__ */ t(((e, t) => {
|
|
1713
1856
|
t.exports = null;
|
|
1714
1857
|
})), ae = /* @__PURE__ */ t(((e, t) => {
|
|
1715
1858
|
B();
|
|
@@ -1879,9 +2022,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1879
2022
|
posix: null
|
|
1880
2023
|
};
|
|
1881
2024
|
a.posix = a, t.exports = a;
|
|
1882
|
-
})),
|
|
2025
|
+
})), K = /* @__PURE__ */ t(((e, t) => {
|
|
1883
2026
|
B();
|
|
1884
|
-
var n =
|
|
2027
|
+
var n = G(), r = ae(), i = x();
|
|
1885
2028
|
t.exports = class extends i {
|
|
1886
2029
|
constructor(e, t = null) {
|
|
1887
2030
|
super(), this._onChange = t, this._changeScheduled = !1, this._virtualFiles = {}, this.cwd = this._normalizeCwd(e || z.cwd());
|
|
@@ -2088,8 +2231,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2088
2231
|
}
|
|
2089
2232
|
}
|
|
2090
2233
|
};
|
|
2091
|
-
})),
|
|
2092
|
-
var n =
|
|
2234
|
+
})), q = /* @__PURE__ */ t(((e, t) => {
|
|
2235
|
+
var n = W();
|
|
2093
2236
|
t.exports = class {
|
|
2094
2237
|
constructor(e) {
|
|
2095
2238
|
this.options = e;
|
|
@@ -2123,7 +2266,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2123
2266
|
return this.fs._getFileRaw(t) || null;
|
|
2124
2267
|
}
|
|
2125
2268
|
setNodeFilesystem(e) {
|
|
2126
|
-
let t =
|
|
2269
|
+
let t = K(), n = this.fs._onChange;
|
|
2127
2270
|
this.fs = new t(e, n);
|
|
2128
2271
|
}
|
|
2129
2272
|
setFilesystem(e, t = {}) {
|
|
@@ -2143,15 +2286,15 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2143
2286
|
typeof this._destroyFn == "function" && this._destroyFn(e);
|
|
2144
2287
|
}
|
|
2145
2288
|
};
|
|
2146
|
-
})),
|
|
2289
|
+
})), J = /* @__PURE__ */ t(((e, t) => {
|
|
2147
2290
|
var n = U();
|
|
2148
2291
|
t.exports = class extends n {
|
|
2149
2292
|
constructor(e, t) {
|
|
2150
2293
|
super(e, t);
|
|
2151
2294
|
}
|
|
2152
2295
|
};
|
|
2153
|
-
})),
|
|
2154
|
-
var n =
|
|
2296
|
+
})), oe = /* @__PURE__ */ t(((e, t) => {
|
|
2297
|
+
var n = J();
|
|
2155
2298
|
function r(e) {
|
|
2156
2299
|
return /^#!\/(sh\.js|bin\/(sh|brsh))/.test(e);
|
|
2157
2300
|
}
|
|
@@ -2316,7 +2459,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2316
2459
|
}
|
|
2317
2460
|
_executeNode(e) {
|
|
2318
2461
|
if (e.type === "function") {
|
|
2319
|
-
let t = e.name, n = e.bodyLines, r = this, i =
|
|
2462
|
+
let t = e.name, n = e.bodyLines, r = this, i = J(), a = class extends i {
|
|
2320
2463
|
static get name() {
|
|
2321
2464
|
return t;
|
|
2322
2465
|
}
|
|
@@ -2518,7 +2661,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2518
2661
|
}, t.exports.isKnownInterpreter = r;
|
|
2519
2662
|
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
2520
2663
|
b();
|
|
2521
|
-
var n =
|
|
2664
|
+
var n = oe(), { BinaryFile: r } = W(), i = 0, a = 8, o = 20, s = 28, c = 31, l = 44, u = 54, d = 70, f = 0, p = 2, m = 3, h = 4, g = 1, _ = 2, v = 4, x = 8, S = 1, C = class extends n {
|
|
2522
2665
|
get name() {
|
|
2523
2666
|
return "wasm";
|
|
2524
2667
|
}
|
|
@@ -2528,7 +2671,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2528
2671
|
run() {
|
|
2529
2672
|
let e = this.script, t = (() => {
|
|
2530
2673
|
try {
|
|
2531
|
-
return
|
|
2674
|
+
return G();
|
|
2532
2675
|
} catch {
|
|
2533
2676
|
return null;
|
|
2534
2677
|
}
|
|
@@ -2961,7 +3104,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2961
3104
|
function T(e, t) {
|
|
2962
3105
|
if (!e || !e.exists(t)) return null;
|
|
2963
3106
|
if (e.isRealFilesystem) try {
|
|
2964
|
-
let n =
|
|
3107
|
+
let n = G();
|
|
2965
3108
|
return new Uint8Array(n.readFileSync(e.absolutePath(t)));
|
|
2966
3109
|
} catch {}
|
|
2967
3110
|
let n = e.getFileByPath(t);
|
|
@@ -2990,7 +3133,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2990
3133
|
o.set(a);
|
|
2991
3134
|
let s = new r(o.buffer, i);
|
|
2992
3135
|
if (e.isRealFilesystem) try {
|
|
2993
|
-
let n =
|
|
3136
|
+
let n = G(), r = ae(), i = e.absolutePath(t);
|
|
2994
3137
|
n.mkdirSync(r.dirname(i), { recursive: !0 }), n.writeFileSync(i, y.from(a.buffer, a.byteOffset, a.byteLength));
|
|
2995
3138
|
return;
|
|
2996
3139
|
} catch {
|
|
@@ -3085,7 +3228,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3085
3228
|
return u.push(" -h, --help Show this help message and exit"), u.push(" -V, --version Show WebAssembly binary version and exit"), n && n.exports && n.exports.length > 0 && u.push("", `WASM Exports: ${n.exports.join(", ")}`), Array.isArray(t.aliases) && t.aliases.length > 0 && u.push("", `Aliases: ${t.aliases.join(", ")}`), (t.homepage || t.cdnUrl || t.wasmUrl) && u.push(`Source: ${t.homepage || t.cdnUrl || t.wasmUrl}`), u;
|
|
3086
3229
|
}
|
|
3087
3230
|
function j(e, t = {}, n = null) {
|
|
3088
|
-
let r =
|
|
3231
|
+
let r = J(), i = (n || e.bin || e.name).toLowerCase();
|
|
3089
3232
|
class a extends r {
|
|
3090
3233
|
static get name() {
|
|
3091
3234
|
return i;
|
|
@@ -3456,12 +3599,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3456
3599
|
else r.push(i);
|
|
3457
3600
|
let i = [];
|
|
3458
3601
|
if (r.length === 0) {
|
|
3459
|
-
let e = this.stdin;
|
|
3602
|
+
let e = typeof this.stdin == "string" ? this.stdin : null;
|
|
3460
3603
|
if (e == null) return this.stdErr = "cat: no file specified", this.exitCode = 1, Promise.resolve();
|
|
3461
3604
|
i.push(e);
|
|
3462
3605
|
} else for (let e of r) {
|
|
3463
3606
|
if (e === "-") {
|
|
3464
|
-
i.push(this.stdin
|
|
3607
|
+
i.push(typeof this.stdin == "string" ? this.stdin : "");
|
|
3465
3608
|
continue;
|
|
3466
3609
|
}
|
|
3467
3610
|
let t = this.fs.getFileByPath(e);
|
|
@@ -3592,10 +3735,10 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3592
3735
|
isFunction: h,
|
|
3593
3736
|
isAsyncFunction: g
|
|
3594
3737
|
}, e.isArrayLike = i, e.isAsyncFunction = g, e.isClass = u, e.isDefined = o, e.isDefinedValue = l, e.isFiniteNumber = n, e.isFunction = h, e.isIterable = p, e.isNull = c, e.isNumber = t, e.isObject = a, e.isPlainObject = r, e.isPrimitive = d, e.isPromise = f, e.isString = m, e.isUndefined = s;
|
|
3595
|
-
})), pe,
|
|
3738
|
+
})), pe, Y = e((() => {
|
|
3596
3739
|
pe = globalThis || self;
|
|
3597
|
-
})),
|
|
3598
|
-
|
|
3740
|
+
})), me = /* @__PURE__ */ t(((e, t) => {
|
|
3741
|
+
Y();
|
|
3599
3742
|
var n = Infinity, r = "[object Symbol]", i = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, o = "\\ud800-\\udfff", s = "\\u0300-\\u036f\\ufe20-\\ufe23", c = "\\u20d0-\\u20f0", l = "\\u2700-\\u27bf", u = "a-z\\xdf-\\xf6\\xf8-\\xff", d = "\\xac\\xb1\\xd7\\xf7", f = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", p = "\\u2000-\\u206f", m = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", h = "A-Z\\xc0-\\xd6\\xd8-\\xde", g = "\\ufe0e\\ufe0f", _ = d + f + p + m, v = "['’]", y = "[" + o + "]", b = "[" + _ + "]", x = "[" + s + c + "]", S = "\\d+", C = "[" + l + "]", w = "[" + u + "]", T = "[^" + o + _ + S + l + u + h + "]", E = "\\ud83c[\\udffb-\\udfff]", D = "(?:" + x + "|" + E + ")", O = "[^" + o + "]", k = "(?:\\ud83c[\\udde6-\\uddff]){2}", A = "[\\ud800-\\udbff][\\udc00-\\udfff]", j = "[" + h + "]", M = "\\u200d", N = "(?:" + w + "|" + T + ")", P = "(?:" + j + "|" + T + ")", F = "(?:" + v + "(?:d|ll|m|re|s|t|ve))?", I = "(?:" + v + "(?:D|LL|M|RE|S|T|VE))?", L = D + "?", R = "[" + g + "]?", ee = "(?:" + M + "(?:" + [
|
|
3600
3743
|
O,
|
|
3601
3744
|
k,
|
|
@@ -3610,7 +3753,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3610
3753
|
k,
|
|
3611
3754
|
A,
|
|
3612
3755
|
y
|
|
3613
|
-
].join("|") + ")", H = RegExp(v, "g"), te = RegExp(x, "g"),
|
|
3756
|
+
].join("|") + ")", H = RegExp(v, "g"), te = RegExp(x, "g"), ne = RegExp(E + "(?=" + E + ")|" + V + z, "g"), U = RegExp([
|
|
3614
3757
|
j + "?" + w + "+" + F + "(?=" + [
|
|
3615
3758
|
b,
|
|
3616
3759
|
j,
|
|
@@ -3816,94 +3959,94 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3816
3959
|
œ: "oe",
|
|
3817
3960
|
ʼn: "'n",
|
|
3818
3961
|
ſ: "ss"
|
|
3819
|
-
},
|
|
3820
|
-
function
|
|
3962
|
+
}, G = typeof pe == "object" && pe && pe.Object === Object && pe, ae = typeof self == "object" && self && self.Object === Object && self, K = G || ae || Function("return this")();
|
|
3963
|
+
function q(e, t, n, r) {
|
|
3821
3964
|
var i = -1, a = e ? e.length : 0;
|
|
3822
3965
|
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
3823
3966
|
return n;
|
|
3824
3967
|
}
|
|
3825
|
-
function
|
|
3968
|
+
function J(e) {
|
|
3826
3969
|
return e.split("");
|
|
3827
3970
|
}
|
|
3828
|
-
function
|
|
3971
|
+
function oe(e) {
|
|
3829
3972
|
return e.match(i) || [];
|
|
3830
3973
|
}
|
|
3831
|
-
function
|
|
3974
|
+
function se(e) {
|
|
3832
3975
|
return function(t) {
|
|
3833
3976
|
return e?.[t];
|
|
3834
3977
|
};
|
|
3835
3978
|
}
|
|
3836
|
-
var
|
|
3837
|
-
function
|
|
3979
|
+
var ce = se(W);
|
|
3980
|
+
function le(e) {
|
|
3838
3981
|
return re.test(e);
|
|
3839
3982
|
}
|
|
3840
|
-
function
|
|
3983
|
+
function ue(e) {
|
|
3841
3984
|
return ie.test(e);
|
|
3842
3985
|
}
|
|
3986
|
+
function de(e) {
|
|
3987
|
+
return le(e) ? fe(e) : J(e);
|
|
3988
|
+
}
|
|
3843
3989
|
function fe(e) {
|
|
3844
|
-
return
|
|
3990
|
+
return e.match(ne) || [];
|
|
3845
3991
|
}
|
|
3846
|
-
function
|
|
3992
|
+
function me(e) {
|
|
3847
3993
|
return e.match(U) || [];
|
|
3848
3994
|
}
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
}
|
|
3852
|
-
var ge = Object.prototype.toString, Y = G.Symbol, _e = Y ? Y.prototype : void 0, ve = _e ? _e.toString : void 0;
|
|
3853
|
-
function ye(e, t, n) {
|
|
3995
|
+
var he = Object.prototype.toString, X = K.Symbol, ge = X ? X.prototype : void 0, _e = ge ? ge.toString : void 0;
|
|
3996
|
+
function ve(e, t, n) {
|
|
3854
3997
|
var r = -1, i = e.length;
|
|
3855
3998
|
t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
|
|
3856
3999
|
for (var a = Array(i); ++r < i;) a[r] = e[r + t];
|
|
3857
4000
|
return a;
|
|
3858
4001
|
}
|
|
3859
|
-
function
|
|
4002
|
+
function ye(e) {
|
|
3860
4003
|
if (typeof e == "string") return e;
|
|
3861
|
-
if (
|
|
4004
|
+
if (we(e)) return _e ? _e.call(e) : "";
|
|
3862
4005
|
var t = e + "";
|
|
3863
4006
|
return t == "0" && 1 / e == -n ? "-0" : t;
|
|
3864
4007
|
}
|
|
3865
|
-
function
|
|
4008
|
+
function be(e, t, n) {
|
|
3866
4009
|
var r = e.length;
|
|
3867
|
-
return n = n === void 0 ? r : n, !t && n >= r ? e :
|
|
4010
|
+
return n = n === void 0 ? r : n, !t && n >= r ? e : ve(e, t, n);
|
|
3868
4011
|
}
|
|
3869
|
-
function
|
|
4012
|
+
function xe(e) {
|
|
3870
4013
|
return function(t) {
|
|
3871
|
-
t =
|
|
3872
|
-
var n =
|
|
4014
|
+
t = Te(t);
|
|
4015
|
+
var n = le(t) ? de(t) : void 0, r = n ? n[0] : t.charAt(0), i = n ? be(n, 1).join("") : t.slice(1);
|
|
3873
4016
|
return r[e]() + i;
|
|
3874
4017
|
};
|
|
3875
4018
|
}
|
|
3876
|
-
function
|
|
4019
|
+
function Se(e) {
|
|
3877
4020
|
return function(t) {
|
|
3878
|
-
return
|
|
4021
|
+
return q(Ae(Oe(t).replace(H, "")), e, "");
|
|
3879
4022
|
};
|
|
3880
4023
|
}
|
|
3881
|
-
function
|
|
4024
|
+
function Ce(e) {
|
|
3882
4025
|
return !!e && typeof e == "object";
|
|
3883
4026
|
}
|
|
3884
|
-
function
|
|
3885
|
-
return typeof e == "symbol" ||
|
|
4027
|
+
function we(e) {
|
|
4028
|
+
return typeof e == "symbol" || Ce(e) && he.call(e) == r;
|
|
3886
4029
|
}
|
|
3887
|
-
function
|
|
3888
|
-
return e == null ? "" :
|
|
4030
|
+
function Te(e) {
|
|
4031
|
+
return e == null ? "" : ye(e);
|
|
3889
4032
|
}
|
|
3890
|
-
var
|
|
3891
|
-
return t = t.toLowerCase(), e + (n ?
|
|
4033
|
+
var Ee = Se(function(e, t, n) {
|
|
4034
|
+
return t = t.toLowerCase(), e + (n ? De(t) : t);
|
|
3892
4035
|
});
|
|
3893
|
-
function
|
|
3894
|
-
return
|
|
4036
|
+
function De(e) {
|
|
4037
|
+
return ke(Te(e).toLowerCase());
|
|
3895
4038
|
}
|
|
3896
|
-
function
|
|
3897
|
-
return e =
|
|
4039
|
+
function Oe(e) {
|
|
4040
|
+
return e = Te(e), e && e.replace(a, ce).replace(te, "");
|
|
3898
4041
|
}
|
|
3899
|
-
var
|
|
3900
|
-
function
|
|
3901
|
-
return e =
|
|
4042
|
+
var ke = xe("toUpperCase");
|
|
4043
|
+
function Ae(e, t, n) {
|
|
4044
|
+
return e = Te(e), t = n ? void 0 : t, t === void 0 ? ue(e) ? me(e) : oe(e) : e.match(t) || [];
|
|
3902
4045
|
}
|
|
3903
|
-
t.exports =
|
|
4046
|
+
t.exports = Ee;
|
|
3904
4047
|
})), he = /* @__PURE__ */ t(((e, t) => {
|
|
3905
4048
|
B();
|
|
3906
|
-
var n = ue(), r = de(), i = fe(), a =
|
|
4049
|
+
var n = ue(), r = de(), i = fe(), a = me(), o = {
|
|
3907
4050
|
short: /^-([^\d-])$/,
|
|
3908
4051
|
long: /^--(\S+)/,
|
|
3909
4052
|
combinedShort: /^-[^\d-]{2,}$/,
|
|
@@ -4168,7 +4311,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4168
4311
|
});
|
|
4169
4312
|
}
|
|
4170
4313
|
t.exports = E;
|
|
4171
|
-
})),
|
|
4314
|
+
})), X = /* @__PURE__ */ t(((e, t) => {
|
|
4172
4315
|
var n = U(), r = he();
|
|
4173
4316
|
t.exports = class extends n {
|
|
4174
4317
|
static get name() {
|
|
@@ -4269,7 +4412,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4269
4412
|
], { argv: e });
|
|
4270
4413
|
}
|
|
4271
4414
|
};
|
|
4272
|
-
})),
|
|
4415
|
+
})), ge = /* @__PURE__ */ t(((e, t) => {
|
|
4273
4416
|
var n = U();
|
|
4274
4417
|
t.exports = class extends n {
|
|
4275
4418
|
static get name() {
|
|
@@ -4385,7 +4528,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4385
4528
|
for (; v < _.length;) g.push(_[v++]);
|
|
4386
4529
|
if (p !== null) {
|
|
4387
4530
|
let e = "";
|
|
4388
|
-
if (p === "-") e = this.stdin
|
|
4531
|
+
if (p === "-") e = typeof this.stdin == "string" ? this.stdin : "";
|
|
4389
4532
|
else {
|
|
4390
4533
|
let t = this.fs.getFileByPath(p);
|
|
4391
4534
|
if (t == null) {
|
|
@@ -4415,7 +4558,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4415
4558
|
return this.stdErr = `grep: invalid regex: ${e.message}`, this.exitCode = 2, Promise.resolve();
|
|
4416
4559
|
}
|
|
4417
4560
|
}
|
|
4418
|
-
let x = [], S = !1, C = this.stdin
|
|
4561
|
+
let x = [], S = !1, C = typeof this.stdin == "string" ? this.stdin : "", w = (e, t = !1) => {
|
|
4419
4562
|
let n = this.fs.getFileByPath(e);
|
|
4420
4563
|
if (n == null) {
|
|
4421
4564
|
if (!f) {
|
|
@@ -4526,8 +4669,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4526
4669
|
var { Test: n, TestBracket: r } = ce();
|
|
4527
4670
|
t.exports = [
|
|
4528
4671
|
le(),
|
|
4672
|
+
X(),
|
|
4529
4673
|
ge(),
|
|
4530
|
-
Y(),
|
|
4531
4674
|
_e(),
|
|
4532
4675
|
ve(),
|
|
4533
4676
|
ye(),
|
|
@@ -4536,7 +4679,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4536
4679
|
r
|
|
4537
4680
|
];
|
|
4538
4681
|
})), Se = /* @__PURE__ */ t(((e, t) => {
|
|
4539
|
-
var n =
|
|
4682
|
+
var n = J();
|
|
4540
4683
|
t.exports = class extends n {
|
|
4541
4684
|
static get name() {
|
|
4542
4685
|
return "alias";
|
|
@@ -4548,7 +4691,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4548
4691
|
}
|
|
4549
4692
|
};
|
|
4550
4693
|
})), Ce = /* @__PURE__ */ t(((e, t) => {
|
|
4551
|
-
var n =
|
|
4694
|
+
var n = J();
|
|
4552
4695
|
t.exports = class extends n {
|
|
4553
4696
|
static get name() {
|
|
4554
4697
|
return "export";
|
|
@@ -4560,7 +4703,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4560
4703
|
}
|
|
4561
4704
|
};
|
|
4562
4705
|
})), we = /* @__PURE__ */ t(((e, t) => {
|
|
4563
|
-
var n =
|
|
4706
|
+
var n = J();
|
|
4564
4707
|
t.exports = class extends n {
|
|
4565
4708
|
static get name() {
|
|
4566
4709
|
return "cd";
|
|
@@ -4572,7 +4715,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4572
4715
|
}
|
|
4573
4716
|
};
|
|
4574
4717
|
})), Te = /* @__PURE__ */ t(((e, t) => {
|
|
4575
|
-
var n =
|
|
4718
|
+
var n = J();
|
|
4576
4719
|
t.exports = class extends n {
|
|
4577
4720
|
static get name() {
|
|
4578
4721
|
return "chmod";
|
|
@@ -4628,7 +4771,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4628
4771
|
}
|
|
4629
4772
|
};
|
|
4630
4773
|
})), Ee = /* @__PURE__ */ t(((e, t) => {
|
|
4631
|
-
var n =
|
|
4774
|
+
var n = J(), r = G();
|
|
4632
4775
|
t.exports = class extends n {
|
|
4633
4776
|
static get name() {
|
|
4634
4777
|
return "cp";
|
|
@@ -4724,9 +4867,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4724
4867
|
}
|
|
4725
4868
|
};
|
|
4726
4869
|
})), De = /* @__PURE__ */ t(((e, t) => {
|
|
4727
|
-
var n =
|
|
4870
|
+
var n = J(), r = (() => {
|
|
4728
4871
|
try {
|
|
4729
|
-
return
|
|
4872
|
+
return G();
|
|
4730
4873
|
} catch {
|
|
4731
4874
|
return null;
|
|
4732
4875
|
}
|
|
@@ -4797,7 +4940,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4797
4940
|
}
|
|
4798
4941
|
};
|
|
4799
4942
|
})), Oe = /* @__PURE__ */ t(((e, t) => {
|
|
4800
|
-
var n =
|
|
4943
|
+
var n = J();
|
|
4801
4944
|
t.exports = class extends n {
|
|
4802
4945
|
static get name() {
|
|
4803
4946
|
return "mkdir";
|
|
@@ -4824,7 +4967,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4824
4967
|
}
|
|
4825
4968
|
};
|
|
4826
4969
|
})), ke = /* @__PURE__ */ t(((e, t) => {
|
|
4827
|
-
var n =
|
|
4970
|
+
var n = J(), r = G();
|
|
4828
4971
|
t.exports = class extends n {
|
|
4829
4972
|
static get name() {
|
|
4830
4973
|
return "mv";
|
|
@@ -4897,7 +5040,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4897
5040
|
}
|
|
4898
5041
|
};
|
|
4899
5042
|
})), Ae = /* @__PURE__ */ t(((e, t) => {
|
|
4900
|
-
var n =
|
|
5043
|
+
var n = J();
|
|
4901
5044
|
t.exports = class extends n {
|
|
4902
5045
|
static get name() {
|
|
4903
5046
|
return "pwd";
|
|
@@ -4908,7 +5051,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4908
5051
|
}
|
|
4909
5052
|
};
|
|
4910
5053
|
})), je = /* @__PURE__ */ t(((e, t) => {
|
|
4911
|
-
var n =
|
|
5054
|
+
var n = J(), r = G();
|
|
4912
5055
|
t.exports = class extends n {
|
|
4913
5056
|
static get name() {
|
|
4914
5057
|
return "rm";
|
|
@@ -4953,9 +5096,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4953
5096
|
}
|
|
4954
5097
|
};
|
|
4955
5098
|
})), Me = /* @__PURE__ */ t(((e, t) => {
|
|
4956
|
-
var n =
|
|
5099
|
+
var n = J(), r = (() => {
|
|
4957
5100
|
try {
|
|
4958
|
-
return
|
|
5101
|
+
return G();
|
|
4959
5102
|
} catch {
|
|
4960
5103
|
return null;
|
|
4961
5104
|
}
|
|
@@ -5022,9 +5165,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5022
5165
|
}
|
|
5023
5166
|
};
|
|
5024
5167
|
})), Ne = /* @__PURE__ */ t(((e, t) => {
|
|
5025
|
-
var n =
|
|
5168
|
+
var n = J(), r = (() => {
|
|
5026
5169
|
try {
|
|
5027
|
-
return
|
|
5170
|
+
return G();
|
|
5028
5171
|
} catch {
|
|
5029
5172
|
return null;
|
|
5030
5173
|
}
|
|
@@ -5063,7 +5206,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5063
5206
|
}
|
|
5064
5207
|
};
|
|
5065
5208
|
})), Pe = /* @__PURE__ */ t(((e, t) => {
|
|
5066
|
-
var n =
|
|
5209
|
+
var n = J();
|
|
5067
5210
|
t.exports = class extends n {
|
|
5068
5211
|
static get name() {
|
|
5069
5212
|
return "which";
|
|
@@ -5075,7 +5218,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5075
5218
|
}
|
|
5076
5219
|
};
|
|
5077
5220
|
})), Fe = /* @__PURE__ */ t(((e, t) => {
|
|
5078
|
-
var n =
|
|
5221
|
+
var n = oe(), r = J();
|
|
5079
5222
|
t.exports = class extends r {
|
|
5080
5223
|
static get name() {
|
|
5081
5224
|
return "source";
|
|
@@ -5104,17 +5247,17 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5104
5247
|
}
|
|
5105
5248
|
};
|
|
5106
5249
|
})), Ie = /* @__PURE__ */ t(((e, t) => {
|
|
5107
|
-
var n =
|
|
5250
|
+
var n = J();
|
|
5108
5251
|
t.exports = class extends n {
|
|
5109
5252
|
static get name() {
|
|
5110
5253
|
return "clear";
|
|
5111
5254
|
}
|
|
5112
5255
|
run() {
|
|
5113
|
-
return this.arguments.length > 0 ? Promise.reject("clear does not require arguments") : (this.context.clear(), Promise.resolve());
|
|
5256
|
+
return this.arguments.length > 0 ? Promise.reject("clear does not require arguments") : (this.stdout && this.stdout.write("\x1B[2J\x1B[3J\x1B[H"), this.context.clear(), Promise.resolve());
|
|
5114
5257
|
}
|
|
5115
5258
|
};
|
|
5116
5259
|
})), Le = /* @__PURE__ */ t(((e, t) => {
|
|
5117
|
-
var n =
|
|
5260
|
+
var n = J();
|
|
5118
5261
|
t.exports = class extends n {
|
|
5119
5262
|
static get name() {
|
|
5120
5263
|
return "exit";
|
|
@@ -5125,7 +5268,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5125
5268
|
}
|
|
5126
5269
|
};
|
|
5127
5270
|
})), Re = /* @__PURE__ */ t(((e, t) => {
|
|
5128
|
-
var n =
|
|
5271
|
+
var n = J(), r = he();
|
|
5129
5272
|
t.exports = class extends n {
|
|
5130
5273
|
static get name() {
|
|
5131
5274
|
return "read";
|
|
@@ -5199,7 +5342,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5199
5342
|
}
|
|
5200
5343
|
};
|
|
5201
5344
|
})), ze = /* @__PURE__ */ t(((e, t) => {
|
|
5202
|
-
var n =
|
|
5345
|
+
var n = J(), r = U();
|
|
5203
5346
|
t.exports = class extends n {
|
|
5204
5347
|
static get name() {
|
|
5205
5348
|
return "jsfunction";
|
|
@@ -5235,7 +5378,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5235
5378
|
}
|
|
5236
5379
|
};
|
|
5237
5380
|
})), Be = /* @__PURE__ */ t(((e, t) => {
|
|
5238
|
-
var n =
|
|
5381
|
+
var n = J();
|
|
5239
5382
|
function r(e) {
|
|
5240
5383
|
return e >= 1048576 ? (e / 1048576).toFixed(1) + " MB" : e >= 1024 ? (e / 1024).toFixed(1) + " KB" : e + " B";
|
|
5241
5384
|
}
|
|
@@ -5333,7 +5476,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5333
5476
|
let e = new TextDecoder().decode(t);
|
|
5334
5477
|
this.fs.setFileByPath(s, e, !0);
|
|
5335
5478
|
} else {
|
|
5336
|
-
let { BinaryFile: e } =
|
|
5479
|
+
let { BinaryFile: e } = W(), r = e ? new e(t.buffer, n || "application/octet-stream") : t;
|
|
5337
5480
|
this.fs.setFileByPath(s, r, !0);
|
|
5338
5481
|
}
|
|
5339
5482
|
} catch (e) {
|
|
@@ -5356,7 +5499,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5356
5499
|
}
|
|
5357
5500
|
};
|
|
5358
5501
|
})), Ve = /* @__PURE__ */ t(((e, t) => {
|
|
5359
|
-
var n =
|
|
5502
|
+
var n = J(), r = {
|
|
5360
5503
|
errexit: "e",
|
|
5361
5504
|
xtrace: "x",
|
|
5362
5505
|
nounset: "u",
|
|
@@ -5455,7 +5598,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5455
5598
|
t.exports = ReferenceError;
|
|
5456
5599
|
})), Ye = /* @__PURE__ */ t(((e, t) => {
|
|
5457
5600
|
t.exports = SyntaxError;
|
|
5458
|
-
})),
|
|
5601
|
+
})), Z = /* @__PURE__ */ t(((e, t) => {
|
|
5459
5602
|
t.exports = TypeError;
|
|
5460
5603
|
})), Xe = /* @__PURE__ */ t(((e, t) => {
|
|
5461
5604
|
t.exports = URIError;
|
|
@@ -5565,7 +5708,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5565
5708
|
var n = pt(), r = ht(), i = mt();
|
|
5566
5709
|
t.exports = gt() || n.call(i, r);
|
|
5567
5710
|
})), vt = /* @__PURE__ */ t(((e, t) => {
|
|
5568
|
-
var n = pt(), r =
|
|
5711
|
+
var n = pt(), r = Z(), i = mt(), a = _t();
|
|
5569
5712
|
t.exports = function(e) {
|
|
5570
5713
|
if (e.length < 1 || typeof e[0] != "function") throw new r("a function is required");
|
|
5571
5714
|
return a(n, i, e);
|
|
@@ -5594,8 +5737,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5594
5737
|
})), xt = /* @__PURE__ */ t(((e, t) => {
|
|
5595
5738
|
var n = Function.prototype.call, r = Object.prototype.hasOwnProperty;
|
|
5596
5739
|
t.exports = pt().call(n, r);
|
|
5597
|
-
})),
|
|
5598
|
-
var n, r = We(), i = Ge(), a = Ke(), o = qe(), s = Je(), c = Ye(), l =
|
|
5740
|
+
})), Q = /* @__PURE__ */ t(((e, t) => {
|
|
5741
|
+
var n, r = We(), i = Ge(), a = Ke(), o = qe(), s = Je(), c = Ye(), l = Z(), u = Xe(), d = Ze(), f = Qe(), p = $e(), m = et(), h = tt(), g = nt(), _ = it(), v = Function, y = function(e) {
|
|
5599
5742
|
try {
|
|
5600
5743
|
return v("\"use strict\"; return (" + e + ").constructor;")();
|
|
5601
5744
|
} catch {}
|
|
@@ -5809,7 +5952,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5809
5952
|
return ee(e, V, function(e, t, n, i) {
|
|
5810
5953
|
r[r.length] = n ? ee(i, H, "$1") : t || e;
|
|
5811
5954
|
}), r;
|
|
5812
|
-
},
|
|
5955
|
+
}, ne = function(e, t) {
|
|
5813
5956
|
var n = e, r;
|
|
5814
5957
|
if (I(P, n) && (r = P[n], n = "%" + r[0] + "%"), I(M, n)) {
|
|
5815
5958
|
var i = M[n];
|
|
@@ -5826,7 +5969,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5826
5969
|
if (typeof e != "string" || e.length === 0) throw new l("intrinsic name must be a non-empty string");
|
|
5827
5970
|
if (arguments.length > 1 && typeof t != "boolean") throw new l("\"allowMissing\" argument must be a boolean");
|
|
5828
5971
|
if (B(/^%?[^%]*%?$/, e) === null) throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
5829
|
-
var n = te(e), r = n.length > 0 ? n[0] : "", i =
|
|
5972
|
+
var n = te(e), r = n.length > 0 ? n[0] : "", i = ne("%" + r + "%", t), a = i.name, o = i.value, s = !1, u = i.alias;
|
|
5830
5973
|
u && (r = u[0], R(n, L([0, 1], u)));
|
|
5831
5974
|
for (var d = 1, f = !0; d < n.length; d += 1) {
|
|
5832
5975
|
var p = n[d], m = z(p, 0, 1), h = z(p, -1);
|
|
@@ -5847,7 +5990,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5847
5990
|
return o;
|
|
5848
5991
|
};
|
|
5849
5992
|
})), St = /* @__PURE__ */ t(((e, t) => {
|
|
5850
|
-
var n = st(), r = Ye(), i =
|
|
5993
|
+
var n = st(), r = Ye(), i = Z(), a = ot();
|
|
5851
5994
|
t.exports = function(e, t, o) {
|
|
5852
5995
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`obj` must be an object or a function`");
|
|
5853
5996
|
if (typeof t != "string" && typeof t != "symbol") throw new i("`property` must be a string or a symbol`");
|
|
@@ -5878,7 +6021,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5878
6021
|
}
|
|
5879
6022
|
}, t.exports = r;
|
|
5880
6023
|
})), wt = /* @__PURE__ */ t(((e, t) => {
|
|
5881
|
-
var n =
|
|
6024
|
+
var n = Q(), r = St(), i = Ct()(), a = ot(), o = Z(), s = n("%Math.floor%");
|
|
5882
6025
|
t.exports = function(e, t) {
|
|
5883
6026
|
if (typeof e != "function") throw new o("`fn` is not a function");
|
|
5884
6027
|
if (typeof t != "number" || t < 0 || t > 4294967295 || s(t) !== t) throw new o("`length` must be a positive 32-bit integer");
|
|
@@ -6004,21 +6147,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6004
6147
|
for (var s = 0; s < o.length; s += 1) l(e, o[s], t[o[s]], i[o[s]]);
|
|
6005
6148
|
};
|
|
6006
6149
|
u.supportsDescriptors = !!c, t.exports = u;
|
|
6007
|
-
})),
|
|
6008
|
-
var n =
|
|
6150
|
+
})), $ = /* @__PURE__ */ t(((e, t) => {
|
|
6151
|
+
var n = Q(), r = vt(), i = r([n("%String.prototype.indexOf%")]);
|
|
6009
6152
|
t.exports = function(e, t) {
|
|
6010
6153
|
var a = n(e, !!t);
|
|
6011
6154
|
return typeof a == "function" && i(e, ".prototype.") > -1 ? r([a]) : a;
|
|
6012
6155
|
};
|
|
6013
6156
|
})), jt = /* @__PURE__ */ t(((e, t) => {
|
|
6014
|
-
var n =
|
|
6157
|
+
var n = Q()("%Array%"), r = !n.isArray && $()("Object.prototype.toString");
|
|
6015
6158
|
t.exports = n.isArray || function(e) {
|
|
6016
6159
|
return r(e) === "[object Array]";
|
|
6017
6160
|
};
|
|
6018
6161
|
})), Mt = /* @__PURE__ */ t(((e, t) => {
|
|
6019
6162
|
t.exports = jt();
|
|
6020
6163
|
})), Nt = /* @__PURE__ */ t(((e, t) => {
|
|
6021
|
-
var n =
|
|
6164
|
+
var n = Q(), r = $(), i = Z(), a = Mt(), o = n("%Reflect.apply%", !0) || r("Function.prototype.apply");
|
|
6022
6165
|
t.exports = function(e, t) {
|
|
6023
6166
|
var n = arguments.length > 2 ? arguments[2] : [];
|
|
6024
6167
|
if (!a(n)) throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");
|
|
@@ -6027,7 +6170,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6027
6170
|
})), Pt = /* @__PURE__ */ t(((e, t) => {
|
|
6028
6171
|
t.exports = {};
|
|
6029
6172
|
})), Ft = /* @__PURE__ */ t(((e, t) => {
|
|
6030
|
-
|
|
6173
|
+
Y();
|
|
6031
6174
|
var n = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = n && r && typeof r.get == "function" ? r.get : null, a = n && Map.prototype.forEach, o = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, c = o && s && typeof s.get == "function" ? s.get : null, l = o && Set.prototype.forEach, u = typeof WeakMap == "function" && WeakMap.prototype ? WeakMap.prototype.has : null, d = typeof WeakSet == "function" && WeakSet.prototype ? WeakSet.prototype.has : null, f = typeof WeakRef == "function" && WeakRef.prototype ? WeakRef.prototype.deref : null, p = Boolean.prototype.valueOf, m = Object.prototype.toString, h = Function.prototype.toString, g = String.prototype.match, _ = String.prototype.slice, v = String.prototype.replace, y = String.prototype.toUpperCase, b = String.prototype.toLowerCase, x = RegExp.prototype.test, S = Array.prototype.concat, C = Array.prototype.join, w = Array.prototype.slice, T = Math.floor, E = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, D = Object.getOwnPropertySymbols, O = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", A = typeof Symbol == "function" && Symbol.toStringTag ? Symbol.toStringTag : null, j = Object.prototype.propertyIsEnumerable, M = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
6032
6175
|
return e.__proto__;
|
|
6033
6176
|
} : null);
|
|
@@ -6054,17 +6197,17 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6054
6197
|
};
|
|
6055
6198
|
t.exports = function e(t, n, r, o) {
|
|
6056
6199
|
var s = n || {};
|
|
6057
|
-
if (
|
|
6058
|
-
if (
|
|
6059
|
-
var u =
|
|
6200
|
+
if (K(s, "quoteStyle") && !K(L, s.quoteStyle)) throw TypeError("option \"quoteStyle\" must be \"single\" or \"double\"");
|
|
6201
|
+
if (K(s, "maxStringLength") && (typeof s.maxStringLength == "number" ? s.maxStringLength < 0 && s.maxStringLength !== Infinity : s.maxStringLength !== null)) throw TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`");
|
|
6202
|
+
var u = K(s, "customInspect") ? s.customInspect : !0;
|
|
6060
6203
|
if (typeof u != "boolean" && u !== "symbol") throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
6061
|
-
if (
|
|
6062
|
-
if (
|
|
6204
|
+
if (K(s, "indent") && s.indent !== null && s.indent !== " " && !(parseInt(s.indent, 10) === s.indent && s.indent > 0)) throw TypeError("option \"indent\" must be \"\\t\", an integer > 0, or `null`");
|
|
6205
|
+
if (K(s, "numericSeparator") && typeof s.numericSeparator != "boolean") throw TypeError("option \"numericSeparator\", if provided, must be `true` or `false`");
|
|
6063
6206
|
var d = s.numericSeparator;
|
|
6064
6207
|
if (t === void 0) return "undefined";
|
|
6065
6208
|
if (t === null) return "null";
|
|
6066
6209
|
if (typeof t == "boolean") return t ? "true" : "false";
|
|
6067
|
-
if (typeof t == "string") return
|
|
6210
|
+
if (typeof t == "string") return me(t, s);
|
|
6068
6211
|
if (typeof t == "number") {
|
|
6069
6212
|
if (t === 0) return Infinity / t > 0 ? "0" : "-0";
|
|
6070
6213
|
var f = String(t);
|
|
@@ -6076,65 +6219,65 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6076
6219
|
}
|
|
6077
6220
|
var h = s.depth === void 0 ? 5 : s.depth;
|
|
6078
6221
|
if (r === void 0 && (r = 0), r >= h && h > 0 && typeof t == "object") return V(t) ? "[Array]" : "[Object]";
|
|
6079
|
-
var g =
|
|
6222
|
+
var g = ye(s, r);
|
|
6080
6223
|
if (o === void 0) o = [];
|
|
6081
|
-
else if (
|
|
6224
|
+
else if (oe(o, t) >= 0) return "[Circular]";
|
|
6082
6225
|
function y(t, n, i) {
|
|
6083
6226
|
if (n && (o = w.call(o), o.push(n)), i) {
|
|
6084
6227
|
var a = { depth: s.depth };
|
|
6085
|
-
return
|
|
6228
|
+
return K(s, "quoteStyle") && (a.quoteStyle = s.quoteStyle), e(t, a, r + 1, o);
|
|
6086
6229
|
}
|
|
6087
6230
|
return e(t, s, r + 1, o);
|
|
6088
6231
|
}
|
|
6089
6232
|
if (typeof t == "function" && !te(t)) {
|
|
6090
|
-
var x =
|
|
6233
|
+
var x = J(t), T = xe(t, y);
|
|
6091
6234
|
return "[Function" + (x ? ": " + x : " (anonymous)") + "]" + (T.length > 0 ? " { " + C.call(T, ", ") + " }" : "");
|
|
6092
6235
|
}
|
|
6093
6236
|
if (W(t)) {
|
|
6094
6237
|
var D = k ? v.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : O.call(t);
|
|
6095
|
-
return typeof t == "object" && !k ?
|
|
6238
|
+
return typeof t == "object" && !k ? X(D) : D;
|
|
6096
6239
|
}
|
|
6097
|
-
if (
|
|
6240
|
+
if (fe(t)) {
|
|
6098
6241
|
for (var F = "<" + b.call(String(t.nodeName)), R = t.attributes || [], B = 0; B < R.length; B++) F += " " + R[B].name + "=" + ee(z(R[B].value), "double", s);
|
|
6099
6242
|
return F += ">", t.childNodes && t.childNodes.length && (F += "..."), F += "</" + b.call(String(t.nodeName)) + ">", F;
|
|
6100
6243
|
}
|
|
6101
6244
|
if (V(t)) {
|
|
6102
6245
|
if (t.length === 0) return "[]";
|
|
6103
|
-
var
|
|
6104
|
-
return g && !
|
|
6246
|
+
var ae = xe(t, y);
|
|
6247
|
+
return g && !ve(ae) ? "[" + be(ae, g) + "]" : "[ " + C.call(ae, ", ") + " ]";
|
|
6105
6248
|
}
|
|
6106
|
-
if (
|
|
6107
|
-
var
|
|
6108
|
-
return !("cause" in Error.prototype) && "cause" in t && !j.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause),
|
|
6249
|
+
if (ne(t)) {
|
|
6250
|
+
var Y = xe(t, y);
|
|
6251
|
+
return !("cause" in Error.prototype) && "cause" in t && !j.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause), Y), ", ") + " }" : Y.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + C.call(Y, ", ") + " }";
|
|
6109
6252
|
}
|
|
6110
6253
|
if (typeof t == "object" && u) {
|
|
6111
6254
|
if (I && typeof t[I] == "function" && P) return P(t, { depth: h - r });
|
|
6112
6255
|
if (u !== "symbol" && typeof t.inspect == "function") return t.inspect();
|
|
6113
6256
|
}
|
|
6114
|
-
if (
|
|
6115
|
-
var
|
|
6257
|
+
if (se(t)) {
|
|
6258
|
+
var he = [];
|
|
6116
6259
|
return a && a.call(t, function(e, n) {
|
|
6117
|
-
|
|
6118
|
-
}),
|
|
6260
|
+
he.push(y(n, t, !0) + " => " + y(e, t));
|
|
6261
|
+
}), _e("Map", i.call(t), he, g);
|
|
6119
6262
|
}
|
|
6120
|
-
if (
|
|
6121
|
-
var
|
|
6263
|
+
if (ue(t)) {
|
|
6264
|
+
var Se = [];
|
|
6122
6265
|
return l && l.call(t, function(e) {
|
|
6123
|
-
|
|
6124
|
-
}),
|
|
6125
|
-
}
|
|
6126
|
-
if (
|
|
6127
|
-
if (
|
|
6128
|
-
if (
|
|
6129
|
-
if (re(t)) return
|
|
6130
|
-
if (
|
|
6131
|
-
if (ie(t)) return
|
|
6132
|
-
if (
|
|
6266
|
+
Se.push(y(e, t));
|
|
6267
|
+
}), _e("Set", c.call(t), Se, g);
|
|
6268
|
+
}
|
|
6269
|
+
if (ce(t)) return ge("WeakMap");
|
|
6270
|
+
if (de(t)) return ge("WeakSet");
|
|
6271
|
+
if (le(t)) return ge("WeakRef");
|
|
6272
|
+
if (re(t)) return X(y(Number(t)));
|
|
6273
|
+
if (G(t)) return X(y(E.call(t)));
|
|
6274
|
+
if (ie(t)) return X(p.call(t));
|
|
6275
|
+
if (U(t)) return X(y(String(t)));
|
|
6133
6276
|
if (typeof window < "u" && t === window) return "{ [object Window] }";
|
|
6134
6277
|
if (typeof globalThis < "u" && t === globalThis || pe !== void 0 && t === pe) return "{ [object globalThis] }";
|
|
6135
6278
|
if (!H(t) && !te(t)) {
|
|
6136
|
-
var
|
|
6137
|
-
return
|
|
6279
|
+
var Ce = xe(t, y), we = M ? M(t) === Object.prototype : t instanceof Object || t.constructor === Object, Te = t instanceof Object ? "" : "null prototype", Ee = !we && A && Object(t) === t && A in t ? _.call(q(t), 8, -1) : Te ? "Object" : "", De = (we || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "") + (Ee || Te ? "[" + C.call(S.call([], Ee || [], Te || []), ": ") + "] " : "");
|
|
6280
|
+
return Ce.length === 0 ? De + "{}" : g ? De + "{" + be(Ce, g) + "}" : De + "{ " + C.call(Ce, ", ") + " }";
|
|
6138
6281
|
}
|
|
6139
6282
|
return String(t);
|
|
6140
6283
|
};
|
|
@@ -6149,25 +6292,25 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6149
6292
|
return !A || !(typeof e == "object" && (A in e || e[A] !== void 0));
|
|
6150
6293
|
}
|
|
6151
6294
|
function V(e) {
|
|
6152
|
-
return
|
|
6295
|
+
return q(e) === "[object Array]" && B(e);
|
|
6153
6296
|
}
|
|
6154
6297
|
function H(e) {
|
|
6155
|
-
return
|
|
6298
|
+
return q(e) === "[object Date]" && B(e);
|
|
6156
6299
|
}
|
|
6157
6300
|
function te(e) {
|
|
6158
|
-
return
|
|
6159
|
-
}
|
|
6160
|
-
function U(e) {
|
|
6161
|
-
return K(e) === "[object Error]" && B(e);
|
|
6301
|
+
return q(e) === "[object RegExp]" && B(e);
|
|
6162
6302
|
}
|
|
6163
6303
|
function ne(e) {
|
|
6164
|
-
return
|
|
6304
|
+
return q(e) === "[object Error]" && B(e);
|
|
6305
|
+
}
|
|
6306
|
+
function U(e) {
|
|
6307
|
+
return q(e) === "[object String]" && B(e);
|
|
6165
6308
|
}
|
|
6166
6309
|
function re(e) {
|
|
6167
|
-
return
|
|
6310
|
+
return q(e) === "[object Number]" && B(e);
|
|
6168
6311
|
}
|
|
6169
6312
|
function ie(e) {
|
|
6170
|
-
return
|
|
6313
|
+
return q(e) === "[object Boolean]" && B(e);
|
|
6171
6314
|
}
|
|
6172
6315
|
function W(e) {
|
|
6173
6316
|
if (k) return e && typeof e == "object" && e instanceof Symbol;
|
|
@@ -6178,33 +6321,33 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6178
6321
|
} catch {}
|
|
6179
6322
|
return !1;
|
|
6180
6323
|
}
|
|
6181
|
-
function
|
|
6324
|
+
function G(e) {
|
|
6182
6325
|
if (!e || typeof e != "object" || !E) return !1;
|
|
6183
6326
|
try {
|
|
6184
6327
|
return E.call(e), !0;
|
|
6185
6328
|
} catch {}
|
|
6186
6329
|
return !1;
|
|
6187
6330
|
}
|
|
6188
|
-
var
|
|
6331
|
+
var ae = Object.prototype.hasOwnProperty || function(e) {
|
|
6189
6332
|
return e in this;
|
|
6190
6333
|
};
|
|
6191
|
-
function
|
|
6192
|
-
return
|
|
6334
|
+
function K(e, t) {
|
|
6335
|
+
return ae.call(e, t);
|
|
6193
6336
|
}
|
|
6194
|
-
function
|
|
6337
|
+
function q(e) {
|
|
6195
6338
|
return m.call(e);
|
|
6196
6339
|
}
|
|
6197
|
-
function
|
|
6340
|
+
function J(e) {
|
|
6198
6341
|
if (e.name) return e.name;
|
|
6199
6342
|
var t = g.call(h.call(e), /^function\s*([\w$]+)/);
|
|
6200
6343
|
return t ? t[1] : null;
|
|
6201
6344
|
}
|
|
6202
|
-
function
|
|
6345
|
+
function oe(e, t) {
|
|
6203
6346
|
if (e.indexOf) return e.indexOf(t);
|
|
6204
6347
|
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
|
|
6205
6348
|
return -1;
|
|
6206
6349
|
}
|
|
6207
|
-
function
|
|
6350
|
+
function se(e) {
|
|
6208
6351
|
if (!i || !e || typeof e != "object") return !1;
|
|
6209
6352
|
try {
|
|
6210
6353
|
i.call(e);
|
|
@@ -6217,7 +6360,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6217
6360
|
} catch {}
|
|
6218
6361
|
return !1;
|
|
6219
6362
|
}
|
|
6220
|
-
function
|
|
6363
|
+
function ce(e) {
|
|
6221
6364
|
if (!u || !e || typeof e != "object") return !1;
|
|
6222
6365
|
try {
|
|
6223
6366
|
u.call(e, u);
|
|
@@ -6230,14 +6373,14 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6230
6373
|
} catch {}
|
|
6231
6374
|
return !1;
|
|
6232
6375
|
}
|
|
6233
|
-
function
|
|
6376
|
+
function le(e) {
|
|
6234
6377
|
if (!f || !e || typeof e != "object") return !1;
|
|
6235
6378
|
try {
|
|
6236
6379
|
return f.call(e), !0;
|
|
6237
6380
|
} catch {}
|
|
6238
6381
|
return !1;
|
|
6239
6382
|
}
|
|
6240
|
-
function
|
|
6383
|
+
function ue(e) {
|
|
6241
6384
|
if (!c || !e || typeof e != "object") return !1;
|
|
6242
6385
|
try {
|
|
6243
6386
|
c.call(e);
|
|
@@ -6250,7 +6393,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6250
6393
|
} catch {}
|
|
6251
6394
|
return !1;
|
|
6252
6395
|
}
|
|
6253
|
-
function
|
|
6396
|
+
function de(e) {
|
|
6254
6397
|
if (!d || !e || typeof e != "object") return !1;
|
|
6255
6398
|
try {
|
|
6256
6399
|
d.call(e, d);
|
|
@@ -6263,18 +6406,18 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6263
6406
|
} catch {}
|
|
6264
6407
|
return !1;
|
|
6265
6408
|
}
|
|
6266
|
-
function
|
|
6409
|
+
function fe(e) {
|
|
6267
6410
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
6268
6411
|
}
|
|
6269
|
-
function
|
|
6412
|
+
function me(e, t) {
|
|
6270
6413
|
if (e.length > t.maxStringLength) {
|
|
6271
6414
|
var n = e.length - t.maxStringLength, r = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
6272
|
-
return
|
|
6415
|
+
return me(_.call(e, 0, t.maxStringLength), t) + r;
|
|
6273
6416
|
}
|
|
6274
6417
|
var i = R[t.quoteStyle || "single"];
|
|
6275
|
-
return i.lastIndex = 0, ee(v.call(v.call(e, i, "\\$1"), /[\x00-\x1f]/g,
|
|
6418
|
+
return i.lastIndex = 0, ee(v.call(v.call(e, i, "\\$1"), /[\x00-\x1f]/g, he), "single", t);
|
|
6276
6419
|
}
|
|
6277
|
-
function
|
|
6420
|
+
function he(e) {
|
|
6278
6421
|
var t = e.charCodeAt(0), n = {
|
|
6279
6422
|
8: "b",
|
|
6280
6423
|
9: "t",
|
|
@@ -6284,21 +6427,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6284
6427
|
}[t];
|
|
6285
6428
|
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + y.call(t.toString(16));
|
|
6286
6429
|
}
|
|
6287
|
-
function
|
|
6430
|
+
function X(e) {
|
|
6288
6431
|
return "Object(" + e + ")";
|
|
6289
6432
|
}
|
|
6290
|
-
function
|
|
6433
|
+
function ge(e) {
|
|
6291
6434
|
return e + " { ? }";
|
|
6292
6435
|
}
|
|
6293
|
-
function
|
|
6294
|
-
var i = r ?
|
|
6436
|
+
function _e(e, t, n, r) {
|
|
6437
|
+
var i = r ? be(n, r) : C.call(n, ", ");
|
|
6295
6438
|
return e + " (" + t + ") {" + i + "}";
|
|
6296
6439
|
}
|
|
6297
|
-
function
|
|
6298
|
-
for (var t = 0; t < e.length; t++) if (
|
|
6440
|
+
function ve(e) {
|
|
6441
|
+
for (var t = 0; t < e.length; t++) if (oe(e[t], "\n") >= 0) return !1;
|
|
6299
6442
|
return !0;
|
|
6300
6443
|
}
|
|
6301
|
-
function
|
|
6444
|
+
function ye(e, t) {
|
|
6302
6445
|
var n;
|
|
6303
6446
|
if (e.indent === " ") n = " ";
|
|
6304
6447
|
else if (typeof e.indent == "number" && e.indent > 0) n = C.call(Array(e.indent + 1), " ");
|
|
@@ -6308,23 +6451,23 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6308
6451
|
prev: C.call(Array(t + 1), n)
|
|
6309
6452
|
};
|
|
6310
6453
|
}
|
|
6311
|
-
function
|
|
6454
|
+
function be(e, t) {
|
|
6312
6455
|
if (e.length === 0) return "";
|
|
6313
6456
|
var n = "\n" + t.prev + t.base;
|
|
6314
6457
|
return n + C.call(e, "," + n) + "\n" + t.prev;
|
|
6315
6458
|
}
|
|
6316
|
-
function
|
|
6459
|
+
function xe(e, t) {
|
|
6317
6460
|
var n = V(e), r = [];
|
|
6318
6461
|
if (n) {
|
|
6319
6462
|
r.length = e.length;
|
|
6320
|
-
for (var i = 0; i < e.length; i++) r[i] =
|
|
6463
|
+
for (var i = 0; i < e.length; i++) r[i] = K(e, i) ? t(e[i], e) : "";
|
|
6321
6464
|
}
|
|
6322
6465
|
var a = typeof D == "function" ? D(e) : [], o;
|
|
6323
6466
|
if (k) {
|
|
6324
6467
|
o = {};
|
|
6325
6468
|
for (var s = 0; s < a.length; s++) o["$" + a[s]] = a[s];
|
|
6326
6469
|
}
|
|
6327
|
-
for (var c in e)
|
|
6470
|
+
for (var c in e) K(e, c) && (n && String(Number(c)) === c && c < e.length || k && o["$" + c] instanceof Symbol || (x.call(/[^\w$]/, c) ? r.push(t(c, e) + ": " + t(e[c], e)) : r.push(c + ": " + t(e[c], e))));
|
|
6328
6471
|
if (typeof D == "function") for (var l = 0; l < a.length; l++) j.call(e, a[l]) && r.push("[" + t(a[l]) + "]: " + t(e[a[l]], e));
|
|
6329
6472
|
return r;
|
|
6330
6473
|
}
|
|
@@ -6332,24 +6475,24 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6332
6475
|
t.exports = function(e) {
|
|
6333
6476
|
return typeof e == "string" || typeof e == "symbol";
|
|
6334
6477
|
};
|
|
6335
|
-
})),
|
|
6478
|
+
})), Lt = /* @__PURE__ */ t(((e, t) => {
|
|
6336
6479
|
t.exports = function(e) {
|
|
6337
6480
|
return !!e && (typeof e == "function" || typeof e == "object");
|
|
6338
6481
|
};
|
|
6339
|
-
})),
|
|
6340
|
-
var n =
|
|
6482
|
+
})), Rt = /* @__PURE__ */ t(((e, t) => {
|
|
6483
|
+
var n = Z(), r = Ft(), i = It(), a = Lt();
|
|
6341
6484
|
t.exports = function(e, t) {
|
|
6342
6485
|
if (!a(e)) throw new n("Assertion failed: Type(O) is not Object");
|
|
6343
6486
|
if (!i(t)) throw new n("Assertion failed: P is not a Property Key, got " + r(t));
|
|
6344
6487
|
return e[t];
|
|
6345
6488
|
};
|
|
6346
|
-
})),
|
|
6347
|
-
var n =
|
|
6489
|
+
})), zt = /* @__PURE__ */ t(((e, t) => {
|
|
6490
|
+
var n = Z(), r = Ft(), i = It();
|
|
6348
6491
|
t.exports = function(e, t) {
|
|
6349
6492
|
if (!i(t)) throw new n("Assertion failed: P is not a Property Key, got " + r(t));
|
|
6350
6493
|
return e[t];
|
|
6351
6494
|
};
|
|
6352
|
-
})),
|
|
6495
|
+
})), Bt = /* @__PURE__ */ t(((e, t) => {
|
|
6353
6496
|
var n = Function.prototype.toString, r = typeof Reflect == "object" && Reflect !== null && Reflect.apply, i, a;
|
|
6354
6497
|
if (typeof r == "function" && typeof Object.defineProperty == "function") try {
|
|
6355
6498
|
i = Object.defineProperty({}, "length", { get: function() {
|
|
@@ -6404,10 +6547,10 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6404
6547
|
var t = l.call(e);
|
|
6405
6548
|
return t !== d && t !== f && !/^\[object HTML/.test(t) ? !1 : c(e);
|
|
6406
6549
|
};
|
|
6407
|
-
})), Bt = /* @__PURE__ */ t(((e, t) => {
|
|
6408
|
-
t.exports = zt();
|
|
6409
6550
|
})), Vt = /* @__PURE__ */ t(((e, t) => {
|
|
6410
|
-
|
|
6551
|
+
t.exports = Bt();
|
|
6552
|
+
})), Ht = /* @__PURE__ */ t(((e, t) => {
|
|
6553
|
+
var n = Z(), r = zt(), i = Vt(), a = It(), o = Ft();
|
|
6411
6554
|
t.exports = function(e, t) {
|
|
6412
6555
|
if (!a(t)) throw new n("Assertion failed: P is not a Property Key");
|
|
6413
6556
|
var s = r(e, t);
|
|
@@ -6416,13 +6559,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6416
6559
|
return s;
|
|
6417
6560
|
}
|
|
6418
6561
|
};
|
|
6419
|
-
})),
|
|
6562
|
+
})), Ut = /* @__PURE__ */ t(((e, t) => {
|
|
6420
6563
|
var n = ct();
|
|
6421
6564
|
t.exports = function() {
|
|
6422
6565
|
return n() && !!Symbol.toStringTag;
|
|
6423
6566
|
};
|
|
6424
|
-
})),
|
|
6425
|
-
var n =
|
|
6567
|
+
})), Wt = /* @__PURE__ */ t(((e, t) => {
|
|
6568
|
+
var n = $(), r = Ut()(), i = xt(), a = ot(), o;
|
|
6426
6569
|
if (r) {
|
|
6427
6570
|
var s = n("RegExp.prototype.exec"), c = {}, l = function() {
|
|
6428
6571
|
throw c;
|
|
@@ -6447,12 +6590,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6447
6590
|
};
|
|
6448
6591
|
}
|
|
6449
6592
|
t.exports = o;
|
|
6450
|
-
})),
|
|
6593
|
+
})), Gt = /* @__PURE__ */ t(((e, t) => {
|
|
6451
6594
|
t.exports = function(e) {
|
|
6452
6595
|
return !!e;
|
|
6453
6596
|
};
|
|
6454
|
-
})),
|
|
6455
|
-
var n =
|
|
6597
|
+
})), Kt = /* @__PURE__ */ t(((e, t) => {
|
|
6598
|
+
var n = Q()("%Symbol.match%", !0), r = Wt(), i = Lt(), a = Gt();
|
|
6456
6599
|
t.exports = function(e) {
|
|
6457
6600
|
if (!i(e)) return !1;
|
|
6458
6601
|
if (n) {
|
|
@@ -6461,19 +6604,19 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6461
6604
|
}
|
|
6462
6605
|
return r(e);
|
|
6463
6606
|
};
|
|
6464
|
-
})),
|
|
6465
|
-
var n =
|
|
6607
|
+
})), qt = /* @__PURE__ */ t(((e, t) => {
|
|
6608
|
+
var n = Q()("%String%"), r = Z();
|
|
6466
6609
|
t.exports = function(e) {
|
|
6467
6610
|
if (typeof e == "symbol") throw new r("Cannot convert a Symbol value to a string");
|
|
6468
6611
|
return n(e);
|
|
6469
6612
|
};
|
|
6470
|
-
})),
|
|
6471
|
-
var n =
|
|
6613
|
+
})), Jt = /* @__PURE__ */ t(((e, t) => {
|
|
6614
|
+
var n = Z();
|
|
6472
6615
|
t.exports = function(e) {
|
|
6473
6616
|
if (e == null) throw new n(arguments.length > 0 && arguments[1] || "Cannot call method on " + e);
|
|
6474
6617
|
return e;
|
|
6475
6618
|
};
|
|
6476
|
-
})),
|
|
6619
|
+
})), Yt = /* @__PURE__ */ t(((e, t) => {
|
|
6477
6620
|
var n = function() {
|
|
6478
6621
|
return typeof function() {}.name == "string";
|
|
6479
6622
|
}, r = Object.getOwnPropertyDescriptor;
|
|
@@ -6491,21 +6634,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6491
6634
|
n.boundFunctionsHaveNames = function() {
|
|
6492
6635
|
return n() && typeof i == "function" && function() {}.bind().name !== "";
|
|
6493
6636
|
}, t.exports = n;
|
|
6494
|
-
})),
|
|
6495
|
-
var n = St(), r = Ct()(), i =
|
|
6637
|
+
})), Xt = /* @__PURE__ */ t(((e, t) => {
|
|
6638
|
+
var n = St(), r = Ct()(), i = Yt().functionsHaveConfigurableNames(), a = Z();
|
|
6496
6639
|
t.exports = function(e, t) {
|
|
6497
6640
|
if (typeof e != "function") throw new a("`fn` is not a function");
|
|
6498
6641
|
return (!(arguments.length > 2 && arguments[2]) || i) && (r ? n(e, "name", t, !0, !0) : n(e, "name", t)), e;
|
|
6499
6642
|
};
|
|
6500
|
-
})),
|
|
6501
|
-
var n =
|
|
6643
|
+
})), Zt = /* @__PURE__ */ t(((e, t) => {
|
|
6644
|
+
var n = Xt(), r = Z(), i = Object;
|
|
6502
6645
|
t.exports = n(function() {
|
|
6503
6646
|
if (this == null || this !== i(this)) throw new r("RegExp.prototype.flags getter called on non-object");
|
|
6504
6647
|
var e = "";
|
|
6505
6648
|
return this.hasIndices && (e += "d"), this.global && (e += "g"), this.ignoreCase && (e += "i"), this.multiline && (e += "m"), this.dotAll && (e += "s"), this.unicode && (e += "u"), this.unicodeSets && (e += "v"), this.sticky && (e += "y"), e;
|
|
6506
6649
|
}, "get flags", !0);
|
|
6507
|
-
})),
|
|
6508
|
-
var n =
|
|
6650
|
+
})), Qt = /* @__PURE__ */ t(((e, t) => {
|
|
6651
|
+
var n = Zt(), r = At().supportsDescriptors, i = Object.getOwnPropertyDescriptor;
|
|
6509
6652
|
t.exports = function() {
|
|
6510
6653
|
if (r && /a/gim.flags === "gim") {
|
|
6511
6654
|
var e = i(RegExp.prototype, "flags");
|
|
@@ -6520,8 +6663,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6520
6663
|
}
|
|
6521
6664
|
return n;
|
|
6522
6665
|
};
|
|
6523
|
-
})),
|
|
6524
|
-
var n = At().supportsDescriptors, r =
|
|
6666
|
+
})), $t = /* @__PURE__ */ t(((e, t) => {
|
|
6667
|
+
var n = At().supportsDescriptors, r = Qt(), i = ot(), a = Object.defineProperty, o = Ge(), s = bt(), c = /a/;
|
|
6525
6668
|
t.exports = function() {
|
|
6526
6669
|
if (!n || !s) throw new o("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");
|
|
6527
6670
|
var e = r(), t = s(c), l = i(t, "flags");
|
|
@@ -6531,29 +6674,29 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6531
6674
|
get: e
|
|
6532
6675
|
}), e;
|
|
6533
6676
|
};
|
|
6534
|
-
})),
|
|
6535
|
-
var n = At(), r = Et(), i =
|
|
6677
|
+
})), en = /* @__PURE__ */ t(((e, t) => {
|
|
6678
|
+
var n = At(), r = Et(), i = Zt(), a = Qt(), o = $t(), s = r(a());
|
|
6536
6679
|
n(s, {
|
|
6537
6680
|
getPolyfill: a,
|
|
6538
6681
|
implementation: i,
|
|
6539
6682
|
shim: o
|
|
6540
6683
|
}), t.exports = s;
|
|
6541
|
-
})),
|
|
6684
|
+
})), tn = /* @__PURE__ */ t(((e, t) => {
|
|
6542
6685
|
t.exports = function(e) {
|
|
6543
6686
|
return typeof e == "number" && e >= 55296 && e <= 56319;
|
|
6544
6687
|
};
|
|
6545
|
-
})),
|
|
6688
|
+
})), nn = /* @__PURE__ */ t(((e, t) => {
|
|
6546
6689
|
t.exports = function(e) {
|
|
6547
6690
|
return typeof e == "number" && e >= 56320 && e <= 57343;
|
|
6548
6691
|
};
|
|
6549
|
-
})),
|
|
6550
|
-
var n =
|
|
6692
|
+
})), rn = /* @__PURE__ */ t(((e, t) => {
|
|
6693
|
+
var n = Q(), r = Z(), i = n("%String.fromCharCode%"), a = tn(), o = nn();
|
|
6551
6694
|
t.exports = function(e, t) {
|
|
6552
6695
|
if (!a(e) || !o(t)) throw new r("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");
|
|
6553
6696
|
return i(e) + i(t);
|
|
6554
6697
|
};
|
|
6555
|
-
})),
|
|
6556
|
-
var n =
|
|
6698
|
+
})), an = /* @__PURE__ */ t(((e, t) => {
|
|
6699
|
+
var n = Z(), r = $(), i = tn(), a = nn(), o = rn(), s = r("String.prototype.charAt"), c = r("String.prototype.charCodeAt");
|
|
6557
6700
|
t.exports = function(e, t) {
|
|
6558
6701
|
if (typeof e != "string") throw new n("Assertion failed: `string` must be a String");
|
|
6559
6702
|
var r = e.length;
|
|
@@ -6580,22 +6723,22 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6580
6723
|
"[[IsUnpairedSurrogate]]": !0
|
|
6581
6724
|
};
|
|
6582
6725
|
};
|
|
6583
|
-
})),
|
|
6726
|
+
})), on = /* @__PURE__ */ t(((e, t) => {
|
|
6584
6727
|
var n = rt();
|
|
6585
6728
|
t.exports = function(e) {
|
|
6586
6729
|
return (typeof e == "number" || typeof e == "bigint") && !n(e) && e !== Infinity && e !== -Infinity;
|
|
6587
6730
|
};
|
|
6588
|
-
})),
|
|
6589
|
-
var n = Ze(), r = Qe(), i = rt(), a =
|
|
6731
|
+
})), sn = /* @__PURE__ */ t(((e, t) => {
|
|
6732
|
+
var n = Ze(), r = Qe(), i = rt(), a = on();
|
|
6590
6733
|
t.exports = function(e) {
|
|
6591
6734
|
if (typeof e != "number" || i(e) || !a(e)) return !1;
|
|
6592
6735
|
var t = n(e);
|
|
6593
6736
|
return r(t) === t;
|
|
6594
6737
|
};
|
|
6595
|
-
})), sn = /* @__PURE__ */ t(((e, t) => {
|
|
6596
|
-
t.exports = 2 ** 53 - 1 || 9007199254740991;
|
|
6597
6738
|
})), cn = /* @__PURE__ */ t(((e, t) => {
|
|
6598
|
-
|
|
6739
|
+
t.exports = 2 ** 53 - 1 || 9007199254740991;
|
|
6740
|
+
})), ln = /* @__PURE__ */ t(((e, t) => {
|
|
6741
|
+
var n = an(), r = Z(), i = sn(), a = cn();
|
|
6599
6742
|
t.exports = function(e, t, o) {
|
|
6600
6743
|
if (typeof e != "string") throw new r("Assertion failed: `S` must be a String");
|
|
6601
6744
|
if (!i(t) || t < 0 || t > a) throw new r("Assertion failed: `length` must be an integer >= 0 and <= 2**53");
|
|
@@ -6604,8 +6747,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6604
6747
|
var s = e.length;
|
|
6605
6748
|
return t + 1 >= s ? t + 1 : t + n(e, t)["[[CodeUnitCount]]"];
|
|
6606
6749
|
};
|
|
6607
|
-
})),
|
|
6608
|
-
var n =
|
|
6750
|
+
})), un = /* @__PURE__ */ t(((e, t) => {
|
|
6751
|
+
var n = Z();
|
|
6609
6752
|
t.exports = function(e, t) {
|
|
6610
6753
|
if (typeof t != "boolean") throw new n("Assertion failed: Type(done) is not Boolean");
|
|
6611
6754
|
return {
|
|
@@ -6613,8 +6756,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6613
6756
|
done: t
|
|
6614
6757
|
};
|
|
6615
6758
|
};
|
|
6616
|
-
})),
|
|
6617
|
-
var n =
|
|
6759
|
+
})), dn = /* @__PURE__ */ t(((e, t) => {
|
|
6760
|
+
var n = Z(), r = xt(), i = {
|
|
6618
6761
|
__proto__: null,
|
|
6619
6762
|
"[[Configurable]]": !0,
|
|
6620
6763
|
"[[Enumerable]]": !0,
|
|
@@ -6630,8 +6773,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6630
6773
|
if (a && o) throw new n("Property Descriptors may not be both accessor and data descriptors");
|
|
6631
6774
|
return !0;
|
|
6632
6775
|
};
|
|
6633
|
-
})),
|
|
6634
|
-
var n = Ct(), r = st(), i = n.hasArrayLengthDefineBug(), a = i && jt(), o =
|
|
6776
|
+
})), fn = /* @__PURE__ */ t(((e, t) => {
|
|
6777
|
+
var n = Ct(), r = st(), i = n.hasArrayLengthDefineBug(), a = i && jt(), o = $()("Object.prototype.propertyIsEnumerable");
|
|
6635
6778
|
t.exports = function(e, t, n, s, c, l) {
|
|
6636
6779
|
if (!r) {
|
|
6637
6780
|
if (!e(l) || !l["[[Configurable]]"] || !l["[[Writable]]"] || c in s && o(s, c) !== !!l["[[Enumerable]]"]) return !1;
|
|
@@ -6640,32 +6783,32 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6640
6783
|
}
|
|
6641
6784
|
return i && c === "length" && "[[Value]]" in l && a(s) && s.length !== l["[[Value]]"] ? (s.length = l["[[Value]]"], s.length === l["[[Value]]"]) : (r(s, c, n(l)), !0);
|
|
6642
6785
|
};
|
|
6643
|
-
})),
|
|
6786
|
+
})), pn = /* @__PURE__ */ t(((e, t) => {
|
|
6644
6787
|
t.exports = function(e) {
|
|
6645
6788
|
if (e === void 0) return e;
|
|
6646
6789
|
var t = {};
|
|
6647
6790
|
return "[[Value]]" in e && (t.value = e["[[Value]]"]), "[[Writable]]" in e && (t.writable = !!e["[[Writable]]"]), "[[Get]]" in e && (t.get = e["[[Get]]"]), "[[Set]]" in e && (t.set = e["[[Set]]"]), "[[Enumerable]]" in e && (t.enumerable = !!e["[[Enumerable]]"]), "[[Configurable]]" in e && (t.configurable = !!e["[[Configurable]]"]), t;
|
|
6648
6791
|
};
|
|
6649
|
-
})),
|
|
6650
|
-
var n =
|
|
6792
|
+
})), mn = /* @__PURE__ */ t(((e, t) => {
|
|
6793
|
+
var n = Z(), r = dn(), i = pn();
|
|
6651
6794
|
t.exports = function(e) {
|
|
6652
6795
|
if (e !== void 0 && !r(e)) throw new n("Assertion failed: `Desc` must be a Property Descriptor");
|
|
6653
6796
|
return i(e);
|
|
6654
6797
|
};
|
|
6655
|
-
})),
|
|
6656
|
-
var n =
|
|
6798
|
+
})), hn = /* @__PURE__ */ t(((e, t) => {
|
|
6799
|
+
var n = Z(), r = xt(), i = dn();
|
|
6657
6800
|
t.exports = function(e) {
|
|
6658
6801
|
if (e === void 0) return !1;
|
|
6659
6802
|
if (!i(e)) throw new n("Assertion failed: `Desc` must be a Property Descriptor");
|
|
6660
6803
|
return !(!r(e, "[[Value]]") && !r(e, "[[Writable]]"));
|
|
6661
6804
|
};
|
|
6662
|
-
})),
|
|
6805
|
+
})), gn = /* @__PURE__ */ t(((e, t) => {
|
|
6663
6806
|
var n = rt();
|
|
6664
6807
|
t.exports = function(e, t) {
|
|
6665
6808
|
return e === t ? e === 0 ? 1 / e == 1 / t : !0 : n(e) && n(t);
|
|
6666
6809
|
};
|
|
6667
|
-
})),
|
|
6668
|
-
var n = xt(), r =
|
|
6810
|
+
})), _n = /* @__PURE__ */ t(((e, t) => {
|
|
6811
|
+
var n = xt(), r = Z(), i = Lt(), a = Vt(), o = Gt();
|
|
6669
6812
|
t.exports = function(e) {
|
|
6670
6813
|
if (!i(e)) throw new r("ToPropertyDescriptor requires an object");
|
|
6671
6814
|
var t = {};
|
|
@@ -6682,8 +6825,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6682
6825
|
if ((n(t, "[[Get]]") || n(t, "[[Set]]")) && (n(t, "[[Value]]") || n(t, "[[Writable]]"))) throw new r("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");
|
|
6683
6826
|
return t;
|
|
6684
6827
|
};
|
|
6685
|
-
})),
|
|
6686
|
-
var n =
|
|
6828
|
+
})), vn = /* @__PURE__ */ t(((e, t) => {
|
|
6829
|
+
var n = Z(), r = Lt(), i = dn(), a = fn(), o = mn(), s = hn(), c = It(), l = gn(), u = _n();
|
|
6687
6830
|
t.exports = function(e, t, d) {
|
|
6688
6831
|
if (!r(e)) throw new n("Assertion failed: Type(O) is not Object");
|
|
6689
6832
|
if (!c(t)) throw new n("Assertion failed: P is not a Property Key");
|
|
@@ -6691,19 +6834,19 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6691
6834
|
if (!i(f)) throw new n("Assertion failed: Desc is not a valid Property Descriptor");
|
|
6692
6835
|
return a(s, l, o, e, t, f);
|
|
6693
6836
|
};
|
|
6694
|
-
})),
|
|
6837
|
+
})), yn = /* @__PURE__ */ t(((e, t) => {
|
|
6695
6838
|
t.exports = function(e) {
|
|
6696
6839
|
return e === null || typeof e != "function" && typeof e != "object";
|
|
6697
6840
|
};
|
|
6698
|
-
})),
|
|
6699
|
-
var n =
|
|
6841
|
+
})), bn = /* @__PURE__ */ t(((e, t) => {
|
|
6842
|
+
var n = Q(), r = n("%Object.preventExtensions%", !0), i = n("%Object.isExtensible%", !0), a = yn();
|
|
6700
6843
|
t.exports = r ? function(e) {
|
|
6701
6844
|
return !a(e) && i(e);
|
|
6702
6845
|
} : function(e) {
|
|
6703
6846
|
return !a(e);
|
|
6704
6847
|
};
|
|
6705
|
-
})),
|
|
6706
|
-
var n =
|
|
6848
|
+
})), xn = /* @__PURE__ */ t(((e, t) => {
|
|
6849
|
+
var n = Z(), r = Lt(), i = vn(), a = bn(), o = It();
|
|
6707
6850
|
t.exports = function(e, t, s, c) {
|
|
6708
6851
|
if (!r(e)) throw new n("Assertion failed: `homeObject` is not an Object");
|
|
6709
6852
|
if (!o(t)) throw new n("Assertion failed: `key` is not a Property Key or a Private Name");
|
|
@@ -6717,12 +6860,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6717
6860
|
"[[Configurable]]": !0
|
|
6718
6861
|
});
|
|
6719
6862
|
};
|
|
6720
|
-
})),
|
|
6863
|
+
})), Sn = /* @__PURE__ */ t(((e, t) => {
|
|
6721
6864
|
t.exports = function(e, t) {
|
|
6722
6865
|
for (var n = 0; n < e.length; n += 1) t(e[n], n, e);
|
|
6723
6866
|
};
|
|
6724
|
-
})),
|
|
6725
|
-
var n = Ft(), r =
|
|
6867
|
+
})), Cn = /* @__PURE__ */ t(((e, t) => {
|
|
6868
|
+
var n = Ft(), r = Z(), i = function(e, t, n) {
|
|
6726
6869
|
for (var r = e, i; (i = r.next) != null; r = i) if (i.key === t) return r.next = i.next, n || (i.next = e.next, e.next = i), i;
|
|
6727
6870
|
}, a = function(e, t) {
|
|
6728
6871
|
if (e) {
|
|
@@ -6762,8 +6905,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6762
6905
|
};
|
|
6763
6906
|
return t;
|
|
6764
6907
|
};
|
|
6765
|
-
})),
|
|
6766
|
-
var n =
|
|
6908
|
+
})), wn = /* @__PURE__ */ t(((e, t) => {
|
|
6909
|
+
var n = Q(), r = $(), i = Ft(), a = Z(), o = n("%Map%", !0), s = r("Map.prototype.get", !0), c = r("Map.prototype.set", !0), l = r("Map.prototype.has", !0), u = r("Map.prototype.delete", !0), d = r("Map.prototype.size", !0);
|
|
6767
6910
|
t.exports = !!o && function() {
|
|
6768
6911
|
var e, t = {
|
|
6769
6912
|
assert: function(e) {
|
|
@@ -6788,8 +6931,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6788
6931
|
};
|
|
6789
6932
|
return t;
|
|
6790
6933
|
};
|
|
6791
|
-
})),
|
|
6792
|
-
var n =
|
|
6934
|
+
})), Tn = /* @__PURE__ */ t(((e, t) => {
|
|
6935
|
+
var n = Q(), r = $(), i = Ft(), a = wn(), o = Z(), s = n("%WeakMap%", !0), c = r("WeakMap.prototype.get", !0), l = r("WeakMap.prototype.set", !0), u = r("WeakMap.prototype.has", !0), d = r("WeakMap.prototype.delete", !0);
|
|
6793
6936
|
t.exports = s ? function() {
|
|
6794
6937
|
var e, t, n = {
|
|
6795
6938
|
assert: function(e) {
|
|
@@ -6813,8 +6956,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6813
6956
|
};
|
|
6814
6957
|
return n;
|
|
6815
6958
|
} : a;
|
|
6816
|
-
})),
|
|
6817
|
-
var n =
|
|
6959
|
+
})), En = /* @__PURE__ */ t(((e, t) => {
|
|
6960
|
+
var n = Z(), r = Ft(), i = Cn(), a = wn(), o = Tn() || a || i;
|
|
6818
6961
|
t.exports = function() {
|
|
6819
6962
|
var e, t = {
|
|
6820
6963
|
assert: function(e) {
|
|
@@ -6835,8 +6978,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6835
6978
|
};
|
|
6836
6979
|
return t;
|
|
6837
6980
|
};
|
|
6838
|
-
})),
|
|
6839
|
-
var n = xt(), r =
|
|
6981
|
+
})), Dn = /* @__PURE__ */ t(((e, t) => {
|
|
6982
|
+
var n = xt(), r = En()(), i = Z(), a = {
|
|
6840
6983
|
assert: function(e, t) {
|
|
6841
6984
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`O` is not an object");
|
|
6842
6985
|
if (typeof t != "string") throw new i("`slot` must be a string");
|
|
@@ -6862,7 +7005,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6862
7005
|
}
|
|
6863
7006
|
};
|
|
6864
7007
|
Object.freeze && Object.freeze(a), t.exports = a;
|
|
6865
|
-
})),
|
|
7008
|
+
})), On = /* @__PURE__ */ t(((e, t) => {
|
|
6866
7009
|
var n = {
|
|
6867
7010
|
__proto__: null,
|
|
6868
7011
|
foo: {}
|
|
@@ -6870,8 +7013,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6870
7013
|
t.exports = function() {
|
|
6871
7014
|
return r;
|
|
6872
7015
|
};
|
|
6873
|
-
})),
|
|
6874
|
-
var n =
|
|
7016
|
+
})), kn = /* @__PURE__ */ t(((e, t) => {
|
|
7017
|
+
var n = Q()("%Object.create%", !0), r = Z(), i = Ye(), a = Lt(), o = Mt(), s = Sn(), c = Dn(), l = On()();
|
|
6875
7018
|
t.exports = function(e) {
|
|
6876
7019
|
if (e !== null && !a(e)) throw new r("Assertion failed: `proto` must be null or an object");
|
|
6877
7020
|
var t = arguments.length < 2 ? [] : arguments[1];
|
|
@@ -6888,8 +7031,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6888
7031
|
c.set(u, e, void 0);
|
|
6889
7032
|
}), u;
|
|
6890
7033
|
};
|
|
6891
|
-
})),
|
|
6892
|
-
var n =
|
|
7034
|
+
})), An = /* @__PURE__ */ t(((e, t) => {
|
|
7035
|
+
var n = Z(), r = Lt(), i = $()("RegExp.prototype.exec"), a = Nt(), o = Rt(), s = Vt();
|
|
6893
7036
|
t.exports = function(e, t) {
|
|
6894
7037
|
if (!r(e)) throw new n("Assertion failed: `R` must be an Object");
|
|
6895
7038
|
if (typeof t != "string") throw new n("Assertion failed: `S` must be a String");
|
|
@@ -6901,8 +7044,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6901
7044
|
}
|
|
6902
7045
|
return i(e, t);
|
|
6903
7046
|
};
|
|
6904
|
-
})),
|
|
6905
|
-
var n =
|
|
7047
|
+
})), jn = /* @__PURE__ */ t(((e, t) => {
|
|
7048
|
+
var n = Z(), r = Lt(), i = It(), a = gn(), o = function() {
|
|
6906
7049
|
try {
|
|
6907
7050
|
return delete 0, !0;
|
|
6908
7051
|
} catch {
|
|
@@ -6923,31 +7066,31 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6923
7066
|
return !1;
|
|
6924
7067
|
}
|
|
6925
7068
|
};
|
|
6926
|
-
})),
|
|
7069
|
+
})), Mn = /* @__PURE__ */ t(((e, t) => {
|
|
6927
7070
|
t.exports = function(e) {
|
|
6928
7071
|
return e === null || typeof e != "function" && typeof e != "object";
|
|
6929
7072
|
};
|
|
6930
|
-
})),
|
|
6931
|
-
var n =
|
|
7073
|
+
})), Nn = /* @__PURE__ */ t(((e, t) => {
|
|
7074
|
+
var n = $(), r = n("Date.prototype.getDay"), i = function(e) {
|
|
6932
7075
|
try {
|
|
6933
7076
|
return r(e), !0;
|
|
6934
7077
|
} catch {
|
|
6935
7078
|
return !1;
|
|
6936
7079
|
}
|
|
6937
|
-
}, a = n("Object.prototype.toString"), o = "[object Date]", s =
|
|
7080
|
+
}, a = n("Object.prototype.toString"), o = "[object Date]", s = Ut()();
|
|
6938
7081
|
t.exports = function(e) {
|
|
6939
7082
|
return typeof e != "object" || !e ? !1 : s ? i(e) : a(e) === o;
|
|
6940
7083
|
};
|
|
6941
|
-
})),
|
|
6942
|
-
var n =
|
|
7084
|
+
})), Pn = /* @__PURE__ */ t(((e, t) => {
|
|
7085
|
+
var n = $(), r = Wt(), i = n("RegExp.prototype.exec"), a = Z();
|
|
6943
7086
|
t.exports = function(e) {
|
|
6944
7087
|
if (!r(e)) throw new a("`regex` must be a RegExp");
|
|
6945
7088
|
return function(t) {
|
|
6946
7089
|
return i(e, t) !== null;
|
|
6947
7090
|
};
|
|
6948
7091
|
};
|
|
6949
|
-
})),
|
|
6950
|
-
var n =
|
|
7092
|
+
})), Fn = /* @__PURE__ */ t(((e, t) => {
|
|
7093
|
+
var n = $(), r = n("Object.prototype.toString"), i = lt()(), a = Pn();
|
|
6951
7094
|
if (i) {
|
|
6952
7095
|
var o = n("Symbol.prototype.toString"), s = a(/^Symbol\(.*\)$/), c = function(e) {
|
|
6953
7096
|
return typeof e.valueOf() == "symbol" ? s(o(e)) : !1;
|
|
@@ -6964,8 +7107,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6964
7107
|
} else t.exports = function(e) {
|
|
6965
7108
|
return !1;
|
|
6966
7109
|
};
|
|
6967
|
-
})),
|
|
6968
|
-
var n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol", r =
|
|
7110
|
+
})), In = /* @__PURE__ */ t(((e, t) => {
|
|
7111
|
+
var n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol", r = Mn(), i = Bt(), a = Nn(), o = Fn(), s = function(e, t) {
|
|
6969
7112
|
if (e == null) throw TypeError("Cannot call method on " + e);
|
|
6970
7113
|
if (typeof t != "string" || t !== "number" && t !== "string") throw TypeError("hint must be \"string\" or \"number\"");
|
|
6971
7114
|
var n = t === "string" ? ["toString", "valueOf"] : ["valueOf", "toString"], a, o, s;
|
|
@@ -6990,29 +7133,29 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6990
7133
|
}
|
|
6991
7134
|
return t === "default" && (a(e) || o(e)) && (t = "string"), s(e, t === "default" ? "number" : t);
|
|
6992
7135
|
};
|
|
6993
|
-
})),
|
|
6994
|
-
var n =
|
|
7136
|
+
})), Ln = /* @__PURE__ */ t(((e, t) => {
|
|
7137
|
+
var n = In();
|
|
6995
7138
|
t.exports = function(e) {
|
|
6996
7139
|
return arguments.length > 1 ? n(e, arguments[1]) : n(e);
|
|
6997
7140
|
};
|
|
6998
|
-
})),
|
|
6999
|
-
var n =
|
|
7141
|
+
})), Rn = /* @__PURE__ */ t(((e, t) => {
|
|
7142
|
+
var n = Jt(), r = qt(), i = $()("String.prototype.replace"), a = /^\s$/.test(""), o = a ? /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/ : /^[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+/, s = a ? /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/ : /[\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF]+$/;
|
|
7000
7143
|
t.exports = function() {
|
|
7001
7144
|
return i(i(r(n(this)), o, ""), s, "");
|
|
7002
7145
|
};
|
|
7003
|
-
})),
|
|
7004
|
-
var n =
|
|
7146
|
+
})), zn = /* @__PURE__ */ t(((e, t) => {
|
|
7147
|
+
var n = Rn(), r = "", i = "";
|
|
7005
7148
|
t.exports = function() {
|
|
7006
7149
|
return String.prototype.trim && r.trim() === r && i.trim() === i && ("_" + i).trim() === "_" + i && (i + "_").trim() === i + "_" ? String.prototype.trim : n;
|
|
7007
7150
|
};
|
|
7008
|
-
})),
|
|
7009
|
-
var n = Ct()(), r = St(), i =
|
|
7151
|
+
})), Bn = /* @__PURE__ */ t(((e, t) => {
|
|
7152
|
+
var n = Ct()(), r = St(), i = zn();
|
|
7010
7153
|
t.exports = function() {
|
|
7011
7154
|
var e = i();
|
|
7012
7155
|
return String.prototype.trim !== e && (n ? r(String.prototype, "trim", e, !0) : r(String.prototype, "trim", e)), e;
|
|
7013
7156
|
};
|
|
7014
|
-
})),
|
|
7015
|
-
var n = Et(), r = At(), i =
|
|
7157
|
+
})), Vn = /* @__PURE__ */ t(((e, t) => {
|
|
7158
|
+
var n = Et(), r = At(), i = Jt(), a = Rn(), o = zn(), s = Bn(), c = n(o()), l = function(e) {
|
|
7016
7159
|
return i(e), c(e);
|
|
7017
7160
|
};
|
|
7018
7161
|
r(l, {
|
|
@@ -7020,12 +7163,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7020
7163
|
implementation: a,
|
|
7021
7164
|
shim: s
|
|
7022
7165
|
}), t.exports = l;
|
|
7023
|
-
})),
|
|
7024
|
-
var n =
|
|
7166
|
+
})), Hn = /* @__PURE__ */ t(((e, t) => {
|
|
7167
|
+
var n = Q(), r = n("%RegExp%"), i = Z(), a = n("%parseInt%"), o = $(), s = Pn(), c = o("String.prototype.slice"), l = s(/^0b[01]+$/i), u = s(/^0o[0-7]+$/i), d = s(/^[-+]0x[0-9a-f]+$/i), f = s(new r("[" + [
|
|
7025
7168
|
"
",
|
|
7026
7169
|
"",
|
|
7027
7170
|
""
|
|
7028
|
-
].join("") + "]", "g")), p =
|
|
7171
|
+
].join("") + "]", "g")), p = Vn();
|
|
7029
7172
|
t.exports = function e(t) {
|
|
7030
7173
|
if (typeof t != "string") throw new i("Assertion failed: `argument` is not a String");
|
|
7031
7174
|
if (l(t)) return +a(c(t, 2), 2);
|
|
@@ -7034,40 +7177,40 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7034
7177
|
var n = p(t);
|
|
7035
7178
|
return n === t ? +t : e(n);
|
|
7036
7179
|
};
|
|
7037
|
-
})),
|
|
7038
|
-
var n =
|
|
7180
|
+
})), Un = /* @__PURE__ */ t(((e, t) => {
|
|
7181
|
+
var n = Q(), r = Z(), i = n("%Number%"), a = yn(), o = Ln(), s = Hn();
|
|
7039
7182
|
t.exports = function(e) {
|
|
7040
7183
|
var t = a(e) ? e : o(e, i);
|
|
7041
7184
|
if (typeof t == "symbol") throw new r("Cannot convert a Symbol value to a number");
|
|
7042
7185
|
if (typeof t == "bigint") throw new r("Conversion from 'BigInt' to 'number' is not allowed.");
|
|
7043
7186
|
return typeof t == "string" ? s(t) : +t;
|
|
7044
7187
|
};
|
|
7045
|
-
})),
|
|
7188
|
+
})), Wn = /* @__PURE__ */ t(((e, t) => {
|
|
7046
7189
|
var n = Qe();
|
|
7047
7190
|
t.exports = function(e) {
|
|
7048
7191
|
return typeof e == "bigint" ? e : n(e);
|
|
7049
7192
|
};
|
|
7050
|
-
})),
|
|
7051
|
-
var n =
|
|
7193
|
+
})), Gn = /* @__PURE__ */ t(((e, t) => {
|
|
7194
|
+
var n = Wn(), r = Z();
|
|
7052
7195
|
t.exports = function(e) {
|
|
7053
7196
|
if (typeof e != "number" && typeof e != "bigint") throw new r("argument must be a Number or a BigInt");
|
|
7054
7197
|
var t = e < 0 ? -n(-e) : n(e);
|
|
7055
7198
|
return t === 0 ? 0 : t;
|
|
7056
7199
|
};
|
|
7057
|
-
})),
|
|
7058
|
-
var n =
|
|
7200
|
+
})), Kn = /* @__PURE__ */ t(((e, t) => {
|
|
7201
|
+
var n = Un(), r = Gn(), i = rt(), a = on();
|
|
7059
7202
|
t.exports = function(e) {
|
|
7060
7203
|
var t = n(e);
|
|
7061
7204
|
return i(t) || t === 0 ? 0 : a(t) ? r(t) : t;
|
|
7062
7205
|
};
|
|
7063
|
-
})),
|
|
7064
|
-
var n =
|
|
7206
|
+
})), qn = /* @__PURE__ */ t(((e, t) => {
|
|
7207
|
+
var n = cn(), r = Kn();
|
|
7065
7208
|
t.exports = function(e) {
|
|
7066
7209
|
var t = r(e);
|
|
7067
7210
|
return t <= 0 ? 0 : t > n ? n : t;
|
|
7068
7211
|
};
|
|
7069
|
-
})),
|
|
7070
|
-
var n =
|
|
7212
|
+
})), Jn = /* @__PURE__ */ t(((e, t) => {
|
|
7213
|
+
var n = Q()("%Object.defineProperty%", !0), r = Ut()(), i = xt(), a = Z(), o = r ? Symbol.toStringTag : null;
|
|
7071
7214
|
t.exports = function(e, t) {
|
|
7072
7215
|
var r = arguments.length > 2 && !!arguments[2] && arguments[2].force, s = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
7073
7216
|
if (r !== void 0 && typeof r != "boolean" || s !== void 0 && typeof s != "boolean") throw new a("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");
|
|
@@ -7078,8 +7221,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7078
7221
|
writable: !1
|
|
7079
7222
|
}) : e[o] = t);
|
|
7080
7223
|
};
|
|
7081
|
-
})),
|
|
7082
|
-
var n =
|
|
7224
|
+
})), Yn = /* @__PURE__ */ t(((e, t) => {
|
|
7225
|
+
var n = Q(), r = lt()(), i = Z(), a = Lt(), o = n("%IteratorPrototype%", !0), s = ln(), c = un(), l = xn(), u = Rt(), d = kn(), f = An(), p = jn(), m = qn(), h = qt(), g = Dn(), _ = Jn(), v = function(e, t, n, r) {
|
|
7083
7226
|
if (typeof t != "string") throw new i("`S` must be a string");
|
|
7084
7227
|
if (typeof n != "boolean") throw new i("`global` must be a boolean");
|
|
7085
7228
|
if (typeof r != "boolean") throw new i("`fullUnicode` must be a boolean");
|
|
@@ -7097,10 +7240,10 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7097
7240
|
}, !1)), t.exports = function(e, t, n, r) {
|
|
7098
7241
|
return new v(e, t, n, r);
|
|
7099
7242
|
};
|
|
7100
|
-
})), Yn = /* @__PURE__ */ t(((e, t) => {
|
|
7101
|
-
t.exports = Z();
|
|
7102
7243
|
})), Xn = /* @__PURE__ */ t(((e, t) => {
|
|
7103
|
-
|
|
7244
|
+
t.exports = Q();
|
|
7245
|
+
})), Zn = /* @__PURE__ */ t(((e, t) => {
|
|
7246
|
+
var n = Xn()("%Reflect.construct%", !0), r = vn();
|
|
7104
7247
|
try {
|
|
7105
7248
|
r({}, "", { "[[Get]]": function() {} });
|
|
7106
7249
|
} catch {
|
|
@@ -7123,8 +7266,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7123
7266
|
} else t.exports = function(e) {
|
|
7124
7267
|
return typeof e == "function" && !!e.prototype;
|
|
7125
7268
|
};
|
|
7126
|
-
})),
|
|
7127
|
-
var n =
|
|
7269
|
+
})), Qn = /* @__PURE__ */ t(((e, t) => {
|
|
7270
|
+
var n = Q()("%Symbol.species%", !0), r = Z(), i = Lt(), a = Zn();
|
|
7128
7271
|
t.exports = function(e, t) {
|
|
7129
7272
|
if (!i(e)) throw new r("Assertion failed: Type(O) is not Object");
|
|
7130
7273
|
var o = e.constructor;
|
|
@@ -7135,8 +7278,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7135
7278
|
if (a(s)) return s;
|
|
7136
7279
|
throw new r("no constructor found");
|
|
7137
7280
|
};
|
|
7138
|
-
})),
|
|
7139
|
-
var n =
|
|
7281
|
+
})), $n = /* @__PURE__ */ t(((e, t) => {
|
|
7282
|
+
var n = Lt();
|
|
7140
7283
|
t.exports = function(e) {
|
|
7141
7284
|
if (e === null) return "Null";
|
|
7142
7285
|
if (e === void 0) return "Undefined";
|
|
@@ -7145,13 +7288,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7145
7288
|
if (typeof e == "boolean") return "Boolean";
|
|
7146
7289
|
if (typeof e == "string") return "String";
|
|
7147
7290
|
};
|
|
7148
|
-
})),
|
|
7149
|
-
var n =
|
|
7291
|
+
})), er = /* @__PURE__ */ t(((e, t) => {
|
|
7292
|
+
var n = $n();
|
|
7150
7293
|
t.exports = function(e) {
|
|
7151
7294
|
return typeof e == "symbol" ? "Symbol" : typeof e == "bigint" ? "BigInt" : n(e);
|
|
7152
7295
|
};
|
|
7153
|
-
})),
|
|
7154
|
-
var n =
|
|
7296
|
+
})), tr = /* @__PURE__ */ t(((e, t) => {
|
|
7297
|
+
var n = Yn(), r = Rt(), i = jn(), a = Qn(), o = qn(), s = qt(), c = er(), l = en(), u = Xt(), d = $(), f = Q(), p = Z(), m = d("String.prototype.indexOf"), h = f("%RegExp%"), g = "flags" in h.prototype, _ = function(e, t) {
|
|
7155
7298
|
var n, i = "flags" in t ? r(t, "flags") : s(l(t));
|
|
7156
7299
|
return n = g && typeof i == "string" ? new e(t, i) : e === h ? new e(t.source, i) : new e(t, i), {
|
|
7157
7300
|
flags: i,
|
|
@@ -7164,13 +7307,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7164
7307
|
var l = s(e), u = _(a(t, h), t), d = u.flags, f = u.matcher;
|
|
7165
7308
|
return i(f, "lastIndex", o(r(t, "lastIndex")), !0), n(f, l, m(d, "g") > -1, m(d, "u") > -1);
|
|
7166
7309
|
}, "[Symbol.matchAll]", !0);
|
|
7167
|
-
})),
|
|
7168
|
-
var n = lt()(), r =
|
|
7310
|
+
})), nr = /* @__PURE__ */ t(((e, t) => {
|
|
7311
|
+
var n = lt()(), r = tr();
|
|
7169
7312
|
t.exports = function() {
|
|
7170
7313
|
return !n || typeof Symbol.matchAll != "symbol" || typeof RegExp.prototype[Symbol.matchAll] != "function" ? r : RegExp.prototype[Symbol.matchAll];
|
|
7171
7314
|
};
|
|
7172
|
-
})),
|
|
7173
|
-
var n = Nt(), r =
|
|
7315
|
+
})), rr = /* @__PURE__ */ t(((e, t) => {
|
|
7316
|
+
var n = Nt(), r = Rt(), i = Ht(), a = Kt(), o = qt(), s = Jt(), c = $(), l = lt()(), u = en(), d = Q(), f = Z(), p = d("%RegExp%"), m = c("String.prototype.indexOf"), h = nr(), g = function(e) {
|
|
7174
7317
|
var t = h();
|
|
7175
7318
|
if (l && typeof Symbol.matchAll == "symbol") {
|
|
7176
7319
|
var n = i(e, Symbol.matchAll);
|
|
@@ -7191,8 +7334,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7191
7334
|
var l = o(t), d = new p(e, "g");
|
|
7192
7335
|
return n(g(d), d, [l]);
|
|
7193
7336
|
};
|
|
7194
|
-
})),
|
|
7195
|
-
var n =
|
|
7337
|
+
})), ir = /* @__PURE__ */ t(((e, t) => {
|
|
7338
|
+
var n = rr();
|
|
7196
7339
|
t.exports = function() {
|
|
7197
7340
|
if (String.prototype.matchAll) try {
|
|
7198
7341
|
"".matchAll(RegExp.prototype);
|
|
@@ -7201,8 +7344,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7201
7344
|
}
|
|
7202
7345
|
return n;
|
|
7203
7346
|
};
|
|
7204
|
-
})),
|
|
7205
|
-
var n = At(), r = lt()(), i = ot(), a =
|
|
7347
|
+
})), ar = /* @__PURE__ */ t(((e, t) => {
|
|
7348
|
+
var n = At(), r = lt()(), i = ot(), a = ir(), o = nr(), s = Object.defineProperty;
|
|
7206
7349
|
t.exports = function() {
|
|
7207
7350
|
var e = a();
|
|
7208
7351
|
if (n(String.prototype, { matchAll: e }, { matchAll: function() {
|
|
@@ -7229,15 +7372,15 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7229
7372
|
}
|
|
7230
7373
|
return e;
|
|
7231
7374
|
};
|
|
7232
|
-
})),
|
|
7233
|
-
var n = Et(), r = At(), i =
|
|
7375
|
+
})), or = /* @__PURE__ */ t(((e, t) => {
|
|
7376
|
+
var n = Et(), r = At(), i = rr(), a = ir(), o = ar(), s = n(i);
|
|
7234
7377
|
r(s, {
|
|
7235
7378
|
getPolyfill: a,
|
|
7236
7379
|
implementation: i,
|
|
7237
7380
|
shim: o
|
|
7238
7381
|
}), t.exports = s;
|
|
7239
|
-
})),
|
|
7240
|
-
var n =
|
|
7382
|
+
})), sr = /* @__PURE__ */ t(((e, t) => {
|
|
7383
|
+
var n = re(), { createGenericWasmCommand: r } = se(), i = "\x1B[2J\x1B[H", a = "\x1B[0m", o = "\x1B[7m", s = "\x1B[1m", c = "\x1B[2m", l = "\x1B[36m", u = "\x1B[31m", d = "\x1B[32m", f = class extends n {
|
|
7241
7384
|
get requiresFilesystem() {
|
|
7242
7385
|
return !0;
|
|
7243
7386
|
}
|
|
@@ -7272,7 +7415,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7272
7415
|
}
|
|
7273
7416
|
async runNonInteractive() {}
|
|
7274
7417
|
startRepl(e = {}) {
|
|
7275
|
-
return this._dynamicReplActive = !0, this._dynamicReplOpts = e, this._dynamicReplBuffer = "", this._dynamicReplMultiline = !1, this._launchInteractiveReplLoop();
|
|
7418
|
+
return this._dynamicReplActive = !0, this._dynamicReplOpts = e, this._dynamicReplBuffer = "", this._dynamicReplMultiline = !1, typeof this._enterAltScreen == "function" && this._enterAltScreen(), this._launchInteractiveReplLoop();
|
|
7276
7419
|
}
|
|
7277
7420
|
run() {
|
|
7278
7421
|
return this.shouldBeInteractive() ? this._launchInteractiveReplLoop() : Promise.resolve(this.runNonInteractive());
|
|
@@ -7347,6 +7490,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7347
7490
|
this._replCursor > 0 && (this._replInput = this._replInput.slice(0, this._replCursor - 1) + this._replInput.slice(this._replCursor), this._replCursor--, this._renderRepl());
|
|
7348
7491
|
return;
|
|
7349
7492
|
}
|
|
7493
|
+
if (e === "^W") {
|
|
7494
|
+
let e = this._replCursor;
|
|
7495
|
+
for (; e > 0 && this._replInput[e - 1] === " ";) e--;
|
|
7496
|
+
for (; e > 0 && this._replInput[e - 1] !== " ";) e--;
|
|
7497
|
+
this._replInput = this._replInput.slice(0, e) + this._replInput.slice(this._replCursor), this._replCursor = e, this._renderRepl();
|
|
7498
|
+
return;
|
|
7499
|
+
}
|
|
7350
7500
|
if (e === "Delete") {
|
|
7351
7501
|
this._replCursor < this._replInput.length && (this._replInput = this._replInput.slice(0, this._replCursor) + this._replInput.slice(this._replCursor + 1), this._renderRepl());
|
|
7352
7502
|
return;
|
|
@@ -7485,20 +7635,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7485
7635
|
return s;
|
|
7486
7636
|
}
|
|
7487
7637
|
f.createReplWasmCommand = p, f.createCommand = p, t.exports = f;
|
|
7488
|
-
})),
|
|
7489
|
-
|
|
7638
|
+
})), cr = /* @__PURE__ */ t(((e, t) => {
|
|
7639
|
+
b();
|
|
7640
|
+
var r = q(), i = J(), a = oe(), o = se(), s = U(), c = re(), { TtyStream: l } = ne(), u = "/.brsh_history", d = xe(), f = Ue(), p = V(), m = x(), { isAsyncFilesystemSource: h, resolveFilesystemSource: g } = ie(), _ = /\$(?:\{([\w\d?#-]+)\}|([\w\d]+|[?#-]))/g, v = p.EventEmitter || p.default || p;
|
|
7490
7641
|
String.prototype.regexIndexOf = function(e, t) {
|
|
7491
7642
|
let n = this.substring(t || 0).search(e);
|
|
7492
7643
|
return n >= 0 ? n + (t || 0) : n;
|
|
7493
|
-
},
|
|
7494
|
-
var
|
|
7644
|
+
}, or().shim();
|
|
7645
|
+
var S = class e extends v {
|
|
7495
7646
|
constructor(e) {
|
|
7496
7647
|
super();
|
|
7497
|
-
let { path: t = "/bin", profile: n, motd: i, command: a, interactive: o = !0, subshell: s = !1, hostname: c = "browser", filesystem:
|
|
7648
|
+
let { path: t = "/bin", profile: n, motd: i, command: a, interactive: o = !0, subshell: s = !1, hostname: c = "browser", filesystem: u = {}, permissions: d = {}, cwd: f = "/", onFsChange: p, useRealFilesystem: m = !1 } = e;
|
|
7498
7649
|
if (this.context = new r(Object.assign({}, e, {
|
|
7499
7650
|
clearFn: this.clear.bind(this),
|
|
7500
7651
|
destroyFn: this.destroy.bind(this),
|
|
7501
|
-
onFsChange: typeof
|
|
7652
|
+
onFsChange: typeof p == "function" ? p : null
|
|
7502
7653
|
})), this._readonlyContext = Object.freeze({
|
|
7503
7654
|
getVar: (e) => this.context.getVar(e),
|
|
7504
7655
|
getAlias: (e) => this.context.getAlias(e),
|
|
@@ -7507,10 +7658,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7507
7658
|
let e = (o ? "i" : "") + (a ? "c" : "");
|
|
7508
7659
|
e && this.context.setVar("-", e);
|
|
7509
7660
|
}
|
|
7510
|
-
if (this._lastCode = 0, this._subshell = s, this._useRealFilesystem = m, this._profile = n, this._motd = i, this._initialCommand = a || null, this._suppressMotd = !!a, this._loadingFs = null, this._queuedWhileLoading = !1,
|
|
7511
|
-
|
|
7661
|
+
if (this._lastCode = 0, this._subshell = s, this._useRealFilesystem = m, this._profile = n, this._motd = i, this._initialCommand = a || null, this._suppressMotd = !!a, this._loadingFs = null, this._queuedWhileLoading = !1, this.stdinStream = new l({
|
|
7662
|
+
columns: 80,
|
|
7663
|
+
rows: 24
|
|
7664
|
+
}), this.stdout = new l({
|
|
7665
|
+
columns: 80,
|
|
7666
|
+
rows: 24,
|
|
7667
|
+
onWrite: (e) => this.emit("data", e)
|
|
7668
|
+
}), this.stderr = new l({
|
|
7669
|
+
columns: 80,
|
|
7670
|
+
rows: 24,
|
|
7671
|
+
onWrite: (e) => this.emit("data", e)
|
|
7672
|
+
}), this._lineBuffer = [], this._cursorPos = 0, this._history = [], this._historyPos = null, this._savedInput = null, this._historyLoaded = !1, this._working = !0, this._promptReady = !1, this._inProgressLine = !1, this._fromLineEditor = !1, this._lastPromptRowOffset = 0, this._pendingCommands = [], s || this._setupTtyStreams(), m) this.context.setNodeFilesystem(f), this.context.setCwd(f), this._loadDefaultCommands(), this._loadBuiltinCommands(!0), this.ready = Promise.resolve(this), s ? this._initializing = !1 : (this._initializing = !0, setTimeout(() => this._init(), 0));
|
|
7673
|
+
else if (h(u) || u && typeof u == "object" && h(u.filesystem)) this.context.setFilesystem({}, d), this._loadDefaultCommands(), this._loadBuiltinCommands(!1), this._initializing = !s, this._loadingFs = this._initAsyncFilesystem(u, d, f, n), this.ready = this._loadingFs;
|
|
7512
7674
|
else {
|
|
7513
|
-
this.context.setFilesystem(
|
|
7675
|
+
this.context.setFilesystem(u, d), this.context.setCwd(f);
|
|
7514
7676
|
let e = this.context.fs.exists(this.context.getVar("PATH"));
|
|
7515
7677
|
this._loadDefaultCommands(), this._loadBuiltinCommands(e), this.ready = Promise.resolve(this), s ? this._initializing = !1 : (this._initializing = !0, setTimeout(() => this._init(), 0));
|
|
7516
7678
|
}
|
|
@@ -7526,7 +7688,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7526
7688
|
}
|
|
7527
7689
|
}, o = a();
|
|
7528
7690
|
try {
|
|
7529
|
-
let e = await
|
|
7691
|
+
let e = await g(t, n), s = a(), c = [];
|
|
7530
7692
|
for (let [e, t] of Object.entries(s)) o[e] !== t && typeof t == "function" && c.push(t);
|
|
7531
7693
|
let l = this.context._onFsChange;
|
|
7532
7694
|
this.context._onFsChange = null, this.context.setFilesystem(e.filesystem, e.permissions);
|
|
@@ -7550,9 +7712,18 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7550
7712
|
get lastCode() {
|
|
7551
7713
|
return this._lastCode;
|
|
7552
7714
|
}
|
|
7715
|
+
get stdin() {
|
|
7716
|
+
return this._stdin === void 0 ? this.stdinStream : this._stdin;
|
|
7717
|
+
}
|
|
7553
7718
|
set stdin(e) {
|
|
7554
7719
|
this._stdin = e;
|
|
7555
7720
|
}
|
|
7721
|
+
write(e) {
|
|
7722
|
+
return this.stdinStream.pushData(e), !0;
|
|
7723
|
+
}
|
|
7724
|
+
resize(e, t) {
|
|
7725
|
+
this.setTerminalSize(e, t);
|
|
7726
|
+
}
|
|
7556
7727
|
onInput(e) {
|
|
7557
7728
|
if (this.runningCommand && this.runningCommand.onInput && this.runningCommand.captureInput) return this.runningCommand.onInput(e), !0;
|
|
7558
7729
|
}
|
|
@@ -7560,7 +7731,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7560
7731
|
this._terminalSize = {
|
|
7561
7732
|
cols: e,
|
|
7562
7733
|
rows: t
|
|
7563
|
-
}, this.context.setVar("COLUMNS", String(e)), this.context.setVar("LINES", String(t)), this.emit("resize", {
|
|
7734
|
+
}, this.context.setVar("COLUMNS", String(e)), this.context.setVar("LINES", String(t)), this.stdinStream.resize(e, t), this.stdout.resize(e, t), this.stderr.resize(e, t), this.runningCommand && (this.runningCommand.stdinStream && this.runningCommand.stdinStream.resize(e, t), this.runningCommand.stdout && this.runningCommand.stdout.resize(e, t), this.runningCommand.stderr && this.runningCommand.stderr.resize(e, t)), this.emit("resize", {
|
|
7564
7735
|
cols: e,
|
|
7565
7736
|
rows: t
|
|
7566
7737
|
});
|
|
@@ -7572,12 +7743,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7572
7743
|
};
|
|
7573
7744
|
}
|
|
7574
7745
|
_loadDefaultCommands() {
|
|
7575
|
-
|
|
7746
|
+
f.forEach((e) => {
|
|
7576
7747
|
this.context.setCommand(e);
|
|
7577
7748
|
});
|
|
7578
7749
|
}
|
|
7579
7750
|
_loadBuiltinCommands(e = !1) {
|
|
7580
|
-
|
|
7751
|
+
d.forEach((e) => {
|
|
7581
7752
|
this.context.setCommand(e);
|
|
7582
7753
|
}), e || this.context.fs.setMode(this.context.getVar("PATH"), 365);
|
|
7583
7754
|
}
|
|
@@ -7651,6 +7822,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7651
7822
|
e && await this.onCommand(`source ${e}`, !1);
|
|
7652
7823
|
}
|
|
7653
7824
|
onCommand(t, n = !0) {
|
|
7825
|
+
n && !this._subshell && this._promptReady && !this._fromLineEditor && (this.stdout.write(`\r${this.getPrompt()} ${t}\x1b[K\r\n`), this._lineBuffer = [], this._cursorPos = 0), this._fromLineEditor = !1;
|
|
7654
7826
|
let r = this._splitInput(t), i = this._groupPipes(r), a = !0;
|
|
7655
7827
|
this._loadingFs && n && (this._queuedWhileLoading = !0);
|
|
7656
7828
|
let o = this._loadingFs ? Promise.resolve(this._loadingFs) : Promise.resolve(), s = i.reduce((e, { commands: t, op: n }) => e.then(() => {
|
|
@@ -7708,9 +7880,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7708
7880
|
this.emit("stdErr", `${r}: Command not found`), this.lastCode = 1, this.emit("exitCode", this.lastCode);
|
|
7709
7881
|
return;
|
|
7710
7882
|
}
|
|
7711
|
-
return f.requiresFilesystem && (f.fs = this.context.fs.sandbox()), this._stdin !== void 0 && (f.stdin = this._stdin), this.runningCommand = f, this.runningCommand.on && this.runningCommand.on("flush", (e) => {
|
|
7883
|
+
return f.requiresFilesystem && (f.fs = this.context.fs.sandbox()), this._stdin !== void 0 && (f.stdin = this._stdin), this.runningCommand = f, this.runningCommand.on && (this.runningCommand.on("flush", (e) => {
|
|
7712
7884
|
this._emitOutput(e);
|
|
7713
|
-
}),
|
|
7885
|
+
}), this.runningCommand.on("stdout", (e) => {
|
|
7886
|
+
o ? f.stdOut = String(e ?? "") : (this.stdout.write(e), this.emit("stdOutRaw", e));
|
|
7887
|
+
}), this.runningCommand.on("stderr", (e) => {
|
|
7888
|
+
this.stderr.write(e);
|
|
7889
|
+
})), f.interactive && this.emit("interactive"), f.runCommand().then((e) => {
|
|
7714
7890
|
let t = e.getStdOutput();
|
|
7715
7891
|
if (o) {
|
|
7716
7892
|
let e = this.context.fs.absolutePath(o), n = t.filter((e) => e.type === "out").map((e) => e.string), r = s ? (() => {
|
|
@@ -7741,7 +7917,196 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7741
7917
|
this.destroyed || (this.destroyed = !0, this.emit("status", e.STATUS_DESTROYED), this.emit("exit", t));
|
|
7742
7918
|
}
|
|
7743
7919
|
clear() {
|
|
7744
|
-
this.emit("clear");
|
|
7920
|
+
this.stdout.write("\x1B[2J\x1B[3J\x1B[H"), this.emit("clear");
|
|
7921
|
+
}
|
|
7922
|
+
_setupTtyStreams() {
|
|
7923
|
+
this.on("stdOut", (e) => {
|
|
7924
|
+
if (this.runningCommand && (this.runningCommand.interactive || this.runningCommand._inAltScreen)) {
|
|
7925
|
+
this.stdout.write(String(e ?? ""));
|
|
7926
|
+
return;
|
|
7927
|
+
}
|
|
7928
|
+
if (typeof e == "string" && e.startsWith("\r")) {
|
|
7929
|
+
this._inProgressLine = !0, this.stdout.write("\r\x1B[K" + e.slice(1));
|
|
7930
|
+
return;
|
|
7931
|
+
}
|
|
7932
|
+
this._inProgressLine &&= (this.stdout.write("\r\n"), !1), this.stdout.write(String(e ?? "") + "\r\n");
|
|
7933
|
+
}), this.on("stdErr", (e) => {
|
|
7934
|
+
this.runningCommand && (this.runningCommand.interactive || this.runningCommand._inAltScreen) || (this._inProgressLine &&= (this.stdout.write("\r\n"), !1), this.stderr.write(String(e ?? "") + "\r\n"));
|
|
7935
|
+
}), this.on("status", (t) => {
|
|
7936
|
+
if (t === e.STATUS_READY) {
|
|
7937
|
+
if (this._inProgressLine &&= (this.stdout.write("\r\n"), !1), this._working = !1, this._promptReady = !0, this._historyLoaded ||= (this._loadHistory(), !0), this._redrawPromptLine(), this._pendingCommands.length > 0) {
|
|
7938
|
+
let e = this._pendingCommands.shift();
|
|
7939
|
+
if (this._pendingCommands.length === 0) {
|
|
7940
|
+
let e = this.context.getVar("-");
|
|
7941
|
+
e && e.includes("c") && this.context.setVar("-", e.replace(/c/g, ""));
|
|
7942
|
+
}
|
|
7943
|
+
this.sendCommand(e);
|
|
7944
|
+
}
|
|
7945
|
+
} else this._working = !0;
|
|
7946
|
+
}), this.stdinStream.on("data", (e) => this._handleStdinData(e)), this.stdinStream.on("end", () => {
|
|
7947
|
+
this.destroyed || this.destroy(0);
|
|
7948
|
+
});
|
|
7949
|
+
}
|
|
7950
|
+
sendCommand(e) {
|
|
7951
|
+
if (!this._promptReady) {
|
|
7952
|
+
this.suppressMotd(), this._pendingCommands.push(e);
|
|
7953
|
+
return;
|
|
7954
|
+
}
|
|
7955
|
+
this.onCommand(e);
|
|
7956
|
+
}
|
|
7957
|
+
_redrawPromptLine() {
|
|
7958
|
+
if (this._working || this.runningCommand && (this.runningCommand.interactive || this.runningCommand._inAltScreen)) return;
|
|
7959
|
+
let e = `${this.getPrompt()} `, t = this._lineBuffer.join(""), n = this._terminalSize && this._terminalSize.cols || 80, r = this._lastPromptRowOffset || 0, i = "";
|
|
7960
|
+
r > 0 && (i += `\x1b[${r}A`), i += `\r\x1b[J${e}${t}`;
|
|
7961
|
+
let a = Math.min(this._cursorPos, this._lineBuffer.length), o = e.length + this._lineBuffer.length, s = e.length + a, c = Math.floor(o / n), l = Math.floor(s / n), u = s % n;
|
|
7962
|
+
if (c > l) i += `\x1b[${c - l}A\r`, u > 0 && (i += `\x1b[${u}C`);
|
|
7963
|
+
else if (o > s) {
|
|
7964
|
+
let e = o - s;
|
|
7965
|
+
i += `\x1b[${e}D`;
|
|
7966
|
+
}
|
|
7967
|
+
this._lastPromptRowOffset = l, this.stdout.write(i);
|
|
7968
|
+
}
|
|
7969
|
+
_loadHistory() {
|
|
7970
|
+
try {
|
|
7971
|
+
let e = this.context.fs._getFileRaw(u);
|
|
7972
|
+
e && typeof e == "string" && e.length > 0 && (this._history = e.split("\n").filter((e) => e.length > 0));
|
|
7973
|
+
} catch {}
|
|
7974
|
+
}
|
|
7975
|
+
_saveHistory() {
|
|
7976
|
+
try {
|
|
7977
|
+
this.context.fs._setFileRaw(u, this._history.join("\n"), !0);
|
|
7978
|
+
} catch {}
|
|
7979
|
+
}
|
|
7980
|
+
_navigateHistory(e) {
|
|
7981
|
+
if (this._history.length !== 0) {
|
|
7982
|
+
if (e === -1) {
|
|
7983
|
+
if (this._historyPos === null) this._savedInput = [...this._lineBuffer], this._historyPos = this._history.length - 1;
|
|
7984
|
+
else if (this._historyPos > 0) this._historyPos--;
|
|
7985
|
+
else return;
|
|
7986
|
+
this._lineBuffer = Array.from(this._history[this._historyPos]);
|
|
7987
|
+
} else {
|
|
7988
|
+
if (this._historyPos === null) return;
|
|
7989
|
+
this._historyPos < this._history.length - 1 ? (this._historyPos++, this._lineBuffer = Array.from(this._history[this._historyPos])) : (this._historyPos = null, this._lineBuffer = this._savedInput ? [...this._savedInput] : [], this._savedInput = null);
|
|
7990
|
+
}
|
|
7991
|
+
this._cursorPos = this._lineBuffer.length, this._redrawPromptLine();
|
|
7992
|
+
}
|
|
7993
|
+
}
|
|
7994
|
+
_wordLeft() {
|
|
7995
|
+
let e = this._cursorPos;
|
|
7996
|
+
for (; e > 0 && this._lineBuffer[e - 1] === " ";) e--;
|
|
7997
|
+
for (; e > 0 && this._lineBuffer[e - 1] !== " ";) e--;
|
|
7998
|
+
return e;
|
|
7999
|
+
}
|
|
8000
|
+
_wordRight() {
|
|
8001
|
+
let e = this._cursorPos, t = this._lineBuffer.length;
|
|
8002
|
+
for (; e < t && this._lineBuffer[e] === " ";) e++;
|
|
8003
|
+
for (; e < t && this._lineBuffer[e] !== " ";) e++;
|
|
8004
|
+
return e;
|
|
8005
|
+
}
|
|
8006
|
+
_handleStdinData(e) {
|
|
8007
|
+
let t = typeof e == "string" ? e : e instanceof Uint8Array || y !== void 0 && y.isBuffer(e) ? new TextDecoder().decode(e) : String(e ?? "");
|
|
8008
|
+
if (this.runningCommand) {
|
|
8009
|
+
let t = this.runningCommand, n = t.stdinStream && t.stdinStream.listenerCount("data") > 1;
|
|
8010
|
+
if (t.captureInput || t.interactive || t._inAltScreen || n) {
|
|
8011
|
+
t.stdinStream.pushData(e);
|
|
8012
|
+
return;
|
|
8013
|
+
}
|
|
8014
|
+
}
|
|
8015
|
+
if (this._working) return;
|
|
8016
|
+
let n = 0;
|
|
8017
|
+
for (; n < t.length;) {
|
|
8018
|
+
let e = t[n], r = t.charCodeAt(n);
|
|
8019
|
+
if (r === 27) {
|
|
8020
|
+
if (t[n + 1] === "b") {
|
|
8021
|
+
this._cursorPos = this._wordLeft(), this._redrawPromptLine(), n += 2;
|
|
8022
|
+
continue;
|
|
8023
|
+
}
|
|
8024
|
+
if (t[n + 1] === "f") {
|
|
8025
|
+
this._cursorPos = this._wordRight(), this._redrawPromptLine(), n += 2;
|
|
8026
|
+
continue;
|
|
8027
|
+
}
|
|
8028
|
+
if (t.charCodeAt(n + 1) === 127 || t.charCodeAt(n + 1) === 8) {
|
|
8029
|
+
let e = this._wordLeft();
|
|
8030
|
+
this._lineBuffer.splice(e, this._cursorPos - e), this._cursorPos = e, this._redrawPromptLine(), n += 2;
|
|
8031
|
+
continue;
|
|
8032
|
+
}
|
|
8033
|
+
if (t[n + 1] === "d") {
|
|
8034
|
+
let e = this._wordRight();
|
|
8035
|
+
this._lineBuffer.splice(this._cursorPos, e - this._cursorPos), this._redrawPromptLine(), n += 2;
|
|
8036
|
+
continue;
|
|
8037
|
+
}
|
|
8038
|
+
if (t[n + 1] === "[" || t[n + 1] === "O") {
|
|
8039
|
+
let e = n + 2;
|
|
8040
|
+
for (; e < t.length && t.charCodeAt(e) >= 32 && t.charCodeAt(e) <= 63;) e++;
|
|
8041
|
+
if (e < t.length) {
|
|
8042
|
+
this._handleEscapeSeq(t.slice(n + 2, e + 1)), n = e + 1;
|
|
8043
|
+
continue;
|
|
8044
|
+
}
|
|
8045
|
+
}
|
|
8046
|
+
n++;
|
|
8047
|
+
continue;
|
|
8048
|
+
}
|
|
8049
|
+
if (r === 4) {
|
|
8050
|
+
if (this._lineBuffer.length === 0) {
|
|
8051
|
+
this.stdout.write("exit\r\n"), this.destroy(0);
|
|
8052
|
+
return;
|
|
8053
|
+
}
|
|
8054
|
+
this._cursorPos < this._lineBuffer.length && (this._lineBuffer.splice(this._cursorPos, 1), this._redrawPromptLine()), n++;
|
|
8055
|
+
continue;
|
|
8056
|
+
}
|
|
8057
|
+
if (r === 13 || r === 10) {
|
|
8058
|
+
let e = this._lineBuffer.join("");
|
|
8059
|
+
this._lineBuffer = [], this._cursorPos = 0, this._historyPos = null, this._savedInput = null, this.stdout.write("\r\n"), e.trim() && (this._history[this._history.length - 1] !== e && this._history.push(e), this._saveHistory()), this._fromLineEditor = !0, this.onCommand(e), r === 13 && t[n + 1] === "\n" && n++, n++;
|
|
8060
|
+
continue;
|
|
8061
|
+
}
|
|
8062
|
+
if (r === 127 || r === 8) {
|
|
8063
|
+
this._cursorPos > 0 && (this._lineBuffer.splice(this._cursorPos - 1, 1), this._cursorPos--, this._redrawPromptLine()), n++;
|
|
8064
|
+
continue;
|
|
8065
|
+
}
|
|
8066
|
+
if (r === 9) {
|
|
8067
|
+
this._handleTab(), n++;
|
|
8068
|
+
continue;
|
|
8069
|
+
}
|
|
8070
|
+
if (r === 1) {
|
|
8071
|
+
this._cursorPos = 0, this._redrawPromptLine(), n++;
|
|
8072
|
+
continue;
|
|
8073
|
+
}
|
|
8074
|
+
if (r === 5) {
|
|
8075
|
+
this._cursorPos = this._lineBuffer.length, this._redrawPromptLine(), n++;
|
|
8076
|
+
continue;
|
|
8077
|
+
}
|
|
8078
|
+
if (r === 21) {
|
|
8079
|
+
this._lineBuffer.splice(0, this._cursorPos), this._cursorPos = 0, this._redrawPromptLine(), n++;
|
|
8080
|
+
continue;
|
|
8081
|
+
}
|
|
8082
|
+
if (r === 11) {
|
|
8083
|
+
this._lineBuffer.splice(this._cursorPos), this._redrawPromptLine(), n++;
|
|
8084
|
+
continue;
|
|
8085
|
+
}
|
|
8086
|
+
if (r === 23) {
|
|
8087
|
+
let e = this._wordLeft();
|
|
8088
|
+
this._lineBuffer.splice(e, this._cursorPos - e), this._cursorPos = e, this._redrawPromptLine(), n++;
|
|
8089
|
+
continue;
|
|
8090
|
+
}
|
|
8091
|
+
if (r === 12) {
|
|
8092
|
+
this.stdout.write("\x1B[2J\x1B[H"), this._redrawPromptLine(), n++;
|
|
8093
|
+
continue;
|
|
8094
|
+
}
|
|
8095
|
+
if (r === 3) {
|
|
8096
|
+
this._lineBuffer = [], this._cursorPos = 0, this._historyPos = null, this._savedInput = null, this.stdout.write("^C\r\n"), this._redrawPromptLine(), n++;
|
|
8097
|
+
continue;
|
|
8098
|
+
}
|
|
8099
|
+
r >= 32 && (this._lineBuffer.splice(this._cursorPos, 0, e), this._cursorPos++, this._redrawPromptLine()), n++;
|
|
8100
|
+
}
|
|
8101
|
+
}
|
|
8102
|
+
_handleEscapeSeq(e) {
|
|
8103
|
+
e === "A" ? this._navigateHistory(-1) : e === "B" ? this._navigateHistory(1) : e === "C" ? this._cursorPos < this._lineBuffer.length && (this._cursorPos++, this._redrawPromptLine()) : e === "D" ? this._cursorPos > 0 && (this._cursorPos--, this._redrawPromptLine()) : e === "1;3D" || e === "1;5D" ? (this._cursorPos = this._wordLeft(), this._redrawPromptLine()) : e === "1;3C" || e === "1;5C" ? (this._cursorPos = this._wordRight(), this._redrawPromptLine()) : e === "H" || e === "1~" || e === "7~" ? (this._cursorPos = 0, this._redrawPromptLine()) : e === "F" || e === "4~" || e === "8~" ? (this._cursorPos = this._lineBuffer.length, this._redrawPromptLine()) : e === "3~" && this._cursorPos < this._lineBuffer.length && (this._lineBuffer.splice(this._cursorPos, 1), this._redrawPromptLine());
|
|
8104
|
+
}
|
|
8105
|
+
_handleTab() {
|
|
8106
|
+
let e = this._lineBuffer.join("").split(" "), t = e.pop(), n = this.tabCompletion(t);
|
|
8107
|
+
if (!n) return;
|
|
8108
|
+
let { options: r, path: i } = n;
|
|
8109
|
+
r.length === 1 ? (e.push(`${i == null ? "" : i.concat("/")}${r[0]}`), this._lineBuffer = e.join(" ").split(""), this._cursorPos = this._lineBuffer.length, this._redrawPromptLine()) : r.length > 1 && (this.stdout.write("\r\n" + r.join(" ") + "\r\n"), this._redrawPromptLine());
|
|
7745
8110
|
}
|
|
7746
8111
|
_splitInput(e) {
|
|
7747
8112
|
let t = e.split("#")[0];
|
|
@@ -7853,7 +8218,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7853
8218
|
let n = await this._runAndCapture(e[1]);
|
|
7854
8219
|
t = t.replace(e[0], n);
|
|
7855
8220
|
}
|
|
7856
|
-
let i = t.matchAll(
|
|
8221
|
+
let i = t.matchAll(_), a = i.next();
|
|
7857
8222
|
for (; !a.done;) {
|
|
7858
8223
|
let n = a.value[1] || a.value[2], r = this.context.getVar(n);
|
|
7859
8224
|
t = t.replace(new RegExp(e._escapeRegExp(a.value[0]), "g"), String(r)), a = i.next();
|
|
@@ -7959,8 +8324,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7959
8324
|
}
|
|
7960
8325
|
static async create(t = {}) {
|
|
7961
8326
|
let { filesystem: n, permissions: r, ...i } = t;
|
|
7962
|
-
if (
|
|
7963
|
-
let e = await
|
|
8327
|
+
if (h(n) || n && typeof n == "object" && h(n.filesystem)) {
|
|
8328
|
+
let e = await g(n, r);
|
|
7964
8329
|
n = e.filesystem, r = e.permissions;
|
|
7965
8330
|
}
|
|
7966
8331
|
let a = new e(Object.assign({}, i, {
|
|
@@ -7973,9 +8338,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7973
8338
|
return e.create(Object.assign({}, n, { filesystem: t }));
|
|
7974
8339
|
}
|
|
7975
8340
|
};
|
|
7976
|
-
|
|
8341
|
+
S.STATUS_READY = "READY", S.STATUS_WORKING = "WORKING", S.STATUS_DESTROYED = "DESTROYED", S.Command = s, S.InteractiveCommand = c, S.WasmCommand = o, S.createWasmCommand = o.createGenericWasmCommand || o.createCommand, S.ReplCommand = sr(), S.FS = m, S.BinaryContainer = ie(), S.Storage = S.BinaryContainer.FilesystemStorage, globalThis.shell = S, globalThis.Shell = S, t.exports = S;
|
|
7977
8342
|
}));
|
|
7978
8343
|
//#endregion
|
|
7979
|
-
export default
|
|
8344
|
+
export default cr();
|
|
7980
8345
|
|
|
7981
8346
|
//# sourceMappingURL=shell.es.js.map
|