@hachej/boring-workspace 0.1.51 → 0.1.52

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.
@@ -4,9 +4,9 @@ var Z = (e, t, n) => qo(e, typeof t != "symbol" ? t + "" : t, n);
4
4
  import * as Ho from "react/jsx-runtime";
5
5
  import { jsx as u, jsxs as k, Fragment as Me } from "react/jsx-runtime";
6
6
  import * as Go from "react";
7
- import { useRef as A, useMemo as X, useContext as he, createContext as Ee, useSyncExternalStore as it, useState as B, useCallback as R, Component as Vo, useEffect as F, createElement as ye, Suspense as Ft, Fragment as Sr, lazy as Lt, useLayoutEffect as Ko } from "react";
7
+ import { useRef as A, useMemo as X, useContext as he, createContext as Ee, useSyncExternalStore as st, useState as B, useCallback as R, Component as Vo, useEffect as F, createElement as ye, Suspense as Ft, Fragment as Sr, lazy as Lt, useLayoutEffect as Ko } from "react";
8
8
  import { AlertTriangleIcon as Jo, ImageIcon as Ke, FileTextIcon as Ae, FileJsonIcon as Rn, FileCodeIcon as pe, FileIcon as $t, X as pn, RefreshCw as Yo, Download as Xo, RefreshCcw as Qo, ExternalLink as Cr, FolderTree as Zo, TerminalIcon as hn, ClockIcon as ei, ArrowUp as ti, ArrowDown as ni, CornerDownLeft as ri, GripVertical as oi, Plus as ii, ChevronLeft as si, ChevronRight as Pr, Pin as ai, Menu as At, Search as Nn } from "lucide-react";
9
- import { Notice as Er, IconButton as Ce, LoadingState as ci, Input as Ir, toast as _e, ErrorState as ot, Skeleton as li, Spinner as Ot, Button as Fe, AlertDialog as ui, AlertDialogContent as di, AlertDialogHeader as fi, AlertDialogTitle as pi, AlertDialogDescription as hi, AlertDialogFooter as mi, AlertDialogCancel as gi, AlertDialogAction as vi, EmptyState as Tr, Kbd as rt, TooltipProvider as yi, Tooltip as bi, TooltipTrigger as wi, TooltipContent as ki, Dialog as xi, DialogContent as Si, DialogHeader as Ci, DialogTitle as Pi, DialogDescription as Ei, Command as Ii, CommandList as Ti, CommandEmpty as Ri, CommandInput as Ni, CommandGroup as mn, CommandItem as Mt, CommandShortcut as Ai, Toaster as Di } from "@hachej/boring-ui-kit";
9
+ import { Notice as Er, IconButton as Ce, LoadingState as ci, Input as Ir, toast as _e, ErrorState as it, Skeleton as li, Spinner as Ot, Button as Fe, AlertDialog as ui, AlertDialogContent as di, AlertDialogHeader as fi, AlertDialogTitle as pi, AlertDialogDescription as hi, AlertDialogFooter as mi, AlertDialogCancel as gi, AlertDialogAction as vi, EmptyState as Tr, Kbd as rt, TooltipProvider as yi, Tooltip as bi, TooltipTrigger as wi, TooltipContent as ki, Dialog as xi, DialogContent as Si, DialogHeader as Ci, DialogTitle as Pi, DialogDescription as Ei, Command as Ii, CommandList as Ti, CommandEmpty as Ri, CommandInput as Ni, CommandGroup as mn, CommandItem as Mt, CommandShortcut as Ai, Toaster as Di } from "@hachej/boring-ui-kit";
10
10
  import { useStore as He, create as _i } from "zustand";
11
11
  import { persist as Fi } from "zustand/middleware";
12
12
  import { z as ee } from "zod";
