blun-king-cli 9.1.26 → 9.1.28

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 (2) hide show
  1. package/blun.mjs +318 -195
  2. package/package.json +7 -3
package/blun.mjs CHANGED
@@ -1,22 +1,22 @@
1
1
  #!/usr/bin/env node
2
- // BLUN_BUILD_INPUT_SHA256:7d2032417fd49eb3d28a7006057755559c5bb8da252a52c972b2ccc12a33dd14
2
+ // BLUN_BUILD_INPUT_SHA256:9bce61effd199618edcbdfaa64534a1401bd400ced0185c9d6089a614addfa51
3
3
  import { fileURLToPath as __cjsShimFileURLToPath } from 'node:url';
4
4
  import { dirname as __cjsShimDirname } from 'node:path';
5
5
  const __filename = __cjsShimFileURLToPath(import.meta.url);
6
6
  const __dirname = __cjsShimDirname(__filename);
7
7
  import { createRequire } from "node:module";
8
8
  import crypto$1, { createHash, randomBytes, randomInt, randomUUID, timingSafeEqual } from "node:crypto";
9
- import * as fs$17 from "node:fs";
9
+ import * as fs$16 from "node:fs";
10
10
  import Kt, { accessSync, appendFileSync, chmodSync, closeSync, constants, copyFileSync, createReadStream, createWriteStream, existsSync, fsyncSync, linkSync, lstatSync, mkdirSync, openSync, promises, readFileSync, readSync, readdirSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
11
- import * as path$17 from "node:path";
11
+ import * as path$16 from "node:path";
12
12
  import path, { basename, dirname, extname, isAbsolute, join, normalize, posix, relative, resolve, sep, win32 } from "node:path";
13
13
  import { Blob as Blob$1, Buffer as Buffer$1, File as File$1 } from "node:buffer";
14
14
  import * as nodeOs from "node:os";
15
15
  import os, { arch, homedir, hostname, networkInterfaces, platform, release, tmpdir, type, userInfo } from "node:os";
16
- import fs, { access, appendFile, chmod, constants as constants$1, copyFile, cp, link, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
16
+ import ro, { access, appendFile, chmod, constants as constants$1, copyFile, cp, link, lstat, mkdir, mkdtemp, open, readFile, readdir, realpath, rename, rm, stat, unlink, writeFile } from "node:fs/promises";
17
17
  import { execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
18
18
  import * as sysPath from "path";
19
- import path$1, { basename as basename$1, dirname as dirname$1, join as join$1, parse } from "path";
19
+ import js, { basename as basename$1, dirname as dirname$1, join as join$1, parse } from "path";
20
20
  import I, { existsSync as existsSync$1, promises as promises$1, readdirSync as readdirSync$1, stat as stat$1, statSync as statSync$1, unwatchFile, watch, watchFile } from "fs";
21
21
  import { Readable } from "stream";
22
22
  import zi from "assert";
@@ -2072,11 +2072,11 @@ var init_blun_files = __esmMin((() => {
2072
2072
  async uploadVideo(input, options) {
2073
2073
  let file;
2074
2074
  if (typeof input === "string") {
2075
- if (!fs$17.existsSync(input)) throw new ChatProviderError(`Video file not found: ${input}`);
2076
- const filename = path$17.basename(input);
2075
+ if (!fs$16.existsSync(input)) throw new ChatProviderError(`Video file not found: ${input}`);
2076
+ const filename = path$16.basename(input);
2077
2077
  const mimeType = guessMimeTypeFromExt(filename);
2078
2078
  if (mimeType === void 0 || !mimeType.startsWith("video/")) throw new ChatProviderError(`BlunFiles.uploadVideo: file extension does not indicate a video type: ${filename}`);
2079
- const data = await fs$17.promises.readFile(input);
2079
+ const data = await fs$16.promises.readFile(input);
2080
2080
  file = new File$1([new Blob$1([new Uint8Array(data)], { type: mimeType })], filename, { type: mimeType });
2081
2081
  } else {
2082
2082
  if (!input.mimeType.startsWith("video/")) throw new ChatProviderError(`Expected a video mime type, got ${input.mimeType}`);
@@ -11432,7 +11432,7 @@ var require_clone$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11432
11432
  //#endregion
11433
11433
  //#region ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
11434
11434
  var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11435
- var fs$16 = __require("fs");
11435
+ var fs$15 = __require("fs");
11436
11436
  var polyfills = require_polyfills();
11437
11437
  var legacy = require_legacy_streams();
11438
11438
  var clone = require_clone$1();
@@ -11461,36 +11461,36 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11461
11461
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
11462
11462
  console.error(m);
11463
11463
  };
11464
- if (!fs$16[gracefulQueue]) {
11465
- publishQueue(fs$16, global[gracefulQueue] || []);
11466
- fs$16.close = (function(fs$close) {
11464
+ if (!fs$15[gracefulQueue]) {
11465
+ publishQueue(fs$15, global[gracefulQueue] || []);
11466
+ fs$15.close = (function(fs$close) {
11467
11467
  function close(fd, cb) {
11468
- return fs$close.call(fs$16, fd, function(err) {
11468
+ return fs$close.call(fs$15, fd, function(err) {
11469
11469
  if (!err) resetQueue();
11470
11470
  if (typeof cb === "function") cb.apply(this, arguments);
11471
11471
  });
11472
11472
  }
11473
11473
  Object.defineProperty(close, previousSymbol, { value: fs$close });
11474
11474
  return close;
11475
- })(fs$16.close);
11476
- fs$16.closeSync = (function(fs$closeSync) {
11475
+ })(fs$15.close);
11476
+ fs$15.closeSync = (function(fs$closeSync) {
11477
11477
  function closeSync(fd) {
11478
- fs$closeSync.apply(fs$16, arguments);
11478
+ fs$closeSync.apply(fs$15, arguments);
11479
11479
  resetQueue();
11480
11480
  }
11481
11481
  Object.defineProperty(closeSync, previousSymbol, { value: fs$closeSync });
11482
11482
  return closeSync;
11483
- })(fs$16.closeSync);
11483
+ })(fs$15.closeSync);
11484
11484
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) process.on("exit", function() {
11485
- debug(fs$16[gracefulQueue]);
11486
- __require("assert").equal(fs$16[gracefulQueue].length, 0);
11485
+ debug(fs$15[gracefulQueue]);
11486
+ __require("assert").equal(fs$15[gracefulQueue].length, 0);
11487
11487
  });
11488
11488
  }
11489
- if (!global[gracefulQueue]) publishQueue(global, fs$16[gracefulQueue]);
11490
- module.exports = patch(clone(fs$16));
11491
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$16.__patched) {
11492
- module.exports = patch(fs$16);
11493
- fs$16.__patched = true;
11489
+ if (!global[gracefulQueue]) publishQueue(global, fs$15[gracefulQueue]);
11490
+ module.exports = patch(clone(fs$15));
11491
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs$15.__patched) {
11492
+ module.exports = patch(fs$15);
11493
+ fs$15.__patched = true;
11494
11494
  }
11495
11495
  function patch(fs) {
11496
11496
  polyfills(fs);
@@ -11745,23 +11745,23 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11745
11745
  }
11746
11746
  function enqueue(elem) {
11747
11747
  debug("ENQUEUE", elem[0].name, elem[1]);
11748
- fs$16[gracefulQueue].push(elem);
11748
+ fs$15[gracefulQueue].push(elem);
11749
11749
  retry();
11750
11750
  }
11751
11751
  var retryTimer;
11752
11752
  function resetQueue() {
11753
11753
  var now = Date.now();
11754
- for (var i = 0; i < fs$16[gracefulQueue].length; ++i) if (fs$16[gracefulQueue][i].length > 2) {
11755
- fs$16[gracefulQueue][i][3] = now;
11756
- fs$16[gracefulQueue][i][4] = now;
11754
+ for (var i = 0; i < fs$15[gracefulQueue].length; ++i) if (fs$15[gracefulQueue][i].length > 2) {
11755
+ fs$15[gracefulQueue][i][3] = now;
11756
+ fs$15[gracefulQueue][i][4] = now;
11757
11757
  }
11758
11758
  retry();
11759
11759
  }
11760
11760
  function retry() {
11761
11761
  clearTimeout(retryTimer);
11762
11762
  retryTimer = void 0;
11763
- if (fs$16[gracefulQueue].length === 0) return;
11764
- var elem = fs$16[gracefulQueue].shift();
11763
+ if (fs$15[gracefulQueue].length === 0) return;
11764
+ var elem = fs$15[gracefulQueue].shift();
11765
11765
  var fn = elem[0];
11766
11766
  var args = elem[1];
11767
11767
  var err = elem[2];
@@ -11780,7 +11780,7 @@ var require_graceful_fs = /* @__PURE__ */ __commonJSMin(((exports, module) => {
11780
11780
  if (sinceAttempt >= Math.min(sinceStart * 1.2, 100)) {
11781
11781
  debug("RETRY", fn.name, args);
11782
11782
  fn.apply(null, args.concat([startTime]));
11783
- } else fs$16[gracefulQueue].push(elem);
11783
+ } else fs$15[gracefulQueue].push(elem);
11784
11784
  }
11785
11785
  if (retryTimer === void 0) retryTimer = setTimeout(retry, 0);
11786
11786
  }
@@ -12132,7 +12132,7 @@ var require_mtime_precision = /* @__PURE__ */ __commonJSMin(((exports, module) =
12132
12132
  //#endregion
12133
12133
  //#region ../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js
12134
12134
  var require_lockfile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12135
- const path$16 = __require("path");
12135
+ const path$15 = __require("path");
12136
12136
  const fs = require_graceful_fs();
12137
12137
  const retry = require_retry$3();
12138
12138
  const onExit = require_signal_exit();
@@ -12142,7 +12142,7 @@ var require_lockfile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
12142
12142
  return options.lockfilePath || `${file}.lock`;
12143
12143
  }
12144
12144
  function resolveCanonicalPath(file, options, callback) {
12145
- if (!options.realpath) return callback(null, path$16.resolve(file));
12145
+ if (!options.realpath) return callback(null, path$15.resolve(file));
12146
12146
  options.fs.realpath(file, callback);
12147
12147
  }
12148
12148
  function acquireLock(file, options, callback) {
@@ -14616,7 +14616,7 @@ async function syncDir(dirPath) {
14616
14616
  */
14617
14617
  function syncFd(fd) {
14618
14618
  return new Promise((resolve, reject) => {
14619
- fs$17.fsync(fd, (err) => {
14619
+ fs$16.fsync(fd, (err) => {
14620
14620
  if (err) {
14621
14621
  reject(err);
14622
14622
  return;
@@ -25129,7 +25129,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25129
25129
  };
25130
25130
  return _setPrototypeOf(o, p);
25131
25131
  }
25132
- var path$15 = __require("path");
25132
+ var path$14 = __require("path");
25133
25133
  module.exports = /* @__PURE__ */ function(_EmitterObj) {
25134
25134
  _inheritsLoose(Loader, _EmitterObj);
25135
25135
  function Loader() {
@@ -25137,7 +25137,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
25137
25137
  }
25138
25138
  var _proto = Loader.prototype;
25139
25139
  _proto.resolve = function resolve(from, to) {
25140
- return path$15.resolve(path$15.dirname(from), to);
25140
+ return path$14.resolve(path$14.dirname(from), to);
25141
25141
  };
25142
25142
  _proto.isRelative = function isRelative(filename) {
25143
25143
  return filename.indexOf("./") === 0 || filename.indexOf("../") === 0;
@@ -26793,8 +26793,8 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26793
26793
  };
26794
26794
  return _setPrototypeOf(o, p);
26795
26795
  }
26796
- var fs$15 = __require("fs");
26797
- var path$14 = __require("path");
26796
+ var fs$14 = __require("fs");
26797
+ var path$13 = __require("path");
26798
26798
  var Loader = require_loader();
26799
26799
  var PrecompiledLoader = require_precompiled_loader().PrecompiledLoader;
26800
26800
  var chokidar;
@@ -26809,7 +26809,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26809
26809
  _this.noCache = !!opts.noCache;
26810
26810
  if (searchPaths) {
26811
26811
  searchPaths = Array.isArray(searchPaths) ? searchPaths : [searchPaths];
26812
- _this.searchPaths = searchPaths.map(path$14.normalize);
26812
+ _this.searchPaths = searchPaths.map(path$13.normalize);
26813
26813
  } else _this.searchPaths = ["."];
26814
26814
  if (opts.watch) {
26815
26815
  try {
@@ -26817,10 +26817,10 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26817
26817
  } catch (e) {
26818
26818
  throw new Error("watch requires chokidar to be installed");
26819
26819
  }
26820
- var paths = _this.searchPaths.filter(fs$15.existsSync);
26820
+ var paths = _this.searchPaths.filter(fs$14.existsSync);
26821
26821
  var watcher = chokidar.watch(paths);
26822
26822
  watcher.on("all", function(event, fullname) {
26823
- fullname = path$14.resolve(fullname);
26823
+ fullname = path$13.resolve(fullname);
26824
26824
  if (event === "change" && fullname in _this.pathsToNames) _this.emit("update", _this.pathsToNames[fullname], fullname);
26825
26825
  });
26826
26826
  watcher.on("error", function(error) {
@@ -26834,9 +26834,9 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26834
26834
  var fullpath = null;
26835
26835
  var paths = this.searchPaths;
26836
26836
  for (var i = 0; i < paths.length; i++) {
26837
- var basePath = path$14.resolve(paths[i]);
26838
- var p = path$14.resolve(paths[i], name);
26839
- if (p.indexOf(basePath) === 0 && fs$15.existsSync(p)) {
26837
+ var basePath = path$13.resolve(paths[i]);
26838
+ var p = path$13.resolve(paths[i], name);
26839
+ if (p.indexOf(basePath) === 0 && fs$14.existsSync(p)) {
26840
26840
  fullpath = p;
26841
26841
  break;
26842
26842
  }
@@ -26844,7 +26844,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26844
26844
  if (!fullpath) return null;
26845
26845
  this.pathsToNames[fullpath] = name;
26846
26846
  var source = {
26847
- src: fs$15.readFileSync(fullpath, "utf-8"),
26847
+ src: fs$14.readFileSync(fullpath, "utf-8"),
26848
26848
  path: fullpath,
26849
26849
  noCache: this.noCache
26850
26850
  };
@@ -26892,7 +26892,7 @@ var require_node_loaders = /* @__PURE__ */ __commonJSMin(((exports, module) => {
26892
26892
  }
26893
26893
  this.pathsToNames[fullpath] = name;
26894
26894
  var source = {
26895
- src: fs$15.readFileSync(fullpath, "utf-8"),
26895
+ src: fs$14.readFileSync(fullpath, "utf-8"),
26896
26896
  path: fullpath,
26897
26897
  noCache: this.noCache
26898
26898
  };
@@ -27194,13 +27194,13 @@ var require_globals = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27194
27194
  //#endregion
27195
27195
  //#region ../../node_modules/.pnpm/nunjucks@3.2.4_chokidar@4.0.3/node_modules/nunjucks/src/express-app.js
27196
27196
  var require_express_app = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27197
- var path$13 = __require("path");
27197
+ var path$12 = __require("path");
27198
27198
  module.exports = function express(env, app) {
27199
27199
  function NunjucksView(name, opts) {
27200
27200
  this.name = name;
27201
27201
  this.path = name;
27202
27202
  this.defaultEngine = opts.defaultEngine;
27203
- this.ext = path$13.extname(name);
27203
+ this.ext = path$12.extname(name);
27204
27204
  if (!this.ext && !this.defaultEngine) throw new Error("No default engine was specified and no extension was provided.");
27205
27205
  if (!this.ext) this.name += this.ext = (this.defaultEngine[0] !== "." ? "." : "") + this.defaultEngine;
27206
27206
  }
@@ -27636,8 +27636,8 @@ var require_precompile_global = /* @__PURE__ */ __commonJSMin(((exports, module)
27636
27636
  //#endregion
27637
27637
  //#region ../../node_modules/.pnpm/nunjucks@3.2.4_chokidar@4.0.3/node_modules/nunjucks/src/precompile.js
27638
27638
  var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27639
- var fs$14 = __require("fs");
27640
- var path$12 = __require("path");
27639
+ var fs$13 = __require("fs");
27640
+ var path$11 = __require("path");
27641
27641
  var _prettifyError = require_lib$7()._prettifyError;
27642
27642
  var compiler = require_compiler();
27643
27643
  var Environment = require_environment().Environment;
@@ -27661,27 +27661,27 @@ var require_precompile = /* @__PURE__ */ __commonJSMin(((exports, module) => {
27661
27661
  var env = opts.env || new Environment([]);
27662
27662
  var wrapper = opts.wrapper || precompileGlobal;
27663
27663
  if (opts.isString) return precompileString(input, opts);
27664
- var pathStats = fs$14.existsSync(input) && fs$14.statSync(input);
27664
+ var pathStats = fs$13.existsSync(input) && fs$13.statSync(input);
27665
27665
  var precompiled = [];
27666
27666
  var templates = [];
27667
27667
  function addTemplates(dir) {
27668
- fs$14.readdirSync(dir).forEach(function(file) {
27669
- var filepath = path$12.join(dir, file);
27670
- var subpath = filepath.substr(path$12.join(input, "/").length);
27671
- var stat = fs$14.statSync(filepath);
27668
+ fs$13.readdirSync(dir).forEach(function(file) {
27669
+ var filepath = path$11.join(dir, file);
27670
+ var subpath = filepath.substr(path$11.join(input, "/").length);
27671
+ var stat = fs$13.statSync(filepath);
27672
27672
  if (stat && stat.isDirectory()) {
27673
27673
  subpath += "/";
27674
27674
  if (!match(subpath, opts.exclude)) addTemplates(filepath);
27675
27675
  } else if (match(subpath, opts.include)) templates.push(filepath);
27676
27676
  });
27677
27677
  }
27678
- if (pathStats.isFile()) precompiled.push(_precompile(fs$14.readFileSync(input, "utf-8"), opts.name || input, env));
27678
+ if (pathStats.isFile()) precompiled.push(_precompile(fs$13.readFileSync(input, "utf-8"), opts.name || input, env));
27679
27679
  else if (pathStats.isDirectory()) {
27680
27680
  addTemplates(input);
27681
27681
  for (var i = 0; i < templates.length; i++) {
27682
- var name = templates[i].replace(path$12.join(input, "/"), "");
27682
+ var name = templates[i].replace(path$11.join(input, "/"), "");
27683
27683
  try {
27684
- precompiled.push(_precompile(fs$14.readFileSync(templates[i], "utf-8"), name, env));
27684
+ precompiled.push(_precompile(fs$13.readFileSync(templates[i], "utf-8"), name, env));
27685
27685
  } catch (e) {
27686
27686
  if (opts.force) console.error(e);
27687
27687
  else throw e;
@@ -36246,7 +36246,7 @@ var require_gifframe = /* @__PURE__ */ __commonJSMin(((exports) => {
36246
36246
  //#region ../../node_modules/.pnpm/gifwrap@0.10.1/node_modules/gifwrap/src/gifutil.js
36247
36247
  var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
36248
36248
  /** @namespace GifUtil */
36249
- const fs$13 = __require("fs");
36249
+ const fs$12 = __require("fs");
36250
36250
  const ImageQ = require_image_q();
36251
36251
  const BitmapImage = require_bitmapimage();
36252
36252
  const { GifFrame } = require_gifframe();
@@ -36513,7 +36513,7 @@ var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
36513
36513
  }
36514
36514
  function _readBinary(path) {
36515
36515
  return new Promise((resolve, reject) => {
36516
- fs$13.readFile(path, (err, buffer) => {
36516
+ fs$12.readFile(path, (err, buffer) => {
36517
36517
  if (err) return reject(err);
36518
36518
  return resolve(buffer);
36519
36519
  });
@@ -36521,7 +36521,7 @@ var require_gifutil = /* @__PURE__ */ __commonJSMin(((exports) => {
36521
36521
  }
36522
36522
  function _writeBinary(path, buffer) {
36523
36523
  return new Promise((resolve, reject) => {
36524
- fs$13.writeFile(path, buffer, (err) => {
36524
+ fs$12.writeFile(path, buffer, (err) => {
36525
36525
  if (err) return reject(err);
36526
36526
  return resolve();
36527
36527
  });
@@ -62339,7 +62339,7 @@ var init_file_type = __esmMin((() => {
62339
62339
  }
62340
62340
  async fromFile(path) {
62341
62341
  this.options.signal?.throwIfAborted();
62342
- const fileHandle = await fs.open(path, constants.O_RDONLY | constants.O_NONBLOCK);
62342
+ const fileHandle = await ro.open(path, constants.O_RDONLY | constants.O_NONBLOCK);
62343
62343
  const fileStat = await fileHandle.stat();
62344
62344
  if (!fileStat.isFile()) {
62345
62345
  await fileHandle.close();
@@ -72844,7 +72844,7 @@ async function processBitmapFont(file, font) {
72844
72844
  ...font,
72845
72845
  chars,
72846
72846
  kernings,
72847
- pages: await Promise.all(font.pages.map(async (page) => CharacterJimp.read(path$1.join(path$1.dirname(file), page))))
72847
+ pages: await Promise.all(font.pages.map(async (page) => CharacterJimp.read(js.join(js.dirname(file), page))))
72848
72848
  };
72849
72849
  }
72850
72850
  var import_parse_bmfont_ascii, import_lib$1, import_parse_bmfont_binary, convertXML, isWebWorker, CharacterJimp, HEADER;
@@ -80696,7 +80696,7 @@ var require_buffer_from = /* @__PURE__ */ __commonJSMin(((exports, module) => {
80696
80696
  //#region ../../node_modules/.pnpm/source-map-support@0.5.21/node_modules/source-map-support/source-map-support.js
80697
80697
  var require_source_map_support = /* @__PURE__ */ __commonJSMin(((exports, module) => {
80698
80698
  var SourceMapConsumer = require_source_map().SourceMapConsumer;
80699
- var path$11 = __require("path");
80699
+ var path$10 = __require("path");
80700
80700
  var fs;
80701
80701
  try {
80702
80702
  fs = __require("fs");
@@ -80773,15 +80773,15 @@ var require_source_map_support = /* @__PURE__ */ __commonJSMin(((exports, module
80773
80773
  });
80774
80774
  function supportRelativeURL(file, url) {
80775
80775
  if (!file) return url;
80776
- var dir = path$11.dirname(file);
80776
+ var dir = path$10.dirname(file);
80777
80777
  var match = /^\w+:\/\/[^\/]*/.exec(dir);
80778
80778
  var protocol = match ? match[0] : "";
80779
80779
  var startPath = dir.slice(protocol.length);
80780
80780
  if (protocol && /^\/\w\:/.test(startPath)) {
80781
80781
  protocol += "/";
80782
- return protocol + path$11.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
80782
+ return protocol + path$10.resolve(dir.slice(protocol.length), url).replace(/\\/g, "/");
80783
80783
  }
80784
- return protocol + path$11.resolve(dir.slice(protocol.length), url);
80784
+ return protocol + path$10.resolve(dir.slice(protocol.length), url);
80785
80785
  }
80786
80786
  function retrieveSourceMapURL(source) {
80787
80787
  var fileData;
@@ -252363,7 +252363,7 @@ function Yn(s, t) {
252363
252363
  function Kn(s, t) {
252364
252364
  s.head = new ue$1(t, void 0, s.head, s), s.tail || (s.tail = s.head), s.length++;
252365
252365
  }
252366
- var zr, Ur, Ds, Wr, Gr, Zr, Q$1, J$1, nt$1, De$1, qt, Ne$1, Ns, Ae$1, As, z$1, Mt, g$1, Qt, Bt, b$1, N$1, _$1, bi, Ie$1, L$1, S, _i, Oi, Is, Ti, Z$1, xi, Ce$1, Jt$1, Rt, C, jt, Yr, Kr, Vr, $r, Fe$1, Li, Xr, qr, A$1, Jr, ht, H$1, te, m$1, Ni, tt$1, Ai, ki, vi, ie$1, ke$1, Ut$1, Ht, Ii, Pt, at, U$1, ot, Y$1, zt, Ci, j$1, ee$1, Fi, ve$1, gt$2, Me, bt, _t, Be$1, et$1, Wt$1, jr, Fs, ks, vs, Ms, Bs, tn, se$1, K$1, sn, M$1, rn, zs, nn, Bi, Tt, Gt, Pi, re, Pe$1, ze$1, Ue, He$1, We$1, Ge$1, Ze$1, Ye$1, Ke$1, Us, hn, an, Hs, ln, cn, Ws, Gs, Hi, ne, dn, Ui, oe$1, Ve$1, un, F$1, mn, xt, Wi, pn, lt, En, wn, Sn, ct, yn, Rn, gn, Gi, bn, Lt, ft, On, Tn, xn, f, $e$1, Dt, Nn, Xi, qi, An, B$1, Nt, it, Zi, Zs, V$1, he$1, dt, Ys, p, st$1, ut, Yi, At, w$1, Xe$1, qe$1, Ki, Ks, Vs, ae$1, Vi, Qe$1, Yt$1, $$1, Je$1, It, je$1, ti, $s, In, le$1, $i, Xs, Cn, rt$1, mt, vn, Qi, Mn, Bn, Ct, Ji, zn, qs, ce$1, ei, ji, Un, Hn, ts, Qs, rr, Wn, tr, er, ir, is$2, sr, fe$1, ii, ss, si, rs, ns, os$6, hs, pt, ri, as, es, q$1, de$1, ni, oi, Gn, hi, ue$1, pi, nr, li, me$1, W$1, pe$2, Et, Ft$1, Ee$1, ai, G, ls, ci, or, ds, us, fi, di, hr, cs, ui, lr, fs$12, wt, kt, Vn, $n, fr, dr, Xn, qn, Er, wr, ur, Sr, yr, Rr, jn, to, eo, mr, ms, ps, Ei, io, Es, so, ws, Se$1, St, no, gr, Ss, br, oo, _r, ys, Or, Vt$1, Tr, ao, lo, yi, Lr, Dr, _s, Nr, Os, P$1, Ts, xs, gi, Ar, Ir, Re, Cr, Fr, Rs, yt, O$1, Ri, kr, $t, gs, bs, Ls, ge$1, be, _e$1, Oe$1, Te$1, uo, mo, po, vr, Xt$1, ye$1, xe$1, Eo, wo, So, yo, Ro, go, bo, _o, vt, To;
252366
+ var zr, Ur, Ds, Wr, Gr, Zr, Q$1, J$1, nt$1, De$1, qt, Ne$1, Ns, Ae$1, As, z$1, Mt, g$1, Qt, Bt, b$1, N$1, _$1, bi, Ie$1, L$1, S, _i, Oi, Is, Ti, Z$1, xi, Ce$1, Jt$1, Rt, C, jt, Yr, Kr, Vr, $r, Fe$1, Li, Xr, qr, A$1, Jr, ht, H$1, te, m$1, Ni, tt$1, Ai, ki, vi, ie$1, ke$1, Ut$1, Ht, Ii, Pt, at, U$1, ot, Y$1, zt, Ci, j$1, ee$1, Fi, ve$1, gt$2, Me, bt, _t, Be$1, et$1, Wt$1, jr, Fs, ks, vs, Ms, Bs, tn, se$1, K$1, sn, M$1, rn, zs, nn, Bi, Tt, Gt, Pi, re, Pe$1, ze$1, Ue, He$1, We$1, Ge$1, Ze$1, Ye$1, Ke$1, Us, hn, an, Hs, ln, cn, Ws, Gs, Hi, ne, dn, Ui, oe$1, Ve$1, un, F$1, mn, xt, Wi, pn, lt, En, wn, Sn, ct, yn, Rn, gn, Gi, bn, Lt, ft, On, Tn, xn, f, $e$1, Dt, Nn, Xi, qi, An, B$1, Nt, it, Zi, Zs, V$1, he$1, dt, Ys, p, st$1, ut, Yi, At, w$1, Xe$1, qe$1, Ki, Ks, Vs, ae$1, Vi, Qe$1, Yt$1, $$1, Je$1, It, je$1, ti, $s, In, le$1, $i, Xs, Cn, rt$1, mt, vn, Qi, Mn, Bn, Ct, Ji, zn, qs, ce$1, ei, ji, Un, Hn, ts, Qs, rr, Wn, tr, er, ir, is$2, sr, fe$1, ii, ss, si, rs, ns, os$6, hs, pt, ri, as, es, q$1, de$1, ni, oi, Gn, hi, ue$1, pi, nr, li, me$1, W$1, pe$2, Et, Ft$1, Ee$1, ai, G, ls, ci, or, ds, us, fi, di, hr, cs, ui, lr, fs$11, wt, kt, Vn, $n, fr, dr, Xn, qn, Er, wr, ur, Sr, yr, Rr, jn, to, eo, mr, ms, ps, Ei, io, Es, so, ws, Se$1, St, no, gr, Ss, br, oo, _r, ys, Or, Vt$1, Tr, ao, lo, yi, Lr, Dr, _s, Nr, Os, P$1, Ts, xs, gi, Ar, Ir, Re, Cr, Fr, Rs, yt, O$1, Ri, kr, $t, gs, bs, Ls, ge$1, be, _e$1, Oe$1, Te$1, uo, mo, po, vr, Xt$1, ye$1, xe$1, Eo, wo, So, yo, Ro, go, bo, _o, vt, To;
252367
252367
  var init_index_min = __esmMin((() => {
252368
252368
  zr = Object.defineProperty;
252369
252369
  Ur = (s, t) => {
@@ -253891,7 +253891,7 @@ while (this[Zs](this[st$1].shift()));
253891
253891
  let [o, h] = ce$1(this.path);
253892
253892
  o && typeof h == "string" && (this.path = h, r = o);
253893
253893
  }
253894
- this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || path$1.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, {
253894
+ this.win32 = !!i.win32 || process.platform === "win32", this.win32 && (this.path = Qs(this.path.replaceAll(/\\/g, "/")), t = t.replaceAll(/\\/g, "/")), this.absolute = f(i.absolute || js.resolve(this.cwd, t)), this.path === "" && (this.path = "./"), r && this.warn("TAR_ENTRY_INFO", `stripping ${r} from absolute path`, {
253895
253895
  entry: this,
253896
253896
  path: r + this.path
253897
253897
  });
@@ -253974,7 +253974,7 @@ while (this[Zs](this[st$1].shift()));
253974
253974
  }
253975
253975
  [sr](t) {
253976
253976
  if (!this.stat) throw new Error("cannot create link entry without stat");
253977
- this.type = "Link", this.linkpath = f(path$1.relative(this.cwd, t)), this.stat.size = 0, this[fe$1](), this.end();
253977
+ this.type = "Link", this.linkpath = f(js.relative(this.cwd, t)), this.stat.size = 0, this[fe$1](), this.end();
253978
253978
  }
253979
253979
  [er]() {
253980
253980
  if (!this.stat) throw new Error("cannot create file entry without stat");
@@ -254333,7 +254333,7 @@ while (this[Zs](this[st$1].shift()));
254333
254333
  constructor(t, e) {
254334
254334
  this.path = t || "./", this.absolute = e;
254335
254335
  }
254336
- }, nr = Buffer.alloc(1024), li = Symbol("onStat"), me$1 = Symbol("ended"), W$1 = Symbol("queue"), pe$2 = Symbol("pendingLinks"), Et = Symbol("current"), Ft$1 = Symbol("process"), Ee$1 = Symbol("processing"), ai = Symbol("processJob"), G = Symbol("jobs"), ls = Symbol("jobDone"), ci = Symbol("addFSEntry"), or = Symbol("addTarEntry"), ds = Symbol("stat"), us = Symbol("readdir"), fi = Symbol("onreaddir"), di = Symbol("pipe"), hr = Symbol("entry"), cs = Symbol("entryOpt"), ui = Symbol("writeEntryClass"), lr = Symbol("write"), fs$12 = Symbol("ondrain"), wt = class extends A$1 {
254336
+ }, nr = Buffer.alloc(1024), li = Symbol("onStat"), me$1 = Symbol("ended"), W$1 = Symbol("queue"), pe$2 = Symbol("pendingLinks"), Et = Symbol("current"), Ft$1 = Symbol("process"), Ee$1 = Symbol("processing"), ai = Symbol("processJob"), G = Symbol("jobs"), ls = Symbol("jobDone"), ci = Symbol("addFSEntry"), or = Symbol("addTarEntry"), ds = Symbol("stat"), us = Symbol("readdir"), fi = Symbol("onreaddir"), di = Symbol("pipe"), hr = Symbol("entry"), cs = Symbol("entryOpt"), ui = Symbol("writeEntryClass"), lr = Symbol("write"), fs$11 = Symbol("ondrain"), wt = class extends A$1 {
254337
254337
  sync = !1;
254338
254338
  opt;
254339
254339
  cwd;
@@ -254366,8 +254366,8 @@ while (this[Zs](this[st$1].shift()));
254366
254366
  if ((t.gzip ? 1 : 0) + (t.brotli ? 1 : 0) + (t.zstd ? 1 : 0) > 1) throw new TypeError("gzip, brotli, zstd are mutually exclusive");
254367
254367
  if (t.gzip && (typeof t.gzip != "object" && (t.gzip = {}), this.portable && (t.gzip.portable = !0), this.zip = new ze$1(t.gzip)), t.brotli && (typeof t.brotli != "object" && (t.brotli = {}), this.zip = new We$1(t.brotli)), t.zstd && (typeof t.zstd != "object" && (t.zstd = {}), this.zip = new Ye$1(t.zstd)), !this.zip) throw new Error("impossible");
254368
254368
  let e = this.zip;
254369
- e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs$12]()), this.on("resume", () => e.resume());
254370
- } else this.on("drain", this[fs$12]);
254369
+ e.on("data", (i) => super.write(i)), e.on("end", () => super.end()), e.on("drain", () => this[fs$11]()), this.on("resume", () => e.resume());
254370
+ } else this.on("drain", this[fs$11]);
254371
254371
  this.noDirRecurse = !!t.noDirRecurse, this.follow = !!t.follow, this.noMtime = !!t.noMtime, t.mtime && (this.mtime = t.mtime), this.filter = typeof t.filter == "function" ? t.filter : () => !0, this[W$1] = new hi(), this[G] = 0, this.jobs = Number(t.jobs) || 4, this[Ee$1] = !1, this[me$1] = !1;
254372
254372
  }
254373
254373
  [lr](t) {
@@ -254384,7 +254384,7 @@ while (this[Zs](this[st$1].shift()));
254384
254384
  return typeof t == "string" ? this[ci](t) : this[or](t), this.flowing;
254385
254385
  }
254386
254386
  [or](t) {
254387
- let e = f(path$1.resolve(this.cwd, t.path));
254387
+ let e = f(js.resolve(this.cwd, t.path));
254388
254388
  if (!this.filter(t.path, t)) t.resume();
254389
254389
  else {
254390
254390
  let i = new pi(t.path, e);
@@ -254393,7 +254393,7 @@ while (this[Zs](this[st$1].shift()));
254393
254393
  this[Ft$1]();
254394
254394
  }
254395
254395
  [ci](t) {
254396
- let e = f(path$1.resolve(this.cwd, t));
254396
+ let e = f(js.resolve(this.cwd, t));
254397
254397
  this[W$1].push(new pi(t, e)), this[Ft$1]();
254398
254398
  }
254399
254399
  [ds](t) {
@@ -254494,7 +254494,7 @@ while (this[Zs](this[st$1].shift()));
254494
254494
  this.emit("error", e);
254495
254495
  }
254496
254496
  }
254497
- [fs$12]() {
254497
+ [fs$11]() {
254498
254498
  this[Et] && this[Et].entry && this[Et].entry.resume();
254499
254499
  }
254500
254500
  [di](t) {
@@ -254660,7 +254660,7 @@ while (this[Zs](this[st$1].shift()));
254660
254660
  E ? e(E) : x && a ? Es(x, o, h, (Le) => y(Le)) : n ? Kt.chmod(s, r, e) : e();
254661
254661
  };
254662
254662
  if (s === d) return no(s, y);
254663
- if (l) return fs.mkdir(s, {
254663
+ if (l) return ro.mkdir(s, {
254664
254664
  mode: r,
254665
254665
  recursive: !0
254666
254666
  }).then((E) => y(null, E ?? void 0), y);
@@ -255419,7 +255419,7 @@ var require_pend = /* @__PURE__ */ __commonJSMin(((exports, module) => {
255419
255419
  //#endregion
255420
255420
  //#region ../../node_modules/.pnpm/yauzl@3.3.0/node_modules/yauzl/fd-slicer.js
255421
255421
  var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255422
- var fs$11 = __require("fs");
255422
+ var fs$10 = __require("fs");
255423
255423
  var util$6 = __require("util");
255424
255424
  var stream$2 = __require("stream");
255425
255425
  var Readable = stream$2.Readable;
@@ -255444,7 +255444,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255444
255444
  FdSlicer.prototype.read = function(buffer, offset, length, position, callback) {
255445
255445
  var self = this;
255446
255446
  self.pend.go(function(cb) {
255447
- fs$11.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
255447
+ fs$10.read(self.fd, buffer, offset, length, position, function(err, bytesRead, buffer) {
255448
255448
  cb();
255449
255449
  callback(err, bytesRead, buffer);
255450
255450
  });
@@ -255453,7 +255453,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255453
255453
  FdSlicer.prototype.write = function(buffer, offset, length, position, callback) {
255454
255454
  var self = this;
255455
255455
  self.pend.go(function(cb) {
255456
- fs$11.write(self.fd, buffer, offset, length, position, function(err, written, buffer) {
255456
+ fs$10.write(self.fd, buffer, offset, length, position, function(err, written, buffer) {
255457
255457
  cb();
255458
255458
  callback(err, written, buffer);
255459
255459
  });
@@ -255473,7 +255473,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255473
255473
  self.refCount -= 1;
255474
255474
  if (self.refCount > 0) return;
255475
255475
  if (self.refCount < 0) throw new Error("invalid unref");
255476
- if (self.autoClose) fs$11.close(self.fd, onCloseDone);
255476
+ if (self.autoClose) fs$10.close(self.fd, onCloseDone);
255477
255477
  function onCloseDone(err) {
255478
255478
  if (err) self.emit("error", err);
255479
255479
  else self.emit("close");
@@ -255504,7 +255504,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255504
255504
  self.context.pend.go(function(cb) {
255505
255505
  if (self.destroyed) return cb();
255506
255506
  var buffer = Buffer.allocUnsafe(toRead);
255507
- fs$11.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
255507
+ fs$10.read(self.context.fd, buffer, 0, toRead, self.pos, function(err, bytesRead) {
255508
255508
  if (err) self.destroy(err);
255509
255509
  else if (bytesRead === 0) {
255510
255510
  self.destroyed = true;
@@ -255550,7 +255550,7 @@ var require_fd_slicer = /* @__PURE__ */ __commonJSMin(((exports) => {
255550
255550
  }
255551
255551
  self.context.pend.go(function(cb) {
255552
255552
  if (self.destroyed) return cb();
255553
- fs$11.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err, bytes) {
255553
+ fs$10.write(self.context.fd, buffer, 0, buffer.length, self.pos, function(err, bytes) {
255554
255554
  if (err) {
255555
255555
  self.destroy();
255556
255556
  cb();
@@ -292482,7 +292482,7 @@ var init_proxy = __esmMin((() => {
292482
292482
  var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292483
292483
  module.exports = isexe;
292484
292484
  isexe.sync = sync;
292485
- var fs$9 = __require("fs");
292485
+ var fs$8 = __require("fs");
292486
292486
  function checkPathExt(path, options) {
292487
292487
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
292488
292488
  if (!pathext) return true;
@@ -292499,12 +292499,12 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292499
292499
  return checkPathExt(path, options);
292500
292500
  }
292501
292501
  function isexe(path, options, cb) {
292502
- fs$9.stat(path, function(er, stat) {
292502
+ fs$8.stat(path, function(er, stat) {
292503
292503
  cb(er, er ? false : checkStat(stat, path, options));
292504
292504
  });
292505
292505
  }
292506
292506
  function sync(path, options) {
292507
- return checkStat(fs$9.statSync(path), path, options);
292507
+ return checkStat(fs$8.statSync(path), path, options);
292508
292508
  }
292509
292509
  }));
292510
292510
  //#endregion
@@ -292512,14 +292512,14 @@ var require_windows = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292512
292512
  var require_mode = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292513
292513
  module.exports = isexe;
292514
292514
  isexe.sync = sync;
292515
- var fs$8 = __require("fs");
292515
+ var fs$7 = __require("fs");
292516
292516
  function isexe(path, options, cb) {
292517
- fs$8.stat(path, function(er, stat) {
292517
+ fs$7.stat(path, function(er, stat) {
292518
292518
  cb(er, er ? false : checkStat(stat, options));
292519
292519
  });
292520
292520
  }
292521
292521
  function sync(path, options) {
292522
- return checkStat(fs$8.statSync(path), options);
292522
+ return checkStat(fs$7.statSync(path), options);
292523
292523
  }
292524
292524
  function checkStat(stat, options) {
292525
292525
  return stat.isFile() && checkMode(stat, options);
@@ -292583,7 +292583,7 @@ var require_isexe = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292583
292583
  //#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
292584
292584
  var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292585
292585
  const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
292586
- const path$10 = __require("path");
292586
+ const path$9 = __require("path");
292587
292587
  const COLON = isWindows ? ";" : ":";
292588
292588
  const isexe = require_isexe();
292589
292589
  const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -292613,7 +292613,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292613
292613
  if (i === pathEnv.length) return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd));
292614
292614
  const ppRaw = pathEnv[i];
292615
292615
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
292616
- const pCmd = path$10.join(pathPart, cmd);
292616
+ const pCmd = path$9.join(pathPart, cmd);
292617
292617
  resolve(subStep(!pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd, i, 0));
292618
292618
  });
292619
292619
  const subStep = (p, i, ii) => new Promise((resolve, reject) => {
@@ -292634,7 +292634,7 @@ var require_which = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292634
292634
  for (let i = 0; i < pathEnv.length; i++) {
292635
292635
  const ppRaw = pathEnv[i];
292636
292636
  const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw;
292637
- const pCmd = path$10.join(pathPart, cmd);
292637
+ const pCmd = path$9.join(pathPart, cmd);
292638
292638
  const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd;
292639
292639
  for (let j = 0; j < pathExt.length; j++) {
292640
292640
  const cur = p + pathExt[j];
@@ -292665,7 +292665,7 @@ var require_path_key = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292665
292665
  //#endregion
292666
292666
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
292667
292667
  var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292668
- const path$9 = __require("path");
292668
+ const path$8 = __require("path");
292669
292669
  const which = require_which();
292670
292670
  const getPathKey = require_path_key();
292671
292671
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -292680,12 +292680,12 @@ var require_resolveCommand = /* @__PURE__ */ __commonJSMin(((exports, module) =>
292680
292680
  try {
292681
292681
  resolved = which.sync(parsed.command, {
292682
292682
  path: env[getPathKey({ env })],
292683
- pathExt: withoutPathExt ? path$9.delimiter : void 0
292683
+ pathExt: withoutPathExt ? path$8.delimiter : void 0
292684
292684
  });
292685
292685
  } catch (e) {} finally {
292686
292686
  if (shouldSwitchCwd) process.chdir(cwd);
292687
292687
  }
292688
- if (resolved) resolved = path$9.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
292688
+ if (resolved) resolved = path$8.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved);
292689
292689
  return resolved;
292690
292690
  }
292691
292691
  function resolveCommand(parsed) {
@@ -292734,16 +292734,16 @@ var require_shebang_command = /* @__PURE__ */ __commonJSMin(((exports, module) =
292734
292734
  //#endregion
292735
292735
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
292736
292736
  var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292737
- const fs$7 = __require("fs");
292737
+ const fs$6 = __require("fs");
292738
292738
  const shebangCommand = require_shebang_command();
292739
292739
  function readShebang(command) {
292740
292740
  const size = 150;
292741
292741
  const buffer = Buffer.alloc(size);
292742
292742
  let fd;
292743
292743
  try {
292744
- fd = fs$7.openSync(command, "r");
292745
- fs$7.readSync(fd, buffer, 0, size, 0);
292746
- fs$7.closeSync(fd);
292744
+ fd = fs$6.openSync(command, "r");
292745
+ fs$6.readSync(fd, buffer, 0, size, 0);
292746
+ fs$6.closeSync(fd);
292747
292747
  } catch (e) {}
292748
292748
  return shebangCommand(buffer.toString());
292749
292749
  }
@@ -292752,7 +292752,7 @@ var require_readShebang = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292752
292752
  //#endregion
292753
292753
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
292754
292754
  var require_parse$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292755
- const path$8 = __require("path");
292755
+ const path$7 = __require("path");
292756
292756
  const resolveCommand = require_resolveCommand();
292757
292757
  const escape = require_escape();
292758
292758
  const readShebang = require_readShebang();
@@ -292775,7 +292775,7 @@ var require_parse$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
292775
292775
  const needsShell = !isExecutableRegExp.test(commandFile);
292776
292776
  if (parsed.options.forceShell || needsShell) {
292777
292777
  const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile);
292778
- parsed.command = path$8.normalize(parsed.command);
292778
+ parsed.command = path$7.normalize(parsed.command);
292779
292779
  parsed.command = escape.command(parsed.command);
292780
292780
  parsed.args = parsed.args.map((arg) => escape.argument(arg, needsDoubleEscapeMetaChars));
292781
292781
  parsed.args = [
@@ -310492,7 +310492,7 @@ var require_dist$5 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
310492
310492
  //#endregion
310493
310493
  //#region ../../node_modules/.pnpm/yazl@3.3.1/node_modules/yazl/index.js
310494
310494
  var require_yazl = /* @__PURE__ */ __commonJSMin(((exports) => {
310495
- var fs$6 = __require("fs");
310495
+ var fs$5 = __require("fs");
310496
310496
  var Transform$2 = __require("stream").Transform;
310497
310497
  var PassThrough$2 = __require("stream").PassThrough;
310498
310498
  var zlib$1 = __require("zlib");
@@ -310521,14 +310521,14 @@ var require_yazl = /* @__PURE__ */ __commonJSMin(((exports) => {
310521
310521
  if (shouldIgnoreAdding(self)) return;
310522
310522
  var entry = new Entry(metadataPath, false, options);
310523
310523
  self.entries.push(entry);
310524
- fs$6.stat(realPath, function(err, stats) {
310524
+ fs$5.stat(realPath, function(err, stats) {
310525
310525
  if (err) return self.emit("error", err);
310526
310526
  if (!stats.isFile()) return self.emit("error", /* @__PURE__ */ new Error("not a file: " + realPath));
310527
310527
  entry.uncompressedSize = stats.size;
310528
310528
  if (options.mtime == null) entry.setLastModDate(stats.mtime);
310529
310529
  if (options.mode == null) entry.setFileAttributesMode(stats.mode);
310530
310530
  entry.setFileDataPumpFunction(function() {
310531
- var readStream = fs$6.createReadStream(realPath);
310531
+ var readStream = fs$5.createReadStream(realPath);
310532
310532
  entry.state = Entry.FILE_DATA_IN_PROGRESS;
310533
310533
  readStream.on("error", function(err) {
310534
310534
  self.emit("error", err);
@@ -312374,14 +312374,14 @@ async function readGitExecPath(deps, gitExe) {
312374
312374
  }
312375
312375
  }
312376
312376
  function gitBashCandidatesFromGitExe(gitExe) {
312377
- const normalizedGitExe = path$17.win32.normalize(normalizeWindowsPath(gitExe));
312378
- const gitDir = path$17.win32.dirname(normalizedGitExe);
312379
- const gitDirName = path$17.win32.basename(gitDir).toLowerCase();
312377
+ const normalizedGitExe = path$16.win32.normalize(normalizeWindowsPath(gitExe));
312378
+ const gitDir = path$16.win32.dirname(normalizedGitExe);
312379
+ const gitDirName = path$16.win32.basename(gitDir).toLowerCase();
312380
312380
  if (gitDirName !== "cmd" && gitDirName !== "bin") return;
312381
- return gitBashCandidatesFromGitRoot(path$17.win32.dirname(gitDir));
312381
+ return gitBashCandidatesFromGitRoot(path$16.win32.dirname(gitDir));
312382
312382
  }
312383
312383
  function gitBashCandidatesFromGitExecPath(execPath) {
312384
- const normalized = path$17.win32.normalize(normalizeWindowsPath(execPath));
312384
+ const normalized = path$16.win32.normalize(normalizeWindowsPath(execPath));
312385
312385
  const parts = normalized.split("\\");
312386
312386
  for (let i = parts.length - 1; i >= 0; i -= 1) {
312387
312387
  const segment = parts[i]?.toLowerCase();
@@ -312390,16 +312390,16 @@ function gitBashCandidatesFromGitExecPath(execPath) {
312390
312390
  if (root.length > 0) return gitBashCandidatesFromGitRoot(root);
312391
312391
  }
312392
312392
  }
312393
- return gitBashCandidatesFromGitRoot(path$17.win32.join(normalized, "..", ".."));
312393
+ return gitBashCandidatesFromGitRoot(path$16.win32.join(normalized, "..", ".."));
312394
312394
  }
312395
312395
  function gitBashCandidatesFromGitRoot(root) {
312396
- return [path$17.win32.normalize(path$17.win32.join(root, "bin", "bash.exe")), path$17.win32.normalize(path$17.win32.join(root, "usr", "bin", "bash.exe"))];
312396
+ return [path$16.win32.normalize(path$16.win32.join(root, "bin", "bash.exe")), path$16.win32.normalize(path$16.win32.join(root, "usr", "bin", "bash.exe"))];
312397
312397
  }
312398
312398
  function normalizeWindowsPath(path) {
312399
312399
  return path.replaceAll("/", "\\");
312400
312400
  }
312401
312401
  function isAbsoluteWindowsPath(path) {
312402
- return path$17.win32.isAbsolute(normalizeWindowsPath(path));
312402
+ return path$16.win32.isAbsolute(normalizeWindowsPath(path));
312403
312403
  }
312404
312404
  function dedupeWindowsPaths(paths) {
312405
312405
  const deduped = [];
@@ -327108,8 +327108,8 @@ var require_suggestSimilar = /* @__PURE__ */ __commonJSMin(((exports) => {
327108
327108
  var require_command = /* @__PURE__ */ __commonJSMin(((exports) => {
327109
327109
  const EventEmitter$12 = __require("node:events").EventEmitter;
327110
327110
  const childProcess = __require("node:child_process");
327111
- const path$7 = __require("node:path");
327112
- const fs$5 = __require("node:fs");
327111
+ const path$6 = __require("node:path");
327112
+ const fs$4 = __require("node:fs");
327113
327113
  const process$2 = __require("node:process");
327114
327114
  const { Argument, humanReadableArgName } = require_argument();
327115
327115
  const { CommanderError } = require_error$2();
@@ -327992,7 +327992,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
327992
327992
  * @param {string} subcommandName
327993
327993
  */
327994
327994
  _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
327995
- if (fs$5.existsSync(executableFile)) return;
327995
+ if (fs$4.existsSync(executableFile)) return;
327996
327996
  const executableMissing = `'${executableFile}' does not exist
327997
327997
  - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
327998
327998
  - if the default executable name is not suitable, use the executableFile option to supply a custom name or path
@@ -328015,10 +328015,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
328015
328015
  ".cjs"
328016
328016
  ];
328017
328017
  function findFile(baseDir, baseName) {
328018
- const localBin = path$7.resolve(baseDir, baseName);
328019
- if (fs$5.existsSync(localBin)) return localBin;
328020
- if (sourceExt.includes(path$7.extname(baseName))) return void 0;
328021
- const foundExt = sourceExt.find((ext) => fs$5.existsSync(`${localBin}${ext}`));
328018
+ const localBin = path$6.resolve(baseDir, baseName);
328019
+ if (fs$4.existsSync(localBin)) return localBin;
328020
+ if (sourceExt.includes(path$6.extname(baseName))) return void 0;
328021
+ const foundExt = sourceExt.find((ext) => fs$4.existsSync(`${localBin}${ext}`));
328022
328022
  if (foundExt) return `${localBin}${foundExt}`;
328023
328023
  }
328024
328024
  this._checkForMissingMandatoryOptions();
@@ -328028,21 +328028,21 @@ Expecting one of '${allowedValues.join("', '")}'`);
328028
328028
  if (this._scriptPath) {
328029
328029
  let resolvedScriptPath;
328030
328030
  try {
328031
- resolvedScriptPath = fs$5.realpathSync(this._scriptPath);
328031
+ resolvedScriptPath = fs$4.realpathSync(this._scriptPath);
328032
328032
  } catch {
328033
328033
  resolvedScriptPath = this._scriptPath;
328034
328034
  }
328035
- executableDir = path$7.resolve(path$7.dirname(resolvedScriptPath), executableDir);
328035
+ executableDir = path$6.resolve(path$6.dirname(resolvedScriptPath), executableDir);
328036
328036
  }
328037
328037
  if (executableDir) {
328038
328038
  let localFile = findFile(executableDir, executableFile);
328039
328039
  if (!localFile && !subcommand._executableFile && this._scriptPath) {
328040
- const legacyName = path$7.basename(this._scriptPath, path$7.extname(this._scriptPath));
328040
+ const legacyName = path$6.basename(this._scriptPath, path$6.extname(this._scriptPath));
328041
328041
  if (legacyName !== this._name) localFile = findFile(executableDir, `${legacyName}-${subcommand._name}`);
328042
328042
  }
328043
328043
  executableFile = localFile || executableFile;
328044
328044
  }
328045
- launchWithNode = sourceExt.includes(path$7.extname(executableFile));
328045
+ launchWithNode = sourceExt.includes(path$6.extname(executableFile));
328046
328046
  let proc;
328047
328047
  if (process$2.platform !== "win32") if (launchWithNode) {
328048
328048
  args.unshift(executableFile);
@@ -328746,7 +328746,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
328746
328746
  * @return {Command}
328747
328747
  */
328748
328748
  nameFromFilename(filename) {
328749
- this._name = path$7.basename(filename, path$7.extname(filename));
328749
+ this._name = path$6.basename(filename, path$6.extname(filename));
328750
328750
  return this;
328751
328751
  }
328752
328752
  /**
@@ -338783,6 +338783,49 @@ function registerAcpCommand(parent) {
338783
338783
  }
338784
338784
  });
338785
338785
  }
338786
+ const APPEARANCE_PRESETS = [
338787
+ {
338788
+ id: "dark",
338789
+ appearance: {
338790
+ foreground: "#F4F4F5",
338791
+ surface: "#171717"
338792
+ }
338793
+ },
338794
+ {
338795
+ id: "black",
338796
+ appearance: {
338797
+ foreground: "#F5F5F5",
338798
+ surface: "#000000"
338799
+ }
338800
+ },
338801
+ {
338802
+ id: "light",
338803
+ appearance: {
338804
+ foreground: "#171717",
338805
+ surface: "#FFFFFF"
338806
+ }
338807
+ },
338808
+ {
338809
+ id: "blue",
338810
+ appearance: {
338811
+ foreground: "#EAF2FF",
338812
+ surface: "#071827"
338813
+ }
338814
+ },
338815
+ {
338816
+ id: "green",
338817
+ appearance: {
338818
+ foreground: "#D8FFE6",
338819
+ surface: "#071A12"
338820
+ }
338821
+ }
338822
+ ];
338823
+ function appearancePresetId(appearance) {
338824
+ if (appearance === void 0) return "default";
338825
+ const foreground = appearance.foreground?.toUpperCase();
338826
+ const surface = appearance.surface?.toUpperCase();
338827
+ return APPEARANCE_PRESETS.find((candidate) => candidate.appearance.foreground === foreground && candidate.appearance.surface === surface)?.id ?? "custom";
338828
+ }
338786
338829
  const APPEARANCE_TEXT_TOKENS = [
338787
338830
  "text",
338788
338831
  "textStrong",
@@ -346466,10 +346509,10 @@ var require_atomic_sleep = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346466
346509
  //#endregion
346467
346510
  //#region ../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js
346468
346511
  var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346469
- const fs$4 = __require("fs");
346512
+ const fs$3 = __require("fs");
346470
346513
  const EventEmitter$10 = __require("events");
346471
346514
  const inherits$6 = __require("util").inherits;
346472
- const path$6 = __require("path");
346515
+ const path$5 = __require("path");
346473
346516
  const sleep = require_atomic_sleep();
346474
346517
  const assert$8 = __require("assert");
346475
346518
  const BUSY_WRITE_TIMEOUT = 100;
@@ -346509,17 +346552,17 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346509
346552
  const flags = sonic.append ? "a" : "w";
346510
346553
  const mode = sonic.mode;
346511
346554
  if (sonic.sync) try {
346512
- if (sonic.mkdir) fs$4.mkdirSync(path$6.dirname(file), { recursive: true });
346513
- fileOpened(null, fs$4.openSync(file, flags, mode));
346555
+ if (sonic.mkdir) fs$3.mkdirSync(path$5.dirname(file), { recursive: true });
346556
+ fileOpened(null, fs$3.openSync(file, flags, mode));
346514
346557
  } catch (err) {
346515
346558
  fileOpened(err);
346516
346559
  throw err;
346517
346560
  }
346518
- else if (sonic.mkdir) fs$4.mkdir(path$6.dirname(file), { recursive: true }, (err) => {
346561
+ else if (sonic.mkdir) fs$3.mkdir(path$5.dirname(file), { recursive: true }, (err) => {
346519
346562
  if (err) return fileOpened(err);
346520
- fs$4.open(file, flags, mode, fileOpened);
346563
+ fs$3.open(file, flags, mode, fileOpened);
346521
346564
  });
346522
- else fs$4.open(file, flags, mode, fileOpened);
346565
+ else fs$3.open(file, flags, mode, fileOpened);
346523
346566
  }
346524
346567
  function SonicBoom(opts) {
346525
346568
  if (!(this instanceof SonicBoom)) return new SonicBoom(opts);
@@ -346557,8 +346600,8 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346557
346600
  this.flush = flushBuffer;
346558
346601
  this.flushSync = flushBufferSync;
346559
346602
  this._actualWrite = actualWriteBuffer;
346560
- fsWriteSync = () => fs$4.writeSync(this.fd, this._writingBuf);
346561
- fsWrite = () => fs$4.write(this.fd, this._writingBuf, this.release);
346603
+ fsWriteSync = () => fs$3.writeSync(this.fd, this._writingBuf);
346604
+ fsWrite = () => fs$3.write(this.fd, this._writingBuf, this.release);
346562
346605
  } else if (contentMode === void 0 || contentMode === kContentModeUtf8) {
346563
346606
  this._writingBuf = "";
346564
346607
  this.write = write;
@@ -346566,12 +346609,12 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346566
346609
  this.flushSync = flushSync;
346567
346610
  this._actualWrite = actualWrite;
346568
346611
  fsWriteSync = () => {
346569
- if (Buffer.isBuffer(this._writingBuf)) return fs$4.writeSync(this.fd, this._writingBuf);
346570
- return fs$4.writeSync(this.fd, this._writingBuf, "utf8");
346612
+ if (Buffer.isBuffer(this._writingBuf)) return fs$3.writeSync(this.fd, this._writingBuf);
346613
+ return fs$3.writeSync(this.fd, this._writingBuf, "utf8");
346571
346614
  };
346572
346615
  fsWrite = () => {
346573
- if (Buffer.isBuffer(this._writingBuf)) return fs$4.write(this.fd, this._writingBuf, this.release);
346574
- return fs$4.write(this.fd, this._writingBuf, "utf8", this.release);
346616
+ if (Buffer.isBuffer(this._writingBuf)) return fs$3.write(this.fd, this._writingBuf, this.release);
346617
+ return fs$3.write(this.fd, this._writingBuf, "utf8", this.release);
346575
346618
  };
346576
346619
  } else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
346577
346620
  if (typeof fd === "number") {
@@ -346616,7 +346659,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346616
346659
  return;
346617
346660
  }
346618
346661
  }
346619
- if (this._fsync) fs$4.fsyncSync(this.fd);
346662
+ if (this._fsync) fs$3.fsyncSync(this.fd);
346620
346663
  const len = this._len;
346621
346664
  if (this._reopening) {
346622
346665
  this._writing = false;
@@ -346713,7 +346756,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346713
346756
  this._flushPending = true;
346714
346757
  const onDrain = () => {
346715
346758
  if (!this._fsync) try {
346716
- fs$4.fsync(this.fd, (err) => {
346759
+ fs$3.fsync(this.fd, (err) => {
346717
346760
  this._flushPending = false;
346718
346761
  cb(err);
346719
346762
  });
@@ -346790,7 +346833,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346790
346833
  if (this._writing) return;
346791
346834
  const fd = this.fd;
346792
346835
  this.once("ready", () => {
346793
- if (fd !== this.fd) fs$4.close(fd, (err) => {
346836
+ if (fd !== this.fd) fs$3.close(fd, (err) => {
346794
346837
  if (err) return this.emit("error", err);
346795
346838
  });
346796
346839
  });
@@ -346821,7 +346864,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346821
346864
  while (this._bufs.length || buf.length) {
346822
346865
  if (buf.length <= 0) buf = this._bufs[0];
346823
346866
  try {
346824
- const n = Buffer.isBuffer(buf) ? fs$4.writeSync(this.fd, buf) : fs$4.writeSync(this.fd, buf, "utf8");
346867
+ const n = Buffer.isBuffer(buf) ? fs$3.writeSync(this.fd, buf) : fs$3.writeSync(this.fd, buf, "utf8");
346825
346868
  const releasedBufObj = releaseWritingBuf(buf, this._len, n);
346826
346869
  buf = releasedBufObj.writingBuf;
346827
346870
  this._len = releasedBufObj.len;
@@ -346832,7 +346875,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346832
346875
  }
346833
346876
  }
346834
346877
  try {
346835
- fs$4.fsyncSync(this.fd);
346878
+ fs$3.fsyncSync(this.fd);
346836
346879
  } catch {}
346837
346880
  }
346838
346881
  function flushBufferSync() {
@@ -346846,7 +346889,7 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346846
346889
  while (this._bufs.length || buf.length) {
346847
346890
  if (buf.length <= 0) buf = mergeBuf(this._bufs[0], this._lens[0]);
346848
346891
  try {
346849
- const n = fs$4.writeSync(this.fd, buf);
346892
+ const n = fs$3.writeSync(this.fd, buf);
346850
346893
  buf = buf.subarray(n);
346851
346894
  this._len = Math.max(this._len - n, 0);
346852
346895
  if (buf.length <= 0) {
@@ -346868,24 +346911,24 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346868
346911
  this._writing = true;
346869
346912
  this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || "";
346870
346913
  if (this.sync) try {
346871
- release(null, Buffer.isBuffer(this._writingBuf) ? fs$4.writeSync(this.fd, this._writingBuf) : fs$4.writeSync(this.fd, this._writingBuf, "utf8"));
346914
+ release(null, Buffer.isBuffer(this._writingBuf) ? fs$3.writeSync(this.fd, this._writingBuf) : fs$3.writeSync(this.fd, this._writingBuf, "utf8"));
346872
346915
  } catch (err) {
346873
346916
  release(err);
346874
346917
  }
346875
- else fs$4.write(this.fd, this._writingBuf, release);
346918
+ else fs$3.write(this.fd, this._writingBuf, release);
346876
346919
  }
346877
346920
  function actualWriteBuffer() {
346878
346921
  const release = this.release;
346879
346922
  this._writing = true;
346880
346923
  this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift());
346881
346924
  if (this.sync) try {
346882
- release(null, fs$4.writeSync(this.fd, this._writingBuf));
346925
+ release(null, fs$3.writeSync(this.fd, this._writingBuf));
346883
346926
  } catch (err) {
346884
346927
  release(err);
346885
346928
  }
346886
346929
  else {
346887
346930
  if (kCopyBuffer) this._writingBuf = Buffer.from(this._writingBuf);
346888
- fs$4.write(this.fd, this._writingBuf, release);
346931
+ fs$3.write(this.fd, this._writingBuf, release);
346889
346932
  }
346890
346933
  }
346891
346934
  function actualClose(sonic) {
@@ -346899,10 +346942,10 @@ var require_sonic_boom = /* @__PURE__ */ __commonJSMin(((exports, module) => {
346899
346942
  sonic._lens = [];
346900
346943
  assert$8(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`);
346901
346944
  try {
346902
- fs$4.fsync(sonic.fd, closeWrapped);
346945
+ fs$3.fsync(sonic.fd, closeWrapped);
346903
346946
  } catch {}
346904
346947
  function closeWrapped() {
346905
- if (sonic.fd !== 1 && sonic.fd !== 2) fs$4.close(sonic.fd, done);
346948
+ if (sonic.fd !== 1 && sonic.fd !== 2) fs$3.close(sonic.fd, done);
346906
346949
  else done();
346907
346950
  }
346908
346951
  function done(err) {
@@ -369525,8 +369568,8 @@ var require_constants$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
369525
369568
  //#endregion
369526
369569
  //#region ../../../../node_modules/node-gyp-build/node-gyp-build.js
369527
369570
  var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
369528
- var fs$3 = __require("fs");
369529
- var path$5 = __require("path");
369571
+ var fs$2 = __require("fs");
369572
+ var path$4 = __require("path");
369530
369573
  var os$3 = __require("os");
369531
369574
  var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
369532
369575
  var vars = process.config && process.config.variables || {};
@@ -369543,20 +369586,20 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
369543
369586
  return runtimeRequire(load.resolve(dir));
369544
369587
  }
369545
369588
  load.resolve = load.path = function(dir) {
369546
- dir = path$5.resolve(dir || ".");
369589
+ dir = path$4.resolve(dir || ".");
369547
369590
  try {
369548
- var name = runtimeRequire(path$5.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
369591
+ var name = runtimeRequire(path$4.join(dir, "package.json")).name.toUpperCase().replace(/-/g, "_");
369549
369592
  if (process.env[name + "_PREBUILD"]) dir = process.env[name + "_PREBUILD"];
369550
369593
  } catch (err) {}
369551
369594
  if (!prebuildsOnly) {
369552
- var release = getFirst(path$5.join(dir, "build/Release"), matchBuild);
369595
+ var release = getFirst(path$4.join(dir, "build/Release"), matchBuild);
369553
369596
  if (release) return release;
369554
- var debug = getFirst(path$5.join(dir, "build/Debug"), matchBuild);
369597
+ var debug = getFirst(path$4.join(dir, "build/Debug"), matchBuild);
369555
369598
  if (debug) return debug;
369556
369599
  }
369557
369600
  var prebuild = resolve(dir);
369558
369601
  if (prebuild) return prebuild;
369559
- var nearby = resolve(path$5.dirname(process.execPath));
369602
+ var nearby = resolve(path$4.dirname(process.execPath));
369560
369603
  if (nearby) return nearby;
369561
369604
  var target = [
369562
369605
  "platform=" + platform,
@@ -369572,23 +369615,23 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
369572
369615
  ].filter(Boolean).join(" ");
369573
369616
  throw new Error("No native build was found for " + target + "\n loaded from: " + dir + "\n");
369574
369617
  function resolve(dir) {
369575
- var tuple = readdirSync(path$5.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
369618
+ var tuple = readdirSync(path$4.join(dir, "prebuilds")).map(parseTuple).filter(matchTuple(platform, arch)).sort(compareTuples)[0];
369576
369619
  if (!tuple) return;
369577
- var prebuilds = path$5.join(dir, "prebuilds", tuple.name);
369620
+ var prebuilds = path$4.join(dir, "prebuilds", tuple.name);
369578
369621
  var winner = readdirSync(prebuilds).map(parseTags).filter(matchTags(runtime, abi)).sort(compareTags(runtime))[0];
369579
- if (winner) return path$5.join(prebuilds, winner.file);
369622
+ if (winner) return path$4.join(prebuilds, winner.file);
369580
369623
  }
369581
369624
  };
369582
369625
  function readdirSync(dir) {
369583
369626
  try {
369584
- return fs$3.readdirSync(dir);
369627
+ return fs$2.readdirSync(dir);
369585
369628
  } catch (err) {
369586
369629
  return [];
369587
369630
  }
369588
369631
  }
369589
369632
  function getFirst(dir, filter) {
369590
369633
  var files = readdirSync(dir).filter(filter);
369591
- return files[0] && path$5.join(dir, files[0]);
369634
+ return files[0] && path$4.join(dir, files[0]);
369592
369635
  }
369593
369636
  function matchBuild(name) {
369594
369637
  return /\.node$/.test(name);
@@ -369669,7 +369712,7 @@ var require_node_gyp_build$1 = /* @__PURE__ */ __commonJSMin(((exports, module)
369669
369712
  return typeof window !== "undefined" && window.process && window.process.type === "renderer";
369670
369713
  }
369671
369714
  function isAlpine(platform) {
369672
- return platform === "linux" && fs$3.existsSync("/etc/alpine-release");
369715
+ return platform === "linux" && fs$2.existsSync("/etc/alpine-release");
369673
369716
  }
369674
369717
  load.parseTags = parseTags;
369675
369718
  load.matchTags = matchTags;
@@ -376785,7 +376828,7 @@ var import_multipart = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
376785
376828
  const fp = require_plugin();
376786
376829
  const { createWriteStream: createWriteStream$1 } = __require("node:fs");
376787
376830
  const { unlink: unlink$1 } = __require("node:fs/promises");
376788
- const path$4 = __require("node:path");
376831
+ const path$3 = __require("node:path");
376789
376832
  const { generateId } = require_generateId();
376790
376833
  const createError = require_error$1();
376791
376834
  const streamToNull = require_stream_consumer();
@@ -377080,7 +377123,7 @@ var import_multipart = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((
377080
377123
  for await (const part of parts) {
377081
377124
  values = part.fields;
377082
377125
  if (!part.file) continue;
377083
- const filepath = path$4.join(tmpdir, generateId() + path$4.extname(part.filename || "file" + i++));
377126
+ const filepath = path$3.join(tmpdir, generateId() + path$3.extname(part.filename || "file" + i++));
377084
377127
  const target = createWriteStream$1(filepath);
377085
377128
  try {
377086
377129
  this.tmpUploads.push(filepath);
@@ -389821,8 +389864,8 @@ var require_dist$1 = /* @__PURE__ */ __commonJSMin(((exports) => {
389821
389864
  //#endregion
389822
389865
  //#region ../../node_modules/.pnpm/@fastify+swagger@9.7.0/node_modules/@fastify/swagger/lib/mode/static.js
389823
389866
  var require_static = /* @__PURE__ */ __commonJSMin(((exports, module) => {
389824
- const path$3 = __require("node:path");
389825
- const fs$2 = __require("node:fs");
389867
+ const path$2 = __require("node:path");
389868
+ const fs$1 = __require("node:fs");
389826
389869
  const yaml = require_dist$1();
389827
389870
  module.exports = function(fastify, opts, done) {
389828
389871
  if (!opts.specification) return done(/* @__PURE__ */ new Error("specification is missing in the module options"));
@@ -389831,14 +389874,14 @@ var require_static = /* @__PURE__ */ __commonJSMin(((exports, module) => {
389831
389874
  if (!opts.specification.path && !opts.specification.document) return done(/* @__PURE__ */ new Error("both specification.path and specification.document are missing, should be path to the file or swagger document spec"));
389832
389875
  else if (opts.specification.path) {
389833
389876
  if (typeof opts.specification.path !== "string") return done(/* @__PURE__ */ new Error("specification.path is not a string"));
389834
- if (!fs$2.existsSync(path$3.resolve(opts.specification.path))) return done(/* @__PURE__ */ new Error(`${opts.specification.path} does not exist`));
389835
- const extName = path$3.extname(opts.specification.path).toLowerCase();
389877
+ if (!fs$1.existsSync(path$2.resolve(opts.specification.path))) return done(/* @__PURE__ */ new Error(`${opts.specification.path} does not exist`));
389878
+ const extName = path$2.extname(opts.specification.path).toLowerCase();
389836
389879
  if ([".yaml", ".json"].indexOf(extName) === -1) return done(/* @__PURE__ */ new Error("specification.path extension name is not supported, should be one from ['.yaml', '.json']"));
389837
389880
  if (opts.specification.postProcessor && typeof opts.specification.postProcessor !== "function") return done(/* @__PURE__ */ new Error("specification.postProcessor should be a function"));
389838
389881
  if (opts.specification.baseDir && typeof opts.specification.baseDir !== "string") return done(/* @__PURE__ */ new Error("specification.baseDir should be string"));
389839
- if (!opts.specification.baseDir) opts.specification.baseDir = path$3.resolve(path$3.dirname(opts.specification.path));
389882
+ if (!opts.specification.baseDir) opts.specification.baseDir = path$2.resolve(path$2.dirname(opts.specification.path));
389840
389883
  else while (opts.specification.baseDir.endsWith("/")) opts.specification.baseDir = opts.specification.baseDir.slice(0, -1);
389841
- const source = fs$2.readFileSync(path$3.resolve(opts.specification.path), "utf8");
389884
+ const source = fs$1.readFileSync(path$2.resolve(opts.specification.path), "utf8");
389842
389885
  switch (extName) {
389843
389886
  case ".yaml":
389844
389887
  swaggerObject = yaml.parse(source);
@@ -390105,11 +390148,11 @@ var require_should_route_hide = /* @__PURE__ */ __commonJSMin(((exports, module)
390105
390148
  //#endregion
390106
390149
  //#region ../../node_modules/.pnpm/@fastify+swagger@9.7.0/node_modules/@fastify/swagger/lib/util/read-package-json.js
390107
390150
  var require_read_package_json = /* @__PURE__ */ __commonJSMin(((exports, module) => {
390108
- const fs$1 = __require("node:fs");
390109
- const path$2 = __require("node:path");
390151
+ const fs = __require("node:fs");
390152
+ const path$1 = __require("node:path");
390110
390153
  function readPackageJson() {
390111
390154
  try {
390112
- return JSON.parse(fs$1.readFileSync(path$2.join(__dirname, "..", "..", "package.json")));
390155
+ return JSON.parse(fs.readFileSync(path$1.join(__dirname, "..", "..", "package.json")));
390113
390156
  } catch {
390114
390157
  return {};
390115
390158
  }
@@ -405057,9 +405100,9 @@ var TUI = class TUI extends Container {
405057
405100
  const debugRedraw = process.env["PI_DEBUG_REDRAW"] === "1";
405058
405101
  const logRedraw = (reason) => {
405059
405102
  if (!debugRedraw) return;
405060
- const logPath = path$17.join(nodeOs.homedir(), ".pi", "agent", "pi-debug.log");
405103
+ const logPath = path$16.join(nodeOs.homedir(), ".pi", "agent", "pi-debug.log");
405061
405104
  const msg = `[${(/* @__PURE__ */ new Date()).toISOString()}] fullRender: ${reason} (prev=${this.previousLines.length}, new=${newLines.length}, height=${height})\n`;
405062
- fs$17.appendFileSync(logPath, msg);
405105
+ fs$16.appendFileSync(logPath, msg);
405063
405106
  };
405064
405107
  if (this.previousLines.length === 0 && !widthChanged && !heightChanged) {
405065
405108
  logRedraw("first render");
@@ -405206,8 +405249,8 @@ var TUI = class TUI extends Container {
405206
405249
  buffer += "\x1B[?2026l";
405207
405250
  if (process.env["PI_TUI_DEBUG"] === "1") {
405208
405251
  const debugDir = "/tmp/tui";
405209
- fs$17.mkdirSync(debugDir, { recursive: true });
405210
- const debugPath = path$17.join(debugDir, `render-${Date.now()}-${Math.random().toString(36).slice(2)}.log`);
405252
+ fs$16.mkdirSync(debugDir, { recursive: true });
405253
+ const debugPath = path$16.join(debugDir, `render-${Date.now()}-${Math.random().toString(36).slice(2)}.log`);
405211
405254
  const debugData = [
405212
405255
  `firstChanged: ${firstChanged}`,
405213
405256
  `viewportTop: ${viewportTop}`,
@@ -405230,7 +405273,7 @@ var TUI = class TUI extends Container {
405230
405273
  "=== buffer ===",
405231
405274
  JSON.stringify(buffer)
405232
405275
  ].join("\n");
405233
- fs$17.writeFileSync(debugPath, debugData);
405276
+ fs$16.writeFileSync(debugPath, debugData);
405234
405277
  }
405235
405278
  this.terminal.write(buffer);
405236
405279
  this.cursorRow = Math.max(0, newLines.length - 1);
@@ -409811,12 +409854,12 @@ function loadNativeModifiersHelper() {
409811
409854
  if (process.platform !== "darwin") return void 0;
409812
409855
  const arch = process.arch;
409813
409856
  if (arch !== "x64" && arch !== "arm64") return void 0;
409814
- const moduleDir = path$17.dirname(fileURLToPath(import.meta.url));
409815
- const nativePath = path$17.join("native", "darwin", "prebuilds", `darwin-${arch}`, "darwin-modifiers.node");
409857
+ const moduleDir = path$16.dirname(fileURLToPath(import.meta.url));
409858
+ const nativePath = path$16.join("native", "darwin", "prebuilds", `darwin-${arch}`, "darwin-modifiers.node");
409816
409859
  const candidates = [
409817
- path$17.join(moduleDir, "..", nativePath),
409818
- path$17.join(moduleDir, nativePath),
409819
- path$17.join(path$17.dirname(process.execPath), nativePath)
409860
+ path$16.join(moduleDir, "..", nativePath),
409861
+ path$16.join(moduleDir, nativePath),
409862
+ path$16.join(path$16.dirname(process.execPath), nativePath)
409820
409863
  ];
409821
409864
  for (const modulePath of candidates) try {
409822
409865
  const helper = cjsRequire$1(modulePath);
@@ -409889,10 +409932,10 @@ var ProcessTerminal = class {
409889
409932
  const env = process.env["PI_TUI_WRITE_LOG"] || "";
409890
409933
  if (!env) return "";
409891
409934
  try {
409892
- if (fs$17.statSync(env).isDirectory()) {
409935
+ if (fs$16.statSync(env).isDirectory()) {
409893
409936
  const now = /* @__PURE__ */ new Date();
409894
409937
  const ts = `${now.getFullYear()}-${String(now.getMonth() + 1).padStart(2, "0")}-${String(now.getDate()).padStart(2, "0")}_${String(now.getHours()).padStart(2, "0")}-${String(now.getMinutes()).padStart(2, "0")}-${String(now.getSeconds()).padStart(2, "0")}`;
409895
- return path$17.join(env, `tui-${ts}-${process.pid}.log`);
409938
+ return path$16.join(env, `tui-${ts}-${process.pid}.log`);
409896
409939
  }
409897
409940
  } catch {}
409898
409941
  return env;
@@ -410095,12 +410138,12 @@ var ProcessTerminal = class {
410095
410138
  try {
410096
410139
  const arch = process.arch;
410097
410140
  if (arch !== "x64" && arch !== "arm64") return;
410098
- const moduleDir = path$17.dirname(fileURLToPath(import.meta.url));
410099
- const nativePath = path$17.join("native", "win32", "prebuilds", `win32-${arch}`, "win32-console-mode.node");
410141
+ const moduleDir = path$16.dirname(fileURLToPath(import.meta.url));
410142
+ const nativePath = path$16.join("native", "win32", "prebuilds", `win32-${arch}`, "win32-console-mode.node");
410100
410143
  const candidates = [
410101
- path$17.join(moduleDir, "..", nativePath),
410102
- path$17.join(moduleDir, nativePath),
410103
- path$17.join(path$17.dirname(process.execPath), nativePath)
410144
+ path$16.join(moduleDir, "..", nativePath),
410145
+ path$16.join(moduleDir, nativePath),
410146
+ path$16.join(path$16.dirname(process.execPath), nativePath)
410104
410147
  ];
410105
410148
  for (const modulePath of candidates) try {
410106
410149
  cjsRequire(modulePath).enableVirtualTerminalInput?.();
@@ -410172,7 +410215,7 @@ var ProcessTerminal = class {
410172
410215
  write(data) {
410173
410216
  process.stdout.write(data);
410174
410217
  if (this.writeLogPath) try {
410175
- fs$17.appendFileSync(this.writeLogPath, data, { encoding: "utf8" });
410218
+ fs$16.appendFileSync(this.writeLogPath, data, { encoding: "utf8" });
410176
410219
  } catch {}
410177
410220
  }
410178
410221
  get columns() {
@@ -412310,6 +412353,56 @@ var EditorSelectorComponent = class extends ChoicePickerComponent {
412310
412353
  };
412311
412354
  //#endregion
412312
412355
  //#region src/tui/components/dialogs/appearance-selector.ts
412356
+ var AppearancePresetSelectorComponent = class extends ChoicePickerComponent {
412357
+ constructor(options) {
412358
+ const labels = {
412359
+ dark: options.copy.darkLabel,
412360
+ black: options.copy.blackLabel,
412361
+ light: options.copy.lightLabel,
412362
+ blue: options.copy.blueLabel,
412363
+ green: options.copy.greenLabel
412364
+ };
412365
+ const choices = [
412366
+ {
412367
+ value: "default",
412368
+ label: options.copy.defaultLabel
412369
+ },
412370
+ ...APPEARANCE_PRESETS.map((preset) => ({
412371
+ value: preset.id,
412372
+ label: `${chalk.bgHex(preset.appearance.surface).hex(preset.appearance.foreground)(" Aa ")} ${labels[preset.id]}`,
412373
+ description: `${options.copy.foreground} ${preset.appearance.foreground} · ${options.copy.surface} ${preset.appearance.surface}`
412374
+ })),
412375
+ {
412376
+ value: "custom",
412377
+ label: options.copy.customLabel
412378
+ }
412379
+ ];
412380
+ super({
412381
+ title: options.copy.title,
412382
+ options: choices,
412383
+ currentValue: appearancePresetId(options.initialValue),
412384
+ onSelect: (value) => {
412385
+ if (value === "custom") {
412386
+ options.onSelect({ kind: "custom" });
412387
+ return;
412388
+ }
412389
+ if (value === "default") {
412390
+ options.onSelect({
412391
+ kind: "preset",
412392
+ value: void 0
412393
+ });
412394
+ return;
412395
+ }
412396
+ const preset = APPEARANCE_PRESETS.find((candidate) => candidate.id === value);
412397
+ if (preset !== void 0) options.onSelect({
412398
+ kind: "preset",
412399
+ value: { ...preset.appearance }
412400
+ });
412401
+ },
412402
+ onCancel: options.onCancel
412403
+ });
412404
+ }
412405
+ };
412313
412406
  var AppearanceSelectorComponent = class extends Container {
412314
412407
  options;
412315
412408
  focused = false;
@@ -417164,6 +417257,22 @@ function showThemePicker(host) {
417164
417257
  }
417165
417258
  function showAppearancePicker(host) {
417166
417259
  const original = host.state.appState.appearance;
417260
+ host.mountEditorReplacement(new AppearancePresetSelectorComponent({
417261
+ copy: appearancePresetSelectorCopy(),
417262
+ initialValue: original,
417263
+ onSelect: (result) => {
417264
+ if (result.kind === "custom") {
417265
+ showCustomAppearancePicker(host, original);
417266
+ return;
417267
+ }
417268
+ host.restoreEditorAfter(() => saveAppearanceChoice(host, result.value));
417269
+ },
417270
+ onCancel: () => {
417271
+ host.restoreEditor();
417272
+ }
417273
+ }));
417274
+ }
417275
+ function showCustomAppearancePicker(host, original) {
417167
417276
  host.mountEditorReplacement(new AppearanceSelectorComponent({
417168
417277
  getBasePalette: () => host.getAppearanceBasePalette(),
417169
417278
  copy: appearanceSelectorCopy(),
@@ -417180,6 +417289,20 @@ function showAppearancePicker(host) {
417180
417289
  }
417181
417290
  }));
417182
417291
  }
417292
+ function appearancePresetSelectorCopy() {
417293
+ return {
417294
+ title: uiText("appearance.title"),
417295
+ defaultLabel: uiText("actionStyle.default.label"),
417296
+ darkLabel: `BLUN ${uiText("theme.dark")}`,
417297
+ blackLabel: "BLUN Black",
417298
+ lightLabel: `BLUN ${uiText("theme.light")}`,
417299
+ blueLabel: "BLUN Blue",
417300
+ greenLabel: "BLUN Green",
417301
+ customLabel: uiText("appearance.title"),
417302
+ foreground: uiText("appearance.foreground"),
417303
+ surface: uiText("appearance.surface")
417304
+ };
417305
+ }
417183
417306
  function appearanceSelectorCopy() {
417184
417307
  return {
417185
417308
  title: uiText("appearance.title"),
@@ -500188,7 +500311,7 @@ function promptStartupPersonalMemoryConsent(host, copy) {
500188
500311
  const finish = (choice) => {
500189
500312
  if (done) return;
500190
500313
  done = true;
500191
- host.dismissEditorReplacement();
500314
+ host.restoreEditor();
500192
500315
  resolve(choice);
500193
500316
  };
500194
500317
  host.mountEditorReplacement(new ChoicePickerComponent({
@@ -507582,7 +507705,7 @@ function promptStartupCustomerMistakeConsent(host, copy) {
507582
507705
  const finish = (choice) => {
507583
507706
  if (settled) return;
507584
507707
  settled = true;
507585
- host.dismissEditorReplacement();
507708
+ host.restoreEditor();
507586
507709
  resolve(choice);
507587
507710
  };
507588
507711
  host.mountEditorReplacement(new ChoicePickerComponent({
@@ -511879,8 +512002,8 @@ var BlunTUI = class {
511879
512002
  mountEditorReplacement: (panel) => {
511880
512003
  this.mountEditorReplacement(panel);
511881
512004
  },
511882
- dismissEditorReplacement: () => {
511883
- this.dismissEditorReplacement();
512005
+ restoreEditor: () => {
512006
+ this.restoreEditor();
511884
512007
  },
511885
512008
  showWarning: (message) => {
511886
512009
  this.showStatus(message, "warning");