brsh 2.8.0 → 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 +32 -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 +943 -499
- package/dist/shell.es.js.map +1 -1
- package/dist/shell.min.js +31 -16
- 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 +1863 -752
- package/dist/wbt.es.js.map +1 -1
- package/dist/wbt.min.js +8 -6
- package/dist/wbt.min.js.map +1 -1
- package/index.js +472 -0
- package/lib/BaseFileSystem.js +40 -0
- package/lib/BinaryContainer.js +1 -1
- package/lib/Command.js +30 -0
- package/lib/FileSystem.js +1 -38
- package/lib/InteractiveCommand.js +28 -0
- package/lib/NodeFileSystem.js +4 -2
- package/lib/ReplCommand.js +15 -0
- package/lib/Terminal.js +769 -510
- package/lib/TtyStream.js +181 -0
- package/lib/WasmCommand.js +168 -18
- 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/lib/wbt/index.js +270 -14
- package/lib/wbt/packages/wllama.js +12 -2
- package/lib/wbt/registry.js +11 -2
- package/package.json +4 -2
- package/styles/terminal.css +33 -4
- package/test/terminal.test.js +762 -40
- package/test/wbt.test.js +24 -5
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,14 +799,15 @@ 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;
|
|
809
809
|
})), x = /* @__PURE__ */ t(((e, t) => {
|
|
810
|
+
b();
|
|
810
811
|
var n = new Set([
|
|
811
812
|
"getFileByPath",
|
|
812
813
|
"setFileByPath",
|
|
@@ -825,8 +826,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
825
826
|
"isSymlink",
|
|
826
827
|
"readSymlink",
|
|
827
828
|
"createSymlink"
|
|
828
|
-
])
|
|
829
|
-
t.exports = class {
|
|
829
|
+
]), r = class {
|
|
830
830
|
isReadable(e) {
|
|
831
831
|
let t = this.getMode(e);
|
|
832
832
|
return t === null ? !1 : (t & 256) != 0;
|
|
@@ -860,7 +860,27 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
860
860
|
this._changeScheduled = !1, typeof this._onChange == "function" && this._onChange(this.getRaw(), this.getRawPermissions());
|
|
861
861
|
}));
|
|
862
862
|
}
|
|
863
|
+
}, i = class extends Uint8Array {
|
|
864
|
+
constructor(e, t) {
|
|
865
|
+
super(e), Object.defineProperty(this, "mimeType", {
|
|
866
|
+
value: t,
|
|
867
|
+
enumerable: !1,
|
|
868
|
+
configurable: !1,
|
|
869
|
+
writable: !1
|
|
870
|
+
});
|
|
871
|
+
}
|
|
872
|
+
toString() {
|
|
873
|
+
if (y !== void 0) return `data:${this.mimeType};base64,${y.from(this).toString("base64")}`;
|
|
874
|
+
let e = "", t = 8192;
|
|
875
|
+
for (let n = 0; n < this.length; n += t) e += String.fromCharCode(...this.subarray(n, n + t));
|
|
876
|
+
return `data:${this.mimeType};base64,${btoa(e)}`;
|
|
877
|
+
}
|
|
878
|
+
}, a = class {
|
|
879
|
+
constructor(e) {
|
|
880
|
+
this.target = e;
|
|
881
|
+
}
|
|
863
882
|
};
|
|
883
|
+
t.exports = r, t.exports.BinaryFile = i, t.exports.SymlinkRef = a;
|
|
864
884
|
}));
|
|
865
885
|
//#endregion
|
|
866
886
|
//#region node_modules/vite-plugin-node-polyfills/shims/process/dist/index.js
|
|
@@ -1154,11 +1174,140 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1154
1174
|
return this.std = [], e;
|
|
1155
1175
|
}
|
|
1156
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
|
+
};
|
|
1157
1289
|
})), U = /* @__PURE__ */ t(((e, t) => {
|
|
1158
|
-
var n = V(), r = te(), i = n.EventEmitter || n.default || n;
|
|
1159
|
-
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 {
|
|
1160
1292
|
constructor(e, t) {
|
|
1161
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
|
+
});
|
|
1162
1311
|
}
|
|
1163
1312
|
get name() {
|
|
1164
1313
|
return "unnamed";
|
|
@@ -1186,7 +1335,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1186
1335
|
this.emit("flush", this.result.flush());
|
|
1187
1336
|
}
|
|
1188
1337
|
};
|
|
1189
|
-
})),
|
|
1338
|
+
})), re = /* @__PURE__ */ t(((e, t) => {
|
|
1190
1339
|
var n = U();
|
|
1191
1340
|
t.exports = class extends n {
|
|
1192
1341
|
get captureInput() {
|
|
@@ -1196,15 +1345,29 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1196
1345
|
return !0;
|
|
1197
1346
|
}
|
|
1198
1347
|
get terminalSize() {
|
|
1199
|
-
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
|
+
} : {
|
|
1200
1352
|
cols: parseInt(this.context.getVar("COLUMNS"), 10) || 80,
|
|
1201
1353
|
rows: parseInt(this.context.getVar("LINES"), 10) || 24
|
|
1202
1354
|
};
|
|
1203
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
|
+
}
|
|
1204
1367
|
};
|
|
1205
|
-
})),
|
|
1368
|
+
})), ie = /* @__PURE__ */ t(((e, t) => {
|
|
1206
1369
|
b(), B();
|
|
1207
|
-
var { BinaryFile: n, SymlinkRef: r } =
|
|
1370
|
+
var { BinaryFile: n, SymlinkRef: r } = x(), i = new Uint8Array([
|
|
1208
1371
|
66,
|
|
1209
1372
|
82,
|
|
1210
1373
|
70,
|
|
@@ -1308,7 +1471,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1308
1471
|
let t = e.$c;
|
|
1309
1472
|
if (m[t]) return m[t];
|
|
1310
1473
|
if (f.inlineCommands && f.inlineCommands[t]) try {
|
|
1311
|
-
let e = U(), n =
|
|
1474
|
+
let e = U(), n = re();
|
|
1312
1475
|
return Function("Command", "InteractiveCommand", `return (${f.inlineCommands[t]});`)(e, n);
|
|
1313
1476
|
} catch {
|
|
1314
1477
|
return null;
|
|
@@ -1473,28 +1636,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1473
1636
|
}
|
|
1474
1637
|
}
|
|
1475
1638
|
};
|
|
1476
|
-
})),
|
|
1639
|
+
})), W = /* @__PURE__ */ t(((e, t) => {
|
|
1477
1640
|
b();
|
|
1478
|
-
var n = x(), r
|
|
1479
|
-
constructor(e, t) {
|
|
1480
|
-
super(e), Object.defineProperty(this, "mimeType", {
|
|
1481
|
-
value: t,
|
|
1482
|
-
enumerable: !1,
|
|
1483
|
-
configurable: !1,
|
|
1484
|
-
writable: !1
|
|
1485
|
-
});
|
|
1486
|
-
}
|
|
1487
|
-
toString() {
|
|
1488
|
-
if (y !== void 0) return `data:${this.mimeType};base64,${y.from(this).toString("base64")}`;
|
|
1489
|
-
let e = "", t = 8192;
|
|
1490
|
-
for (let n = 0; n < this.length; n += t) e += String.fromCharCode(...this.subarray(n, n + t));
|
|
1491
|
-
return `data:${this.mimeType};base64,${btoa(e)}`;
|
|
1492
|
-
}
|
|
1493
|
-
}, i = class {
|
|
1494
|
-
constructor(e) {
|
|
1495
|
-
this.target = e;
|
|
1496
|
-
}
|
|
1497
|
-
};
|
|
1641
|
+
var n = x(), { BinaryFile: r, SymlinkRef: i } = n;
|
|
1498
1642
|
function a(e) {
|
|
1499
1643
|
for (let t of Object.keys(e)) {
|
|
1500
1644
|
let n = e[t];
|
|
@@ -1517,20 +1661,20 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1517
1661
|
t.exports = class extends n {
|
|
1518
1662
|
constructor(e = "/", t = {}, n = {}, r = null) {
|
|
1519
1663
|
if (super(), t instanceof Uint8Array || t instanceof ArrayBuffer) {
|
|
1520
|
-
let { deserializeBinaryFilesystem: e } =
|
|
1664
|
+
let { deserializeBinaryFilesystem: e } = ie(), r = e(t);
|
|
1521
1665
|
t = r.filesystem, n = Object.assign({}, r.permissions, n);
|
|
1522
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)) {
|
|
1523
|
-
let { deserializeBinaryFilesystem: e } =
|
|
1667
|
+
let { deserializeBinaryFilesystem: e } = ie(), r = e(t);
|
|
1524
1668
|
t = r.filesystem, n = Object.assign({}, r.permissions, n);
|
|
1525
1669
|
}
|
|
1526
1670
|
a(t), this.fileSystem = t, this.permissions = Object.assign({}, n), this.cwd = e, this._onChange = r, this._changeScheduled = !1;
|
|
1527
1671
|
}
|
|
1528
1672
|
toBinaryContainer(e = {}) {
|
|
1529
|
-
let { serializeBinaryFilesystem: t } =
|
|
1673
|
+
let { serializeBinaryFilesystem: t } = ie();
|
|
1530
1674
|
return t(this.fileSystem, this.permissions, e);
|
|
1531
1675
|
}
|
|
1532
1676
|
static fromBinaryContainer(e, t = {}) {
|
|
1533
|
-
let { deserializeBinaryFilesystem: n } =
|
|
1677
|
+
let { deserializeBinaryFilesystem: n } = ie();
|
|
1534
1678
|
return n(e, t);
|
|
1535
1679
|
}
|
|
1536
1680
|
getFileByPath(e) {
|
|
@@ -1708,7 +1852,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1708
1852
|
return null;
|
|
1709
1853
|
}
|
|
1710
1854
|
}, t.exports.BinaryFile = r, t.exports.SymlinkRef = i;
|
|
1711
|
-
})),
|
|
1855
|
+
})), G = /* @__PURE__ */ t(((e, t) => {
|
|
1712
1856
|
t.exports = null;
|
|
1713
1857
|
})), ae = /* @__PURE__ */ t(((e, t) => {
|
|
1714
1858
|
B();
|
|
@@ -1878,9 +2022,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1878
2022
|
posix: null
|
|
1879
2023
|
};
|
|
1880
2024
|
a.posix = a, t.exports = a;
|
|
1881
|
-
})),
|
|
2025
|
+
})), K = /* @__PURE__ */ t(((e, t) => {
|
|
1882
2026
|
B();
|
|
1883
|
-
var n =
|
|
2027
|
+
var n = G(), r = ae(), i = x();
|
|
1884
2028
|
t.exports = class extends i {
|
|
1885
2029
|
constructor(e, t = null) {
|
|
1886
2030
|
super(), this._onChange = t, this._changeScheduled = !1, this._virtualFiles = {}, this.cwd = this._normalizeCwd(e || z.cwd());
|
|
@@ -1972,7 +2116,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
1972
2116
|
}
|
|
1973
2117
|
setMode(e, t) {
|
|
1974
2118
|
let r = this.absolutePath(e);
|
|
1975
|
-
this._virtualFiles[r] === void 0
|
|
2119
|
+
if (this._virtualFiles[r] === void 0) try {
|
|
2120
|
+
n.chmodSync(r, t), this._triggerChange();
|
|
2121
|
+
} catch {}
|
|
1976
2122
|
}
|
|
1977
2123
|
getSize(e) {
|
|
1978
2124
|
let t = this.absolutePath(e);
|
|
@@ -2085,8 +2231,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2085
2231
|
}
|
|
2086
2232
|
}
|
|
2087
2233
|
};
|
|
2088
|
-
})),
|
|
2089
|
-
var n =
|
|
2234
|
+
})), q = /* @__PURE__ */ t(((e, t) => {
|
|
2235
|
+
var n = W();
|
|
2090
2236
|
t.exports = class {
|
|
2091
2237
|
constructor(e) {
|
|
2092
2238
|
this.options = e;
|
|
@@ -2120,7 +2266,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2120
2266
|
return this.fs._getFileRaw(t) || null;
|
|
2121
2267
|
}
|
|
2122
2268
|
setNodeFilesystem(e) {
|
|
2123
|
-
let t =
|
|
2269
|
+
let t = K(), n = this.fs._onChange;
|
|
2124
2270
|
this.fs = new t(e, n);
|
|
2125
2271
|
}
|
|
2126
2272
|
setFilesystem(e, t = {}) {
|
|
@@ -2140,15 +2286,15 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2140
2286
|
typeof this._destroyFn == "function" && this._destroyFn(e);
|
|
2141
2287
|
}
|
|
2142
2288
|
};
|
|
2143
|
-
})),
|
|
2289
|
+
})), J = /* @__PURE__ */ t(((e, t) => {
|
|
2144
2290
|
var n = U();
|
|
2145
2291
|
t.exports = class extends n {
|
|
2146
2292
|
constructor(e, t) {
|
|
2147
2293
|
super(e, t);
|
|
2148
2294
|
}
|
|
2149
2295
|
};
|
|
2150
|
-
})),
|
|
2151
|
-
var n =
|
|
2296
|
+
})), oe = /* @__PURE__ */ t(((e, t) => {
|
|
2297
|
+
var n = J();
|
|
2152
2298
|
function r(e) {
|
|
2153
2299
|
return /^#!\/(sh\.js|bin\/(sh|brsh))/.test(e);
|
|
2154
2300
|
}
|
|
@@ -2313,7 +2459,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2313
2459
|
}
|
|
2314
2460
|
_executeNode(e) {
|
|
2315
2461
|
if (e.type === "function") {
|
|
2316
|
-
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 {
|
|
2317
2463
|
static get name() {
|
|
2318
2464
|
return t;
|
|
2319
2465
|
}
|
|
@@ -2515,7 +2661,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2515
2661
|
}, t.exports.isKnownInterpreter = r;
|
|
2516
2662
|
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
2517
2663
|
b();
|
|
2518
|
-
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 {
|
|
2519
2665
|
get name() {
|
|
2520
2666
|
return "wasm";
|
|
2521
2667
|
}
|
|
@@ -2525,7 +2671,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2525
2671
|
run() {
|
|
2526
2672
|
let e = this.script, t = (() => {
|
|
2527
2673
|
try {
|
|
2528
|
-
return
|
|
2674
|
+
return G();
|
|
2529
2675
|
} catch {
|
|
2530
2676
|
return null;
|
|
2531
2677
|
}
|
|
@@ -2958,11 +3104,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2958
3104
|
function T(e, t) {
|
|
2959
3105
|
if (!e || !e.exists(t)) return null;
|
|
2960
3106
|
if (e.isRealFilesystem) try {
|
|
2961
|
-
let n =
|
|
3107
|
+
let n = G();
|
|
2962
3108
|
return new Uint8Array(n.readFileSync(e.absolutePath(t)));
|
|
2963
|
-
} catch {
|
|
2964
|
-
return null;
|
|
2965
|
-
}
|
|
3109
|
+
} catch {}
|
|
2966
3110
|
let n = e.getFileByPath(t);
|
|
2967
3111
|
if (n == null) return null;
|
|
2968
3112
|
if (n instanceof Uint8Array || y !== void 0 && y.isBuffer(n)) return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
|
|
@@ -2985,15 +3129,23 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
2985
3129
|
return null;
|
|
2986
3130
|
}
|
|
2987
3131
|
function E(e, t, n, i = "application/octet-stream") {
|
|
2988
|
-
let a = n instanceof Uint8Array ? n : new Uint8Array(n);
|
|
2989
|
-
|
|
2990
|
-
|
|
3132
|
+
let a = n instanceof Uint8Array ? n : new Uint8Array(n), o = new Uint8Array(a.byteLength);
|
|
3133
|
+
o.set(a);
|
|
3134
|
+
let s = new r(o.buffer, i);
|
|
3135
|
+
if (e.isRealFilesystem) try {
|
|
3136
|
+
let n = G(), r = ae(), i = e.absolutePath(t);
|
|
2991
3137
|
n.mkdirSync(r.dirname(i), { recursive: !0 }), n.writeFileSync(i, y.from(a.buffer, a.byteOffset, a.byteLength));
|
|
2992
3138
|
return;
|
|
3139
|
+
} catch {
|
|
3140
|
+
if (typeof e._setFileRaw == "function") {
|
|
3141
|
+
e._setFileRaw(t, s, !0);
|
|
3142
|
+
return;
|
|
3143
|
+
}
|
|
3144
|
+
}
|
|
3145
|
+
if (typeof e._setFileRaw == "function" && t.startsWith("/var/lib/wbt/")) {
|
|
3146
|
+
e._setFileRaw(t, s, !0);
|
|
3147
|
+
return;
|
|
2993
3148
|
}
|
|
2994
|
-
let o = new Uint8Array(a.byteLength);
|
|
2995
|
-
o.set(a);
|
|
2996
|
-
let s = new r(o.buffer, i);
|
|
2997
3149
|
e.setFileByPath(t, s, !0);
|
|
2998
3150
|
}
|
|
2999
3151
|
async function D(e, t, n = null) {
|
|
@@ -3014,6 +3166,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3014
3166
|
t
|
|
3015
3167
|
);
|
|
3016
3168
|
} catch (n) {
|
|
3169
|
+
if (!/^https?:\/\/esm\.sh\//i.test(t)) try {
|
|
3170
|
+
return await import(
|
|
3171
|
+
/* @vite-ignore */
|
|
3172
|
+
`https://esm.sh/${e}`
|
|
3173
|
+
);
|
|
3174
|
+
} catch {}
|
|
3017
3175
|
throw Error(`Failed to load WASM package '${e}' from ${t}: ${n.message || n}`);
|
|
3018
3176
|
}
|
|
3019
3177
|
throw Error(`Package '${e}' could not be loaded`);
|
|
@@ -3024,8 +3182,11 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3024
3182
|
options: []
|
|
3025
3183
|
};
|
|
3026
3184
|
if (!e || typeof e != "string") return n;
|
|
3027
|
-
let r = e.split(/\r?\n/).map((e) => e.trim()).filter(Boolean), i = /* @__PURE__ */ new Set();
|
|
3028
|
-
for (let e
|
|
3185
|
+
let r = e.split(/\r?\n/).map((e) => e.trim()).filter(Boolean), i = /* @__PURE__ */ new Set(), a = t ? r.findIndex((e) => /^usage:\s*(.+)/i.test(e)) : -1, o = a >= 0 ? a : 0;
|
|
3186
|
+
for (let e = o; e < r.length; e++) {
|
|
3187
|
+
let a = r[e];
|
|
3188
|
+
!n.usage && /^usage:\s*(.+)/i.test(a) ? n.usage = a.replace(/^usage:\s*/i, "").trim() : /^(?:-[a-zA-Z0-9?]|--[a-zA-Z0-9][-a-zA-Z0-9]*)(?:\s|,|=|<|\[|$)/.test(a) && a.length <= 120 && !/^(?:-[hHvV],\s*)?--(?:help|version)\b/i.test(a) && (!t || /^(?:-[a-zA-Z?]|--[a-zA-Z][a-zA-Z0-9-]*)(?:,\s*--?[a-zA-Z0-9-]+)?(?:\s+[<\[a-zA-Z0-9_.->\]]+)*(?:\s+[A-Za-z`'"(][A-Za-z0-9 ,.;:()'"`/<>\[\]=+$\t_-]*|)$/.test(a)) && (i.has(a) || (i.add(a), n.options.push(a)));
|
|
3189
|
+
}
|
|
3029
3190
|
if (t && n.options.length === 0) {
|
|
3030
3191
|
let t = e.match(/--[a-z][a-z0-9-]{1,24}/g) || [];
|
|
3031
3192
|
for (let e of Array.from(new Set(t)).slice(0, 12)) e !== "--help" && e !== "--version" && n.options.push(e);
|
|
@@ -3059,15 +3220,15 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3059
3220
|
return t;
|
|
3060
3221
|
}
|
|
3061
3222
|
function A(e, t = {}, n = null) {
|
|
3062
|
-
let r = t.name || e, i = t.version || "wasm", a = t.description || "WebAssembly binary", o = t && typeof t.repl == "object" ? t.repl : t.repl ? {} : null, s = n && n.usage || t.usage, c = o ? `${e} [options] ${o.evalFlag ? `[${o.evalFlag} <code>] ` : ""}[file] [args...]` : `${e} [options] [args...]`,
|
|
3063
|
-
t.details &&
|
|
3064
|
-
let
|
|
3065
|
-
if (
|
|
3066
|
-
else o && (o.evalFlag &&
|
|
3067
|
-
return
|
|
3223
|
+
let r = t.name || e, i = t.version || "wasm", a = t.description || "WebAssembly binary", o = t && typeof t.repl == "object" ? t.repl : t.repl ? {} : null, s = n && n.usage || t.usage, c = s ? s.replace(/%s/g, e) : null, l = o ? `${e} [options] ${o.evalFlag ? `[${o.evalFlag} <code>] ` : ""}[file] [args...]` : `${e} [options] [args...]`, u = [`${e} (${r} ${i} wasm) — ${a}`, `Usage: ${c || l}`];
|
|
3224
|
+
t.details && u.push("", t.details), u.push("", "Options:");
|
|
3225
|
+
let d = n && n.options && n.options.length > 0 ? n.options : Array.isArray(t.options) ? t.options : [];
|
|
3226
|
+
if (d.length > 0) for (let e of d) u.push(` ${e}`);
|
|
3227
|
+
else o && (o.evalFlag && u.push(` ${o.evalFlag.padEnd(20)}Evaluate inline code and print result`), u.push(` (no arguments) Start interactive ${e} REPL shell`));
|
|
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;
|
|
3068
3229
|
}
|
|
3069
3230
|
function j(e, t = {}, n = null) {
|
|
3070
|
-
let r =
|
|
3231
|
+
let r = J(), i = (n || e.bin || e.name).toLowerCase();
|
|
3071
3232
|
class a extends r {
|
|
3072
3233
|
static get name() {
|
|
3073
3234
|
return i;
|
|
@@ -3080,25 +3241,46 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3080
3241
|
}
|
|
3081
3242
|
async run() {
|
|
3082
3243
|
let n = [...this.arguments || []], r = n.includes("--help") || n.includes("-h"), a = !r && (n.includes("--version") || n.includes("-V") || n.includes("-v"));
|
|
3083
|
-
this._inspectedWasm = null;
|
|
3244
|
+
this._inspectedWasm = null, this._persistedWasmBytes = e.wasmPath ? T(this.context && this.context.fs || this.fs, e.wasmPath) : null, r && this._persistedWasmBytes && this._persistedWasmBytes.byteLength > 0 && (this._inspectedWasm = k(this._persistedWasmBytes));
|
|
3084
3245
|
try {
|
|
3085
|
-
if (e.type === "wasm" && e.wasmUrl && !t.moduleLoader) {
|
|
3086
|
-
let t = await this._fetchWasmBytes(e.wasmUrl);
|
|
3246
|
+
if (e.type === "wasm" && (this._persistedWasmBytes || e.wasmUrl) && !t.moduleLoader) {
|
|
3247
|
+
let t = this._persistedWasmBytes || await this._fetchWasmBytes(e.wasmUrl);
|
|
3087
3248
|
r && (this._inspectedWasm = k(t)), await this._runRawWasmBytes(t, n);
|
|
3088
3249
|
} else {
|
|
3089
|
-
let o = e.cdnUrl || e.wasmUrl || `https://esm.sh/${e.name}`, s =
|
|
3090
|
-
if (
|
|
3091
|
-
let
|
|
3250
|
+
let o = e.cdnUrl || e.wasmUrl || `https://esm.sh/${e.name}`, s = typeof globalThis.fetch == "function" ? globalThis.fetch : null;
|
|
3251
|
+
if (s && this._persistedWasmBytes && this._persistedWasmBytes.byteLength > 0 && typeof Response < "u") {
|
|
3252
|
+
let t = this._persistedWasmBytes, n = e.wasmUrl || "";
|
|
3253
|
+
globalThis.fetch = async (e, r) => {
|
|
3254
|
+
let i = typeof e == "string" ? e : e && e.url ? e.url : "";
|
|
3255
|
+
return i && (i === n || !/^https?:\/\//i.test(i) && /\.wasm(\?.*)?$/i.test(i)) ? new Response(t, {
|
|
3256
|
+
status: 200,
|
|
3257
|
+
headers: { "Content-Type": "application/wasm" }
|
|
3258
|
+
}) : s(e, r);
|
|
3259
|
+
};
|
|
3260
|
+
}
|
|
3261
|
+
let c, l;
|
|
3262
|
+
try {
|
|
3263
|
+
c = await D(e.name, o, t.moduleLoader), l = c && c.default !== void 0 ? c.default : c, l && typeof l.then == "function" && (l = await l);
|
|
3264
|
+
} finally {
|
|
3265
|
+
s && (globalThis.fetch = s);
|
|
3266
|
+
}
|
|
3267
|
+
if (l instanceof Uint8Array || l instanceof ArrayBuffer) {
|
|
3268
|
+
let e = l instanceof Uint8Array ? l : new Uint8Array(l);
|
|
3092
3269
|
r && (this._inspectedWasm = k(e)), await this._runRawWasmBytes(e, n);
|
|
3093
|
-
} else if (
|
|
3094
|
-
let e =
|
|
3270
|
+
} else if (l && (l.wasmBytes instanceof Uint8Array || l.wasm instanceof Uint8Array)) {
|
|
3271
|
+
let e = l.wasmBytes || l.wasm;
|
|
3095
3272
|
r && (this._inspectedWasm = k(e)), await this._runRawWasmBytes(e, n);
|
|
3096
|
-
} else if (typeof
|
|
3097
|
-
else if (
|
|
3098
|
-
|
|
3099
|
-
let t =
|
|
3100
|
-
if (typeof t == "function") await this._invokeCliFunction(t.bind(
|
|
3101
|
-
else if (
|
|
3273
|
+
} else if (typeof l == "function") await this._runFunctionOrEmscripten(l, n, r);
|
|
3274
|
+
else if (l && typeof l == "object") {
|
|
3275
|
+
l.ready && await l.ready, r && (l.HEAPU8 instanceof Uint8Array || l.wasmBinary instanceof Uint8Array) && (this._inspectedWasm = k(l.wasmBinary || l.HEAPU8));
|
|
3276
|
+
let t = l.main || l.run || l.callMain || l.exec;
|
|
3277
|
+
if (typeof t == "function") await this._invokeCliFunction(t.bind(l), n);
|
|
3278
|
+
else if (l.promised || typeof l.raw == "function" || typeof l.json == "function") {
|
|
3279
|
+
let e = l.promised ? await l.promised : l, t = n.filter((e) => e.startsWith("-")), i = n.filter((e) => !e.startsWith("-")), o = i.shift() || ".", s = this._createIoBridge(n, [], []), c = i.length > 0 ? s.readFile(i[0]) || "" : s.stdin || (r || a ? "{}" : ""), u = typeof e.raw == "function" ? e.raw(c, o, t) : !r && !a ? JSON.stringify(e.json(JSON.parse(c || "null"), o)) : null;
|
|
3280
|
+
u != null && String(u).replace(/\r?\n$/, "").split(/\r?\n/).forEach((e) => {
|
|
3281
|
+
this.stdOut = e;
|
|
3282
|
+
});
|
|
3283
|
+
} else if (!r && !a) {
|
|
3102
3284
|
this.stdErr = `${i}: unsupported WASM module format for '${e.name}'`, this.exitCode = 1;
|
|
3103
3285
|
return;
|
|
3104
3286
|
}
|
|
@@ -3145,18 +3327,20 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3145
3327
|
for (let e of r.result.getStdOutput()) e.type === "out" ? this.stdOut = e.string : e.type === "err" && (this.stdErr = e.string);
|
|
3146
3328
|
this.exitCode = r.result.getExitCode();
|
|
3147
3329
|
}
|
|
3148
|
-
_createIoBridge(
|
|
3149
|
-
let
|
|
3330
|
+
_createIoBridge(t, n, r) {
|
|
3331
|
+
let a = (e) => ({ write(t) {
|
|
3150
3332
|
(t instanceof Uint8Array ? new TextDecoder().decode(t) : String(t ?? "")).replace(/\r?\n$/, "").split(/\r?\n/).forEach((t) => e.push(t));
|
|
3151
3333
|
} });
|
|
3152
3334
|
return {
|
|
3153
3335
|
binName: i,
|
|
3154
|
-
args:
|
|
3336
|
+
args: t,
|
|
3155
3337
|
stdin: this.stdin !== void 0 && this.stdin !== null ? String(this.stdin) : "",
|
|
3156
3338
|
fs: this.fs,
|
|
3157
3339
|
context: this.context,
|
|
3158
|
-
|
|
3159
|
-
|
|
3340
|
+
wasmPath: e.wasmPath || null,
|
|
3341
|
+
wasmBytes: this._persistedWasmBytes || null,
|
|
3342
|
+
stdout: Object.assign((e) => n.push(String(e)), a(n)),
|
|
3343
|
+
stderr: Object.assign((e) => r.push(String(e)), a(r)),
|
|
3160
3344
|
readFile: (e, t) => {
|
|
3161
3345
|
if (!this.fs) return null;
|
|
3162
3346
|
let n = t && t !== "." && !e.startsWith("/") ? `${t.replace(/\/+$/, "")}/${e}` : e, r = this.fs.getFileByPath(n) ?? this.fs.getFileByPath(e);
|
|
@@ -3181,48 +3365,86 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3181
3365
|
}
|
|
3182
3366
|
};
|
|
3183
3367
|
}
|
|
3184
|
-
async _runFunctionOrEmscripten(
|
|
3185
|
-
let
|
|
3186
|
-
arguments:
|
|
3368
|
+
async _runFunctionOrEmscripten(t, n, r = !1) {
|
|
3369
|
+
let i = [], a = [], o = new TextEncoder().encode(this.stdin || ""), s = 0, c = /* @__PURE__ */ new Set(), l = {
|
|
3370
|
+
arguments: n,
|
|
3187
3371
|
noInitialRun: !0,
|
|
3372
|
+
...this._persistedWasmBytes && this._persistedWasmBytes.byteLength > 0 ? { wasmBinary: this._persistedWasmBytes } : {},
|
|
3373
|
+
...e.wasmUrl ? { locateFile: (t) => t.endsWith(".wasm") ? e.wasmUrl : t } : {},
|
|
3188
3374
|
print: (e) => {
|
|
3189
|
-
|
|
3375
|
+
i.push(String(e));
|
|
3190
3376
|
},
|
|
3191
3377
|
printErr: (e) => {
|
|
3192
|
-
|
|
3378
|
+
a.push(String(e));
|
|
3193
3379
|
},
|
|
3194
|
-
stdin: () =>
|
|
3380
|
+
stdin: () => s < o.length ? o[s++] : null,
|
|
3195
3381
|
preRun: [(e) => {
|
|
3196
|
-
e && e.FS && (
|
|
3382
|
+
e && e.FS && (c = this._syncBrshToEmscriptenFs(e.FS, n));
|
|
3197
3383
|
}]
|
|
3198
|
-
},
|
|
3384
|
+
}, u = this._createIoBridge(n, i, a), d;
|
|
3199
3385
|
try {
|
|
3200
|
-
|
|
3386
|
+
d = t.prototype && t.prototype.constructor === t && Object.getOwnPropertyNames(t.prototype).length > 1 ? new t(l, u) : await t(l, u);
|
|
3201
3387
|
} catch (e) {
|
|
3202
3388
|
if (e && typeof e.status == "number") this.exitCode = e.status;
|
|
3203
3389
|
else throw e;
|
|
3204
3390
|
}
|
|
3205
|
-
if (
|
|
3206
|
-
|
|
3391
|
+
if (d && typeof d == "object") if (r && (d.wasmBinary instanceof Uint8Array || d.HEAPU8 instanceof Uint8Array) && (this._inspectedWasm = k(d.wasmBinary || d.HEAPU8)), typeof d.callMain == "function") {
|
|
3392
|
+
d.FS && c.size === 0 && (c = this._syncBrshToEmscriptenFs(d.FS, n));
|
|
3207
3393
|
try {
|
|
3208
|
-
let e = await
|
|
3394
|
+
let e = await d.callMain(n);
|
|
3209
3395
|
typeof e == "number" && e !== 0 && (this.exitCode = e);
|
|
3210
3396
|
} catch (e) {
|
|
3211
|
-
e && typeof e.status == "number" ? this.exitCode = e.status : (
|
|
3397
|
+
e && typeof e.status == "number" ? this.exitCode = e.status : (a.push(e.message || String(e)), this.exitCode = 1);
|
|
3212
3398
|
}
|
|
3213
|
-
|
|
3214
|
-
} else if (typeof
|
|
3215
|
-
else if (typeof
|
|
3216
|
-
let e = (
|
|
3217
|
-
await this._invokeCliFunction(e,
|
|
3218
|
-
} else typeof u.stdout == "string" &&
|
|
3219
|
-
else typeof
|
|
3220
|
-
|
|
3399
|
+
d.FS && this._syncEmscriptenFsToBrsh(d.FS, n, c);
|
|
3400
|
+
} else if (typeof d.exec == "function" && typeof d.writeFile == "function") await this._runVirtualFsInstance(d, n, i, a);
|
|
3401
|
+
else if (typeof d.main == "function" || typeof d.run == "function") {
|
|
3402
|
+
let e = (d.main || d.run).bind(d);
|
|
3403
|
+
await this._invokeCliFunction(e, n, i, a);
|
|
3404
|
+
} else !r && !isVersion && typeof d.Database == "function" ? this._runSqlJsDatabase(d, n, u, i) : (typeof d.stdout == "string" && d.stdout && d.stdout.replace(/\r?\n$/, "").split(/\r?\n/).forEach((e) => i.push(e)), typeof d.stderr == "string" && d.stderr && d.stderr.replace(/\r?\n$/, "").split(/\r?\n/).forEach((e) => a.push(e)), d.error && a.length === 0 && (a.push(d.error.message || String(d.error)), this.exitCode = 1), typeof d.exitCode == "number" && (this.exitCode = d.exitCode));
|
|
3405
|
+
else typeof d == "string" ? d.replace(/\r?\n$/, "").split(/\r?\n/).forEach((e) => i.push(e)) : typeof d == "number" && (this.exitCode = d);
|
|
3406
|
+
i.forEach((e) => {
|
|
3221
3407
|
this.stdOut = e;
|
|
3222
|
-
}),
|
|
3408
|
+
}), a.forEach((e) => {
|
|
3223
3409
|
this.stdErr = e;
|
|
3224
3410
|
});
|
|
3225
3411
|
}
|
|
3412
|
+
_runSqlJsDatabase(e, t, n, r) {
|
|
3413
|
+
let i = "list", a = ":memory:", o = null, s = [];
|
|
3414
|
+
for (let e = 0; e < t.length; e++) {
|
|
3415
|
+
let n = t[e];
|
|
3416
|
+
n === "-table" || n === "--table" || n === "-box" ? i = "table" : n === "-csv" || n === "--csv" ? i = "csv" : n === "-cmd" && e + 1 < t.length ? o = t[++e] : n.startsWith("-") || s.push(n);
|
|
3417
|
+
}
|
|
3418
|
+
if (s.length === 1 ? /^\s*(SELECT|INSERT|UPDATE|DELETE|CREATE|DROP|PRAGMA|WITH|BEGIN|EXPLAIN|\.)\b/i.test(s[0]) ? o = s[0] : a = s[0] : s.length >= 2 && (a = s[0], o = s.slice(1).join(" ")), !o && n.stdin && n.stdin.trim() && (o = n.stdin.trim()), !o) return;
|
|
3419
|
+
let c = a === ":memory:" ? null : n.readBytes(a), l = c && c.byteLength > 0 ? new e.Database(c) : new e.Database();
|
|
3420
|
+
try {
|
|
3421
|
+
if (o.trim() === ".tables") {
|
|
3422
|
+
let e = l.exec("SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%' ORDER BY name"), t = e[0] && e[0].values ? e[0].values.map((e) => e[0]) : [];
|
|
3423
|
+
t.length > 0 && r.push(t.join(" "));
|
|
3424
|
+
} else {
|
|
3425
|
+
let e = l.exec(o);
|
|
3426
|
+
for (let t of e) {
|
|
3427
|
+
let e = (t.columns || []).map(String), n = t.values || [];
|
|
3428
|
+
if (i === "table" && e.length > 0) {
|
|
3429
|
+
let t = e.map((e) => e.length), i = n.map((n) => e.map((e, r) => {
|
|
3430
|
+
let i = n[r] == null ? "NULL" : String(n[r]);
|
|
3431
|
+
return i.length > t[r] && (t[r] = i.length), i;
|
|
3432
|
+
}));
|
|
3433
|
+
r.push(e.map((e, n) => " " + e.padEnd(t[n]) + " ").join("|")), r.push(t.map((e) => "-".repeat(e + 2)).join("+")), i.forEach((e) => r.push(e.map((e, n) => " " + e.padEnd(t[n]) + " ").join("|")));
|
|
3434
|
+
} else if (i === "csv") {
|
|
3435
|
+
let t = (e) => {
|
|
3436
|
+
let t = e == null ? "" : String(e);
|
|
3437
|
+
return /[",\r\n]/.test(t) ? "\"" + t.replace(/"/g, "\"\"") + "\"" : t;
|
|
3438
|
+
};
|
|
3439
|
+
e.length > 0 && r.push(e.map(t).join(",")), n.forEach((n) => r.push(e.map((e, r) => t(n[r])).join(",")));
|
|
3440
|
+
} else n.forEach((t) => r.push(e.map((e, n) => t[n] == null ? "" : String(t[n])).join("|")));
|
|
3441
|
+
}
|
|
3442
|
+
}
|
|
3443
|
+
a !== ":memory:" && n.writeFile(a, l.export());
|
|
3444
|
+
} finally {
|
|
3445
|
+
l.close();
|
|
3446
|
+
}
|
|
3447
|
+
}
|
|
3226
3448
|
async _runVirtualFsInstance(t, n, r, i) {
|
|
3227
3449
|
typeof t.on == "function" && t.on("log", ({ message: e }) => {
|
|
3228
3450
|
e && r.push(e);
|
|
@@ -3377,12 +3599,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3377
3599
|
else r.push(i);
|
|
3378
3600
|
let i = [];
|
|
3379
3601
|
if (r.length === 0) {
|
|
3380
|
-
let e = this.stdin;
|
|
3602
|
+
let e = typeof this.stdin == "string" ? this.stdin : null;
|
|
3381
3603
|
if (e == null) return this.stdErr = "cat: no file specified", this.exitCode = 1, Promise.resolve();
|
|
3382
3604
|
i.push(e);
|
|
3383
3605
|
} else for (let e of r) {
|
|
3384
3606
|
if (e === "-") {
|
|
3385
|
-
i.push(this.stdin
|
|
3607
|
+
i.push(typeof this.stdin == "string" ? this.stdin : "");
|
|
3386
3608
|
continue;
|
|
3387
3609
|
}
|
|
3388
3610
|
let t = this.fs.getFileByPath(e);
|
|
@@ -3513,10 +3735,10 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3513
3735
|
isFunction: h,
|
|
3514
3736
|
isAsyncFunction: g
|
|
3515
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;
|
|
3516
|
-
})), pe,
|
|
3738
|
+
})), pe, Y = e((() => {
|
|
3517
3739
|
pe = globalThis || self;
|
|
3518
|
-
})),
|
|
3519
|
-
|
|
3740
|
+
})), me = /* @__PURE__ */ t(((e, t) => {
|
|
3741
|
+
Y();
|
|
3520
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 + "(?:" + [
|
|
3521
3743
|
O,
|
|
3522
3744
|
k,
|
|
@@ -3531,7 +3753,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3531
3753
|
k,
|
|
3532
3754
|
A,
|
|
3533
3755
|
y
|
|
3534
|
-
].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([
|
|
3535
3757
|
j + "?" + w + "+" + F + "(?=" + [
|
|
3536
3758
|
b,
|
|
3537
3759
|
j,
|
|
@@ -3737,94 +3959,94 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
3737
3959
|
œ: "oe",
|
|
3738
3960
|
ʼn: "'n",
|
|
3739
3961
|
ſ: "ss"
|
|
3740
|
-
},
|
|
3741
|
-
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) {
|
|
3742
3964
|
var i = -1, a = e ? e.length : 0;
|
|
3743
3965
|
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
3744
3966
|
return n;
|
|
3745
3967
|
}
|
|
3746
|
-
function
|
|
3968
|
+
function J(e) {
|
|
3747
3969
|
return e.split("");
|
|
3748
3970
|
}
|
|
3749
|
-
function
|
|
3971
|
+
function oe(e) {
|
|
3750
3972
|
return e.match(i) || [];
|
|
3751
3973
|
}
|
|
3752
|
-
function
|
|
3974
|
+
function se(e) {
|
|
3753
3975
|
return function(t) {
|
|
3754
3976
|
return e?.[t];
|
|
3755
3977
|
};
|
|
3756
3978
|
}
|
|
3757
|
-
var
|
|
3758
|
-
function
|
|
3979
|
+
var ce = se(W);
|
|
3980
|
+
function le(e) {
|
|
3759
3981
|
return re.test(e);
|
|
3760
3982
|
}
|
|
3761
|
-
function
|
|
3983
|
+
function ue(e) {
|
|
3762
3984
|
return ie.test(e);
|
|
3763
3985
|
}
|
|
3986
|
+
function de(e) {
|
|
3987
|
+
return le(e) ? fe(e) : J(e);
|
|
3988
|
+
}
|
|
3764
3989
|
function fe(e) {
|
|
3765
|
-
return
|
|
3990
|
+
return e.match(ne) || [];
|
|
3766
3991
|
}
|
|
3767
|
-
function
|
|
3992
|
+
function me(e) {
|
|
3768
3993
|
return e.match(U) || [];
|
|
3769
3994
|
}
|
|
3770
|
-
|
|
3771
|
-
|
|
3772
|
-
}
|
|
3773
|
-
var ge = Object.prototype.toString, Y = G.Symbol, _e = Y ? Y.prototype : void 0, ve = _e ? _e.toString : void 0;
|
|
3774
|
-
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) {
|
|
3775
3997
|
var r = -1, i = e.length;
|
|
3776
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;
|
|
3777
3999
|
for (var a = Array(i); ++r < i;) a[r] = e[r + t];
|
|
3778
4000
|
return a;
|
|
3779
4001
|
}
|
|
3780
|
-
function
|
|
4002
|
+
function ye(e) {
|
|
3781
4003
|
if (typeof e == "string") return e;
|
|
3782
|
-
if (
|
|
4004
|
+
if (we(e)) return _e ? _e.call(e) : "";
|
|
3783
4005
|
var t = e + "";
|
|
3784
4006
|
return t == "0" && 1 / e == -n ? "-0" : t;
|
|
3785
4007
|
}
|
|
3786
|
-
function
|
|
4008
|
+
function be(e, t, n) {
|
|
3787
4009
|
var r = e.length;
|
|
3788
|
-
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);
|
|
3789
4011
|
}
|
|
3790
|
-
function
|
|
4012
|
+
function xe(e) {
|
|
3791
4013
|
return function(t) {
|
|
3792
|
-
t =
|
|
3793
|
-
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);
|
|
3794
4016
|
return r[e]() + i;
|
|
3795
4017
|
};
|
|
3796
4018
|
}
|
|
3797
|
-
function
|
|
4019
|
+
function Se(e) {
|
|
3798
4020
|
return function(t) {
|
|
3799
|
-
return
|
|
4021
|
+
return q(Ae(Oe(t).replace(H, "")), e, "");
|
|
3800
4022
|
};
|
|
3801
4023
|
}
|
|
3802
|
-
function
|
|
4024
|
+
function Ce(e) {
|
|
3803
4025
|
return !!e && typeof e == "object";
|
|
3804
4026
|
}
|
|
3805
|
-
function
|
|
3806
|
-
return typeof e == "symbol" ||
|
|
4027
|
+
function we(e) {
|
|
4028
|
+
return typeof e == "symbol" || Ce(e) && he.call(e) == r;
|
|
3807
4029
|
}
|
|
3808
|
-
function
|
|
3809
|
-
return e == null ? "" :
|
|
4030
|
+
function Te(e) {
|
|
4031
|
+
return e == null ? "" : ye(e);
|
|
3810
4032
|
}
|
|
3811
|
-
var
|
|
3812
|
-
return t = t.toLowerCase(), e + (n ?
|
|
4033
|
+
var Ee = Se(function(e, t, n) {
|
|
4034
|
+
return t = t.toLowerCase(), e + (n ? De(t) : t);
|
|
3813
4035
|
});
|
|
3814
|
-
function
|
|
3815
|
-
return
|
|
4036
|
+
function De(e) {
|
|
4037
|
+
return ke(Te(e).toLowerCase());
|
|
3816
4038
|
}
|
|
3817
|
-
function
|
|
3818
|
-
return e =
|
|
4039
|
+
function Oe(e) {
|
|
4040
|
+
return e = Te(e), e && e.replace(a, ce).replace(te, "");
|
|
3819
4041
|
}
|
|
3820
|
-
var
|
|
3821
|
-
function
|
|
3822
|
-
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) || [];
|
|
3823
4045
|
}
|
|
3824
|
-
t.exports =
|
|
4046
|
+
t.exports = Ee;
|
|
3825
4047
|
})), he = /* @__PURE__ */ t(((e, t) => {
|
|
3826
4048
|
B();
|
|
3827
|
-
var n = ue(), r = de(), i = fe(), a =
|
|
4049
|
+
var n = ue(), r = de(), i = fe(), a = me(), o = {
|
|
3828
4050
|
short: /^-([^\d-])$/,
|
|
3829
4051
|
long: /^--(\S+)/,
|
|
3830
4052
|
combinedShort: /^-[^\d-]{2,}$/,
|
|
@@ -4089,7 +4311,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4089
4311
|
});
|
|
4090
4312
|
}
|
|
4091
4313
|
t.exports = E;
|
|
4092
|
-
})),
|
|
4314
|
+
})), X = /* @__PURE__ */ t(((e, t) => {
|
|
4093
4315
|
var n = U(), r = he();
|
|
4094
4316
|
t.exports = class extends n {
|
|
4095
4317
|
static get name() {
|
|
@@ -4190,7 +4412,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4190
4412
|
], { argv: e });
|
|
4191
4413
|
}
|
|
4192
4414
|
};
|
|
4193
|
-
})),
|
|
4415
|
+
})), ge = /* @__PURE__ */ t(((e, t) => {
|
|
4194
4416
|
var n = U();
|
|
4195
4417
|
t.exports = class extends n {
|
|
4196
4418
|
static get name() {
|
|
@@ -4306,7 +4528,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4306
4528
|
for (; v < _.length;) g.push(_[v++]);
|
|
4307
4529
|
if (p !== null) {
|
|
4308
4530
|
let e = "";
|
|
4309
|
-
if (p === "-") e = this.stdin
|
|
4531
|
+
if (p === "-") e = typeof this.stdin == "string" ? this.stdin : "";
|
|
4310
4532
|
else {
|
|
4311
4533
|
let t = this.fs.getFileByPath(p);
|
|
4312
4534
|
if (t == null) {
|
|
@@ -4336,7 +4558,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4336
4558
|
return this.stdErr = `grep: invalid regex: ${e.message}`, this.exitCode = 2, Promise.resolve();
|
|
4337
4559
|
}
|
|
4338
4560
|
}
|
|
4339
|
-
let x = [], S = !1, C = this.stdin
|
|
4561
|
+
let x = [], S = !1, C = typeof this.stdin == "string" ? this.stdin : "", w = (e, t = !1) => {
|
|
4340
4562
|
let n = this.fs.getFileByPath(e);
|
|
4341
4563
|
if (n == null) {
|
|
4342
4564
|
if (!f) {
|
|
@@ -4447,8 +4669,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4447
4669
|
var { Test: n, TestBracket: r } = ce();
|
|
4448
4670
|
t.exports = [
|
|
4449
4671
|
le(),
|
|
4672
|
+
X(),
|
|
4450
4673
|
ge(),
|
|
4451
|
-
Y(),
|
|
4452
4674
|
_e(),
|
|
4453
4675
|
ve(),
|
|
4454
4676
|
ye(),
|
|
@@ -4457,7 +4679,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4457
4679
|
r
|
|
4458
4680
|
];
|
|
4459
4681
|
})), Se = /* @__PURE__ */ t(((e, t) => {
|
|
4460
|
-
var n =
|
|
4682
|
+
var n = J();
|
|
4461
4683
|
t.exports = class extends n {
|
|
4462
4684
|
static get name() {
|
|
4463
4685
|
return "alias";
|
|
@@ -4469,7 +4691,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4469
4691
|
}
|
|
4470
4692
|
};
|
|
4471
4693
|
})), Ce = /* @__PURE__ */ t(((e, t) => {
|
|
4472
|
-
var n =
|
|
4694
|
+
var n = J();
|
|
4473
4695
|
t.exports = class extends n {
|
|
4474
4696
|
static get name() {
|
|
4475
4697
|
return "export";
|
|
@@ -4481,7 +4703,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4481
4703
|
}
|
|
4482
4704
|
};
|
|
4483
4705
|
})), we = /* @__PURE__ */ t(((e, t) => {
|
|
4484
|
-
var n =
|
|
4706
|
+
var n = J();
|
|
4485
4707
|
t.exports = class extends n {
|
|
4486
4708
|
static get name() {
|
|
4487
4709
|
return "cd";
|
|
@@ -4493,7 +4715,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4493
4715
|
}
|
|
4494
4716
|
};
|
|
4495
4717
|
})), Te = /* @__PURE__ */ t(((e, t) => {
|
|
4496
|
-
var n =
|
|
4718
|
+
var n = J();
|
|
4497
4719
|
t.exports = class extends n {
|
|
4498
4720
|
static get name() {
|
|
4499
4721
|
return "chmod";
|
|
@@ -4549,7 +4771,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4549
4771
|
}
|
|
4550
4772
|
};
|
|
4551
4773
|
})), Ee = /* @__PURE__ */ t(((e, t) => {
|
|
4552
|
-
var n =
|
|
4774
|
+
var n = J(), r = G();
|
|
4553
4775
|
t.exports = class extends n {
|
|
4554
4776
|
static get name() {
|
|
4555
4777
|
return "cp";
|
|
@@ -4645,9 +4867,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4645
4867
|
}
|
|
4646
4868
|
};
|
|
4647
4869
|
})), De = /* @__PURE__ */ t(((e, t) => {
|
|
4648
|
-
var n =
|
|
4870
|
+
var n = J(), r = (() => {
|
|
4649
4871
|
try {
|
|
4650
|
-
return
|
|
4872
|
+
return G();
|
|
4651
4873
|
} catch {
|
|
4652
4874
|
return null;
|
|
4653
4875
|
}
|
|
@@ -4718,7 +4940,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4718
4940
|
}
|
|
4719
4941
|
};
|
|
4720
4942
|
})), Oe = /* @__PURE__ */ t(((e, t) => {
|
|
4721
|
-
var n =
|
|
4943
|
+
var n = J();
|
|
4722
4944
|
t.exports = class extends n {
|
|
4723
4945
|
static get name() {
|
|
4724
4946
|
return "mkdir";
|
|
@@ -4745,7 +4967,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4745
4967
|
}
|
|
4746
4968
|
};
|
|
4747
4969
|
})), ke = /* @__PURE__ */ t(((e, t) => {
|
|
4748
|
-
var n =
|
|
4970
|
+
var n = J(), r = G();
|
|
4749
4971
|
t.exports = class extends n {
|
|
4750
4972
|
static get name() {
|
|
4751
4973
|
return "mv";
|
|
@@ -4818,7 +5040,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4818
5040
|
}
|
|
4819
5041
|
};
|
|
4820
5042
|
})), Ae = /* @__PURE__ */ t(((e, t) => {
|
|
4821
|
-
var n =
|
|
5043
|
+
var n = J();
|
|
4822
5044
|
t.exports = class extends n {
|
|
4823
5045
|
static get name() {
|
|
4824
5046
|
return "pwd";
|
|
@@ -4829,7 +5051,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4829
5051
|
}
|
|
4830
5052
|
};
|
|
4831
5053
|
})), je = /* @__PURE__ */ t(((e, t) => {
|
|
4832
|
-
var n =
|
|
5054
|
+
var n = J(), r = G();
|
|
4833
5055
|
t.exports = class extends n {
|
|
4834
5056
|
static get name() {
|
|
4835
5057
|
return "rm";
|
|
@@ -4874,9 +5096,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4874
5096
|
}
|
|
4875
5097
|
};
|
|
4876
5098
|
})), Me = /* @__PURE__ */ t(((e, t) => {
|
|
4877
|
-
var n =
|
|
5099
|
+
var n = J(), r = (() => {
|
|
4878
5100
|
try {
|
|
4879
|
-
return
|
|
5101
|
+
return G();
|
|
4880
5102
|
} catch {
|
|
4881
5103
|
return null;
|
|
4882
5104
|
}
|
|
@@ -4943,9 +5165,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4943
5165
|
}
|
|
4944
5166
|
};
|
|
4945
5167
|
})), Ne = /* @__PURE__ */ t(((e, t) => {
|
|
4946
|
-
var n =
|
|
5168
|
+
var n = J(), r = (() => {
|
|
4947
5169
|
try {
|
|
4948
|
-
return
|
|
5170
|
+
return G();
|
|
4949
5171
|
} catch {
|
|
4950
5172
|
return null;
|
|
4951
5173
|
}
|
|
@@ -4984,7 +5206,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4984
5206
|
}
|
|
4985
5207
|
};
|
|
4986
5208
|
})), Pe = /* @__PURE__ */ t(((e, t) => {
|
|
4987
|
-
var n =
|
|
5209
|
+
var n = J();
|
|
4988
5210
|
t.exports = class extends n {
|
|
4989
5211
|
static get name() {
|
|
4990
5212
|
return "which";
|
|
@@ -4996,7 +5218,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
4996
5218
|
}
|
|
4997
5219
|
};
|
|
4998
5220
|
})), Fe = /* @__PURE__ */ t(((e, t) => {
|
|
4999
|
-
var n =
|
|
5221
|
+
var n = oe(), r = J();
|
|
5000
5222
|
t.exports = class extends r {
|
|
5001
5223
|
static get name() {
|
|
5002
5224
|
return "source";
|
|
@@ -5025,17 +5247,17 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5025
5247
|
}
|
|
5026
5248
|
};
|
|
5027
5249
|
})), Ie = /* @__PURE__ */ t(((e, t) => {
|
|
5028
|
-
var n =
|
|
5250
|
+
var n = J();
|
|
5029
5251
|
t.exports = class extends n {
|
|
5030
5252
|
static get name() {
|
|
5031
5253
|
return "clear";
|
|
5032
5254
|
}
|
|
5033
5255
|
run() {
|
|
5034
|
-
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());
|
|
5035
5257
|
}
|
|
5036
5258
|
};
|
|
5037
5259
|
})), Le = /* @__PURE__ */ t(((e, t) => {
|
|
5038
|
-
var n =
|
|
5260
|
+
var n = J();
|
|
5039
5261
|
t.exports = class extends n {
|
|
5040
5262
|
static get name() {
|
|
5041
5263
|
return "exit";
|
|
@@ -5046,7 +5268,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5046
5268
|
}
|
|
5047
5269
|
};
|
|
5048
5270
|
})), Re = /* @__PURE__ */ t(((e, t) => {
|
|
5049
|
-
var n =
|
|
5271
|
+
var n = J(), r = he();
|
|
5050
5272
|
t.exports = class extends n {
|
|
5051
5273
|
static get name() {
|
|
5052
5274
|
return "read";
|
|
@@ -5120,7 +5342,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5120
5342
|
}
|
|
5121
5343
|
};
|
|
5122
5344
|
})), ze = /* @__PURE__ */ t(((e, t) => {
|
|
5123
|
-
var n =
|
|
5345
|
+
var n = J(), r = U();
|
|
5124
5346
|
t.exports = class extends n {
|
|
5125
5347
|
static get name() {
|
|
5126
5348
|
return "jsfunction";
|
|
@@ -5156,7 +5378,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5156
5378
|
}
|
|
5157
5379
|
};
|
|
5158
5380
|
})), Be = /* @__PURE__ */ t(((e, t) => {
|
|
5159
|
-
var n =
|
|
5381
|
+
var n = J();
|
|
5160
5382
|
function r(e) {
|
|
5161
5383
|
return e >= 1048576 ? (e / 1048576).toFixed(1) + " MB" : e >= 1024 ? (e / 1024).toFixed(1) + " KB" : e + " B";
|
|
5162
5384
|
}
|
|
@@ -5254,7 +5476,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5254
5476
|
let e = new TextDecoder().decode(t);
|
|
5255
5477
|
this.fs.setFileByPath(s, e, !0);
|
|
5256
5478
|
} else {
|
|
5257
|
-
let { BinaryFile: e } =
|
|
5479
|
+
let { BinaryFile: e } = W(), r = e ? new e(t.buffer, n || "application/octet-stream") : t;
|
|
5258
5480
|
this.fs.setFileByPath(s, r, !0);
|
|
5259
5481
|
}
|
|
5260
5482
|
} catch (e) {
|
|
@@ -5277,7 +5499,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5277
5499
|
}
|
|
5278
5500
|
};
|
|
5279
5501
|
})), Ve = /* @__PURE__ */ t(((e, t) => {
|
|
5280
|
-
var n =
|
|
5502
|
+
var n = J(), r = {
|
|
5281
5503
|
errexit: "e",
|
|
5282
5504
|
xtrace: "x",
|
|
5283
5505
|
nounset: "u",
|
|
@@ -5376,7 +5598,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5376
5598
|
t.exports = ReferenceError;
|
|
5377
5599
|
})), Ye = /* @__PURE__ */ t(((e, t) => {
|
|
5378
5600
|
t.exports = SyntaxError;
|
|
5379
|
-
})),
|
|
5601
|
+
})), Z = /* @__PURE__ */ t(((e, t) => {
|
|
5380
5602
|
t.exports = TypeError;
|
|
5381
5603
|
})), Xe = /* @__PURE__ */ t(((e, t) => {
|
|
5382
5604
|
t.exports = URIError;
|
|
@@ -5486,7 +5708,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5486
5708
|
var n = pt(), r = ht(), i = mt();
|
|
5487
5709
|
t.exports = gt() || n.call(i, r);
|
|
5488
5710
|
})), vt = /* @__PURE__ */ t(((e, t) => {
|
|
5489
|
-
var n = pt(), r =
|
|
5711
|
+
var n = pt(), r = Z(), i = mt(), a = _t();
|
|
5490
5712
|
t.exports = function(e) {
|
|
5491
5713
|
if (e.length < 1 || typeof e[0] != "function") throw new r("a function is required");
|
|
5492
5714
|
return a(n, i, e);
|
|
@@ -5515,8 +5737,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5515
5737
|
})), xt = /* @__PURE__ */ t(((e, t) => {
|
|
5516
5738
|
var n = Function.prototype.call, r = Object.prototype.hasOwnProperty;
|
|
5517
5739
|
t.exports = pt().call(n, r);
|
|
5518
|
-
})),
|
|
5519
|
-
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) {
|
|
5520
5742
|
try {
|
|
5521
5743
|
return v("\"use strict\"; return (" + e + ").constructor;")();
|
|
5522
5744
|
} catch {}
|
|
@@ -5730,7 +5952,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5730
5952
|
return ee(e, V, function(e, t, n, i) {
|
|
5731
5953
|
r[r.length] = n ? ee(i, H, "$1") : t || e;
|
|
5732
5954
|
}), r;
|
|
5733
|
-
},
|
|
5955
|
+
}, ne = function(e, t) {
|
|
5734
5956
|
var n = e, r;
|
|
5735
5957
|
if (I(P, n) && (r = P[n], n = "%" + r[0] + "%"), I(M, n)) {
|
|
5736
5958
|
var i = M[n];
|
|
@@ -5747,7 +5969,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5747
5969
|
if (typeof e != "string" || e.length === 0) throw new l("intrinsic name must be a non-empty string");
|
|
5748
5970
|
if (arguments.length > 1 && typeof t != "boolean") throw new l("\"allowMissing\" argument must be a boolean");
|
|
5749
5971
|
if (B(/^%?[^%]*%?$/, e) === null) throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
5750
|
-
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;
|
|
5751
5973
|
u && (r = u[0], R(n, L([0, 1], u)));
|
|
5752
5974
|
for (var d = 1, f = !0; d < n.length; d += 1) {
|
|
5753
5975
|
var p = n[d], m = z(p, 0, 1), h = z(p, -1);
|
|
@@ -5768,7 +5990,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5768
5990
|
return o;
|
|
5769
5991
|
};
|
|
5770
5992
|
})), St = /* @__PURE__ */ t(((e, t) => {
|
|
5771
|
-
var n = st(), r = Ye(), i =
|
|
5993
|
+
var n = st(), r = Ye(), i = Z(), a = ot();
|
|
5772
5994
|
t.exports = function(e, t, o) {
|
|
5773
5995
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`obj` must be an object or a function`");
|
|
5774
5996
|
if (typeof t != "string" && typeof t != "symbol") throw new i("`property` must be a string or a symbol`");
|
|
@@ -5799,7 +6021,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5799
6021
|
}
|
|
5800
6022
|
}, t.exports = r;
|
|
5801
6023
|
})), wt = /* @__PURE__ */ t(((e, t) => {
|
|
5802
|
-
var n =
|
|
6024
|
+
var n = Q(), r = St(), i = Ct()(), a = ot(), o = Z(), s = n("%Math.floor%");
|
|
5803
6025
|
t.exports = function(e, t) {
|
|
5804
6026
|
if (typeof e != "function") throw new o("`fn` is not a function");
|
|
5805
6027
|
if (typeof t != "number" || t < 0 || t > 4294967295 || s(t) !== t) throw new o("`length` must be a positive 32-bit integer");
|
|
@@ -5925,21 +6147,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5925
6147
|
for (var s = 0; s < o.length; s += 1) l(e, o[s], t[o[s]], i[o[s]]);
|
|
5926
6148
|
};
|
|
5927
6149
|
u.supportsDescriptors = !!c, t.exports = u;
|
|
5928
|
-
})),
|
|
5929
|
-
var n =
|
|
6150
|
+
})), $ = /* @__PURE__ */ t(((e, t) => {
|
|
6151
|
+
var n = Q(), r = vt(), i = r([n("%String.prototype.indexOf%")]);
|
|
5930
6152
|
t.exports = function(e, t) {
|
|
5931
6153
|
var a = n(e, !!t);
|
|
5932
6154
|
return typeof a == "function" && i(e, ".prototype.") > -1 ? r([a]) : a;
|
|
5933
6155
|
};
|
|
5934
6156
|
})), jt = /* @__PURE__ */ t(((e, t) => {
|
|
5935
|
-
var n =
|
|
6157
|
+
var n = Q()("%Array%"), r = !n.isArray && $()("Object.prototype.toString");
|
|
5936
6158
|
t.exports = n.isArray || function(e) {
|
|
5937
6159
|
return r(e) === "[object Array]";
|
|
5938
6160
|
};
|
|
5939
6161
|
})), Mt = /* @__PURE__ */ t(((e, t) => {
|
|
5940
6162
|
t.exports = jt();
|
|
5941
6163
|
})), Nt = /* @__PURE__ */ t(((e, t) => {
|
|
5942
|
-
var n =
|
|
6164
|
+
var n = Q(), r = $(), i = Z(), a = Mt(), o = n("%Reflect.apply%", !0) || r("Function.prototype.apply");
|
|
5943
6165
|
t.exports = function(e, t) {
|
|
5944
6166
|
var n = arguments.length > 2 ? arguments[2] : [];
|
|
5945
6167
|
if (!a(n)) throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");
|
|
@@ -5948,7 +6170,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5948
6170
|
})), Pt = /* @__PURE__ */ t(((e, t) => {
|
|
5949
6171
|
t.exports = {};
|
|
5950
6172
|
})), Ft = /* @__PURE__ */ t(((e, t) => {
|
|
5951
|
-
|
|
6173
|
+
Y();
|
|
5952
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) {
|
|
5953
6175
|
return e.__proto__;
|
|
5954
6176
|
} : null);
|
|
@@ -5975,17 +6197,17 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5975
6197
|
};
|
|
5976
6198
|
t.exports = function e(t, n, r, o) {
|
|
5977
6199
|
var s = n || {};
|
|
5978
|
-
if (
|
|
5979
|
-
if (
|
|
5980
|
-
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;
|
|
5981
6203
|
if (typeof u != "boolean" && u !== "symbol") throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
5982
|
-
if (
|
|
5983
|
-
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`");
|
|
5984
6206
|
var d = s.numericSeparator;
|
|
5985
6207
|
if (t === void 0) return "undefined";
|
|
5986
6208
|
if (t === null) return "null";
|
|
5987
6209
|
if (typeof t == "boolean") return t ? "true" : "false";
|
|
5988
|
-
if (typeof t == "string") return
|
|
6210
|
+
if (typeof t == "string") return me(t, s);
|
|
5989
6211
|
if (typeof t == "number") {
|
|
5990
6212
|
if (t === 0) return Infinity / t > 0 ? "0" : "-0";
|
|
5991
6213
|
var f = String(t);
|
|
@@ -5997,65 +6219,65 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
5997
6219
|
}
|
|
5998
6220
|
var h = s.depth === void 0 ? 5 : s.depth;
|
|
5999
6221
|
if (r === void 0 && (r = 0), r >= h && h > 0 && typeof t == "object") return V(t) ? "[Array]" : "[Object]";
|
|
6000
|
-
var g =
|
|
6222
|
+
var g = ye(s, r);
|
|
6001
6223
|
if (o === void 0) o = [];
|
|
6002
|
-
else if (
|
|
6224
|
+
else if (oe(o, t) >= 0) return "[Circular]";
|
|
6003
6225
|
function y(t, n, i) {
|
|
6004
6226
|
if (n && (o = w.call(o), o.push(n)), i) {
|
|
6005
6227
|
var a = { depth: s.depth };
|
|
6006
|
-
return
|
|
6228
|
+
return K(s, "quoteStyle") && (a.quoteStyle = s.quoteStyle), e(t, a, r + 1, o);
|
|
6007
6229
|
}
|
|
6008
6230
|
return e(t, s, r + 1, o);
|
|
6009
6231
|
}
|
|
6010
6232
|
if (typeof t == "function" && !te(t)) {
|
|
6011
|
-
var x =
|
|
6233
|
+
var x = J(t), T = xe(t, y);
|
|
6012
6234
|
return "[Function" + (x ? ": " + x : " (anonymous)") + "]" + (T.length > 0 ? " { " + C.call(T, ", ") + " }" : "");
|
|
6013
6235
|
}
|
|
6014
6236
|
if (W(t)) {
|
|
6015
6237
|
var D = k ? v.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : O.call(t);
|
|
6016
|
-
return typeof t == "object" && !k ?
|
|
6238
|
+
return typeof t == "object" && !k ? X(D) : D;
|
|
6017
6239
|
}
|
|
6018
|
-
if (
|
|
6240
|
+
if (fe(t)) {
|
|
6019
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);
|
|
6020
6242
|
return F += ">", t.childNodes && t.childNodes.length && (F += "..."), F += "</" + b.call(String(t.nodeName)) + ">", F;
|
|
6021
6243
|
}
|
|
6022
6244
|
if (V(t)) {
|
|
6023
6245
|
if (t.length === 0) return "[]";
|
|
6024
|
-
var
|
|
6025
|
-
return g && !
|
|
6246
|
+
var ae = xe(t, y);
|
|
6247
|
+
return g && !ve(ae) ? "[" + be(ae, g) + "]" : "[ " + C.call(ae, ", ") + " ]";
|
|
6026
6248
|
}
|
|
6027
|
-
if (
|
|
6028
|
-
var
|
|
6029
|
-
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, ", ") + " }";
|
|
6030
6252
|
}
|
|
6031
6253
|
if (typeof t == "object" && u) {
|
|
6032
6254
|
if (I && typeof t[I] == "function" && P) return P(t, { depth: h - r });
|
|
6033
6255
|
if (u !== "symbol" && typeof t.inspect == "function") return t.inspect();
|
|
6034
6256
|
}
|
|
6035
|
-
if (
|
|
6036
|
-
var
|
|
6257
|
+
if (se(t)) {
|
|
6258
|
+
var he = [];
|
|
6037
6259
|
return a && a.call(t, function(e, n) {
|
|
6038
|
-
|
|
6039
|
-
}),
|
|
6260
|
+
he.push(y(n, t, !0) + " => " + y(e, t));
|
|
6261
|
+
}), _e("Map", i.call(t), he, g);
|
|
6040
6262
|
}
|
|
6041
|
-
if (
|
|
6042
|
-
var
|
|
6263
|
+
if (ue(t)) {
|
|
6264
|
+
var Se = [];
|
|
6043
6265
|
return l && l.call(t, function(e) {
|
|
6044
|
-
|
|
6045
|
-
}),
|
|
6046
|
-
}
|
|
6047
|
-
if (
|
|
6048
|
-
if (
|
|
6049
|
-
if (
|
|
6050
|
-
if (re(t)) return
|
|
6051
|
-
if (
|
|
6052
|
-
if (ie(t)) return
|
|
6053
|
-
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)));
|
|
6054
6276
|
if (typeof window < "u" && t === window) return "{ [object Window] }";
|
|
6055
6277
|
if (typeof globalThis < "u" && t === globalThis || pe !== void 0 && t === pe) return "{ [object globalThis] }";
|
|
6056
6278
|
if (!H(t) && !te(t)) {
|
|
6057
|
-
var
|
|
6058
|
-
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, ", ") + " }";
|
|
6059
6281
|
}
|
|
6060
6282
|
return String(t);
|
|
6061
6283
|
};
|
|
@@ -6070,25 +6292,25 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6070
6292
|
return !A || !(typeof e == "object" && (A in e || e[A] !== void 0));
|
|
6071
6293
|
}
|
|
6072
6294
|
function V(e) {
|
|
6073
|
-
return
|
|
6295
|
+
return q(e) === "[object Array]" && B(e);
|
|
6074
6296
|
}
|
|
6075
6297
|
function H(e) {
|
|
6076
|
-
return
|
|
6298
|
+
return q(e) === "[object Date]" && B(e);
|
|
6077
6299
|
}
|
|
6078
6300
|
function te(e) {
|
|
6079
|
-
return
|
|
6080
|
-
}
|
|
6081
|
-
function U(e) {
|
|
6082
|
-
return K(e) === "[object Error]" && B(e);
|
|
6301
|
+
return q(e) === "[object RegExp]" && B(e);
|
|
6083
6302
|
}
|
|
6084
6303
|
function ne(e) {
|
|
6085
|
-
return
|
|
6304
|
+
return q(e) === "[object Error]" && B(e);
|
|
6305
|
+
}
|
|
6306
|
+
function U(e) {
|
|
6307
|
+
return q(e) === "[object String]" && B(e);
|
|
6086
6308
|
}
|
|
6087
6309
|
function re(e) {
|
|
6088
|
-
return
|
|
6310
|
+
return q(e) === "[object Number]" && B(e);
|
|
6089
6311
|
}
|
|
6090
6312
|
function ie(e) {
|
|
6091
|
-
return
|
|
6313
|
+
return q(e) === "[object Boolean]" && B(e);
|
|
6092
6314
|
}
|
|
6093
6315
|
function W(e) {
|
|
6094
6316
|
if (k) return e && typeof e == "object" && e instanceof Symbol;
|
|
@@ -6099,33 +6321,33 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6099
6321
|
} catch {}
|
|
6100
6322
|
return !1;
|
|
6101
6323
|
}
|
|
6102
|
-
function
|
|
6324
|
+
function G(e) {
|
|
6103
6325
|
if (!e || typeof e != "object" || !E) return !1;
|
|
6104
6326
|
try {
|
|
6105
6327
|
return E.call(e), !0;
|
|
6106
6328
|
} catch {}
|
|
6107
6329
|
return !1;
|
|
6108
6330
|
}
|
|
6109
|
-
var
|
|
6331
|
+
var ae = Object.prototype.hasOwnProperty || function(e) {
|
|
6110
6332
|
return e in this;
|
|
6111
6333
|
};
|
|
6112
|
-
function
|
|
6113
|
-
return
|
|
6334
|
+
function K(e, t) {
|
|
6335
|
+
return ae.call(e, t);
|
|
6114
6336
|
}
|
|
6115
|
-
function
|
|
6337
|
+
function q(e) {
|
|
6116
6338
|
return m.call(e);
|
|
6117
6339
|
}
|
|
6118
|
-
function
|
|
6340
|
+
function J(e) {
|
|
6119
6341
|
if (e.name) return e.name;
|
|
6120
6342
|
var t = g.call(h.call(e), /^function\s*([\w$]+)/);
|
|
6121
6343
|
return t ? t[1] : null;
|
|
6122
6344
|
}
|
|
6123
|
-
function
|
|
6345
|
+
function oe(e, t) {
|
|
6124
6346
|
if (e.indexOf) return e.indexOf(t);
|
|
6125
6347
|
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
|
|
6126
6348
|
return -1;
|
|
6127
6349
|
}
|
|
6128
|
-
function
|
|
6350
|
+
function se(e) {
|
|
6129
6351
|
if (!i || !e || typeof e != "object") return !1;
|
|
6130
6352
|
try {
|
|
6131
6353
|
i.call(e);
|
|
@@ -6138,7 +6360,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6138
6360
|
} catch {}
|
|
6139
6361
|
return !1;
|
|
6140
6362
|
}
|
|
6141
|
-
function
|
|
6363
|
+
function ce(e) {
|
|
6142
6364
|
if (!u || !e || typeof e != "object") return !1;
|
|
6143
6365
|
try {
|
|
6144
6366
|
u.call(e, u);
|
|
@@ -6151,14 +6373,14 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6151
6373
|
} catch {}
|
|
6152
6374
|
return !1;
|
|
6153
6375
|
}
|
|
6154
|
-
function
|
|
6376
|
+
function le(e) {
|
|
6155
6377
|
if (!f || !e || typeof e != "object") return !1;
|
|
6156
6378
|
try {
|
|
6157
6379
|
return f.call(e), !0;
|
|
6158
6380
|
} catch {}
|
|
6159
6381
|
return !1;
|
|
6160
6382
|
}
|
|
6161
|
-
function
|
|
6383
|
+
function ue(e) {
|
|
6162
6384
|
if (!c || !e || typeof e != "object") return !1;
|
|
6163
6385
|
try {
|
|
6164
6386
|
c.call(e);
|
|
@@ -6171,7 +6393,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6171
6393
|
} catch {}
|
|
6172
6394
|
return !1;
|
|
6173
6395
|
}
|
|
6174
|
-
function
|
|
6396
|
+
function de(e) {
|
|
6175
6397
|
if (!d || !e || typeof e != "object") return !1;
|
|
6176
6398
|
try {
|
|
6177
6399
|
d.call(e, d);
|
|
@@ -6184,18 +6406,18 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6184
6406
|
} catch {}
|
|
6185
6407
|
return !1;
|
|
6186
6408
|
}
|
|
6187
|
-
function
|
|
6409
|
+
function fe(e) {
|
|
6188
6410
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
6189
6411
|
}
|
|
6190
|
-
function
|
|
6412
|
+
function me(e, t) {
|
|
6191
6413
|
if (e.length > t.maxStringLength) {
|
|
6192
6414
|
var n = e.length - t.maxStringLength, r = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
6193
|
-
return
|
|
6415
|
+
return me(_.call(e, 0, t.maxStringLength), t) + r;
|
|
6194
6416
|
}
|
|
6195
6417
|
var i = R[t.quoteStyle || "single"];
|
|
6196
|
-
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);
|
|
6197
6419
|
}
|
|
6198
|
-
function
|
|
6420
|
+
function he(e) {
|
|
6199
6421
|
var t = e.charCodeAt(0), n = {
|
|
6200
6422
|
8: "b",
|
|
6201
6423
|
9: "t",
|
|
@@ -6205,21 +6427,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6205
6427
|
}[t];
|
|
6206
6428
|
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + y.call(t.toString(16));
|
|
6207
6429
|
}
|
|
6208
|
-
function
|
|
6430
|
+
function X(e) {
|
|
6209
6431
|
return "Object(" + e + ")";
|
|
6210
6432
|
}
|
|
6211
|
-
function
|
|
6433
|
+
function ge(e) {
|
|
6212
6434
|
return e + " { ? }";
|
|
6213
6435
|
}
|
|
6214
|
-
function
|
|
6215
|
-
var i = r ?
|
|
6436
|
+
function _e(e, t, n, r) {
|
|
6437
|
+
var i = r ? be(n, r) : C.call(n, ", ");
|
|
6216
6438
|
return e + " (" + t + ") {" + i + "}";
|
|
6217
6439
|
}
|
|
6218
|
-
function
|
|
6219
|
-
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;
|
|
6220
6442
|
return !0;
|
|
6221
6443
|
}
|
|
6222
|
-
function
|
|
6444
|
+
function ye(e, t) {
|
|
6223
6445
|
var n;
|
|
6224
6446
|
if (e.indent === " ") n = " ";
|
|
6225
6447
|
else if (typeof e.indent == "number" && e.indent > 0) n = C.call(Array(e.indent + 1), " ");
|
|
@@ -6229,23 +6451,23 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6229
6451
|
prev: C.call(Array(t + 1), n)
|
|
6230
6452
|
};
|
|
6231
6453
|
}
|
|
6232
|
-
function
|
|
6454
|
+
function be(e, t) {
|
|
6233
6455
|
if (e.length === 0) return "";
|
|
6234
6456
|
var n = "\n" + t.prev + t.base;
|
|
6235
6457
|
return n + C.call(e, "," + n) + "\n" + t.prev;
|
|
6236
6458
|
}
|
|
6237
|
-
function
|
|
6459
|
+
function xe(e, t) {
|
|
6238
6460
|
var n = V(e), r = [];
|
|
6239
6461
|
if (n) {
|
|
6240
6462
|
r.length = e.length;
|
|
6241
|
-
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) : "";
|
|
6242
6464
|
}
|
|
6243
6465
|
var a = typeof D == "function" ? D(e) : [], o;
|
|
6244
6466
|
if (k) {
|
|
6245
6467
|
o = {};
|
|
6246
6468
|
for (var s = 0; s < a.length; s++) o["$" + a[s]] = a[s];
|
|
6247
6469
|
}
|
|
6248
|
-
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))));
|
|
6249
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));
|
|
6250
6472
|
return r;
|
|
6251
6473
|
}
|
|
@@ -6253,24 +6475,24 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6253
6475
|
t.exports = function(e) {
|
|
6254
6476
|
return typeof e == "string" || typeof e == "symbol";
|
|
6255
6477
|
};
|
|
6256
|
-
})),
|
|
6478
|
+
})), Lt = /* @__PURE__ */ t(((e, t) => {
|
|
6257
6479
|
t.exports = function(e) {
|
|
6258
6480
|
return !!e && (typeof e == "function" || typeof e == "object");
|
|
6259
6481
|
};
|
|
6260
|
-
})),
|
|
6261
|
-
var n =
|
|
6482
|
+
})), Rt = /* @__PURE__ */ t(((e, t) => {
|
|
6483
|
+
var n = Z(), r = Ft(), i = It(), a = Lt();
|
|
6262
6484
|
t.exports = function(e, t) {
|
|
6263
6485
|
if (!a(e)) throw new n("Assertion failed: Type(O) is not Object");
|
|
6264
6486
|
if (!i(t)) throw new n("Assertion failed: P is not a Property Key, got " + r(t));
|
|
6265
6487
|
return e[t];
|
|
6266
6488
|
};
|
|
6267
|
-
})),
|
|
6268
|
-
var n =
|
|
6489
|
+
})), zt = /* @__PURE__ */ t(((e, t) => {
|
|
6490
|
+
var n = Z(), r = Ft(), i = It();
|
|
6269
6491
|
t.exports = function(e, t) {
|
|
6270
6492
|
if (!i(t)) throw new n("Assertion failed: P is not a Property Key, got " + r(t));
|
|
6271
6493
|
return e[t];
|
|
6272
6494
|
};
|
|
6273
|
-
})),
|
|
6495
|
+
})), Bt = /* @__PURE__ */ t(((e, t) => {
|
|
6274
6496
|
var n = Function.prototype.toString, r = typeof Reflect == "object" && Reflect !== null && Reflect.apply, i, a;
|
|
6275
6497
|
if (typeof r == "function" && typeof Object.defineProperty == "function") try {
|
|
6276
6498
|
i = Object.defineProperty({}, "length", { get: function() {
|
|
@@ -6325,10 +6547,10 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6325
6547
|
var t = l.call(e);
|
|
6326
6548
|
return t !== d && t !== f && !/^\[object HTML/.test(t) ? !1 : c(e);
|
|
6327
6549
|
};
|
|
6328
|
-
})), Bt = /* @__PURE__ */ t(((e, t) => {
|
|
6329
|
-
t.exports = zt();
|
|
6330
6550
|
})), Vt = /* @__PURE__ */ t(((e, t) => {
|
|
6331
|
-
|
|
6551
|
+
t.exports = Bt();
|
|
6552
|
+
})), Ht = /* @__PURE__ */ t(((e, t) => {
|
|
6553
|
+
var n = Z(), r = zt(), i = Vt(), a = It(), o = Ft();
|
|
6332
6554
|
t.exports = function(e, t) {
|
|
6333
6555
|
if (!a(t)) throw new n("Assertion failed: P is not a Property Key");
|
|
6334
6556
|
var s = r(e, t);
|
|
@@ -6337,13 +6559,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6337
6559
|
return s;
|
|
6338
6560
|
}
|
|
6339
6561
|
};
|
|
6340
|
-
})),
|
|
6562
|
+
})), Ut = /* @__PURE__ */ t(((e, t) => {
|
|
6341
6563
|
var n = ct();
|
|
6342
6564
|
t.exports = function() {
|
|
6343
6565
|
return n() && !!Symbol.toStringTag;
|
|
6344
6566
|
};
|
|
6345
|
-
})),
|
|
6346
|
-
var n =
|
|
6567
|
+
})), Wt = /* @__PURE__ */ t(((e, t) => {
|
|
6568
|
+
var n = $(), r = Ut()(), i = xt(), a = ot(), o;
|
|
6347
6569
|
if (r) {
|
|
6348
6570
|
var s = n("RegExp.prototype.exec"), c = {}, l = function() {
|
|
6349
6571
|
throw c;
|
|
@@ -6368,12 +6590,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6368
6590
|
};
|
|
6369
6591
|
}
|
|
6370
6592
|
t.exports = o;
|
|
6371
|
-
})),
|
|
6593
|
+
})), Gt = /* @__PURE__ */ t(((e, t) => {
|
|
6372
6594
|
t.exports = function(e) {
|
|
6373
6595
|
return !!e;
|
|
6374
6596
|
};
|
|
6375
|
-
})),
|
|
6376
|
-
var n =
|
|
6597
|
+
})), Kt = /* @__PURE__ */ t(((e, t) => {
|
|
6598
|
+
var n = Q()("%Symbol.match%", !0), r = Wt(), i = Lt(), a = Gt();
|
|
6377
6599
|
t.exports = function(e) {
|
|
6378
6600
|
if (!i(e)) return !1;
|
|
6379
6601
|
if (n) {
|
|
@@ -6382,19 +6604,19 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6382
6604
|
}
|
|
6383
6605
|
return r(e);
|
|
6384
6606
|
};
|
|
6385
|
-
})),
|
|
6386
|
-
var n =
|
|
6607
|
+
})), qt = /* @__PURE__ */ t(((e, t) => {
|
|
6608
|
+
var n = Q()("%String%"), r = Z();
|
|
6387
6609
|
t.exports = function(e) {
|
|
6388
6610
|
if (typeof e == "symbol") throw new r("Cannot convert a Symbol value to a string");
|
|
6389
6611
|
return n(e);
|
|
6390
6612
|
};
|
|
6391
|
-
})),
|
|
6392
|
-
var n =
|
|
6613
|
+
})), Jt = /* @__PURE__ */ t(((e, t) => {
|
|
6614
|
+
var n = Z();
|
|
6393
6615
|
t.exports = function(e) {
|
|
6394
6616
|
if (e == null) throw new n(arguments.length > 0 && arguments[1] || "Cannot call method on " + e);
|
|
6395
6617
|
return e;
|
|
6396
6618
|
};
|
|
6397
|
-
})),
|
|
6619
|
+
})), Yt = /* @__PURE__ */ t(((e, t) => {
|
|
6398
6620
|
var n = function() {
|
|
6399
6621
|
return typeof function() {}.name == "string";
|
|
6400
6622
|
}, r = Object.getOwnPropertyDescriptor;
|
|
@@ -6412,21 +6634,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6412
6634
|
n.boundFunctionsHaveNames = function() {
|
|
6413
6635
|
return n() && typeof i == "function" && function() {}.bind().name !== "";
|
|
6414
6636
|
}, t.exports = n;
|
|
6415
|
-
})),
|
|
6416
|
-
var n = St(), r = Ct()(), i =
|
|
6637
|
+
})), Xt = /* @__PURE__ */ t(((e, t) => {
|
|
6638
|
+
var n = St(), r = Ct()(), i = Yt().functionsHaveConfigurableNames(), a = Z();
|
|
6417
6639
|
t.exports = function(e, t) {
|
|
6418
6640
|
if (typeof e != "function") throw new a("`fn` is not a function");
|
|
6419
6641
|
return (!(arguments.length > 2 && arguments[2]) || i) && (r ? n(e, "name", t, !0, !0) : n(e, "name", t)), e;
|
|
6420
6642
|
};
|
|
6421
|
-
})),
|
|
6422
|
-
var n =
|
|
6643
|
+
})), Zt = /* @__PURE__ */ t(((e, t) => {
|
|
6644
|
+
var n = Xt(), r = Z(), i = Object;
|
|
6423
6645
|
t.exports = n(function() {
|
|
6424
6646
|
if (this == null || this !== i(this)) throw new r("RegExp.prototype.flags getter called on non-object");
|
|
6425
6647
|
var e = "";
|
|
6426
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;
|
|
6427
6649
|
}, "get flags", !0);
|
|
6428
|
-
})),
|
|
6429
|
-
var n =
|
|
6650
|
+
})), Qt = /* @__PURE__ */ t(((e, t) => {
|
|
6651
|
+
var n = Zt(), r = At().supportsDescriptors, i = Object.getOwnPropertyDescriptor;
|
|
6430
6652
|
t.exports = function() {
|
|
6431
6653
|
if (r && /a/gim.flags === "gim") {
|
|
6432
6654
|
var e = i(RegExp.prototype, "flags");
|
|
@@ -6441,8 +6663,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6441
6663
|
}
|
|
6442
6664
|
return n;
|
|
6443
6665
|
};
|
|
6444
|
-
})),
|
|
6445
|
-
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/;
|
|
6446
6668
|
t.exports = function() {
|
|
6447
6669
|
if (!n || !s) throw new o("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");
|
|
6448
6670
|
var e = r(), t = s(c), l = i(t, "flags");
|
|
@@ -6452,29 +6674,29 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6452
6674
|
get: e
|
|
6453
6675
|
}), e;
|
|
6454
6676
|
};
|
|
6455
|
-
})),
|
|
6456
|
-
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());
|
|
6457
6679
|
n(s, {
|
|
6458
6680
|
getPolyfill: a,
|
|
6459
6681
|
implementation: i,
|
|
6460
6682
|
shim: o
|
|
6461
6683
|
}), t.exports = s;
|
|
6462
|
-
})),
|
|
6684
|
+
})), tn = /* @__PURE__ */ t(((e, t) => {
|
|
6463
6685
|
t.exports = function(e) {
|
|
6464
6686
|
return typeof e == "number" && e >= 55296 && e <= 56319;
|
|
6465
6687
|
};
|
|
6466
|
-
})),
|
|
6688
|
+
})), nn = /* @__PURE__ */ t(((e, t) => {
|
|
6467
6689
|
t.exports = function(e) {
|
|
6468
6690
|
return typeof e == "number" && e >= 56320 && e <= 57343;
|
|
6469
6691
|
};
|
|
6470
|
-
})),
|
|
6471
|
-
var n =
|
|
6692
|
+
})), rn = /* @__PURE__ */ t(((e, t) => {
|
|
6693
|
+
var n = Q(), r = Z(), i = n("%String.fromCharCode%"), a = tn(), o = nn();
|
|
6472
6694
|
t.exports = function(e, t) {
|
|
6473
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");
|
|
6474
6696
|
return i(e) + i(t);
|
|
6475
6697
|
};
|
|
6476
|
-
})),
|
|
6477
|
-
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");
|
|
6478
6700
|
t.exports = function(e, t) {
|
|
6479
6701
|
if (typeof e != "string") throw new n("Assertion failed: `string` must be a String");
|
|
6480
6702
|
var r = e.length;
|
|
@@ -6501,22 +6723,22 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6501
6723
|
"[[IsUnpairedSurrogate]]": !0
|
|
6502
6724
|
};
|
|
6503
6725
|
};
|
|
6504
|
-
})),
|
|
6726
|
+
})), on = /* @__PURE__ */ t(((e, t) => {
|
|
6505
6727
|
var n = rt();
|
|
6506
6728
|
t.exports = function(e) {
|
|
6507
6729
|
return (typeof e == "number" || typeof e == "bigint") && !n(e) && e !== Infinity && e !== -Infinity;
|
|
6508
6730
|
};
|
|
6509
|
-
})),
|
|
6510
|
-
var n = Ze(), r = Qe(), i = rt(), a =
|
|
6731
|
+
})), sn = /* @__PURE__ */ t(((e, t) => {
|
|
6732
|
+
var n = Ze(), r = Qe(), i = rt(), a = on();
|
|
6511
6733
|
t.exports = function(e) {
|
|
6512
6734
|
if (typeof e != "number" || i(e) || !a(e)) return !1;
|
|
6513
6735
|
var t = n(e);
|
|
6514
6736
|
return r(t) === t;
|
|
6515
6737
|
};
|
|
6516
|
-
})), sn = /* @__PURE__ */ t(((e, t) => {
|
|
6517
|
-
t.exports = 2 ** 53 - 1 || 9007199254740991;
|
|
6518
6738
|
})), cn = /* @__PURE__ */ t(((e, t) => {
|
|
6519
|
-
|
|
6739
|
+
t.exports = 2 ** 53 - 1 || 9007199254740991;
|
|
6740
|
+
})), ln = /* @__PURE__ */ t(((e, t) => {
|
|
6741
|
+
var n = an(), r = Z(), i = sn(), a = cn();
|
|
6520
6742
|
t.exports = function(e, t, o) {
|
|
6521
6743
|
if (typeof e != "string") throw new r("Assertion failed: `S` must be a String");
|
|
6522
6744
|
if (!i(t) || t < 0 || t > a) throw new r("Assertion failed: `length` must be an integer >= 0 and <= 2**53");
|
|
@@ -6525,8 +6747,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6525
6747
|
var s = e.length;
|
|
6526
6748
|
return t + 1 >= s ? t + 1 : t + n(e, t)["[[CodeUnitCount]]"];
|
|
6527
6749
|
};
|
|
6528
|
-
})),
|
|
6529
|
-
var n =
|
|
6750
|
+
})), un = /* @__PURE__ */ t(((e, t) => {
|
|
6751
|
+
var n = Z();
|
|
6530
6752
|
t.exports = function(e, t) {
|
|
6531
6753
|
if (typeof t != "boolean") throw new n("Assertion failed: Type(done) is not Boolean");
|
|
6532
6754
|
return {
|
|
@@ -6534,8 +6756,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6534
6756
|
done: t
|
|
6535
6757
|
};
|
|
6536
6758
|
};
|
|
6537
|
-
})),
|
|
6538
|
-
var n =
|
|
6759
|
+
})), dn = /* @__PURE__ */ t(((e, t) => {
|
|
6760
|
+
var n = Z(), r = xt(), i = {
|
|
6539
6761
|
__proto__: null,
|
|
6540
6762
|
"[[Configurable]]": !0,
|
|
6541
6763
|
"[[Enumerable]]": !0,
|
|
@@ -6551,8 +6773,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6551
6773
|
if (a && o) throw new n("Property Descriptors may not be both accessor and data descriptors");
|
|
6552
6774
|
return !0;
|
|
6553
6775
|
};
|
|
6554
|
-
})),
|
|
6555
|
-
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");
|
|
6556
6778
|
t.exports = function(e, t, n, s, c, l) {
|
|
6557
6779
|
if (!r) {
|
|
6558
6780
|
if (!e(l) || !l["[[Configurable]]"] || !l["[[Writable]]"] || c in s && o(s, c) !== !!l["[[Enumerable]]"]) return !1;
|
|
@@ -6561,32 +6783,32 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6561
6783
|
}
|
|
6562
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);
|
|
6563
6785
|
};
|
|
6564
|
-
})),
|
|
6786
|
+
})), pn = /* @__PURE__ */ t(((e, t) => {
|
|
6565
6787
|
t.exports = function(e) {
|
|
6566
6788
|
if (e === void 0) return e;
|
|
6567
6789
|
var t = {};
|
|
6568
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;
|
|
6569
6791
|
};
|
|
6570
|
-
})),
|
|
6571
|
-
var n =
|
|
6792
|
+
})), mn = /* @__PURE__ */ t(((e, t) => {
|
|
6793
|
+
var n = Z(), r = dn(), i = pn();
|
|
6572
6794
|
t.exports = function(e) {
|
|
6573
6795
|
if (e !== void 0 && !r(e)) throw new n("Assertion failed: `Desc` must be a Property Descriptor");
|
|
6574
6796
|
return i(e);
|
|
6575
6797
|
};
|
|
6576
|
-
})),
|
|
6577
|
-
var n =
|
|
6798
|
+
})), hn = /* @__PURE__ */ t(((e, t) => {
|
|
6799
|
+
var n = Z(), r = xt(), i = dn();
|
|
6578
6800
|
t.exports = function(e) {
|
|
6579
6801
|
if (e === void 0) return !1;
|
|
6580
6802
|
if (!i(e)) throw new n("Assertion failed: `Desc` must be a Property Descriptor");
|
|
6581
6803
|
return !(!r(e, "[[Value]]") && !r(e, "[[Writable]]"));
|
|
6582
6804
|
};
|
|
6583
|
-
})),
|
|
6805
|
+
})), gn = /* @__PURE__ */ t(((e, t) => {
|
|
6584
6806
|
var n = rt();
|
|
6585
6807
|
t.exports = function(e, t) {
|
|
6586
6808
|
return e === t ? e === 0 ? 1 / e == 1 / t : !0 : n(e) && n(t);
|
|
6587
6809
|
};
|
|
6588
|
-
})),
|
|
6589
|
-
var n = xt(), r =
|
|
6810
|
+
})), _n = /* @__PURE__ */ t(((e, t) => {
|
|
6811
|
+
var n = xt(), r = Z(), i = Lt(), a = Vt(), o = Gt();
|
|
6590
6812
|
t.exports = function(e) {
|
|
6591
6813
|
if (!i(e)) throw new r("ToPropertyDescriptor requires an object");
|
|
6592
6814
|
var t = {};
|
|
@@ -6603,8 +6825,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6603
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");
|
|
6604
6826
|
return t;
|
|
6605
6827
|
};
|
|
6606
|
-
})),
|
|
6607
|
-
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();
|
|
6608
6830
|
t.exports = function(e, t, d) {
|
|
6609
6831
|
if (!r(e)) throw new n("Assertion failed: Type(O) is not Object");
|
|
6610
6832
|
if (!c(t)) throw new n("Assertion failed: P is not a Property Key");
|
|
@@ -6612,19 +6834,19 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6612
6834
|
if (!i(f)) throw new n("Assertion failed: Desc is not a valid Property Descriptor");
|
|
6613
6835
|
return a(s, l, o, e, t, f);
|
|
6614
6836
|
};
|
|
6615
|
-
})),
|
|
6837
|
+
})), yn = /* @__PURE__ */ t(((e, t) => {
|
|
6616
6838
|
t.exports = function(e) {
|
|
6617
6839
|
return e === null || typeof e != "function" && typeof e != "object";
|
|
6618
6840
|
};
|
|
6619
|
-
})),
|
|
6620
|
-
var n =
|
|
6841
|
+
})), bn = /* @__PURE__ */ t(((e, t) => {
|
|
6842
|
+
var n = Q(), r = n("%Object.preventExtensions%", !0), i = n("%Object.isExtensible%", !0), a = yn();
|
|
6621
6843
|
t.exports = r ? function(e) {
|
|
6622
6844
|
return !a(e) && i(e);
|
|
6623
6845
|
} : function(e) {
|
|
6624
6846
|
return !a(e);
|
|
6625
6847
|
};
|
|
6626
|
-
})),
|
|
6627
|
-
var n =
|
|
6848
|
+
})), xn = /* @__PURE__ */ t(((e, t) => {
|
|
6849
|
+
var n = Z(), r = Lt(), i = vn(), a = bn(), o = It();
|
|
6628
6850
|
t.exports = function(e, t, s, c) {
|
|
6629
6851
|
if (!r(e)) throw new n("Assertion failed: `homeObject` is not an Object");
|
|
6630
6852
|
if (!o(t)) throw new n("Assertion failed: `key` is not a Property Key or a Private Name");
|
|
@@ -6638,12 +6860,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6638
6860
|
"[[Configurable]]": !0
|
|
6639
6861
|
});
|
|
6640
6862
|
};
|
|
6641
|
-
})),
|
|
6863
|
+
})), Sn = /* @__PURE__ */ t(((e, t) => {
|
|
6642
6864
|
t.exports = function(e, t) {
|
|
6643
6865
|
for (var n = 0; n < e.length; n += 1) t(e[n], n, e);
|
|
6644
6866
|
};
|
|
6645
|
-
})),
|
|
6646
|
-
var n = Ft(), r =
|
|
6867
|
+
})), Cn = /* @__PURE__ */ t(((e, t) => {
|
|
6868
|
+
var n = Ft(), r = Z(), i = function(e, t, n) {
|
|
6647
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;
|
|
6648
6870
|
}, a = function(e, t) {
|
|
6649
6871
|
if (e) {
|
|
@@ -6683,8 +6905,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6683
6905
|
};
|
|
6684
6906
|
return t;
|
|
6685
6907
|
};
|
|
6686
|
-
})),
|
|
6687
|
-
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);
|
|
6688
6910
|
t.exports = !!o && function() {
|
|
6689
6911
|
var e, t = {
|
|
6690
6912
|
assert: function(e) {
|
|
@@ -6709,8 +6931,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6709
6931
|
};
|
|
6710
6932
|
return t;
|
|
6711
6933
|
};
|
|
6712
|
-
})),
|
|
6713
|
-
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);
|
|
6714
6936
|
t.exports = s ? function() {
|
|
6715
6937
|
var e, t, n = {
|
|
6716
6938
|
assert: function(e) {
|
|
@@ -6734,8 +6956,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6734
6956
|
};
|
|
6735
6957
|
return n;
|
|
6736
6958
|
} : a;
|
|
6737
|
-
})),
|
|
6738
|
-
var n =
|
|
6959
|
+
})), En = /* @__PURE__ */ t(((e, t) => {
|
|
6960
|
+
var n = Z(), r = Ft(), i = Cn(), a = wn(), o = Tn() || a || i;
|
|
6739
6961
|
t.exports = function() {
|
|
6740
6962
|
var e, t = {
|
|
6741
6963
|
assert: function(e) {
|
|
@@ -6756,8 +6978,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6756
6978
|
};
|
|
6757
6979
|
return t;
|
|
6758
6980
|
};
|
|
6759
|
-
})),
|
|
6760
|
-
var n = xt(), r =
|
|
6981
|
+
})), Dn = /* @__PURE__ */ t(((e, t) => {
|
|
6982
|
+
var n = xt(), r = En()(), i = Z(), a = {
|
|
6761
6983
|
assert: function(e, t) {
|
|
6762
6984
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`O` is not an object");
|
|
6763
6985
|
if (typeof t != "string") throw new i("`slot` must be a string");
|
|
@@ -6783,7 +7005,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6783
7005
|
}
|
|
6784
7006
|
};
|
|
6785
7007
|
Object.freeze && Object.freeze(a), t.exports = a;
|
|
6786
|
-
})),
|
|
7008
|
+
})), On = /* @__PURE__ */ t(((e, t) => {
|
|
6787
7009
|
var n = {
|
|
6788
7010
|
__proto__: null,
|
|
6789
7011
|
foo: {}
|
|
@@ -6791,8 +7013,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6791
7013
|
t.exports = function() {
|
|
6792
7014
|
return r;
|
|
6793
7015
|
};
|
|
6794
|
-
})),
|
|
6795
|
-
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()();
|
|
6796
7018
|
t.exports = function(e) {
|
|
6797
7019
|
if (e !== null && !a(e)) throw new r("Assertion failed: `proto` must be null or an object");
|
|
6798
7020
|
var t = arguments.length < 2 ? [] : arguments[1];
|
|
@@ -6809,8 +7031,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6809
7031
|
c.set(u, e, void 0);
|
|
6810
7032
|
}), u;
|
|
6811
7033
|
};
|
|
6812
|
-
})),
|
|
6813
|
-
var n =
|
|
7034
|
+
})), An = /* @__PURE__ */ t(((e, t) => {
|
|
7035
|
+
var n = Z(), r = Lt(), i = $()("RegExp.prototype.exec"), a = Nt(), o = Rt(), s = Vt();
|
|
6814
7036
|
t.exports = function(e, t) {
|
|
6815
7037
|
if (!r(e)) throw new n("Assertion failed: `R` must be an Object");
|
|
6816
7038
|
if (typeof t != "string") throw new n("Assertion failed: `S` must be a String");
|
|
@@ -6822,8 +7044,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6822
7044
|
}
|
|
6823
7045
|
return i(e, t);
|
|
6824
7046
|
};
|
|
6825
|
-
})),
|
|
6826
|
-
var n =
|
|
7047
|
+
})), jn = /* @__PURE__ */ t(((e, t) => {
|
|
7048
|
+
var n = Z(), r = Lt(), i = It(), a = gn(), o = function() {
|
|
6827
7049
|
try {
|
|
6828
7050
|
return delete 0, !0;
|
|
6829
7051
|
} catch {
|
|
@@ -6844,31 +7066,31 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6844
7066
|
return !1;
|
|
6845
7067
|
}
|
|
6846
7068
|
};
|
|
6847
|
-
})),
|
|
7069
|
+
})), Mn = /* @__PURE__ */ t(((e, t) => {
|
|
6848
7070
|
t.exports = function(e) {
|
|
6849
7071
|
return e === null || typeof e != "function" && typeof e != "object";
|
|
6850
7072
|
};
|
|
6851
|
-
})),
|
|
6852
|
-
var n =
|
|
7073
|
+
})), Nn = /* @__PURE__ */ t(((e, t) => {
|
|
7074
|
+
var n = $(), r = n("Date.prototype.getDay"), i = function(e) {
|
|
6853
7075
|
try {
|
|
6854
7076
|
return r(e), !0;
|
|
6855
7077
|
} catch {
|
|
6856
7078
|
return !1;
|
|
6857
7079
|
}
|
|
6858
|
-
}, a = n("Object.prototype.toString"), o = "[object Date]", s =
|
|
7080
|
+
}, a = n("Object.prototype.toString"), o = "[object Date]", s = Ut()();
|
|
6859
7081
|
t.exports = function(e) {
|
|
6860
7082
|
return typeof e != "object" || !e ? !1 : s ? i(e) : a(e) === o;
|
|
6861
7083
|
};
|
|
6862
|
-
})),
|
|
6863
|
-
var n =
|
|
7084
|
+
})), Pn = /* @__PURE__ */ t(((e, t) => {
|
|
7085
|
+
var n = $(), r = Wt(), i = n("RegExp.prototype.exec"), a = Z();
|
|
6864
7086
|
t.exports = function(e) {
|
|
6865
7087
|
if (!r(e)) throw new a("`regex` must be a RegExp");
|
|
6866
7088
|
return function(t) {
|
|
6867
7089
|
return i(e, t) !== null;
|
|
6868
7090
|
};
|
|
6869
7091
|
};
|
|
6870
|
-
})),
|
|
6871
|
-
var n =
|
|
7092
|
+
})), Fn = /* @__PURE__ */ t(((e, t) => {
|
|
7093
|
+
var n = $(), r = n("Object.prototype.toString"), i = lt()(), a = Pn();
|
|
6872
7094
|
if (i) {
|
|
6873
7095
|
var o = n("Symbol.prototype.toString"), s = a(/^Symbol\(.*\)$/), c = function(e) {
|
|
6874
7096
|
return typeof e.valueOf() == "symbol" ? s(o(e)) : !1;
|
|
@@ -6885,8 +7107,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6885
7107
|
} else t.exports = function(e) {
|
|
6886
7108
|
return !1;
|
|
6887
7109
|
};
|
|
6888
|
-
})),
|
|
6889
|
-
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) {
|
|
6890
7112
|
if (e == null) throw TypeError("Cannot call method on " + e);
|
|
6891
7113
|
if (typeof t != "string" || t !== "number" && t !== "string") throw TypeError("hint must be \"string\" or \"number\"");
|
|
6892
7114
|
var n = t === "string" ? ["toString", "valueOf"] : ["valueOf", "toString"], a, o, s;
|
|
@@ -6911,29 +7133,29 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6911
7133
|
}
|
|
6912
7134
|
return t === "default" && (a(e) || o(e)) && (t = "string"), s(e, t === "default" ? "number" : t);
|
|
6913
7135
|
};
|
|
6914
|
-
})),
|
|
6915
|
-
var n =
|
|
7136
|
+
})), Ln = /* @__PURE__ */ t(((e, t) => {
|
|
7137
|
+
var n = In();
|
|
6916
7138
|
t.exports = function(e) {
|
|
6917
7139
|
return arguments.length > 1 ? n(e, arguments[1]) : n(e);
|
|
6918
7140
|
};
|
|
6919
|
-
})),
|
|
6920
|
-
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]+$/;
|
|
6921
7143
|
t.exports = function() {
|
|
6922
7144
|
return i(i(r(n(this)), o, ""), s, "");
|
|
6923
7145
|
};
|
|
6924
|
-
})),
|
|
6925
|
-
var n =
|
|
7146
|
+
})), zn = /* @__PURE__ */ t(((e, t) => {
|
|
7147
|
+
var n = Rn(), r = "", i = "";
|
|
6926
7148
|
t.exports = function() {
|
|
6927
7149
|
return String.prototype.trim && r.trim() === r && i.trim() === i && ("_" + i).trim() === "_" + i && (i + "_").trim() === i + "_" ? String.prototype.trim : n;
|
|
6928
7150
|
};
|
|
6929
|
-
})),
|
|
6930
|
-
var n = Ct()(), r = St(), i =
|
|
7151
|
+
})), Bn = /* @__PURE__ */ t(((e, t) => {
|
|
7152
|
+
var n = Ct()(), r = St(), i = zn();
|
|
6931
7153
|
t.exports = function() {
|
|
6932
7154
|
var e = i();
|
|
6933
7155
|
return String.prototype.trim !== e && (n ? r(String.prototype, "trim", e, !0) : r(String.prototype, "trim", e)), e;
|
|
6934
7156
|
};
|
|
6935
|
-
})),
|
|
6936
|
-
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) {
|
|
6937
7159
|
return i(e), c(e);
|
|
6938
7160
|
};
|
|
6939
7161
|
r(l, {
|
|
@@ -6941,12 +7163,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6941
7163
|
implementation: a,
|
|
6942
7164
|
shim: s
|
|
6943
7165
|
}), t.exports = l;
|
|
6944
|
-
})),
|
|
6945
|
-
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("[" + [
|
|
6946
7168
|
"
",
|
|
6947
7169
|
"",
|
|
6948
7170
|
""
|
|
6949
|
-
].join("") + "]", "g")), p =
|
|
7171
|
+
].join("") + "]", "g")), p = Vn();
|
|
6950
7172
|
t.exports = function e(t) {
|
|
6951
7173
|
if (typeof t != "string") throw new i("Assertion failed: `argument` is not a String");
|
|
6952
7174
|
if (l(t)) return +a(c(t, 2), 2);
|
|
@@ -6955,40 +7177,40 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6955
7177
|
var n = p(t);
|
|
6956
7178
|
return n === t ? +t : e(n);
|
|
6957
7179
|
};
|
|
6958
|
-
})),
|
|
6959
|
-
var n =
|
|
7180
|
+
})), Un = /* @__PURE__ */ t(((e, t) => {
|
|
7181
|
+
var n = Q(), r = Z(), i = n("%Number%"), a = yn(), o = Ln(), s = Hn();
|
|
6960
7182
|
t.exports = function(e) {
|
|
6961
7183
|
var t = a(e) ? e : o(e, i);
|
|
6962
7184
|
if (typeof t == "symbol") throw new r("Cannot convert a Symbol value to a number");
|
|
6963
7185
|
if (typeof t == "bigint") throw new r("Conversion from 'BigInt' to 'number' is not allowed.");
|
|
6964
7186
|
return typeof t == "string" ? s(t) : +t;
|
|
6965
7187
|
};
|
|
6966
|
-
})),
|
|
7188
|
+
})), Wn = /* @__PURE__ */ t(((e, t) => {
|
|
6967
7189
|
var n = Qe();
|
|
6968
7190
|
t.exports = function(e) {
|
|
6969
7191
|
return typeof e == "bigint" ? e : n(e);
|
|
6970
7192
|
};
|
|
6971
|
-
})),
|
|
6972
|
-
var n =
|
|
7193
|
+
})), Gn = /* @__PURE__ */ t(((e, t) => {
|
|
7194
|
+
var n = Wn(), r = Z();
|
|
6973
7195
|
t.exports = function(e) {
|
|
6974
7196
|
if (typeof e != "number" && typeof e != "bigint") throw new r("argument must be a Number or a BigInt");
|
|
6975
7197
|
var t = e < 0 ? -n(-e) : n(e);
|
|
6976
7198
|
return t === 0 ? 0 : t;
|
|
6977
7199
|
};
|
|
6978
|
-
})),
|
|
6979
|
-
var n =
|
|
7200
|
+
})), Kn = /* @__PURE__ */ t(((e, t) => {
|
|
7201
|
+
var n = Un(), r = Gn(), i = rt(), a = on();
|
|
6980
7202
|
t.exports = function(e) {
|
|
6981
7203
|
var t = n(e);
|
|
6982
7204
|
return i(t) || t === 0 ? 0 : a(t) ? r(t) : t;
|
|
6983
7205
|
};
|
|
6984
|
-
})),
|
|
6985
|
-
var n =
|
|
7206
|
+
})), qn = /* @__PURE__ */ t(((e, t) => {
|
|
7207
|
+
var n = cn(), r = Kn();
|
|
6986
7208
|
t.exports = function(e) {
|
|
6987
7209
|
var t = r(e);
|
|
6988
7210
|
return t <= 0 ? 0 : t > n ? n : t;
|
|
6989
7211
|
};
|
|
6990
|
-
})),
|
|
6991
|
-
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;
|
|
6992
7214
|
t.exports = function(e, t) {
|
|
6993
7215
|
var r = arguments.length > 2 && !!arguments[2] && arguments[2].force, s = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
6994
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");
|
|
@@ -6999,8 +7221,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
6999
7221
|
writable: !1
|
|
7000
7222
|
}) : e[o] = t);
|
|
7001
7223
|
};
|
|
7002
|
-
})),
|
|
7003
|
-
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) {
|
|
7004
7226
|
if (typeof t != "string") throw new i("`S` must be a string");
|
|
7005
7227
|
if (typeof n != "boolean") throw new i("`global` must be a boolean");
|
|
7006
7228
|
if (typeof r != "boolean") throw new i("`fullUnicode` must be a boolean");
|
|
@@ -7018,10 +7240,10 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7018
7240
|
}, !1)), t.exports = function(e, t, n, r) {
|
|
7019
7241
|
return new v(e, t, n, r);
|
|
7020
7242
|
};
|
|
7021
|
-
})), Yn = /* @__PURE__ */ t(((e, t) => {
|
|
7022
|
-
t.exports = Z();
|
|
7023
7243
|
})), Xn = /* @__PURE__ */ t(((e, t) => {
|
|
7024
|
-
|
|
7244
|
+
t.exports = Q();
|
|
7245
|
+
})), Zn = /* @__PURE__ */ t(((e, t) => {
|
|
7246
|
+
var n = Xn()("%Reflect.construct%", !0), r = vn();
|
|
7025
7247
|
try {
|
|
7026
7248
|
r({}, "", { "[[Get]]": function() {} });
|
|
7027
7249
|
} catch {
|
|
@@ -7044,8 +7266,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7044
7266
|
} else t.exports = function(e) {
|
|
7045
7267
|
return typeof e == "function" && !!e.prototype;
|
|
7046
7268
|
};
|
|
7047
|
-
})),
|
|
7048
|
-
var n =
|
|
7269
|
+
})), Qn = /* @__PURE__ */ t(((e, t) => {
|
|
7270
|
+
var n = Q()("%Symbol.species%", !0), r = Z(), i = Lt(), a = Zn();
|
|
7049
7271
|
t.exports = function(e, t) {
|
|
7050
7272
|
if (!i(e)) throw new r("Assertion failed: Type(O) is not Object");
|
|
7051
7273
|
var o = e.constructor;
|
|
@@ -7056,8 +7278,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7056
7278
|
if (a(s)) return s;
|
|
7057
7279
|
throw new r("no constructor found");
|
|
7058
7280
|
};
|
|
7059
|
-
})),
|
|
7060
|
-
var n =
|
|
7281
|
+
})), $n = /* @__PURE__ */ t(((e, t) => {
|
|
7282
|
+
var n = Lt();
|
|
7061
7283
|
t.exports = function(e) {
|
|
7062
7284
|
if (e === null) return "Null";
|
|
7063
7285
|
if (e === void 0) return "Undefined";
|
|
@@ -7066,13 +7288,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7066
7288
|
if (typeof e == "boolean") return "Boolean";
|
|
7067
7289
|
if (typeof e == "string") return "String";
|
|
7068
7290
|
};
|
|
7069
|
-
})),
|
|
7070
|
-
var n =
|
|
7291
|
+
})), er = /* @__PURE__ */ t(((e, t) => {
|
|
7292
|
+
var n = $n();
|
|
7071
7293
|
t.exports = function(e) {
|
|
7072
7294
|
return typeof e == "symbol" ? "Symbol" : typeof e == "bigint" ? "BigInt" : n(e);
|
|
7073
7295
|
};
|
|
7074
|
-
})),
|
|
7075
|
-
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) {
|
|
7076
7298
|
var n, i = "flags" in t ? r(t, "flags") : s(l(t));
|
|
7077
7299
|
return n = g && typeof i == "string" ? new e(t, i) : e === h ? new e(t.source, i) : new e(t, i), {
|
|
7078
7300
|
flags: i,
|
|
@@ -7085,13 +7307,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7085
7307
|
var l = s(e), u = _(a(t, h), t), d = u.flags, f = u.matcher;
|
|
7086
7308
|
return i(f, "lastIndex", o(r(t, "lastIndex")), !0), n(f, l, m(d, "g") > -1, m(d, "u") > -1);
|
|
7087
7309
|
}, "[Symbol.matchAll]", !0);
|
|
7088
|
-
})),
|
|
7089
|
-
var n = lt()(), r =
|
|
7310
|
+
})), nr = /* @__PURE__ */ t(((e, t) => {
|
|
7311
|
+
var n = lt()(), r = tr();
|
|
7090
7312
|
t.exports = function() {
|
|
7091
7313
|
return !n || typeof Symbol.matchAll != "symbol" || typeof RegExp.prototype[Symbol.matchAll] != "function" ? r : RegExp.prototype[Symbol.matchAll];
|
|
7092
7314
|
};
|
|
7093
|
-
})),
|
|
7094
|
-
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) {
|
|
7095
7317
|
var t = h();
|
|
7096
7318
|
if (l && typeof Symbol.matchAll == "symbol") {
|
|
7097
7319
|
var n = i(e, Symbol.matchAll);
|
|
@@ -7112,8 +7334,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7112
7334
|
var l = o(t), d = new p(e, "g");
|
|
7113
7335
|
return n(g(d), d, [l]);
|
|
7114
7336
|
};
|
|
7115
|
-
})),
|
|
7116
|
-
var n =
|
|
7337
|
+
})), ir = /* @__PURE__ */ t(((e, t) => {
|
|
7338
|
+
var n = rr();
|
|
7117
7339
|
t.exports = function() {
|
|
7118
7340
|
if (String.prototype.matchAll) try {
|
|
7119
7341
|
"".matchAll(RegExp.prototype);
|
|
@@ -7122,8 +7344,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7122
7344
|
}
|
|
7123
7345
|
return n;
|
|
7124
7346
|
};
|
|
7125
|
-
})),
|
|
7126
|
-
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;
|
|
7127
7349
|
t.exports = function() {
|
|
7128
7350
|
var e = a();
|
|
7129
7351
|
if (n(String.prototype, { matchAll: e }, { matchAll: function() {
|
|
@@ -7150,15 +7372,15 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7150
7372
|
}
|
|
7151
7373
|
return e;
|
|
7152
7374
|
};
|
|
7153
|
-
})),
|
|
7154
|
-
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);
|
|
7155
7377
|
r(s, {
|
|
7156
7378
|
getPolyfill: a,
|
|
7157
7379
|
implementation: i,
|
|
7158
7380
|
shim: o
|
|
7159
7381
|
}), t.exports = s;
|
|
7160
|
-
})),
|
|
7161
|
-
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 {
|
|
7162
7384
|
get requiresFilesystem() {
|
|
7163
7385
|
return !0;
|
|
7164
7386
|
}
|
|
@@ -7193,7 +7415,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7193
7415
|
}
|
|
7194
7416
|
async runNonInteractive() {}
|
|
7195
7417
|
startRepl(e = {}) {
|
|
7196
|
-
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();
|
|
7197
7419
|
}
|
|
7198
7420
|
run() {
|
|
7199
7421
|
return this.shouldBeInteractive() ? this._launchInteractiveReplLoop() : Promise.resolve(this.runNonInteractive());
|
|
@@ -7268,6 +7490,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7268
7490
|
this._replCursor > 0 && (this._replInput = this._replInput.slice(0, this._replCursor - 1) + this._replInput.slice(this._replCursor), this._replCursor--, this._renderRepl());
|
|
7269
7491
|
return;
|
|
7270
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
|
+
}
|
|
7271
7500
|
if (e === "Delete") {
|
|
7272
7501
|
this._replCursor < this._replInput.length && (this._replInput = this._replInput.slice(0, this._replCursor) + this._replInput.slice(this._replCursor + 1), this._renderRepl());
|
|
7273
7502
|
return;
|
|
@@ -7406,20 +7635,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7406
7635
|
return s;
|
|
7407
7636
|
}
|
|
7408
7637
|
f.createReplWasmCommand = p, f.createCommand = p, t.exports = f;
|
|
7409
|
-
})),
|
|
7410
|
-
|
|
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;
|
|
7411
7641
|
String.prototype.regexIndexOf = function(e, t) {
|
|
7412
7642
|
let n = this.substring(t || 0).search(e);
|
|
7413
7643
|
return n >= 0 ? n + (t || 0) : n;
|
|
7414
|
-
},
|
|
7415
|
-
var
|
|
7644
|
+
}, or().shim();
|
|
7645
|
+
var S = class e extends v {
|
|
7416
7646
|
constructor(e) {
|
|
7417
7647
|
super();
|
|
7418
|
-
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;
|
|
7419
7649
|
if (this.context = new r(Object.assign({}, e, {
|
|
7420
7650
|
clearFn: this.clear.bind(this),
|
|
7421
7651
|
destroyFn: this.destroy.bind(this),
|
|
7422
|
-
onFsChange: typeof
|
|
7652
|
+
onFsChange: typeof p == "function" ? p : null
|
|
7423
7653
|
})), this._readonlyContext = Object.freeze({
|
|
7424
7654
|
getVar: (e) => this.context.getVar(e),
|
|
7425
7655
|
getAlias: (e) => this.context.getAlias(e),
|
|
@@ -7428,10 +7658,21 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7428
7658
|
let e = (o ? "i" : "") + (a ? "c" : "");
|
|
7429
7659
|
e && this.context.setVar("-", e);
|
|
7430
7660
|
}
|
|
7431
|
-
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,
|
|
7432
|
-
|
|
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;
|
|
7433
7674
|
else {
|
|
7434
|
-
this.context.setFilesystem(
|
|
7675
|
+
this.context.setFilesystem(u, d), this.context.setCwd(f);
|
|
7435
7676
|
let e = this.context.fs.exists(this.context.getVar("PATH"));
|
|
7436
7677
|
this._loadDefaultCommands(), this._loadBuiltinCommands(e), this.ready = Promise.resolve(this), s ? this._initializing = !1 : (this._initializing = !0, setTimeout(() => this._init(), 0));
|
|
7437
7678
|
}
|
|
@@ -7447,7 +7688,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7447
7688
|
}
|
|
7448
7689
|
}, o = a();
|
|
7449
7690
|
try {
|
|
7450
|
-
let e = await
|
|
7691
|
+
let e = await g(t, n), s = a(), c = [];
|
|
7451
7692
|
for (let [e, t] of Object.entries(s)) o[e] !== t && typeof t == "function" && c.push(t);
|
|
7452
7693
|
let l = this.context._onFsChange;
|
|
7453
7694
|
this.context._onFsChange = null, this.context.setFilesystem(e.filesystem, e.permissions);
|
|
@@ -7471,9 +7712,18 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7471
7712
|
get lastCode() {
|
|
7472
7713
|
return this._lastCode;
|
|
7473
7714
|
}
|
|
7715
|
+
get stdin() {
|
|
7716
|
+
return this._stdin === void 0 ? this.stdinStream : this._stdin;
|
|
7717
|
+
}
|
|
7474
7718
|
set stdin(e) {
|
|
7475
7719
|
this._stdin = e;
|
|
7476
7720
|
}
|
|
7721
|
+
write(e) {
|
|
7722
|
+
return this.stdinStream.pushData(e), !0;
|
|
7723
|
+
}
|
|
7724
|
+
resize(e, t) {
|
|
7725
|
+
this.setTerminalSize(e, t);
|
|
7726
|
+
}
|
|
7477
7727
|
onInput(e) {
|
|
7478
7728
|
if (this.runningCommand && this.runningCommand.onInput && this.runningCommand.captureInput) return this.runningCommand.onInput(e), !0;
|
|
7479
7729
|
}
|
|
@@ -7481,7 +7731,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7481
7731
|
this._terminalSize = {
|
|
7482
7732
|
cols: e,
|
|
7483
7733
|
rows: t
|
|
7484
|
-
}, 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", {
|
|
7485
7735
|
cols: e,
|
|
7486
7736
|
rows: t
|
|
7487
7737
|
});
|
|
@@ -7493,12 +7743,12 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7493
7743
|
};
|
|
7494
7744
|
}
|
|
7495
7745
|
_loadDefaultCommands() {
|
|
7496
|
-
|
|
7746
|
+
f.forEach((e) => {
|
|
7497
7747
|
this.context.setCommand(e);
|
|
7498
7748
|
});
|
|
7499
7749
|
}
|
|
7500
7750
|
_loadBuiltinCommands(e = !1) {
|
|
7501
|
-
|
|
7751
|
+
d.forEach((e) => {
|
|
7502
7752
|
this.context.setCommand(e);
|
|
7503
7753
|
}), e || this.context.fs.setMode(this.context.getVar("PATH"), 365);
|
|
7504
7754
|
}
|
|
@@ -7572,6 +7822,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7572
7822
|
e && await this.onCommand(`source ${e}`, !1);
|
|
7573
7823
|
}
|
|
7574
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;
|
|
7575
7826
|
let r = this._splitInput(t), i = this._groupPipes(r), a = !0;
|
|
7576
7827
|
this._loadingFs && n && (this._queuedWhileLoading = !0);
|
|
7577
7828
|
let o = this._loadingFs ? Promise.resolve(this._loadingFs) : Promise.resolve(), s = i.reduce((e, { commands: t, op: n }) => e.then(() => {
|
|
@@ -7629,9 +7880,13 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7629
7880
|
this.emit("stdErr", `${r}: Command not found`), this.lastCode = 1, this.emit("exitCode", this.lastCode);
|
|
7630
7881
|
return;
|
|
7631
7882
|
}
|
|
7632
|
-
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) => {
|
|
7633
7884
|
this._emitOutput(e);
|
|
7634
|
-
}),
|
|
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) => {
|
|
7635
7890
|
let t = e.getStdOutput();
|
|
7636
7891
|
if (o) {
|
|
7637
7892
|
let e = this.context.fs.absolutePath(o), n = t.filter((e) => e.type === "out").map((e) => e.string), r = s ? (() => {
|
|
@@ -7662,7 +7917,196 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7662
7917
|
this.destroyed || (this.destroyed = !0, this.emit("status", e.STATUS_DESTROYED), this.emit("exit", t));
|
|
7663
7918
|
}
|
|
7664
7919
|
clear() {
|
|
7665
|
-
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());
|
|
7666
8110
|
}
|
|
7667
8111
|
_splitInput(e) {
|
|
7668
8112
|
let t = e.split("#")[0];
|
|
@@ -7774,7 +8218,7 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7774
8218
|
let n = await this._runAndCapture(e[1]);
|
|
7775
8219
|
t = t.replace(e[0], n);
|
|
7776
8220
|
}
|
|
7777
|
-
let i = t.matchAll(
|
|
8221
|
+
let i = t.matchAll(_), a = i.next();
|
|
7778
8222
|
for (; !a.done;) {
|
|
7779
8223
|
let n = a.value[1] || a.value[2], r = this.context.getVar(n);
|
|
7780
8224
|
t = t.replace(new RegExp(e._escapeRegExp(a.value[0]), "g"), String(r)), a = i.next();
|
|
@@ -7880,8 +8324,8 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7880
8324
|
}
|
|
7881
8325
|
static async create(t = {}) {
|
|
7882
8326
|
let { filesystem: n, permissions: r, ...i } = t;
|
|
7883
|
-
if (
|
|
7884
|
-
let e = await
|
|
8327
|
+
if (h(n) || n && typeof n == "object" && h(n.filesystem)) {
|
|
8328
|
+
let e = await g(n, r);
|
|
7885
8329
|
n = e.filesystem, r = e.permissions;
|
|
7886
8330
|
}
|
|
7887
8331
|
let a = new e(Object.assign({}, i, {
|
|
@@ -7894,9 +8338,9 @@ var j, M, N, P, F, I, L, R, ee, z, B = e((() => {
|
|
|
7894
8338
|
return e.create(Object.assign({}, n, { filesystem: t }));
|
|
7895
8339
|
}
|
|
7896
8340
|
};
|
|
7897
|
-
|
|
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;
|
|
7898
8342
|
}));
|
|
7899
8343
|
//#endregion
|
|
7900
|
-
export default
|
|
8344
|
+
export default cr();
|
|
7901
8345
|
|
|
7902
8346
|
//# sourceMappingURL=shell.es.js.map
|