@pstdio/ui 0.22.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/{MermaidComponent-D92GMhht.js → MermaidComponent-BTgLnpLA.js} +2 -2
  2. package/dist/{MermaidComponent-D92GMhht.js.map → MermaidComponent-BTgLnpLA.js.map} +1 -1
  3. package/dist/chat-ui.js +840 -834
  4. package/dist/chat-ui.js.map +1 -1
  5. package/dist/components/chat-ui/components/chat-input-actions.d.ts +2 -0
  6. package/dist/components/chat-ui/components/chat-input-question-prompt.d.ts +3 -0
  7. package/dist/components/chat-ui/components/chat-input.d.ts +2 -0
  8. package/dist/components/chat-ui/components/chat-panel.d.ts +2 -0
  9. package/dist/components/chat-ui/components/timeline-title.d.ts +6 -0
  10. package/dist/components/layout/index.d.ts +1 -0
  11. package/dist/components/layout/resizable-split-layout.d.ts +4 -3
  12. package/dist/components/layout/resizable-split-layout.handle.d.ts +6 -2
  13. package/dist/components/layout/resizable-split-layout.panels.d.ts +6 -2
  14. package/dist/components/layout/resizable-split-layout.root-size.d.ts +3 -0
  15. package/dist/components/list-row/list-row-root-props.d.ts +34 -0
  16. package/dist/components/primitives/index.d.ts +2 -0
  17. package/dist/components/tab-strip/window-tabs.d.ts +14 -0
  18. package/dist/components/tab-strip/window-title-bar.d.ts +6 -0
  19. package/dist/data-table.js +5 -5
  20. package/dist/{diff-editor-BnfV8cYB.js → diff-bubble-DvUPRnfB.js} +49 -48
  21. package/dist/diff-bubble-DvUPRnfB.js.map +1 -0
  22. package/dist/diff.js +549 -545
  23. package/dist/diff.js.map +1 -1
  24. package/dist/{edit-mode-data-table-DGgRuSW3.js → edit-mode-data-table-BrydKuMM.js} +4 -4
  25. package/dist/{edit-mode-data-table-DGgRuSW3.js.map → edit-mode-data-table-BrydKuMM.js.map} +1 -1
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.js +1112 -1041
  28. package/dist/index.js.map +1 -1
  29. package/dist/{kanban-renderer-toolbar-Bl8xXdwU.js → kanban-renderer-toolbar-ebqlG13w.js} +3 -3
  30. package/dist/{kanban-renderer-toolbar-Bl8xXdwU.js.map → kanban-renderer-toolbar-ebqlG13w.js.map} +1 -1
  31. package/dist/kanban-renderer.js +8 -8
  32. package/dist/kanban-renderer.js.map +1 -1
  33. package/dist/{lazy-markdown-editor-CCOchoJX.js → lazy-markdown-editor-Obb0M8xc.js} +2 -2
  34. package/dist/{lazy-markdown-editor-CCOchoJX.js.map → lazy-markdown-editor-Obb0M8xc.js.map} +1 -1
  35. package/dist/{list-row-DCgdza1i.js → list-row-CRi3Luog.js} +33 -30
  36. package/dist/list-row-CRi3Luog.js.map +1 -0
  37. package/dist/{markdown-editor-C4GCyebp.js → markdown-editor-Bj_QX4oN.js} +2 -2
  38. package/dist/{markdown-editor-C4GCyebp.js.map → markdown-editor-Bj_QX4oN.js.map} +1 -1
  39. package/dist/{markdown-CASvn1Z2.js → markdown-kuU19Oh3.js} +4 -4
  40. package/dist/{markdown-CASvn1Z2.js.map → markdown-kuU19Oh3.js.map} +1 -1
  41. package/dist/monaco-browser-l82HnffN.js +22 -0
  42. package/dist/monaco-browser-l82HnffN.js.map +1 -0
  43. package/dist/{param-editor-CkDq623X.js → param-editor-DhoxgwGd.js} +2 -2
  44. package/dist/{param-editor-CkDq623X.js.map → param-editor-DhoxgwGd.js.map} +1 -1
  45. package/dist/{param-editor-field-DRgbnL7-.js → param-editor-field-DurcyLuw.js} +45 -44
  46. package/dist/param-editor-field-DurcyLuw.js.map +1 -0
  47. package/dist/{rich-message-DARuDVOX.js → rich-message-dNYvLDd4.js} +2 -2
  48. package/dist/{rich-message-DARuDVOX.js.map → rich-message-dNYvLDd4.js.map} +1 -1
  49. package/dist/rich-text.js +5 -5
  50. package/dist/theme/primitives/colors.d.ts +34 -0
  51. package/dist/theme/primitives/sizes.d.ts +27 -0
  52. package/dist/theme/recipes/button.d.ts +5 -3
  53. package/dist/theme/recipes/landing-story.d.ts +10 -0
  54. package/dist/theme/recipes/landing-tool-demo.d.ts +1 -0
  55. package/dist/theme/recipes/landing.d.ts +23 -0
  56. package/dist/theme/recipes/resizable-split-layout.d.ts +106 -0
  57. package/dist/theme/recipes/window-title-bar.d.ts +16 -0
  58. package/dist/theme/tokens/colors-background.d.ts +260 -0
  59. package/dist/theme/tokens/colors-visualization.d.ts +162 -0
  60. package/dist/theme/tokens/colors.d.ts +2 -422
  61. package/dist/{theme-B-l5_a6F.js → theme-Ca-KyNoi.js} +1474 -476
  62. package/dist/theme-Ca-KyNoi.js.map +1 -0
  63. package/dist/theme.js +1 -1
  64. package/dist/tree-list-DXwHWodb.js +1348 -0
  65. package/dist/tree-list-DXwHWodb.js.map +1 -0
  66. package/package.json +2 -2
  67. package/dist/diff-editor-BnfV8cYB.js.map +0 -1
  68. package/dist/list-row-DCgdza1i.js.map +0 -1
  69. package/dist/monaco-browser-CgvlArN7.js +0 -21
  70. package/dist/monaco-browser-CgvlArN7.js.map +0 -1
  71. package/dist/param-editor-field-DRgbnL7-.js.map +0 -1
  72. package/dist/theme-B-l5_a6F.js.map +0 -1
  73. package/dist/tree-list-AlO5ZmxQ.js +0 -1262
  74. package/dist/tree-list-AlO5ZmxQ.js.map +0 -1
package/dist/diff.js CHANGED
@@ -1,21 +1,25 @@
1
- import { jsx as r, jsxs as G, Fragment as Pt } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as G, Fragment as Et } from "react/jsx-runtime";
2
2
  import { c as F } from "react/compiler-runtime";
3
- import { Editor as yt, DiffEditor as vt } from "@monaco-editor/react";
4
- import { useRef as Z, useEffect as le, useState as X, useLayoutEffect as Ge } from "react";
5
- import { u as Et } from "./theme-preference-Bpobguh4.js";
6
- import { D as It, b as ot, a as lt } from "./diff-editor-BnfV8cYB.js";
7
- import { Box as O, Grid as We, Button as it, Text as q, Image as Lt, Stack as be, Skeleton as st, IconButton as Ke, Menu as J, Badge as _t, Icon as Tt, InputGroup as Ft, Input as At, HStack as zt, Flex as Mt } from "@chakra-ui/react";
8
- import { useVirtualizer as Rt, defaultRangeExtractor as kt } from "@tanstack/react-virtual";
9
- import { T as Bt, S as qe } from "./browser-storage-DPtOQJx0.js";
10
- import { ChevronRight as Ye, ChevronDown as Nt, Check as rt, Copy as Ht, Settings2 as Ot, ListTree as $t, List as Vt, PanelLeftClose as jt, PanelLeftOpen as Gt, Rows2 as Wt, SquareSplitHorizontal as Kt, ChevronsUpDown as Qt, ChevronsDownUp as qt, FileText as Ut, Search as Yt } from "lucide-react";
3
+ import { Editor as It, DiffEditor as Lt } from "@monaco-editor/react";
4
+ import { useRef as Z, useEffect as oe, lazy as lt, Suspense as ot, useState as X, useLayoutEffect as Ge } from "react";
5
+ import { u as _t } from "./theme-preference-Bpobguh4.js";
6
+ import { D as Tt, b as it, a as st } from "./diff-bubble-DvUPRnfB.js";
7
+ import { Box as O, Grid as We, Button as rt, Text as q, Image as Ft, Stack as be, Skeleton as at, IconButton as Ke, Menu as J, Badge as At, Icon as Mt, InputGroup as zt, Input as kt, HStack as Rt, Flex as Bt } from "@chakra-ui/react";
8
+ import { useVirtualizer as Nt, defaultRangeExtractor as Ht } from "@tanstack/react-virtual";
9
+ import { T as Ot, S as qe } from "./browser-storage-DPtOQJx0.js";
10
+ import { ChevronRight as Ye, ChevronDown as $t, Check as dt, Copy as Vt, Settings2 as jt, ListTree as Gt, List as Wt, PanelLeftClose as Kt, PanelLeftOpen as Qt, Rows2 as qt, SquareSplitHorizontal as Ut, ChevronsUpDown as Yt, ChevronsDownUp as Xt, FileText as Jt, Search as Zt } from "lucide-react";
11
11
  import { E as Se } from "./empty-state-Bo4HVrgr.js";
12
- import { L as Xt, H as at } from "./list-row-DCgdza1i.js";
13
- import { T as Jt, R as Zt } from "./tree-list-AlO5ZmxQ.js";
14
- import { create as en } from "zustand";
15
- const tn = (n) => {
12
+ import { L as en, H as ct } from "./list-row-CRi3Luog.js";
13
+ import { T as tn, R as nn } from "./tree-list-DXwHWodb.js";
14
+ import { create as ln } from "zustand";
15
+ const on = (n) => {
16
16
  let e;
17
17
  return () => (e ??= n(), e);
18
- }, zo = tn(() => import("./monaco-browser-CgvlArN7.js").then((n) => n.initializeMonaco())), nn = {
18
+ }, ft = on(() => import("./monaco-browser-l82HnffN.js").then((n) => n.initializeMonaco())), sn = lt(async () => (await ft(), {
19
+ default: It
20
+ })), rn = lt(async () => (await ft(), {
21
+ default: Lt
22
+ })), an = {
19
23
  base: "vs-dark",
20
24
  inherit: !0,
21
25
  rules: [],
@@ -28,52 +32,52 @@ const tn = (n) => {
28
32
  "editorIndentGuide.background": "#404040",
29
33
  "editorIndentGuide.activeBackground": "#707070"
30
34
  }
31
- }, on = (n) => typeof n == "object" && n !== null && "base" in n && "colors" in n, ge = "ps-theme", dt = () => {
35
+ }, dn = (n) => typeof n == "object" && n !== null && "base" in n && "colors" in n, ge = "ps-theme", ht = () => {
32
36
  const n = F(5), {
33
37
  themePreference: e,
34
38
  themePreferences: t
35
- } = Et();
36
- let l;
39
+ } = _t();
40
+ let o;
37
41
  if (n[0] !== e || n[1] !== t) {
38
- let o;
39
- n[3] !== e ? (o = (i) => i.id === e, n[3] = e, n[4] = o) : o = n[4];
40
- const s = t.find(o);
41
- l = on(s?.monacoTheme) ? s.monacoTheme : nn, n[0] = e, n[1] = t, n[2] = l;
42
+ let l;
43
+ n[3] !== e ? (l = (i) => i.id === e, n[3] = e, n[4] = l) : l = n[4];
44
+ const s = t.find(l);
45
+ o = dn(s?.monacoTheme) ? s.monacoTheme : an, n[0] = e, n[1] = t, n[2] = o;
42
46
  } else
43
- l = n[2];
44
- return l;
45
- }, ft = (n) => {
47
+ o = n[2];
48
+ return o;
49
+ }, ut = (n) => {
46
50
  const e = F(5), t = Z(null);
47
- let l, o;
48
- e[0] !== n ? (l = () => {
51
+ let o, l;
52
+ e[0] !== n ? (o = () => {
49
53
  const i = t.current;
50
54
  i && (i.editor.defineTheme(ge, n), i.editor.setTheme(ge));
51
- }, o = [n], e[0] = n, e[1] = l, e[2] = o) : (l = e[1], o = e[2]), le(l, o);
55
+ }, l = [n], e[0] = n, e[1] = o, e[2] = l) : (o = e[1], l = e[2]), oe(o, l);
52
56
  let s;
53
57
  return e[3] !== n ? (s = (i) => {
54
58
  t.current = i, i.editor.defineTheme(ge, n), i.editor.setTheme(ge);
55
59
  }, e[3] = n, e[4] = s) : s = e[4], s;
56
- }, ln = (n, e) => {
60
+ }, cn = (n, e) => {
57
61
  n.addCommand(e.KeyMod.CtrlCmd | e.KeyCode.KeyS, async () => {
58
62
  await n.getAction("editor.action.formatDocument")?.run();
59
63
  });
60
- }, Mo = (n) => {
64
+ }, Bl = (n) => {
61
65
  const e = F(20), {
62
66
  defaultCode: t,
63
- code: l,
64
- showLineNumbers: o,
67
+ code: o,
68
+ showLineNumbers: l,
65
69
  isEditable: s,
66
70
  language: i,
67
71
  onChange: a,
68
- disableScroll: f
69
- } = n, c = i === void 0 ? "javascript" : i, p = dt(), u = ft(p);
72
+ disableScroll: c
73
+ } = n, f = i === void 0 ? "javascript" : i, m = ht(), u = ut(m);
70
74
  let d;
71
75
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
72
76
  enabled: !1
73
77
  }, e[0] = d) : d = e[0];
74
- const m = !s, D = o ? "on" : "off";
78
+ const p = !s, D = l ? "on" : "off";
75
79
  let g;
76
- e[1] !== f ? (g = f ? {
80
+ e[1] !== c ? (g = c ? {
77
81
  scrollbar: {
78
82
  vertical: "hidden",
79
83
  horizontal: "hidden",
@@ -83,42 +87,42 @@ const tn = (n) => {
83
87
  scrollBeyondLastLine: !1,
84
88
  mouseWheelScrollSensitivity: 0,
85
89
  overviewRulerLanes: 0
86
- } : {}, e[1] = f, e[2] = g) : g = e[2];
90
+ } : {}, e[1] = c, e[2] = g) : g = e[2];
87
91
  let h;
88
- e[3] !== m || e[4] !== D || e[5] !== g ? (h = {
92
+ e[3] !== p || e[4] !== D || e[5] !== g ? (h = {
89
93
  tabSize: 2,
90
94
  minimap: d,
91
95
  fontSize: 12,
92
- readOnly: m,
96
+ readOnly: p,
93
97
  lineNumbers: D,
94
98
  ...g
95
- }, e[3] = m, e[4] = D, e[5] = g, e[6] = h) : h = e[6];
99
+ }, e[3] = p, e[4] = D, e[5] = g, e[6] = h) : h = e[6];
96
100
  const S = h;
97
101
  let C;
98
102
  e[7] !== a ? (C = (E) => {
99
103
  a?.(E || "");
100
104
  }, e[7] = a, e[8] = C) : C = e[8];
101
- let P, y;
102
- e[9] !== u ? (P = (E) => {
105
+ let y, P;
106
+ e[9] !== u ? (y = (E) => {
103
107
  u(E);
104
- }, y = (E, b) => {
105
- u(b), ln(E, b);
106
- }, e[9] = u, e[10] = P, e[11] = y) : (P = e[10], y = e[11]);
108
+ }, P = (E, b) => {
109
+ u(b), cn(E, b);
110
+ }, e[9] = u, e[10] = y, e[11] = P) : (y = e[10], P = e[11]);
107
111
  let x;
108
- return e[12] !== l || e[13] !== t || e[14] !== c || e[15] !== S || e[16] !== C || e[17] !== P || e[18] !== y ? (x = /* @__PURE__ */ r(yt, { width: "100%", height: "100%", language: c, defaultValue: t, value: l, theme: ge, options: S, onChange: C, beforeMount: P, onMount: y }), e[12] = l, e[13] = t, e[14] = c, e[15] = S, e[16] = C, e[17] = P, e[18] = y, e[19] = x) : x = e[19], x;
109
- }, Ro = (n) => {
112
+ return e[12] !== o || e[13] !== t || e[14] !== f || e[15] !== S || e[16] !== C || e[17] !== y || e[18] !== P ? (x = /* @__PURE__ */ r(ot, { fallback: null, children: /* @__PURE__ */ r(sn, { width: "100%", height: "100%", language: f, defaultValue: t, value: o, theme: ge, options: S, onChange: C, beforeMount: y, onMount: P }) }), e[12] = o, e[13] = t, e[14] = f, e[15] = S, e[16] = C, e[17] = y, e[18] = P, e[19] = x) : x = e[19], x;
113
+ }, Nl = (n) => {
110
114
  const e = F(16), {
111
115
  original: t,
112
- modified: l,
113
- showLineNumbers: o,
116
+ modified: o,
117
+ showLineNumbers: l,
114
118
  language: s,
115
119
  disableScroll: i
116
- } = n, a = s === void 0 ? "javascript" : s, f = dt(), c = ft(f);
117
- let p;
118
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = {
120
+ } = n, a = s === void 0 ? "javascript" : s, c = ht(), f = ut(c);
121
+ let m;
122
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
119
123
  enabled: !1
120
- }, e[0] = p) : p = e[0];
121
- const u = o ? "on" : "off";
124
+ }, e[0] = m) : m = e[0];
125
+ const u = l ? "on" : "off";
122
126
  let d;