@@ -14,8 +14,8 @@ import { useQueryClient as Rr, QueryClient as Li, QueryClientProvider as $i, use
14
14
  import * as Oi from "react-dom";
15
15
  import { createPortal as Nr } from "react-dom";
16
16
  import { c as oe } from "./utils-B6yFEsav.js";
17
- import { Compartment as ct, EditorState as Vt } from "@codemirror/state";
18
- import { EditorView as dt, lineNumbers as An, drawSelection as Mi, highlightActiveLine as Wi, keymap as ji } from "@codemirror/view";
17
+ import { Compartment as lt, EditorState as Vt } from "@codemirror/state";
18
+ import { EditorView as ot, lineNumbers as An, drawSelection as Mi, highlightActiveLine as Wi, keymap as ji } from "@codemirror/view";
19
19
  import { history as zi, defaultKeymap as Bi, historyKeymap as Ui } from "@codemirror/commands";
20
20
  import { javascript as Dn } from "@codemirror/lang-javascript";
21
21
  import { python as qi } from "@codemirror/lang-python";
@@ -416,11 +416,11 @@ function $r() {
416
416
  }
417
417
  function gs() {
418
418
  const e = gn();
419
- return it(e.subscribe, e.getSnapshot);
419
+ return st(e.subscribe, e.getSnapshot);
420
420
  }
421
421
  function vs() {
422
422
  const e = Bt();
423
- return it(e.subscribe, e.getSnapshot);
423
+ return st(e.subscribe, e.getSnapshot);
424
424
  }
425
425
  function ys({ pluginId: e, message: t, kind: n }) {
426
426
  return /* @__PURE__ */ u(
@@ -453,7 +453,7 @@ function bs({ children: e }) {
453
453
  );
454
454
  return /* @__PURE__ */ u(vn.Provider, { value: o, children: e });
455
455
  }
456
- function Od() {
456
+ function Wd() {
457
457
  const e = he(vn);
458
458
  if (!e) throw new Error("usePluginErrors must be used within a PluginErrorProvider");
459
459
  return e;
@@ -723,13 +723,13 @@ function Ls(e) {
723
723
  if (v) return;
724
724
  const O = Fs(r, z);
725
725
  try {
726
- const C = await fetch(`${t}/api/v1/ui/state`, {
726
+ const P = await fetch(`${t}/api/v1/ui/state`, {
727
727
  method: "PUT",
728
728
  headers: Fn(o),
729
729
  body: JSON.stringify(O)
730
730
  });
731
731
  if (v) return;
732
- (C.status === 401 || C.status === 403) && (l == null || l(C.status));
732
+ (P.status === 401 || P.status === 403) && (l == null || l(P.status));
733
733
  } catch {
734
734
  }
735
735
  }
@@ -746,47 +746,47 @@ function Ls(e) {
746
746
  break;
747
747
  }
748
748
  case "command": {
749
- let C;
749
+ let P;
750
750
  try {
751
- C = JSON.parse(O);
751
+ P = JSON.parse(O);
752
752
  } catch {
753
753
  return;
754
754
  }
755
- if (C.v !== 1) {
756
- s == null || s(C.v);
755
+ if (P.v !== 1) {
756
+ s == null || s(P.v);
757
757
  return;
758
758
  }
759
- x++, Ln(n, C.kind, C.params).finally(() => {
759
+ x++, Ln(n, P.kind, P.params).finally(() => {
760
760
  x--;
761
761
  });
762
762
  break;
763
763
  }
764
764
  case "error": {
765
- let C;
765
+ let P;
766
766
  try {
767
- C = JSON.parse(O);
767
+ P = JSON.parse(O);
768
768
  } catch {
769
769
  return;
770
770
  }
771
- if (C.v !== 1) {
772
- s == null || s(C.v);
771
+ if (P.v !== 1) {
772
+ s == null || s(P.v);
773
773
  return;
774
774
  }
775
- n.showNotification(C.message, "error");
775
+ n.showNotification(P.message, "error");
776
776
  break;
777
777
  }
778
778
  }
779
779
  }
780
780
  function N() {
781
781
  const z = `${t}/api/v1/ui/commands/next`, O = new EventSource(z, { withCredentials: !0 });
782
- O.addEventListener("init", (C) => {
783
- S("init", C.data);
784
- }), O.addEventListener("command", (C) => {
785
- S("command", C.data);
786
- }), O.addEventListener("error", (C) => {
787
- C.data ? S("error", C.data) : b(!1);
788
- }), O.addEventListener("heartbeat", (C) => {
789
- S("heartbeat", C.data);
782
+ O.addEventListener("init", (P) => {
783
+ S("init", P.data);
784
+ }), O.addEventListener("command", (P) => {
785
+ S("command", P.data);
786
+ }), O.addEventListener("error", (P) => {
787
+ P.data ? S("error", P.data) : b(!1);
788
+ }), O.addEventListener("heartbeat", (P) => {
789
+ S("heartbeat", P.data);
790
790
  }), c = O;
791
791
  }
792
792
  async function h() {
@@ -799,9 +799,9 @@ function Ls(e) {
799
799
  return;
800
800
  }
801
801
  if (!O.ok) return;
802
- const C = await O.json();
803
- if (!Array.isArray(C)) return;
804
- for (const j of C) {
802
+ const P = await O.json();
803
+ if (!Array.isArray(P)) return;
804
+ for (const j of P) {
805
805
  if (v) return;
806
806
  if (j.v !== 1) {
807
807
  s == null || s(j.v);
@@ -819,7 +819,7 @@ function Ls(e) {
819
819
  b(!1);
820
820
  }
821
821
  }
822
- function I() {
822
+ function C() {
823
823
  m = r.subscribe(() => {
824
824
  if (v) return;
825
825
  const z = x > 0 ? "agent" : "user";
@@ -828,7 +828,7 @@ function Ls(e) {
828
828
  }
829
829
  return {
830
830
  connect() {
831
- v = !1, !i && typeof EventSource < "u" ? N() : (h(), d = setInterval(h, a)), I();
831
+ v = !1, !i && typeof EventSource < "u" ? N() : (h(), d = setInterval(h, a)), C();
832
832
  },
833
833
  disconnect() {
834
834
  c && (c.close(), c = null), d !== null && (clearInterval(d), d = null), p !== null && (clearTimeout(p), p = null), m && (m(), m = null), b(!1), v = !0;
@@ -1008,7 +1008,7 @@ const zs = "workspace:ui.command", Bs = "workspace:editor.save.start", Us = "wor
1008
1008
  panelClose: Hs,
1009
1009
  agentData: Gs
1010
1010
  };
1011
- function st() {
1011
+ function at() {
1012
1012
  return { cause: "user", ts: Date.now() };
1013
1013
  }
1014
1014
  function Vs(e) {
@@ -1026,7 +1026,7 @@ function Ks(e) {
1026
1026
  }
1027
1027
  const J = js(), Js = "boring-workspace:ui-command";
1028
1028
  function Mr(e) {
1029
- J.emit(Ie.uiCommand, { ...st(), command: e }), typeof globalThis.dispatchEvent == "function" && typeof CustomEvent < "u" && globalThis.dispatchEvent(new CustomEvent(Js, { detail: e }));
1029
+ J.emit(Ie.uiCommand, { ...at(), command: e }), typeof globalThis.dispatchEvent == "function" && typeof CustomEvent < "u" && globalThis.dispatchEvent(new CustomEvent(Js, { detail: e }));
1030
1030
  }
1031
1031
  const Ys = 1500, Xs = 1e3, Qs = 5;
1032
1032
  function $n(e, t) {
@@ -1336,7 +1336,7 @@ function fa() {
1336
1336
  }, ha);
1337
1337
  o.add(d);
1338
1338
  }, a = J.on(te.changed, (c) => {
1339
- lt(r, t, n, c.path);
1339
+ ut(r, t, n, c.path);
1340
1340
  }), l = J.on(te.created, (c) => {
1341
1341
  Wn(e, t, n, {
1342
1342
  name: Mn(c.path),
@@ -1344,7 +1344,7 @@ function fa() {
1344
1344
  path: c.path
1345
1345
  });
1346
1346
  const d = () => {
1347
- kt(r, t, n, c.path), c.kind === "file" && lt(r, t, n, c.path);
1347
+ kt(r, t, n, c.path), c.kind === "file" && ut(r, t, n, c.path);
1348
1348
  };
1349
1349
  d(), c.cause === "remote" && i(d);
1350
1350
  }), s = J.on(te.moved, (c) => {
@@ -1355,13 +1355,13 @@ function fa() {
1355
1355
  path: c.to
1356
1356
  });
1357
1357
  const p = () => {
1358
- kt(r, t, n, c.from), kt(r, t, n, c.to), lt(r, t, n, c.from), lt(r, t, n, c.to), va(r, t, n, c.from), zn(r, t, n);
1358
+ kt(r, t, n, c.from), kt(r, t, n, c.to), ut(r, t, n, c.from), ut(r, t, n, c.to), va(r, t, n, c.from), zn(r, t, n);
1359
1359
  };
1360
1360
  p(), c.cause === "remote" && i(p);
1361
1361
  }), f = J.on(te.deleted, (c) => {
1362
1362
  jn(e, t, n, c.path);
1363
1363
  const d = () => {
1364
- kt(r, t, n, c.path), lt(r, t, n, c.path), zn(r, t, n);
1364
+ kt(r, t, n, c.path), ut(r, t, n, c.path), zn(r, t, n);
1365
1365
  };
1366
1366
  d(), c.cause === "remote" && i(d);
1367
1367
  });
@@ -1412,7 +1412,7 @@ function Wn(e, t, n, r) {
1412
1412
  function jn(e, t, n, r) {
1413
1413
  e.setQueryData(bn(t, n, Se(r)), (o) => o && o.filter((i) => i.path !== r));
1414
1414
  }
1415
- function lt(e, t, n, r) {
1415
+ function ut(e, t, n, r) {
1416
1416
  e.enqueue([t, n, qt, r]), e.enqueue([t, n, "stat", r]);
1417
1417
  }
1418
1418
  function kt(e, t, n, r) {
@@ -1512,7 +1512,7 @@ function We() {
1512
1512
  if (!e) throw new Error("useDataClient must be used within a DataProvider");
1513
1513
  return e;
1514
1514
  }
1515
- function Md() {
1515
+ function jd() {
1516
1516
  return he(wn) != null;
1517
1517
  }
1518
1518
  function Qe() {
@@ -1623,7 +1623,7 @@ function Xr() {
1623
1623
  return e.writeFile(t, n, Object.keys(i).length > 0 ? i : void 0);
1624
1624
  },
1625
1625
  onSuccess: (t, { path: n }) => {
1626
- J.emit(te.changed, { ...st(), path: n });
1626
+ J.emit(te.changed, { ...at(), path: n });
1627
1627
  }
1628
1628
  });
1629
1629
  }
@@ -1632,7 +1632,7 @@ function Da() {
1632
1632
  return jt({
1633
1633
  mutationFn: ({ path: t }) => e.createDir(t),
1634
1634
  onSuccess: (t, { path: n }) => {
1635
- J.emit(te.created, { ...st(), path: n, kind: "dir" });
1635
+ J.emit(te.created, { ...at(), path: n, kind: "dir" });
1636
1636
  }
1637
1637
  });
1638
1638
  }
@@ -1641,7 +1641,7 @@ function _a() {
1641
1641
  return jt({
1642
1642
  mutationFn: ({ from: t, to: n }) => e.moveFile(t, n),
1643
1643
  onSuccess: (t, { from: n, to: r }) => {
1644
- J.emit(te.moved, { ...st(), from: n, to: r });
1644
+ J.emit(te.moved, { ...at(), from: n, to: r });
1645
1645
  }
1646
1646
  });
1647
1647
  }
@@ -1650,7 +1650,7 @@ function Fa() {
1650
1650
  return jt({
1651
1651
  mutationFn: ({ path: t }) => e.deleteFile(t),
1652
1652
  onSuccess: (t, { path: n }) => {
1653
- J.emit(te.deleted, { ...st(), path: n });
1653
+ J.emit(te.deleted, { ...at(), path: n });
1654
1654
  }
1655
1655
  });
1656
1656
  }
@@ -1831,7 +1831,7 @@ class Ba {
1831
1831
  if (n) return n;
1832
1832
  const r = this, o = function(a) {
1833
1833
  var m;
1834
- it(r.subscribe, r.getSnapshot, r.getSnapshot);
1834
+ st(r.subscribe, r.getSnapshot, r.getSnapshot);
1835
1835
  const l = r.get(t), s = r.generation, f = !!(l && r.satisfiesCapabilities(l)), c = X(() => !l || !r.satisfiesCapabilities(l) ? () => null : l.lazy ? r.getLazyComponent(t, l.component) : l.component, [l == null ? void 0 : l.component, l == null ? void 0 : l.lazy, l == null ? void 0 : l.requiresCapabilities, s]);
1836
1836
  if (!f) return null;
1837
1837
  const d = (l == null ? void 0 : l.pluginId) ?? (l == null ? void 0 : l.id) ?? t, p = typeof ((m = a == null ? void 0 : a.api) == null ? void 0 : m.id) == "string" ? a.api.id : void 0;
@@ -1929,22 +1929,22 @@ function Ge() {
1929
1929
  );
1930
1930
  return un;
1931
1931
  }
1932
- function Wd() {
1932
+ function zd() {
1933
1933
  return He(Ge(), (e) => e.activeFile);
1934
1934
  }
1935
- function jd() {
1935
+ function Bd() {
1936
1936
  return He(Ge(), (e) => e.activePanel);
1937
1937
  }
1938
- function zd() {
1938
+ function Ud() {
1939
1939
  return He(Ge(), (e) => e.sidebar);
1940
1940
  }
1941
- function Bd() {
1941
+ function qd() {
1942
1942
  return He(Ge(), (e) => e.setSidebar);
1943
1943
  }
1944
- function Ud() {
1944
+ function Hd() {
1945
1945
  return He(Ge(), (e) => e.panels);
1946
1946
  }
1947
- function qd() {
1947
+ function Gd() {
1948
1948
  return He(Ge(), (e) => e.dirtyFiles);
1949
1949
  }
1950
1950
  function kn() {
@@ -1953,7 +1953,7 @@ function kn() {
1953
1953
  function qa() {
1954
1954
  return He(Ge(), (e) => e.hydrationComplete);
1955
1955
  }
1956
- function Hd() {
1956
+ function Vd() {
1957
1957
  return He(Ge(), (e) => e.resetLayout);
1958
1958
  }
1959
1959
  function Ha(e) {
@@ -2024,15 +2024,15 @@ function Qa(e) {
2024
2024
  var M;
2025
2025
  const h = () => o(t.title ?? t.id);
2026
2026
  h();
2027
- const I = (M = t.onDidTitleChange) == null ? void 0 : M.call(t, h);
2027
+ const C = (M = t.onDidTitleChange) == null ? void 0 : M.call(t, h);
2028
2028
  return () => {
2029
2029
  var z;
2030
- return (z = I == null ? void 0 : I.dispose) == null ? void 0 : z.call(I);
2030
+ return (z = C == null ? void 0 : C.dispose) == null ? void 0 : z.call(C);
2031
2031
  };
2032
2032
  }, [t]), F(() => {
2033
2033
  if (!i) return;
2034
- function h(I) {
2035
- l.current && !l.current.contains(I.target) && a(null);
2034
+ function h(C) {
2035
+ l.current && !l.current.contains(C.target) && a(null);
2036
2036
  }
2037
2037
  return document.addEventListener("pointerdown", h), () => document.removeEventListener("pointerdown", h);
2038
2038
  }, [i]);
@@ -2049,13 +2049,13 @@ function Qa(e) {
2049
2049
  }, L = (h) => {
2050
2050
  a(null), Ya(h);
2051
2051
  }, W = () => {
2052
- var h, I;
2052
+ var h, C;
2053
2053
  a(null), (h = t.setActive) == null || h.call(t);
2054
- for (const M of m) (I = M.close) == null || I.call(M);
2054
+ for (const M of m) (C = M.close) == null || C.call(M);
2055
2055
  }, S = () => {
2056
- var h, I;
2056
+ var h, C;
2057
2057
  a(null), (h = t.setActive) == null || h.call(t);
2058
- for (const M of p) (I = M.close) == null || I.call(M);
2058
+ for (const M of p) (C = M.close) == null || C.call(M);
2059
2059
  }, N = i && typeof document < "u" ? Nr(
2060
2060
  /* @__PURE__ */ k(
2061
2061
  "div",
@@ -2186,7 +2186,7 @@ function Un(e, t) {
2186
2186
  n.some((a) => ec(i, a)) && (r.has(i.id) || (r.add(i.id), o.push(i)));
2187
2187
  return o;
2188
2188
  }
2189
- function Gd() {
2189
+ function Kd() {
2190
2190
  const e = he(eo);
2191
2191
  if (!e)
2192
2192
  throw new Error(
@@ -2369,11 +2369,11 @@ function ic({
2369
2369
  rightHeaderActions: l,
2370
2370
  watermarkComponent: s
2371
2371
  }) {
2372
- const f = zt(), c = it(f.subscribe, f.getSnapshot, f.getSnapshot), d = qa(), p = A(null), m = A(null), g = A(void 0), v = A(null), x = X(() => {
2373
- const S = f.getComponents(), N = o ? Object.fromEntries(Object.entries(S).filter(([I]) => o.includes(I))) : S, h = v.current;
2372
+ const f = zt(), c = st(f.subscribe, f.getSnapshot, f.getSnapshot), d = qa(), p = A(null), m = A(null), g = A(void 0), v = A(null), x = X(() => {
2373
+ const S = f.getComponents(), N = o ? Object.fromEntries(Object.entries(S).filter(([C]) => o.includes(C))) : S, h = v.current;
2374
2374
  if (h) {
2375
- const I = Object.keys(h), M = Object.keys(N);
2376
- if (I.length === M.length && M.every((z) => h[z] === N[z]))
2375
+ const C = Object.keys(h), M = Object.keys(N);
2376
+ if (C.length === M.length && M.every((z) => h[z] === N[z]))
2377
2377
  return h;
2378
2378
  }
2379
2379
  return v.current = N, N;
@@ -2395,19 +2395,19 @@ function ic({
2395
2395
  var S;
2396
2396
  return (S = g.current) == null ? void 0 : S.call(g);
2397
2397
  }, []), F(() => {
2398
- const S = J.on(Ie.panelUpdate, ({ match: h, params: I, title: M }) => {
2398
+ const S = J.on(Ie.panelUpdate, ({ match: h, params: C, title: M }) => {
2399
2399
  const z = p.current;
2400
2400
  if (z)
2401
2401
  for (const O of Un(z, h))
2402
- I && O.api.updateParameters({
2402
+ C && O.api.updateParameters({
2403
2403
  ...O.params ?? {},
2404
- ...I
2404
+ ...C
2405
2405
  }), M && O.api.setTitle(M);
2406
2406
  }), N = J.on(Ie.panelClose, ({ match: h }) => {
2407
- const I = p.current;
2408
- if (I)
2409
- for (const M of Un(I, h))
2410
- I.removePanel(M);
2407
+ const C = p.current;
2408
+ if (C)
2409
+ for (const M of Un(C, h))
2410
+ C.removePanel(M);
2411
2411
  });
2412
2412
  return () => {
2413
2413
  S(), N();
@@ -2580,7 +2580,7 @@ async function Hn(e) {
2580
2580
  }
2581
2581
  if (!n) throw new Error("Clipboard not available");
2582
2582
  }
2583
- const no = () => import("./FileTree-BeCvmmxS.js").then((e) => ({ default: e.FileTree }));
2583
+ const no = () => import("./FileTree-DF3Lfn2j.js").then((e) => ({ default: e.FileTree }));
2584
2584
  function fc() {
2585
2585
  no();
2586
2586
  }
@@ -2628,44 +2628,44 @@ function Vn({
2628
2628
  ), x = X(
2629
2629
  () => uc(v, o),
2630
2630
  [v, o]
2631
- ), { mutateAsync: b } = Xr(), { mutateAsync: L } = Da(), { mutateAsync: W } = _a(), { mutateAsync: S } = Fa(), [N, h] = B(/* @__PURE__ */ new Map()), I = X(() => {
2631
+ ), { mutateAsync: b } = Xr(), { mutateAsync: L } = Da(), { mutateAsync: W } = _a(), { mutateAsync: S } = Fa(), [N, h] = B(/* @__PURE__ */ new Map()), C = X(() => {
2632
2632
  if (c.size === 0 && p.size === 0) return N;
2633
2633
  const y = /* @__PURE__ */ new Map();
2634
- for (const [w, E] of N)
2635
- y.set(w, Yt(E, p) ?? E);
2636
- for (const [w, E] of c) {
2634
+ for (const [w, I] of N)
2635
+ y.set(w, Yt(I, p) ?? I);
2636
+ for (const [w, I] of c) {
2637
2637
  if (w === g) continue;
2638
- const K = Yt(Jt(y.get(w), E), p);
2638
+ const K = Yt(Jt(y.get(w), I), p);
2639
2639
  K && y.set(w, K);
2640
2640
  }
2641
2641
  return y;
2642
- }, [N, c, g, p]), M = A(null), [z, O] = B(400), [C, j] = B(null), T = C && !C.isBackground && C.node.kind === "file" ? C.node.path : null, { data: $ } = Na(T), [Y, G] = B(null), ne = A(null), [Q, ue] = B(
2642
+ }, [N, c, g, p]), M = A(null), [z, O] = B(400), [P, j] = B(null), T = P && !P.isBackground && P.node.kind === "file" ? P.node.path : null, { data: $ } = Na(T), [Y, G] = B(null), ne = A(null), [Q, ue] = B(
2643
2643
  ((Tn = n == null ? void 0 : n.getActiveFile) == null ? void 0 : Tn.call(n)) ?? null
2644
2644
  ), [de, q] = B(null), [le, fe] = B(null), Te = A(0), be = A(0), je = A(0), Ve = ((t == null ? void 0 : t.trim().length) ?? 0) > 0, { data: Re } = Aa(
2645
2645
  Ve ? to(t ?? "") : "",
2646
2646
  50
2647
2647
  );
2648
2648
  F(() => {
2649
- if (!C) return;
2649
+ if (!P) return;
2650
2650
  function y(w) {
2651
2651
  ne.current && !ne.current.contains(w.target) && j(null);
2652
2652
  }
2653
2653
  return document.addEventListener("pointerdown", y), () => document.removeEventListener("pointerdown", y);
2654
- }, [C]), Ko(() => {
2655
- if (!C || !ne.current) return;
2654
+ }, [P]), Ko(() => {
2655
+ if (!P || !ne.current) return;
2656
2656
  const { x: y, y: w } = mc(
2657
- C.x,
2658
- C.y,
2657
+ P.x,
2658
+ P.y,
2659
2659
  ne.current.getBoundingClientRect(),
2660
2660
  window.innerWidth,
2661
2661
  window.innerHeight
2662
2662
  );
2663
- y === C.x && w === C.y || j((E) => !E || E.x === y && E.y === w ? E : { ...E, x: y, y: w });
2664
- }, [C]), F(() => {
2663
+ y === P.x && w === P.y || j((I) => !I || I.x === y && I.y === w ? I : { ...I, x: y, y: w });
2664
+ }, [P]), F(() => {
2665
2665
  const y = M.current;
2666
2666
  if (!y) return;
2667
- const w = new ResizeObserver(([E]) => {
2668
- E && O(Math.floor(E.contentRect.height));
2667
+ const w = new ResizeObserver(([I]) => {
2668
+ I && O(Math.floor(I.contentRect.height));
2669
2669
  });
2670
2670
  return w.observe(y), () => w.disconnect();
2671
2671
  }, []);
@@ -2673,7 +2673,7 @@ function Vn({
2673
2673
  name: y.split("/").pop() ?? y,
2674
2674
  kind: "file",
2675
2675
  path: y
2676
- })) : void 0) ?? qr(x ?? [], I), ve = Hr(ce, de, e), Pe = R(
2676
+ })) : void 0) ?? qr(x ?? [], C), ve = Hr(ce, de, e), Pe = R(
2677
2677
  (y) => {
2678
2678
  ue(y), n == null || n.openFile(y, { mode: "edit" });
2679
2679
  },
@@ -2681,20 +2681,20 @@ function Vn({
2681
2681
  ), ze = R(
2682
2682
  async (y) => {
2683
2683
  try {
2684
- const w = await a.getTree(y), E = o.length === 0 ? w : w.filter((K) => !dn(K.name, o));
2685
- h((K) => new Map(K).set(y, E));
2684
+ const w = await a.getTree(y), I = o.length === 0 ? w : w.filter((K) => !dn(K.name, o));
2685
+ h((K) => new Map(K).set(y, I));
2686
2686
  } catch {
2687
2687
  }
2688
2688
  },
2689
2689
  [a, o]
2690
2690
  ), me = R(
2691
2691
  async (y, w) => {
2692
- const E = Array.from(new Set(y)).filter(
2692
+ const I = Array.from(new Set(y)).filter(
2693
2693
  (U) => U && U !== e && U !== "."
2694
2694
  );
2695
- if (E.length === 0) return;
2695
+ if (I.length === 0) return;
2696
2696
  const K = await Promise.all(
2697
- E.map(async (U) => {
2697
+ I.map(async (U) => {
2698
2698
  try {
2699
2699
  const re = await a.getTree(U), ie = o.length === 0 ? re : re.filter((xe) => !dn(xe.name, o));
2700
2700
  return [U, ie];
@@ -2718,7 +2718,7 @@ function Vn({
2718
2718
  F(() => {
2719
2719
  Be.current = new Set(N.keys());
2720
2720
  }, [N]), F(() => {
2721
- const y = /* @__PURE__ */ new Set(), w = (ie) => Array.from(new Set(ie.map(Se))).filter((xe) => Be.current.has(xe)), E = (ie) => {
2721
+ const y = /* @__PURE__ */ new Set(), w = (ie) => Array.from(new Set(ie.map(Se))).filter((xe) => Be.current.has(xe)), I = (ie) => {
2722
2722
  if (!ie.length) return;
2723
2723
  me(ie);
2724
2724
  const xe = setTimeout(() => {
@@ -2726,11 +2726,11 @@ function Vn({
2726
2726
  }, hc);
2727
2727
  y.add(xe);
2728
2728
  }, K = J.on(te.created, (ie) => {
2729
- ie.cause !== "user" && E(w([ie.path]));
2729
+ ie.cause !== "user" && I(w([ie.path]));
2730
2730
  }), U = J.on(te.deleted, (ie) => {
2731
- ie.cause !== "user" && E(w([ie.path]));
2731
+ ie.cause !== "user" && I(w([ie.path]));
2732
2732
  }), re = J.on(te.moved, (ie) => {
2733
- ie.cause !== "user" && E(w([ie.from, ie.to]));
2733
+ ie.cause !== "user" && I(w([ie.from, ie.to]));
2734
2734
  });
2735
2735
  return () => {
2736
2736
  K(), U(), re();
@@ -2741,15 +2741,15 @@ function Vn({
2741
2741
  const Ne = R(
2742
2742
  async (y, w) => {
2743
2743
  if (!y) return;
2744
- const E = ro(y), K = ++Te.current;
2745
- ue(E);
2746
- const U = w != null && w.refreshTargetDir ? [...Gn(E), E] : Gn(E);
2747
- await me([...new Set(U)], { force: !0 }), Te.current === K && fe(E);
2744
+ const I = ro(y), K = ++Te.current;
2745
+ ue(I);
2746
+ const U = w != null && w.refreshTargetDir ? [...Gn(I), I] : Gn(I);
2747
+ await me([...new Set(U)], { force: !0 }), Te.current === K && fe(I);
2748
2748
  },
2749
2749
  [me]
2750
2750
  ), et = R((y) => {
2751
2751
  fe((w) => w === y ? null : w);
2752
- }, []), P = R(
2752
+ }, []), E = R(
2753
2753
  async (y) => {
2754
2754
  const w = ++be.current;
2755
2755
  try {
@@ -2761,10 +2761,10 @@ function Vn({
2761
2761
  [Ne]
2762
2762
  );
2763
2763
  F(() => {
2764
- r && P(r.path);
2765
- }, [r, P]), F(() => {
2766
- var E;
2767
- const y = ((E = n == null ? void 0 : n.getActiveFile) == null ? void 0 : E.call(n)) ?? null;
2764
+ r && E(r.path);
2765
+ }, [r, E]), F(() => {
2766
+ var I;
2767
+ const y = ((I = n == null ? void 0 : n.getActiveFile) == null ? void 0 : I.call(n)) ?? null;
2768
2768
  y && be.current === 0 && Ne(y);
2769
2769
  const w = [];
2770
2770
  return n != null && n.select && w.push(
@@ -2773,35 +2773,35 @@ function Vn({
2773
2773
  })
2774
2774
  ), n != null && n.subscribe && w.push(
2775
2775
  n.subscribe("tree:expand", ({ path: K }) => {
2776
- P(K);
2776
+ E(K);
2777
2777
  })
2778
2778
  ), () => {
2779
2779
  for (const K of w) K();
2780
2780
  };
2781
- }, [n, P, Ne]);
2781
+ }, [n, E, Ne]);
2782
2782
  const _ = R((y, w) => {
2783
- d((E) => {
2784
- const K = Kt(y), U = new Map(E), re = Jt(U.get(K), [w]) ?? [w];
2783
+ d((I) => {
2784
+ const K = Kt(y), U = new Map(I), re = Jt(U.get(K), [w]) ?? [w];
2785
2785
  return U.set(K, re), U;
2786
2786
  });
2787
2787
  }, []), D = R((y, w) => {
2788
- d((E) => {
2789
- const K = Kt(y), U = E.get(K);
2790
- if (!(U != null && U.length)) return E;
2791
- const re = U.filter((xe) => xe.path !== w), ie = new Map(E);
2788
+ d((I) => {
2789
+ const K = Kt(y), U = I.get(K);
2790
+ if (!(U != null && U.length)) return I;
2791
+ const re = U.filter((xe) => xe.path !== w), ie = new Map(I);
2792
2792
  return re.length > 0 ? ie.set(K, re) : ie.delete(K), ie;
2793
2793
  });
2794
2794
  }, []), H = R((y) => {
2795
2795
  m((w) => {
2796
2796
  if (w.has(y)) return w;
2797
- const E = new Set(w);
2798
- return E.add(y), E;
2797
+ const I = new Set(w);
2798
+ return I.add(y), I;
2799
2799
  });
2800
2800
  }, []), se = R((y) => {
2801
2801
  m((w) => {
2802
2802
  if (!w.has(y)) return w;
2803
- const E = new Set(w);
2804
- return E.delete(y), E;
2803
+ const I = new Set(w);
2804
+ return I.delete(y), I;
2805
2805
  });
2806
2806
  }, []);
2807
2807
  F(() => {
@@ -2809,25 +2809,25 @@ function Vn({
2809
2809
  if (se(U.path), U.cause === "user") return;
2810
2810
  const re = Se(U.path);
2811
2811
  y(re) && _(re, { name: gc(U.path), kind: U.kind, path: U.path });
2812
- }), E = J.on(te.deleted, (U) => {
2812
+ }), I = J.on(te.deleted, (U) => {
2813
2813
  U.cause !== "user" && (H(U.path), D(Se(U.path), U.path));
2814
2814
  }), K = J.on(te.moved, (U) => {
2815
2815
  U.cause !== "user" && (H(U.from), se(U.to), D(Se(U.from), U.from));
2816
2816
  });
2817
2817
  return () => {
2818
- w(), E(), K();
2818
+ w(), I(), K();
2819
2819
  };
2820
2820
  }, [_, H, D, g, se]);
2821
2821
  const [we, ke] = B(/* @__PURE__ */ new Set()), ae = R((y) => {
2822
2822
  ke((w) => {
2823
- const E = new Set(w);
2824
- return E.add(y), E;
2823
+ const I = new Set(w);
2824
+ return I.add(y), I;
2825
2825
  });
2826
2826
  }, []), ge = R((y) => {
2827
2827
  ke((w) => {
2828
2828
  if (!w.has(y)) return w;
2829
- const E = new Set(w);
2830
- return E.delete(y), E;
2829
+ const I = new Set(w);
2830
+ return I.delete(y), I;
2831
2831
  });
2832
2832
  }, []), gt = R(
2833
2833
  (y, w) => {
@@ -2847,7 +2847,7 @@ function Vn({
2847
2847
  [e]
2848
2848
  ), Gt = R(
2849
2849
  async (y, w) => {
2850
- const E = y.split("/").pop() ?? y, K = w === "." ? e : w, U = K === "." ? E : `${K}/${E}`;
2850
+ const I = y.split("/").pop() ?? y, K = w === "." ? e : w, U = K === "." ? I : `${K}/${I}`;
2851
2851
  if (U !== y) {
2852
2852
  ae(y);
2853
2853
  try {
@@ -2879,37 +2879,37 @@ function Vn({
2879
2879
  };
2880
2880
  }
2881
2881
  const In = (y) => {
2882
- const w = C == null ? void 0 : C.node;
2882
+ const w = P == null ? void 0 : P.node;
2883
2883
  j(null);
2884
- const E = (w == null ? void 0 : w.kind) === "dir" ? w.path : w ? Se(w.path) : e, K = `__draft__:${++je.current}`;
2885
- q({ kind: y, parentDir: E, path: K });
2884
+ const I = (w == null ? void 0 : w.kind) === "dir" ? w.path : w ? Se(w.path) : e, K = `__draft__:${++je.current}`;
2885
+ q({ kind: y, parentDir: I, path: K });
2886
2886
  }, Fo = () => In("create-file"), Lo = () => In("create-folder"), $o = () => {
2887
- const y = C == null ? void 0 : C.node;
2887
+ const y = P == null ? void 0 : P.node;
2888
2888
  j(null), y && q({ kind: "rename", path: y.path, initialValue: y.name });
2889
2889
  }, Oo = R(
2890
2890
  async (y, w) => {
2891
- const E = de;
2892
- if (q(null), !E) return;
2891
+ const I = de;
2892
+ if (q(null), !I) return;
2893
2893
  const K = w.trim();
2894
2894
  if (!K) return;
2895
- const U = E.kind === "rename" ? Se(E.path) : E.parentDir, re = E.kind === "rename" ? E.path : U === "." || U === "" ? K : `${U}/${K}`, ie = E.kind === "rename" ? E.path : re;
2895
+ const U = I.kind === "rename" ? Se(I.path) : I.parentDir, re = I.kind === "rename" ? I.path : U === "." || U === "" ? K : `${U}/${K}`, ie = I.kind === "rename" ? I.path : re;
2896
2896
  ae(ie);
2897
2897
  let xe = null;
2898
2898
  try {
2899
- if (E.kind === "rename") {
2900
- if (K === E.initialValue) return;
2901
- const De = E.path.split("/");
2899
+ if (I.kind === "rename") {
2900
+ if (K === I.initialValue) return;
2901
+ const De = I.path.split("/");
2902
2902
  De[De.length - 1] = K;
2903
2903
  const bt = De.join("/");
2904
- await W({ from: E.path, to: bt }), await me([Se(E.path)]), _e.success({ title: "Renamed", description: `${E.path} → ${bt}` });
2904
+ await W({ from: I.path, to: bt }), await me([Se(I.path)]), _e.success({ title: "Renamed", description: `${I.path} → ${bt}` });
2905
2905
  } else {
2906
2906
  const De = {
2907
2907
  name: K,
2908
- kind: E.kind === "create-file" ? "file" : "dir",
2908
+ kind: I.kind === "create-file" ? "file" : "dir",
2909
2909
  path: re
2910
2910
  };
2911
- _(U, De), xe = re, E.kind === "create-file" ? (await b({ path: re, content: "", returnMtimeMs: !1 }), J.emit(te.created, {
2912
- ...st(),
2911
+ _(U, De), xe = re, I.kind === "create-file" ? (await b({ path: re, content: "", returnMtimeMs: !1 }), J.emit(te.created, {
2912
+ ...at(),
2913
2913
  path: re,
2914
2914
  kind: "file"
2915
2915
  }), Pe(re), _e.success({ title: "File created", description: re })) : (await L({ path: re }), _e.success({ title: "Folder created", description: re })), await me([U], { force: !0 }), fe(re);
@@ -2918,7 +2918,7 @@ function Vn({
2918
2918
  xe && D(U, xe);
2919
2919
  const bt = De instanceof Error ? De.message : String(De);
2920
2920
  _e.error({
2921
- title: E.kind === "rename" ? "Rename failed" : E.kind === "create-file" ? "Create file failed" : "Create folder failed",
2921
+ title: I.kind === "rename" ? "Rename failed" : I.kind === "create-file" ? "Create file failed" : "Create folder failed",
2922
2922
  description: bt
2923
2923
  });
2924
2924
  } finally {
@@ -2940,7 +2940,7 @@ function Vn({
2940
2940
  ), Mo = R(() => {
2941
2941
  q(null);
2942
2942
  }, []), Wo = yt(async () => {
2943
- C != null && C.node && (await Hn(C.node.path), _e.success({ title: "Path copied", description: C.node.path }));
2943
+ P != null && P.node && (await Hn(P.node.path), _e.success({ title: "Path copied", description: P.node.path }));
2944
2944
  }), jo = yt(async () => {
2945
2945
  if (!($ != null && $.enabled) || !$.url)
2946
2946
  throw new Error(($ == null ? void 0 : $.reason) ?? "Git URL unavailable");
@@ -2951,10 +2951,10 @@ function Vn({
2951
2951
  G(null), ae(y.path);
2952
2952
  try {
2953
2953
  await S({ path: y.path }), D(Se(y.path), y.path), y.kind === "dir" && h((w) => {
2954
- const E = new Map(w);
2955
- for (const K of E.keys())
2956
- (K === y.path || K.startsWith(`${y.path}/`)) && E.delete(K);
2957
- return E;
2954
+ const I = new Map(w);
2955
+ for (const K of I.keys())
2956
+ (K === y.path || K.startsWith(`${y.path}/`)) && I.delete(K);
2957
+ return I;
2958
2958
  }), await me([Se(y.path)]), _e.success({ title: "Deleted", description: y.path });
2959
2959
  } catch (w) {
2960
2960
  _e.error({
@@ -2974,7 +2974,7 @@ function Vn({
2974
2974
  ]), Bo = !Ve && ((t == null ? void 0 : t.length) ?? 0) > 0 ? t : void 0;
2975
2975
  return /* @__PURE__ */ k("div", { className: "flex h-full min-h-0 flex-col", children: [
2976
2976
  s && /* @__PURE__ */ u(
2977
- ot,
2977
+ it,
2978
2978
  {
2979
2979
  className: "m-2 rounded-md p-3",
2980
2980
  title: "Failed to load files",
@@ -3029,18 +3029,18 @@ function Vn({
3029
3029
  )
3030
3030
  }
3031
3031
  ),
3032
- C && Nr(
3032
+ P && Nr(
3033
3033
  /* @__PURE__ */ k(
3034
3034
  "div",
3035
3035
  {
3036
3036
  ref: ne,
3037
3037
  role: "menu",
3038
3038
  className: "fixed z-50 min-w-[10rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md",
3039
- style: { left: C.x, top: C.y },
3039
+ style: { left: P.x, top: P.y },
3040
3040
  children: [
3041
3041
  /* @__PURE__ */ u(Fe, { type: "button", role: "menuitem", variant: "ghost", size: "sm", className: "w-full justify-start", onClick: Fo, children: "New file" }),
3042
3042
  /* @__PURE__ */ u(Fe, { type: "button", role: "menuitem", variant: "ghost", size: "sm", className: "w-full justify-start", onClick: Lo, children: "New folder" }),
3043
- !C.isBackground && /* @__PURE__ */ k(Me, { children: [
3043
+ !P.isBackground && /* @__PURE__ */ k(Me, { children: [
3044
3044
  /* @__PURE__ */ u(Fe, { type: "button", role: "menuitem", variant: "ghost", size: "sm", className: "w-full justify-start", onClick: $o, children: "Rename" }),
3045
3045
  /* @__PURE__ */ u(
3046
3046
  Fe,
@@ -3051,7 +3051,7 @@ function Vn({
3051
3051
  size: "sm",
3052
3052
  className: "w-full justify-start text-destructive hover:bg-destructive/10 hover:text-destructive",
3053
3053
  onClick: () => {
3054
- G(C.node), j(null);
3054
+ G(P.node), j(null);
3055
3055
  },
3056
3056
  children: "Delete"
3057
3057
  }
@@ -3217,7 +3217,7 @@ function Sc(e, t = {}) {
3217
3217
  o.cause === "agent" && (r && o.kind !== "file" || n != null && n(o.path) || e(o.path));
3218
3218
  });
3219
3219
  }
3220
- function Vd(e) {
3220
+ function Jd(e) {
3221
3221
  return J.on(te.changed, e);
3222
3222
  }
3223
3223
  function Cc() {
@@ -3231,10 +3231,10 @@ const Pc = 250, Ec = 3e3, Ic = 3e4;
3231
3231
  function Tc(e, t) {
3232
3232
  const { adapter: n, panelId: r, onDirtyChange: o, serverMtime: i } = t, [a, l] = B(!1), [s, f] = B(!1), [c, d] = B(null), [p, m] = B(!1), [g, v] = B(!1), x = A(void 0), b = A(null), L = A(0), W = A(null), S = A(0), N = A(void 0), h = A(o);
3233
3233
  h.current = o;
3234
- const I = A(n);
3235
- I.current = n;
3234
+ const C = A(n);
3235
+ C.current = n;
3236
3236
  const M = R(async () => {
3237
- const G = I.current;
3237
+ const G = C.current;
3238
3238
  if (!G || !e || !G.isDirty()) return;
3239
3239
  if (b.current) return b.current;
3240
3240
  const ne = S.current;
@@ -3265,13 +3265,13 @@ function Tc(e, t) {
3265
3265
  }, [M]), O = R(() => {
3266
3266
  var G;
3267
3267
  e && (l(!0), (G = h.current) == null || G.call(h, e, !0), z());
3268
- }, [e, z]), C = R(() => {
3268
+ }, [e, z]), P = R(() => {
3269
3269
  var G;
3270
3270
  clearTimeout(x.current), l(!1), v(!1), e && ((G = h.current) == null || G.call(h, e, !1));
3271
3271
  }, [e]), j = R(async () => {
3272
3272
  var G;
3273
3273
  if (clearTimeout(x.current), b.current) return b.current;
3274
- if ((G = I.current) != null && G.isDirty())
3274
+ if ((G = C.current) != null && G.isDirty())
3275
3275
  return M();
3276
3276
  }, [M]), T = R(() => m(!1), []), $ = R(() => v(!1), []), Y = R((G) => {
3277
3277
  W.current = G, v(!1);
@@ -3301,7 +3301,7 @@ function Tc(e, t) {
3301
3301
  isSaving: s,
3302
3302
  lastSavedAt: c,
3303
3303
  markDirty: O,
3304
- markClean: C,
3304
+ markClean: P,
3305
3305
  flushSave: j,
3306
3306
  shouldSync: p,
3307
3307
  ackSync: T,
@@ -3334,7 +3334,7 @@ function oo({ shortcuts: e, enabled: t = !0 }) {
3334
3334
  return document.addEventListener("keydown", r, !0), () => document.removeEventListener("keydown", r, !0);
3335
3335
  }, [t]);
3336
3336
  }
3337
- function Kd(e) {
3337
+ function Yd(e) {
3338
3338
  const t = typeof navigator < "u" && /Mac|iPhone|iPad/.test(navigator.userAgent), n = [];
3339
3339
  e.mod && n.push(t ? "⌘" : "Ctrl"), e.shift && n.push(t ? "⇧" : "Shift");
3340
3340
  const r = { "\\": "\\", p: "P", b: "B", s: "S", w: "W" };
@@ -3366,37 +3366,37 @@ function io(e) {
3366
3366
  }
3367
3367
  },
3368
3368
  getContent: () => g.current
3369
- } : null, I = Tc(o, {
3369
+ } : null, C = Tc(o, {
3370
3370
  adapter: h,
3371
3371
  panelId: a,
3372
3372
  serverMtime: (l == null ? void 0 : l.mtimeMs) ?? null
3373
3373
  });
3374
- L.current = I.notifySaved, F(() => {
3375
- if (!(!I.shouldSync || (l == null ? void 0 : l.content) == null)) {
3374
+ L.current = C.notifySaved, F(() => {
3375
+ if (!(!C.shouldSync || (l == null ? void 0 : l.content) == null)) {
3376
3376
  if (v.current) {
3377
- I.ackSync();
3377
+ C.ackSync();
3378
3378
  return;
3379
3379
  }
3380
- m(l.content), g.current = l.content, b.current = l.mtimeMs ?? null, v.current = !1, I.ackSync();
3380
+ m(l.content), g.current = l.content, b.current = l.mtimeMs ?? null, v.current = !1, C.ackSync();
3381
3381
  }
3382
- }, [I.shouldSync, I, l, m]), F(() => {
3383
- !I.externalChangeWhileDirty || (l == null ? void 0 : l.mtimeMs) == null || (N(new pt(o ?? t, l.mtimeMs, b.current)), b.current = l.mtimeMs, I.ackExternalChange());
3384
- }, [o, I.externalChangeWhileDirty, I, l, t]);
3382
+ }, [C.shouldSync, C, l, m]), F(() => {
3383
+ !C.externalChangeWhileDirty || (l == null ? void 0 : l.mtimeMs) == null || (N(new pt(o ?? t, l.mtimeMs, b.current)), b.current = l.mtimeMs, C.ackExternalChange());
3384
+ }, [o, C.externalChangeWhileDirty, C, l, t]);
3385
3385
  const M = o ? o.split("/").pop() ?? o : "", [z, O] = B("");
3386
3386
  F(() => {
3387
- const G = M ? I.isDirty ? `${M} ●` : M : "";
3387
+ const G = M ? C.isDirty ? `${M} ●` : M : "";
3388
3388
  O(G);
3389
- }, [M, I.isDirty]);
3390
- const C = R((G) => {
3391
- m(G), g.current = G, v.current = !0, I.markDirty();
3392
- }, [m, I]), j = R(async () => {
3389
+ }, [M, C.isDirty]);
3390
+ const P = R((G) => {
3391
+ m(G), g.current = G, v.current = !0, C.markDirty();
3392
+ }, [m, C]), j = R(async () => {
3393
3393
  var Q;
3394
3394
  if (!o) return;
3395
3395
  const G = await c();
3396
3396
  if (G.status !== "success" || G.data == null) return;
3397
3397
  const ne = G.data;
3398
- m(ne.content), g.current = ne.content, b.current = ne.mtimeMs ?? null, v.current = !1, I.markClean(), typeof ne.mtimeMs == "number" && ((Q = L.current) == null || Q.call(L, ne.mtimeMs)), N(null);
3399
- }, [o, I, c, m]), T = R(async () => {
3398
+ m(ne.content), g.current = ne.content, b.current = ne.mtimeMs ?? null, v.current = !1, C.markClean(), typeof ne.mtimeMs == "number" && ((Q = L.current) == null || Q.call(L, ne.mtimeMs)), N(null);
3399
+ }, [o, C, c, m]), T = R(async () => {
3400
3400
  var ne;
3401
3401
  const G = ++W.current;
3402
3402
  try {
@@ -3409,17 +3409,17 @@ function io(e) {
3409
3409
  }, [o, d]), $ = R(async () => {
3410
3410
  !h || !v.current || await h.save();
3411
3411
  }, [h]), Y = R(async () => {
3412
- await I.flushSave();
3413
- }, [I]);
3412
+ await C.flushSave();
3413
+ }, [C]);
3414
3414
  return {
3415
3415
  isLoading: s,
3416
3416
  error: f,
3417
3417
  content: p,
3418
- isDirty: I.isDirty,
3418
+ isDirty: C.isDirty,
3419
3419
  conflict: S,
3420
3420
  onReloadFromServer: j,
3421
3421
  onOverwrite: T,
3422
- setContent: C,
3422
+ setContent: P,
3423
3423
  save: $,
3424
3424
  flushSave: Y,
3425
3425
  fileName: M,
@@ -3469,7 +3469,7 @@ function so({
3469
3469
  if (!/\S/.test(e))
3470
3470
  return /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(Tr, { className: "min-h-0 border-0", title: "No file selected", description: "Choose a file from the file tree to open an editor." }) });
3471
3471
  if (r)
3472
- return /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(ot, { title: "Failed to load file", description: d ?? r.message }) });
3472
+ return /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(it, { title: "Failed to load file", description: d ?? r.message }) });
3473
3473
  const m = c ?? /* @__PURE__ */ k("div", { className: "flex h-full items-center justify-center gap-2 text-sm text-muted-foreground", children: [
3474
3474
  /* @__PURE__ */ u(Ot, { className: "size-3.5" }),
3475
3475
  /* @__PURE__ */ u("span", { children: "Loading file..." })
@@ -3513,7 +3513,7 @@ const _c = Ji.define([
3513
3513
  { tag: V.invalid, color: "var(--destructive)" }
3514
3514
  ]);
3515
3515
  function Kn(e) {
3516
- return [dt.theme(
3516
+ return [ot.theme(
3517
3517
  {
3518
3518
  "&": {
3519
3519
  backgroundColor: "transparent",
@@ -3586,7 +3586,11 @@ function Kn(e) {
3586
3586
  { dark: (e == null ? void 0 : e.dark) ?? !1 }
3587
3587
  ), Ar(_c)];
3588
3588
  }
3589
- const Fc = 1e6, Lc = 1e7;
3589
+ const Fc = 1e6, Lc = 1e7, $c = "boring-csp-nonce";
3590
+ function Oc() {
3591
+ var t, n;
3592
+ return typeof document > "u" ? null : ((n = (t = document.querySelector(`meta[name="${$c}"]`)) == null ? void 0 : t.getAttribute("content")) == null ? void 0 : n.trim()) || null;
3593
+ }
3590
3594
  function Jn(e) {
3591
3595
  switch (e) {
3592
3596
  case "javascript":
@@ -3614,7 +3618,7 @@ function Jn(e) {
3614
3618
  return null;
3615
3619
  }
3616
3620
  }
3617
- function $c({
3621
+ function Mc({
3618
3622
  content: e,
3619
3623
  onChange: t,
3620
3624
  language: n = "typescript",
@@ -3625,13 +3629,14 @@ function $c({
3625
3629
  }) {
3626
3630
  const l = A(null), s = A(null), f = A(t);
3627
3631
  f.current = t;
3628
- const c = A(!1), d = A(new ct()), p = A(new ct()), m = A(new ct()), g = A(new ct()), v = A(new ct()), x = e.length >= Fc, b = e.length >= Lc, L = r || x, W = X(() => {
3629
- const S = [
3632
+ const c = A(!1), d = A(new lt()), p = A(new lt()), m = A(new lt()), g = A(new lt()), v = A(new lt()), x = e.length >= Fc, b = e.length >= Lc, L = r || x, W = X(() => {
3633
+ const S = Oc(), N = [
3630
3634
  p.current.of(Vt.readOnly.of(L)),
3631
3635
  m.current.of(o ? An() : []),
3632
- g.current.of(i ? dt.lineWrapping : []),
3636
+ g.current.of(i ? ot.lineWrapping : []),
3633
3637
  Mi(),
3634
3638
  Wi(),
3639
+ ...S ? [ot.cspNonce.of(S)] : [],
3635
3640
  Yi(),
3636
3641
  Xi(),
3637
3642
  zi(),
@@ -3642,21 +3647,21 @@ function $c({
3642
3647
  Ar(es, { fallback: !0 })
3643
3648
  ];
3644
3649
  if (x)
3645
- S.push(d.current.of([]));
3650
+ N.push(d.current.of([]));
3646
3651
  else {
3647
- const N = Jn(n);
3648
- S.push(d.current.of(N ?? []));
3652
+ const h = Jn(n);
3653
+ N.push(d.current.of(h ?? []));
3649
3654
  }
3650
- return S.push(
3651
- dt.updateListener.of((N) => {
3652
- var h;
3653
- N.docChanged && !c.current && ((h = f.current) == null || h.call(f, N.state.doc.toString()));
3655
+ return N.push(
3656
+ ot.updateListener.of((h) => {
3657
+ var C;
3658
+ h.docChanged && !c.current && ((C = f.current) == null || C.call(f, h.state.doc.toString()));
3654
3659
  })
3655
- ), S;
3660
+ ), N;
3656
3661
  }, []);
3657
3662
  return F(() => {
3658
3663
  if (!l.current) return;
3659
- const S = Vt.create({ doc: e, extensions: W }), N = new dt({ state: S, parent: l.current });
3664
+ const S = Vt.create({ doc: e, extensions: W }), N = new ot({ state: S, parent: l.current });
3660
3665
  return s.current = N, () => {
3661
3666
  N.destroy(), s.current = null;
3662
3667
  };
@@ -3685,7 +3690,7 @@ function $c({
3685
3690
  const S = s.current;
3686
3691
  S && S.dispatch({
3687
3692
  effects: g.current.reconfigure(
3688
- i ? dt.lineWrapping : []
3693
+ i ? ot.lineWrapping : []
3689
3694
  )
3690
3695
  });
3691
3696
  }, [i]), F(() => {
@@ -3735,7 +3740,7 @@ function $c({
3735
3740
  }
3736
3741
  );
3737
3742
  }
3738
- function Oc(e) {
3743
+ function Wc(e) {
3739
3744
  var n;
3740
3745
  switch ((n = e.split(".").pop()) == null ? void 0 : n.toLowerCase()) {
3741
3746
  case "js":
@@ -3772,7 +3777,7 @@ function Yn({ params: e, api: t, className: n }) {
3772
3777
  tabTitle: d
3773
3778
  } = io({ path: r, panelId: t == null ? void 0 : t.id });
3774
3779
  t && d && t.setTitle(d);
3775
- const p = Oc(r);
3780
+ const p = Wc(r);
3776
3781
  return /* @__PURE__ */ u(
3777
3782
  so,
3778
3783
  {
@@ -3784,15 +3789,15 @@ function Yn({ params: e, api: t, className: n }) {
3784
3789
  onChange: s,
3785
3790
  onReload: f,
3786
3791
  onOverwrite: c,
3787
- editorComponent: $c,
3792
+ editorComponent: Mc,
3788
3793
  editorProps: { language: p, wordWrap: !0, className: n }
3789
3794
  }
3790
3795
  );
3791
3796
  }
3792
- const Mc = Lt(
3793
- () => import("./MarkdownEditor-DjdBgjHU.js").then((e) => ({ default: e.MarkdownEditor }))
3797
+ const jc = Lt(
3798
+ () => import("./MarkdownEditor-CTnqv2GO.js").then((e) => ({ default: e.MarkdownEditor }))
3794
3799
  );
3795
- function Wc({ params: e, api: t, className: n }) {
3800
+ function zc({ params: e, api: t, className: n }) {
3796
3801
  const r = typeof (e == null ? void 0 : e.path) == "string" ? e.path : "", {
3797
3802
  content: o,
3798
3803
  isLoading: i,
@@ -3814,21 +3819,21 @@ function Wc({ params: e, api: t, className: n }) {
3814
3819
  onChange: s,
3815
3820
  onReload: f,
3816
3821
  onOverwrite: c,
3817
- editorComponent: Mc,
3822
+ editorComponent: jc,
3818
3823
  editorProps: { className: n, documentPath: r }
3819
3824
  }
3820
3825
  );
3821
3826
  }
3822
- function jc(e, t) {
3827
+ function Bc(e, t) {
3823
3828
  return `${e.replace(/\/$/, "")}${t}`;
3824
3829
  }
3825
3830
  function nt(e) {
3826
3831
  return e.split("/").pop() ?? e;
3827
3832
  }
3828
- function zc({ path: e, kind: t, reloadKey: n = 0, onReload: r, className: o }) {
3833
+ function Uc({ path: e, kind: t, reloadKey: n = 0, onReload: r, className: o }) {
3829
3834
  const i = Qe(), a = Ze(), [l, s] = B(null), [f, c] = B(null), [d, p] = B(!0), m = X(() => {
3830
3835
  const g = new URLSearchParams({ path: e });
3831
- return n > 0 && g.set("reload", String(n)), jc(i, `/api/v1/files/raw?${g.toString()}`);
3836
+ return n > 0 && g.set("reload", String(n)), Bc(i, `/api/v1/files/raw?${g.toString()}`);
3832
3837
  }, [i, e, n]);
3833
3838
  return F(() => {
3834
3839
  const g = new AbortController();
@@ -3882,7 +3887,7 @@ function zc({ path: e, kind: t, reloadKey: n = 0, onReload: r, className: o }) {
3882
3887
  /* @__PURE__ */ u("div", { className: "flex min-h-0 flex-1 items-center justify-center overflow-auto p-4", children: d ? /* @__PURE__ */ k("div", { className: "flex items-center justify-center gap-2 text-sm text-muted-foreground", children: [
3883
3888
  /* @__PURE__ */ u(Ot, { className: "size-3.5" }),
3884
3889
  /* @__PURE__ */ u("span", { children: "Loading preview..." })
3885
- ] }) : f || !l ? /* @__PURE__ */ u(ot, { title: "Failed to load preview", description: f ?? "Preview unavailable." }) : t === "image" ? /* @__PURE__ */ u(
3890
+ ] }) : f || !l ? /* @__PURE__ */ u(it, { title: "Failed to load preview", description: f ?? "Preview unavailable." }) : t === "image" ? /* @__PURE__ */ u(
3886
3891
  "img",
3887
3892
  {
3888
3893
  src: l,
@@ -3897,9 +3902,9 @@ function zc({ path: e, kind: t, reloadKey: n = 0, onReload: r, className: o }) {
3897
3902
  className: "h-full min-h-[480px] w-full rounded-md border border-border bg-background"
3898
3903
  }
3899
3904
  ) })
3900
- ] }) : /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(ot, { title: "No file selected", description: "Choose an image or PDF from the file tree." }) });
3905
+ ] }) : /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(it, { title: "No file selected", description: "Choose an image or PDF from the file tree." }) });
3901
3906
  }
3902
- function Bc({ path: e }) {
3907
+ function qc({ path: e }) {
3903
3908
  const [t, n] = B(0), r = R(() => {
3904
3909
  n((o) => o + 1);
3905
3910
  }, []);
@@ -3917,29 +3922,29 @@ function Bc({ path: e }) {
3917
3922
  };
3918
3923
  }, [e, r]), { reloadKey: t, reload: r };
3919
3924
  }
3920
- function Uc(e, t) {
3925
+ function Hc(e, t) {
3921
3926
  return t || (e.toLowerCase().endsWith(".pdf") ? "pdf" : "image");
3922
3927
  }
3923
3928
  function Xn({ params: e, className: t }) {
3924
- const n = (e == null ? void 0 : e.path) ?? "", { reloadKey: r, reload: o } = Bc({ path: n });
3929
+ const n = (e == null ? void 0 : e.path) ?? "", { reloadKey: r, reload: o } = qc({ path: n });
3925
3930
  return /* @__PURE__ */ u(
3926
- zc,
3931
+ Uc,
3927
3932
  {
3928
3933
  path: n,
3929
- kind: Uc(n, e == null ? void 0 : e.kind),
3934
+ kind: Hc(n, e == null ? void 0 : e.kind),
3930
3935
  reloadKey: r,
3931
3936
  onReload: o,
3932
3937
  className: t
3933
3938
  }
3934
3939
  );
3935
3940
  }
3936
- function qc(e, t) {
3941
+ function Gc(e, t) {
3937
3942
  return `${e.replace(/\/$/, "")}${t}`;
3938
3943
  }
3939
- function Hc(e) {
3944
+ function Vc(e) {
3940
3945
  return e.split("/").pop() ?? e;
3941
3946
  }
3942
- function Gc(e) {
3947
+ function Kc(e) {
3943
3948
  const t = e.replace(/\\/g, "/"), n = t.lastIndexOf("/");
3944
3949
  return n === -1 ? "" : t.slice(0, n);
3945
3950
  }
@@ -3947,15 +3952,15 @@ function ao(e) {
3947
3952
  const t = e.search(/[?#]/);
3948
3953
  return t === -1 ? { pathname: e, suffix: "" } : { pathname: e.slice(0, t), suffix: e.slice(t) };
3949
3954
  }
3950
- function Vc(e) {
3955
+ function Jc(e) {
3951
3956
  return /^[a-z][a-z0-9+.-]*:/i.test(e) || e.startsWith("//") || e.startsWith("#") || e.startsWith("/api/");
3952
3957
  }
3953
3958
  function co(e, t) {
3954
3959
  const n = t.trim();
3955
- if (!n || Vc(n)) return null;
3960
+ if (!n || Jc(n)) return null;
3956
3961
  const { pathname: r } = ao(n);
3957
3962
  if (!r) return null;
3958
- const o = r.startsWith("/") ? r.split("/") : [...Gc(e).split("/"), ...r.split("/")], i = [];
3963
+ const o = r.startsWith("/") ? r.split("/") : [...Kc(e).split("/"), ...r.split("/")], i = [];
3959
3964
  for (const a of o)
3960
3965
  if (!(!a || a === ".")) {
3961
3966
  if (a === "..") {
@@ -3969,7 +3974,7 @@ function co(e, t) {
3969
3974
  }
3970
3975
  function xn(e, t, n) {
3971
3976
  const r = new URLSearchParams({ path: t });
3972
- return n && r.set("workspaceId", n), qc(e, `/api/v1/files/raw?${r.toString()}`);
3977
+ return n && r.set("workspaceId", n), Gc(e, `/api/v1/files/raw?${r.toString()}`);
3973
3978
  }
3974
3979
  function ht(e, t, n, r) {
3975
3980
  const o = co(t, n);
@@ -3983,7 +3988,7 @@ function Xt(e, t, n, r) {
3983
3988
  return i ? `@import ${i}${a}${s}${a})` : o.replace(`${a}${l}${a}`, `${a}${s}${a}`);
3984
3989
  });
3985
3990
  }
3986
- function Kc(e, t, n, r) {
3991
+ function Yc(e, t, n, r) {
3987
3992
  return e.split(",").map((o) => {
3988
3993
  const i = o.trim(), [a, ...l] = i.split(/\s+/);
3989
3994
  return a ? [ht(n, t, a, r), ...l].join(" ") : o;
@@ -3998,7 +4003,7 @@ async function lo(e, t, n) {
3998
4003
  if (!r.ok) throw new Error(`HTTP ${r.status}`);
3999
4004
  return r.text();
4000
4005
  }
4001
- async function Jc(e) {
4006
+ async function Xc(e) {
4002
4007
  const { html: t, path: n, apiBaseUrl: r, headers: o, workspaceRequestId: i, signal: a } = e, l = new DOMParser().parseFromString(t, "text/html");
4003
4008
  await Promise.all(
4004
4009
  Array.from(l.querySelectorAll('link[rel~="stylesheet"][href]')).map(async (f) => {
@@ -4039,12 +4044,12 @@ async function Jc(e) {
4039
4044
  }
4040
4045
  for (const f of Array.from(l.querySelectorAll("[srcset]"))) {
4041
4046
  const c = f.getAttribute("srcset");
4042
- c && f.setAttribute("srcset", Kc(c, n, r, i));
4047
+ c && f.setAttribute("srcset", Yc(c, n, r, i));
4043
4048
  }
4044
4049
  return `<!doctype html>
4045
4050
  ${l.documentElement.outerHTML}`;
4046
4051
  }
4047
- function Yc({ path: e, className: t }) {
4052
+ function Qc({ path: e, className: t }) {
4048
4053
  const n = Qe(), r = Ze(), [o, i] = B(null), [a, l] = B(null), [s, f] = B(!0), c = X(
4049
4054
  () => xn(n, e, r),
4050
4055
  [n, e, r]
@@ -4056,7 +4061,7 @@ function Yc({ path: e, className: t }) {
4056
4061
  f(!0), l(null), i(null);
4057
4062
  const v = {};
4058
4063
  return r && (v["x-boring-workspace-id"] = r), lo(c, v, g.signal).then(async (x) => {
4059
- i(await Jc({
4064
+ i(await Xc({
4060
4065
  html: x,
4061
4066
  path: e,
4062
4067
  apiBaseUrl: n,
@@ -4072,7 +4077,7 @@ function Yc({ path: e, className: t }) {
4072
4077
  }, [n, e, c, r, d]), e ? s ? /* @__PURE__ */ k("div", { className: "flex h-full items-center justify-center gap-2 text-sm text-muted-foreground", children: [
4073
4078
  /* @__PURE__ */ u(Ot, { className: "size-3.5" }),
4074
4079
  /* @__PURE__ */ u("span", { children: "Loading HTML preview..." })
4075
- ] }) : a || o === null ? /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(ot, { title: "Failed to load HTML preview", description: a ?? "Preview unavailable." }) }) : /* @__PURE__ */ k("div", { className: oe("flex h-full min-h-0 flex-col bg-background", t), children: [
4080
+ ] }) : a || o === null ? /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(it, { title: "Failed to load HTML preview", description: a ?? "Preview unavailable." }) }) : /* @__PURE__ */ k("div", { className: oe("flex h-full min-h-0 flex-col bg-background", t), children: [
4076
4081
  /* @__PURE__ */ u("div", { className: "flex shrink-0 items-center justify-end gap-3 border-b border-border/60 px-3 py-2", children: /* @__PURE__ */ k("div", { className: "flex items-center gap-1", children: [
4077
4082
  /* @__PURE__ */ u(
4078
4083
  Ce,
@@ -4104,17 +4109,17 @@ function Yc({ path: e, className: t }) {
4104
4109
  "iframe",
4105
4110
  {
4106
4111
  srcDoc: o,
4107
- title: Hc(e),
4112
+ title: Vc(e),
4108
4113
  sandbox: "allow-scripts allow-forms allow-popups allow-popups-to-escape-sandbox",
4109
4114
  className: "min-h-0 flex-1 border-0 bg-white"
4110
4115
  }
4111
4116
  )
4112
- ] }) : /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(ot, { title: "No file selected", description: "Choose an HTML file from the file tree." }) });
4117
+ ] }) : /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-6", children: /* @__PURE__ */ u(it, { title: "No file selected", description: "Choose an HTML file from the file tree." }) });
4113
4118
  }
4114
- function Xc({ params: e, className: t }) {
4115
- return /* @__PURE__ */ u(Yc, { path: (e == null ? void 0 : e.path) ?? "", className: t });
4119
+ function Zc({ params: e, className: t }) {
4120
+ return /* @__PURE__ */ u(Qc, { path: (e == null ? void 0 : e.path) ?? "", className: t });
4116
4121
  }
4117
- function Qc({ params: e }) {
4122
+ function el({ params: e }) {
4118
4123
  const { path: t } = e, n = t.includes(".") ? t.split(".").pop() : void 0;
4119
4124
  return /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center p-8", children: /* @__PURE__ */ u(
4120
4125
  Tr,
@@ -4126,10 +4131,10 @@ function Qc({ params: e }) {
4126
4131
  }
4127
4132
  ) });
4128
4133
  }
4129
- const ut = {
4134
+ const dt = {
4130
4135
  id: da,
4131
4136
  title: "Unsupported file",
4132
- component: Qc,
4137
+ component: el,
4133
4138
  placement: "center",
4134
4139
  source: "builtin"
4135
4140
  }, Qn = [
@@ -4181,11 +4186,11 @@ const ut = {
4181
4186
  fallback: !0
4182
4187
  }
4183
4188
  ];
4184
- function Zc(e) {
4189
+ function tl(e) {
4185
4190
  const t = e.split("/").filter(Boolean).length, n = e.replace(/[*?!]/g, "").length;
4186
4191
  return t * 10 + n;
4187
4192
  }
4188
- function el(e) {
4193
+ function nl(e) {
4189
4194
  let t = "^";
4190
4195
  for (let n = 0; n < e.length; n++) {
4191
4196
  const r = e[n], o = e[n + 1];
@@ -4209,18 +4214,18 @@ function el(e) {
4209
4214
  }
4210
4215
  return new RegExp(`${t}$`);
4211
4216
  }
4212
- function tl(e, t) {
4213
- return el(t).test(e.replace(/\\/g, "/"));
4217
+ function rl(e, t) {
4218
+ return nl(t).test(e.replace(/\\/g, "/"));
4214
4219
  }
4215
- function nl(e) {
4220
+ function ol(e) {
4216
4221
  return e.split("/").pop() ?? e;
4217
4222
  }
4218
- function rl(e) {
4223
+ function il(e) {
4219
4224
  let t, n = -1;
4220
4225
  for (const r of Qn)
4221
4226
  for (const o of r.patterns ?? []) {
4222
- if (!tl(e, o)) continue;
4223
- const i = Zc(o);
4227
+ if (!rl(e, o)) continue;
4228
+ const i = tl(o);
4224
4229
  i >= n && (t = r, n = i);
4225
4230
  }
4226
4231
  return t ?? Qn.find((r) => r.fallback);
@@ -4230,18 +4235,18 @@ const Qt = {
4230
4235
  source: "builtin",
4231
4236
  resolve(e) {
4232
4237
  if (e.kind !== Xe) return;
4233
- const t = e.target, n = rl(t);
4238
+ const t = e.target, n = il(t);
4234
4239
  if (n)
4235
4240
  return {
4236
4241
  id: `file:${t}`,
4237
4242
  component: n.component,
4238
- title: nl(t),
4243
+ title: ol(t),
4239
4244
  params: { path: t },
4240
4245
  score: n.fallback ? -1 : 0
4241
4246
  };
4242
4247
  }
4243
4248
  };
4244
- function ol(e) {
4249
+ function sl(e) {
4245
4250
  const t = e.lastIndexOf("/");
4246
4251
  return {
4247
4252
  id: e,
@@ -4252,7 +4257,7 @@ function ol(e) {
4252
4257
  function Zn() {
4253
4258
  return { items: [], total: 0, hasMore: !1 };
4254
4259
  }
4255
- function il({
4260
+ function al({
4256
4261
  client: e,
4257
4262
  onSelect: t
4258
4263
  }) {
@@ -4265,7 +4270,7 @@ function il({
4265
4270
  if (!i || o != null && o.aborted) return Zn();
4266
4271
  const a = await e.search(to(i), r, o);
4267
4272
  return o != null && o.aborted ? Zn() : {
4268
- items: a.map(ol),
4273
+ items: a.map(sl),
4269
4274
  total: a.length,
4270
4275
  hasMore: !1
4271
4276
  };
@@ -4274,7 +4279,7 @@ function il({
4274
4279
  onSelect: (n) => t == null ? void 0 : t(n.id, n)
4275
4280
  };
4276
4281
  }
4277
- function sl({
4282
+ function cl({
4278
4283
  apiBaseUrl: e,
4279
4284
  authHeaders: t,
4280
4285
  onAuthError: n,
@@ -4292,17 +4297,17 @@ function sl({
4292
4297
  }
4293
4298
  );
4294
4299
  }
4295
- function al() {
4300
+ function ll() {
4296
4301
  return F(() => {
4297
4302
  fc();
4298
4303
  }, []), Yr("."), null;
4299
4304
  }
4300
- function cl() {
4305
+ function ul() {
4301
4306
  const e = We(), t = Bt();
4302
4307
  return F(() => {
4303
4308
  const n = t.get(It);
4304
4309
  if (n && n.pluginId !== Et) return;
4305
- const r = il({
4310
+ const r = al({
4306
4311
  client: e,
4307
4312
  onSelect: (o) => {
4308
4313
  Mr({ kind: "openFile", params: { path: o } });
@@ -4314,13 +4319,13 @@ function cl() {
4314
4319
  };
4315
4320
  }, [t, e]), null;
4316
4321
  }
4317
- const ll = (e) => {
4322
+ const dl = (e) => {
4318
4323
  e.registerProvider({
4319
4324
  id: "filesystem-data",
4320
- component: sl
4325
+ component: cl
4321
4326
  }), e.registerBinding({
4322
4327
  id: "filesystem-tree-preload",
4323
- component: al
4328
+ component: ll
4324
4329
  }), e.registerLeftTab({
4325
4330
  id: cn,
4326
4331
  title: "Files",
@@ -4329,11 +4334,11 @@ const ll = (e) => {
4329
4334
  source: "builtin",
4330
4335
  icon: Zo
4331
4336
  }), e.registerPanel({
4332
- id: ut.id,
4333
- label: ut.title,
4334
- component: ut.component,
4335
- placement: ut.placement,
4336
- source: ut.source
4337
+ id: dt.id,
4338
+ label: dt.title,
4339
+ component: dt.component,
4340
+ placement: dt.placement,
4341
+ source: dt.source
4337
4342
  }), e.registerPanel({
4338
4343
  id: ln,
4339
4344
  label: "Code",
@@ -4351,7 +4356,7 @@ const ll = (e) => {
4351
4356
  }), e.registerPanel({
4352
4357
  id: jr,
4353
4358
  label: "Markdown",
4354
- component: Wc,
4359
+ component: zc,
4355
4360
  placement: "center",
4356
4361
  source: "builtin"
4357
4362
  }), e.registerPanel({
@@ -4369,7 +4374,7 @@ const ll = (e) => {
4369
4374
  }), e.registerPanel({
4370
4375
  id: Ur,
4371
4376
  label: "HTML",
4372
- component: Xc,
4377
+ component: Zc,
4373
4378
  placement: "center",
4374
4379
  source: "builtin"
4375
4380
  }), e.registerSurfaceResolver({
@@ -4379,7 +4384,7 @@ const ll = (e) => {
4379
4384
  resolve: Qt.resolve
4380
4385
  }), e.registerBinding({
4381
4386
  id: "filesystem-catalog",
4382
- component: cl
4387
+ component: ul
4383
4388
  }), e.registerBinding({
4384
4389
  id: "filesystem-file-panel",
4385
4390
  component: bc
@@ -4390,9 +4395,9 @@ const ll = (e) => {
4390
4395
  }, er = is({
4391
4396
  id: Et,
4392
4397
  label: "Filesystem",
4393
- setup: ll
4398
+ setup: dl
4394
4399
  });
4395
- class ul {
4400
+ class fl {
4396
4401
  constructor() {
4397
4402
  Z(this, "commands", /* @__PURE__ */ new Map());
4398
4403
  Z(this, "listeners", /* @__PURE__ */ new Set());
@@ -4476,58 +4481,58 @@ function Le({
4476
4481
  ] }) });
4477
4482
  }
4478
4483
  const uo = Ee(null), fo = Ee("dock");
4479
- function dl({ basePath: e, children: t }) {
4484
+ function pl({ basePath: e, children: t }) {
4480
4485
  return /* @__PURE__ */ u(uo.Provider, { value: e ?? null, children: t });
4481
4486
  }
4482
- function Jd({ mode: e, children: t }) {
4487
+ function Xd({ mode: e, children: t }) {
4483
4488
  return /* @__PURE__ */ u(fo.Provider, { value: e, children: t });
4484
4489
  }
4485
- function fl({ componentId: e, params: t, basePath: n }) {
4490
+ function hl({ componentId: e, params: t, basePath: n }) {
4486
4491
  const r = new URLSearchParams({ component: e });
4487
4492
  return t && Object.keys(t).length > 0 && r.set("params", JSON.stringify(t)), `${n}?${r.toString()}`;
4488
4493
  }
4489
- function Yd(e) {
4494
+ function Qd(e) {
4490
4495
  const t = he(uo);
4491
- return X(() => t ? fl({
4496
+ return X(() => t ? hl({
4492
4497
  componentId: e.componentId,
4493
4498
  params: e.params,
4494
4499
  basePath: t
4495
4500
  }) : null, [t, e.componentId, e.params]);
4496
4501
  }
4497
- function pl() {
4502
+ function ml() {
4498
4503
  return he(fo);
4499
4504
  }
4500
- function Xd() {
4501
- return pl() === "full-page";
4505
+ function Zd() {
4506
+ return ml() === "full-page";
4502
4507
  }
4503
- const hl = ee.string().max(64).regex(/^[a-zA-Z0-9_-]+$/), Tt = ee.string().max(1024), ml = ee.number().nonnegative(), gl = ee.object({
4508
+ const gl = ee.string().max(64).regex(/^[a-zA-Z0-9_-]+$/), Tt = ee.string().max(1024), vl = ee.number().nonnegative(), yl = ee.object({
4504
4509
  collapsed: ee.boolean(),
4505
4510
  width: ee.number().int().positive()
4506
- }), vl = ee.record(hl, ml), yl = ee.object({
4511
+ }), bl = ee.record(gl, vl), wl = ee.object({
4507
4512
  root: ee.unknown(),
4508
4513
  width: ee.number().nonnegative().optional(),
4509
4514
  height: ee.number().nonnegative().optional(),
4510
4515
  orientation: ee.number().optional()
4511
- }).passthrough(), bl = ee.object({
4516
+ }).passthrough(), kl = ee.object({
4512
4517
  id: Tt,
4513
4518
  contentComponent: Tt.optional(),
4514
4519
  title: Tt.optional()
4515
- }).passthrough(), wl = ee.object({
4516
- grid: yl,
4517
- panels: ee.record(Tt, bl)
4518
- }).passthrough().nullable(), kl = ee.object({
4519
- layout: wl,
4520
- sidebar: gl,
4521
- panelSizes: vl
4522
- }), xl = ee.object({
4520
+ }).passthrough(), xl = ee.object({
4521
+ grid: wl,
4522
+ panels: ee.record(Tt, kl)
4523
+ }).passthrough().nullable(), Sl = ee.object({
4524
+ layout: xl,
4525
+ sidebar: yl,
4526
+ panelSizes: bl
4527
+ }), Cl = ee.object({
4523
4528
  theme: ee.enum(["light", "dark"])
4524
4529
  });
4525
- function Sl(e) {
4526
- const t = kl.safeParse(e);
4530
+ function Pl(e) {
4531
+ const t = Sl.safeParse(e);
4527
4532
  return t.success ? t.data : (console.error("Layout validation failed:", t.error.issues), null);
4528
4533
  }
4529
- function Cl(e) {
4530
- const t = xl.safeParse(e);
4534
+ function El(e) {
4535
+ const t = Cl.safeParse(e);
4531
4536
  return t.success ? t.data : (console.error("Preferences validation failed:", t.error.issues), null);
4532
4537
  }
4533
4538
  const tr = 1e5, nr = "2.0";
@@ -4549,18 +4554,18 @@ function or(e, t) {
4549
4554
  }
4550
4555
  }
4551
4556
  }
4552
- function Pl(e) {
4557
+ function Il(e) {
4553
4558
  try {
4554
4559
  const t = localStorage.getItem(e);
4555
4560
  if (!t) return { theme: "light" };
4556
- const n = JSON.parse(t), r = Cl(n == null ? void 0 : n.state);
4561
+ const n = JSON.parse(t), r = El(n == null ? void 0 : n.state);
4557
4562
  return r ? { theme: r.theme } : { theme: "light" };
4558
4563
  } catch {
4559
4564
  return { theme: "light" };
4560
4565
  }
4561
4566
  }
4562
4567
  function po(e = {}) {
4563
- const t = e.storageKey ?? (e.workspaceId ? `boring-ui-v2:layout:${e.workspaceId}` : "boring-ui-v2:layout"), n = "boring-ui-v2:preferences", r = e.persistenceEnabled === !1, o = r ? { theme: "light" } : Pl(n), i = _i()(
4568
+ const t = e.storageKey ?? (e.workspaceId ? `boring-ui-v2:layout:${e.workspaceId}` : "boring-ui-v2:layout"), n = "boring-ui-v2:preferences", r = e.persistenceEnabled === !1, o = r ? { theme: "light" } : Il(n), i = _i()(
4564
4569
  Fi(
4565
4570
  (s, f) => ({
4566
4571
  hydrationComplete: !1,
@@ -4650,7 +4655,7 @@ function po(e = {}) {
4650
4655
  const c = JSON.parse(f);
4651
4656
  if ((c == null ? void 0 : c.version) !== void 0 && String(c.version) !== nr)
4652
4657
  return e.onLayoutVersionMismatch ? e.onLayoutVersionMismatch() : localStorage.removeItem(s), null;
4653
- const d = Sl(c == null ? void 0 : c.state);
4658
+ const d = Pl(c == null ? void 0 : c.state);
4654
4659
  return d ? { ...c, state: d } : (console.error("Layout restored with defaults"), null);
4655
4660
  } catch {
4656
4661
  return console.error("Layout restored with defaults"), null;
@@ -4694,7 +4699,7 @@ function mo(e) {
4694
4699
  return !1;
4695
4700
  }
4696
4701
  }
4697
- function El(e, t) {
4702
+ function Tl(e, t) {
4698
4703
  const n = e.filter(mo);
4699
4704
  if (!t) return n.slice(0, Dt);
4700
4705
  const r = t.toLowerCase();
@@ -4703,7 +4708,7 @@ function El(e, t) {
4703
4708
  return o.title.toLowerCase().includes(r) ? !0 : ((i = o.keywords) == null ? void 0 : i.some((a) => a.toLowerCase().includes(r))) ?? !1;
4704
4709
  }).slice(0, Dt);
4705
4710
  }
4706
- function Il(e, t, n) {
4711
+ function Rl(e, t, n) {
4707
4712
  return e.filter((r) => {
4708
4713
  if (r.type === "catalog")
4709
4714
  return t.some((i) => i.id === r.catalogId);
@@ -4717,7 +4722,7 @@ function Sn() {
4717
4722
  const e = localStorage.getItem(go);
4718
4723
  if (!e) return [];
4719
4724
  const t = JSON.parse(e);
4720
- return Array.isArray(t) ? t.filter(Tl).slice(0, vo) : [];
4725
+ return Array.isArray(t) ? t.filter(Nl).slice(0, vo) : [];
4721
4726
  } catch {
4722
4727
  return [];
4723
4728
  }
@@ -4754,19 +4759,19 @@ function ar(e, t) {
4754
4759
  selectedAt: Date.now()
4755
4760
  }), yo(n);
4756
4761
  }
4757
- function Tl(e) {
4762
+ function Nl(e) {
4758
4763
  if (typeof e != "object" || e === null) return !1;
4759
4764
  const t = e;
4760
4765
  return t.type === "catalog" ? typeof t.catalogId == "string" && typeof t.rowId == "string" && typeof t.rowSnapshot == "object" && t.rowSnapshot !== null && typeof t.selectedAt == "number" : t.type === "command" ? typeof t.commandId == "string" && typeof t.titleSnapshot == "string" && typeof t.selectedAt == "number" : !1;
4761
4766
  }
4762
- function Rl({
4767
+ function Al({
4763
4768
  catalogs: e,
4764
4769
  commands: t,
4765
4770
  isCommandMode: n,
4766
4771
  searchQuery: r,
4767
4772
  close: o
4768
4773
  }) {
4769
- const i = X(() => n || r ? [] : Il(Sn(), e, t), [n, r, e, t]), a = R((f, c) => {
4774
+ const i = X(() => n || r ? [] : Rl(Sn(), e, t), [n, r, e, t]), a = R((f, c) => {
4770
4775
  sr(f.id, c), f.onSelect(c), o();
4771
4776
  }, [o]), l = R(
4772
4777
  (f) => {
@@ -4790,7 +4795,7 @@ function Rl({
4790
4795
  handleRecentSelect: s
4791
4796
  };
4792
4797
  }
4793
- function Nl({
4798
+ function Dl({
4794
4799
  open: e,
4795
4800
  setOpen: t,
4796
4801
  mode: n,
@@ -4851,7 +4856,7 @@ function Nl({
4851
4856
  handleInputKeyDown: d
4852
4857
  };
4853
4858
  }
4854
- function Al({
4859
+ function _l({
4855
4860
  catalogs: e,
4856
4861
  isCommandMode: t,
4857
4862
  searchQuery: n
@@ -4924,34 +4929,34 @@ function Al({
4924
4929
  };
4925
4930
  }, [e, r, t]), i;
4926
4931
  }
4927
- function Dl(e) {
4928
- const [t, n] = B(!1), [r, o] = B(""), [i, a] = B("catalogs"), l = vs(), s = gs(), f = rd(), c = X(() => {
4929
- const I = {};
4932
+ function Fl(e) {
4933
+ const [t, n] = B(!1), [r, o] = B(""), [i, a] = B("catalogs"), l = vs(), s = gs(), f = id(), c = X(() => {
4934
+ const C = {};
4930
4935
  for (const M of (f == null ? void 0 : f.registeredPlugins) ?? [])
4931
- M.label && (I[M.id] = M.label);
4932
- return I;
4933
- }, [f == null ? void 0 : f.registeredPlugins]), d = i === "commands", p = r.trim(), m = Al({
4936
+ M.label && (C[M.id] = M.label);
4937
+ return C;
4938
+ }, [f == null ? void 0 : f.registeredPlugins]), d = i === "commands", p = r.trim(), m = _l({
4934
4939
  catalogs: l,
4935
4940
  isCommandMode: d,
4936
4941
  searchQuery: p
4937
- }), { inputRef: g, switchMode: v, handleInputKeyDown: x } = Nl({
4942
+ }), { inputRef: g, switchMode: v, handleInputKeyDown: x } = Dl({
4938
4943
  open: t,
4939
4944
  setOpen: n,
4940
4945
  mode: i,
4941
4946
  setMode: a,
4942
4947
  setQuery: o
4943
- }), b = R((I) => {
4944
- if (I.startsWith(">")) {
4945
- a("commands"), o(I.slice(1));
4948
+ }), b = R((C) => {
4949
+ if (C.startsWith(">")) {
4950
+ a("commands"), o(C.slice(1));
4946
4951
  return;
4947
4952
  }
4948
- o(I);
4949
- }, []), L = X(() => d ? El(s, p) : [], [s, d, p]), {
4953
+ o(C);
4954
+ }, []), L = X(() => d ? Tl(s, p) : [], [s, d, p]), {
4950
4955
  recentEntries: W,
4951
4956
  handleCatalogSelect: S,
4952
4957
  handleCommandSelect: N,
4953
4958
  handleRecentSelect: h
4954
- } = Rl({
4959
+ } = Al({
4955
4960
  catalogs: l,
4956
4961
  commands: s,
4957
4962
  isCommandMode: d,
@@ -4973,7 +4978,7 @@ function Dl(e) {
4973
4978
  ] }),
4974
4979
  /* @__PURE__ */ k(Ii, { shouldFilter: !1, className: "flex min-h-0 flex-1 flex-col bg-transparent", children: [
4975
4980
  /* @__PURE__ */ u(
4976
- _l,
4981
+ Ll,
4977
4982
  {
4978
4983
  inputRef: g,
4979
4984
  isCommandMode: d,
@@ -4981,7 +4986,7 @@ function Dl(e) {
4981
4986
  onQueryChange: b,
4982
4987
  onInputKeyDown: x,
4983
4988
  onSwitchMode: v,
4984
- loading: !d && m.some((I) => I.loading)
4989
+ loading: !d && m.some((C) => C.loading)
4985
4990
  }
4986
4991
  ),
4987
4992
  /* @__PURE__ */ k(
@@ -4992,7 +4997,7 @@ function Dl(e) {
4992
4997
  children: [
4993
4998
  /* @__PURE__ */ u(Ri, { className: "py-10 text-center text-sm text-muted-foreground", children: d ? "No matching commands" : "No catalog results" }),
4994
4999
  /* @__PURE__ */ u(
4995
- Fl,
5000
+ $l,
4996
5001
  {
4997
5002
  isCommandMode: d,
4998
5003
  recentEntries: W,
@@ -5001,7 +5006,7 @@ function Dl(e) {
5001
5006
  }
5002
5007
  ),
5003
5008
  /* @__PURE__ */ u(
5004
- Ll,
5009
+ Ol,
5005
5010
  {
5006
5011
  catalogGroups: m,
5007
5012
  isCommandMode: d,
@@ -5009,7 +5014,7 @@ function Dl(e) {
5009
5014
  }
5010
5015
  ),
5011
5016
  /* @__PURE__ */ u(
5012
- Ol,
5017
+ Wl,
5013
5018
  {
5014
5019
  commandResults: L,
5015
5020
  isCommandMode: d,
@@ -5020,13 +5025,13 @@ function Dl(e) {
5020
5025
  ]
5021
5026
  }
5022
5027
  ),
5023
- /* @__PURE__ */ u(Ml, { isCommandMode: d })
5028
+ /* @__PURE__ */ u(jl, { isCommandMode: d })
5024
5029
  ] })
5025
5030
  ]
5026
5031
  }
5027
5032
  ) });
5028
5033
  }
5029
- function _l({
5034
+ function Ll({
5030
5035
  inputRef: e,
5031
5036
  isCommandMode: t,
5032
5037
  query: n,
@@ -5086,7 +5091,7 @@ function _l({
5086
5091
  )
5087
5092
  ] });
5088
5093
  }
5089
- function Fl({
5094
+ function $l({
5090
5095
  isCommandMode: e,
5091
5096
  recentEntries: t,
5092
5097
  searchQuery: n,
@@ -5113,13 +5118,13 @@ function Fl({
5113
5118
  );
5114
5119
  }) });
5115
5120
  }
5116
- function Ll({
5121
+ function Ol({
5117
5122
  catalogGroups: e,
5118
5123
  isCommandMode: t,
5119
5124
  onCatalogSelect: n
5120
5125
  }) {
5121
5126
  return t ? null : /* @__PURE__ */ u(Me, { children: e.filter((r) => r.error || r.rows.length > 0).map((r) => /* @__PURE__ */ k(mn, { heading: r.catalog.label, children: [
5122
- r.error ? /* @__PURE__ */ u($l, { catalogId: r.catalog.id, error: r.error }) : null,
5127
+ r.error ? /* @__PURE__ */ u(Ml, { catalogId: r.catalog.id, error: r.error }) : null,
5123
5128
  r.rows.map((o) => /* @__PURE__ */ u(
5124
5129
  Mt,
5125
5130
  {
@@ -5143,7 +5148,7 @@ function Ll({
5143
5148
  ))
5144
5149
  ] }, r.catalog.id)) });
5145
5150
  }
5146
- function $l({ catalogId: e, error: t }) {
5151
+ function Ml({ catalogId: e, error: t }) {
5147
5152
  return /* @__PURE__ */ k(
5148
5153
  Mt,
5149
5154
  {
@@ -5157,7 +5162,7 @@ function $l({ catalogId: e, error: t }) {
5157
5162
  }
5158
5163
  );
5159
5164
  }
5160
- function Ol({
5165
+ function Wl({
5161
5166
  commandResults: e,
5162
5167
  isCommandMode: t,
5163
5168
  pluginLabelMap: n,
@@ -5179,7 +5184,7 @@ function Ol({
5179
5184
  o.id
5180
5185
  )) });
5181
5186
  }
5182
- function Ml({ isCommandMode: e }) {
5187
+ function jl({ isCommandMode: e }) {
5183
5188
  return /* @__PURE__ */ k("div", { className: "flex items-center justify-between border-t border-border/50 bg-muted/30 px-3 py-2 text-[11px] text-muted-foreground", children: [
5184
5189
  /* @__PURE__ */ u("span", { className: "font-medium tracking-wide uppercase", children: e ? "Commands" : ho }),
5185
5190
  /* @__PURE__ */ k("div", { className: "flex items-center gap-3", children: [
@@ -5235,35 +5240,35 @@ function bo({ row: e }) {
5235
5240
  e.meta ? /* @__PURE__ */ u("span", { className: "ml-auto shrink-0 text-xs text-muted-foreground/70", children: e.meta }) : null
5236
5241
  ] });
5237
5242
  }
5238
- const Qd = ["/api/v1/tree?path=."], Wl = /* @__PURE__ */ new Set([
5243
+ const ef = ["/api/v1/tree?path=."], zl = /* @__PURE__ */ new Set([
5239
5244
  "WORKSPACE_NOT_READY",
5240
5245
  "AGENT_RUNTIME_NOT_READY",
5241
5246
  "RUNTIME_PROVISIONING_LOCKED"
5242
5247
  ]);
5243
- function jl(e, t) {
5248
+ function Bl(e, t) {
5244
5249
  if (!e || !t) return e;
5245
5250
  const n = e.replace(/\\/g, "/").replace(/\/+$/, ""), r = t.replace(/\\/g, "/").replace(/\/+$/, "");
5246
5251
  return n.startsWith("/") ? n === r ? "." : n.startsWith(`${r}/`) ? n.slice(r.length + 1) : e : e;
5247
5252
  }
5248
- function Zd(e, t) {
5253
+ function tf(e, t) {
5249
5254
  return /^https?:\/\//i.test(t) || !e ? t : `${e.replace(/\/$/, "")}/${t.replace(/^\//, "")}`;
5250
5255
  }
5251
- function ef(e, t) {
5256
+ function nf(e, t) {
5252
5257
  const n = { ...t ?? {} };
5253
5258
  for (const r of Object.keys(n))
5254
5259
  r.toLowerCase() === "x-boring-workspace-id" && delete n[r];
5255
5260
  return n["x-boring-workspace-id"] = e, n;
5256
5261
  }
5257
- function zl(e) {
5262
+ function Ul(e) {
5258
5263
  const t = new URL(e, "http://workspace.local");
5259
5264
  return t.pathname !== "/api/v1/tree" ? null : t.searchParams.get("path") ?? ".";
5260
5265
  }
5261
- function tf(e, t, n, r) {
5262
- const o = zl(n);
5266
+ function rf(e, t, n, r) {
5267
+ const o = Ul(n);
5263
5268
  o === null || !r || !Array.isArray(r.entries) || Ia(e, t, o, r.entries);
5264
5269
  }
5265
- const Bl = /* @__PURE__ */ new Set(["workspace-fs", "sandbox-exec", "ui-bridge"]);
5266
- function Ul(e) {
5270
+ const ql = /* @__PURE__ */ new Set(["workspace-fs", "sandbox-exec", "ui-bridge"]);
5271
+ function Hl(e) {
5267
5272
  const t = e;
5268
5273
  if (!t || typeof t != "object") return null;
5269
5274
  const n = t.error ?? t, r = n.details ?? t.details ?? n;
@@ -5273,24 +5278,24 @@ function Ul(e) {
5273
5278
  requirement: r.requirement ?? n.requirement
5274
5279
  };
5275
5280
  }
5276
- function nf(e) {
5277
- const t = Ul(e);
5278
- if (typeof (t == null ? void 0 : t.code) != "string" || !Wl.has(t.code) || t.retryable !== !0) return null;
5279
- const n = typeof t.requirement == "string" && Bl.has(t.requirement) ? t.requirement : void 0;
5281
+ function of(e) {
5282
+ const t = Hl(e);
5283
+ if (typeof (t == null ? void 0 : t.code) != "string" || !zl.has(t.code) || t.retryable !== !0) return null;
5284
+ const n = typeof t.requirement == "string" && ql.has(t.requirement) ? t.requirement : void 0;
5280
5285
  return n ? { requirement: n } : {};
5281
5286
  }
5282
- function ql(e) {
5287
+ function Gl(e) {
5283
5288
  const t = new URL(e, "http://workspace.local");
5284
5289
  return t.pathname === "/api/v1/agent/pi-chat/sessions" || t.pathname === "/api/v1/ready-status";
5285
5290
  }
5286
- function rf(e) {
5291
+ function sf(e) {
5287
5292
  return new URL(e, "http://workspace.local").pathname === "/api/v1/ready-status";
5288
5293
  }
5289
- function of(e, t) {
5290
- const n = t ? [...e, "/api/v1/ready-status"] : e.filter((r) => !ql(r));
5294
+ function af(e, t) {
5295
+ const n = t ? [...e, "/api/v1/ready-status"] : e.filter((r) => !Gl(r));
5291
5296
  return Array.from(new Set(n));
5292
5297
  }
5293
- function sf(e) {
5298
+ function cf(e) {
5294
5299
  if (typeof e == "string") return e || null;
5295
5300
  if (!e || typeof e != "object") return null;
5296
5301
  const t = e;
@@ -5312,7 +5317,7 @@ function lr(e) {
5312
5317
  runtimeDependenciesRequirement: typeof ((d = (c = t.capabilities) == null ? void 0 : c.runtimeDependencies) == null ? void 0 : d.requirement) == "string" ? t.capabilities.runtimeDependencies.requirement : void 0
5313
5318
  };
5314
5319
  }
5315
- function af(e) {
5320
+ function lf(e) {
5316
5321
  if (e && typeof e == "object") return lr(e);
5317
5322
  if (typeof e != "string" || !e.trim()) return null;
5318
5323
  const t = e.split(/\n\n+/);
@@ -5329,10 +5334,10 @@ function af(e) {
5329
5334
  }
5330
5335
  return null;
5331
5336
  }
5332
- function cf(e) {
5337
+ function uf(e) {
5333
5338
  return e ? e.chatState || e.workspaceState ? e.chatState === "ready" && e.workspaceState === "ready" : e.state === "ready" : !0;
5334
5339
  }
5335
- async function lf(e) {
5340
+ async function df(e) {
5336
5341
  const t = await e.text().catch(() => "");
5337
5342
  if (!t) return null;
5338
5343
  try {
@@ -5349,7 +5354,7 @@ function dr(e) {
5349
5354
  const t = e.replace(/\/$/, ""), n = "/api/v1/ui";
5350
5355
  return t.endsWith(n) ? t.slice(0, -n.length) || void 0 : t;
5351
5356
  }
5352
- function Hl(e) {
5357
+ function Vl(e) {
5353
5358
  if (typeof e != "object" || e === null) return e;
5354
5359
  const t = e;
5355
5360
  return t.type !== "file-changed" || typeof t.path != "string" ? e : {
@@ -5361,8 +5366,8 @@ function Hl(e) {
5361
5366
  }
5362
5367
  };
5363
5368
  }
5364
- function Gl(e) {
5365
- const t = od(), { blockers: n } = ko(), {
5369
+ function Kl(e) {
5370
+ const t = sd(), { blockers: n } = ko(), {
5366
5371
  surfaceDispatch: r,
5367
5372
  bridgeEndpoint: o,
5368
5373
  ...i
@@ -5380,7 +5385,7 @@ function Gl(e) {
5380
5385
  const f = R(
5381
5386
  (v) => {
5382
5387
  var b;
5383
- const x = jl(v, a.current);
5388
+ const x = Bl(v, a.current);
5384
5389
  r && sn({ kind: "openFile", params: { path: x } }, r), (b = e.onOpenArtifact) == null || b.call(e, x);
5385
5390
  },
5386
5391
  [r, e.onOpenArtifact]
@@ -5411,7 +5416,7 @@ function Gl(e) {
5411
5416
  ), g = R(
5412
5417
  (v) => {
5413
5418
  var x;
5414
- Ks(Hl(v)), (x = e.onData) == null || x.call(e, v);
5419
+ Ks(Vl(v)), (x = e.onData) == null || x.call(e, v);
5415
5420
  },
5416
5421
  [e.onData]
5417
5422
  );
@@ -5428,18 +5433,18 @@ function Gl(e) {
5428
5433
  }
5429
5434
  );
5430
5435
  }
5431
- function Vl({ params: e }) {
5436
+ function Jl({ params: e }) {
5432
5437
  if (!e || typeof e.sessionId != "string" || e.sessionId.length === 0)
5433
5438
  throw new Error("chat panel requires params.sessionId");
5434
- return ye(Gl, { key: e.sessionId, debug: e.debug, ...e, sessionId: e.sessionId });
5439
+ return ye(Kl, { key: e.sessionId, debug: e.debug, ...e, sessionId: e.sessionId });
5435
5440
  }
5436
- const Kl = {
5441
+ const Yl = {
5437
5442
  id: "chat",
5438
5443
  title: "Chat",
5439
- component: Vl,
5444
+ component: Jl,
5440
5445
  placement: "left",
5441
5446
  source: "builtin"
5442
- }, Jl = {
5447
+ }, Xl = {
5443
5448
  blockers: [],
5444
5449
  addBlocker: () => {
5445
5450
  },
@@ -5447,9 +5452,9 @@ const Kl = {
5447
5452
  }
5448
5453
  }, wo = Ee(null);
5449
5454
  function ko() {
5450
- return he(wo) ?? Jl;
5455
+ return he(wo) ?? Xl;
5451
5456
  }
5452
- function Yl({ children: e }) {
5457
+ function Ql({ children: e }) {
5453
5458
  const [t, n] = B([]), r = R((a) => {
5454
5459
  n((l) => [...l.filter((s) => s.id !== a.id), a]);
5455
5460
  }, []), o = R((a) => {
@@ -5460,11 +5465,11 @@ function Yl({ children: e }) {
5460
5465
  );
5461
5466
  return /* @__PURE__ */ u(wo.Provider, { value: i, children: e });
5462
5467
  }
5463
- const xo = "chat-pane", Xl = 280, Ql = 300, So = Ee(null);
5468
+ const xo = "chat-pane", Zl = 280, eu = 300, So = Ee(null);
5464
5469
  function Co(e) {
5465
5470
  return `${e}:chatPaneLayout`;
5466
5471
  }
5467
- function Zl(e) {
5472
+ function tu(e) {
5468
5473
  switch (e) {
5469
5474
  case "left":
5470
5475
  return "left";
@@ -5478,7 +5483,7 @@ function Zl(e) {
5478
5483
  return "within";
5479
5484
  }
5480
5485
  }
5481
- function eu(e, t) {
5486
+ function nu(e, t) {
5482
5487
  var n;
5483
5488
  try {
5484
5489
  const r = (n = globalThis.localStorage) == null ? void 0 : n.getItem(Co(e));
@@ -5491,7 +5496,7 @@ function eu(e, t) {
5491
5496
  return null;
5492
5497
  }
5493
5498
  }
5494
- function tu(e, t) {
5499
+ function ru(e, t) {
5495
5500
  var n;
5496
5501
  try {
5497
5502
  (n = globalThis.localStorage) == null || n.setItem(Co(e), JSON.stringify(t));
@@ -5506,7 +5511,7 @@ function fr(e, t, n) {
5506
5511
  title: _t(t),
5507
5512
  params: { paneId: t.id },
5508
5513
  position: n
5509
- }).group) == null || o.api.setConstraints({ minimumWidth: Xl });
5514
+ }).group) == null || o.api.setConstraints({ minimumWidth: Zl });
5510
5515
  }
5511
5516
  function pr(e, t, n, r) {
5512
5517
  var i;
@@ -5542,7 +5547,7 @@ function pr(e, t, n, r) {
5542
5547
  a && ((i = e.activePanel) == null ? void 0 : i.id) !== n && a.api.setActive();
5543
5548
  }
5544
5549
  }
5545
- function nu({
5550
+ function ou({
5546
5551
  panes: e,
5547
5552
  activePaneId: t,
5548
5553
  renderPane: n,
@@ -5568,7 +5573,7 @@ function nu({
5568
5573
  const { panes: W, activePaneId: S, storageKey: N } = p.current;
5569
5574
  f.current = !0;
5570
5575
  try {
5571
- const j = N ? eu(N, W.map((T) => T.id)) : null;
5576
+ const j = N ? nu(N, W.map((T) => T.id)) : null;
5572
5577
  if (j)
5573
5578
  try {
5574
5579
  L.fromJSON(j);
@@ -5583,7 +5588,7 @@ function nu({
5583
5588
  if (f.current) return;
5584
5589
  const T = j == null ? void 0 : j.id;
5585
5590
  T && T !== p.current.activePaneId && ((Y = ($ = p.current).onActivePaneChange) == null || Y.call($, T));
5586
- }), I = L.onWillShowOverlay((j) => {
5591
+ }), C = L.onWillShowOverlay((j) => {
5587
5592
  if (j.kind === "tab" || j.kind === "header_space") {
5588
5593
  j.preventDefault();
5589
5594
  return;
@@ -5598,16 +5603,16 @@ function nu({
5598
5603
  const T = ($ = j.nativeEvent.dataTransfer) == null ? void 0 : $.getData(fn);
5599
5604
  T && (d.current.set(T, {
5600
5605
  referencePanelId: ((G = (Y = j.group) == null ? void 0 : Y.activePanel) == null ? void 0 : G.id) ?? null,
5601
- direction: Zl(j.position)
5606
+ direction: tu(j.position)
5602
5607
  }), (Q = (ne = p.current).onDropSession) == null || Q.call(ne, T));
5603
5608
  });
5604
5609
  let O = null;
5605
- const C = L.onDidLayoutChange(() => {
5610
+ const P = L.onDidLayoutChange(() => {
5606
5611
  const j = p.current.storageKey;
5607
- j && (O && clearTimeout(O), O = setTimeout(() => tu(j, L.toJSON()), Ql));
5612
+ j && (O && clearTimeout(O), O = setTimeout(() => ru(j, L.toJSON()), eu));
5608
5613
  });
5609
5614
  c.current = () => {
5610
- O && clearTimeout(O), h.dispose(), I.dispose(), M.dispose(), z.dispose(), C.dispose();
5615
+ O && clearTimeout(O), h.dispose(), C.dispose(), M.dispose(), z.dispose(), P.dispose();
5611
5616
  };
5612
5617
  }, []);
5613
5618
  return F(() => () => {
@@ -5633,8 +5638,8 @@ function nu({
5633
5638
  Dr,
5634
5639
  {
5635
5640
  className: "dv-shell dv-chat-stage h-full",
5636
- components: ou,
5637
- defaultTabComponent: iu,
5641
+ components: su,
5642
+ defaultTabComponent: au,
5638
5643
  defaultRenderer: "always",
5639
5644
  singleTabMode: "fullwidth",
5640
5645
  onReady: v
@@ -5648,7 +5653,7 @@ function Po() {
5648
5653
  if (!e) throw new Error("Chat pane components must render inside ChatPaneStageDock");
5649
5654
  return e;
5650
5655
  }
5651
- function ru(e) {
5656
+ function iu(e) {
5652
5657
  var a;
5653
5658
  const t = Po(), n = typeof ((a = e.params) == null ? void 0 : a.paneId) == "string" ? e.params.paneId : e.api.id, r = t.panes.find((l) => l.id === n);
5654
5659
  if (!r) return null;
@@ -5671,16 +5676,16 @@ function ru(e) {
5671
5676
  s != null && s.closest('[data-boring-workspace-part="chat-pane-control"]') || (f = t.onActivePaneChange) == null || f.call(t, n);
5672
5677
  },
5673
5678
  children: [
5674
- /* @__PURE__ */ u(su, { active: !1, dimmed: !1, flash: i }),
5679
+ /* @__PURE__ */ u(cu, { active: !1, dimmed: !1, flash: i }),
5675
5680
  /* @__PURE__ */ u("div", { className: "min-h-0 flex-1 overflow-hidden", children: t.renderPane(r) })
5676
5681
  ]
5677
5682
  }
5678
5683
  );
5679
5684
  }
5680
- const ou = {
5681
- [xo]: ru
5685
+ const su = {
5686
+ [xo]: iu
5682
5687
  };
5683
- function iu(e) {
5688
+ function au(e) {
5684
5689
  const t = Po(), { api: n } = e, [r, o] = B(n.title ?? n.id);
5685
5690
  F(() => {
5686
5691
  var f;
@@ -5734,14 +5739,14 @@ function iu(e) {
5734
5739
  }
5735
5740
  );
5736
5741
  }
5737
- function uf(e) {
5738
- return /* @__PURE__ */ u(nu, { ...e });
5742
+ function ff(e) {
5743
+ return /* @__PURE__ */ u(ou, { ...e });
5739
5744
  }
5740
5745
  function _t(e) {
5741
5746
  return e.title || "Untitled";
5742
5747
  }
5743
5748
  const fn = "application/x-boring-chat-session";
5744
- function su({ dimmed: e, flash: t }) {
5749
+ function cu({ dimmed: e, flash: t }) {
5745
5750
  return /* @__PURE__ */ u(
5746
5751
  "div",
5747
5752
  {
@@ -5757,7 +5762,7 @@ function su({ dimmed: e, flash: t }) {
5757
5762
  );
5758
5763
  }
5759
5764
  const hr = "boring:chat-session-status";
5760
- function au() {
5765
+ function lu() {
5761
5766
  const [e, t] = B(() => /* @__PURE__ */ new Set());
5762
5767
  return F(() => {
5763
5768
  const n = (r) => {
@@ -5783,7 +5788,7 @@ function gr(e) {
5783
5788
  const t = new Date(e);
5784
5789
  return t.setHours(0, 0, 0, 0), t.getTime();
5785
5790
  }
5786
- function cu(e) {
5791
+ function uu(e) {
5787
5792
  const n = gr(/* @__PURE__ */ new Date()), r = n - mr, o = n - 7 * mr, i = [], a = [], l = [], s = [], f = [];
5788
5793
  for (const p of e) {
5789
5794
  const m = Rt(p.updatedAt);
@@ -5801,7 +5806,7 @@ function cu(e) {
5801
5806
  }, d = [];
5802
5807
  return i.length && d.push({ key: "today", label: "Today", items: i.sort(c) }), a.length && d.push({ key: "yesterday", label: "Yesterday", items: a.sort(c) }), l.length && d.push({ key: "week", label: "This week", items: l.sort(c) }), s.length && d.push({ key: "earlier", label: "Earlier", items: s.sort(c) }), f.length && d.push({ key: "undated", label: "Other", items: f }), d;
5803
5808
  }
5804
- function lu(e) {
5809
+ function du(e) {
5805
5810
  const t = Rt(e);
5806
5811
  if (!t) return "";
5807
5812
  const n = Date.now() - t.getTime();
@@ -5817,7 +5822,7 @@ function lu(e) {
5817
5822
  const l = Math.floor(i / 30);
5818
5823
  return l < 12 ? `${l}mo` : `${Math.floor(i / 365)}y`;
5819
5824
  }
5820
- function uu({
5825
+ function fu({
5821
5826
  sessions: e,
5822
5827
  activeId: t,
5823
5828
  openIds: n,
@@ -5842,14 +5847,14 @@ function uu({
5842
5847
  ), L = X(
5843
5848
  () => g.size > 0 || v.size > 0 ? e.filter((T) => !g.has(T.id) && !v.has(T.id)) : e,
5844
5849
  [g, v, e]
5845
- ), W = X(() => cu(L), [L]), [S, N] = B(!1), [h, I] = B(!1), [M, z] = B(
5850
+ ), W = X(() => uu(L), [L]), [S, N] = B(!1), [h, C] = B(!1), [M, z] = B(
5846
5851
  () => ((n == null ? void 0 : n.length) ?? 0) > 0 || ((r == null ? void 0 : r.length) ?? 0) > 0
5847
- ), O = au(), { blockers: C } = ko(), j = X(() => {
5852
+ ), O = lu(), { blockers: P } = ko(), j = X(() => {
5848
5853
  const T = /* @__PURE__ */ new Set();
5849
- for (const $ of C)
5854
+ for (const $ of P)
5850
5855
  $.reason === "waiting_for_user_input" && $.sessionId && T.add($.sessionId);
5851
5856
  return T;
5852
- }, [C]);
5857
+ }, [P]);
5853
5858
  return /* @__PURE__ */ k(
5854
5859
  "div",
5855
5860
  {
@@ -5908,7 +5913,7 @@ function uu({
5908
5913
  label: "Active",
5909
5914
  count: b.length,
5910
5915
  collapsed: h,
5911
- onToggle: () => I((T) => !T)
5916
+ onToggle: () => C((T) => !T)
5912
5917
  }
5913
5918
  ),
5914
5919
  !h && /* @__PURE__ */ u("ul", { role: "list", className: "flex flex-col", children: b.map((T) => /* @__PURE__ */ u(
@@ -6028,7 +6033,7 @@ function en({
6028
6033
  onTogglePin: s,
6029
6034
  onDelete: f
6030
6035
  }) {
6031
- const c = lu(e.updatedAt);
6036
+ const c = du(e.updatedAt);
6032
6037
  return /* @__PURE__ */ k(
6033
6038
  "li",
6034
6039
  {
@@ -6147,8 +6152,8 @@ function en({
6147
6152
  }
6148
6153
  );
6149
6154
  }
6150
- function du({ params: e }) {
6151
- return ye(uu, {
6155
+ function pu({ params: e }) {
6156
+ return ye(fu, {
6152
6157
  sessions: (e == null ? void 0 : e.sessions) ?? [],
6153
6158
  activeId: e == null ? void 0 : e.activeId,
6154
6159
  openIds: e == null ? void 0 : e.openIds,
@@ -6164,10 +6169,10 @@ function du({ params: e }) {
6164
6169
  onClose: e == null ? void 0 : e.onClose
6165
6170
  });
6166
6171
  }
6167
- const fu = {
6172
+ const hu = {
6168
6173
  id: "session-list",
6169
6174
  title: "Sessions",
6170
- component: du,
6175
+ component: pu,
6171
6176
  placement: "left",
6172
6177
  source: "builtin"
6173
6178
  }, vr = "files";
@@ -6182,7 +6187,7 @@ function Eo({
6182
6187
  className: l
6183
6188
  }) {
6184
6189
  var ue, de;
6185
- const s = zt(), f = it(
6190
+ const s = zt(), f = st(
6186
6191
  s.subscribe,
6187
6192
  s.getSnapshot,
6188
6193
  s.getSnapshot
@@ -6199,13 +6204,13 @@ function Eo({
6199
6204
  // Icon-less plugins get an initial-letter glyph instead of a shared
6200
6205
  // generic icon — on an icon-only rail, two identical fallback icons
6201
6206
  // would be indistinguishable.
6202
- icon: fe ? /* @__PURE__ */ u(fe, { className: "h-4 w-4" }) : /* @__PURE__ */ u(pu, { title: le.title }),
6207
+ icon: fe ? /* @__PURE__ */ u(fe, { className: "h-4 w-4" }) : /* @__PURE__ */ u(mu, { title: le.title }),
6203
6208
  panel: le
6204
6209
  });
6205
6210
  }
6206
6211
  return q;
6207
- }, [c]), [p, m] = B(n ?? ""), g = d.some((q) => q.id === p) ? p : ((ue = d[0]) == null ? void 0 : ue.id) ?? "", [v, x] = B(!1), [b, L] = B(""), [W, S] = B(""), N = A(null), [h, I] = B(null), M = R((q) => {
6208
- I(q);
6212
+ }, [c]), [p, m] = B(n ?? ""), g = d.some((q) => q.id === p) ? p : ((ue = d[0]) == null ? void 0 : ue.id) ?? "", [v, x] = B(!1), [b, L] = B(""), [W, S] = B(""), N = A(null), [h, C] = B(null), M = R((q) => {
6213
+ C(q);
6209
6214
  }, []), z = A(void 0);
6210
6215
  F(() => (clearTimeout(z.current), z.current = setTimeout(() => S(b), 180), () => clearTimeout(z.current)), [b]), F(() => {
6211
6216
  var q;
@@ -6225,7 +6230,7 @@ function Eo({
6225
6230
  component: fe.id,
6226
6231
  title: fe.title
6227
6232
  });
6228
- }, [o, f]), C = R((q) => {
6233
+ }, [o, f]), P = R((q) => {
6229
6234
  m(q.id), O(q);
6230
6235
  }, [O]), j = R(() => {
6231
6236
  x((q) => (q && L(""), !q));
@@ -6266,7 +6271,7 @@ function Eo({
6266
6271
  type: "button",
6267
6272
  "aria-label": q.title,
6268
6273
  "aria-pressed": le,
6269
- onClick: () => C(q),
6274
+ onClick: () => P(q),
6270
6275
  onContextMenu: (fe) => {
6271
6276
  i && (fe.preventDefault(), i());
6272
6277
  },
@@ -6336,11 +6341,11 @@ function Eo({
6336
6341
  }
6337
6342
  )
6338
6343
  ] }),
6339
- /* @__PURE__ */ u("div", { className: "min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ u(vu, { panel: $ == null ? void 0 : $.panel, params: ne, onOpenPanel: o }) })
6344
+ /* @__PURE__ */ u("div", { className: "min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ u(bu, { panel: $ == null ? void 0 : $.panel, params: ne, onOpenPanel: o }) })
6340
6345
  ] })
6341
6346
  ] });
6342
6347
  }
6343
- function pu({ title: e }) {
6348
+ function mu({ title: e }) {
6344
6349
  const t = (e.trim()[0] ?? "?").toUpperCase();
6345
6350
  return /* @__PURE__ */ u(
6346
6351
  "span",
@@ -6352,14 +6357,14 @@ function pu({ title: e }) {
6352
6357
  }
6353
6358
  );
6354
6359
  }
6355
- const hu = { dispose() {
6356
- } }, mu = new Proxy(
6360
+ const gu = { dispose() {
6361
+ } }, vu = new Proxy(
6357
6362
  {},
6358
6363
  {
6359
- get: () => () => hu
6364
+ get: () => () => gu
6360
6365
  }
6361
6366
  );
6362
- function gu(e) {
6367
+ function yu(e) {
6363
6368
  return new Proxy(
6364
6369
  {},
6365
6370
  {
@@ -6368,10 +6373,10 @@ function gu(e) {
6368
6373
  }
6369
6374
  );
6370
6375
  }
6371
- function vu({ panel: e, params: t, onOpenPanel: n }) {
6376
+ function bu({ panel: e, params: t, onOpenPanel: n }) {
6372
6377
  const r = X(() => e ? e.lazy ? Lt(
6373
6378
  e.component
6374
- ) : e.component : null, [e]), o = X(() => gu(n), [n]);
6379
+ ) : e.component : null, [e]), o = X(() => yu(n), [n]);
6375
6380
  return !e || !r ? /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center px-4 text-center text-[12px] text-muted-foreground", children: "No workspace category registered." }) : /* @__PURE__ */ u(
6376
6381
  Ut,
6377
6382
  {
@@ -6384,7 +6389,7 @@ function vu({ panel: e, params: t, onOpenPanel: n }) {
6384
6389
  fallback: /* @__PURE__ */ u("div", { className: "flex h-full items-center justify-center px-4 text-center text-[12px] text-muted-foreground", children: "Loading workspace category..." }),
6385
6390
  children: ye(r, {
6386
6391
  params: t,
6387
- api: mu,
6392
+ api: vu,
6388
6393
  containerApi: o,
6389
6394
  className: "h-full"
6390
6395
  })
@@ -6393,20 +6398,20 @@ function vu({ panel: e, params: t, onOpenPanel: n }) {
6393
6398
  }
6394
6399
  );
6395
6400
  }
6396
- function yu({ params: e }) {
6401
+ function wu({ params: e }) {
6397
6402
  return ye(Eo, e ?? {});
6398
6403
  }
6399
- const bu = {
6404
+ const ku = {
6400
6405
  id: "workbench-left",
6401
6406
  title: "Workbench",
6402
- component: yu,
6407
+ component: wu,
6403
6408
  placement: "left",
6404
6409
  source: "builtin"
6405
- }, wu = "boring-ui-v2:surface", Io = 1, ku = {
6410
+ }, xu = "boring-ui-v2:surface", Io = 1, Su = {
6406
6411
  version: "2.0",
6407
6412
  groups: [{ id: "artifacts", position: "center", dynamic: !0 }]
6408
6413
  };
6409
- function xu(e, t) {
6414
+ function Cu(e, t) {
6410
6415
  if (typeof window > "u") return;
6411
6416
  let n;
6412
6417
  try {
@@ -6438,7 +6443,7 @@ function xu(e, t) {
6438
6443
  }
6439
6444
  function To({
6440
6445
  visible: e = !0,
6441
- storageKey: t = wu,
6446
+ storageKey: t = xu,
6442
6447
  allowedPanels: n,
6443
6448
  persistedLayout: r,
6444
6449
  onLayoutChange: o,
@@ -6450,7 +6455,7 @@ function To({
6450
6455
  }) {
6451
6456
  const c = !!(o || r), d = (n == null ? void 0 : n.slice().sort().join("\0")) ?? "*", p = X(() => {
6452
6457
  if (!c)
6453
- return xu(t, n ? new Set(n) : void 0);
6458
+ return Cu(t, n ? new Set(n) : void 0);
6454
6459
  }, [n, c, t]), m = R(
6455
6460
  (g) => {
6456
6461
  if (o) {
@@ -6473,7 +6478,7 @@ function To({
6473
6478
  children: /* @__PURE__ */ u(
6474
6479
  ic,
6475
6480
  {
6476
- layout: ku,
6481
+ layout: Su,
6477
6482
  persistedLayout: r ?? p,
6478
6483
  onLayoutChange: m,
6479
6484
  onReady: i,
@@ -6503,7 +6508,7 @@ function yr(e, t) {
6503
6508
  }
6504
6509
  );
6505
6510
  }
6506
- function Su(e) {
6511
+ function Pu(e) {
6507
6512
  return e.kind !== Xe ? e : {
6508
6513
  ...e,
6509
6514
  target: Nt(e.target)
@@ -6533,7 +6538,7 @@ function Ue() {
6533
6538
  function St(e, t) {
6534
6539
  return { seq: ++No, status: "error", error: { code: e, message: t } };
6535
6540
  }
6536
- function Cu({
6541
+ function Eu({
6537
6542
  rootDir: e = "",
6538
6543
  sidebarDefaultWidth: t = 240,
6539
6544
  sidebarMinWidth: n = 180,
@@ -6558,22 +6563,22 @@ function Cu({
6558
6563
  }), [v, x] = B(() => {
6559
6564
  if (!o) return t;
6560
6565
  try {
6561
- const P = localStorage.getItem(`${o}:sidebarWidth`);
6562
- if (!P) return t;
6563
- const _ = Number(P);
6566
+ const E = localStorage.getItem(`${o}:sidebarWidth`);
6567
+ if (!E) return t;
6568
+ const _ = Number(E);
6564
6569
  return Number.isFinite(_) ? Math.max(n, Math.min(r, _)) : t;
6565
6570
  } catch {
6566
6571
  return t;
6567
6572
  }
6568
- }), b = A(null), L = A(null), W = A(null), [S, N] = B(null), [h, I] = B(null), M = A(i);
6573
+ }), b = A(null), L = A(null), W = A(null), [S, N] = B(null), [h, C] = B(null), M = A(i);
6569
6574
  M.current = i;
6570
6575
  const z = A(a);
6571
6576
  z.current = a;
6572
6577
  const O = A(l);
6573
6578
  O.current = l;
6574
- const C = A(/* @__PURE__ */ new Set()), j = A(/* @__PURE__ */ new Set()), T = A(null), $ = A(
6579
+ const P = A(/* @__PURE__ */ new Set()), j = A(/* @__PURE__ */ new Set()), T = A(null), $ = A(
6575
6580
  /* @__PURE__ */ new Map()
6576
- ), Y = zt(), G = it(
6581
+ ), Y = zt(), G = st(
6577
6582
  Y.subscribe,
6578
6583
  Y.getSnapshot,
6579
6584
  Y.getSnapshot
@@ -6582,19 +6587,19 @@ function Cu({
6582
6587
  const ue = A(ne);
6583
6588
  ue.current = ne;
6584
6589
  const de = X(() => {
6585
- const P = /* @__PURE__ */ new Set();
6590
+ const E = /* @__PURE__ */ new Set();
6586
6591
  for (const _ of G)
6587
- _.placement === "center" && P.add(_.id);
6592
+ _.placement === "center" && E.add(_.id);
6588
6593
  for (const _ of s ?? [])
6589
- P.add(_);
6590
- return [...P];
6591
- }, [s, G]), q = R((P) => {
6594
+ E.add(_);
6595
+ return [...E];
6596
+ }, [s, G]), q = R((E) => {
6592
6597
  const _ = b.current;
6593
6598
  if (!_) {
6594
6599
  console.warn("[SurfaceShell] openFile: surface not ready (dockview not initialized)");
6595
6600
  return;
6596
6601
  }
6597
- const D = Nt(P), H = {
6602
+ const D = Nt(E), H = {
6598
6603
  kind: Xe,
6599
6604
  target: D
6600
6605
  }, se = ue.current.resolve(H);
@@ -6624,14 +6629,14 @@ function Cu({
6624
6629
  return;
6625
6630
  }
6626
6631
  console.warn(`[SurfaceShell] openFile: no surface resolver matched "${D}"`);
6627
- }, []), le = R((P) => {
6632
+ }, []), le = R((E) => {
6628
6633
  var vt;
6629
6634
  const _ = b.current;
6630
6635
  if (!_) {
6631
6636
  console.warn("[SurfaceShell] openSurface: surface not ready (dockview not initialized)");
6632
6637
  return;
6633
6638
  }
6634
- const D = Su(P), H = ue.current.resolve(D);
6639
+ const D = Pu(E), H = ue.current.resolve(D);
6635
6640
  if (!H) {
6636
6641
  console.warn(`[SurfaceShell] openSurface: no resolver matched kind="${D.kind}" target="${D.target}"`);
6637
6642
  return;
@@ -6656,44 +6661,44 @@ function Cu({
6656
6661
  title: H.title ?? D.target,
6657
6662
  params: ge
6658
6663
  });
6659
- }, []), fe = R((P) => {
6664
+ }, []), fe = R((E) => {
6660
6665
  const _ = b.current;
6661
6666
  if (!_) return;
6662
- const D = _.getPanel(P.id);
6667
+ const D = _.getPanel(E.id);
6663
6668
  if (D) {
6664
- P.params && D.api.updateParameters(P.params), D.api.setActive();
6669
+ E.params && D.api.updateParameters(E.params), D.api.setActive();
6665
6670
  return;
6666
6671
  }
6667
6672
  const H = Q.current;
6668
- if (!H.has(P.component)) {
6673
+ if (!H.has(E.component)) {
6669
6674
  const se = H.list().map((we) => we.id).join(", ");
6670
6675
  throw new Error(
6671
- `openPanel: unknown component "${P.component}". Registered panels: [${se}]. Add the component to WorkspaceProvider's "panels" prop, or pick one of the registered ids.`
6676
+ `openPanel: unknown component "${E.component}". Registered panels: [${se}]. Add the component to WorkspaceProvider's "panels" prop, or pick one of the registered ids.`
6672
6677
  );
6673
6678
  }
6674
6679
  _.addPanel({
6675
- id: P.id,
6676
- component: P.component,
6677
- title: P.title ?? P.id,
6678
- params: P.params
6680
+ id: E.id,
6681
+ component: E.component,
6682
+ title: E.title ?? E.id,
6683
+ params: E.params
6679
6684
  });
6680
6685
  }, []), Te = R(() => {
6681
6686
  var D;
6682
- const P = b.current;
6683
- return P ? { openTabs: P.panels.map((H) => ({
6687
+ const E = b.current;
6688
+ return E ? { openTabs: E.panels.map((H) => ({
6684
6689
  id: H.id,
6685
6690
  title: H.title ?? H.id,
6686
6691
  params: H.params ?? void 0
6687
- })), activeTab: ((D = P.activePanel) == null ? void 0 : D.id) ?? null } : { openTabs: [], activeTab: null };
6688
- }, []), be = R((P, _) => {
6689
- const D = $.current.get(P);
6692
+ })), activeTab: ((D = E.activePanel) == null ? void 0 : D.id) ?? null } : { openTabs: [], activeTab: null };
6693
+ }, []), be = R((E, _) => {
6694
+ const D = $.current.get(E);
6690
6695
  if (!D || D.size === 0) return !1;
6691
6696
  for (const H of [...D])
6692
6697
  H(_);
6693
6698
  return !0;
6694
- }, []), je = R((P) => {
6695
- const _ = Nt(P);
6696
- T.current = _, I((D) => ({ path: _, seq: ((D == null ? void 0 : D.seq) ?? 0) + 1 })), g(!1), be("tree:expand", { path: _ }) && (T.current = null);
6699
+ }, []), je = R((E) => {
6700
+ const _ = Nt(E);
6701
+ T.current = _, C((D) => ({ path: _, seq: ((D == null ? void 0 : D.seq) ?? 0) + 1 })), g(!1), be("tree:expand", { path: _ }) && (T.current = null);
6697
6702
  }, [be]), Ve = X(() => ({
6698
6703
  openFile: q,
6699
6704
  openSurface: le,
@@ -6703,11 +6708,11 @@ function Cu({
6703
6708
  getSnapshot: Te
6704
6709
  }), [je, Te, q, fe, le]), Re = R(() => {
6705
6710
  var ke;
6706
- const P = b.current, _ = P ? P.panels.map((ae) => ({
6711
+ const E = b.current, _ = E ? E.panels.map((ae) => ({
6707
6712
  id: ae.id,
6708
6713
  component: String(ae.component ?? ""),
6709
6714
  params: ae.params ?? void 0
6710
- })) : [], D = ((ke = P == null ? void 0 : P.activePanel) == null ? void 0 : ke.id) ?? null, H = j.current, se = _.find((ae) => ae.id === D), we = br(se, H);
6715
+ })) : [], D = ((ke = E == null ? void 0 : E.activePanel) == null ? void 0 : ke.id) ?? null, H = j.current, se = _.find((ae) => ae.id === D), we = br(se, H);
6711
6716
  return {
6712
6717
  hydrationComplete: !0,
6713
6718
  layout: null,
@@ -6721,29 +6726,29 @@ function Cu({
6721
6726
  dirtyFiles: {},
6722
6727
  notifications: []
6723
6728
  };
6724
- }, [t]), at = R(() => {
6725
- const P = Re();
6726
- for (const _ of C.current)
6727
- _(P);
6728
- }, [Re]), ce = A(!1), ve = R((P) => {
6729
+ }, [t]), ct = R(() => {
6730
+ const E = Re();
6731
+ for (const _ of P.current)
6732
+ _(E);
6733
+ }, [Re]), ce = A(!1), ve = R((E) => {
6729
6734
  var D;
6730
- if (b.current = P, N(P), !ce.current) {
6735
+ if (b.current = E, N(E), !ce.current) {
6731
6736
  ce.current = !0;
6732
6737
  for (const H of d ?? [])
6733
- P.getPanel(H.id) || P.addPanel({ id: H.id, component: H.component, title: H.title, params: H.params });
6738
+ E.getPanel(H.id) || E.addPanel({ id: H.id, component: H.component, title: H.title, params: H.params });
6734
6739
  }
6735
6740
  (D = M.current) == null || D.call(M, Ve);
6736
6741
  const _ = () => {
6737
6742
  var H;
6738
- (H = z.current) == null || H.call(z, Te()), at();
6743
+ (H = z.current) == null || H.call(z, Te()), ct();
6739
6744
  };
6740
- P.onDidAddPanel(_), P.onDidRemovePanel(_), P.onDidActivePanelChange(_), _();
6741
- }, [Ve, Te, at]), Pe = R(
6742
- async (P) => {
6745
+ E.onDidAddPanel(_), E.onDidRemovePanel(_), E.onDidActivePanelChange(_), _();
6746
+ }, [Ve, Te, ct]), Pe = R(
6747
+ async (E) => {
6743
6748
  try {
6744
6749
  const _ = b.current;
6745
6750
  if (!_) return St("not-ready", "surface not ready");
6746
- const D = Nt(P), H = {
6751
+ const D = Nt(E), H = {
6747
6752
  kind: Xe,
6748
6753
  target: D
6749
6754
  }, se = ue.current.resolve(H);
@@ -6784,44 +6789,44 @@ function Cu({
6784
6789
  closeWorkbenchLeftPane: async () => (g(!0), Ue()),
6785
6790
  showNotification: async () => Ue(),
6786
6791
  navigateToLine: async () => Ue(),
6787
- expandToFile: async (P) => (je(P), Ue()),
6792
+ expandToFile: async (E) => (je(E), Ue()),
6788
6793
  markDirty: () => {
6789
6794
  },
6790
6795
  markClean: () => {
6791
6796
  },
6792
- subscribe: (P, _) => {
6793
- let D = $.current.get(P);
6794
- return D || (D = /* @__PURE__ */ new Set(), $.current.set(P, D)), D.add(_), P === "tree:expand" && T.current && (_({ path: T.current }), T.current = null), () => {
6797
+ subscribe: (E, _) => {
6798
+ let D = $.current.get(E);
6799
+ return D || (D = /* @__PURE__ */ new Set(), $.current.set(E, D)), D.add(_), E === "tree:expand" && T.current && (_({ path: T.current }), T.current = null), () => {
6795
6800
  D == null || D.delete(_);
6796
6801
  };
6797
6802
  },
6798
- select: (P, _) => {
6799
- const D = (H) => _(P(H));
6800
- return C.current.add(D), D(Re()), () => {
6801
- C.current.delete(D);
6803
+ select: (E, _) => {
6804
+ const D = (H) => _(E(H));
6805
+ return P.current.add(D), D(Re()), () => {
6806
+ P.current.delete(D);
6802
6807
  };
6803
6808
  }
6804
6809
  }), [je, Pe, Re]), me = R(
6805
- (P) => {
6810
+ (E) => {
6806
6811
  if (m) return;
6807
- P.preventDefault(), P.currentTarget.setPointerCapture(P.pointerId), W.current = { startX: P.clientX, startWidth: v };
6812
+ E.preventDefault(), E.currentTarget.setPointerCapture(E.pointerId), W.current = { startX: E.clientX, startWidth: v };
6808
6813
  },
6809
6814
  [m, v]
6810
6815
  ), Be = R(
6811
- (P) => {
6816
+ (E) => {
6812
6817
  const _ = W.current;
6813
6818
  if (!_) return;
6814
- const D = P.clientX - _.startX, H = Math.max(n, Math.min(r, _.startWidth + D));
6819
+ const D = E.clientX - _.startX, H = Math.max(n, Math.min(r, _.startWidth + D));
6815
6820
  x(H);
6816
6821
  },
6817
6822
  [n, r]
6818
- ), Ne = R((P) => {
6819
- W.current && (W.current = null, P.currentTarget.releasePointerCapture(P.pointerId));
6823
+ ), Ne = R((E) => {
6824
+ W.current && (W.current = null, E.currentTarget.releasePointerCapture(E.pointerId));
6820
6825
  }, []), et = R(
6821
- (P) => {
6826
+ (E) => {
6822
6827
  if (m) return;
6823
- const _ = P.shiftKey ? 32 : 16;
6824
- P.key === "ArrowLeft" ? (P.preventDefault(), x((D) => Math.max(n, D - _))) : P.key === "ArrowRight" ? (P.preventDefault(), x((D) => Math.min(r, D + _))) : P.key === "Home" ? (P.preventDefault(), x(n)) : P.key === "End" && (P.preventDefault(), x(r));
6828
+ const _ = E.shiftKey ? 32 : 16;
6829
+ E.key === "ArrowLeft" ? (E.preventDefault(), x((D) => Math.max(n, D - _))) : E.key === "ArrowRight" ? (E.preventDefault(), x((D) => Math.min(r, D + _))) : E.key === "Home" ? (E.preventDefault(), x(n)) : E.key === "End" && (E.preventDefault(), x(r));
6825
6830
  },
6826
6831
  [m, n, r]
6827
6832
  );
@@ -6924,12 +6929,12 @@ function Cu({
6924
6929
  children: /* @__PURE__ */ u(At, { className: "h-4 w-4", strokeWidth: 1.75 })
6925
6930
  }
6926
6931
  ) }) }),
6927
- l && /* @__PURE__ */ u(Pu, { onClose: l })
6932
+ l && /* @__PURE__ */ u(Iu, { onClose: l })
6928
6933
  ]
6929
6934
  }
6930
6935
  ),
6931
6936
  /* @__PURE__ */ u(
6932
- Eu,
6937
+ Tu,
6933
6938
  {
6934
6939
  api: S,
6935
6940
  collapsed: m,
@@ -6941,7 +6946,7 @@ function Cu({
6941
6946
  }
6942
6947
  );
6943
6948
  }
6944
- function Pu({ onClose: e }) {
6949
+ function Iu({ onClose: e }) {
6945
6950
  return /* @__PURE__ */ u(
6946
6951
  Ce,
6947
6952
  {
@@ -6956,7 +6961,7 @@ function Pu({ onClose: e }) {
6956
6961
  }
6957
6962
  );
6958
6963
  }
6959
- function Eu({
6964
+ function Tu({
6960
6965
  api: e,
6961
6966
  collapsed: t,
6962
6967
  onExpandFiles: n
@@ -7010,21 +7015,21 @@ function Eu({
7010
7015
  ] })
7011
7016
  ] }) : null;
7012
7017
  }
7013
- function Iu({ params: e }) {
7014
- return ye(Cu, e ?? {});
7018
+ function Ru({ params: e }) {
7019
+ return ye(Eu, e ?? {});
7015
7020
  }
7016
- const Tu = {
7021
+ const Nu = {
7017
7022
  id: "artifact-surface",
7018
7023
  title: "Surface",
7019
- component: Iu,
7024
+ component: Ru,
7020
7025
  placement: "right",
7021
7026
  source: "builtin"
7022
- }, Ru = [
7023
- Kl,
7024
- fu,
7025
- bu,
7026
- Tu
7027
- ], $e = "boring-ui:agent-plugins-reloaded", Nu = "PLUGIN_LOAD_FAILED";
7027
+ }, Au = [
7028
+ Yl,
7029
+ hu,
7030
+ ku,
7031
+ Nu
7032
+ ], $e = "boring-ui:agent-plugins-reloaded", Du = "PLUGIN_LOAD_FAILED";
7028
7033
  globalThis.__BORING_RUNTIME_SINGLETONS__ = {
7029
7034
  ...globalThis.__BORING_RUNTIME_SINGLETONS__,
7030
7035
  react: Go,
@@ -7041,10 +7046,10 @@ function Ao(e, t) {
7041
7046
  const n = e.includes("?") ? "&" : "?";
7042
7047
  return `${e}${n}workspaceId=${encodeURIComponent(t)}`;
7043
7048
  }
7044
- function Au(e) {
7049
+ function _u(e) {
7045
7050
  return /^[A-Za-z][A-Za-z0-9+.-]*:/.test(e) || e.startsWith("//");
7046
7051
  }
7047
- function Du(e, t) {
7052
+ function Fu(e, t) {
7048
7053
  if (typeof fetch != "function") return;
7049
7054
  const n = Ao(
7050
7055
  Cn(e.apiBaseUrl ?? "", `/api/v1/agent-plugins/${encodeURIComponent(t.pluginId)}/front-error`),
@@ -7058,32 +7063,32 @@ function Du(e, t) {
7058
7063
  }).catch(() => {
7059
7064
  });
7060
7065
  }
7061
- function _u(e, t) {
7062
- return !t || Au(e) ? e : Cn(t, e.startsWith("/") ? e : `/${e}`);
7066
+ function Lu(e, t) {
7067
+ return !t || _u(e) ? e : Cn(t, e.startsWith("/") ? e : `/${e}`);
7063
7068
  }
7064
7069
  function wr(e, t) {
7065
7070
  var n;
7066
7071
  if ((n = e.frontTarget) != null && n.entryUrl)
7067
- return _u(e.frontTarget.entryUrl, t);
7072
+ return Lu(e.frontTarget.entryUrl, t);
7068
7073
  }
7069
- function Fu(e, t, n, r) {
7074
+ function $u(e, t, n, r) {
7070
7075
  return { panels: e, commands: t, catalogs: n, surfaceResolvers: r };
7071
7076
  }
7072
- function Lu(e, t) {
7077
+ function Ou(e, t) {
7073
7078
  if (!e) return;
7074
7079
  const n = t.toLowerCase();
7075
7080
  for (const [r, o] of Object.entries(e))
7076
7081
  if (r.toLowerCase() === n) return o;
7077
7082
  }
7078
- function $u(e) {
7079
- return /^Bearer\s+\S+/i.test(Lu(e, "authorization") ?? "");
7083
+ function Mu(e) {
7084
+ return /^Bearer\s+\S+/i.test(Ou(e, "authorization") ?? "");
7080
7085
  }
7081
- function Ou(e, t, n) {
7086
+ function Wu(e, t, n) {
7082
7087
  const r = `${e}${e.includes("?") ? "&" : "?"}v=${t}`;
7083
7088
  return n === void 0 ? r : `${r}&t=${encodeURIComponent(String(n))}`;
7084
7089
  }
7085
7090
  const kr = 3e4;
7086
- async function Mu(e, t) {
7091
+ async function ju(e, t) {
7087
7092
  let n = !1;
7088
7093
  const r = new Promise((i, a) => {
7089
7094
  setTimeout(() => {
@@ -7092,13 +7097,13 @@ async function Mu(e, t) {
7092
7097
  }), o = await Promise.race([
7093
7098
  import(
7094
7099
  /* @vite-ignore */
7095
- Ou(e, t, Date.now())
7100
+ Wu(e, t, Date.now())
7096
7101
  ),
7097
7102
  r
7098
7103
  ]);
7099
7104
  return n = !0, o;
7100
7105
  }
7101
- async function Wu(e, t, n, r = Mu) {
7106
+ async function zu(e, t, n, r = ju) {
7102
7107
  const o = await r(t, n);
7103
7108
  if (typeof o.default != "function" || typeof o.default.pluginId != "string")
7104
7109
  throw new Error(`plugin ${e} front module must default-export definePlugin({ id, ... })`);
@@ -7107,35 +7112,35 @@ async function Wu(e, t, n, r = Mu) {
7107
7112
  const i = _r({ pluginId: e });
7108
7113
  return await o.default(i), i.flush();
7109
7114
  }
7110
- const ju = 7, zu = 750, Bu = 1e4;
7111
- async function Uu({
7115
+ const Bu = 7, Uu = 750, qu = 1e4;
7116
+ async function Hu({
7112
7117
  pluginId: e,
7113
7118
  frontEntryUrl: t,
7114
7119
  revision: n,
7115
7120
  importFront: r,
7116
7121
  isStale: o,
7117
- attempts: i = ju,
7118
- delayMs: a = zu
7122
+ attempts: i = Bu,
7123
+ delayMs: a = Uu
7119
7124
  }) {
7120
7125
  const l = Math.max(1, i);
7121
7126
  let s;
7122
7127
  for (let f = 0; f < l; f += 1) {
7123
7128
  if (o()) throw s ?? new Error(`plugin ${e} front import superseded`);
7124
7129
  try {
7125
- return await Wu(e, t, n, r);
7130
+ return await zu(e, t, n, r);
7126
7131
  } catch (c) {
7127
7132
  if (s = c, f === l - 1 || o()) break;
7128
7133
  console.warn(
7129
7134
  `[boring-ui] plugin ${e} front import failed (attempt ${f + 1}/${l}); retrying`,
7130
7135
  c
7131
7136
  );
7132
- const d = Math.min(a * 2 ** f, Bu);
7137
+ const d = Math.min(a * 2 ** f, qu);
7133
7138
  await new Promise((p) => setTimeout(p, d));
7134
7139
  }
7135
7140
  }
7136
7141
  throw s;
7137
7142
  }
7138
- function qu(e, t, n) {
7143
+ function Gu(e, t, n) {
7139
7144
  const r = [], o = new Map(n.panels.map((s) => [s.id, s]));
7140
7145
  for (const s of n.panels)
7141
7146
  r.push({
@@ -7194,7 +7199,7 @@ function qu(e, t, n) {
7194
7199
  }));
7195
7200
  return { panels: r, commands: i, catalogs: a, surfaceResolvers: l };
7196
7201
  }
7197
- function Hu(e, t) {
7202
+ function Vu(e, t) {
7198
7203
  const n = [
7199
7204
  t.providers.length > 0 ? `${t.providers.length} provider(s)` : null,
7200
7205
  t.bindings.length > 0 ? `${t.bindings.length} binding(s)` : null
@@ -7203,16 +7208,16 @@ function Hu(e, t) {
7203
7208
  `[boring-ui] hot-loaded plugin "${e}" registered ${n}. Dynamic provider/binding mounting is not implemented yet, so this plugin's hot-loaded UI contributions were skipped to avoid rendering panels without their required provider tree.`
7204
7209
  );
7205
7210
  }
7206
- function Gu(e) {
7211
+ function Ku(e) {
7207
7212
  return e ?? "system/builtin";
7208
7213
  }
7209
7214
  function Ct(e, t, n, r) {
7210
7215
  const o = `${e}.${t === "panel" ? "panel" : t}`;
7211
7216
  return new Error(
7212
- `PLUGIN_OUTPUT_ID_COLLISION: plugin "${e}" tried to register ${t} "${n}" already owned by "${Gu(r)}". Use a namespaced id like "${o}".`
7217
+ `PLUGIN_OUTPUT_ID_COLLISION: plugin "${e}" tried to register ${t} "${n}" already owned by "${Ku(r)}". Use a namespaced id like "${o}".`
7213
7218
  );
7214
7219
  }
7215
- function Vu(e, t, n) {
7220
+ function Ju(e, t, n) {
7216
7221
  for (const r of t.panels) {
7217
7222
  const o = n.panels.get(r.id);
7218
7223
  if (o && o.pluginId !== e)
@@ -7234,50 +7239,50 @@ function Vu(e, t, n) {
7234
7239
  throw Ct(e, "surface-resolver", r.id, o.pluginId);
7235
7240
  }
7236
7241
  }
7237
- function Ku(e, t, n, r) {
7238
- (n.providers.length > 0 || n.bindings.length > 0) && Hu(e, n);
7239
- const o = qu(e, t, n);
7240
- Vu(e, o, r), r.panels.replaceByPluginId(e, o.panels), r.commands.replaceByPluginId(e, o.commands), r.catalogs.replaceByPluginId(e, o.catalogs), r.surfaceResolvers.replaceByPluginId(e, o.surfaceResolvers);
7242
+ function Yu(e, t, n, r) {
7243
+ (n.providers.length > 0 || n.bindings.length > 0) && Vu(e, n);
7244
+ const o = Gu(e, t, n);
7245
+ Ju(e, o, r), r.panels.replaceByPluginId(e, o.panels), r.commands.replaceByPluginId(e, o.commands), r.catalogs.replaceByPluginId(e, o.catalogs), r.surfaceResolvers.replaceByPluginId(e, o.surfaceResolvers);
7241
7246
  }
7242
7247
  function Pt(e, t) {
7243
7248
  t.panels.replaceByPluginId(e, []), t.commands.replaceByPluginId(e, []), t.catalogs.replaceByPluginId(e, []), t.surfaceResolvers.replaceByPluginId(e, []);
7244
7249
  }
7245
- function Ju(e) {
7250
+ function Xu(e) {
7246
7251
  if (!e || typeof e != "object") return !0;
7247
7252
  const t = e.type;
7248
7253
  return typeof t != "string" || !t.startsWith("boring.plugin.");
7249
7254
  }
7250
- function Yu(e) {
7255
+ function Qu(e) {
7251
7256
  const t = zt(), n = gn(), r = Bt(), o = $r(), i = A(/* @__PURE__ */ new Map()), a = A(/* @__PURE__ */ new Map()), l = A(/* @__PURE__ */ new Set()), s = A(/* @__PURE__ */ new Set()), [f, c] = B(0), d = A(!1);
7252
7257
  F(() => {
7253
7258
  if (e.enabled === !1 || typeof EventSource > "u") return;
7254
7259
  const p = (m) => {
7255
7260
  const g = m.detail;
7256
- Ju(g) && (d.current = !0, c((v) => v + 1));
7261
+ Xu(g) && (d.current = !0, c((v) => v + 1));
7257
7262
  };
7258
7263
  return window.addEventListener($e, p), () => window.removeEventListener($e, p);
7259
7264
  }, [e.enabled]), F(() => {
7260
7265
  if (e.enabled === !1 || typeof EventSource > "u") return;
7261
7266
  const p = d.current;
7262
- if (d.current = !1, $u(e.authHeaders)) {
7267
+ if (d.current = !1, Mu(e.authHeaders)) {
7263
7268
  console.warn(
7264
7269
  "[boring-ui] front plugin hot reload disabled: native EventSource cannot send Authorization bearer headers, and this server does not advertise a token-query fallback for /api/v1/agent-plugins/events."
7265
7270
  );
7266
7271
  return;
7267
7272
  }
7268
7273
  let m = !1;
7269
- const g = Fu(t, n, r, o), v = Ao(Cn(e.apiBaseUrl ?? "", "/api/v1/agent-plugins/events"), e.workspaceId), x = new EventSource(v, { withCredentials: !0 }), b = (N) => {
7274
+ const g = $u(t, n, r, o), v = Ao(Cn(e.apiBaseUrl ?? "", "/api/v1/agent-plugins/events"), e.workspaceId), x = new EventSource(v, { withCredentials: !0 }), b = (N) => {
7270
7275
  (async () => {
7271
7276
  var M, z;
7272
- let h, I = !1;
7277
+ let h, C = !1;
7273
7278
  try {
7274
7279
  if (h = JSON.parse(N.data), m || h.workspaceId && e.workspaceId && h.workspaceId !== e.workspaceId) return;
7275
7280
  h.replay && l.current.add(h.id);
7276
- const O = p && h.replay === !0, C = i.current.get(h.id) ?? 0, j = a.current.get(h.id) ?? 0;
7277
- if (!O && h.revision <= Math.max(C, j)) return;
7281
+ const O = p && h.replay === !0, P = i.current.get(h.id) ?? 0, j = a.current.get(h.id) ?? 0;
7282
+ if (!O && h.revision <= Math.max(P, j)) return;
7278
7283
  a.current.set(h.id, h.revision);
7279
7284
  const T = wr(h, e.apiBaseUrl);
7280
- T && (I = !0, window.dispatchEvent(new CustomEvent($e, {
7285
+ T && (C = !0, window.dispatchEvent(new CustomEvent($e, {
7281
7286
  detail: {
7282
7287
  type: "boring.plugin.front-pending",
7283
7288
  id: h.id,
@@ -7288,7 +7293,7 @@ function Yu(e) {
7288
7293
  })));
7289
7294
  let $ = null;
7290
7295
  try {
7291
- $ = T ? await Uu({
7296
+ $ = T ? await Hu({
7292
7297
  pluginId: h.id,
7293
7298
  frontEntryUrl: T,
7294
7299
  revision: h.revision,
@@ -7309,7 +7314,7 @@ function Yu(e) {
7309
7314
  return;
7310
7315
  }
7311
7316
  try {
7312
- Ku(h.id, h.revision, $, g);
7317
+ Yu(h.id, h.revision, $, g);
7313
7318
  } catch (Y) {
7314
7319
  throw {
7315
7320
  stage: "register",
@@ -7319,7 +7324,7 @@ function Yu(e) {
7319
7324
  s.current.add(h.id), i.current.set(h.id, h.revision), window.dispatchEvent(new CustomEvent($e, { detail: h }));
7320
7325
  } catch (O) {
7321
7326
  h && a.current.get(h.id) === h.revision && a.current.delete(h.id);
7322
- const C = typeof O == "object" && O && "stage" in O && O.stage === "register" ? "register" : "import", j = typeof O == "object" && O && "error" in O ? O.error : O;
7327
+ const P = typeof O == "object" && O && "stage" in O && O.stage === "register" ? "register" : "import", j = typeof O == "object" && O && "error" in O ? O.error : O;
7323
7328
  if (m) return;
7324
7329
  const T = (h == null ? void 0 : h.id) ?? "<malformed>", $ = j instanceof Error ? j.message : String(j);
7325
7330
  if (console.error(`[boring-ui] failed to load plugin ${T}; keeping previous version`, j), h) {
@@ -7329,21 +7334,21 @@ function Yu(e) {
7329
7334
  message: $,
7330
7335
  ...Y ? { url: Y } : {}
7331
7336
  };
7332
- e.reportFrontError ? e.reportFrontError(G) : Du(e, G), window.dispatchEvent(new CustomEvent($e, {
7337
+ e.reportFrontError ? e.reportFrontError(G) : Fu(e, G), window.dispatchEvent(new CustomEvent($e, {
7333
7338
  detail: {
7334
7339
  type: "boring.plugin.front-error",
7335
7340
  id: h.id,
7336
7341
  revision: h.revision,
7337
7342
  workspaceId: h.workspaceId ?? e.workspaceId,
7338
7343
  message: $,
7339
- code: Nu,
7340
- stage: C,
7344
+ code: Du,
7345
+ stage: P,
7341
7346
  replay: h.replay
7342
7347
  }
7343
7348
  }));
7344
7349
  }
7345
7350
  } finally {
7346
- I && h && window.dispatchEvent(new CustomEvent($e, {
7351
+ C && h && window.dispatchEvent(new CustomEvent($e, {
7347
7352
  detail: {
7348
7353
  type: "boring.plugin.front-settled",
7349
7354
  id: h.id,
@@ -7359,8 +7364,8 @@ function Yu(e) {
7359
7364
  try {
7360
7365
  const h = JSON.parse(N.data);
7361
7366
  if (h.workspaceId && e.workspaceId && h.workspaceId !== e.workspaceId) return;
7362
- const I = i.current.get(h.id) ?? 0, M = a.current.get(h.id) ?? 0;
7363
- if (h.revision <= Math.max(I, M)) return;
7367
+ const C = i.current.get(h.id) ?? 0, M = a.current.get(h.id) ?? 0;
7368
+ if (h.revision <= Math.max(C, M)) return;
7364
7369
  a.current.set(h.id, h.revision), s.current.has(h.id) && (Pt(h.id, g), s.current.delete(h.id)), i.current.set(h.id, h.revision), window.dispatchEvent(new CustomEvent($e, { detail: h }));
7365
7370
  } catch (h) {
7366
7371
  console.error("[boring-ui] failed to process plugin unload event", h);
@@ -7387,9 +7392,9 @@ function Yu(e) {
7387
7392
  try {
7388
7393
  const h = JSON.parse(N.data);
7389
7394
  if (h.workspaceId && e.workspaceId && h.workspaceId !== e.workspaceId) return;
7390
- const I = l.current;
7395
+ const C = l.current;
7391
7396
  for (const [M, z] of i.current.entries())
7392
- I.has(M) || (s.current.has(M) && (Pt(M, g), s.current.delete(M)), i.current.delete(M), a.current.delete(M), window.dispatchEvent(new CustomEvent($e, {
7397
+ C.has(M) || (s.current.has(M) && (Pt(M, g), s.current.delete(M)), i.current.delete(M), a.current.delete(M), window.dispatchEvent(new CustomEvent($e, {
7393
7398
  detail: {
7394
7399
  type: "boring.plugin.unload",
7395
7400
  id: M,
@@ -7398,7 +7403,7 @@ function Yu(e) {
7398
7403
  replay: !0
7399
7404
  }
7400
7405
  })));
7401
- I.clear(), window.dispatchEvent(new CustomEvent($e, { detail: h }));
7406
+ C.clear(), window.dispatchEvent(new CustomEvent($e, { detail: h }));
7402
7407
  } catch (h) {
7403
7408
  console.error("[boring-ui] failed to process plugin replay-complete event", h);
7404
7409
  }
@@ -7412,22 +7417,22 @@ function Yu(e) {
7412
7417
  };
7413
7418
  }, [e.apiBaseUrl, e.workspaceId, e.enabled, e.authHeaders, e.importFront, e.frontImportRetry, t, n, r, o, f]);
7414
7419
  }
7415
- const Xu = "Boring UI";
7420
+ const Zu = "Boring UI";
7416
7421
  function rn(e) {
7417
7422
  const t = e == null ? void 0 : e.trim();
7418
7423
  return !t || /^(?:[a-z][a-z\d+.-]*:\/\/|[a-z]:[\\/]|\\\\|\/|\.\.?[\\/])/i.test(t) || /^(?:::1|localhost(?::\d+)?|\d{1,3}(?:\.\d{1,3}){3}(?::\d+)?|\[[a-f\d:]+\](?::\d+)?|[a-z\d-]+(?:\.[a-z\d-]+)+(?::\d+)?)$/i.test(t) || /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t) ? null : t;
7419
7424
  }
7420
- function Qu(e) {
7421
- const t = rn(e.appTitle) ?? Xu, n = rn(e.workspaceLabel);
7425
+ function ed(e) {
7426
+ const t = rn(e.appTitle) ?? Zu, n = rn(e.workspaceLabel);
7422
7427
  if (n) return `${n} · ${t}`;
7423
7428
  const r = rn(e.workspaceId);
7424
7429
  return r ? `${r} · ${t}` : t;
7425
7430
  }
7426
- function Zu(e) {
7431
+ function td(e) {
7427
7432
  return null;
7428
7433
  }
7429
- function ed(e) {
7430
- return Yu({
7434
+ function nd(e) {
7435
+ return Qu({
7431
7436
  apiBaseUrl: e.apiBaseUrl,
7432
7437
  workspaceId: e.workspaceId,
7433
7438
  authHeaders: e.authHeaders,
@@ -7437,13 +7442,13 @@ function ed(e) {
7437
7442
  function Do() {
7438
7443
  return typeof window > "u" || typeof window.matchMedia != "function" ? "light" : window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
7439
7444
  }
7440
- const xr = "workspace-provider", td = "workspace-provider", Pn = Ee(null);
7441
- function df() {
7445
+ const xr = "workspace-provider", rd = "workspace-provider", Pn = Ee(null);
7446
+ function pf() {
7442
7447
  const e = he(Pn);
7443
7448
  if (!e) throw new Error("useTheme must be used within a WorkspaceProvider");
7444
7449
  return { theme: kn(), setTheme: e.setTheme, toggleTheme: e.toggleTheme };
7445
7450
  }
7446
- function ff({ children: e, defaultTheme: t, onThemeChange: n }) {
7451
+ function hf({ children: e, defaultTheme: t, onThemeChange: n }) {
7447
7452
  const r = A(null);
7448
7453
  if (!r.current) {
7449
7454
  const f = po({ persistenceEnabled: !1 });
@@ -7467,27 +7472,27 @@ function ff({ children: e, defaultTheme: t, onThemeChange: n }) {
7467
7472
  return /* @__PURE__ */ u(Pn.Provider, { value: s, children: e });
7468
7473
  }
7469
7474
  const _o = Ee(null);
7470
- function pf() {
7475
+ function mf() {
7471
7476
  const e = he(_o);
7472
7477
  if (!e) throw new Error("useWorkspaceBridge must be used within a WorkspaceProvider");
7473
7478
  return e;
7474
7479
  }
7475
7480
  const En = Ee(null);
7476
- function nd() {
7481
+ function od() {
7477
7482
  const e = he(En);
7478
7483
  if (!e) throw new Error("useWorkspaceContext must be used within a WorkspaceProvider");
7479
7484
  return e;
7480
7485
  }
7481
- function rd() {
7486
+ function id() {
7482
7487
  return he(En);
7483
7488
  }
7484
- function od() {
7485
- const { chatPanel: e } = nd();
7489
+ function sd() {
7490
+ const { chatPanel: e } = od();
7486
7491
  if (!e)
7487
7492
  throw new Error("WorkspaceProvider requires a chatPanel prop before rendering ChatPanelHost");
7488
7493
  return e;
7489
7494
  }
7490
- function id({
7495
+ function ad({
7491
7496
  store: e
7492
7497
  }) {
7493
7498
  const t = X(
@@ -7521,20 +7526,20 @@ function id({
7521
7526
  );
7522
7527
  return oo({ shortcuts: t }), null;
7523
7528
  }
7524
- function sd({ commands: e }) {
7529
+ function cd({ commands: e }) {
7525
7530
  const t = gn();
7526
7531
  return F(() => {
7527
7532
  if (!(e != null && e.length)) return;
7528
7533
  const n = e.map((r) => r.id);
7529
7534
  for (const r of n) t.unregisterCommand(r);
7530
7535
  for (const r of e)
7531
- t.registerCommand({ ...r, pluginId: r.pluginId ?? td });
7536
+ t.registerCommand({ ...r, pluginId: r.pluginId ?? rd });
7532
7537
  return () => {
7533
7538
  for (const r of n) t.unregisterCommand(r);
7534
7539
  };
7535
7540
  }, [t, e]), null;
7536
7541
  }
7537
- function ad({
7542
+ function ld({
7538
7543
  catalogs: e
7539
7544
  }) {
7540
7545
  const t = Bt();
@@ -7548,7 +7553,7 @@ function ad({
7548
7553
  }
7549
7554
  }, [t, e]), null;
7550
7555
  }
7551
- function cd({ plugins: e }) {
7556
+ function ud({ plugins: e }) {
7552
7557
  return /* @__PURE__ */ u(Me, { children: e.flatMap(
7553
7558
  (t) => t.registrations.bindings.map((n) => {
7554
7559
  const r = n.component;
@@ -7556,7 +7561,7 @@ function cd({ plugins: e }) {
7556
7561
  })
7557
7562
  ) });
7558
7563
  }
7559
- function ld({
7564
+ function dd({
7560
7565
  plugins: e,
7561
7566
  apiBaseUrl: t,
7562
7567
  authHeaders: n,
@@ -7581,7 +7586,7 @@ function ld({
7581
7586
  );
7582
7587
  }, i);
7583
7588
  }
7584
- function ud({ onOpenFile: e }) {
7589
+ function fd({ onOpenFile: e }) {
7585
7590
  return F(() => {
7586
7591
  if (e)
7587
7592
  return J.on(Ie.uiCommand, ({ command: t }) => {
@@ -7591,10 +7596,10 @@ function ud({ onOpenFile: e }) {
7591
7596
  });
7592
7597
  }, [e]), null;
7593
7598
  }
7594
- function dd(e, t) {
7599
+ function pd(e, t) {
7595
7600
  return !e || (t == null ? void 0 : t["x-boring-workspace-id"]) != null || (t == null ? void 0 : t["X-Boring-Workspace-Id"]) != null ? t : { "x-boring-workspace-id": e, ...t };
7596
7601
  }
7597
- function hf({
7602
+ function gf({
7598
7603
  children: e,
7599
7604
  chatPanel: t,
7600
7605
  plugins: n,
@@ -7618,7 +7623,7 @@ function hf({
7618
7623
  onAuthError: S,
7619
7624
  onOpenFile: N,
7620
7625
  debug: h = !1,
7621
- frontPluginHotReload: I = !1,
7626
+ frontPluginHotReload: C = !1,
7622
7627
  fullPageBasePath: M
7623
7628
  }) {
7624
7629
  const z = A(null);
@@ -7632,15 +7637,15 @@ function hf({
7632
7637
  const ve = d ?? Do();
7633
7638
  ve !== "light" && !b ? ce.getState().setTheme(ve) : ve !== "light" && (typeof localStorage < "u" && localStorage.getItem("boring-ui-v2:preferences") !== null || ce.getState().setTheme(ve)), z.current = ce;
7634
7639
  }
7635
- const O = z.current, C = A(null), j = A(f);
7640
+ const O = z.current, P = A(null), j = A(f);
7636
7641
  j.current = f;
7637
7642
  const T = A(S);
7638
7643
  T.current = S, F(() => () => {
7639
7644
  var ce;
7640
- (ce = C.current) == null || ce.disconnect(), C.current = null, O.cleanup();
7645
+ (ce = P.current) == null || ce.disconnect(), P.current = null, O.cleanup();
7641
7646
  }, [O]), F(() => {
7642
7647
  var ze, me;
7643
- if (C.current && (C.current.disconnect(), C.current = null), !W) return;
7648
+ if (P.current && (P.current.disconnect(), P.current = null), !W) return;
7644
7649
  const ce = As(O), ve = (me = (ze = j.current) == null ? void 0 : ze.Authorization) == null ? void 0 : me.replace(/^Bearer\s+/i, ""), Pe = Ls({
7645
7650
  endpoint: W,
7646
7651
  bridge: ce,
@@ -7652,23 +7657,23 @@ function hf({
7652
7657
  },
7653
7658
  onConnectionChange: Ve
7654
7659
  });
7655
- return Pe.connect(), C.current = Pe, () => {
7656
- Pe.disconnect(), C.current = null;
7660
+ return Pe.connect(), P.current = Pe, () => {
7661
+ Pe.disconnect(), P.current = null;
7657
7662
  };
7658
7663
  }, [W, O]);
7659
7664
  const { panelRegistry: $, commandRegistry: Y, catalogRegistry: G, surfaceResolverRegistry: ne, pluginMetas: Q, pluginsWithBindings: ue } = X(() => {
7660
- const ce = new Ba(l), ve = new ul(), Pe = new Fr(), ze = new Lr();
7661
- for (const _ of Ru) {
7665
+ const ce = new Ba(l), ve = new fl(), Pe = new Fr(), ze = new Lr();
7666
+ for (const _ of Au) {
7662
7667
  const { id: D, ...H } = _;
7663
7668
  ce.register(D, H);
7664
7669
  }
7665
7670
  const Be = new Set(r ?? []).has(er.pluginId) ? [] : [er], et = ps({
7666
- chatPanel: t ?? Zu,
7671
+ chatPanel: t ?? td,
7667
7672
  plugins: n ?? [],
7668
7673
  defaults: Be,
7669
7674
  excludeDefaults: r,
7670
7675
  registries: { panels: ce, commands: ve, catalogs: Pe, surfaceResolvers: ze }
7671
- }), P = [
7676
+ }), E = [
7672
7677
  { id: "workspace:chat-layout", label: "Layout" },
7673
7678
  { id: "agent:chat-layout", label: "Layout" },
7674
7679
  ...et.plugins.map((_) => ({
@@ -7686,7 +7691,7 @@ function hf({
7686
7691
  commandRegistry: ve,
7687
7692
  catalogRegistry: Pe,
7688
7693
  surfaceResolverRegistry: ze,
7689
- pluginMetas: P,
7694
+ pluginMetas: E,
7690
7695
  pluginsWithBindings: et.plugins
7691
7696
  };
7692
7697
  }, [l, t, n, r, o]), de = A(p);
@@ -7708,20 +7713,20 @@ function hf({
7708
7713
  () => ({ setTheme: q, toggleTheme: le }),
7709
7714
  [q, le]
7710
7715
  ), be = X(
7711
- () => dd(m, f),
7716
+ () => pd(m, f),
7712
7717
  [f, m]
7713
7718
  );
7714
7719
  F(() => {
7715
- L && (document.title = Qu({ appTitle: v, workspaceLabel: g, workspaceId: m }));
7720
+ L && (document.title = ed({ appTitle: v, workspaceLabel: g, workspaceId: m }));
7716
7721
  }, [v, L, m, g]);
7717
7722
  const [je, Ve] = B(!1), Re = X(
7718
7723
  () => ({ connected: je }),
7719
7724
  [je]
7720
- ), at = X(
7725
+ ), ct = X(
7721
7726
  () => ({ chatPanel: t ?? null, registeredPlugins: Q, debug: h }),
7722
7727
  [t, Q, h]
7723
7728
  );
7724
- return /* @__PURE__ */ u(En.Provider, { value: at, children: /* @__PURE__ */ u(Pn.Provider, { value: Te, children: /* @__PURE__ */ u(_o.Provider, { value: Re, children: /* @__PURE__ */ u(dl, { basePath: M, children: /* @__PURE__ */ u(Yl, { children: /* @__PURE__ */ u(bs, { children: /* @__PURE__ */ u(
7729
+ return /* @__PURE__ */ u(En.Provider, { value: ct, children: /* @__PURE__ */ u(Pn.Provider, { value: Te, children: /* @__PURE__ */ u(_o.Provider, { value: Re, children: /* @__PURE__ */ u(pl, { basePath: M, children: /* @__PURE__ */ u(Ql, { children: /* @__PURE__ */ u(bs, { children: /* @__PURE__ */ u(
7725
7730
  ms,
7726
7731
  {
7727
7732
  panelRegistry: $,
@@ -7729,7 +7734,7 @@ function hf({
7729
7734
  catalogRegistry: G,
7730
7735
  surfaceResolverRegistry: ne,
7731
7736
  children: /* @__PURE__ */ u(Ma, { apiBaseUrl: s, workspaceId: m, authHeaders: be, children: /* @__PURE__ */ k(
7732
- ld,
7737
+ dd,
7733
7738
  {
7734
7739
  plugins: ue,
7735
7740
  apiBaseUrl: s,
@@ -7737,18 +7742,18 @@ function hf({
7737
7742
  onAuthError: S,
7738
7743
  apiTimeout: c,
7739
7744
  children: [
7740
- /* @__PURE__ */ u(cd, { plugins: ue }),
7741
- /* @__PURE__ */ u(ed, { apiBaseUrl: s, workspaceId: m, mode: I, authHeaders: be }),
7742
- /* @__PURE__ */ u(ud, { onOpenFile: N }),
7743
- /* @__PURE__ */ u(sd, { commands: i }),
7745
+ /* @__PURE__ */ u(ud, { plugins: ue }),
7746
+ /* @__PURE__ */ u(nd, { apiBaseUrl: s, workspaceId: m, mode: C, authHeaders: be }),
7747
+ /* @__PURE__ */ u(fd, { onOpenFile: N }),
7748
+ /* @__PURE__ */ u(cd, { commands: i }),
7744
7749
  /* @__PURE__ */ u(
7745
- ad,
7750
+ ld,
7746
7751
  {
7747
7752
  catalogs: a
7748
7753
  }
7749
7754
  ),
7750
- /* @__PURE__ */ u(id, { store: O }),
7751
- /* @__PURE__ */ u(Dl, {}),
7755
+ /* @__PURE__ */ u(ad, { store: O }),
7756
+ /* @__PURE__ */ u(Fl, {}),
7752
7757
  /* @__PURE__ */ u(Di, {}),
7753
7758
  e,
7754
7759
  typeof import.meta < "u" && !1
@@ -7759,7 +7764,7 @@ function hf({
7759
7764
  ) }) }) }) }) }) });
7760
7765
  }
7761
7766
  export {
7762
- jd as $,
7767
+ Bd as $,
7763
7768
  To as A,
7764
7769
  Kn as B,
7765
7770
  Fr as C,
@@ -7773,92 +7778,92 @@ export {
7773
7778
  te as K,
7774
7779
  er as L,
7775
7780
  wt as M,
7776
- Kd as N,
7781
+ Yd as N,
7777
7782
  Ua as O,
7778
7783
  cc as P,
7779
7784
  Rs as Q,
7780
7785
  ms as R,
7781
- uu as S,
7782
- ff as T,
7786
+ fu as S,
7787
+ hf as T,
7783
7788
  Js as U,
7784
7789
  Ts as V,
7785
7790
  Xe as W,
7786
- Vd as X,
7791
+ Jd as X,
7787
7792
  Ps as Y,
7788
7793
  Es as Z,
7789
- Wd as _,
7790
- zd as a,
7794
+ zd as _,
7795
+ Ud as a,
7791
7796
  Qe as a0,
7792
7797
  Sc as a1,
7793
7798
  Bt as a2,
7794
7799
  vs as a3,
7795
7800
  gn as a4,
7796
7801
  gs as a5,
7797
- qd as a6,
7798
- Gd as a7,
7802
+ Gd as a6,
7803
+ Kd as a7,
7799
7804
  Tc as a8,
7800
7805
  an as a9,
7801
- lf as aA,
7802
- nf as aB,
7803
- sf as aC,
7804
- tf as aD,
7805
- cf as aE,
7806
- af as aF,
7806
+ df as aA,
7807
+ of as aB,
7808
+ cf as aC,
7809
+ rf as aD,
7810
+ uf as aE,
7811
+ lf as aF,
7807
7812
  sn as aG,
7808
7813
  as as aH,
7809
7814
  $e as aI,
7810
- zl as aJ,
7811
- Jd as aK,
7812
- uf as aL,
7815
+ Ul as aJ,
7816
+ Xd as aK,
7817
+ ff as aL,
7813
7818
  Le as aM,
7814
7819
  io as aa,
7815
- Yd as ab,
7816
- Md as ac,
7820
+ Qd as ab,
7821
+ jd as ac,
7817
7822
  qa as ad,
7818
- Xd as ae,
7823
+ Zd as ae,
7819
7824
  oo as af,
7820
- Ud as ag,
7821
- pl as ah,
7822
- Od as ai,
7823
- Hd as aj,
7825
+ Hd as ag,
7826
+ ml as ah,
7827
+ Wd as ai,
7828
+ Vd as aj,
7824
7829
  $r as ak,
7825
- df as al,
7830
+ pf as al,
7826
7831
  kn as am,
7827
7832
  ko as an,
7828
- pf as ao,
7829
- od as ap,
7830
- nd as aq,
7831
- rd as ar,
7833
+ mf as ao,
7834
+ sd as ap,
7835
+ od as aq,
7836
+ id as ar,
7832
7837
  Ze as as,
7833
- st as at,
7838
+ at,
7834
7839
  Ie as au,
7835
- ef as av,
7836
- Qd as aw,
7837
- of as ax,
7838
- Zd as ay,
7839
- rf as az,
7840
- Bd as b,
7841
- $c as c,
7840
+ nf as av,
7841
+ ef as aw,
7842
+ af as ax,
7843
+ tf as ay,
7844
+ sf as az,
7845
+ qd as b,
7846
+ Mc as c,
7842
7847
  Yn as d,
7843
- Dl as e,
7844
- ul as f,
7848
+ Fl as e,
7849
+ fl as f,
7845
7850
  Vn as g,
7846
- Wc as h,
7851
+ zc as h,
7847
7852
  Ba as i,
7848
7853
  on as j,
7849
7854
  Ut as k,
7850
7855
  bs as l,
7851
7856
  Lr as m,
7852
- Cu as n,
7857
+ Eu as n,
7853
7858
  Eo as o,
7854
7859
  Mr as p,
7855
7860
  Sa as q,
7856
- hf as r,
7861
+ gf as r,
7857
7862
  Vs as s,
7858
7863
  Zr as t,
7859
7864
  zt as u,
7860
7865
  ps as v,
7861
- fl as w,
7866
+ hl as w,
7862
7867
  Is as x,
7863
7868
  As as y,
7864
7869
  Ls as z