brsh 2.1.2 → 2.1.4
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/pages.yml +12 -1
- package/CHANGELOG.md +14 -0
- package/Readme.md +191 -3
- package/dist/shell.es.js +809 -606
- package/dist/shell.es.js.map +1 -1
- package/dist/shell.min.js +13 -9
- package/dist/shell.min.js.map +1 -1
- package/dist/terminal.es.js +818 -615
- package/dist/terminal.es.js.map +1 -1
- package/dist/terminal.min.js +16 -12
- package/dist/terminal.min.js.map +1 -1
- package/index.js +81 -8
- package/lib/BaseFileSystem.js +82 -0
- package/lib/Context.js +2 -2
- package/lib/FileSystem.js +64 -27
- package/lib/NodeFileSystem.js +26 -16
- package/lib/Terminal.js +5 -3
- package/lib/builtins/cat.js +4 -1
- package/lib/builtins/echo.js +2 -0
- package/lib/builtins/false.js +1 -1
- package/lib/builtins/grep.js +10 -2
- package/lib/builtins/ls.js +6 -2
- package/lib/builtins/test.js +2 -4
- package/lib/builtins/true.js +1 -1
- package/lib/local/alias.js +2 -0
- package/lib/local/cd.js +5 -3
- package/lib/local/chmod.js +2 -3
- package/lib/local/clear.js +2 -0
- package/lib/local/cp.js +13 -8
- package/lib/local/curl.js +7 -2
- package/lib/local/exit.js +2 -0
- package/lib/local/export.js +2 -0
- package/lib/local/jsfunction.js +1 -1
- package/lib/local/mkdir.js +3 -3
- package/lib/local/mv.js +12 -6
- package/lib/local/pwd.js +2 -0
- package/lib/local/read.js +2 -0
- package/lib/local/rm.js +1 -1
- package/lib/local/source.js +4 -1
- package/lib/local/which.js +2 -0
- package/package.json +6 -4
- package/test/builtins.test.js +11 -0
- package/test/local-commands.test.js +11 -0
- package/test/node-filesystem.test.js +18 -0
- package/test/shell.test.js +42 -0
- package/vite.config.demo.js +35 -0
package/dist/terminal.es.js
CHANGED
|
@@ -1,14 +1,86 @@
|
|
|
1
1
|
//#region \0rolldown/runtime.js
|
|
2
|
-
var e = (e, t) => () => (e && (t = e(e = 0)), t), t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n,
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
var e = (e, t) => () => (e && (t = e(e = 0)), t), t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), n = /* @__PURE__ */ ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (e, t) => (typeof require < "u" ? require : e)[t] }) : e)(function(e) {
|
|
3
|
+
if (typeof require < "u") return require.apply(this, arguments);
|
|
4
|
+
throw Error("Calling `require` for \"" + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
5
|
+
}), r, i = e((() => {
|
|
6
|
+
r = globalThis || self;
|
|
7
|
+
})), a = /* @__PURE__ */ t(((e, t) => {
|
|
8
|
+
var n = new Set([
|
|
9
|
+
"getFileByPath",
|
|
10
|
+
"setFileByPath",
|
|
11
|
+
"deleteFileByPath",
|
|
12
|
+
"exists",
|
|
13
|
+
"stat",
|
|
14
|
+
"absolutePath",
|
|
15
|
+
"getMode",
|
|
16
|
+
"setMode",
|
|
17
|
+
"isReadable",
|
|
18
|
+
"isWritable",
|
|
19
|
+
"isExecutable",
|
|
20
|
+
"getSize",
|
|
21
|
+
"autoComplete",
|
|
22
|
+
"isRealFilesystem",
|
|
23
|
+
"isSymlink"
|
|
24
|
+
]);
|
|
5
25
|
t.exports = class {
|
|
26
|
+
isReadable(e) {
|
|
27
|
+
let t = this.getMode(e);
|
|
28
|
+
return t === null ? !1 : (t & 256) != 0;
|
|
29
|
+
}
|
|
30
|
+
isWritable(e) {
|
|
31
|
+
let t = this.getMode(e);
|
|
32
|
+
return t === null ? !1 : (t & 128) != 0;
|
|
33
|
+
}
|
|
34
|
+
isExecutable(e) {
|
|
35
|
+
let t = this.getMode(e);
|
|
36
|
+
return t === null ? !1 : (t & 64) != 0;
|
|
37
|
+
}
|
|
38
|
+
sandbox() {
|
|
39
|
+
let e = this;
|
|
40
|
+
return new Proxy(Object.create(null), {
|
|
41
|
+
get(t, r) {
|
|
42
|
+
if (!n.has(r)) return;
|
|
43
|
+
let i = e[r];
|
|
44
|
+
return typeof i == "function" ? i.bind(e) : i;
|
|
45
|
+
},
|
|
46
|
+
set() {
|
|
47
|
+
return !1;
|
|
48
|
+
},
|
|
49
|
+
has(e, t) {
|
|
50
|
+
return n.has(t);
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
_triggerChange() {
|
|
55
|
+
!this._onChange || this._changeScheduled || (this._changeScheduled = !0, Promise.resolve().then(() => {
|
|
56
|
+
this._changeScheduled = !1, typeof this._onChange == "function" && this._onChange(this.getRaw(), this.getRawPermissions());
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
})), o = /* @__PURE__ */ t(((e, t) => {
|
|
61
|
+
var n = a();
|
|
62
|
+
t.exports = class extends n {
|
|
6
63
|
constructor(e = "/", t = {}, n = {}, r = null) {
|
|
7
|
-
this.fileSystem = t, this.permissions = Object.assign({}, n), this.cwd = e, this._onChange = r, this._changeScheduled = !1;
|
|
64
|
+
super(), this.fileSystem = t, this.permissions = Object.assign({}, n), this.cwd = e, this._onChange = r, this._changeScheduled = !1;
|
|
8
65
|
}
|
|
9
66
|
getFileByPath(e) {
|
|
67
|
+
let t = this._getFileByAbsolutePath(this._pathToAbsolute(e));
|
|
68
|
+
return t == null || !this.isReadable(e) ? null : t;
|
|
69
|
+
}
|
|
70
|
+
_getFileRaw(e) {
|
|
10
71
|
return this._getFileByAbsolutePath(this._pathToAbsolute(e));
|
|
11
72
|
}
|
|
73
|
+
exists(e) {
|
|
74
|
+
return this._getFileByAbsolutePath(this._pathToAbsolute(e)) != null;
|
|
75
|
+
}
|
|
76
|
+
stat(e) {
|
|
77
|
+
let t = this._getFileByAbsolutePath(this._pathToAbsolute(e));
|
|
78
|
+
return t == null ? null : {
|
|
79
|
+
isDirectory: t.constructor === Object,
|
|
80
|
+
isFile: typeof t == "string",
|
|
81
|
+
isCommand: typeof t == "function"
|
|
82
|
+
};
|
|
83
|
+
}
|
|
12
84
|
_pathToAbsolute(e) {
|
|
13
85
|
return e.startsWith("./") && (e = e.substring(2)), e.startsWith("/") || (e = this.cwd + e), this._traverseComplexAbsolutePath(e);
|
|
14
86
|
}
|
|
@@ -24,6 +96,18 @@ var e = (e, t) => () => (e && (t = e(e = 0)), t), t = (e, t) => () => (t || (e((
|
|
|
24
96
|
return this._pathToAbsolute(e);
|
|
25
97
|
}
|
|
26
98
|
setFileByPath(e, t, n = !1) {
|
|
99
|
+
let r = this._pathToAbsolute(e);
|
|
100
|
+
if (this._getFileByAbsolutePath(r) != null) {
|
|
101
|
+
if (!this.isWritable(e)) throw Error("Permission denied");
|
|
102
|
+
} else {
|
|
103
|
+
let e = r.split("/");
|
|
104
|
+
e.pop();
|
|
105
|
+
let t = e.join("/") || "/", n = this.getMode(t);
|
|
106
|
+
if (n !== null && !(n & 128)) throw Error("Permission denied");
|
|
107
|
+
}
|
|
108
|
+
this._setFileByAbsolutePath(r, t, n), this._triggerChange();
|
|
109
|
+
}
|
|
110
|
+
_setFileRaw(e, t, n = !1) {
|
|
27
111
|
let r = this._pathToAbsolute(e);
|
|
28
112
|
this._setFileByAbsolutePath(r, t, n), this._triggerChange();
|
|
29
113
|
}
|
|
@@ -44,11 +128,14 @@ var e = (e, t) => () => (e && (t = e(e = 0)), t), t = (e, t) => () => (t || (e((
|
|
|
44
128
|
return t.shift(), t[t.length - 1].length < 1 && t.pop(), t.reduce((e, t) => e && e[t] ? e[t] : null, this.fileSystem);
|
|
45
129
|
}
|
|
46
130
|
deleteFileByPath(e) {
|
|
47
|
-
let t = this._pathToAbsolute(e);
|
|
131
|
+
let t = this._pathToAbsolute(e), n = t.split("/");
|
|
132
|
+
n.pop();
|
|
133
|
+
let r = n.join("/") || "/", i = this.getMode(r);
|
|
134
|
+
if (i !== null && !(i & 128)) throw Error(`${e}: Permission denied`);
|
|
48
135
|
this._deleteByAbsolutePath(t);
|
|
49
|
-
let
|
|
136
|
+
let a = t + "/";
|
|
50
137
|
Object.keys(this.permissions).forEach((e) => {
|
|
51
|
-
(e === t || e.startsWith(
|
|
138
|
+
(e === t || e.startsWith(a)) && delete this.permissions[e];
|
|
52
139
|
}), this._triggerChange();
|
|
53
140
|
}
|
|
54
141
|
_deleteByAbsolutePath(e) {
|
|
@@ -63,16 +150,12 @@ var e = (e, t) => () => (e && (t = e(e = 0)), t), t = (e, t) => () => (t || (e((
|
|
|
63
150
|
let t = this._pathToAbsolute(e);
|
|
64
151
|
if (this.permissions[t] !== void 0) return this.permissions[t];
|
|
65
152
|
let n = this._getFileByAbsolutePath(t);
|
|
66
|
-
return n == null ? null : n.constructor === Object
|
|
153
|
+
return n == null ? null : n.constructor === Object ? 493 : typeof n == "function" ? 365 : 420;
|
|
67
154
|
}
|
|
68
155
|
setMode(e, t) {
|
|
69
156
|
let n = this._pathToAbsolute(e);
|
|
70
157
|
this.permissions[n] = t, this._triggerChange();
|
|
71
158
|
}
|
|
72
|
-
isExecutable(e) {
|
|
73
|
-
let t = this.getMode(e);
|
|
74
|
-
return t === null ? !1 : (t & 64) != 0;
|
|
75
|
-
}
|
|
76
159
|
getSize(e) {
|
|
77
160
|
let t = this._pathToAbsolute(e), n = this._getFileByAbsolutePath(t);
|
|
78
161
|
return n == null ? 0 : n.constructor === Object ? JSON.stringify(n).length : n.toString().length;
|
|
@@ -86,16 +169,13 @@ var e = (e, t) => () => (e && (t = e(e = 0)), t), t = (e, t) => () => (t || (e((
|
|
|
86
169
|
getRaw() {
|
|
87
170
|
return this.fileSystem;
|
|
88
171
|
}
|
|
89
|
-
getRawPermissions() {
|
|
90
|
-
return Object.assign({}, this.permissions);
|
|
91
|
-
}
|
|
92
172
|
addFiles(e) {
|
|
93
173
|
Object.entries(e).forEach(([e, t]) => {
|
|
94
|
-
this.
|
|
174
|
+
this._setFileRaw(e, t, !0);
|
|
95
175
|
});
|
|
96
176
|
}
|
|
97
177
|
autoComplete(e, t) {
|
|
98
|
-
let n = this._pathToAbsolute(e).split("/"), r = n.pop(), i = this.
|
|
178
|
+
let n = this._pathToAbsolute(e).split("/"), r = n.pop(), i = this._getFileRaw(n.length > 1 ? n.join("/") : "/"), a = this._getFileRaw(t);
|
|
99
179
|
if (i && i.constructor === Object) {
|
|
100
180
|
let t = Object.keys(i).filter((e) => e.startsWith(r));
|
|
101
181
|
r.length < 1 && (t = t.filter((e) => !e.startsWith(".")));
|
|
@@ -109,101 +189,96 @@ var e = (e, t) => () => (e && (t = e(e = 0)), t), t = (e, t) => () => (t || (e((
|
|
|
109
189
|
}
|
|
110
190
|
return null;
|
|
111
191
|
}
|
|
112
|
-
_triggerChange() {
|
|
113
|
-
!this._onChange || this._changeScheduled || (this._changeScheduled = !0, Promise.resolve().then(() => {
|
|
114
|
-
this._changeScheduled = !1, typeof this._onChange == "function" && this._onChange(this.getRaw(), this.getRawPermissions());
|
|
115
|
-
}));
|
|
116
|
-
}
|
|
117
192
|
};
|
|
118
193
|
}));
|
|
119
194
|
//#endregion
|
|
120
195
|
//#region node_modules/vite-plugin-node-polyfills/shims/process/dist/index.js
|
|
121
|
-
function
|
|
196
|
+
function s(e) {
|
|
122
197
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
123
198
|
}
|
|
124
|
-
function
|
|
199
|
+
function c() {
|
|
125
200
|
throw Error("setTimeout has not been defined");
|
|
126
201
|
}
|
|
127
|
-
function
|
|
202
|
+
function l() {
|
|
128
203
|
throw Error("clearTimeout has not been defined");
|
|
129
204
|
}
|
|
130
|
-
function
|
|
131
|
-
if (
|
|
132
|
-
if ((
|
|
205
|
+
function u(e) {
|
|
206
|
+
if (v === setTimeout) return setTimeout(e, 0);
|
|
207
|
+
if ((v === c || !v) && setTimeout) return v = setTimeout, setTimeout(e, 0);
|
|
133
208
|
try {
|
|
134
|
-
return
|
|
209
|
+
return v(e, 0);
|
|
135
210
|
} catch {
|
|
136
211
|
try {
|
|
137
|
-
return
|
|
212
|
+
return v.call(null, e, 0);
|
|
138
213
|
} catch {
|
|
139
|
-
return
|
|
214
|
+
return v.call(this, e, 0);
|
|
140
215
|
}
|
|
141
216
|
}
|
|
142
217
|
}
|
|
143
|
-
function
|
|
144
|
-
if (
|
|
145
|
-
if ((
|
|
218
|
+
function d(e) {
|
|
219
|
+
if (y === clearTimeout) return clearTimeout(e);
|
|
220
|
+
if ((y === l || !y) && clearTimeout) return y = clearTimeout, clearTimeout(e);
|
|
146
221
|
try {
|
|
147
|
-
return
|
|
222
|
+
return y(e);
|
|
148
223
|
} catch {
|
|
149
224
|
try {
|
|
150
|
-
return
|
|
225
|
+
return y.call(null, e);
|
|
151
226
|
} catch {
|
|
152
|
-
return
|
|
227
|
+
return y.call(this, e);
|
|
153
228
|
}
|
|
154
229
|
}
|
|
155
230
|
}
|
|
156
|
-
function
|
|
157
|
-
!
|
|
231
|
+
function f() {
|
|
232
|
+
!x || !S || (x = !1, S.length ? b = S.concat(b) : C = -1, b.length && p());
|
|
158
233
|
}
|
|
159
|
-
function
|
|
160
|
-
if (!
|
|
161
|
-
var e =
|
|
162
|
-
|
|
163
|
-
for (var t =
|
|
164
|
-
for (
|
|
165
|
-
|
|
166
|
-
}
|
|
167
|
-
|
|
234
|
+
function p() {
|
|
235
|
+
if (!x) {
|
|
236
|
+
var e = u(f);
|
|
237
|
+
x = !0;
|
|
238
|
+
for (var t = b.length; t;) {
|
|
239
|
+
for (S = b, b = []; ++C < t;) S && S[C].run();
|
|
240
|
+
C = -1, t = b.length;
|
|
241
|
+
}
|
|
242
|
+
S = null, x = !1, d(e);
|
|
168
243
|
}
|
|
169
244
|
}
|
|
170
|
-
function
|
|
245
|
+
function m(e, t) {
|
|
171
246
|
this.fun = e, this.array = t;
|
|
172
247
|
}
|
|
173
|
-
function
|
|
174
|
-
var
|
|
175
|
-
|
|
248
|
+
function h() {}
|
|
249
|
+
var g, _, v, y, b, x, S, C, w, T, E = e((() => {
|
|
250
|
+
g = { exports: {} }, _ = g.exports = {}, (function() {
|
|
176
251
|
try {
|
|
177
|
-
|
|
252
|
+
v = typeof setTimeout == "function" ? setTimeout : c;
|
|
178
253
|
} catch {
|
|
179
|
-
|
|
254
|
+
v = c;
|
|
180
255
|
}
|
|
181
256
|
try {
|
|
182
|
-
|
|
257
|
+
y = typeof clearTimeout == "function" ? clearTimeout : l;
|
|
183
258
|
} catch {
|
|
184
|
-
|
|
259
|
+
y = l;
|
|
185
260
|
}
|
|
186
|
-
})(),
|
|
261
|
+
})(), b = [], x = !1, C = -1, _.nextTick = function(e) {
|
|
187
262
|
var t = Array(arguments.length - 1);
|
|
188
263
|
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
189
|
-
|
|
190
|
-
},
|
|
264
|
+
b.push(new m(e, t)), b.length === 1 && !x && u(p);
|
|
265
|
+
}, m.prototype.run = function() {
|
|
191
266
|
this.fun.apply(null, this.array);
|
|
192
|
-
},
|
|
267
|
+
}, _.title = "browser", _.browser = !0, _.env = {}, _.argv = [], _.version = "", _.versions = {}, _.on = h, _.addListener = h, _.once = h, _.off = h, _.removeListener = h, _.removeAllListeners = h, _.emit = h, _.prependListener = h, _.prependOnceListener = h, _.listeners = function(e) {
|
|
193
268
|
return [];
|
|
194
|
-
},
|
|
269
|
+
}, _.binding = function(e) {
|
|
195
270
|
throw Error("process.binding is not supported");
|
|
196
|
-
},
|
|
271
|
+
}, _.cwd = function() {
|
|
197
272
|
return "/";
|
|
198
|
-
},
|
|
273
|
+
}, _.chdir = function(e) {
|
|
199
274
|
throw Error("process.chdir is not supported");
|
|
200
|
-
},
|
|
275
|
+
}, _.umask = function() {
|
|
201
276
|
return 0;
|
|
202
|
-
},
|
|
203
|
-
})),
|
|
277
|
+
}, w = g.exports, T = /* @__PURE__ */ s(w);
|
|
278
|
+
})), D = /* @__PURE__ */ t(((e, t) => {
|
|
204
279
|
t.exports = null;
|
|
205
|
-
})),
|
|
206
|
-
|
|
280
|
+
})), O = /* @__PURE__ */ t(((e, t) => {
|
|
281
|
+
E();
|
|
207
282
|
function n(e) {
|
|
208
283
|
if (typeof e != "string") throw TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
209
284
|
}
|
|
@@ -241,7 +316,7 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
241
316
|
resolve: function() {
|
|
242
317
|
for (var e = "", t = !1, i, a = arguments.length - 1; a >= -1 && !t; a--) {
|
|
243
318
|
var o;
|
|
244
|
-
a >= 0 ? o = arguments[a] : (i === void 0 && (i =
|
|
319
|
+
a >= 0 ? o = arguments[a] : (i === void 0 && (i = T.cwd()), o = i), n(o), o.length !== 0 && (e = o + "/" + e, t = o.charCodeAt(0) === 47);
|
|
245
320
|
}
|
|
246
321
|
return e = r(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
247
322
|
},
|
|
@@ -370,12 +445,11 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
370
445
|
posix: null
|
|
371
446
|
};
|
|
372
447
|
a.posix = a, t.exports = a;
|
|
373
|
-
})),
|
|
374
|
-
|
|
375
|
-
var n =
|
|
376
|
-
t.exports = class {
|
|
448
|
+
})), k = /* @__PURE__ */ t(((e, t) => {
|
|
449
|
+
E();
|
|
450
|
+
var n = D(), r = O(), i = a(), o = class extends i {
|
|
377
451
|
constructor(e, t = null) {
|
|
378
|
-
this._onChange = t, this._changeScheduled = !1, this._virtualFiles = {}, this.cwd = this._normalizeCwd(e ||
|
|
452
|
+
super(), this._onChange = t, this._changeScheduled = !1, this._virtualFiles = {}, this.cwd = this._normalizeCwd(e || T.cwd());
|
|
379
453
|
}
|
|
380
454
|
get isRealFilesystem() {
|
|
381
455
|
return !0;
|
|
@@ -458,10 +532,6 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
458
532
|
let r = this.absolutePath(e);
|
|
459
533
|
this._virtualFiles[r] === void 0 && (n.chmodSync(r, t), this._triggerChange());
|
|
460
534
|
}
|
|
461
|
-
isExecutable(e) {
|
|
462
|
-
let t = this.getMode(e);
|
|
463
|
-
return t === null ? !1 : (t & 64) != 0;
|
|
464
|
-
}
|
|
465
535
|
getSize(e) {
|
|
466
536
|
let t = this.absolutePath(e);
|
|
467
537
|
if (this._virtualFiles[t] !== void 0) return 0;
|
|
@@ -535,14 +605,43 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
535
605
|
})
|
|
536
606
|
};
|
|
537
607
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
608
|
+
_getFileRaw(e) {
|
|
609
|
+
return this.getFileByPath(e);
|
|
610
|
+
}
|
|
611
|
+
exists(e) {
|
|
612
|
+
let t = this.absolutePath(e);
|
|
613
|
+
if (this._virtualFiles[t] !== void 0) return !0;
|
|
614
|
+
try {
|
|
615
|
+
return n.statSync(t), !0;
|
|
616
|
+
} catch {
|
|
617
|
+
return !1;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
stat(e) {
|
|
621
|
+
let t = this.absolutePath(e);
|
|
622
|
+
if (this._virtualFiles[t] !== void 0) {
|
|
623
|
+
let e = this._virtualFiles[t];
|
|
624
|
+
return {
|
|
625
|
+
isDirectory: e != null && e.constructor === Object,
|
|
626
|
+
isFile: typeof e == "string",
|
|
627
|
+
isCommand: typeof e == "function"
|
|
628
|
+
};
|
|
629
|
+
}
|
|
630
|
+
try {
|
|
631
|
+
let e = n.statSync(t);
|
|
632
|
+
return {
|
|
633
|
+
isDirectory: e.isDirectory(),
|
|
634
|
+
isFile: e.isFile(),
|
|
635
|
+
isCommand: !1
|
|
636
|
+
};
|
|
637
|
+
} catch {
|
|
638
|
+
return null;
|
|
639
|
+
}
|
|
542
640
|
}
|
|
543
641
|
};
|
|
544
|
-
|
|
545
|
-
|
|
642
|
+
t.exports = o, t.exports = o;
|
|
643
|
+
})), A = /* @__PURE__ */ t(((e, t) => {
|
|
644
|
+
var n = o();
|
|
546
645
|
t.exports = class {
|
|
547
646
|
constructor(e) {
|
|
548
647
|
this.options = e;
|
|
@@ -573,14 +672,14 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
573
672
|
}
|
|
574
673
|
getCommand(e) {
|
|
575
674
|
let t = `${this.getVar("PATH")}/${e}`;
|
|
576
|
-
return this.fs.
|
|
675
|
+
return this.fs._getFileRaw(t) || null;
|
|
577
676
|
}
|
|
578
677
|
setNodeFilesystem(e) {
|
|
579
|
-
let t =
|
|
678
|
+
let t = k(), n = this.fs._onChange;
|
|
580
679
|
this.fs = new t(e, n);
|
|
581
680
|
}
|
|
582
681
|
setFilesystem(e, t = {}) {
|
|
583
|
-
let r = this.fs.
|
|
682
|
+
let r = this.fs._getFileRaw(this.getVar("PATH")) || {}, i = this.fs.getRawPermissions(), a = this.fs._onChange;
|
|
584
683
|
this.fs = new n(this.fs.cwd, e, Object.assign({}, i, t), a), this.fs.addFiles(r);
|
|
585
684
|
}
|
|
586
685
|
setCwd(e) {
|
|
@@ -596,7 +695,7 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
596
695
|
typeof this._destroyFn == "function" && this._destroyFn(e);
|
|
597
696
|
}
|
|
598
697
|
};
|
|
599
|
-
})),
|
|
698
|
+
})), j = /* @__PURE__ */ t(((e, t) => {
|
|
600
699
|
var n = typeof Reflect == "object" ? Reflect : null, r = n && typeof n.apply == "function" ? n.apply : function(e, t, n) {
|
|
601
700
|
return Function.prototype.apply.call(e, t, n);
|
|
602
701
|
}, i = n && typeof n.ownKeys == "function" ? n.ownKeys : Object.getOwnPropertySymbols ? function(e) {
|
|
@@ -771,7 +870,7 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
771
870
|
});
|
|
772
871
|
else throw TypeError("The \"emitter\" argument must be of type EventEmitter. Received type " + typeof e);
|
|
773
872
|
}
|
|
774
|
-
})),
|
|
873
|
+
})), M = /* @__PURE__ */ t(((e, t) => {
|
|
775
874
|
var n = ["out", "err"];
|
|
776
875
|
t.exports = class {
|
|
777
876
|
constructor(e, t) {
|
|
@@ -779,8 +878,8 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
779
878
|
this.type = e, this.string = t;
|
|
780
879
|
}
|
|
781
880
|
};
|
|
782
|
-
})),
|
|
783
|
-
var n =
|
|
881
|
+
})), N = /* @__PURE__ */ t(((e, t) => {
|
|
882
|
+
var n = M();
|
|
784
883
|
t.exports = class {
|
|
785
884
|
constructor(e = [], t = 0) {
|
|
786
885
|
if (typeof t != "number") throw Error("Command Result ExitCode must be a number");
|
|
@@ -804,8 +903,8 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
804
903
|
return this.std = [], e;
|
|
805
904
|
}
|
|
806
905
|
};
|
|
807
|
-
})),
|
|
808
|
-
var n =
|
|
906
|
+
})), P = /* @__PURE__ */ t(((e, t) => {
|
|
907
|
+
var n = j(), r = N(), i = n.EventEmitter || n.default || n;
|
|
809
908
|
t.exports = class extends i {
|
|
810
909
|
constructor(e) {
|
|
811
910
|
super(), this.arguments = e, this.result = new r();
|
|
@@ -833,17 +932,17 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
833
932
|
console.log("flush now"), this.emit("flush", this.result.flush());
|
|
834
933
|
}
|
|
835
934
|
};
|
|
836
|
-
})),
|
|
837
|
-
var n =
|
|
935
|
+
})), F = /* @__PURE__ */ t(((e, t) => {
|
|
936
|
+
var n = P();
|
|
838
937
|
t.exports = class extends n {
|
|
839
938
|
constructor(e, t) {
|
|
840
939
|
super(e), this.context = t;
|
|
841
940
|
}
|
|
842
941
|
};
|
|
843
|
-
})),
|
|
844
|
-
|
|
845
|
-
var
|
|
846
|
-
t.exports = class extends
|
|
942
|
+
})), I = /* @__PURE__ */ t(((e, t) => {
|
|
943
|
+
i();
|
|
944
|
+
var n = F();
|
|
945
|
+
t.exports = class extends n {
|
|
847
946
|
constructor(e, t, n, r = !1) {
|
|
848
947
|
super(t, n), this.script = e, this.source = r;
|
|
849
948
|
}
|
|
@@ -852,14 +951,14 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
852
951
|
filesystem: this.context.fs.getRaw(),
|
|
853
952
|
permissions: this.context.fs.getRawPermissions()
|
|
854
953
|
};
|
|
855
|
-
this.sandbox = new
|
|
954
|
+
this.sandbox = new r.shell({
|
|
856
955
|
cwd: this.context.fs.cwd,
|
|
857
956
|
...e
|
|
858
957
|
}), this.sandbox.context.source(this.context), this.sandbox.on("stdOut", (e) => this.stdOut = e), this.sandbox.on("stdErr", (e) => this.stdErr = e);
|
|
859
958
|
let t = this.script.split(/\r?\n/);
|
|
860
959
|
if (!t[0].startsWith("#!")) return Promise.reject("no interpreter set");
|
|
861
|
-
let
|
|
862
|
-
return this._executeNodes(
|
|
960
|
+
let n = this._parseLines(t.slice(1));
|
|
961
|
+
return this._executeNodes(n).then(() => {
|
|
863
962
|
this.exitCode = this.sandbox.lastCode, this.source && this.context.source(this.sandbox.context);
|
|
864
963
|
});
|
|
865
964
|
}
|
|
@@ -987,7 +1086,7 @@ var m, h, g, _, v, y, b, x, S, C, w = e((() => {
|
|
|
987
1086
|
}));
|
|
988
1087
|
//#endregion
|
|
989
1088
|
//#region node_modules/vite-plugin-node-polyfills/shims/buffer/dist/index.js
|
|
990
|
-
function
|
|
1089
|
+
function L(e) {
|
|
991
1090
|
var t = e.length;
|
|
992
1091
|
if (t % 4 > 0) throw Error("Invalid string. Length must be a multiple of 4");
|
|
993
1092
|
var n = e.indexOf("=");
|
|
@@ -995,32 +1094,32 @@ function F(e) {
|
|
|
995
1094
|
var r = n === t ? 0 : 4 - n % 4;
|
|
996
1095
|
return [n, r];
|
|
997
1096
|
}
|
|
998
|
-
function
|
|
999
|
-
var t =
|
|
1097
|
+
function ee(e) {
|
|
1098
|
+
var t = L(e), n = t[0], r = t[1];
|
|
1000
1099
|
return (n + r) * 3 / 4 - r;
|
|
1001
1100
|
}
|
|
1002
|
-
function
|
|
1101
|
+
function te(e, t, n) {
|
|
1003
1102
|
return (t + n) * 3 / 4 - n;
|
|
1004
1103
|
}
|
|
1005
|
-
function ee(e) {
|
|
1006
|
-
var t, n = F(e), r = n[0], i = n[1], a = new te(L(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
|
|
1007
|
-
for (c = 0; c < s; c += 4) t = W[e.charCodeAt(c)] << 18 | W[e.charCodeAt(c + 1)] << 12 | W[e.charCodeAt(c + 2)] << 6 | W[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
1008
|
-
return i === 2 && (t = W[e.charCodeAt(c)] << 2 | W[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = W[e.charCodeAt(c)] << 10 | W[e.charCodeAt(c + 1)] << 4 | W[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
1009
|
-
}
|
|
1010
1104
|
function R(e) {
|
|
1011
|
-
|
|
1105
|
+
var t, n = L(e), r = n[0], i = n[1], a = new W(te(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
|
|
1106
|
+
for (c = 0; c < s; c += 4) t = U[e.charCodeAt(c)] << 18 | U[e.charCodeAt(c + 1)] << 12 | U[e.charCodeAt(c + 2)] << 6 | U[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
|
|
1107
|
+
return i === 2 && (t = U[e.charCodeAt(c)] << 2 | U[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = U[e.charCodeAt(c)] << 10 | U[e.charCodeAt(c + 1)] << 4 | U[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
|
|
1012
1108
|
}
|
|
1013
|
-
function z(e
|
|
1014
|
-
|
|
1109
|
+
function z(e) {
|
|
1110
|
+
return H[e >> 18 & 63] + H[e >> 12 & 63] + H[e >> 6 & 63] + H[e & 63];
|
|
1111
|
+
}
|
|
1112
|
+
function ne(e, t, n) {
|
|
1113
|
+
for (var r, i = [], a = t; a < n; a += 3) r = (e[a] << 16 & 16711680) + (e[a + 1] << 8 & 65280) + (e[a + 2] & 255), i.push(z(r));
|
|
1015
1114
|
return i.join("");
|
|
1016
1115
|
}
|
|
1017
1116
|
function B(e) {
|
|
1018
|
-
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(
|
|
1019
|
-
return r === 1 ? (t = e[n - 1], i.push(
|
|
1117
|
+
for (var t, n = e.length, r = n % 3, i = [], a = 16383, o = 0, s = n - r; o < s; o += a) i.push(ne(e, o, o + a > s ? s : o + a));
|
|
1118
|
+
return r === 1 ? (t = e[n - 1], i.push(H[t >> 2] + H[t << 4 & 63] + "==")) : r === 2 && (t = (e[n - 2] << 8) + e[n - 1], i.push(H[t >> 10] + H[t >> 4 & 63] + H[t << 2 & 63] + "=")), i.join("");
|
|
1020
1119
|
}
|
|
1021
|
-
var V, H, U, W,
|
|
1022
|
-
for (V = {},
|
|
1023
|
-
|
|
1120
|
+
var V, re, H, U, W, ie, G, ae, oe, se, K = e((() => {
|
|
1121
|
+
for (V = {}, re = {}, re.byteLength = ee, re.toByteArray = R, re.fromByteArray = B, H = [], U = [], W = typeof Uint8Array < "u" ? Uint8Array : Array, ie = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", G = 0, ae = ie.length; G < ae; ++G) H[G] = ie[G], U[ie.charCodeAt(G)] = G;
|
|
1122
|
+
U[45] = 62, U[95] = 63, oe = {}, oe.read = function(e, t, n, r, i) {
|
|
1024
1123
|
var a, o, s = i * 8 - r - 1, c = (1 << s) - 1, l = c >> 1, u = -7, d = n ? i - 1 : 0, f = n ? -1 : 1, p = e[t + d];
|
|
1025
1124
|
for (d += f, a = p & (1 << -u) - 1, p >>= -u, u += s; u > 0; a = a * 256 + e[t + d], d += f, u -= 8);
|
|
1026
1125
|
for (o = a & (1 << -u) - 1, a >>= -u, u += r; u > 0; o = o * 256 + e[t + d], d += f, u -= 8);
|
|
@@ -1028,13 +1127,13 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1028
1127
|
else if (a === c) return o ? NaN : (p ? -1 : 1) * Infinity;
|
|
1029
1128
|
else o += 2 ** r, a -= l;
|
|
1030
1129
|
return (p ? -1 : 1) * o * 2 ** (a - r);
|
|
1031
|
-
},
|
|
1130
|
+
}, oe.write = function(e, t, n, r, i, a) {
|
|
1032
1131
|
var o, s, c, l = a * 8 - i - 1, u = (1 << l) - 1, d = u >> 1, f = i === 23 ? 2 ** -24 - 2 ** -77 : 0, p = r ? 0 : a - 1, m = r ? 1 : -1, h = +(t < 0 || t === 0 && 1 / t < 0);
|
|
1033
1132
|
for (t = Math.abs(t), isNaN(t) || t === Infinity ? (s = +!!isNaN(t), o = u) : (o = Math.floor(Math.log(t) / Math.LN2), t * (c = 2 ** -o) < 1 && (o--, c *= 2), o + d >= 1 ? t += f / c : t += f * 2 ** (1 - d), t * c >= 2 && (o++, c /= 2), o + d >= u ? (s = 0, o = u) : o + d >= 1 ? (s = (t * c - 1) * 2 ** i, o += d) : (s = t * 2 ** (d - 1) * 2 ** i, o = 0)); i >= 8; e[n + p] = s & 255, p += m, s /= 256, i -= 8);
|
|
1034
1133
|
for (o = o << i | s, l += i; l > 0; e[n + p] = o & 255, p += m, o /= 256, l -= 8);
|
|
1035
1134
|
e[n + p - m] |= h * 128;
|
|
1036
1135
|
}, (function(e) {
|
|
1037
|
-
let t =
|
|
1136
|
+
let t = re, n = oe, r = typeof Symbol == "function" && typeof Symbol.for == "function" ? Symbol.for("nodejs.util.inspect.custom") : null;
|
|
1038
1137
|
e.Buffer = u, e.SlowBuffer = x, e.INSPECT_MAX_BYTES = 50;
|
|
1039
1138
|
let i = 2147483647;
|
|
1040
1139
|
e.kMaxLength = i;
|
|
@@ -1226,7 +1325,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1226
1325
|
case "ucs2":
|
|
1227
1326
|
case "ucs-2":
|
|
1228
1327
|
case "utf16le":
|
|
1229
|
-
case "utf-16le": return
|
|
1328
|
+
case "utf-16le": return te(this, t, n);
|
|
1230
1329
|
default:
|
|
1231
1330
|
if (r) throw TypeError("Unknown encoding: " + e);
|
|
1232
1331
|
e = (e + "").toLowerCase(), r = !0;
|
|
@@ -1429,7 +1528,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1429
1528
|
for (let r = t; r < n; ++r) i += ge[e[r]];
|
|
1430
1529
|
return i;
|
|
1431
1530
|
}
|
|
1432
|
-
function
|
|
1531
|
+
function te(e, t, n) {
|
|
1433
1532
|
let r = e.slice(t, n), i = "";
|
|
1434
1533
|
for (let e = 0; e < r.length - 1; e += 2) i += String.fromCharCode(r[e] + r[e + 1] * 256);
|
|
1435
1534
|
return i;
|
|
@@ -1440,30 +1539,30 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1440
1539
|
let r = this.subarray(e, t);
|
|
1441
1540
|
return Object.setPrototypeOf(r, u.prototype), r;
|
|
1442
1541
|
};
|
|
1443
|
-
function
|
|
1542
|
+
function R(e, t, n) {
|
|
1444
1543
|
if (e % 1 != 0 || e < 0) throw RangeError("offset is not uint");
|
|
1445
1544
|
if (e + t > n) throw RangeError("Trying to access beyond buffer length");
|
|
1446
1545
|
}
|
|
1447
1546
|
u.prototype.readUintLE = u.prototype.readUIntLE = function(e, t, n) {
|
|
1448
|
-
e >>>= 0, t >>>= 0, n ||
|
|
1547
|
+
e >>>= 0, t >>>= 0, n || R(e, t, this.length);
|
|
1449
1548
|
let r = this[e], i = 1, a = 0;
|
|
1450
1549
|
for (; ++a < t && (i *= 256);) r += this[e + a] * i;
|
|
1451
1550
|
return r;
|
|
1452
1551
|
}, u.prototype.readUintBE = u.prototype.readUIntBE = function(e, t, n) {
|
|
1453
|
-
e >>>= 0, t >>>= 0, n ||
|
|
1552
|
+
e >>>= 0, t >>>= 0, n || R(e, t, this.length);
|
|
1454
1553
|
let r = this[e + --t], i = 1;
|
|
1455
1554
|
for (; t > 0 && (i *= 256);) r += this[e + --t] * i;
|
|
1456
1555
|
return r;
|
|
1457
1556
|
}, u.prototype.readUint8 = u.prototype.readUInt8 = function(e, t) {
|
|
1458
|
-
return e >>>= 0, t ||
|
|
1557
|
+
return e >>>= 0, t || R(e, 1, this.length), this[e];
|
|
1459
1558
|
}, u.prototype.readUint16LE = u.prototype.readUInt16LE = function(e, t) {
|
|
1460
|
-
return e >>>= 0, t ||
|
|
1559
|
+
return e >>>= 0, t || R(e, 2, this.length), this[e] | this[e + 1] << 8;
|
|
1461
1560
|
}, u.prototype.readUint16BE = u.prototype.readUInt16BE = function(e, t) {
|
|
1462
|
-
return e >>>= 0, t ||
|
|
1561
|
+
return e >>>= 0, t || R(e, 2, this.length), this[e] << 8 | this[e + 1];
|
|
1463
1562
|
}, u.prototype.readUint32LE = u.prototype.readUInt32LE = function(e, t) {
|
|
1464
|
-
return e >>>= 0, t ||
|
|
1563
|
+
return e >>>= 0, t || R(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
1465
1564
|
}, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(e, t) {
|
|
1466
|
-
return e >>>= 0, t ||
|
|
1565
|
+
return e >>>= 0, t || R(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
1467
1566
|
}, u.prototype.readBigUInt64LE = Y(function(e) {
|
|
1468
1567
|
e >>>= 0, K(e, "offset");
|
|
1469
1568
|
let t = this[e], n = this[e + 7];
|
|
@@ -1477,29 +1576,29 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1477
1576
|
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;
|
|
1478
1577
|
return (BigInt(r) << BigInt(32)) + BigInt(i);
|
|
1479
1578
|
}), u.prototype.readIntLE = function(e, t, n) {
|
|
1480
|
-
e >>>= 0, t >>>= 0, n ||
|
|
1579
|
+
e >>>= 0, t >>>= 0, n || R(e, t, this.length);
|
|
1481
1580
|
let r = this[e], i = 1, a = 0;
|
|
1482
1581
|
for (; ++a < t && (i *= 256);) r += this[e + a] * i;
|
|
1483
1582
|
return i *= 128, r >= i && (r -= 2 ** (8 * t)), r;
|
|
1484
1583
|
}, u.prototype.readIntBE = function(e, t, n) {
|
|
1485
|
-
e >>>= 0, t >>>= 0, n ||
|
|
1584
|
+
e >>>= 0, t >>>= 0, n || R(e, t, this.length);
|
|
1486
1585
|
let r = t, i = 1, a = this[e + --r];
|
|
1487
1586
|
for (; r > 0 && (i *= 256);) a += this[e + --r] * i;
|
|
1488
1587
|
return i *= 128, a >= i && (a -= 2 ** (8 * t)), a;
|
|
1489
1588
|
}, u.prototype.readInt8 = function(e, t) {
|
|
1490
|
-
return e >>>= 0, t ||
|
|
1589
|
+
return e >>>= 0, t || R(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
|
|
1491
1590
|
}, u.prototype.readInt16LE = function(e, t) {
|
|
1492
|
-
e >>>= 0, t ||
|
|
1591
|
+
e >>>= 0, t || R(e, 2, this.length);
|
|
1493
1592
|
let n = this[e] | this[e + 1] << 8;
|
|
1494
1593
|
return n & 32768 ? n | 4294901760 : n;
|
|
1495
1594
|
}, u.prototype.readInt16BE = function(e, t) {
|
|
1496
|
-
e >>>= 0, t ||
|
|
1595
|
+
e >>>= 0, t || R(e, 2, this.length);
|
|
1497
1596
|
let n = this[e + 1] | this[e] << 8;
|
|
1498
1597
|
return n & 32768 ? n | 4294901760 : n;
|
|
1499
1598
|
}, u.prototype.readInt32LE = function(e, t) {
|
|
1500
|
-
return e >>>= 0, t ||
|
|
1599
|
+
return e >>>= 0, t || R(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
1501
1600
|
}, u.prototype.readInt32BE = function(e, t) {
|
|
1502
|
-
return e >>>= 0, t ||
|
|
1601
|
+
return e >>>= 0, t || R(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
1503
1602
|
}, u.prototype.readBigInt64LE = Y(function(e) {
|
|
1504
1603
|
e >>>= 0, K(e, "offset");
|
|
1505
1604
|
let t = this[e], n = this[e + 7];
|
|
@@ -1513,15 +1612,15 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1513
1612
|
let r = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
|
|
1514
1613
|
return (BigInt(r) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n);
|
|
1515
1614
|
}), u.prototype.readFloatLE = function(e, t) {
|
|
1516
|
-
return e >>>= 0, t ||
|
|
1615
|
+
return e >>>= 0, t || R(e, 4, this.length), n.read(this, e, !0, 23, 4);
|
|
1517
1616
|
}, u.prototype.readFloatBE = function(e, t) {
|
|
1518
|
-
return e >>>= 0, t ||
|
|
1617
|
+
return e >>>= 0, t || R(e, 4, this.length), n.read(this, e, !1, 23, 4);
|
|
1519
1618
|
}, u.prototype.readDoubleLE = function(e, t) {
|
|
1520
|
-
return e >>>= 0, t ||
|
|
1619
|
+
return e >>>= 0, t || R(e, 8, this.length), n.read(this, e, !0, 52, 8);
|
|
1521
1620
|
}, u.prototype.readDoubleBE = function(e, t) {
|
|
1522
|
-
return e >>>= 0, t ||
|
|
1621
|
+
return e >>>= 0, t || R(e, 8, this.length), n.read(this, e, !1, 52, 8);
|
|
1523
1622
|
};
|
|
1524
|
-
function
|
|
1623
|
+
function z(e, t, n, r, i, a) {
|
|
1525
1624
|
if (!u.isBuffer(e)) throw TypeError("\"buffer\" argument must be a Buffer instance");
|
|
1526
1625
|
if (t > i || t < a) throw RangeError("\"value\" argument is out of bounds");
|
|
1527
1626
|
if (n + r > e.length) throw RangeError("Index out of range");
|
|
@@ -1529,7 +1628,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1529
1628
|
u.prototype.writeUintLE = u.prototype.writeUIntLE = function(e, t, n, r) {
|
|
1530
1629
|
if (e = +e, t >>>= 0, n >>>= 0, !r) {
|
|
1531
1630
|
let r = 2 ** (8 * n) - 1;
|
|
1532
|
-
|
|
1631
|
+
z(this, e, t, n, r, 0);
|
|
1533
1632
|
}
|
|
1534
1633
|
let i = 1, a = 0;
|
|
1535
1634
|
for (this[t] = e & 255; ++a < n && (i *= 256);) this[t + a] = e / i & 255;
|
|
@@ -1537,30 +1636,30 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1537
1636
|
}, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(e, t, n, r) {
|
|
1538
1637
|
if (e = +e, t >>>= 0, n >>>= 0, !r) {
|
|
1539
1638
|
let r = 2 ** (8 * n) - 1;
|
|
1540
|
-
|
|
1639
|
+
z(this, e, t, n, r, 0);
|
|
1541
1640
|
}
|
|
1542
1641
|
let i = n - 1, a = 1;
|
|
1543
1642
|
for (this[t + i] = e & 255; --i >= 0 && (a *= 256);) this[t + i] = e / a & 255;
|
|
1544
1643
|
return t + n;
|
|
1545
1644
|
}, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(e, t, n) {
|
|
1546
|
-
return e = +e, t >>>= 0, n ||
|
|
1645
|
+
return e = +e, t >>>= 0, n || z(this, e, t, 1, 255, 0), this[t] = e & 255, t + 1;
|
|
1547
1646
|
}, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(e, t, n) {
|
|
1548
|
-
return e = +e, t >>>= 0, n ||
|
|
1647
|
+
return e = +e, t >>>= 0, n || z(this, e, t, 2, 65535, 0), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
1549
1648
|
}, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(e, t, n) {
|
|
1550
|
-
return e = +e, t >>>= 0, n ||
|
|
1649
|
+
return e = +e, t >>>= 0, n || z(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
1551
1650
|
}, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(e, t, n) {
|
|
1552
|
-
return e = +e, t >>>= 0, n ||
|
|
1651
|
+
return e = +e, t >>>= 0, n || z(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255, t + 4;
|
|
1553
1652
|
}, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(e, t, n) {
|
|
1554
|
-
return e = +e, t >>>= 0, n ||
|
|
1653
|
+
return e = +e, t >>>= 0, n || z(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;
|
|
1555
1654
|
};
|
|
1556
|
-
function
|
|
1655
|
+
function ne(e, t, n, r, i) {
|
|
1557
1656
|
se(t, r, i, e, n, 7);
|
|
1558
1657
|
let a = Number(t & BigInt(4294967295));
|
|
1559
1658
|
e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a;
|
|
1560
1659
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
1561
1660
|
return e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, n;
|
|
1562
1661
|
}
|
|
1563
|
-
function
|
|
1662
|
+
function B(e, t, n, r, i) {
|
|
1564
1663
|
se(t, r, i, e, n, 7);
|
|
1565
1664
|
let a = Number(t & BigInt(4294967295));
|
|
1566
1665
|
e[n + 7] = a, a >>= 8, e[n + 6] = a, a >>= 8, e[n + 5] = a, a >>= 8, e[n + 4] = a;
|
|
@@ -1568,13 +1667,13 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1568
1667
|
return e[n + 3] = o, o >>= 8, e[n + 2] = o, o >>= 8, e[n + 1] = o, o >>= 8, e[n] = o, n + 8;
|
|
1569
1668
|
}
|
|
1570
1669
|
u.prototype.writeBigUInt64LE = Y(function(e, t = 0) {
|
|
1571
|
-
return
|
|
1670
|
+
return ne(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1572
1671
|
}), u.prototype.writeBigUInt64BE = Y(function(e, t = 0) {
|
|
1573
|
-
return
|
|
1672
|
+
return B(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
1574
1673
|
}), u.prototype.writeIntLE = function(e, t, n, r) {
|
|
1575
1674
|
if (e = +e, t >>>= 0, !r) {
|
|
1576
1675
|
let r = 2 ** (8 * n - 1);
|
|
1577
|
-
|
|
1676
|
+
z(this, e, t, n, r - 1, -r);
|
|
1578
1677
|
}
|
|
1579
1678
|
let i = 0, a = 1, o = 0;
|
|
1580
1679
|
for (this[t] = e & 255; ++i < n && (a *= 256);) e < 0 && o === 0 && this[t + i - 1] !== 0 && (o = 1), this[t + i] = (e / a >> 0) - o & 255;
|
|
@@ -1582,44 +1681,44 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1582
1681
|
}, u.prototype.writeIntBE = function(e, t, n, r) {
|
|
1583
1682
|
if (e = +e, t >>>= 0, !r) {
|
|
1584
1683
|
let r = 2 ** (8 * n - 1);
|
|
1585
|
-
|
|
1684
|
+
z(this, e, t, n, r - 1, -r);
|
|
1586
1685
|
}
|
|
1587
1686
|
let i = n - 1, a = 1, o = 0;
|
|
1588
1687
|
for (this[t + i] = e & 255; --i >= 0 && (a *= 256);) e < 0 && o === 0 && this[t + i + 1] !== 0 && (o = 1), this[t + i] = (e / a >> 0) - o & 255;
|
|
1589
1688
|
return t + n;
|
|
1590
1689
|
}, u.prototype.writeInt8 = function(e, t, n) {
|
|
1591
|
-
return e = +e, t >>>= 0, n ||
|
|
1690
|
+
return e = +e, t >>>= 0, n || z(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
|
|
1592
1691
|
}, u.prototype.writeInt16LE = function(e, t, n) {
|
|
1593
|
-
return e = +e, t >>>= 0, n ||
|
|
1692
|
+
return e = +e, t >>>= 0, n || z(this, e, t, 2, 32767, -32768), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
1594
1693
|
}, u.prototype.writeInt16BE = function(e, t, n) {
|
|
1595
|
-
return e = +e, t >>>= 0, n ||
|
|
1694
|
+
return e = +e, t >>>= 0, n || z(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
1596
1695
|
}, u.prototype.writeInt32LE = function(e, t, n) {
|
|
1597
|
-
return e = +e, t >>>= 0, n ||
|
|
1696
|
+
return e = +e, t >>>= 0, n || z(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;
|
|
1598
1697
|
}, u.prototype.writeInt32BE = function(e, t, n) {
|
|
1599
|
-
return e = +e, t >>>= 0, n ||
|
|
1698
|
+
return e = +e, t >>>= 0, n || z(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;
|
|
1600
1699
|
}, u.prototype.writeBigInt64LE = Y(function(e, t = 0) {
|
|
1601
|
-
return
|
|
1700
|
+
return ne(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1602
1701
|
}), u.prototype.writeBigInt64BE = Y(function(e, t = 0) {
|
|
1603
|
-
return
|
|
1702
|
+
return B(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
1604
1703
|
});
|
|
1605
|
-
function
|
|
1704
|
+
function V(e, t, n, r, i, a) {
|
|
1606
1705
|
if (n + r > e.length || n < 0) throw RangeError("Index out of range");
|
|
1607
1706
|
}
|
|
1608
|
-
function
|
|
1609
|
-
return t = +t, r >>>= 0, a ||
|
|
1707
|
+
function H(e, t, r, i, a) {
|
|
1708
|
+
return t = +t, r >>>= 0, a || V(e, t, r, 4), n.write(e, t, r, i, 23, 4), r + 4;
|
|
1610
1709
|
}
|
|
1611
1710
|
u.prototype.writeFloatLE = function(e, t, n) {
|
|
1612
|
-
return
|
|
1711
|
+
return H(this, e, t, !0, n);
|
|
1613
1712
|
}, u.prototype.writeFloatBE = function(e, t, n) {
|
|
1614
|
-
return
|
|
1713
|
+
return H(this, e, t, !1, n);
|
|
1615
1714
|
};
|
|
1616
|
-
function
|
|
1617
|
-
return t = +t, r >>>= 0, a ||
|
|
1715
|
+
function U(e, t, r, i, a) {
|
|
1716
|
+
return t = +t, r >>>= 0, a || V(e, t, r, 8), n.write(e, t, r, i, 52, 8), r + 8;
|
|
1618
1717
|
}
|
|
1619
1718
|
u.prototype.writeDoubleLE = function(e, t, n) {
|
|
1620
|
-
return
|
|
1719
|
+
return U(this, e, t, !0, n);
|
|
1621
1720
|
}, u.prototype.writeDoubleBE = function(e, t, n) {
|
|
1622
|
-
return
|
|
1721
|
+
return U(this, e, t, !1, n);
|
|
1623
1722
|
}, u.prototype.copy = function(e, t, n, r) {
|
|
1624
1723
|
if (!u.isBuffer(e)) throw TypeError("argument should be a Buffer");
|
|
1625
1724
|
if (n ||= 0, !r && r !== 0 && (r = this.length), t >= e.length && (t = e.length), t ||= 0, r > 0 && r < n && (r = n), r === n || e.length === 0 || this.length === 0) return 0;
|
|
@@ -1650,9 +1749,9 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1650
1749
|
}
|
|
1651
1750
|
return this;
|
|
1652
1751
|
};
|
|
1653
|
-
let
|
|
1654
|
-
function
|
|
1655
|
-
|
|
1752
|
+
let W = {};
|
|
1753
|
+
function ie(e, t, n) {
|
|
1754
|
+
W[e] = class extends n {
|
|
1656
1755
|
constructor() {
|
|
1657
1756
|
super(), Object.defineProperty(this, "message", {
|
|
1658
1757
|
value: t.apply(this, arguments),
|
|
@@ -1676,34 +1775,34 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1676
1775
|
}
|
|
1677
1776
|
};
|
|
1678
1777
|
}
|
|
1679
|
-
|
|
1778
|
+
ie("ERR_BUFFER_OUT_OF_BOUNDS", function(e) {
|
|
1680
1779
|
return e ? `${e} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
1681
|
-
}, RangeError),
|
|
1780
|
+
}, RangeError), ie("ERR_INVALID_ARG_TYPE", function(e, t) {
|
|
1682
1781
|
return `The "${e}" argument must be of type number. Received type ${typeof t}`;
|
|
1683
|
-
}, TypeError),
|
|
1782
|
+
}, TypeError), ie("ERR_OUT_OF_RANGE", function(e, t, n) {
|
|
1684
1783
|
let r = `The value of "${e}" is out of range.`, i = n;
|
|
1685
|
-
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i =
|
|
1784
|
+
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i = G(String(n)) : typeof n == "bigint" && (i = String(n), (n > BigInt(2) ** BigInt(32) || n < -(BigInt(2) ** BigInt(32))) && (i = G(i)), i += "n"), r += ` It must be ${t}. Received ${i}`, r;
|
|
1686
1785
|
}, RangeError);
|
|
1687
|
-
function
|
|
1786
|
+
function G(e) {
|
|
1688
1787
|
let t = "", n = e.length, r = +(e[0] === "-");
|
|
1689
1788
|
for (; n >= r + 4; n -= 3) t = `_${e.slice(n - 3, n)}${t}`;
|
|
1690
1789
|
return `${e.slice(0, n)}${t}`;
|
|
1691
1790
|
}
|
|
1692
|
-
function
|
|
1791
|
+
function ae(e, t, n) {
|
|
1693
1792
|
K(t, "offset"), (e[t] === void 0 || e[t + n] === void 0) && q(t, e.length - (n + 1));
|
|
1694
1793
|
}
|
|
1695
1794
|
function se(e, t, n, r, i, a) {
|
|
1696
1795
|
if (e > n || e < t) {
|
|
1697
1796
|
let r = typeof t == "bigint" ? "n" : "", i;
|
|
1698
|
-
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
|
|
1797
|
+
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);
|
|
1699
1798
|
}
|
|
1700
|
-
|
|
1799
|
+
ae(r, i, a);
|
|
1701
1800
|
}
|
|
1702
1801
|
function K(e, t) {
|
|
1703
|
-
if (typeof e != "number") throw new
|
|
1802
|
+
if (typeof e != "number") throw new W.ERR_INVALID_ARG_TYPE(t, "number", e);
|
|
1704
1803
|
}
|
|
1705
1804
|
function q(e, t, n) {
|
|
1706
|
-
throw Math.floor(e) === e ? t < 0 ? new
|
|
1805
|
+
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) : (K(e, n), new W.ERR_OUT_OF_RANGE(n || "offset", "an integer", e));
|
|
1707
1806
|
}
|
|
1708
1807
|
let ce = /[^+/0-9A-Za-z-_]/g;
|
|
1709
1808
|
function le(e) {
|
|
@@ -1787,10 +1886,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1787
1886
|
function _e() {
|
|
1788
1887
|
throw Error("BigInt not supported");
|
|
1789
1888
|
}
|
|
1790
|
-
})(V),
|
|
1791
|
-
})),
|
|
1792
|
-
|
|
1793
|
-
var n =
|
|
1889
|
+
})(V), se = V.Buffer, V.Blob, V.BlobOptions, V.Buffer, V.File, V.FileOptions, V.INSPECT_MAX_BYTES, V.SlowBuffer, V.TranscodeEncoding, V.atob, V.btoa, V.constants, V.isAscii, V.isUtf8, V.kMaxLength, V.kStringMaxLength, V.resolveObjectURL, V.transcode;
|
|
1890
|
+
})), q = /* @__PURE__ */ t(((e, t) => {
|
|
1891
|
+
K();
|
|
1892
|
+
var n = I();
|
|
1794
1893
|
t.exports = class extends n {
|
|
1795
1894
|
get name() {
|
|
1796
1895
|
return "wasm";
|
|
@@ -1801,7 +1900,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1801
1900
|
run() {
|
|
1802
1901
|
let e = this.script, t = (() => {
|
|
1803
1902
|
try {
|
|
1804
|
-
return
|
|
1903
|
+
return D();
|
|
1805
1904
|
} catch {
|
|
1806
1905
|
return null;
|
|
1807
1906
|
}
|
|
@@ -1833,7 +1932,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1833
1932
|
}
|
|
1834
1933
|
_contentToBytes(e) {
|
|
1835
1934
|
if (e instanceof Uint8Array) return e;
|
|
1836
|
-
if (
|
|
1935
|
+
if (se !== void 0 && se.isBuffer(e)) return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
|
|
1837
1936
|
if (e instanceof ArrayBuffer) return new Uint8Array(e);
|
|
1838
1937
|
let t = new Uint8Array(e.length);
|
|
1839
1938
|
for (let n = 0; n < e.length; n++) t[n] = e.charCodeAt(n) & 255;
|
|
@@ -1987,9 +2086,9 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
1987
2086
|
a();
|
|
1988
2087
|
}
|
|
1989
2088
|
};
|
|
1990
|
-
})),
|
|
1991
|
-
var n =
|
|
1992
|
-
get name() {
|
|
2089
|
+
})), ce = /* @__PURE__ */ t(((e, t) => {
|
|
2090
|
+
var n = P(), r = class extends n {
|
|
2091
|
+
static get name() {
|
|
1993
2092
|
return "test";
|
|
1994
2093
|
}
|
|
1995
2094
|
get requiresFilesystem() {
|
|
@@ -2063,18 +2162,21 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2063
2162
|
}
|
|
2064
2163
|
return !1;
|
|
2065
2164
|
}
|
|
2066
|
-
}, i = class extends r {
|
|
2067
|
-
get name() {
|
|
2068
|
-
return "[";
|
|
2069
|
-
}
|
|
2070
2165
|
};
|
|
2071
|
-
|
|
2166
|
+
t.exports = {
|
|
2072
2167
|
Test: r,
|
|
2073
|
-
TestBracket:
|
|
2168
|
+
TestBracket: class extends r {
|
|
2169
|
+
static get name() {
|
|
2170
|
+
return "[";
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2074
2173
|
};
|
|
2075
|
-
})),
|
|
2076
|
-
var n =
|
|
2174
|
+
})), le = /* @__PURE__ */ t(((e, t) => {
|
|
2175
|
+
var n = P();
|
|
2077
2176
|
t.exports = class extends n {
|
|
2177
|
+
static get name() {
|
|
2178
|
+
return "cat";
|
|
2179
|
+
}
|
|
2078
2180
|
get requiresFilesystem() {
|
|
2079
2181
|
return !0;
|
|
2080
2182
|
}
|
|
@@ -2093,7 +2195,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2093
2195
|
continue;
|
|
2094
2196
|
}
|
|
2095
2197
|
let t = this.fs.getFileByPath(e);
|
|
2096
|
-
if (t == null)
|
|
2198
|
+
if (t == null) {
|
|
2199
|
+
let t = this.fs.exists(e) ? "Permission denied" : "No such file or directory";
|
|
2200
|
+
return this.stdErr = `${e}: ${t}`, this.exitCode = 1, Promise.resolve();
|
|
2201
|
+
}
|
|
2097
2202
|
if (t.constructor === Object) return this.stdErr = `${e}: Is a directory`, this.exitCode = 1, Promise.resolve();
|
|
2098
2203
|
i.push(t.toString());
|
|
2099
2204
|
}
|
|
@@ -2107,7 +2212,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2107
2212
|
return o.forEach((e) => this.stdOut = e), Promise.resolve();
|
|
2108
2213
|
}
|
|
2109
2214
|
};
|
|
2110
|
-
})),
|
|
2215
|
+
})), ue = /* @__PURE__ */ t(((e, t) => {
|
|
2111
2216
|
function n(e) {
|
|
2112
2217
|
return typeof e == "object" && !!e;
|
|
2113
2218
|
}
|
|
@@ -2118,7 +2223,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2118
2223
|
return Array.isArray(e) ? e : e === void 0 ? [] : r(e) || e instanceof Set ? Array.from(e) : [e];
|
|
2119
2224
|
}
|
|
2120
2225
|
t.exports = i;
|
|
2121
|
-
})),
|
|
2226
|
+
})), de = /* @__PURE__ */ t(((e, t) => {
|
|
2122
2227
|
function n(e, t, ...n) {
|
|
2123
2228
|
let r = [];
|
|
2124
2229
|
if (!Array.isArray(e)) throw Error("Input must be an array");
|
|
@@ -2138,7 +2243,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2138
2243
|
return e;
|
|
2139
2244
|
}
|
|
2140
2245
|
t.exports = n;
|
|
2141
|
-
})),
|
|
2246
|
+
})), fe = /* @__PURE__ */ t(((e) => {
|
|
2142
2247
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2143
2248
|
function t(e) {
|
|
2144
2249
|
return !isNaN(parseFloat(e));
|
|
@@ -2217,23 +2322,23 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2217
2322
|
isFunction: h,
|
|
2218
2323
|
isAsyncFunction: g
|
|
2219
2324
|
}, 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;
|
|
2220
|
-
})),
|
|
2221
|
-
|
|
2222
|
-
var
|
|
2325
|
+
})), pe = /* @__PURE__ */ t(((e, t) => {
|
|
2326
|
+
i();
|
|
2327
|
+
var n = Infinity, a = "[object Symbol]", o = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, s = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, c = "\\ud800-\\udfff", l = "\\u0300-\\u036f\\ufe20-\\ufe23", u = "\\u20d0-\\u20f0", d = "\\u2700-\\u27bf", f = "a-z\\xdf-\\xf6\\xf8-\\xff", p = "\\xac\\xb1\\xd7\\xf7", m = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", h = "\\u2000-\\u206f", g = " \\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", _ = "A-Z\\xc0-\\xd6\\xd8-\\xde", v = "\\ufe0e\\ufe0f", y = p + m + h + g, b = "['’]", x = "[" + c + "]", S = "[" + y + "]", C = "[" + l + u + "]", w = "\\d+", T = "[" + d + "]", E = "[" + f + "]", D = "[^" + c + y + w + d + f + _ + "]", O = "\\ud83c[\\udffb-\\udfff]", k = "(?:" + C + "|" + O + ")", A = "[^" + c + "]", j = "(?:\\ud83c[\\udde6-\\uddff]){2}", M = "[\\ud800-\\udbff][\\udc00-\\udfff]", N = "[" + _ + "]", P = "\\u200d", F = "(?:" + E + "|" + D + ")", I = "(?:" + N + "|" + D + ")", L = "(?:" + b + "(?:d|ll|m|re|s|t|ve))?", ee = "(?:" + b + "(?:D|LL|M|RE|S|T|VE))?", te = k + "?", R = "[" + v + "]?", z = "(?:" + P + "(?:" + [
|
|
2223
2328
|
A,
|
|
2224
2329
|
j,
|
|
2225
2330
|
M
|
|
2226
|
-
].join("|") + ")" +
|
|
2331
|
+
].join("|") + ")" + R + te + ")*", ne = R + te + z, B = "(?:" + [
|
|
2227
2332
|
T,
|
|
2228
2333
|
j,
|
|
2229
2334
|
M
|
|
2230
|
-
].join("|") + ")" +
|
|
2335
|
+
].join("|") + ")" + ne, V = "(?:" + [
|
|
2231
2336
|
A + C + "?",
|
|
2232
2337
|
C,
|
|
2233
2338
|
j,
|
|
2234
2339
|
M,
|
|
2235
2340
|
x
|
|
2236
|
-
].join("|") + ")",
|
|
2341
|
+
].join("|") + ")", re = RegExp(b, "g"), H = RegExp(C, "g"), U = RegExp(O + "(?=" + O + ")|" + V + ne, "g"), W = RegExp([
|
|
2237
2342
|
N + "?" + E + "+" + L + "(?=" + [
|
|
2238
2343
|
S,
|
|
2239
2344
|
N,
|
|
@@ -2247,8 +2352,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2247
2352
|
N + "?" + F + "+" + L,
|
|
2248
2353
|
N + "+" + ee,
|
|
2249
2354
|
w,
|
|
2250
|
-
|
|
2251
|
-
].join("|"), "g"),
|
|
2355
|
+
B
|
|
2356
|
+
].join("|"), "g"), ie = RegExp("[" + P + c + l + u + v + "]"), G = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, ae = {
|
|
2252
2357
|
À: "A",
|
|
2253
2358
|
Á: "A",
|
|
2254
2359
|
Â: "A",
|
|
@@ -2439,7 +2544,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2439
2544
|
œ: "oe",
|
|
2440
2545
|
ʼn: "'n",
|
|
2441
2546
|
ſ: "ss"
|
|
2442
|
-
}, oe = typeof
|
|
2547
|
+
}, oe = typeof r == "object" && r && r.Object === Object && r, se = typeof self == "object" && self && self.Object === Object && self, K = oe || se || Function("return this")();
|
|
2443
2548
|
function q(e, t, n, r) {
|
|
2444
2549
|
var i = -1, a = e ? e.length : 0;
|
|
2445
2550
|
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
@@ -2458,19 +2563,19 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2458
2563
|
}
|
|
2459
2564
|
var de = ue(ae);
|
|
2460
2565
|
function fe(e) {
|
|
2461
|
-
return
|
|
2566
|
+
return ie.test(e);
|
|
2462
2567
|
}
|
|
2463
2568
|
function pe(e) {
|
|
2464
|
-
return
|
|
2569
|
+
return G.test(e);
|
|
2465
2570
|
}
|
|
2466
2571
|
function me(e) {
|
|
2467
2572
|
return fe(e) ? J(e) : ce(e);
|
|
2468
2573
|
}
|
|
2469
2574
|
function J(e) {
|
|
2470
|
-
return e.match(
|
|
2575
|
+
return e.match(U) || [];
|
|
2471
2576
|
}
|
|
2472
2577
|
function he(e) {
|
|
2473
|
-
return e.match(
|
|
2578
|
+
return e.match(W) || [];
|
|
2474
2579
|
}
|
|
2475
2580
|
var ge = Object.prototype.toString, Y = K.Symbol, _e = Y ? Y.prototype : void 0, ve = _e ? _e.toString : void 0;
|
|
2476
2581
|
function ye(e, t, n) {
|
|
@@ -2483,7 +2588,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2483
2588
|
if (typeof e == "string") return e;
|
|
2484
2589
|
if (Te(e)) return ve ? ve.call(e) : "";
|
|
2485
2590
|
var t = e + "";
|
|
2486
|
-
return t == "0" && 1 / e == -
|
|
2591
|
+
return t == "0" && 1 / e == -n ? "-0" : t;
|
|
2487
2592
|
}
|
|
2488
2593
|
function xe(e, t, n) {
|
|
2489
2594
|
var r = e.length;
|
|
@@ -2498,7 +2603,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2498
2603
|
}
|
|
2499
2604
|
function Ce(e) {
|
|
2500
2605
|
return function(t) {
|
|
2501
|
-
return q(je(ke(t).replace(
|
|
2606
|
+
return q(je(ke(t).replace(re, "")), e, "");
|
|
2502
2607
|
};
|
|
2503
2608
|
}
|
|
2504
2609
|
function we(e) {
|
|
@@ -2517,26 +2622,26 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2517
2622
|
return Ae(Ee(e).toLowerCase());
|
|
2518
2623
|
}
|
|
2519
2624
|
function ke(e) {
|
|
2520
|
-
return e = Ee(e), e && e.replace(s, de).replace(
|
|
2625
|
+
return e = Ee(e), e && e.replace(s, de).replace(H, "");
|
|
2521
2626
|
}
|
|
2522
2627
|
var Ae = Se("toUpperCase");
|
|
2523
2628
|
function je(e, t, n) {
|
|
2524
2629
|
return e = Ee(e), t = n ? void 0 : t, t === void 0 ? pe(e) ? he(e) : le(e) : e.match(t) || [];
|
|
2525
2630
|
}
|
|
2526
2631
|
t.exports = De;
|
|
2527
|
-
})),
|
|
2528
|
-
|
|
2529
|
-
var n =
|
|
2632
|
+
})), me = /* @__PURE__ */ t(((e, t) => {
|
|
2633
|
+
E();
|
|
2634
|
+
var n = ue(), r = de(), i = fe(), a = pe(), o = {
|
|
2530
2635
|
short: /^-([^\d-])$/,
|
|
2531
2636
|
long: /^--(\S+)/,
|
|
2532
2637
|
combinedShort: /^-[^\d-]{2,}$/,
|
|
2533
2638
|
optEquals: /^(--\S+?)=(.*)/
|
|
2534
2639
|
}, s = class extends Array {
|
|
2535
2640
|
load(e) {
|
|
2536
|
-
if (this.clear(), e && e !==
|
|
2641
|
+
if (this.clear(), e && e !== T.argv) e = n(e);
|
|
2537
2642
|
else {
|
|
2538
|
-
e =
|
|
2539
|
-
let t =
|
|
2643
|
+
e = T.argv.slice(0);
|
|
2644
|
+
let t = T.execArgv.some(m) ? 1 : 2;
|
|
2540
2645
|
e.splice(0, t);
|
|
2541
2646
|
}
|
|
2542
2647
|
e.forEach((e) => this.push(String(e)));
|
|
@@ -2724,16 +2829,16 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2724
2829
|
i.isDefined(this.definition.defaultValue) ? this.definition.isMultiple() ? x.set(this, n(this.definition.defaultValue).slice()) : x.set(this, this.definition.defaultValue) : this.definition.isMultiple() ? x.set(this, []) : x.set(this, null), this.state = "default";
|
|
2725
2830
|
}
|
|
2726
2831
|
static create(e) {
|
|
2727
|
-
return e = new h(e), e.isBoolean() ?
|
|
2832
|
+
return e = new h(e), e.isBoolean() ? C.create(e) : new this(e);
|
|
2728
2833
|
}
|
|
2729
|
-
},
|
|
2834
|
+
}, C = class extends S {
|
|
2730
2835
|
set(e) {
|
|
2731
2836
|
super.set(!0);
|
|
2732
2837
|
}
|
|
2733
2838
|
static create(e) {
|
|
2734
2839
|
return new this(e);
|
|
2735
2840
|
}
|
|
2736
|
-
},
|
|
2841
|
+
}, w = class extends Map {
|
|
2737
2842
|
constructor(e) {
|
|
2738
2843
|
super(), this.definitions = g.from(e), this.set("_unknown", S.create({
|
|
2739
2844
|
name: "_unknown",
|
|
@@ -2750,7 +2855,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2750
2855
|
}
|
|
2751
2856
|
return e.skipUnknown && delete t._unknown, t;
|
|
2752
2857
|
}
|
|
2753
|
-
}, D = class extends
|
|
2858
|
+
}, D = class extends w {
|
|
2754
2859
|
toObject(e) {
|
|
2755
2860
|
let t = super.toObject({ skipUnknown: e.skipUnknown }), r = super.toObject(e), o = r._unknown;
|
|
2756
2861
|
delete r._unknown;
|
|
@@ -2770,7 +2875,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2770
2875
|
argv: t.argv,
|
|
2771
2876
|
stopAtFirstUnknown: t.stopAtFirstUnknown,
|
|
2772
2877
|
caseInsensitive: t.caseInsensitive
|
|
2773
|
-
}), r = new (e.isGrouped() ? D :
|
|
2878
|
+
}), r = new (e.isGrouped() ? D : w)(e);
|
|
2774
2879
|
for (let e of n) {
|
|
2775
2880
|
let n = e.subArg || e.arg;
|
|
2776
2881
|
if (!t.partial) {
|
|
@@ -2791,9 +2896,12 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2791
2896
|
});
|
|
2792
2897
|
}
|
|
2793
2898
|
t.exports = O;
|
|
2794
|
-
})),
|
|
2795
|
-
var n =
|
|
2899
|
+
})), J = /* @__PURE__ */ t(((e, t) => {
|
|
2900
|
+
var n = P(), r = me();
|
|
2796
2901
|
t.exports = class extends n {
|
|
2902
|
+
static get name() {
|
|
2903
|
+
return "ls";
|
|
2904
|
+
}
|
|
2797
2905
|
get requiresFilesystem() {
|
|
2798
2906
|
return !0;
|
|
2799
2907
|
}
|
|
@@ -2806,7 +2914,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2806
2914
|
}
|
|
2807
2915
|
if (n.one = n.one || t, n.help) return this.printHelp(), Promise.resolve();
|
|
2808
2916
|
let r = this.fs.getFileByPath(n.path);
|
|
2809
|
-
if (!r)
|
|
2917
|
+
if (!r) {
|
|
2918
|
+
let e = this.fs.exists(n.path) ? "Permission denied" : "No such file or directory";
|
|
2919
|
+
return Promise.reject(`${n.path}: ${e}`);
|
|
2920
|
+
}
|
|
2810
2921
|
if (r.constructor === Object) {
|
|
2811
2922
|
let e = r;
|
|
2812
2923
|
n.all || (e = Object.entries(e).reduce((e, [t, n]) => (t.startsWith(".") || (e[t] = n), e), {}));
|
|
@@ -2829,8 +2940,9 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2829
2940
|
this.stdOut = Object.entries(e).reduce((e, [n, r]) => e + this.padString(this._applyIndicator(n, r, t)), "");
|
|
2830
2941
|
}
|
|
2831
2942
|
printLong(e, t) {
|
|
2832
|
-
|
|
2833
|
-
|
|
2943
|
+
let n = t.endsWith("/") ? t.slice(0, -1) : t;
|
|
2944
|
+
Object.entries(e).forEach(([e, t]) => {
|
|
2945
|
+
let r = n + "/" + e, i = t != null && t.constructor === Object, a = this.fs.getMode(r), o = a === null ? i ? 493 : 420 : a, s = this._modeToString(o, i), c = this.fs.getSize(r);
|
|
2834
2946
|
return this.stdOut = `${s} root users ${this.padString(c, 10)} ${e}`;
|
|
2835
2947
|
});
|
|
2836
2948
|
}
|
|
@@ -2885,9 +2997,12 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2885
2997
|
], { argv: e });
|
|
2886
2998
|
}
|
|
2887
2999
|
};
|
|
2888
|
-
})),
|
|
2889
|
-
var n =
|
|
3000
|
+
})), he = /* @__PURE__ */ t(((e, t) => {
|
|
3001
|
+
var n = P();
|
|
2890
3002
|
t.exports = class extends n {
|
|
3003
|
+
static get name() {
|
|
3004
|
+
return "echo";
|
|
3005
|
+
}
|
|
2891
3006
|
run() {
|
|
2892
3007
|
let e = [...this.arguments], t = !1, n = !1;
|
|
2893
3008
|
for (; e.length > 0 && /^-[neE]+$/.test(e[0]);) {
|
|
@@ -2898,9 +3013,12 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2898
3013
|
return n && (r = r.replace(/\\c.*$/s, () => (t = !0, "")).replace(/\\0([0-7]{1,3})/g, (e, t) => String.fromCharCode(parseInt(t, 8))).replace(/\\x([0-9a-fA-F]{1,2})/g, (e, t) => String.fromCharCode(parseInt(t, 16))).replace(/\\n/g, "\n").replace(/\\t/g, " ").replace(/\\r/g, "\r").replace(/\\a/g, "\x07").replace(/\\b/g, "\b").replace(/\\e/g, "\x1B").replace(/\\f/g, "\f").replace(/\\v/g, "\v").replace(/\\\\/g, "\\")), t ? (r.split(/\r?\n/).forEach((e) => this.stdOut = e), Promise.resolve()) : Promise.resolve(r);
|
|
2899
3014
|
}
|
|
2900
3015
|
};
|
|
2901
|
-
})),
|
|
2902
|
-
var n =
|
|
3016
|
+
})), ge = /* @__PURE__ */ t(((e, t) => {
|
|
3017
|
+
var n = P();
|
|
2903
3018
|
t.exports = class extends n {
|
|
3019
|
+
static get name() {
|
|
3020
|
+
return "grep";
|
|
3021
|
+
}
|
|
2904
3022
|
get requiresFilesystem() {
|
|
2905
3023
|
return !0;
|
|
2906
3024
|
}
|
|
@@ -2979,7 +3097,13 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
2979
3097
|
if (p === "-") e = this.stdin || "";
|
|
2980
3098
|
else {
|
|
2981
3099
|
let t = this.fs.getFileByPath(p);
|
|
2982
|
-
if (t == null)
|
|
3100
|
+
if (t == null) {
|
|
3101
|
+
if (!f) {
|
|
3102
|
+
let e = this.fs.exists(p) ? "Permission denied" : "No such file or directory";
|
|
3103
|
+
this.stdErr = `grep: ${p}: ${e}`;
|
|
3104
|
+
}
|
|
3105
|
+
return this.exitCode = 2, Promise.resolve();
|
|
3106
|
+
}
|
|
2983
3107
|
e = t.toString();
|
|
2984
3108
|
}
|
|
2985
3109
|
for (let t of e.split("\n")) t.length > 0 && h.push(t);
|
|
@@ -3003,7 +3127,11 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3003
3127
|
let x = [], S = !1, C = this.stdin || "", w = (e, t = !1) => {
|
|
3004
3128
|
let n = this.fs.getFileByPath(e);
|
|
3005
3129
|
if (n == null) {
|
|
3006
|
-
|
|
3130
|
+
if (!f) {
|
|
3131
|
+
let t = this.fs.exists(e) ? "Permission denied" : "No such file or directory";
|
|
3132
|
+
this.stdErr = `grep: ${e}: ${t}`;
|
|
3133
|
+
}
|
|
3134
|
+
S = !0;
|
|
3007
3135
|
return;
|
|
3008
3136
|
}
|
|
3009
3137
|
if (n.constructor === Object) {
|
|
@@ -3083,69 +3211,78 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3083
3211
|
return S && !(o && E) ? this.exitCode = 2 : E || (this.exitCode = 1), Promise.resolve();
|
|
3084
3212
|
}
|
|
3085
3213
|
};
|
|
3086
|
-
})),
|
|
3087
|
-
var n =
|
|
3214
|
+
})), Y = /* @__PURE__ */ t(((e, t) => {
|
|
3215
|
+
var n = P();
|
|
3088
3216
|
t.exports = class extends n {
|
|
3089
|
-
get name() {
|
|
3217
|
+
static get name() {
|
|
3090
3218
|
return "true";
|
|
3091
3219
|
}
|
|
3092
3220
|
run() {
|
|
3093
3221
|
return Promise.resolve();
|
|
3094
3222
|
}
|
|
3095
3223
|
};
|
|
3096
|
-
})),
|
|
3097
|
-
var n =
|
|
3224
|
+
})), _e = /* @__PURE__ */ t(((e, t) => {
|
|
3225
|
+
var n = P();
|
|
3098
3226
|
t.exports = class extends n {
|
|
3099
|
-
get name() {
|
|
3227
|
+
static get name() {
|
|
3100
3228
|
return "false";
|
|
3101
3229
|
}
|
|
3102
3230
|
run() {
|
|
3103
3231
|
return this.exitCode = 1, Promise.resolve();
|
|
3104
3232
|
}
|
|
3105
3233
|
};
|
|
3106
|
-
})),
|
|
3107
|
-
var { Test: n, TestBracket: r } =
|
|
3234
|
+
})), ve = /* @__PURE__ */ t(((e, t) => {
|
|
3235
|
+
var { Test: n, TestBracket: r } = ce();
|
|
3108
3236
|
t.exports = [
|
|
3109
|
-
|
|
3110
|
-
pe(),
|
|
3111
|
-
me(),
|
|
3237
|
+
le(),
|
|
3112
3238
|
J(),
|
|
3113
3239
|
he(),
|
|
3114
3240
|
ge(),
|
|
3241
|
+
Y(),
|
|
3242
|
+
_e(),
|
|
3115
3243
|
n,
|
|
3116
3244
|
r
|
|
3117
3245
|
];
|
|
3118
|
-
})),
|
|
3119
|
-
var n =
|
|
3246
|
+
})), ye = /* @__PURE__ */ t(((e, t) => {
|
|
3247
|
+
var n = F();
|
|
3120
3248
|
t.exports = class extends n {
|
|
3249
|
+
static get name() {
|
|
3250
|
+
return "alias";
|
|
3251
|
+
}
|
|
3121
3252
|
run() {
|
|
3122
3253
|
if (this.arguments.length !== 1) return Promise.reject("alias requires a single argument");
|
|
3123
3254
|
let e = this.arguments[0].split("=");
|
|
3124
3255
|
return e.length === 2 ? (this.context.setAlias(e[0], e[1]), Promise.resolve()) : Promise.reject("alias requires a key and value delimited by '=' ie: key=value");
|
|
3125
3256
|
}
|
|
3126
3257
|
};
|
|
3127
|
-
})),
|
|
3128
|
-
var n =
|
|
3258
|
+
})), be = /* @__PURE__ */ t(((e, t) => {
|
|
3259
|
+
var n = F();
|
|
3129
3260
|
t.exports = class extends n {
|
|
3261
|
+
static get name() {
|
|
3262
|
+
return "export";
|
|
3263
|
+
}
|
|
3130
3264
|
run() {
|
|
3131
3265
|
if (this.arguments.length !== 1) return Promise.reject("export requires a single argument");
|
|
3132
3266
|
let e = this.arguments[0].split("=");
|
|
3133
3267
|
return e.length !== 2 && Promise.reject("export requires a key and value delimited by '=' ie: key=value"), this.context.setVar(e[0], e[1]), Promise.resolve();
|
|
3134
3268
|
}
|
|
3135
3269
|
};
|
|
3136
|
-
})),
|
|
3137
|
-
var n =
|
|
3270
|
+
})), xe = /* @__PURE__ */ t(((e, t) => {
|
|
3271
|
+
var n = F();
|
|
3138
3272
|
t.exports = class extends n {
|
|
3273
|
+
static get name() {
|
|
3274
|
+
return "cd";
|
|
3275
|
+
}
|
|
3139
3276
|
run() {
|
|
3140
3277
|
if (this.arguments.length !== 1) return Promise.reject("cd requires a single argument");
|
|
3141
|
-
let e = this.context.fs.
|
|
3142
|
-
return e ? e.
|
|
3278
|
+
let e = this.context.fs.stat(this.arguments[0]);
|
|
3279
|
+
return e ? e.isDirectory ? (this.context.setCwd(this.arguments[0]), Promise.resolve()) : Promise.reject(`${this.arguments[0]}: Not a directory`) : Promise.reject("file or directory not found");
|
|
3143
3280
|
}
|
|
3144
3281
|
};
|
|
3145
|
-
})),
|
|
3146
|
-
var n =
|
|
3282
|
+
})), Se = /* @__PURE__ */ t(((e, t) => {
|
|
3283
|
+
var n = F();
|
|
3147
3284
|
t.exports = class extends n {
|
|
3148
|
-
get name() {
|
|
3285
|
+
static get name() {
|
|
3149
3286
|
return "chmod";
|
|
3150
3287
|
}
|
|
3151
3288
|
get requiresFilesystem() {
|
|
@@ -3156,7 +3293,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3156
3293
|
if (e.length < 2) return this.stdErr = "chmod: usage: chmod MODE FILE...", this.exitCode = 1, Promise.resolve();
|
|
3157
3294
|
let t = e[0], n = e.slice(1);
|
|
3158
3295
|
for (let e of n) {
|
|
3159
|
-
if (this.fs.
|
|
3296
|
+
if (!this.fs.exists(e)) {
|
|
3160
3297
|
this.stdErr = `chmod: cannot access '${e}': No such file or directory`, this.exitCode = 1;
|
|
3161
3298
|
continue;
|
|
3162
3299
|
}
|
|
@@ -3198,10 +3335,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3198
3335
|
return null;
|
|
3199
3336
|
}
|
|
3200
3337
|
};
|
|
3201
|
-
})),
|
|
3202
|
-
var n =
|
|
3338
|
+
})), Ce = /* @__PURE__ */ t(((e, t) => {
|
|
3339
|
+
var n = F(), r = D();
|
|
3203
3340
|
t.exports = class extends n {
|
|
3204
|
-
get name() {
|
|
3341
|
+
static get name() {
|
|
3205
3342
|
return "cp";
|
|
3206
3343
|
}
|
|
3207
3344
|
get requiresFilesystem() {
|
|
@@ -3241,14 +3378,14 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3241
3378
|
for (; s < o.length;) a.push(o[s++]);
|
|
3242
3379
|
let c = t === null ? n ? "preserve" : "follow" : t;
|
|
3243
3380
|
if (a.length < 2) return this.stdErr = `cp: missing destination file operand${a.length ? ` after '${a[0]}'` : ""}`, this.exitCode = 1, Promise.resolve();
|
|
3244
|
-
let l = a[a.length - 1], u = a.slice(0, -1), d = this.fs.
|
|
3381
|
+
let l = a[a.length - 1], u = a.slice(0, -1), d = this.fs.stat(l), f = d !== null && d.isDirectory, p = r || c === "follow_cl" ? "follow" : c, m = r || c === "follow_cl" ? i === null ? "preserve" : i : c;
|
|
3245
3382
|
for (let t of u) {
|
|
3246
|
-
let n = this.fs.isSymlink ? this.fs.isSymlink(t) : !1, r = this.fs.
|
|
3247
|
-
if (r
|
|
3383
|
+
let n = this.fs.isSymlink ? this.fs.isSymlink(t) : !1, r = this.fs.stat(t);
|
|
3384
|
+
if (r === null) {
|
|
3248
3385
|
this.stdErr = `cp: cannot stat '${t}': No such file or directory`, this.exitCode = 1;
|
|
3249
3386
|
continue;
|
|
3250
3387
|
}
|
|
3251
|
-
if (!(n && p === "preserve") && r.
|
|
3388
|
+
if (!(n && p === "preserve") && r.isDirectory && !e) {
|
|
3252
3389
|
this.stdErr = `cp: omitting directory '${t}'`, this.exitCode = 1;
|
|
3253
3390
|
continue;
|
|
3254
3391
|
}
|
|
@@ -3269,7 +3406,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3269
3406
|
return null;
|
|
3270
3407
|
}
|
|
3271
3408
|
let o = this.fs.getFileByPath(e);
|
|
3272
|
-
if (o == null) return `cp: cannot stat '${e}': No such file or directory`;
|
|
3409
|
+
if (o == null) return `cp: cannot stat '${e}': ${this.fs.exists(e) ? "Permission denied" : "No such file or directory"}`;
|
|
3273
3410
|
if (o.constructor === Object) {
|
|
3274
3411
|
try {
|
|
3275
3412
|
this.fs.setFileByPath(t, {}, !0);
|
|
@@ -3286,14 +3423,18 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3286
3423
|
let r = e.replace(/\/$/, "") + "/" + n, i = t.replace(/\/$/, "") + "/" + n, o = this.fs.isSymlink ? this.fs.isSymlink(r) : !1, s = this._copy(r, i, a, o, a);
|
|
3287
3424
|
s && (this.stdErr = s, this.exitCode = 1);
|
|
3288
3425
|
}
|
|
3289
|
-
} else
|
|
3426
|
+
} else try {
|
|
3427
|
+
this.fs.setFileByPath(t, o, !0);
|
|
3428
|
+
} catch (e) {
|
|
3429
|
+
return `cp: cannot create '${t}': ${e.message}`;
|
|
3430
|
+
}
|
|
3290
3431
|
return null;
|
|
3291
3432
|
}
|
|
3292
3433
|
};
|
|
3293
|
-
})),
|
|
3294
|
-
var n =
|
|
3434
|
+
})), we = /* @__PURE__ */ t(((e, t) => {
|
|
3435
|
+
var n = F();
|
|
3295
3436
|
t.exports = class extends n {
|
|
3296
|
-
get name() {
|
|
3437
|
+
static get name() {
|
|
3297
3438
|
return "mkdir";
|
|
3298
3439
|
}
|
|
3299
3440
|
get requiresFilesystem() {
|
|
@@ -3304,7 +3445,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3304
3445
|
for (let n of this.arguments) n === "-p" || n === "--parents" ? e = !0 : t.push(n);
|
|
3305
3446
|
if (t.length === 0) return this.stdErr = "mkdir: missing operand", this.exitCode = 1, Promise.resolve();
|
|
3306
3447
|
for (let n of t) {
|
|
3307
|
-
if (this.fs.
|
|
3448
|
+
if (this.fs.exists(n)) {
|
|
3308
3449
|
e || (this.stdErr = `mkdir: cannot create directory '${n}': File exists`, this.exitCode = 1);
|
|
3309
3450
|
continue;
|
|
3310
3451
|
}
|
|
@@ -3317,10 +3458,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3317
3458
|
return Promise.resolve();
|
|
3318
3459
|
}
|
|
3319
3460
|
};
|
|
3320
|
-
})),
|
|
3321
|
-
var n =
|
|
3461
|
+
})), Te = /* @__PURE__ */ t(((e, t) => {
|
|
3462
|
+
var n = F(), r = D();
|
|
3322
3463
|
t.exports = class extends n {
|
|
3323
|
-
get name() {
|
|
3464
|
+
static get name() {
|
|
3324
3465
|
return "mv";
|
|
3325
3466
|
}
|
|
3326
3467
|
get requiresFilesystem() {
|
|
@@ -3350,7 +3491,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3350
3491
|
for (; i < n.length;) t.push(n[i++]);
|
|
3351
3492
|
let a = e === null ? t[t.length - 1] : e, o = e === null ? t.slice(0, -1) : t;
|
|
3352
3493
|
if (!a || o.length === 0) return this.stdErr = `mv: missing destination file operand${o.length ? ` after '${o[0]}'` : ""}`, this.exitCode = 1, Promise.resolve();
|
|
3353
|
-
let s = this.fs.
|
|
3494
|
+
let s = this.fs.stat(a), c = s !== null && s.isDirectory;
|
|
3354
3495
|
for (let e of o) {
|
|
3355
3496
|
let t = c ? a.replace(/\/$/, "") + "/" + e.split("/").pop() : a;
|
|
3356
3497
|
if (this.fs.isRealFilesystem) {
|
|
@@ -3362,7 +3503,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3362
3503
|
continue;
|
|
3363
3504
|
}
|
|
3364
3505
|
try {
|
|
3365
|
-
let e =
|
|
3506
|
+
let e = O();
|
|
3366
3507
|
r.mkdirSync(e.dirname(i), { recursive: !0 }), r.renameSync(n, i);
|
|
3367
3508
|
} catch (n) {
|
|
3368
3509
|
this.stdErr = `mv: cannot move '${e}' to '${t}': ${n.message}`, this.exitCode = 1;
|
|
@@ -3370,10 +3511,15 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3370
3511
|
} else {
|
|
3371
3512
|
let n = this.fs.getFileByPath(e);
|
|
3372
3513
|
if (n == null) {
|
|
3373
|
-
this.
|
|
3514
|
+
let t = this.fs.exists(e) ? "Permission denied" : "No such file or directory";
|
|
3515
|
+
this.stdErr = `mv: cannot stat '${e}': ${t}`, this.exitCode = 1;
|
|
3374
3516
|
continue;
|
|
3375
3517
|
}
|
|
3376
|
-
|
|
3518
|
+
try {
|
|
3519
|
+
this.fs.setFileByPath(t, this._deepCopy(n), !0), this.fs.deleteFileByPath(e);
|
|
3520
|
+
} catch (n) {
|
|
3521
|
+
this.stdErr = `mv: cannot move '${e}' to '${t}': ${n.message}`, this.exitCode = 1;
|
|
3522
|
+
}
|
|
3377
3523
|
}
|
|
3378
3524
|
}
|
|
3379
3525
|
return Promise.resolve();
|
|
@@ -3385,18 +3531,21 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3385
3531
|
return t;
|
|
3386
3532
|
}
|
|
3387
3533
|
};
|
|
3388
|
-
})),
|
|
3389
|
-
var n =
|
|
3534
|
+
})), Ee = /* @__PURE__ */ t(((e, t) => {
|
|
3535
|
+
var n = F();
|
|
3390
3536
|
t.exports = class extends n {
|
|
3537
|
+
static get name() {
|
|
3538
|
+
return "pwd";
|
|
3539
|
+
}
|
|
3391
3540
|
run() {
|
|
3392
3541
|
let e = this.context.fs.cwd;
|
|
3393
3542
|
return this.stdOut = e.endsWith("/") && e !== "/" ? e.slice(0, -1) : e, Promise.resolve();
|
|
3394
3543
|
}
|
|
3395
3544
|
};
|
|
3396
|
-
})),
|
|
3397
|
-
var n =
|
|
3545
|
+
})), De = /* @__PURE__ */ t(((e, t) => {
|
|
3546
|
+
var n = F(), r = D();
|
|
3398
3547
|
t.exports = class extends n {
|
|
3399
|
-
get name() {
|
|
3548
|
+
static get name() {
|
|
3400
3549
|
return "rm";
|
|
3401
3550
|
}
|
|
3402
3551
|
get requiresFilesystem() {
|
|
@@ -3438,18 +3587,24 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3438
3587
|
this.fs.deleteFileByPath(e);
|
|
3439
3588
|
}
|
|
3440
3589
|
};
|
|
3441
|
-
})),
|
|
3442
|
-
var n =
|
|
3590
|
+
})), Oe = /* @__PURE__ */ t(((e, t) => {
|
|
3591
|
+
var n = F();
|
|
3443
3592
|
t.exports = class extends n {
|
|
3593
|
+
static get name() {
|
|
3594
|
+
return "which";
|
|
3595
|
+
}
|
|
3444
3596
|
run() {
|
|
3445
3597
|
if (this.arguments.length !== 1) return Promise.reject("which requires a single argument");
|
|
3446
3598
|
let e = this.context.fs.getFileByPath(`${this.context.getVar("PATH")}/${this.arguments[0]}`);
|
|
3447
3599
|
return !e || e.constructor === Object || e.constructor === String ? Promise.reject() : Promise.resolve(`${this.context.getVar("PATH")}/${this.arguments[0]}`);
|
|
3448
3600
|
}
|
|
3449
3601
|
};
|
|
3450
|
-
})),
|
|
3451
|
-
var n =
|
|
3602
|
+
})), ke = /* @__PURE__ */ t(((e, t) => {
|
|
3603
|
+
var n = I(), r = F();
|
|
3452
3604
|
t.exports = class extends r {
|
|
3605
|
+
static get name() {
|
|
3606
|
+
return "source";
|
|
3607
|
+
}
|
|
3453
3608
|
constructor(e, t) {
|
|
3454
3609
|
if (super(e, t), this.arguments.length !== 1) return Promise.reject("source requires a single argument");
|
|
3455
3610
|
let r = this.arguments[0];
|
|
@@ -3462,7 +3617,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3462
3617
|
let e = this.arguments[0];
|
|
3463
3618
|
if (e.startsWith("./") || e.startsWith("/")) {
|
|
3464
3619
|
let t = this.context.fs.getFileByPath(e);
|
|
3465
|
-
if (!t)
|
|
3620
|
+
if (!t) {
|
|
3621
|
+
let t = this.context.fs.exists(e) ? "Permission denied" : "No such file or directory";
|
|
3622
|
+
return Promise.reject(`${e}: ${t}`);
|
|
3623
|
+
}
|
|
3466
3624
|
if (t.constructor === Object) return Promise.reject(`${e}: is a directory`);
|
|
3467
3625
|
if (t.prototype && typeof t.prototype.run == "function" && typeof t.prototype.runCommand == "function") return Promise.reject(`${e}: command not found`);
|
|
3468
3626
|
if (t.constructor === String && t.startsWith("#!")) return Promise.reject("FATAL: should not get here");
|
|
@@ -3470,24 +3628,33 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3470
3628
|
return Promise.reject(`${e}: permission denied`);
|
|
3471
3629
|
}
|
|
3472
3630
|
};
|
|
3473
|
-
})),
|
|
3474
|
-
var n =
|
|
3631
|
+
})), Ae = /* @__PURE__ */ t(((e, t) => {
|
|
3632
|
+
var n = F();
|
|
3475
3633
|
t.exports = class extends n {
|
|
3634
|
+
static get name() {
|
|
3635
|
+
return "clear";
|
|
3636
|
+
}
|
|
3476
3637
|
run() {
|
|
3477
3638
|
return this.arguments.length > 0 ? Promise.reject("clear does not require arguments") : (this.context.clear(), Promise.resolve());
|
|
3478
3639
|
}
|
|
3479
3640
|
};
|
|
3480
|
-
})),
|
|
3481
|
-
var n =
|
|
3641
|
+
})), je = /* @__PURE__ */ t(((e, t) => {
|
|
3642
|
+
var n = F();
|
|
3482
3643
|
t.exports = class extends n {
|
|
3644
|
+
static get name() {
|
|
3645
|
+
return "exit";
|
|
3646
|
+
}
|
|
3483
3647
|
run() {
|
|
3484
3648
|
let e = parseInt(this.arguments[0]) || 0;
|
|
3485
3649
|
return this.exitCode = e, this.context.destroy(e), Promise.resolve();
|
|
3486
3650
|
}
|
|
3487
3651
|
};
|
|
3488
|
-
})),
|
|
3489
|
-
var n =
|
|
3652
|
+
})), Me = /* @__PURE__ */ t(((e, t) => {
|
|
3653
|
+
var n = F(), r = me();
|
|
3490
3654
|
t.exports = class extends n {
|
|
3655
|
+
static get name() {
|
|
3656
|
+
return "read";
|
|
3657
|
+
}
|
|
3491
3658
|
get requiresFilesystem() {
|
|
3492
3659
|
return !1;
|
|
3493
3660
|
}
|
|
@@ -3552,10 +3719,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3552
3719
|
], { argv: this.arguments });
|
|
3553
3720
|
}
|
|
3554
3721
|
};
|
|
3555
|
-
})),
|
|
3556
|
-
var n =
|
|
3722
|
+
})), Ne = /* @__PURE__ */ t(((e, t) => {
|
|
3723
|
+
var n = F(), r = P();
|
|
3557
3724
|
t.exports = class extends n {
|
|
3558
|
-
get name() {
|
|
3725
|
+
static get name() {
|
|
3559
3726
|
return "jsfunction";
|
|
3560
3727
|
}
|
|
3561
3728
|
run() {
|
|
@@ -3588,10 +3755,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3588
3755
|
}), this.context.setCommand(a), Promise.resolve();
|
|
3589
3756
|
}
|
|
3590
3757
|
};
|
|
3591
|
-
})),
|
|
3592
|
-
var n =
|
|
3758
|
+
})), Pe = /* @__PURE__ */ t(((e, t) => {
|
|
3759
|
+
var n = F();
|
|
3593
3760
|
t.exports = class extends n {
|
|
3594
|
-
get name() {
|
|
3761
|
+
static get name() {
|
|
3595
3762
|
return "curl";
|
|
3596
3763
|
}
|
|
3597
3764
|
get requiresFilesystem() {
|
|
@@ -3652,9 +3819,15 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3652
3819
|
this.stdOut = `${t}: ${e}`;
|
|
3653
3820
|
}), this.stdOut = "");
|
|
3654
3821
|
let t = await e.text();
|
|
3655
|
-
|
|
3822
|
+
if (o) try {
|
|
3823
|
+
this.fs.setFileByPath(o, t, !1);
|
|
3824
|
+
} catch (e) {
|
|
3825
|
+
this.stdErr = `curl: cannot write to '${o}': ${e.message}`, this.exitCode = 1;
|
|
3826
|
+
}
|
|
3827
|
+
else t.split(/\r?\n/).forEach((e) => {
|
|
3656
3828
|
this.stdOut = e;
|
|
3657
|
-
})
|
|
3829
|
+
});
|
|
3830
|
+
e.ok || (this.exitCode = 22);
|
|
3658
3831
|
}).catch((e) => {
|
|
3659
3832
|
if (!a) {
|
|
3660
3833
|
let t = e && e.message ? e.message : String(e);
|
|
@@ -3667,10 +3840,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3667
3840
|
});
|
|
3668
3841
|
}
|
|
3669
3842
|
};
|
|
3670
|
-
})),
|
|
3843
|
+
})), Fe = /* @__PURE__ */ t(((e, t) => {
|
|
3671
3844
|
t.exports = [
|
|
3672
|
-
_e(),
|
|
3673
|
-
ve(),
|
|
3674
3845
|
ye(),
|
|
3675
3846
|
be(),
|
|
3676
3847
|
xe(),
|
|
@@ -3684,56 +3855,58 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3684
3855
|
ke(),
|
|
3685
3856
|
Ae(),
|
|
3686
3857
|
je(),
|
|
3687
|
-
Me()
|
|
3858
|
+
Me(),
|
|
3859
|
+
Ne(),
|
|
3860
|
+
Pe()
|
|
3688
3861
|
];
|
|
3689
|
-
})),
|
|
3862
|
+
})), Ie = /* @__PURE__ */ t(((e, t) => {
|
|
3690
3863
|
t.exports = Object;
|
|
3691
|
-
})),
|
|
3864
|
+
})), Le = /* @__PURE__ */ t(((e, t) => {
|
|
3692
3865
|
t.exports = Error;
|
|
3693
|
-
})),
|
|
3866
|
+
})), Re = /* @__PURE__ */ t(((e, t) => {
|
|
3694
3867
|
t.exports = EvalError;
|
|
3695
|
-
})),
|
|
3868
|
+
})), ze = /* @__PURE__ */ t(((e, t) => {
|
|
3696
3869
|
t.exports = RangeError;
|
|
3697
|
-
})),
|
|
3870
|
+
})), Be = /* @__PURE__ */ t(((e, t) => {
|
|
3698
3871
|
t.exports = ReferenceError;
|
|
3699
|
-
})),
|
|
3872
|
+
})), Ve = /* @__PURE__ */ t(((e, t) => {
|
|
3700
3873
|
t.exports = SyntaxError;
|
|
3701
3874
|
})), X = /* @__PURE__ */ t(((e, t) => {
|
|
3702
3875
|
t.exports = TypeError;
|
|
3703
|
-
})),
|
|
3876
|
+
})), He = /* @__PURE__ */ t(((e, t) => {
|
|
3704
3877
|
t.exports = URIError;
|
|
3705
|
-
})),
|
|
3878
|
+
})), Ue = /* @__PURE__ */ t(((e, t) => {
|
|
3706
3879
|
t.exports = Math.abs;
|
|
3707
|
-
})),
|
|
3880
|
+
})), We = /* @__PURE__ */ t(((e, t) => {
|
|
3708
3881
|
t.exports = Math.floor;
|
|
3709
|
-
})),
|
|
3882
|
+
})), Ge = /* @__PURE__ */ t(((e, t) => {
|
|
3710
3883
|
t.exports = Math.max;
|
|
3711
|
-
})),
|
|
3884
|
+
})), Ke = /* @__PURE__ */ t(((e, t) => {
|
|
3712
3885
|
t.exports = Math.min;
|
|
3713
|
-
})),
|
|
3886
|
+
})), qe = /* @__PURE__ */ t(((e, t) => {
|
|
3714
3887
|
t.exports = Math.pow;
|
|
3715
|
-
})),
|
|
3888
|
+
})), Je = /* @__PURE__ */ t(((e, t) => {
|
|
3716
3889
|
t.exports = Math.round;
|
|
3717
|
-
})),
|
|
3890
|
+
})), Ye = /* @__PURE__ */ t(((e, t) => {
|
|
3718
3891
|
t.exports = Number.isNaN || function(e) {
|
|
3719
3892
|
return e !== e;
|
|
3720
3893
|
};
|
|
3721
|
-
})),
|
|
3722
|
-
var n =
|
|
3894
|
+
})), Xe = /* @__PURE__ */ t(((e, t) => {
|
|
3895
|
+
var n = Ye();
|
|
3723
3896
|
t.exports = function(e) {
|
|
3724
3897
|
return n(e) || e === 0 ? e : e < 0 ? -1 : 1;
|
|
3725
3898
|
};
|
|
3726
|
-
})),
|
|
3899
|
+
})), Ze = /* @__PURE__ */ t(((e, t) => {
|
|
3727
3900
|
t.exports = Object.getOwnPropertyDescriptor;
|
|
3728
|
-
})),
|
|
3729
|
-
var n =
|
|
3901
|
+
})), Qe = /* @__PURE__ */ t(((e, t) => {
|
|
3902
|
+
var n = Ze();
|
|
3730
3903
|
if (n) try {
|
|
3731
3904
|
n([], "length");
|
|
3732
3905
|
} catch {
|
|
3733
3906
|
n = null;
|
|
3734
3907
|
}
|
|
3735
3908
|
t.exports = n;
|
|
3736
|
-
})),
|
|
3909
|
+
})), $e = /* @__PURE__ */ t(((e, t) => {
|
|
3737
3910
|
var n = Object.defineProperty || !1;
|
|
3738
3911
|
if (n) try {
|
|
3739
3912
|
n({}, "a", { value: 1 });
|
|
@@ -3741,7 +3914,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3741
3914
|
n = !1;
|
|
3742
3915
|
}
|
|
3743
3916
|
t.exports = n;
|
|
3744
|
-
})),
|
|
3917
|
+
})), et = /* @__PURE__ */ t(((e, t) => {
|
|
3745
3918
|
t.exports = function() {
|
|
3746
3919
|
if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function") return !1;
|
|
3747
3920
|
if (typeof Symbol.iterator == "symbol") return !0;
|
|
@@ -3758,16 +3931,16 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3758
3931
|
}
|
|
3759
3932
|
return !0;
|
|
3760
3933
|
};
|
|
3761
|
-
})),
|
|
3762
|
-
var n = typeof Symbol < "u" && Symbol, r =
|
|
3934
|
+
})), tt = /* @__PURE__ */ t(((e, t) => {
|
|
3935
|
+
var n = typeof Symbol < "u" && Symbol, r = et();
|
|
3763
3936
|
t.exports = function() {
|
|
3764
3937
|
return typeof n != "function" || typeof Symbol != "function" || typeof n("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : r();
|
|
3765
3938
|
};
|
|
3766
|
-
})), et = /* @__PURE__ */ t(((e, t) => {
|
|
3767
|
-
t.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
|
|
3768
|
-
})), tt = /* @__PURE__ */ t(((e, t) => {
|
|
3769
|
-
t.exports = Pe().getPrototypeOf || null;
|
|
3770
3939
|
})), nt = /* @__PURE__ */ t(((e, t) => {
|
|
3940
|
+
t.exports = typeof Reflect < "u" && Reflect.getPrototypeOf || null;
|
|
3941
|
+
})), rt = /* @__PURE__ */ t(((e, t) => {
|
|
3942
|
+
t.exports = Ie().getPrototypeOf || null;
|
|
3943
|
+
})), it = /* @__PURE__ */ t(((e, t) => {
|
|
3771
3944
|
var n = "Function.prototype.bind called on incompatible ", r = Object.prototype.toString, i = Math.max, a = "[object Function]", o = function(e, t) {
|
|
3772
3945
|
for (var n = [], r = 0; r < e.length; r += 1) n[r] = e[r];
|
|
3773
3946
|
for (var i = 0; i < t.length; i += 1) n[i + e.length] = t[i];
|
|
@@ -3795,26 +3968,26 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3795
3968
|
}
|
|
3796
3969
|
return u;
|
|
3797
3970
|
};
|
|
3798
|
-
})), rt = /* @__PURE__ */ t(((e, t) => {
|
|
3799
|
-
var n = nt();
|
|
3800
|
-
t.exports = Function.prototype.bind || n;
|
|
3801
|
-
})), it = /* @__PURE__ */ t(((e, t) => {
|
|
3802
|
-
t.exports = Function.prototype.call;
|
|
3803
3971
|
})), at = /* @__PURE__ */ t(((e, t) => {
|
|
3804
|
-
|
|
3972
|
+
var n = it();
|
|
3973
|
+
t.exports = Function.prototype.bind || n;
|
|
3805
3974
|
})), ot = /* @__PURE__ */ t(((e, t) => {
|
|
3806
|
-
t.exports =
|
|
3975
|
+
t.exports = Function.prototype.call;
|
|
3807
3976
|
})), st = /* @__PURE__ */ t(((e, t) => {
|
|
3808
|
-
|
|
3809
|
-
t.exports = ot() || n.call(i, r);
|
|
3977
|
+
t.exports = Function.prototype.apply;
|
|
3810
3978
|
})), ct = /* @__PURE__ */ t(((e, t) => {
|
|
3811
|
-
|
|
3979
|
+
t.exports = typeof Reflect < "u" && Reflect && Reflect.apply;
|
|
3980
|
+
})), lt = /* @__PURE__ */ t(((e, t) => {
|
|
3981
|
+
var n = at(), r = st(), i = ot();
|
|
3982
|
+
t.exports = ct() || n.call(i, r);
|
|
3983
|
+
})), ut = /* @__PURE__ */ t(((e, t) => {
|
|
3984
|
+
var n = at(), r = X(), i = ot(), a = lt();
|
|
3812
3985
|
t.exports = function(e) {
|
|
3813
3986
|
if (e.length < 1 || typeof e[0] != "function") throw new r("a function is required");
|
|
3814
3987
|
return a(n, i, e);
|
|
3815
3988
|
};
|
|
3816
|
-
})),
|
|
3817
|
-
var n =
|
|
3989
|
+
})), dt = /* @__PURE__ */ t(((e, t) => {
|
|
3990
|
+
var n = ut(), r = Qe(), i;
|
|
3818
3991
|
try {
|
|
3819
3992
|
i = [].__proto__ === Array.prototype;
|
|
3820
3993
|
} catch (e) {
|
|
@@ -3824,8 +3997,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3824
3997
|
t.exports = a && typeof a.get == "function" ? n([a.get]) : typeof s == "function" ? function(e) {
|
|
3825
3998
|
return s(e == null ? e : o(e));
|
|
3826
3999
|
} : !1;
|
|
3827
|
-
})),
|
|
3828
|
-
var n =
|
|
4000
|
+
})), ft = /* @__PURE__ */ t(((e, t) => {
|
|
4001
|
+
var n = nt(), r = rt(), i = dt();
|
|
3829
4002
|
t.exports = n ? function(e) {
|
|
3830
4003
|
return n(e);
|
|
3831
4004
|
} : r ? function(e) {
|
|
@@ -3834,15 +4007,15 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3834
4007
|
} : i ? function(e) {
|
|
3835
4008
|
return i(e);
|
|
3836
4009
|
} : null;
|
|
3837
|
-
})),
|
|
4010
|
+
})), pt = /* @__PURE__ */ t(((e, t) => {
|
|
3838
4011
|
var n = Function.prototype.call, r = Object.prototype.hasOwnProperty;
|
|
3839
|
-
t.exports =
|
|
4012
|
+
t.exports = at().call(n, r);
|
|
3840
4013
|
})), Z = /* @__PURE__ */ t(((e, t) => {
|
|
3841
|
-
var n, r =
|
|
4014
|
+
var n, r = Ie(), i = Le(), a = Re(), o = ze(), s = Be(), c = Ve(), l = X(), u = He(), d = Ue(), f = We(), p = Ge(), m = Ke(), h = qe(), g = Je(), _ = Xe(), v = Function, y = function(e) {
|
|
3842
4015
|
try {
|
|
3843
4016
|
return v("\"use strict\"; return (" + e + ").constructor;")();
|
|
3844
4017
|
} catch {}
|
|
3845
|
-
}, b =
|
|
4018
|
+
}, b = Qe(), x = $e(), S = function() {
|
|
3846
4019
|
throw new l();
|
|
3847
4020
|
}, C = b ? function() {
|
|
3848
4021
|
try {
|
|
@@ -3854,7 +4027,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
3854
4027
|
return S;
|
|
3855
4028
|
}
|
|
3856
4029
|
}
|
|
3857
|
-
}() : S, w =
|
|
4030
|
+
}() : S, w = tt()(), T = ft(), E = rt(), D = nt(), O = st(), k = ot(), A = {}, j = typeof Uint8Array > "u" || !T ? n : T(Uint8Array), M = {
|
|
3858
4031
|
__proto__: null,
|
|
3859
4032
|
"%AggregateError%": typeof AggregateError > "u" ? n : AggregateError,
|
|
3860
4033
|
"%Array%": Array,
|
|
@@ -4044,15 +4217,15 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4044
4217
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
4045
4218
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
4046
4219
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
4047
|
-
}, F =
|
|
4048
|
-
var t =
|
|
4220
|
+
}, F = at(), I = pt(), L = F.call(k, Array.prototype.concat), ee = F.call(O, Array.prototype.splice), te = F.call(k, String.prototype.replace), R = F.call(k, String.prototype.slice), z = F.call(k, RegExp.prototype.exec), ne = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, B = /\\(\\)?/g, V = function(e) {
|
|
4221
|
+
var t = R(e, 0, 1), n = R(e, -1);
|
|
4049
4222
|
if (t === "%" && n !== "%") throw new c("invalid intrinsic syntax, expected closing `%`");
|
|
4050
4223
|
if (n === "%" && t !== "%") throw new c("invalid intrinsic syntax, expected opening `%`");
|
|
4051
4224
|
var r = [];
|
|
4052
|
-
return
|
|
4053
|
-
r[r.length] = n ?
|
|
4225
|
+
return te(e, ne, function(e, t, n, i) {
|
|
4226
|
+
r[r.length] = n ? te(i, B, "$1") : t || e;
|
|
4054
4227
|
}), r;
|
|
4055
|
-
},
|
|
4228
|
+
}, re = function(e, t) {
|
|
4056
4229
|
var n = e, r;
|
|
4057
4230
|
if (I(P, n) && (r = P[n], n = "%" + r[0] + "%"), I(M, n)) {
|
|
4058
4231
|
var i = M[n];
|
|
@@ -4068,11 +4241,11 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4068
4241
|
t.exports = function(e, t) {
|
|
4069
4242
|
if (typeof e != "string" || e.length === 0) throw new l("intrinsic name must be a non-empty string");
|
|
4070
4243
|
if (arguments.length > 1 && typeof t != "boolean") throw new l("\"allowMissing\" argument must be a boolean");
|
|
4071
|
-
if (
|
|
4072
|
-
var n =
|
|
4244
|
+
if (z(/^%?[^%]*%?$/, e) === null) throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
4245
|
+
var n = V(e), r = n.length > 0 ? n[0] : "", i = re("%" + r + "%", t), a = i.name, o = i.value, s = !1, u = i.alias;
|
|
4073
4246
|
u && (r = u[0], ee(n, L([0, 1], u)));
|
|
4074
4247
|
for (var d = 1, f = !0; d < n.length; d += 1) {
|
|
4075
|
-
var p = n[d], m =
|
|
4248
|
+
var p = n[d], m = R(p, 0, 1), h = R(p, -1);
|
|
4076
4249
|
if ((m === "\"" || m === "'" || m === "`" || h === "\"" || h === "'" || h === "`") && m !== h) throw new c("property names with quotes must have matching quotes");
|
|
4077
4250
|
if ((p === "constructor" || !f) && (s = !0), r += "." + p, a = "%" + r + "%", I(M, a)) o = M[a];
|
|
4078
4251
|
else if (o != null) {
|
|
@@ -4089,8 +4262,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4089
4262
|
}
|
|
4090
4263
|
return o;
|
|
4091
4264
|
};
|
|
4092
|
-
})),
|
|
4093
|
-
var n =
|
|
4265
|
+
})), mt = /* @__PURE__ */ t(((e, t) => {
|
|
4266
|
+
var n = $e(), r = Ve(), i = X(), a = Qe();
|
|
4094
4267
|
t.exports = function(e, t, o) {
|
|
4095
4268
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`obj` must be an object or a function`");
|
|
4096
4269
|
if (typeof t != "string" && typeof t != "symbol") throw new i("`property` must be a string or a symbol`");
|
|
@@ -4108,8 +4281,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4108
4281
|
else if (u || !s && !c && !l) e[t] = o;
|
|
4109
4282
|
else throw new r("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
|
|
4110
4283
|
};
|
|
4111
|
-
})),
|
|
4112
|
-
var n =
|
|
4284
|
+
})), ht = /* @__PURE__ */ t(((e, t) => {
|
|
4285
|
+
var n = $e(), r = function() {
|
|
4113
4286
|
return !!n;
|
|
4114
4287
|
};
|
|
4115
4288
|
r.hasArrayLengthDefineBug = function() {
|
|
@@ -4120,8 +4293,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4120
4293
|
return !0;
|
|
4121
4294
|
}
|
|
4122
4295
|
}, t.exports = r;
|
|
4123
|
-
})),
|
|
4124
|
-
var n = Z(), r =
|
|
4296
|
+
})), gt = /* @__PURE__ */ t(((e, t) => {
|
|
4297
|
+
var n = Z(), r = mt(), i = ht()(), a = Qe(), o = X(), s = n("%Math.floor%");
|
|
4125
4298
|
t.exports = function(e, t) {
|
|
4126
4299
|
if (typeof e != "function") throw new o("`fn` is not a function");
|
|
4127
4300
|
if (typeof t != "number" || t < 0 || t > 4294967295 || s(t) !== t) throw new o("`length` must be a positive 32-bit integer");
|
|
@@ -4132,27 +4305,27 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4132
4305
|
}
|
|
4133
4306
|
return (c || l || !n) && (i ? r(e, "length", t, !0, !0) : r(e, "length", t)), e;
|
|
4134
4307
|
};
|
|
4135
|
-
})),
|
|
4136
|
-
var n =
|
|
4308
|
+
})), _t = /* @__PURE__ */ t(((e, t) => {
|
|
4309
|
+
var n = at(), r = st(), i = lt();
|
|
4137
4310
|
t.exports = function() {
|
|
4138
4311
|
return i(n, r, arguments);
|
|
4139
4312
|
};
|
|
4140
|
-
})),
|
|
4141
|
-
var n =
|
|
4313
|
+
})), vt = /* @__PURE__ */ t(((e, t) => {
|
|
4314
|
+
var n = gt(), r = $e(), i = ut(), a = _t();
|
|
4142
4315
|
t.exports = function(e) {
|
|
4143
4316
|
var t = i(arguments), r = 1 + e.length - (arguments.length - 1);
|
|
4144
4317
|
return n(t, r > 0 ? r : 0, !0);
|
|
4145
4318
|
}, r ? r(t.exports, "apply", { value: a }) : t.exports.apply = a;
|
|
4146
|
-
})),
|
|
4319
|
+
})), yt = /* @__PURE__ */ t(((e, t) => {
|
|
4147
4320
|
var n = Object.prototype.toString;
|
|
4148
4321
|
t.exports = function(e) {
|
|
4149
4322
|
var t = n.call(e), r = t === "[object Arguments]";
|
|
4150
4323
|
return r ||= t !== "[object Array]" && typeof e == "object" && !!e && typeof e.length == "number" && e.length >= 0 && n.call(e.callee) === "[object Function]", r;
|
|
4151
4324
|
};
|
|
4152
|
-
})),
|
|
4325
|
+
})), bt = /* @__PURE__ */ t(((e, t) => {
|
|
4153
4326
|
var n;
|
|
4154
4327
|
if (!Object.keys) {
|
|
4155
|
-
var r = Object.prototype.hasOwnProperty, i = Object.prototype.toString, a =
|
|
4328
|
+
var r = Object.prototype.hasOwnProperty, i = Object.prototype.toString, a = yt(), o = Object.prototype.propertyIsEnumerable, s = !o.call({ toString: null }, "toString"), c = o.call(function() {}, "prototype"), l = [
|
|
4156
4329
|
"toString",
|
|
4157
4330
|
"toLocaleString",
|
|
4158
4331
|
"valueOf",
|
|
@@ -4219,10 +4392,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4219
4392
|
};
|
|
4220
4393
|
}
|
|
4221
4394
|
t.exports = n;
|
|
4222
|
-
})),
|
|
4223
|
-
var n = Array.prototype.slice, r =
|
|
4395
|
+
})), xt = /* @__PURE__ */ t(((e, t) => {
|
|
4396
|
+
var n = Array.prototype.slice, r = yt(), i = Object.keys, a = i ? function(e) {
|
|
4224
4397
|
return i(e);
|
|
4225
|
-
} :
|
|
4398
|
+
} : bt(), o = Object.keys;
|
|
4226
4399
|
a.shim = function() {
|
|
4227
4400
|
return Object.keys ? function() {
|
|
4228
4401
|
var e = Object.keys(arguments);
|
|
@@ -4231,10 +4404,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4231
4404
|
return r(e) ? o(n.call(e)) : o(e);
|
|
4232
4405
|
}) : Object.keys = a, Object.keys || a;
|
|
4233
4406
|
}, t.exports = a;
|
|
4234
|
-
})),
|
|
4235
|
-
var n =
|
|
4407
|
+
})), St = /* @__PURE__ */ t(((e, t) => {
|
|
4408
|
+
var n = xt(), r = typeof Symbol == "function" && typeof Symbol("foo") == "symbol", i = Object.prototype.toString, a = Array.prototype.concat, o = mt(), s = function(e) {
|
|
4236
4409
|
return typeof e == "function" && i.call(e) === "[object Function]";
|
|
4237
|
-
}, c =
|
|
4410
|
+
}, c = ht()(), l = function(e, t, n, r) {
|
|
4238
4411
|
if (t in e) {
|
|
4239
4412
|
if (r === !0) {
|
|
4240
4413
|
if (e[t] === n) return;
|
|
@@ -4248,30 +4421,30 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4248
4421
|
};
|
|
4249
4422
|
u.supportsDescriptors = !!c, t.exports = u;
|
|
4250
4423
|
})), Q = /* @__PURE__ */ t(((e, t) => {
|
|
4251
|
-
var n = Z(), r =
|
|
4424
|
+
var n = Z(), r = ut(), i = r([n("%String.prototype.indexOf%")]);
|
|
4252
4425
|
t.exports = function(e, t) {
|
|
4253
4426
|
var a = n(e, !!t);
|
|
4254
4427
|
return typeof a == "function" && i(e, ".prototype.") > -1 ? r([a]) : a;
|
|
4255
4428
|
};
|
|
4256
|
-
})),
|
|
4429
|
+
})), Ct = /* @__PURE__ */ t(((e, t) => {
|
|
4257
4430
|
var n = Z()("%Array%"), r = !n.isArray && Q()("Object.prototype.toString");
|
|
4258
4431
|
t.exports = n.isArray || function(e) {
|
|
4259
4432
|
return r(e) === "[object Array]";
|
|
4260
4433
|
};
|
|
4261
|
-
})),
|
|
4262
|
-
t.exports =
|
|
4263
|
-
})),
|
|
4264
|
-
var n = Z(), r = Q(), i = X(), a =
|
|
4434
|
+
})), wt = /* @__PURE__ */ t(((e, t) => {
|
|
4435
|
+
t.exports = Ct();
|
|
4436
|
+
})), Tt = /* @__PURE__ */ t(((e, t) => {
|
|
4437
|
+
var n = Z(), r = Q(), i = X(), a = wt(), o = n("%Reflect.apply%", !0) || r("Function.prototype.apply");
|
|
4265
4438
|
t.exports = function(e, t) {
|
|
4266
4439
|
var n = arguments.length > 2 ? arguments[2] : [];
|
|
4267
4440
|
if (!a(n)) throw new i("Assertion failed: optional `argumentsList`, if provided, must be a List");
|
|
4268
4441
|
return o(e, t, n);
|
|
4269
4442
|
};
|
|
4270
|
-
})),
|
|
4443
|
+
})), Et = /* @__PURE__ */ t(((e, t) => {
|
|
4271
4444
|
t.exports = {};
|
|
4272
|
-
})),
|
|
4273
|
-
|
|
4274
|
-
var
|
|
4445
|
+
})), Dt = /* @__PURE__ */ t(((e, t) => {
|
|
4446
|
+
i();
|
|
4447
|
+
var n = typeof Map == "function" && Map.prototype, a = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, o = n && a && typeof a.get == "function" ? a.get : null, s = n && Map.prototype.forEach, c = typeof Set == "function" && Set.prototype, l = Object.getOwnPropertyDescriptor && c ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, u = c && l && typeof l.get == "function" ? l.get : null, d = c && Set.prototype.forEach, f = typeof WeakMap == "function" && WeakMap.prototype ? WeakMap.prototype.has : null, p = typeof WeakSet == "function" && WeakSet.prototype ? WeakSet.prototype.has : null, m = typeof WeakRef == "function" && WeakRef.prototype ? WeakRef.prototype.deref : null, h = Boolean.prototype.valueOf, g = Object.prototype.toString, _ = Function.prototype.toString, v = String.prototype.match, y = String.prototype.slice, b = String.prototype.replace, x = String.prototype.toUpperCase, S = String.prototype.toLowerCase, C = RegExp.prototype.test, w = Array.prototype.concat, T = Array.prototype.join, E = Array.prototype.slice, D = Math.floor, O = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, k = Object.getOwnPropertySymbols, A = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, j = typeof Symbol == "function" && typeof Symbol.iterator == "object", M = typeof Symbol == "function" && Symbol.toStringTag ? Symbol.toStringTag : null, N = Object.prototype.propertyIsEnumerable, P = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
4275
4448
|
return e.__proto__;
|
|
4276
4449
|
} : null);
|
|
4277
4450
|
function F(e, t) {
|
|
@@ -4286,18 +4459,18 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4286
4459
|
}
|
|
4287
4460
|
return b.call(t, n, "$&_");
|
|
4288
4461
|
}
|
|
4289
|
-
var I =
|
|
4462
|
+
var I = Et(), L = I.custom, ee = ae(L) ? L : null, te = {
|
|
4290
4463
|
__proto__: null,
|
|
4291
4464
|
double: "\"",
|
|
4292
4465
|
single: "'"
|
|
4293
|
-
},
|
|
4466
|
+
}, R = {
|
|
4294
4467
|
__proto__: null,
|
|
4295
4468
|
double: /(["\\])/g,
|
|
4296
4469
|
single: /(['\\])/g
|
|
4297
4470
|
};
|
|
4298
|
-
t.exports = function e(t,
|
|
4299
|
-
var c =
|
|
4300
|
-
if (K(c, "quoteStyle") && !K(
|
|
4471
|
+
t.exports = function e(t, n, i, a) {
|
|
4472
|
+
var c = n || {};
|
|
4473
|
+
if (K(c, "quoteStyle") && !K(te, c.quoteStyle)) throw TypeError("option \"quoteStyle\" must be \"single\" or \"double\"");
|
|
4301
4474
|
if (K(c, "maxStringLength") && (typeof c.maxStringLength == "number" ? c.maxStringLength < 0 && c.maxStringLength !== Infinity : c.maxStringLength !== null)) throw TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`");
|
|
4302
4475
|
var l = K(c, "customInspect") ? c.customInspect : !0;
|
|
4303
4476
|
if (typeof l != "boolean" && l !== "symbol") throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
@@ -4318,7 +4491,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4318
4491
|
return f ? F(t, m) : m;
|
|
4319
4492
|
}
|
|
4320
4493
|
var g = c.depth === void 0 ? 5 : c.depth;
|
|
4321
|
-
if (i === void 0 && (i = 0), i >= g && g > 0 && typeof t == "object") return
|
|
4494
|
+
if (i === void 0 && (i = 0), i >= g && g > 0 && typeof t == "object") return V(t) ? "[Array]" : "[Object]";
|
|
4322
4495
|
var _ = be(c, i);
|
|
4323
4496
|
if (a === void 0) a = [];
|
|
4324
4497
|
else if (le(a, t) >= 0) return "[Circular]";
|
|
@@ -4329,7 +4502,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4329
4502
|
}
|
|
4330
4503
|
return e(t, c, i + 1, a);
|
|
4331
4504
|
}
|
|
4332
|
-
if (typeof t == "function" && !
|
|
4505
|
+
if (typeof t == "function" && !H(t)) {
|
|
4333
4506
|
var x = ce(t), C = Se(t, v);
|
|
4334
4507
|
return "[Function" + (x ? ": " + x : " (anonymous)") + "]" + (C.length > 0 ? " { " + T.call(C, ", ") + " }" : "");
|
|
4335
4508
|
}
|
|
@@ -4338,15 +4511,15 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4338
4511
|
return typeof t == "object" && !j ? Y(D) : D;
|
|
4339
4512
|
}
|
|
4340
4513
|
if (J(t)) {
|
|
4341
|
-
for (var k = "<" + S.call(String(t.nodeName)), L = t.attributes || [],
|
|
4514
|
+
for (var k = "<" + S.call(String(t.nodeName)), L = t.attributes || [], R = 0; R < L.length; R++) k += " " + L[R].name + "=" + z(ne(L[R].value), "double", c);
|
|
4342
4515
|
return k += ">", t.childNodes && t.childNodes.length && (k += "..."), k += "</" + S.call(String(t.nodeName)) + ">", k;
|
|
4343
4516
|
}
|
|
4344
|
-
if (
|
|
4517
|
+
if (V(t)) {
|
|
4345
4518
|
if (t.length === 0) return "[]";
|
|
4346
|
-
var
|
|
4347
|
-
return _ && !ye(
|
|
4519
|
+
var B = Se(t, v);
|
|
4520
|
+
return _ && !ye(B) ? "[" + xe(B, _) + "]" : "[ " + T.call(B, ", ") + " ]";
|
|
4348
4521
|
}
|
|
4349
|
-
if (
|
|
4522
|
+
if (U(t)) {
|
|
4350
4523
|
var se = Se(t, v);
|
|
4351
4524
|
return !("cause" in Error.prototype) && "cause" in t && !N.call(t, "cause") ? "{ [" + String(t) + "] " + T.call(w.call("[cause]: " + v(t.cause), se), ", ") + " }" : se.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + T.call(se, ", ") + " }";
|
|
4352
4525
|
}
|
|
@@ -4369,48 +4542,48 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4369
4542
|
if (de(t)) return _e("WeakMap");
|
|
4370
4543
|
if (me(t)) return _e("WeakSet");
|
|
4371
4544
|
if (fe(t)) return _e("WeakRef");
|
|
4372
|
-
if (
|
|
4545
|
+
if (ie(t)) return Y(v(Number(t)));
|
|
4373
4546
|
if (oe(t)) return Y(v(O.call(t)));
|
|
4374
|
-
if (
|
|
4375
|
-
if (
|
|
4547
|
+
if (G(t)) return Y(h.call(t));
|
|
4548
|
+
if (W(t)) return Y(v(String(t)));
|
|
4376
4549
|
if (typeof window < "u" && t === window) return "{ [object Window] }";
|
|
4377
|
-
if (typeof globalThis < "u" && t === globalThis ||
|
|
4378
|
-
if (!
|
|
4550
|
+
if (typeof globalThis < "u" && t === globalThis || r !== void 0 && t === r) return "{ [object globalThis] }";
|
|
4551
|
+
if (!re(t) && !H(t)) {
|
|
4379
4552
|
var we = Se(t, v), Te = P ? P(t) === Object.prototype : t instanceof Object || t.constructor === Object, Ee = t instanceof Object ? "" : "null prototype", De = !Te && M && Object(t) === t && M in t ? y.call(q(t), 8, -1) : Ee ? "Object" : "", Oe = (Te || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "") + (De || Ee ? "[" + T.call(w.call([], De || [], Ee || []), ": ") + "] " : "");
|
|
4380
4553
|
return we.length === 0 ? Oe + "{}" : _ ? Oe + "{" + xe(we, _) + "}" : Oe + "{ " + T.call(we, ", ") + " }";
|
|
4381
4554
|
}
|
|
4382
4555
|
return String(t);
|
|
4383
4556
|
};
|
|
4384
|
-
function
|
|
4385
|
-
var r =
|
|
4557
|
+
function z(e, t, n) {
|
|
4558
|
+
var r = te[n.quoteStyle || t];
|
|
4386
4559
|
return r + e + r;
|
|
4387
4560
|
}
|
|
4388
|
-
function
|
|
4561
|
+
function ne(e) {
|
|
4389
4562
|
return b.call(String(e), /"/g, """);
|
|
4390
4563
|
}
|
|
4391
|
-
function
|
|
4564
|
+
function B(e) {
|
|
4392
4565
|
return !M || !(typeof e == "object" && (M in e || e[M] !== void 0));
|
|
4393
4566
|
}
|
|
4394
|
-
function
|
|
4395
|
-
return q(e) === "[object Array]" &&
|
|
4396
|
-
}
|
|
4397
|
-
function W(e) {
|
|
4398
|
-
return q(e) === "[object Date]" && H(e);
|
|
4567
|
+
function V(e) {
|
|
4568
|
+
return q(e) === "[object Array]" && B(e);
|
|
4399
4569
|
}
|
|
4400
|
-
function
|
|
4401
|
-
return q(e) === "[object
|
|
4570
|
+
function re(e) {
|
|
4571
|
+
return q(e) === "[object Date]" && B(e);
|
|
4402
4572
|
}
|
|
4403
|
-
function
|
|
4404
|
-
return q(e) === "[object
|
|
4573
|
+
function H(e) {
|
|
4574
|
+
return q(e) === "[object RegExp]" && B(e);
|
|
4405
4575
|
}
|
|
4406
|
-
function
|
|
4407
|
-
return q(e) === "[object
|
|
4576
|
+
function U(e) {
|
|
4577
|
+
return q(e) === "[object Error]" && B(e);
|
|
4408
4578
|
}
|
|
4409
|
-
function
|
|
4410
|
-
return q(e) === "[object
|
|
4579
|
+
function W(e) {
|
|
4580
|
+
return q(e) === "[object String]" && B(e);
|
|
4411
4581
|
}
|
|
4412
4582
|
function ie(e) {
|
|
4413
|
-
return q(e) === "[object
|
|
4583
|
+
return q(e) === "[object Number]" && B(e);
|
|
4584
|
+
}
|
|
4585
|
+
function G(e) {
|
|
4586
|
+
return q(e) === "[object Boolean]" && B(e);
|
|
4414
4587
|
}
|
|
4415
4588
|
function ae(e) {
|
|
4416
4589
|
if (j) return e && typeof e == "object" && e instanceof Symbol;
|
|
@@ -4514,8 +4687,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4514
4687
|
var n = e.length - t.maxStringLength, r = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
4515
4688
|
return he(y.call(e, 0, t.maxStringLength), t) + r;
|
|
4516
4689
|
}
|
|
4517
|
-
var i =
|
|
4518
|
-
return i.lastIndex = 0,
|
|
4690
|
+
var i = R[t.quoteStyle || "single"];
|
|
4691
|
+
return i.lastIndex = 0, z(b.call(b.call(e, i, "\\$1"), /[\x00-\x1f]/g, ge), "single", t);
|
|
4519
4692
|
}
|
|
4520
4693
|
function ge(e) {
|
|
4521
4694
|
var t = e.charCodeAt(0), n = {
|
|
@@ -4557,7 +4730,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4557
4730
|
return n + T.call(e, "," + n) + "\n" + t.prev;
|
|
4558
4731
|
}
|
|
4559
4732
|
function Se(e, t) {
|
|
4560
|
-
var n =
|
|
4733
|
+
var n = V(e), r = [];
|
|
4561
4734
|
if (n) {
|
|
4562
4735
|
r.length = e.length;
|
|
4563
4736
|
for (var i = 0; i < e.length; i++) r[i] = K(e, i) ? t(e[i], e) : "";
|
|
@@ -4571,7 +4744,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4571
4744
|
if (typeof k == "function") for (var l = 0; l < a.length; l++) N.call(e, a[l]) && r.push("[" + t(a[l]) + "]: " + t(e[a[l]], e));
|
|
4572
4745
|
return r;
|
|
4573
4746
|
}
|
|
4574
|
-
})),
|
|
4747
|
+
})), Ot = /* @__PURE__ */ t(((e, t) => {
|
|
4575
4748
|
t.exports = function(e) {
|
|
4576
4749
|
return typeof e == "string" || typeof e == "symbol";
|
|
4577
4750
|
};
|
|
@@ -4579,20 +4752,20 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4579
4752
|
t.exports = function(e) {
|
|
4580
4753
|
return !!e && (typeof e == "function" || typeof e == "object");
|
|
4581
4754
|
};
|
|
4582
|
-
})),
|
|
4583
|
-
var n = X(), r =
|
|
4755
|
+
})), kt = /* @__PURE__ */ t(((e, t) => {
|
|
4756
|
+
var n = X(), r = Dt(), i = Ot(), a = $();
|
|
4584
4757
|
t.exports = function(e, t) {
|
|
4585
4758
|
if (!a(e)) throw new n("Assertion failed: Type(O) is not Object");
|
|
4586
4759
|
if (!i(t)) throw new n("Assertion failed: P is not a Property Key, got " + r(t));
|
|
4587
4760
|
return e[t];
|
|
4588
4761
|
};
|
|
4589
|
-
})),
|
|
4590
|
-
var n = X(), r =
|
|
4762
|
+
})), At = /* @__PURE__ */ t(((e, t) => {
|
|
4763
|
+
var n = X(), r = Dt(), i = Ot();
|
|
4591
4764
|
t.exports = function(e, t) {
|
|
4592
4765
|
if (!i(t)) throw new n("Assertion failed: P is not a Property Key, got " + r(t));
|
|
4593
4766
|
return e[t];
|
|
4594
4767
|
};
|
|
4595
|
-
})),
|
|
4768
|
+
})), jt = /* @__PURE__ */ t(((e, t) => {
|
|
4596
4769
|
var n = Function.prototype.toString, r = typeof Reflect == "object" && Reflect !== null && Reflect.apply, i, a;
|
|
4597
4770
|
if (typeof r == "function" && typeof Object.defineProperty == "function") try {
|
|
4598
4771
|
i = Object.defineProperty({}, "length", { get: function() {
|
|
@@ -4647,10 +4820,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4647
4820
|
var t = l.call(e);
|
|
4648
4821
|
return t !== d && t !== f && !/^\[object HTML/.test(t) ? !1 : c(e);
|
|
4649
4822
|
};
|
|
4650
|
-
})),
|
|
4651
|
-
t.exports =
|
|
4652
|
-
})),
|
|
4653
|
-
var n = X(), r =
|
|
4823
|
+
})), Mt = /* @__PURE__ */ t(((e, t) => {
|
|
4824
|
+
t.exports = jt();
|
|
4825
|
+
})), Nt = /* @__PURE__ */ t(((e, t) => {
|
|
4826
|
+
var n = X(), r = At(), i = Mt(), a = Ot(), o = Dt();
|
|
4654
4827
|
t.exports = function(e, t) {
|
|
4655
4828
|
if (!a(t)) throw new n("Assertion failed: P is not a Property Key");
|
|
4656
4829
|
var s = r(e, t);
|
|
@@ -4659,13 +4832,13 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4659
4832
|
return s;
|
|
4660
4833
|
}
|
|
4661
4834
|
};
|
|
4662
|
-
})),
|
|
4663
|
-
var n =
|
|
4835
|
+
})), Pt = /* @__PURE__ */ t(((e, t) => {
|
|
4836
|
+
var n = et();
|
|
4664
4837
|
t.exports = function() {
|
|
4665
4838
|
return n() && !!Symbol.toStringTag;
|
|
4666
4839
|
};
|
|
4667
|
-
})),
|
|
4668
|
-
var n = Q(), r =
|
|
4840
|
+
})), Ft = /* @__PURE__ */ t(((e, t) => {
|
|
4841
|
+
var n = Q(), r = Pt()(), i = pt(), a = Qe(), o;
|
|
4669
4842
|
if (r) {
|
|
4670
4843
|
var s = n("RegExp.prototype.exec"), c = {}, l = function() {
|
|
4671
4844
|
throw c;
|
|
@@ -4690,12 +4863,12 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4690
4863
|
};
|
|
4691
4864
|
}
|
|
4692
4865
|
t.exports = o;
|
|
4693
|
-
})),
|
|
4866
|
+
})), It = /* @__PURE__ */ t(((e, t) => {
|
|
4694
4867
|
t.exports = function(e) {
|
|
4695
4868
|
return !!e;
|
|
4696
4869
|
};
|
|
4697
|
-
})),
|
|
4698
|
-
var n = Z()("%Symbol.match%", !0), r =
|
|
4870
|
+
})), Lt = /* @__PURE__ */ t(((e, t) => {
|
|
4871
|
+
var n = Z()("%Symbol.match%", !0), r = Ft(), i = $(), a = It();
|
|
4699
4872
|
t.exports = function(e) {
|
|
4700
4873
|
if (!i(e)) return !1;
|
|
4701
4874
|
if (n) {
|
|
@@ -4704,19 +4877,19 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4704
4877
|
}
|
|
4705
4878
|
return r(e);
|
|
4706
4879
|
};
|
|
4707
|
-
})),
|
|
4880
|
+
})), Rt = /* @__PURE__ */ t(((e, t) => {
|
|
4708
4881
|
var n = Z()("%String%"), r = X();
|
|
4709
4882
|
t.exports = function(e) {
|
|
4710
4883
|
if (typeof e == "symbol") throw new r("Cannot convert a Symbol value to a string");
|
|
4711
4884
|
return n(e);
|
|
4712
4885
|
};
|
|
4713
|
-
})),
|
|
4886
|
+
})), zt = /* @__PURE__ */ t(((e, t) => {
|
|
4714
4887
|
var n = X();
|
|
4715
4888
|
t.exports = function(e) {
|
|
4716
4889
|
if (e == null) throw new n(arguments.length > 0 && arguments[1] || "Cannot call method on " + e);
|
|
4717
4890
|
return e;
|
|
4718
4891
|
};
|
|
4719
|
-
})),
|
|
4892
|
+
})), Bt = /* @__PURE__ */ t(((e, t) => {
|
|
4720
4893
|
var n = function() {
|
|
4721
4894
|
return typeof function() {}.name == "string";
|
|
4722
4895
|
}, r = Object.getOwnPropertyDescriptor;
|
|
@@ -4734,21 +4907,21 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4734
4907
|
n.boundFunctionsHaveNames = function() {
|
|
4735
4908
|
return n() && typeof i == "function" && function() {}.bind().name !== "";
|
|
4736
4909
|
}, t.exports = n;
|
|
4737
|
-
})),
|
|
4738
|
-
var n =
|
|
4910
|
+
})), Vt = /* @__PURE__ */ t(((e, t) => {
|
|
4911
|
+
var n = mt(), r = ht()(), i = Bt().functionsHaveConfigurableNames(), a = X();
|
|
4739
4912
|
t.exports = function(e, t) {
|
|
4740
4913
|
if (typeof e != "function") throw new a("`fn` is not a function");
|
|
4741
4914
|
return (!(arguments.length > 2 && arguments[2]) || i) && (r ? n(e, "name", t, !0, !0) : n(e, "name", t)), e;
|
|
4742
4915
|
};
|
|
4743
|
-
})),
|
|
4744
|
-
var n =
|
|
4916
|
+
})), Ht = /* @__PURE__ */ t(((e, t) => {
|
|
4917
|
+
var n = Vt(), r = X(), i = Object;
|
|
4745
4918
|
t.exports = n(function() {
|
|
4746
4919
|
if (this == null || this !== i(this)) throw new r("RegExp.prototype.flags getter called on non-object");
|
|
4747
4920
|
var e = "";
|
|
4748
4921
|
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;
|
|
4749
4922
|
}, "get flags", !0);
|
|
4750
|
-
})),
|
|
4751
|
-
var n =
|
|
4923
|
+
})), Ut = /* @__PURE__ */ t(((e, t) => {
|
|
4924
|
+
var n = Ht(), r = St().supportsDescriptors, i = Object.getOwnPropertyDescriptor;
|
|
4752
4925
|
t.exports = function() {
|
|
4753
4926
|
if (r && /a/gim.flags === "gim") {
|
|
4754
4927
|
var e = i(RegExp.prototype, "flags");
|
|
@@ -4763,8 +4936,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4763
4936
|
}
|
|
4764
4937
|
return n;
|
|
4765
4938
|
};
|
|
4766
|
-
})),
|
|
4767
|
-
var n =
|
|
4939
|
+
})), Wt = /* @__PURE__ */ t(((e, t) => {
|
|
4940
|
+
var n = St().supportsDescriptors, r = Ut(), i = Qe(), a = Object.defineProperty, o = Le(), s = ft(), c = /a/;
|
|
4768
4941
|
t.exports = function() {
|
|
4769
4942
|
if (!n || !s) throw new o("RegExp.prototype.flags requires a true ES5 environment that supports property descriptors");
|
|
4770
4943
|
var e = r(), t = s(c), l = i(t, "flags");
|
|
@@ -4774,29 +4947,29 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4774
4947
|
get: e
|
|
4775
4948
|
}), e;
|
|
4776
4949
|
};
|
|
4777
|
-
})),
|
|
4778
|
-
var n =
|
|
4950
|
+
})), Gt = /* @__PURE__ */ t(((e, t) => {
|
|
4951
|
+
var n = St(), r = vt(), i = Ht(), a = Ut(), o = Wt(), s = r(a());
|
|
4779
4952
|
n(s, {
|
|
4780
4953
|
getPolyfill: a,
|
|
4781
4954
|
implementation: i,
|
|
4782
4955
|
shim: o
|
|
4783
4956
|
}), t.exports = s;
|
|
4784
|
-
})),
|
|
4957
|
+
})), Kt = /* @__PURE__ */ t(((e, t) => {
|
|
4785
4958
|
t.exports = function(e) {
|
|
4786
4959
|
return typeof e == "number" && e >= 55296 && e <= 56319;
|
|
4787
4960
|
};
|
|
4788
|
-
})),
|
|
4961
|
+
})), qt = /* @__PURE__ */ t(((e, t) => {
|
|
4789
4962
|
t.exports = function(e) {
|
|
4790
4963
|
return typeof e == "number" && e >= 56320 && e <= 57343;
|
|
4791
4964
|
};
|
|
4792
|
-
})),
|
|
4793
|
-
var n = Z(), r = X(), i = n("%String.fromCharCode%"), a =
|
|
4965
|
+
})), Jt = /* @__PURE__ */ t(((e, t) => {
|
|
4966
|
+
var n = Z(), r = X(), i = n("%String.fromCharCode%"), a = Kt(), o = qt();
|
|
4794
4967
|
t.exports = function(e, t) {
|
|
4795
4968
|
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");
|
|
4796
4969
|
return i(e) + i(t);
|
|
4797
4970
|
};
|
|
4798
|
-
})),
|
|
4799
|
-
var n = X(), r = Q(), i =
|
|
4971
|
+
})), Yt = /* @__PURE__ */ t(((e, t) => {
|
|
4972
|
+
var n = X(), r = Q(), i = Kt(), a = qt(), o = Jt(), s = r("String.prototype.charAt"), c = r("String.prototype.charCodeAt");
|
|
4800
4973
|
t.exports = function(e, t) {
|
|
4801
4974
|
if (typeof e != "string") throw new n("Assertion failed: `string` must be a String");
|
|
4802
4975
|
var r = e.length;
|
|
@@ -4823,22 +4996,22 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4823
4996
|
"[[IsUnpairedSurrogate]]": !0
|
|
4824
4997
|
};
|
|
4825
4998
|
};
|
|
4826
|
-
})),
|
|
4827
|
-
var n =
|
|
4999
|
+
})), Xt = /* @__PURE__ */ t(((e, t) => {
|
|
5000
|
+
var n = Ye();
|
|
4828
5001
|
t.exports = function(e) {
|
|
4829
5002
|
return (typeof e == "number" || typeof e == "bigint") && !n(e) && e !== Infinity && e !== -Infinity;
|
|
4830
5003
|
};
|
|
4831
|
-
})),
|
|
4832
|
-
var n =
|
|
5004
|
+
})), Zt = /* @__PURE__ */ t(((e, t) => {
|
|
5005
|
+
var n = Ue(), r = We(), i = Ye(), a = Xt();
|
|
4833
5006
|
t.exports = function(e) {
|
|
4834
5007
|
if (typeof e != "number" || i(e) || !a(e)) return !1;
|
|
4835
5008
|
var t = n(e);
|
|
4836
5009
|
return r(t) === t;
|
|
4837
5010
|
};
|
|
4838
|
-
})),
|
|
5011
|
+
})), Qt = /* @__PURE__ */ t(((e, t) => {
|
|
4839
5012
|
t.exports = 2 ** 53 - 1 || 9007199254740991;
|
|
4840
|
-
})),
|
|
4841
|
-
var n =
|
|
5013
|
+
})), $t = /* @__PURE__ */ t(((e, t) => {
|
|
5014
|
+
var n = Yt(), r = X(), i = Zt(), a = Qt();
|
|
4842
5015
|
t.exports = function(e, t, o) {
|
|
4843
5016
|
if (typeof e != "string") throw new r("Assertion failed: `S` must be a String");
|
|
4844
5017
|
if (!i(t) || t < 0 || t > a) throw new r("Assertion failed: `length` must be an integer >= 0 and <= 2**53");
|
|
@@ -4847,7 +5020,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4847
5020
|
var s = e.length;
|
|
4848
5021
|
return t + 1 >= s ? t + 1 : t + n(e, t)["[[CodeUnitCount]]"];
|
|
4849
5022
|
};
|
|
4850
|
-
})),
|
|
5023
|
+
})), en = /* @__PURE__ */ t(((e, t) => {
|
|
4851
5024
|
var n = X();
|
|
4852
5025
|
t.exports = function(e, t) {
|
|
4853
5026
|
if (typeof t != "boolean") throw new n("Assertion failed: Type(done) is not Boolean");
|
|
@@ -4856,8 +5029,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4856
5029
|
done: t
|
|
4857
5030
|
};
|
|
4858
5031
|
};
|
|
4859
|
-
})),
|
|
4860
|
-
var n = X(), r =
|
|
5032
|
+
})), tn = /* @__PURE__ */ t(((e, t) => {
|
|
5033
|
+
var n = X(), r = pt(), i = {
|
|
4861
5034
|
__proto__: null,
|
|
4862
5035
|
"[[Configurable]]": !0,
|
|
4863
5036
|
"[[Enumerable]]": !0,
|
|
@@ -4873,8 +5046,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4873
5046
|
if (a && o) throw new n("Property Descriptors may not be both accessor and data descriptors");
|
|
4874
5047
|
return !0;
|
|
4875
5048
|
};
|
|
4876
|
-
})),
|
|
4877
|
-
var n =
|
|
5049
|
+
})), nn = /* @__PURE__ */ t(((e, t) => {
|
|
5050
|
+
var n = ht(), r = $e(), i = n.hasArrayLengthDefineBug(), a = i && Ct(), o = Q()("Object.prototype.propertyIsEnumerable");
|
|
4878
5051
|
t.exports = function(e, t, n, s, c, l) {
|
|
4879
5052
|
if (!r) {
|
|
4880
5053
|
if (!e(l) || !l["[[Configurable]]"] || !l["[[Writable]]"] || c in s && o(s, c) !== !!l["[[Enumerable]]"]) return !1;
|
|
@@ -4883,32 +5056,32 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4883
5056
|
}
|
|
4884
5057
|
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);
|
|
4885
5058
|
};
|
|
4886
|
-
})),
|
|
5059
|
+
})), rn = /* @__PURE__ */ t(((e, t) => {
|
|
4887
5060
|
t.exports = function(e) {
|
|
4888
5061
|
if (e === void 0) return e;
|
|
4889
5062
|
var t = {};
|
|
4890
5063
|
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;
|
|
4891
5064
|
};
|
|
4892
|
-
})),
|
|
4893
|
-
var n = X(), r =
|
|
5065
|
+
})), an = /* @__PURE__ */ t(((e, t) => {
|
|
5066
|
+
var n = X(), r = tn(), i = rn();
|
|
4894
5067
|
t.exports = function(e) {
|
|
4895
5068
|
if (e !== void 0 && !r(e)) throw new n("Assertion failed: `Desc` must be a Property Descriptor");
|
|
4896
5069
|
return i(e);
|
|
4897
5070
|
};
|
|
4898
|
-
})),
|
|
4899
|
-
var n = X(), r =
|
|
5071
|
+
})), on = /* @__PURE__ */ t(((e, t) => {
|
|
5072
|
+
var n = X(), r = pt(), i = tn();
|
|
4900
5073
|
t.exports = function(e) {
|
|
4901
5074
|
if (e === void 0) return !1;
|
|
4902
5075
|
if (!i(e)) throw new n("Assertion failed: `Desc` must be a Property Descriptor");
|
|
4903
5076
|
return !(!r(e, "[[Value]]") && !r(e, "[[Writable]]"));
|
|
4904
5077
|
};
|
|
4905
|
-
})),
|
|
4906
|
-
var n =
|
|
5078
|
+
})), sn = /* @__PURE__ */ t(((e, t) => {
|
|
5079
|
+
var n = Ye();
|
|
4907
5080
|
t.exports = function(e, t) {
|
|
4908
5081
|
return e === t ? e === 0 ? 1 / e == 1 / t : !0 : n(e) && n(t);
|
|
4909
5082
|
};
|
|
4910
|
-
})),
|
|
4911
|
-
var n =
|
|
5083
|
+
})), cn = /* @__PURE__ */ t(((e, t) => {
|
|
5084
|
+
var n = pt(), r = X(), i = $(), a = Mt(), o = It();
|
|
4912
5085
|
t.exports = function(e) {
|
|
4913
5086
|
if (!i(e)) throw new r("ToPropertyDescriptor requires an object");
|
|
4914
5087
|
var t = {};
|
|
@@ -4925,8 +5098,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4925
5098
|
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");
|
|
4926
5099
|
return t;
|
|
4927
5100
|
};
|
|
4928
|
-
})),
|
|
4929
|
-
var n = X(), r = $(), i =
|
|
5101
|
+
})), ln = /* @__PURE__ */ t(((e, t) => {
|
|
5102
|
+
var n = X(), r = $(), i = tn(), a = nn(), o = an(), s = on(), c = Ot(), l = sn(), u = cn();
|
|
4930
5103
|
t.exports = function(e, t, d) {
|
|
4931
5104
|
if (!r(e)) throw new n("Assertion failed: Type(O) is not Object");
|
|
4932
5105
|
if (!c(t)) throw new n("Assertion failed: P is not a Property Key");
|
|
@@ -4934,19 +5107,19 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4934
5107
|
if (!i(f)) throw new n("Assertion failed: Desc is not a valid Property Descriptor");
|
|
4935
5108
|
return a(s, l, o, e, t, f);
|
|
4936
5109
|
};
|
|
4937
|
-
})),
|
|
5110
|
+
})), un = /* @__PURE__ */ t(((e, t) => {
|
|
4938
5111
|
t.exports = function(e) {
|
|
4939
5112
|
return e === null || typeof e != "function" && typeof e != "object";
|
|
4940
5113
|
};
|
|
4941
|
-
})),
|
|
4942
|
-
var n = Z(), r = n("%Object.preventExtensions%", !0), i = n("%Object.isExtensible%", !0), a =
|
|
5114
|
+
})), dn = /* @__PURE__ */ t(((e, t) => {
|
|
5115
|
+
var n = Z(), r = n("%Object.preventExtensions%", !0), i = n("%Object.isExtensible%", !0), a = un();
|
|
4943
5116
|
t.exports = r ? function(e) {
|
|
4944
5117
|
return !a(e) && i(e);
|
|
4945
5118
|
} : function(e) {
|
|
4946
5119
|
return !a(e);
|
|
4947
5120
|
};
|
|
4948
|
-
})),
|
|
4949
|
-
var n = X(), r = $(), i =
|
|
5121
|
+
})), fn = /* @__PURE__ */ t(((e, t) => {
|
|
5122
|
+
var n = X(), r = $(), i = ln(), a = dn(), o = Ot();
|
|
4950
5123
|
t.exports = function(e, t, s, c) {
|
|
4951
5124
|
if (!r(e)) throw new n("Assertion failed: `homeObject` is not an Object");
|
|
4952
5125
|
if (!o(t)) throw new n("Assertion failed: `key` is not a Property Key or a Private Name");
|
|
@@ -4960,12 +5133,12 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
4960
5133
|
"[[Configurable]]": !0
|
|
4961
5134
|
});
|
|
4962
5135
|
};
|
|
4963
|
-
})),
|
|
5136
|
+
})), pn = /* @__PURE__ */ t(((e, t) => {
|
|
4964
5137
|
t.exports = function(e, t) {
|
|
4965
5138
|
for (var n = 0; n < e.length; n += 1) t(e[n], n, e);
|
|
4966
5139
|
};
|
|
4967
|
-
})),
|
|
4968
|
-
var n =
|
|
5140
|
+
})), mn = /* @__PURE__ */ t(((e, t) => {
|
|
5141
|
+
var n = Dt(), r = X(), i = function(e, t, n) {
|
|
4969
5142
|
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;
|
|
4970
5143
|
}, a = function(e, t) {
|
|
4971
5144
|
if (e) {
|
|
@@ -5005,8 +5178,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5005
5178
|
};
|
|
5006
5179
|
return t;
|
|
5007
5180
|
};
|
|
5008
|
-
})),
|
|
5009
|
-
var n = Z(), r = Q(), i =
|
|
5181
|
+
})), hn = /* @__PURE__ */ t(((e, t) => {
|
|
5182
|
+
var n = Z(), r = Q(), i = Dt(), a = X(), 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);
|
|
5010
5183
|
t.exports = !!o && function() {
|
|
5011
5184
|
var e, t = {
|
|
5012
5185
|
assert: function(e) {
|
|
@@ -5031,8 +5204,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5031
5204
|
};
|
|
5032
5205
|
return t;
|
|
5033
5206
|
};
|
|
5034
|
-
})),
|
|
5035
|
-
var n = Z(), r = Q(), i =
|
|
5207
|
+
})), gn = /* @__PURE__ */ t(((e, t) => {
|
|
5208
|
+
var n = Z(), r = Q(), i = Dt(), a = hn(), o = X(), 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);
|
|
5036
5209
|
t.exports = s ? function() {
|
|
5037
5210
|
var e, t, n = {
|
|
5038
5211
|
assert: function(e) {
|
|
@@ -5056,8 +5229,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5056
5229
|
};
|
|
5057
5230
|
return n;
|
|
5058
5231
|
} : a;
|
|
5059
|
-
})),
|
|
5060
|
-
var n = X(), r =
|
|
5232
|
+
})), _n = /* @__PURE__ */ t(((e, t) => {
|
|
5233
|
+
var n = X(), r = Dt(), i = mn(), a = hn(), o = gn() || a || i;
|
|
5061
5234
|
t.exports = function() {
|
|
5062
5235
|
var e, t = {
|
|
5063
5236
|
assert: function(e) {
|
|
@@ -5078,8 +5251,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5078
5251
|
};
|
|
5079
5252
|
return t;
|
|
5080
5253
|
};
|
|
5081
|
-
})),
|
|
5082
|
-
var n =
|
|
5254
|
+
})), vn = /* @__PURE__ */ t(((e, t) => {
|
|
5255
|
+
var n = pt(), r = _n()(), i = X(), a = {
|
|
5083
5256
|
assert: function(e, t) {
|
|
5084
5257
|
if (!e || typeof e != "object" && typeof e != "function") throw new i("`O` is not an object");
|
|
5085
5258
|
if (typeof t != "string") throw new i("`slot` must be a string");
|
|
@@ -5105,7 +5278,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5105
5278
|
}
|
|
5106
5279
|
};
|
|
5107
5280
|
Object.freeze && Object.freeze(a), t.exports = a;
|
|
5108
|
-
})),
|
|
5281
|
+
})), yn = /* @__PURE__ */ t(((e, t) => {
|
|
5109
5282
|
var n = {
|
|
5110
5283
|
__proto__: null,
|
|
5111
5284
|
foo: {}
|
|
@@ -5113,8 +5286,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5113
5286
|
t.exports = function() {
|
|
5114
5287
|
return r;
|
|
5115
5288
|
};
|
|
5116
|
-
})),
|
|
5117
|
-
var n = Z()("%Object.create%", !0), r = X(), i =
|
|
5289
|
+
})), bn = /* @__PURE__ */ t(((e, t) => {
|
|
5290
|
+
var n = Z()("%Object.create%", !0), r = X(), i = Ve(), a = $(), o = wt(), s = pn(), c = vn(), l = yn()();
|
|
5118
5291
|
t.exports = function(e) {
|
|
5119
5292
|
if (e !== null && !a(e)) throw new r("Assertion failed: `proto` must be null or an object");
|
|
5120
5293
|
var t = arguments.length < 2 ? [] : arguments[1];
|
|
@@ -5131,8 +5304,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5131
5304
|
c.set(u, e, void 0);
|
|
5132
5305
|
}), u;
|
|
5133
5306
|
};
|
|
5134
|
-
})),
|
|
5135
|
-
var n = X(), r = $(), i = Q()("RegExp.prototype.exec"), a =
|
|
5307
|
+
})), xn = /* @__PURE__ */ t(((e, t) => {
|
|
5308
|
+
var n = X(), r = $(), i = Q()("RegExp.prototype.exec"), a = Tt(), o = kt(), s = Mt();
|
|
5136
5309
|
t.exports = function(e, t) {
|
|
5137
5310
|
if (!r(e)) throw new n("Assertion failed: `R` must be an Object");
|
|
5138
5311
|
if (typeof t != "string") throw new n("Assertion failed: `S` must be a String");
|
|
@@ -5144,8 +5317,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5144
5317
|
}
|
|
5145
5318
|
return i(e, t);
|
|
5146
5319
|
};
|
|
5147
|
-
})),
|
|
5148
|
-
var n = X(), r = $(), i =
|
|
5320
|
+
})), Sn = /* @__PURE__ */ t(((e, t) => {
|
|
5321
|
+
var n = X(), r = $(), i = Ot(), a = sn(), o = function() {
|
|
5149
5322
|
try {
|
|
5150
5323
|
return delete 0, !0;
|
|
5151
5324
|
} catch {
|
|
@@ -5166,31 +5339,31 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5166
5339
|
return !1;
|
|
5167
5340
|
}
|
|
5168
5341
|
};
|
|
5169
|
-
})),
|
|
5342
|
+
})), Cn = /* @__PURE__ */ t(((e, t) => {
|
|
5170
5343
|
t.exports = function(e) {
|
|
5171
5344
|
return e === null || typeof e != "function" && typeof e != "object";
|
|
5172
5345
|
};
|
|
5173
|
-
})),
|
|
5346
|
+
})), wn = /* @__PURE__ */ t(((e, t) => {
|
|
5174
5347
|
var n = Q(), r = n("Date.prototype.getDay"), i = function(e) {
|
|
5175
5348
|
try {
|
|
5176
5349
|
return r(e), !0;
|
|
5177
5350
|
} catch {
|
|
5178
5351
|
return !1;
|
|
5179
5352
|
}
|
|
5180
|
-
}, a = n("Object.prototype.toString"), o = "[object Date]", s =
|
|
5353
|
+
}, a = n("Object.prototype.toString"), o = "[object Date]", s = Pt()();
|
|
5181
5354
|
t.exports = function(e) {
|
|
5182
5355
|
return typeof e != "object" || !e ? !1 : s ? i(e) : a(e) === o;
|
|
5183
5356
|
};
|
|
5184
|
-
})),
|
|
5185
|
-
var n = Q(), r =
|
|
5357
|
+
})), Tn = /* @__PURE__ */ t(((e, t) => {
|
|
5358
|
+
var n = Q(), r = Ft(), i = n("RegExp.prototype.exec"), a = X();
|
|
5186
5359
|
t.exports = function(e) {
|
|
5187
5360
|
if (!r(e)) throw new a("`regex` must be a RegExp");
|
|
5188
5361
|
return function(t) {
|
|
5189
5362
|
return i(e, t) !== null;
|
|
5190
5363
|
};
|
|
5191
5364
|
};
|
|
5192
|
-
})),
|
|
5193
|
-
var n = Q(), r = n("Object.prototype.toString"), i =
|
|
5365
|
+
})), En = /* @__PURE__ */ t(((e, t) => {
|
|
5366
|
+
var n = Q(), r = n("Object.prototype.toString"), i = tt()(), a = Tn();
|
|
5194
5367
|
if (i) {
|
|
5195
5368
|
var o = n("Symbol.prototype.toString"), s = a(/^Symbol\(.*\)$/), c = function(e) {
|
|
5196
5369
|
return typeof e.valueOf() == "symbol" ? s(o(e)) : !1;
|
|
@@ -5207,8 +5380,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5207
5380
|
} else t.exports = function(e) {
|
|
5208
5381
|
return !1;
|
|
5209
5382
|
};
|
|
5210
|
-
})),
|
|
5211
|
-
var n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol", r =
|
|
5383
|
+
})), Dn = /* @__PURE__ */ t(((e, t) => {
|
|
5384
|
+
var n = typeof Symbol == "function" && typeof Symbol.iterator == "symbol", r = Cn(), i = jt(), a = wn(), o = En(), s = function(e, t) {
|
|
5212
5385
|
if (e == null) throw TypeError("Cannot call method on " + e);
|
|
5213
5386
|
if (typeof t != "string" || t !== "number" && t !== "string") throw TypeError("hint must be \"string\" or \"number\"");
|
|
5214
5387
|
var n = t === "string" ? ["toString", "valueOf"] : ["valueOf", "toString"], a, o, s;
|
|
@@ -5233,29 +5406,29 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5233
5406
|
}
|
|
5234
5407
|
return t === "default" && (a(e) || o(e)) && (t = "string"), s(e, t === "default" ? "number" : t);
|
|
5235
5408
|
};
|
|
5236
|
-
})),
|
|
5237
|
-
var n =
|
|
5409
|
+
})), On = /* @__PURE__ */ t(((e, t) => {
|
|
5410
|
+
var n = Dn();
|
|
5238
5411
|
t.exports = function(e) {
|
|
5239
5412
|
return arguments.length > 1 ? n(e, arguments[1]) : n(e);
|
|
5240
5413
|
};
|
|
5241
|
-
})),
|
|
5242
|
-
var n =
|
|
5414
|
+
})), kn = /* @__PURE__ */ t(((e, t) => {
|
|
5415
|
+
var n = zt(), r = Rt(), i = Q()("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]+$/;
|
|
5243
5416
|
t.exports = function() {
|
|
5244
5417
|
return i(i(r(n(this)), o, ""), s, "");
|
|
5245
5418
|
};
|
|
5246
|
-
})),
|
|
5247
|
-
var n =
|
|
5419
|
+
})), An = /* @__PURE__ */ t(((e, t) => {
|
|
5420
|
+
var n = kn(), r = "", i = "";
|
|
5248
5421
|
t.exports = function() {
|
|
5249
5422
|
return String.prototype.trim && r.trim() === r && i.trim() === i && ("_" + i).trim() === "_" + i && (i + "_").trim() === i + "_" ? String.prototype.trim : n;
|
|
5250
5423
|
};
|
|
5251
|
-
})),
|
|
5252
|
-
var n =
|
|
5424
|
+
})), jn = /* @__PURE__ */ t(((e, t) => {
|
|
5425
|
+
var n = ht()(), r = mt(), i = An();
|
|
5253
5426
|
t.exports = function() {
|
|
5254
5427
|
var e = i();
|
|
5255
5428
|
return String.prototype.trim !== e && (n ? r(String.prototype, "trim", e, !0) : r(String.prototype, "trim", e)), e;
|
|
5256
5429
|
};
|
|
5257
|
-
})),
|
|
5258
|
-
var n =
|
|
5430
|
+
})), Mn = /* @__PURE__ */ t(((e, t) => {
|
|
5431
|
+
var n = vt(), r = St(), i = zt(), a = kn(), o = An(), s = jn(), c = n(o()), l = function(e) {
|
|
5259
5432
|
return i(e), c(e);
|
|
5260
5433
|
};
|
|
5261
5434
|
r(l, {
|
|
@@ -5263,12 +5436,12 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5263
5436
|
implementation: a,
|
|
5264
5437
|
shim: s
|
|
5265
5438
|
}), t.exports = l;
|
|
5266
|
-
})),
|
|
5267
|
-
var n = Z(), r = n("%RegExp%"), i = X(), a = n("%parseInt%"), o = Q(), s =
|
|
5439
|
+
})), Nn = /* @__PURE__ */ t(((e, t) => {
|
|
5440
|
+
var n = Z(), r = n("%RegExp%"), i = X(), a = n("%parseInt%"), o = Q(), s = Tn(), 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("[" + [
|
|
5268
5441
|
"
",
|
|
5269
5442
|
"",
|
|
5270
5443
|
""
|
|
5271
|
-
].join("") + "]", "g")), p =
|
|
5444
|
+
].join("") + "]", "g")), p = Mn();
|
|
5272
5445
|
t.exports = function e(t) {
|
|
5273
5446
|
if (typeof t != "string") throw new i("Assertion failed: `argument` is not a String");
|
|
5274
5447
|
if (l(t)) return +a(c(t, 2), 2);
|
|
@@ -5277,40 +5450,40 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5277
5450
|
var n = p(t);
|
|
5278
5451
|
return n === t ? +t : e(n);
|
|
5279
5452
|
};
|
|
5280
|
-
})),
|
|
5281
|
-
var n = Z(), r = X(), i = n("%Number%"), a =
|
|
5453
|
+
})), Pn = /* @__PURE__ */ t(((e, t) => {
|
|
5454
|
+
var n = Z(), r = X(), i = n("%Number%"), a = un(), o = On(), s = Nn();
|
|
5282
5455
|
t.exports = function(e) {
|
|
5283
5456
|
var t = a(e) ? e : o(e, i);
|
|
5284
5457
|
if (typeof t == "symbol") throw new r("Cannot convert a Symbol value to a number");
|
|
5285
5458
|
if (typeof t == "bigint") throw new r("Conversion from 'BigInt' to 'number' is not allowed.");
|
|
5286
5459
|
return typeof t == "string" ? s(t) : +t;
|
|
5287
5460
|
};
|
|
5288
|
-
})),
|
|
5289
|
-
var n =
|
|
5461
|
+
})), Fn = /* @__PURE__ */ t(((e, t) => {
|
|
5462
|
+
var n = We();
|
|
5290
5463
|
t.exports = function(e) {
|
|
5291
5464
|
return typeof e == "bigint" ? e : n(e);
|
|
5292
5465
|
};
|
|
5293
|
-
})),
|
|
5294
|
-
var n =
|
|
5466
|
+
})), In = /* @__PURE__ */ t(((e, t) => {
|
|
5467
|
+
var n = Fn(), r = X();
|
|
5295
5468
|
t.exports = function(e) {
|
|
5296
5469
|
if (typeof e != "number" && typeof e != "bigint") throw new r("argument must be a Number or a BigInt");
|
|
5297
5470
|
var t = e < 0 ? -n(-e) : n(e);
|
|
5298
5471
|
return t === 0 ? 0 : t;
|
|
5299
5472
|
};
|
|
5300
|
-
})),
|
|
5301
|
-
var n =
|
|
5473
|
+
})), Ln = /* @__PURE__ */ t(((e, t) => {
|
|
5474
|
+
var n = Pn(), r = In(), i = Ye(), a = Xt();
|
|
5302
5475
|
t.exports = function(e) {
|
|
5303
5476
|
var t = n(e);
|
|
5304
5477
|
return i(t) || t === 0 ? 0 : a(t) ? r(t) : t;
|
|
5305
5478
|
};
|
|
5306
|
-
})),
|
|
5307
|
-
var n =
|
|
5479
|
+
})), Rn = /* @__PURE__ */ t(((e, t) => {
|
|
5480
|
+
var n = Qt(), r = Ln();
|
|
5308
5481
|
t.exports = function(e) {
|
|
5309
5482
|
var t = r(e);
|
|
5310
5483
|
return t <= 0 ? 0 : t > n ? n : t;
|
|
5311
5484
|
};
|
|
5312
|
-
})),
|
|
5313
|
-
var n = Z()("%Object.defineProperty%", !0), r =
|
|
5485
|
+
})), zn = /* @__PURE__ */ t(((e, t) => {
|
|
5486
|
+
var n = Z()("%Object.defineProperty%", !0), r = Pt()(), i = pt(), a = X(), o = r ? Symbol.toStringTag : null;
|
|
5314
5487
|
t.exports = function(e, t) {
|
|
5315
5488
|
var r = arguments.length > 2 && !!arguments[2] && arguments[2].force, s = arguments.length > 2 && !!arguments[2] && arguments[2].nonConfigurable;
|
|
5316
5489
|
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");
|
|
@@ -5321,8 +5494,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5321
5494
|
writable: !1
|
|
5322
5495
|
}) : e[o] = t);
|
|
5323
5496
|
};
|
|
5324
|
-
})),
|
|
5325
|
-
var n = Z(), r =
|
|
5497
|
+
})), Bn = /* @__PURE__ */ t(((e, t) => {
|
|
5498
|
+
var n = Z(), r = tt()(), i = X(), a = $(), o = n("%IteratorPrototype%", !0), s = $t(), c = en(), l = fn(), u = kt(), d = bn(), f = xn(), p = Sn(), m = Rn(), h = Rt(), g = vn(), _ = zn(), v = function(e, t, n, r) {
|
|
5326
5499
|
if (typeof t != "string") throw new i("`S` must be a string");
|
|
5327
5500
|
if (typeof n != "boolean") throw new i("`global` must be a boolean");
|
|
5328
5501
|
if (typeof r != "boolean") throw new i("`fullUnicode` must be a boolean");
|
|
@@ -5340,10 +5513,10 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5340
5513
|
}, !1)), t.exports = function(e, t, n, r) {
|
|
5341
5514
|
return new v(e, t, n, r);
|
|
5342
5515
|
};
|
|
5343
|
-
})),
|
|
5516
|
+
})), Vn = /* @__PURE__ */ t(((e, t) => {
|
|
5344
5517
|
t.exports = Z();
|
|
5345
|
-
})),
|
|
5346
|
-
var n =
|
|
5518
|
+
})), Hn = /* @__PURE__ */ t(((e, t) => {
|
|
5519
|
+
var n = Vn()("%Reflect.construct%", !0), r = ln();
|
|
5347
5520
|
try {
|
|
5348
5521
|
r({}, "", { "[[Get]]": function() {} });
|
|
5349
5522
|
} catch {
|
|
@@ -5366,8 +5539,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5366
5539
|
} else t.exports = function(e) {
|
|
5367
5540
|
return typeof e == "function" && !!e.prototype;
|
|
5368
5541
|
};
|
|
5369
|
-
})),
|
|
5370
|
-
var n = Z()("%Symbol.species%", !0), r = X(), i = $(), a =
|
|
5542
|
+
})), Un = /* @__PURE__ */ t(((e, t) => {
|
|
5543
|
+
var n = Z()("%Symbol.species%", !0), r = X(), i = $(), a = Hn();
|
|
5371
5544
|
t.exports = function(e, t) {
|
|
5372
5545
|
if (!i(e)) throw new r("Assertion failed: Type(O) is not Object");
|
|
5373
5546
|
var o = e.constructor;
|
|
@@ -5378,7 +5551,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5378
5551
|
if (a(s)) return s;
|
|
5379
5552
|
throw new r("no constructor found");
|
|
5380
5553
|
};
|
|
5381
|
-
})),
|
|
5554
|
+
})), Wn = /* @__PURE__ */ t(((e, t) => {
|
|
5382
5555
|
var n = $();
|
|
5383
5556
|
t.exports = function(e) {
|
|
5384
5557
|
if (e === null) return "Null";
|
|
@@ -5388,13 +5561,13 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5388
5561
|
if (typeof e == "boolean") return "Boolean";
|
|
5389
5562
|
if (typeof e == "string") return "String";
|
|
5390
5563
|
};
|
|
5391
|
-
})),
|
|
5392
|
-
var n =
|
|
5564
|
+
})), Gn = /* @__PURE__ */ t(((e, t) => {
|
|
5565
|
+
var n = Wn();
|
|
5393
5566
|
t.exports = function(e) {
|
|
5394
5567
|
return typeof e == "symbol" ? "Symbol" : typeof e == "bigint" ? "BigInt" : n(e);
|
|
5395
5568
|
};
|
|
5396
|
-
})),
|
|
5397
|
-
var n =
|
|
5569
|
+
})), Kn = /* @__PURE__ */ t(((e, t) => {
|
|
5570
|
+
var n = Bn(), r = kt(), i = Sn(), a = Un(), o = Rn(), s = Rt(), c = Gn(), l = Gt(), u = Vt(), d = Q(), f = Z(), p = X(), m = d("String.prototype.indexOf"), h = f("%RegExp%"), g = "flags" in h.prototype, _ = function(e, t) {
|
|
5398
5571
|
var n, i = "flags" in t ? r(t, "flags") : s(l(t));
|
|
5399
5572
|
return n = g && typeof i == "string" ? new e(t, i) : e === h ? new e(t.source, i) : new e(t, i), {
|
|
5400
5573
|
flags: i,
|
|
@@ -5407,13 +5580,13 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5407
5580
|
var l = s(e), u = _(a(t, h), t), d = u.flags, f = u.matcher;
|
|
5408
5581
|
return i(f, "lastIndex", o(r(t, "lastIndex")), !0), n(f, l, m(d, "g") > -1, m(d, "u") > -1);
|
|
5409
5582
|
}, "[Symbol.matchAll]", !0);
|
|
5410
|
-
})),
|
|
5411
|
-
var n =
|
|
5583
|
+
})), qn = /* @__PURE__ */ t(((e, t) => {
|
|
5584
|
+
var n = tt()(), r = Kn();
|
|
5412
5585
|
t.exports = function() {
|
|
5413
5586
|
return !n || typeof Symbol.matchAll != "symbol" || typeof RegExp.prototype[Symbol.matchAll] != "function" ? r : RegExp.prototype[Symbol.matchAll];
|
|
5414
5587
|
};
|
|
5415
|
-
})),
|
|
5416
|
-
var n =
|
|
5588
|
+
})), Jn = /* @__PURE__ */ t(((e, t) => {
|
|
5589
|
+
var n = Tt(), r = kt(), i = Nt(), a = Lt(), o = Rt(), s = zt(), c = Q(), l = tt()(), u = Gt(), d = Z(), f = X(), p = d("%RegExp%"), m = c("String.prototype.indexOf"), h = qn(), g = function(e) {
|
|
5417
5590
|
var t = h();
|
|
5418
5591
|
if (l && typeof Symbol.matchAll == "symbol") {
|
|
5419
5592
|
var n = i(e, Symbol.matchAll);
|
|
@@ -5434,8 +5607,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5434
5607
|
var l = o(t), d = new p(e, "g");
|
|
5435
5608
|
return n(g(d), d, [l]);
|
|
5436
5609
|
};
|
|
5437
|
-
})),
|
|
5438
|
-
var n =
|
|
5610
|
+
})), Yn = /* @__PURE__ */ t(((e, t) => {
|
|
5611
|
+
var n = Jn();
|
|
5439
5612
|
t.exports = function() {
|
|
5440
5613
|
if (String.prototype.matchAll) try {
|
|
5441
5614
|
"".matchAll(RegExp.prototype);
|
|
@@ -5444,8 +5617,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5444
5617
|
}
|
|
5445
5618
|
return n;
|
|
5446
5619
|
};
|
|
5447
|
-
})),
|
|
5448
|
-
var n =
|
|
5620
|
+
})), Xn = /* @__PURE__ */ t(((e, t) => {
|
|
5621
|
+
var n = St(), r = tt()(), i = Qe(), a = Yn(), o = qn(), s = Object.defineProperty;
|
|
5449
5622
|
t.exports = function() {
|
|
5450
5623
|
var e = a();
|
|
5451
5624
|
if (n(String.prototype, { matchAll: e }, { matchAll: function() {
|
|
@@ -5472,29 +5645,31 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5472
5645
|
}
|
|
5473
5646
|
return e;
|
|
5474
5647
|
};
|
|
5475
|
-
})),
|
|
5476
|
-
var n =
|
|
5648
|
+
})), Zn = /* @__PURE__ */ t(((e, t) => {
|
|
5649
|
+
var n = vt(), r = St(), i = Jn(), a = Yn(), o = Xn(), s = n(i);
|
|
5477
5650
|
r(s, {
|
|
5478
5651
|
getPolyfill: a,
|
|
5479
5652
|
implementation: i,
|
|
5480
5653
|
shim: o
|
|
5481
5654
|
}), t.exports = s;
|
|
5482
|
-
})),
|
|
5483
|
-
|
|
5484
|
-
var
|
|
5655
|
+
})), Qn = /* @__PURE__ */ t(((e, t) => {
|
|
5656
|
+
i();
|
|
5657
|
+
var o = A(), s = F(), c = I(), l = q(), u = P(), d = ve(), f = Fe(), p = j(), m = a(), h = /\${?([\w\d]+)}?/g, g = p.EventEmitter || p.default || p;
|
|
5485
5658
|
String.prototype.regexIndexOf = function(e, t) {
|
|
5486
5659
|
let n = this.substring(t || 0).search(e);
|
|
5487
5660
|
return n >= 0 ? n + (t || 0) : n;
|
|
5488
|
-
},
|
|
5489
|
-
var
|
|
5661
|
+
}, Zn().shim();
|
|
5662
|
+
var _ = class e extends g {
|
|
5490
5663
|
constructor(t) {
|
|
5491
5664
|
super();
|
|
5492
|
-
let { path: n = "/bin", profile: r, hostname:
|
|
5493
|
-
this.context = new
|
|
5665
|
+
let { path: n = "/bin", profile: r, hostname: i = "browser", filesystem: a = {}, permissions: s = {}, cwd: c = "/", onFsChange: l, useRealFilesystem: u = !1 } = t;
|
|
5666
|
+
this.context = new o(Object.assign({}, t, {
|
|
5494
5667
|
clearFn: this.clear.bind(this),
|
|
5495
5668
|
destroyFn: this.destroy.bind(this),
|
|
5496
5669
|
onFsChange: typeof l == "function" ? l : null
|
|
5497
|
-
})), this.context.setVar("PATH", n), this.context.setVar("HOST",
|
|
5670
|
+
})), this.context.setVar("PATH", n), this.context.setVar("HOST", i), u ? this.context.setNodeFilesystem(c) : this.context.setFilesystem(a, s), this.context.setCwd(c);
|
|
5671
|
+
let d = u || this.context.fs.exists(this.context.getVar("PATH"));
|
|
5672
|
+
this._loadDefaultCommands(), this._loadBuiltinCommands(d), this._lastCode = 0, r ? this._loadProfile(r) : setTimeout(() => this.emit("status", e.STATUS_READY), 0);
|
|
5498
5673
|
}
|
|
5499
5674
|
get path() {
|
|
5500
5675
|
return this.context.getVar("PATH");
|
|
@@ -5512,14 +5687,14 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5512
5687
|
if (this.runningCommand && this.runningCommand.onInput && this.runningCommand.captureInput) return this.runningCommand.onInput(e), !0;
|
|
5513
5688
|
}
|
|
5514
5689
|
_loadDefaultCommands() {
|
|
5515
|
-
|
|
5690
|
+
f.forEach((e) => {
|
|
5516
5691
|
this.context.setCommand(e);
|
|
5517
5692
|
});
|
|
5518
5693
|
}
|
|
5519
|
-
_loadBuiltinCommands() {
|
|
5520
|
-
|
|
5694
|
+
_loadBuiltinCommands(e = !1) {
|
|
5695
|
+
d.forEach((e) => {
|
|
5521
5696
|
this.context.setCommand(e);
|
|
5522
|
-
});
|
|
5697
|
+
}), e || this.context.fs.setMode(this.context.getVar("PATH"), 365);
|
|
5523
5698
|
}
|
|
5524
5699
|
_loadProfile(e) {
|
|
5525
5700
|
this.onCommand(`source ${e}`);
|
|
@@ -5552,26 +5727,46 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5552
5727
|
return;
|
|
5553
5728
|
}
|
|
5554
5729
|
if (!n.length) return;
|
|
5555
|
-
let r = n.shift(), i =
|
|
5556
|
-
|
|
5557
|
-
|
|
5730
|
+
let r = n.shift().value, i = null, a = !1, o = [];
|
|
5731
|
+
for (let e = 0; e < n.length; e++) {
|
|
5732
|
+
let { value: t, hasQuote: r } = n[e];
|
|
5733
|
+
!r && (t === ">>" || t === ">") && e + 1 < n.length ? (a = t === ">>", i = n[++e].value) : !r && t.startsWith(">>") && t.length > 2 ? (a = !0, i = t.slice(2)) : !r && t.startsWith(">") && t.length > 1 ? (a = !1, i = t.slice(1)) : o.push(t);
|
|
5734
|
+
}
|
|
5735
|
+
n = o;
|
|
5736
|
+
let l = this.context.getAlias(r);
|
|
5737
|
+
if (l) return this.onCommand(l, !1);
|
|
5738
|
+
let u;
|
|
5558
5739
|
try {
|
|
5559
|
-
|
|
5740
|
+
u = this._parseCommand(r.startsWith("/") || r.startsWith("./") ? r : r.toLowerCase());
|
|
5560
5741
|
} catch (e) {
|
|
5561
5742
|
this.emit("stdErr", e.message), this.lastCode = 1, this.emit("exitCode", this.lastCode);
|
|
5562
5743
|
return;
|
|
5563
5744
|
}
|
|
5564
|
-
let
|
|
5565
|
-
if (
|
|
5566
|
-
else if (
|
|
5745
|
+
let d = (e) => typeof e == "function" && typeof e.prototype.run == "function" && typeof e.prototype.runCommand == "function", f;
|
|
5746
|
+
if (u.prototype instanceof s || new u() instanceof c) f = new u(n, this.context);
|
|
5747
|
+
else if (d(u)) f = new u(n);
|
|
5567
5748
|
else {
|
|
5568
5749
|
this.emit("stdErr", `${r}: Command not found`), this.lastCode = 1, this.emit("exitCode", this.lastCode);
|
|
5569
5750
|
return;
|
|
5570
5751
|
}
|
|
5571
|
-
return
|
|
5752
|
+
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) => {
|
|
5572
5753
|
this._emitOutput(e);
|
|
5573
|
-
}),
|
|
5574
|
-
|
|
5754
|
+
}), f.runCommand().then((e) => {
|
|
5755
|
+
let t = e.getStdOutput();
|
|
5756
|
+
if (i) {
|
|
5757
|
+
let e = this.context.fs.absolutePath(i), n = t.filter((e) => e.type === "out").map((e) => e.string), r = a ? (() => {
|
|
5758
|
+
let t = this.context.fs._getFileRaw(e);
|
|
5759
|
+
return typeof t == "string" ? t + "\n" + n.join("\n") : n.join("\n");
|
|
5760
|
+
})() : n.join("\n");
|
|
5761
|
+
try {
|
|
5762
|
+
this.context.fs.setFileByPath(e, r, !0);
|
|
5763
|
+
} catch {
|
|
5764
|
+
this.emit("stdErr", `${i}: Permission denied`), this.lastCode = 1, this.emit("exitCode", this.lastCode), delete this.runningCommand;
|
|
5765
|
+
return;
|
|
5766
|
+
}
|
|
5767
|
+
this._emitOutput(t.filter((e) => e.type === "err"));
|
|
5768
|
+
} else this._emitOutput(t);
|
|
5769
|
+
this.lastCode = e.getExitCode(), this.emit("exitCode", this.lastCode), delete this.runningCommand;
|
|
5575
5770
|
});
|
|
5576
5771
|
}
|
|
5577
5772
|
_emitOutput(e) {
|
|
@@ -5637,7 +5832,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5637
5832
|
}
|
|
5638
5833
|
_parseCommand(e) {
|
|
5639
5834
|
if (e.startsWith("./") || e.startsWith("/")) {
|
|
5640
|
-
let t = this.context.fs.
|
|
5835
|
+
let t = this.context.fs._getFileRaw(e);
|
|
5641
5836
|
if (!t) throw Error(`${e}: No such file or directory`);
|
|
5642
5837
|
if (t.constructor === Object) throw Error(`${e}: is a directory`);
|
|
5643
5838
|
if (t.prototype && typeof t.prototype.run == "function" && typeof t.prototype.runCommand == "function") {
|
|
@@ -5646,11 +5841,19 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5646
5841
|
}
|
|
5647
5842
|
if (t.constructor === String && t.startsWith("#!")) {
|
|
5648
5843
|
if (!this.context.fs.isExecutable(e)) throw Error(`${e}: permission denied`);
|
|
5649
|
-
return
|
|
5844
|
+
return c.bind(this, t);
|
|
5650
5845
|
}
|
|
5651
5846
|
if (this._isWasmFile(e, t)) {
|
|
5652
5847
|
if (!this.context.fs.isExecutable(e)) throw Error(`${e}: permission denied`);
|
|
5653
|
-
return
|
|
5848
|
+
return l.bind(null, e);
|
|
5849
|
+
}
|
|
5850
|
+
if (this.context.fs.isRealFilesystem && typeof t == "string" && e.endsWith(".js")) {
|
|
5851
|
+
if (!this.context.fs.isExecutable(e)) throw Error(`${e}: permission denied`);
|
|
5852
|
+
let t = this.context.fs.absolutePath(e);
|
|
5853
|
+
try {
|
|
5854
|
+
let e = n(t), r = e.default || e;
|
|
5855
|
+
if (typeof r == "function" && typeof r.prototype.run == "function" && typeof r.prototype.runCommand == "function") return r;
|
|
5856
|
+
} catch {}
|
|
5654
5857
|
}
|
|
5655
5858
|
throw Error(`${e}: permission denied`);
|
|
5656
5859
|
}
|
|
@@ -5663,7 +5866,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5663
5866
|
return (await Promise.all(n.map(({ value: e, hasQuote: t }) => this._replaceVariables(e).then((e) => ({
|
|
5664
5867
|
value: e,
|
|
5665
5868
|
hasQuote: t
|
|
5666
|
-
}))))).filter(({ value: e, hasQuote: t }) => e.length > 0 || t)
|
|
5869
|
+
}))))).filter(({ value: e, hasQuote: t }) => e.length > 0 || t);
|
|
5667
5870
|
}
|
|
5668
5871
|
static _sanitiseCommandPart(e) {
|
|
5669
5872
|
return e.startsWith("\"") && e.endsWith("\"") || e.startsWith("'") && e.endsWith("'") ? e.substring(1, e.length - 1) : e;
|
|
@@ -5679,7 +5882,7 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5679
5882
|
let n = await this._runAndCapture(e[1]);
|
|
5680
5883
|
t = t.replace(e[0], n);
|
|
5681
5884
|
}
|
|
5682
|
-
let i = t.matchAll(
|
|
5885
|
+
let i = t.matchAll(h), a = i.next();
|
|
5683
5886
|
for (; !a.done;) {
|
|
5684
5887
|
let n = this.context.getVar(a.value[1]);
|
|
5685
5888
|
t = t.replace(new RegExp(e._escapeRegExp(a.value[0]), "g"), String(n)), a = i.next();
|
|
@@ -5696,14 +5899,14 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5696
5899
|
}
|
|
5697
5900
|
}
|
|
5698
5901
|
async _runAndCapture(e) {
|
|
5699
|
-
let t = new
|
|
5902
|
+
let t = new r.shell({
|
|
5700
5903
|
cwd: this.context.fs.cwd,
|
|
5701
5904
|
filesystem: this.context.fs.getRaw(),
|
|
5702
5905
|
permissions: this.context.fs.getRawPermissions()
|
|
5703
5906
|
});
|
|
5704
5907
|
t.context.source(this.context);
|
|
5705
|
-
let
|
|
5706
|
-
return t.on("stdOut", (e) =>
|
|
5908
|
+
let n = [];
|
|
5909
|
+
return t.on("stdOut", (e) => n.push(e)), await t.onCommand(e, !1), n.join("\n").trimEnd();
|
|
5707
5910
|
}
|
|
5708
5911
|
static _splitCommand(e) {
|
|
5709
5912
|
let t = /\s/g, n = !1, r = !1, i = 0, a = [], o = !1, s = [];
|
|
@@ -5749,8 +5952,8 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
5749
5952
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
5750
5953
|
}
|
|
5751
5954
|
};
|
|
5752
|
-
|
|
5753
|
-
})),
|
|
5955
|
+
_.STATUS_READY = "READY", _.STATUS_WORKING = "WORKING", _.STATUS_DESTROYED = "DESTROYED", _.Command = u, _.FS = m, r.shell = _, t.exports = _;
|
|
5956
|
+
})), $n = /* @__PURE__ */ t(((e) => {
|
|
5754
5957
|
(function(t, n) {
|
|
5755
5958
|
if (typeof define == "function" && define.amd) define(["exports"], n);
|
|
5756
5959
|
else if (typeof e == "object" && typeof e.nodeName != "string") n(e);
|
|
@@ -6091,11 +6294,11 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
6091
6294
|
}
|
|
6092
6295
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = r;
|
|
6093
6296
|
});
|
|
6094
|
-
})),
|
|
6095
|
-
var n =
|
|
6297
|
+
})), er = /* @__PURE__ */ t((() => {})), tr = /* @__PURE__ */ t(((e, t) => {
|
|
6298
|
+
var n = Qn(), r = $n(), i = r?.default ?? r, a = "/.brsh_history";
|
|
6096
6299
|
t.exports = class {
|
|
6097
6300
|
constructor(e) {
|
|
6098
|
-
let { el: t, font:
|
|
6301
|
+
let { el: t, font: r = "Roboto Mono", cursor: a = "none", outputAnimation: o = "none", animateSpeed: s = 1, onExit: c = null, mobileInput: l = "click", lineWrap: u = !1 } = e;
|
|
6099
6302
|
if (!t) throw Error("you must set `el` option");
|
|
6100
6303
|
if (![
|
|
6101
6304
|
"none",
|
|
@@ -6104,12 +6307,12 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
6104
6307
|
].includes(a)) throw Error("cursor value must be one of: 'none', 'block', 'blink'");
|
|
6105
6308
|
if (!["none", "type"].includes(o)) throw Error("outputAnimation value must be one of: 'none', 'type'");
|
|
6106
6309
|
if (!Number.isInteger(s) || s < 1 || s > 20) throw Error("animateSpeed value must be between 1 and 20");
|
|
6107
|
-
this._exitFn = c, this._cursor = a, this._outputAnimation = o, this._animateSpeed = s, this._lineWrap = u, this._working = !1, this.cli = new n(e), this._buffer = [], this._cursorPos = 0, this._history = [], this._historyPos = null, this._savedInput = null, this._historyLoaded = !1, this._el = t, this._ansi = new
|
|
6310
|
+
this._exitFn = c, this._cursor = a, this._outputAnimation = o, this._animateSpeed = s, this._lineWrap = u, this._working = !1, this.cli = new n(e), this._buffer = [], this._cursorPos = 0, this._history = [], this._historyPos = null, this._savedInput = null, this._historyLoaded = !1, this._el = t, this._ansi = new i(), this._ansi.use_classes = !0, this._ansi.url_whitelist = {
|
|
6108
6311
|
http: !0,
|
|
6109
6312
|
https: !0,
|
|
6110
6313
|
tel: !0,
|
|
6111
6314
|
mailto: !0
|
|
6112
|
-
}, this._setupDom(this._el,
|
|
6315
|
+
}, this._setupDom(this._el, r), this._attachShellListeners(), l === "click" && this._mobileInput();
|
|
6113
6316
|
}
|
|
6114
6317
|
sendKey(e, t = {}) {
|
|
6115
6318
|
let { alt: n = !1, ctrl: r = !1 } = t, i = this._setCurrentLine.bind(this);
|
|
@@ -6221,13 +6424,13 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
6221
6424
|
}
|
|
6222
6425
|
_loadHistory() {
|
|
6223
6426
|
try {
|
|
6224
|
-
let e = this.cli.context.fs.
|
|
6427
|
+
let e = this.cli.context.fs._getFileRaw(a);
|
|
6225
6428
|
e && typeof e == "string" && e.length > 0 && (this._history = e.split("\n").filter((e) => e.length > 0));
|
|
6226
6429
|
} catch {}
|
|
6227
6430
|
}
|
|
6228
6431
|
_saveHistory() {
|
|
6229
6432
|
try {
|
|
6230
|
-
this.cli.context.fs.
|
|
6433
|
+
this.cli.context.fs._setFileRaw(a, this._history.join("\n"), !0);
|
|
6231
6434
|
} catch {}
|
|
6232
6435
|
}
|
|
6233
6436
|
_navigateHistory(e, t) {
|
|
@@ -6319,9 +6522,9 @@ var V, H, U, W, te, ne, G, re, ie, ae, oe = e((() => {
|
|
|
6319
6522
|
}
|
|
6320
6523
|
}
|
|
6321
6524
|
}
|
|
6322
|
-
},
|
|
6525
|
+
}, er();
|
|
6323
6526
|
}));
|
|
6324
6527
|
//#endregion
|
|
6325
|
-
export default
|
|
6528
|
+
export default tr();
|
|
6326
6529
|
|
|
6327
6530
|
//# sourceMappingURL=terminal.es.js.map
|