@prozilla-os/terminal 1.1.18 → 1.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/chunks/cat-DGK7wWrK.js +16 -0
  2. package/dist/chunks/{cat-DO8KEMio.js.map → cat-DGK7wWrK.js.map} +1 -1
  3. package/dist/chunks/{cd-DFGtb_Wk.js → cd-DvjkW_6o.js} +5 -6
  4. package/dist/chunks/{cd-DFGtb_Wk.js.map → cd-DvjkW_6o.js.map} +1 -1
  5. package/dist/chunks/{clear-DtYBxmDr.js → clear-BF9eb1Dq.js} +2 -2
  6. package/dist/chunks/{clear-DtYBxmDr.js.map → clear-BF9eb1Dq.js.map} +1 -1
  7. package/dist/chunks/{cmatrix-CVXcw_wK.js → cmatrix-VYovsHQW.js} +4 -5
  8. package/dist/chunks/{cmatrix-CVXcw_wK.js.map → cmatrix-VYovsHQW.js.map} +1 -1
  9. package/dist/chunks/compgen-3TwdgHm_.js +13 -0
  10. package/dist/chunks/{compgen-WxsGxWC9.js.map → compgen-3TwdgHm_.js.map} +1 -1
  11. package/dist/chunks/{cowsay-DZHMvxAZ.js → cowsay-IfArfPSJ.js} +4 -5
  12. package/dist/chunks/{cowsay-DZHMvxAZ.js.map → cowsay-IfArfPSJ.js.map} +1 -1
  13. package/dist/chunks/{dir-BlrznBqV.js → dir-B_Ipo5xb.js} +2 -2
  14. package/dist/chunks/{dir-BlrznBqV.js.map → dir-B_Ipo5xb.js.map} +1 -1
  15. package/dist/chunks/{echo-PyZ6XYF6.js → echo-DX-Ar2Ut.js} +2 -2
  16. package/dist/chunks/{echo-PyZ6XYF6.js.map → echo-DX-Ar2Ut.js.map} +1 -1
  17. package/dist/chunks/{eval-CnKC-mrj.js → eval-C7InkmFY.js} +2 -2
  18. package/dist/chunks/{eval-CnKC-mrj.js.map → eval-C7InkmFY.js.map} +1 -1
  19. package/dist/chunks/{exit-CizX3N_u.js → exit-D7PPqtiE.js} +2 -2
  20. package/dist/chunks/{exit-CizX3N_u.js.map → exit-D7PPqtiE.js.map} +1 -1
  21. package/dist/chunks/{fortune-Cs0PtMgs.js → fortune-zyxpnYNP.js} +2 -2
  22. package/dist/chunks/{fortune-Cs0PtMgs.js.map → fortune-zyxpnYNP.js.map} +1 -1
  23. package/dist/chunks/{help-DnMOR9rH.js → help-BEgNbwLL.js} +8 -9
  24. package/dist/chunks/{help-DnMOR9rH.js.map → help-BEgNbwLL.js.map} +1 -1
  25. package/dist/chunks/{hostname-BBOQWx6L.js → hostname-DU1lQde2.js} +2 -2
  26. package/dist/chunks/{hostname-BBOQWx6L.js.map → hostname-DU1lQde2.js.map} +1 -1
  27. package/dist/chunks/lolcat-5-mBWD9l.js +35 -0
  28. package/dist/chunks/{lolcat-vYhIbqEJ.js.map → lolcat-5-mBWD9l.js.map} +1 -1
  29. package/dist/chunks/{ls-23P3QzxI.js → ls-DnkSPHVM.js} +4 -5
  30. package/dist/chunks/{ls-23P3QzxI.js.map → ls-DnkSPHVM.js.map} +1 -1
  31. package/dist/chunks/{main-Dvaf0Ocd.js → main-CXiltWT-.js} +385 -335
  32. package/dist/chunks/main-CXiltWT-.js.map +1 -0
  33. package/dist/chunks/{make-CKvFYB_1.js → make-DqVQDThH.js} +2 -3
  34. package/dist/chunks/{make-CKvFYB_1.js.map → make-DqVQDThH.js.map} +1 -1
  35. package/dist/chunks/{man-BN3-oDjw.js → man-D_hBUTDt.js} +4 -5
  36. package/dist/chunks/{man-BN3-oDjw.js.map → man-D_hBUTDt.js.map} +1 -1
  37. package/dist/chunks/{mkdir-BTSAC1PK.js → mkdir-BCvMrPTX.js} +2 -2
  38. package/dist/chunks/{mkdir-BTSAC1PK.js.map → mkdir-BCvMrPTX.js.map} +1 -1
  39. package/dist/chunks/{neofetch-UHKALL5e.js → neofetch-BFHOITJj.js} +10 -11
  40. package/dist/chunks/neofetch-BFHOITJj.js.map +1 -0
  41. package/dist/chunks/{pwd-CSapfDtw.js → pwd-C21tQanw.js} +2 -2
  42. package/dist/chunks/{pwd-CSapfDtw.js.map → pwd-C21tQanw.js.map} +1 -1
  43. package/dist/chunks/{reboot-Bwxhoa8q.js → reboot-C2t7a3Av.js} +2 -2
  44. package/dist/chunks/{reboot-Bwxhoa8q.js.map → reboot-C2t7a3Av.js.map} +1 -1
  45. package/dist/chunks/reload-C9o_dGZw.js +10 -0
  46. package/dist/chunks/{reload-RsBNPWJI.js.map → reload-C9o_dGZw.js.map} +1 -1
  47. package/dist/chunks/{rev-C8qQIyj_.js → rev-CBibYebM.js} +2 -2
  48. package/dist/chunks/{rev-C8qQIyj_.js.map → rev-CBibYebM.js.map} +1 -1
  49. package/dist/chunks/rm-ChTrwld4.js +12 -0
  50. package/dist/chunks/{rm-B4-5j-xh.js.map → rm-ChTrwld4.js.map} +1 -1
  51. package/dist/chunks/rmdir-CUM4xt2w.js +11 -0
  52. package/dist/chunks/{rmdir-hAWOHScY.js.map → rmdir-CUM4xt2w.js.map} +1 -1
  53. package/dist/chunks/{sl-yhx6cve3.js → sl-DrATMkz6.js} +4 -5
  54. package/dist/chunks/{sl-yhx6cve3.js.map → sl-DrATMkz6.js.map} +1 -1
  55. package/dist/chunks/touch-CqBIAjMe.js +19 -0
  56. package/dist/chunks/{touch-DptR1Wm4.js.map → touch-CqBIAjMe.js.map} +1 -1
  57. package/dist/chunks/{uptime-BYmCcOUM.js → uptime-xM-0FRzA.js} +2 -2
  58. package/dist/chunks/{uptime-BYmCcOUM.js.map → uptime-xM-0FRzA.js.map} +1 -1
  59. package/dist/chunks/whatis-vXemLo9m.js +13 -0
  60. package/dist/chunks/{whatis-CFFc4GDV.js.map → whatis-vXemLo9m.js.map} +1 -1
  61. package/dist/chunks/{whoami-CQNGmqxL.js → whoami-CnUR69yX.js} +2 -2
  62. package/dist/chunks/{whoami-CQNGmqxL.js.map → whoami-CnUR69yX.js.map} +1 -1
  63. package/dist/main.d.ts +101 -1
  64. package/dist/main.js +5 -2
  65. package/dist/main.js.map +1 -1
  66. package/package.json +5 -5
  67. package/dist/chunks/cat-DO8KEMio.js +0 -17
  68. package/dist/chunks/command-nBL1aO7T.js +0 -43
  69. package/dist/chunks/command-nBL1aO7T.js.map +0 -1
  70. package/dist/chunks/compgen-WxsGxWC9.js +0 -14
  71. package/dist/chunks/lolcat-vYhIbqEJ.js +0 -36
  72. package/dist/chunks/main-Dvaf0Ocd.js.map +0 -1
  73. package/dist/chunks/neofetch-UHKALL5e.js.map +0 -1
  74. package/dist/chunks/reload-RsBNPWJI.js +0 -11
  75. package/dist/chunks/rm-B4-5j-xh.js +0 -13
  76. package/dist/chunks/rmdir-hAWOHScY.js +0 -12
  77. package/dist/chunks/touch-DptR1Wm4.js +0 -20
  78. package/dist/chunks/whatis-CFFc4GDV.js +0 -14