123
127
  e[1] !== i ? (d = i ? {
124
128
  scrollbar: {
@@ -131,10 +135,10 @@ const tn = (n) => {
131
135
  mouseWheelScrollSensitivity: 0,
132
136
  overviewRulerLanes: 0
133
137
  } : {}, e[1] = i, e[2] = d) : d = e[2];
134
- let m;
135
- e[3] !== u || e[4] !== d ? (m = {
138
+ let p;
139
+ e[3] !== u || e[4] !== d ? (p = {
136
140
  tabSize: 2,
137
- minimap: p,
141
+ minimap: m,
138
142
  fontSize: 12,
139
143
  readOnly: !0,
140
144
  originalEditable: !1,
@@ -142,17 +146,17 @@ const tn = (n) => {
142
146
  useInlineViewWhenSpaceIsTooSmall: !0,
143
147
  lineNumbers: u,
144
148
  ...d
145
- }, e[3] = u, e[4] = d, e[5] = m) : m = e[5];
146
- const D = m;
149
+ }, e[3] = u, e[4] = d, e[5] = p) : p = e[5];
150
+ const D = p;
147
151
  let g, h;
148
- e[6] !== c ? (g = (C) => {
149
- c(C);
150
- }, h = (C, P) => {
151
- c(P);
152
- }, e[6] = c, e[7] = g, e[8] = h) : (g = e[7], h = e[8]);
152
+ e[6] !== f ? (g = (C) => {
153
+ f(C);
154
+ }, h = (C, y) => {
155
+ f(y);
156
+ }, e[6] = f, e[7] = g, e[8] = h) : (g = e[7], h = e[8]);
153
157
  let S;
154
- return e[9] !== a || e[10] !== l || e[11] !== D || e[12] !== t || e[13] !== g || e[14] !== h ? (S = /* @__PURE__ */ r(vt, { width: "100%", height: "100%", language: a, original: t, modified: l, theme: ge, options: D, beforeMount: g, onMount: h }), e[9] = a, e[10] = l, e[11] = D, e[12] = t, e[13] = g, e[14] = h, e[15] = S) : S = e[15], S;
155
- }, ct = {
158
+ return e[9] !== a || e[10] !== o || e[11] !== D || e[12] !== t || e[13] !== g || e[14] !== h ? (S = /* @__PURE__ */ r(ot, { fallback: null, children: /* @__PURE__ */ r(rn, { width: "100%", height: "100%", language: a, original: t, modified: o, theme: ge, options: D, beforeMount: g, onMount: h }) }), e[9] = a, e[10] = o, e[11] = D, e[12] = t, e[13] = g, e[14] = h, e[15] = S) : S = e[15], S;
159
+ }, pt = {
156
160
  avif: "image/avif",
157
161
  bmp: "image/bmp",
158
162
  gif: "image/gif",
@@ -164,32 +168,32 @@ const tn = (n) => {
164
168
  tif: "image/tiff",
165
169
  tiff: "image/tiff",
166
170
  webp: "image/webp"
167
- }, sn = Object.keys(ct), ht = (n) => {
171
+ }, fn = Object.keys(pt), mt = (n) => {
168
172
  const t = (n.split(/[\\/]/).pop() ?? n).split(".").pop();
169
173
  return t ? t.toLowerCase() : "";
170
- }, rn = (n) => {
171
- const e = ht(n);
172
- return ct[e] ?? null;
173
- }, an = (n) => rn(n) !== null, dn = 1e3, fn = /* @__PURE__ */ new Set(["bun.lock", "bun.lockb", "package-lock.json", "pnpm-lock.yaml", "yarn.lock"]), cn = /* @__PURE__ */ new Set([...sn, "pdf", "zip", "tar", "gz", "tgz", "rar", "7z", "exe", "dll", "so", "dylib", "wasm", "class", "jar", "mp3", "mp4", "mov", "ogg", "wav", "webm", "flac", "ttf", "otf", "woff", "woff2", "eot"]), ut = (n) => (n.additions ?? 0) + (n.deletions ?? 0), mt = (n) => ut(n) > dn, hn = (n) => {
174
+ }, hn = (n) => {
175
+ const e = mt(n);
176
+ return pt[e] ?? null;
177
+ }, un = (n) => hn(n) !== null, pn = 1e3, mn = /* @__PURE__ */ new Set(["bun.lock", "bun.lockb", "package-lock.json", "pnpm-lock.yaml", "yarn.lock"]), gn = /* @__PURE__ */ new Set([...fn, "pdf", "zip", "tar", "gz", "tgz", "rar", "7z", "exe", "dll", "so", "dylib", "wasm", "class", "jar", "mp3", "mp4", "mov", "ogg", "wav", "webm", "flac", "ttf", "otf", "woff", "woff2", "eot"]), gt = (n) => (n.additions ?? 0) + (n.deletions ?? 0), bt = (n) => gt(n) > pn, bn = (n) => {
174
178
  const e = n.split(/[\\/]/).pop() ?? n;
175
- return fn.has(e) || e.endsWith(".min.js") || e.endsWith(".generated.ts");
179
+ return mn.has(e) || e.endsWith(".min.js") || e.endsWith(".generated.ts");
176
180
  }, Ue = (n) => {
177
- const e = ht(n);
178
- return e.length > 0 && cn.has(e);
179
- }, we = an, un = (n) => {
181
+ const e = mt(n);
182
+ return e.length > 0 && gn.has(e);
183
+ }, we = un, Sn = (n) => {
180
184
  const {
181
185
  diff: e,
182
186
  filePath: t,
183
- oldContent: l,
184
- newContent: o,
187
+ oldContent: o,
188
+ newContent: l,
185
189
  isLargeDiff: s,
186
190
  hasOptedIntoLargeDiff: i,
187
191
  onShowFullDiff: a,
188
- diffViewMode: f = "unified",
189
- buildViewData: c
192
+ diffViewMode: c = "unified",
193
+ buildViewData: f
190
194
  } = n;
191
195
  if (Ue(t)) {
192
- const u = Xe(l), d = Xe(o);
196
+ const u = Xe(o), d = Xe(l);
193
197
  return we(t) && (u || d) ? {
194
198
  kind: "image",
195
199
  filePath: t,
@@ -204,263 +208,263 @@ const tn = (n) => {
204
208
  return s && !i ? {
205
209
  kind: "placeholder",
206
210
  filePath: t,
207
- renderedLineCount: ut(e),
211
+ renderedLineCount: gt(e),
208
212
  onShowFullDiff: a
209
213
  } : {
210
214
  kind: "editor",
211
- diffViewData: (c ?? ot)({
212
- original: l,
213
- modified: o,
215
+ diffViewData: (f ?? it)({
216
+ original: o,
217
+ modified: l,
214
218
  oldPath: e.oldPath,
215
219
  newPath: e.newPath
216
220
  }),
217
- sideBySide: f === "split"
221
+ sideBySide: c === "split"
218
222
  };
219
223
  }, Xe = (n) => n.startsWith("data:image/") ? n : "", Je = (n) => {
220
224
  const e = F(22), {
221
225
  diff: t,
222
- filePath: l,
223
- oldContent: o,
226
+ filePath: o,
227
+ oldContent: l,
224
228
  newContent: s,
225
229
  isLargeDiff: i,
226
230
  hasOptedIntoLargeDiff: a,
227
- onShowFullDiff: f,
228
- diffViewMode: c
229
- } = n, p = c === void 0 ? "unified" : c;
231
+ onShowFullDiff: c,
232
+ diffViewMode: f
233
+ } = n, m = f === void 0 ? "unified" : f;
230
234
  let u;
231
- e[0] !== t || e[1] !== p || e[2] !== l || e[3] !== a || e[4] !== i || e[5] !== s || e[6] !== o || e[7] !== f ? (u = un({
235
+ e[0] !== t || e[1] !== m || e[2] !== o || e[3] !== a || e[4] !== i || e[5] !== s || e[6] !== l || e[7] !== c ? (u = Sn({
232
236
  diff: t,
233
- filePath: l,
234
- oldContent: o,
237
+ filePath: o,
238
+ oldContent: l,
235
239
  newContent: s,
236
240
  isLargeDiff: i,
237
241
  hasOptedIntoLargeDiff: a,
238
- onShowFullDiff: f,
239
- diffViewMode: p
240
- }), e[0] = t, e[1] = p, e[2] = l, e[3] = a, e[4] = i, e[5] = s, e[6] = o, e[7] = f, e[8] = u) : u = e[8];
242
+ onShowFullDiff: c,
243
+ diffViewMode: m
244
+ }), e[0] = t, e[1] = m, e[2] = o, e[3] = a, e[4] = i, e[5] = s, e[6] = l, e[7] = c, e[8] = u) : u = e[8];
241
245
  const d = u;
242
- let m;
243
- return e[9] !== t || e[10] !== d.diffViewData || e[11] !== d.filePath || e[12] !== d.isImage || e[13] !== d.kind || e[14] !== d.newSrc || e[15] !== d.oldSrc || e[16] !== d.onShowFullDiff || e[17] !== d.renderedLineCount || e[18] !== d.sideBySide || e[19] !== s || e[20] !== o ? (m = /* @__PURE__ */ r(O, { bg: "bg", borderBottomRadius: "xs", overflow: "hidden", children: d.kind === "editor" ? /* @__PURE__ */ r(It, { original: o, modified: s, oldPath: t.oldPath, newPath: t.newPath, sideBySide: d.sideBySide, data: d.diffViewData }) : d.kind === "image" ? /* @__PURE__ */ r(mn, { oldSrc: d.oldSrc, newSrc: d.newSrc }) : d.kind === "binary" ? /* @__PURE__ */ r(gn, { isImage: d.isImage }) : /* @__PURE__ */ r(pn, { filePath: d.filePath, renderedLineCount: d.renderedLineCount, onShowFullDiff: d.onShowFullDiff }) }), e[9] = t, e[10] = d.diffViewData, e[11] = d.filePath, e[12] = d.isImage, e[13] = d.kind, e[14] = d.newSrc, e[15] = d.oldSrc, e[16] = d.onShowFullDiff, e[17] = d.renderedLineCount, e[18] = d.sideBySide, e[19] = s, e[20] = o, e[21] = m) : m = e[21], m;
244
- }, mn = (n) => {
246
+ let p;
247
+ return e[9] !== t || e[10] !== d.diffViewData || e[11] !== d.filePath || e[12] !== d.isImage || e[13] !== d.kind || e[14] !== d.newSrc || e[15] !== d.oldSrc || e[16] !== d.onShowFullDiff || e[17] !== d.renderedLineCount || e[18] !== d.sideBySide || e[19] !== s || e[20] !== l ? (p = /* @__PURE__ */ r(O, { bg: "bg", borderBottomRadius: "xs", overflow: "hidden", children: d.kind === "editor" ? /* @__PURE__ */ r(Tt, { original: l, modified: s, oldPath: t.oldPath, newPath: t.newPath, sideBySide: d.sideBySide, data: d.diffViewData }) : d.kind === "image" ? /* @__PURE__ */ r(xn, { oldSrc: d.oldSrc, newSrc: d.newSrc }) : d.kind === "binary" ? /* @__PURE__ */ r(Dn, { isImage: d.isImage }) : /* @__PURE__ */ r(wn, { filePath: d.filePath, renderedLineCount: d.renderedLineCount, onShowFullDiff: d.onShowFullDiff }) }), e[9] = t, e[10] = d.diffViewData, e[11] = d.filePath, e[12] = d.isImage, e[13] = d.kind, e[14] = d.newSrc, e[15] = d.oldSrc, e[16] = d.onShowFullDiff, e[17] = d.renderedLineCount, e[18] = d.sideBySide, e[19] = s, e[20] = l, e[21] = p) : p = e[21], p;
248
+ }, xn = (n) => {
245
249
  const e = F(8), {
246
250
  oldSrc: t,
247
- newSrc: l
251
+ newSrc: o
248
252
  } = n;
249
- let o;
250
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = {
253
+ let l;
254
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
251
255
  base: "1fr",
252
256
  md: "1fr 1fr"
253
- }, e[0] = o) : o = e[0];
257
+ }, e[0] = l) : l = e[0];
254
258
  let s;
255
259
  e[1] !== t ? (s = /* @__PURE__ */ r(Ze, { label: "Old", src: t, fallback: "No old image" }), e[1] = t, e[2] = s) : s = e[2];
256
260
  let i;
257
- e[3] !== l ? (i = /* @__PURE__ */ r(Ze, { label: "New", src: l, fallback: "No new image" }), e[3] = l, e[4] = i) : i = e[4];
261
+ e[3] !== o ? (i = /* @__PURE__ */ r(Ze, { label: "New", src: o, fallback: "No new image" }), e[3] = o, e[4] = i) : i = e[4];
258
262
  let a;
259
- return e[5] !== s || e[6] !== i ? (a = /* @__PURE__ */ G(We, { templateColumns: o, gap: "sm", p: "sm", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: [
263
+ return e[5] !== s || e[6] !== i ? (a = /* @__PURE__ */ G(We, { templateColumns: l, gap: "sm", p: "sm", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: [
260
264
  s,
261
265
  i
262
266
  ] }), e[5] = s, e[6] = i, e[7] = a) : a = e[7], a;
263
267
  }, Ze = (n) => {
264
268
  const e = F(9), {
265
269
  label: t,
266
- src: l,
267
- fallback: o
270
+ src: o,
271
+ fallback: l
268
272
  } = n;
269
273
  let s;
270
274
  e[0] !== t ? (s = /* @__PURE__ */ r(q, { px: "xs", py: "2xs", textStyle: "label/S/medium", color: "fg.muted", borderBottom: "1px solid", borderColor: "border.subtle", children: t }), e[0] = t, e[1] = s) : s = e[1];
271
275
  let i;
272
- e[2] !== o || e[3] !== t || e[4] !== l ? (i = /* @__PURE__ */ r(O, { display: "grid", placeItems: "center", minH: "180px", p: "sm", children: l ? /* @__PURE__ */ r(Lt, { src: l, alt: `${t} image diff`, maxH: "260px", maxW: "100%", objectFit: "contain" }) : /* @__PURE__ */ r(q, { color: "fg.muted", textStyle: "body/S/regular", children: o }) }), e[2] = o, e[3] = t, e[4] = l, e[5] = i) : i = e[5];
276
+ e[2] !== l || e[3] !== t || e[4] !== o ? (i = /* @__PURE__ */ r(O, { display: "grid", placeItems: "center", minH: "180px", p: "sm", children: o ? /* @__PURE__ */ r(Ft, { src: o, alt: `${t} image diff`, maxH: "260px", maxW: "100%", objectFit: "contain" }) : /* @__PURE__ */ r(q, { color: "fg.muted", textStyle: "body/S/regular", children: l }) }), e[2] = l, e[3] = t, e[4] = o, e[5] = i) : i = e[5];
273
277
  let a;
274
278
  return e[6] !== s || e[7] !== i ? (a = /* @__PURE__ */ G(O, { border: "1px solid", borderColor: "border.subtle", borderRadius: "xs", overflow: "hidden", bg: "bg.subtle", minW: "0", children: [
275
279
  s,
276
280
  i
277
281
  ] }), e[6] = s, e[7] = i, e[8] = a) : a = e[8], a;
278
- }, pn = (n) => {
282
+ }, wn = (n) => {
279
283
  const e = F(5), {
280
284
  filePath: t,
281
- onShowFullDiff: l
285
+ onShowFullDiff: o
282
286
  } = n;
283
- let o;
284
- e[0] !== t || e[1] !== l ? (o = l ? /* @__PURE__ */ r(it, { size: "xs", variant: "outline", "aria-label": `Render full diff for ${t}`, onClick: l, children: "Show full diff" }) : null, e[0] = t, e[1] = l, e[2] = o) : o = e[2];
287
+ let l;
288
+ e[0] !== t || e[1] !== o ? (l = o ? /* @__PURE__ */ r(rt, { size: "xs", variant: "outline", "aria-label": `Render full diff for ${t}`, onClick: o, children: "Show full diff" }) : null, e[0] = t, e[1] = o, e[2] = l) : l = e[2];
285
289
  let s;
286
- return e[3] !== o ? (s = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: "Large diffs are hidden by default", paddingY: "sm", children: o }) }), e[3] = o, e[4] = s) : s = e[4], s;
287
- }, gn = (n) => {
290
+ return e[3] !== l ? (s = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: "Large diffs are hidden by default", paddingY: "sm", children: l }) }), e[3] = l, e[4] = s) : s = e[4], s;
291
+ }, Dn = (n) => {
288
292
  const e = F(2), {
289
293
  isImage: t
290
- } = n, l = t ? "Image diffs are not shown" : "Binary diffs are not shown";
291
- let o;
292
- return e[0] !== l ? (o = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: l, paddingY: "sm" }) }), e[0] = l, e[1] = o) : o = e[1], o;
293
- }, bn = (n) => {
294
+ } = n, o = t ? "Image diffs are not shown" : "Binary diffs are not shown";
295
+ let l;
296
+ return e[0] !== o ? (l = /* @__PURE__ */ r(O, { p: "md", borderTop: "1px solid", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Se, { title: o, paddingY: "sm" }) }), e[0] = o, e[1] = l) : l = e[1], l;
297
+ }, Cn = (n) => {
294
298
  const e = F(7), {
295
299
  title: t,
296
- actionLabel: l,
297
- isLoadingDiff: o,
300
+ actionLabel: o,
301
+ isLoadingDiff: l,
298
302
  onAction: s
299
303
  } = n;
300
304
  let i;
301
- e[0] !== l || e[1] !== o || e[2] !== s ? (i = l ? /* @__PURE__ */ r(it, { size: "xs", variant: "outline", loading: o, onClick: s, children: l }) : null, e[0] = l, e[1] = o, e[2] = s, e[3] = i) : i = e[3];
305
+ e[0] !== o || e[1] !== l || e[2] !== s ? (i = o ? /* @__PURE__ */ r(rt, { size: "xs", variant: "outline", loading: l, onClick: s, children: o }) : null, e[0] = o, e[1] = l, e[2] = s, e[3] = i) : i = e[3];
302
306
  let a;
303
307
  return e[4] !== i || e[5] !== t ? (a = /* @__PURE__ */ r(O, { bg: "bg", p: "md", borderTop: "1px solid", borderColor: "border.subtle", children: /* @__PURE__ */ r(Se, { title: t, paddingY: "sm", children: i }) }), e[4] = i, e[5] = t, e[6] = a) : a = e[6], a;
304
- }, Sn = ["first", "second", "third"], xn = () => {
308
+ }, yn = ["first", "second", "third"], Pn = () => {
305
309
  const n = F(1);
306
310
  let e;
307
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "280px", bg: "bg", borderTop: "1px solid", borderColor: "border.subtle", p: "xs", gap: "2xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff", children: Sn.map(wn) }), n[0] = e) : e = n[0], e;
311
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "280px", bg: "bg", borderTop: "1px solid", borderColor: "border.subtle", p: "xs", gap: "2xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff", children: yn.map(vn) }), n[0] = e) : e = n[0], e;
308
312
  };
