@peasant-labs/fairtrade 0.0.40 → 0.0.41

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 (37) 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/graph.js +477 -476
  6. package/dist/lib/share-fonts/AtkinsonHyperlegible-Bold.ttf +0 -0
  7. package/dist/lib/share-fonts/AtkinsonHyperlegible-Regular.ttf +0 -0
  8. package/dist/lib/share-fonts/AtkinsonHyperlegibleMono-Bold.ttf +0 -0
  9. package/dist/lib/share-fonts/AtkinsonHyperlegibleMono-Regular.ttf +0 -0
  10. package/dist/lib/share-fonts/OFL-AtkinsonHyperlegible.txt +92 -0
  11. package/dist/lib/share-fonts/OFL-AtkinsonHyperlegibleMono.txt +93 -0
  12. package/dist/lib/share.js +1311 -0
  13. package/dist/lib/time-CpVBzcqQ.js +157 -0
  14. package/dist/lib/types/BrandMark.d.ts +2 -6
  15. package/dist/lib/types/brand-geometry.d.ts +22 -0
  16. package/dist/lib/types/commons/providers.d.ts +1 -1
  17. package/dist/lib/types/share/ShareCard.d.ts +40 -0
  18. package/dist/lib/types/share/data.d.ts +54 -0
  19. package/dist/lib/types/share/fonts.d.ts +16 -0
  20. package/dist/lib/types/share/index.d.ts +5 -0
  21. package/dist/lib/types/share/marks.d.ts +23 -0
  22. package/dist/lib/types/share/metrics.d.ts +10 -0
  23. package/dist/lib/types/transcript/title.d.ts +21 -0
  24. package/dist/lib/types/ui/brand-geometry.d.ts +22 -0
  25. package/dist/lib/types/ui/format.d.ts +35 -0
  26. package/dist/lib/types/ui/provider-policy.d.ts +27 -0
  27. package/dist/lib/types/ui/transcript/adapter.d.ts +66 -0
  28. package/dist/lib/types/ui/transcript/adapter.parse.d.ts +103 -0
  29. package/dist/lib/types/ui/transcript/analytics.d.ts +213 -0
  30. package/dist/lib/types/ui/transcript/time.d.ts +47 -0
  31. package/dist/lib/types/ui/transcript/title.d.ts +84 -0
  32. package/dist/lib/types/ui/transcript/usage.d.ts +19 -0
  33. package/dist/lib/types/ui/transcript/view-model.d.ts +700 -0
  34. package/dist/lib/types/ui/transcript/wire-types.d.ts +63 -0
  35. package/dist/lib/{ui-DMUCYaeU.js → ui-Bhk29YuW.js} +3700 -4896
  36. package/dist/lib/ui.js +7 -5
  37. package/package.json +14 -4
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 I, i as ee, 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,179 @@ 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" }) {
853
+ let [p, m] = V(() => /* @__PURE__ */ new Set()), [h, g] = V(null), _ = n === void 0 ? p : new Set(n), v = o === void 0 ? h : o, y = B(/* @__PURE__ */ new Map()), b = z(() => Se(e, A({
853
854
  grain: t,
854
- expandedIds: Array.from(y),
855
+ expandedIds: Array.from(_),
855
856
  selectedId: i,
856
- navigatorFocusedId: b,
857
- navigatorFilter: u
857
+ navigatorFocusedId: v,
858
+ navigatorFilter: c
858
859
  })), [
859
860
  e,
860
861
  t,
861
- an(y),
862
+ sn(_),
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
+ v,
865
+ c
866
+ ]), x = b.rows, S = b.focusedId, C = b.selected, w = C ? x.find((e) => e.node.id === C.id) : null, T = !!w?.canExpand && !w.forcedOpen;
867
+ function E(e) {
868
+ n === void 0 && m(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 D(e) {
874
+ let t = new Set(_);
875
+ t.has(e) ? t.delete(e) : t.add(e), E(t);
875
876
  }
876
- function A(e) {
877
- c === void 0 && v(e), p?.({
877
+ function O(e) {
878
+ o === void 0 && g(e), d?.({
878
879
  type: "focus",
879
880
  id: e
880
- }), l?.(e), x.current.get(e)?.focus();
881
+ }), s?.(e), y.current.get(e)?.focus();
881
882
  }
882
- function j(e) {
883
- c === void 0 && v(e.id), x.current.get(e.id)?.focus(), p?.({
883
+ function k(e) {
884
+ o === void 0 && g(e.id), y.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
- function M(e, t) {
889
- let n = C[t];
889
+ function j(e, t) {
890
+ let n = x[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 = x[Math.min(t + 1, x.length - 1)]?.node.id;
894
+ else if (e.key === "ArrowUp") i = x[Math.max(t - 1, 0)]?.node.id;
895
+ else if (e.key === "Home") i = x[0]?.node.id;
896
+ else if (e.key === "End") i = x[x.length - 1]?.node.id;
897
+ else if (e.key === "ArrowRight" && (n.canExpand || n.forcedOpen)) n.forcedOpen || n.expanded ? i = n.childIds[0] ?? null : _.has(r.id) || D(r.id);
898
+ else if (e.key === "ArrowLeft") !n.forcedOpen && n.canExpand && n.expanded ? D(r.id) : i = n.parentId;
898
899
  else if (e.key === "Enter" || e.key === " ") {
899
- j(r), e.preventDefault();
900
+ k(r), e.preventDefault();
900
901
  return;
901
902
  } else return;
902
- e.preventDefault(), i && A(i);
903
+ e.preventDefault(), i && O(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
+ b.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: x.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: x.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
+ }) : x.map((e, t) => {
959
+ let n = e.canExpand || e.forcedOpen, r = e.expanded, a = S === 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 ? y.current.set(e.node.id, t) : y.current.delete(e.node.id);
967
968
  },
968
969
  onFocus: () => {
969
- c === void 0 && v(e.node.id);
970
+ o === void 0 && g(e.node.id);
970
971
  },
971
- onSelect: () => j(e.node),
972
+ onSelect: () => k(e.node),
972
973
  onToggle: () => {
973
- e.forcedOpen || k(e.node.id);
974
+ e.forcedOpen || D(e.node.id);
974
975
  },
975
- onKeyDown: (e) => M(e, t)
976
+ onKeyDown: (e) => j(e, t)
976
977
  }, e.node.id);
977
978
  })
978
- }), /* @__PURE__ */ W("aside", {
979
+ }), /* @__PURE__ */ H("aside", {
979
980
  className: "gmp-navigator-actions",
980
981
  "aria-label": "selected code area",
981
- children: T ? /* @__PURE__ */ G(Oe, { children: [
982
- /* @__PURE__ */ W("p", {
982
+ children: C ? /* @__PURE__ */ U(Ae, { children: [
983
+ /* @__PURE__ */ H("p", {
983
984
  className: "gmp-navigator-selected",
984
- children: T.name || T.id
985
+ children: C.name || C.id
985
986
  }),
986
- /* @__PURE__ */ W("p", {
987
+ /* @__PURE__ */ H("p", {
987
988
  className: "gmp-navigator-selected-path",
988
- children: T.id
989
+ children: C.id
989
990
  }),
990
- D ? /* @__PURE__ */ G("button", {
991
+ T ? /* @__PURE__ */ U("button", {
991
992
  type: "button",
992
993
  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"]
994
+ onClick: () => D(C.id),
995
+ children: [/* @__PURE__ */ H(W, { "aria-hidden": "true" }), _.has(C.id) ? "hide children" : "show children"]
995
996
  }) : null,
996
- /* @__PURE__ */ G("button", {
997
+ /* @__PURE__ */ U("button", {
997
998
  type: "button",
998
999
  className: "gmp-navigator-action gmp-navigator-action--primary",
999
1000
  onClick: () => {
1000
- p?.({
1001
+ d?.({
1001
1002
  type: "open-in-map",
1002
- id: T.id
1003
- }), f?.(T.id);
1003
+ id: C.id
1004
+ }), u?.(C.id);
1004
1005
  },
1005
- children: [/* @__PURE__ */ W(Be, { "aria-hidden": "true" }), " open in map"]
1006
+ children: [/* @__PURE__ */ H(He, { "aria-hidden": "true" }), " open in map"]
1006
1007
  })
1007
- ] }) : /* @__PURE__ */ W("p", {
1008
+ ] }) : /* @__PURE__ */ H("p", {
1008
1009
  className: "gmp-navigator-empty",
1009
1010
  children: "select an area to see its recorded work and map context"
1010
1011
  })
@@ -1013,13 +1014,13 @@ function nn({ payload: e, grain: t = "package", expandedIds: n, onExpandedIdsCha
1013
1014
  ]
1014
1015
  });
1015
1016
  }
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", {
1017
+ function on({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, setRef: a, onFocus: o, onSelect: s, onToggle: c, onKeyDown: l }) {
1018
+ return /* @__PURE__ */ U("div", {
1018
1019
  role: "none",
1019
1020
  className: "gmp-navigator-row-wrap",
1020
1021
  "data-selected": r,
1021
1022
  style: { "--gmp-tree-depth": e.depth },
1022
- children: [t ? /* @__PURE__ */ W("button", {
1023
+ children: [t ? /* @__PURE__ */ H("button", {
1023
1024
  type: "button",
1024
1025
  className: "gmp-navigator-disclosure",
1025
1026
  tabIndex: -1,
@@ -1031,14 +1032,14 @@ function rn({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1031
1032
  onClick: (t) => {
1032
1033
  t.stopPropagation(), e.forcedOpen || c();
1033
1034
  },
1034
- children: /* @__PURE__ */ W(K, {
1035
+ children: /* @__PURE__ */ H(W, {
1035
1036
  className: "gmp-navigator-chevron",
1036
1037
  "aria-hidden": "true"
1037
1038
  })
1038
- }) : /* @__PURE__ */ W("span", {
1039
+ }) : /* @__PURE__ */ H("span", {
1039
1040
  className: "gmp-navigator-disclosure-placeholder",
1040
1041
  "aria-hidden": "true"
1041
- }), /* @__PURE__ */ G("div", {
1042
+ }), /* @__PURE__ */ U("div", {
1042
1043
  ref: a,
1043
1044
  role: "treeitem",
1044
1045
  "aria-level": e.depth + 1,
@@ -1053,151 +1054,151 @@ function rn({ row: e, hasChildren: t, isExpanded: n, selected: r, tabbable: i, s
1053
1054
  },
1054
1055
  onKeyDown: l,
1055
1056
  children: [
1056
- e.node.kind === "file" ? /* @__PURE__ */ W(Pe, { "aria-hidden": "true" }) : /* @__PURE__ */ W(Le, { "aria-hidden": "true" }),
1057
- /* @__PURE__ */ W("span", {
1057
+ e.node.kind === "file" ? /* @__PURE__ */ H(Ie, { "aria-hidden": "true" }) : /* @__PURE__ */ H(ze, { "aria-hidden": "true" }),
1058
+ /* @__PURE__ */ H("span", {
1058
1059
  className: "gmp-navigator-path",
1059
1060
  children: e.node.name || e.node.id
1060
1061
  }),
1061
- /* @__PURE__ */ G("span", {
1062
+ /* @__PURE__ */ U("span", {
1062
1063
  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) })]
1064
+ children: [/* @__PURE__ */ U("span", { children: [cn(e.node.loc ?? 0), " lines"] }), /* @__PURE__ */ H("span", { children: ln(e.node.recordedFiles, e.node.totalFiles) })]
1064
1065
  })
1065
1066
  ]
1066
1067
  })]
1067
1068
  });
1068
1069
  }
1069
- function an(e) {
1070
+ function sn(e) {
1070
1071
  return Array.from(e).sort().join("\0");
1071
1072
  }
1072
- function on(e) {
1073
- return Ee(Number(e) || 0);
1073
+ function cn(e) {
1074
+ return Oe(Number(e) || 0);
1074
1075
  }
1075
- function sn(e, t) {
1076
+ function ln(e, t) {
1076
1077
  let n = Number(t) || 0;
1077
1078
  return n <= 0 ? "no coverage data" : `${Math.round((Number(e) || 0) / n * 100)}% recorded`;
1078
1079
  }
1079
1080
  //#endregion
1080
1081
  //#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,
1082
+ 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 }) {
1083
+ let k = E !== void 0 || D !== void 0, [j, M] = V(() => A(D)), N = z(() => k ? A(E ?? j) : null, [
1084
1084
  k,
1085
- P
1086
- ]), L = I?.presentation ?? w;
1087
- function ee(e, t) {
1088
- k === void 0 && F(e), j?.(e), t?.(e);
1085
+ E,
1086
+ j
1087
+ ]), P = N?.presentation ?? x;
1088
+ function F(e, t) {
1089
+ E === void 0 && M(e), O?.(e), t?.(e);
1089
1090
  }
1090
- function R(e, n) {
1091
- if (!I) return;
1092
- let r = t(I, e);
1093
- C(I, r) || ee(r, n);
1091
+ function I(e, t) {
1092
+ if (!N) return;
1093
+ let n = be(N, e);
1094
+ Ce(N, n) || F(n, t);
1094
1095
  }
1095
- let te = N || E ? /* @__PURE__ */ G(Oe, { children: [/* @__PURE__ */ G("div", {
1096
+ let ee = k || C ? /* @__PURE__ */ U(Ae, { children: [/* @__PURE__ */ U("div", {
1096
1097
  className: "gmp-presentation-switch",
1097
1098
  role: "group",
1098
1099
  "aria-label": "code map view",
1099
- children: [/* @__PURE__ */ W("button", {
1100
+ children: [/* @__PURE__ */ H("button", {
1100
1101
  type: "button",
1101
- "aria-pressed": L === "navigator",
1102
- onClick: () => N ? R({
1102
+ "aria-pressed": P === "navigator",
1103
+ onClick: () => k ? I({
1103
1104
  type: "set-presentation",
1104
1105
  presentation: "navigator"
1105
- }, () => E?.("navigator")) : E?.("navigator"),
1106
- children: L === "canvas" ? "back to browse" : "browse"
1107
- }), /* @__PURE__ */ W("button", {
1106
+ }, () => C?.("navigator")) : C?.("navigator"),
1107
+ children: P === "canvas" ? "back to browse" : "browse"
1108
+ }), /* @__PURE__ */ H("button", {
1108
1109
  type: "button",
1109
- "aria-pressed": L === "canvas",
1110
- onClick: () => N ? R({
1110
+ "aria-pressed": P === "canvas",
1111
+ onClick: () => k ? I({
1111
1112
  type: "set-presentation",
1112
1113
  presentation: "canvas"
1113
- }, () => E?.("canvas")) : E?.("canvas"),
1114
+ }, () => C?.("canvas")) : C?.("canvas"),
1114
1115
  children: "spatial map"
1115
1116
  })]
1116
- }), h] }) : h, ne = p ?? /* @__PURE__ */ W(Zt, {
1117
+ }), p] }) : p, te = d ?? /* @__PURE__ */ H($t, {
1117
1118
  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, {
1119
+ zoom: N ? {
1120
+ level: N.grain,
1121
+ expanded: N.expandedIds
1122
+ } : t,
1123
+ onZoomChange: n,
1124
+ selectedId: N ? N.selectedId : r,
1125
+ onSelect: i,
1126
+ onExpand: a,
1127
+ highlightedIds: o,
1128
+ nodeDeltas: s,
1129
+ structureEdgeDeltas: c,
1130
+ height: l,
1131
+ ariaLabel: u,
1132
+ viewport: N ? N.viewport ?? void 0 : w,
1133
+ onViewportChange: T,
1134
+ state: N ?? void 0,
1135
+ onStateChange: N ? (e) => F(e) : void 0
1136
+ }), ne = S ?? (N && e ? /* @__PURE__ */ H(an, {
1136
1137
  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,
1138
+ grain: N.grain,
1139
+ expandedIds: N.expandedIds,
1140
+ selectedId: N.selectedId,
1141
+ focusedId: N.navigatorFocusedId,
1142
+ filter: N.navigatorFilter,
1143
+ onStateAction: (t) => I(t, () => {
1144
+ 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?.({
1145
+ level: N.grain,
1145
1146
  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"));
1147
+ }) : t.type === "open-in-map" && (i?.(t.id, e.nodes.find((e) => e.id === t.id) ?? null), C?.("canvas"));
1147
1148
  }),
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, {
1153
- 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,
1149
+ ariaLabel: `browse ${u}`
1150
+ }) : null), re = P === "navigator" && ne !== null;
1151
+ return /* @__PURE__ */ H("div", {
1152
+ className: ["gmp-root", b].filter(Boolean).join(" "),
1153
+ children: /* @__PURE__ */ U(oe, {
1154
+ toolbar: ee,
1155
+ rail: f,
1156
+ sheetTitle: m,
1157
+ sheetMeta: h,
1158
+ railSide: g,
1159
+ children: [/* @__PURE__ */ H("div", {
1160
+ className: ["gmp-map-canvas-region", v].filter(Boolean).join(" "),
1161
+ style: y,
1161
1162
  "data-testid": "gmp-map-canvas-region",
1162
- children: ie ? re : ne
1163
- }), !ie && y !== !1 && (y ?? /* @__PURE__ */ W(ln, {}))]
1163
+ children: re ? ne : te
1164
+ }), !re && _ !== !1 && (_ ?? /* @__PURE__ */ H(dn, {}))]
1164
1165
  })
1165
1166
  });
1166
1167
  }
1167
- function ln() {
1168
- return /* @__PURE__ */ G("p", {
1168
+ function dn() {
1169
+ return /* @__PURE__ */ U("p", {
1169
1170
  className: "gmp-map-legend",
1170
1171
  children: [
1171
- /* @__PURE__ */ G("span", {
1172
+ /* @__PURE__ */ U("span", {
1172
1173
  className: "gmp-legend-item",
1173
- children: [/* @__PURE__ */ W("span", {
1174
+ children: [/* @__PURE__ */ H("span", {
1174
1175
  className: "gmp-map-swatch",
1175
1176
  "aria-hidden": "true"
1176
1177
  }), " code area (folder or file)"]
1177
1178
  }),
1178
- /* @__PURE__ */ G("span", {
1179
+ /* @__PURE__ */ U("span", {
1179
1180
  className: "gmp-legend-item gmp-legend-dim",
1180
- children: [/* @__PURE__ */ W("span", {
1181
+ children: [/* @__PURE__ */ H("span", {
1181
1182
  className: "gmp-map-swatch gmp-map-swatch--empty",
1182
1183
  "aria-hidden": "true"
1183
1184
  }), " no saved conversation behind it"]
1184
1185
  }),
1185
- /* @__PURE__ */ W("span", {
1186
+ /* @__PURE__ */ H("span", {
1186
1187
  className: "gmp-legend-item gmp-legend-dim",
1187
1188
  children: "brighter = more of it built with AI on record"
1188
1189
  }),
1189
- /* @__PURE__ */ G("span", {
1190
+ /* @__PURE__ */ U("span", {
1190
1191
  className: "gmp-legend-item gmp-legend-dim",
1191
- children: [/* @__PURE__ */ W("span", {
1192
+ children: [/* @__PURE__ */ H("span", {
1192
1193
  className: "gmp-map-swatch gmp-map-swatch--edge",
1193
1194
  "aria-hidden": "true"
1194
1195
  }), " one area uses another"]
1195
1196
  }),
1196
- /* @__PURE__ */ W("span", {
1197
+ /* @__PURE__ */ H("span", {
1197
1198
  className: "gmp-legend-item gmp-map-legend-danger",
1198
1199
  children: "⚠ tangle — two areas that depend on each other"
1199
1200
  }),
1200
- /* @__PURE__ */ W("span", {
1201
+ /* @__PURE__ */ H("span", {
1201
1202
  className: "gmp-legend-item gmp-legend-dim",
1202
1203
  children: "double-click a folder to open its files"
1203
1204
  })
@@ -1206,26 +1207,26 @@ function ln() {
1206
1207
  }
1207
1208
  //#endregion
1208
1209
  //#region src/ui/graph/timelineNavigation.js
1209
- function un(e) {
1210
+ function J(e) {
1210
1211
  return typeof e == "object" && !!e && !Array.isArray(e);
1211
1212
  }
1212
- function X(e, t) {
1213
+ function Y(e, t) {
1213
1214
  let n = Object.keys(e).sort();
1214
1215
  return n.length === t.length && t.slice().sort().every((e, t) => e === n[t]);
1215
1216
  }
1216
- function dn(e) {
1217
+ function X(e) {
1217
1218
  return typeof e == "string" && e.length > 0;
1218
1219
  }
1219
1220
  function fn(e) {
1220
- return e === null || dn(e);
1221
+ return e === null || X(e);
1221
1222
  }
1222
1223
  function pn(e) {
1223
1224
  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, [
1225
+ 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
1226
  "type",
1226
1227
  "sessionId",
1227
1228
  "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([
1229
+ ]) && 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
1230
  "Timeline navigation action rejected.",
1230
1231
  "What went wrong: the value is not an exact supported TimelineNavigationAction.",
1231
1232
  "Why it happened: an untyped caller supplied an unknown action, missing context, or extra fields.",
@@ -1238,20 +1239,20 @@ function pn(e) {
1238
1239
  //#endregion
1239
1240
  //#region src/ui/graph/ScentTag.jsx
1240
1241
  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(", ")}.`);
1242
+ 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
1243
  if (!r) {
1243
- let n = /* @__PURE__ */ W("span", {
1244
+ let n = /* @__PURE__ */ H("span", {
1244
1245
  className: `tlp-scent${i ? ` ${i}` : ""}`,
1245
1246
  tabIndex: t ? 0 : void 0,
1246
1247
  ...a,
1247
1248
  children: e
1248
1249
  });
1249
- return t ? /* @__PURE__ */ W(h, {
1250
+ return t ? /* @__PURE__ */ H(xe, {
1250
1251
  content: t,
1251
1252
  children: n
1252
1253
  }) : n;
1253
1254
  }
1254
- let o = /* @__PURE__ */ W("button", {
1255
+ let o = /* @__PURE__ */ H("button", {
1255
1256
  type: "button",
1256
1257
  className: `tlp-scent tlp-scent-filter${n ? " tlp-scent-filter-active" : ""}${i ? ` ${i}` : ""}`,
1257
1258
  "aria-pressed": n,
@@ -1259,7 +1260,7 @@ function mn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i =
1259
1260
  ...a,
1260
1261
  children: e
1261
1262
  });
1262
- return t ? /* @__PURE__ */ W(h, {
1263
+ return t ? /* @__PURE__ */ H(xe, {
1263
1264
  content: t,
1264
1265
  children: o
1265
1266
  }) : o;
@@ -1267,7 +1268,7 @@ function mn({ tag: e, hoverText: t, active: n = !1, onToggle: r, className: i =
1267
1268
  //#endregion
1268
1269
  //#region src/ui/graph/RankedRow.jsx
1269
1270
  function hn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i = "", ...a }) {
1270
- return /* @__PURE__ */ G("button", {
1271
+ return /* @__PURE__ */ U("button", {
1271
1272
  type: "button",
1272
1273
  className: [
1273
1274
  "tlp-ranked-row",
@@ -1278,9 +1279,9 @@ function hn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1278
1279
  onClick: () => r?.(e.id),
1279
1280
  ...a,
1280
1281
  children: [
1281
- /* @__PURE__ */ W(S, {
1282
+ /* @__PURE__ */ H(I, {
1282
1283
  className: "tlp-ranked-doi-scope",
1283
- children: /* @__PURE__ */ W(xe, {
1284
+ children: /* @__PURE__ */ H(ye, {
1284
1285
  label: e.name,
1285
1286
  loc: t,
1286
1287
  recorded: Math.round(e.doi * 100) / 100,
@@ -1290,23 +1291,23 @@ function hn({ row: e, loc: t = 0, selected: n = !1, onSelect: r, className: i =
1290
1291
  className: "tlp-ranked-doi"
1291
1292
  })
1292
1293
  }),
1293
- /* @__PURE__ */ W("span", {
1294
+ /* @__PURE__ */ H("span", {
1294
1295
  className: "tlp-ranked-name",
1295
1296
  title: e.name,
1296
1297
  children: e.name
1297
1298
  }),
1298
- /* @__PURE__ */ W("span", {
1299
+ /* @__PURE__ */ H("span", {
1299
1300
  className: "tlp-ranked-tags",
1300
1301
  "aria-label": "comprehension signals",
1301
- children: e.scentTags.map((t) => /* @__PURE__ */ W(mn, {
1302
+ children: e.scentTags.map((t) => /* @__PURE__ */ H(mn, {
1302
1303
  tag: t,
1303
1304
  hoverText: t.startsWith("agent wrote:") ? e.hoverText ?? void 0 : void 0
1304
1305
  }, t))
1305
1306
  }),
1306
- /* @__PURE__ */ W("span", {
1307
+ /* @__PURE__ */ H("span", {
1307
1308
  className: "tlp-ranked-doi-val tnum",
1308
1309
  "aria-hidden": "true",
1309
- children: we(e.doi, 2)
1310
+ children: Ee(e.doi, 2)
1310
1311
  })
1311
1312
  ]
1312
1313
  });
@@ -1319,7 +1320,7 @@ var Z = [
1319
1320
  "churn"
1320
1321
  ];
1321
1322
  function gn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1322
- let i = H([]), a = (e) => {
1323
+ let i = B([]), a = (e) => {
1323
1324
  let n = Z[e];
1324
1325
  n && (t(n), i.current[e]?.focus());
1325
1326
  }, o = (e, t) => {
@@ -1343,12 +1344,12 @@ function gn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1343
1344
  }
1344
1345
  e.preventDefault(), a(n);
1345
1346
  };
1346
- return /* @__PURE__ */ W("span", {
1347
+ return /* @__PURE__ */ H("span", {
1347
1348
  className: `tlp-rank-mode${n ? ` ${n}` : ""}`,
1348
1349
  role: "radiogroup",
1349
1350
  "aria-label": "rank mode",
1350
1351
  ...r,
1351
- children: Z.map((n, r) => /* @__PURE__ */ W("button", {
1352
+ children: Z.map((n, r) => /* @__PURE__ */ H("button", {
1352
1353
  type: "button",
1353
1354
  role: "radio",
1354
1355
  "aria-checked": e === n,
@@ -1366,7 +1367,7 @@ function gn({ rankMode: e, onChange: t, className: n = "", ...r }) {
1366
1367
  //#endregion
1367
1368
  //#region src/ui/graph/InsightPanel.jsx
1368
1369
  function _n({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1369
- if (y(e), e.length === 0) return /* @__PURE__ */ W("p", {
1370
+ if (d(e), e.length === 0) return /* @__PURE__ */ H("p", {
1370
1371
  className: `tlp-insight-empty${n ? ` ${n}` : ""}`,
1371
1372
  ...r,
1372
1373
  children: "no insights recorded for this node yet."
@@ -1376,35 +1377,35 @@ function _n({ insights: e, onOpenEvidence: t, className: n = "", ...r }) {
1376
1377
  let e = i.get(t.kind) ?? [];
1377
1378
  e.push(t), i.set(t.kind, e);
1378
1379
  }
1379
- return /* @__PURE__ */ W("div", {
1380
+ return /* @__PURE__ */ H("div", {
1380
1381
  className: `tlp-insight-panel${n ? ` ${n}` : ""}`,
1381
1382
  ...r,
1382
- children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ G("section", {
1383
+ children: [...i.entries()].map(([e, n]) => /* @__PURE__ */ U("section", {
1383
1384
  className: "tlp-insight-group",
1384
- "aria-label": D[e],
1385
- children: [/* @__PURE__ */ W("p", {
1385
+ "aria-label": C[e],
1386
+ children: [/* @__PURE__ */ H("p", {
1386
1387
  className: "tlp-insight-group-title",
1387
- children: D[e]
1388
- }), /* @__PURE__ */ W("ul", {
1388
+ children: C[e]
1389
+ }), /* @__PURE__ */ H("ul", {
1389
1390
  className: "tlp-insight-list",
1390
- children: n.map((e, n) => /* @__PURE__ */ G("li", {
1391
+ children: n.map((e, n) => /* @__PURE__ */ U("li", {
1391
1392
  className: "tlp-insight-item",
1392
1393
  children: [
1393
- /* @__PURE__ */ W("span", {
1394
- className: `tlp-insight-provenance ${k[e.provenance].markerClass}`,
1394
+ /* @__PURE__ */ H("span", {
1395
+ className: `tlp-insight-provenance ${s[e.provenance].markerClass}`,
1395
1396
  "aria-hidden": "true"
1396
1397
  }),
1397
- /* @__PURE__ */ W("span", {
1398
+ /* @__PURE__ */ H("span", {
1398
1399
  className: "tlp-insight-title",
1399
1400
  children: e.title
1400
1401
  }),
1401
- e.summary && /* @__PURE__ */ W("span", {
1402
+ e.summary && /* @__PURE__ */ H("span", {
1402
1403
  className: "tlp-insight-summary",
1403
1404
  children: e.summary
1404
1405
  }),
1405
- /* @__PURE__ */ W("span", {
1406
+ /* @__PURE__ */ H("span", {
1406
1407
  className: "tlp-insight-evidence",
1407
- children: e.evidence.map((e, n) => /* @__PURE__ */ W("button", {
1408
+ children: e.evidence.map((e, n) => /* @__PURE__ */ H("button", {
1408
1409
  type: "button",
1409
1410
  className: "tlp-insight-evidence-link",
1410
1411
  onClick: () => t?.(e.sessionId),
@@ -1590,9 +1591,9 @@ function Sn(e) {
1590
1591
  //#endregion
1591
1592
  //#region src/ui/transcript/graph/engine/useCanvasSync.js
1592
1593
  function Cn(e, t, n) {
1593
- let r = Nt();
1594
+ let r = Ft();
1594
1595
  return {
1595
- focusPhase: z((i) => {
1596
+ focusPhase: L((i) => {
1596
1597
  let a = e[i];
1597
1598
  if (!a) return;
1598
1599
  let o = /* @__PURE__ */ new Set();
@@ -1620,7 +1621,7 @@ function Cn(e, t, n) {
1620
1621
  r,
1621
1622
  n
1622
1623
  ]),
1623
- focusTurn: z((e) => {
1624
+ focusTurn: L((e) => {
1624
1625
  let n = t[e]?.index ?? e, i = r.getNodes().find((e) => e.type === "turn" && e.data.turn.index === n);
1625
1626
  i && r.setCenter(i.position.x + Q.turnWidth / 2, i.position.y + Q.turnBaseHeight / 2, {
1626
1627
  zoom: 1,
@@ -1638,17 +1639,17 @@ function wn(e, t) {
1638
1639
  }
1639
1640
  function Tn({ data: e, selected: t }) {
1640
1641
  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", {
1642
+ return /* @__PURE__ */ U("div", {
1642
1643
  "data-turn-index": n.index,
1643
1644
  "data-harness": u ? void 0 : n.role === "assistant" ? c : void 0,
1644
1645
  style: { width: Q.turnWidth },
1645
1646
  children: [
1646
- /* @__PURE__ */ W(q, {
1647
+ /* @__PURE__ */ H(G, {
1647
1648
  type: "target",
1648
- position: J.Top,
1649
+ position: K.Top,
1649
1650
  className: "tb-gnode-handle tb-gnode-handle-top"
1650
1651
  }),
1651
- /* @__PURE__ */ W(A, {
1652
+ /* @__PURE__ */ H(O, {
1652
1653
  role: n.role,
1653
1654
  agentName: u ? n.agentName : void 0,
1654
1655
  turnNumber: s,
@@ -1665,21 +1666,21 @@ function Tn({ data: e, selected: t }) {
1665
1666
  isSelected: t || o,
1666
1667
  provider: c
1667
1668
  }),
1668
- /* @__PURE__ */ W(q, {
1669
+ /* @__PURE__ */ H(G, {
1669
1670
  type: "source",
1670
- position: J.Bottom,
1671
+ position: K.Bottom,
1671
1672
  className: "tb-gnode-handle tb-gnode-handle-bottom"
1672
1673
  }),
1673
- /* @__PURE__ */ W(q, {
1674
+ /* @__PURE__ */ H(G, {
1674
1675
  type: "source",
1675
1676
  id: "tool-source",
1676
- position: J.Right,
1677
+ position: K.Right,
1677
1678
  className: "tb-gnode-handle tb-gnode-handle-right"
1678
1679
  })
1679
1680
  ]
1680
1681
  });
1681
1682
  }
1682
- var En = De(Tn);
1683
+ var En = ke(Tn);
1683
1684
  //#endregion
1684
1685
  //#region src/ui/transcript/graph/engine/nodes/ToolPillNode.jsx
1685
1686
  function Dn({ data: e }) {
@@ -1692,14 +1693,14 @@ function Dn({ data: e }) {
1692
1693
  exitCode: e.exitCode ?? void 0,
1693
1694
  preview: n[e.id] ?? ""
1694
1695
  }));
1695
- return /* @__PURE__ */ G("div", {
1696
+ return /* @__PURE__ */ U("div", {
1696
1697
  style: { width: Q.toolCallWidth },
1697
- children: [/* @__PURE__ */ W(q, {
1698
+ children: [/* @__PURE__ */ H(G, {
1698
1699
  type: "target",
1699
1700
  id: "tool-target",
1700
- position: J.Left,
1701
+ position: K.Left,
1701
1702
  className: "tb-gnode-handle tb-gnode-handle-left"
1702
- }), /* @__PURE__ */ W(R, {
1703
+ }), /* @__PURE__ */ H(ee, {
1703
1704
  tools: o,
1704
1705
  totalDurationMs: r,
1705
1706
  hasError: i,
@@ -1707,59 +1708,59 @@ function Dn({ data: e }) {
1707
1708
  })]
1708
1709
  });
1709
1710
  }
1710
- var On = De(Dn);
1711
+ var On = ke(Dn);
1711
1712
  //#endregion
1712
1713
  //#region src/ui/transcript/graph/engine/nodes/SubagentBranchNode.jsx
1713
1714
  function kn({ data: e }) {
1714
1715
  let { agentName: t, depth: n } = e;
1715
- return /* @__PURE__ */ W(pe, {
1716
+ return /* @__PURE__ */ H(fe, {
1716
1717
  agentName: t,
1717
1718
  depth: n
1718
1719
  });
1719
1720
  }
1720
- var An = De(kn);
1721
+ var An = ke(kn);
1721
1722
  //#endregion
1722
1723
  //#region src/ui/transcript/graph/engine/GraphControls.jsx
1723
1724
  function jn({ className: e = "" }) {
1724
- let t = Nt();
1725
- return /* @__PURE__ */ G("div", {
1725
+ let t = Ft();
1726
+ return /* @__PURE__ */ U("div", {
1726
1727
  className: ["tb-graph-controls", e].filter(Boolean).join(" "),
1727
1728
  children: [
1728
- /* @__PURE__ */ W(Mn, {
1729
+ /* @__PURE__ */ H(Mn, {
1729
1730
  label: "zoom in",
1730
1731
  onClick: () => t.zoomIn({ duration: 150 }),
1731
- children: /* @__PURE__ */ W(We, {
1732
+ children: /* @__PURE__ */ H(Ke, {
1732
1733
  size: 14,
1733
1734
  strokeWidth: 2
1734
1735
  })
1735
1736
  }),
1736
- /* @__PURE__ */ W(Mn, {
1737
+ /* @__PURE__ */ H(Mn, {
1737
1738
  label: "zoom out",
1738
1739
  onClick: () => t.zoomOut({ duration: 150 }),
1739
- children: /* @__PURE__ */ W(Ue, {
1740
+ children: /* @__PURE__ */ H(Ge, {
1740
1741
  size: 14,
1741
1742
  strokeWidth: 2
1742
1743
  })
1743
1744
  }),
1744
- /* @__PURE__ */ W(Mn, {
1745
+ /* @__PURE__ */ H(Mn, {
1745
1746
  label: "fit view",
1746
1747
  onClick: () => t.fitView({
1747
1748
  padding: .1,
1748
1749
  duration: 250
1749
1750
  }),
1750
- children: /* @__PURE__ */ W(Ve, {
1751
+ children: /* @__PURE__ */ H(Ue, {
1751
1752
  size: 14,
1752
1753
  strokeWidth: 1.75
1753
1754
  })
1754
1755
  }),
1755
- /* @__PURE__ */ W(Mn, {
1756
+ /* @__PURE__ */ H(Mn, {
1756
1757
  label: "reset",
1757
1758
  onClick: () => t.setViewport({
1758
1759
  x: 0,
1759
1760
  y: 0,
1760
1761
  zoom: 1
1761
1762
  }, { duration: 200 }),
1762
- children: /* @__PURE__ */ W(Ge, {
1763
+ children: /* @__PURE__ */ H(qe, {
1763
1764
  size: 14,
1764
1765
  strokeWidth: 1.75
1765
1766
  })
@@ -1768,7 +1769,7 @@ function jn({ className: e = "" }) {
1768
1769
  });
1769
1770
  }
1770
1771
  function Mn({ label: e, onClick: t, children: n }) {
1771
- return /* @__PURE__ */ W("button", {
1772
+ return /* @__PURE__ */ H("button", {
1772
1773
  type: "button",
1773
1774
  onClick: t,
1774
1775
  "aria-label": e,
@@ -1780,8 +1781,8 @@ function Mn({ label: e, onClick: t, children: n }) {
1780
1781
  //#endregion
1781
1782
  //#region src/ui/transcript/graph/engine/TrajectoryGraphLegend.jsx
1782
1783
  function Nn({ provider: e, className: t = "" }) {
1783
- let r = e && n(e).toLocaleLowerCase("en-US") || "agent";
1784
- return /* @__PURE__ */ W(se, {
1784
+ let n = e && Te(e).toLocaleLowerCase("en-US") || "agent";
1785
+ return /* @__PURE__ */ H(se, {
1785
1786
  className: ["tb-graph-legend", t].filter(Boolean).join(" "),
1786
1787
  items: [
1787
1788
  {
@@ -1790,7 +1791,7 @@ function Nn({ provider: e, className: t = "" }) {
1790
1791
  },
1791
1792
  {
1792
1793
  kind: "assistant",
1793
- label: r,
1794
+ label: n,
1794
1795
  provider: e
1795
1796
  },
1796
1797
  {
@@ -1816,15 +1817,15 @@ var Pn = {
1816
1817
  subagentLane: An
1817
1818
  };
1818
1819
  function Fn(e) {
1819
- return /* @__PURE__ */ W(At, { children: /* @__PURE__ */ W(In, { ...e }) });
1820
+ return /* @__PURE__ */ H(Mt, { children: /* @__PURE__ */ H(In, { ...e }) });
1820
1821
  }
1821
1822
  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(() => {
1823
+ let h = Ft(), { focusTurn: g, focusPhase: _ } = Cn(r, e, u), v = z(() => {
1823
1824
  if (n.length === e.length) return /* @__PURE__ */ new Set();
1824
1825
  let t = new Set(n), r = /* @__PURE__ */ new Set();
1825
1826
  for (let n = 0; n < e.length; n++) t.has(e[n]) && r.add(n);
1826
1827
  return r;
1827
- }, [e, n]), y = V(() => xn({
1828
+ }, [e, n]), y = z(() => xn({
1828
1829
  turns: e,
1829
1830
  toolVMsByTurn: t,
1830
1831
  phases: r,
@@ -1842,13 +1843,13 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1842
1843
  v,
1843
1844
  o,
1844
1845
  f
1845
- ]), b = V(() => y.nodes.map((e) => e.type === "turn" ? {
1846
+ ]), b = z(() => y.nodes.map((e) => e.type === "turn" ? {
1846
1847
  ...e,
1847
1848
  data: {
1848
1849
  ...e.data,
1849
1850
  provider: p
1850
1851
  }
1851
- } : e), [y.nodes, p]), x = V(() => Sn(b), [b]), S = V(() => y.edges.map((e) => {
1852
+ } : e), [y.nodes, p]), x = z(() => Sn(b), [b]), S = z(() => y.edges.map((e) => {
1852
1853
  let t = e.sourceHandle === "tool-source";
1853
1854
  return {
1854
1855
  ...e,
@@ -1861,8 +1862,8 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1861
1862
  },
1862
1863
  animated: t ? !1 : e.animated
1863
1864
  };
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(() => {
1865
+ }), [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);
1866
+ R(() => {
1866
1867
  (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
1868
  }, [
1868
1869
  C,
@@ -1872,7 +1873,7 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1872
1873
  n.length,
1873
1874
  T,
1874
1875
  O
1875
- ]), B(() => {
1876
+ ]), R(() => {
1876
1877
  if (s === void 0) return;
1877
1878
  let t = e[s]?.index;
1878
1879
  if (t === void 0) return;
@@ -1887,16 +1888,16 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1887
1888
  h,
1888
1889
  e
1889
1890
  ]);
1890
- let N = H(-1);
1891
- B(() => {
1891
+ let N = B(-1);
1892
+ R(() => {
1892
1893
  !c || c.seq === N.current || (N.current = c.seq, g(c.target));
1893
1894
  }, [c, g]);
1894
- let P = H(-1);
1895
- B(() => {
1895
+ let P = B(-1);
1896
+ R(() => {
1896
1897
  !l || l.seq === P.current || (P.current = l.seq, _(l.target));
1897
1898
  }, [l, _]);
1898
- let F = H(!1);
1899
- B(() => {
1899
+ let F = B(!1);
1900
+ R(() => {
1900
1901
  w.length > 0 && !F.current && (F.current = !0, setTimeout(() => {
1901
1902
  let e = w.find((e) => e.type === "turn");
1902
1903
  e ? h.setCenter(e.position.x + Q.turnWidth / 2, e.position.y + Q.turnBaseHeight, {
@@ -1912,13 +1913,13 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1912
1913
  h,
1913
1914
  w
1914
1915
  ]);
1915
- let I = z((e) => {
1916
+ let I = L((e) => {
1916
1917
  if (e.type === "turn") {
1917
1918
  let t = e.data;
1918
1919
  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
1920
  }
1920
1921
  return e.type === "toolCall" ? "var(--ink-3)" : "var(--rule)";
1921
- }, []), L = z((e, t) => {
1922
+ }, []), ee = L((e, t) => {
1922
1923
  if (t.type !== "turn") return;
1923
1924
  let n = t.data;
1924
1925
  d?.({
@@ -1926,21 +1927,21 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1926
1927
  end: n.turn.index
1927
1928
  });
1928
1929
  }, [d]);
1929
- return /* @__PURE__ */ W("div", {
1930
+ return /* @__PURE__ */ H("div", {
1930
1931
  className: [
1931
1932
  "tb-root",
1932
1933
  "tb-graph",
1933
1934
  m
1934
1935
  ].filter(Boolean).join(" "),
1935
- children: /* @__PURE__ */ G("div", {
1936
+ children: /* @__PURE__ */ U("div", {
1936
1937
  className: "tb-graph-flow",
1937
1938
  children: [
1938
- /* @__PURE__ */ G(kt, {
1939
+ /* @__PURE__ */ U(jt, {
1939
1940
  nodes: w,
1940
1941
  edges: D,
1941
1942
  onNodesChange: E,
1942
1943
  onEdgesChange: k,
1943
- onNodeClick: L,
1944
+ onNodeClick: ee,
1944
1945
  nodeTypes: Pn,
1945
1946
  fitView: !1,
1946
1947
  minZoom: .2,
@@ -1957,12 +1958,12 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1957
1958
  panOnDrag: !0,
1958
1959
  panOnScroll: !0,
1959
1960
  zoomOnScroll: !0,
1960
- children: [/* @__PURE__ */ W(Et, {
1961
- variant: Dt.Dots,
1961
+ children: [/* @__PURE__ */ H(Ot, {
1962
+ variant: kt.Dots,
1962
1963
  gap: 20,
1963
1964
  size: 1,
1964
1965
  color: "var(--rule)"
1965
- }), /* @__PURE__ */ W(Ot, {
1966
+ }), /* @__PURE__ */ H(At, {
1966
1967
  zoomable: !0,
1967
1968
  pannable: !0,
1968
1969
  nodeColor: I,
@@ -1972,11 +1973,11 @@ function In({ turns: e, toolVMsByTurn: t, filteredTurns: n, phases: r, annotatio
1972
1973
  className: "tb-graph-minimap"
1973
1974
  })]
1974
1975
  }),
1975
- /* @__PURE__ */ W(jn, {}),
1976
- /* @__PURE__ */ W(Nn, { provider: p })
1976
+ /* @__PURE__ */ H(jn, {}),
1977
+ /* @__PURE__ */ H(Nn, { provider: p })
1977
1978
  ]
1978
1979
  })
1979
1980
  });
1980
1981
  }
1981
1982
  //#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 };
1983
+ 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, ee 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 };