@peasant-labs/fairtrade 0.0.40 → 0.0.42

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 (42) hide show
  1. package/THIRD_PARTY_NOTICES.md +14 -0
  2. package/dist/lib/{GraphLegend-nwqBLEcI.js → GraphLegend-CBKZsRta.js} +1259 -1399
  3. package/dist/lib/adapter-Dulh38C2.js +1214 -0
  4. package/dist/lib/commons.js +202 -201
  5. package/dist/lib/components.css +1 -1
  6. package/dist/lib/graph.js +474 -471
  7. package/dist/lib/share-fonts/AtkinsonHyperlegible-Bold.ttf +0 -0
  8. package/dist/lib/share-fonts/AtkinsonHyperlegible-Regular.ttf +0 -0
  9. package/dist/lib/share-fonts/AtkinsonHyperlegibleMono-Bold.ttf +0 -0
  10. package/dist/lib/share-fonts/AtkinsonHyperlegibleMono-Regular.ttf +0 -0
  11. package/dist/lib/share-fonts/OFL-AtkinsonHyperlegible.txt +92 -0
  12. package/dist/lib/share-fonts/OFL-AtkinsonHyperlegibleMono.txt +93 -0
  13. package/dist/lib/share.js +1311 -0
  14. package/dist/lib/time-CpVBzcqQ.js +157 -0
  15. package/dist/lib/types/AppSidebar.d.ts +2 -0
  16. package/dist/lib/types/BrandMark.d.ts +2 -6
  17. package/dist/lib/types/Menu.d.ts +7 -1
  18. package/dist/lib/types/brand-geometry.d.ts +22 -0
  19. package/dist/lib/types/commons/providers.d.ts +1 -1
  20. package/dist/lib/types/graph/CodeMapComposition.d.ts +4 -1
  21. package/dist/lib/types/graph/CodeMapNavigator.d.ts +5 -1
  22. package/dist/lib/types/share/ShareCard.d.ts +40 -0
  23. package/dist/lib/types/share/data.d.ts +54 -0
  24. package/dist/lib/types/share/fonts.d.ts +16 -0
  25. package/dist/lib/types/share/index.d.ts +5 -0
  26. package/dist/lib/types/share/marks.d.ts +23 -0
  27. package/dist/lib/types/share/metrics.d.ts +10 -0
  28. package/dist/lib/types/transcript/title.d.ts +21 -0
  29. package/dist/lib/types/ui/brand-geometry.d.ts +22 -0
  30. package/dist/lib/types/ui/format.d.ts +35 -0
  31. package/dist/lib/types/ui/provider-policy.d.ts +27 -0
  32. package/dist/lib/types/ui/transcript/adapter.d.ts +66 -0
  33. package/dist/lib/types/ui/transcript/adapter.parse.d.ts +103 -0
  34. package/dist/lib/types/ui/transcript/analytics.d.ts +213 -0
  35. package/dist/lib/types/ui/transcript/time.d.ts +47 -0
  36. package/dist/lib/types/ui/transcript/title.d.ts +84 -0
  37. package/dist/lib/types/ui/transcript/usage.d.ts +19 -0
  38. package/dist/lib/types/ui/transcript/view-model.d.ts +700 -0
  39. package/dist/lib/types/ui/transcript/wire-types.d.ts +63 -0
  40. package/dist/lib/{ui-DMUCYaeU.js → ui-BxiVcGs3.js} +3724 -4913
  41. package/dist/lib/ui.js +7 -5
  42. package/package.json +18 -6
package/dist/lib/graph.js CHANGED
@@ -1,19 +1,20 @@
1
- import { $ as e, A as t, At as n, B as r, C as i, D as a, E as o, F as s, G as c, H as l, I as u, J as d, K as f, L as p, M as m, Mt as h, N as g, O as _, P as v, Q as y, R as b, S as x, St as S, T as C, U as w, V as T, W as E, X as D, Y as O, Z as k, a as A, at as j, b as M, c as N, dt as P, et as F, f as I, ft as L, ht as ee, i as R, it as te, j as ne, k as re, l as ie, lt as ae, mt as oe, n as se, nt as ce, o as le, ot as ue, pt as de, q as fe, r as pe, rt as me, s as he, st as ge, t as _e, tt as ve, ut as ye, w as be, wt as xe, yt as Se, z as Ce } from "./GraphLegend-nwqBLEcI.js";
2
- import { a as we, n as Te, r as Ee } from "./format-B3uT2wzU.js";
3
- import { memo as De, useCallback as z, useEffect as B, useMemo as V, useRef as H, useState as U } from "react";
4
- import { Fragment as Oe, jsx as W, jsxs as G } from "react/jsx-runtime";
5
- import { Box as ke, Check as Ae, ChevronDown as je, ChevronRight as K, Coins as Me, CornerDownRight as Ne, FileCode as Pe, FileDiff as Fe, FileText as Ie, Folder as Le, GitMerge as Re, Hash as ze, Map as Be, Maximize2 as Ve, MessageSquare as He, Minus as Ue, Plus as We, RotateCcw as Ge, RotateCw as Ke, Search as qe, Share2 as Je, Star as Ye, Tag as Xe, TriangleAlert as Ze, X as Qe } from "lucide-react";
6
- import { AllChangeBindings as $e, AllDiffLineKinds as et, AllEdgeViolationKinds as tt, AllFileChangeStatuses as nt, AllInsightKinds as rt, AllInsightProvenances as it, AllMapNodeKinds as at, AllReadAttributionStates as ot, AllReadStateGrades as st, ChangeBinding as ct, DiffLineKind as lt, EdgeViolationKind as ut, FileChangeStatus as dt, InsightKind as ft, InsightProvenance as pt, MapNodeKind as mt, ReadAttributionState as ht, ReadStateGrade as gt, isChangeBinding as _t, isDiffLineKind as vt, isEdgeViolationKind as yt, isFileChangeStatus as bt, isInsightKind as xt, isInsightProvenance as St, isMapNodeKind as Ct, isReadAttributionState as wt, isReadStateGrade as Tt } from "@peasant-labs/schema";
7
- import { Background as Et, BackgroundVariant as Dt, Handle as q, MiniMap as Ot, Position as J, ReactFlow as kt, ReactFlowProvider as At, useEdgesState as jt, useNodesState as Mt, useReactFlow as Nt } from "@xyflow/react";
1
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as f, M as p, N as m, O as h, P as g, Q as _, R as v, S as y, T as b, U as x, V as S, W as C, X as w, Y as T, Z as E, _ as D, a as O, at as k, b as A, c as j, ct as M, et as N, f as P, g as F, gt as ee, i as I, it as te, j as ne, k as re, l as ie, lt as ae, m as oe, n as se, o as ce, ot as le, pt as ue, q as de, r as fe, rt as pe, s as me, st as he, t as ge, tt as _e, v as ve, vt as ye, w as be, wt as xe, x as Se, y as Ce, z as we } from "./GraphLegend-CBKZsRta.js";
2
+ import { p as Te } from "./time-CpVBzcqQ.js";
3
+ import { a as Ee, n as De, r as Oe } from "./format-B3uT2wzU.js";
4
+ import { memo as ke, useCallback as L, useEffect as R, useMemo as z, useRef as B, useState as V } from "react";
5
+ import { Fragment as Ae, jsx as H, jsxs as U } from "react/jsx-runtime";
6
+ import { Box as je, Check as Me, ChevronDown as Ne, ChevronRight as W, Coins as Pe, CornerDownRight as Fe, FileCode as Ie, FileDiff as Le, FileText as Re, Folder as ze, GitMerge as Be, Hash as Ve, Map as He, Maximize2 as Ue, MessageSquare as We, Minus as Ge, Plus as Ke, RotateCcw as qe, RotateCw as Je, Search as Ye, Share2 as Xe, Star as Ze, Tag as Qe, TriangleAlert as $e, X as et } from "lucide-react";
7
+ import { AllChangeBindings as tt, AllDiffLineKinds as nt, AllEdgeViolationKinds as rt, AllFileChangeStatuses as it, AllInsightKinds as at, AllInsightProvenances as ot, AllMapNodeKinds as st, AllReadAttributionStates as ct, AllReadStateGrades as lt, ChangeBinding as ut, DiffLineKind as dt, EdgeViolationKind as ft, FileChangeStatus as pt, InsightKind as mt, InsightProvenance as ht, MapNodeKind as gt, ReadAttributionState as _t, ReadStateGrade as vt, isChangeBinding as yt, isDiffLineKind as bt, isEdgeViolationKind as xt, isFileChangeStatus as St, isInsightKind as Ct, isInsightProvenance as wt, isMapNodeKind as Tt, isReadAttributionState as Et, isReadStateGrade as Dt } from "@peasant-labs/schema";
8
+ import { Background as Ot, BackgroundVariant as kt, Handle as G, MiniMap as At, Position as K, ReactFlow as jt, ReactFlowProvider as Mt, useEdgesState as Nt, useNodesState as Pt, useReactFlow as Ft } from "@xyflow/react";
8
9
  //#region src/ui/graph/changeGraph.js
