@ai-ecoverse/slicc-spectrum 1.109.0 → 1.110.0

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/dist/slicc-ui.js CHANGED
@@ -10331,8 +10331,8 @@ var ranges = [
10331
10331
  [100, "bg", 8]
10332
10332
  ];
10333
10333
  function simple(code3) {
10334
- const flag = flags[code3];
10335
- if (flag) return flag;
10334
+ const flag2 = flags[code3];
10335
+ if (flag2) return flag2;
10336
10336
  const range2 = ranges.find(([start2]) => code3 >= start2 && code3 < start2 + 8);
10337
10337
  return range2 ? { [range2[1]]: code3 - range2[0] + range2[2] } : null;
10338
10338
  }
@@ -17944,14 +17944,14 @@ var resolver = {
17944
17944
  };
17945
17945
  var string = initializeFactory("string");
17946
17946
  var text = initializeFactory("text");
17947
- function initializeFactory(field) {
17947
+ function initializeFactory(field2) {
17948
17948
  return {
17949
- resolveAll: createResolver(field === "text" ? resolveAllLineSuffixes : void 0),
17949
+ resolveAll: createResolver(field2 === "text" ? resolveAllLineSuffixes : void 0),
17950
17950
  tokenize: initializeText
17951
17951
  };
17952
17952
  function initializeText(effects) {
17953
17953
  const self2 = this;
17954
- const constructs2 = this.parser.constructs[field];
17954
+ const constructs2 = this.parser.constructs[field2];
17955
17955
  const text4 = effects.attempt(constructs2, start2, notText);
17956
17956
  return start2;
17957
17957
  function start2(code3) {
@@ -33620,8 +33620,8 @@ function question(item2, handlers) {
33620
33620
  } else {
33621
33621
  const submit = (event2) => {
33622
33622
  event2.preventDefault();
33623
- const field = event2.currentTarget.querySelector("input");
33624
- if (field.value.trim()) answer(field.value.trim());
33623
+ const field2 = event2.currentTarget.querySelector("input");
33624
+ if (field2.value.trim()) answer(field2.value.trim());
33625
33625
  };
33626
33626
  body2 = b`<form class="options" @submit=${submit}>
33627
33627
  <input class="input" type=${item2.kind === "email" ? "email" : item2.kind === "number" ? "number" : item2.kind === "date" ? "date" : "text"} aria-label=${item2.question} ?disabled=${handlers.readOnly} />
@@ -34891,8 +34891,8 @@ function failureText(error) {
34891
34891
  const text4 = isVaultFailure(error) ? codeTexts[error.code] : void 0;
34892
34892
  return text4 ?? (error instanceof Error ? error.message : "The vault did not answer");
34893
34893
  }
34894
- function fieldOf(error, field) {
34895
- return isVaultFailure(error) && error.code === "EINVAL" ? field : null;
34894
+ function fieldOf(error, field2) {
34895
+ return isVaultFailure(error) && error.code === "EINVAL" ? field2 : null;
34896
34896
  }
34897
34897
  function away(vault) {
34898
34898
  const state2 = vault.availability?.() ?? (vault.status() ? "ready" : "waiting");
@@ -35814,12 +35814,12 @@ var SliccComposer = class extends ThemedElement {
35814
35814
  this.renderRoot.querySelector('.item[aria-selected="true"]')?.scrollIntoView({ block: "nearest" });
35815
35815
  }
35816
35816
  #wire() {
35817
- const field = this.#field;
35818
- void field.updateComplete.then(() => {
35817
+ const field2 = this.#field;
35818
+ void field2.updateComplete.then(() => {
35819
35819
  const popover = this.renderRoot.querySelector("swc-popover");
35820
35820
  if (popover) {
35821
35821
  popover.triggerElement = null;
35822
- popover.triggerElement = field.shadowRoot.querySelector(
35822
+ popover.triggerElement = field2.shadowRoot.querySelector(
35823
35823
  ".swc-PromptField-upload"
35824
35824
  );
35825
35825
  }
@@ -36030,16 +36030,16 @@ ${this.value}` : text4;
36030
36030
  text4 === null || text4 === void 0 ? { ...base, kind: "file", size: 0, error: "Could not read the file" } : { ...base, kind: "text", size: text4.length, text: text4 }
36031
36031
  ];
36032
36032
  }
36033
- async shareSecret(name, field = null) {
36033
+ async shareSecret(name, field2 = null) {
36034
36034
  const clean = name.trim().toUpperCase().replace(/[^A-Z0-9_]/g, "_");
36035
36035
  if (this.sharing) return;
36036
36036
  if (!clean) {
36037
- if (field) this.#refuse("Enter a name", "name", true);
36037
+ if (field2) this.#refuse("Enter a name", "name", true);
36038
36038
  return;
36039
36039
  }
36040
- const value = field ? take(field) : "";
36040
+ const value = field2 ? take(field2) : "";
36041
36041
  const vault = this.model?.vault;
36042
- if (field && vault?.put && !await this.#store(vault, clean, value)) return;
36042
+ if (field2 && vault?.put && !await this.#store(vault, clean, value)) return;
36043
36043
  this.#refuse(null);
36044
36044
  this.attachments = [
36045
36045
  ...this.attachments,
@@ -36053,12 +36053,12 @@ ${this.value}` : text4;
36053
36053
  ];
36054
36054
  this.popup = null;
36055
36055
  }
36056
- #refuse(text4, field = null, focus = false) {
36056
+ #refuse(text4, field2 = null, focus = false) {
36057
36057
  this.secretError = text4;
36058
- this.secretField = text4 ? field : null;
36059
- if (focus && text4 && field)
36058
+ this.secretField = text4 ? field2 : null;
36059
+ if (focus && text4 && field2)
36060
36060
  void this.updateComplete.then(
36061
- () => this.renderRoot.querySelector(`form.secret input[name=${field}]`)?.focus()
36061
+ () => this.renderRoot.querySelector(`form.secret input[name=${field2}]`)?.focus()
36062
36062
  );
36063
36063
  }
36064
36064
  async #store(vault, clean, value) {
@@ -36655,6 +36655,93 @@ function dipsOf(node2) {
36655
36655
  return null;
36656
36656
  }
36657
36657
 
36658
+ // src/app/model-picker.ts
36659
+ var searchable = 5;
36660
+ var field = "sp-search[data-action=filter-models]";
36661
+ var modelFilterCss = i`
36662
+ sp-search[data-action='filter-models'] {
36663
+ position: sticky;
36664
+ inset-block-start: 0;
36665
+ z-index: 1;
36666
+ box-sizing: border-box;
36667
+ width: 100%;
36668
+ padding: var(--swc-spacing-75) var(--swc-spacing-100);
36669
+ background: var(--mod-popover-background-color, var(--spectrum-popover-background-color));
36670
+ }
36671
+ `;
36672
+ function matchesModel(option, query) {
36673
+ const text4 = `${option.label} ${option.provider} ${option.id}`.toLowerCase();
36674
+ return query.toLowerCase().split(/\s+/).every((word2) => text4.includes(word2));
36675
+ }
36676
+ function visible(picker) {
36677
+ return [...picker.querySelectorAll("sp-menu-item[value]")].find(
36678
+ (item2) => !item2.hidden
36679
+ );
36680
+ }
36681
+ var ModelFilter = class {
36682
+ #host;
36683
+ #query = "";
36684
+ constructor(host4) {
36685
+ this.#host = host4;
36686
+ }
36687
+ #set(query) {
36688
+ if (query === this.#query) return;
36689
+ this.#query = query;
36690
+ this.#host.requestUpdate();
36691
+ }
36692
+ items(options2) {
36693
+ if (options2.length <= searchable)
36694
+ return b`${options2.map((option) => this.#item(option, false))}`;
36695
+ const shown4 = options2.filter((option) => matchesModel(option, this.#query));
36696
+ return b`<sp-search
36697
+ size="s"
36698
+ data-action="filter-models"
36699
+ label="Filter models"
36700
+ placeholder="Filter models"
36701
+ .value=${this.#query}
36702
+ @input=${(event2) => this.#set(event2.target.value)}
36703
+ @change=${(event2) => event2.stopPropagation()}
36704
+ @submit=${(event2) => event2.preventDefault()}
36705
+ @keydown=${this.#key}
36706
+ ></sp-search>
36707
+ ${options2.map((option) => this.#item(option, !shown4.includes(option)))}
36708
+ ${shown4.length ? A : b`<sp-menu-item disabled data-empty>No matching models</sp-menu-item>`}`;
36709
+ }
36710
+ #item(option, hidden) {
36711
+ return b`<sp-menu-item value=${option.id} ?hidden=${hidden}>${option.label}<span slot="description">${option.provider}</span></sp-menu-item>`;
36712
+ }
36713
+ opened = (event2) => {
36714
+ const search3 = event2.currentTarget.querySelector(field);
36715
+ if (search3) queueMicrotask(() => search3.focus());
36716
+ };
36717
+ closed = () => this.#set("");
36718
+ keys = {
36719
+ capture: true,
36720
+ handleEvent: (event2) => {
36721
+ const picker = event2.currentTarget;
36722
+ const search3 = picker.querySelector(field);
36723
+ if (!search3 || !picker.open) return;
36724
+ if (event2.target === search3) {
36725
+ if (event2.key === "Escape" && this.#query) event2.preventDefault();
36726
+ return;
36727
+ }
36728
+ if (event2.key.trim().length !== 1 || event2.ctrlKey || event2.metaKey || event2.altKey) return;
36729
+ search3.focus();
36730
+ const end = search3.focusElement.value.length;
36731
+ search3.focusElement.setSelectionRange(end, end);
36732
+ }
36733
+ };
36734
+ #key = (event2) => {
36735
+ if (event2.key === "Tab" || event2.key === "Escape" && !event2.defaultPrevented) return;
36736
+ event2.stopPropagation();
36737
+ if (event2.key !== "ArrowDown" && event2.key !== "Enter") return;
36738
+ event2.preventDefault();
36739
+ const first2 = visible(event2.currentTarget.parentElement);
36740
+ if (event2.key === "Enter") first2?.click();
36741
+ else first2?.focus();
36742
+ };
36743
+ };
36744
+
36658
36745
  // src/app/models.ts
36659
36746
  var asked = /* @__PURE__ */ new WeakMap();
36660
36747
  var switched = /* @__PURE__ */ new WeakMap();
@@ -37110,6 +37197,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
37110
37197
  };
37111
37198
  static styles = [
37112
37199
  shared,
37200
+ modelFilterCss,
37113
37201
  fade,
37114
37202
  markdownCss,
37115
37203
  messageCss,
@@ -37352,6 +37440,7 @@ var SliccChat = class _SliccChat extends ThemedElement {
37352
37440
  }
37353
37441
  `
37354
37442
  ];
37443
+ #modelFilter = new ModelFilter(this);
37355
37444
  #licks = new ViewSet(this, "chat:licks");
37356
37445
  #runs = new ViewSet(this, "chat:runs");
37357
37446
  #details = /* @__PURE__ */ new Set();
@@ -37885,8 +37974,8 @@ var SliccChat = class _SliccChat extends ThemedElement {
37885
37974
  }
37886
37975
  const offered = chatModels(model.settings.models());
37887
37976
  return b`${statusLight(agent.status)}
37888
- ${offered.length ? b`<sp-picker size="s" quiet label="Model" value=${agent.model} @change=${(event2) => model.agent.setModel(agent.id, event2.target.value)}>
37889
- ${offered.map((option) => b`<sp-menu-item value=${option.id}>${option.label}<span slot="description">${option.provider}</span></sp-menu-item>`)}
37977
+ ${offered.length ? b`<sp-picker size="s" quiet label="Model" value=${agent.model} @change=${(event2) => model.agent.setModel(agent.id, event2.target.value)} @sp-opened=${this.#modelFilter.opened} @sp-closed=${this.#modelFilter.closed} @keydown=${this.#modelFilter.keys}>
37978
+ ${this.#modelFilter.items(offered)}
37890
37979
  </sp-picker>` : b`<swc-action-button size="s" quiet data-action="set-up-model" @click=${() => this.#action("settings")}>Set up a model</swc-action-button>`}
37891
37980
  <sp-picker size="s" quiet label="Thinking" value=${model.settings.get().thinking} @change=${(event2) => model.settings.update({ thinking: event2.target.value })}>
37892
37981
  <sp-menu-item value="off">No thinking</sp-menu-item>
@@ -40184,12 +40273,12 @@ var SliccMonitor = class extends ModelElement {
40184
40273
  </li>`;
40185
40274
  }
40186
40275
  #section(section) {
40187
- const flag = attention2(section);
40276
+ const flag2 = attention2(section);
40188
40277
  const surface2 = surfaces[section.id];
40189
40278
  const rows2 = section.rows.length > 0;
40190
- const open = rows2 && (this.expanded[section.id] ?? flag !== null);
40279
+ const open = rows2 && (this.expanded[section.id] ?? flag2 !== null);
40191
40280
  const list6 = `rows-${section.id}`;
40192
- const badge = flag ? b`<swc-badge size="s" variant=${flag.variant} subtle>${flag.text}</swc-badge>` : A;
40281
+ const badge = flag2 ? b`<swc-badge size="s" variant=${flag2.variant} subtle>${flag2.text}</swc-badge>` : A;
40193
40282
  return b`<li class="section" data-id=${section.id} data-open=${open ? "" : A}>
40194
40283
  <div class="line">
40195
40284
  <span class="caption">${rows2 ? b`<button class="toggle" aria-expanded=${open ? "true" : "false"} aria-controls=${open ? list6 : A} @click=${() => {
@@ -41015,9 +41104,9 @@ var defaultGates = {
41015
41104
  messages: ["user", "agent", "cone", "scoop:*", "off"],
41016
41105
  tools: ["user", "agent", "scoop:*"]
41017
41106
  };
41018
- function gateChoice(field, cone, gate) {
41107
+ function gateChoice(field2, cone, gate) {
41019
41108
  if (gate === "scoop:*")
41020
- return cone.scoops.flatMap((name) => gateChoice(field, cone, `scoop:${name}`));
41109
+ return cone.scoops.flatMap((name) => gateChoice(field2, cone, `scoop:${name}`));
41021
41110
  if (gate.startsWith("scoop:")) {
41022
41111
  const name = gate.slice(6);
41023
41112
  return cone.scoops.includes(name) ? [{ value: gate, label: `${name} decides`, description: `The scoop ${name} decides.` }] : [];
@@ -41037,14 +41126,14 @@ function gateChoice(field, cone, gate) {
41037
41126
  off: {
41038
41127
  value: "off",
41039
41128
  label: "No review",
41040
- description: field === "messages" ? "Messages go straight in as follow-ups." : "Tool calls run without review."
41129
+ description: field2 === "messages" ? "Messages go straight in as follow-ups." : "Tool calls run without review."
41041
41130
  }
41042
41131
  };
41043
41132
  return choices[gate] ? [choices[gate]] : [];
41044
41133
  }
41045
- function gateOptions(field, cone, allowed = defaultGates[field]) {
41046
- const options2 = allowed.flatMap((gate) => gateChoice(field, cone, gate)).filter((option, index2, all2) => all2.findIndex(({ value }) => value === option.value) === index2);
41047
- return options2.length ? options2 : gateChoice(field, cone, "user");
41134
+ function gateOptions(field2, cone, allowed = defaultGates[field2]) {
41135
+ const options2 = allowed.flatMap((gate) => gateChoice(field2, cone, gate)).filter((option, index2, all2) => all2.findIndex(({ value }) => value === option.value) === index2);
41136
+ return options2.length ? options2 : gateChoice(field2, cone, "user");
41048
41137
  }
41049
41138
  function defaultGate(options2) {
41050
41139
  return options2.some(({ value }) => value === "user") ? "user" : options2[0].value;
@@ -41189,11 +41278,11 @@ var SliccGuestInvite = class extends i2 {
41189
41278
  get #current() {
41190
41279
  return this.cones.find((cone) => cone.id === this.cone) ?? this.cones[0];
41191
41280
  }
41192
- #options(field, cone) {
41193
- return gateOptions(field, cone, this.port?.gates?.()[field]);
41281
+ #options(field2, cone) {
41282
+ return gateOptions(field2, cone, this.port?.gates?.()[field2]);
41194
41283
  }
41195
- #keep(gate, field, cone) {
41196
- const options2 = this.#options(field, cone);
41284
+ #keep(gate, field2, cone) {
41285
+ const options2 = this.#options(field2, cone);
41197
41286
  return options2.some((option) => option.value === gate) ? gate : defaultGate(options2);
41198
41287
  }
41199
41288
  #settle() {
@@ -41265,18 +41354,18 @@ var SliccGuestInvite = class extends i2 {
41265
41354
  this.remove();
41266
41355
  if (this.trigger?.isConnected) this.trigger.focus();
41267
41356
  }
41268
- #gate(field, title2, value) {
41269
- const options2 = this.#options(field, this.#current);
41357
+ #gate(field2, title2, value) {
41358
+ const options2 = this.#options(field2, this.#current);
41270
41359
  const chosen = options2.find((option) => option.value === value);
41271
- const id = `guest-${field}`;
41360
+ const id = `guest-${field2}`;
41272
41361
  return b`<div class="field">
41273
41362
  <sp-field-label for=${id} size="m">${title2}</sp-field-label>
41274
- <sp-picker id=${id} size="m" label=${title2} data-action=${`guest-${field}`} .value=${l(value)} ?disabled=${this.pending} @change=${(event2) => {
41275
- this[field] = this.#pick(event2);
41363
+ <sp-picker id=${id} size="m" label=${title2} data-action=${`guest-${field2}`} .value=${l(value)} ?disabled=${this.pending} @change=${(event2) => {
41364
+ this[field2] = this.#pick(event2);
41276
41365
  }}>
41277
41366
  ${options2.map((option) => b`<sp-menu-item value=${option.value}>${option.label}<span slot="description">${option.description}</span></sp-menu-item>`)}
41278
41367
  </sp-picker>
41279
- <sp-help-text size="m" data-help=${field}>${chosen.description}</sp-help-text>
41368
+ <sp-help-text size="m" data-help=${field2}>${chosen.description}</sp-help-text>
41280
41369
  </div>`;
41281
41370
  }
41282
41371
  #form() {
@@ -42862,11 +42951,11 @@ var SliccNetwork = class extends ModelElement {
42862
42951
  }
42863
42952
  async #submitPair(event2, port) {
42864
42953
  event2.preventDefault();
42865
- const field = this.renderRoot.querySelector("#pair-url");
42866
- const url = field.value.trim();
42954
+ const field2 = this.renderRoot.querySelector("#pair-url");
42955
+ const url = field2.value.trim();
42867
42956
  if (!url || this.pairBusy || !port.pairComputer) return;
42868
42957
  if (await this.#pairAct("pair", () => port.pairComputer?.(url))) {
42869
- field.value = "";
42958
+ field2.value = "";
42870
42959
  this.pairFilled = false;
42871
42960
  }
42872
42961
  }
@@ -42935,11 +43024,11 @@ var SliccNetwork = class extends ModelElement {
42935
43024
  #submitKey(event2, port) {
42936
43025
  event2.preventDefault();
42937
43026
  if (this.busy) return;
42938
- const field = event2.currentTarget.querySelector(
43027
+ const field2 = event2.currentTarget.querySelector(
42939
43028
  "sp-textfield"
42940
43029
  );
42941
- const key = field.value.trim();
42942
- field.value = "";
43030
+ const key = field2.value.trim();
43031
+ field2.value = "";
42943
43032
  if (key) void this.#tailnet("key", () => port.submitAuthKey?.(key));
42944
43033
  }
42945
43034
  #sendKey(event2) {
@@ -44002,14 +44091,14 @@ var directions2 = /* @__PURE__ */ new Set(["left", "right", "above", "below", "w
44002
44091
  function scan(parsed, rest, positional) {
44003
44092
  for (let index2 = 0; index2 < rest.length; index2++) {
44004
44093
  const arg = rest[index2];
44005
- const flag = arg.startsWith("--") ? arg.slice(2) : null;
44006
- if (flag === "json") parsed.json = true;
44007
- else if (flag === "section" || flag !== null && directions2.has(flag)) {
44094
+ const flag2 = arg.startsWith("--") ? arg.slice(2) : null;
44095
+ if (flag2 === "json") parsed.json = true;
44096
+ else if (flag2 === "section" || flag2 !== null && directions2.has(flag2)) {
44008
44097
  const value = rest[++index2];
44009
- if (value === void 0) return `--${flag} needs a value`;
44010
- if (flag === "section") parsed.section = value;
44098
+ if (value === void 0) return `--${flag2} needs a value`;
44099
+ if (flag2 === "section") parsed.section = value;
44011
44100
  else if (parsed.place) return "give one place";
44012
- else parsed.place = { direction: flag, ref: value };
44101
+ else parsed.place = { direction: flag2, ref: value };
44013
44102
  } else if (arg.startsWith("-")) return `unknown option ${arg}`;
44014
44103
  else positional.push(arg);
44015
44104
  }
@@ -49363,9 +49452,9 @@ var SliccApp = class extends ThemedElement {
49363
49452
  #railButton(item2, side) {
49364
49453
  const changes2 = item2.id === "changes" ? this.#changes() : 0;
49365
49454
  const driven = item2.id === "browser" && !!this.model?.browser.list().some((tab) => tab.controlled);
49366
- const visible2 = shown2(this.dock, item2.id);
49367
- const label = `${visible2 ? `${item2.title}, shown` : `Open ${item2.title}`}${changes2 ? `, ${changeCount(changes2)}` : driven ? ", a tab is in use" : ""}`;
49368
- const button = u21`<swc-action-button id=${`rail-${item2.id}`} class=${visible2 ? "selected" : ""} quiet size="m" accessible-label=${label} data-surface=${item2.id} data-cone=${o2(item2.cone)} ?data-visible=${visible2} @click=${(event2) => this.#railClick(event2, item2.id)}>${railIcon(item2.icon)}</swc-action-button>`;
49455
+ const visible3 = shown2(this.dock, item2.id);
49456
+ const label = `${visible3 ? `${item2.title}, shown` : `Open ${item2.title}`}${changes2 ? `, ${changeCount(changes2)}` : driven ? ", a tab is in use" : ""}`;
49457
+ const button = u21`<swc-action-button id=${`rail-${item2.id}`} class=${visible3 ? "selected" : ""} quiet size="m" accessible-label=${label} data-surface=${item2.id} data-cone=${o2(item2.cone)} ?data-visible=${visible3} @click=${(event2) => this.#railClick(event2, item2.id)}>${railIcon(item2.icon)}</swc-action-button>`;
49369
49458
  const tooltip = b`<swc-tooltip for=${`rail-${item2.id}`} placement=${{ left: "end", right: "start", bottom: "top" }[side]}>${item2.title}</swc-tooltip>`;
49370
49459
  return changes2 ? b`<span class="badged">${button}<swc-badge size="s" variant="neutral" aria-hidden="true">${changes2}</swc-badge></span>${tooltip}` : driven ? b`<span class="badged">${button}<span class="dot" data-driven aria-hidden="true"></span></span>${tooltip}` : b`${button}${tooltip}`;
49371
49460
  }
@@ -49679,27 +49768,67 @@ function pattern(path2) {
49679
49768
  var opaque = /^\/(?:proc\/[^/]+\/(?:task\/[^/]+\/)?(?:cwd|fd|map_files)|dev\/fd)(?:\/|$)/;
49680
49769
  var certain = (rules) => rules.startsWith("/") && !opaque.test(rules) && !rules.endsWith("\u2026");
49681
49770
  var readOnly = [
49771
+ "b2sum",
49772
+ "base64",
49682
49773
  "cat",
49683
49774
  "cd",
49775
+ "cksum",
49776
+ "cut",
49684
49777
  "df",
49685
49778
  "diff",
49686
49779
  "du",
49687
49780
  "echo",
49688
49781
  "file",
49782
+ "find",
49689
49783
  "grep",
49690
49784
  "head",
49785
+ "jq",
49691
49786
  "ls",
49787
+ "md5sum",
49788
+ "nl",
49789
+ "od",
49692
49790
  "pwd",
49693
49791
  "readlink",
49694
49792
  "realpath",
49793
+ "sha1sum",
49794
+ "sha224sum",
49795
+ "sha256sum",
49796
+ "sha384sum",
49797
+ "sha512sum",
49798
+ "sort",
49695
49799
  "stat",
49800
+ "tac",
49696
49801
  "tail",
49697
49802
  "tree",
49698
- "wc"
49803
+ "uniq",
49804
+ "wc",
49805
+ "xxd",
49806
+ "yq"
49699
49807
  ];
49808
+ var flag = (short2, long) => (args2) => args2.some((arg) => {
49809
+ if (!arg.startsWith("--")) return /^-[^-]/.test(arg) && [...short2].some((c29) => arg.includes(c29));
49810
+ const [name] = arg.slice(2).split("=");
49811
+ return !!name && long.some((option) => option.startsWith(name));
49812
+ });
49813
+ var operands = (args2) => {
49814
+ const end = args2.includes("--") ? args2.indexOf("--") : args2.length;
49815
+ const named2 = args2.slice(0, end).filter((arg) => arg === "-" || !arg.startsWith("-"));
49816
+ return named2.length + args2.slice(end + 1).length > 1;
49817
+ };
49818
+ var writes = {
49819
+ base64: flag("o", ["output"]),
49820
+ file: flag("C", ["compile"]),
49821
+ find: (args2) => args2.some((arg) => /^-(?:delete|exec|execdir|ok|okdir|fls|fprint0?|fprintf)$/.test(arg)),
49822
+ sort: flag("oT", ["output", "temporary-directory", "compress-program"]),
49823
+ tree: flag("oR", []),
49824
+ uniq: operands,
49825
+ xxd: operands,
49826
+ yq: flag("is", ["inplace", "in-place", "split-exp", "split-exp-file"])
49827
+ };
49700
49828
  function candidates(word2) {
49701
49829
  if (word2 === "--") return [];
49702
- if (word2.startsWith("--")) return [word2];
49830
+ if (word2.startsWith("--"))
49831
+ return word2.includes("=") ? [word2, word2.split("=").slice(1).join("=")] : [word2];
49703
49832
  if (!word2.startsWith("-")) return [word2];
49704
49833
  const slash = word2.indexOf("/");
49705
49834
  const cluster = Array.from(word2.slice(2), (_7, index2) => word2.slice(index2 + 2));
@@ -49719,7 +49848,10 @@ function protects(path2, whole) {
49719
49848
  return rulePaths.some((rule) => glob.test(rule)) || top !== path2 && pattern(top).test("/etc/fnox") || whole && ruleParents.some((parent) => glob.test(parent));
49720
49849
  }
49721
49850
  var command2 = (word2) => word2.split("/").pop() ?? "";
49722
- var trusted2 = (word2) => readOnly.includes(word2.replace(/^\/(?:usr\/)?bin\/(?=[^/]+$)/, ""));
49851
+ var trusted2 = ([word2, ...args2]) => {
49852
+ const name = word2.replace(/^\/(?:usr\/)?bin\/(?=[^/]+$)/, "");
49853
+ return readOnly.includes(name) && !writes[name]?.(args2);
49854
+ };
49723
49855
  var expansion = /\$\([^)]*\)?|\$\{[^}]*\}?|\$[\w@*#?$!-]*|`[^`]*`?/;
49724
49856
  function moved(cwds, word2) {
49725
49857
  for (const cwd of [...cwds]) {
@@ -49795,6 +49927,8 @@ function shield(text4) {
49795
49927
  }
49796
49928
  return out;
49797
49929
  }
49930
+ var literal = (char, quote) => /[*?[{]/.test(char) || quote === "'" && char === "$" ? String.fromCharCode(57600 + char.charCodeAt(0)) : char;
49931
+ var unmark = (path2) => path2.replace(/[\ue100-\ue17f]/g, (char) => String.fromCharCode(char.charCodeAt(0) - 57600));
49798
49932
  function quoted(segment2) {
49799
49933
  const words2 = [];
49800
49934
  let word2 = "";
@@ -49805,7 +49939,7 @@ function quoted(segment2) {
49805
49939
  word2 += segment2[++index2];
49806
49940
  else if (quote) {
49807
49941
  if (char === quote) quote = "";
49808
- else word2 += char;
49942
+ else word2 += literal(char, quote);
49809
49943
  } else if (char === "'" || char === '"') quote = char;
49810
49944
  else if (char === "\\") word2 += segment2[++index2] ?? "";
49811
49945
  else if (/[\s<>=]/.test(char)) {
@@ -49842,8 +49976,10 @@ function reach2(command3, cwd) {
49842
49976
  const text4 = unglob(ansi2(command3.replace(/\\\n/g, "")));
49843
49977
  const plain4 = text4.split(separators).map((segment2) => commas(segment2.split(/[\s<>=]+/).map((word2) => word2.replace(/['"\\]/g, ""))));
49844
49978
  const aware = shield(text4).split(separators).map((segment2) => commas(quoted(unshield(segment2))));
49845
- const segments = JSON.stringify(aware) === JSON.stringify(plain4) ? plain4 : [...plain4, ...aware];
49846
- const whole = segments.some((words2) => words2.length > 0 && !trusted2(words2[0]));
49979
+ const live = text4.includes("`") || aware.flat().some((word2) => word2.includes("$"));
49980
+ const inert2 = !live && aware.every((words2) => !words2.length || trusted2(words2));
49981
+ const segments = inert2 || JSON.stringify(aware) === JSON.stringify(plain4) ? aware : [...plain4, ...aware];
49982
+ const whole = !inert2 && segments.some((words2) => words2.length > 0 && !trusted2(words2));
49847
49983
  for (const words2 of segments) {
49848
49984
  const hit = scan2(words2, cwds, whole);
49849
49985
  if (hit) return hit;
@@ -49855,7 +49991,8 @@ function reach2(command3, cwd) {
49855
49991
  return segments.flat().some((word2) => word2.includes("$")) || text4.includes("`") ? text4.match(expansion)[0] : null;
49856
49992
  }
49857
49993
  function secretRules(command3, cwd) {
49858
- const hit = reach2(command3, cwd);
49994
+ const found = reach2(command3, cwd);
49995
+ const hit = found && unmark(found);
49859
49996
  return hit && certain(hit) ? { certain: hit, maybe: null } : { certain: null, maybe: hit };
49860
49997
  }
49861
49998
  function origin() {
@@ -51210,11 +51347,11 @@ var SliccBrowser = class extends ModelElement {
51210
51347
  }
51211
51348
  updated() {
51212
51349
  const tab = this.#focused();
51213
- const visible2 = this.#visible();
51214
- this.#settle(visible2 && tab?.controlled && this.model?.browser.watch ? tab.id : null);
51215
- if (visible2 && tab && !this.#ticker)
51350
+ const visible3 = this.#visible();
51351
+ this.#settle(visible3 && tab?.controlled && this.model?.browser.watch ? tab.id : null);
51352
+ if (visible3 && tab && !this.#ticker)
51216
51353
  this.#ticker = setInterval(() => this.requestUpdate(), 1e3);
51217
- if (!(visible2 && tab)) this.#still();
51354
+ if (!(visible3 && tab)) this.#still();
51218
51355
  const list6 = this.renderRoot.querySelector(".actions:not(.last)");
51219
51356
  const last = list6?.lastElementChild?.getAttribute("data-action-id") ?? null;
51220
51357
  if (list6 && this.#anchor !== null) list6.scrollTop = list6.scrollHeight - this.#anchor;
@@ -52229,7 +52366,7 @@ e26("swc-icon-user-settings", o90);
52229
52366
 
52230
52367
  // src/app/memory.ts
52231
52368
  var everyone = "*";
52232
- function visible(memories, scope, tag3, query) {
52369
+ function visible2(memories, scope, tag3, query) {
52233
52370
  const needle = query.trim().toLowerCase();
52234
52371
  return memories.filter(
52235
52372
  (memory) => (scope === everyone || memory.scope === scope) && (tag3 === "all" || (tag3 === "untagged" ? memory.tag === null : memory.tag === tag3)) && (!needle || `${memory.title} ${memory.body} ${memory.section}`.toLowerCase().includes(needle))
@@ -52546,15 +52683,15 @@ var SliccMemory = class extends ModelElement {
52546
52683
  }
52547
52684
  #save(memory) {
52548
52685
  const form = this.renderRoot.querySelector(".editor");
52549
- const field = (name) => form.querySelector(`[name=${name}]`).value.trim();
52550
- if (!field("title")) return;
52551
- const tag3 = field("tag");
52686
+ const field2 = (name) => form.querySelector(`[name=${name}]`).value.trim();
52687
+ if (!field2("title")) return;
52688
+ const tag3 = field2("tag");
52552
52689
  const saved = this.model?.memory.save({
52553
52690
  ...memory.id ? { id: memory.id } : {},
52554
52691
  scope: memory.scope,
52555
- section: field("section") || "Notes",
52556
- title: field("title"),
52557
- body: field("body"),
52692
+ section: field2("section") || "Notes",
52693
+ title: field2("title"),
52694
+ body: field2("body"),
52558
52695
  tag: tag3 !== "none" ? tag3 : null
52559
52696
  });
52560
52697
  this.editing = null;
@@ -52662,7 +52799,7 @@ var SliccMemory = class extends ModelElement {
52662
52799
  const scopes = this.#scopes;
52663
52800
  const scope = this.scope;
52664
52801
  const option = (item2) => b`<sp-menu-item value=${item2.id}>${item2.label}</sp-menu-item>`;
52665
- const shown4 = visible(all2, scope, this.tag, this.query);
52802
+ const shown4 = visible2(all2, scope, this.tag, this.query);
52666
52803
  const total = inScope(all2, scope);
52667
52804
  const filtered = this.tag !== "all" || this.query.trim() !== "";
52668
52805
  const current = scopes.find((item2) => item2.id === scope) ?? null;
@@ -53537,19 +53674,19 @@ var SliccSecrets = class extends ThemedElement {
53537
53674
  if (form?.kind === "import") this.importKind = "bundle";
53538
53675
  if (form) void this.updateComplete.then(() => this.#focus());
53539
53676
  }
53540
- #refuse(text4, field = null, focus = false) {
53677
+ #refuse(text4, field2 = null, focus = false) {
53541
53678
  this.problem = text4;
53542
- this.invalid = text4 ? field : null;
53543
- if (focus && text4 && field) void this.updateComplete.then(() => this.#field(field)?.focus());
53679
+ this.invalid = text4 ? field2 : null;
53680
+ if (focus && text4 && field2) void this.updateComplete.then(() => this.#field(field2)?.focus());
53544
53681
  }
53545
53682
  #typed() {
53546
53683
  this.invalid = null;
53547
53684
  }
53548
- #bad(field) {
53549
- return this.invalid === field ? "true" : A;
53685
+ #bad(field2) {
53686
+ return this.invalid === field2 ? "true" : A;
53550
53687
  }
53551
- #described(field) {
53552
- return this.invalid === field ? "error-form" : A;
53688
+ #described(field2) {
53689
+ return this.invalid === field2 ? "error-form" : A;
53553
53690
  }
53554
53691
  #focus() {
53555
53692
  this.renderRoot.querySelector("[data-form] input, [data-form] sp-picker")?.focus();
@@ -53787,8 +53924,8 @@ var SliccSecrets = class extends ThemedElement {
53787
53924
  event2.preventDefault();
53788
53925
  if (!locked && !this.busy) void run();
53789
53926
  }
53790
- #value(label, field = "value") {
53791
- return b`<label class="field"><span>${label}</span><input type="password" autocomplete="off" spellcheck="false" data-field=${field} aria-invalid=${this.#bad(field)} aria-describedby=${this.#described(field)} /></label>`;
53927
+ #value(label, field2 = "value") {
53928
+ return b`<label class="field"><span>${label}</span><input type="password" autocomplete="off" spellcheck="false" data-field=${field2} aria-invalid=${this.#bad(field2)} aria-describedby=${this.#described(field2)} /></label>`;
53792
53929
  }
53793
53930
  #actions(locked, label, action, run) {
53794
53931
  return b`<div class="buttons">
@@ -54277,6 +54414,7 @@ var SliccSettings = class extends ThemedElement {
54277
54414
  };
54278
54415
  #waits = new SignInWaits(() => this.requestUpdate());
54279
54416
  #copies = new SignInCopies(() => this.requestUpdate());
54417
+ #modelFilter = new ModelFilter(this);
54280
54418
  #landing = null;
54281
54419
  #away = false;
54282
54420
  #bases = /* @__PURE__ */ new Map();
@@ -54309,6 +54447,7 @@ var SliccSettings = class extends ThemedElement {
54309
54447
  fieldStyles,
54310
54448
  dialogFrame,
54311
54449
  searchCss,
54450
+ modelFilterCss,
54312
54451
  r(link_default),
54313
54452
  signInCss,
54314
54453
  i`
@@ -54840,13 +54979,13 @@ var SliccSettings = class extends ThemedElement {
54840
54979
  });
54841
54980
  }
54842
54981
  #settingsOf(account, fields) {
54843
- const settable = (account.fields ?? []).filter((field) => field.vaultSetting);
54982
+ const settable = (account.fields ?? []).filter((field2) => field2.vaultSetting);
54844
54983
  if (account.group === "mcp" || !settable.length) return void 0;
54845
54984
  return Object.fromEntries(
54846
- settable.flatMap((field) => {
54847
- const value = fields?.[field.name];
54848
- if (!value || field.customBase && this.#baseOf(value)) return [];
54849
- return [[field.vaultSetting, value]];
54985
+ settable.flatMap((field2) => {
54986
+ const value = fields?.[field2.name];
54987
+ if (!value || field2.customBase && this.#baseOf(value)) return [];
54988
+ return [[field2.vaultSetting, value]];
54850
54989
  })
54851
54990
  );
54852
54991
  }
@@ -54859,17 +54998,17 @@ var SliccSettings = class extends ThemedElement {
54859
54998
  #keyOptional(account) {
54860
54999
  const vault = this.#vault(account);
54861
55000
  const fields = account.fields ?? [];
54862
- if (!vault || !fields.some((field) => field.vaultSetting || field.customBase)) return false;
54863
- if (fields.some((field) => field.vaultSetting) && !vault.settings) return false;
55001
+ if (!vault || !fields.some((field2) => field2.vaultSetting || field2.customBase)) return false;
55002
+ if (fields.some((field2) => field2.vaultSetting) && !vault.settings) return false;
54864
55003
  return !!this.#record(account);
54865
55004
  }
54866
55005
  #refused(account, message, keyed2) {
54867
- const field = (account.fields ?? []).find(
55006
+ const field2 = (account.fields ?? []).find(
54868
55007
  (candidate) => [candidate.vaultSetting, candidate.name, candidate.label].some(
54869
55008
  (word2) => word2 && words(message, word2)
54870
55009
  )
54871
55010
  );
54872
- if (field) this.#refuse(account.id, field.name, message);
55011
+ if (field2) this.#refuse(account.id, field2.name, message);
54873
55012
  else if (keyed2) this.#refuse(account.id, "value", message);
54874
55013
  else this.failure = { id: account.id, message };
54875
55014
  }
@@ -54881,14 +55020,14 @@ var SliccSettings = class extends ThemedElement {
54881
55020
  return void 0;
54882
55021
  }
54883
55022
  }
54884
- #oldBase(account, field) {
54885
- return this.#baseOf(field.value) ?? this.#bases.get(`${account.id} ${field.name}`);
55023
+ #oldBase(account, field2) {
55024
+ return this.#baseOf(field2.value) ?? this.#bases.get(`${account.id} ${field2.name}`);
54886
55025
  }
54887
55026
  #baseChanges(account, fields) {
54888
- return (account.fields ?? []).filter((field) => field.customBase).map((field) => ({
54889
- field: field.name,
54890
- url: this.#baseOf(fields?.[field.name]),
54891
- old: this.#oldBase(account, field)
55027
+ return (account.fields ?? []).filter((field2) => field2.customBase).map((field2) => ({
55028
+ field: field2.name,
55029
+ url: this.#baseOf(fields?.[field2.name]),
55030
+ old: this.#oldBase(account, field2)
54892
55031
  })).filter((change) => change.url !== change.old);
54893
55032
  }
54894
55033
  #modelChange(name, changes2, from, to) {
@@ -54914,8 +55053,8 @@ var SliccSettings = class extends ThemedElement {
54914
55053
  await live?.endpoints?.(forward);
54915
55054
  } catch (error) {
54916
55055
  this.#busy(id, false);
54917
- const field = changes2.find((change) => change.url) ?? changes2[0];
54918
- if (this.model === model) this.#refuse(id, field.field, failureText(error));
55056
+ const field2 = changes2.find((change) => change.url) ?? changes2[0];
55057
+ if (this.model === model) this.#refuse(id, field2.field, failureText(error));
54919
55058
  return;
54920
55059
  }
54921
55060
  if (this.model !== model) {
@@ -54939,35 +55078,35 @@ var SliccSettings = class extends ThemedElement {
54939
55078
  }
54940
55079
  #placeFailure(account, fields) {
54941
55080
  const message = this.failure.message;
54942
- const field = (account.fields ?? []).find(
55081
+ const field2 = (account.fields ?? []).find(
54943
55082
  (candidate) => candidate.customBase && !!fields?.[candidate.name] && [candidate.name, candidate.label, "https", "url", "port", "userinfo"].some(
54944
55083
  (word2) => words(message, word2)
54945
55084
  )
54946
55085
  );
54947
- if (!field) return;
55086
+ if (!field2) return;
54948
55087
  this.failure = null;
54949
- this.#refuse(account.id, field.name, message);
55088
+ this.#refuse(account.id, field2.name, message);
54950
55089
  }
54951
- #refuse(id, field, message) {
54952
- this.problem = { id, field, message };
55090
+ #refuse(id, field2, message) {
55091
+ this.problem = { id, field: field2, message };
54953
55092
  void this.updateComplete.then(
54954
55093
  () => this.renderRoot.querySelector(
54955
- field === "value" ? ".key input[data-field=value]" : `.key [data-account-field="${field}"]`
55094
+ field2 === "value" ? ".key input[data-field=value]" : `.key [data-account-field="${field2}"]`
54956
55095
  )?.focus()
54957
55096
  );
54958
55097
  }
54959
55098
  #fields(form, account) {
54960
55099
  if (!account.fields?.length) return void 0;
54961
55100
  const values = {};
54962
- for (const field of account.fields) {
54963
- const input = form.querySelector(`[data-account-field="${field.name}"]`);
55101
+ for (const field2 of account.fields) {
55102
+ const input = form.querySelector(`[data-account-field="${field2.name}"]`);
54964
55103
  const value = input.value.trim();
54965
- if (value) values[field.name] = value;
54966
- else if (field.required && field.options?.length !== 0) {
55104
+ if (value) values[field2.name] = value;
55105
+ else if (field2.required && field2.options?.length !== 0) {
54967
55106
  this.#refuse(
54968
55107
  account.id,
54969
- field.name,
54970
- field.options ? `Select a ${field.label.toLowerCase()}.` : `${field.label} can\u2019t be empty`
55108
+ field2.name,
55109
+ field2.options ? `Select a ${field2.label.toLowerCase()}.` : `${field2.label} can\u2019t be empty`
54971
55110
  );
54972
55111
  return null;
54973
55112
  }
@@ -55010,7 +55149,7 @@ var SliccSettings = class extends ThemedElement {
55010
55149
  this.failure = null;
55011
55150
  this.problem = null;
55012
55151
  this.filled = new Set(
55013
- (account.fields ?? []).filter((field) => field.options || field.value?.trim()).map((field) => field.name)
55152
+ (account.fields ?? []).filter((field2) => field2.options || field2.value?.trim()).map((field2) => field2.name)
55014
55153
  );
55015
55154
  this.entering = account.id;
55016
55155
  void this.updateComplete.then(() => this.focusOn(".key sp-textfield", ".key input"));
@@ -55032,9 +55171,9 @@ var SliccSettings = class extends ThemedElement {
55032
55171
  if (fields2 !== null && !this.pending.has(account.id)) void this.keep(account, value, fields2);
55033
55172
  return;
55034
55173
  }
55035
- const field = form.querySelector("sp-textfield");
55036
- const secret = field.value.trim();
55037
- field.value = "";
55174
+ const field2 = form.querySelector("sp-textfield");
55175
+ const secret = field2.value.trim();
55176
+ field2.value = "";
55038
55177
  const fields = this.#fields(form, account);
55039
55178
  if (secret && fields !== null) void this.#connectBases(account, secret, fields);
55040
55179
  }
@@ -55117,67 +55256,67 @@ var SliccSettings = class extends ThemedElement {
55117
55256
  this.failure = null;
55118
55257
  this.problem = null;
55119
55258
  }
55120
- #problem(account, field, icon = true) {
55259
+ #problem(account, field2, icon = true) {
55121
55260
  const problem = this.problem;
55122
- if (problem?.id !== account.id || problem.field !== field) return A;
55261
+ if (problem?.id !== account.id || problem.field !== field2) return A;
55123
55262
  return b`<div class="problem" id="key-problem" role="alert">
55124
55263
  ${icon ? b`<swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>` : A}
55125
55264
  <span>${problem.message}</span>
55126
55265
  </div>`;
55127
55266
  }
55128
- #described(account, field) {
55129
- return this.problem?.id === account.id && this.problem.field === field ? "key-problem" : A;
55267
+ #described(account, field2) {
55268
+ return this.problem?.id === account.id && this.problem.field === field2 ? "key-problem" : A;
55130
55269
  }
55131
- #invalid(account, field) {
55132
- return this.#described(account, field) === A ? A : "true";
55270
+ #invalid(account, field2) {
55271
+ return this.#described(account, field2) === A ? A : "true";
55133
55272
  }
55134
55273
  #extra(account) {
55135
55274
  return (account.fields ?? []).map(
55136
- (field) => field.options ? b`<div class="field">
55137
- <sp-field-label for=${`field-${field.name}`} size="m">${field.label}</sp-field-label>${this.#control(account, field)}
55138
- ${field.options.length ? A : b`<p class="hint" data-empty=${field.name}>${nothingToChoose}</p>`}
55139
- ${field.help ? b`<p class="hint" id=${`help-${field.name}`}>${field.help}</p>` : A}
55140
- ${this.#problem(account, field.name, false)}
55275
+ (field2) => field2.options ? b`<div class="field">
55276
+ <sp-field-label for=${`field-${field2.name}`} size="m">${field2.label}</sp-field-label>${this.#control(account, field2)}
55277
+ ${field2.options.length ? A : b`<p class="hint" data-empty=${field2.name}>${nothingToChoose}</p>`}
55278
+ ${field2.help ? b`<p class="hint" id=${`help-${field2.name}`}>${field2.help}</p>` : A}
55279
+ ${this.#problem(account, field2.name, false)}
55141
55280
  </div>` : b`<label class="field">
55142
- <span>${field.label}</span>${this.#control(account, field)}
55281
+ <span>${field2.label}</span>${this.#control(account, field2)}
55143
55282
  </label>
55144
- ${field.help ? b`<p class="hint" id=${`help-${field.name}`}>${field.help}</p>` : A}
55145
- ${this.#problem(account, field.name)}`
55283
+ ${field2.help ? b`<p class="hint" id=${`help-${field2.name}`}>${field2.help}</p>` : A}
55284
+ ${this.#problem(account, field2.name)}`
55146
55285
  );
55147
55286
  }
55148
- #describedBy(account, field) {
55149
- const problem = this.#described(account, field.name);
55150
- const ids = [problem === A ? "" : problem, field.help ? `help-${field.name}` : ""];
55287
+ #describedBy(account, field2) {
55288
+ const problem = this.#described(account, field2.name);
55289
+ const ids = [problem === A ? "" : problem, field2.help ? `help-${field2.name}` : ""];
55151
55290
  return ids.filter(Boolean).join(" ") || A;
55152
55291
  }
55153
- #control(account, field) {
55154
- if (field.options) {
55155
- const empty4 = !field.options.length;
55156
- const described2 = this.problem?.id === account.id && this.problem.field === field.name;
55292
+ #control(account, field2) {
55293
+ if (field2.options) {
55294
+ const empty4 = !field2.options.length;
55295
+ const described2 = this.problem?.id === account.id && this.problem.field === field2.name;
55157
55296
  return b`<sp-picker
55158
55297
  size="m"
55159
- data-account-field=${field.name}
55160
- label=${empty4 ? "None available" : field.label}
55161
- id=${`field-${field.name}`}
55162
- value=${start(field.options, field.value)}
55298
+ data-account-field=${field2.name}
55299
+ label=${empty4 ? "None available" : field2.label}
55300
+ id=${`field-${field2.name}`}
55301
+ value=${start(field2.options, field2.value)}
55163
55302
  ?disabled=${empty4}
55164
55303
  ?invalid=${described2}
55165
- aria-required=${field.required ? "true" : A}
55304
+ aria-required=${field2.required ? "true" : A}
55166
55305
  >
55167
- ${field.options.map((option) => b`<sp-menu-item value=${option.value}>${option.label}</sp-menu-item>`)}
55168
- ${described2 || empty4 || field.help ? b`<span slot="description" class="sr">${described2 ? this.problem?.message : empty4 ? nothingToChoose : field.help}</span>` : A}
55306
+ ${field2.options.map((option) => b`<sp-menu-item value=${option.value}>${option.label}</sp-menu-item>`)}
55307
+ ${described2 || empty4 || field2.help ? b`<span slot="description" class="sr">${described2 ? this.problem?.message : empty4 ? nothingToChoose : field2.help}</span>` : A}
55169
55308
  </sp-picker>`;
55170
55309
  }
55171
55310
  return b`<input
55172
55311
  type="text"
55173
55312
  autocomplete="off"
55174
55313
  spellcheck="false"
55175
- data-account-field=${field.name}
55176
- value=${field.value ?? A}
55177
- placeholder=${field.placeholder ?? A}
55178
- aria-required=${field.required ? "true" : A}
55179
- aria-invalid=${this.#invalid(account, field.name)}
55180
- aria-describedby=${this.#describedBy(account, field)}
55314
+ data-account-field=${field2.name}
55315
+ value=${field2.value ?? A}
55316
+ placeholder=${field2.placeholder ?? A}
55317
+ aria-required=${field2.required ? "true" : A}
55318
+ aria-invalid=${this.#invalid(account, field2.name)}
55319
+ aria-describedby=${this.#describedBy(account, field2)}
55181
55320
  />`;
55182
55321
  }
55183
55322
  #getKey(account) {
@@ -55195,9 +55334,9 @@ var SliccSettings = class extends ThemedElement {
55195
55334
  #ready(account) {
55196
55335
  if (account.blocked) return false;
55197
55336
  if (!this.#offered()) return true;
55198
- const required = (account.fields ?? []).filter((field) => field.required && !field.options);
55337
+ const required = (account.fields ?? []).filter((field2) => field2.required && !field2.options);
55199
55338
  const key = this.#keyOptional(account) ? [] : ["value"];
55200
- return [...key, ...required.map((field) => field.name)].every((name) => this.filled.has(name));
55339
+ return [...key, ...required.map((field2) => field2.name)].every((name) => this.filled.has(name));
55201
55340
  }
55202
55341
  #fill(event2) {
55203
55342
  const input = event2.target;
@@ -55485,7 +55624,7 @@ var SliccSettings = class extends ThemedElement {
55485
55624
  this.#busy(account.id, false);
55486
55625
  }
55487
55626
  this.focusOn("[data-action=add-provider]");
55488
- for (const field of account.fields ?? []) this.#bases.delete(`${account.id} ${field.name}`);
55627
+ for (const field2 of account.fields ?? []) this.#bases.delete(`${account.id} ${field2.name}`);
55489
55628
  }
55490
55629
  #heldRecords(account, vault) {
55491
55630
  const server = serverOf(account);
@@ -55596,7 +55735,7 @@ var SliccSettings = class extends ThemedElement {
55596
55735
  event2.preventDefault();
55597
55736
  if (this.serverBusy) return;
55598
55737
  const form = event2.currentTarget;
55599
- const text4 = (field) => form.querySelector(`[data-server-field=${field}]`)?.value.trim();
55738
+ const text4 = (field2) => form.querySelector(`[data-server-field=${field2}]`)?.value.trim();
55600
55739
  const name = text4("name");
55601
55740
  const url = text4("url");
55602
55741
  const problem = this.#checkServer(name, url);
@@ -55625,21 +55764,21 @@ var SliccSettings = class extends ThemedElement {
55625
55764
  this.serverProblem = problem;
55626
55765
  if (problem.field !== "form") this.focusOn(`[data-server-field=${problem.field}]`);
55627
55766
  }
55628
- #serverNote(field) {
55629
- if (this.serverProblem?.field !== field) return A;
55630
- return b`<div class="problem" id=${`server-${field}-problem`} role="alert" data-problem=${field}>
55767
+ #serverNote(field2) {
55768
+ if (this.serverProblem?.field !== field2) return A;
55769
+ return b`<div class="problem" id=${`server-${field2}-problem`} role="alert" data-problem=${field2}>
55631
55770
  <swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle>
55632
55771
  <span>${this.serverProblem.message}</span>
55633
55772
  </div>`;
55634
55773
  }
55635
- #serverInput(field, type, help2) {
55636
- const invalid = this.serverProblem?.field === field;
55637
- const problem = invalid ? `server-${field}-problem ` : "";
55774
+ #serverInput(field2, type, help2) {
55775
+ const invalid = this.serverProblem?.field === field2;
55776
+ const problem = invalid ? `server-${field2}-problem ` : "";
55638
55777
  return b`<input
55639
55778
  type=${type}
55640
55779
  autocomplete="off"
55641
55780
  spellcheck="false"
55642
- data-server-field=${field}
55781
+ data-server-field=${field2}
55643
55782
  aria-required="true"
55644
55783
  aria-invalid=${invalid ? "true" : A}
55645
55784
  aria-describedby=${`${problem}${help2}`}
@@ -55736,8 +55875,8 @@ var SliccSettings = class extends ThemedElement {
55736
55875
  const dialog = this.#dialog;
55737
55876
  if (!changed2.has("picking") || !dialog || dialog.open) return;
55738
55877
  dialog.showModal();
55739
- const field = this.renderRoot.querySelector("sp-search");
55740
- void field.updateComplete.then(() => field.focus());
55878
+ const field2 = this.renderRoot.querySelector("sp-search");
55879
+ void field2.updateComplete.then(() => field2.focus());
55741
55880
  }
55742
55881
  get #dialog() {
55743
55882
  return this.renderRoot.querySelector("dialog.picker");
@@ -55953,8 +56092,8 @@ var SliccSettings = class extends ThemedElement {
55953
56092
  <div class="rows">
55954
56093
  <div class="row">
55955
56094
  <span class="label" id="model">Model for new cones</span>
55956
- <sp-picker size="m" label="Model" aria-labelledby="model" value=${value.model} @change=${(e128) => this.#pickModel(e128)}>
55957
- ${chatModels(settings.models()).map((option) => b`<sp-menu-item value=${option.id}>${option.label}<span slot="description">${option.provider}</span></sp-menu-item>`)}
56095
+ <sp-picker size="m" label="Model" aria-labelledby="model" value=${value.model} @change=${(e128) => this.#pickModel(e128)} @sp-opened=${this.#modelFilter.opened} @sp-closed=${this.#modelFilter.closed} @keydown=${this.#modelFilter.keys}>
56096
+ ${this.#modelFilter.items(chatModels(settings.models()))}
55958
56097
  </sp-picker>
55959
56098
  ${this.#switched(value.model)}
55960
56099
  </div>
@@ -56112,7 +56251,7 @@ var bridge = `(() => {
56112
56251
  });
56113
56252
  post({ type: 'slicc-ready' });
56114
56253
  })();`;
56115
- function literal(value) {
56254
+ function literal2(value) {
56116
56255
  try {
56117
56256
  return JSON.stringify(value ?? null).replace(/</g, "\\u003c");
56118
56257
  } catch {
@@ -56121,7 +56260,7 @@ function literal(value) {
56121
56260
  }
56122
56261
  function store(state2) {
56123
56262
  return `(() => {
56124
- let state = ${literal(state2)};
56263
+ let state = ${literal2(state2)};
56125
56264
  const tag = Math.random().toString(36).slice(2);
56126
56265
  const pending = new Map();
56127
56266
  let next = 0;
@@ -56753,10 +56892,10 @@ var SliccValueRequest = class extends ThemedElement {
56753
56892
  const bad = nameProblem(name);
56754
56893
  const value = bad ? "" : take(this.#field("value"));
56755
56894
  const text4 = bad ?? valueProblem(value);
56756
- const field = bad ? "name" : "value";
56757
- this.problem = text4 ? { id: request2.id, text: text4, field } : null;
56895
+ const field2 = bad ? "name" : "value";
56896
+ this.problem = text4 ? { id: request2.id, text: text4, field: field2 } : null;
56758
56897
  if (text4) {
56759
- void this.updateComplete.then(() => this.#field(field)?.focus());
56898
+ void this.updateComplete.then(() => this.#field(field2)?.focus());
56760
56899
  return;
56761
56900
  }
56762
56901
  this.busy = true;
@@ -56766,8 +56905,8 @@ var SliccValueRequest = class extends ThemedElement {
56766
56905
  this.#done.add(request2.id);
56767
56906
  } catch (error) {
56768
56907
  if (this.#mine(vault)) {
56769
- const field2 = fieldOf(error, "value");
56770
- this.problem = { id: request2.id, text: failureText(error), ...field2 ? { field: field2 } : {} };
56908
+ const field3 = fieldOf(error, "value");
56909
+ this.problem = { id: request2.id, text: failureText(error), ...field3 ? { field: field3 } : {} };
56771
56910
  }
56772
56911
  } finally {
56773
56912
  if (this.model?.vault === vault) this.busy = false;
@@ -56776,8 +56915,8 @@ var SliccValueRequest = class extends ThemedElement {
56776
56915
  #typed() {
56777
56916
  if (this.problem?.field) this.problem = { id: this.problem.id, text: this.problem.text };
56778
56917
  }
56779
- #aria(field, problem) {
56780
- const bad = problem?.field === field;
56918
+ #aria(field2, problem) {
56919
+ const bad = problem?.field === field2;
56781
56920
  return { invalid: bad ? "true" : A, described: bad ? "error-request" : A };
56782
56921
  }
56783
56922
  async cancelRequest(request2) {
@@ -56848,7 +56987,7 @@ var SliccValueRequest = class extends ThemedElement {
56848
56987
  const shown4 = this.problem?.id === request2.id ? this.problem : null;
56849
56988
  const problem = shown4?.text ?? "";
56850
56989
  const name = this.#aria("name", shown4);
56851
- const field = this.#aria("value", shown4);
56990
+ const field2 = this.#aria("value", shown4);
56852
56991
  return i23(
56853
56992
  request2.id,
56854
56993
  b`<dialog role="alertdialog" aria-labelledby="title" aria-describedby="asked" data-request=${request2.id} @cancel=${(event2) => {
@@ -56864,7 +57003,7 @@ var SliccValueRequest = class extends ThemedElement {
56864
57003
  const input = event2.currentTarget;
56865
57004
  input.value = input.value.toUpperCase();
56866
57005
  }} /></label>`}
56867
- <label class="field"><span>Value</span><input type="password" autocomplete="off" spellcheck="false" data-field="value" aria-invalid=${field.invalid} aria-describedby=${field.described} /></label>
57006
+ <label class="field"><span>Value</span><input type="password" autocomplete="off" spellcheck="false" data-field="value" aria-invalid=${field2.invalid} aria-describedby=${field2.described} /></label>
56868
57007
  </div>` : A}
56869
57008
  ${locked ? this.#unlock(vault) : A}
56870
57009
  ${problem ? b`<p class="problem" role="alert" id="error-request" data-error><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${problem}</span></p>` : A}
@@ -57967,9 +58106,9 @@ var ViewItem = class {
57967
58106
  this._cachedVisibleSize = size4.cachedVisibleSize;
57968
58107
  }
57969
58108
  }
57970
- setVisible(visible2, size4) {
57971
- if (visible2 === this.visible) return;
57972
- if (visible2) {
58109
+ setVisible(visible3, size4) {
58110
+ if (visible3 === this.visible) return;
58111
+ if (visible3) {
57973
58112
  var _this$_cachedVisibleS;
57974
58113
  const cachedVisibleSize = (_this$_cachedVisibleS = this._cachedVisibleSize) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : 0;
57975
58114
  this._cachedVisibleSize = void 0;
@@ -57978,8 +58117,8 @@ var ViewItem = class {
57978
58117
  this._cachedVisibleSize = typeof size4 === "number" ? size4 : this.size;
57979
58118
  this.size = 0;
57980
58119
  }
57981
- this.container.classList.toggle("visible", visible2);
57982
- if (this.view.setVisible) this.view.setVisible(visible2);
58120
+ this.container.classList.toggle("visible", visible3);
58121
+ if (this.view.setVisible) this.view.setVisible(visible3);
57983
58122
  }
57984
58123
  dispose() {
57985
58124
  this.disposable.dispose();
@@ -58141,15 +58280,15 @@ var Splitview = class {
58141
58280
  let snapped = false;
58142
58281
  if (snapBefore) {
58143
58282
  const snapView = this.viewItems[snapBefore.index];
58144
- const visible2 = delta >= snapBefore.limitDelta;
58145
- snapped = visible2 !== snapView.visible;
58146
- snapView.setVisible(visible2, snapBefore.size);
58283
+ const visible3 = delta >= snapBefore.limitDelta;
58284
+ snapped = visible3 !== snapView.visible;
58285
+ snapView.setVisible(visible3, snapBefore.size);
58147
58286
  }
58148
58287
  if (!snapped && snapAfter) {
58149
58288
  const snapView = this.viewItems[snapAfter.index];
58150
- const visible2 = delta < snapAfter.limitDelta;
58151
- snapped = visible2 !== snapView.visible;
58152
- snapView.setVisible(visible2, snapAfter.size);
58289
+ const visible3 = delta < snapAfter.limitDelta;
58290
+ snapped = visible3 !== snapView.visible;
58291
+ snapView.setVisible(visible3, snapAfter.size);
58153
58292
  }
58154
58293
  if (snapped) return this.resize(index2, delta, sizes, lowPriorityIndexes, highPriorityIndexes, overloadMinDelta, overloadMaxDelta);
58155
58294
  const tentativeDelta = clamp(delta, minDelta, maxDelta);
@@ -58212,10 +58351,10 @@ var Splitview = class {
58212
58351
  if (index2 < 0 || index2 >= this.viewItems.length) throw new Error("Index out of bounds");
58213
58352
  return this.viewItems[index2].visible;
58214
58353
  }
58215
- setViewVisible(index2, visible2) {
58354
+ setViewVisible(index2, visible3) {
58216
58355
  if (index2 < 0 || index2 >= this.viewItems.length) throw new Error("Index out of bounds");
58217
58356
  const viewItem = this.viewItems[index2];
58218
- viewItem.setVisible(visible2, viewItem.size);
58357
+ viewItem.setVisible(visible3, viewItem.size);
58219
58358
  this.distributeEmptySpace(index2);
58220
58359
  this.layoutViews();
58221
58360
  this.saveProportions();
@@ -58658,8 +58797,8 @@ var LeafNode = class {
58658
58797
  else this._onDidChange.fire({});
58659
58798
  });
58660
58799
  }
58661
- setVisible(visible2) {
58662
- if (this.view.setVisible) this.view.setVisible(visible2);
58800
+ setVisible(visible3) {
58801
+ if (this.view.setVisible) this.view.setVisible(visible3);
58663
58802
  }
58664
58803
  layout(size4, orthogonalSize) {
58665
58804
  this._size = size4;
@@ -58821,14 +58960,14 @@ var BranchNode = class BranchNode2 extends CompositeDisposable {
58821
58960
  if (index2 < 0 || index2 >= this.children.length) throw new Error("Invalid index");
58822
58961
  return this.splitview.isViewVisible(index2);
58823
58962
  }
58824
- setChildVisible(index2, visible2) {
58963
+ setChildVisible(index2, visible3) {
58825
58964
  if (index2 < 0 || index2 >= this.children.length) throw new Error("Invalid index");
58826
- if (this.splitview.isViewVisible(index2) === visible2) return;
58965
+ if (this.splitview.isViewVisible(index2) === visible3) return;
58827
58966
  const wereAllChildrenHidden = this.splitview.contentSize === 0;
58828
- this.splitview.setViewVisible(index2, visible2);
58967
+ this.splitview.setViewVisible(index2, visible3);
58829
58968
  this.invalidateCachedSizes();
58830
58969
  const areAllChildrenHidden = this.splitview.contentSize === 0;
58831
- if (visible2 && wereAllChildrenHidden || !visible2 && areAllChildrenHidden) this._onDidVisibilityChange.fire({ visible: visible2 });
58970
+ if (visible3 && wereAllChildrenHidden || !visible3 && areAllChildrenHidden) this._onDidVisibilityChange.fire({ visible: visible3 });
58832
58971
  }
58833
58972
  moveChild(from, to) {
58834
58973
  if (from === to) return;
@@ -58881,8 +59020,8 @@ var BranchNode = class BranchNode2 extends CompositeDisposable {
58881
59020
  this.invalidateCachedSizes();
58882
59021
  this._onDidChange.fire({ size: e128.orthogonalSize });
58883
59022
  }), ...this.children.map((c29, i26) => {
58884
- if (c29 instanceof BranchNode2) return c29.onDidVisibilityChange(({ visible: visible2 }) => {
58885
- this.setChildVisible(i26, visible2);
59023
+ if (c29 instanceof BranchNode2) return c29.onDidVisibilityChange(({ visible: visible3 }) => {
59024
+ this.setChildVisible(i26, visible3);
58886
59025
  });
58887
59026
  return Disposable.NONE;
58888
59027
  }));
@@ -59308,13 +59447,13 @@ var Gridview = class {
59308
59447
  if (!(parent instanceof BranchNode)) throw new TypeError("Invalid from location");
59309
59448
  return parent.isChildVisible(index2);
59310
59449
  }
59311
- setViewVisible(location2, visible2) {
59450
+ setViewVisible(location2, visible3) {
59312
59451
  if (this.hasMaximizedView()) this.exitMaximizedView();
59313
59452
  const [rest, index2] = tail(location2);
59314
59453
  const [, parent] = this.getNode(rest);
59315
59454
  if (!(parent instanceof BranchNode)) throw new TypeError("Invalid from location");
59316
59455
  this._onDidViewVisibilityChange.fire();
59317
- parent.setChildVisible(index2, visible2);
59456
+ parent.setChildVisible(index2, visible3);
59318
59457
  }
59319
59458
  moveView(parentLocation, from, to) {
59320
59459
  if (this.hasMaximizedView()) this.exitMaximizedView();
@@ -59560,8 +59699,8 @@ var BaseGrid = class extends Resizable {
59560
59699
  this._bufferOnDidLayoutChange.fire();
59561
59700
  }), this._onDidMaximizedChange, this._onDidViewVisibilityChangeMicroTaskQueue, this._bufferOnDidLayoutChange);
59562
59701
  }
59563
- setVisible(panel, visible2) {
59564
- this.gridview.setViewVisible(getGridLocation(panel.element), visible2);
59702
+ setVisible(panel, visible3) {
59703
+ this.gridview.setViewVisible(getGridLocation(panel.element), visible3);
59565
59704
  this._bufferOnDidLayoutChange.fire();
59566
59705
  }
59567
59706
  isVisible(panel) {
@@ -60320,8 +60459,8 @@ var DockviewApi = class {
60320
60459
  /**
60321
60460
  * Set the visibility of an edge group.
60322
60461
  */
60323
- setEdgeGroupVisible(position2, visible2) {
60324
- this.component.setEdgeGroupVisible(position2, visible2);
60462
+ setEdgeGroupVisible(position2, visible3) {
60463
+ this.component.setEdgeGroupVisible(position2, visible3);
60325
60464
  }
60326
60465
  /**
60327
60466
  * Check whether an edge group is currently visible.
@@ -70445,8 +70584,8 @@ var EdgeGroupView = class {
70445
70584
  this._isCollapsed = collapsed;
70446
70585
  this._group.element.classList.toggle("dv-edge-collapsed", collapsed);
70447
70586
  }
70448
- setVisible(visible2) {
70449
- this._isVisible = visible2;
70587
+ setVisible(visible3) {
70588
+ this._isVisible = visible3;
70450
70589
  }
70451
70590
  /**
70452
70591
  * Set the expanded size without triggering a layout: from serialized
@@ -70540,9 +70679,9 @@ var MiddleColumnView = class {
70540
70679
  }
70541
70680
  setVisible(_visible) {
70542
70681
  }
70543
- setViewVisible(position2, visible2) {
70682
+ setViewVisible(position2, visible3) {
70544
70683
  const index2 = position2 === "top" ? this._topIndex : this._bottomIndex;
70545
- if (index2 !== void 0) this._splitview.setViewVisible(index2, visible2);
70684
+ if (index2 !== void 0) this._splitview.setViewVisible(index2, visible3);
70546
70685
  }
70547
70686
  isViewVisible(position2) {
70548
70687
  const index2 = position2 === "top" ? this._topIndex : this._bottomIndex;
@@ -70789,22 +70928,22 @@ var ShellManager = class {
70789
70928
  return this._rightView !== void 0;
70790
70929
  }
70791
70930
  }
70792
- setEdgeGroupVisible(position2, visible2) {
70793
- const changes2 = this._getView(position2) !== void 0 && visible2 !== this.isEdgeGroupVisible(position2);
70931
+ setEdgeGroupVisible(position2, visible3) {
70932
+ const changes2 = this._getView(position2) !== void 0 && visible3 !== this.isEdgeGroupVisible(position2);
70794
70933
  switch (position2) {
70795
70934
  case "left":
70796
- if (this._leftIndex !== void 0) this._outerSplitview.setViewVisible(this._leftIndex, visible2);
70935
+ if (this._leftIndex !== void 0) this._outerSplitview.setViewVisible(this._leftIndex, visible3);
70797
70936
  break;
70798
70937
  case "right":
70799
- if (this._rightIndex !== void 0) this._outerSplitview.setViewVisible(this._rightIndex, visible2);
70938
+ if (this._rightIndex !== void 0) this._outerSplitview.setViewVisible(this._rightIndex, visible3);
70800
70939
  break;
70801
70940
  case "top":
70802
70941
  case "bottom":
70803
- this._middleColumn.setViewVisible(position2, visible2);
70942
+ this._middleColumn.setViewVisible(position2, visible3);
70804
70943
  break;
70805
70944
  }
70806
70945
  if (changes2 && this._gap > 0 && this._hasSiblingOn(position2)) this._relayout();
70807
- if (visible2) this._flushPendingSizes();
70946
+ if (visible3) this._flushPendingSizes();
70808
70947
  }
70809
70948
  isEdgeGroupVisible(position2) {
70810
70949
  switch (position2) {
@@ -70906,10 +71045,10 @@ var ShellManager = class {
70906
71045
  for (const position2 of EDGE_POSITIONS) {
70907
71046
  const view = this._getView(position2);
70908
71047
  if (!view) continue;
70909
- const visible2 = this.isEdgeGroupVisible(position2);
71048
+ const visible3 = this.isEdgeGroupVisible(position2);
70910
71049
  edgeGroups[position2] = {
70911
- size: this._expandedSize(view, position2, visible2),
70912
- visible: visible2,
71050
+ size: this._expandedSize(view, position2, visible3),
71051
+ visible: visible3,
70913
71052
  collapsed: view.isCollapsed || void 0,
70914
71053
  minimumSize: view.configuredMinimumSize,
70915
71054
  maximumSize: Number.isFinite(view.configuredMaximumSize) ? view.configuredMaximumSize : void 0,
@@ -70921,11 +71060,11 @@ var ShellManager = class {
70921
71060
  /** The size to restore the group to. An expanded-but-hidden group has a
70922
71061
  * slot of 0, so fall back to its cached visible size (then
70923
71062
  * lastExpandedSize); otherwise re-showing snaps to minimumSize. */
70924
- _expandedSize(view, position2, visible2) {
71063
+ _expandedSize(view, position2, visible3) {
70925
71064
  if (view.isCollapsed) return view.lastExpandedSize;
70926
71065
  const pending = this._pendingSizes.get(position2);
70927
71066
  if (pending !== void 0) return pending;
70928
- if (!visible2) {
71067
+ if (!visible3) {
70929
71068
  var _this$_cachedVisibleS;
70930
71069
  return (_this$_cachedVisibleS = this._cachedVisibleSize(position2)) !== null && _this$_cachedVisibleS !== void 0 ? _this$_cachedVisibleS : view.lastExpandedSize;
70931
71070
  }
@@ -71699,16 +71838,16 @@ var DockviewComponent = class extends BaseGrid {
71699
71838
  this._moduleRegistry.postConstruct(this);
71700
71839
  this._shellManager.layoutFromElement();
71701
71840
  }
71702
- setVisible(panel, visible2) {
71841
+ setVisible(panel, visible3) {
71703
71842
  switch (panel.api.location.type) {
71704
71843
  case "grid":
71705
- super.setVisible(panel, visible2);
71844
+ super.setVisible(panel, visible3);
71706
71845
  break;
71707
71846
  case "floating": {
71708
71847
  const item2 = this.floatingGroups.find((floatingGroup) => floatingGroup.group === panel);
71709
71848
  if (item2) {
71710
- item2.overlay.setVisible(visible2);
71711
- panel.api._onDidVisibilityChange.fire({ isVisible: visible2 });
71849
+ item2.overlay.setVisible(visible3);
71850
+ panel.api._onDidVisibilityChange.fire({ isVisible: visible3 });
71712
71851
  }
71713
71852
  break;
71714
71853
  }
@@ -72515,8 +72654,8 @@ var DockviewComponent = class extends BaseGrid {
72515
72654
  repositionPanelOverlay(panel, forceVisible, clip) {
72516
72655
  this.overlayRenderContainer.repositionPanelOverlay(panel.api.id, forceVisible, clip);
72517
72656
  }
72518
- setEdgeGroupVisible(position2, visible2) {
72519
- this._shellManager.setEdgeGroupVisible(position2, visible2);
72657
+ setEdgeGroupVisible(position2, visible3) {
72658
+ this._shellManager.setEdgeGroupVisible(position2, visible3);
72520
72659
  }
72521
72660
  isEdgeGroupVisible(position2) {
72522
72661
  return this._shellManager.isEdgeGroupVisible(position2);
@@ -75264,11 +75403,11 @@ function isDirectoryNode(node2) {
75264
75403
  function getNodeFlags(node2) {
75265
75404
  return node2.depthAndFlags & PATH_STORE_NODE_FLAGS_MASK;
75266
75405
  }
75267
- function hasNodeFlag(node2, flag) {
75268
- return (getNodeFlags(node2) & flag) !== 0;
75406
+ function hasNodeFlag(node2, flag2) {
75407
+ return (getNodeFlags(node2) & flag2) !== 0;
75269
75408
  }
75270
- function addNodeFlag(node2, flag) {
75271
- node2.depthAndFlags |= flag;
75409
+ function addNodeFlag(node2, flag2) {
75410
+ node2.depthAndFlags |= flag2;
75272
75411
  }
75273
75412
  function setNodeDepth(node2, depth) {
75274
75413
  node2.depthAndFlags = createNodeDepthAndFlags(depth, getNodeFlags(node2), getNodeKind(node2));
@@ -80733,9 +80872,9 @@ function computeFileTreeLayout(rows2, metrics) {
80733
80872
  const firstOccludedIndex = stickyHeight <= 0 || firstVisiblePhysicalIndex < 0 || firstVisiblePhysicalIndex >= totalRowCount ? -1 : firstVisiblePhysicalIndex;
80734
80873
  const lastOccludedIndex = firstOccludedIndex === -1 ? -1 : Math.min(totalRowCount - 1, firstProjectedIndex - 1);
80735
80874
  const occludedCount = firstOccludedIndex === -1 || lastOccludedIndex < firstOccludedIndex ? 0 : lastOccludedIndex - firstOccludedIndex + 1;
80736
- const visible2 = paneHeight <= 0 || firstProjectedIndex >= totalRowCount ? EMPTY_FILE_TREE_LAYOUT_RANGE : createRange(firstProjectedIndex, getLastIntersectingIndex(paneTop + paneHeight, totalRowCount, metrics.itemHeight));
80875
+ const visible3 = paneHeight <= 0 || firstProjectedIndex >= totalRowCount ? EMPTY_FILE_TREE_LAYOUT_RANGE : createRange(firstProjectedIndex, getLastIntersectingIndex(paneTop + paneHeight, totalRowCount, metrics.itemHeight));
80737
80876
  const minimumWindowStart = lastOccludedIndex + 1;
80738
- const windowRange = isEmptyRange(visible2) ? EMPTY_FILE_TREE_LAYOUT_RANGE : createRange(Math.max(minimumWindowStart, visible2.startIndex - overscan), Math.min(totalRowCount - 1, visible2.endIndex + overscan));
80877
+ const windowRange = isEmptyRange(visible3) ? EMPTY_FILE_TREE_LAYOUT_RANGE : createRange(Math.max(minimumWindowStart, visible3.startIndex - overscan), Math.min(totalRowCount - 1, visible3.endIndex + overscan));
80739
80878
  const windowHeight = getRangeHeight(windowRange, metrics.itemHeight);
80740
80879
  return {
80741
80880
  occlusion: {
@@ -80761,7 +80900,7 @@ function computeFileTreeLayout(rows2, metrics) {
80761
80900
  height: stickyHeight,
80762
80901
  rows: stickyRows
80763
80902
  },
80764
- visible: visible2,
80903
+ visible: visible3,
80765
80904
  window: {
80766
80905
  endIndex: windowRange.endIndex,
80767
80906
  height: windowHeight,