309
- function wn(n) {
310
- return /* @__PURE__ */ r(st, { h: "20px", w: "full", borderRadius: "xs" }, n);
313
+ function vn(n) {
314
+ return /* @__PURE__ */ r(at, { h: "20px", w: "full", borderRadius: "xs" }, n);
311
315
  }
312
- const Dn = (n) => {
316
+ const En = (n) => {
313
317
  const {
314
318
  isLargeDiff: e,
315
319
  isGeneratedDiff: t,
316
- loadError: l,
317
- canLoadDiff: o,
320
+ loadError: o,
321
+ canLoadDiff: l,
318
322
  onLoadDiff: s,
319
323
  onShowFullDiff: i
320
324
  } = n;
321
- let a = "Diff content is not loaded yet.", f = o ? "Load diff" : void 0, c = o ? () => {
325
+ let a = "Diff content is not loaded yet.", c = l ? "Load diff" : void 0, f = l ? () => {
322
326
  s();
323
327
  } : void 0;
324
- return e && (a = "Large diffs are hidden by default", f = o ? "Show full diff" : void 0, c = () => {
328
+ return e && (a = "Large diffs are hidden by default", c = l ? "Show full diff" : void 0, f = () => {
325
329
  i?.(), s();
326
- }), t && (a = "Generated diffs are hidden by default", f = o ? "Load diff" : void 0, c = o ? () => {
330
+ }), t && (a = "Generated diffs are hidden by default", c = l ? "Load diff" : void 0, f = l ? () => {
327
331
  s();
328
- } : void 0), l && (a = "Diff failed to load. Try again.", f = o ? "Load diff" : void 0, c = o ? () => {
332
+ } : void 0), o && (a = "Diff failed to load. Try again.", c = l ? "Load diff" : void 0, f = l ? () => {
329
333
  s();
330
334
  } : void 0), {
331
335
  title: a,
332
- actionLabel: f,
333
- onAction: c
336
+ actionLabel: c,
337
+ onAction: f
334
338
  };
335
- }, Cn = (n) => {
339
+ }, In = (n) => {
336
340
  const e = F(30), {
337
341
  diff: t,
338
- filePath: l,
339
- oldContent: o,
342
+ filePath: o,
343
+ oldContent: l,
340
344
  newContent: s,
341
345
  isExpanded: i,
342
346
  isLargeDiff: a,
343
- isGeneratedDiff: f,
344
- isBinaryDiff: c,
345
- hasDiffContent: p,
347
+ isGeneratedDiff: c,
348
+ isBinaryDiff: f,
349
+ hasDiffContent: m,
346
350
  canLoadDiff: u,
347
351
  shouldAutoLoadDiff: d,
348
- loadError: m,
352
+ loadError: p,
349
353
  isLoadingDiff: D,
350
354
  onLoadDiff: g,
351
355
  hasOptedIntoLargeDiff: h,
352
356
  onShowFullDiff: S,
353
357
  diffViewMode: C
354
- } = n, P = C === void 0 ? "unified" : C;
358
+ } = n, y = C === void 0 ? "unified" : C;
355
359
  if (!i)
356
360
  return null;
357
- if (c) {
361
+ if (f) {
358
362
  let x;
359
- return e[0] !== t || e[1] !== P || e[2] !== l || e[3] !== h || e[4] !== s || e[5] !== o || e[6] !== S ? (x = /* @__PURE__ */ r(Je, { diff: t, filePath: l, oldContent: o, newContent: s, isLargeDiff: !1, hasOptedIntoLargeDiff: h, onShowFullDiff: S, diffViewMode: P }), e[0] = t, e[1] = P, e[2] = l, e[3] = h, e[4] = s, e[5] = o, e[6] = S, e[7] = x) : x = e[7], x;
363
+ return e[0] !== t || e[1] !== y || e[2] !== o || e[3] !== h || e[4] !== s || e[5] !== l || e[6] !== S ? (x = /* @__PURE__ */ r(Je, { diff: t, filePath: o, oldContent: l, newContent: s, isLargeDiff: !1, hasOptedIntoLargeDiff: h, onShowFullDiff: S, diffViewMode: y }), e[0] = t, e[1] = y, e[2] = o, e[3] = h, e[4] = s, e[5] = l, e[6] = S, e[7] = x) : x = e[7], x;
360
364
  }
361
- if (!p && !d) {
365
+ if (!m && !d) {
362
366
  let x;
363
- e[8] !== u || e[9] !== f || e[10] !== a || e[11] !== m || e[12] !== g || e[13] !== S ? (x = Dn({
367
+ e[8] !== u || e[9] !== c || e[10] !== a || e[11] !== p || e[12] !== g || e[13] !== S ? (x = En({
364
368
  isLargeDiff: a,
365
- isGeneratedDiff: f,
366
- loadError: m,
369
+ isGeneratedDiff: c,
370
+ loadError: p,
367
371
  canLoadDiff: u,
368
372
  onLoadDiff: g,
369
373
  onShowFullDiff: S
370
- }), e[8] = u, e[9] = f, e[10] = a, e[11] = m, e[12] = g, e[13] = S, e[14] = x) : x = e[14];
374
+ }), e[8] = u, e[9] = c, e[10] = a, e[11] = p, e[12] = g, e[13] = S, e[14] = x) : x = e[14];
371
375
  const {
372
376
  title: E,
373
377
  actionLabel: b,
374
378
  onAction: v
375
379
  } = x;
376
380
  let w;
377
- return e[15] !== b || e[16] !== D || e[17] !== v || e[18] !== E ? (w = /* @__PURE__ */ r(bn, { title: E, actionLabel: b, isLoadingDiff: D, onAction: v }), e[15] = b, e[16] = D, e[17] = v, e[18] = E, e[19] = w) : w = e[19], w;
381
+ return e[15] !== b || e[16] !== D || e[17] !== v || e[18] !== E ? (w = /* @__PURE__ */ r(Cn, { title: E, actionLabel: b, isLoadingDiff: D, onAction: v }), e[15] = b, e[16] = D, e[17] = v, e[18] = E, e[19] = w) : w = e[19], w;
378
382
  }
379
383
  if (d) {
380
384
  let x;
381
- return e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ r(xn, {}), e[20] = x) : x = e[20], x;
385
+ return e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (x = /* @__PURE__ */ r(Pn, {}), e[20] = x) : x = e[20], x;
382
386
  }
383
- let y;
384
- return e[21] !== t || e[22] !== P || e[23] !== l || e[24] !== h || e[25] !== a || e[26] !== s || e[27] !== o || e[28] !== S ? (y = /* @__PURE__ */ r(Je, { diff: t, filePath: l, oldContent: o, newContent: s, isLargeDiff: a, hasOptedIntoLargeDiff: h, onShowFullDiff: S, diffViewMode: P }), e[21] = t, e[22] = P, e[23] = l, e[24] = h, e[25] = a, e[26] = s, e[27] = o, e[28] = S, e[29] = y) : y = e[29], y;
385
- }, Pn = (n) => {
387
+ let P;
388
+ return e[21] !== t || e[22] !== y || e[23] !== o || e[24] !== h || e[25] !== a || e[26] !== s || e[27] !== l || e[28] !== S ? (P = /* @__PURE__ */ r(Je, { diff: t, filePath: o, oldContent: l, newContent: s, isLargeDiff: a, hasOptedIntoLargeDiff: h, onShowFullDiff: S, diffViewMode: y }), e[21] = t, e[22] = y, e[23] = o, e[24] = h, e[25] = a, e[26] = s, e[27] = l, e[28] = S, e[29] = P) : P = e[29], P;
389
+ }, Ln = (n) => {
386
390
  const {
387
391
  isExpanded: e,
388
392
  isSelected: t,
389
- hasDiffContent: l,
390
- isLargeDiff: o,
393
+ hasDiffContent: o,
394
+ isLargeDiff: l,
391
395
  isGeneratedDiff: s,
392
396
  isBinaryDiff: i,
393
397
  requestedPath: a,
394
- filePath: f
398
+ filePath: c
395
399
  } = n;
396
- return e && t && !l && !o && !s && !i && a !== f;
397
- }, yn = (n) => {
400
+ return e && t && !o && !l && !s && !i && a !== c;
401
+ }, _n = (n) => {
398
402
  const {
399
403
  requestedPath: e,
400
404
  filePath: t,
401
- hasDiffContent: l
405
+ hasDiffContent: o
402
406
  } = n;
403
- return e === t && l ? null : e;
404
- }, vn = (n) => !we(n), pt = (n) => n.newPath || n.oldPath || "unknown", En = (n) => {
407
+ return e === t && o ? null : e;
408
+ }, Tn = (n) => !we(n), St = (n) => n.newPath || n.oldPath || "unknown", Fn = (n) => {
405
409
  const {
406
410
  filePath: e,
407
411
  isExpanded: t,
408
- isSelected: l,
409
- hasDiffContent: o,
412
+ isSelected: o,
413
+ hasDiffContent: l,
410
414
  isLargeDiff: s,
411
415
  isGeneratedDiff: i,
412
416
  isBinaryDiff: a,
413
- onLoadDiff: f
414
- } = n, [c, p] = X(!1), [u, d] = X(null), [m, D] = X(!1), g = async () => {
415
- if (!(!f || c)) {
416
- d(e), D(!1), p(!0);
417
+ onLoadDiff: c
418
+ } = n, [f, m] = X(!1), [u, d] = X(null), [p, D] = X(!1), g = async () => {
419
+ if (!(!c || f)) {
420
+ d(e), D(!1), m(!0);
417
421
  try {
418
- await f(e);
422
+ await c(e);
419
423
  } catch {
420
424
  d(null), D(!0);
421
425
  } finally {
422
- p(!1);
426
+ m(!1);
423
427
  }
424
428
  }
425
- }, h = Pn({
429
+ }, h = Ln({
426
430
  isExpanded: t,
427
- isSelected: l,
428
- hasDiffContent: o,
431
+ isSelected: o,
432
+ hasDiffContent: l,
429
433
  isLargeDiff: s,
430
434
  isGeneratedDiff: i,
431
435
  isBinaryDiff: a,
432
436
  requestedPath: u,
433
437
  filePath: e
434
438
  });
435
- return le(() => {
436
- d((S) => yn({
439
+ return oe(() => {
440
+ d((S) => _n({
437
441
  requestedPath: S,
438
442
  filePath: e,
439
- hasDiffContent: o
443
+ hasDiffContent: l
440
444
  }));
441
- }, [e, o]), le(() => {
442
- !f || !h || m || g();
445
+ }, [e, l]), oe(() => {
446
+ !c || !h || p || g();
443
447
  }), {
444
- isLoadingDiff: c,
445
- loadError: m,
446
- shouldAutoLoadDiff: !!f && h && !m,
448
+ isLoadingDiff: f,
449
+ loadError: p,
450
+ shouldAutoLoadDiff: !!c && h && !p,
447
451
  loadDiff: g
448
452
  };
449
- }, In = (n) => {
453
+ }, An = (n) => {
450
454
  const e = F(44), {
451
455
  diff: t,
452
- isSelected: l,
453
- isExpanded: o,
456
+ isSelected: o,
457
+ isExpanded: l,
454
458
  onToggleExpanded: s,
455
459
  onSelect: i,
456
460
  onLoadDiff: a,
457
- hasOptedIntoLargeDiff: f,
458
- onShowFullDiff: c,
459
- diffViewMode: p
460
- } = n, u = l === void 0 ? !1 : l, d = o === void 0 ? !0 : o, m = f === void 0 ? !1 : f, D = p === void 0 ? "unified" : p;
461
- let g, h, S, C, P, y;
462
- e[0] !== t ? (g = pt(t), P = t.oldContent || "", C = t.newContent || "", S = mt(t), h = hn(g), y = Ue(g) && !we(g), e[0] = t, e[1] = g, e[2] = h, e[3] = S, e[4] = C, e[5] = P, e[6] = y) : (g = e[1], h = e[2], S = e[3], C = e[4], P = e[5], y = e[6]);
463
- const x = y, E = t.oldContent !== void 0 || t.newContent !== void 0, b = S && !m;
461
+ hasOptedIntoLargeDiff: c,
462
+ onShowFullDiff: f,
463
+ diffViewMode: m
464
+ } = n, u = o === void 0 ? !1 : o, d = l === void 0 ? !0 : l, p = c === void 0 ? !1 : c, D = m === void 0 ? "unified" : m;
465
+ let g, h, S, C, y, P;
466
+ e[0] !== t ? (g = St(t), y = t.oldContent || "", C = t.newContent || "", S = bt(t), h = bn(g), P = Ue(g) && !we(g), e[0] = t, e[1] = g, e[2] = h, e[3] = S, e[4] = C, e[5] = y, e[6] = P) : (g = e[1], h = e[2], S = e[3], C = e[4], y = e[5], P = e[6]);
467
+ const x = P, E = t.oldContent !== void 0 || t.newContent !== void 0, b = S && !p;
464
468
  let v;
465
469
  e[7] !== x || e[8] !== g || e[9] !== E || e[10] !== d || e[11] !== h || e[12] !== u || e[13] !== a || e[14] !== b ? (v = {
466
470
  filePath: g,
@@ -476,68 +480,68 @@ const Dn = (n) => {
476
480
  isLoadingDiff: w,
477
481
  loadError: I,
478
482
  shouldAutoLoadDiff: L,
479
- loadDiff: z
480
- } = En(v), M = u ? "border.accent" : "border.subtle";
483
+ loadDiff: M
484
+ } = Fn(v), z = u ? "border.accent" : "border.subtle";
481
485
  let T;
482
486
  e[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = {
483
487
  borderColor: "border.accent"
484
488
  }, e[16] = T) : T = e[16];
485
489
  let _;
486
- e[17] !== t || e[18] !== d || e[19] !== s ? (_ = /* @__PURE__ */ r(Ln, { diff: t, isExpanded: d, onToggleExpanded: s }), e[17] = t, e[18] = d, e[19] = s, e[20] = _) : _ = e[20];
490
+ e[17] !== t || e[18] !== d || e[19] !== s ? (_ = /* @__PURE__ */ r(Mn, { diff: t, isExpanded: d, onToggleExpanded: s }), e[17] = t, e[18] = d, e[19] = s, e[20] = _) : _ = e[20];
487
491
  const A = !!a;
488
- let R;
489
- e[21] !== x || e[22] !== t || e[23] !== D || e[24] !== g || e[25] !== E || e[26] !== m || e[27] !== d || e[28] !== h || e[29] !== S || e[30] !== w || e[31] !== z || e[32] !== I || e[33] !== C || e[34] !== P || e[35] !== c || e[36] !== L || e[37] !== A ? (R = /* @__PURE__ */ r(Cn, { diff: t, filePath: g, oldContent: P, newContent: C, isExpanded: d, isLargeDiff: S, isGeneratedDiff: h, isBinaryDiff: x, hasDiffContent: E, canLoadDiff: A, shouldAutoLoadDiff: L, loadError: I, isLoadingDiff: w, onLoadDiff: z, hasOptedIntoLargeDiff: m, onShowFullDiff: c, diffViewMode: D }), e[21] = x, e[22] = t, e[23] = D, e[24] = g, e[25] = E, e[26] = m, e[27] = d, e[28] = h, e[29] = S, e[30] = w, e[31] = z, e[32] = I, e[33] = C, e[34] = P, e[35] = c, e[36] = L, e[37] = A, e[38] = R) : R = e[38];
490
492
  let k;
491
- return e[39] !== i || e[40] !== R || e[41] !== M || e[42] !== _ ? (k = /* @__PURE__ */ G(O, { "data-testid": "diff-card", border: "1px solid", borderColor: M, borderRadius: "xs", overflow: "visible", bg: "bg", width: "100%", maxW: "100%", transition: "border-color 0.14s ease", _hover: T, onClick: i, children: [
493
+ e[21] !== x || e[22] !== t || e[23] !== D || e[24] !== g || e[25] !== E || e[26] !== p || e[27] !== d || e[28] !== h || e[29] !== S || e[30] !== w || e[31] !== M || e[32] !== I || e[33] !== C || e[34] !== y || e[35] !== f || e[36] !== L || e[37] !== A ? (k = /* @__PURE__ */ r(In, { diff: t, filePath: g, oldContent: y, newContent: C, isExpanded: d, isLargeDiff: S, isGeneratedDiff: h, isBinaryDiff: x, hasDiffContent: E, canLoadDiff: A, shouldAutoLoadDiff: L, loadError: I, isLoadingDiff: w, onLoadDiff: M, hasOptedIntoLargeDiff: p, onShowFullDiff: f, diffViewMode: D }), e[21] = x, e[22] = t, e[23] = D, e[24] = g, e[25] = E, e[26] = p, e[27] = d, e[28] = h, e[29] = S, e[30] = w, e[31] = M, e[32] = I, e[33] = C, e[34] = y, e[35] = f, e[36] = L, e[37] = A, e[38] = k) : k = e[38];
494
+ let R;
495
+ return e[39] !== i || e[40] !== k || e[41] !== z || e[42] !== _ ? (R = /* @__PURE__ */ G(O, { "data-testid": "diff-card", border: "1px solid", borderColor: z, borderRadius: "xs", overflow: "visible", bg: "bg", width: "100%", maxW: "100%", transition: "border-color 0.14s ease", _hover: T, onClick: i, children: [
492
496
  _,
493
- R
494
- ] }), e[39] = i, e[40] = R, e[41] = M, e[42] = _, e[43] = k) : k = e[43], k;
495
- }, Ln = (n) => {
497
+ k
498
+ ] }), e[39] = i, e[40] = k, e[41] = z, e[42] = _, e[43] = R) : R = e[43], R;
499
+ }, Mn = (n) => {
496
500
  const e = F(58), {
497
501
  diff: t,
498
- isExpanded: l,
499
- onToggleExpanded: o
500
- } = n, s = l === void 0 ? !0 : l;
501
- let i, a, f, c;
502
- e[0] !== t ? (f = pt(t), i = t.additions ?? 0, a = t.deletions ?? 0, c = vn(f), e[0] = t, e[1] = i, e[2] = a, e[3] = f, e[4] = c) : (i = e[1], a = e[2], f = e[3], c = e[4]);
503
- const p = c, [u, d] = X(!1), m = Z(null);
502
+ isExpanded: o,
503
+ onToggleExpanded: l
504
+ } = n, s = o === void 0 ? !0 : o;
505
+ let i, a, c, f;
506
+ e[0] !== t ? (c = St(t), i = t.additions ?? 0, a = t.deletions ?? 0, f = Tn(c), e[0] = t, e[1] = i, e[2] = a, e[3] = c, e[4] = f) : (i = e[1], a = e[2], c = e[3], f = e[4]);
507
+ const m = f, [u, d] = X(!1), p = Z(null);
504
508
  let D, g;
505
509
  e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (D = () => () => {
506
- m.current !== null && window.clearTimeout(m.current);
507
- }, g = [], e[5] = D, e[6] = g) : (D = e[5], g = e[6]), le(D, g);
510
+ p.current !== null && window.clearTimeout(p.current);
511
+ }, g = [], e[5] = D, e[6] = g) : (D = e[5], g = e[6]), oe(D, g);
508
512
  let h;
509
- e[7] !== f ? (h = async () => {
513
+ e[7] !== c ? (h = async () => {
510
514
  try {
511
- await navigator.clipboard.writeText(f), d(!0), m.current !== null && window.clearTimeout(m.current), m.current = window.setTimeout(() => d(!1), 1200);
515
+ await navigator.clipboard.writeText(c), d(!0), p.current !== null && window.clearTimeout(p.current), p.current = window.setTimeout(() => d(!1), 1200);
512
516
  } catch {
513
517
  d(!1);
514
518
  }
515
- }, e[7] = f, e[8] = h) : h = e[8];
516
- const S = h, C = s ? "1px solid" : "none", P = s ? "0" : "xs";
517
- let y;
518
- e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = {
519
+ }, e[7] = c, e[8] = h) : h = e[8];
520
+ const S = h, C = s ? "1px solid" : "none", y = s ? "0" : "xs";
521
+ let P;
522
+ e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
519
523
  bg: "bg"
520
- }, e[9] = y) : y = e[9];
524
+ }, e[9] = P) : P = e[9];
521
525
  let x;
522
- e[10] !== o ? (x = () => o?.(), e[10] = o, e[11] = x) : x = e[11];
526
+ e[10] !== l ? (x = () => l?.(), e[10] = l, e[11] = x) : x = e[11];
523
527
  const E = s ? "Collapse" : "Expand";
524
528
  let b;
525
- e[12] !== o ? (b = (U) => {
526
- U.stopPropagation(), o?.();
527
- }, e[12] = o, e[13] = b) : b = e[13];
529
+ e[12] !== l ? (b = (U) => {
530
+ U.stopPropagation(), l?.();
531
+ }, e[12] = l, e[13] = b) : b = e[13];
528
532
  let v;
529
- e[14] !== s ? (v = s ? /* @__PURE__ */ r(Nt, { size: 16 }) : /* @__PURE__ */ r(Ye, { size: 16 }), e[14] = s, e[15] = v) : v = e[15];
533
+ e[14] !== s ? (v = s ? /* @__PURE__ */ r($t, { size: 16 }) : /* @__PURE__ */ r(Ye, { size: 16 }), e[14] = s, e[15] = v) : v = e[15];
530
534
  let w;
531
535
  e[16] !== b || e[17] !== v || e[18] !== E ? (w = /* @__PURE__ */ r(Ke, { "aria-label": E, variant: "ghost", size: "2xs", onClick: b, flexShrink: 0, children: v }), e[16] = b, e[17] = v, e[18] = E, e[19] = w) : w = e[19];
532
536
  let I;
533
- e[20] !== t.change || e[21] !== t.newPath || e[22] !== t.oldPath || e[23] !== f ? (I = t.change === "renamed" ? /* @__PURE__ */ G(q, { as: "span", textStyle: "sm", children: [
537
+ e[20] !== t.change || e[21] !== t.newPath || e[22] !== t.oldPath || e[23] !== c ? (I = t.change === "renamed" ? /* @__PURE__ */ G(q, { as: "span", textStyle: "sm", children: [
534
538
  /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", textDecoration: "line-through", mr: "xs", children: t.oldPath }),
535
539
  /* @__PURE__ */ r(O, { as: "span", display: "inline-flex", alignItems: "center", verticalAlign: "middle", mr: "xs", children: /* @__PURE__ */ r(Ye, { size: 12 }) }),
536
540
  t.newPath
537
- ] }) : t.change === "deleted" ? /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", textDecoration: "line-through", textStyle: "sm", children: f }) : /* @__PURE__ */ r(q, { as: "span", textStyle: "sm", children: f }), e[20] = t.change, e[21] = t.newPath, e[22] = t.oldPath, e[23] = f, e[24] = I) : I = e[24];
541
+ ] }) : t.change === "deleted" ? /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", textDecoration: "line-through", textStyle: "sm", children: c }) : /* @__PURE__ */ r(q, { as: "span", textStyle: "sm", children: c }), e[20] = t.change, e[21] = t.newPath, e[22] = t.oldPath, e[23] = c, e[24] = I) : I = e[24];
538
542
  let L;
539
- e[25] !== f || e[26] !== I ? (L = /* @__PURE__ */ r(O, { minW: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", title: f, children: I }), e[25] = f, e[26] = I, e[27] = L) : L = e[27];
540
- const z = u ? "1" : "0", M = u ? "auto" : "none";
543
+ e[25] !== c || e[26] !== I ? (L = /* @__PURE__ */ r(O, { minW: 0, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", title: c, children: I }), e[25] = c, e[26] = I, e[27] = L) : L = e[27];
544
+ const M = u ? "1" : "0", z = u ? "auto" : "none";
541
545
  let T;
542
546
  e[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = {
543
547
  "[data-testid='diff-card-header']:hover &, [data-testid='diff-card-header']:focus-within &": {
@@ -546,130 +550,130 @@ const Dn = (n) => {
546
550
  }
547
551
  }, e[28] = T) : T = e[28];
548
552
  const _ = u ? "Copied" : "Copy file path", A = u ? "Copied" : "Copy file path";
549
- let R;
550
- e[29] !== S ? (R = (U) => {
551
- U.stopPropagation(), S();
552
- }, e[29] = S, e[30] = R) : R = e[30];
553
553
  let k;
554
- e[31] !== u ? (k = u ? /* @__PURE__ */ r(rt, { size: 12 }) : /* @__PURE__ */ r(Ht, { size: 12 }), e[31] = u, e[32] = k) : k = e[32];
554
+ e[29] !== S ? (k = (U) => {
555
+ U.stopPropagation(), S();
556
+ }, e[29] = S, e[30] = k) : k = e[30];
557
+ let R;
558
+ e[31] !== u ? (R = u ? /* @__PURE__ */ r(dt, { size: 12 }) : /* @__PURE__ */ r(Vt, { size: 12 }), e[31] = u, e[32] = R) : R = e[32];
555
559
  let $;
556
- e[33] !== A || e[34] !== R || e[35] !== k ? ($ = /* @__PURE__ */ r(Ke, { "aria-label": A, variant: "ghost", size: "2xs", onClick: R, flexShrink: 0, children: k }), e[33] = A, e[34] = R, e[35] = k, e[36] = $) : $ = e[36];
560
+ e[33] !== A || e[34] !== k || e[35] !== R ? ($ = /* @__PURE__ */ r(Ke, { "aria-label": A, variant: "ghost", size: "2xs", onClick: k, flexShrink: 0, children: R }), e[33] = A, e[34] = k, e[35] = R, e[36] = $) : $ = e[36];
557
561
  let N;
558
- e[37] !== _ || e[38] !== $ ? (N = /* @__PURE__ */ r(Bt, { content: _, children: $ }), e[37] = _, e[38] = $, e[39] = N) : N = e[39];
562
+ e[37] !== _ || e[38] !== $ ? (N = /* @__PURE__ */ r(Ot, { content: _, children: $ }), e[37] = _, e[38] = $, e[39] = N) : N = e[39];
559
563
  let B;
560
- e[40] !== z || e[41] !== M || e[42] !== N ? (B = /* @__PURE__ */ r(O, { opacity: z, pointerEvents: M, transition: "opacity 120ms ease", css: T, children: N }), e[40] = z, e[41] = M, e[42] = N, e[43] = B) : B = e[43];
564
+ e[40] !== M || e[41] !== z || e[42] !== N ? (B = /* @__PURE__ */ r(O, { opacity: M, pointerEvents: z, transition: "opacity 120ms ease", css: T, children: N }), e[40] = M, e[41] = z, e[42] = N, e[43] = B) : B = e[43];
561
565
  let V;
562
566
  e[44] !== L || e[45] !== B ? (V = /* @__PURE__ */ G(We, { templateColumns: "minmax(0, max-content) auto", alignItems: "center", justifyContent: "start", gap: "2xs", minW: 0, children: [
563
567
  L,
564
568
  B
565
569
  ] }), e[44] = L, e[45] = B, e[46] = V) : V = e[46];
566
570
  let j;
567
- e[47] !== i || e[48] !== a || e[49] !== p ? (j = p ? /* @__PURE__ */ r(O, { flexShrink: 0, children: /* @__PURE__ */ r(lt, { variant: "ghost", additions: i, deletions: a }) }) : null, e[47] = i, e[48] = a, e[49] = p, e[50] = j) : j = e[50];
571
+ e[47] !== i || e[48] !== a || e[49] !== m ? (j = m ? /* @__PURE__ */ r(O, { flexShrink: 0, children: /* @__PURE__ */ r(st, { variant: "ghost", additions: i, deletions: a }) }) : null, e[47] = i, e[48] = a, e[49] = m, e[50] = j) : j = e[50];
568
572
  let W;
569
- return e[51] !== w || e[52] !== V || e[53] !== j || e[54] !== C || e[55] !== P || e[56] !== x ? (W = /* @__PURE__ */ G(We, { "data-testid": "diff-card-header", templateColumns: "auto minmax(0, 1fr) auto", px: "xs", py: "2xs", alignItems: "center", justifyContent: "space-between", borderBottom: C, borderColor: "border.subtle", borderTopRadius: "xs", borderBottomRadius: P, position: "sticky", top: "0", zIndex: "1", bg: "bg", cursor: "pointer", transition: "background 0.14s ease", _hover: y, onClick: x, gap: "sm", children: [
573
+ return e[51] !== w || e[52] !== V || e[53] !== j || e[54] !== C || e[55] !== y || e[56] !== x ? (W = /* @__PURE__ */ G(We, { "data-testid": "diff-card-header", templateColumns: "auto minmax(0, 1fr) auto", px: "xs", py: "2xs", alignItems: "center", justifyContent: "space-between", borderBottom: C, borderColor: "border.subtle", borderTopRadius: "xs", borderBottomRadius: y, position: "sticky", top: "0", zIndex: "1", bg: "bg", cursor: "pointer", transition: "background 0.14s ease", _hover: P, onClick: x, gap: "sm", children: [
570
574
  w,
571
575
  V,
572
576
  j
573
- ] }), e[51] = w, e[52] = V, e[53] = j, e[54] = C, e[55] = P, e[56] = x, e[57] = W) : W = e[57], W;
574
- }, _n = () => {
577
+ ] }), e[51] = w, e[52] = V, e[53] = j, e[54] = C, e[55] = y, e[56] = x, e[57] = W) : W = e[57], W;
578
+ }, zn = () => {
575
579
  const n = F(1);
576
580
  let e;
577
581
  return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(qe, { flex: "1", minH: "0", contentProps: {
578
582
  p: "xs",
579
583
  spaceY: "xs"
580
584
  }, children: /* @__PURE__ */ r(Se, { title: "No changes detected", description: "Make some changes to see the diff here.", paddingY: "sm" }) }) }), n[0] = e) : e = n[0], e;
581
- }, Qe = 34, Tn = 18, Fn = 28, An = 34, zn = 88, Mn = 338, ze = 8, Ae = () => Qe + zn + ze, Rn = (n) => {
585
+ }, Qe = 34, kn = 18, Rn = 28, Bn = 34, Nn = 88, Hn = 338, Me = 8, Ae = () => Qe + Nn + Me, On = (n) => {
582
586
  const {
583
587
  diff: e,
584
588
  isCollapsed: t,
585
- hasOptedIntoLargeDiff: l = !1,
586
- diffViewMode: o = "unified"
589
+ hasOptedIntoLargeDiff: o = !1,
590
+ diffViewMode: l = "unified"
587
591
  } = n;
588
- if (t) return An + ze;
592
+ if (t) return Bn + Me;
589
593
  const s = e.oldContent !== void 0 || e.newContent !== void 0, i = e.newPath ?? e.oldPath ?? "";
590
594
  if (we(i) && (e.oldContent || e.newContent))
591
- return Qe + Mn + ze;
592
- if (Ue(i) || !s || mt(e) && !l) return Ae();
595
+ return Qe + Hn + Me;
596
+ if (Ue(i) || !s || bt(e) && !o) return Ae();
593
597
  const {
594
598
  unifiedContentRows: a,
595
- splitContentRows: f,
596
- hunkRows: c
597
- } = ot({
599
+ splitContentRows: c,
600
+ hunkRows: f
601
+ } = it({
598
602
  original: e.oldContent ?? "",
599
603
  modified: e.newContent ?? "",
600
604
  oldPath: e.oldPath,
601
605
  newPath: e.newPath
602
- }), p = o === "split" ? f : a;
603
- if (p === 0 && c === 0) return Ae();
604
- const u = p * Tn + c * Fn;
605
- return Qe + u + ze;
606
- }, kn = (n) => n.newPath ?? n.oldPath ?? "unknown", Bn = 24, Nn = (n) => {
606
+ }), m = l === "split" ? c : a;
607
+ if (m === 0 && f === 0) return Ae();
608
+ const u = m * kn + f * Rn;
609
+ return Qe + u + Me;
610
+ }, $n = (n) => n.newPath ?? n.oldPath ?? "unknown", Vn = 24, jn = (n) => {
607
611
  const {
608
612
  diffs: e,
609
613
  selectedDiffPath: t,
610
- collapsedPaths: l,
611
- expansionCommand: o,
614
+ collapsedPaths: o,
615
+ expansionCommand: l,
612
616
  completedScrollCommandId: s
613
617
  } = n;
614
618
  let i = t, a = t ? `selected:${t}` : null;
615
- const f = o?.action === "expand-selected" ? o.id : null, c = f !== null && s === f;
616
- o?.action === "expand-selected" && o.path && (i = o.path, a = `command:${o.id}:${o.path}`);
617
- let p = a;
619
+ const c = l?.action === "expand-selected" ? l.id : null, f = c !== null && s === c;
620
+ l?.action === "expand-selected" && l.path && (i = l.path, a = `command:${l.id}:${l.path}`);
621
+ let m = a;
618
622
  if (i && a) {
619
- const m = l.has(i) ? "collapsed" : "expanded";
620
- p = `${a}:${m}`;
623
+ const p = o.has(i) ? "collapsed" : "expanded";
624
+ m = `${a}:${p}`;
621
625
  }
622
- const u = i ? e.findIndex((m) => kn(m) === i) : -1, d = u >= 0 && o?.action === "expand-selected" && o.direction === "up" && !c;
626
+ const u = i ? e.findIndex((p) => $n(p) === i) : -1, d = u >= 0 && l?.action === "expand-selected" && l.direction === "up" && !f;
623
627
  return {
624
628
  selectedScrollPath: i,
625
- selectedScrollKey: p,
626
- selectedScrollCommandId: f,
629
+ selectedScrollKey: m,
630
+ selectedScrollCommandId: c,
627
631
  selectedScrollIndex: u,
628
632
  shouldPinSelectedScrollIndex: d,
629
- hasCompletedSelectedScroll: c
633
+ hasCompletedSelectedScroll: f
630
634
  };
631
- }, Hn = (n) => {
635
+ }, Gn = (n) => {
632
636
  const {
633
637
  indexes: e,
634
638
  selectedScrollIndex: t,
635
- shouldPinSelectedScrollIndex: l
639
+ shouldPinSelectedScrollIndex: o
636
640
  } = n;
637
- if (!l || e.includes(t)) return e;
638
- const o = Math.max(0, t - Bn), s = Array.from({
639
- length: t - o + 1
640
- }, (i, a) => o + a);
641
+ if (!o || e.includes(t)) return e;
642
+ const l = Math.max(0, t - Vn), s = Array.from({
643
+ length: t - l + 1
644
+ }, (i, a) => l + a);
641
645
  return Array.from(/* @__PURE__ */ new Set([...e, ...s])).sort((i, a) => i - a);
642
- }, On = 3, $n = 12, Vn = (n) => n.newPath ?? n.oldPath ?? "unknown", jn = (n) => {
646
+ }, Wn = 3, Kn = 12, Qn = (n) => n.newPath ?? n.oldPath ?? "unknown", qn = (n) => {
643
647
  const e = F(20), {
644
648
  diffs: t,
645
- selectedDiffPath: l,
646
- collapsedPaths: o,
649
+ selectedDiffPath: o,
650
+ collapsedPaths: l,
647
651
  expansionCommand: s,
648
652
  scrollRef: i,
649
653
  virtualizerRef: a,
650
- suppressScrollAdjustRef: f
651
- } = n, [c, p] = X(null);
654
+ suppressScrollAdjustRef: c
655
+ } = n, [f, m] = X(null);
652
656
  let u;
653
- e[0] !== o || e[1] !== c || e[2] !== t || e[3] !== s || e[4] !== l ? (u = Nn({
657
+ e[0] !== l || e[1] !== f || e[2] !== t || e[3] !== s || e[4] !== o ? (u = jn({
654
658
  diffs: t,
655
- selectedDiffPath: l,
656
- collapsedPaths: o,
659
+ selectedDiffPath: o,
660
+ collapsedPaths: l,
657
661
  expansionCommand: s,
658
- completedScrollCommandId: c
659
- }), e[0] = o, e[1] = c, e[2] = t, e[3] = s, e[4] = l, e[5] = u) : u = e[5];
662
+ completedScrollCommandId: f
663
+ }), e[0] = l, e[1] = f, e[2] = t, e[3] = s, e[4] = o, e[5] = u) : u = e[5];
660
664
  const {
661
665
  selectedScrollPath: d,
662
- selectedScrollKey: m,
666
+ selectedScrollKey: p,
663
667
  selectedScrollCommandId: D,
664
668
  selectedScrollIndex: g,
665
669
  shouldPinSelectedScrollIndex: h,
666
670
  hasCompletedSelectedScroll: S
667
671
  } = u;
668
- let C, P;
669
- e[6] !== o || e[7] !== t || e[8] !== S || e[9] !== i || e[10] !== D || e[11] !== m || e[12] !== d || e[13] !== f || e[14] !== a ? (C = () => {
670
- if (!d || !m || S || o.has(d))
672
+ let C, y;
673
+ e[6] !== l || e[7] !== t || e[8] !== S || e[9] !== i || e[10] !== D || e[11] !== p || e[12] !== d || e[13] !== c || e[14] !== a ? (C = () => {
674
+ if (!d || !p || S || l.has(d))
671
675
  return;
672
- const x = t.findIndex((T) => Vn(T) === d);
676
+ const x = t.findIndex((T) => Qn(T) === d);
673
677
  if (x < 0)
674
678
  return;
675
679
  const E = a.current, b = i.current;
@@ -677,23 +681,23 @@ const Dn = (n) => {
677
681
  return;
678
682
  const v = [];
679
683
  let w = !1;
680
- f.current = !0;
684
+ c.current = !0;
681
685
  const I = () => {
682
- f.current = !1;
686
+ c.current = !1;
683
687
  }, L = () => {
684
- w = !0, I(), D !== null && p(D);
688
+ w = !0, I(), D !== null && m(D);
685
689
  };
686
- let z = 0;
687
- const M = () => {
690
+ let M = 0;
691
+ const z = () => {
688
692
  if (!w) {
689
693
  if (E.scrollToIndex(x, {
690
694
  align: "start"
691
- }), z = z + 1, z >= On && D !== null) {
692
- I(), p(D);
695
+ }), M = M + 1, M >= Wn && D !== null) {
696
+ I(), m(D);
693
697
  return;
694
698
  }
695
- if (z < $n) {
696
- v.push(requestAnimationFrame(M));
699
+ if (M < Kn) {
700
+ v.push(requestAnimationFrame(z));
697
701
  return;
698
702
  }
699
703
  I();
@@ -703,62 +707,62 @@ const Dn = (n) => {
703
707
  passive: !0
704
708
  }), b.addEventListener("touchmove", L, {
705
709
  passive: !0
706
- }), M(), () => {
710
+ }), z(), () => {
707
711
  I(), b.removeEventListener("wheel", L), b.removeEventListener("touchmove", L);
708
712
  for (const T of v)
709
713
  cancelAnimationFrame(T);
710
714
  };
711
- }, P = [m, d, D, S, t, o, i, a, f], e[6] = o, e[7] = t, e[8] = S, e[9] = i, e[10] = D, e[11] = m, e[12] = d, e[13] = f, e[14] = a, e[15] = C, e[16] = P) : (C = e[15], P = e[16]), Ge(C, P);
712
- let y;
713
- return e[17] !== g || e[18] !== h ? (y = {
715
+ }, y = [p, d, D, S, t, l, i, a, c], e[6] = l, e[7] = t, e[8] = S, e[9] = i, e[10] = D, e[11] = p, e[12] = d, e[13] = c, e[14] = a, e[15] = C, e[16] = y) : (C = e[15], y = e[16]), Ge(C, y);
716
+ let P;
717
+ return e[17] !== g || e[18] !== h ? (P = {
714
718
  selectedScrollIndex: g,
715
719
  shouldPinSelectedScrollIndex: h
716
- }, e[17] = g, e[18] = h, e[19] = y) : y = e[19], y;
717
- }, ee = (n) => n.newPath ?? n.oldPath ?? "unknown", et = 10, Gn = 100, Wn = (n) => n.length <= et ? /* @__PURE__ */ new Set() : new Set(n.filter((e, t) => {
718
- const l = (e.additions ?? 0) + (e.deletions ?? 0);
719
- return t >= et || l > Gn;
720
- }).map((e) => ee(e))), Kn = (n) => new Set(n.map((e) => ee(e))), Qn = (n, e) => {
720
+ }, e[17] = g, e[18] = h, e[19] = P) : P = e[19], P;
721
+ }, ee = (n) => n.newPath ?? n.oldPath ?? "unknown", et = 10, Un = 100, Yn = (n) => n.length <= et ? /* @__PURE__ */ new Set() : new Set(n.filter((e, t) => {
722
+ const o = (e.additions ?? 0) + (e.deletions ?? 0);
723
+ return t >= et || o > Un;
724
+ }).map((e) => ee(e))), Xn = (n) => new Set(n.map((e) => ee(e))), Jn = (n, e) => {
721
725
  const t = new Set(n);
722
726
  return t.has(e) ? t.delete(e) : t.add(e), t;
723
- }, gt = (n, e, t) => {
724
- if (!t || !e.has(t) || !n.some((o) => ee(o) === t)) return e;
725
- const l = new Set(e);
726
- return l.delete(t), l;
727
- }, qn = (n, e, t, l) => {
728
- const o = gt(n, e, t);
729
- if (!l || l === t || o.has(l) || !n.some((i) => ee(i) === l))
730
- return o;
731
- const s = o === e ? new Set(e) : o;
732
- return s.add(l), s;
727
+ }, xt = (n, e, t) => {
728
+ if (!t || !e.has(t) || !n.some((l) => ee(l) === t)) return e;
729
+ const o = new Set(e);
730
+ return o.delete(t), o;
731
+ }, Zn = (n, e, t, o) => {
732
+ const l = xt(n, e, t);
733
+ if (!o || o === t || l.has(o) || !n.some((i) => ee(i) === o))
734
+ return l;
735
+ const s = l === e ? new Set(e) : l;
736
+ return s.add(o), s;
733
737
  };
734
- function Un(n) {
738
+ function el(n) {
735
739
  const {
736
740
  diffs: e,
737
741
  selectedDiffPath: t = null,
738
- onLoadDiff: l,
739
- onSelectDiffPath: o,
742
+ onLoadDiff: o,
743
+ onSelectDiffPath: l,
740
744
  onExpansionStateChange: s,
741
745
  expansionCommand: i = null,
742
746
  diffViewMode: a = "unified"
743
- } = n, f = Z(null), c = Z(null), p = Z(null), u = Z(!1), d = Z(null), [m, D] = X(() => Wn(e)), [g, h] = X(() => /* @__PURE__ */ new Set()), {
747
+ } = n, c = Z(null), f = Z(null), m = Z(null), u = Z(!1), d = Z(null), [p, D] = X(() => Yn(e)), [g, h] = X(() => /* @__PURE__ */ new Set()), {
744
748
  selectedScrollIndex: S,
745
749
  shouldPinSelectedScrollIndex: C
746
- } = jn({
750
+ } = qn({
747
751
  diffs: e,
748
752
  selectedDiffPath: t,
749
- collapsedPaths: m,
753
+ collapsedPaths: p,
750
754
  expansionCommand: i,
751
- scrollRef: f,
752
- virtualizerRef: p,
755
+ scrollRef: c,
756
+ virtualizerRef: m,
753
757
  suppressScrollAdjustRef: u
754
- }), P = Rt({
758
+ }), y = Nt({
755
759
  count: e.length,
756
- getScrollElement: () => f.current,
760
+ getScrollElement: () => c.current,
757
761
  estimateSize: (b) => {
758
762
  const v = e[b], w = ee(v);
759
- return Rn({
763
+ return On({
760
764
  diff: v,
761
- isCollapsed: m.has(w),
765
+ isCollapsed: p.has(w),
762
766
  hasOptedIntoLargeDiff: g.has(w),
763
767
  diffViewMode: a
764
768
  });
@@ -766,106 +770,106 @@ function Un(n) {
766
770
  getItemKey: (b) => ee(e[b]),
767
771
  overscan: 3,
768
772
  rangeExtractor: (b) => {
769
- const v = kt(b);
770
- return Hn({
773
+ const v = Ht(b);
774
+ return Gn({
771
775
  indexes: v,
772
776
  selectedScrollIndex: S,
773
777
  shouldPinSelectedScrollIndex: C
774
778
  });
775
779
  }
776
780
  });
777
- if (P.shouldAdjustScrollPositionOnItemSizeChange = (b, v, w) => !w.isScrolling && !u.current, p.current = P, Ge(() => {
778
- t && D((b) => gt(e, b, t));
781
+ if (y.shouldAdjustScrollPositionOnItemSizeChange = (b, v, w) => !w.isScrolling && !u.current, m.current = y, Ge(() => {
782
+ t && D((b) => xt(e, b, t));
779
783
  }, [e, t]), Ge(() => {
780
784
  if (i) {
781
785
  if (i.action === "expand-selected") {
782
786
  const b = i.path;
783
787
  if (b) {
784
788
  const v = d.current;
785
- d.current = b, D((w) => qn(e, w, b, v));
789
+ d.current = b, D((w) => Zn(e, w, b, v));
786
790
  }
787
791
  return;
788
792
  }
789
- d.current = null, D(i.action === "collapse" ? Kn(e) : /* @__PURE__ */ new Set());
793
+ d.current = null, D(i.action === "collapse" ? Xn(e) : /* @__PURE__ */ new Set());
790
794
  }
791
- }, [e, i]), le(() => {
795
+ }, [e, i]), oe(() => {
792
796
  const b = {
793
- allExpanded: m.size === 0,
794
- allCollapsed: e.length > 0 && e.every((w) => m.has(ee(w)))
795
- }, v = c.current;
796
- v?.allExpanded === b.allExpanded && v.allCollapsed === b.allCollapsed || (c.current = b, s?.(b));
797
- }, [m, e, s]), e.length === 0) return /* @__PURE__ */ r(_n, {});
798
- const y = (b) => {
799
- D((v) => Qn(v, b));
797
+ allExpanded: p.size === 0,
798
+ allCollapsed: e.length > 0 && e.every((w) => p.has(ee(w)))
799
+ }, v = f.current;
800
+ v?.allExpanded === b.allExpanded && v.allCollapsed === b.allCollapsed || (f.current = b, s?.(b));
801
+ }, [p, e, s]), e.length === 0) return /* @__PURE__ */ r(zn, {});
802
+ const P = (b) => {
803
+ D((v) => Jn(v, b));
800
804
  }, x = (b) => {
801
805
  h((v) => {
802
806
  const w = new Set(v);
803
807
  return w.add(b), w;
804
808
  });
805
- }, E = P.getVirtualItems();
806
- return /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(O, { position: "relative", flex: "1", minH: "0", bg: "bg", children: /* @__PURE__ */ r(qe, { position: "absolute", inset: "0", viewportRef: f, viewportProps: {
809
+ }, E = y.getVirtualItems();
810
+ return /* @__PURE__ */ r(be, { h: "full", minH: "0", gap: "0", bg: "bg", children: /* @__PURE__ */ r(O, { position: "relative", flex: "1", minH: "0", bg: "bg", children: /* @__PURE__ */ r(qe, { position: "absolute", inset: "0", viewportRef: c, viewportProps: {
807
811
  style: {
808
812
  overflowAnchor: "none"
809
813
  }
810
814
  }, contentProps: {
811
815
  p: "xs"
812
816
  }, children: /* @__PURE__ */ r(O, { position: "relative", width: "100%", style: {
813
- height: P.getTotalSize()
817
+ height: y.getTotalSize()
814
818
  }, children: E.map((b) => {
815
819
  const v = e[b.index], w = ee(v);
816
- return /* @__PURE__ */ r(O, { "data-index": b.index, ref: P.measureElement, position: "absolute", left: "0", width: "100%", pb: "xs", style: {
820
+ return /* @__PURE__ */ r(O, { "data-index": b.index, ref: y.measureElement, position: "absolute", left: "0", width: "100%", pb: "xs", style: {
817
821
  top: `${b.start}px`
818
- }, children: /* @__PURE__ */ r(In, { diff: v, isSelected: t === w, isExpanded: !m.has(w), onToggleExpanded: () => y(w), onSelect: () => o?.(w), onLoadDiff: l, hasOptedIntoLargeDiff: g.has(w), onShowFullDiff: () => x(w), diffViewMode: a }, w) }, b.key);
822
+ }, children: /* @__PURE__ */ r(An, { diff: v, isSelected: t === w, isExpanded: !p.has(w), onToggleExpanded: () => P(w), onSelect: () => l?.(w), onLoadDiff: o, hasOptedIntoLargeDiff: g.has(w), onShowFullDiff: () => x(w), diffViewMode: a }, w) }, b.key);
819
823
  }) }) }) }) });
820
824
  }
821
- const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), bt = (n) => (n.sort((e, t) => e.type !== t.type ? e.type === "folder" ? -1 : 1 : e.name.localeCompare(t.name)), n.forEach((e) => {
822
- e.children && bt(e.children);
823
- }), n), St = (n) => Array.from(new Set(n.map(Yn).filter(Boolean))), Xn = (n) => St(n).map((e) => ({
825
+ const tl = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), wt = (n) => (n.sort((e, t) => e.type !== t.type ? e.type === "folder" ? -1 : 1 : e.name.localeCompare(t.name)), n.forEach((e) => {
826
+ e.children && wt(e.children);
827
+ }), n), Dt = (n) => Array.from(new Set(n.map(tl).filter(Boolean))), nl = (n) => Dt(n).map((e) => ({
824
828
  id: `file:${e}`,
825
829
  name: e,
826
830
  type: "file"
827
- })).sort((e, t) => e.name.localeCompare(t.name)), Me = (n, e) => {
828
- if (e === "flat") return Xn(n);
829
- const t = /* @__PURE__ */ new Map(), l = [];
830
- return St(n).forEach((o) => {
831
- const s = o.split("/");
831
+ })).sort((e, t) => e.name.localeCompare(t.name)), ze = (n, e) => {
832
+ if (e === "flat") return nl(n);
833
+ const t = /* @__PURE__ */ new Map(), o = [];
834
+ return Dt(n).forEach((l) => {
835
+ const s = l.split("/");
832
836
  let i = "", a = null;
833
- s.forEach((f, c) => {
834
- const p = i ? `${i}/${f}` : f, u = c === s.length - 1, d = `${u ? "file" : "folder"}:${p}`, m = t.get(d);
835
- if (m) {
836
- a = m, i = p;
837
+ s.forEach((c, f) => {
838
+ const m = i ? `${i}/${c}` : c, u = f === s.length - 1, d = `${u ? "file" : "folder"}:${m}`, p = t.get(d);
839
+ if (p) {
840
+ a = p, i = m;
837
841
  return;
838
842
  }
839
843
  const D = {
840
844
  id: d,
841
- name: f,
845
+ name: c,
842
846
  type: u ? "file" : "folder",
843
847
  ...u ? {} : {
844
848
  children: []
845
849
  }
846
850
  };
847
- t.set(d, D), a ? a.children?.push(D) : l.push(D), a = D, i = p;
851
+ t.set(d, D), a ? a.children?.push(D) : o.push(D), a = D, i = m;
848
852
  });
849
- }), bt(l);
853
+ }), wt(o);
850
854
  }, tt = (n) => {
851
- const e = [], t = (l) => {
852
- l.forEach((o) => {
853
- o.type === "folder" && (e.push(o.id), t(o.children ?? []));
855
+ const e = [], t = (o) => {
856
+ o.forEach((l) => {
857
+ l.type === "folder" && (e.push(l.id), t(l.children ?? []));
854
858
  });
855
859
  };
856
860
  return t(n), e;
857
- }, Jn = (n) => {
858
- const e = [], t = (l) => {
859
- l.forEach((o) => {
860
- if (o.type === "file") {
861
- e.push(o.id.replace(/^file:/, ""));
861
+ }, ll = (n) => {
862
+ const e = [], t = (o) => {
863
+ o.forEach((l) => {
864
+ if (l.type === "file") {
865
+ e.push(l.id.replace(/^file:/, ""));
862
866
  return;
863
867
  }
864
- t(o.children ?? []);
868
+ t(l.children ?? []);
865
869
  });
866
870
  };
867
871
  return t(n), e;
868
- }, Zn = (n, e) => e === "flat" ? [...n].sort((t, l) => t.localeCompare(l)) : Jn(Me(n, "nested")), eo = en((n) => ({
872
+ }, ol = (n, e) => e === "flat" ? [...n].sort((t, o) => t.localeCompare(o)) : ll(ze(n, "nested")), il = ln((n) => ({
869
873
  isTreePanelOpen: !0,
870
874
  viewMode: "nested",
871
875
  diffViewMode: "unified",
@@ -894,9 +898,9 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
894
898
  expandedFolderIds: new Set(e)
895
899
  }),
896
900
  toggleFolder: (e) => n((t) => {
897
- const l = new Set(t.expandedFolderIds);
898
- return l.has(e) ? l.delete(e) : l.add(e), {
899
- expandedFolderIds: l
901
+ const o = new Set(t.expandedFolderIds);
902
+ return o.has(e) ? o.delete(e) : o.add(e), {
903
+ expandedFolderIds: o
900
904
  };
901
905
  }),
902
906
  expandAll: (e) => n({
@@ -905,83 +909,83 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
905
909
  collapseAll: () => n({
906
910
  expandedFolderIds: /* @__PURE__ */ new Set()
907
911
  })
908
- })), to = (n) => {
912
+ })), sl = (n) => {
909
913
  const e = F(4);
910
914
  let t;
911
- e[0] !== n.selected ? (t = n.selected ? /* @__PURE__ */ r(rt, { size: 14 }) : null, e[0] = n.selected, e[1] = t) : t = e[1];
912
- let l;
913
- return e[2] !== t ? (l = /* @__PURE__ */ r(O, { w: "14px", flexShrink: 0, display: "flex", justifyContent: "center", children: t }), e[2] = t, e[3] = l) : l = e[3], l;
915
+ e[0] !== n.selected ? (t = n.selected ? /* @__PURE__ */ r(dt, { size: 14 }) : null, e[0] = n.selected, e[1] = t) : t = e[1];
916
+ let o;
917
+ return e[2] !== t ? (o = /* @__PURE__ */ r(O, { w: "14px", flexShrink: 0, display: "flex", justifyContent: "center", children: t }), e[2] = t, e[3] = o) : o = e[3], o;
914
918
  }, ne = (n) => {
915
919
  const e = F(15), {
916
920
  id: t,
917
- label: l,
918
- icon: o,
921
+ label: o,
922
+ icon: l,
919
923
  selected: s,
920
924
  disabled: i,
921
925
  onActivate: a
922
- } = n, f = s === void 0 ? void 0 : "menuitemradio";
923
- let c;
924
- e[0] !== s ? (c = s === void 0 ? void 0 : /* @__PURE__ */ r(to, { selected: s }), e[0] = s, e[1] = c) : c = e[1];
925
- let p;
926
- e[2] !== i || e[3] !== o || e[4] !== t || e[5] !== l || e[6] !== a || e[7] !== s || e[8] !== f || e[9] !== c ? (p = /* @__PURE__ */ r(Xt, { asChild: !0, role: f, "aria-checked": s, variant: "full-width", id: t, icon: o, label: l, disabled: i, isSelected: s, endContent: c, onActivate: a }), e[2] = i, e[3] = o, e[4] = t, e[5] = l, e[6] = a, e[7] = s, e[8] = f, e[9] = c, e[10] = p) : p = e[10];
926
+ } = n, c = s === void 0 ? void 0 : "menuitemradio";
927
+ let f;
928
+ e[0] !== s ? (f = s === void 0 ? void 0 : /* @__PURE__ */ r(sl, { selected: s }), e[0] = s, e[1] = f) : f = e[1];
929
+ let m;
930
+ e[2] !== i || e[3] !== l || e[4] !== t || e[5] !== o || e[6] !== a || e[7] !== s || e[8] !== c || e[9] !== f ? (m = /* @__PURE__ */ r(en, { asChild: !0, role: c, "aria-checked": s, variant: "full-width", id: t, icon: l, label: o, disabled: i, isSelected: s, endContent: f, onActivate: a }), e[2] = i, e[3] = l, e[4] = t, e[5] = o, e[6] = a, e[7] = s, e[8] = c, e[9] = f, e[10] = m) : m = e[10];
927
931
  let u;
928
- return e[11] !== i || e[12] !== t || e[13] !== p ? (u = /* @__PURE__ */ r(J.Item, { value: t, disabled: i, asChild: !0, children: p }), e[11] = i, e[12] = t, e[13] = p, e[14] = u) : u = e[14], u;
929
- }, no = (n) => {
932
+ return e[11] !== i || e[12] !== t || e[13] !== m ? (u = /* @__PURE__ */ r(J.Item, { value: t, disabled: i, asChild: !0, children: m }), e[11] = i, e[12] = t, e[13] = m, e[14] = u) : u = e[14], u;
933
+ }, rl = (n) => {
930
934
  const e = F(40), {
931
935
  isTreePanelOpen: t,
932
- hasFilePaths: l,
933
- viewMode: o,
936
+ hasFilePaths: o,
937
+ viewMode: l,
934
938
  diffViewMode: s,
935
939
  isExpandAllDisabled: i,
936
940
  isCollapseAllDisabled: a,
937
- onToggleTreePanel: f,
938
- onViewModeChange: c,
939
- onDiffViewModeChange: p,
941
+ onToggleTreePanel: c,
942
+ onViewModeChange: f,
943
+ onDiffViewModeChange: m,
940
944
  onExpandAll: u,
941
945
  onCollapseAll: d
942
946
  } = n;
943
- let m;
944
- e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ r(J.Trigger, { asChild: !0, children: /* @__PURE__ */ r(Ke, { "aria-label": "Diff view options", variant: "ghost", size: "sm", children: /* @__PURE__ */ r(Ot, { size: 14 }) }) }), e[0] = m) : m = e[0];
947
+ let p;
948
+ e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (p = /* @__PURE__ */ r(J.Trigger, { asChild: !0, children: /* @__PURE__ */ r(Ke, { "aria-label": "Diff view options", variant: "ghost", size: "sm", children: /* @__PURE__ */ r(jt, { size: 14 }) }) }), e[0] = p) : p = e[0];
945
949
  let D;
946
- e[1] !== t ? (D = t ? /* @__PURE__ */ r(jt, { size: 14 }) : /* @__PURE__ */ r(Gt, { size: 14 }), e[1] = t, e[2] = D) : D = e[2];
950
+ e[1] !== t ? (D = t ? /* @__PURE__ */ r(Kt, { size: 14 }) : /* @__PURE__ */ r(Qt, { size: 14 }), e[1] = t, e[2] = D) : D = e[2];
947
951
  const g = t ? "Hide file tree" : "Show file tree";
948
952
  let h;
949
- e[3] !== f || e[4] !== D || e[5] !== g ? (h = /* @__PURE__ */ r(ne, { id: "toggle-file-tree", icon: D, label: g, onActivate: f }), e[3] = f, e[4] = D, e[5] = g, e[6] = h) : h = e[6];
953
+ e[3] !== c || e[4] !== D || e[5] !== g ? (h = /* @__PURE__ */ r(ne, { id: "toggle-file-tree", icon: D, label: g, onActivate: c }), e[3] = c, e[4] = D, e[5] = g, e[6] = h) : h = e[6];
950
954
  let S;
951
955
  e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (S = /* @__PURE__ */ r(J.Separator, {}), e[7] = S) : S = e[7];
952
956
  let C;
953
- e[8] !== l || e[9] !== c || e[10] !== o ? (C = l ? /* @__PURE__ */ G(Pt, { children: [
954
- /* @__PURE__ */ r(ne, { id: "nested", icon: /* @__PURE__ */ r($t, { size: 14 }), label: "Nested", selected: o === "nested", onActivate: () => c("nested") }),
955
- /* @__PURE__ */ r(ne, { id: "flat", icon: /* @__PURE__ */ r(Vt, { size: 14 }), label: "Flat", selected: o === "flat", onActivate: () => c("flat") }),
957
+ e[8] !== o || e[9] !== f || e[10] !== l ? (C = o ? /* @__PURE__ */ G(Et, { children: [
958
+ /* @__PURE__ */ r(ne, { id: "nested", icon: /* @__PURE__ */ r(Gt, { size: 14 }), label: "Nested", selected: l === "nested", onActivate: () => f("nested") }),
959
+ /* @__PURE__ */ r(ne, { id: "flat", icon: /* @__PURE__ */ r(Wt, { size: 14 }), label: "Flat", selected: l === "flat", onActivate: () => f("flat") }),
956
960
  /* @__PURE__ */ r(J.Separator, {})
957
- ] }) : null, e[8] = l, e[9] = c, e[10] = o, e[11] = C) : C = e[11];
958
- let P;
959
- e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = /* @__PURE__ */ r(Wt, { size: 14 }), e[12] = P) : P = e[12];
960
- const y = s === "unified";
961
+ ] }) : null, e[8] = o, e[9] = f, e[10] = l, e[11] = C) : C = e[11];
962
+ let y;
963
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ r(qt, { size: 14 }), e[12] = y) : y = e[12];
964
+ const P = s === "unified";
961
965
  let x;
962
- e[13] !== p ? (x = () => p("unified"), e[13] = p, e[14] = x) : x = e[14];
966
+ e[13] !== m ? (x = () => m("unified"), e[13] = m, e[14] = x) : x = e[14];
963
967
  let E;
964
- e[15] !== y || e[16] !== x ? (E = /* @__PURE__ */ r(ne, { id: "unified", icon: P, label: "Unified", selected: y, onActivate: x }), e[15] = y, e[16] = x, e[17] = E) : E = e[17];
968
+ e[15] !== P || e[16] !== x ? (E = /* @__PURE__ */ r(ne, { id: "unified", icon: y, label: "Unified", selected: P, onActivate: x }), e[15] = P, e[16] = x, e[17] = E) : E = e[17];
965
969
  let b;
966
- e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ r(Kt, { size: 14 }), e[18] = b) : b = e[18];
970
+ e[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = /* @__PURE__ */ r(Ut, { size: 14 }), e[18] = b) : b = e[18];
967
971
  const v = s === "split";
968
972
  let w;
969
- e[19] !== p ? (w = () => p("split"), e[19] = p, e[20] = w) : w = e[20];
973
+ e[19] !== m ? (w = () => m("split"), e[19] = m, e[20] = w) : w = e[20];
970
974
  let I;
971
975
  e[21] !== v || e[22] !== w ? (I = /* @__PURE__ */ r(ne, { id: "split", icon: b, label: "Split", selected: v, onActivate: w }), e[21] = v, e[22] = w, e[23] = I) : I = e[23];
972
976
  let L;
973
977
  e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (L = /* @__PURE__ */ r(J.Separator, {}), e[24] = L) : L = e[24];
974
- let z;
975
- e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (z = /* @__PURE__ */ r(Qt, { size: 14 }), e[25] = z) : z = e[25];
976
978
  let M;
977
- e[26] !== i || e[27] !== u ? (M = /* @__PURE__ */ r(ne, { id: "expand-all", icon: z, label: "Expand all", disabled: i, onActivate: u }), e[26] = i, e[27] = u, e[28] = M) : M = e[28];
979
+ e[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (M = /* @__PURE__ */ r(Yt, { size: 14 }), e[25] = M) : M = e[25];
980
+ let z;
981
+ e[26] !== i || e[27] !== u ? (z = /* @__PURE__ */ r(ne, { id: "expand-all", icon: M, label: "Expand all", disabled: i, onActivate: u }), e[26] = i, e[27] = u, e[28] = z) : z = e[28];
978
982
  let T;
979
- e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ r(qt, { size: 14 }), e[29] = T) : T = e[29];
983
+ e[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ r(Xt, { size: 14 }), e[29] = T) : T = e[29];
980
984
  let _;
981
985
  e[30] !== a || e[31] !== d ? (_ = /* @__PURE__ */ r(ne, { id: "collapse-all", icon: T, label: "Collapse all", disabled: a, onActivate: d }), e[30] = a, e[31] = d, e[32] = _) : _ = e[32];
982
986
  let A;
983
- return e[33] !== I || e[34] !== M || e[35] !== _ || e[36] !== h || e[37] !== C || e[38] !== E ? (A = /* @__PURE__ */ G(J.Root, { children: [
984
- m,
987
+ return e[33] !== I || e[34] !== z || e[35] !== _ || e[36] !== h || e[37] !== C || e[38] !== E ? (A = /* @__PURE__ */ G(J.Root, { children: [
988
+ p,
985
989
  /* @__PURE__ */ r(J.Positioner, { children: /* @__PURE__ */ G(J.Content, { minW: "190px", bg: "bg", p: "0", gap: "0", children: [
986
990
  h,
987
991
  S,
@@ -989,25 +993,25 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
989
993
  E,
990
994
  I,
991
995
  L,
992
- M,
996
+ z,
993
997
  _
994
998
  ] }) })
995
- ] }), e[33] = I, e[34] = M, e[35] = _, e[36] = h, e[37] = C, e[38] = E, e[39] = A) : A = e[39], A;
996
- }, oo = {
999
+ ] }), e[33] = I, e[34] = z, e[35] = _, e[36] = h, e[37] = C, e[38] = E, e[39] = A) : A = e[39], A;
1000
+ }, al = {
997
1001
  added: "A",
998
1002
  copied: "C",
999
1003
  deleted: "D",
1000
1004
  modified: "M",
1001
1005
  permissionChange: "M",
1002
1006
  renamed: "R"
1003
- }, lo = {
1007
+ }, dl = {
1004
1008
  added: "green",
1005
1009
  copied: "purple",
1006
1010
  deleted: "red",
1007
1011
  modified: "blue",
1008
1012
  permissionChange: "yellow",
1009
1013
  renamed: "orange"
1010
- }, io = {
1014
+ }, cl = {
1011
1015
  added: {
1012
1016
  color: "fg.success",
1013
1017
  backgroundColor: "bg.success"
@@ -1016,18 +1020,18 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
1016
1020
  color: "fg.error",
1017
1021
  backgroundColor: "bg.error"
1018
1022
  }
1019
- }, so = (n) => {
1023
+ }, fl = (n) => {
1020
1024
  const e = F(5), {
1021
1025
  change: t
1022
1026
  } = n;
1023
- let l;
1024
- e[0] !== t ? (l = io[t] ?? {
1025
- colorPalette: lo[t] ?? "gray"
1026
- }, e[0] = t, e[1] = l) : l = e[1];
1027
- const o = l, s = oo[t] ?? t;
1027
+ let o;
1028
+ e[0] !== t ? (o = cl[t] ?? {
1029
+ colorPalette: dl[t] ?? "gray"
1030
+ }, e[0] = t, e[1] = o) : o = e[1];
1031
+ const l = o, s = al[t] ?? t;
1028
1032
  let i;
1029
- return e[2] !== o || e[3] !== s ? (i = /* @__PURE__ */ r(_t, { size: "xs", variant: "subtle", flexShrink: 0, ...o, children: s }), e[2] = o, e[3] = s, e[4] = i) : i = e[4], i;
1030
- }, ro = (n) => {
1033
+ return e[2] !== l || e[3] !== s ? (i = /* @__PURE__ */ r(At, { size: "xs", variant: "subtle", flexShrink: 0, ...l, children: s }), e[2] = l, e[3] = s, e[4] = i) : i = e[4], i;
1034
+ }, hl = (n) => {
1031
1035
  const e = n.lastIndexOf("/");
1032
1036
  return e < 0 ? {
1033
1037
  fileName: n,
@@ -1036,22 +1040,22 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
1036
1040
  fileName: n.slice(e + 1),
1037
1041
  dirPath: n.slice(0, e)
1038
1042
  };
1039
- }, ao = (n, e, t) => {
1043
+ }, ul = (n, e, t) => {
1040
1044
  const {
1041
- fileName: l,
1042
- dirPath: o
1043
- } = ro(t);
1044
- return e !== "flat" || !o ? n.name : /* @__PURE__ */ G(q, { textStyle: "label/S/regular", truncate: !0, children: [
1045
- /* @__PURE__ */ r(q, { as: "span", color: "fg.default", children: l }),
1045
+ fileName: o,
1046
+ dirPath: l
1047
+ } = hl(t);
1048
+ return e !== "flat" || !l ? n.name : /* @__PURE__ */ G(q, { textStyle: "label/S/regular", truncate: !0, children: [
1049
+ /* @__PURE__ */ r(q, { as: "span", color: "fg.default", children: o }),
1046
1050
  " ",
1047
- /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", children: o })
1051
+ /* @__PURE__ */ r(q, { as: "span", color: "fg.muted", children: l })
1048
1052
  ] });
1049
- }, xt = (n) => {
1053
+ }, Ct = (n) => {
1050
1054
  const {
1051
1055
  nodes: e,
1052
1056
  viewMode: t,
1053
- onSelectPath: l,
1054
- resolveFileIcon: o,
1057
+ onSelectPath: o,
1058
+ resolveFileIcon: l,
1055
1059
  changeByPath: s
1056
1060
  } = n;
1057
1061
  return e.map((i) => {
@@ -1060,116 +1064,116 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
1060
1064
  id: i.id,
1061
1065
  label: i.name,
1062
1066
  isContainer: !0,
1063
- children: xt({
1067
+ children: Ct({
1064
1068
  nodes: i.children ?? [],
1065
1069
  viewMode: t,
1066
- onSelectPath: l,
1067
- resolveFileIcon: o,
1070
+ onSelectPath: o,
1071
+ resolveFileIcon: l,
1068
1072
  changeByPath: s
1069
1073
  })
1070
1074
  };
1071
- const a = i.id.replace(/^file:/, ""), f = o?.(a) ?? {
1072
- icon: /* @__PURE__ */ r(Tt, { as: Ut, boxSize: "16px" }),
1075
+ const a = i.id.replace(/^file:/, ""), c = l?.(a) ?? {
1076
+ icon: /* @__PURE__ */ r(Mt, { as: Jt, boxSize: "16px" }),
1073
1077
  color: "fg.subtle"
1074
- }, c = s?.get(a);
1078
+ }, f = s?.get(a);
1075
1079
  return {
1076
1080
  id: i.id,
1077
- label: ao(i, t, a),
1078
- icon: f.icon,
1079
- iconColor: f.color,
1080
- endContent: c ? /* @__PURE__ */ r(so, { change: c }) : void 0,
1081
- onActivate: () => l(a)
1081
+ label: ul(i, t, a),
1082
+ icon: c.icon,
1083
+ iconColor: c.color,
1084
+ endContent: f ? /* @__PURE__ */ r(fl, { change: f }) : void 0,
1085
+ onActivate: () => o(a)
1082
1086
  };
1083
1087
  });
1084
- }, fo = (n) => {
1088
+ }, pl = (n) => {
1085
1089
  const e = F(23), {
1086
1090
  paths: t,
1087
- selectedPath: l,
1088
- viewMode: o,
1091
+ selectedPath: o,
1092
+ viewMode: l,
1089
1093
  searchQuery: s,
1090
1094
  expandedFolderIds: i,
1091
1095
  onSelectPath: a,
1092
- onSearchQueryChange: f,
1093
- onToggleFolder: c,
1094
- resolveFileIcon: p,
1096
+ onSearchQueryChange: c,
1097
+ onToggleFolder: f,
1098
+ resolveFileIcon: m,
1095
1099
  changeByPath: u
1096
1100
  } = n, d = Z(null);
1097
- let m;
1098
- if (e[0] !== u || e[1] !== a || e[2] !== t || e[3] !== p || e[4] !== o) {
1099
- const E = Me(t, o);
1100
- m = xt({
1101
+ let p;
1102
+ if (e[0] !== u || e[1] !== a || e[2] !== t || e[3] !== m || e[4] !== l) {
1103
+ const E = ze(t, l);
1104
+ p = Ct({
1101
1105
  nodes: E,
1102
- viewMode: o,
1106
+ viewMode: l,
1103
1107
  onSelectPath: a,
1104
- resolveFileIcon: p,
1108
+ resolveFileIcon: m,
1105
1109
  changeByPath: u
1106
- }), e[0] = u, e[1] = a, e[2] = t, e[3] = p, e[4] = o, e[5] = m;
1110
+ }), e[0] = u, e[1] = a, e[2] = t, e[3] = m, e[4] = l, e[5] = p;
1107
1111
  } else
1108
- m = e[5];
1109
- const D = m, g = s.trim() ? "No matching files" : "No changed files";
1112
+ p = e[5];
1113
+ const D = p, g = s.trim() ? "No matching files" : "No changed files";
1110
1114
  let h;
1111
- e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ r(Yt, { size: 14 }), e[6] = h) : h = e[6];
1115
+ e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ r(Zt, { size: 14 }), e[6] = h) : h = e[6];
1112
1116
  let S;
1113
- e[7] !== f ? (S = (E) => f(E.target.value), e[7] = f, e[8] = S) : S = e[8];
1117
+ e[7] !== c ? (S = (E) => c(E.target.value), e[7] = c, e[8] = S) : S = e[8];
1114
1118
  let C;
1115
- e[9] !== s || e[10] !== S ? (C = /* @__PURE__ */ r(at, { flexShrink: 0, borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(Ft, { startElement: h, children: /* @__PURE__ */ r(At, { size: "sm", variant: "borderless", "aria-label": "Search files", placeholder: "Search files", value: s, onChange: S }) }) }), e[9] = s, e[10] = S, e[11] = C) : C = e[11];
1116
- let P;
1117
- e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
1119
+ e[9] !== s || e[10] !== S ? (C = /* @__PURE__ */ r(ct, { flexShrink: 0, borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", children: /* @__PURE__ */ r(zt, { startElement: h, children: /* @__PURE__ */ r(kt, { size: "sm", variant: "borderless", "aria-label": "Search files", placeholder: "Search files", value: s, onChange: S }) }) }), e[9] = s, e[10] = S, e[11] = C) : C = e[11];
1120
+ let y;
1121
+ e[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = {
1118
1122
  style: {
1119
1123
  overflowX: "hidden"
1120
1124
  }
1121
- }, e[12] = P) : P = e[12];
1122
- let y;
1123
- e[13] !== g || e[14] !== i || e[15] !== c || e[16] !== t.length || e[17] !== l || e[18] !== D ? (y = /* @__PURE__ */ r(qe, { flex: "1", minH: "0", minW: "0", bg: "bg", viewportRef: d, viewportProps: P, children: t.length > 0 ? /* @__PURE__ */ r(Jt, { sections: [{
1125
+ }, e[12] = y) : y = e[12];
1126
+ let P;
1127
+ e[13] !== g || e[14] !== i || e[15] !== f || e[16] !== t.length || e[17] !== o || e[18] !== D ? (P = /* @__PURE__ */ r(qe, { flex: "1", minH: "0", minW: "0", bg: "bg", viewportRef: d, viewportProps: y, children: t.length > 0 ? /* @__PURE__ */ r(tn, { sections: [{
1124
1128
  id: "files",
1125
1129
  nodes: D
1126
- }], expandedNodeIds: [...i], activeNodeId: l ? `file:${l}` : null, rowVariant: "tree", onToggleNode: c, virtualize: !0, scrollRef: d }) : /* @__PURE__ */ r(O, { px: "xs", py: "xs", children: /* @__PURE__ */ r(Se, { title: g, size: "sm", textAlign: "left", alignItems: "flex-start" }) }) }), e[13] = g, e[14] = i, e[15] = c, e[16] = t.length, e[17] = l, e[18] = D, e[19] = y) : y = e[19];
1130
+ }], expandedNodeIds: [...i], activeNodeId: o ? `file:${o}` : null, rowVariant: "tree", onToggleNode: f, virtualize: !0, scrollRef: d }) : /* @__PURE__ */ r(O, { px: "xs", py: "xs", children: /* @__PURE__ */ r(Se, { title: g, size: "sm", textAlign: "left", alignItems: "flex-start" }) }) }), e[13] = g, e[14] = i, e[15] = f, e[16] = t.length, e[17] = o, e[18] = D, e[19] = P) : P = e[19];
1127
1131
  let x;
1128
- return e[20] !== C || e[21] !== y ? (x = /* @__PURE__ */ G(be, { h: "full", minH: "0", minW: "0", w: "full", gap: "0", overflow: "hidden", bg: "bg", children: [
1132
+ return e[20] !== C || e[21] !== P ? (x = /* @__PURE__ */ G(be, { h: "full", minH: "0", minW: "0", w: "full", gap: "0", overflow: "hidden", bg: "bg", children: [
1129
1133
  C,
1130
- y
1131
- ] }), e[20] = C, e[21] = y, e[22] = x) : x = e[22], x;
1132
- }, oe = (n) => n.newPath ?? n.oldPath ?? "unknown", co = (n) => new Map(n.map((e) => [oe(e), e.change])), ho = (n) => n.reduce((e, t) => ({
1134
+ P
1135
+ ] }), e[20] = C, e[21] = P, e[22] = x) : x = e[22], x;
1136
+ }, le = (n) => n.newPath ?? n.oldPath ?? "unknown", ml = (n) => new Map(n.map((e) => [le(e), e.change])), gl = (n) => n.reduce((e, t) => ({
1133
1137
  additions: e.additions + (t.additions ?? 0),
1134
1138
  deletions: e.deletions + (t.deletions ?? 0)
1135
1139
  }), {
1136
1140
  additions: 0,
1137
1141
  deletions: 0
1138
- }), uo = (n) => {
1142
+ }), bl = (n) => {
1139
1143
  const {
1140
1144
  diffs: e,
1141
1145
  normalizedSearchQuery: t,
1142
- viewMode: l
1143
- } = n, o = t ? e.filter((a) => oe(a).toLowerCase().includes(t)) : e, s = Zn(o.map(oe), l), i = new Map(s.map((a, f) => [a, f]));
1144
- return [...o].sort((a, f) => {
1145
- const c = i.get(oe(a)) ?? Number.MAX_SAFE_INTEGER, p = i.get(oe(f)) ?? Number.MAX_SAFE_INTEGER;
1146
- return c - p;
1146
+ viewMode: o
1147
+ } = n, l = t ? e.filter((a) => le(a).toLowerCase().includes(t)) : e, s = ol(l.map(le), o), i = new Map(s.map((a, c) => [a, c]));
1148
+ return [...l].sort((a, c) => {
1149
+ const f = i.get(le(a)) ?? Number.MAX_SAFE_INTEGER, m = i.get(le(c)) ?? Number.MAX_SAFE_INTEGER;
1150
+ return f - m;
1147
1151
  });
1148
- }, nt = (n, e) => n[0] ?? e[0] ?? null, mo = ["first", "second", "third"], po = () => {
1152
+ }, nt = (n, e) => n[0] ?? e[0] ?? null, Sl = ["first", "second", "third"], xl = () => {
1149
1153
  const n = F(1);
1150
1154
  let e;
1151
- return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { flex: "1", minH: "0", bg: "bg", p: "xs", gap: "xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff panel", children: mo.map(go) }), n[0] = e) : e = n[0], e;
1152
- }, ko = (n) => {
1155
+ return n[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ r(be, { flex: "1", minH: "0", bg: "bg", p: "xs", gap: "xs", role: "status", "aria-busy": "true", "aria-label": "Loading diff panel", children: Sl.map(wl) }), n[0] = e) : e = n[0], e;
1156
+ }, Hl = (n) => {
1153
1157
  const e = F(109), {
1154
1158
  diffs: t,
1155
- changedFilePaths: l,
1156
- defaultSelectedPath: o,
1159
+ changedFilePaths: o,
1160
+ defaultSelectedPath: l,
1157
1161
  loading: s,
1158
1162
  onLoadDiff: i,
1159
1163
  resolveFileIcon: a
1160
- } = n, f = o === void 0 ? null : o, c = s === void 0 ? !1 : s, [p, u] = X(null);
1164
+ } = n, c = l === void 0 ? null : l, f = s === void 0 ? !1 : s, [m, u] = X(null);
1161
1165
  let d;
1162
1166
  e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
1163
1167
  allExpanded: !1,
1164
1168
  allCollapsed: !1
1165
1169
  }, e[0] = d) : d = e[0];
1166
- const [m, D] = X(d), {
1170
+ const [p, D] = X(d), {
1167
1171
  isTreePanelOpen: g,
1168
1172
  viewMode: h,
1169
1173
  diffViewMode: S,
1170
1174
  searchQuery: C,
1171
- selectedPath: P,
1172
- expandedFolderIds: y,
1175
+ selectedPath: y,
1176
+ expandedFolderIds: P,
1173
1177
  setTreePanelOpen: x,
1174
1178
  setViewMode: E,
1175
1179
  setDiffViewMode: b,
@@ -1177,121 +1181,121 @@ const Yn = (n) => n.split("/").map((e) => e.trim()).filter(Boolean).join("/"), b
1177
1181
  setSelectedPath: w,
1178
1182
  setExpandedFolderIds: I,
1179
1183
  toggleFolder: L,
1180
- expandAll: z,
1181
- collapseAll: M
1182
- } = eo();
1183
- let T, _, A, R, k, $, N, B, V, j, W, U, H, ie, De, Y;
1184
- if (e[1] !== l || e[2] !== f || e[3] !== t || e[4] !== y || e[5] !== c || e[6] !== C || e[7] !== P || e[8] !== h) {
1185
- const K = t.map(oe);
1186
- R = l ?? K;
1184
+ expandAll: M,
1185
+ collapseAll: z
1186
+ } = il();
1187
+ let T, _, A, k, R, $, N, B, V, j, W, U, H, ie, De, Y;
1188
+ if (e[1] !== o || e[2] !== c || e[3] !== t || e[4] !== P || e[5] !== f || e[6] !== C || e[7] !== y || e[8] !== h) {
1189
+ const K = t.map(le);
1190
+ k = o ?? K;
1187
1191
  const Q = C.trim().toLowerCase();
1188
- V = Q ? R.filter((xe) => xe.toLowerCase().includes(Q)) : R, N = uo({
1192
+ V = Q ? k.filter((xe) => xe.toLowerCase().includes(Q)) : k, N = bl({
1189
1193
  diffs: t,
1190
1194
  normalizedSearchQuery: Q,
1191
1195
  viewMode: h
1192
1196
  });
1193
1197
  let te;
1194
- e[25] !== t ? (te = co(t), e[25] = t, e[26] = te) : te = e[26], _ = te, $ = N.map(oe);
1195
- const je = Me(V, h);
1196
- j = h === "nested" ? tt(je) : [], B = V.join("\0"), k = $.join("\0"), H = P ?? f ?? nt($, V), W = N.length > 0, A = Q ? "No matching changes" : "No changes", ie = !c && !W, Y = ho(N), U = j.length > 0 || N.length > 0;
1197
- let pe;
1198
- e[27] !== y ? (pe = (xe) => y.has(xe), e[27] = y, e[28] = pe) : pe = e[28], T = j.every(pe);
1198
+ e[25] !== t ? (te = ml(t), e[25] = t, e[26] = te) : te = e[26], _ = te, $ = N.map(le);
1199
+ const je = ze(V, h);
1200
+ j = h === "nested" ? tt(je) : [], B = V.join("\0"), R = $.join("\0"), H = y ?? c ?? nt($, V), W = N.length > 0, A = Q ? "No matching changes" : "No changes", ie = !f && !W, Y = gl(N), U = j.length > 0 || N.length > 0;
1201
+ let me;
1202
+ e[27] !== P ? (me = (xe) => P.has(xe), e[27] = P, e[28] = me) : me = e[28], T = j.every(me);
1199
1203
  let Fe;
1200
- e[29] !== y ? (Fe = (xe) => !y.has(xe), e[29] = y, e[30] = Fe) : Fe = e[30], De = j.every(Fe), e[1] = l, e[2] = f, e[3] = t, e[4] = y, e[5] = c, e[6] = C, e[7] = P, e[8] = h, e[9] = T, e[10] = _, e[11] = A, e[12] = R, e[13] = k, e[14] = $, e[15] = N, e[16] = B, e[17] = V, e[18] = j, e[19] = W, e[20] = U, e[21] = H, e[22] = ie, e[23] = De, e[24] = Y;
1204
+ e[29] !== P ? (Fe = (xe) => !P.has(xe), e[29] = P, e[30] = Fe) : Fe = e[30], De = j.every(Fe), e[1] = o, e[2] = c, e[3] = t, e[4] = P, e[5] = f, e[6] = C, e[7] = y, e[8] = h, e[9] = T, e[10] = _, e[11] = A, e[12] = k, e[13] = R, e[14] = $, e[15] = N, e[16] = B, e[17] = V, e[18] = j, e[19] = W, e[20] = U, e[21] = H, e[22] = ie, e[23] = De, e[24] = Y;
1201
1205
  } else
1202
- T = e[9], _ = e[10], A = e[11], R = e[12], k = e[13], $ = e[14], N = e[15], B = e[16], V = e[17], j = e[18], W = e[19], U = e[20], H = e[21], ie = e[22], De = e[23], Y = e[24];
1203
- const wt = De, Dt = N.length === 0 || m.allExpanded, Ct = N.length === 0 || m.allCollapsed, Re = !U || T && Dt, ke = !U || wt && Ct;
1204
- let Ce, Pe;
1206
+ T = e[9], _ = e[10], A = e[11], k = e[12], R = e[13], $ = e[14], N = e[15], B = e[16], V = e[17], j = e[18], W = e[19], U = e[20], H = e[21], ie = e[22], De = e[23], Y = e[24];
1207
+ const yt = De, Pt = N.length === 0 || p.allExpanded, vt = N.length === 0 || p.allCollapsed, ke = !U || T && Pt, Re = !U || yt && vt;
1208
+ let Ce, ye;
1205
1209
  e[31] !== B || e[32] !== I || e[33] !== h ? (Ce = () => {
1206
- const K = B ? B.split("\0") : [], Q = Me(K, h);
1210
+ const K = B ? B.split("\0") : [], Q = ze(K, h);
1207
1211
  I(h === "nested" ? tt(Q) : []);
1208
- }, Pe = [B, I, h], e[31] = B, e[32] = I, e[33] = h, e[34] = Ce, e[35] = Pe) : (Ce = e[34], Pe = e[35]), le(Ce, Pe);
1209
- let ye, ve;
1210
- e[36] !== k || e[37] !== B || e[38] !== H || e[39] !== w ? (ye = () => {
1211
- const K = k ? k.split("\0") : [], Q = B ? B.split("\0") : [];
1212
+ }, ye = [B, I, h], e[31] = B, e[32] = I, e[33] = h, e[34] = Ce, e[35] = ye) : (Ce = e[34], ye = e[35]), oe(Ce, ye);
1213
+ let Pe, ve;
1214
+ e[36] !== R || e[37] !== B || e[38] !== H || e[39] !== w ? (Pe = () => {
1215
+ const K = R ? R.split("\0") : [], Q = B ? B.split("\0") : [];
1212
1216
  H && K.includes(H) || w(nt(K, Q));
1213
- }, ve = [k, B, H, w], e[36] = k, e[37] = B, e[38] = H, e[39] = w, e[40] = ye, e[41] = ve) : (ye = e[40], ve = e[41]), le(ye, ve);
1217
+ }, ve = [R, B, H, w], e[36] = R, e[37] = B, e[38] = H, e[39] = w, e[40] = Pe, e[41] = ve) : (Pe = e[40], ve = e[41]), oe(Pe, ve);
1214
1218
  let Ee;
1215
- e[42] !== z || e[43] !== j ? (Ee = () => {
1216
- z(j), u(bo);
1217
- }, e[42] = z, e[43] = j, e[44] = Ee) : Ee = e[44];
1219
+ e[42] !== M || e[43] !== j ? (Ee = () => {
1220
+ M(j), u(Dl);
1221
+ }, e[42] = M, e[43] = j, e[44] = Ee) : Ee = e[44];
1218
1222
  const Be = Ee;
1219
1223
  let Ie;
1220
- e[45] !== M ? (Ie = () => {
1221
- M(), u(So);
1222
- }, e[45] = M, e[46] = Ie) : Ie = e[46];
1224
+ e[45] !== z ? (Ie = () => {
1225
+ z(), u(Cl);
1226
+ }, e[45] = z, e[46] = Ie) : Ie = e[46];
1223
1227
  const Ne = Ie;
1224
1228
  let Le;
1225
1229
  e[47] !== $ || e[48] !== H || e[49] !== w ? (Le = (K) => {
1226
1230
  const Q = H ? $.indexOf(H) : -1, te = $.indexOf(K), je = Q >= 0 && te >= 0 && te < Q ? "up" : "down";
1227
- w(K), u((pe) => ({
1231
+ w(K), u((me) => ({
1228
1232
  action: "expand-selected",
1229
1233
  direction: je,
1230
- id: (pe?.id ?? 0) + 1,
1234
+ id: (me?.id ?? 0) + 1,
1231
1235
  path: K
1232
1236
  }));
1233
1237
  }, e[47] = $, e[48] = H, e[49] = w, e[50] = Le) : Le = e[50];
1234
- const He = Le, Oe = R.length > 0;
1238
+ const He = Le, Oe = k.length > 0;
1235
1239
  let se;
1236
1240
  e[51] !== g || e[52] !== x ? (se = () => x(!g), e[51] = g, e[52] = x, e[53] = se) : se = e[53];
1237
1241
  let re;
1238
- e[54] !== Ne || e[55] !== S || e[56] !== Be || e[57] !== ke || e[58] !== Re || e[59] !== g || e[60] !== b || e[61] !== E || e[62] !== Oe || e[63] !== se || e[64] !== h ? (re = /* @__PURE__ */ r(no, { isTreePanelOpen: g, hasFilePaths: Oe, viewMode: h, diffViewMode: S, isExpandAllDisabled: Re, isCollapseAllDisabled: ke, onToggleTreePanel: se, onViewModeChange: E, onDiffViewModeChange: b, onExpandAll: Be, onCollapseAll: Ne }), e[54] = Ne, e[55] = S, e[56] = Be, e[57] = ke, e[58] = Re, e[59] = g, e[60] = b, e[61] = E, e[62] = Oe, e[63] = se, e[64] = h, e[65] = re) : re = e[65];
1242
+ e[54] !== Ne || e[55] !== S || e[56] !== Be || e[57] !== Re || e[58] !== ke || e[59] !== g || e[60] !== b || e[61] !== E || e[62] !== Oe || e[63] !== se || e[64] !== h ? (re = /* @__PURE__ */ r(rl, { isTreePanelOpen: g, hasFilePaths: Oe, viewMode: h, diffViewMode: S, isExpandAllDisabled: ke, isCollapseAllDisabled: Re, onToggleTreePanel: se, onViewModeChange: E, onDiffViewModeChange: b, onExpandAll: Be, onCollapseAll: Ne }), e[54] = Ne, e[55] = S, e[56] = Be, e[57] = Re, e[58] = ke, e[59] = g, e[60] = b, e[61] = E, e[62] = Oe, e[63] = se, e[64] = h, e[65] = re) : re = e[65];
1239
1243
  let ae;
1240
1244
  e[66] !== A || e[67] !== ie ? (ae = ie ? /* @__PURE__ */ r(q, { textStyle: "label/S/regular", color: "fg.muted", truncate: !0, children: A }) : null, e[66] = A, e[67] = ie, e[68] = ae) : ae = e[68];
1241
1245
  let de;
1242
- e[69] !== re || e[70] !== ae ? (de = /* @__PURE__ */ G(zt, { gap: "xs", minW: "0", children: [
1246
+ e[69] !== re || e[70] !== ae ? (de = /* @__PURE__ */ G(Rt, { gap: "xs", minW: "0", children: [
1243
1247
  re,
1244
1248
  ae
1245
1249
  ] }), e[69] = re, e[70] = ae, e[71] = de) : de = e[71];
1246
- let fe;
1247
- e[72] !== Y.additions || e[73] !== Y.deletions ? (fe = /* @__PURE__ */ r(lt, { variant: "ghost", size: "small", additions: Y.additions, deletions: Y.deletions }), e[72] = Y.additions, e[73] = Y.deletions, e[74] = fe) : fe = e[74];
1248
1250
  let ce;
1249
- e[75] !== de || e[76] !== fe ? (ce = /* @__PURE__ */ G(at, { variant: "main", borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", justifyContent: "space-between", children: [
1251
+ e[72] !== Y.additions || e[73] !== Y.deletions ? (ce = /* @__PURE__ */ r(st, { variant: "ghost", size: "small", additions: Y.additions, deletions: Y.deletions }), e[72] = Y.additions, e[73] = Y.deletions, e[74] = ce) : ce = e[74];
1252
+ let fe;
1253
+ e[75] !== de || e[76] !== ce ? (fe = /* @__PURE__ */ G(ct, { variant: "main", borderBottomWidth: "1px", borderColor: "border.subtle", bg: "bg", justifyContent: "space-between", children: [
1250
1254
  de,
1251
- fe
1252
- ] }), e[75] = de, e[76] = fe, e[77] = ce) : ce = e[77];
1255
+ ce
1256
+ ] }), e[75] = de, e[76] = ce, e[77] = fe) : fe = e[77];
1253
1257
  let he;
1254
- e[78] !== p || e[79] !== S || e[80] !== A || e[81] !== N || e[82] !== W || e[83] !== c || e[84] !== i || e[85] !== H || e[86] !== w ? (he = c ? /* @__PURE__ */ r(po, {}) : W ? /* @__PURE__ */ r(O, { flex: "1", minH: "0", children: /* @__PURE__ */ r(Un, { diffs: N, selectedDiffPath: H, onLoadDiff: i, onSelectDiffPath: w, onExpansionStateChange: D, expansionCommand: p, diffViewMode: S }) }) : /* @__PURE__ */ r(O, { flex: "1", minH: "0", px: "md", py: "lg", display: "flex", alignItems: "center", justifyContent: "center", bg: "bg", children: /* @__PURE__ */ r(Se, { title: A }) }), e[78] = p, e[79] = S, e[80] = A, e[81] = N, e[82] = W, e[83] = c, e[84] = i, e[85] = H, e[86] = w, e[87] = he) : he = e[87];
1258
+ e[78] !== m || e[79] !== S || e[80] !== A || e[81] !== N || e[82] !== W || e[83] !== f || e[84] !== i || e[85] !== H || e[86] !== w ? (he = f ? /* @__PURE__ */ r(xl, {}) : W ? /* @__PURE__ */ r(O, { flex: "1", minH: "0", children: /* @__PURE__ */ r(el, { diffs: N, selectedDiffPath: H, onLoadDiff: i, onSelectDiffPath: w, onExpansionStateChange: D, expansionCommand: m, diffViewMode: S }) }) : /* @__PURE__ */ r(O, { flex: "1", minH: "0", px: "md", py: "lg", display: "flex", alignItems: "center", justifyContent: "center", bg: "bg", children: /* @__PURE__ */ r(Se, { title: A }) }), e[78] = m, e[79] = S, e[80] = A, e[81] = N, e[82] = W, e[83] = f, e[84] = i, e[85] = H, e[86] = w, e[87] = he) : he = e[87];
1255
1259
  let _e;
1256
- e[88] !== ce || e[89] !== he ? (_e = /* @__PURE__ */ G(be, { h: "full", minH: "0", minW: "0", flex: "1", bg: "bg", gap: "0", children: [
1257
- ce,
1260
+ e[88] !== fe || e[89] !== he ? (_e = /* @__PURE__ */ G(be, { h: "full", minH: "0", minW: "0", flex: "1", bg: "bg", gap: "0", children: [
1261
+ fe,
1258
1262
  he
1259
- ] }), e[88] = ce, e[89] = he, e[90] = _e) : _e = e[90];
1263
+ ] }), e[88] = fe, e[89] = he, e[90] = _e) : _e = e[90];
1260
1264
  const $e = _e;
1261
1265
  let ue;
1262
- e[91] !== _ || e[92] !== y || e[93] !== V || e[94] !== a || e[95] !== H || e[96] !== C || e[97] !== He || e[98] !== v || e[99] !== L || e[100] !== h ? (ue = /* @__PURE__ */ r(fo, { paths: V, selectedPath: H, viewMode: h, searchQuery: C, expandedFolderIds: y, onSelectPath: He, onSearchQueryChange: v, onToggleFolder: L, resolveFileIcon: a, changeByPath: _ }), e[91] = _, e[92] = y, e[93] = V, e[94] = a, e[95] = H, e[96] = C, e[97] = He, e[98] = v, e[99] = L, e[100] = h, e[101] = ue) : ue = e[101];
1266
+ e[91] !== _ || e[92] !== P || e[93] !== V || e[94] !== a || e[95] !== H || e[96] !== C || e[97] !== He || e[98] !== v || e[99] !== L || e[100] !== h ? (ue = /* @__PURE__ */ r(pl, { paths: V, selectedPath: H, viewMode: h, searchQuery: C, expandedFolderIds: P, onSelectPath: He, onSearchQueryChange: v, onToggleFolder: L, resolveFileIcon: a, changeByPath: _ }), e[91] = _, e[92] = P, e[93] = V, e[94] = a, e[95] = H, e[96] = C, e[97] = He, e[98] = v, e[99] = L, e[100] = h, e[101] = ue) : ue = e[101];
1263
1267
  const Ve = !g;
1264
- let me;
1265
- e[102] !== x ? (me = (K) => x(!K), e[102] = x, e[103] = me) : me = e[103];
1268
+ let pe;
1269
+ e[102] !== x ? (pe = (K) => x(!K), e[102] = x, e[103] = pe) : pe = e[103];
1266
1270
  let Te;
1267
- return e[104] !== $e || e[105] !== ue || e[106] !== Ve || e[107] !== me ? (Te = /* @__PURE__ */ r(Mt, { flex: "1", minH: "0", minW: "0", bg: "bg", gap: "0", "data-testid": "diff-viewer", children: /* @__PURE__ */ r(Zt, { flex: "1", minH: "0", minW: "0", resizablePanel: ue, contentPanel: $e, collapsed: Ve, defaultSizePx: 288, minSizePx: 224, contentMinSizePx: 320, resizeLabel: "Resize file list panel", onCollapsedChange: me }) }), e[104] = $e, e[105] = ue, e[106] = Ve, e[107] = me, e[108] = Te) : Te = e[108], Te;
1271
+ return e[104] !== $e || e[105] !== ue || e[106] !== Ve || e[107] !== pe ? (Te = /* @__PURE__ */ r(Bt, { flex: "1", minH: "0", minW: "0", bg: "bg", gap: "0", "data-testid": "diff-viewer", children: /* @__PURE__ */ r(nn, { flex: "1", minH: "0", minW: "0", resizablePanel: ue, contentPanel: $e, collapsed: Ve, defaultSizePx: 288, minSizePx: 224, contentMinSizePx: 320, resizeLabel: "Resize file list panel", separator: "line", onCollapsedChange: pe }) }), e[104] = $e, e[105] = ue, e[106] = Ve, e[107] = pe, e[108] = Te) : Te = e[108], Te;
1268
1272
  };
1269
- function go(n) {
1270
- return /* @__PURE__ */ r(st, { h: "72px", w: "full", flexShrink: "0", borderRadius: "xs" }, n);
1273
+ function wl(n) {
1274
+ return /* @__PURE__ */ r(at, { h: "72px", w: "full", flexShrink: "0", borderRadius: "xs" }, n);
1271
1275
  }
1272
- function bo(n) {
1276
+ function Dl(n) {
1273
1277
  return {
1274
1278
  action: "expand",
1275
1279
  id: (n?.id ?? 0) + 1
1276
1280
  };
1277
1281
  }
1278
- function So(n) {
1282
+ function Cl(n) {
1279
1283
  return {
1280
1284
  action: "collapse",
1281
1285
  id: (n?.id ?? 0) + 1
1282
1286
  };
1283
1287
  }
1284
1288
  export {
1285
- Ro as CodeDiffEditor,
1286
- Mo as CodeEditor,
1287
- lt as DiffBubble,
1288
- Un as DiffDrawer,
1289
- ko as DiffViewer,
1290
- so as FileChangeBadge,
1291
- dn as LARGE_DIFF_LINE_THRESHOLD,
1289
+ Nl as CodeDiffEditor,
1290
+ Bl as CodeEditor,
1291
+ st as DiffBubble,
1292
+ el as DiffDrawer,
1293
+ Hl as DiffViewer,
1294
+ fl as FileChangeBadge,
1295
+ pn as LARGE_DIFF_LINE_THRESHOLD,
1292
1296
  Ue as isBinaryDiffPath,
1293
- hn as isGeneratedDiffPath,
1294
- zo as preloadCodeEditor,
1295
- eo as useDiffViewerStore
1297
+ bn as isGeneratedDiffPath,
1298
+ ft as preloadCodeEditor,
1299
+ il as useDiffViewerStore
1296
1300
  };
1297
1301
  //# sourceMappingURL=diff.js.map