@grepai/cli 0.4.12 → 0.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -4794,8 +4794,8 @@ var require_Collection = __commonJS((exports) => {
4794
4794
  return this.items.every((node) => {
4795
4795
  if (!identity3.isPair(node))
4796
4796
  return false;
4797
- const n = node.value;
4798
- return n == null || allowScalar && identity3.isScalar(n) && n.value == null && !n.commentBefore && !n.comment && !n.tag;
4797
+ const n2 = node.value;
4798
+ return n2 == null || allowScalar && identity3.isScalar(n2) && n2.value == null && !n2.commentBefore && !n2.comment && !n2.tag;
4799
4799
  });
4800
4800
  }
4801
4801
  hasIn(path) {
@@ -6168,18 +6168,18 @@ var require_stringifyNumber = __commonJS((exports) => {
6168
6168
  const num = typeof value3 === "number" ? value3 : Number(value3);
6169
6169
  if (!isFinite(num))
6170
6170
  return isNaN(num) ? ".nan" : num < 0 ? "-.inf" : ".inf";
6171
- let n = Object.is(value3, -0) ? "-0" : JSON.stringify(value3);
6172
- if (!format5 && minFractionDigits && (!tag2 || tag2 === "tag:yaml.org,2002:float") && /^\d/.test(n)) {
6173
- let i = n.indexOf(".");
6171
+ let n2 = Object.is(value3, -0) ? "-0" : JSON.stringify(value3);
6172
+ if (!format5 && minFractionDigits && (!tag2 || tag2 === "tag:yaml.org,2002:float") && /^\d/.test(n2)) {
6173
+ let i = n2.indexOf(".");
6174
6174
  if (i < 0) {
6175
- i = n.length;
6176
- n += ".";
6175
+ i = n2.length;
6176
+ n2 += ".";
6177
6177
  }
6178
- let d = minFractionDigits - (n.length - i - 1);
6178
+ let d = minFractionDigits - (n2.length - i - 1);
6179
6179
  while (d-- > 0)
6180
- n += "0";
6180
+ n2 += "0";
6181
6181
  }
6182
- return n;
6182
+ return n2;
6183
6183
  }
6184
6184
  exports.stringifyNumber = stringifyNumber;
6185
6185
  });
@@ -6399,9 +6399,9 @@ var require_binary = __commonJS((exports) => {
6399
6399
  type ?? (type = Scalar.Scalar.BLOCK_LITERAL);
6400
6400
  if (type !== Scalar.Scalar.QUOTE_DOUBLE) {
6401
6401
  const lineWidth = Math.max(ctx.options.lineWidth - ctx.indent.length, ctx.options.minContentWidth);
6402
- const n = Math.ceil(str.length / lineWidth);
6403
- const lines = new Array(n);
6404
- for (let i = 0, o = 0;i < n; ++i, o += lineWidth) {
6402
+ const n2 = Math.ceil(str.length / lineWidth);
6403
+ const lines = new Array(n2);
6404
+ for (let i = 0, o = 0;i < n2; ++i, o += lineWidth) {
6405
6405
  lines[i] = str.substr(o, lineWidth);
6406
6406
  }
6407
6407
  str = lines.join(type === Scalar.Scalar.BLOCK_LITERAL ? `
@@ -6656,11 +6656,11 @@ var require_int2 = __commonJS((exports) => {
6656
6656
  str = `0x${str}`;
6657
6657
  break;
6658
6658
  }
6659
- const n2 = BigInt(str);
6660
- return sign === "-" ? BigInt(-1) * n2 : n2;
6659
+ const n3 = BigInt(str);
6660
+ return sign === "-" ? BigInt(-1) * n3 : n3;
6661
6661
  }
6662
- const n = parseInt(str, radix);
6663
- return sign === "-" ? -1 * n : n;
6662
+ const n2 = parseInt(str, radix);
6663
+ return sign === "-" ? -1 * n2 : n2;
6664
6664
  }
6665
6665
  function intStringify(node, radix, prefix) {
6666
6666
  const { value: value3 } = node;
@@ -6800,15 +6800,15 @@ var require_timestamp = __commonJS((exports) => {
6800
6800
  function parseSexagesimal(str, asBigInt) {
6801
6801
  const sign = str[0];
6802
6802
  const parts2 = sign === "-" || sign === "+" ? str.substring(1) : str;
6803
- const num = (n) => asBigInt ? BigInt(n) : Number(n);
6803
+ const num = (n2) => asBigInt ? BigInt(n2) : Number(n2);
6804
6804
  const res = parts2.replace(/_/g, "").split(":").reduce((res2, p) => res2 * num(60) + num(p), num(0));
6805
6805
  return sign === "-" ? num(-1) * res : res;
6806
6806
  }
6807
6807
  function stringifySexagesimal(node) {
6808
6808
  let { value: value3 } = node;
6809
- let num = (n) => n;
6809
+ let num = (n2) => n2;
6810
6810
  if (typeof value3 === "bigint")
6811
- num = (n) => BigInt(n);
6811
+ num = (n2) => BigInt(n2);
6812
6812
  else if (isNaN(value3) || !isFinite(value3))
6813
6813
  return stringifyNumber.stringifyNumber(node);
6814
6814
  let sign = "";
@@ -6828,7 +6828,7 @@ var require_timestamp = __commonJS((exports) => {
6828
6828
  parts2.unshift(value3);
6829
6829
  }
6830
6830
  }
6831
- return sign + parts2.map((n) => String(n).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
6831
+ return sign + parts2.map((n2) => String(n2).padStart(2, "0")).join(":").replace(/000000\d*$/, "");
6832
6832
  }
6833
6833
  var intTime = {
6834
6834
  identify: (value3) => typeof value3 === "bigint" || Number.isInteger(value3),
@@ -8201,9 +8201,9 @@ var require_resolve_block_scalar = __commonJS((exports) => {
8201
8201
  if (!chomp && (ch === "-" || ch === "+"))
8202
8202
  chomp = ch;
8203
8203
  else {
8204
- const n = Number(ch);
8205
- if (!indent && n)
8206
- indent = n;
8204
+ const n2 = Number(ch);
8205
+ if (!indent && n2)
8206
+ indent = n2;
8207
8207
  else if (error3 === -1)
8208
8208
  error3 = offset + i;
8209
8209
  }
@@ -9375,8 +9375,8 @@ var require_lexer = __commonJS((exports) => {
9375
9375
  `;
9376
9376
  return false;
9377
9377
  }
9378
- charAt(n) {
9379
- return this.buffer[this.pos + n];
9378
+ charAt(n2) {
9379
+ return this.buffer[this.pos + n2];
9380
9380
  }
9381
9381
  continueScalar(offset) {
9382
9382
  let ch = this.buffer[offset];
@@ -9413,8 +9413,8 @@ var require_lexer = __commonJS((exports) => {
9413
9413
  end5 -= 1;
9414
9414
  return this.buffer.substring(this.pos, end5);
9415
9415
  }
9416
- hasChars(n) {
9417
- return this.pos + n <= this.buffer.length;
9416
+ hasChars(n2) {
9417
+ return this.pos + n2 <= this.buffer.length;
9418
9418
  }
9419
9419
  setNext(state) {
9420
9420
  this.buffer = this.buffer.substring(this.pos);
@@ -9423,8 +9423,8 @@ var require_lexer = __commonJS((exports) => {
9423
9423
  this.next = state;
9424
9424
  return null;
9425
9425
  }
9426
- peek(n) {
9427
- return this.buffer.substr(this.pos, n);
9426
+ peek(n2) {
9427
+ return this.buffer.substr(this.pos, n2);
9428
9428
  }
9429
9429
  *parseNext(next) {
9430
9430
  switch (next) {
@@ -9473,8 +9473,8 @@ var require_lexer = __commonJS((exports) => {
9473
9473
  else
9474
9474
  break;
9475
9475
  }
9476
- const n = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));
9477
- yield* this.pushCount(line.length - n);
9476
+ const n2 = (yield* this.pushCount(dirEnd)) + (yield* this.pushSpaces(true));
9477
+ yield* this.pushCount(line.length - n2);
9478
9478
  this.pushNewline();
9479
9479
  return "stream";
9480
9480
  }
@@ -9512,9 +9512,9 @@ var require_lexer = __commonJS((exports) => {
9512
9512
  if (!ch1 && !this.atEnd)
9513
9513
  return this.setNext("block-start");
9514
9514
  if ((ch0 === "-" || ch0 === "?" || ch0 === ":") && isEmpty11(ch1)) {
9515
- const n = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
9515
+ const n2 = (yield* this.pushCount(1)) + (yield* this.pushSpaces(true));
9516
9516
  this.indentNext = this.indentValue + 1;
9517
- this.indentValue += n;
9517
+ this.indentValue += n2;
9518
9518
  return yield* this.parseBlockStart();
9519
9519
  }
9520
9520
  return "doc";
@@ -9524,10 +9524,10 @@ var require_lexer = __commonJS((exports) => {
9524
9524
  const line = this.getLine();
9525
9525
  if (line === null)
9526
9526
  return this.setNext("doc");
9527
- let n = yield* this.pushIndicators();
9528
- switch (line[n]) {
9527
+ let n2 = yield* this.pushIndicators();
9528
+ switch (line[n2]) {
9529
9529
  case "#":
9530
- yield* this.pushCount(line.length - n);
9530
+ yield* this.pushCount(line.length - n2);
9531
9531
  case undefined:
9532
9532
  yield* this.pushNewline();
9533
9533
  return yield* this.parseLineStart();
@@ -9549,9 +9549,9 @@ var require_lexer = __commonJS((exports) => {
9549
9549
  return yield* this.parseQuotedScalar();
9550
9550
  case "|":
9551
9551
  case ">":
9552
- n += yield* this.parseBlockScalarHeader();
9553
- n += yield* this.pushSpaces(true);
9554
- yield* this.pushCount(line.length - n);
9552
+ n2 += yield* this.parseBlockScalarHeader();
9553
+ n2 += yield* this.pushSpaces(true);
9554
+ yield* this.pushCount(line.length - n2);
9555
9555
  yield* this.pushNewline();
9556
9556
  return yield* this.parseBlockScalar();
9557
9557
  default:
@@ -9582,18 +9582,18 @@ var require_lexer = __commonJS((exports) => {
9582
9582
  return yield* this.parseLineStart();
9583
9583
  }
9584
9584
  }
9585
- let n = 0;
9586
- while (line[n] === ",") {
9587
- n += yield* this.pushCount(1);
9588
- n += yield* this.pushSpaces(true);
9585
+ let n2 = 0;
9586
+ while (line[n2] === ",") {
9587
+ n2 += yield* this.pushCount(1);
9588
+ n2 += yield* this.pushSpaces(true);
9589
9589
  this.flowKey = false;
9590
9590
  }
9591
- n += yield* this.pushIndicators();
9592
- switch (line[n]) {
9591
+ n2 += yield* this.pushIndicators();
9592
+ switch (line[n2]) {
9593
9593
  case undefined:
9594
9594
  return "flow";
9595
9595
  case "#":
9596
- yield* this.pushCount(line.length - n);
9596
+ yield* this.pushCount(line.length - n2);
9597
9597
  return "flow";
9598
9598
  case "{":
9599
9599
  case "[":
@@ -9636,10 +9636,10 @@ var require_lexer = __commonJS((exports) => {
9636
9636
  end5 = this.buffer.indexOf("'", end5 + 2);
9637
9637
  } else {
9638
9638
  while (end5 !== -1) {
9639
- let n = 0;
9640
- while (this.buffer[end5 - 1 - n] === "\\")
9641
- n += 1;
9642
- if (n % 2 === 0)
9639
+ let n2 = 0;
9640
+ while (this.buffer[end5 - 1 - n2] === "\\")
9641
+ n2 += 1;
9642
+ if (n2 % 2 === 0)
9643
9643
  break;
9644
9644
  end5 = this.buffer.indexOf('"', end5 + 1);
9645
9645
  }
@@ -9803,11 +9803,11 @@ var require_lexer = __commonJS((exports) => {
9803
9803
  yield* this.pushToIndex(end5 + 1, true);
9804
9804
  return inFlow ? "flow" : "doc";
9805
9805
  }
9806
- *pushCount(n) {
9807
- if (n > 0) {
9808
- yield this.buffer.substr(this.pos, n);
9809
- this.pos += n;
9810
- return n;
9806
+ *pushCount(n2) {
9807
+ if (n2 > 0) {
9808
+ yield this.buffer.substr(this.pos, n2);
9809
+ this.pos += n2;
9810
+ return n2;
9811
9811
  }
9812
9812
  return 0;
9813
9813
  }
@@ -9881,12 +9881,12 @@ var require_lexer = __commonJS((exports) => {
9881
9881
  do {
9882
9882
  ch = this.buffer[++i];
9883
9883
  } while (ch === " " || allowTabs && ch === "\t");
9884
- const n = i - this.pos;
9885
- if (n > 0) {
9886
- yield this.buffer.substr(this.pos, n);
9884
+ const n2 = i - this.pos;
9885
+ if (n2 > 0) {
9886
+ yield this.buffer.substr(this.pos, n2);
9887
9887
  this.pos = i;
9888
9888
  }
9889
- return n;
9889
+ return n2;
9890
9890
  }
9891
9891
  *pushUntil(test) {
9892
9892
  let i = this.pos;
@@ -10132,8 +10132,8 @@ var require_parser2 = __commonJS((exports) => {
10132
10132
  }
10133
10133
  yield* this.pop();
10134
10134
  }
10135
- peek(n) {
10136
- return this.stack[this.stack.length - n];
10135
+ peek(n2) {
10136
+ return this.stack[this.stack.length - n2];
10137
10137
  }
10138
10138
  *pop(error3) {
10139
10139
  const token = error3 ?? this.stack.pop();
@@ -12873,6 +12873,928 @@ var require_src = __commonJS((exports) => {
12873
12873
  };
12874
12874
  });
12875
12875
 
12876
+ // ../../node_modules/.bun/node-gyp-build@4.8.4/node_modules/node-gyp-build/node-gyp-build.js
12877
+ var require_node_gyp_build = __commonJS((exports, module) => {
12878
+ var fs = __require("fs");
12879
+ var path4 = __require("path");
12880
+ var os = __require("os");
12881
+ var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
12882
+ var vars = process.config && process.config.variables || {};
12883
+ var prebuildsOnly = !!process.env.PREBUILDS_ONLY;
12884
+ var abi = process.versions.modules;
12885
+ var runtime6 = isElectron() ? "electron" : isNwjs() ? "node-webkit" : "node";
12886
+ var arch = process.env.npm_config_arch || os.arch();
12887
+ var platform = process.env.npm_config_platform || os.platform();
12888
+ var libc = process.env.LIBC || (isAlpine(platform) ? "musl" : "glibc");
12889
+ var armv = process.env.ARM_VERSION || (arch === "arm64" ? "8" : vars.arm_version) || "";
12890
+ var uv = (process.versions.uv || "").split(".")[0];
12891
+ module.exports = load;
12892
+ function load(dir2) {
12893
+ return runtimeRequire(load.resolve(dir2));
12894
+ }
12895
+ load.resolve = load.path = function(dir2) {
12896
+ dir2 = path4.resolve(dir2 || ".");
12897
+ try {
12898
+ var name21 = runtimeRequire(path4.join(dir2, "package.json")).name.toUpperCase().replace(/-/g, "_");
12899
+ if (process.env[name21 + "_PREBUILD"])
12900
+ dir2 = process.env[name21 + "_PREBUILD"];
12901
+ } catch (err) {}
12902
+ if (!prebuildsOnly) {
12903
+ var release = getFirst(path4.join(dir2, "build/Release"), matchBuild);
12904
+ if (release)
12905
+ return release;
12906
+ var debug2 = getFirst(path4.join(dir2, "build/Debug"), matchBuild);
12907
+ if (debug2)
12908
+ return debug2;
12909
+ }
12910
+ var prebuild = resolve4(dir2);
12911
+ if (prebuild)
12912
+ return prebuild;
12913
+ var nearby = resolve4(path4.dirname(process.execPath));
12914
+ if (nearby)
12915
+ return nearby;
12916
+ var target = [
12917
+ "platform=" + platform,
12918
+ "arch=" + arch,
12919
+ "runtime=" + runtime6,
12920
+ "abi=" + abi,
12921
+ "uv=" + uv,
12922
+ armv ? "armv=" + armv : "",
12923
+ "libc=" + libc,
12924
+ "node=" + process.versions.node,
12925
+ process.versions.electron ? "electron=" + process.versions.electron : "",
12926
+ typeof __webpack_require__ === "function" ? "webpack=true" : ""
12927
+ ].filter(Boolean).join(" ");
12928
+ throw new Error("No native build was found for " + target + `
12929
+ loaded from: ` + dir2 + `
12930
+ `);
12931
+ function resolve4(dir3) {
12932
+ var tuples = readdirSync(path4.join(dir3, "prebuilds")).map(parseTuple);
12933
+ var tuple4 = tuples.filter(matchTuple(platform, arch)).sort(compareTuples)[0];
12934
+ if (!tuple4)
12935
+ return;
12936
+ var prebuilds = path4.join(dir3, "prebuilds", tuple4.name);
12937
+ var parsed = readdirSync(prebuilds).map(parseTags);
12938
+ var candidates = parsed.filter(matchTags(runtime6, abi));
12939
+ var winner = candidates.sort(compareTags(runtime6))[0];
12940
+ if (winner)
12941
+ return path4.join(prebuilds, winner.file);
12942
+ }
12943
+ };
12944
+ function readdirSync(dir2) {
12945
+ try {
12946
+ return fs.readdirSync(dir2);
12947
+ } catch (err) {
12948
+ return [];
12949
+ }
12950
+ }
12951
+ function getFirst(dir2, filter13) {
12952
+ var files = readdirSync(dir2).filter(filter13);
12953
+ return files[0] && path4.join(dir2, files[0]);
12954
+ }
12955
+ function matchBuild(name21) {
12956
+ return /\.node$/.test(name21);
12957
+ }
12958
+ function parseTuple(name21) {
12959
+ var arr = name21.split("-");
12960
+ if (arr.length !== 2)
12961
+ return;
12962
+ var platform2 = arr[0];
12963
+ var architectures = arr[1].split("+");
12964
+ if (!platform2)
12965
+ return;
12966
+ if (!architectures.length)
12967
+ return;
12968
+ if (!architectures.every(Boolean))
12969
+ return;
12970
+ return { name: name21, platform: platform2, architectures };
12971
+ }
12972
+ function matchTuple(platform2, arch2) {
12973
+ return function(tuple4) {
12974
+ if (tuple4 == null)
12975
+ return false;
12976
+ if (tuple4.platform !== platform2)
12977
+ return false;
12978
+ return tuple4.architectures.includes(arch2);
12979
+ };
12980
+ }
12981
+ function compareTuples(a, b) {
12982
+ return a.architectures.length - b.architectures.length;
12983
+ }
12984
+ function parseTags(file8) {
12985
+ var arr = file8.split(".");
12986
+ var extension = arr.pop();
12987
+ var tags2 = { file: file8, specificity: 0 };
12988
+ if (extension !== "node")
12989
+ return;
12990
+ for (var i = 0;i < arr.length; i++) {
12991
+ var tag5 = arr[i];
12992
+ if (tag5 === "node" || tag5 === "electron" || tag5 === "node-webkit") {
12993
+ tags2.runtime = tag5;
12994
+ } else if (tag5 === "napi") {
12995
+ tags2.napi = true;
12996
+ } else if (tag5.slice(0, 3) === "abi") {
12997
+ tags2.abi = tag5.slice(3);
12998
+ } else if (tag5.slice(0, 2) === "uv") {
12999
+ tags2.uv = tag5.slice(2);
13000
+ } else if (tag5.slice(0, 4) === "armv") {
13001
+ tags2.armv = tag5.slice(4);
13002
+ } else if (tag5 === "glibc" || tag5 === "musl") {
13003
+ tags2.libc = tag5;
13004
+ } else {
13005
+ continue;
13006
+ }
13007
+ tags2.specificity++;
13008
+ }
13009
+ return tags2;
13010
+ }
13011
+ function matchTags(runtime7, abi2) {
13012
+ return function(tags2) {
13013
+ if (tags2 == null)
13014
+ return false;
13015
+ if (tags2.runtime && tags2.runtime !== runtime7 && !runtimeAgnostic(tags2))
13016
+ return false;
13017
+ if (tags2.abi && tags2.abi !== abi2 && !tags2.napi)
13018
+ return false;
13019
+ if (tags2.uv && tags2.uv !== uv)
13020
+ return false;
13021
+ if (tags2.armv && tags2.armv !== armv)
13022
+ return false;
13023
+ if (tags2.libc && tags2.libc !== libc)
13024
+ return false;
13025
+ return true;
13026
+ };
13027
+ }
13028
+ function runtimeAgnostic(tags2) {
13029
+ return tags2.runtime === "node" && tags2.napi;
13030
+ }
13031
+ function compareTags(runtime7) {
13032
+ return function(a, b) {
13033
+ if (a.runtime !== b.runtime) {
13034
+ return a.runtime === runtime7 ? -1 : 1;
13035
+ } else if (a.abi !== b.abi) {
13036
+ return a.abi ? -1 : 1;
13037
+ } else if (a.specificity !== b.specificity) {
13038
+ return a.specificity > b.specificity ? -1 : 1;
13039
+ } else {
13040
+ return 0;
13041
+ }
13042
+ };
13043
+ }
13044
+ function isNwjs() {
13045
+ return !!(process.versions && process.versions.nw);
13046
+ }
13047
+ function isElectron() {
13048
+ if (process.versions && process.versions.electron)
13049
+ return true;
13050
+ if (process.env.ELECTRON_RUN_AS_NODE)
13051
+ return true;
13052
+ return typeof window !== "undefined" && window.process && window.process.type === "renderer";
13053
+ }
13054
+ function isAlpine(platform2) {
13055
+ return platform2 === "linux" && fs.existsSync("/etc/alpine-release");
13056
+ }
13057
+ load.parseTags = parseTags;
13058
+ load.matchTags = matchTags;
13059
+ load.compareTags = compareTags;
13060
+ load.parseTuple = parseTuple;
13061
+ load.matchTuple = matchTuple;
13062
+ load.compareTuples = compareTuples;
13063
+ });
13064
+
13065
+ // ../../node_modules/.bun/node-gyp-build@4.8.4/node_modules/node-gyp-build/index.js
13066
+ var require_node_gyp_build2 = __commonJS((exports, module) => {
13067
+ var runtimeRequire = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
13068
+ if (typeof runtimeRequire.addon === "function") {
13069
+ module.exports = runtimeRequire.addon.bind(runtimeRequire);
13070
+ } else {
13071
+ module.exports = require_node_gyp_build();
13072
+ }
13073
+ });
13074
+
13075
+ // ../../node_modules/.bun/tree-sitter@0.25.0/node_modules/tree-sitter/index.js
13076
+ var require_tree_sitter = __commonJS((exports, module) => {
13077
+ var __dirname = "/Users/bismuth/projects/grepai/node_modules/.bun/tree-sitter@0.25.0/node_modules/tree-sitter";
13078
+ var path4 = __require("path");
13079
+ var binding = typeof process.versions.bun === "string" ? __require(path4.join(path4.dirname(Bun.main), "tree-sitter.node")) : require_node_gyp_build2()(__dirname);
13080
+ var { Query, Parser, NodeMethods, Tree, TreeCursor, LookaheadIterator } = binding;
13081
+ var util2 = __require("util");
13082
+ var { rootNode, rootNodeWithOffset, edit } = Tree.prototype;
13083
+ Object.defineProperty(Tree.prototype, "rootNode", {
13084
+ get() {
13085
+ if (this instanceof Tree && rootNode) {
13086
+ return unmarshalNode(rootNode.call(this), this);
13087
+ }
13088
+ },
13089
+ configurable: true
13090
+ });
13091
+ Tree.prototype.rootNodeWithOffset = function(offset_bytes, offset_extent) {
13092
+ return unmarshalNode(rootNodeWithOffset.call(this, offset_bytes, offset_extent.row, offset_extent.column), this);
13093
+ };
13094
+ Tree.prototype.edit = function(arg) {
13095
+ if (this instanceof Tree && edit) {
13096
+ edit.call(this, arg.startPosition.row, arg.startPosition.column, arg.oldEndPosition.row, arg.oldEndPosition.column, arg.newEndPosition.row, arg.newEndPosition.column, arg.startIndex, arg.oldEndIndex, arg.newEndIndex);
13097
+ }
13098
+ };
13099
+ Tree.prototype.walk = function() {
13100
+ return this.rootNode.walk();
13101
+ };
13102
+
13103
+ class SyntaxNode {
13104
+ constructor(tree) {
13105
+ this.tree = tree;
13106
+ }
13107
+ [util2.inspect.custom]() {
13108
+ return this.constructor.name + ` {
13109
+ ` + " type: " + this.type + `,
13110
+ ` + " startPosition: " + pointToString(this.startPosition) + `,
13111
+ ` + " endPosition: " + pointToString(this.endPosition) + `,
13112
+ ` + " childCount: " + this.childCount + `,
13113
+ ` + "}";
13114
+ }
13115
+ get id() {
13116
+ marshalNode(this);
13117
+ return NodeMethods.id(this.tree);
13118
+ }
13119
+ get typeId() {
13120
+ marshalNode(this);
13121
+ return NodeMethods.typeId(this.tree);
13122
+ }
13123
+ get grammarId() {
13124
+ marshalNode(this);
13125
+ return NodeMethods.grammarId(this.tree);
13126
+ }
13127
+ get type() {
13128
+ marshalNode(this);
13129
+ return NodeMethods.type(this.tree);
13130
+ }
13131
+ get grammarType() {
13132
+ marshalNode(this);
13133
+ return NodeMethods.grammarType(this.tree);
13134
+ }
13135
+ get isExtra() {
13136
+ marshalNode(this);
13137
+ return NodeMethods.isExtra(this.tree);
13138
+ }
13139
+ get isNamed() {
13140
+ marshalNode(this);
13141
+ return NodeMethods.isNamed(this.tree);
13142
+ }
13143
+ get isMissing() {
13144
+ marshalNode(this);
13145
+ return NodeMethods.isMissing(this.tree);
13146
+ }
13147
+ get hasChanges() {
13148
+ marshalNode(this);
13149
+ return NodeMethods.hasChanges(this.tree);
13150
+ }
13151
+ get hasError() {
13152
+ marshalNode(this);
13153
+ return NodeMethods.hasError(this.tree);
13154
+ }
13155
+ get isError() {
13156
+ marshalNode(this);
13157
+ return NodeMethods.isError(this.tree);
13158
+ }
13159
+ get text() {
13160
+ return this.tree.getText(this);
13161
+ }
13162
+ get startPosition() {
13163
+ marshalNode(this);
13164
+ NodeMethods.startPosition(this.tree);
13165
+ return unmarshalPoint();
13166
+ }
13167
+ get endPosition() {
13168
+ marshalNode(this);
13169
+ NodeMethods.endPosition(this.tree);
13170
+ return unmarshalPoint();
13171
+ }
13172
+ get startIndex() {
13173
+ marshalNode(this);
13174
+ return NodeMethods.startIndex(this.tree);
13175
+ }
13176
+ get endIndex() {
13177
+ marshalNode(this);
13178
+ return NodeMethods.endIndex(this.tree);
13179
+ }
13180
+ get parent() {
13181
+ marshalNode(this);
13182
+ return unmarshalNode(NodeMethods.parent(this.tree), this.tree);
13183
+ }
13184
+ get children() {
13185
+ marshalNode(this);
13186
+ return unmarshalNodes(NodeMethods.children(this.tree), this.tree);
13187
+ }
13188
+ get namedChildren() {
13189
+ marshalNode(this);
13190
+ return unmarshalNodes(NodeMethods.namedChildren(this.tree), this.tree);
13191
+ }
13192
+ get childCount() {
13193
+ marshalNode(this);
13194
+ return NodeMethods.childCount(this.tree);
13195
+ }
13196
+ get namedChildCount() {
13197
+ marshalNode(this);
13198
+ return NodeMethods.namedChildCount(this.tree);
13199
+ }
13200
+ get firstChild() {
13201
+ marshalNode(this);
13202
+ return unmarshalNode(NodeMethods.firstChild(this.tree), this.tree);
13203
+ }
13204
+ get firstNamedChild() {
13205
+ marshalNode(this);
13206
+ return unmarshalNode(NodeMethods.firstNamedChild(this.tree), this.tree);
13207
+ }
13208
+ get lastChild() {
13209
+ marshalNode(this);
13210
+ return unmarshalNode(NodeMethods.lastChild(this.tree), this.tree);
13211
+ }
13212
+ get lastNamedChild() {
13213
+ marshalNode(this);
13214
+ return unmarshalNode(NodeMethods.lastNamedChild(this.tree), this.tree);
13215
+ }
13216
+ get nextSibling() {
13217
+ marshalNode(this);
13218
+ return unmarshalNode(NodeMethods.nextSibling(this.tree), this.tree);
13219
+ }
13220
+ get nextNamedSibling() {
13221
+ marshalNode(this);
13222
+ return unmarshalNode(NodeMethods.nextNamedSibling(this.tree), this.tree);
13223
+ }
13224
+ get previousSibling() {
13225
+ marshalNode(this);
13226
+ return unmarshalNode(NodeMethods.previousSibling(this.tree), this.tree);
13227
+ }
13228
+ get previousNamedSibling() {
13229
+ marshalNode(this);
13230
+ return unmarshalNode(NodeMethods.previousNamedSibling(this.tree), this.tree);
13231
+ }
13232
+ get parseState() {
13233
+ marshalNode(this);
13234
+ return NodeMethods.parseState(this.tree);
13235
+ }
13236
+ get nextParseState() {
13237
+ marshalNode(this);
13238
+ return NodeMethods.nextParseState(this.tree);
13239
+ }
13240
+ get descendantCount() {
13241
+ marshalNode(this);
13242
+ return NodeMethods.descendantCount(this.tree);
13243
+ }
13244
+ toString() {
13245
+ marshalNode(this);
13246
+ return NodeMethods.toString(this.tree);
13247
+ }
13248
+ child(index) {
13249
+ marshalNode(this);
13250
+ return unmarshalNode(NodeMethods.child(this.tree, index), this.tree);
13251
+ }
13252
+ namedChild(index) {
13253
+ marshalNode(this);
13254
+ return unmarshalNode(NodeMethods.namedChild(this.tree, index), this.tree);
13255
+ }
13256
+ childForFieldName(fieldName) {
13257
+ marshalNode(this);
13258
+ return unmarshalNode(NodeMethods.childForFieldName(this.tree, fieldName), this.tree);
13259
+ }
13260
+ childForFieldId(fieldId) {
13261
+ marshalNode(this);
13262
+ return unmarshalNode(NodeMethods.childForFieldId(this.tree, fieldId), this.tree);
13263
+ }
13264
+ fieldNameForChild(childIndex) {
13265
+ marshalNode(this);
13266
+ return NodeMethods.fieldNameForChild(this.tree, childIndex);
13267
+ }
13268
+ fieldNameForNamedChild(namedChildIndex) {
13269
+ marshalNode(this);
13270
+ return NodeMethods.fieldNameForNamedChild(this.tree, namedChildIndex);
13271
+ }
13272
+ childrenForFieldName(fieldName) {
13273
+ marshalNode(this);
13274
+ return unmarshalNodes(NodeMethods.childrenForFieldName(this.tree, fieldName), this.tree);
13275
+ }
13276
+ childrenForFieldId(fieldId) {
13277
+ marshalNode(this);
13278
+ return unmarshalNodes(NodeMethods.childrenForFieldId(this.tree, fieldId), this.tree);
13279
+ }
13280
+ firstChildForIndex(index) {
13281
+ marshalNode(this);
13282
+ return unmarshalNode(NodeMethods.firstChildForIndex(this.tree, index), this.tree);
13283
+ }
13284
+ firstNamedChildForIndex(index) {
13285
+ marshalNode(this);
13286
+ return unmarshalNode(NodeMethods.firstNamedChildForIndex(this.tree, index), this.tree);
13287
+ }
13288
+ childWithDescendant(descendant) {
13289
+ marshalNodes([this, descendant]);
13290
+ return unmarshalNode(NodeMethods.childWithDescendant(this.tree, descendant.tree), this.tree);
13291
+ }
13292
+ namedDescendantForIndex(start4, end5) {
13293
+ marshalNode(this);
13294
+ if (end5 == null)
13295
+ end5 = start4;
13296
+ return unmarshalNode(NodeMethods.namedDescendantForIndex(this.tree, start4, end5), this.tree);
13297
+ }
13298
+ descendantForIndex(start4, end5) {
13299
+ marshalNode(this);
13300
+ if (end5 == null)
13301
+ end5 = start4;
13302
+ return unmarshalNode(NodeMethods.descendantForIndex(this.tree, start4, end5), this.tree);
13303
+ }
13304
+ descendantsOfType(types, start4, end5) {
13305
+ marshalNode(this);
13306
+ if (typeof types === "string")
13307
+ types = [types];
13308
+ return unmarshalNodes(NodeMethods.descendantsOfType(this.tree, types, start4, end5), this.tree);
13309
+ }
13310
+ namedDescendantForPosition(start4, end5) {
13311
+ marshalNode(this);
13312
+ if (end5 == null)
13313
+ end5 = start4;
13314
+ return unmarshalNode(NodeMethods.namedDescendantForPosition(this.tree, start4, end5), this.tree);
13315
+ }
13316
+ descendantForPosition(start4, end5) {
13317
+ marshalNode(this);
13318
+ if (end5 == null)
13319
+ end5 = start4;
13320
+ return unmarshalNode(NodeMethods.descendantForPosition(this.tree, start4, end5), this.tree);
13321
+ }
13322
+ closest(types) {
13323
+ marshalNode(this);
13324
+ if (typeof types === "string")
13325
+ types = [types];
13326
+ return unmarshalNode(NodeMethods.closest(this.tree, types), this.tree);
13327
+ }
13328
+ walk() {
13329
+ marshalNode(this);
13330
+ const cursor = NodeMethods.walk(this.tree);
13331
+ cursor.tree = this.tree;
13332
+ unmarshalNode(cursor.currentNode, this.tree);
13333
+ return cursor;
13334
+ }
13335
+ }
13336
+ var { parse: parse12, setLanguage } = Parser.prototype;
13337
+ var languageSymbol = Symbol("parser.language");
13338
+ Parser.prototype.setLanguage = function(language2) {
13339
+ if (this instanceof Parser && setLanguage) {
13340
+ setLanguage.call(this, language2);
13341
+ }
13342
+ this[languageSymbol] = language2;
13343
+ if (!language2.nodeSubclasses) {
13344
+ initializeLanguageNodeClasses(language2);
13345
+ }
13346
+ return this;
13347
+ };
13348
+ Parser.prototype.getLanguage = function(_language) {
13349
+ return this[languageSymbol] || null;
13350
+ };
13351
+ Parser.prototype.parse = function(input, oldTree, { bufferSize, includedRanges } = {}) {
13352
+ let getText2, treeInput = input;
13353
+ if (typeof input === "string") {
13354
+ const inputString = input;
13355
+ input = (offset, _position) => inputString.slice(offset);
13356
+ getText2 = getTextFromString;
13357
+ } else {
13358
+ getText2 = getTextFromFunction;
13359
+ }
13360
+ const tree = this instanceof Parser && parse12 ? parse12.call(this, input, oldTree, bufferSize, includedRanges) : undefined;
13361
+ if (tree) {
13362
+ tree.input = treeInput;
13363
+ tree.getText = getText2;
13364
+ tree.language = this.getLanguage();
13365
+ }
13366
+ return tree;
13367
+ };
13368
+ var { startPosition, endPosition, currentNode } = TreeCursor.prototype;
13369
+ Object.defineProperties(TreeCursor.prototype, {
13370
+ currentNode: {
13371
+ get() {
13372
+ if (this instanceof TreeCursor && currentNode) {
13373
+ return unmarshalNode(currentNode.call(this), this.tree);
13374
+ }
13375
+ },
13376
+ configurable: true
13377
+ },
13378
+ startPosition: {
13379
+ get() {
13380
+ if (this instanceof TreeCursor && startPosition) {
13381
+ startPosition.call(this);
13382
+ return unmarshalPoint();
13383
+ }
13384
+ },
13385
+ configurable: true
13386
+ },
13387
+ endPosition: {
13388
+ get() {
13389
+ if (this instanceof TreeCursor && endPosition) {
13390
+ endPosition.call(this);
13391
+ return unmarshalPoint();
13392
+ }
13393
+ },
13394
+ configurable: true
13395
+ },
13396
+ nodeText: {
13397
+ get() {
13398
+ return this.tree.getText(this);
13399
+ },
13400
+ configurable: true
13401
+ }
13402
+ });
13403
+ var { _matches, _captures } = Query.prototype;
13404
+ var PREDICATE_STEP_TYPE = {
13405
+ DONE: 0,
13406
+ CAPTURE: 1,
13407
+ STRING: 2
13408
+ };
13409
+ var ZERO_POINT = { row: 0, column: 0 };
13410
+ Query.prototype._init = function() {
13411
+ const predicateDescriptions = this._getPredicates();
13412
+ const patternCount = predicateDescriptions.length;
13413
+ const setProperties = new Array(patternCount);
13414
+ const assertedProperties = new Array(patternCount);
13415
+ const refutedProperties = new Array(patternCount);
13416
+ const predicates = new Array(patternCount);
13417
+ const FIRST = 0;
13418
+ const SECOND = 2;
13419
+ const THIRD = 4;
13420
+ for (let i = 0;i < predicateDescriptions.length; i++) {
13421
+ predicates[i] = [];
13422
+ for (let j = 0;j < predicateDescriptions[i].length; j++) {
13423
+ const steps = predicateDescriptions[i][j];
13424
+ const stepsLength = steps.length / 2;
13425
+ if (steps[FIRST] !== PREDICATE_STEP_TYPE.STRING) {
13426
+ throw new Error("Predicates must begin with a literal value");
13427
+ }
13428
+ const operator = steps[FIRST + 1];
13429
+ let isPositive = true;
13430
+ let matchAll = true;
13431
+ let captureName;
13432
+ switch (operator) {
13433
+ case "any-not-eq?":
13434
+ case "not-eq?":
13435
+ isPositive = false;
13436
+ case "any-eq?":
13437
+ case "eq?":
13438
+ if (stepsLength !== 3)
13439
+ throw new Error(`Wrong number of arguments to \`#eq?\` predicate. Expected 2, got ${stepsLength - 1}`);
13440
+ if (steps[SECOND] !== PREDICATE_STEP_TYPE.CAPTURE)
13441
+ throw new Error(`First argument of \`#eq?\` predicate must be a capture. Got "${steps[SECOND + 1]}"`);
13442
+ matchAll = !operator.startsWith("any-");
13443
+ if (steps[THIRD] === PREDICATE_STEP_TYPE.CAPTURE) {
13444
+ const captureName1 = steps[SECOND + 1];
13445
+ const captureName2 = steps[THIRD + 1];
13446
+ predicates[i].push(function(captures) {
13447
+ let nodes_1 = [];
13448
+ let nodes_2 = [];
13449
+ for (const c of captures) {
13450
+ if (c.name === captureName1)
13451
+ nodes_1.push(c.node);
13452
+ if (c.name === captureName2)
13453
+ nodes_2.push(c.node);
13454
+ }
13455
+ let compare2 = (n1, n2, positive) => {
13456
+ return positive ? n1.text === n2.text : n1.text !== n2.text;
13457
+ };
13458
+ return matchAll ? nodes_1.every((n1) => nodes_2.some((n2) => compare2(n1, n2, isPositive))) : nodes_1.some((n1) => nodes_2.some((n2) => compare2(n1, n2, isPositive)));
13459
+ });
13460
+ } else {
13461
+ captureName = steps[SECOND + 1];
13462
+ const stringValue = steps[THIRD + 1];
13463
+ let matches = (n2) => n2.text === stringValue;
13464
+ let doesNotMatch = (n2) => n2.text !== stringValue;
13465
+ predicates[i].push(function(captures) {
13466
+ let nodes = [];
13467
+ for (const c of captures) {
13468
+ if (c.name === captureName)
13469
+ nodes.push(c.node);
13470
+ }
13471
+ let test = isPositive ? matches : doesNotMatch;
13472
+ return matchAll ? nodes.every(test) : nodes.some(test);
13473
+ });
13474
+ }
13475
+ break;
13476
+ case "any-not-match?":
13477
+ case "not-match?":
13478
+ isPositive = false;
13479
+ case "any-match?":
13480
+ case "match?":
13481
+ if (stepsLength !== 3)
13482
+ throw new Error(`Wrong number of arguments to \`#match?\` predicate. Expected 2, got ${stepsLength - 1}.`);
13483
+ if (steps[SECOND] !== PREDICATE_STEP_TYPE.CAPTURE)
13484
+ throw new Error(`First argument of \`#match?\` predicate must be a capture. Got "${steps[SECOND + 1]}".`);
13485
+ if (steps[THIRD] !== PREDICATE_STEP_TYPE.STRING)
13486
+ throw new Error(`Second argument of \`#match?\` predicate must be a string. Got @${steps[THIRD + 1]}.`);
13487
+ captureName = steps[SECOND + 1];
13488
+ const regex = new RegExp(steps[THIRD + 1]);
13489
+ matchAll = !operator.startsWith("any-");
13490
+ predicates[i].push(function(captures) {
13491
+ const nodes = [];
13492
+ for (const c of captures) {
13493
+ if (c.name === captureName)
13494
+ nodes.push(c.node.text);
13495
+ }
13496
+ let test = (text13, positive) => {
13497
+ return positive ? regex.test(text13) : !regex.test(text13);
13498
+ };
13499
+ if (nodes.length === 0)
13500
+ return !isPositive;
13501
+ return matchAll ? nodes.every((text13) => test(text13, isPositive)) : nodes.some((text13) => test(text13, isPositive));
13502
+ });
13503
+ break;
13504
+ case "set!":
13505
+ if (stepsLength < 2 || stepsLength > 3)
13506
+ throw new Error(`Wrong number of arguments to \`#set!\` predicate. Expected 1 or 2. Got ${stepsLength - 1}.`);
13507
+ if (steps.some((s, i2) => i2 % 2 !== 1 && s !== PREDICATE_STEP_TYPE.STRING))
13508
+ throw new Error(`Arguments to \`#set!\` predicate must be a strings.".`);
13509
+ if (!setProperties[i])
13510
+ setProperties[i] = {};
13511
+ setProperties[i][steps[SECOND + 1]] = steps[THIRD] ? steps[THIRD + 1] : null;
13512
+ break;
13513
+ case "is?":
13514
+ case "is-not?":
13515
+ if (stepsLength < 2 || stepsLength > 3)
13516
+ throw new Error(`Wrong number of arguments to \`#${operator}\` predicate. Expected 1 or 2. Got ${stepsLength - 1}.`);
13517
+ if (steps.some((s, i2) => i2 % 2 !== 1 && s !== PREDICATE_STEP_TYPE.STRING))
13518
+ throw new Error(`Arguments to \`#${operator}\` predicate must be a strings.".`);
13519
+ const properties = operator === "is?" ? assertedProperties : refutedProperties;
13520
+ if (!properties[i])
13521
+ properties[i] = {};
13522
+ properties[i][steps[SECOND + 1]] = steps[THIRD] ? steps[THIRD + 1] : null;
13523
+ break;
13524
+ case "not-any-of?":
13525
+ isPositive = false;
13526
+ case "any-of?":
13527
+ if (stepsLength < 2)
13528
+ throw new Error(`Wrong number of arguments to \`#${operator}\` predicate. Expected at least 1. Got ${stepsLength - 1}.`);
13529
+ if (steps[SECOND] !== PREDICATE_STEP_TYPE.CAPTURE)
13530
+ throw new Error(`First argument of \`#${operator}\` predicate must be a capture. Got "${steps[1].value}".`);
13531
+ const stringValues = [];
13532
+ for (let k = THIRD;k < 2 * stepsLength; k += 2) {
13533
+ if (steps[k] !== PREDICATE_STEP_TYPE.STRING)
13534
+ throw new Error(`Arguments to \`#${operator}\` predicate must be a strings.".`);
13535
+ stringValues.push(steps[k + 1]);
13536
+ }
13537
+ captureName = steps[SECOND + 1];
13538
+ predicates[i].push(function(captures) {
13539
+ const nodes = [];
13540
+ for (const c of captures) {
13541
+ if (c.name === captureName)
13542
+ nodes.push(c.node.text);
13543
+ }
13544
+ if (nodes.length === 0)
13545
+ return !isPositive;
13546
+ return nodes.every((text13) => stringValues.includes(text13)) === isPositive;
13547
+ });
13548
+ break;
13549
+ default:
13550
+ throw new Error(`Unknown query predicate \`#${steps[FIRST + 1]}\``);
13551
+ }
13552
+ }
13553
+ }
13554
+ this.predicates = Object.freeze(predicates);
13555
+ this.setProperties = Object.freeze(setProperties);
13556
+ this.assertedProperties = Object.freeze(assertedProperties);
13557
+ this.refutedProperties = Object.freeze(refutedProperties);
13558
+ };
13559
+ Query.prototype.matches = function(node, {
13560
+ startPosition: startPosition2 = ZERO_POINT,
13561
+ endPosition: endPosition2 = ZERO_POINT,
13562
+ startIndex = 0,
13563
+ endIndex = 0,
13564
+ matchLimit = 4294967295,
13565
+ maxStartDepth = 4294967295,
13566
+ timeoutMicros = 0
13567
+ } = {}) {
13568
+ marshalNode(node);
13569
+ const [returnedMatches, returnedNodes] = _matches.call(this, node.tree, startPosition2.row, startPosition2.column, endPosition2.row, endPosition2.column, startIndex, endIndex, matchLimit, maxStartDepth, timeoutMicros);
13570
+ const nodes = unmarshalNodes(returnedNodes, node.tree);
13571
+ const results = [];
13572
+ let i = 0;
13573
+ let nodeIndex = 0;
13574
+ while (i < returnedMatches.length) {
13575
+ const patternIndex = returnedMatches[i++];
13576
+ const captures = [];
13577
+ while (i < returnedMatches.length && typeof returnedMatches[i] === "string") {
13578
+ const captureName = returnedMatches[i++];
13579
+ captures.push({
13580
+ name: captureName,
13581
+ node: nodes[nodeIndex++]
13582
+ });
13583
+ }
13584
+ if (this.predicates[patternIndex].every((p3) => p3(captures))) {
13585
+ const result = { pattern: patternIndex, captures };
13586
+ const setProperties = this.setProperties[patternIndex];
13587
+ const assertedProperties = this.assertedProperties[patternIndex];
13588
+ const refutedProperties = this.refutedProperties[patternIndex];
13589
+ if (setProperties)
13590
+ result.setProperties = setProperties;
13591
+ if (assertedProperties)
13592
+ result.assertedProperties = assertedProperties;
13593
+ if (refutedProperties)
13594
+ result.refutedProperties = refutedProperties;
13595
+ results.push(result);
13596
+ }
13597
+ }
13598
+ return results;
13599
+ };
13600
+ Query.prototype.captures = function(node, {
13601
+ startPosition: startPosition2 = ZERO_POINT,
13602
+ endPosition: endPosition2 = ZERO_POINT,
13603
+ startIndex = 0,
13604
+ endIndex = 0,
13605
+ matchLimit = 4294967295,
13606
+ maxStartDepth = 4294967295,
13607
+ timeoutMicros = 0
13608
+ } = {}) {
13609
+ marshalNode(node);
13610
+ const [returnedMatches, returnedNodes] = _captures.call(this, node.tree, startPosition2.row, startPosition2.column, endPosition2.row, endPosition2.column, startIndex, endIndex, matchLimit, maxStartDepth, timeoutMicros);
13611
+ const nodes = unmarshalNodes(returnedNodes, node.tree);
13612
+ const results = [];
13613
+ let i = 0;
13614
+ let nodeIndex = 0;
13615
+ while (i < returnedMatches.length) {
13616
+ const patternIndex = returnedMatches[i++];
13617
+ const captureIndex = returnedMatches[i++];
13618
+ const captures = [];
13619
+ while (i < returnedMatches.length && typeof returnedMatches[i] === "string") {
13620
+ const captureName = returnedMatches[i++];
13621
+ captures.push({
13622
+ name: captureName,
13623
+ node: nodes[nodeIndex++]
13624
+ });
13625
+ }
13626
+ if (this.predicates[patternIndex].every((p3) => p3(captures))) {
13627
+ const result = captures[captureIndex];
13628
+ const setProperties = this.setProperties[patternIndex];
13629
+ const assertedProperties = this.assertedProperties[patternIndex];
13630
+ const refutedProperties = this.refutedProperties[patternIndex];
13631
+ if (setProperties)
13632
+ result.setProperties = setProperties;
13633
+ if (assertedProperties)
13634
+ result.assertedProperties = assertedProperties;
13635
+ if (refutedProperties)
13636
+ result.refutedProperties = refutedProperties;
13637
+ results.push(result);
13638
+ }
13639
+ }
13640
+ return results;
13641
+ };
13642
+ LookaheadIterator.prototype[Symbol.iterator] = function() {
13643
+ const self2 = this;
13644
+ return {
13645
+ next() {
13646
+ if (self2._next()) {
13647
+ return { done: false, value: self2.currentType };
13648
+ }
13649
+ return { done: true, value: "" };
13650
+ }
13651
+ };
13652
+ };
13653
+ function getTextFromString(node) {
13654
+ return this.input.substring(node.startIndex, node.endIndex);
13655
+ }
13656
+ function getTextFromFunction({ startIndex, endIndex }) {
13657
+ const { input } = this;
13658
+ let result = "";
13659
+ const goalLength = endIndex - startIndex;
13660
+ while (result.length < goalLength) {
13661
+ const text13 = input(startIndex + result.length);
13662
+ result += text13;
13663
+ }
13664
+ return result.slice(0, goalLength);
13665
+ }
13666
+ var { pointTransferArray } = binding;
13667
+ var NODE_FIELD_COUNT = 6;
13668
+ var ERROR_TYPE_ID = 65535;
13669
+ function getID(buffer3, offset) {
13670
+ const low = BigInt(buffer3[offset]);
13671
+ const high = BigInt(buffer3[offset + 1]);
13672
+ return (high << 32n) + low;
13673
+ }
13674
+ function unmarshalNode(value6, tree, offset = 0, cache = null) {
13675
+ if (typeof value6 === "object") {
13676
+ const node = value6;
13677
+ return node;
13678
+ }
13679
+ const nodeTypeId = value6;
13680
+ const NodeClass = nodeTypeId === ERROR_TYPE_ID ? SyntaxNode : tree.language.nodeSubclasses[nodeTypeId];
13681
+ const { nodeTransferArray } = binding;
13682
+ const id3 = getID(nodeTransferArray, offset);
13683
+ if (id3 === 0n) {
13684
+ return null;
13685
+ }
13686
+ let cachedResult;
13687
+ if (cache && (cachedResult = cache.get(id3)))
13688
+ return cachedResult;
13689
+ const result = new NodeClass(tree);
13690
+ for (let i = 0;i < NODE_FIELD_COUNT; i++) {
13691
+ result[i] = nodeTransferArray[offset + i];
13692
+ }
13693
+ if (cache)
13694
+ cache.set(id3, result);
13695
+ else
13696
+ tree._cacheNode(result);
13697
+ return result;
13698
+ }
13699
+ function unmarshalNodes(nodes, tree) {
13700
+ const cache = new Map;
13701
+ let offset = 0;
13702
+ for (let i = 0, { length: length3 } = nodes;i < length3; i++) {
13703
+ const node = unmarshalNode(nodes[i], tree, offset, cache);
13704
+ if (node !== nodes[i]) {
13705
+ nodes[i] = node;
13706
+ offset += NODE_FIELD_COUNT;
13707
+ }
13708
+ }
13709
+ tree._cacheNodes(Array.from(cache.values()));
13710
+ return nodes;
13711
+ }
13712
+ function marshalNode(node, offset = 0) {
13713
+ if (!(node.tree instanceof Tree)) {
13714
+ throw new TypeError("SyntaxNode must belong to a Tree");
13715
+ }
13716
+ const { nodeTransferArray } = binding;
13717
+ for (let i = 0;i < NODE_FIELD_COUNT; i++) {
13718
+ nodeTransferArray[offset * NODE_FIELD_COUNT + i] = node[i];
13719
+ }
13720
+ }
13721
+ function marshalNodes(nodes) {
13722
+ for (let i = 0, { length: length3 } = nodes;i < length3; i++) {
13723
+ marshalNode(nodes[i], i);
13724
+ }
13725
+ }
13726
+ function unmarshalPoint() {
13727
+ return { row: pointTransferArray[0], column: pointTransferArray[1] };
13728
+ }
13729
+ function pointToString(point) {
13730
+ return `{row: ${point.row}, column: ${point.column}}`;
13731
+ }
13732
+ function initializeLanguageNodeClasses(language) {
13733
+ const nodeTypeNamesById = binding.getNodeTypeNamesById(language);
13734
+ const nodeFieldNamesById = binding.getNodeFieldNamesById(language);
13735
+ const nodeTypeInfo = language.nodeTypeInfo || [];
13736
+ const nodeSubclasses = [];
13737
+ for (let id = 0, n = nodeTypeNamesById.length;id < n; id++) {
13738
+ nodeSubclasses[id] = SyntaxNode;
13739
+ const typeName = nodeTypeNamesById[id];
13740
+ if (!typeName)
13741
+ continue;
13742
+ const typeInfo = nodeTypeInfo.find((info2) => info2.named && info2.type === typeName);
13743
+ if (!typeInfo)
13744
+ continue;
13745
+ const fieldNames = [];
13746
+ let classBody = `
13747
+ `;
13748
+ if (typeInfo.fields) {
13749
+ for (const fieldName in typeInfo.fields) {
13750
+ const fieldId = nodeFieldNamesById.indexOf(fieldName);
13751
+ if (fieldId === -1)
13752
+ continue;
13753
+ if (typeInfo.fields[fieldName].multiple) {
13754
+ const getterName = camelCase(fieldName) + "Nodes";
13755
+ fieldNames.push(getterName);
13756
+ classBody += `
13757
+ get ${getterName}() {
13758
+ marshalNode(this);
13759
+ return unmarshalNodes(NodeMethods.childNodesForFieldId(this.tree, ${fieldId}), this.tree);
13760
+ }
13761
+ `.replace(/\s+/g, " ") + `
13762
+ `;
13763
+ } else {
13764
+ const getterName = camelCase(fieldName, false) + "Node";
13765
+ fieldNames.push(getterName);
13766
+ classBody += `
13767
+ get ${getterName}() {
13768
+ marshalNode(this);
13769
+ return unmarshalNode(NodeMethods.childNodeForFieldId(this.tree, ${fieldId}), this.tree);
13770
+ }
13771
+ `.replace(/\s+/g, " ") + `
13772
+ `;
13773
+ }
13774
+ }
13775
+ }
13776
+ const className = camelCase(typeName, true) + "Node";
13777
+ const nodeSubclass = eval(`class ${className} extends SyntaxNode {${classBody}}; ${className}`);
13778
+ nodeSubclass.prototype.type = typeName;
13779
+ nodeSubclass.prototype.fields = Object.freeze(fieldNames.sort());
13780
+ nodeSubclasses[id] = nodeSubclass;
13781
+ }
13782
+ language.nodeSubclasses = nodeSubclasses;
13783
+ }
13784
+ function camelCase(name21, upperCase) {
13785
+ name21 = name21.replace(/_(\w)/g, (_match, letter) => letter.toUpperCase());
13786
+ if (upperCase)
13787
+ name21 = name21[0].toUpperCase() + name21.slice(1);
13788
+ return name21;
13789
+ }
13790
+ module.exports = Parser;
13791
+ module.exports.Query = Query;
13792
+ module.exports.Tree = Tree;
13793
+ module.exports.SyntaxNode = SyntaxNode;
13794
+ module.exports.TreeCursor = TreeCursor;
13795
+ module.exports.LookaheadIterator = LookaheadIterator;
13796
+ });
13797
+
12876
13798
  // ../../node_modules/.bun/@neon-rs+load@0.0.4/node_modules/@neon-rs/load/dist/index.js
12877
13799
  var require_dist2 = __commonJS((exports) => {
12878
13800
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
@@ -16867,9 +17789,9 @@ var require_helper = __commonJS((exports, module) => {
16867
17789
  function isRegFile(mode) {
16868
17790
  return (mode & S_IFMT) == S_IFREG;
16869
17791
  }
16870
- var fieldNames = ["host", "port", "database", "user", "password"];
16871
- var nrOfFields = fieldNames.length;
16872
- var passKey = fieldNames[nrOfFields - 1];
17792
+ var fieldNames2 = ["host", "port", "database", "user", "password"];
17793
+ var nrOfFields = fieldNames2.length;
17794
+ var passKey = fieldNames2[nrOfFields - 1];
16873
17795
  function warn2() {
16874
17796
  var isWritable = warnStream instanceof Stream2 && warnStream.writable === true;
16875
17797
  if (isWritable) {
@@ -16915,7 +17837,7 @@ var require_helper = __commonJS((exports, module) => {
16915
17837
  return true;
16916
17838
  };
16917
17839
  var matcher = exports.match = function(connInfo, entry) {
16918
- return fieldNames.slice(0, -1).reduce(function(prev, field, idx) {
17840
+ return fieldNames2.slice(0, -1).reduce(function(prev, field, idx) {
16919
17841
  if (idx == 1) {
16920
17842
  if (Number(connInfo[field] || defaultPort) === Number(entry[field])) {
16921
17843
  return prev && true;
@@ -16962,7 +17884,7 @@ var require_helper = __commonJS((exports, module) => {
16962
17884
  if (!Object.hasOwnProperty.call(process.env, "PGPASS_NO_DEESCAPE")) {
16963
17885
  field = field.replace(/\\([:\\])/g, "$1");
16964
17886
  }
16965
- obj[fieldNames[idx]] = field;
17887
+ obj[fieldNames2[idx]] = field;
16966
17888
  };
16967
17889
  for (var i = 0;i < line4.length - 1; i += 1) {
16968
17890
  curChar = line4.charAt(i + 1);
@@ -17003,9 +17925,9 @@ var require_helper = __commonJS((exports, module) => {
17003
17925
  return x.length > 0;
17004
17926
  }
17005
17927
  };
17006
- for (var idx = 0;idx < fieldNames.length; idx += 1) {
17928
+ for (var idx = 0;idx < fieldNames2.length; idx += 1) {
17007
17929
  var rule = rules[idx];
17008
- var value6 = entry[fieldNames[idx]] || "";
17930
+ var value6 = entry[fieldNames2[idx]] || "";
17009
17931
  var res = rule(value6);
17010
17932
  if (!res) {
17011
17933
  return false;
@@ -21373,15 +22295,15 @@ var bind = (map, flatMap) => dual(3, (self2, name, f) => flatMap(self2, (a) => m
21373
22295
  // ../../node_modules/.bun/effect@3.19.15/node_modules/effect/dist/esm/GlobalValue.js
21374
22296
  var globalStoreId = `effect/GlobalValue`;
21375
22297
  var globalStore;
21376
- var globalValue = (id, compute) => {
22298
+ var globalValue = (id2, compute) => {
21377
22299
  if (!globalStore) {
21378
22300
  globalThis[globalStoreId] ??= new Map;
21379
22301
  globalStore = globalThis[globalStoreId];
21380
22302
  }
21381
- if (!globalStore.has(id)) {
21382
- globalStore.set(id, compute());
22303
+ if (!globalStore.has(id2)) {
22304
+ globalStore.set(id2, compute());
21383
22305
  }
21384
- return globalStore.get(id);
22306
+ return globalStore.get(id2);
21385
22307
  };
21386
22308
 
21387
22309
  // ../../node_modules/.bun/effect@3.19.15/node_modules/effect/dist/esm/Predicate.js
@@ -21614,18 +22536,18 @@ var random = (self2) => {
21614
22536
  return randomHashCache.get(self2);
21615
22537
  };
21616
22538
  var combine = (b) => (self2) => self2 * 53 ^ b;
21617
- var optimize = (n) => n & 3221225471 | n >>> 1 & 1073741824;
22539
+ var optimize = (n2) => n2 & 3221225471 | n2 >>> 1 & 1073741824;
21618
22540
  var isHash = (u) => hasProperty(u, symbol);
21619
- var number2 = (n) => {
21620
- if (n !== n || n === Infinity) {
22541
+ var number2 = (n2) => {
22542
+ if (n2 !== n2 || n2 === Infinity) {
21621
22543
  return 0;
21622
22544
  }
21623
- let h = n | 0;
21624
- if (h !== n) {
21625
- h ^= n * 4294967295;
22545
+ let h = n2 | 0;
22546
+ if (h !== n2) {
22547
+ h ^= n2 * 4294967295;
21626
22548
  }
21627
- while (n > 4294967295) {
21628
- h ^= n /= 4294967295;
22549
+ while (n2 > 4294967295) {
22550
+ h ^= n2 /= 4294967295;
21629
22551
  }
21630
22552
  return optimize(h);
21631
22553
  };
@@ -22317,9 +23239,9 @@ var keys = (self2) => Object.keys(self2);
22317
23239
 
22318
23240
  // ../../node_modules/.bun/effect@3.19.15/node_modules/effect/dist/esm/Array.js
22319
23241
  var make4 = (...elements) => elements;
22320
- var allocate = (n) => new Array(n);
22321
- var makeBy = /* @__PURE__ */ dual(2, (n, f) => {
22322
- const max = Math.max(1, Math.floor(n));
23242
+ var allocate = (n2) => new Array(n2);
23243
+ var makeBy = /* @__PURE__ */ dual(2, (n2, f) => {
23244
+ const max = Math.max(1, Math.floor(n2));
22323
23245
  const out = new Array(max);
22324
23246
  for (let i = 0;i < max; i++) {
22325
23247
  out[i] = f(i);
@@ -22367,9 +23289,9 @@ var last = (self2) => isNonEmptyReadonlyArray(self2) ? some2(lastNonEmpty(self2)
22367
23289
  var lastNonEmpty = (self2) => self2[self2.length - 1];
22368
23290
  var tailNonEmpty = (self2) => self2.slice(1);
22369
23291
  var initNonEmpty = (self2) => self2.slice(0, -1);
22370
- var take = /* @__PURE__ */ dual(2, (self2, n) => {
23292
+ var take = /* @__PURE__ */ dual(2, (self2, n2) => {
22371
23293
  const input = fromIterable(self2);
22372
- return input.slice(0, clamp(n, input));
23294
+ return input.slice(0, clamp(n2, input));
22373
23295
  });
22374
23296
  var spanIndex = (self2, predicate) => {
22375
23297
  let i = 0;
@@ -22382,9 +23304,9 @@ var spanIndex = (self2, predicate) => {
22382
23304
  return i;
22383
23305
  };
22384
23306
  var span = /* @__PURE__ */ dual(2, (self2, predicate) => splitAt(self2, spanIndex(self2, predicate)));
22385
- var drop = /* @__PURE__ */ dual(2, (self2, n) => {
23307
+ var drop = /* @__PURE__ */ dual(2, (self2, n2) => {
22386
23308
  const input = fromIterable(self2);
22387
- return input.slice(clamp(n, input), input.length);
23309
+ return input.slice(clamp(n2, input), input.length);
22388
23310
  });
22389
23311
  var findFirstIndex = /* @__PURE__ */ dual(2, (self2, predicate) => {
22390
23312
  let i = 0;
@@ -22444,9 +23366,9 @@ var containsWith2 = (isEquivalent) => dual(2, (self2, a) => {
22444
23366
  });
22445
23367
  var _equivalence2 = /* @__PURE__ */ equivalence();
22446
23368
  var contains2 = /* @__PURE__ */ containsWith2(_equivalence2);
22447
- var splitAt = /* @__PURE__ */ dual(2, (self2, n) => {
23369
+ var splitAt = /* @__PURE__ */ dual(2, (self2, n2) => {
22448
23370
  const input = Array.from(self2);
22449
- const _n = Math.floor(n);
23371
+ const _n = Math.floor(n2);
22450
23372
  if (isNonEmptyReadonlyArray(input)) {
22451
23373
  if (_n >= 1) {
22452
23374
  return splitNonEmptyAt(input, _n);
@@ -22455,8 +23377,8 @@ var splitAt = /* @__PURE__ */ dual(2, (self2, n) => {
22455
23377
  }
22456
23378
  return [input, []];
22457
23379
  });
22458
- var splitNonEmptyAt = /* @__PURE__ */ dual(2, (self2, n) => {
22459
- const _n = Math.max(1, Math.floor(n));
23380
+ var splitNonEmptyAt = /* @__PURE__ */ dual(2, (self2, n2) => {
23381
+ const _n = Math.max(1, Math.floor(n2));
22460
23382
  return _n >= self2.length ? [copy(self2), []] : [prepend(self2.slice(1, _n), headNonEmpty(self2)), self2.slice(_n)];
22461
23383
  });
22462
23384
  var copy = (self2) => self2.slice();
@@ -22825,14 +23747,14 @@ var makeGenericTag = (key) => {
22825
23747
  tag.key = key;
22826
23748
  return tag;
22827
23749
  };
22828
- var Tag = (id) => () => {
23750
+ var Tag = (id2) => () => {
22829
23751
  const limit = Error.stackTraceLimit;
22830
23752
  Error.stackTraceLimit = 2;
22831
23753
  const creationError = new Error;
22832
23754
  Error.stackTraceLimit = limit;
22833
23755
  function TagClass() {}
22834
23756
  Object.setPrototypeOf(TagClass, TagProto);
22835
- TagClass.key = id;
23757
+ TagClass.key = id2;
22836
23758
  Object.defineProperty(TagClass, "stack", {
22837
23759
  get() {
22838
23760
  return creationError.stack;
@@ -22840,14 +23762,14 @@ var Tag = (id) => () => {
22840
23762
  });
22841
23763
  return TagClass;
22842
23764
  };
22843
- var Reference = () => (id, options) => {
23765
+ var Reference = () => (id2, options) => {
22844
23766
  const limit = Error.stackTraceLimit;
22845
23767
  Error.stackTraceLimit = 2;
22846
23768
  const creationError = new Error;
22847
23769
  Error.stackTraceLimit = limit;
22848
23770
  function ReferenceClass() {}
22849
23771
  Object.setPrototypeOf(ReferenceClass, ReferenceProto);
22850
- ReferenceClass.key = id;
23772
+ ReferenceClass.key = id2;
22851
23773
  ReferenceClass.defaultValue = options.defaultValue;
22852
23774
  Object.defineProperty(ReferenceClass, "stack", {
22853
23775
  get() {
@@ -23208,10 +24130,10 @@ var unsafeGet4 = /* @__PURE__ */ dual(2, (self2, index) => {
23208
24130
  });
23209
24131
  var append2 = /* @__PURE__ */ dual(2, (self2, a) => appendAll2(self2, of2(a)));
23210
24132
  var prepend2 = /* @__PURE__ */ dual(2, (self2, elem) => appendAll2(of2(elem), self2));
23211
- var take2 = /* @__PURE__ */ dual(2, (self2, n) => {
23212
- if (n <= 0) {
24133
+ var take2 = /* @__PURE__ */ dual(2, (self2, n2) => {
24134
+ if (n2 <= 0) {
23213
24135
  return _empty2;
23214
- } else if (n >= self2.length) {
24136
+ } else if (n2 >= self2.length) {
23215
24137
  return self2;
23216
24138
  } else {
23217
24139
  switch (self2.backing._tag) {
@@ -23219,35 +24141,35 @@ var take2 = /* @__PURE__ */ dual(2, (self2, n) => {
23219
24141
  return makeChunk({
23220
24142
  _tag: "ISlice",
23221
24143
  chunk: self2.backing.chunk,
23222
- length: n,
24144
+ length: n2,
23223
24145
  offset: self2.backing.offset
23224
24146
  });
23225
24147
  }
23226
24148
  case "IConcat": {
23227
- if (n > self2.left.length) {
24149
+ if (n2 > self2.left.length) {
23228
24150
  return makeChunk({
23229
24151
  _tag: "IConcat",
23230
24152
  left: self2.left,
23231
- right: take2(self2.right, n - self2.left.length)
24153
+ right: take2(self2.right, n2 - self2.left.length)
23232
24154
  });
23233
24155
  }
23234
- return take2(self2.left, n);
24156
+ return take2(self2.left, n2);
23235
24157
  }
23236
24158
  default: {
23237
24159
  return makeChunk({
23238
24160
  _tag: "ISlice",
23239
24161
  chunk: self2,
23240
24162
  offset: 0,
23241
- length: n
24163
+ length: n2
23242
24164
  });
23243
24165
  }
23244
24166
  }
23245
24167
  }
23246
24168
  });
23247
- var drop2 = /* @__PURE__ */ dual(2, (self2, n) => {
23248
- if (n <= 0) {
24169
+ var drop2 = /* @__PURE__ */ dual(2, (self2, n2) => {
24170
+ if (n2 <= 0) {
23249
24171
  return self2;
23250
- } else if (n >= self2.length) {
24172
+ } else if (n2 >= self2.length) {
23251
24173
  return _empty2;
23252
24174
  } else {
23253
24175
  switch (self2.backing._tag) {
@@ -23255,17 +24177,17 @@ var drop2 = /* @__PURE__ */ dual(2, (self2, n) => {
23255
24177
  return makeChunk({
23256
24178
  _tag: "ISlice",
23257
24179
  chunk: self2.backing.chunk,
23258
- offset: self2.backing.offset + n,
23259
- length: self2.backing.length - n
24180
+ offset: self2.backing.offset + n2,
24181
+ length: self2.backing.length - n2
23260
24182
  });
23261
24183
  }
23262
24184
  case "IConcat": {
23263
- if (n > self2.left.length) {
23264
- return drop2(self2.right, n - self2.left.length);
24185
+ if (n2 > self2.left.length) {
24186
+ return drop2(self2.right, n2 - self2.left.length);
23265
24187
  }
23266
24188
  return makeChunk({
23267
24189
  _tag: "IConcat",
23268
- left: drop2(self2.left, n),
24190
+ left: drop2(self2.left, n2),
23269
24191
  right: self2.right
23270
24192
  });
23271
24193
  }
@@ -23273,8 +24195,8 @@ var drop2 = /* @__PURE__ */ dual(2, (self2, n) => {
23273
24195
  return makeChunk({
23274
24196
  _tag: "ISlice",
23275
24197
  chunk: self2,
23276
- offset: n,
23277
- length: self2.length - n
24198
+ offset: n2,
24199
+ length: self2.length - n2
23278
24200
  });
23279
24201
  }
23280
24202
  }
@@ -23372,7 +24294,7 @@ var unsafeHead = (self2) => unsafeGet4(self2, 0);
23372
24294
  var headNonEmpty2 = unsafeHead;
23373
24295
  var map5 = /* @__PURE__ */ dual(2, (self2, f) => self2.backing._tag === "ISingleton" ? of2(f(self2.backing.a, 0)) : unsafeFromArray(pipe(toReadonlyArray(self2), map4((a, i) => f(a, i)))));
23374
24296
  var tailNonEmpty2 = (self2) => drop2(self2, 1);
23375
- var takeRight = /* @__PURE__ */ dual(2, (self2, n) => drop2(self2, self2.length - n));
24297
+ var takeRight = /* @__PURE__ */ dual(2, (self2, n2) => drop2(self2, self2.length - n2));
23376
24298
  var reduce2 = reduce;
23377
24299
 
23378
24300
  // ../../node_modules/.bun/effect@3.19.15/node_modules/effect/dist/esm/Duration.js
@@ -24401,8 +25323,8 @@ class Runtime {
24401
25323
  startTimeMillis;
24402
25324
  [FiberIdTypeId] = FiberIdTypeId;
24403
25325
  _tag = OP_RUNTIME;
24404
- constructor(id, startTimeMillis) {
24405
- this.id = id;
25326
+ constructor(id2, startTimeMillis) {
25327
+ this.id = id2;
24406
25328
  this.startTimeMillis = startTimeMillis;
24407
25329
  }
24408
25330
  [symbol]() {
@@ -24459,8 +25381,8 @@ class Composite {
24459
25381
  }
24460
25382
  }
24461
25383
  var none3 = /* @__PURE__ */ new None;
24462
- var runtime = (id, startTimeMillis) => {
24463
- return new Runtime(id, startTimeMillis);
25384
+ var runtime = (id2, startTimeMillis) => {
25385
+ return new Runtime(id2, startTimeMillis);
24464
25386
  };
24465
25387
  var composite = (left3, right3) => {
24466
25388
  return new Composite(left3, right3);
@@ -24492,17 +25414,17 @@ var ids = (self2) => {
24492
25414
  }
24493
25415
  };
24494
25416
  var _fiberCounter = /* @__PURE__ */ globalValue(/* @__PURE__ */ Symbol.for("effect/Fiber/Id/_fiberCounter"), () => make13(0));
24495
- var make14 = (id, startTimeSeconds) => {
24496
- return new Runtime(id, startTimeSeconds);
25417
+ var make14 = (id2, startTimeSeconds) => {
25418
+ return new Runtime(id2, startTimeSeconds);
24497
25419
  };
24498
25420
  var threadName = (self2) => {
24499
- const identifiers = Array.from(ids(self2)).map((n) => `#${n}`).join(",");
25421
+ const identifiers = Array.from(ids(self2)).map((n2) => `#${n2}`).join(",");
24500
25422
  return identifiers;
24501
25423
  };
24502
25424
  var unsafeMake = () => {
24503
- const id = get6(_fiberCounter);
24504
- pipe(_fiberCounter, set2(id + 1));
24505
- return new Runtime(id, Date.now());
25425
+ const id2 = get6(_fiberCounter);
25426
+ pipe(_fiberCounter, set2(id2 + 1));
25427
+ return new Runtime(id2, Date.now());
24506
25428
  };
24507
25429
 
24508
25430
  // ../../node_modules/.bun/effect@3.19.15/node_modules/effect/dist/esm/FiberId.js
@@ -25104,7 +26026,7 @@ var enable = (flag) => make18(flag, flag);
25104
26026
  var disable = (flag) => make18(flag, 0);
25105
26027
  var exclude = /* @__PURE__ */ dual(2, (self2, flag) => make18(active(self2) & ~flag, enabled(self2)));
25106
26028
  var andThen = /* @__PURE__ */ dual(2, (self2, that) => self2 | that);
25107
- var invert = (n) => ~n >>> 0 & BIT_MASK;
26029
+ var invert = (n2) => ~n2 >>> 0 & BIT_MASK;
25108
26030
 
25109
26031
  // ../../node_modules/.bun/effect@3.19.15/node_modules/effect/dist/esm/internal/runtimeFlags.js
25110
26032
  var None2 = 0;
@@ -26587,7 +27509,7 @@ var fiberRefUnsafeMakePatch = (initial, options) => {
26587
27509
  combine: (first, second) => options.differ.combine(first, second),
26588
27510
  patch: (patch5) => (oldValue) => options.differ.patch(patch5, oldValue),
26589
27511
  fork: options.fork,
26590
- join: options.join ?? ((_, n) => n)
27512
+ join: options.join ?? ((_, n2) => n2)
26591
27513
  };
26592
27514
  return _fiberRef;
26593
27515
  };
@@ -26634,7 +27556,7 @@ var causeSquashWith = /* @__PURE__ */ dual(2, (self2, f) => {
26634
27556
  case "None": {
26635
27557
  return pipe(defects(self2), head2, match2({
26636
27558
  onNone: () => {
26637
- const interrupts = fromIterable(interruptors(self2)).flatMap((fiberId2) => fromIterable(ids2(fiberId2)).map((id) => `#${id}`));
27559
+ const interrupts = fromIterable(interruptors(self2)).flatMap((fiberId2) => fromIterable(ids2(fiberId2)).map((id2) => `#${id2}`));
26638
27560
  return new InterruptedException(interrupts ? `Interrupted by fibers: ${interrupts.join(", ")}` : undefined);
26639
27561
  },
26640
27562
  onSome: identity
@@ -26860,7 +27782,7 @@ var deferredUnsafeMake = (fiberId2) => {
26860
27782
  };
26861
27783
  return _deferred;
26862
27784
  };
26863
- var deferredMake = () => flatMap7(fiberId, (id) => deferredMakeAs(id));
27785
+ var deferredMake = () => flatMap7(fiberId, (id2) => deferredMakeAs(id2));
26864
27786
  var deferredMakeAs = (fiberId2) => sync(() => deferredUnsafeMake(fiberId2));
26865
27787
  var deferredAwait = (self2) => asyncInterrupt((resume) => {
26866
27788
  const state = get6(self2.state);
@@ -27027,8 +27949,8 @@ var parse = (s) => {
27027
27949
  if (s.trim() === "") {
27028
27950
  return none;
27029
27951
  }
27030
- const n = Number(s);
27031
- return Number.isNaN(n) ? none : some(n);
27952
+ const n2 = Number(s);
27953
+ return Number.isNaN(n2) ? none : some(n2);
27032
27954
  };
27033
27955
  var round = /* @__PURE__ */ dual(2, (self2, precision) => {
27034
27956
  const factor = Math.pow(10, precision);
@@ -27403,19 +28325,19 @@ class RandomImpl {
27403
28325
  return sync(() => this.PRNG.number());
27404
28326
  }
27405
28327
  get nextBoolean() {
27406
- return map11(this.next, (n) => n > 0.5);
28328
+ return map11(this.next, (n2) => n2 > 0.5);
27407
28329
  }
27408
28330
  get nextInt() {
27409
28331
  return sync(() => this.PRNG.integer(Number.MAX_SAFE_INTEGER));
27410
28332
  }
27411
28333
  nextRange(min2, max2) {
27412
- return map11(this.next, (n) => (max2 - min2) * n + min2);
28334
+ return map11(this.next, (n2) => (max2 - min2) * n2 + min2);
27413
28335
  }
27414
28336
  nextIntBetween(min2, max2) {
27415
28337
  return sync(() => this.PRNG.integer(max2 - min2) + min2);
27416
28338
  }
27417
28339
  shuffle(elements) {
27418
- return shuffleWith(elements, (n) => this.nextIntBetween(0, n));
28340
+ return shuffleWith(elements, (n2) => this.nextIntBetween(0, n2));
27419
28341
  }
27420
28342
  }
27421
28343
  var shuffleWith = (elements, nextIntBounded) => {
@@ -27424,7 +28346,7 @@ var shuffleWith = (elements, nextIntBounded) => {
27424
28346
  for (let i = buffer.length;i >= 2; i = i - 1) {
27425
28347
  numbers.push(i);
27426
28348
  }
27427
- return pipe(numbers, forEachSequentialDiscard((n) => pipe(nextIntBounded(n), map11((k) => swap(buffer, n - 1, k)))), as(fromIterable2(buffer)));
28349
+ return pipe(numbers, forEachSequentialDiscard((n2) => pipe(nextIntBounded(n2), map11((k) => swap(buffer, n2 - 1, k)))), as(fromIterable2(buffer)));
27428
28350
  })));
27429
28351
  };
27430
28352
  var swap = (buffer, index1, index2) => {
@@ -28758,8 +29680,8 @@ var promise = (evaluate2) => evaluate2.length >= 1 ? async_((resolve, signal) =>
28758
29680
  });
28759
29681
  var provideService = /* @__PURE__ */ dual(3, (self2, tag, service) => contextWithEffect((env) => provideContext(self2, add2(env, tag, service))));
28760
29682
  var provideServiceEffect = /* @__PURE__ */ dual(3, (self2, tag, effect) => contextWithEffect((env) => flatMap7(effect, (service) => provideContext(self2, pipe(env, add2(tag, service))))));
28761
- var repeatN = /* @__PURE__ */ dual(2, (self2, n) => suspend(() => repeatNLoop(self2, n)));
28762
- var repeatNLoop = (self2, n) => flatMap7(self2, (a) => n <= 0 ? succeed(a) : zipRight(yieldNow(), repeatNLoop(self2, n - 1)));
29683
+ var repeatN = /* @__PURE__ */ dual(2, (self2, n2) => suspend(() => repeatNLoop(self2, n2)));
29684
+ var repeatNLoop = (self2, n2) => flatMap7(self2, (a) => n2 <= 0 ? succeed(a) : zipRight(yieldNow(), repeatNLoop(self2, n2 - 1)));
28763
29685
  var sleep3 = sleep2;
28764
29686
  var succeedNone = /* @__PURE__ */ succeed(/* @__PURE__ */ none2());
28765
29687
  var summarized = /* @__PURE__ */ dual(3, (self2, summary, f) => flatMap7(summary, (start) => flatMap7(self2, (value) => map11(summary, (end) => [f(start, end), value]))));
@@ -29719,8 +30641,8 @@ var histogram4 = (key) => {
29719
30641
  let sum2 = 0;
29720
30642
  let min2 = Number.MAX_VALUE;
29721
30643
  let max2 = Number.MIN_VALUE;
29722
- pipe(bounds, sort(Order), map4((n, i) => {
29723
- boundaries[i] = n;
30644
+ pipe(bounds, sort(Order), map4((n2, i) => {
30645
+ boundaries[i] = n2;
29724
30646
  }));
29725
30647
  const update4 = (value) => {
29726
30648
  let from = 0;
@@ -29873,7 +30795,7 @@ var resolveQuantile = (error, sampleCount, current, consumed, quantile, rest) =>
29873
30795
  };
29874
30796
  }
29875
30797
  const headValue = headNonEmpty(rest_1);
29876
- const sameHead = span(rest_1, (n) => n === headValue);
30798
+ const sameHead = span(rest_1, (n2) => n2 === headValue);
29877
30799
  const desired = quantile_1 * sampleCount_1;
29878
30800
  const allowedError = error_1 / 2 * desired;
29879
30801
  const candConsumed = consumed_1 + sameHead[0].length;
@@ -31318,9 +32240,9 @@ var all3 = (arg, options) => {
31318
32240
  var forEach4 = /* @__PURE__ */ dual((args2) => isIterable(args2[0]), (self2, f, options) => withFiberRuntime((r) => {
31319
32241
  const isRequestBatchingEnabled = options?.batching === true || options?.batching === "inherit" && r.getFiberRef(currentRequestBatching);
31320
32242
  if (options?.discard) {
31321
- return match7(options.concurrency, () => finalizersMaskInternal(sequential3, options?.concurrentFinalizers)((restore) => isRequestBatchingEnabled ? forEachConcurrentDiscard(self2, (a, i) => restore(f(a, i)), true, false, 1) : forEachSequentialDiscard(self2, (a, i) => restore(f(a, i)))), () => finalizersMaskInternal(parallel3, options?.concurrentFinalizers)((restore) => forEachConcurrentDiscard(self2, (a, i) => restore(f(a, i)), isRequestBatchingEnabled, false)), (n) => finalizersMaskInternal(parallelN2(n), options?.concurrentFinalizers)((restore) => forEachConcurrentDiscard(self2, (a, i) => restore(f(a, i)), isRequestBatchingEnabled, false, n)));
32243
+ return match7(options.concurrency, () => finalizersMaskInternal(sequential3, options?.concurrentFinalizers)((restore) => isRequestBatchingEnabled ? forEachConcurrentDiscard(self2, (a, i) => restore(f(a, i)), true, false, 1) : forEachSequentialDiscard(self2, (a, i) => restore(f(a, i)))), () => finalizersMaskInternal(parallel3, options?.concurrentFinalizers)((restore) => forEachConcurrentDiscard(self2, (a, i) => restore(f(a, i)), isRequestBatchingEnabled, false)), (n2) => finalizersMaskInternal(parallelN2(n2), options?.concurrentFinalizers)((restore) => forEachConcurrentDiscard(self2, (a, i) => restore(f(a, i)), isRequestBatchingEnabled, false, n2)));
31322
32244
  }
31323
- return match7(options?.concurrency, () => finalizersMaskInternal(sequential3, options?.concurrentFinalizers)((restore) => isRequestBatchingEnabled ? forEachParN(self2, 1, (a, i) => restore(f(a, i)), true) : forEachSequential(self2, (a, i) => restore(f(a, i)))), () => finalizersMaskInternal(parallel3, options?.concurrentFinalizers)((restore) => forEachParUnbounded(self2, (a, i) => restore(f(a, i)), isRequestBatchingEnabled)), (n) => finalizersMaskInternal(parallelN2(n), options?.concurrentFinalizers)((restore) => forEachParN(self2, n, (a, i) => restore(f(a, i)), isRequestBatchingEnabled)));
32245
+ return match7(options?.concurrency, () => finalizersMaskInternal(sequential3, options?.concurrentFinalizers)((restore) => isRequestBatchingEnabled ? forEachParN(self2, 1, (a, i) => restore(f(a, i)), true) : forEachSequential(self2, (a, i) => restore(f(a, i)))), () => finalizersMaskInternal(parallel3, options?.concurrentFinalizers)((restore) => forEachParUnbounded(self2, (a, i) => restore(f(a, i)), isRequestBatchingEnabled)), (n2) => finalizersMaskInternal(parallelN2(n2), options?.concurrentFinalizers)((restore) => forEachParN(self2, n2, (a, i) => restore(f(a, i)), isRequestBatchingEnabled)));
31324
32246
  }));
31325
32247
  var forEachParUnbounded = (self2, f, batching) => suspend(() => {
31326
32248
  const as2 = fromIterable(self2);
@@ -31328,7 +32250,7 @@ var forEachParUnbounded = (self2, f, batching) => suspend(() => {
31328
32250
  const fn = (a, i) => flatMap7(f(a, i), (b) => sync(() => array3[i] = b));
31329
32251
  return zipRight(forEachConcurrentDiscard(as2, fn, batching, false), succeed(array3));
31330
32252
  });
31331
- var forEachConcurrentDiscard = (self2, f, batching, processAll, n) => uninterruptibleMask((restore) => transplant((graft) => withFiberRuntime((parent) => {
32253
+ var forEachConcurrentDiscard = (self2, f, batching, processAll, n2) => uninterruptibleMask((restore) => transplant((graft) => withFiberRuntime((parent) => {
31332
32254
  let todos = Array.from(self2).reverse();
31333
32255
  let target = todos.length;
31334
32256
  if (target === 0) {
@@ -31336,7 +32258,7 @@ var forEachConcurrentDiscard = (self2, f, batching, processAll, n) => uninterrup
31336
32258
  }
31337
32259
  let counter6 = 0;
31338
32260
  let interrupted = false;
31339
- const fibersCount = n ? Math.min(todos.length, n) : todos.length;
32261
+ const fibersCount = n2 ? Math.min(todos.length, n2) : todos.length;
31340
32262
  const fibers = new Set;
31341
32263
  const results = new Array;
31342
32264
  const interruptAll = () => fibers.forEach((fiber) => {
@@ -31438,7 +32360,7 @@ var forEachConcurrentDiscard = (self2, f, batching, processAll, n) => uninterrup
31438
32360
  const requests = residual.map((blocked2) => blocked2.effect_instruction_i0).reduce(par);
31439
32361
  resume2(succeed(blocked(requests, forEachConcurrentDiscard([getOrElse(exitCollectAll(exits, {
31440
32362
  parallel: true
31441
- }), () => exitVoid), ...residual.map((blocked2) => blocked2.effect_instruction_i1)], (i) => i, batching, true, n))));
32363
+ }), () => exitVoid), ...residual.map((blocked2) => blocked2.effect_instruction_i1)], (i) => i, batching, true, n2))));
31442
32364
  } else {
31443
32365
  next();
31444
32366
  }
@@ -31453,7 +32375,7 @@ var forEachConcurrentDiscard = (self2, f, batching, processAll, n) => uninterrup
31453
32375
  onFailure: (cause) => {
31454
32376
  onInterruptSignal();
31455
32377
  const target2 = residual.length + 1;
31456
- const concurrency = Math.min(typeof n === "number" ? n : residual.length, residual.length);
32378
+ const concurrency = Math.min(typeof n2 === "number" ? n2 : residual.length, residual.length);
31457
32379
  const toPop = Array.from(residual);
31458
32380
  return async_((cb) => {
31459
32381
  const exits = [];
@@ -31483,11 +32405,11 @@ var forEachConcurrentDiscard = (self2, f, batching, processAll, n) => uninterrup
31483
32405
  onSuccess: () => forEachSequential(joinOrder, (f2) => f2.inheritAll)
31484
32406
  })));
31485
32407
  })));
31486
- var forEachParN = (self2, n, f, batching) => suspend(() => {
32408
+ var forEachParN = (self2, n2, f, batching) => suspend(() => {
31487
32409
  const as2 = fromIterable(self2);
31488
32410
  const array3 = new Array(as2.length);
31489
32411
  const fn = (a, i) => map11(f(a, i), (b) => array3[i] = b);
31490
- return zipRight(forEachConcurrentDiscard(as2, fn, batching, false, n), succeed(array3));
32412
+ return zipRight(forEachConcurrentDiscard(as2, fn, batching, false, n2), succeed(array3));
31491
32413
  });
31492
32414
  var forkDaemon = (self2) => forkWithScopeOverride(self2, globalScope);
31493
32415
  var unsafeFork = (effect, parentFiber, parentRuntimeFlags, overrideScope = null) => {
@@ -31720,7 +32642,7 @@ var ensuring = /* @__PURE__ */ dual(2, (self2, finalizer) => uninterruptibleMask
31720
32642
  }),
31721
32643
  onSuccess: (a) => as(finalizer, a)
31722
32644
  })));
31723
- var invokeWithInterrupt = (self2, entries2, onInterrupt2) => fiberIdWith((id) => flatMap7(flatMap7(forkDaemon(interruptible2(self2)), (processing) => async_((cb) => {
32645
+ var invokeWithInterrupt = (self2, entries2, onInterrupt2) => fiberIdWith((id2) => flatMap7(flatMap7(forkDaemon(interruptible2(self2)), (processing) => async_((cb) => {
31724
32646
  const counts = entries2.map((_) => _.listeners.count);
31725
32647
  const checkDone = () => {
31726
32648
  if (counts.every((count) => count === 0)) {
@@ -31762,7 +32684,7 @@ var invokeWithInterrupt = (self2, entries2, onInterrupt2) => fiberIdWith((id) =>
31762
32684
  }
31763
32685
  return [];
31764
32686
  });
31765
- return forEachSequentialDiscard(residual, (entry) => complete(entry.request, exitInterrupt(id)));
32687
+ return forEachSequentialDiscard(residual, (entry) => complete(entry.request, exitInterrupt(id2)));
31766
32688
  })));
31767
32689
  var makeSpanScoped = (name, options) => {
31768
32690
  options = addSpanStackTrace(options);
@@ -31950,23 +32872,23 @@ class Semaphore {
31950
32872
  get free() {
31951
32873
  return this.permits - this.taken;
31952
32874
  }
31953
- take = (n) => asyncInterrupt((resume2) => {
31954
- if (this.free < n) {
32875
+ take = (n2) => asyncInterrupt((resume2) => {
32876
+ if (this.free < n2) {
31955
32877
  const observer = () => {
31956
- if (this.free < n) {
32878
+ if (this.free < n2) {
31957
32879
  return;
31958
32880
  }
31959
32881
  this.waiters.delete(observer);
31960
- this.taken += n;
31961
- resume2(succeed(n));
32882
+ this.taken += n2;
32883
+ resume2(succeed(n2));
31962
32884
  };
31963
32885
  this.waiters.add(observer);
31964
32886
  return sync(() => {
31965
32887
  this.waiters.delete(observer);
31966
32888
  });
31967
32889
  }
31968
- this.taken += n;
31969
- return resume2(succeed(n));
32890
+ this.taken += n2;
32891
+ return resume2(succeed(n2));
31970
32892
  });
31971
32893
  updateTakenUnsafe(fiber, f) {
31972
32894
  this.taken = f(this.taken);
@@ -31992,15 +32914,15 @@ class Semaphore {
31992
32914
  }
31993
32915
  return this.updateTakenUnsafe(fiber, (taken) => taken);
31994
32916
  }));
31995
- release = (n) => this.updateTaken((taken) => taken - n);
32917
+ release = (n2) => this.updateTaken((taken) => taken - n2);
31996
32918
  releaseAll = /* @__PURE__ */ this.updateTaken((_) => 0);
31997
- withPermits = (n) => (self2) => uninterruptibleMask((restore) => flatMap7(restore(this.take(n)), (permits) => ensuring(restore(self2), this.release(permits))));
31998
- withPermitsIfAvailable = (n) => (self2) => uninterruptibleMask((restore) => suspend(() => {
31999
- if (this.free < n) {
32919
+ withPermits = (n2) => (self2) => uninterruptibleMask((restore) => flatMap7(restore(this.take(n2)), (permits) => ensuring(restore(self2), this.release(permits))));
32920
+ withPermitsIfAvailable = (n2) => (self2) => uninterruptibleMask((restore) => suspend(() => {
32921
+ if (this.free < n2) {
32000
32922
  return succeedNone;
32001
32923
  }
32002
- this.taken += n;
32003
- return ensuring(restore(asSome(self2)), this.release(n));
32924
+ this.taken += n2;
32925
+ return ensuring(restore(asSome(self2)), this.release(n2));
32004
32926
  }));
32005
32927
  }
32006
32928
  var unsafeMakeSemaphore = (permits) => new Semaphore(permits);
@@ -32213,7 +33135,7 @@ var unsafeFork2 = /* @__PURE__ */ makeDual((runtime3, self2, options) => {
32213
33135
  const fiberRuntime = new FiberRuntime(fiberId2, fiberRefs3, runtime3.runtimeFlags);
32214
33136
  let effect = self2;
32215
33137
  if (options?.scope) {
32216
- effect = flatMap7(fork(options.scope, sequential2), (closeableScope) => zipRight(scopeAddFinalizer(closeableScope, fiberIdWith((id2) => equals(id2, fiberRuntime.id()) ? void_ : interruptAsFiber(fiberRuntime, id2))), onExit(self2, (exit2) => close(closeableScope, exit2))));
33138
+ effect = flatMap7(fork(options.scope, sequential2), (closeableScope) => zipRight(scopeAddFinalizer(closeableScope, fiberIdWith((id3) => equals(id3, fiberRuntime.id()) ? void_ : interruptAsFiber(fiberRuntime, id3))), onExit(self2, (exit2) => close(closeableScope, exit2))));
32217
33139
  }
32218
33140
  const supervisor = fiberRuntime.currentSupervisor;
32219
33141
  if (supervisor !== none7) {
@@ -32444,13 +33366,13 @@ class MemoMapImpl {
32444
33366
  return pipe(deferredFailCause(deferred, exit2.effect_instruction_i0), zipRight(scopeClose(innerScope, exit2)), zipRight(failCause(exit2.effect_instruction_i0)));
32445
33367
  }
32446
33368
  case OP_SUCCESS: {
32447
- return pipe(set4(finalizerRef, (exit3) => pipe(scopeClose(innerScope, exit3), whenEffect(modify3(observers, (n) => [n === 1, n - 1])), asVoid)), zipRight(update2(observers, (n) => n + 1)), zipRight(scopeAddFinalizerExit(scope2, (exit3) => pipe(sync(() => map15.delete(layer)), zipRight(get10(finalizerRef)), flatMap7((finalizer) => finalizer(exit3))))), zipRight(deferredSucceed(deferred, exit2.effect_instruction_i0)), as(exit2.effect_instruction_i0[1]));
33369
+ return pipe(set4(finalizerRef, (exit3) => pipe(scopeClose(innerScope, exit3), whenEffect(modify3(observers, (n2) => [n2 === 1, n2 - 1])), asVoid)), zipRight(update2(observers, (n2) => n2 + 1)), zipRight(scopeAddFinalizerExit(scope2, (exit3) => pipe(sync(() => map15.delete(layer)), zipRight(get10(finalizerRef)), flatMap7((finalizer) => finalizer(exit3))))), zipRight(deferredSucceed(deferred, exit2.effect_instruction_i0)), as(exit2.effect_instruction_i0[1]));
32448
33370
  }
32449
33371
  }
32450
33372
  })))));
32451
33373
  const memoized = [pipe(deferredAwait(deferred), onExit(exitMatchEffect({
32452
33374
  onFailure: () => void_,
32453
- onSuccess: () => update2(observers, (n) => n + 1)
33375
+ onSuccess: () => update2(observers, (n2) => n2 + 1)
32454
33376
  }))), (exit2) => pipe(get10(finalizerRef), flatMap7((finalizer) => finalizer(exit2)))];
32455
33377
  return [resource, isFresh(layer) ? map15 : map15.set(layer, memoized)];
32456
33378
  }))))));
@@ -32914,7 +33836,7 @@ var modifyDelayEffect = /* @__PURE__ */ dual(2, (self2, f) => makeWithState(self
32914
33836
  });
32915
33837
  })));
32916
33838
  var passthrough = (self2) => makeWithState(self2.initial, (now, input, state) => pipe(self2.step(now, input, state), map11(([state2, _, decision]) => [state2, input, decision])));
32917
- var recurs = (n) => whileOutput(forever2, (out) => out < n);
33839
+ var recurs = (n2) => whileOutput(forever2, (out) => out < n2);
32918
33840
  var spaced = (duration) => addDelay(forever2, () => duration);
32919
33841
  var unfold2 = (initial, f) => makeWithState(initial, (now, _, state) => sync(() => [f(state), state, continueWith2(after2(now))]));
32920
33842
  var untilInputEffect = /* @__PURE__ */ dual(2, (self2, f) => checkEffect(self2, (input, _) => negate(f(input))));
@@ -33003,7 +33925,7 @@ var retryOrElse_EffectLoop = (self2, driver2, orElse4) => {
33003
33925
  onSuccess: () => retryOrElse_EffectLoop(self2, driver2, orElse4)
33004
33926
  }));
33005
33927
  };
33006
- var forever2 = /* @__PURE__ */ unfold2(0, (n) => n + 1);
33928
+ var forever2 = /* @__PURE__ */ unfold2(0, (n2) => n2 + 1);
33007
33929
 
33008
33930
  // ../../node_modules/.bun/effect@3.19.15/node_modules/effect/dist/esm/Deferred.js
33009
33931
  var DeferredTypeId2 = DeferredTypeId;
@@ -33192,10 +34114,10 @@ var poll2 = /* @__PURE__ */ dual(2, (self2, def) => {
33192
34114
  }
33193
34115
  return shift(self2.queue);
33194
34116
  });
33195
- var pollUpTo = /* @__PURE__ */ dual(2, (self2, n) => {
34117
+ var pollUpTo = /* @__PURE__ */ dual(2, (self2, n2) => {
33196
34118
  let result = empty6();
33197
34119
  let count2 = 0;
33198
- while (count2 < n) {
34120
+ while (count2 < n2) {
33199
34121
  const element = poll2(EmptyMutableQueue)(self2);
33200
34122
  if (element === EmptyMutableQueue) {
33201
34123
  break;
@@ -33355,7 +34277,7 @@ var makeTagProxy = (TagClass) => {
33355
34277
  };
33356
34278
  var Service = function() {
33357
34279
  return function() {
33358
- const [id2, maker] = arguments;
34280
+ const [id3, maker] = arguments;
33359
34281
  const proxy = "accessors" in maker ? maker["accessors"] : false;
33360
34282
  const limit = Error.stackTraceLimit;
33361
34283
  Error.stackTraceLimit = 2;
@@ -33380,7 +34302,7 @@ var Service = function() {
33380
34302
  return service;
33381
34303
  }
33382
34304
  };
33383
- TagClass.prototype._tag = id2;
34305
+ TagClass.prototype._tag = id3;
33384
34306
  Object.defineProperty(TagClass, "make", {
33385
34307
  get() {
33386
34308
  return (service) => new this(service);
@@ -33391,7 +34313,7 @@ var Service = function() {
33391
34313
  return (body) => andThen2(this, body);
33392
34314
  }
33393
34315
  });
33394
- TagClass.key = id2;
34316
+ TagClass.key = id3;
33395
34317
  Object.assign(TagClass, TagProto);
33396
34318
  Object.defineProperty(TagClass, "stack", {
33397
34319
  get() {
@@ -34439,12 +35361,12 @@ var record = (key, value) => {
34439
35361
  };
34440
35362
  var pickAnnotations = (annotationIds) => (annotated) => {
34441
35363
  let out = undefined;
34442
- for (const id2 of annotationIds) {
34443
- if (Object.prototype.hasOwnProperty.call(annotated.annotations, id2)) {
35364
+ for (const id3 of annotationIds) {
35365
+ if (Object.prototype.hasOwnProperty.call(annotated.annotations, id3)) {
34444
35366
  if (out === undefined) {
34445
35367
  out = {};
34446
35368
  }
34447
- out[id2] = annotated.annotations[id2];
35369
+ out[id3] = annotated.annotations[id3];
34448
35370
  }
34449
35371
  }
34450
35372
  return out;
@@ -34453,8 +35375,8 @@ var omitAnnotations = (annotationIds) => (annotated) => {
34453
35375
  const out = {
34454
35376
  ...annotated.annotations
34455
35377
  };
34456
- for (const id2 of annotationIds) {
34457
- delete out[id2];
35378
+ for (const id3 of annotationIds) {
35379
+ delete out[id3];
34458
35380
  }
34459
35381
  return out;
34460
35382
  };
@@ -37109,7 +38031,7 @@ class ChannelExecutor {
37109
38031
  const activeChild = subexecutor.activeChildExecutors[0];
37110
38032
  const rest = subexecutor.activeChildExecutors.slice(1);
37111
38033
  if (activeChild === undefined) {
37112
- const [emitSeparator, remainingExecutors] = this.applyUpstreamPullStrategy(true, rest, subexecutor.onPull(NoUpstream(rest.reduce((n, curr) => curr !== undefined ? n + 1 : n, 0))));
38034
+ const [emitSeparator, remainingExecutors] = this.applyUpstreamPullStrategy(true, rest, subexecutor.onPull(NoUpstream(rest.reduce((n2, curr) => curr !== undefined ? n2 + 1 : n2, 0))));
37113
38035
  this.replaceSubexecutor(new DrainChildExecutors(subexecutor.upstreamExecutor, subexecutor.lastDone, remainingExecutors, subexecutor.upstreamDone, subexecutor.combineChildResults, subexecutor.combineWithChildResult, subexecutor.onPull));
37114
38036
  if (isSome2(emitSeparator)) {
37115
38037
  this._emitted = emitSeparator.value;
@@ -38226,7 +39148,7 @@ var fail13 = (error3) => fromEffectOption(fail8(some2(error3)));
38226
39148
  var flatMap14 = /* @__PURE__ */ dual((args2) => isStream(args2[0]), (self2, f, options) => {
38227
39149
  const bufferSize = options?.bufferSize ?? 16;
38228
39150
  if (options?.switch) {
38229
- return matchConcurrency(options?.concurrency, () => flatMapParSwitchBuffer(self2, 1, bufferSize, f), (n) => flatMapParSwitchBuffer(self2, n, bufferSize, f));
39151
+ return matchConcurrency(options?.concurrency, () => flatMapParSwitchBuffer(self2, 1, bufferSize, f), (n2) => flatMapParSwitchBuffer(self2, n2, bufferSize, f));
38230
39152
  }
38231
39153
  return matchConcurrency(options?.concurrency, () => new StreamImpl(concatMap(toChannel2(self2), (as6) => pipe(as6, map5((a) => toChannel2(f(a))), reduce2(void_5, (left3, right3) => pipe(left3, zipRight4(right3)))))), (_) => new StreamImpl(pipe(toChannel2(self2), concatMap(writeChunk), mergeMap((out) => toChannel2(f(out)), options))));
38232
39154
  });
@@ -38240,8 +39162,8 @@ var matchConcurrency = (concurrency, sequential5, bounded4) => {
38240
39162
  return concurrency > 1 ? bounded4(concurrency) : sequential5();
38241
39163
  }
38242
39164
  };
38243
- var flatMapParSwitchBuffer = /* @__PURE__ */ dual(4, (self2, n, bufferSize, f) => new StreamImpl(pipe(toChannel2(self2), concatMap(writeChunk), mergeMap((out) => toChannel2(f(out)), {
38244
- concurrency: n,
39165
+ var flatMapParSwitchBuffer = /* @__PURE__ */ dual(4, (self2, n2, bufferSize, f) => new StreamImpl(pipe(toChannel2(self2), concatMap(writeChunk), mergeMap((out) => toChannel2(f(out)), {
39166
+ concurrency: n2,
38245
39167
  mergeStrategy: BufferSliding(),
38246
39168
  bufferSize
38247
39169
  }))));
@@ -38645,8 +39567,8 @@ var toASTAnnotations = (annotations2) => {
38645
39567
  };
38646
39568
  for (const key in builtInAnnotations) {
38647
39569
  if (key in annotations2) {
38648
- const id2 = builtInAnnotations[key];
38649
- out[id2] = annotations2[key];
39570
+ const id3 = builtInAnnotations[key];
39571
+ out[id3] = annotations2[key];
38650
39572
  delete out[key];
38651
39573
  }
38652
39574
  }
@@ -39848,13 +40770,13 @@ class SystemError extends (/* @__PURE__ */ TaggedError2("@effect/platform/Error/
39848
40770
  // ../../node_modules/.bun/@effect+platform@0.94.2+f436dcc95e9291b3/node_modules/@effect/platform/dist/esm/internal/fileSystem.js
39849
40771
  var tag = /* @__PURE__ */ GenericTag("@effect/platform/FileSystem");
39850
40772
  var Size = (bytes) => typeof bytes === "bigint" ? bytes : BigInt(bytes);
39851
- var KiB = (n) => Size(n * 1024);
39852
- var MiB = (n) => Size(n * 1024 * 1024);
39853
- var GiB = (n) => Size(n * 1024 * 1024 * 1024);
39854
- var TiB = (n) => Size(n * 1024 * 1024 * 1024 * 1024);
40773
+ var KiB = (n2) => Size(n2 * 1024);
40774
+ var MiB = (n2) => Size(n2 * 1024 * 1024);
40775
+ var GiB = (n2) => Size(n2 * 1024 * 1024 * 1024);
40776
+ var TiB = (n2) => Size(n2 * 1024 * 1024 * 1024 * 1024);
39855
40777
  var bigint1024 = /* @__PURE__ */ BigInt(1024);
39856
40778
  var bigintPiB = bigint1024 * bigint1024 * bigint1024 * bigint1024 * bigint1024;
39857
- var PiB = (n) => Size(BigInt(n) * bigintPiB);
40779
+ var PiB = (n2) => Size(BigInt(n2) * bigintPiB);
39858
40780
  var make49 = (impl) => {
39859
40781
  return tag.of({
39860
40782
  ...impl,
@@ -40114,8 +41036,8 @@ function reduce12(b, f) {
40114
41036
  return iterable.reduce(f, b);
40115
41037
  }
40116
41038
  let result = b;
40117
- for (const n of iterable) {
40118
- result = f(result, n);
41039
+ for (const n2 of iterable) {
41040
+ result = f(result, n2);
40119
41041
  }
40120
41042
  return result;
40121
41043
  };
@@ -40126,8 +41048,8 @@ function map23(f) {
40126
41048
  return iterable.map(f);
40127
41049
  }
40128
41050
  return function* () {
40129
- for (const n of iterable) {
40130
- yield f(n);
41051
+ for (const n2 of iterable) {
41052
+ yield f(n2);
40131
41053
  }
40132
41054
  }();
40133
41055
  };
@@ -40817,18 +41739,18 @@ var annotate = /* @__PURE__ */ dual(2, (self2, annotation) => {
40817
41739
  op.annotation = annotation;
40818
41740
  return op;
40819
41741
  });
40820
- var spaces = (n) => {
40821
- if (n <= 0) {
41742
+ var spaces = (n2) => {
41743
+ if (n2 <= 0) {
40822
41744
  return empty31;
40823
41745
  }
40824
- if (n === 1) {
41746
+ if (n2 === 1) {
40825
41747
  return char(" ");
40826
41748
  }
40827
- return text(textSpaces(n));
41749
+ return text(textSpaces(n2));
40828
41750
  };
40829
- var textSpaces = (n) => {
41751
+ var textSpaces = (n2) => {
40830
41752
  let s = "";
40831
- for (let i = 0;i < n; i++) {
41753
+ for (let i = 0;i < n2; i++) {
40832
41754
  s = s += " ";
40833
41755
  }
40834
41756
  return s;
@@ -42558,10 +43480,10 @@ function fromFileUrl(url2) {
42558
43480
  }));
42559
43481
  }
42560
43482
  const pathname = url2.pathname;
42561
- for (let n = 0;n < pathname.length; n++) {
42562
- if (pathname[n] === "%") {
42563
- const third = pathname.codePointAt(n + 2) | 32;
42564
- if (pathname[n + 1] === "2" && third === 102) {
43483
+ for (let n2 = 0;n2 < pathname.length; n2++) {
43484
+ if (pathname[n2] === "%") {
43485
+ const third = pathname.codePointAt(n2 + 2) | 32;
43486
+ if (pathname[n2 + 1] === "2" && third === 102) {
42565
43487
  return fail8(new BadArgument({
42566
43488
  module: "Path",
42567
43489
  method: "fromFileUrl",
@@ -43456,7 +44378,7 @@ function handleProcessInteger(options3) {
43456
44378
  error: some2("Must provide an integer value")
43457
44379
  }
43458
44380
  })),
43459
- onSuccess: (n) => match12(options3.validate(n), {
44381
+ onSuccess: (n2) => match12(options3.validate(n2), {
43460
44382
  onFailure: (error4) => Action.NextFrame({
43461
44383
  state: {
43462
44384
  ...state,
@@ -43482,14 +44404,14 @@ var integer2 = (options3) => {
43482
44404
  max: Number.POSITIVE_INFINITY,
43483
44405
  incrementBy: 1,
43484
44406
  decrementBy: 1,
43485
- validate: (n) => {
43486
- if (n < opts.min) {
43487
- return fail8(`${n} must be greater than or equal to ${opts.min}`);
44407
+ validate: (n2) => {
44408
+ if (n2 < opts.min) {
44409
+ return fail8(`${n2} must be greater than or equal to ${opts.min}`);
43488
44410
  }
43489
- if (n > opts.max) {
43490
- return fail8(`${n} must be less than or equal to ${opts.max}`);
44411
+ if (n2 > opts.max) {
44412
+ return fail8(`${n2} must be less than or equal to ${opts.max}`);
43491
44413
  }
43492
- return succeed7(n);
44414
+ return succeed7(n2);
43493
44415
  },
43494
44416
  ...options3
43495
44417
  };
@@ -43545,7 +44467,7 @@ function handleProcessFloat(options3) {
43545
44467
  error: some2("Must provide a floating point value")
43546
44468
  }
43547
44469
  })),
43548
- onSuccess: (n) => flatMap10(sync3(() => round(n, options3.precision)), (rounded) => match12(options3.validate(rounded), {
44470
+ onSuccess: (n2) => flatMap10(sync3(() => round(n2, options3.precision)), (rounded) => match12(options3.validate(rounded), {
43549
44471
  onFailure: (error4) => Action.NextFrame({
43550
44472
  state: {
43551
44473
  ...state,
@@ -43572,14 +44494,14 @@ var float = (options3) => {
43572
44494
  incrementBy: 1,
43573
44495
  decrementBy: 1,
43574
44496
  precision: 2,
43575
- validate: (n) => {
43576
- if (n < opts.min) {
43577
- return fail8(`${n} must be greater than or equal to ${opts.min}`);
44497
+ validate: (n2) => {
44498
+ if (n2 < opts.min) {
44499
+ return fail8(`${n2} must be greater than or equal to ${opts.min}`);
43578
44500
  }
43579
- if (n > opts.max) {
43580
- return fail8(`${n} must be less than or equal to ${opts.max}`);
44501
+ if (n2 > opts.max) {
44502
+ return fail8(`${n2} must be less than or equal to ${opts.max}`);
43581
44503
  }
43582
- return succeed7(n);
44504
+ return succeed7(n2);
43583
44505
  },
43584
44506
  ...options3
43585
44507
  };
@@ -44408,7 +45330,7 @@ var validateInternal = (self2, value6, config2) => {
44408
45330
  }
44409
45331
  }
44410
45332
  };
44411
- var attempt = (option5, typeName, parse5) => orElseFail2(option5, () => `${typeName} options do not have a default value`).pipe(flatMap10((value6) => orElseFail2(parse5(value6), () => `'${value6}' is not a ${typeName}`)));
45333
+ var attempt = (option5, typeName2, parse5) => orElseFail2(option5, () => `${typeName2} options do not have a default value`).pipe(flatMap10((value6) => orElseFail2(parse5(value6), () => `'${value6}' is not a ${typeName2}`)));
44412
45334
  var validatePathExistence = (path2, shouldPathExist, pathExists) => {
44413
45335
  if (shouldPathExist === "no" && pathExists) {
44414
45336
  return fail8(`Path '${path2}' must not exist`);
@@ -44701,13 +45623,13 @@ var render4 = (self2, config2) => {
44701
45623
  return of(text4("<command>"));
44702
45624
  }
44703
45625
  case "Named": {
44704
- const typeInfo = config2.showTypes ? match2(self2.acceptedValues, {
45626
+ const typeInfo2 = config2.showTypes ? match2(self2.acceptedValues, {
44705
45627
  onNone: () => empty34,
44706
45628
  onSome: (s) => concat3(space3, text4(s))
44707
45629
  }) : empty34;
44708
45630
  const namesToShow = config2.showAllNames ? self2.names : self2.names.length > 1 ? pipe(filter3(self2.names, (name) => name.startsWith("--")), head, map2(of), getOrElse(() => self2.names)) : self2.names;
44709
45631
  const nameInfo = text4(join(namesToShow, ", "));
44710
- return config2.showAllNames && self2.names.length > 1 ? of(spans([text4("("), nameInfo, typeInfo, text4(")")])) : of(concat3(nameInfo, typeInfo));
45632
+ return config2.showAllNames && self2.names.length > 1 ? of(spans([text4("("), nameInfo, typeInfo2, text4(")")])) : of(concat3(nameInfo, typeInfo2));
44711
45633
  }
44712
45634
  case "Optional": {
44713
45635
  return map4(render4(self2.usage, config2), (span2) => spans([text4("["), span2, text4("]")]));
@@ -45211,7 +46133,7 @@ var wizardInternal2 = (self2, config2) => {
45211
46133
  message: toAnsiText(message).trimEnd(),
45212
46134
  min: getMinSizeInternal(self2),
45213
46135
  max: getMaxSizeInternal(self2)
45214
- }).pipe(zipLeft2(log2()), flatMap10((n) => n <= 0 ? succeed7(empty3()) : make25(empty3()).pipe(flatMap10((ref) => wizardInternal2(self2.args, config2).pipe(flatMap10((args2) => update3(ref, appendAll(args2))), repeatN2(n - 1), zipRight3(get11(ref)), tap2((args2) => validateInternal2(self2, args2, config2)))))));
46136
+ }).pipe(zipLeft2(log2()), flatMap10((n2) => n2 <= 0 ? succeed7(empty3()) : make25(empty3()).pipe(flatMap10((ref) => wizardInternal2(self2.args, config2).pipe(flatMap10((args2) => update3(ref, appendAll(args2))), repeatN2(n2 - 1), zipRight3(get11(ref)), tap2((args2) => validateInternal2(self2, args2, config2)))))));
45215
46137
  }
45216
46138
  case "WithDefault": {
45217
46139
  const defaultHelp = p(`This argument is optional - use the default?`);
@@ -46066,7 +46988,7 @@ var wizardInternal3 = (self2, config2) => {
46066
46988
  message: toAnsiText(message).trimEnd(),
46067
46989
  min: getMinSizeInternal2(self2),
46068
46990
  max: getMaxSizeInternal2(self2)
46069
- }).pipe(flatMap10((n) => n <= 0 ? succeed7(empty3()) : make25(empty3()).pipe(flatMap10((ref) => wizardInternal3(self2.argumentOption, config2).pipe(flatMap10((args2) => update3(ref, appendAll(args2))), repeatN2(n - 1), zipRight3(get11(ref)))))));
46991
+ }).pipe(flatMap10((n2) => n2 <= 0 ? succeed7(empty3()) : make25(empty3()).pipe(flatMap10((ref) => wizardInternal3(self2.argumentOption, config2).pipe(flatMap10((args2) => update3(ref, appendAll(args2))), repeatN2(n2 - 1), zipRight3(get11(ref)))))));
46070
46992
  }
46071
46993
  case "WithDefault": {
46072
46994
  if (isBoolInternal(self2.options)) {
@@ -46855,7 +47777,7 @@ var withSubcommands = /* @__PURE__ */ dual(2, (self2, subcommands) => {
46855
47777
  const op = Object.create(proto23);
46856
47778
  op._tag = "Subcommands";
46857
47779
  op.parent = self2;
46858
- op.children = map4(subcommands, ([id2, command]) => map33(command, (a) => [id2, a]));
47780
+ op.children = map4(subcommands, ([id3, command]) => map33(command, (a) => [id3, a]));
46859
47781
  return op;
46860
47782
  });
46861
47783
  var wizard6 = /* @__PURE__ */ dual(3, (self2, prefix, config2) => wizardInternal4(self2, prefix, config2));
@@ -49328,25 +50250,25 @@ class MailboxImpl extends Class2 {
49328
50250
  }
49329
50251
  return succeed([messages, this.releaseCapacity()]);
49330
50252
  });
49331
- takeN(n) {
50253
+ takeN(n2) {
49332
50254
  return suspend(() => {
49333
50255
  if (this.state._tag === "Done") {
49334
50256
  return exitAs(this.state.exit, constDone);
49335
- } else if (n <= 0) {
50257
+ } else if (n2 <= 0) {
49336
50258
  return succeed([empty41, false]);
49337
50259
  }
49338
- n = Math.min(n, this.capacity);
50260
+ n2 = Math.min(n2, this.capacity);
49339
50261
  let messages;
49340
- if (n <= this.messagesChunk.length) {
49341
- messages = take2(this.messagesChunk, n);
49342
- this.messagesChunk = drop2(this.messagesChunk, n);
49343
- } else if (n <= this.messages.length + this.messagesChunk.length) {
50262
+ if (n2 <= this.messagesChunk.length) {
50263
+ messages = take2(this.messagesChunk, n2);
50264
+ this.messagesChunk = drop2(this.messagesChunk, n2);
50265
+ } else if (n2 <= this.messages.length + this.messagesChunk.length) {
49344
50266
  this.messagesChunk = appendAll2(this.messagesChunk, unsafeFromArray(this.messages));
49345
50267
  this.messages = [];
49346
- messages = take2(this.messagesChunk, n);
49347
- this.messagesChunk = drop2(this.messagesChunk, n);
50268
+ messages = take2(this.messagesChunk, n2);
50269
+ this.messagesChunk = drop2(this.messagesChunk, n2);
49348
50270
  } else {
49349
- return zipRight(this.awaitTake, this.takeN(n));
50271
+ return zipRight(this.awaitTake, this.takeN(n2));
49350
50272
  }
49351
50273
  return succeed([messages, this.releaseCapacity()]);
49352
50274
  });
@@ -49457,21 +50379,21 @@ class MailboxImpl extends Class2 {
49457
50379
  }
49458
50380
  return false;
49459
50381
  }
49460
- let n = this.capacity - this.messages.length - this.messagesChunk.length;
50382
+ let n2 = this.capacity - this.messages.length - this.messagesChunk.length;
49461
50383
  for (const entry of this.state.offers) {
49462
- if (n === 0)
50384
+ if (n2 === 0)
49463
50385
  return false;
49464
50386
  else if (entry._tag === "Single") {
49465
50387
  this.messages.push(entry.message);
49466
- n--;
50388
+ n2--;
49467
50389
  entry.resume(exitTrue);
49468
50390
  this.state.offers.delete(entry);
49469
50391
  } else {
49470
50392
  for (;entry.offset < entry.remaining.length; entry.offset++) {
49471
- if (n === 0)
50393
+ if (n2 === 0)
49472
50394
  return false;
49473
50395
  this.messages.push(entry.remaining[entry.offset]);
49474
- n--;
50396
+ n2--;
49475
50397
  }
49476
50398
  entry.resume(exitEmpty);
49477
50399
  this.state.offers.delete(entry);
@@ -49712,13 +50634,13 @@ var makeManager = /* @__PURE__ */ gen2(function* () {
49712
50634
  initialMessage
49713
50635
  }) {
49714
50636
  return gen2(function* () {
49715
- const id2 = idCounter++;
50637
+ const id3 = idCounter++;
49716
50638
  let requestIdCounter = 0;
49717
50639
  const requestMap = new Map;
49718
50640
  const collector = unsafeMakeCollector();
49719
50641
  const wrappedEncode = encode2 ? (message) => zipRight3(collector.clear, provideService2(encode2(message), Collector, collector)) : succeed7;
49720
50642
  const readyLatch = yield* make37();
49721
- const backing = yield* platform.spawn(id2);
50643
+ const backing = yield* platform.spawn(id3);
49722
50644
  yield* backing.run((message) => {
49723
50645
  if (message[0] === 0) {
49724
50646
  return complete2(readyLatch, _void);
@@ -49758,20 +50680,20 @@ var makeManager = /* @__PURE__ */ gen2(function* () {
49758
50680
  const executeAcquire = (request, makeMailbox) => withFiberRuntime2((fiber) => {
49759
50681
  const context7 = fiber.getFiberRef(currentContext2);
49760
50682
  const span2 = getOption2(context7, ParentSpan).pipe(filter((span3) => span3._tag === "Span"));
49761
- const id3 = requestIdCounter++;
50683
+ const id4 = requestIdCounter++;
49762
50684
  return makeMailbox.pipe(tap2((mailbox) => {
49763
- requestMap.set(id3, mailbox);
49764
- return wrappedEncode(request).pipe(tap2((payload) => backing.send([id3, 0, payload, span2._tag === "Some" ? [span2.value.traceId, span2.value.spanId, span2.value.sampled] : undefined], collector.unsafeRead())), catchAllCause2((cause2) => isMailbox(mailbox) ? mailbox.failCause(cause2) : failCause6(mailbox, cause2)));
50685
+ requestMap.set(id4, mailbox);
50686
+ return wrappedEncode(request).pipe(tap2((payload) => backing.send([id4, 0, payload, span2._tag === "Some" ? [span2.value.traceId, span2.value.spanId, span2.value.sampled] : undefined], collector.unsafeRead())), catchAllCause2((cause2) => isMailbox(mailbox) ? mailbox.failCause(cause2) : failCause6(mailbox, cause2)));
49765
50687
  }), map16((mailbox) => ({
49766
- id: id3,
50688
+ id: id4,
49767
50689
  mailbox
49768
50690
  })));
49769
50691
  });
49770
50692
  const executeRelease = ({
49771
- id: id3
50693
+ id: id4
49772
50694
  }, exit3) => {
49773
- const release = sync3(() => requestMap.delete(id3));
49774
- return isFailure(exit3) ? zipRight3(orDie2(backing.send([id3, 1])), release) : release;
50695
+ const release = sync3(() => requestMap.delete(id4));
50696
+ return isFailure(exit3) ? zipRight3(orDie2(backing.send([id4, 1])), release) : release;
49775
50697
  };
49776
50698
  const execute4 = (request) => fromChannel4(acquireUseRelease4(executeAcquire(request, make64()), ({
49777
50699
  mailbox
@@ -49787,7 +50709,7 @@ var makeManager = /* @__PURE__ */ gen2(function* () {
49787
50709
  })));
49788
50710
  }
49789
50711
  return {
49790
- id: id2,
50712
+ id: id3,
49791
50713
  execute: execute4,
49792
50714
  executeEffect
49793
50715
  };
@@ -49798,7 +50720,7 @@ var makeManager = /* @__PURE__ */ gen2(function* () {
49798
50720
  var layerManager = /* @__PURE__ */ effect(WorkerManager, makeManager);
49799
50721
  var makePlatform = () => (options7) => PlatformWorker.of({
49800
50722
  [PlatformWorkerTypeId]: PlatformWorkerTypeId,
49801
- spawn(id2) {
50723
+ spawn(id3) {
49802
50724
  return gen2(function* () {
49803
50725
  const spawn = yield* Spawner;
49804
50726
  let currentPort;
@@ -49806,7 +50728,7 @@ var makePlatform = () => (options7) => PlatformWorker.of({
49806
50728
  const run9 = (handler) => uninterruptibleMask3((restore) => gen2(function* () {
49807
50729
  const scope4 = yield* scope2;
49808
50730
  const port2 = yield* options7.setup({
49809
- worker: spawn(id2),
50731
+ worker: spawn(id3),
49810
50732
  scope: scope4
49811
50733
  });
49812
50734
  currentPort = port2;
@@ -50744,8 +51666,8 @@ function make71({
50744
51666
  compiler,
50745
51667
  reactiveMailbox,
50746
51668
  rollback = "ROLLBACK",
50747
- rollbackSavepoint = (id2) => `ROLLBACK TO SAVEPOINT ${id2}`,
50748
- savepoint = (id2) => `SAVEPOINT ${id2}`,
51669
+ rollbackSavepoint = (id3) => `ROLLBACK TO SAVEPOINT ${id3}`,
51670
+ savepoint = (id3) => `SAVEPOINT ${id3}`,
50749
51671
  spanAttributes,
50750
51672
  transactionAcquirer,
50751
51673
  transformRows
@@ -50761,10 +51683,10 @@ function make71({
50761
51683
  spanAttributes,
50762
51684
  acquireConnection: flatMap10(make35(), (scope4) => map16(extend2(transactionAcquirer, scope4), (conn) => [scope4, conn])),
50763
51685
  begin: (conn) => conn.executeUnprepared(beginTransaction, [], undefined),
50764
- savepoint: (conn, id2) => conn.executeUnprepared(savepoint(`effect_sql_${id2}`), [], undefined),
51686
+ savepoint: (conn, id3) => conn.executeUnprepared(savepoint(`effect_sql_${id3}`), [], undefined),
50765
51687
  commit: (conn) => conn.executeUnprepared(commit, [], undefined),
50766
51688
  rollback: (conn) => conn.executeUnprepared(rollback, [], undefined),
50767
- rollbackSavepoint: (conn, id2) => conn.executeUnprepared(rollbackSavepoint(`effect_sql_${id2}`), [], undefined)
51689
+ rollbackSavepoint: (conn, id3) => conn.executeUnprepared(rollbackSavepoint(`effect_sql_${id3}`), [], undefined)
50768
51690
  });
50769
51691
  const reactivity = yield* Reactivity;
50770
51692
  const client = Object.assign(make70(getConnection, compiler, spanAttributes, transformRows), {
@@ -50803,11 +51725,11 @@ var makeWithTransaction = (options7) => (effect3) => uninterruptibleMask3((resto
50803
51725
  const clock3 = get3(fiber.currentDefaultServices, Clock);
50804
51726
  const connOption = getOption2(context7, options7.transactionTag);
50805
51727
  const conn = connOption._tag === "Some" ? succeed7([undefined, connOption.value[0]]) : options7.acquireConnection;
50806
- const id2 = connOption._tag === "Some" ? connOption.value[1] + 1 : 0;
50807
- return flatMap10(conn, ([scope4, conn2]) => (id2 === 0 ? options7.begin(conn2) : options7.savepoint(conn2, id2)).pipe(zipRight3(locally(restore(effect3), currentContext2, add2(context7, options7.transactionTag, [conn2, id2]).pipe(add2(ParentSpan, span2)))), exit2, flatMap10((exit3) => {
51728
+ const id3 = connOption._tag === "Some" ? connOption.value[1] + 1 : 0;
51729
+ return flatMap10(conn, ([scope4, conn2]) => (id3 === 0 ? options7.begin(conn2) : options7.savepoint(conn2, id3)).pipe(zipRight3(locally(restore(effect3), currentContext2, add2(context7, options7.transactionTag, [conn2, id3]).pipe(add2(ParentSpan, span2)))), exit2, flatMap10((exit3) => {
50808
51730
  let effect4;
50809
51731
  if (isSuccess(exit3)) {
50810
- if (id2 === 0) {
51732
+ if (id3 === 0) {
50811
51733
  span2.event("db.transaction.commit", clock3.unsafeCurrentTimeNanos());
50812
51734
  effect4 = orDie2(options7.commit(conn2));
50813
51735
  } else {
@@ -50816,7 +51738,7 @@ var makeWithTransaction = (options7) => (effect3) => uninterruptibleMask3((resto
50816
51738
  }
50817
51739
  } else {
50818
51740
  span2.event("db.transaction.rollback", clock3.unsafeCurrentTimeNanos());
50819
- effect4 = orDie2(id2 > 0 ? options7.rollbackSavepoint(conn2, id2) : options7.rollback(conn2));
51741
+ effect4 = orDie2(id3 > 0 ? options7.rollbackSavepoint(conn2, id3) : options7.rollback(conn2));
50820
51742
  }
50821
51743
  const withScope3 = scope4 !== undefined ? ensuring2(effect4, close(scope4, exit3)) : effect4;
50822
51744
  return zipRight3(withScope3, exit3);
@@ -50883,22 +51805,22 @@ var make73 = ({
50883
51805
  name,
50884
51806
  createdAt: created_at
50885
51807
  })));
50886
- const loadMigration = ([id2, name, load]) => catchAllDefect2(load, (_) => fail8(new MigrationError({
51808
+ const loadMigration = ([id3, name, load]) => catchAllDefect2(load, (_) => fail8(new MigrationError({
50887
51809
  reason: "import-error",
50888
- message: `Could not import migration "${id2}_${name}"
51810
+ message: `Could not import migration "${id3}_${name}"
50889
51811
 
50890
51812
  ${_}`
50891
51813
  }))).pipe(flatMap10((_) => isEffect2(_) ? succeed7(_) : _.default ? succeed7(_.default?.default ?? _.default) : fail8(new MigrationError({
50892
51814
  reason: "import-error",
50893
- message: `Default export not found for migration "${id2}_${name}"`
51815
+ message: `Default export not found for migration "${id3}_${name}"`
50894
51816
  }))), filterOrFail2((_) => isEffect2(_), () => new MigrationError({
50895
51817
  reason: "import-error",
50896
- message: `Default export was not an Effect for migration "${id2}_${name}"`
51818
+ message: `Default export was not an Effect for migration "${id3}_${name}"`
50897
51819
  })));
50898
- const runMigration = (id2, name, effect3) => orDieWith2(effect3, (error4) => new MigrationError({
51820
+ const runMigration = (id3, name, effect3) => orDieWith2(effect3, (error4) => new MigrationError({
50899
51821
  cause: error4,
50900
51822
  reason: "failed",
50901
- message: `Migration "${id2}_${name}" failed`
51823
+ message: `Migration "${id3}_${name}" failed`
50902
51824
  }));
50903
51825
  const run9 = gen2(function* () {
50904
51826
  yield* sql.onDialectOrElse({
@@ -50909,7 +51831,7 @@ ${_}`
50909
51831
  onNone: () => 0,
50910
51832
  onSome: (_) => _.id
50911
51833
  })), loader]);
50912
- if (new Set(current.map(([id2]) => id2)).size !== current.length) {
51834
+ if (new Set(current.map(([id3]) => id3)).size !== current.length) {
50913
51835
  return yield* new MigrationError({
50914
51836
  reason: "duplicates",
50915
51837
  message: "Found duplicate migration id's"
@@ -50924,19 +51846,19 @@ ${_}`
50924
51846
  required2.push([currentId, currentName, yield* loadMigration(resolved)]);
50925
51847
  }
50926
51848
  if (required2.length > 0) {
50927
- yield* pipe(insertMigrations(required2.map(([id2, name]) => [id2, name])), mapError2((_) => new MigrationError({
51849
+ yield* pipe(insertMigrations(required2.map(([id3, name]) => [id3, name])), mapError2((_) => new MigrationError({
50928
51850
  reason: "locked",
50929
51851
  message: "Migrations already running"
50930
51852
  })));
50931
51853
  }
50932
- yield* forEach5(required2, ([id2, name, effect3]) => logDebug2(`Running migration`).pipe(zipRight3(runMigration(id2, name, effect3)), annotateLogs2("migration_id", String(id2)), annotateLogs2("migration_name", name)), {
51854
+ yield* forEach5(required2, ([id3, name, effect3]) => logDebug2(`Running migration`).pipe(zipRight3(runMigration(id3, name, effect3)), annotateLogs2("migration_id", String(id3)), annotateLogs2("migration_name", name)), {
50933
51855
  discard: true
50934
51856
  });
50935
51857
  yield* pipe(latestMigration, flatMap10(match2({
50936
51858
  onNone: () => logDebug2(`Migrations complete`),
50937
51859
  onSome: (_) => logDebug2(`Migrations complete`).pipe(annotateLogs2("latest_migration_id", _.id.toString()), annotateLogs2("latest_migration_name", _.name))
50938
51860
  })));
50939
- return required2.map(([id2, name]) => [id2, name]);
51861
+ return required2.map(([id3, name]) => [id3, name]);
50940
51862
  });
50941
51863
  yield* ensureMigrationsTable;
50942
51864
  const completed = yield* pipe(sql.withTransaction(run9), catchTag2("MigrationError", (_) => _.reason === "locked" ? as3(logDebug2(_.message), []) : fail8(_)));
@@ -50946,9 +51868,9 @@ ${_}`
50946
51868
  return completed;
50947
51869
  });
50948
51870
  var migrationOrder = /* @__PURE__ */ make2(([a], [b]) => number3(a, b));
50949
- var fromGlob = (migrations) => pipe(Object.keys(migrations), filterMap2((_) => fromNullable(_.match(/^(?:.*\/)?(\d+)_([^.]+)\.(js|ts)$/))), map4(([key, id2, name]) => [Number(id2), name, promise2(() => migrations[key]())]), sort(migrationOrder), succeed7);
50950
- var fromBabelGlob = (migrations) => pipe(Object.keys(migrations), filterMap2((_) => fromNullable(_.match(/^_(\d+)_([^.]+?)(Js|Ts)?$/))), map4(([key, id2, name]) => [Number(id2), name, succeed7(migrations[key])]), sort(migrationOrder), succeed7);
50951
- var fromRecord = (migrations) => pipe(Object.keys(migrations), filterMap2((_) => fromNullable(_.match(/^(\d+)_(.+)$/))), map4(([key, id2, name]) => [Number(id2), name, succeed7(migrations[key])]), sort(migrationOrder), succeed7);
51871
+ var fromGlob = (migrations) => pipe(Object.keys(migrations), filterMap2((_) => fromNullable(_.match(/^(?:.*\/)?(\d+)_([^.]+)\.(js|ts)$/))), map4(([key, id3, name]) => [Number(id3), name, promise2(() => migrations[key]())]), sort(migrationOrder), succeed7);
51872
+ var fromBabelGlob = (migrations) => pipe(Object.keys(migrations), filterMap2((_) => fromNullable(_.match(/^_(\d+)_([^.]+?)(Js|Ts)?$/))), map4(([key, id3, name]) => [Number(id3), name, succeed7(migrations[key])]), sort(migrationOrder), succeed7);
51873
+ var fromRecord = (migrations) => pipe(Object.keys(migrations), filterMap2((_) => fromNullable(_.match(/^(\d+)_(.+)$/))), map4(([key, id3, name]) => [Number(id3), name, succeed7(migrations[key])]), sort(migrationOrder), succeed7);
50952
51874
 
50953
51875
  // ../../node_modules/.bun/@effect+platform@0.94.2+f436dcc95e9291b3/node_modules/@effect/platform/dist/esm/FetchHttpClient.js
50954
51876
  var exports_FetchHttpClient = {};
@@ -55391,46 +56313,46 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
55391
56313
  }
55392
56314
  doc.write(`const newResult = {};`);
55393
56315
  for (const key of normalized.keys) {
55394
- const id2 = ids3[key];
56316
+ const id3 = ids3[key];
55395
56317
  const k = esc(key);
55396
56318
  const schema = shape[key];
55397
56319
  const isOptionalOut = schema?._zod?.optout === "optional";
55398
- doc.write(`const ${id2} = ${parseStr(key)};`);
56320
+ doc.write(`const ${id3} = ${parseStr(key)};`);
55399
56321
  if (isOptionalOut) {
55400
56322
  doc.write(`
55401
- if (${id2}.issues.length) {
56323
+ if (${id3}.issues.length) {
55402
56324
  if (${k} in input) {
55403
- payload.issues = payload.issues.concat(${id2}.issues.map(iss => ({
56325
+ payload.issues = payload.issues.concat(${id3}.issues.map(iss => ({
55404
56326
  ...iss,
55405
56327
  path: iss.path ? [${k}, ...iss.path] : [${k}]
55406
56328
  })));
55407
56329
  }
55408
56330
  }
55409
56331
 
55410
- if (${id2}.value === undefined) {
56332
+ if (${id3}.value === undefined) {
55411
56333
  if (${k} in input) {
55412
56334
  newResult[${k}] = undefined;
55413
56335
  }
55414
56336
  } else {
55415
- newResult[${k}] = ${id2}.value;
56337
+ newResult[${k}] = ${id3}.value;
55416
56338
  }
55417
56339
 
55418
56340
  `);
55419
56341
  } else {
55420
56342
  doc.write(`
55421
- if (${id2}.issues.length) {
55422
- payload.issues = payload.issues.concat(${id2}.issues.map(iss => ({
56343
+ if (${id3}.issues.length) {
56344
+ payload.issues = payload.issues.concat(${id3}.issues.map(iss => ({
55423
56345
  ...iss,
55424
56346
  path: iss.path ? [${k}, ...iss.path] : [${k}]
55425
56347
  })));
55426
56348
  }
55427
56349
 
55428
- if (${id2}.value === undefined) {
56350
+ if (${id3}.value === undefined) {
55429
56351
  if (${k} in input) {
55430
56352
  newResult[${k}] = undefined;
55431
56353
  }
55432
56354
  } else {
55433
- newResult[${k}] = ${id2}.value;
56355
+ newResult[${k}] = ${id3}.value;
55434
56356
  }
55435
56357
 
55436
56358
  `);
@@ -63146,26 +64068,26 @@ function extractDefs(ctx, schema) {
63146
64068
  throw new Error("Unprocessed schema. This is a bug in Zod.");
63147
64069
  const idToSchema = new Map;
63148
64070
  for (const entry of ctx.seen.entries()) {
63149
- const id2 = ctx.metadataRegistry.get(entry[0])?.id;
63150
- if (id2) {
63151
- const existing = idToSchema.get(id2);
64071
+ const id3 = ctx.metadataRegistry.get(entry[0])?.id;
64072
+ if (id3) {
64073
+ const existing = idToSchema.get(id3);
63152
64074
  if (existing && existing !== entry[0]) {
63153
- throw new Error(`Duplicate schema id "${id2}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
64075
+ throw new Error(`Duplicate schema id "${id3}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
63154
64076
  }
63155
- idToSchema.set(id2, entry[0]);
64077
+ idToSchema.set(id3, entry[0]);
63156
64078
  }
63157
64079
  }
63158
64080
  const makeURI = (entry) => {
63159
64081
  const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
63160
64082
  if (ctx.external) {
63161
64083
  const externalId = ctx.external.registry.get(entry[0])?.id;
63162
- const uriGenerator = ctx.external.uri ?? ((id3) => id3);
64084
+ const uriGenerator = ctx.external.uri ?? ((id4) => id4);
63163
64085
  if (externalId) {
63164
64086
  return { ref: uriGenerator(externalId) };
63165
64087
  }
63166
- const id2 = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
63167
- entry[1].defId = id2;
63168
- return { defId: id2, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id2}` };
64088
+ const id3 = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
64089
+ entry[1].defId = id3;
64090
+ return { defId: id3, ref: `${uriGenerator("__shared")}#/${defsSegment}/${id3}` };
63169
64091
  }
63170
64092
  if (entry[1] === root) {
63171
64093
  return { ref: "#" };
@@ -63211,8 +64133,8 @@ function extractDefs(ctx, schema) {
63211
64133
  continue;
63212
64134
  }
63213
64135
  }
63214
- const id2 = ctx.metadataRegistry.get(entry[0])?.id;
63215
- if (id2) {
64136
+ const id3 = ctx.metadataRegistry.get(entry[0])?.id;
64137
+ if (id3) {
63216
64138
  extractToDef(entry);
63217
64139
  continue;
63218
64140
  }
@@ -63306,10 +64228,10 @@ function finalize(ctx, schema) {
63306
64228
  result.$schema = "http://json-schema.org/draft-04/schema#";
63307
64229
  } else if (ctx.target === "openapi-3.0") {} else {}
63308
64230
  if (ctx.external?.uri) {
63309
- const id2 = ctx.external.registry.get(schema)?.id;
63310
- if (!id2)
64231
+ const id3 = ctx.external.registry.get(schema)?.id;
64232
+ if (!id3)
63311
64233
  throw new Error("Schema is missing an `id` property");
63312
- result.$id = ctx.external.uri(id2);
64234
+ result.$id = ctx.external.uri(id3);
63313
64235
  }
63314
64236
  Object.assign(result, root.def ?? root.schema);
63315
64237
  const defs = ctx.external?.defs ?? {};
@@ -69719,7 +70641,7 @@ function createParser(callbacks) {
69719
70641
  if (typeof callbacks == "function")
69720
70642
  throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");
69721
70643
  const { onEvent = noop, onError: onError4 = noop, onRetry = noop, onComment } = callbacks;
69722
- let incompleteLine = "", isFirstChunk = true, id2, data = "", eventType = "";
70644
+ let incompleteLine = "", isFirstChunk = true, id3, data = "", eventType = "";
69723
70645
  function feed2(newChunk) {
69724
70646
  const chunk4 = isFirstChunk ? newChunk.replace(/^\xEF\xBB\xBF/, "") : newChunk, [complete3, incomplete] = splitLines4(`${incompleteLine}${chunk4}`);
69725
70647
  for (const line4 of complete3)
@@ -69753,7 +70675,7 @@ function createParser(callbacks) {
69753
70675
  `;
69754
70676
  break;
69755
70677
  case "id":
69756
- id2 = value6.includes("\x00") ? undefined : value6;
70678
+ id3 = value6.includes("\x00") ? undefined : value6;
69757
70679
  break;
69758
70680
  case "retry":
69759
70681
  /^\d+$/.test(value6) ? onRetry(parseInt(value6, 10)) : onError4(new ParseError2(`Invalid \`retry\` value: "${value6}"`, {
@@ -69769,14 +70691,14 @@ function createParser(callbacks) {
69769
70691
  }
69770
70692
  function dispatchEvent() {
69771
70693
  data.length > 0 && onEvent({
69772
- id: id2,
70694
+ id: id3,
69773
70695
  event: eventType || undefined,
69774
70696
  data: data.endsWith(`
69775
70697
  `) ? data.slice(0, -1) : data
69776
- }), id2 = undefined, data = "", eventType = "";
70698
+ }), id3 = undefined, data = "", eventType = "";
69777
70699
  }
69778
70700
  function reset2(options7 = {}) {
69779
- incompleteLine && options7.consume && parseLine(incompleteLine), isFirstChunk = true, id2 = undefined, data = "", eventType = "", incompleteLine = "";
70701
+ incompleteLine && options7.consume && parseLine(incompleteLine), isFirstChunk = true, id3 = undefined, data = "", eventType = "", incompleteLine = "";
69780
70702
  }
69781
70703
  return { feed: feed2, reset: reset2 };
69782
70704
  }
@@ -71043,8 +71965,8 @@ function parseUnknownDef() {
71043
71965
  var parseReadonlyDef = (def, refs) => {
71044
71966
  return parseDef(def.innerType._def, refs);
71045
71967
  };
71046
- var selectParser = (def, typeName, refs) => {
71047
- switch (typeName) {
71968
+ var selectParser = (def, typeName2, refs) => {
71969
+ switch (typeName2) {
71048
71970
  case ZodFirstPartyTypeKind2.ZodString:
71049
71971
  return parseStringDef(def, refs);
71050
71972
  case ZodFirstPartyTypeKind2.ZodNumber:
@@ -71116,7 +72038,7 @@ var selectParser = (def, typeName, refs) => {
71116
72038
  default:
71117
72039
  return /* @__PURE__ */ ((_) => {
71118
72040
  return;
71119
- })(typeName);
72041
+ })(typeName2);
71120
72042
  }
71121
72043
  };
71122
72044
  var getRelativePath = (pathA, pathB) => {
@@ -71518,7 +72440,7 @@ function tool(tool2) {
71518
72440
  return tool2;
71519
72441
  }
71520
72442
  function createProviderToolFactory({
71521
- id: id2,
72443
+ id: id3,
71522
72444
  inputSchema
71523
72445
  }) {
71524
72446
  return ({
@@ -71532,7 +72454,7 @@ function createProviderToolFactory({
71532
72454
  ...args2
71533
72455
  }) => tool({
71534
72456
  type: "provider",
71535
- id: id2,
72457
+ id: id3,
71536
72458
  args: args2,
71537
72459
  inputSchema,
71538
72460
  outputSchema,
@@ -71545,7 +72467,7 @@ function createProviderToolFactory({
71545
72467
  });
71546
72468
  }
71547
72469
  function createProviderToolFactoryWithOutputSchema({
71548
- id: id2,
72470
+ id: id3,
71549
72471
  inputSchema,
71550
72472
  outputSchema,
71551
72473
  supportsDeferredResults
@@ -71560,7 +72482,7 @@ function createProviderToolFactoryWithOutputSchema({
71560
72482
  ...args2
71561
72483
  }) => tool({
71562
72484
  type: "provider",
71563
- id: id2,
72485
+ id: id3,
71564
72486
  args: args2,
71565
72487
  inputSchema,
71566
72488
  outputSchema,
@@ -72196,7 +73118,7 @@ function prepareTools({
72196
73118
  "gemini-flash-latest",
72197
73119
  "gemini-flash-lite-latest",
72198
73120
  "gemini-pro-latest"
72199
- ].some((id2) => id2 === modelId);
73121
+ ].some((id3) => id3 === modelId);
72200
73122
  const isGemini2orNewer = modelId.includes("gemini-2") || modelId.includes("gemini-3") || isLatest;
72201
73123
  const supportsDynamicRetrieval = modelId.includes("gemini-1.5-flash") && !modelId.includes("-8b");
72202
73124
  const supportsFileSearch = modelId.includes("gemini-2.5") || modelId.includes("gemini-3");
@@ -73159,7 +74081,7 @@ var GoogleGenerativeAIImageModel = class {
73159
74081
  var _a16, _b16, _c;
73160
74082
  const {
73161
74083
  prompt: prompt4,
73162
- n = 1,
74084
+ n: n2 = 1,
73163
74085
  size: size11,
73164
74086
  aspectRatio = "1:1",
73165
74087
  seed,
@@ -73197,7 +74119,7 @@ var GoogleGenerativeAIImageModel = class {
73197
74119
  });
73198
74120
  const currentDate = (_c = (_b16 = (_a16 = this.config._internal) == null ? undefined : _a16.currentDate) == null ? undefined : _b16.call(_a16)) != null ? _c : /* @__PURE__ */ new Date;
73199
74121
  const parameters = {
73200
- sampleCount: n
74122
+ sampleCount: n2
73201
74123
  };
73202
74124
  if (aspectRatio != null) {
73203
74125
  parameters.aspectRatio = aspectRatio;
@@ -74146,7 +75068,7 @@ var GatewayImageModel = class {
74146
75068
  }
74147
75069
  async doGenerate({
74148
75070
  prompt: prompt4,
74149
- n,
75071
+ n: n2,
74150
75072
  size: size11,
74151
75073
  aspectRatio,
74152
75074
  seed,
@@ -74168,7 +75090,7 @@ var GatewayImageModel = class {
74168
75090
  headers: combineHeaders(resolvedHeaders, headers != null ? headers : {}, this.getModelConfigHeaders(), await resolve3(this.config.o11yHeaders)),
74169
75091
  body: {
74170
75092
  prompt: prompt4,
74171
- n,
75093
+ n: n2,
74172
75094
  ...size11 && { size: size11 },
74173
75095
  ...aspectRatio && { aspectRatio },
74174
75096
  ...seed && { seed },
@@ -74268,7 +75190,7 @@ var GatewayVideoModel = class {
74268
75190
  }
74269
75191
  async doGenerate({
74270
75192
  prompt: prompt4,
74271
- n,
75193
+ n: n2,
74272
75194
  aspectRatio,
74273
75195
  resolution,
74274
75196
  duration: duration5,
@@ -74291,7 +75213,7 @@ var GatewayVideoModel = class {
74291
75213
  headers: combineHeaders(resolvedHeaders, headers != null ? headers : {}, this.getModelConfigHeaders(), await resolve3(this.config.o11yHeaders)),
74292
75214
  body: {
74293
75215
  prompt: prompt4,
74294
- n,
75216
+ n: n2,
74295
75217
  ...aspectRatio && { aspectRatio },
74296
75218
  ...resolution && { resolution },
74297
75219
  ...duration5 && { duration: duration5 },
@@ -75360,8 +76282,8 @@ async function convertToLanguageModelPrompt({
75360
76282
  }
75361
76283
  case "user":
75362
76284
  case "system":
75363
- for (const id2 of approvedToolCallIds) {
75364
- toolCallIds.delete(id2);
76285
+ for (const id3 of approvedToolCallIds) {
76286
+ toolCallIds.delete(id3);
75365
76287
  }
75366
76288
  if (toolCallIds.size > 0) {
75367
76289
  throw new MissingToolResultsError({
@@ -75371,8 +76293,8 @@ async function convertToLanguageModelPrompt({
75371
76293
  break;
75372
76294
  }
75373
76295
  }
75374
- for (const id2 of approvedToolCallIds) {
75375
- toolCallIds.delete(id2);
76296
+ for (const id3 of approvedToolCallIds) {
76297
+ toolCallIds.delete(id3);
75376
76298
  }
75377
76299
  if (toolCallIds.size > 0) {
75378
76300
  throw new MissingToolResultsError({ toolCallIds: Array.from(toolCallIds) });
@@ -79398,17 +80320,17 @@ class TokenCounter extends Tag2("@grepai/core/domain/token-counter/TokenCounter"
79398
80320
  }
79399
80321
 
79400
80322
  // ../core/src/internal/services/chunker-ast/ast-parser.ts
79401
- import Parser from "tree-sitter";
80323
+ var import_tree_sitter = __toESM(require_tree_sitter(), 1);
79402
80324
  import Typescript from "tree-sitter-typescript";
79403
80325
  class AstParser extends Service()("@grepai/core/internal/services/chunker-ast/ast-parser/AstParser", {
79404
80326
  sync: () => {
79405
80327
  const parse12 = fnUntraced2(function* (input) {
79406
- const { content, language } = input;
80328
+ const { content, language: language2 } = input;
79407
80329
  return yield* try_3({
79408
80330
  try: () => {
79409
- const parser2 = new Parser;
80331
+ const parser2 = new import_tree_sitter.default;
79410
80332
  parser2.reset();
79411
- parser2.setLanguage(languageMap[language]);
80333
+ parser2.setLanguage(languageMap[language2]);
79412
80334
  const tree = parser2.parse(content);
79413
80335
  return tree;
79414
80336
  },
@@ -79666,13 +80588,13 @@ var ChunkerAst = effect(Chunker, gen2(function* () {
79666
80588
  const tokenCounter = yield* TokenCounter;
79667
80589
  const contextHeaderBuilder = yield* ContextHeaderBuilder;
79668
80590
  const config3 = yield* Config;
79669
- const split2 = fnUntraced2(function* (node, language, scopeStack) {
80591
+ const split2 = fnUntraced2(function* (node, language2, scopeStack) {
79670
80592
  const {
79671
80593
  wantedNodes,
79672
80594
  scopeNodes,
79673
80595
  importNodes,
79674
80596
  extractNodeName: extractNodeName3
79675
- } = languageConfig[language];
80597
+ } = languageConfig[language2];
79676
80598
  const tokenCount = yield* tokenCounter.count(node.text);
79677
80599
  const isWanted = wantedNodes.has(node.type);
79678
80600
  const isScope = scopeNodes.has(node.type);
@@ -79706,13 +80628,13 @@ var ChunkerAst = effect(Chunker, gen2(function* () {
79706
80628
  }
79707
80629
  ];
79708
80630
  }
79709
- return yield* forEach5(node.children, (child) => split2(child, language, nextScope), {
80631
+ return yield* forEach5(node.children, (child) => split2(child, language2, nextScope), {
79710
80632
  concurrency: "unbounded"
79711
80633
  }).pipe(map16(flatten));
79712
80634
  });
79713
- function reMerge(chunks2, content, language) {
80635
+ function reMerge(chunks2, content, language2) {
79714
80636
  const sorted = [...chunks2].sort((a, b) => a.startIndex - b.startIndex || a.endIndex - b.endIndex);
79715
- const { isClosingSyntax } = languageConfig[language];
80637
+ const { isClosingSyntax } = languageConfig[language2];
79716
80638
  const output = [];
79717
80639
  let current;
79718
80640
  let pendingGap;
@@ -79747,9 +80669,9 @@ var ChunkerAst = effect(Chunker, gen2(function* () {
79747
80669
  return output;
79748
80670
  }
79749
80671
  return Chunker.of({
79750
- chunk: fnUntraced2(function* ({ filePath, content, language }) {
79751
- const tree = yield* astParser.parse({ content, language });
79752
- return yield* split2(tree.rootNode, language, []).pipe(map16((splitChunks) => reMerge(splitChunks, content, language)), map16(map4(({ startLine, endLine, startIndex, endIndex, scope: scope4 }, index) => {
80672
+ chunk: fnUntraced2(function* ({ filePath, content, language: language2 }) {
80673
+ const tree = yield* astParser.parse({ content, language: language2 });
80674
+ return yield* split2(tree.rootNode, language2, []).pipe(map16((splitChunks) => reMerge(splitChunks, content, language2)), map16(map4(({ startLine, endLine, startIndex, endIndex, scope: scope4 }, index) => {
79753
80675
  const chunkContent = content.slice(startIndex, endIndex);
79754
80676
  const contextHeader = contextHeaderBuilder.stringify({
79755
80677
  filePath,
@@ -79858,9 +80780,9 @@ var CodebaseScannerFs = effect(CodebaseScanner, gen2(function* () {
79858
80780
  })), when5("tsx", () => ({
79859
80781
  filePath,
79860
80782
  language: "tsx"
79861
- })), option4))), flatMap10(forEach5(({ filePath, language }) => fs.readFileString(filePath).pipe(map16((content) => ({
80783
+ })), option4))), flatMap10(forEach5(({ filePath, language: language2 }) => fs.readFileString(filePath).pipe(map16((content) => ({
79862
80784
  filePath,
79863
- language,
80785
+ language: language2,
79864
80786
  hash: string(content).toString(),
79865
80787
  content
79866
80788
  }))))));
@@ -80074,11 +80996,11 @@ class FileIndexer extends Service()("@grepai/core/internal/services/file-indexer
80074
80996
  SqlError: (cause2) => new IndexerError({ cause: cause2 })
80075
80997
  }));
80076
80998
  const index = fnUntraced2(function* (input) {
80077
- const { filePath, content, hash: hash3, language } = input;
80999
+ const { filePath, content, hash: hash3, language: language2 } = input;
80078
81000
  const chunks2 = yield* chunker.chunk({
80079
81001
  filePath,
80080
81002
  content,
80081
- language
81003
+ language: language2
80082
81004
  });
80083
81005
  if (!isNonEmptyReadonlyArray(chunks2)) {
80084
81006
  return;
@@ -81427,13 +82349,13 @@ class IdAlloc {
81427
82349
  this.#usedIds.add(freeId);
81428
82350
  return freeId;
81429
82351
  }
81430
- free(id2) {
81431
- if (!this.#usedIds.delete(id2)) {
82352
+ free(id3) {
82353
+ if (!this.#usedIds.delete(id3)) {
81432
82354
  throw new InternalError("Freeing an id that is not allocated");
81433
82355
  }
81434
82356
  this.#freeIds.delete(this.#usedIds.size);
81435
- if (id2 < this.#usedIds.size) {
81436
- this.#freeIds.add(id2);
82357
+ if (id3 < this.#usedIds.size) {
82358
+ this.#freeIds.add(id3);
81437
82359
  }
81438
82360
  }
81439
82361
  }
@@ -84968,10 +85890,10 @@ var make78 = (options7) => gen2(function* () {
84968
85890
  scope: scope4
84969
85891
  }) => [scope4, conn]))),
84970
85892
  begin: () => _void,
84971
- savepoint: (conn, id2) => conn.executeRaw(`SAVEPOINT effect_sql_${id2};`, []),
85893
+ savepoint: (conn, id3) => conn.executeRaw(`SAVEPOINT effect_sql_${id3};`, []),
84972
85894
  commit: (conn) => conn.commit,
84973
85895
  rollback: (conn) => conn.rollback,
84974
- rollbackSavepoint: (conn, id2) => conn.executeRaw(`ROLLBACK TO SAVEPOINT effect_sql_${id2};`, [])
85896
+ rollbackSavepoint: (conn, id3) => conn.executeRaw(`ROLLBACK TO SAVEPOINT effect_sql_${id3};`, [])
84975
85897
  });
84976
85898
  const acquirer = flatMap10(serviceOption2(LibsqlTransaction), match2({
84977
85899
  onNone: () => semaphore.withPermits(1)(succeed7(connection)),
@@ -85009,7 +85931,7 @@ var fromFileSystem = (directory5) => FileSystem.pipe(flatMap10((FS) => FS.readDi
85009
85931
  message: error51.message
85010
85932
  })), map16((files) => files.map((file8) => fromNullable(file8.match(/^(?:.*\/)?(\d+)_([^.]+)\.(js|ts)$/))).flatMap(match2({
85011
85933
  onNone: () => [],
85012
- onSome: ([basename, id2, name21]) => [[Number(id2), name21, promise2(() => import(`${directory5}/${basename}`))]]
85934
+ onSome: ([basename, id3, name21]) => [[Number(id3), name21, promise2(() => import(`${directory5}/${basename}`))]]
85013
85935
  })).sort(([a], [b]) => a - b)));
85014
85936
 
85015
85937
  // ../../node_modules/.bun/@effect+sql-libsql@0.39.0+d00fac6ed6378613/node_modules/@effect/sql-libsql/dist/esm/LibsqlMigrator.js
@@ -85725,8 +86647,8 @@ var L = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
85725
86647
  var ct = /\p{M}+/gu;
85726
86648
  var pt = { limit: 1 / 0, ellipsis: "" };
85727
86649
  var X = (t, e = {}, s = {}) => {
85728
- const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n = e?.ellipsisWidth ?? (r ? X(r, pt, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V = s.wideWidth ?? 2;
85729
- let h = 0, o = 0, f = t.length, v = 0, F = false, d = f, b = Math.max(0, i - n), C = 0, B = 0, c = 0, p3 = 0;
86650
+ const i = e.limit ?? 1 / 0, r = e.ellipsis ?? "", n2 = e?.ellipsisWidth ?? (r ? X(r, pt, s).width : 0), u = s.ansiWidth ?? 0, a = s.controlWidth ?? 0, l = s.tabWidth ?? 8, E = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, m = s.fullWidthWidth ?? 2, A = s.regularWidth ?? 1, V = s.wideWidth ?? 2;
86651
+ let h = 0, o = 0, f = t.length, v = 0, F = false, d = f, b = Math.max(0, i - n2), C = 0, B = 0, c = 0, p3 = 0;
85730
86652
  t:
85731
86653
  for (;; ) {
85732
86654
  if (B > C || o >= f && o > h) {
@@ -85786,7 +86708,7 @@ var X = (t, e = {}, s = {}) => {
85786
86708
  }
85787
86709
  o += 1;
85788
86710
  }
85789
- return { width: F ? b : c, index: F ? d : f, truncated: F, ellipsed: F && i >= n };
86711
+ return { width: F ? b : c, index: F ? d : f, truncated: F, ellipsed: F && i >= n2 };
85790
86712
  };
85791
86713
  var ft = { limit: 1 / 0, ellipsis: "", ellipsisWidth: 0 };
85792
86714
  var S = (t, e = {}) => X(t, ft, e).width;
@@ -85824,10 +86746,10 @@ var it = (t) => `${W}${U}${t}${j}`;
85824
86746
  var gt = (t) => t.map((e) => S(e));
85825
86747
  var G = (t, e, s) => {
85826
86748
  const i = e[Symbol.iterator]();
85827
- let r = false, n = false, u = t.at(-1), a = u === undefined ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
86749
+ let r = false, n2 = false, u = t.at(-1), a = u === undefined ? 0 : S(u), l = i.next(), E = i.next(), g = 0;
85828
86750
  for (;!l.done; ) {
85829
86751
  const m = l.value, A = S(m);
85830
- a + A <= s ? t[t.length - 1] += m : (t.push(m), a = 0), (m === W || m === Z) && (r = true, n = e.startsWith(U, g + 1)), r ? n ? m === j && (r = false, n = false) : m === tt && (r = false) : (a += A, a === s && !E.done && (t.push(""), a = 0)), l = E, E = i.next(), g += m.length;
86752
+ a + A <= s ? t[t.length - 1] += m : (t.push(m), a = 0), (m === W || m === Z) && (r = true, n2 = e.startsWith(U, g + 1)), r ? n2 ? m === j && (r = false, n2 = false) : m === tt && (r = false) : (a += A, a === s && !E.done && (t.push(""), a = 0)), l = E, E = i.next(), g += m.length;
85831
86753
  }
85832
86754
  u = t.at(-1), !a && u !== undefined && u.length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
85833
86755
  };
@@ -85841,7 +86763,7 @@ var vt = (t) => {
85841
86763
  var Et = (t, e, s = {}) => {
85842
86764
  if (s.trim !== false && t.trim() === "")
85843
86765
  return "";
85844
- let i = "", r, n;
86766
+ let i = "", r, n2;
85845
86767
  const u = t.split(" "), a = gt(u);
85846
86768
  let l = [""];
85847
86769
  for (const [h, o] of u.entries()) {
@@ -85878,12 +86800,12 @@ var Et = (t, e, s = {}) => {
85878
86800
  const d = Number.parseFloat(F.code);
85879
86801
  r = d === Ft ? undefined : d;
85880
86802
  } else
85881
- F?.uri !== undefined && (n = F.uri.length === 0 ? undefined : F.uri);
86803
+ F?.uri !== undefined && (n2 = F.uri.length === 0 ? undefined : F.uri);
85882
86804
  }
85883
86805
  const f = r ? mt(r) : undefined;
85884
86806
  o === `
85885
- ` ? (n && (i += it("")), r && f && (i += st(f))) : h === `
85886
- ` && (r && f && (i += st(r)), n && (i += it(n))), V += h.length, m = A, A = g.next();
86807
+ ` ? (n2 && (i += it("")), r && f && (i += st(f))) : h === `
86808
+ ` && (r && f && (i += st(r)), n2 && (i += it(n2))), V += h.length, m = A, A = g.next();
85887
86809
  }
85888
86810
  return i;
85889
86811
  };
@@ -85925,10 +86847,10 @@ function _t(t, e) {
85925
86847
  return;
85926
86848
  const s = t.split(`
85927
86849
  `), i = e.split(`
85928
- `), r = Math.max(s.length, i.length), n = [];
86850
+ `), r = Math.max(s.length, i.length), n2 = [];
85929
86851
  for (let u = 0;u < r; u++)
85930
- s[u] !== i[u] && n.push(u);
85931
- return { lines: n, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
86852
+ s[u] !== i[u] && n2.push(u);
86853
+ return { lines: n2, numLinesBefore: s.length, numLinesAfter: i.length, numLines: r };
85932
86854
  }
85933
86855
  var bt = globalThis.process.platform.startsWith("win");
85934
86856
  var z2 = Symbol("clack:cancel");
@@ -85942,7 +86864,7 @@ function T(t, e) {
85942
86864
  function xt({ input: t = q, output: e = R, overwrite: s = true, hideCursor: i = true } = {}) {
85943
86865
  const r = k.createInterface({ input: t, output: e, prompt: "", tabSize: 1 });
85944
86866
  k.emitKeypressEvents(t, r), t instanceof J && t.isTTY && t.setRawMode(true);
85945
- const n = (u, { name: a, sequence: l }) => {
86867
+ const n2 = (u, { name: a, sequence: l }) => {
85946
86868
  const E = String(u);
85947
86869
  if (H([E, a, l], "cancel")) {
85948
86870
  i && e.write(import_sisteransi.cursor.show), process.exit(0);
@@ -85953,12 +86875,12 @@ function xt({ input: t = q, output: e = R, overwrite: s = true, hideCursor: i =
85953
86875
  const g = a === "return" ? 0 : -1, m = a === "return" ? -1 : 0;
85954
86876
  k.moveCursor(e, g, m, () => {
85955
86877
  k.clearLine(e, 1, () => {
85956
- t.once("keypress", n);
86878
+ t.once("keypress", n2);
85957
86879
  });
85958
86880
  });
85959
86881
  };
85960
- return i && e.write(import_sisteransi.cursor.hide), t.once("keypress", n), () => {
85961
- t.off("keypress", n), i && e.write(import_sisteransi.cursor.show), t instanceof J && t.isTTY && !bt && t.setRawMode(false), r.terminal = false, r.close();
86882
+ return i && e.write(import_sisteransi.cursor.hide), t.once("keypress", n2), () => {
86883
+ t.off("keypress", n2), i && e.write(import_sisteransi.cursor.show), t instanceof J && t.isTTY && !bt && t.setRawMode(false), r.terminal = false, r.close();
85962
86884
  };
85963
86885
  }
85964
86886
  var rt = (t) => ("columns" in t) && typeof t.columns == "number" ? t.columns : 80;
@@ -85966,7 +86888,7 @@ var nt = (t) => ("rows" in t) && typeof t.rows == "number" ? t.rows : 20;
85966
86888
  function Bt(t, e, s, i = s) {
85967
86889
  const r = rt(t ?? R);
85968
86890
  return K(e, r - s.length, { hard: true, trim: false }).split(`
85969
- `).map((n, u) => `${u === 0 ? i : s}${n}`).join(`
86891
+ `).map((n2, u) => `${u === 0 ? i : s}${n2}`).join(`
85970
86892
  `);
85971
86893
  }
85972
86894
 
@@ -85986,8 +86908,8 @@ class x {
85986
86908
  value;
85987
86909
  userInput = "";
85988
86910
  constructor(e, s = true) {
85989
- const { input: i = q, output: r = R, render: n, signal: u, ...a } = e;
85990
- this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n.bind(this), this._track = s, this._abortSignal = u, this.input = i, this.output = r;
86911
+ const { input: i = q, output: r = R, render: n2, signal: u, ...a } = e;
86912
+ this.opts = a, this.onKeypress = this.onKeypress.bind(this), this.close = this.close.bind(this), this.render = this.render.bind(this), this._render = n2.bind(this), this._track = s, this._abortSignal = u, this.input = i, this.output = r;
85991
86913
  }
85992
86914
  unsubscribe() {
85993
86915
  this._subscribers.clear();
@@ -86004,10 +86926,10 @@ class x {
86004
86926
  }
86005
86927
  emit(e, ...s) {
86006
86928
  const i = this._subscribers.get(e) ?? [], r = [];
86007
- for (const n of i)
86008
- n.cb(...s), n.once && r.push(() => i.splice(i.indexOf(n), 1));
86009
- for (const n of r)
86010
- n();
86929
+ for (const n2 of i)
86930
+ n2.cb(...s), n2.once && r.push(() => i.splice(i.indexOf(n2), 1));
86931
+ for (const n2 of r)
86932
+ n2();
86011
86933
  }
86012
86934
  prompt() {
86013
86935
  return new Promise((e) => {
@@ -86064,23 +86986,23 @@ class x {
86064
86986
  else {
86065
86987
  const s = _t(this._prevFrame, e), i = nt(this.output);
86066
86988
  if (this.restoreCursor(), s) {
86067
- const r = Math.max(0, s.numLinesAfter - i), n = Math.max(0, s.numLinesBefore - i);
86989
+ const r = Math.max(0, s.numLinesAfter - i), n2 = Math.max(0, s.numLinesBefore - i);
86068
86990
  let u = s.lines.find((a) => a >= r);
86069
86991
  if (u === undefined) {
86070
86992
  this._prevFrame = e;
86071
86993
  return;
86072
86994
  }
86073
86995
  if (s.lines.length === 1) {
86074
- this.output.write(import_sisteransi.cursor.move(0, u - n)), this.output.write(import_sisteransi.erase.lines(1));
86996
+ this.output.write(import_sisteransi.cursor.move(0, u - n2)), this.output.write(import_sisteransi.erase.lines(1));
86075
86997
  const a = e.split(`
86076
86998
  `);
86077
86999
  this.output.write(a[u]), this._prevFrame = e, this.output.write(import_sisteransi.cursor.move(0, a.length - u - 1));
86078
87000
  return;
86079
87001
  } else if (s.lines.length > 1) {
86080
- if (r < n)
87002
+ if (r < n2)
86081
87003
  u = r;
86082
87004
  else {
86083
- const l = u - n;
87005
+ const l = u - n2;
86084
87006
  l > 0 && this.output.write(import_sisteransi.cursor.move(0, l));
86085
87007
  }
86086
87008
  this.output.write(import_sisteransi.erase.down());
@@ -86142,17 +87064,17 @@ class Vt extends x {
86142
87064
  let i;
86143
87065
  if (e.initialValue && Array.isArray(e.initialValue) ? this.multiple ? i = e.initialValue : i = e.initialValue.slice(0, 1) : !this.multiple && this.options.length > 0 && (i = [this.options[0].value]), i)
86144
87066
  for (const r of i) {
86145
- const n = s.findIndex((u) => u.value === r);
86146
- n !== -1 && (this.toggleSelected(r), this.#t = n);
87067
+ const n2 = s.findIndex((u) => u.value === r);
87068
+ n2 !== -1 && (this.toggleSelected(r), this.#t = n2);
86147
87069
  }
86148
- this.focusedValue = this.options[this.#t]?.value, this.on("key", (r, n) => this.#r(r, n)), this.on("userInput", (r) => this.#n(r));
87070
+ this.focusedValue = this.options[this.#t]?.value, this.on("key", (r, n2) => this.#r(r, n2)), this.on("userInput", (r) => this.#n(r));
86149
87071
  }
86150
87072
  _isActionKey(e, s) {
86151
87073
  return e === "\t" || this.multiple && this.isNavigating && s.name === "space" && e !== undefined && e !== "";
86152
87074
  }
86153
87075
  #r(e, s) {
86154
- const i = s.name === "up", r = s.name === "down", n = s.name === "return";
86155
- i || r ? (this.#t = Math.max(0, Math.min(this.#t + (i ? -1 : 1), this.filteredOptions.length - 1)), this.focusedValue = this.filteredOptions[this.#t]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : n ? this.value = St(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== undefined && (s.name === "tab" || this.isNavigating && s.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : (this.focusedValue && (this.selectedValues = [this.focusedValue]), this.isNavigating = false);
87076
+ const i = s.name === "up", r = s.name === "down", n2 = s.name === "return";
87077
+ i || r ? (this.#t = Math.max(0, Math.min(this.#t + (i ? -1 : 1), this.filteredOptions.length - 1)), this.focusedValue = this.filteredOptions[this.#t]?.value, this.multiple || (this.selectedValues = [this.focusedValue]), this.isNavigating = true) : n2 ? this.value = St(this.multiple, this.selectedValues) : this.multiple ? this.focusedValue !== undefined && (s.name === "tab" || this.isNavigating && s.name === "space") ? this.toggleSelected(this.focusedValue) : this.isNavigating = false : (this.focusedValue && (this.selectedValues = [this.focusedValue]), this.isNavigating = false);
86156
87078
  }
86157
87079
  deselectAll() {
86158
87080
  this.selectedValues = [];
@@ -86202,7 +87124,7 @@ class yt extends x {
86202
87124
  const e = this.options[this.cursor];
86203
87125
  if (this.value === undefined && (this.value = []), e.group === true) {
86204
87126
  const s = e.value, i = this.getGroupItems(s);
86205
- this.isGroupSelected(s) ? this.value = this.value.filter((r) => i.findIndex((n) => n.value === r) === -1) : this.value = [...this.value, ...i.map((r) => r.value)], this.value = Array.from(new Set(this.value));
87127
+ this.isGroupSelected(s) ? this.value = this.value.filter((r) => i.findIndex((n2) => n2.value === r) === -1) : this.value = [...this.value, ...i.map((r) => r.value)], this.value = Array.from(new Set(this.value));
86206
87128
  } else {
86207
87129
  const s = this.value.includes(e.value);
86208
87130
  this.value = s ? this.value.filter((i) => i !== e.value) : [...this.value, e.value];
@@ -86211,7 +87133,7 @@ class yt extends x {
86211
87133
  constructor(e) {
86212
87134
  super(e, false);
86213
87135
  const { options: s } = e;
86214
- this.#t = e.selectableGroups !== false, this.options = Object.entries(s).flatMap(([i, r]) => [{ value: i, group: true, label: i }, ...r.map((n) => ({ ...n, group: i }))]), this.value = [...e.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: i }) => i === e.cursorAt), this.#t ? 0 : 1), this.on("cursor", (i) => {
87136
+ this.#t = e.selectableGroups !== false, this.options = Object.entries(s).flatMap(([i, r]) => [{ value: i, group: true, label: i }, ...r.map((n2) => ({ ...n2, group: i }))]), this.value = [...e.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: i }) => i === e.cursorAt), this.#t ? 0 : 1), this.on("cursor", (i) => {
86215
87137
  switch (i) {
86216
87138
  case "left":
86217
87139
  case "up": {
@@ -86235,8 +87157,8 @@ class yt extends x {
86235
87157
  }
86236
87158
  }
86237
87159
  function D(t, e, s) {
86238
- const i = t + e, r = Math.max(s.length - 1, 0), n = i < 0 ? r : i > r ? 0 : i;
86239
- return s[n].disabled ? D(n, e < 0 ? -1 : 1, s) : n;
87160
+ const i = t + e, r = Math.max(s.length - 1, 0), n2 = i < 0 ? r : i > r ? 0 : i;
87161
+ return s[n2].disabled ? D(n2, e < 0 ? -1 : 1, s) : n2;
86240
87162
  }
86241
87163
 
86242
87164
  class Mt extends x {
@@ -86347,10 +87269,10 @@ class Tt extends x {
86347
87269
  constructor(e) {
86348
87270
  super(e, false), this.options = e.options;
86349
87271
  const s = e.caseSensitive === true, i = this.options.map(({ value: [r] }) => s ? r : r?.toLowerCase());
86350
- this.cursor = Math.max(i.indexOf(e.initialValue), 0), this.on("key", (r, n) => {
87272
+ this.cursor = Math.max(i.indexOf(e.initialValue), 0), this.on("key", (r, n2) => {
86351
87273
  if (!r)
86352
87274
  return;
86353
- const u = s && n.shift ? r.toUpperCase() : r;
87275
+ const u = s && n2.shift ? r.toUpperCase() : r;
86354
87276
  if (!i.includes(u))
86355
87277
  return;
86356
87278
  const a = this.options.find(({ value: [l] }) => s ? l === u : l?.toLowerCase() === r);
@@ -86457,7 +87379,7 @@ var ne = /(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y;
86457
87379
  var ft2 = /\p{M}+/gu;
86458
87380
  var Ft2 = { limit: 1 / 0, ellipsis: "" };
86459
87381
  var Le = (e, r = {}, s = {}) => {
86460
- const i = r.limit ?? 1 / 0, n = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (n ? Le(n, Ft2, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, a = s.tabWidth ?? 8, d = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, E = s.fullWidthWidth ?? 2, p3 = s.regularWidth ?? 1, y2 = s.wideWidth ?? 2;
87382
+ const i = r.limit ?? 1 / 0, n2 = r.ellipsis ?? "", o = r?.ellipsisWidth ?? (n2 ? Le(n2, Ft2, s).width : 0), u = s.ansiWidth ?? 0, l = s.controlWidth ?? 0, a = s.tabWidth ?? 8, d = s.ambiguousWidth ?? 1, g = s.emojiWidth ?? 2, E = s.fullWidthWidth ?? 2, p3 = s.regularWidth ?? 1, y2 = s.wideWidth ?? 2;
86461
87383
  let $ = 0, c = 0, m = e.length, f = 0, F = false, v = m, S2 = Math.max(0, i - o), B = 0, b = 0, A = 0, C = 0;
86462
87384
  e:
86463
87385
  for (;; ) {
@@ -86556,10 +87478,10 @@ var Ue = (e) => `${ae}${we}${e}${Ce}`;
86556
87478
  var Ct2 = (e) => e.map((r) => M2(r));
86557
87479
  var Se = (e, r, s) => {
86558
87480
  const i = r[Symbol.iterator]();
86559
- let n = false, o = false, u = e.at(-1), l = u === undefined ? 0 : M2(u), a = i.next(), d = i.next(), g = 0;
87481
+ let n2 = false, o = false, u = e.at(-1), l = u === undefined ? 0 : M2(u), a = i.next(), d = i.next(), g = 0;
86560
87482
  for (;!a.done; ) {
86561
87483
  const E = a.value, p3 = M2(E);
86562
- l + p3 <= s ? e[e.length - 1] += E : (e.push(E), l = 0), (E === ae || E === je) && (n = true, o = r.startsWith(we, g + 1)), n ? o ? E === Ce && (n = false, o = false) : E === ke && (n = false) : (l += p3, l === s && !d.done && (e.push(""), l = 0)), a = d, d = i.next(), g += E.length;
87484
+ l + p3 <= s ? e[e.length - 1] += E : (e.push(E), l = 0), (E === ae || E === je) && (n2 = true, o = r.startsWith(we, g + 1)), n2 ? o ? E === Ce && (n2 = false, o = false) : E === ke && (n2 = false) : (l += p3, l === s && !d.done && (e.push(""), l = 0)), a = d, d = i.next(), g += E.length;
86563
87485
  }
86564
87486
  u = e.at(-1), !l && u !== undefined && u.length > 0 && e.length > 1 && (e[e.length - 2] += e.pop());
86565
87487
  };
@@ -86573,7 +87495,7 @@ var wt2 = (e) => {
86573
87495
  var St2 = (e, r, s = {}) => {
86574
87496
  if (s.trim !== false && e.trim() === "")
86575
87497
  return "";
86576
- let i = "", n, o;
87498
+ let i = "", n2, o;
86577
87499
  const u = e.split(" "), l = Ct2(u);
86578
87500
  let a = [""];
86579
87501
  for (const [$, c] of u.entries()) {
@@ -86608,14 +87530,14 @@ var St2 = (e, r, s = {}) => {
86608
87530
  const F = Ge.exec(d)?.groups;
86609
87531
  if (F?.code !== undefined) {
86610
87532
  const v = Number.parseFloat(F.code);
86611
- n = v === Et2 ? undefined : v;
87533
+ n2 = v === Et2 ? undefined : v;
86612
87534
  } else
86613
87535
  F?.uri !== undefined && (o = F.uri.length === 0 ? undefined : F.uri);
86614
87536
  }
86615
- const m = n ? At2(n) : undefined;
87537
+ const m = n2 ? At2(n2) : undefined;
86616
87538
  c === `
86617
- ` ? (o && (i += Ue("")), n && m && (i += He(m))) : $ === `
86618
- ` && (n && m && (i += He(n)), o && (i += Ue(o))), y2 += $.length, E = p3, p3 = g.next();
87539
+ ` ? (o && (i += Ue("")), n2 && m && (i += He(m))) : $ === `
87540
+ ` && (n2 && m && (i += He(n2)), o && (i += Ue(o))), y2 += $.length, E = p3, p3 = g.next();
86619
87541
  }
86620
87542
  return i;
86621
87543
  };
@@ -86626,17 +87548,17 @@ function q2(e, r, s) {
86626
87548
  `).map((i) => St2(i, r, s)).join(`
86627
87549
  `);
86628
87550
  }
86629
- var It2 = (e, r, s, i, n) => {
87551
+ var It2 = (e, r, s, i, n2) => {
86630
87552
  let o = r, u = 0;
86631
87553
  for (let l = s;l < i; l++) {
86632
87554
  const a = e[l];
86633
- if (o = o - a.length, u++, o <= n)
87555
+ if (o = o - a.length, u++, o <= n2)
86634
87556
  break;
86635
87557
  }
86636
87558
  return { lineCount: o, removals: u };
86637
87559
  };
86638
87560
  var J2 = (e) => {
86639
- const { cursor: r, options: s, style: i } = e, n = e.output ?? process.stdout, o = rt(n), u = e.columnPadding ?? 0, l = e.rowPadding ?? 4, a = o - u, d = nt(n), g = import_picocolors2.default.dim("..."), E = e.maxItems ?? Number.POSITIVE_INFINITY, p3 = Math.max(d - l, 0), y2 = Math.max(Math.min(E, p3), 5);
87561
+ const { cursor: r, options: s, style: i } = e, n2 = e.output ?? process.stdout, o = rt(n2), u = e.columnPadding ?? 0, l = e.rowPadding ?? 4, a = o - u, d = nt(n2), g = import_picocolors2.default.dim("..."), E = e.maxItems ?? Number.POSITIVE_INFINITY, p3 = Math.max(d - l, 0), y2 = Math.max(Math.min(E, p3), 5);
86640
87562
  let $ = 0;
86641
87563
  r >= y2 - 3 && ($ = Math.max(Math.min(r - y2 + 3, s.length - y2), 0));
86642
87564
  let c = y2 < s.length && $ > 0, m = y2 < s.length && $ + y2 < s.length;
@@ -86667,8 +87589,8 @@ function Ke(e) {
86667
87589
  function qe(e, r) {
86668
87590
  if (!e)
86669
87591
  return true;
86670
- const s = (r.label ?? String(r.value ?? "")).toLowerCase(), i = (r.hint ?? "").toLowerCase(), n = String(r.value).toLowerCase(), o = e.toLowerCase();
86671
- return s.includes(o) || i.includes(o) || n.includes(o);
87592
+ const s = (r.label ?? String(r.value ?? "")).toLowerCase(), i = (r.hint ?? "").toLowerCase(), n2 = String(r.value).toLowerCase(), o = e.toLowerCase();
87593
+ return s.includes(o) || i.includes(o) || n2.includes(o);
86672
87594
  }
86673
87595
  function Bt2(e, r) {
86674
87596
  const s = [];
@@ -86677,7 +87599,7 @@ function Bt2(e, r) {
86677
87599
  return s;
86678
87600
  }
86679
87601
  var Je = (e) => new Vt({ options: e.options, initialValue: e.initialValue ? [e.initialValue] : undefined, initialUserInput: e.initialUserInput, filter: e.filter ?? ((r, s) => qe(r, s)), signal: e.signal, input: e.input, output: e.output, validate: e.validate, render() {
86680
- const r = [`${import_picocolors2.default.gray(h)}`, `${N2(this.state)} ${e.message}`], s = this.userInput, i = this.options, n = e.placeholder, o = s === "" && n !== undefined;
87602
+ const r = [`${import_picocolors2.default.gray(h)}`, `${N2(this.state)} ${e.message}`], s = this.userInput, i = this.options, n2 = e.placeholder, o = s === "" && n2 !== undefined;
86681
87603
  switch (this.state) {
86682
87604
  case "submit": {
86683
87605
  const u = Bt2(this.selectedValues, i), l = u.length > 0 ? ` ${import_picocolors2.default.dim(u.map(Ke).join(", "))}` : "";
@@ -86695,7 +87617,7 @@ ${import_picocolors2.default.gray(h)}${u}`;
86695
87617
  const u = `${(this.state === "error" ? import_picocolors2.default.yellow : import_picocolors2.default.cyan)(h)} `, l = (this.state === "error" ? import_picocolors2.default.yellow : import_picocolors2.default.cyan)(x2);
86696
87618
  let a = "";
86697
87619
  if (this.isNavigating || o) {
86698
- const c = o ? n : s;
87620
+ const c = o ? n2 : s;
86699
87621
  a = c !== "" ? ` ${import_picocolors2.default.dim(c)}` : "";
86700
87622
  } else
86701
87623
  a = ` ${this.userInputWithCursor}`;
@@ -86711,23 +87633,23 @@ ${import_picocolors2.default.gray(h)}${u}`;
86711
87633
  }
86712
87634
  } }).prompt();
86713
87635
  var bt2 = (e) => {
86714
- const r = (i, n, o, u) => {
87636
+ const r = (i, n2, o, u) => {
86715
87637
  const l = o.includes(i.value), a = i.label ?? String(i.value ?? ""), d = i.hint && u !== undefined && i.value === u ? import_picocolors2.default.dim(` (${i.hint})`) : "", g = l ? import_picocolors2.default.green(G2) : import_picocolors2.default.dim(z3);
86716
- return n ? `${g} ${a}${d}` : `${g} ${import_picocolors2.default.dim(a)}`;
86717
- }, s = new Vt({ options: e.options, multiple: true, filter: e.filter ?? ((i, n) => qe(i, n)), validate: () => {
87638
+ return n2 ? `${g} ${a}${d}` : `${g} ${import_picocolors2.default.dim(a)}`;
87639
+ }, s = new Vt({ options: e.options, multiple: true, filter: e.filter ?? ((i, n2) => qe(i, n2)), validate: () => {
86718
87640
  if (e.required && s.selectedValues.length === 0)
86719
87641
  return "Please select at least one item";
86720
87642
  }, initialValue: e.initialValues, signal: e.signal, input: e.input, output: e.output, render() {
86721
87643
  const i = `${import_picocolors2.default.gray(h)}
86722
87644
  ${N2(this.state)} ${e.message}
86723
- `, n = this.userInput, o = e.placeholder, u = n === "" && o !== undefined, l = this.isNavigating || u ? import_picocolors2.default.dim(u ? o : n) : this.userInputWithCursor, a = this.options, d = this.filteredOptions.length !== a.length ? import_picocolors2.default.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "";
87645
+ `, n2 = this.userInput, o = e.placeholder, u = n2 === "" && o !== undefined, l = this.isNavigating || u ? import_picocolors2.default.dim(u ? o : n2) : this.userInputWithCursor, a = this.options, d = this.filteredOptions.length !== a.length ? import_picocolors2.default.dim(` (${this.filteredOptions.length} match${this.filteredOptions.length === 1 ? "" : "es"})`) : "";
86724
87646
  switch (this.state) {
86725
87647
  case "submit":
86726
87648
  return `${i}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.dim(`${this.selectedValues.length} items selected`)}`;
86727
87649
  case "cancel":
86728
- return `${i}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n))}`;
87650
+ return `${i}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n2))}`;
86729
87651
  default: {
86730
- const g = this.state === "error" ? import_picocolors2.default.yellow : import_picocolors2.default.cyan, E = [`${import_picocolors2.default.dim("\u2191/\u2193")} to navigate`, `${import_picocolors2.default.dim(this.isNavigating ? "Space/Tab:" : "Tab:")} select`, `${import_picocolors2.default.dim("Enter:")} confirm`, `${import_picocolors2.default.dim("Type:")} to search`], p3 = this.filteredOptions.length === 0 && n ? [`${g(h)} ${import_picocolors2.default.yellow("No matches found")}`] : [], y2 = this.state === "error" ? [`${g(h)} ${import_picocolors2.default.yellow(this.error)}`] : [], $ = [...`${i}${g(h)}`.split(`
87652
+ const g = this.state === "error" ? import_picocolors2.default.yellow : import_picocolors2.default.cyan, E = [`${import_picocolors2.default.dim("\u2191/\u2193")} to navigate`, `${import_picocolors2.default.dim(this.isNavigating ? "Space/Tab:" : "Tab:")} select`, `${import_picocolors2.default.dim("Enter:")} confirm`, `${import_picocolors2.default.dim("Type:")} to search`], p3 = this.filteredOptions.length === 0 && n2 ? [`${g(h)} ${import_picocolors2.default.yellow("No matches found")}`] : [], y2 = this.state === "error" ? [`${g(h)} ${import_picocolors2.default.yellow(this.error)}`] : [], $ = [...`${i}${g(h)}`.split(`
86731
87653
  `), `${g(h)} ${import_picocolors2.default.dim("Search:")} ${l}${d}`, ...p3, ...y2], c = [`${g(h)} ${import_picocolors2.default.dim(E.join(" \u2022 "))}`, `${g(x2)}`], m = J2({ cursor: this.cursor, options: this.filteredOptions, style: (f, F) => r(f, F, this.selectedValues, this.focusedValue), maxItems: e.maxItems, output: e.output, rowPadding: $.length + c.length });
86732
87654
  return [...$, ...m.map((f) => `${g(h)} ${f}`), ...c].join(`
86733
87655
  `);
@@ -86739,13 +87661,13 @@ ${N2(this.state)} ${e.message}
86739
87661
  var xt2 = [We, he, pe, me];
86740
87662
  var _t2 = [$e, Re, x2, Oe];
86741
87663
  function Xe(e, r, s, i) {
86742
- let n = s, o = s;
86743
- return i === "center" ? n = Math.floor((r - e) / 2) : i === "right" && (n = r - e - s), o = r - n - e, [n, o];
87664
+ let n2 = s, o = s;
87665
+ return i === "center" ? n2 = Math.floor((r - e) / 2) : i === "right" && (n2 = r - e - s), o = r - n2 - e, [n2, o];
86744
87666
  }
86745
87667
  var Dt2 = (e) => e;
86746
87668
  var Tt2 = (e = "", r = "", s) => {
86747
- const i = s?.output ?? process.stdout, n = rt(i), o = 2, u = s?.titlePadding ?? 1, l = s?.contentPadding ?? 2, a = s?.width === undefined || s.width === "auto" ? 1 : Math.min(1, s.width), d = (s?.withGuide ?? _.withGuide) !== false ? `${h} ` : "", g = s?.formatBorder ?? Dt2, E = ((s?.rounded) ? xt2 : _t2).map(g), p3 = g(se), y2 = g(h), $ = M2(d), c = M2(r), m = n - $;
86748
- let f = Math.floor(n * a) - $;
87669
+ const i = s?.output ?? process.stdout, n2 = rt(i), o = 2, u = s?.titlePadding ?? 1, l = s?.contentPadding ?? 2, a = s?.width === undefined || s.width === "auto" ? 1 : Math.min(1, s.width), d = (s?.withGuide ?? _.withGuide) !== false ? `${h} ` : "", g = s?.formatBorder ?? Dt2, E = ((s?.rounded) ? xt2 : _t2).map(g), p3 = g(se), y2 = g(h), $ = M2(d), c = M2(r), m = n2 - $;
87670
+ let f = Math.floor(n2 * a) - $;
86749
87671
  if (s?.width === "auto") {
86750
87672
  const _2 = e.split(`
86751
87673
  `);
@@ -86776,12 +87698,12 @@ var Mt2 = (e) => {
86776
87698
  return new kt({ active: r, inactive: s, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue ?? true, render() {
86777
87699
  const i = `${import_picocolors2.default.gray(h)}
86778
87700
  ${N2(this.state)} ${e.message}
86779
- `, n = this.value ? r : s;
87701
+ `, n2 = this.value ? r : s;
86780
87702
  switch (this.state) {
86781
87703
  case "submit":
86782
- return `${i}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.dim(n)}`;
87704
+ return `${i}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.dim(n2)}`;
86783
87705
  case "cancel":
86784
- return `${i}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n))}
87706
+ return `${i}${import_picocolors2.default.gray(h)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n2))}
86785
87707
  ${import_picocolors2.default.gray(h)}`;
86786
87708
  default:
86787
87709
  return `${i}${import_picocolors2.default.cyan(h)} ${this.value ? `${import_picocolors2.default.green(Y)} ${r}` : `${import_picocolors2.default.dim(K2)} ${import_picocolors2.default.dim(r)}`} ${import_picocolors2.default.dim("/")} ${this.value ? `${import_picocolors2.default.dim(K2)} ${import_picocolors2.default.dim(s)}` : `${import_picocolors2.default.green(Y)} ${s}`}
@@ -86792,15 +87714,15 @@ ${import_picocolors2.default.cyan(x2)}
86792
87714
  };
86793
87715
  var Rt = async (e, r) => {
86794
87716
  const s = {}, i = Object.keys(e);
86795
- for (const n of i) {
86796
- const o = e[n], u = await o({ results: s })?.catch((l) => {
87717
+ for (const n2 of i) {
87718
+ const o = e[n2], u = await o({ results: s })?.catch((l) => {
86797
87719
  throw l;
86798
87720
  });
86799
87721
  if (typeof r?.onCancel == "function" && Ct(u)) {
86800
- s[n] = "canceled", r.onCancel({ results: s });
87722
+ s[n2] = "canceled", r.onCancel({ results: s });
86801
87723
  continue;
86802
87724
  }
86803
- s[n] = u;
87725
+ s[n2] = u;
86804
87726
  }
86805
87727
  return s;
86806
87728
  };
@@ -86831,9 +87753,9 @@ ${import_picocolors2.default.cyan(h)}`;
86831
87753
  return `${import_picocolors2.default.dim(a)}`;
86832
87754
  const $ = d || r ? import_picocolors2.default.dim(z3) : "";
86833
87755
  return `${y2}${import_picocolors2.default.dim(p3)}${$} ${import_picocolors2.default.dim(a)}`;
86834
- }, n = e.required ?? true;
86835
- return new yt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: n, cursorAt: e.cursorAt, selectableGroups: r, validate(o) {
86836
- if (n && (o === undefined || o.length === 0))
87756
+ }, n2 = e.required ?? true;
87757
+ return new yt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: n2, cursorAt: e.cursorAt, selectableGroups: r, validate(o) {
87758
+ if (n2 && (o === undefined || o.length === 0))
86837
87759
  return `Please select at least one option.
86838
87760
  ${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
86839
87761
  }, render() {
@@ -86878,9 +87800,9 @@ ${import_picocolors2.default.cyan(x2)}
86878
87800
  }
86879
87801
  } }).prompt();
86880
87802
  };
86881
- var R2 = { message: (e = [], { symbol: r = import_picocolors2.default.gray(h), secondarySymbol: s = import_picocolors2.default.gray(h), output: i = process.stdout, spacing: n = 1, withGuide: o } = {}) => {
87803
+ var R2 = { message: (e = [], { symbol: r = import_picocolors2.default.gray(h), secondarySymbol: s = import_picocolors2.default.gray(h), output: i = process.stdout, spacing: n2 = 1, withGuide: o } = {}) => {
86882
87804
  const u = [], l = (o ?? _.withGuide) !== false, a = l ? s : "", d = l ? `${r} ` : "", g = l ? `${s} ` : "";
86883
- for (let p3 = 0;p3 < n; p3++)
87805
+ for (let p3 = 0;p3 < n2; p3++)
86884
87806
  u.push(a);
86885
87807
  const E = Array.isArray(e) ? e : e.split(`
86886
87808
  `);
@@ -86925,16 +87847,16 @@ var Q2 = (e, r) => e.split(`
86925
87847
  `).map((s) => r(s)).join(`
86926
87848
  `);
86927
87849
  var Lt2 = (e) => {
86928
- const r = (i, n) => {
87850
+ const r = (i, n2) => {
86929
87851
  const o = i.label ?? String(i.value);
86930
- return n === "disabled" ? `${import_picocolors2.default.gray(z3)} ${Q2(o, (u) => import_picocolors2.default.strikethrough(import_picocolors2.default.gray(u)))}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint ?? "disabled"})`)}` : ""}` : n === "active" ? `${import_picocolors2.default.cyan(te)} ${o}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "selected" ? `${import_picocolors2.default.green(G2)} ${Q2(o, import_picocolors2.default.dim)}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "cancelled" ? `${Q2(o, (u) => import_picocolors2.default.strikethrough(import_picocolors2.default.dim(u)))}` : n === "active-selected" ? `${import_picocolors2.default.green(G2)} ${o}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n === "submitted" ? `${Q2(o, import_picocolors2.default.dim)}` : `${import_picocolors2.default.dim(z3)} ${Q2(o, import_picocolors2.default.dim)}`;
87852
+ return n2 === "disabled" ? `${import_picocolors2.default.gray(z3)} ${Q2(o, (u) => import_picocolors2.default.strikethrough(import_picocolors2.default.gray(u)))}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint ?? "disabled"})`)}` : ""}` : n2 === "active" ? `${import_picocolors2.default.cyan(te)} ${o}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n2 === "selected" ? `${import_picocolors2.default.green(G2)} ${Q2(o, import_picocolors2.default.dim)}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n2 === "cancelled" ? `${Q2(o, (u) => import_picocolors2.default.strikethrough(import_picocolors2.default.dim(u)))}` : n2 === "active-selected" ? `${import_picocolors2.default.green(G2)} ${o}${i.hint ? ` ${import_picocolors2.default.dim(`(${i.hint})`)}` : ""}` : n2 === "submitted" ? `${Q2(o, import_picocolors2.default.dim)}` : `${import_picocolors2.default.dim(z3)} ${Q2(o, import_picocolors2.default.dim)}`;
86931
87853
  }, s = e.required ?? true;
86932
87854
  return new Mt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValues: e.initialValues, required: s, cursorAt: e.cursorAt, validate(i) {
86933
87855
  if (s && (i === undefined || i.length === 0))
86934
87856
  return `Please select at least one option.
86935
87857
  ${import_picocolors2.default.reset(import_picocolors2.default.dim(`Press ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" space ")))} to select, ${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(" enter ")))} to submit`))}`;
86936
87858
  }, render() {
86937
- const i = Bt(e.output, e.message, `${Ee(this.state)} `, `${N2(this.state)} `), n = `${import_picocolors2.default.gray(h)}
87859
+ const i = Bt(e.output, e.message, `${Ee(this.state)} `, `${N2(this.state)} `), n2 = `${import_picocolors2.default.gray(h)}
86938
87860
  ${i}
86939
87861
  `, o = this.value ?? [], u = (l, a) => {
86940
87862
  if (l.disabled)
@@ -86945,31 +87867,31 @@ ${i}
86945
87867
  switch (this.state) {
86946
87868
  case "submit": {
86947
87869
  const l = this.options.filter(({ value: d }) => o.includes(d)).map((d) => r(d, "submitted")).join(import_picocolors2.default.dim(", ")) || import_picocolors2.default.dim("none"), a = Bt(e.output, l, `${import_picocolors2.default.gray(h)} `);
86948
- return `${n}${a}`;
87870
+ return `${n2}${a}`;
86949
87871
  }
86950
87872
  case "cancel": {
86951
87873
  const l = this.options.filter(({ value: d }) => o.includes(d)).map((d) => r(d, "cancelled")).join(import_picocolors2.default.dim(", "));
86952
87874
  if (l.trim() === "")
86953
- return `${n}${import_picocolors2.default.gray(h)}`;
87875
+ return `${n2}${import_picocolors2.default.gray(h)}`;
86954
87876
  const a = Bt(e.output, l, `${import_picocolors2.default.gray(h)} `);
86955
- return `${n}${a}
87877
+ return `${n2}${a}
86956
87878
  ${import_picocolors2.default.gray(h)}`;
86957
87879
  }
86958
87880
  case "error": {
86959
87881
  const l = `${import_picocolors2.default.yellow(h)} `, a = this.error.split(`
86960
87882
  `).map((E, p3) => p3 === 0 ? `${import_picocolors2.default.yellow(x2)} ${import_picocolors2.default.yellow(E)}` : ` ${E}`).join(`
86961
- `), d = n.split(`
87883
+ `), d = n2.split(`
86962
87884
  `).length, g = a.split(`
86963
87885
  `).length + 1;
86964
- return `${n}${l}${J2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: d + g, style: u }).join(`
87886
+ return `${n2}${l}${J2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: d + g, style: u }).join(`
86965
87887
  ${l}`)}
86966
87888
  ${a}
86967
87889
  `;
86968
87890
  }
86969
87891
  default: {
86970
- const l = `${import_picocolors2.default.cyan(h)} `, a = n.split(`
87892
+ const l = `${import_picocolors2.default.cyan(h)} `, a = n2.split(`
86971
87893
  `).length;
86972
- return `${n}${l}${J2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: a + 2, style: u }).join(`
87894
+ return `${n2}${l}${J2({ output: e.output, options: this.options, cursor: this.cursor, maxItems: e.maxItems, columnPadding: l.length, rowPadding: a + 2, style: u }).join(`
86973
87895
  ${l}`)}
86974
87896
  ${import_picocolors2.default.cyan(x2)}
86975
87897
  `;
@@ -86979,18 +87901,18 @@ ${import_picocolors2.default.cyan(x2)}
86979
87901
  };
86980
87902
  var jt = (e) => import_picocolors2.default.dim(e);
86981
87903
  var Vt2 = (e, r, s) => {
86982
- const i = { hard: true, trim: false }, n = q2(e, r, i).split(`
86983
- `), o = n.reduce((a, d) => Math.max(M2(d), a), 0), u = n.map(s).reduce((a, d) => Math.max(M2(d), a), 0), l = r - (u - o);
87904
+ const i = { hard: true, trim: false }, n2 = q2(e, r, i).split(`
87905
+ `), o = n2.reduce((a, d) => Math.max(M2(d), a), 0), u = n2.map(s).reduce((a, d) => Math.max(M2(d), a), 0), l = r - (u - o);
86984
87906
  return q2(e, l, i);
86985
87907
  };
86986
87908
  var kt2 = (e = "", r = "", s) => {
86987
- const i = s?.output ?? P2.stdout, n = (s?.withGuide ?? _.withGuide) !== false, o = s?.format ?? jt, u = ["", ...Vt2(e, rt(i) - 6, o).split(`
87909
+ const i = s?.output ?? P2.stdout, n2 = (s?.withGuide ?? _.withGuide) !== false, o = s?.format ?? jt, u = ["", ...Vt2(e, rt(i) - 6, o).split(`
86988
87910
  `).map(o), ""], l = M2(r), a = Math.max(u.reduce((p3, y2) => {
86989
87911
  const $ = M2(y2);
86990
87912
  return $ > p3 ? $ : p3;
86991
87913
  }, 0), l) + 2, d = u.map((p3) => `${import_picocolors2.default.gray(h)} ${p3}${" ".repeat(a - M2(p3))}${import_picocolors2.default.gray(h)}`).join(`
86992
- `), g = n ? `${import_picocolors2.default.gray(h)}
86993
- ` : "", E = n ? Ne : pe;
87914
+ `), g = n2 ? `${import_picocolors2.default.gray(h)}
87915
+ ` : "", E = n2 ? Ne : pe;
86994
87916
  i.write(`${g}${import_picocolors2.default.green(k2)} ${import_picocolors2.default.reset(r)} ${import_picocolors2.default.gray(se.repeat(Math.max(a - l - 1, 1)) + he)}
86995
87917
  ${d}
86996
87918
  ${import_picocolors2.default.gray(E + se.repeat(a + 2) + me)}
@@ -87002,19 +87924,19 @@ ${N2(this.state)} ${e.message}
87002
87924
  `, s = this.userInputWithCursor, i = this.masked;
87003
87925
  switch (this.state) {
87004
87926
  case "error": {
87005
- const n = i ? ` ${i}` : "";
87927
+ const n2 = i ? ` ${i}` : "";
87006
87928
  return e.clearOnError && this.clear(), `${r.trim()}
87007
- ${import_picocolors2.default.yellow(h)}${n}
87929
+ ${import_picocolors2.default.yellow(h)}${n2}
87008
87930
  ${import_picocolors2.default.yellow(x2)} ${import_picocolors2.default.yellow(this.error)}
87009
87931
  `;
87010
87932
  }
87011
87933
  case "submit": {
87012
- const n = i ? ` ${import_picocolors2.default.dim(i)}` : "";
87013
- return `${r}${import_picocolors2.default.gray(h)}${n}`;
87934
+ const n2 = i ? ` ${import_picocolors2.default.dim(i)}` : "";
87935
+ return `${r}${import_picocolors2.default.gray(h)}${n2}`;
87014
87936
  }
87015
87937
  case "cancel": {
87016
- const n = i ? ` ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i))}` : "";
87017
- return `${r}${import_picocolors2.default.gray(h)}${n}${i ? `
87938
+ const n2 = i ? ` ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(i))}` : "";
87939
+ return `${r}${import_picocolors2.default.gray(h)}${n2}${i ? `
87018
87940
  ${import_picocolors2.default.gray(h)}` : ""}`;
87019
87941
  }
87020
87942
  default:
@@ -87038,21 +87960,21 @@ var Ht = (e) => {
87038
87960
  return [];
87039
87961
  try {
87040
87962
  let i;
87041
- return dt2(s) ? be(s).isDirectory() ? i = s : i = xe(s) : i = xe(s), ct2(i).map((n) => {
87042
- const o = $t2(i, n), u = be(o);
87043
- return { name: n, path: o, isDirectory: u.isDirectory() };
87044
- }).filter(({ path: n, isDirectory: o }) => n.startsWith(s) && (e.directory || !o)).map((n) => ({ value: n.path }));
87963
+ return dt2(s) ? be(s).isDirectory() ? i = s : i = xe(s) : i = xe(s), ct2(i).map((n2) => {
87964
+ const o = $t2(i, n2), u = be(o);
87965
+ return { name: n2, path: o, isDirectory: u.isDirectory() };
87966
+ }).filter(({ path: n2, isDirectory: o }) => n2.startsWith(s) && (e.directory || !o)).map((n2) => ({ value: n2.path }));
87045
87967
  } catch {
87046
87968
  return [];
87047
87969
  }
87048
87970
  } });
87049
87971
  };
87050
87972
  var Ut = import_picocolors2.default.magenta;
87051
- var Ie = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: n, frames: o = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u = ee ? 80 : 120, signal: l, ...a } = {}) => {
87973
+ var Ie = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, cancelMessage: i, errorMessage: n2, frames: o = ee ? ["\u25D2", "\u25D0", "\u25D3", "\u25D1"] : ["\u2022", "o", "O", "0"], delay: u = ee ? 80 : 120, signal: l, ...a } = {}) => {
87052
87974
  const d = ue();
87053
87975
  let g, E, p3 = false, y2 = false, $ = "", c, m = performance.now();
87054
87976
  const f = rt(s), F = a?.styleFrame ?? Ut, v = (I2) => {
87055
- const O2 = I2 > 1 ? n ?? _.messages.error : i ?? _.messages.cancel;
87977
+ const O2 = I2 > 1 ? n2 ?? _.messages.error : i ?? _.messages.cancel;
87056
87978
  y2 = I2 === 1, p3 && (W2(O2, I2), y2 && typeof r == "function" && r());
87057
87979
  }, S2 = () => v(2), B = () => v(1), b = () => {
87058
87980
  process.on("uncaughtExceptionMonitor", S2), process.on("unhandledRejection", S2), process.on("SIGINT", B), process.on("SIGTERM", B), process.on("exit", v), l && l.addEventListener("abort", B);
@@ -87107,7 +88029,7 @@ var Ie = ({ indicator: e = "dots", onCancel: r, output: s = process.stdout, canc
87107
88029
  };
87108
88030
  var Ye = { light: w2("\u2500", "-"), heavy: w2("\u2501", "="), block: w2("\u2588", "#") };
87109
88031
  function Kt({ style: e = "heavy", max: r = 100, size: s = 40, ...i } = {}) {
87110
- const n = Ie(i);
88032
+ const n2 = Ie(i);
87111
88033
  let o = 0, u = "";
87112
88034
  const l = Math.max(1, r), a = Math.max(1, s), d = (y2) => {
87113
88035
  switch (y2) {
@@ -87126,11 +88048,11 @@ function Kt({ style: e = "heavy", max: r = 100, size: s = 40, ...i } = {}) {
87126
88048
  const c = Math.floor(o / l * a);
87127
88049
  return `${d(y2)(Ye[e].repeat(c))}${import_picocolors2.default.dim(Ye[e].repeat(a - c))} ${$}`;
87128
88050
  }, E = (y2 = "") => {
87129
- u = y2, n.start(g("initial", y2));
88051
+ u = y2, n2.start(g("initial", y2));
87130
88052
  }, p3 = (y2 = 1, $) => {
87131
- o = Math.min(l, y2 + o), n.message(g("active", $ ?? u)), u = $ ?? u;
88053
+ o = Math.min(l, y2 + o), n2.message(g("active", $ ?? u)), u = $ ?? u;
87132
88054
  };
87133
- return { start: E, stop: n.stop, cancel: n.cancel, error: n.error, clear: n.clear, advance: p3, isCancelled: n.isCancelled, message: (y2) => p3(0, y2) };
88055
+ return { start: E, stop: n2.stop, cancel: n2.cancel, error: n2.error, clear: n2.clear, advance: p3, isCancelled: n2.isCancelled, message: (y2) => p3(0, y2) };
87134
88056
  }
87135
88057
  var oe = (e, r) => e.includes(`
87136
88058
  `) ? e.split(`
@@ -87138,23 +88060,23 @@ var oe = (e, r) => e.includes(`
87138
88060
  `) : r(e);
87139
88061
  var qt = (e) => {
87140
88062
  const r = (s, i) => {
87141
- const n = s.label ?? String(s.value);
88063
+ const n2 = s.label ?? String(s.value);
87142
88064
  switch (i) {
87143
88065
  case "disabled":
87144
- return `${import_picocolors2.default.gray(K2)} ${oe(n, import_picocolors2.default.gray)}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint ?? "disabled"})`)}` : ""}`;
88066
+ return `${import_picocolors2.default.gray(K2)} ${oe(n2, import_picocolors2.default.gray)}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint ?? "disabled"})`)}` : ""}`;
87145
88067
  case "selected":
87146
- return `${oe(n, import_picocolors2.default.dim)}`;
88068
+ return `${oe(n2, import_picocolors2.default.dim)}`;
87147
88069
  case "active":
87148
- return `${import_picocolors2.default.green(Y)} ${n}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}`;
88070
+ return `${import_picocolors2.default.green(Y)} ${n2}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}`;
87149
88071
  case "cancelled":
87150
- return `${oe(n, (o) => import_picocolors2.default.strikethrough(import_picocolors2.default.dim(o)))}`;
88072
+ return `${oe(n2, (o) => import_picocolors2.default.strikethrough(import_picocolors2.default.dim(o)))}`;
87151
88073
  default:
87152
- return `${import_picocolors2.default.dim(K2)} ${oe(n, import_picocolors2.default.dim)}`;
88074
+ return `${import_picocolors2.default.dim(K2)} ${oe(n2, import_picocolors2.default.dim)}`;
87153
88075
  }
87154
88076
  };
87155
88077
  return new Wt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, render() {
87156
- const s = `${N2(this.state)} `, i = `${Ee(this.state)} `, n = Bt(e.output, e.message, i, s), o = `${import_picocolors2.default.gray(h)}
87157
- ${n}
88078
+ const s = `${N2(this.state)} `, i = `${Ee(this.state)} `, n2 = Bt(e.output, e.message, i, s), o = `${import_picocolors2.default.gray(h)}
88079
+ ${n2}
87158
88080
  `;
87159
88081
  switch (this.state) {
87160
88082
  case "submit": {
@@ -87179,8 +88101,8 @@ ${import_picocolors2.default.cyan(x2)}
87179
88101
  };
87180
88102
  var Jt = (e) => {
87181
88103
  const r = (s, i = "inactive") => {
87182
- const n = s.label ?? String(s.value);
87183
- return i === "selected" ? `${import_picocolors2.default.dim(n)}` : i === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n))}` : i === "active" ? `${import_picocolors2.default.bgCyan(import_picocolors2.default.gray(` ${s.value} `))} ${n}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}` : `${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(` ${s.value} `)))} ${n}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}`;
88104
+ const n2 = s.label ?? String(s.value);
88105
+ return i === "selected" ? `${import_picocolors2.default.dim(n2)}` : i === "cancelled" ? `${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(n2))}` : i === "active" ? `${import_picocolors2.default.bgCyan(import_picocolors2.default.gray(` ${s.value} `))} ${n2}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}` : `${import_picocolors2.default.gray(import_picocolors2.default.bgWhite(import_picocolors2.default.inverse(` ${s.value} `)))} ${n2}${s.hint ? ` ${import_picocolors2.default.dim(`(${s.hint})`)}` : ""}`;
87184
88106
  };
87185
88107
  return new Tt({ options: e.options, signal: e.signal, input: e.input, output: e.output, initialValue: e.initialValue, caseSensitive: e.caseSensitive, render() {
87186
88108
  const s = `${import_picocolors2.default.gray(h)}
@@ -87188,18 +88110,18 @@ ${N2(this.state)} ${e.message}
87188
88110
  `;
87189
88111
  switch (this.state) {
87190
88112
  case "submit": {
87191
- const i = `${import_picocolors2.default.gray(h)} `, n = this.options.find((u) => u.value === this.value) ?? e.options[0], o = Bt(e.output, r(n, "selected"), i);
88113
+ const i = `${import_picocolors2.default.gray(h)} `, n2 = this.options.find((u) => u.value === this.value) ?? e.options[0], o = Bt(e.output, r(n2, "selected"), i);
87192
88114
  return `${s}${o}`;
87193
88115
  }
87194
88116
  case "cancel": {
87195
- const i = `${import_picocolors2.default.gray(h)} `, n = Bt(e.output, r(this.options[0], "cancelled"), i);
87196
- return `${s}${n}
88117
+ const i = `${import_picocolors2.default.gray(h)} `, n2 = Bt(e.output, r(this.options[0], "cancelled"), i);
88118
+ return `${s}${n2}
87197
88119
  ${import_picocolors2.default.gray(h)}`;
87198
88120
  }
87199
88121
  default: {
87200
- const i = `${import_picocolors2.default.cyan(h)} `, n = this.options.map((o, u) => Bt(e.output, r(o, u === this.cursor ? "active" : "inactive"), i)).join(`
88122
+ const i = `${import_picocolors2.default.cyan(h)} `, n2 = this.options.map((o, u) => Bt(e.output, r(o, u === this.cursor ? "active" : "inactive"), i)).join(`
87201
88123
  `);
87202
- return `${s}${n}
88124
+ return `${s}${n2}
87203
88125
  ${import_picocolors2.default.cyan(x2)}
87204
88126
  `;
87205
88127
  }
@@ -87216,8 +88138,8 @@ ${r} `);
87216
88138
  ${ze}`), i.includes(`
87217
88139
  `) && (s = 3 + le(i.slice(i.lastIndexOf(`
87218
88140
  `))).length);
87219
- const n = le(i).length;
87220
- s + n < process.stdout.columns ? (s += n, process.stdout.write(i)) : (process.stdout.write(`
88141
+ const n2 = le(i).length;
88142
+ s + n2 < process.stdout.columns ? (s += n2, process.stdout.write(i)) : (process.stdout.write(`
87221
88143
  ${ze}${i.trimStart()}`), s = 3 + le(i.trimStart()).length);
87222
88144
  }
87223
88145
  process.stdout.write(`
@@ -87229,17 +88151,17 @@ var Xt = async (e, r) => {
87229
88151
  continue;
87230
88152
  const i = Ie(r);
87231
88153
  i.start(s.title);
87232
- const n = await s.task(i.message);
87233
- i.stop(n || s.title);
88154
+ const n2 = await s.task(i.message);
88155
+ i.stop(n2 || s.title);
87234
88156
  }
87235
88157
  };
87236
88158
  var Yt = (e) => e.replace(/\x1b\[(?:\d+;)*\d*[ABCDEFGHfJKSTsu]|\x1b\[(s|u)/g, "");
87237
88159
  var zt = (e) => {
87238
- const r = e.output ?? process.stdout, s = rt(r), i = import_picocolors2.default.gray(h), n = e.spacing ?? 1, o = 3, u = e.retainLog === true, l = !ue() && Te(r);
88160
+ const r = e.output ?? process.stdout, s = rt(r), i = import_picocolors2.default.gray(h), n2 = e.spacing ?? 1, o = 3, u = e.retainLog === true, l = !ue() && Te(r);
87239
88161
  r.write(`${i}
87240
88162
  `), r.write(`${import_picocolors2.default.green(k2)} ${e.title}
87241
88163
  `);
87242
- for (let m = 0;m < n; m++)
88164
+ for (let m = 0;m < n2; m++)
87243
88165
  r.write(`${i}
87244
88166
  `);
87245
88167
  const a = [{ value: "", full: "" }];
@@ -87248,7 +88170,7 @@ var zt = (e) => {
87248
88170
  if (a.length === 0)
87249
88171
  return;
87250
88172
  let f = 0;
87251
- m && (f += n + 2);
88173
+ m && (f += n2 + 2);
87252
88174
  for (const F of a) {
87253
88175
  const { value: v, result: S2 } = F;
87254
88176
  let B = S2?.message ?? v;
@@ -87266,7 +88188,7 @@ ${F.header}`);
87266
88188
  ${m.value}` : m.value;
87267
88189
  m.header !== undefined && m.header !== "" && R2.message(m.header.split(`
87268
88190
  `).map(import_picocolors2.default.bold), { output: r, secondarySymbol: i, symbol: i, spacing: 0 }), R2.message(v.split(`
87269
- `).map(import_picocolors2.default.dim), { output: r, secondarySymbol: i, symbol: i, spacing: f ?? n });
88191
+ `).map(import_picocolors2.default.dim), { output: r, secondarySymbol: i, symbol: i, spacing: f ?? n2 });
87270
88192
  }, p3 = () => {
87271
88193
  for (const m of a) {
87272
88194
  const { header: f, value: F, full: v } = m;
@@ -87313,12 +88235,12 @@ ${m.value}` : m.value;
87313
88235
  var Qt = (e) => new $t({ validate: e.validate, placeholder: e.placeholder, defaultValue: e.defaultValue, initialValue: e.initialValue, output: e.output, signal: e.signal, input: e.input, render() {
87314
88236
  const r = (e?.withGuide ?? _.withGuide) !== false, s = `${`${r ? `${import_picocolors2.default.gray(h)}
87315
88237
  ` : ""}${N2(this.state)} `}${e.message}
87316
- `, i = e.placeholder ? import_picocolors2.default.inverse(e.placeholder[0]) + import_picocolors2.default.dim(e.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), n = this.userInput ? this.userInputWithCursor : i, o = this.value ?? "";
88238
+ `, i = e.placeholder ? import_picocolors2.default.inverse(e.placeholder[0]) + import_picocolors2.default.dim(e.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), n2 = this.userInput ? this.userInputWithCursor : i, o = this.value ?? "";
87317
88239
  switch (this.state) {
87318
88240
  case "error": {
87319
88241
  const u = this.error ? ` ${import_picocolors2.default.yellow(this.error)}` : "", l = r ? `${import_picocolors2.default.yellow(h)} ` : "", a = r ? import_picocolors2.default.yellow(x2) : "";
87320
88242
  return `${s.trim()}
87321
- ${l}${n}
88243
+ ${l}${n2}
87322
88244
  ${a}${u}
87323
88245
  `;
87324
88246
  }
@@ -87333,7 +88255,7 @@ ${l}` : ""}`;
87333
88255
  }
87334
88256
  default: {
87335
88257
  const u = r ? `${import_picocolors2.default.cyan(h)} ` : "", l = r ? import_picocolors2.default.cyan(x2) : "";
87336
- return `${s}${u}${n}
88258
+ return `${s}${u}${n2}
87337
88259
  ${l}
87338
88260
  `;
87339
88261
  }
@@ -87423,10 +88345,10 @@ var program = gen2(function* () {
87423
88345
  ].join(`
87424
88346
  `), "Codebase scanned").pipe(zipRight3(clack.spinner.start("Starting"))),
87425
88347
  onFileCleaned: ({ filePath, fileCount }) => {
87426
- return updateAndGetEffect2(filesCleaned, (n) => succeed7(n + 1)).pipe(tap2((filesCleaned2) => clack.spinner.message(`Cleaning: ${filesCleaned2}/${fileCount} ${filePath}`)));
88348
+ return updateAndGetEffect2(filesCleaned, (n2) => succeed7(n2 + 1)).pipe(tap2((filesCleaned2) => clack.spinner.message(`Cleaning: ${filesCleaned2}/${fileCount} ${filePath}`)));
87427
88349
  },
87428
88350
  onFileIndexed: ({ filePath, fileCount }) => {
87429
- return updateAndGetEffect2(filesIndexed, (n) => succeed7(n + 1)).pipe(tap2((filesIndexed2) => clack.spinner.message(`Indexing: ${filesIndexed2}/${fileCount} ${filePath}`)));
88351
+ return updateAndGetEffect2(filesIndexed, (n2) => succeed7(n2 + 1)).pipe(tap2((filesIndexed2) => clack.spinner.message(`Indexing: ${filesIndexed2}/${fileCount} ${filePath}`)));
87430
88352
  },
87431
88353
  onFinished: () => clack.spinner.stop("Codebase indexed").pipe(zipRight3(clack.outro("DONE!")))
87432
88354
  });
@@ -87463,5 +88385,5 @@ var program = gen2(function* () {
87463
88385
  });
87464
88386
  program.pipe(provide2(mergeAll5(GrepAi.Default).pipe(provideMerge2(Clack.Default), provideMerge2(exports_BunContext.layer))), exports_BunRuntime.runMain);
87465
88387
 
87466
- //# debugId=455B5D498F2A4C9364756E2164756E21
88388
+ //# debugId=B8B0DE8FE4E1E21A64756E2164756E21
87467
88389
  //# sourceMappingURL=index.js.map