9
- var Pt = 6e4, Ft = 60 * Pt, It = 24 * Ft, Lt = 7 * It;
10
- function Y(e, t) {
10
+ var It = 6e4, Lt = 60 * It, Rt = 24 * Lt, zt = 7 * Rt;
11
+ function q(e, t) {
11
12
  if (e == null) return "";
12
13
  let n = Math.max(0, t - e);
13
- return n < Ft ? `${Math.max(1, Math.floor(n / Pt))}m ago` : n < It ? `${Math.floor(n / Ft)}h ago` : n < Lt ? `${Math.floor(n / It)}d ago` : `${Math.floor(n / Lt)}wk ago`;
14
+ return n < Lt ? `${Math.max(1, Math.floor(n / It))}m ago` : n < Rt ? `${Math.floor(n / Lt)}h ago` : n < zt ? `${Math.floor(n / Rt)}d ago` : `${Math.floor(n / zt)}wk ago`;
14
15
  }
15
- function Rt(e, { nowMs: t }) {
16
- let n = e.recentCommits ?? [], r = e.changes ?? [], i = e.defaultBranch, a = e.sessions ?? [], o = new Map(a.map((e) => [e.sessionId, e])), s = new Set(n.flatMap((e) => e.sessionIds ?? [])), c = r.filter((e) => !e.merged).slice().sort((e, t) => zt(t) - zt(e) || e.branch.localeCompare(t.branch)), l = r.filter((e) => e.merged && !e.reverted), u = r.filter((e) => e.merged && e.reverted), d = new Map(l.filter((e) => e.mergeCommitHash).map((e) => [e.mergeCommitHash, e])), f = c.map((e, t) => ({
16
+ function Bt(e, { nowMs: t }) {
17
+ let n = e.recentCommits ?? [], r = e.changes ?? [], i = e.defaultBranch, a = e.sessions ?? [], o = new Map(a.map((e) => [e.sessionId, e])), s = new Set(n.flatMap((e) => e.sessionIds ?? [])), c = r.filter((e) => !e.merged).slice().sort((e, t) => Vt(t) - Vt(e) || e.branch.localeCompare(t.branch)), l = r.filter((e) => e.merged && !e.reverted), u = r.filter((e) => e.merged && e.reverted), d = new Map(l.filter((e) => e.mergeCommitHash).map((e) => [e.mergeCommitHash, e])), f = c.map((e, t) => ({
17
18
  change: e,
18
19
  lane: t + 1,
19
20
  baseHash: e.baseHash,
@@ -33,7 +34,7 @@ function Rt(e, { nowMs: t }) {
33
34
  branch: i.branch,
34
35
  session: (i.sessionCount ?? 0) > 0,
35
36
  tip: !0,
36
- time: Y(n.tipMs, t)
37
+ time: q(n.tipMs, t)
37
38
  });
38
39
  }
39
40
  };
@@ -52,13 +53,13 @@ function Rt(e, { nowMs: t }) {
52
53
  return t ? [t] : [];
53
54
  }),
54
55
  merged: c ? !0 : void 0,
55
- time: Y(e.timeMs, t)
56
+ time: q(e.timeMs, t)
56
57
  });
57
58
  }), h(-Infinity);
58
59
  let g = u.map((e) => ({
59
60
  branch: e.branch,
60
61
  mergedAtMs: e.mergedAtMs ?? null,
61
- when: Y(e.mergedAtMs, t)
62
+ when: q(e.mergedAtMs, t)
62
63
  })), _ = a.filter((e) => e.hasCommitBinding === !0 && !s.has(e.sessionId));
63
64
  return {
64
65
  commits: p,
@@ -69,33 +70,33 @@ function Rt(e, { nowMs: t }) {
69
70
  outsideWindowSessions: _
70
71
  };
71
72
  }
72
- function zt(e) {
73
+ function Vt(e) {
73
74
  return e.tipCommitMs ?? Infinity;
74
75
  }
75
76
  //#endregion
76
77
  //#region src/ui/graph/Changes.jsx
77
- function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelectChange: i, onOpenMap: a, hasMore: o = !1, onShowOlder: s, onOpenSession: c, nowMs: l, headerActions: u }) {
78
- let d = l ?? Date.now(), { commits: f, reverted: p, unlinkedSessions: m, outsideWindowSessions: h, openCount: g, mergedCount: _ } = V(() => Rt(e, { nowMs: d }), [e, d]), v = e.defaultBranch, y = V(() => new Set(f.filter((e) => (e.sessionRefs?.length ?? 0) > 2).map((e) => e.id)), [f]), [b, x] = U([]);
79
- B(() => {
78
+ function Ht({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelectChange: i, onOpenMap: a, hasMore: o = !1, onShowOlder: s, onOpenSession: c, nowMs: l, headerActions: u }) {
79
+ let d = l ?? Date.now(), { commits: f, reverted: p, unlinkedSessions: m, outsideWindowSessions: h, openCount: g, mergedCount: _ } = z(() => Bt(e, { nowMs: d }), [e, d]), v = e.defaultBranch, y = z(() => new Set(f.filter((e) => (e.sessionRefs?.length ?? 0) > 2).map((e) => e.id)), [f]), [b, x] = V([]);
80
+ R(() => {
80
81
  x((e) => {
81
82
  let t = e.filter((e) => y.has(e));
82
83
  return t.length === e.length ? e : t;
83
84
  });
84
85
  }, [y]);
85
- let S = z((e) => {
86
+ let S = L((e) => {
86
87
  y.has(e) && x((t) => {
87
88
  let n = new Set(t);
88
89
  return n.has(e) ? n.delete(e) : n.add(e), [...n];
89
90
  });
90
91
  }, [y]);
91
- return /* @__PURE__ */ G("div", {
92
+ return /* @__PURE__ */ U("div", {
92
93
  className: "gmp-root gmp-changes-root",
93
- children: [/* @__PURE__ */ G("div", {
94
+ children: [/* @__PURE__ */ U("div", {
94
95
  className: "gmp-changes-head",
95
- children: [/* @__PURE__ */ G("div", { children: [t && /* @__PURE__ */ G("span", {
96
+ children: [/* @__PURE__ */ U("div", { children: [t && /* @__PURE__ */ U("span", {
96
97
  className: "label",
97
98
  children: ["lines of work, ", t]
98
- }), /* @__PURE__ */ G("div", {
99
+ }), /* @__PURE__ */ U("div", {
99
100
  className: "gmp-changes-sub mono",
100
101
  children: [
101
102
  v ? `default branch ${v}, ` : "",
@@ -104,24 +105,24 @@ function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
104
105
  _,
105
106
  " merged"
106
107
  ]
107
- })] }), /* @__PURE__ */ G("div", {
108
+ })] }), /* @__PURE__ */ U("div", {
108
109
  className: "gmp-head-actions",
109
- children: [u, /* @__PURE__ */ G("button", {
110
+ children: [u, /* @__PURE__ */ U("button", {
110
111
  type: "button",
111
112
  className: "btn btn-secondary btn-sm",
112
113
  onClick: () => {
113
114
  r ? r({ type: "open-map" }) : a?.();
114
115
  },
115
- children: [/* @__PURE__ */ W(ke, {
116
+ children: [/* @__PURE__ */ H(je, {
116
117
  size: 14,
117
118
  "aria-hidden": "true"
118
119
  }), " open the map"]
119
120
  })]
120
121
  })]
121
- }), /* @__PURE__ */ G("div", {
122
+ }), /* @__PURE__ */ U("div", {
122
123
  className: "gmp-changes-body",
123
124
  children: [
124
- /* @__PURE__ */ W(ae, {
125
+ /* @__PURE__ */ H(pe, {
125
126
  className: "gmp-cg",
126
127
  commits: f,
127
128
  selectedId: n,
@@ -134,16 +135,16 @@ function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
134
135
  expandedCommitSessions: b,
135
136
  onToggleCommitSessions: S
136
137
  }),
137
- m.length > 0 && /* @__PURE__ */ G("section", {
138
+ m.length > 0 && /* @__PURE__ */ U("section", {
138
139
  className: "gmp-unlinked-sessions",
139
140
  "aria-labelledby": "gmp-unlinked-sessions-heading",
140
- children: [/* @__PURE__ */ W("h2", {
141
+ children: [/* @__PURE__ */ H("h2", {
141
142
  id: "gmp-unlinked-sessions-heading",
142
143
  className: "sb-head gmp-unlinked-sessions-head",
143
144
  children: "sessions not linked to a commit"
144
- }), /* @__PURE__ */ W("div", {
145
+ }), /* @__PURE__ */ H("div", {
145
146
  className: "gmp-unlinked-sessions-list",
146
- children: m.map((e) => /* @__PURE__ */ G("button", {
147
+ children: m.map((e) => /* @__PURE__ */ U("button", {
147
148
  type: "button",
148
149
  className: "gmp-unlinked-session",
149
150
  onClick: () => {
@@ -153,20 +154,20 @@ function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
153
154
  source: { kind: "unlinked" }
154
155
  }) : c?.(e.sessionId);
155
156
  },
156
- children: [/* @__PURE__ */ W(Se, { harness: e.harness }), /* @__PURE__ */ W("span", { children: e.title || e.sessionId })]
157
+ children: [/* @__PURE__ */ H(ue, { harness: e.harness }), /* @__PURE__ */ H("span", { children: e.title || e.sessionId })]
157
158
  }, e.sessionId))
158
159
  })]
159
160
  }),
160
- h.length > 0 && /* @__PURE__ */ G("section", {
161
+ h.length > 0 && /* @__PURE__ */ U("section", {
161
162
  className: "gmp-unlinked-sessions",
162
163
  "aria-labelledby": "gmp-outside-window-sessions-heading",
163
- children: [/* @__PURE__ */ W("h2", {
164
+ children: [/* @__PURE__ */ H("h2", {
164
165
  id: "gmp-outside-window-sessions-heading",
165
166
  className: "sb-head gmp-unlinked-sessions-head",
166
167
  children: "sessions linked outside this visible commit window"
167
- }), /* @__PURE__ */ W("div", {
168
+ }), /* @__PURE__ */ H("div", {
168
169
  className: "gmp-unlinked-sessions-list",
169
- children: h.map((e) => /* @__PURE__ */ G("button", {
170
+ children: h.map((e) => /* @__PURE__ */ U("button", {
170
171
  type: "button",
171
172
  className: "gmp-unlinked-session",
172
173
  onClick: () => {
@@ -176,18 +177,18 @@ function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
176
177
  source: { kind: "outside-window" }
177
178
  }) : c?.(e.sessionId);
178
179
  },
179
- children: [/* @__PURE__ */ W(Se, { harness: e.harness }), /* @__PURE__ */ W("span", { children: e.title || e.sessionId })]
180
+ children: [/* @__PURE__ */ H(ue, { harness: e.harness }), /* @__PURE__ */ H("span", { children: e.title || e.sessionId })]
180
181
  }, e.sessionId))
181
182
  })]
182
183
  }),
183
- p.length > 0 && /* @__PURE__ */ G("div", {
184
+ p.length > 0 && /* @__PURE__ */ U("div", {
184
185
  className: "gmp-merged-sec",
185
- children: [/* @__PURE__ */ W("div", {
186
+ children: [/* @__PURE__ */ H("div", {
186
187
  className: "sb-head gmp-merged-head",
187
188
  children: "already merged in"
188
- }), /* @__PURE__ */ W("div", {
189
+ }), /* @__PURE__ */ H("div", {
189
190
  className: "gmp-merged-list",
190
- children: p.map((e) => /* @__PURE__ */ G("button", {
191
+ children: p.map((e) => /* @__PURE__ */ U("button", {
191
192
  type: "button",
192
193
  className: "gmp-merged-chip gmp-merged-revert",
193
194
  onClick: () => {
@@ -204,7 +205,7 @@ function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
204
205
  }) : i?.(t);
205
206
  },
206
207
  children: [
207
- /* @__PURE__ */ W(Re, {
208
+ /* @__PURE__ */ H(Be, {
208
209
  size: 14,
209
210
  "aria-hidden": "true"
210
211
  }),
@@ -216,23 +217,23 @@ function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
216
217
  }, e.branch))
217
218
  })]
218
219
  }),
219
- /* @__PURE__ */ G("div", {
220
+ /* @__PURE__ */ U("div", {
220
221
  className: "gmp-changes-legend",
221
222
  children: [
222
- /* @__PURE__ */ G("span", {
223
+ /* @__PURE__ */ U("span", {
223
224
  className: "gmp-legend-item",
224
- children: [/* @__PURE__ */ W("span", {
225
+ children: [/* @__PURE__ */ H("span", {
225
226
  className: "cg-dot cg-dot-filled",
226
227
  "aria-hidden": "true",
227
- children: /* @__PURE__ */ W(Ye, {
228
+ children: /* @__PURE__ */ H(Ze, {
228
229
  className: "cg-spark",
229
230
  "aria-hidden": "true"
230
231
  })
231
232
  }), " commit with a recorded session"]
232
233
  }),
233
- /* @__PURE__ */ G("span", {
234
+ /* @__PURE__ */ U("span", {
234
235
  className: "gmp-legend-item",
235
- children: [/* @__PURE__ */ W("span", {
236
+ children: [/* @__PURE__ */ H("span", {
236
237
  className: "cg-dot cg-dot-hollow",
237
238
  style: {
238
239
  width: 9,
@@ -241,7 +242,7 @@ function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
241
242
  "aria-hidden": "true"
242
243
  }), " no session captured"]
243
244
  }),
244
- /* @__PURE__ */ W("span", {
245
+ /* @__PURE__ */ H("span", {
245
246
  className: "gmp-legend-item gmp-legend-dim",
246
247
  children: "a star marks a recorded session, select a commit to open it"
247
248
  })
@@ -253,29 +254,29 @@ function Bt({ payload: e, projectLabel: t, selectedId: n, onNavigate: r, onSelec
253
254
  }
254
255
  //#endregion
255
256
  //#region src/ui/graph/ChangeDetail.jsx
256
- var Vt = {
257
+ var Ut = {
257
258
  M: "changed",
258
259
  A: "added",
259
260
  D: "deleted",
260
261
  R: "renamed"
261
- }, Ht = {
262
+ }, Wt = {
262
263
  A: "chip-ok",
263
264
  M: "",
264
265
  D: "chip-err",
265
266
  R: "chip-warn"
266
- }, Ut = {
267
+ }, Gt = {
267
268
  context: "ctx",
268
269
  add: "add",
269
270
  del: "del"
270
271
  };
271
- function Wt(e) {
272
+ function Kt(e) {
272
273
  let t = (e.split("/").pop() ?? e).replace(/[-_]+/g, " ").trim();
273
274
  return t.charAt(0).toUpperCase() + t.slice(1);
274
275
  }
275
- var Gt = (e) => e >= 1e3 ? `≈${Ee(e)}` : Ee(e);
276
- function Kt(e) {
276
+ var qt = (e) => e >= 1e3 ? `≈${Oe(e)}` : Oe(e);
277
+ function Jt(e) {
277
278
  let t = e.oldStart, n = e.newStart, r = e.lines.map((e) => {
278
- let r = Ut[e.kind] ?? "ctx";
279
+ let r = Gt[e.kind] ?? "ctx";
279
280
  return r === "add" ? {
280
281
  type: r,
281
282
  newNo: n++,
@@ -296,109 +297,109 @@ function Kt(e) {
296
297
  lines: r
297
298
  };
298
299
  }
299
- function qt({ file: e, diff: t, open: n, onToggle: r }) {
300
- t && j(t);
301
- let i = e.status, a = t ? new Set(t.hunks.map((e) => e.sessionId).filter(Boolean)).size : null;
302
- return /* @__PURE__ */ G("div", {
300
+ function Yt({ file: t, diff: n, open: r, onToggle: i }) {
301
+ n && e(n);
302
+ let a = t.status, o = n ? new Set(n.hunks.map((e) => e.sessionId).filter(Boolean)).size : null;
303
+ return /* @__PURE__ */ U("div", {
303
304
  className: "gmp-file",
304
- children: [/* @__PURE__ */ G("button", {
305
+ children: [/* @__PURE__ */ U("button", {
305
306
  type: "button",
306
307
  className: "gmp-file-head",
307
- "aria-expanded": n,
308
- onClick: r,
308
+ "aria-expanded": r,
309
+ onClick: i,
309
310
  children: [
310
- W(n ? je : K, {
311
+ H(r ? Ne : W, {
311
312
  size: 14,
312
313
  "aria-hidden": "true"
313
314
  }),
314
- /* @__PURE__ */ W("span", {
315
+ /* @__PURE__ */ H("span", {
315
316
  className: "mono gmp-file-path",
316
- children: e.path
317
+ children: t.path
317
318
  }),
318
- /* @__PURE__ */ W("span", {
319
- className: "chip gmp-file-status " + (Ht[i] ?? ""),
320
- children: Vt[i] ?? i
319
+ /* @__PURE__ */ H("span", {
320
+ className: "chip gmp-file-status " + (Wt[a] ?? ""),
321
+ children: Ut[a] ?? a
321
322
  }),
322
- a != null && a > 0 && /* @__PURE__ */ G("span", {
323
+ o != null && o > 0 && /* @__PURE__ */ U("span", {
323
324
  className: "gmp-file-convos metaitem",
324
325
  children: [
325
- /* @__PURE__ */ W(He, {
326
+ /* @__PURE__ */ H(We, {
326
327
  size: 14,
327
328
  "aria-hidden": "true"
328
329
  }),
329
330
  " ",
330
- /* @__PURE__ */ W("span", {
331
+ /* @__PURE__ */ H("span", {
331
332
  className: "tnum",
332
- children: a
333
+ children: o
333
334
  })
334
335
  ]
335
336
  })
336
337
  ]
337
- }), n && /* @__PURE__ */ W("div", {
338
+ }), r && /* @__PURE__ */ H("div", {
338
339
  className: "gmp-file-body",
339
- children: t ? t.error ? /* @__PURE__ */ W("p", {
340
+ children: n ? n.error ? /* @__PURE__ */ H("p", {
340
341
  className: "gmp-diff-state gmp-diff-error mono",
341
- children: t.error
342
- }) : t.binary ? /* @__PURE__ */ W("p", {
342
+ children: n.error
343
+ }) : n.binary ? /* @__PURE__ */ H("p", {
343
344
  className: "gmp-diff-state mono",
344
345
  children: "binary file — no textual diff."
345
- }) : t.hunks.length === 0 ? /* @__PURE__ */ W("p", {
346
+ }) : n.hunks.length === 0 ? /* @__PURE__ */ H("p", {
346
347
  className: "gmp-diff-state mono",
347
348
  children: "no line changes."
348
- }) : t.hunks.map((e, n) => /* @__PURE__ */ G("div", {
349
+ }) : n.hunks.map((e, t) => /* @__PURE__ */ U("div", {
349
350
  className: "gmp-hunk",
350
351
  children: [
351
- e.sessionTitle && /* @__PURE__ */ G("div", {
352
+ e.sessionTitle && /* @__PURE__ */ U("div", {
352
353
  className: "gmp-hunk-attrib",
353
354
  children: [
354
- /* @__PURE__ */ W(Ne, {
355
+ /* @__PURE__ */ H(Fe, {
355
356
  size: 14,
356
357
  "aria-hidden": "true"
357
358
  }),
358
- /* @__PURE__ */ W("span", {
359
+ /* @__PURE__ */ H("span", {
359
360
  className: "gmp-hunk-from",
360
361
  children: "from"
361
362
  }),
362
- /* @__PURE__ */ W("span", {
363
+ /* @__PURE__ */ H("span", {
363
364
  className: "gmp-hunk-link",
364
365
  children: e.sessionTitle
365
366
  }),
366
- e.sessionId && /* @__PURE__ */ W("span", {
367
+ e.sessionId && /* @__PURE__ */ H("span", {
367
368
  className: "mono gmp-hunk-hash",
368
369
  children: e.sessionId.slice(0, 7)
369
370
  })
370
371
  ]
371
372
  }),
372
- /* @__PURE__ */ W(ge, {
373
+ /* @__PURE__ */ H(_e, {
373
374
  file: "",
374
- hunks: [Kt(e)],
375
+ hunks: [Jt(e)],
375
376
  className: "gmp-hunk-diff"
376
377
  }),
377
- t.truncated && n === t.hunks.length - 1 && /* @__PURE__ */ W("p", {
378
+ n.truncated && t === n.hunks.length - 1 && /* @__PURE__ */ H("p", {
378
379
  className: "gmp-diff-state mono",
379
380
  children: "diff truncated (file exceeds the size cap)."
380
381
  })
381
382
  ]
382
- }, n)) : /* @__PURE__ */ W("p", {
383
+ }, t)) : /* @__PURE__ */ H("p", {
383
384
  className: "gmp-diff-state mono",
384
385
  children: "loading diff…"
385
386
  })
386
387
  })]
387
388
  });
388
389
  }
389
- function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotation: i, onRemoveAnnotation: a, onOpenMap: o, onShare: s, onCopyRecap: c, initialOpenFiles: l = {}, headerActions: u }) {
390
- te(e);
391
- let [d, f] = U(l), [p, m] = U(null), [h, g] = U(!1), [_, v] = U(""), y = H({}), b = H(null), x = n ?? Wt(e.branch), S = e.work.length, C = e.newEdges.length, w = e.removedEdges.length, T = (e) => f((t) => ({
390
+ function Xt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnotation: i, onRemoveAnnotation: a, onOpenMap: o, onShare: s, onCopyRecap: c, initialOpenFiles: l = {}, headerActions: u }) {
391
+ _(e);
392
+ let [d, f] = V(l), [p, m] = V(null), [h, g] = V(!1), [v, y] = V(""), b = B({}), x = B(null), S = n ?? Kt(e.branch), C = e.work.length, w = e.newEdges.length, T = e.removedEdges.length, E = (e) => f((t) => ({
392
393
  ...t,
393
394
  [e]: !t[e]
394
395
  }));
395
- function E(e, t) {
396
+ function D(e, t) {
396
397
  if (m(e), t) {
397
398
  f((e) => ({
398
399
  ...e,
399
400
  [t]: !0
400
401
  }));
401
- let e = y.current[t], n = b.current;
402
+ let e = b.current[t], n = x.current;
402
403
  if (e && n) {
403
404
  let t = window.matchMedia && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
404
405
  n.scrollTo({
@@ -408,112 +409,112 @@ function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
408
409
  }
409
410
  }
410
411
  }
411
- function D(e) {
412
+ function O(e) {
412
413
  e.preventDefault();
413
- let t = _.trim();
414
- t && i?.(t), g(!1), v("");
414
+ let t = v.trim();
415
+ t && i?.(t), g(!1), y("");
415
416
  }
416
- let O = e.files[0]?.path;
417
- return /* @__PURE__ */ G("div", {
417
+ let k = e.files[0]?.path;
418
+ return /* @__PURE__ */ U("div", {
418
419
  className: "gmp-root gmp-detail-root",
419
- ref: b,
420
+ ref: x,
420
421
  children: [
421
- /* @__PURE__ */ G("div", {
422
+ /* @__PURE__ */ U("div", {
422
423
  className: "gmp-detail-head",
423
424
  children: [
424
- /* @__PURE__ */ G("div", {
425
+ /* @__PURE__ */ U("div", {
425
426
  className: "gmp-head-row",
426
- children: [/* @__PURE__ */ G("div", {
427
+ children: [/* @__PURE__ */ U("div", {
427
428
  className: "crumb",
428
429
  children: [
429
430
  "review ",
430
- /* @__PURE__ */ W(K, {
431
+ /* @__PURE__ */ H(W, {
431
432
  size: 14,
432
433
  "aria-hidden": "true"
433
434
  }),
434
435
  " ",
435
436
  e.defaultBranch,
436
437
  " ",
437
- /* @__PURE__ */ W(K, {
438
+ /* @__PURE__ */ H(W, {
438
439
  size: 14,
439
440
  "aria-hidden": "true"
440
441
  }),
441
442
  " ",
442
- /* @__PURE__ */ W("span", {
443
+ /* @__PURE__ */ H("span", {
443
444
  className: "cur",
444
445
  children: e.branch
445
446
  })
446
447
  ]
447
- }), u ? /* @__PURE__ */ W("div", {
448
+ }), u ? /* @__PURE__ */ H("div", {
448
449
  className: "gmp-head-actions",
449
450
  children: u
450
451
  }) : null]
451
452
  }),
452
- /* @__PURE__ */ W("div", {
453
+ /* @__PURE__ */ H("div", {
453
454
  className: "gmp-detail-title",
454
- children: x
455
+ children: S
455
456
  }),
456
- /* @__PURE__ */ G("p", {
457
+ /* @__PURE__ */ U("p", {
457
458
  className: "gmp-caption",
458
459
  children: [
459
460
  "this line of work touched",
460
461
  " ",
461
- /* @__PURE__ */ G("button", {
462
+ /* @__PURE__ */ U("button", {
462
463
  type: "button",
463
464
  className: "gmp-frag" + (p === "files" ? " gmp-frag-on" : ""),
464
- onClick: () => E("files", O),
465
+ onClick: () => D("files", k),
465
466
  children: [e.filesChanged, " files"]
466
467
  }),
467
468
  " ",
468
469
  "across",
469
470
  " ",
470
- /* @__PURE__ */ G("button", {
471
+ /* @__PURE__ */ U("button", {
471
472
  type: "button",
472
473
  className: "gmp-frag" + (p === "conversations" ? " gmp-frag-on" : ""),
473
- onClick: () => E("conversations"),
474
- children: [S, " conversations"]
474
+ onClick: () => D("conversations"),
475
+ children: [C, " conversations"]
475
476
  }),
476
477
  ", reshaping",
477
478
  " ",
478
- /* @__PURE__ */ G("button", {
479
+ /* @__PURE__ */ U("button", {
479
480
  type: "button",
480
481
  className: "gmp-frag" + (p === "conn" ? " gmp-frag-on" : ""),
481
- onClick: () => E("conn"),
482
+ onClick: () => D("conn"),
482
483
  children: [
483
484
  "+",
484
- C,
485
- "/−",
486
485
  w,
486
+ "/−",
487
+ T,
487
488
  " connections"
488
489
  ]
489
490
  }),
490
491
  "."
491
492
  ]
492
493
  }),
493
- /* @__PURE__ */ W("span", {
494
+ /* @__PURE__ */ H("span", {
494
495
  className: "gmp-caption-hint mono",
495
496
  children: "click any number to jump to its proof"
496
497
  })
497
498
  ]
498
499
  }),
499
- (e.frictions.length > 0 || e.violations.length > 0) && /* @__PURE__ */ G("div", {
500
+ (e.frictions.length > 0 || e.violations.length > 0) && /* @__PURE__ */ U("div", {
500
501
  className: "gmp-signals",
501
- children: [e.frictions.map((e, t) => /* @__PURE__ */ G("span", {
502
+ children: [e.frictions.map((e, t) => /* @__PURE__ */ U("span", {
502
503
  className: "gmp-signal",
503
504
  children: [
504
- /* @__PURE__ */ W(Ke, {
505
+ /* @__PURE__ */ H(Je, {
505
506
  size: 14,
506
507
  "aria-hidden": "true"
507
508
  }),
508
509
  " ",
509
510
  e.label,
510
511
  ", ",
511
- /* @__PURE__ */ W("span", {
512
+ /* @__PURE__ */ H("span", {
512
513
  className: "mono",
513
514
  children: e.file
514
515
  }),
515
516
  " ",
516
- /* @__PURE__ */ G("b", {
517
+ /* @__PURE__ */ U("b", {
517
518
  className: "tnum",
518
519
  children: [e.count, "×"]
519
520
  }),
@@ -521,15 +522,15 @@ function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
521
522
  e.sessions,
522
523
  " conversations"
523
524
  ]
524
- }, t)), e.violations.length > 0 && /* @__PURE__ */ G("span", {
525
+ }, t)), e.violations.length > 0 && /* @__PURE__ */ U("span", {
525
526
  className: "gmp-signal gmp-signal-warn",
526
527
  children: [
527
- /* @__PURE__ */ W(Ze, {
528
+ /* @__PURE__ */ H($e, {
528
529
  size: 14,
529
530
  "aria-hidden": "true"
530
531
  }),
531
532
  " ",
532
- /* @__PURE__ */ W("b", {
533
+ /* @__PURE__ */ H("b", {
533
534
  className: "tnum",
534
535
  children: e.violations.length
535
536
  }),
@@ -537,13 +538,13 @@ function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
537
538
  ]
538
539
  })]
539
540
  }),
540
- /* @__PURE__ */ G("div", {
541
+ /* @__PURE__ */ U("div", {
541
542
  className: "gmp-totals",
542
543
  children: [
543
- /* @__PURE__ */ G("span", {
544
+ /* @__PURE__ */ U("span", {
544
545
  className: "metaitem tnum",
545
546
  children: [
546
- /* @__PURE__ */ W(Fe, {
547
+ /* @__PURE__ */ H(Le, {
547
548
  size: 14,
548
549
  "aria-hidden": "true"
549
550
  }),
@@ -552,102 +553,102 @@ function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
552
553
  " files touched"
553
554
  ]
554
555
  }),
555
- /* @__PURE__ */ G("span", {
556
+ /* @__PURE__ */ U("span", {
556
557
  className: "metaitem tnum",
557
558
  children: [
558
- /* @__PURE__ */ G("span", {
559
+ /* @__PURE__ */ U("span", {
559
560
  className: "gmp-add",
560
- children: ["+", C]
561
+ children: ["+", w]
561
562
  }),
562
563
  "/",
563
- /* @__PURE__ */ G("span", {
564
+ /* @__PURE__ */ U("span", {
564
565
  className: "gmp-del",
565
- children: ["−", w]
566
+ children: ["−", T]
566
567
  }),
567
568
  " connections"
568
569
  ]
569
570
  }),
570
- /* @__PURE__ */ G("span", {
571
+ /* @__PURE__ */ U("span", {
571
572
  className: "metaitem tnum",
572
573
  children: [
573
- /* @__PURE__ */ W(ze, {
574
+ /* @__PURE__ */ H(Ve, {
574
575
  size: 14,
575
576
  "aria-hidden": "true"
576
577
  }),
577
578
  " ai wrote ",
578
- Gt(Number(e.outputTokens)),
579
+ qt(Number(e.outputTokens)),
579
580
  " tokens"
580
581
  ]
581
582
  }),
582
- e.costUsd != null && /* @__PURE__ */ G("span", {
583
+ e.costUsd != null && /* @__PURE__ */ U("span", {
583
584
  className: "metaitem tnum",
584
585
  children: [
585
- /* @__PURE__ */ W(Me, {
586
+ /* @__PURE__ */ H(Pe, {
586
587
  size: 14,
587
588
  "aria-hidden": "true"
588
589
  }),
589
590
  " est. spend ",
590
- Te(e.costUsd)
591
+ De(e.costUsd)
591
592
  ]
592
593
  })
593
594
  ]
594
595
  }),
595
- /* @__PURE__ */ G("div", {
596
+ /* @__PURE__ */ U("div", {
596
597
  className: "gmp-detail-sec",
597
- children: [/* @__PURE__ */ W("div", {
598
+ children: [/* @__PURE__ */ H("div", {
598
599
  className: "sb-head gmp-detail-sechead",
599
600
  children: "files changed, click a path to open its diff"
600
- }), /* @__PURE__ */ W("div", {
601
+ }), /* @__PURE__ */ H("div", {
601
602
  className: "gmp-files",
602
- children: e.files.map((e) => /* @__PURE__ */ W("div", {
603
+ children: e.files.map((e) => /* @__PURE__ */ H("div", {
603
604
  ref: (t) => {
604
- y.current[e.path] = t;
605
+ b.current[e.path] = t;
605
606
  },
606
- children: /* @__PURE__ */ W(qt, {
607
+ children: /* @__PURE__ */ H(Yt, {
607
608
  file: e,
608
609
  diff: d[e.path] ? t?.(e) : void 0,
609
610
  open: !!d[e.path],
610
- onToggle: () => T(e.path)
611
+ onToggle: () => E(e.path)
611
612
  })
612
613
  }, e.path))
613
614
  })]
614
615
  }),
615
- /* @__PURE__ */ G("div", {
616
+ /* @__PURE__ */ U("div", {
616
617
  className: "gmp-detail-sec",
617
- children: [/* @__PURE__ */ W("div", {
618
+ children: [/* @__PURE__ */ H("div", {
618
619
  className: "sb-head gmp-detail-sechead",
619
620
  children: "your annotation"
620
- }), /* @__PURE__ */ G("div", {
621
+ }), /* @__PURE__ */ U("div", {
621
622
  className: "gmp-annot",
622
623
  children: [
623
- r && /* @__PURE__ */ G("span", {
624
+ r && /* @__PURE__ */ U("span", {
624
625
  className: "gmp-label-chip gmp-annot-chip",
625
626
  children: [
626
- /* @__PURE__ */ W(Xe, {
627
+ /* @__PURE__ */ H(Qe, {
627
628
  size: 14,
628
629
  "aria-hidden": "true"
629
630
  }),
630
631
  " ",
631
632
  r,
632
- /* @__PURE__ */ W("button", {
633
+ /* @__PURE__ */ H("button", {
633
634
  type: "button",
634
635
  className: "gmp-annot-x",
635
636
  "aria-label": "remove annotation",
636
637
  onClick: () => a?.(),
637
- children: /* @__PURE__ */ W(Qe, {
638
+ children: /* @__PURE__ */ H(et, {
638
639
  size: 14,
639
640
  "aria-hidden": "true"
640
641
  })
641
642
  })
642
643
  ]
643
644
  }),
644
- /* @__PURE__ */ G("button", {
645
+ /* @__PURE__ */ U("button", {
645
646
  type: "button",
646
647
  className: "gmp-annot-add",
647
648
  "aria-expanded": h,
648
649
  onClick: () => g((e) => !e),
649
650
  children: [
650
- /* @__PURE__ */ W(Xe, {
651
+ /* @__PURE__ */ H(Qe, {
651
652
  size: 14,
652
653
  "aria-hidden": "true"
653
654
  }),
@@ -655,34 +656,34 @@ function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
655
656
  r ? "change label" : "add a label"
656
657
  ]
657
658
  }),
658
- h && /* @__PURE__ */ G("form", {
659
+ h && /* @__PURE__ */ U("form", {
659
660
  className: "gmp-annot-pop",
660
- onSubmit: D,
661
+ onSubmit: O,
661
662
  children: [
662
- /* @__PURE__ */ W("span", {
663
+ /* @__PURE__ */ H("span", {
663
664
  className: "label",
664
665
  children: "user.custom_label"
665
666
  }),
666
- /* @__PURE__ */ W("input", {
667
+ /* @__PURE__ */ H("input", {
667
668
  className: "input",
668
669
  type: "text",
669
670
  autoFocus: !0,
670
- value: _,
671
- onChange: (e) => v(e.target.value),
671
+ value: v,
672
+ onChange: (e) => y(e.target.value),
672
673
  placeholder: "e.g. good handoff",
673
674
  "aria-label": "annotation value"
674
675
  }),
675
- /* @__PURE__ */ G("div", {
676
+ /* @__PURE__ */ U("div", {
676
677
  className: "gmp-annot-pop-foot",
677
- children: [/* @__PURE__ */ W("button", {
678
+ children: [/* @__PURE__ */ H("button", {
678
679
  type: "button",
679
680
  className: "btn btn-ghost btn-sm",
680
681
  onClick: () => g(!1),
681
682
  children: "cancel"
682
- }), /* @__PURE__ */ G("button", {
683
+ }), /* @__PURE__ */ U("button", {
683
684
  type: "submit",
684
685
  className: "btn btn-primary btn-sm",
685
- children: [/* @__PURE__ */ W(Ae, {
686
+ children: [/* @__PURE__ */ H(Me, {
686
687
  size: 14,
687
688
  "aria-hidden": "true"
688
689
  }), " save"]
@@ -693,42 +694,42 @@ function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
693
694
  ]
694
695
  })]
695
696
  }),
696
- /* @__PURE__ */ G("div", {
697
+ /* @__PURE__ */ U("div", {
697
698
  className: "gmp-exits",
698
699
  children: [
699
- /* @__PURE__ */ G("button", {
700
+ /* @__PURE__ */ U("button", {
700
701
  type: "button",
701
702
  className: "btn btn-secondary btn-sm",
702
703
  onClick: () => o?.(),
703
- children: [/* @__PURE__ */ W(ke, {
704
+ children: [/* @__PURE__ */ H(je, {
704
705
  size: 14,
705
706
  "aria-hidden": "true"
706
707
  }), " see this work on the code map"]
707
708
  }),
708
- /* @__PURE__ */ G("button", {
709
+ /* @__PURE__ */ U("button", {
709
710
  type: "button",
710
711
  className: "btn btn-secondary btn-sm",
711
712
  onClick: () => s?.(),
712
713
  children: [
713
- /* @__PURE__ */ W(Je, {
714
+ /* @__PURE__ */ H(Xe, {
714
715
  size: 14,
715
716
  "aria-hidden": "true"
716
717
  }),
717
718
  " share ",
718
- S,
719
+ C,
719
720
  " conversations…"
720
721
  ]
721
722
  }),
722
- /* @__PURE__ */ G("button", {
723
+ /* @__PURE__ */ U("button", {
723
724
  type: "button",
724
725
  className: "btn btn-secondary btn-sm",
725
726
  onClick: () => c?.(),
726
- children: [/* @__PURE__ */ W(Ie, {
727
+ children: [/* @__PURE__ */ H(Re, {
727
728
  size: 14,
728
729
  "aria-hidden": "true"
729
730
  }), " copy recap"]
730
731
  }),
731
- /* @__PURE__ */ G("code", {
732
+ /* @__PURE__ */ U("code", {
732
733
  className: "gmp-gitdiff mono",
733
734
  children: [
734
735
  "git diff ",
@@ -739,7 +740,7 @@ function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
739
740
  })
740
741
  ]
741
742
  }),
742
- /* @__PURE__ */ W("p", {
743
+ /* @__PURE__ */ H("p", {
743
744
  className: "gmp-boundary mono",
744
745
  children: "shows what changed and the recorded work behind it, not whether the change is correct or secure."
745
746
  })
@@ -748,77 +749,77 @@ function Jt({ payload: e, getDiff: t, title: n, annotation: r = "", onSaveAnnota
748
749
  }
749
750
  //#endregion
750
751
  //#region src/ui/graph/CodeMap.jsx
751
- var Yt = Object.freeze({
752
+ var Zt = Object.freeze({
752
753
  project: "overview",
753
754
  package: "folders",
754
755
  file: "files"
755
- }), Xt = Object.freeze({
756
+ }), Qt = Object.freeze({
756
757
  overview: "project",
757
758
  folders: "package",
758
759
  files: "file"
759
760
  });
760
- function Zt({ payload: e, zoom: n, onZoomChange: r, selectedId: i, onSelect: s, onExpand: c, highlightedIds: l, nodeDeltas: u, structureEdgeDeltas: d, height: f = 520, ariaLabel: p = "code map", className: m = "", viewport: h, onViewportChange: g, state: _, onStateChange: v }) {
761
- let y = V(() => {
761
+ function $t({ payload: e, zoom: t, onZoomChange: n, selectedId: r, onSelect: i, onExpand: a, highlightedIds: o, nodeDeltas: s, structureEdgeDeltas: c, height: l = 520, ariaLabel: u = "code map", className: d = "", viewport: f, onViewportChange: p, state: m, onStateChange: h }) {
762
+ let g = z(() => {
762
763
  let t = /* @__PURE__ */ new Map();
763
764
  for (let n of e?.nodes ?? []) t.set(n.id, n);
764
765
  return t;
765
- }, [e?.nodes]), b = V(() => _ === void 0 ? null : o(_), [_]), S = V(() => b ? a(e, b) : null, [e, b]), w = V(() => Qt(e && {
766
+ }, [e?.nodes]), _ = z(() => m === void 0 ? null : A(m), [m]), v = z(() => _ ? Se(e, _) : null, [e, _]), y = z(() => en(e && {
766
767
  ...e,
767
- nodes: S?.canvas.allNodes ?? e.nodes
768
- }), [e, S?.canvas.allNodes]), T = S ? Yt[S.canvas.grain] ?? "folders" : Yt[n?.level ?? "package"], E = S?.canvas.expandedIds ?? n?.expanded, D = H(T);
769
- D.current = T;
770
- function O(e) {
771
- if (!b) return;
772
- let n = t(b, e);
773
- C(b, n) || v?.(n);
768
+ nodes: v?.canvas.allNodes ?? e.nodes
769
+ }), [e, v?.canvas.allNodes]), b = v ? Zt[v.canvas.grain] ?? "folders" : Zt[t?.level ?? "package"], x = v?.canvas.expandedIds ?? t?.expanded, S = B(b);
770
+ S.current = b;
771
+ function C(e) {
772
+ if (!_) return;
773
+ let t = be(_, e);
774
+ Ce(_, t) || h?.(t);
774
775
  }
775
- return /* @__PURE__ */ W(x, {
776
- data: w,
777
- grain: T,
778
- expandedIds: E,
779
- visibleIds: S?.canvas.visibleIds,
780
- hierarchy: S?.canvas.hierarchy,
781
- selectedId: S ? S.canvas.selectedId : i,
782
- highlightedIds: l,
783
- nodeDeltas: u,
784
- edgeDeltas: d,
776
+ return /* @__PURE__ */ H(F, {
777
+ data: y,
778
+ grain: b,
779
+ expandedIds: x,
780
+ visibleIds: v?.canvas.visibleIds,
781
+ hierarchy: v?.canvas.hierarchy,
782
+ selectedId: v ? v.canvas.selectedId : r,
783
+ highlightedIds: o,
784
+ nodeDeltas: s,
785
+ edgeDeltas: c,
785
786
  onSelect: (e) => {
786
- s?.(e, e ? y.get(e) ?? null : null);
787
+ i?.(e, e ? g.get(e) ?? null : null);
787
788
  },
788
- onExpand: c,
789
+ onExpand: a,
789
790
  onGrainChange: (e) => {
790
- D.current = e, r?.({
791
- level: Xt[e] ?? "package",
791
+ S.current = e, n?.({
792
+ level: Qt[e] ?? "package",
792
793
  expanded: []
793
794
  });
794
795
  },
795
796
  onExpandedIdsChange: (e) => {
796
- r?.({
797
- level: Xt[D.current] ?? "package",
797
+ n?.({
798
+ level: Qt[S.current] ?? "package",
798
799
  expanded: e
799
800
  });
800
801
  },
801
- height: f,
802
- ariaLabel: p,
803
- className: m,
804
- viewport: S ? S.canvas.viewport : h,
802
+ height: l,
803
+ ariaLabel: u,
804
+ className: d,
805
+ viewport: v ? v.canvas.viewport : f,
805
806
  onViewportChange: (e) => {
806
- g?.(e);
807
+ p?.(e);
807
808
  },
808
- onStateAction: b ? O : void 0,
809
- canonicalControlled: b !== null
809
+ onStateAction: _ ? C : void 0,
810
+ canonicalControlled: _ !== null
810
811
  });
811
812
  }
812
- function Qt(e) {
813
- e && ue(e);
814
- let t = e?.nodes ?? [], n = en(e?.violations ?? []);
813
+ function en(e) {
814
+ e && N(e);
815
+ let t = e?.nodes ?? [], n = nn(e?.violations ?? []);
815
816
  return {
816
817
  nodes: t.map((e) => ({
817
818
  id: e.id,
818
819
  label: e.name || e.id,
819
820
  kind: e.kind === "file" ? "file" : "folder",
820
821
  loc: e.loc ?? 0,
821
- coverage: $t(e.recordedFiles, e.totalFiles),
822
+ coverage: tn(e.recordedFiles, e.totalFiles),
822
823
  parent: e.parent || void 0,
823
824
  violations: n.get(e.id) ?? 0,
824
825
  layer: e.layer,
@@ -832,179 +833,180 @@ function Qt(e) {
832
833
  }))
833
834
  };
834
835
  }
835
- function $t(e, t) {
836
+ function tn(e, t) {
836
837
  let n = Number(t) || 0;
837
838
  if (n <= 0) return 0;
838
839
  let r = Math.max(0, Math.min(1, (Number(e) || 0) / n));
839
840
  return Math.max(0, Math.min(4, Math.round(r * 4)));
840
841
  }
841
- function en(e) {
842
+ function nn(e) {
842
843
  let t = /* @__PURE__ */ new Map();
843
- for (let n of e) tn(t, n.from), tn(t, n.to);
844
+ for (let n of e) rn(t, n.from), rn(t, n.to);
844
845
  return t;
845
846
  }
846
- function tn(e, t) {
847
+ function rn(e, t) {
847
848
  t && e.set(t, (e.get(t) ?? 0) + 1);
848
849
  }
849
850
  //#endregion
850
851
  //#region src/ui/graph/CodeMapNavigator.jsx
851
- function nn({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsChange: r, selectedId: i = null, onSelect: s, focusedId: c, onFocusChange: l, filter: u = "", onFilterChange: d, onOpenMap: f, onStateAction: p, ariaLabel: m = "code map navigator" }) {
852
- let [h, g] = U(() => /* @__PURE__ */ new Set()), [_, v] = U(null), y = n === void 0 ? h : new Set(n), b = c === void 0 ? _ : c, x = H(/* @__PURE__ */ new Map()), S = V(() => a(e, o({
852
+ function an({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsChange: r, selectedId: i = null, onSelect: a, focusedId: o, onFocusChange: s, filter: c = "", onFilterChange: l, onOpenMap: u, onStateAction: d, ariaLabel: f = "code map navigator", lineCounts: p = "measured" }) {
853
+ let [m, h] = V(() => /* @__PURE__ */ new Set()), [g, _] = V(null), v = n === void 0 ? m : new Set(n), y = o === void 0 ? g : o, b = B(/* @__PURE__ */ new Map()), x = z(() => Se(e, A({
853
854
  grain: t,
854
- expandedIds: Array.from(y),
855
+ expandedIds: Array.from(v),
855
856
  selectedId: i,
856
- navigatorFocusedId: b,
857
- navigatorFilter: u
857
+ navigatorFocusedId: y,
858
+ navigatorFilter: c
858
859
  })), [
859
860
  e,
860
861
  t,
861
- an(y),
862
+ sn(v),
862
863
  i,
863
- b,
864
- u
865
- ]), C = S.rows, w = S.focusedId, T = S.selected, E = T ? C.find((e) => e.node.id === T.id) : null, D = !!E?.canExpand && !E.forcedOpen;
866
- function O(e) {
867
- n === void 0 && g(e), p?.({
864
+ y,
865
+ c
866
+ ]), S = x.rows, C = x.focusedId, w = x.selected, T = w ? S.find((e) => e.node.id === w.id) : null, E = !!T?.canExpand && !T.forcedOpen;
867
+ function D(e) {
868
+ n === void 0 && h(e), d?.({
868
869
  type: "set-expanded",
869
870
  ids: Array.from(e)
870
871
  }), r?.(Array.from(e));
871
872
  }
872
- function k(e) {
873
- let t = new Set(y);
874
- t.has(e) ? t.delete(e) : t.add(e), O(t);
873
+ function O(e) {
874
+ let t = new Set(v);
875
+ t.has(e) ? t.delete(e) : t.add(e), D(t);
875
876
  }
876
- function A(e) {
877
- c === void 0 && v(e), p?.({
877
+ function k(e) {
878
+ o === void 0 && _(e), d?.({
878
879
  type: "focus",
879
880
  id: e
880
- }), l?.(e), x.current.get(e)?.focus();
881
+ }), s?.(e), b.current.get(e)?.focus();
881
882
  }
882
883
  function j(e) {
883
- c === void 0 && v(e.id), x.current.get(e.id)?.focus(), p?.({
884
+ o === void 0 && _(e.id), b.current.get(e.id)?.focus(), d?.({
884
885
  type: "select",
885
886
  id: e.id
886
- }), l?.(e.id), s?.(e.id, e);
887
+ }), s?.(e.id), a?.(e.id, e);
887
888
  }
888
889
  function M(e, t) {
889
- let n = C[t];
890
+ let n = S[t];
890
891
  if (!n) return;
891
892
  let { node: r } = n, i = null;
892
- if (e.key === "ArrowDown") i = C[Math.min(t + 1, C.length - 1)]?.node.id;
893
- else if (e.key === "ArrowUp") i = C[Math.max(t - 1, 0)]?.node.id;
894
- else if (e.key === "Home") i = C[0]?.node.id;
895
- else if (e.key === "End") i = C[C.length - 1]?.node.id;
896
- else if (e.key === "ArrowRight" && (n.canExpand || n.forcedOpen)) n.forcedOpen || n.expanded ? i = n.childIds[0] ?? null : y.has(r.id) || k(r.id);
897
- else if (e.key === "ArrowLeft") !n.forcedOpen && n.canExpand && n.expanded ? k(r.id) : i = n.parentId;
893
+ if (e.key === "ArrowDown") i = S[Math.min(t + 1, S.length - 1)]?.node.id;
894
+ else if (e.key === "ArrowUp") i = S[Math.max(t - 1, 0)]?.node.id;
895
+ else if (e.key === "Home") i = S[0]?.node.id;
896
+ else if (e.key === "End") i = S[S.length - 1]?.node.id;
897
+ else if (e.key === "ArrowRight" && (n.canExpand || n.forcedOpen)) n.forcedOpen || n.expanded ? i = n.childIds[0] ?? null : v.has(r.id) || O(r.id);
898
+ else if (e.key === "ArrowLeft") !n.forcedOpen && n.canExpand && n.expanded ? O(r.id) : i = n.parentId;
898
899
  else if (e.key === "Enter" || e.key === " ") {
899
900
  j(r), e.preventDefault();
900
901
  return;
901
902
  } else return;
902
- e.preventDefault(), i && A(i);
903
+ e.preventDefault(), i && k(i);
903
904
  }
904
- return /* @__PURE__ */ G("section", {
905
+ return /* @__PURE__ */ U("section", {
905
906
  className: "gmp-navigator",
906
- "aria-label": m,
907
+ "aria-label": f,
907
908
  children: [
908
- /* @__PURE__ */ W("header", {
909
+ /* @__PURE__ */ H("header", {
909
910
  className: "gmp-navigator-head",
910
- children: /* @__PURE__ */ G("label", {
911
+ children: /* @__PURE__ */ U("label", {
911
912
  className: "gmp-navigator-search",
912
913
  children: [
913
- /* @__PURE__ */ W(qe, { "aria-hidden": "true" }),
914
- /* @__PURE__ */ W("span", {
914
+ /* @__PURE__ */ H(Ye, { "aria-hidden": "true" }),
915
+ /* @__PURE__ */ H("span", {
915
916
  className: "gmp-sr",
916
917
  children: "filter code areas"
917
918
  }),
918
- /* @__PURE__ */ W("input", {
919
- value: u,
919
+ /* @__PURE__ */ H("input", {
920
+ value: c,
920
921
  onChange: (e) => {
921
- p?.({
922
+ d?.({
922
923
  type: "set-filter",
923
924
  filter: e.target.value
924
- }), d?.(e.target.value);
925
+ }), l?.(e.target.value);
925
926
  },
926
927
  placeholder: "filter paths"
927
928
  })
928
929
  ]
929
930
  })
930
931
  }),
931
- S.staleSelectedId ? /* @__PURE__ */ G("p", {
932
+ x.staleSelectedId ? /* @__PURE__ */ U("p", {
932
933
  className: "gmp-navigator-missing",
933
934
  role: "status",
934
935
  children: [
935
936
  "the selected code area is not present in this map.",
936
937
  " ",
937
- /* @__PURE__ */ W("button", {
938
+ /* @__PURE__ */ H("button", {
938
939
  type: "button",
939
940
  onClick: () => {
940
- p?.({ type: "clear-selection" }), s?.(null, null);
941
+ d?.({ type: "clear-selection" }), a?.(null, null);
941
942
  },
942
943
  children: "clear selection"
943
944
  })
944
945
  ]
945
946
  }) : null,
946
- /* @__PURE__ */ G("div", {
947
+ /* @__PURE__ */ U("div", {
947
948
  className: "gmp-navigator-body",
948
- children: [/* @__PURE__ */ W("div", {
949
- role: C.length ? "tree" : void 0,
949
+ children: [/* @__PURE__ */ H("div", {
950
+ role: S.length ? "tree" : void 0,
950
951
  "aria-label": "code areas",
951
952
  className: "gmp-navigator-tree",
952
953
  "data-grain": t,
953
- children: C.length === 0 ? /* @__PURE__ */ W("p", {
954
+ children: S.length === 0 ? /* @__PURE__ */ H("p", {
954
955
  className: "gmp-navigator-empty",
955
956
  role: "status",
956
957
  children: "no code areas match this filter"
957
- }) : C.map((e, t) => {
958
- let n = e.canExpand || e.forcedOpen, r = e.expanded, a = w === e.node.id;
959
- return /* @__PURE__ */ W(rn, {
958
+ }) : S.map((e, t) => {
959
+ let n = e.canExpand || e.forcedOpen, r = e.expanded, a = C === e.node.id;
960
+ return /* @__PURE__ */ H(on, {
960
961
  row: e,
961
962
  hasChildren: n,
962
963
  isExpanded: r,
963
964
  selected: i === e.node.id,
964
965
  tabbable: a,
965
966
  setRef: (t) => {
966
- t ? x.current.set(e.node.id, t) : x.current.delete(e.node.id);
967
+ t ? b.current.set(e.node.id, t) : b.current.delete(e.node.id);
967
968
  },
968
969
  onFocus: () => {
969
- c === void 0 && v(e.node.id);
970
+ o === void 0 && _(e.node.id);
970
971
  },
971
972
  onSelect: () => j(e.node),
972
973
  onToggle: () => {
973
- e.forcedOpen || k(e.node.id);
974
+ e.forcedOpen || O(e.node.id);
974
975
  },
975
- onKeyDown: (e) => M(e, t)
976
+ onKeyDown: (e) => M(e, t),
977
+ lineCounts: p
976
978
  }, e.node.id);
977
979
  })
978
- }), /* @__PURE__ */ W("aside", {
980
+ }), /* @__PURE__ */ H("aside", {
979
981
  className: "gmp-navigator-actions",
980
982
  "aria-label": "selected code area",
981
- children: T ? /* @__PURE__ */ G(Oe, { children: [
982
- /* @__PURE__ */ W("p", {
983
+ children: w ? /* @__PURE__ */ U(Ae, { children: [
984
+ /* @__PURE__ */ H("p", {
983
985
  className: "gmp-navigator-selected",
984
- children: T.name || T.id
986
+ children: w.name || w.id
985
987
  }),
986
- /* @__PURE__ */ W("p", {
988
+ /* @__PURE__ */ H("p", {
987
989
  className: "gmp-navigator-selected-path",
988
- children: T.id
990
+ children: w.id
989
991
  }),
990
- D ? /* @__PURE__ */ G("button", {
992
+ E ? /* @__PURE__ */ U("button", {
991
993
  type: "button",
992
994
  className: "gmp-navigator-action",
993
- onClick: () => k(T.id),
994
- children: [/* @__PURE__ */ W(K, { "aria-hidden": "true" }), y.has(T.id) ? "hide children" : "show children"]
995
+ onClick: () => O(w.id),
996
+ children: [/* @__PURE__ */ H(W, { "aria-hidden": "true" }), v.has(w.id) ? "hide children" : "show children"]
995
997
  }) : null,
996
- /* @__PURE__ */ G("button", {
998
+ /* @__PURE__ */ U("button", {
997
999
  type: "button",
998
1000
  className: "gmp-navigator-action gmp-navigator-action--primary",
999
1001
  onClick: () => {
1000
- p?.({
1002
+ d?.({
1001
1003
  type: "open-in-map",
1002
- id: T.id
1003
- }), f?.(T.id);
1004
+ id: w.id
1005
+ }), u?.(w.id);
1004
1006
  },
1005
- children: [/* @__PURE__ */ W(Be, { "aria-hidden": "true" }), " open in map"]
1007
+ children: [/* @__PURE__ */ H(He, { "aria-hidden": "true" }), " open in map"]
1006
1008
  })
1007
- ] }) : /* @__PURE__ */ W("p", {
1009
+ ] }) : /* @__PURE__ */ H("p", {
1008
1010
  className: "gmp-navigator-empty",
1009
1011
  children: "select an area to see its recorded work and map context"
1010
1012
  })
@@ -1013,13 +1015,13 @@ function nn({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
1013
1015
  ]
1014
1016
  });
1015
1017
  }
1016
- function rn({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
1017
- return /* @__PURE__ */ G("div", {
1018
+ function on({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l, lineCounts: u }) {
1019
+ return /* @__PURE__ */ U("div", {
1018
1020
  role: "none",
1019
1021
  className: "gmp-navigator-row-wrap",
1020
1022
  "data-selected": r,
1021
1023
  style: { "--gmp-tree-depth": e.depth },
1022
- children: [t ? /* @__PURE__ */ W("button", {
1024
+ children: [t ? /* @__PURE__ */ H("button", {
1023
1025
  type: "button",
1024
1026
  className: "gmp-navigator-disclosure",
1025
1027
  tabIndex: -1,
@@ -1031,14 +1033,14 @@ function rn({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1031
1033
  onClick: (t) => {
1032
1034
  t.stopPropagation(), e.forcedOpen || c();
1033
1035
  },
1034
- children: /* @__PURE__ */ W(K, {
1036
+ children: /* @__PURE__ */ H(W, {
1035
1037
  className: "gmp-navigator-chevron",
1036
1038
  "aria-hidden": "true"
1037
1039
  })
1038
- }) : /* @__PURE__ */ W("span", {
1040
+ }) : /* @__PURE__ */ H("span", {
1039
1041
  className: "gmp-navigator-disclosure-placeholder",
1040
1042
  "aria-hidden": "true"
1041
- }), /* @__PURE__ */ G("div", {
1043
+ }), /* @__PURE__ */ U("div", {
1042
1044
  ref: a,
1043
1045
  role: "treeitem",
1044
1046
  "aria-level": e.depth + 1,
@@ -1053,151 +1055,152 @@ function rn({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1053
1055
  },
1054
1056
  onKeyDown: l,
1055
1057
  children: [
1056
- e.node.kind === "file" ? /* @__PURE__ */ W(Pe, { "aria-hidden": "true" }) : /* @__PURE__ */ W(Le, { "aria-hidden": "true" }),
1057
- /* @__PURE__ */ W("span", {
1058
+ e.node.kind === "file" ? /* @__PURE__ */ H(Ie, { "aria-hidden": "true" }) : /* @__PURE__ */ H(ze, { "aria-hidden": "true" }),
1059
+ /* @__PURE__ */ H("span", {
1058
1060
  className: "gmp-navigator-path",
1059
1061
  children: e.node.name || e.node.id
1060
1062
  }),
1061
- /* @__PURE__ */ G("span", {
1063
+ /* @__PURE__ */ U("span", {
1062
1064
  className: "gmp-navigator-meta",
1063
- children: [/* @__PURE__ */ G("span", { children: [on(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ W("span", { children: sn(e.node.recordedFiles, e.node.totalFiles) })]
1065
+ children: [u === "unknown" ? null : /* @__PURE__ */ U("span", { children: [cn(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ H("span", { children: ln(e.node.recordedFiles, e.node.totalFiles) })]
1064
1066
  })
1065
1067
  ]
1066
1068
  })]
1067
1069
  });
1068
1070
  }
1069
- function an(e) {
1071
+ function sn(e) {
1070
1072
  return Array.from(e).sort().join("\0");
1071
1073
  }
1072
- function on(e) {
1073
- return Ee(Number(e) || 0);
1074
+ function cn(e) {
1075
+ return Oe(Number(e) || 0);
1074
1076
  }
1075
- function sn(e, t) {
1077
+ function ln(e, t) {
1076
1078
  let n = Number(t) || 0;
1077
1079
  return n <= 0 ? "no coverage data" : `${Math.round((Number(e) || 0) / n * 100)}% recorded`;
1078
1080
  }
1079
1081
  //#endregion
1080
1082
  //#region src/ui/graph/CodeMapComposition.jsx
1081
- function cn({ payload: e, zoom: n, onZoomChange: r, selectedId: i, onSelect: a, onExpand: s, highlightedIds: c, nodeDeltas: l, structureEdgeDeltas: u, height: d = 480, ariaLabel: f = "code map", canvasSlot: p, rail: m, toolbar: h, sheetTitle: g = "code area", sheetMeta: _, railSide: v = "right", legend: y, canvasWrapperClassName: b = "", canvasWrapperStyle: x, className: S = "", presentation: w = "canvas", navigatorSlot: T, onPresentationChange: E, viewport: D, onViewportChange: O, state: k, defaultState: A, onStateChange: j }) {
1082
- let N = k !== void 0 || A !== void 0, [P, F] = U(() => o(A)), I = V(() => N ? o(k ?? P) : null, [
1083
- N,
1084
- k,
1085
- P
1086
- ]), L = I?.presentation ?? w;
1083
+ function un({ payload: e, zoom: t, onZoomChange: n, selectedId: r, onSelect: i, onExpand: a, highlightedIds: o, nodeDeltas: s, structureEdgeDeltas: c, height: l = 480, ariaLabel: u = "code map", canvasSlot: d, rail: f, toolbar: p, sheetTitle: m = "code area", sheetMeta: h, railSide: g = "right", legend: _, canvasWrapperClassName: v = "", canvasWrapperStyle: y, className: b = "", presentation: x = "canvas", navigatorSlot: S, onPresentationChange: C, viewport: w, onViewportChange: T, state: E, defaultState: D, onStateChange: O, lineCounts: k = "measured" }) {
1084
+ let j = E !== void 0 || D !== void 0, [M, N] = V(() => A(D)), P = z(() => j ? A(E ?? M) : null, [
1085
+ j,
1086
+ E,
1087
+ M
1088
+ ]), F = P?.presentation ?? x;
1087
1089
  function ee(e, t) {
1088
- k === void 0 && F(e), j?.(e), t?.(e);
1090
+ E === void 0 && N(e), O?.(e), t?.(e);
1089
1091
  }
1090
- function R(e, n) {
1091
- if (!I) return;
1092
- let r = t(I, e);
1093
- C(I, r) || ee(r, n);
1092
+ function I(e, t) {
1093
+ if (!P) return;
1094
+ let n = be(P, e);
1095
+ Ce(P, n) || ee(n, t);
1094
1096
  }
1095
- let te = N || E ? /* @__PURE__ */ G(Oe, { children: [/* @__PURE__ */ G("div", {
1097
+ let te = j || C ? /* @__PURE__ */ U(Ae, { children: [/* @__PURE__ */ U("div", {
1096
1098
  className: "gmp-presentation-switch",
1097
1099
  role: "group",
1098
1100
  "aria-label": "code map view",
1099
- children: [/* @__PURE__ */ W("button", {
1101
+ children: [/* @__PURE__ */ H("button", {
1100
1102
  type: "button",
1101
- "aria-pressed": L === "navigator",
1102
- onClick: () => N ? R({
1103
+ "aria-pressed": F === "navigator",
1104
+ onClick: () => j ? I({
1103
1105
  type: "set-presentation",
1104
1106
  presentation: "navigator"
1105
- }, () => E?.("navigator")) : E?.("navigator"),
1106
- children: L === "canvas" ? "back to browse" : "browse"
1107
- }), /* @__PURE__ */ W("button", {
1107
+ }, () => C?.("navigator")) : C?.("navigator"),
1108
+ children: F === "canvas" ? "back to browse" : "browse"
1109
+ }), /* @__PURE__ */ H("button", {
1108
1110
  type: "button",
1109
- "aria-pressed": L === "canvas",
1110
- onClick: () => N ? R({
1111
+ "aria-pressed": F === "canvas",
1112
+ onClick: () => j ? I({
1111
1113
  type: "set-presentation",
1112
1114
  presentation: "canvas"
1113
- }, () => E?.("canvas")) : E?.("canvas"),
1115
+ }, () => C?.("canvas")) : C?.("canvas"),
1114
1116
  children: "spatial map"
1115
1117
  })]
1116
- }), h] }) : h, ne = p ?? /* @__PURE__ */ W(Zt, {
1118
+ }), p] }) : p, ne = d ?? /* @__PURE__ */ H($t, {
1117
1119
  payload: e,
1118
- zoom: I ? {
1119
- level: I.grain,
1120
- expanded: I.expandedIds
1121
- } : n,
1122
- onZoomChange: r,
1123
- selectedId: I ? I.selectedId : i,
1124
- onSelect: a,
1125
- onExpand: s,
1126
- highlightedIds: c,
1127
- nodeDeltas: l,
1128
- structureEdgeDeltas: u,
1129
- height: d,
1130
- ariaLabel: f,
1131
- viewport: I ? I.viewport ?? void 0 : D,
1132
- onViewportChange: O,
1133
- state: I ?? void 0,
1134
- onStateChange: I ? (e) => ee(e) : void 0
1135
- }), re = T ?? (I && e ? /* @__PURE__ */ W(nn, {
1120
+ zoom: P ? {
1121
+ level: P.grain,
1122
+ expanded: P.expandedIds
1123
+ } : t,
1124
+ onZoomChange: n,
1125
+ selectedId: P ? P.selectedId : r,
1126
+ onSelect: i,
1127
+ onExpand: a,
1128
+ highlightedIds: o,
1129
+ nodeDeltas: s,
1130
+ structureEdgeDeltas: c,
1131
+ height: l,
1132
+ ariaLabel: u,
1133
+ viewport: P ? P.viewport ?? void 0 : w,
1134
+ onViewportChange: T,
1135
+ state: P ?? void 0,
1136
+ onStateChange: P ? (e) => ee(e) : void 0
1137
+ }), re = S ?? (P && e ? /* @__PURE__ */ H(an, {
1136
1138
  payload: e,
1137
- grain: I.grain,
1138
- expandedIds: I.expandedIds,
1139
- selectedId: I.selectedId,
1140
- focusedId: I.navigatorFocusedId,
1141
- filter: I.navigatorFilter,
1142
- onStateAction: (t) => R(t, () => {
1143
- t.type === "select" ? a?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null) : t.type === "clear-selection" ? a?.(null, null) : t.type === "set-expanded" ? r?.({
1144
- level: I.grain,
1139
+ lineCounts: k,
1140
+ grain: P.grain,
1141
+ expandedIds: P.expandedIds,
1142
+ selectedId: P.selectedId,
1143
+ focusedId: P.navigatorFocusedId,
1144
+ filter: P.navigatorFilter,
1145
+ onStateAction: (t) => I(t, () => {
1146
+ t.type === "select" ? i?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null) : t.type === "clear-selection" ? i?.(null, null) : t.type === "set-expanded" ? n?.({
1147
+ level: P.grain,
1145
1148
  expanded: Array.from(t.ids)
1146
- }) : t.type === "open-in-map" && (a?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), E?.("canvas"));
1149
+ }) : t.type === "open-in-map" && (i?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), C?.("canvas"));
1147
1150
  }),
1148
- ariaLabel: `browse ${f}`
1149
- }) : null), ie = L === "navigator" && re !== null;
1150
- return /* @__PURE__ */ W("div", {
1151
- className: ["gmp-root", S].filter(Boolean).join(" "),
1152
- children: /* @__PURE__ */ G(M, {
1151
+ ariaLabel: `browse ${u}`
1152
+ }) : null), ie = F === "navigator" && re !== null;
1153
+ return /* @__PURE__ */ H("div", {
1154
+ className: ["gmp-root", b].filter(Boolean).join(" "),
1155
+ children: /* @__PURE__ */ U(oe, {
1153
1156
  toolbar: te,
1154
- rail: m,
1155
- sheetTitle: g,
1156
- sheetMeta: _,
1157
- railSide: v,
1158
- children: [/* @__PURE__ */ W("div", {
1159
- className: ["gmp-map-canvas-region", b].filter(Boolean).join(" "),
1160
- style: x,
1157
+ rail: f,
1158
+ sheetTitle: m,
1159
+ sheetMeta: h,
1160
+ railSide: g,
1161
+ children: [/* @__PURE__ */ H("div", {
1162
+ className: ["gmp-map-canvas-region", v].filter(Boolean).join(" "),
1163
+ style: y,
1161
1164
  "data-testid": "gmp-map-canvas-region",
1162
1165
  children: ie ? re : ne
1163
- }), !ie && y !== !1 && (y ?? /* @__PURE__ */ W(ln, {}))]
1166
+ }), !ie && _ !== !1 && (_ ?? /* @__PURE__ */ H(dn, {}))]
1164
1167
  })
1165
1168
  });
1166
1169
  }
1167
- function ln() {
1168
- return /* @__PURE__ */ G("p", {
1170
+ function dn() {
1171
+ return /* @__PURE__ */ U("p", {
1169
1172
  className: "gmp-map-legend",
1170
1173
  children: [
1171
- /* @__PURE__ */ G("span", {
1174
+ /* @__PURE__ */ U("span", {
1172
1175
  className: "gmp-legend-item",
1173
- children: [/* @__PURE__ */ W("span", {
1176
+ children: [/* @__PURE__ */ H("span", {
1174
1177
  className: "gmp-map-swatch",
1175
1178
  "aria-hidden": "true"
1176
1179
  }), " code area (folder or file)"]
1177
1180
  }),
1178
- /* @__PURE__ */ G("span", {
1181
+ /* @__PURE__ */ U("span", {
1179
1182
  className: "gmp-legend-item gmp-legend-dim",
1180
- children: [/* @__PURE__ */ W("span", {
1183
+ children: [/* @__PURE__ */ H("span", {
1181
1184
  className: "gmp-map-swatch gmp-map-swatch--empty",
1182
1185
  "aria-hidden": "true"
1183
1186
  }), " no saved conversation behind it"]
1184
1187
  }),
1185
- /* @__PURE__ */ W("span", {
1188
+ /* @__PURE__ */ H("span", {
1186
1189
  className: "gmp-legend-item gmp-legend-dim",
1187
1190
  children: "brighter = more of it built with AI on record"
1188
1191
  }),
1189
- /* @__PURE__ */ G("span", {
1192
+ /* @__PURE__ */ U("span", {
1190
1193
  className: "gmp-legend-item gmp-legend-dim",
1191
- children: [/* @__PURE__ */ W("span", {
1194
+ children: [/* @__PURE__ */ H("span", {
1192
1195
  className: "gmp-map-swatch gmp-map-swatch--edge",
1193
1196
  "aria-hidden": "true"
1194
1197
  }), " one area uses another"]
1195
1198
  }),
1196
- /* @__PURE__ */ W("span", {
1199
+ /* @__PURE__ */ H("span", {
1197
1200
  className: "gmp-legend-item gmp-map-legend-danger",
1198
1201
  children: "⚠ tangle — two areas that depend on each other"
1199
1202
  }),
1200
- /* @__PURE__ */ W("span", {
1203
+ /* @__PURE__ */ H("span", {
1201
1204
  className: "gmp-legend-item gmp-legend-dim",
1202
1205
  children: "double-click a folder to open its files"
1203
1206
  })
@@ -1206,26 +1209,26 @@ function ln() {
1206
1209
  }
1207
1210
  //#endregion
1208
1211
  //#region src/ui/graph/timelineNavigation.js
1209
- function un(e) {
1212
+ function J(e) {
1210
1213
  return typeof e == "object" && !!e && !Array.isArray(e);
1211
1214
  }
1212
- function X(e, t) {
1215
+ function Y(e, t) {
1213
1216
  let n = Object.keys(e).sort();
1214
1217
  return n.length === t.length && t.slice().sort().every((e, t) => e === n[t]);
1215
1218
  }
1216
- function dn(e) {
1219
+ function X(e) {
1217
1220
  return typeof e == "string" && e.length > 0;
1218
1221
  }
1219
1222
  function fn(e) {
1220
- return e === null || dn(e);
1223
+ return e === null || X(e);
1221
1224
  }
1222
1225
  function pn(e) {
1223
1226
  let t = !1;
1224
- if (un(e) && typeof e.type == "string" && (e.type === "open-change" && X(e, ["type", "change"]) && un(e.change) ? t = X(e.change, ["id", "branch"]) && dn(e.change.id) && fn(e.change.branch) : e.type === "open-session" && X(e, [
1227
+ if (J(e) && typeof e.type == "string" && (e.type === "open-change" && Y(e, ["type", "change"]) && J(e.change) ? t = Y(e.change, ["id", "branch"]) && X(e.change.id) && fn(e.change.branch) : e.type === "open-session" && Y(e, [
1225
1228
  "type",
1226
1229
  "sessionId",
1227
1230
  "source"
1228
- ]) && dn(e.sessionId) && un(e.source) ? e.source.kind === "commit" && X(e.source, ["kind", "commit"]) && un(e.source.commit) ? t = X(e.source.commit, ["id", "branch"]) && dn(e.source.commit.id) && fn(e.source.commit.branch) : (e.source.kind === "unlinked" || e.source.kind === "outside-window") && X(e.source, ["kind"]) && (t = !0) : (e.type === "open-map" || e.type === "show-older") && X(e, ["type"]) && (t = !0)), !t) throw TypeError([
1231
+ ]) && X(e.sessionId) && J(e.source) ? e.source.kind === "commit" && Y(e.source, ["kind", "commit"]) && J(e.source.commit) ? t = Y(e.source.commit, ["id", "branch"]) && X(e.source.commit.id) && fn(e.source.commit.branch) : (e.source.kind === "unlinked" || e.source.kind === "outside-window") && Y(e.source, ["kind"]) && (t = !0) : (e.type === "open-map" || e.type === "show-older") && Y(e, ["type"]) && (t = !0)), !t) throw TypeError([
1229
1232
  "Timeline navigation action rejected.",
1230
1233
  "What went wrong: the value is not an exact supported TimelineNavigationAction.",
1231
1234
  "Why it happened: an untyped caller supplied an unknown action, missing context, or extra fields.",
@@ -1238,20 +1241,20 @@ function pn(e) {
1238
1241
  //#endregion
1239
1242
  //#region src/ui/graph/ScentTag.jsx
1240
1243
  function mn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i = "", ...a }) {
1241
- if (!b.includes(e)) throw Error(`ScentTag render failed: what went wrong: unknown scent tag ${JSON.stringify(e)}; why: the value is not a member of the closed SCENT_TAGS set; where: src/ui/graph/ScentTag.jsx; when: rendering a ranked-list row; what it means: an upstream ranking derivation produced a value outside the frozen vocabulary; how to fix: only pass one of ${b.join(", ")}.`);
1244
+ if (!p.includes(e)) throw Error(`ScentTag render failed: what went wrong: unknown scent tag ${JSON.stringify(e)}; why: the value is not a member of the closed SCENT_TAGS set; where: src/ui/graph/ScentTag.jsx; when: rendering a ranked-list row; what it means: an upstream ranking derivation produced a value outside the frozen vocabulary; how to fix: only pass one of ${p.join(", ")}.`);
1242
1245
  if (!r) {
1243
- let n = /* @__PURE__ */ W("span", {
1246
+ let n = /* @__PURE__ */ H("span", {
1244
1247
  className: `tlp-scent${i ? ` ${i}` : ""}`,
1245
1248
  tabIndex: t ? 0 : void 0,
1246
1249
  ...a,
1247
1250
  children: e
1248
1251
  });
1249
- return t ? /* @__PURE__ */ W(h, {
1252
+ return t ? /* @__PURE__ */ H(xe, {
1250
1253
  content: t,
1251
1254
  children: n
1252
1255
  }) : n;
1253
1256
  }
1254
- let o = /* @__PURE__ */ W("button", {
1257
+ let o = /* @__PURE__ */ H("button", {
1255
1258
  type: "button",
1256
1259
  className: `tlp-scent tlp-scent-filter${n ? " tlp-scent-filter-active" : ""}${i ? ` ${i}` : ""}`,
1257
1260
  "aria-pressed": n,
@@ -1259,7 +1262,7 @@ function mn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i =
1259
1262
  ...a,
1260
1263
  children: e
1261
1264
  });
1262
- return t ? /* @__PURE__ */ W(h, {
1265
+ return t ? /* @__PURE__ */ H(xe, {
1263
1266
  content: t,
1264
1267
  children: o
1265
1268
  }) : o;
@@ -1267,7 +1270,7 @@ function mn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i =
1267
1270
  //#endregion
1268
1271
  //#region src/ui/graph/RankedRow.jsx
1269
1272
  function hn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i = "", ...a }) {
1270
- return /* @__PURE__ */ G("button", {
1273
+ return /* @__PURE__ */ U("button", {
1271
1274
  type: "button",
1272
1275
  className: [
1273
1276
  "tlp-ranked-row",
@@ -1278,9 +1281,9 @@ function hn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1278
1281
  onClick: () => r?.(e.id),
1279
1282
  ...a,
1280
1283
  children: [
1281
- /* @__PURE__ */ W(S, {
1284
+ /* @__PURE__ */ H(ee, {
1282
1285
  className: "tlp-ranked-doi-scope",
1283
- children: /* @__PURE__ */ W(xe, {
1286
+ children: /* @__PURE__ */ H(ye, {
1284
1287
  label: e.name,
1285
1288
  loc: t,
1286
1289
  recorded: Math.round(e.doi * 100) / 100,
@@ -1290,23 +1293,23 @@ function hn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1290
1293
  className: "tlp-ranked-doi"
1291
1294
  })
1292
1295
  }),
1293
- /* @__PURE__ */ W("span", {
1296
+ /* @__PURE__ */ H("span", {
1294
1297
  className: "tlp-ranked-name",
1295
1298
  title: e.name,
1296
1299
  children: e.name
1297
1300
  }),
1298
- /* @__PURE__ */ W("span", {
1301
+ /* @__PURE__ */ H("span", {
1299
1302
  className: "tlp-ranked-tags",
1300
1303
  "aria-label": "comprehension signals",
1301
- children: e.scentTags.map((t) => /* @__PURE__ */ W(mn, {
1304
+ children: e.scentTags.map((t) => /* @__PURE__ */ H(mn, {
1302
1305
  tag: t,
1303
1306
  hoverText: t.startsWith("agent wrote:") ? e.hoverText ?? void 0 : void 0
1304
1307
  }, t))
1305
1308
  }),
1306
- /* @__PURE__ */ W("span", {
1309
+ /* @__PURE__ */ H("span", {
1307
1310
  className: "tlp-ranked-doi-val tnum",
1308
1311
  "aria-hidden": "true",
1309
- children: we(e.doi, 2)
1312
+ children: Ee(e.doi, 2)
1310
1313
  })
1311
1314
  ]
1312
1315
  });
@@ -1319,7 +1322,7 @@ var Z = [
1319
1322
  "churn"
1320
1323
  ];
1321
1324
  function gn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1322
- let i = H([]), a = (e) => {
1325
+ let i = B([]), a = (e) => {
1323
1326
  let n = Z[e];
1324
1327
  n && (t(n), i.current[e]?.focus());
1325
1328
  }, o = (e, t) => {
@@ -1343,12 +1346,12 @@ function gn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1343
1346
  }
1344
1347
  e.preventDefault(), a(n);
1345
1348
  };
1346
- return /* @__PURE__ */ W("span", {
1349
+ return /* @__PURE__ */ H("span", {
1347
1350
  className: `tlp-rank-mode${n ? ` ${n}` : ""}`,
1348
1351
  role: "radiogroup",
1349
1352
  "aria-label": "rank mode",
1350
1353
  ...r,
1351
- children: Z.map((n, r) => /* @__PURE__ */ W("button", {
1354
+ children: Z.map((n, r) => /* @__PURE__ */ H("button", {
1352
1355
  type: "button",
1353
1356
  role: "radio",
1354
1357
  "aria-checked": e === n,
@@ -1366,7 +1369,7 @@ function gn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1366
1369
  //#endregion
1367
1370
  //#region src/ui/graph/InsightPanel.jsx
1368
1371
  function _n({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1369
- if (y(e), e.length === 0) return /* @__PURE__ */ W("p", {
1372
+ if (d(e), e.length === 0) return /* @__PURE__ */ H("p", {
1370
1373
  className: `tlp-insight-empty${n ? ` ${n}` : ""}`,
1371
1374
  ...r,
1372
1375
  children: "no insights recorded for this node yet."
@@ -1376,35 +1379,35 @@ function _n({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1376
1379
  let e = i.get(t.kind) ?? [];
1377
1380
  e.push(t), i.set(t.kind, e);
1378
1381
  }
1379
- return /* @__PURE__ */ W("div", {
1382
+ return /* @__PURE__ */ H("div", {
1380
1383
  className: `tlp-insight-panel${n ? ` ${n}` : ""}`,
1381
1384
  ...r,
1382
- children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ G("section", {
1385
+ children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ U("section", {
1383
1386
  className: "tlp-insight-group",
1384
- "aria-label": D[e],
1385
- children: [/* @__PURE__ */ W("p", {
1387
+ "aria-label": C[e],
1388
+ children: [/* @__PURE__ */ H("p", {
1386
1389
  className: "tlp-insight-group-title",
1387
- children: D[e]
1388
- }), /* @__PURE__ */ W("ul", {
1390
+ children: C[e]
1391
+ }), /* @__PURE__ */ H("ul", {
1389
1392
  className: "tlp-insight-list",
1390
- children: n.map((e, n) => /* @__PURE__ */ G("li", {
1393
+ children: n.map((e, n) => /* @__PURE__ */ U("li", {
1391
1394
  className: "tlp-insight-item",
1392
1395
  children: [
1393
- /* @__PURE__ */ W("span", {
1394
- className: `tlp-insight-provenance ${k[e.provenance].markerClass}`,
1396
+ /* @__PURE__ */ H("span", {
1397
+ className: `tlp-insight-provenance ${s[e.provenance].markerClass}`,
1395
1398
  "aria-hidden": "true"
1396
1399
  }),
1397
- /* @__PURE__ */ W("span", {
1400
+ /* @__PURE__ */ H("span", {
1398
1401
  className: "tlp-insight-title",
1399
1402
  children: e.title
1400
1403
  }),
1401
- e.summary && /* @__PURE__ */ W("span", {
1404
+ e.summary && /* @__PURE__ */ H("span", {
1402
1405
  className: "tlp-insight-summary",
1403
1406
  children: e.summary
1404
1407
  }),
1405
- /* @__PURE__ */ W("span", {
1408
+ /* @__PURE__ */ H("span", {
1406
1409
  className: "tlp-insight-evidence",
1407
- children: e.evidence.map((e, n) => /* @__PURE__ */ W("button", {
1410
+ children: e.evidence.map((e, n) => /* @__PURE__ */ H("button", {
1408
1411
  type: "button",
1409
1412
  className: "tlp-insight-evidence-link",
1410
1413
  onClick: () => t?.(e.sessionId),
@@ -1590,9 +1593,9 @@ function Sn(e) {
1590
1593
  //#endregion
1591
1594
  //#region src/ui/transcript/graph/engine/useCanvasSync.js
1592
1595
  function Cn(e, t, n) {
1593
- let r = Nt();
1596
+ let r = Ft();
1594
1597
  return {
1595
- focusPhase: z((i) => {
1598
+ focusPhase: L((i) => {
1596
1599
  let a = e[i];
1597
1600
  if (!a) return;
1598
1601
  let o = /* @__PURE__ */ new Set();
@@ -1620,7 +1623,7 @@ function Cn(e, t, n) {
1620
1623
  r,
1621
1624
  n
1622
1625
  ]),
1623
- focusTurn: z((e) => {
1626
+ focusTurn: L((e) => {
1624
1627
  let n = t[e]?.index ?? e, i = r.getNodes().find((e) => e.type === "turn" && e.data.turn.index === n);
1625
1628
  i && r.setCenter(i.position.x + Q.turnWidth / 2, i.position.y + Q.turnBaseHeight / 2, {
1626
1629
  zoom: 1,
@@ -1638,17 +1641,17 @@ function wn(e, t) {
1638
1641
  }
1639
1642
  function Tn({ data: e, selected: t }) {
1640
1643
  let { turn: n, annotations: r, isSearchMatch: i, isFilteredOut: a, isSelected: o, turnNumber: s, provider: c } = e, l = n.depth ?? 0, u = n.role === "assistant" && l > 0, d = r.some((e) => e.type === "error"), f = r.some((e) => e.type === "retry"), p = r.some((e) => e.type === "revert");
1641
- return /* @__PURE__ */ G("div", {
1644
+ return /* @__PURE__ */ U("div", {
1642
1645
  "data-turn-index": n.index,
1643
1646
  "data-harness": u ? void 0 : n.role === "assistant" ? c : void 0,
1644
1647
  style: { width: Q.turnWidth },
1645
1648
  children: [
1646
- /* @__PURE__ */ W(q, {
1649
+ /* @__PURE__ */ H(G, {
1647
1650
  type: "target",
1648
- position: J.Top,
1651
+ position: K.Top,
1649
1652
  className: "tb-gnode-handle tb-gnode-handle-top"
1650
1653
  }),
1651
- /* @__PURE__ */ W(A, {
1654
+ /* @__PURE__ */ H(O, {
1652
1655
  role: n.role,
1653
1656
  agentName: u ? n.agentName : void 0,
1654
1657
  turnNumber: s,
@@ -1665,21 +1668,21 @@ function Tn({ data: e, selected: t }) {
1665
1668
  isSelected: t || o,
1666
1669
  provider: c
1667
1670
  }),
1668
- /* @__PURE__ */ W(q, {
1671
+ /* @__PURE__ */ H(G, {
1669
1672
  type: "source",
1670
- position: J.Bottom,
1673
+ position: K.Bottom,
1671
1674
  className: "tb-gnode-handle tb-gnode-handle-bottom"
1672
1675
  }),
1673
- /* @__PURE__ */ W(q, {
1676
+ /* @__PURE__ */ H(G, {
1674
1677
  type: "source",
1675
1678
  id: "tool-source",
1676
- position: J.Right,
1679
+ position: K.Right,
1677
1680
  className: "tb-gnode-handle tb-gnode-handle-right"
1678
1681
  })
1679
1682
  ]
1680
1683
  });
1681
1684
  }
1682
- var En = De(Tn);
1685
+ var En = ke(Tn);
1683
1686
  //#endregion
1684
1687
  //#region src/ui/transcript/graph/engine/nodes/ToolPillNode.jsx
1685
1688
  function Dn({ data: e }) {
@@ -1692,14 +1695,14 @@ function Dn({ data: e }) {
1692
1695
  exitCode: e.exitCode ?? void 0,
1693
1696
  preview: n[e.id] ?? ""
1694
1697
  }));
1695
- return /* @__PURE__ */ G("div", {
1698
+ return /* @__PURE__ */ U("div", {
1696
1699
  style: { width: Q.toolCallWidth },
1697
- children: [/* @__PURE__ */ W(q, {
1700
+ children: [/* @__PURE__ */ H(G, {
1698
1701
  type: "target",
1699
1702
  id: "tool-target",
1700
- position: J.Left,
1703
+ position: K.Left,
1701
1704
  className: "tb-gnode-handle tb-gnode-handle-left"
1702
- }), /* @__PURE__ */ W(R, {
1705
+ }), /* @__PURE__ */ H(I, {
1703
1706
  tools: o,
1704
1707
  totalDurationMs: r,
1705
1708
  hasError: i,
@@ -1707,59 +1710,59 @@ function Dn({ data: e }) {
1707
1710
  })]
1708
1711
  });
1709
1712
  }
1710
- var On = De(Dn);
1713
+ var On = ke(Dn);
1711
1714
  //#endregion
1712
1715
  //#region src/ui/transcript/graph/engine/nodes/SubagentBranchNode.jsx
1713
1716
  function kn({ data: e }) {
1714
1717
  let { agentName: t, depth: n } = e;
1715
- return /* @__PURE__ */ W(pe, {
1718
+ return /* @__PURE__ */ H(fe, {
1716
1719
  agentName: t,
1717
1720
  depth: n
1718
1721
  });
1719
1722
  }
1720
- var An = De(kn);
1723
+ var An = ke(kn);
1721
1724
  //#endregion
1722
1725
  //#region src/ui/transcript/graph/engine/GraphControls.jsx
1723
1726
  function jn({ className: e = "" }) {
1724
- let t = Nt();
1725
- return /* @__PURE__ */ G("div", {
1727
+ let t = Ft();
1728
+ return /* @__PURE__ */ U("div", {
1726
1729
  className: ["tb-graph-controls", e].filter(Boolean).join(" "),
1727
1730
  children: [
1728
- /* @__PURE__ */ W(Mn, {
1731
+ /* @__PURE__ */ H(Mn, {
1729
1732
  label: "zoom in",
1730
1733
  onClick: () => t.zoomIn({ duration: 150 }),
1731
- children: /* @__PURE__ */ W(We, {
1734
+ children: /* @__PURE__ */ H(Ke, {
1732
1735
  size: 14,
1733
1736
  strokeWidth: 2
1734
1737
  })
1735
1738
  }),
1736
- /* @__PURE__ */ W(Mn, {
1739
+ /* @__PURE__ */ H(Mn, {
1737
1740
  label: "zoom out",
1738
1741
  onClick: () => t.zoomOut({ duration: 150 }),
1739
- children: /* @__PURE__ */ W(Ue, {
1742
+ children: /* @__PURE__ */ H(Ge, {
1740
1743
  size: 14,
1741
1744
  strokeWidth: 2
1742
1745
  })
1743
1746
  }),
1744
- /* @__PURE__ */ W(Mn, {
1747
+ /* @__PURE__ */ H(Mn, {
1745
1748
  label: "fit view",
1746
1749
  onClick: () => t.fitView({
1747
1750
  padding: .1,
1748
1751
  duration: 250
1749
1752
  }),
1750
- children: /* @__PURE__ */ W(Ve, {
1753
+ children: /* @__PURE__ */ H(Ue, {
1751
1754
  size: 14,
1752
1755
  strokeWidth: 1.75
1753
1756
  })
1754
1757
  }),
1755
- /* @__PURE__ */ W(Mn, {
1758
+ /* @__PURE__ */ H(Mn, {
1756
1759
  label: "reset",
1757
1760
  onClick: () => t.setViewport({
1758
1761
  x: 0,
1759
1762
  y: 0,
1760
1763
  zoom: 1
1761
1764
  }, { duration: 200 }),
1762
- children: /* @__PURE__ */ W(Ge, {
1765
+ children: /* @__PURE__ */ H(qe, {
1763
1766
  size: 14,
1764
1767
  strokeWidth: 1.75
1765
1768
  })
@@ -1768,7 +1771,7 @@ function jn({ className: e = "" }) {
1768
1771
  });
1769
1772
  }
1770
1773
  function Mn({ label: e, onClick: t, children: n }) {
1771
- return /* @__PURE__ */ W("button", {
1774
+ return /* @__PURE__ */ H("button", {
1772
1775
  type: "button",
1773
1776
  onClick: t,
1774
1777
  "aria-label": e,
@@ -1780,8 +1783,8 @@ function Mn({ label: e, onClick: t, children: n }) {
1780
1783
  //#endregion
1781
1784
  //#region src/ui/transcript/graph/engine/TrajectoryGraphLegend.jsx
1782
1785
  function Nn({ provider: e, className: t = "" }) {
1783
- let r = e && n(e).toLocaleLowerCase("en-US") || "agent";
1784
- return /* @__PURE__ */ W(se, {
1786
+ let n = e && Te(e).toLocaleLowerCase("en-US") || "agent";
1787
+ return /* @__PURE__ */ H(se, {
1785
1788
  className: ["tb-graph-legend", t].filter(Boolean).join(" "),
1786
1789
  items: [
1787
1790
  {
@@ -1790,7 +1793,7 @@ function Nn({ provider: e, className: t = "" }) {
1790
1793
  },
1791
1794
  {
1792
1795
  kind: "assistant",
1793
- label: r,
1796
+ label: n,
1794
1797
  provider: e
1795
1798
  },
1796
1799
  {
@@ -1816,15 +1819,15 @@ var Pn = {
1816
1819
  subagentLane: An
1817
1820
  };
1818
1821
  function Fn(e) {
1819
- return /* @__PURE__ */ W(At, { children: /* @__PURE__ */ W(In, { ...e }) });
1822
+ return /* @__PURE__ */ H(Mt, { children: /* @__PURE__ */ H(In, { ...e }) });
1820
1823
  }
1821
1824
  function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotations: i, searchMatches: a, searchQuery: o, activeMatchIndex: s, focusTurn: c, focusPhase: l, onPhaseActivate: u, onViewportChange: d, selectedTurns: f, provider: p, className: m = "" }) {
1822
- let h = Nt(), { focusTurn: g, focusPhase: _ } = Cn(r, e, u), v = V(() => {
1825
+ let h = Ft(), { focusTurn: g, focusPhase: _ } = Cn(r, e, u), v = z(() => {
1823
1826
  if (n.length === e.length) return /* @__PURE__ */ new Set();
1824
1827
  let t = new Set(n), r = /* @__PURE__ */ new Set();
1825
1828
  for (let n = 0; n < e.length; n++) t.has(e[n]) && r.add(n);
1826
1829
  return r;
1827
- }, [e, n]), y = V(() => xn({
1830
+ }, [e, n]), y = z(() => xn({
1828
1831
  turns: e,
1829
1832
  toolVMsByTurn: t,
1830
1833
  phases: r,
@@ -1842,13 +1845,13 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1842
1845
  v,
1843
1846
  o,
1844
1847
  f
1845
- ]), b = V(() => y.nodes.map((e) => e.type === "turn" ? {
1848
+ ]), b = z(() => y.nodes.map((e) => e.type === "turn" ? {
1846
1849
  ...e,
1847
1850
  data: {
1848
1851
  ...e.data,
1849
1852
  provider: p
1850
1853
  }
1851
- } : e), [y.nodes, p]), x = V(() => Sn(b), [b]), S = V(() => y.edges.map((e) => {
1854
+ } : e), [y.nodes, p]), x = z(() => Sn(b), [b]), S = z(() => y.edges.map((e) => {
1852
1855
  let t = e.sourceHandle === "tool-source";
1853
1856
  return {
1854
1857
  ...e,
@@ -1861,8 +1864,8 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1861
1864
  },
1862
1865
  animated: t ? !1 : e.animated
1863
1866
  };
1864
- }), [y.edges]), C = V(() => [...x, ...b], [x, b]), [w, T, E] = Mt(C), [D, O, k] = jt(S), A = H(e.length), j = H(o), M = H(n.length);
1865
- B(() => {
1867
+ }), [y.edges]), C = z(() => [...x, ...b], [x, b]), [w, T, E] = Pt(C), [D, O, k] = Nt(S), A = B(e.length), j = B(o), M = B(n.length);
1868
+ R(() => {
1866
1869
  (e.length !== A.current || o !== j.current || n.length !== M.current) && (T(C), O(S), A.current = e.length, j.current = o, M.current = n.length);
1867
1870
  }, [
1868
1871
  C,
@@ -1872,7 +1875,7 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1872
1875
  n.length,
1873
1876
  T,
1874
1877
  O
1875
- ]), B(() => {
1878
+ ]), R(() => {
1876
1879
  if (s === void 0) return;
1877
1880
  let t = e[s]?.index;
1878
1881
  if (t === void 0) return;
@@ -1887,16 +1890,16 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1887
1890
  h,
1888
1891
  e
1889
1892
  ]);
1890
- let N = H(-1);
1891
- B(() => {
1893
+ let N = B(-1);
1894
+ R(() => {
1892
1895
  !c || c.seq === N.current || (N.current = c.seq, g(c.target));
1893
1896
  }, [c, g]);
1894
- let P = H(-1);
1895
- B(() => {
1897
+ let P = B(-1);
1898
+ R(() => {
1896
1899
  !l || l.seq === P.current || (P.current = l.seq, _(l.target));
1897
1900
  }, [l, _]);
1898
- let F = H(!1);
1899
- B(() => {
1901
+ let F = B(!1);
1902
+ R(() => {
1900
1903
  w.length > 0 && !F.current && (F.current = !0, setTimeout(() => {
1901
1904
  let e = w.find((e) => e.type === "turn");
1902
1905
  e ? h.setCenter(e.position.x + Q.turnWidth / 2, e.position.y + Q.turnBaseHeight, {
@@ -1912,13 +1915,13 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1912
1915
  h,
1913
1916
  w
1914
1917
  ]);
1915
- let I = z((e) => {
1918
+ let ee = L((e) => {
1916
1919
  if (e.type === "turn") {
1917
1920
  let t = e.data;
1918
1921
  return t.annotations?.some?.((e) => e.type === "error") ? "var(--danger)" : t.isFilteredOut ? "var(--rule)" : t.turn.role === "user" ? "var(--teal)" : t.turn.role === "assistant" ? "var(--amber)" : "var(--ink-2)";
1919
1922
  }
1920
1923
  return e.type === "toolCall" ? "var(--ink-3)" : "var(--rule)";
1921
- }, []), L = z((e, t) => {
1924
+ }, []), I = L((e, t) => {
1922
1925
  if (t.type !== "turn") return;
1923
1926
  let n = t.data;
1924
1927
  d?.({
@@ -1926,21 +1929,21 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1926
1929
  end: n.turn.index
1927
1930
  });
1928
1931
  }, [d]);
1929
- return /* @__PURE__ */ W("div", {
1932
+ return /* @__PURE__ */ H("div", {
1930
1933
  className: [
1931
1934
  "tb-root",
1932
1935
  "tb-graph",
1933
1936
  m
1934
1937
  ].filter(Boolean).join(" "),
1935
- children: /* @__PURE__ */ G("div", {
1938
+ children: /* @__PURE__ */ U("div", {
1936
1939
  className: "tb-graph-flow",
1937
1940
  children: [
1938
- /* @__PURE__ */ G(kt, {
1941
+ /* @__PURE__ */ U(jt, {
1939
1942
  nodes: w,
1940
1943
  edges: D,
1941
1944
  onNodesChange: E,
1942
1945
  onEdgesChange: k,
1943
- onNodeClick: L,
1946
+ onNodeClick: I,
1944
1947
  nodeTypes: Pn,
1945
1948
  fitView: !1,
1946
1949
  minZoom: .2,
@@ -1957,26 +1960,26 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1957
1960
  panOnDrag: !0,
1958
1961
  panOnScroll: !0,
1959
1962
  zoomOnScroll: !0,
1960
- children: [/* @__PURE__ */ W(Et, {
1961
- variant: Dt.Dots,
1963
+ children: [/* @__PURE__ */ H(Ot, {
1964
+ variant: kt.Dots,
1962
1965
  gap: 20,
1963
1966
  size: 1,
1964
1967
  color: "var(--rule)"
1965
- }), /* @__PURE__ */ W(Ot, {
1968
+ }), /* @__PURE__ */ H(At, {
1966
1969
  zoomable: !0,
1967
1970
  pannable: !0,
1968
- nodeColor: I,
1971
+ nodeColor: ee,
1969
1972
  nodeStrokeColor: "var(--rule)",
1970
1973
  nodeBorderRadius: 0,
1971
1974
  maskColor: "color-mix(in srgb, var(--canvas) 70%, transparent)",
1972
1975
  className: "tb-graph-minimap"
1973
1976
  })]
1974
1977
  }),
1975
- /* @__PURE__ */ W(jn, {}),
1976
- /* @__PURE__ */ W(Nn, { provider: p })
1978
+ /* @__PURE__ */ H(jn, {}),
1979
+ /* @__PURE__ */ H(Nn, { provider: p })
1977
1980
  ]
1978
1981
  })
1979
1982
  });
1980
1983
  }
1981
1984
  //#endregion
1982
- export { $e as AllChangeBindings, et as AllDiffLineKinds, tt as AllEdgeViolationKinds, nt as AllFileChangeStatuses, rt as AllInsightKinds, it as AllInsightProvenances, at as AllMapNodeKinds, ot as AllReadAttributionStates, st as AllReadStateGrades, e as CHANGE_BINDINGS, i as CODE_MAP_STATE_VERSION, be as CODE_MAP_VIEWPORT_SCALE, m as COVERAGE_CAP, ct as ChangeBinding, Jt as ChangeDetail, Bt as Changes, Zt as CodeMap, cn as CodeMapComposition, nn as CodeMapNavigator, g as DEBT_VIEWED, F as DIFF_LINE_KINDS, v as DOI_WEIGHTS, ln as DefaultMapLegend, lt as DiffLineKind, $ as EDGE_DEFAULTS, ve as EDGE_VIOLATION_KINDS, ut as EdgeViolationKind, ce as FILE_CHANGE_STATUSES, dt as FileChangeStatus, he as GRAPH_APP_SECTIONS, _e as GRAPH_LEGEND_ITEMS, ee as GhostCommitNode, de as GhostGroup, N as GraphAppShell, jn as GraphControls, se as GraphLegend, ie as GraphSectionNav, pe as GraphSubagentBranch, R as GraphToolNode, A as GraphTurnNode, P as HighlightEdge, ft as InsightKind, _n as InsightPanel, pt as InsightProvenance, I as LOCAL_APP_SECTIONS, me as MAP_NODE_KINDS, mt as MapNodeKind, Q as NODE_DIMENSIONS, s as RANK_CAP, u as RANK_FLOOR, p as RECENCY_HALF_LIFE_DAYS, gn as RankModeControl, hn as RankedRow, ht as ReadAttributionState, gt as ReadStateGrade, b as SCENT_TAGS, mn as ScentTag, oe as SessionLane, L as SessionOverflowDisclosure, An as SubagentBranchNode, On as ToolPillNode, ye as TouchedFileCluster, Fn as TrajectoryGraph, Nn as TrajectoryGraphLegend, En as TurnCardNode, le as VillageObservations, te as assertChangeDetailPayloadEnums, j as assertChangeDiffPayloadEnums, ue as assertCodeMapPayloadEnums, pn as assertTimelineNavigationAction, Rt as buildChangesGraph, Qt as codeMapPayloadToMapData, C as codeMapStatesEqual, Sn as computeLaneHeaders, Ce as coverage, o as createCodeMapState, r as debt, T as debtHoverText, l as debtState, a as deriveCodeMapView, w as deriveRankedRows, _ as deriveTimelineHighlight, E as gateRankedRows, Y as humanizeAge, c as hunkClears, _t as isChangeBinding, re as isCodeMapViewportScale, vt as isDiffLineKind, yt as isEdgeViolationKind, bt as isFileChangeStatus, xt as isInsightKind, St as isInsightProvenance, Ct as isMapNodeKind, wt as isReadAttributionState, Tt as isReadStateGrade, f as partialReadHoverText, fe as rankMapNodes, d as rankMapNodesIntrinsic, t as reduceCodeMapState, ne as resolveEscapeAction, O as scentTagsFor, xn as turnsToFlow, Cn as useCanvasSync };
1985
+ export { tt as AllChangeBindings, nt as AllDiffLineKinds, rt as AllEdgeViolationKinds, it as AllFileChangeStatuses, at as AllInsightKinds, ot as AllInsightProvenances, st as AllMapNodeKinds, ct as AllReadAttributionStates, lt as AllReadStateGrades, de as CHANGE_BINDINGS, D as CODE_MAP_STATE_VERSION, ve as CODE_MAP_VIEWPORT_SCALE, a as COVERAGE_CAP, ut as ChangeBinding, Xt as ChangeDetail, Ht as Changes, $t as CodeMap, un as CodeMapComposition, an as CodeMapNavigator, i as DEBT_VIEWED, u as DIFF_LINE_KINDS, h as DOI_WEIGHTS, dn as DefaultMapLegend, dt as DiffLineKind, $ as EDGE_DEFAULTS, T as EDGE_VIOLATION_KINDS, ft as EdgeViolationKind, w as FILE_CHANGE_STATUSES, pt as FileChangeStatus, me as GRAPH_APP_SECTIONS, ge as GRAPH_LEGEND_ITEMS, ae as GhostCommitNode, he as GhostGroup, j as GraphAppShell, jn as GraphControls, se as GraphLegend, ie as GraphSectionNav, fe as GraphSubagentBranch, I as GraphToolNode, O as GraphTurnNode, k as HighlightEdge, mt as InsightKind, _n as InsightPanel, ht as InsightProvenance, P as LOCAL_APP_SECTIONS, E as MAP_NODE_KINDS, gt as MapNodeKind, Q as NODE_DIMENSIONS, re as RANK_CAP, t as RANK_FLOOR, ne as RECENCY_HALF_LIFE_DAYS, gn as RankModeControl, hn as RankedRow, _t as ReadAttributionState, vt as ReadStateGrade, p as SCENT_TAGS, mn as ScentTag, M as SessionLane, le as SessionOverflowDisclosure, An as SubagentBranchNode, On as ToolPillNode, te as TouchedFileCluster, Fn as TrajectoryGraph, Nn as TrajectoryGraphLegend, En as TurnCardNode, ce as VillageObservations, _ as assertChangeDetailPayloadEnums, e as assertChangeDiffPayloadEnums, N as assertCodeMapPayloadEnums, pn as assertTimelineNavigationAction, Bt as buildChangesGraph, en as codeMapPayloadToMapData, Ce as codeMapStatesEqual, Sn as computeLaneHeaders, m as coverage, A as createCodeMapState, g as debt, o as debtHoverText, l as debtState, Se as deriveCodeMapView, f as deriveRankedRows, y as deriveTimelineHighlight, v as gateRankedRows, q as humanizeAge, we as hunkClears, yt as isChangeBinding, r as isCodeMapViewportScale, bt as isDiffLineKind, xt as isEdgeViolationKind, St as isFileChangeStatus, Ct as isInsightKind, wt as isInsightProvenance, Tt as isMapNodeKind, Et as isReadAttributionState, Dt as isReadStateGrade, n as partialReadHoverText, S as rankMapNodes, c as rankMapNodesIntrinsic, be as reduceCodeMapState, b as resolveEscapeAction, x as scentTagsFor, xn as turnsToFlow, Cn as useCanvasSync };