@@ -1,18 +1,22 @@
1
- var Pe = Object.defineProperty;
2
- var Me = (e, n, s) => n in e ? Pe(e, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[n] = s;
3
- var W = (e, n, s) => Me(e, typeof n != "symbol" ? n + "" : n, s);
4
- import { useSystemManager as De, useVirtualRoot as Re, useSettingsManager as He, App as xe, AppsConfig as je } from "@prozilla-os/core";
5
- import { jsx as L, jsxs as Y } from "react/jsx-runtime";
6
- import * as q from "react";
7
- import { forwardRef as Fe, useState as S, useRef as pe, useEffect as z } from "react";
8
- import { ANSI as _, EventEmitter as Je, clamp as Ve, removeFromArray as de } from "@prozilla-os/shared";
9
- const We = "_Terminal_1n5va_1", ze = "_Prefix_1n5va_26", qe = "_Input_1n5va_32", Ge = "_Output_1n5va_32", Be = "_blink_1n5va_1", N = {
10
- Terminal: We,
11
- Prefix: ze,
12
- Input: qe,
13
- Output: Ge,
1
+ var He = Object.defineProperty;
2
+ var pe = (t) => {
3
+ throw TypeError(t);
4
+ };
5
+ var je = (t, e, s) => e in t ? He(t, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : t[e] = s;
6
+ var S = (t, e, s) => je(t, typeof e != "symbol" ? e + "" : e, s), de = (t, e, s) => e.has(t) || pe("Cannot " + s);
7
+ var _e = (t, e, s) => (de(t, e, "read from private field"), s ? s.call(t) : e.get(t)), ve = (t, e, s) => e.has(t) ? pe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, s), be = (t, e, s, n) => (de(t, e, "write to private field"), n ? n.call(t, s) : e.set(t, s), s);
8
+ import { useSystemManager as Fe, useVirtualRoot as qe, useSettingsManager as Je, App as Ve, AppsConfig as We } from "@prozilla-os/core";
9
+ import { jsx as N, jsxs as Y } from "react/jsx-runtime";
10
+ import * as G from "react";
11
+ import { forwardRef as ze, useState as T, useRef as ye, useEffect as z } from "react";
12
+ import { ANSI as v, EventEmitter as Ge, clamp as Be, removeFromArray as we } from "@prozilla-os/shared";
13
+ const Ke = "_Terminal_1n5va_1", Ue = "_Prefix_1n5va_26", Xe = "_Input_1n5va_32", Ze = "_Output_1n5va_32", Qe = "_blink_1n5va_1", M = {
14
+ Terminal: Ke,
15
+ Prefix: Ue,
16
+ Input: Xe,
17
+ Output: Ze,
14
18
  "Input-container": "_Input-container_1n5va_47",
15
- blink: Be,
19
+ blink: Qe,
16
20
  "ansi-black-fg": "_ansi-black-fg_1n5va_99",
17
21
  "ansi-red-fg": "_ansi-red-fg_1n5va_100",
18
22
  "ansi-green-fg": "_ansi-green-fg_1n5va_101",
@@ -39,26 +43,26 @@ const We = "_Terminal_1n5va_1", ze = "_Prefix_1n5va_26", qe = "_Input_1n5va_32",
39
43
  "ansi-white-bg": "_ansi-white-bg_1n5va_124",
40
44
  "ansi-dim": "_ansi-dim_1n5va_126"
41
45
  };
42
- function Ke(e) {
43
- return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
46
+ function Ye(t) {
47
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
44
48
  }
45
- var ve = /* @__PURE__ */ function() {
46
- function e(n, s) {
47
- for (var t = 0; t < s.length; t++) {
48
- var f = s[t];
49
- f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(n, f.key, f);
49
+ var ke = /* @__PURE__ */ function() {
50
+ function t(e, s) {
51
+ for (var n = 0; n < s.length; n++) {
52
+ var f = s[n];
53
+ f.enumerable = f.enumerable || !1, f.configurable = !0, "value" in f && (f.writable = !0), Object.defineProperty(e, f.key, f);
50
54
  }
51
55
  }
52
- return function(n, s, t) {
53
- return s && e(n.prototype, s), t && e(n, t), n;
56
+ return function(e, s, n) {
57
+ return s && t(e.prototype, s), n && t(e, n), e;
54
58
  };
55
59
  }();
56
- function Ue(e, n) {
57
- if (!(e instanceof n))
60
+ function et(t, e) {
61
+ if (!(t instanceof e))
58
62
  throw new TypeError("Cannot call a class as a function");
59
63
  }
60
- var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class: "ansi-red" }, { color: "0, 187, 0", class: "ansi-green" }, { color: "187, 187, 0", class: "ansi-yellow" }, { color: "0, 0, 187", class: "ansi-blue" }, { color: "187, 0, 187", class: "ansi-magenta" }, { color: "0, 187, 187", class: "ansi-cyan" }, { color: "255,255,255", class: "ansi-white" }], [{ color: "85, 85, 85", class: "ansi-bright-black" }, { color: "255, 85, 85", class: "ansi-bright-red" }, { color: "0, 255, 0", class: "ansi-bright-green" }, { color: "255, 255, 85", class: "ansi-bright-yellow" }, { color: "85, 85, 255", class: "ansi-bright-blue" }, { color: "255, 85, 255", class: "ansi-bright-magenta" }, { color: "85, 255, 255", class: "ansi-bright-cyan" }, { color: "255, 255, 255", class: "ansi-bright-white" }]], Xe = /(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm, Ze = function() {
61
- ve(e, null, [{
64
+ var L = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class: "ansi-red" }, { color: "0, 187, 0", class: "ansi-green" }, { color: "187, 187, 0", class: "ansi-yellow" }, { color: "0, 0, 187", class: "ansi-blue" }, { color: "187, 0, 187", class: "ansi-magenta" }, { color: "0, 187, 187", class: "ansi-cyan" }, { color: "255,255,255", class: "ansi-white" }], [{ color: "85, 85, 85", class: "ansi-bright-black" }, { color: "255, 85, 85", class: "ansi-bright-red" }, { color: "0, 255, 0", class: "ansi-bright-green" }, { color: "255, 255, 85", class: "ansi-bright-yellow" }, { color: "85, 85, 255", class: "ansi-bright-blue" }, { color: "255, 85, 255", class: "ansi-bright-magenta" }, { color: "85, 255, 255", class: "ansi-bright-cyan" }, { color: "255, 255, 255", class: "ansi-bright-white" }]], tt = /(https?:\/\/(?:[A-Za-z0-9#;/?:@=+$',_.!~*()[\]-]|&amp;|%[A-Fa-f0-9]{2})+)/gm, st = function() {
65
+ ke(t, null, [{
62
66
  key: "escapeForHtml",
63
67
  /**
64
68
  * Anser.escapeForHtml
@@ -74,7 +78,7 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
74
78
  * @returns {String} The escaped html.
75
79
  */
76
80
  value: function(s) {
77
- return new e().escapeForHtml(s);
81
+ return new t().escapeForHtml(s);
78
82
  }
79
83
  /**
80
84
  * Anser.linkify
@@ -91,7 +95,7 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
91
95
  }, {
92
96
  key: "linkify",
93
97
  value: function(s) {
94
- return new e().linkify(s);
98
+ return new t().linkify(s);
95
99
  }
96
100
  /**
97
101
  * Anser.ansiToHtml
@@ -119,8 +123,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
119
123
  */
120
124
  }, {
121
125
  key: "ansiToHtml",
122
- value: function(s, t) {
123
- return new e().ansiToHtml(s, t);
126
+ value: function(s, n) {
127
+ return new t().ansiToHtml(s, n);
124
128
  }
125
129
  /**
126
130
  * Anser.ansiToJson
@@ -134,8 +138,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
134
138
  */
135
139
  }, {
136
140
  key: "ansiToJson",
137
- value: function(s, t) {
138
- return new e().ansiToJson(s, t);
141
+ value: function(s, n) {
142
+ return new t().ansiToJson(s, n);
139
143
  }
140
144
  /**
141
145
  * Anser.ansiToText
@@ -149,7 +153,7 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
149
153
  }, {
150
154
  key: "ansiToText",
151
155
  value: function(s) {
152
- return new e().ansiToText(s);
156
+ return new t().ansiToText(s);
153
157
  }
154
158
  /**
155
159
  * Anser
@@ -160,22 +164,22 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
160
164
  * @returns {Anser}
161
165
  */
162
166
  }]);
163
- function e() {
164
- Ue(this, e), this.fg = this.bg = this.fg_truecolor = this.bg_truecolor = null, this.bright = 0, this.decorations = [];
167
+ function t() {
168
+ et(this, t), this.fg = this.bg = this.fg_truecolor = this.bg_truecolor = null, this.bright = 0, this.decorations = [];
165
169
  }
166
- return ve(e, [{
170
+ return ke(t, [{
167
171
  key: "setupPalette",
168
172
  value: function() {
169
173
  this.PALETTE_COLORS = [];
170
174
  for (var s = 0; s < 2; ++s)
171
- for (var t = 0; t < 8; ++t)
172
- this.PALETTE_COLORS.push(A[s][t].color);
173
- for (var f = [0, 95, 135, 175, 215, 255], y = function(i, b, k) {
174
- return f[i] + ", " + f[b] + ", " + f[k];
175
- }, a = 0; a < 6; ++a)
175
+ for (var n = 0; n < 8; ++n)
176
+ this.PALETTE_COLORS.push(L[s][n].color);
177
+ for (var f = [0, 95, 135, 175, 215, 255], y = function(a, b, k) {
178
+ return f[a] + ", " + f[b] + ", " + f[k];
179
+ }, i = 0; i < 6; ++i)
176
180
  for (var u = 0; u < 6; ++u)
177
181
  for (var c = 0; c < 6; ++c)
178
- this.PALETTE_COLORS.push(y(a, u, c));
182
+ this.PALETTE_COLORS.push(y(i, u, c));
179
183
  for (var o = 8, r = 0; r < 24; ++r, o += 10)
180
184
  this.PALETTE_COLORS.push(y(o, o, o));
181
185
  }
@@ -191,8 +195,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
191
195
  }, {
192
196
  key: "escapeForHtml",
193
197
  value: function(s) {
194
- return s.replace(/[&<>\"]/gm, function(t) {
195
- return t == "&" ? "&amp;" : t == '"' ? "&quot;" : t == "<" ? "&lt;" : t == ">" ? "&gt;" : "";
198
+ return s.replace(/[&<>\"]/gm, function(n) {
199
+ return n == "&" ? "&amp;" : n == '"' ? "&quot;" : n == "<" ? "&lt;" : n == ">" ? "&gt;" : "";
196
200
  });
197
201
  }
198
202
  /**
@@ -207,8 +211,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
207
211
  }, {
208
212
  key: "linkify",
209
213
  value: function(s) {
210
- return s.replace(Xe, function(t) {
211
- return '<a href="' + t + '">' + t + "</a>";
214
+ return s.replace(tt, function(n) {
215
+ return '<a href="' + n + '">' + n + "</a>";
212
216
  });
213
217
  }
214
218
  /**
@@ -223,8 +227,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
223
227
  */
224
228
  }, {
225
229
  key: "ansiToHtml",
226
- value: function(s, t) {
227
- return this.process(s, t, !0);
230
+ value: function(s, n) {
231
+ return this.process(s, n, !0);
228
232
  }
229
233
  /**
230
234
  * ansiToJson
@@ -238,8 +242,8 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
238
242
  */
239
243
  }, {
240
244
  key: "ansiToJson",
241
- value: function(s, t) {
242
- return t = t || {}, t.json = !0, t.clearLine = !1, this.process(s, t, !0);
245
+ value: function(s, n) {
246
+ return n = n || {}, n.json = !0, n.clearLine = !1, this.process(s, n, !0);
243
247
  }
244
248
  /**
245
249
  * ansiToText
@@ -271,16 +275,16 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
271
275
  */
272
276
  }, {
273
277
  key: "process",
274
- value: function(s, t, f) {
275
- var y = this, a = this, u = s.split(/\033\[/), c = u.shift();
276
- t == null && (t = {}), t.clearLine = /\r/.test(s);
277
- var o = u.map(function(v) {
278
- return y.processChunk(v, t, f);
278
+ value: function(s, n, f) {
279
+ var y = this, i = this, u = s.split(/\033\[/), c = u.shift();
280
+ n == null && (n = {}), n.clearLine = /\r/.test(s);
281
+ var o = u.map(function(_) {
282
+ return y.processChunk(_, n, f);
279
283
  });
280
- if (t && t.json) {
281
- var r = a.processChunkJson("");
282
- return r.content = c, r.clearLine = t.clearLine, o.unshift(r), t.remove_empty && (o = o.filter(function(v) {
283
- return !v.isEmpty();
284
+ if (n && n.json) {
285
+ var r = i.processChunkJson("");
286
+ return r.content = c, r.clearLine = n.clearLine, o.unshift(r), n.remove_empty && (o = o.filter(function(_) {
287
+ return !_.isEmpty();
284
288
  })), o;
285
289
  } else
286
290
  o.unshift(c);
@@ -313,16 +317,16 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
313
317
  */
314
318
  }, {
315
319
  key: "processChunkJson",
316
- value: function(s, t, f) {
317
- t = typeof t > "u" ? {} : t;
318
- var y = t.use_classes = typeof t.use_classes < "u" && t.use_classes, a = t.key = y ? "class" : "color", u = {
320
+ value: function(s, n, f) {
321
+ n = typeof n > "u" ? {} : n;
322
+ var y = n.use_classes = typeof n.use_classes < "u" && n.use_classes, i = n.key = y ? "class" : "color", u = {
319
323
  content: s,
320
324
  fg: null,
321
325
  bg: null,
322
326
  fg_truecolor: null,
323
327
  bg_truecolor: null,
324
328
  isInverted: !1,
325
- clearLine: t.clearLine,
329
+ clearLine: n.clearLine,
326
330
  decoration: null,
327
331
  decorations: [],
328
332
  was_processed: !1,
@@ -336,55 +340,55 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
336
340
  if (c[1] !== "" || c[3] !== "m" || !f)
337
341
  return u;
338
342
  for (var r = this; o.length > 0; ) {
339
- var v = o.shift(), i = parseInt(v);
340
- if (isNaN(i) || i === 0)
343
+ var _ = o.shift(), a = parseInt(_);
344
+ if (isNaN(a) || a === 0)
341
345
  r.fg = r.bg = null, r.decorations = [];
342
- else if (i === 1)
346
+ else if (a === 1)
343
347
  r.decorations.push("bold");
344
- else if (i === 2)
348
+ else if (a === 2)
345
349
  r.decorations.push("dim");
346
- else if (i === 3)
350
+ else if (a === 3)
347
351
  r.decorations.push("italic");
348
- else if (i === 4)
352
+ else if (a === 4)
349
353
  r.decorations.push("underline");
350
- else if (i === 5)
354
+ else if (a === 5)
351
355
  r.decorations.push("blink");
352
- else if (i === 7)
356
+ else if (a === 7)
353
357
  r.decorations.push("reverse");
354
- else if (i === 8)
358
+ else if (a === 8)
355
359
  r.decorations.push("hidden");
356
- else if (i === 9)
360
+ else if (a === 9)
357
361
  r.decorations.push("strikethrough");
358
- else if (i === 21)
362
+ else if (a === 21)
359
363
  r.removeDecoration("bold");
360
- else if (i === 22)
364
+ else if (a === 22)
361
365
  r.removeDecoration("bold"), r.removeDecoration("dim");
362
- else if (i === 23)
366
+ else if (a === 23)
363
367
  r.removeDecoration("italic");
364
- else if (i === 24)
368
+ else if (a === 24)
365
369
  r.removeDecoration("underline");
366
- else if (i === 25)
370
+ else if (a === 25)
367
371
  r.removeDecoration("blink");
368
- else if (i === 27)
372
+ else if (a === 27)
369
373
  r.removeDecoration("reverse");
370
- else if (i === 28)
374
+ else if (a === 28)
371
375
  r.removeDecoration("hidden");
372
- else if (i === 29)
376
+ else if (a === 29)
373
377
  r.removeDecoration("strikethrough");
374
- else if (i === 39)
378
+ else if (a === 39)
375
379
  r.fg = null;
376
- else if (i === 49)
380
+ else if (a === 49)
377
381
  r.bg = null;
378
- else if (i >= 30 && i < 38)
379
- r.fg = A[0][i % 10][a];
380
- else if (i >= 90 && i < 98)
381
- r.fg = A[1][i % 10][a];
382
- else if (i >= 40 && i < 48)
383
- r.bg = A[0][i % 10][a];
384
- else if (i >= 100 && i < 108)
385
- r.bg = A[1][i % 10][a];
386
- else if (i === 38 || i === 48) {
387
- var b = i === 38;
382
+ else if (a >= 30 && a < 38)
383
+ r.fg = L[0][a % 10][i];
384
+ else if (a >= 90 && a < 98)
385
+ r.fg = L[1][a % 10][i];
386
+ else if (a >= 40 && a < 48)
387
+ r.bg = L[0][a % 10][i];
388
+ else if (a >= 100 && a < 108)
389
+ r.bg = L[1][a % 10][i];
390
+ else if (a === 38 || a === 48) {
391
+ var b = a === 38;
388
392
  if (o.length >= 1) {
389
393
  var k = o.shift();
390
394
  if (k === "5" && o.length >= 1) {
@@ -393,14 +397,14 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
393
397
  if (!y)
394
398
  this.PALETTE_COLORS || r.setupPalette(), b ? r.fg = this.PALETTE_COLORS[h] : r.bg = this.PALETTE_COLORS[h];
395
399
  else {
396
- var $ = h >= 16 ? "ansi-palette-" + h : A[h > 7 ? 1 : 0][h % 8].class;
397
- b ? r.fg = $ : r.bg = $;
400
+ var E = h >= 16 ? "ansi-palette-" + h : L[h > 7 ? 1 : 0][h % 8].class;
401
+ b ? r.fg = E : r.bg = E;
398
402
  }
399
403
  } else if (k === "2" && o.length >= 3) {
400
- var O = parseInt(o.shift()), M = parseInt(o.shift()), D = parseInt(o.shift());
401
- if (O >= 0 && O <= 255 && M >= 0 && M <= 255 && D >= 0 && D <= 255) {
402
- var T = O + ", " + M + ", " + D;
403
- y ? b ? (r.fg = "ansi-truecolor", r.fg_truecolor = T) : (r.bg = "ansi-truecolor", r.bg_truecolor = T) : b ? r.fg = T : r.bg = T;
404
+ var $ = parseInt(o.shift()), R = parseInt(o.shift()), D = parseInt(o.shift());
405
+ if ($ >= 0 && $ <= 255 && R >= 0 && R <= 255 && D >= 0 && D <= 255) {
406
+ var A = $ + ", " + R + ", " + D;
407
+ y ? b ? (r.fg = "ansi-truecolor", r.fg_truecolor = A) : (r.bg = "ansi-truecolor", r.bg_truecolor = A) : b ? r.fg = A : r.bg = A;
404
408
  }
405
409
  }
406
410
  }
@@ -425,201 +429,201 @@ var A = [[{ color: "0, 0, 0", class: "ansi-black" }, { color: "187, 0, 0", class
425
429
  */
426
430
  }, {
427
431
  key: "processChunk",
428
- value: function(s, t, f) {
432
+ value: function(s, n, f) {
429
433
  var y = this;
430
- t = t || {};
431
- var a = this.processChunkJson(s, t, f), u = t.use_classes;
432
- if (a.decorations = a.decorations.filter(function(b) {
434
+ n = n || {};
435
+ var i = this.processChunkJson(s, n, f), u = n.use_classes;
436
+ if (i.decorations = i.decorations.filter(function(b) {
433
437
  if (b === "reverse") {
434
- a.fg || (a.fg = A[0][7][u ? "class" : "color"]), a.bg || (a.bg = A[0][0][u ? "class" : "color"]);
435
- var k = a.fg;
436
- a.fg = a.bg, a.bg = k;
437
- var h = a.fg_truecolor;
438
- return a.fg_truecolor = a.bg_truecolor, a.bg_truecolor = h, a.isInverted = !0, !1;
438
+ i.fg || (i.fg = L[0][7][u ? "class" : "color"]), i.bg || (i.bg = L[0][0][u ? "class" : "color"]);
439
+ var k = i.fg;
440
+ i.fg = i.bg, i.bg = k;
441
+ var h = i.fg_truecolor;
442
+ return i.fg_truecolor = i.bg_truecolor, i.bg_truecolor = h, i.isInverted = !0, !1;
439
443
  }
440
444
  return !0;
441
- }), t.json)
442
- return a;
443
- if (a.isEmpty())
445
+ }), n.json)
446
+ return i;
447
+ if (i.isEmpty())
444
448
  return "";
445
- if (!a.was_processed)
446
- return a.content;
447
- var c = [], o = [], r = [], v = {}, i = function(k) {
448
- var h = [], $ = void 0;
449
- for ($ in k)
450
- k.hasOwnProperty($) && h.push("data-" + $ + '="' + y.escapeForHtml(k[$]) + '"');
449
+ if (!i.was_processed)
450
+ return i.content;
451
+ var c = [], o = [], r = [], _ = {}, a = function(k) {
452
+ var h = [], E = void 0;
453
+ for (E in k)
454
+ k.hasOwnProperty(E) && h.push("data-" + E + '="' + y.escapeForHtml(k[E]) + '"');
451
455
  return h.length > 0 ? " " + h.join(" ") : "";
452
456
  };
453
- return a.isInverted && (v["ansi-is-inverted"] = "true"), a.fg && (u ? (c.push(a.fg + "-fg"), a.fg_truecolor !== null && (v["ansi-truecolor-fg"] = a.fg_truecolor, a.fg_truecolor = null)) : c.push("color:rgb(" + a.fg + ")")), a.bg && (u ? (c.push(a.bg + "-bg"), a.bg_truecolor !== null && (v["ansi-truecolor-bg"] = a.bg_truecolor, a.bg_truecolor = null)) : c.push("background-color:rgb(" + a.bg + ")")), a.decorations.forEach(function(b) {
457
+ return i.isInverted && (_["ansi-is-inverted"] = "true"), i.fg && (u ? (c.push(i.fg + "-fg"), i.fg_truecolor !== null && (_["ansi-truecolor-fg"] = i.fg_truecolor, i.fg_truecolor = null)) : c.push("color:rgb(" + i.fg + ")")), i.bg && (u ? (c.push(i.bg + "-bg"), i.bg_truecolor !== null && (_["ansi-truecolor-bg"] = i.bg_truecolor, i.bg_truecolor = null)) : c.push("background-color:rgb(" + i.bg + ")")), i.decorations.forEach(function(b) {
454
458
  if (u) {
455
459
  o.push("ansi-" + b);
456
460
  return;
457
461
  }
458
462
  b === "bold" ? o.push("font-weight:bold") : b === "dim" ? o.push("opacity:0.5") : b === "italic" ? o.push("font-style:italic") : b === "hidden" ? o.push("visibility:hidden") : b === "strikethrough" ? r.push("line-through") : r.push(b);
459
- }), r.length && o.push("text-decoration:" + r.join(" ")), u ? '<span class="' + c.concat(o).join(" ") + '"' + i(v) + ">" + a.content + "</span>" : '<span style="' + c.concat(o).join(";") + '"' + i(v) + ">" + a.content + "</span>";
463
+ }), r.length && o.push("text-decoration:" + r.join(" ")), u ? '<span class="' + c.concat(o).join(" ") + '"' + a(_) + ">" + i.content + "</span>" : '<span style="' + c.concat(o).join(";") + '"' + a(_) + ">" + i.content + "</span>";
460
464
  }
461
465
  }, {
462
466
  key: "removeDecoration",
463
467
  value: function(s) {
464
- var t = this.decorations.indexOf(s);
465
- t >= 0 && this.decorations.splice(t, 1);
468
+ var n = this.decorations.indexOf(s);
469
+ n >= 0 && this.decorations.splice(n, 1);
466
470
  }
467
- }]), e;
468
- }(), Qe = Ze;
469
- const Ye = /* @__PURE__ */ Ke(Qe);
470
- var te = { exports: {} };
471
- function ne(e) {
472
- if (!e) return "";
473
- if (!/\r/.test(e)) return e;
474
- for (e = e.replace(/\r+\n/gm, `
475
- `); /\r./.test(e); )
476
- e = e.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm, function(n, s, t) {
477
- return t + s.slice(t.length);
471
+ }]), t;
472
+ }(), nt = st;
473
+ const rt = /* @__PURE__ */ Ye(nt);
474
+ var ee = { exports: {} };
475
+ function te(t) {
476
+ if (!t) return "";
477
+ if (!/\r/.test(t)) return t;
478
+ for (t = t.replace(/\r+\n/gm, `
479
+ `); /\r./.test(t); )
480
+ t = t.replace(/^([^\r\n]*)\r+([^\r\n]+)/gm, function(e, s, n) {
481
+ return n + s.slice(n.length);
478
482
  });
479
- return e;
483
+ return t;
480
484
  }
481
- function et(e) {
482
- for (var n = 0, s = 0; s < e.length; s++)
483
- e[n].length <= e[s].length && (n = s);
484
- return n;
485
+ function it(t) {
486
+ for (var e = 0, s = 0; s < t.length; s++)
487
+ t[e].length <= t[s].length && (e = s);
488
+ return e;
485
489
  }
486
- function _e(e) {
487
- if (!/\r/.test(e)) return e;
488
- for (var n = e.split("\r"), s = []; n.length > 0; ) {
489
- var t = et(n);
490
- s.push(n[t]), n = n.slice(t + 1);
490
+ function Ce(t) {
491
+ if (!/\r/.test(t)) return t;
492
+ for (var e = t.split("\r"), s = []; e.length > 0; ) {
493
+ var n = it(e);
494
+ s.push(e[n]), e = e.slice(n + 1);
491
495
  }
492
496
  return s.join("\r");
493
497
  }
494
- function tt(e) {
495
- if (!e) return "";
496
- if (!/\r/.test(e)) return e;
497
- if (!/\n/.test(e)) return _e(e);
498
- e = e.replace(/\r+\n/gm, `
498
+ function at(t) {
499
+ if (!t) return "";
500
+ if (!/\r/.test(t)) return t;
501
+ if (!/\n/.test(t)) return Ce(t);
502
+ t = t.replace(/\r+\n/gm, `
499
503
  `);
500
- var n = e.lastIndexOf(`
504
+ var e = t.lastIndexOf(`
501
505
  `);
502
- return ne(e.slice(0, n)) + `
503
- ` + _e(e.slice(n + 1));
506
+ return te(t.slice(0, e)) + `
507
+ ` + Ce(t.slice(e + 1));
504
508
  }
505
- te.exports = ne;
506
- var nt = te.exports.escapeCarriageReturn = ne;
507
- te.exports.escapeCarriageReturnSafe = tt;
508
- function st(e, n) {
509
- return e = nt(ot(e)), Ye.ansiToJson(e, {
509
+ ee.exports = te;
510
+ var ot = ee.exports.escapeCarriageReturn = te;
511
+ ee.exports.escapeCarriageReturnSafe = at;
512
+ function lt(t, e) {
513
+ return t = ot(ht(t)), rt.ansiToJson(t, {
510
514
  json: !0,
511
515
  // eslint-disable-next-line @typescript-eslint/naming-convention
512
516
  remove_empty: !0,
513
517
  // eslint-disable-next-line @typescript-eslint/naming-convention
514
- use_classes: n
518
+ use_classes: e
515
519
  });
516
520
  }
517
- function rt(e) {
518
- const n = [];
519
- return e.bg && n.push(N[`${e.bg}-bg`]), e.fg && n.push(N[`${e.fg}-fg`]), e.decoration && n.push(N[`ansi-${e.decoration}`]), n.length === 0 ? null : n.join(" ");
521
+ function ct(t) {
522
+ const e = [];
523
+ return t.bg && e.push(M[`${t.bg}-bg`]), t.fg && e.push(M[`${t.fg}-fg`]), t.decoration && e.push(M[`ansi-${t.decoration}`]), e.length === 0 ? null : e.join(" ");
520
524
  }
521
- function at(e) {
522
- const n = {};
523
- switch (e.bg && (n.backgroundColor = `rgb(${e.bg})`), e.fg && (n.color = `rgb(${e.fg})`), e.decoration) {
525
+ function ut(t) {
526
+ const e = {};
527
+ switch (t.bg && (e.backgroundColor = `rgb(${t.bg})`), t.fg && (e.color = `rgb(${t.fg})`), t.decoration) {
524
528
  case "bold":
525
- n.fontWeight = "bold";
529
+ e.fontWeight = "bold";
526
530
  break;
527
531
  case "dim":
528
- n.opacity = "0.5";
532
+ e.opacity = "0.5";
529
533
  break;
530
534
  case "italic":
531
- n.fontStyle = "italic";
535
+ e.fontStyle = "italic";
532
536
  break;
533
537
  case "hidden":
534
- n.visibility = "hidden";
538
+ e.visibility = "hidden";
535
539
  break;
536
540
  case "strikethrough":
537
- n.textDecoration = "line-through";
541
+ e.textDecoration = "line-through";
538
542
  break;
539
543
  case "underline":
540
- n.textDecoration = "underline";
544
+ e.textDecoration = "underline";
541
545
  break;
542
546
  case "blink":
543
- n.textDecoration = "blink";
547
+ e.textDecoration = "blink";
544
548
  break;
545
549
  }
546
- return n;
550
+ return e;
547
551
  }
548
- function it(e, n, s, t) {
549
- const f = n ? null : at(s), y = n ? rt(s) : null;
550
- if (!e)
551
- return q.createElement(
552
+ function ft(t, e, s, n) {
553
+ const f = e ? null : ut(s), y = e ? ct(s) : null;
554
+ if (!t)
555
+ return G.createElement(
552
556
  "pre",
553
- { style: f, key: t, className: y },
557
+ { style: f, key: n, className: y },
554
558
  s.content
555
559
  );
556
- const a = [], u = /(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;
560
+ const i = [], u = /(\s|^)(https?:\/\/(?:www\.|(?!www))[^\s.]+\.[^\s]{2,}|www\.[^\s]+\.[^\s]{2,})/g;
557
561
  let c = 0, o;
558
562
  for (; (o = u.exec(s.content)) !== null; ) {
559
- const [, r, v] = o, i = o.index + r.length;
560
- i > c && a.push(s.content.substring(c, i));
561
- const b = v.startsWith("www.") ? `http://${v}` : v;
562
- a.push(
563
- q.createElement(
563
+ const [, r, _] = o, a = o.index + r.length;
564
+ a > c && i.push(s.content.substring(c, a));
565
+ const b = _.startsWith("www.") ? `http://${_}` : _;
566
+ i.push(
567
+ G.createElement(
564
568
  "a",
565
569
  {
566
570
  key: c,
567
571
  href: b,
568
572
  target: "_blank"
569
573
  },
570
- `${v}`
574
+ `${_}`
571
575
  )
572
576
  ), c = u.lastIndex;
573
577
  }
574
- return c < s.content.length && a.push(s.content.substring(c)), q.createElement("span", { style: f, key: t, className: y }, a);
578
+ return c < s.content.length && i.push(s.content.substring(c)), G.createElement("span", { style: f, key: n, className: y }, i);
575
579
  }
576
- function ke(e) {
577
- const { className: n, useClasses: s, children: t, linkify: f } = e;
578
- return q.createElement(
580
+ function Se(t) {
581
+ const { className: e, useClasses: s, children: n, linkify: f } = t;
582
+ return G.createElement(
579
583
  "code",
580
- { className: n },
581
- st(t ?? "", s ?? !1).map(
584
+ { className: e },
585
+ lt(n ?? "", s ?? !1).map(
582
586
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
583
- it.bind(null, f ?? !1, s ?? !1)
587
+ ft.bind(null, f ?? !1, s ?? !1)
584
588
  )
585
589
  );
586
590
  }
587
- function ot(e) {
588
- let n = e;
591
+ function ht(t) {
592
+ let e = t;
589
593
  do
590
- e = n, n = e.replace(/[^\n]\x08/gm, "");
591
- while (n.length < e.length);
592
- return e;
594
+ t = e, e = t.replace(/[^\n]\x08/gm, "");
595
+ while (e.length < t.length);
596
+ return t;
593
597
  }
594
- const be = Fe(({ text: e }, n) => {
595
- const s = e == null ? void 0 : e.split(`
598
+ const Oe = ze(({ text: t }, e) => {
599
+ const s = t == null ? void 0 : t.split(`
596
600
  `);
597
- return /* @__PURE__ */ L("div", { ref: n, children: s == null ? void 0 : s.map(
598
- (t, f) => /* @__PURE__ */ L(ke, { className: N.Output, useClasses: !0, children: t === "" ? " " : t }, f)
601
+ return /* @__PURE__ */ N("div", { ref: e, children: s == null ? void 0 : s.map(
602
+ (n, f) => /* @__PURE__ */ N(Se, { className: M.Output, useClasses: !0, children: n === "" ? " " : n }, f)
599
603
  ) });
600
604
  });
601
- function lt({ value: e, prefix: n, onChange: s, onKeyUp: t, onKeyDown: f, inputRef: y }) {
602
- const [a, u] = S(0), c = () => {
605
+ function gt({ value: t, prefix: e, onChange: s, onKeyUp: n, onKeyDown: f, inputRef: y }) {
606
+ const [i, u] = T(0), c = () => {
603
607
  var r;
604
608
  const o = (r = y.current) == null ? void 0 : r.selectionStart;
605
609
  o != null && u(o);
606
610
  };
607
- return /* @__PURE__ */ Y("span", { className: N.Input, children: [
608
- n && /* @__PURE__ */ L(ke, { className: N.Prefix, useClasses: !0, children: n }),
609
- /* @__PURE__ */ Y("span", { className: N["Input-container"], style: { "--cursor-offset": a }, children: [
610
- /* @__PURE__ */ L("span", { "aria-hidden": "true", children: e }),
611
- /* @__PURE__ */ L(
611
+ return /* @__PURE__ */ Y("span", { className: M.Input, children: [
612
+ e && /* @__PURE__ */ N(Se, { className: M.Prefix, useClasses: !0, children: e }),
613
+ /* @__PURE__ */ Y("span", { className: M["Input-container"], style: { "--cursor-offset": i }, children: [
614
+ /* @__PURE__ */ N("span", { "aria-hidden": "true", children: t }),
615
+ /* @__PURE__ */ N(
612
616
  "input",
613
617
  {
614
618
  id: "input",
615
- value: e,
619
+ value: t,
616
620
  "aria-label": "Command input",
617
621
  onChange: (o) => {
618
622
  s(o), c();
619
623
  },
620
624
  ref: y,
621
625
  onKeyUp: (o) => {
622
- t == null || t(o);
626
+ n == null || n(o);
623
627
  },
624
628
  onKeyDown: (o) => {
625
629
  f == null || f(o), c();
@@ -638,9 +642,9 @@ function lt({ value: e, prefix: n, onChange: s, onKeyUp: t, onKeyDown: f, inputR
638
642
  ] })
639
643
  ] });
640
644
  }
641
- const Z = "user", Q = "prozilla-os", vt = 50, ye = `${_.fg.cyan + _.decoration.dim}$APP_NAME - Made by Prozilla${_.reset}
642
- ${_.decoration.dim}Type 'help' for a list of commands.${_.reset}
643
- `, E = _.fg.cyan, _t = `
645
+ const Z = "user", Q = "prozilla-os", kt = 50, Ee = `${v.fg.cyan + v.decoration.dim}$APP_NAME - Made by Prozilla${v.reset}
646
+ ${v.decoration.dim}Type 'help' for a list of commands.${v.reset}
647
+ `, O = v.fg.cyan, Ct = `
644
648
  :.
645
649
  -==.
646
650
  .=====:
@@ -648,22 +652,22 @@ ${_.decoration.dim}Type 'help' for a list of commands.${_.reset}
648
652
  :===+=----------::..
649
653
  =+=---------------:..
650
654
  --------------------:.
651
- .:-+=----${_.fg.white}*###*${E}--${_.fg.white}*####=${E}---.
652
- :==+----${_.fg.white}#%+${E}-${_.fg.white}+%#${E}-${_.fg.white}##%*+${E}----:.
653
- .=----${_.fg.white}#%+${E}-${_.fg.white}+%#${E}-${_.fg.white}*+${E}-${_.fg.white}%#+${E}---:.
654
- ==----${_.fg.white}*###*${E}--${_.fg.white}*###*${E}----.
655
+ .:-+=----${v.fg.white}*###*${O}--${v.fg.white}*####=${O}---.
656
+ :==+----${v.fg.white}#%+${O}-${v.fg.white}+%#${O}-${v.fg.white}##%*+${O}----:.
657
+ .=----${v.fg.white}#%+${O}-${v.fg.white}+%#${O}-${v.fg.white}*+${O}-${v.fg.white}%#+${O}---:.
658
+ ==----${v.fg.white}*###*${O}--${v.fg.white}*###*${O}----.
655
659
  ==+-------------------:.
656
660
  ...::---------------:.
657
661
  .::---------::..
658
- ....::... `, ct = {
662
+ ....::... `, mt = {
659
663
  new: "new",
660
664
  start: "start",
661
665
  stop: "stop"
662
666
  };
663
- class P extends Je {
667
+ class P extends Ge {
664
668
  constructor() {
665
669
  super(...arguments);
666
- W(this, "enabled", !1);
670
+ S(this, "enabled", !1);
667
671
  }
668
672
  start(s) {
669
673
  return this.enabled ? this : (s == null || s(this), this.enabled = !0, this.emit("start"), this);
@@ -675,72 +679,65 @@ class P extends Je {
675
679
  return this.enabled && this.emit("new", s), this;
676
680
  }
677
681
  }
678
- W(P, "EVENT_NAMES", ct);
679
- function F(e, n) {
680
- return `${_.fg.red}${e}: ${n}${_.reset}`;
682
+ S(P, "EVENT_NAMES", mt);
683
+ function q(t, e) {
684
+ return `${v.fg.red}${t}: ${e}${v.reset}`;
681
685
  }
682
- function bt(e) {
683
- return e.replace(/\u001b\[([0-9]+)m/gm, "");
686
+ function Ot(t) {
687
+ return t.replace(/\u001b\[([0-9]+)m/gm, "");
684
688
  }
685
- let G = [];
686
- const we = /* @__PURE__ */ Object.assign({ "./commands/cat.ts": () => import("./cat-DO8KEMio.js"), "./commands/cd.ts": () => import("./cd-DFGtb_Wk.js"), "./commands/clear.ts": () => import("./clear-DtYBxmDr.js"), "./commands/cmatrix.ts": () => import("./cmatrix-CVXcw_wK.js"), "./commands/compgen.ts": () => import("./compgen-WxsGxWC9.js"), "./commands/cowsay.ts": () => import("./cowsay-DZHMvxAZ.js"), "./commands/dir.ts": () => import("./dir-BlrznBqV.js"), "./commands/echo.ts": () => import("./echo-PyZ6XYF6.js"), "./commands/eval.ts": () => import("./eval-CnKC-mrj.js"), "./commands/exit.ts": () => import("./exit-CizX3N_u.js"), "./commands/fortune.ts": () => import("./fortune-Cs0PtMgs.js"), "./commands/help.ts": () => import("./help-DnMOR9rH.js"), "./commands/history.ts": () => import("./history-l0sNRNKZ.js"), "./commands/hostname.ts": () => import("./hostname-BBOQWx6L.js"), "./commands/lolcat.ts": () => import("./lolcat-vYhIbqEJ.js"), "./commands/ls.ts": () => import("./ls-23P3QzxI.js"), "./commands/make.ts": () => import("./make-CKvFYB_1.js"), "./commands/man.ts": () => import("./man-BN3-oDjw.js"), "./commands/mkdir.ts": () => import("./mkdir-BTSAC1PK.js"), "./commands/neofetch.ts": () => import("./neofetch-UHKALL5e.js"), "./commands/pwd.ts": () => import("./pwd-CSapfDtw.js"), "./commands/reboot.ts": () => import("./reboot-Bwxhoa8q.js"), "./commands/reload.ts": () => import("./reload-RsBNPWJI.js"), "./commands/rev.ts": () => import("./rev-C8qQIyj_.js"), "./commands/rm.ts": () => import("./rm-B4-5j-xh.js"), "./commands/rmdir.ts": () => import("./rmdir-hAWOHScY.js"), "./commands/sl.ts": () => import("./sl-yhx6cve3.js"), "./commands/touch.ts": () => import("./touch-DptR1Wm4.js"), "./commands/uptime.ts": () => import("./uptime-BYmCcOUM.js"), "./commands/whatis.ts": () => import("./whatis-CFFc4GDV.js"), "./commands/whoami.ts": () => import("./whoami-CQNGmqxL.js") }), Ce = () => {
687
- G = [];
688
- for (const e in we)
689
- we[e]().then((n) => {
690
- const s = Object.keys(n)[0], t = n[s];
691
- t != null && (t.setName(s.toLowerCase()), G.push(t));
689
+ let B = [];
690
+ const $e = /* @__PURE__ */ Object.assign({ "./commands/cat.ts": () => import("./cat-DGK7wWrK.js"), "./commands/cd.ts": () => import("./cd-DvjkW_6o.js"), "./commands/clear.ts": () => import("./clear-BF9eb1Dq.js"), "./commands/cmatrix.ts": () => import("./cmatrix-VYovsHQW.js"), "./commands/compgen.ts": () => import("./compgen-3TwdgHm_.js"), "./commands/cowsay.ts": () => import("./cowsay-IfArfPSJ.js"), "./commands/dir.ts": () => import("./dir-B_Ipo5xb.js"), "./commands/echo.ts": () => import("./echo-DX-Ar2Ut.js"), "./commands/eval.ts": () => import("./eval-C7InkmFY.js"), "./commands/exit.ts": () => import("./exit-D7PPqtiE.js"), "./commands/fortune.ts": () => import("./fortune-zyxpnYNP.js"), "./commands/help.ts": () => import("./help-BEgNbwLL.js"), "./commands/history.ts": () => import("./history-l0sNRNKZ.js"), "./commands/hostname.ts": () => import("./hostname-DU1lQde2.js"), "./commands/lolcat.ts": () => import("./lolcat-5-mBWD9l.js"), "./commands/ls.ts": () => import("./ls-DnkSPHVM.js"), "./commands/make.ts": () => import("./make-DqVQDThH.js"), "./commands/man.ts": () => import("./man-D_hBUTDt.js"), "./commands/mkdir.ts": () => import("./mkdir-BCvMrPTX.js"), "./commands/neofetch.ts": () => import("./neofetch-BFHOITJj.js"), "./commands/pwd.ts": () => import("./pwd-C21tQanw.js"), "./commands/reboot.ts": () => import("./reboot-C2t7a3Av.js"), "./commands/reload.ts": () => import("./reload-C9o_dGZw.js"), "./commands/rev.ts": () => import("./rev-CBibYebM.js"), "./commands/rm.ts": () => import("./rm-ChTrwld4.js"), "./commands/rmdir.ts": () => import("./rmdir-CUM4xt2w.js"), "./commands/sl.ts": () => import("./sl-DrATMkz6.js"), "./commands/touch.ts": () => import("./touch-CqBIAjMe.js"), "./commands/uptime.ts": () => import("./uptime-xM-0FRzA.js"), "./commands/whatis.ts": () => import("./whatis-vXemLo9m.js"), "./commands/whoami.ts": () => import("./whoami-CnUR69yX.js") }), Te = () => {
691
+ B = [];
692
+ for (const t in $e)
693
+ $e[t]().then((e) => {
694
+ const s = Object.keys(e)[0], n = e[s];
695
+ n != null && (n.name || n.setName(s.toLowerCase()), B.push(n));
692
696
  });
693
697
  };
694
- Ce();
695
- const B = class B {
696
- static find(n) {
697
- let s = null;
698
- return this.COMMANDS.forEach((t) => {
699
- if (t.name === n) {
700
- s = t;
701
- return;
702
- }
703
- }), s;
698
+ Te();
699
+ class se {
700
+ static addCommand(e) {
701
+ this.COMMANDS.push(e);
704
702
  }
705
- static search(n) {
706
- return this.COMMANDS.filter((t) => {
707
- var f;
708
- return (f = t.name) == null ? void 0 : f.match(n);
709
- });
703
+ static find(e) {
704
+ return this.COMMANDS.find((s) => s.name == e);
705
+ }
706
+ static search(e) {
707
+ return this.COMMANDS.filter((s) => s.name.match(e));
710
708
  }
711
709
  static reload() {
712
- Ce(), B.COMMANDS = G;
710
+ Te(), this.COMMANDS = B;
713
711
  }
714
- };
715
- W(B, "COMMANDS", G);
716
- let ee = B;
717
- function ut({ app: e, path: n, input: s, setTitle: t, close: f, active: y, focus: a }) {
718
- const u = De(), [c, o] = S(0), [r, v] = S(s ?? ""), [i, b] = S([{
719
- text: e ? ye.replace("$APP_NAME", e.name) : ye,
712
+ }
713
+ S(se, "COMMANDS", B);
714
+ function pt({ app: t, path: e, input: s, setTitle: n, close: f, active: y, focus: i }) {
715
+ const u = Fe(), [c, o] = T(0), [r, _] = T(s ?? ""), [a, b] = T([{
716
+ text: t ? Ee.replace("$APP_NAME", t.name) : Ee,
720
717
  isInput: !1
721
- }]), k = Re(), [h, $] = S(k == null ? void 0 : k.navigate(n ?? "~")), O = pe(null), [M, D] = S(0), [T, K] = S(null), [U, se] = S(null), R = pe(null), [re, ae] = S(!1), Ee = He();
718
+ }]), k = qe(), [h, E] = T(k == null ? void 0 : k.navigate(e ?? "~")), $ = ye(null), [R, D] = T(0), [A, K] = T(null), [U, ne] = T(null), x = ye(null), [re, ie] = T(!1), Ae = Je();
722
719
  z(() => {
723
- h != null && (t == null || t(`${Z}@${Q}: ${h.root ? "/" : h.path}`));
724
- }, [h == null ? void 0 : h.path, h == null ? void 0 : h.root, t]), z(() => {
725
- !O.current || !y || O.current.focus();
726
- }, [O, y]);
727
- const ie = () => {
728
- R.current.scrollTop = R.current.scrollHeight;
720
+ h != null && (n == null || n(`${Z}@${Q}: ${h.root ? "/" : h.path}`));
721
+ }, [h == null ? void 0 : h.path, h == null ? void 0 : h.root, n]), z(() => {
722
+ !$.current || !y || $.current.focus();
723
+ }, [$, y]);
724
+ const ae = () => {
725
+ x.current.scrollTop = x.current.scrollHeight;
729
726
  };
730
727
  z(() => {
731
- re || R.current == null || U == null || (ie(), ae(!0));
732
- }, [re, U, R]), z(() => {
733
- R.current == null || T != null || ie();
728
+ re || x.current == null || U == null || (ae(), ie(!0));
729
+ }, [re, U, x]), z(() => {
730
+ x.current == null || A != null || ae();
734
731
  }, [r]);
735
- const oe = `${_.fg.cyan + Z}@${Q + _.reset}:${_.fg.blue + (h != null && h.root || h == null ? "/" : h == null ? void 0 : h.path) + _.reset}$ `, le = i, X = (l) => {
732
+ const oe = `${v.fg.cyan + Z}@${Q + v.reset}:${v.fg.blue + (h != null && h.root || h == null ? "/" : h == null ? void 0 : h.path) + v.reset}$ `, le = a, X = (l) => {
736
733
  le.push(l), b(le);
737
- }, J = (l) => {
734
+ }, V = (l) => {
738
735
  X({
739
736
  text: l,
740
737
  isInput: !1
741
738
  });
742
- }, $e = (l, p) => {
743
- K(l), ae(!1);
739
+ }, Ie = (l, p) => {
740
+ K(l), ie(!1);
744
741
  const g = (d) => {
745
742
  y && (d.ctrlKey || d.metaKey) && d.key === "c" && l.stop();
746
743
  };
@@ -751,13 +748,13 @@ function ut({ app: e, path: n, input: s, setTitle: t, close: f, active: y, focus
751
748
  for (const I of p)
752
749
  w instanceof P || (w = await ce(w ? `${I} ${w}` : I));
753
750
  if (w instanceof P) {
754
- l.stop(), J(_.fg.red + "Stream failed");
751
+ l.stop(), V(v.fg.red + "Stream failed");
755
752
  return;
756
753
  }
757
- m = w, se(w);
754
+ m = w, ne(w);
758
755
  })();
759
756
  }), l.on(P.EVENT_NAMES.stop, () => {
760
- document.removeEventListener("keydown", g), J(m), K(null), se(null);
757
+ document.removeEventListener("keydown", g), V(m), K(null), ne(null);
761
758
  }), document.addEventListener("keydown", g);
762
759
  }, ce = async (l) => {
763
760
  var he;
@@ -768,41 +765,41 @@ function ut({ app: e, path: n, input: s, setTitle: t, close: f, active: y, focus
768
765
  d[0].toLowerCase() === "sudo" && d.length >= 2 && d.shift();
769
766
  const w = (he = d.shift()) == null ? void 0 : he.toLowerCase();
770
767
  if (w == null) return;
771
- const I = ee.find(w);
772
- if (!I) return F(w, "Command not found");
768
+ const I = se.find(w);
769
+ if (!I) return q(w, "Command not found");
773
770
  d = d.map((C) => C.startsWith('"') && C.endsWith('"') ? C.slice(1, -1) : C);
774
771
  const H = [], fe = {};
775
772
  if (d.filter((C) => C.startsWith("-")).forEach((C) => {
776
- const ge = (j) => {
777
- if (H.includes(j))
773
+ const ge = (F) => {
774
+ if (H.includes(F))
778
775
  return;
779
- H.push(j);
780
- const x = I.getOption(H[H.length - 1]);
781
- if (x != null && x.isInput) {
776
+ H.push(F);
777
+ const j = I.getOption(H[H.length - 1]);
778
+ if (j != null && j.isInput) {
782
779
  const me = d[d.indexOf(C) + 1];
783
- fe[x.short] = me, de(me, d);
780
+ fe[j.short] = me, we(me, d);
784
781
  }
785
782
  };
786
783
  if (C.startsWith("--")) {
787
- const j = C.substring(2).toLowerCase();
788
- ge(j);
784
+ const F = C.substring(2).toLowerCase();
785
+ ge(F);
789
786
  } else
790
- C.substring(1).split("").forEach((x) => {
791
- ge(x);
787
+ C.substring(1).split("").forEach((j) => {
788
+ ge(j);
792
789
  });
793
- de(C, d);
790
+ we(C, d);
794
791
  }), I.requireArgs && d.length === 0)
795
- return F(w, `Incorrect usage: ${w} requires at least 1 argument`);
792
+ return q(w, `Incorrect usage: ${w} requires at least 1 argument`);
796
793
  if (I.requireOptions && H.length === 0)
797
- return F(w, `Incorrect usage: ${w} requires at least 1 option`);
798
- let V = null;
794
+ return q(w, `Incorrect usage: ${w} requires at least 1 option`);
795
+ let W = null;
799
796
  try {
800
- if (V = await I.execute(d, {
801
- promptOutput: J,
797
+ if (W = await I.execute(d, {
798
+ promptOutput: V,
802
799
  pushHistory: X,
803
800
  virtualRoot: k,
804
801
  currentDirectory: h,
805
- setCurrentDirectory: $,
802
+ setCurrentDirectory: E,
806
803
  username: Z,
807
804
  hostname: Q,
808
805
  rawInputValue: g,
@@ -810,19 +807,19 @@ function ut({ app: e, path: n, input: s, setTitle: t, close: f, active: y, focus
810
807
  exit: f,
811
808
  inputs: fe,
812
809
  timestamp: m,
813
- settingsManager: Ee,
810
+ settingsManager: Ae,
814
811
  systemManager: u,
815
- app: e
816
- }), V == null)
817
- return F(w, "Command failed");
818
- if (!V.blank)
819
- return V;
812
+ app: t
813
+ }), W == null)
814
+ return q(w, "Command failed");
815
+ if (!W.blank)
816
+ return W;
820
817
  } catch (C) {
821
- return console.error(C), F(w, "Command failed");
818
+ return console.error(C), q(w, "Command failed");
822
819
  }
823
- }, Oe = () => {
824
- v(""), D(0);
825
- }, Se = async (l) => {
820
+ }, Le = () => {
821
+ _(""), D(0);
822
+ }, Ne = async (l) => {
826
823
  X({
827
824
  text: oe + l,
828
825
  isInput: !0,
@@ -833,58 +830,58 @@ function ut({ app: e, path: n, input: s, setTitle: t, close: f, active: y, focus
833
830
  let m = null;
834
831
  for (const d of p)
835
832
  m instanceof P || (m = await ce(m ? `${d} ${m}` : d), g.push(d));
836
- Oe(), p = p.filter((d) => !g.includes(d)), m && (m instanceof P ? $e(m, p) : J(`${m}
833
+ Le(), p = p.filter((d) => !g.includes(d)), m && (m instanceof P ? Ie(m, p) : V(`${m}
837
834
  `));
838
835
  }, ue = (l) => {
839
- const p = i.filter(({ isInput: m }) => m), g = Ve(M + l, 0, p.length);
840
- if (g === M) {
841
- l < 0 && v("");
836
+ const p = a.filter(({ isInput: m }) => m), g = Be(R + l, 0, p.length);
837
+ if (g === R) {
838
+ l < 0 && _("");
842
839
  return;
843
840
  }
844
- v(g === 0 ? "" : p[p.length - g].value ?? ""), D(g);
845
- }, Te = (l) => {
841
+ _(g === 0 ? "" : p[p.length - g].value ?? ""), D(g);
842
+ }, Me = (l) => {
846
843
  const p = l.target.value, { key: g } = l;
847
- g === "Enter" ? (Se(p), o((m) => m + 1)) : g === "ArrowUp" ? (l.preventDefault(), ue(1)) : g === "ArrowDown" ? (l.preventDefault(), ue(-1)) : !T && (l.ctrlKey || l.metaKey) && g === "c" && v((m) => m + "^C");
848
- }, Ie = (l) => {
844
+ g === "Enter" ? (Ne(p), o((m) => m + 1)) : g === "ArrowUp" ? (l.preventDefault(), ue(1)) : g === "ArrowDown" ? (l.preventDefault(), ue(-1)) : !A && (l.ctrlKey || l.metaKey) && g === "c" && _((m) => m + "^C");
845
+ }, Pe = (l) => {
849
846
  const p = l.target.value;
850
- return v(p);
851
- }, Ae = () => {
852
- const l = i.slice(-16);
847
+ return _(p);
848
+ }, Re = () => {
849
+ const l = a.slice(-16);
853
850
  let p = 0;
854
851
  return l.forEach((g, m) => {
855
852
  g.clear && (p = m + 1);
856
- }), l.slice(p).map(({ text: g }, m) => /* @__PURE__ */ L(be, { text: g }, m));
857
- }, Le = (l) => {
853
+ }), l.slice(p).map(({ text: g }, m) => /* @__PURE__ */ N(Oe, { text: g }, m));
854
+ }, De = (l) => {
858
855
  var p, g;
859
- a == null || a(l), l.button === 2 && (l.preventDefault(), (g = (p = navigator.clipboard).readText) == null || g.call(p).then((m) => {
860
- v(r + m);
856
+ i == null || i(l), l.button === 2 && (l.preventDefault(), (g = (p = navigator.clipboard).readText) == null || g.call(p).then((m) => {
857
+ _(r + m);
861
858
  }).catch((m) => {
862
859
  console.error(m);
863
860
  }));
864
- }, Ne = (l) => {
861
+ }, xe = (l) => {
865
862
  l.preventDefault();
866
863
  };
867
864
  return /* @__PURE__ */ Y(
868
865
  "div",
869
866
  {
870
- ref: R,
871
- className: N.Terminal,
872
- onMouseDown: Le,
873
- onContextMenu: Ne,
867
+ ref: x,
868
+ className: M.Terminal,
869
+ onMouseDown: De,
870
+ onContextMenu: xe,
874
871
  onClick: (l) => {
875
872
  var p, g;
876
- ((p = window.getSelection()) == null ? void 0 : p.toString()) === "" && (l.preventDefault(), (g = O.current) == null || g.focus());
873
+ ((p = window.getSelection()) == null ? void 0 : p.toString()) === "" && (l.preventDefault(), (g = $.current) == null || g.focus());
877
874
  },
878
875
  children: [
879
- Ae(),
880
- T ? /* @__PURE__ */ L(be, { text: U ?? "" }) : /* @__PURE__ */ L(
881
- lt,
876
+ Re(),
877
+ A ? /* @__PURE__ */ N(Oe, { text: U ?? "" }) : /* @__PURE__ */ N(
878
+ gt,
882
879
  {
883
880
  value: r,
884
881
  prefix: oe,
885
- onKeyDown: Te,
886
- onChange: Ie,
887
- inputRef: O
882
+ onKeyDown: Me,
883
+ onChange: Pe,
884
+ inputRef: $
888
885
  },
889
886
  c
890
887
  )
@@ -892,16 +889,69 @@ function ut({ app: e, path: n, input: s, setTitle: t, close: f, active: y, focus
892
889
  }
893
890
  );
894
891
  }
895
- const ft = new xe("Terminal", "terminal", ut).setIconUrl("https://os.prozilla.dev/assets/apps/icons/terminal.svg").setRole(je.APP_ROLES.terminal).setCategory("Utilities & tools");
896
- ft.setMetadata({ name: "@prozilla-os/terminal", version: "1.1.17", author: "Prozilla" });
892
+ class dt extends Ve {
893
+ constructor() {
894
+ super("Terminal", "terminal", pt), this.setIconUrl("https://os.prozilla.dev/assets/apps/icons/terminal.svg"), this.setRole(We.APP_ROLES.terminal), this.setCategory("Utilities & tools");
895
+ }
896
+ addCommands(e) {
897
+ return e.forEach((s) => this.addCommand(s)), this;
898
+ }
899
+ addCommand(e) {
900
+ return se.addCommand(e), this;
901
+ }
902
+ }
903
+ var J;
904
+ class Et {
905
+ constructor() {
906
+ ve(this, J);
907
+ S(this, "options", []);
908
+ S(this, "manual");
909
+ S(this, "requireArgs");
910
+ S(this, "requireOptions");
911
+ S(this, "execute", () => {
912
+ });
913
+ }
914
+ setName(e) {
915
+ var s;
916
+ return be(this, J, e), e && !((s = this.manual) != null && s.usage) && (this.manual || (this.manual = {}), this.manual.usage = e), this;
917
+ }
918
+ get name() {
919
+ return _e(this, J) ?? "";
920
+ }
921
+ setExecute(e) {
922
+ return this.execute = e, this;
923
+ }
924
+ setRequireArgs(e) {
925
+ return this.requireArgs = e, this;
926
+ }
927
+ setRequireOptions(e) {
928
+ return this.requireOptions = e, this;
929
+ }
930
+ setManual({ purpose: e, usage: s, description: n, options: f }) {
931
+ return this.manual = { purpose: e, usage: s, description: n, options: f }, this;
932
+ }
933
+ addOption({ short: e, long: s, isInput: n }) {
934
+ return this.options.push({ short: e, long: s, isInput: n }), this;
935
+ }
936
+ getOption(e) {
937
+ let s = null;
938
+ return this.options.forEach((n) => {
939
+ (n.short === e || n.long === e) && (s = n);
940
+ }), s;
941
+ }
942
+ }
943
+ J = new WeakMap();
944
+ const $t = new dt();
897
945
  export {
898
- E as A,
899
- ee as C,
900
- vt as M,
946
+ O as A,
947
+ Et as C,
948
+ kt as M,
901
949
  P as S,
902
- _t as a,
903
- F as f,
904
- bt as r,
905
- ft as t
950
+ dt as T,
951
+ se as a,
952
+ Ct as b,
953
+ q as f,
954
+ Ot as r,
955
+ $t as t
906
956
  };
907
- //# sourceMappingURL=main-Dvaf0Ocd.js.map
957
+ //# sourceMappingURL=main-CXiltWT-.js.map