@ai-ecoverse/slicc-spectrum 1.111.3 → 1.111.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -681,7 +681,7 @@ const name = await prompt({ title: 'New cone', label: 'Name', action: 'Create',
681
681
  It takes a sudo request's command (without `sudo` and its options) and working folder, and returns `{ certain, maybe, once }`:
682
682
 
683
683
  - `certain` is an absolute path when the command names a file or folder holding SLICC's secret rules (`/etc/fnox`, `/etc/fnox/config.toml`, `/etc/slicc/secrets-policy.toml`), a folder above them it changes as a whole (`/`, `/etc`, `/etc/slicc`), a glob or brace that matches one, or a file named like them (`fnox`, `secrets-policy`) anywhere, as `/tmp/fnox/config.toml`.
684
- It sees through quotes, backslashes, `$'…'` and `$"…"`, `cd` and `pushd` (also inside `bash -c`), relative paths and `..`, extglobs, `/proc/self/root` and `/proc/self/cwd`, option clusters like `-t/etc/fnox`, and comma lists.
684
+ It sees through quotes, backslashes, `$'…'` and `$"…"`, `cd` and `pushd` where a command starts (also inside `bash -c`, `bash -lc` or `su -c`, and after `if`, `then`, `do`, `{`, `!`, `function NAME` and the like, but not after a `-c` of another program, such as `chown -c cd /etc`), relative paths and `..`, extglobs, `/proc/self/root` and `/proc/self/cwd`, option clusters like `-t/etc/fnox`, and comma lists.
685
685
  When every command in it is read-only and nothing in it expands, quoted text is data: a jq or yq program such as `'.a // .b | {x: .y}'` isn't split into paths, and `*`, `?`, `[` and `{` in quotes (and `$` in single quotes) are literal, as the shell treats them. Other commands, such as `sh -c '…'`, are still looked into.
686
686
  - `maybe` is the token when the command may reach one of them and the check can't tell where it leads: an expansion (`$X`, `$(…)`, backticks), a `~user/..`, `~+` or `~-` path, a `/proc/<pid>/cwd` or `/dev/fd` path, or a command over 4096 characters (its first 40 followed by `…`).
687
687
  It's also set, only when nothing above applies (a separate check that never clears or changes those verdicts), when an explicit write names its target from data the check can't see: `yq -s`, `--split-exp` or `--split-exp-file` (`yq -s`), or `xargs` running a command that can write or run others, such as `xargs rm < list` (`xargs rm`). `xargs` running a read-only command (`xargs cat < list`, `xargs grep x -- < list`, `xargs --replace=X cat X < list`, and `xargs sort`, `xargs find`, `xargs uniq -c` or `xargs yq .` with no write flag in the command; with `--replace` or `--eof` split from its value, both readings must be read-only) is a plain read and stays clean.
@@ -970,7 +970,7 @@ Later backed by: BIOS.
970
970
  `list()` returns waiting `Approval`s; emit `approvals` when the list changes.
971
971
  A `sudo` approval has `id`, `requester` (`kind` `agent` or `user`, `name`, optional `agentId` and `where`, such as a terminal's title), `command` (without `sudo`; bios joins the kernel's argv shell-quoted), optional `target` (the user to run as; shown as `sudo -u {target}` unless `root`), optional `cwd` and `verdict` (`{ decision: 'allow' | 'deny' | 'unsure', reason }`, the automatic check’s view), `createdAt`, `expiresAt` (epoch ms) and `always` (offer Always allow, which covers the requester's user and this exact command).
972
972
  With `decide(id, 'once' | 'always' | 'deny')`, which resolves once the decision is recorded and then drops the request from `list()`, the tab shows a warning alert dialog (`dialog[data-approval][data-kind][data-requester]`): "Allow sudo?", "{name} wants to run this with sudo[ in {where}]:" for an agent or "You ran this with sudo[ in {where}] (as {name}):" for a user, the command, "In {cwd}", a notice when the command changes secret rules, what Always allow does, "Denied automatically in m:ss." and how many more wait, with **Deny** (`data-action="deny"`, focused; Escape also denies), **Always allow** (`always`) and **Allow once** (`once`).
973
- A command that names `/etc/fnox` (or anything in it) or `/etc/slicc/secrets-policy.toml`, resolved against `cwd`, globs included (with quotes and backslashes removed, operands after `--` included; a path with `[`, `{` or `$` counts when the part before it could lead to them), or that names `/`, `/etc` or `/etc/slicc` in a command other than a read-only one (such as `ls`, `cat`, `stat`, `grep`, `jq`, `cut`, `od`, `sha256sum` or `md5sum`, and coreutils' pure output programs, which take no output file and run nothing: `basename`, `dirname`, `printf`, `seq`, `tr`, `fold`, `paste`, `comm`, `join`, `expand`, `unexpand`, `fmt`, `numfmt`, `pr`, `expr`, `factor`, `sum`, `tsort`, `pathchk`, `base32`, `basenc`, `true`, `false`, `id`, `groups`, `whoami`, `logname`, `printenv`, `uname` and `nproc`, so `ls | xargs -n1 basename` is a read; `find` without `-exec`, `-execdir`, `-ok`, `-okdir`, `-delete` or `-fprint`/`-fls`; `sort` without `-o`, `-T` or `--compress-program`; `yq` without `-i`, `-s` or `--split-exp-file`; `base64` without `-o`; `tree` without `-o` or `-R`; `file` without `-C`; `uniq` and `xxd` with one operand at most, counting everything after `--`; a flag counts inside a short cluster, with a value attached (`-o/x`, `-i.bak`), as `--name=value` and abbreviated (the data-write check below reads clusters more exactly: there a cluster ends at `=` or at an option that takes a value, so `yq -o=json` isn't `yq -s`, and an option's value isn't a `uniq` or `xxd` operand); `less` and other pagers aren't, since they run commands), or runs with `cwd` in `/etc/fnox`, or names a relative path with `fnox` or `secrets-policy` in it wherever `cd` may have led, gets "This changes secret rules." with the path (`[data-secret-rules]`, the path in the attribute).
973
+ A command that names `/etc/fnox` (or anything in it) or `/etc/slicc/secrets-policy.toml`, resolved against `cwd`, globs included (with quotes and backslashes removed, operands after `--` included; a path with `[`, `{` or `$` counts when the part before it could lead to them), or that names `/`, `/etc` or `/etc/slicc` in a command other than a read-only one (such as `ls`, `cat`, `stat`, `grep`, `jq`, `cut`, `od`, `sha256sum` or `md5sum`, and coreutils' pure output programs, which take no output file and run nothing: `basename`, `dirname`, `printf`, `seq`, `tr`, `fold`, `paste`, `comm`, `join`, `expand`, `unexpand`, `fmt`, `numfmt`, `pr`, `expr`, `factor`, `sum`, `tsort`, `pathchk`, `base32`, `basenc`, `true`, `false`, `id`, `groups`, `whoami`, `logname`, `printenv`, `uname` and `nproc`, so `ls | xargs -n1 basename` is a read; `find` without `-exec`, `-execdir`, `-ok`, `-okdir`, `-delete` or `-fprint`/`-fls`; `sort` without `-o`, `-T` or `--compress-program`; `yq` without `-i`, `-s` or `--split-exp-file`; `base64` without `-o`; `tree` without `-o` or `-R`; `file` without `-C`; `uniq` and `xxd` with one operand at most, counting everything after `--`; a flag counts inside a short cluster, with a value attached (`-o/x`, `-i.bak`), as `--name=value` and abbreviated, but for getopt-style programs (`sort`, `uniq`, `base64`, `file`, `yq`) a cluster ends at `=` or at an option that takes a value, so `sort -to /etc` and `yq -o=json` don't count as writes; `tree` takes each option's value from the next word and reads on in the cluster, so any `o` or `R` in a `tree` cluster counts (`tree -Ho /tmp/x /etc` writes); `xxd` is read with its own rules (one option per word, values attached or in the next word, options end at the first operand), and an option's value isn't a `uniq` or `xxd` operand (`uniq -f 1 /etc`, `xxd -l 16 /etc`); `xargs` counts as read-only when every command it may run is read-only and has no gated write flags (`find /etc … | xargs grep x`, but not `xargs sort`, whose input could add `-o`); `less` and other pagers aren't, since they run commands), or runs with `cwd` in `/etc/fnox`, or names a relative path with `fnox` or `secrets-policy` in it wherever `cd` may have led, gets "This changes secret rules." with the path (`[data-secret-rules]`, the path in the attribute).
974
974
  Read-only commands count only by bare name or from `/bin` and `/usr/bin`.
975
975
  In a command made only of read-only commands and with no live expansion, the quoted words count whole: `jq '.a // .b' f` doesn't name `/`, and `jq '{a: .b}' f` in `/etc` isn't a brace that could lead to the rules.
976
976
  `/proc/<pid>/root` counts as `/` and `/proc/self/cwd` as `cwd`.
package/dist/slicc-ui.js CHANGED
@@ -10334,8 +10334,8 @@ var ranges = [
10334
10334
  [100, "bg", 8]
10335
10335
  ];
10336
10336
  function simple(code3) {
10337
- const flag2 = flags[code3];
10338
- if (flag2) return flag2;
10337
+ const flag = flags[code3];
10338
+ if (flag) return flag;
10339
10339
  const range2 = ranges.find(([start2]) => code3 >= start2 && code3 < start2 + 8);
10340
10340
  return range2 ? { [range2[1]]: code3 - range2[0] + range2[2] } : null;
10341
10341
  }
@@ -40283,12 +40283,12 @@ var SliccMonitor = class extends ModelElement {
40283
40283
  </li>`;
40284
40284
  }
40285
40285
  #section(section) {
40286
- const flag2 = attention2(section);
40286
+ const flag = attention2(section);
40287
40287
  const surface2 = surfaces[section.id];
40288
40288
  const rows2 = section.rows.length > 0;
40289
- const open = rows2 && (this.expanded[section.id] ?? flag2 !== null);
40289
+ const open = rows2 && (this.expanded[section.id] ?? flag !== null);
40290
40290
  const list6 = `rows-${section.id}`;
40291
- const badge = flag2 ? b`<swc-badge size="s" variant=${flag2.variant} subtle>${flag2.text}</swc-badge>` : A;
40291
+ const badge = flag ? b`<swc-badge size="s" variant=${flag.variant} subtle>${flag.text}</swc-badge>` : A;
40292
40292
  return b`<li class="section" data-id=${section.id} data-open=${open ? "" : A}>
40293
40293
  <div class="line">
40294
40294
  <span class="caption">${rows2 ? b`<button class="toggle" aria-expanded=${open ? "true" : "false"} aria-controls=${open ? list6 : A} @click=${() => {
@@ -44099,14 +44099,14 @@ var directions2 = /* @__PURE__ */ new Set(["left", "right", "above", "below", "w
44099
44099
  function scan(parsed, rest, positional) {
44100
44100
  for (let index2 = 0; index2 < rest.length; index2++) {
44101
44101
  const arg = rest[index2];
44102
- const flag2 = arg.startsWith("--") ? arg.slice(2) : null;
44103
- if (flag2 === "json") parsed.json = true;
44104
- else if (flag2 === "section" || flag2 !== null && directions2.has(flag2)) {
44102
+ const flag = arg.startsWith("--") ? arg.slice(2) : null;
44103
+ if (flag === "json") parsed.json = true;
44104
+ else if (flag === "section" || flag !== null && directions2.has(flag)) {
44105
44105
  const value = rest[++index2];
44106
- if (value === void 0) return `--${flag2} needs a value`;
44107
- if (flag2 === "section") parsed.section = value;
44106
+ if (value === void 0) return `--${flag} needs a value`;
44107
+ if (flag === "section") parsed.section = value;
44108
44108
  else if (parsed.place) return "give one place";
44109
- else parsed.place = { direction: flag2, ref: value };
44109
+ else parsed.place = { direction: flag, ref: value };
44110
44110
  } else if (arg.startsWith("-")) return `unknown option ${arg}`;
44111
44111
  else positional.push(arg);
44112
44112
  }
@@ -48570,7 +48570,7 @@ var SliccUpdates = class extends ModelElement {
48570
48570
  const shown4 = developer ? item2 : { ...item2, npm: null };
48571
48571
  const meta = npmMeta(shown4);
48572
48572
  const note = npmNote(shown4);
48573
- const ahead = shown4.npm?.state === "offered" ? shown4.npm.latest ?? null : null;
48573
+ const ahead2 = shown4.npm?.state === "offered" ? shown4.npm.latest ?? null : null;
48574
48574
  return b`<swc-divider size="s"></swc-divider>
48575
48575
  <article data-id=${item2.id} data-state=${item2.state} data-npm=${item2.npm?.state ?? A} aria-label=${item2.label}>
48576
48576
  <div class="head">
@@ -48591,7 +48591,7 @@ var SliccUpdates = class extends ModelElement {
48591
48591
  <span>${error}</span>
48592
48592
  </div>` : A}
48593
48593
  ${this.#actions(item2)}
48594
- ${this.#whatsNew(`releases:item:${item2.id}`, item2.label, whatsNew(item2.releases, item2.from, ahead ?? item2.to), 3)}
48594
+ ${this.#whatsNew(`releases:item:${item2.id}`, item2.label, whatsNew(item2.releases, item2.from, ahead2 ?? item2.to), 3)}
48595
48595
  ${item2.log ? b`<details ?open=${this.#logs.has(`item:${item2.id}`)} @toggle=${this.#logs.details(`item:${item2.id}`)}><summary>${chevron}Install log</summary><pre>${item2.log}</pre></details>` : A}
48596
48596
  </article>`;
48597
48597
  }
@@ -49843,26 +49843,6 @@ var readOnly = [
49843
49843
  "xxd",
49844
49844
  "yq"
49845
49845
  ];
49846
- var flag = (short2, long) => (args2) => args2.some((arg) => {
49847
- if (!arg.startsWith("--")) return /^-[^-]/.test(arg) && [...short2].some((c29) => arg.includes(c29));
49848
- const [name] = arg.slice(2).split("=");
49849
- return !!name && long.some((option2) => option2.startsWith(name));
49850
- });
49851
- var operands = (args2) => {
49852
- const end = args2.includes("--") ? args2.indexOf("--") : args2.length;
49853
- const named2 = args2.slice(0, end).filter((arg) => arg === "-" || !arg.startsWith("-"));
49854
- return named2.length + args2.slice(end + 1).length > 1;
49855
- };
49856
- var writes = {
49857
- base64: flag("o", ["output"]),
49858
- file: flag("C", ["compile"]),
49859
- find: (args2) => args2.some((arg) => /^-(?:delete|exec|execdir|ok|okdir|fls|fprint0?|fprintf)$/.test(arg)),
49860
- sort: flag("oT", ["output", "temporary-directory", "compress-program"]),
49861
- tree: flag("oR", []),
49862
- uniq: operands,
49863
- xxd: operands,
49864
- yq: flag("is", ["inplace", "in-place", "split-exp", "split-exp-file"])
49865
- };
49866
49846
  function candidates(word2) {
49867
49847
  if (word2 === "--") return [];
49868
49848
  if (word2.startsWith("--"))
@@ -49886,10 +49866,6 @@ function protects(path2, whole) {
49886
49866
  return rulePaths.some((rule) => glob.test(rule)) || top !== path2 && pattern(top).test("/etc/fnox") || whole && ruleParents.some((parent) => glob.test(parent));
49887
49867
  }
49888
49868
  var command2 = (word2) => word2.split("/").pop() ?? "";
49889
- var trusted2 = ([word2, ...args2]) => {
49890
- const name = word2.replace(/^\/(?:usr\/)?bin\/(?=[^/]+$)/, "");
49891
- return readOnly.includes(name) && !writes[name]?.(args2);
49892
- };
49893
49869
  function letter(arg, short2, takes) {
49894
49870
  for (const char of arg.slice(1)) {
49895
49871
  if (short2.includes(char)) return true;
@@ -49904,17 +49880,47 @@ var option = (short2, long, takes = "") => (args2) => args2.find((arg) => {
49904
49880
  });
49905
49881
  var outputs = (valued2) => (args2) => {
49906
49882
  const end = args2.includes("--") ? args2.indexOf("--") : args2.length;
49907
- const named2 = args2.slice(0, end).filter((arg, index2) => (arg === "-" || !arg.startsWith("-")) && !valued2.test(args2[index2 - 1]));
49883
+ const named2 = args2.slice(0, end).filter(
49884
+ (arg, index2) => (arg === "-" || !arg.startsWith("-")) && !valued2(args2[index2 - 1] ?? "")
49885
+ );
49908
49886
  return named2.length + args2.slice(end + 1).length > 1;
49909
49887
  };
49888
+ var uniqValue = (arg) => arg.startsWith("--") ? /^--(?:s|sk|ski|skip|skip-|skip-[fc][\w-]*|c|ch[\w-]*)$/.test(arg) : /^-[^-]/.test(arg) && arg.slice(1).search(/[fsw]/) === arg.length - 2;
49889
+ var xxdValue = {
49890
+ c: "ols",
49891
+ g: "roup",
49892
+ l: "en",
49893
+ n: "ame",
49894
+ o: "ffset"
49895
+ };
49896
+ function valuedXxd(letter2, rest) {
49897
+ if (letter2 === "c" && rest.startsWith("apitalize")) return false;
49898
+ if (letter2 === "R") return !rest;
49899
+ if (letter2 === "s") return !rest || rest.startsWith("kip") || rest.startsWith("eek");
49900
+ return Object.hasOwn(xxdValue, letter2) && (!rest || rest.startsWith(xxdValue[letter2]));
49901
+ }
49902
+ function xxd(args2) {
49903
+ let index2 = 0;
49904
+ for (; index2 < args2.length; index2++) {
49905
+ const arg = args2[index2];
49906
+ if (arg === "--") {
49907
+ index2++;
49908
+ break;
49909
+ }
49910
+ if (!/^-./.test(arg)) break;
49911
+ const pp = arg.startsWith("--") && arg.length > 2 ? arg.slice(1) : arg;
49912
+ if (valuedXxd(pp[1], pp.slice(2))) index2++;
49913
+ }
49914
+ return args2.length - index2 > 1;
49915
+ }
49910
49916
  var gates = {
49911
- base64: option("o", ["output"], "bwi"),
49917
+ base64: option("o", ["output"], "w"),
49912
49918
  file: option("C", ["compile"], "efFmP"),
49913
- find: writes.find,
49919
+ find: (args2) => args2.some((arg) => /^-(?:delete|exec|execdir|ok|okdir|fls|fprint0?|fprintf)$/.test(arg)),
49914
49920
  sort: option("oT", ["output", "temporary-directory", "compress-program"], "kSt"),
49915
- tree: option("oR", [], "HILPT"),
49916
- uniq: outputs(/^(?:-[^-]*[fsw]|--(?:s|sk|ski|skip|skip-|skip-[fc]\w*|c|ch\w*))$/),
49917
- xxd: outputs(/^-(?:[cglnosR]|cols|groupsize|len|name|offset|seek)$/),
49921
+ tree: option("oR", []),
49922
+ uniq: outputs(uniqValue),
49923
+ xxd,
49918
49924
  yq: option("is", ["inplace", "in-place", "split-exp", "split-exp-file"], "fIop")
49919
49925
  };
49920
49926
  var plainly = (word2) => word2.replace(/^\/(?:usr\/)?bin\/(?=[^/]+$)/, "");
@@ -49971,6 +49977,7 @@ var safe = ([word2, ...args2]) => {
49971
49977
  const name = plainly(word2);
49972
49978
  return readOnly.includes(name) && !gates[name]?.(args2);
49973
49979
  };
49980
+ var trusted2 = ([word2, ...args2]) => plainly(word2) === "xargs" ? launched(args2).every((run) => runs(run) && !Object.hasOwn(gates, plainly(run[0] ?? "echo"))) : safe([word2, ...args2]);
49974
49981
  var unseen2 = {
49975
49982
  xargs: (args2) => {
49976
49983
  const run = launched(args2).find((words2) => !runs(words2));
@@ -49992,10 +49999,18 @@ var wrappers = {
49992
49999
  timeout: ["ks", ["kill-after", "signal"], 1]
49993
50000
  };
49994
50001
  var assignment = /^[A-Za-z_]\w*(?:\[[^\]]*\])?\+?=/;
49995
- var shells = ["sh", "bash", "dash", "zsh", "ksh", "fish"];
50002
+ var shells = ["sh", "bash", "dash", "zsh", "ksh", "fish", "su", "runuser"];
50003
+ var firsts = /* @__PURE__ */ new WeakMap();
49996
50004
  function shell(words2, index2) {
49997
- const flag2 = words2[index2 - 1] === "--" ? index2 - 2 : index2 - 1;
49998
- return /^-[A-Za-z]*c[A-Za-z]*$/.test(words2[flag2] ?? "") && words2.slice(0, flag2).some((word2) => shells.includes(command2(word2)));
50005
+ const flag = words2[index2 - 1] === "--" ? index2 - 2 : index2 - 1;
50006
+ if (!/^-[A-Za-z]*c[A-Za-z]*$/.test(words2[flag] ?? "")) return false;
50007
+ if (!firsts.has(words2))
50008
+ firsts.set(
50009
+ words2,
50010
+ words2.findIndex((word2) => shells.includes(command2(word2)))
50011
+ );
50012
+ const first2 = firsts.get(words2);
50013
+ return first2 >= 0 && first2 < flag;
49999
50014
  }
50000
50015
  var escaped = /[\\$\ue124]/;
50001
50016
  function split(arg, next) {
@@ -50006,12 +50021,12 @@ function split(arg, next) {
50006
50021
  return value.length ? value.join("=") : next;
50007
50022
  }
50008
50023
  function options2(at, start2, name) {
50009
- if (at.seen.has(`${name} ${start2}`)) return;
50010
- at.seen.add(`${name} ${start2}`);
50011
50024
  const { words: words2 } = at;
50012
50025
  const [takes, long, positional] = wrappers[name];
50013
50026
  let index2 = start2;
50014
50027
  for (; words2[index2]?.startsWith("-") && (words2[index2] !== "-" || name === "env"); index2++) {
50028
+ if (at.seen.has(`${name} ${index2}`)) return;
50029
+ at.seen.add(`${name} ${index2}`);
50015
50030
  const arg = words2[index2];
50016
50031
  if (arg === "--") {
50017
50032
  index2++;
@@ -50206,11 +50221,38 @@ function tokens(segment2) {
50206
50221
  function commas(words2) {
50207
50222
  return words2.flatMap((word2) => word2.includes(",") ? [word2, ...word2.split(",")] : [word2]).filter(Boolean);
50208
50223
  }
50224
+ function ahead(words2, test) {
50225
+ const next = Array(words2.length + 1).fill(words2.length);
50226
+ for (let index2 = words2.length - 1; index2 >= 0; index2--)
50227
+ next[index2] = test(words2[index2]) ? next[index2 + 1] : index2;
50228
+ return next;
50229
+ }
50230
+ function positions2(words2) {
50231
+ const skip = ahead(
50232
+ words2,
50233
+ (word2) => assignment.test(word2) || Object.hasOwn(wrappers, command2(word2)) || /^-|^\d+$/.test(word2)
50234
+ );
50235
+ const dashes = ahead(words2, (word2) => word2.startsWith("-"));
50236
+ const at = [];
50237
+ let [runner, options3] = [-1, -1];
50238
+ for (const index2 of words2.keys()) {
50239
+ const flag = words2[index2 - 1] === "--" ? index2 - 2 : index2 - 1;
50240
+ const start2 = index2 === 0 || words2[index2] !== "--" && (words2[index2 - 1] === "-c" && shell(words2, index2) || flag > runner && runner >= 0 && index2 <= options3 && /^-[A-Za-z]*c[A-Za-z]*$/.test(words2[flag])) || at[index2 - 1] && keyword.test(words2[index2 - 1]) || at[index2 - 2] === true && words2[index2 - 2] === "function";
50241
+ at.push(start2);
50242
+ if (start2) {
50243
+ runner = skip[index2];
50244
+ options3 = dashes[runner + 1] ?? -1;
50245
+ if (!shells.includes(command2(words2[runner] ?? ""))) runner = -1;
50246
+ }
50247
+ }
50248
+ return at;
50249
+ }
50209
50250
  function scan2(words2, cwds, whole) {
50210
50251
  let cd = false;
50252
+ const at = positions2(words2);
50211
50253
  for (const [index2, word2] of words2.entries()) {
50212
50254
  let hit = null;
50213
- if (index2 === 0 || words2[index2 - 1] === "-c") {
50255
+ if (at[index2]) {
50214
50256
  cd = ["cd", "pushd"].includes(command2(word2));
50215
50257
  hit = touched2(cwds, word2, whole);
50216
50258
  } else if (!cd) hit = touched2(cwds, word2, whole);
@@ -64694,9 +64736,9 @@ var TabReorderController = class extends CompositeDisposable {
64694
64736
  else this._animState.currentInsertionIndex = null;
64695
64737
  }
64696
64738
  snapshotTabPositions() {
64697
- const positions2 = /* @__PURE__ */ new Map();
64698
- for (const tab of this._tabs) positions2.set(tab.value.panel.id, tab.value.element.getBoundingClientRect());
64699
- return positions2;
64739
+ const positions3 = /* @__PURE__ */ new Map();
64740
+ for (const tab of this._tabs) positions3.set(tab.value.panel.id, tab.value.element.getBoundingClientRect());
64741
+ return positions3;
64700
64742
  }
64701
64743
  /** Main-axis extent of a rect for this header's orientation. */
64702
64744
  _mainAxisSize(rect) {
@@ -75810,13 +75852,13 @@ function ensureChildIdByNameId(nodes, index2) {
75810
75852
  }
75811
75853
  function ensureChildPositions(index2) {
75812
75854
  if (index2.childPositionById != null) return index2.childPositionById;
75813
- const positions2 = /* @__PURE__ */ new Map();
75855
+ const positions3 = /* @__PURE__ */ new Map();
75814
75856
  for (let i26 = 0; i26 < index2.childIds.length; i26++) {
75815
75857
  const childId = index2.childIds[i26];
75816
- if (childId != null) positions2.set(childId, i26);
75858
+ if (childId != null) positions3.set(childId, i26);
75817
75859
  }
75818
- index2.childPositionById = positions2;
75819
- return positions2;
75860
+ index2.childPositionById = positions3;
75861
+ return positions3;
75820
75862
  }
75821
75863
  function appendChildReference(index2, childId) {
75822
75864
  if (index2.childPositionById != null) index2.childPositionById.set(childId, index2.childIds.length);
@@ -75955,11 +75997,11 @@ function isDirectoryNode(node2) {
75955
75997
  function getNodeFlags(node2) {
75956
75998
  return node2.depthAndFlags & PATH_STORE_NODE_FLAGS_MASK;
75957
75999
  }
75958
- function hasNodeFlag(node2, flag2) {
75959
- return (getNodeFlags(node2) & flag2) !== 0;
76000
+ function hasNodeFlag(node2, flag) {
76001
+ return (getNodeFlags(node2) & flag) !== 0;
75960
76002
  }
75961
- function addNodeFlag(node2, flag2) {
75962
- node2.depthAndFlags |= flag2;
76003
+ function addNodeFlag(node2, flag) {
76004
+ node2.depthAndFlags |= flag;
75963
76005
  }
75964
76006
  function setNodeDepth(node2, depth) {
75965
76007
  node2.depthAndFlags = createNodeDepthAndFlags(depth, getNodeFlags(node2), getNodeKind(node2));
@@ -77468,10 +77510,10 @@ function insertChildReference(state2, parentId, childId) {
77468
77510
  }
77469
77511
  function removeChildReference(state2, parentId, childId, childNameId) {
77470
77512
  const parentIndex = getDirectoryIndex(state2, parentId);
77471
- const positions2 = ensureChildPositions(parentIndex);
77472
- const childIndex = positions2.get(childId) ?? -1;
77513
+ const positions3 = ensureChildPositions(parentIndex);
77514
+ const childIndex = positions3.get(childId) ?? -1;
77473
77515
  ensureChildIdByNameId(state2.snapshot.nodes, parentIndex).delete(childNameId);
77474
- positions2.delete(childId);
77516
+ positions3.delete(childId);
77475
77517
  const childNode = state2.snapshot.nodes[childId];
77476
77518
  if (childNode != null) applyChildAggregateDelta(parentIndex, childId, -childNode.subtreeNodeCount, -childNode.visibleSubtreeCount);
77477
77519
  if (childIndex >= 0) {