@thehammer/template-verification 0.2.4 → 0.2.5

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.
@@ -1,7 +1,7 @@
1
- import { ref as U, watch as ve, defineComponent as H, computed as d, openBlock as l, createElementBlock as o, normalizeClass as R, createElementVNode as i, toDisplayString as m, createCommentVNode as b, createBlock as N, unref as r, withCtx as I, createTextVNode as T, createVNode as D, Fragment as L, renderList as P, withKeys as Ne, withModifiers as te, renderSlot as Re, withDirectives as Ae, isRef as xe, vModelCheckbox as Le } from "vue";
2
- import { DanxChip as J, CodeViewer as ye, useToast as we, DanxDialog as ie, DanxProgressBar as ke, DanxAlert as be, DanxTabs as je, MarkdownEditor as Ee, DanxFileViewer as he, DanxButton as re, DanxInput as ze, DanxSkeleton as Pe, DanxTooltip as Me, DanxIcon as Be, gearIcon as Fe, DanxBadge as qe, DanxToastContainer as Ye } from "@thehammer/danx-ui";
3
- const z = "tv-chrome", $e = "template-verification:enabled";
4
- let ae = null;
1
+ import { ref as R, watch as pe, defineComponent as G, computed as d, openBlock as l, createElementBlock as i, normalizeClass as A, createElementVNode as r, toDisplayString as m, createCommentVNode as b, createBlock as U, unref as s, withCtx as I, createTextVNode as T, createVNode as D, Fragment as L, renderList as B, withKeys as Re, withModifiers as ne, renderSlot as Ae, withDirectives as Le, isRef as ye, vModelCheckbox as je } from "vue";
2
+ import { DanxChip as Y, CodeViewer as be, useToast as ke, DanxDialog as ue, DanxProgressBar as $e, DanxAlert as he, DanxTabs as Ee, MarkdownEditor as ze, DanxFileViewer as _e, DanxButton as oe, DanxInput as Pe, DanxSkeleton as Se, DanxTooltip as Me, DanxIcon as Be, gearIcon as Fe, DanxBadge as qe, DanxToastContainer as Ye } from "@thehammer/danx-ui";
3
+ const E = "tv-chrome", Ce = "template-verification:enabled";
4
+ let se = null;
5
5
  function Je(e) {
6
6
  var t;
7
7
  try {
@@ -18,46 +18,48 @@ function Ke(e, t) {
18
18
  }
19
19
  }
20
20
  function He(e) {
21
- const t = Je($e);
21
+ const t = Je(Ce);
22
22
  return t === null ? e : t === "true";
23
23
  }
24
- function Se(e) {
25
- const t = U(He((e == null ? void 0 : e.defaultEnabled) ?? !1));
26
- return ve(
24
+ function Ve(e) {
25
+ const t = R(He((e == null ? void 0 : e.defaultEnabled) ?? !1));
26
+ return pe(
27
27
  t,
28
- (a) => Ke($e, a ? "true" : "false")
28
+ (a) => Ke(Ce, a ? "true" : "false")
29
29
  ), {
30
30
  enabled: t,
31
31
  data: (e == null ? void 0 : e.data) ?? {},
32
32
  saveOverride: e == null ? void 0 : e.saveOverride,
33
33
  workflowInputId: e == null ? void 0 : e.workflowInputId,
34
34
  auditUrl: e == null ? void 0 : e.auditUrl,
35
- comparisonOpen: U(!1)
35
+ loading: (e == null ? void 0 : e.loading) ?? !1,
36
+ comparisonOpen: R(!1)
36
37
  };
37
38
  }
38
- function Ce() {
39
- return ae || (ae = Se()), ae;
39
+ function De() {
40
+ return se || (se = Ve()), se;
40
41
  }
41
42
  function ha(e) {
42
- ae = Se(e);
43
+ se = Ve(e);
43
44
  }
44
- function ne() {
45
- const e = Ce();
45
+ function ie() {
46
+ const e = De();
46
47
  return {
47
48
  enabled: e.enabled,
48
49
  data: e.data,
49
50
  saveOverride: e.saveOverride,
50
51
  workflowInputId: e.workflowInputId,
51
52
  auditUrl: e.auditUrl,
53
+ loading: e.loading,
52
54
  openComparison: () => {
53
55
  e.comparisonOpen.value = !0;
54
56
  }
55
57
  };
56
58
  }
57
59
  function Ge() {
58
- return Ce().comparisonOpen;
60
+ return De().comparisonOpen;
59
61
  }
60
- function fe(e) {
62
+ function me(e) {
61
63
  return typeof e != "number" || Number.isNaN(e) ? "unverifiable" : e <= 2 ? "low" : e === 3 ? "medium" : "high";
62
64
  }
63
65
  const Qe = {
@@ -65,121 +67,121 @@ const Qe = {
65
67
  medium: "bg-yellow-50 text-yellow-700 ring-1 ring-inset ring-yellow-600/20",
66
68
  low: "bg-red-50 text-red-700 ring-1 ring-inset ring-red-600/20",
67
69
  unverifiable: "bg-gray-50 text-gray-500 ring-1 ring-inset ring-gray-400/20"
68
- }, le = {
70
+ }, re = {
69
71
  high: "High",
70
72
  medium: "Medium",
71
73
  low: "Low",
72
74
  unverifiable: "Unverifiable"
73
- }, Ve = ["override", "extracted", "claim"];
74
- function pe(e) {
75
+ }, Oe = ["override", "extracted", "claim"];
76
+ function ge(e) {
75
77
  return e ? e.resolved && e.resolved.source && e.resolved.source !== "none" ? e.resolved : We(e.candidates) : { value: null, source: "none" };
76
78
  }
77
79
  function We(e) {
78
80
  if (e)
79
- for (const t of Ve) {
81
+ for (const t of Oe) {
80
82
  const a = e[t];
81
83
  if (a != null)
82
84
  return { value: a.value, source: t };
83
85
  }
84
86
  return { value: null, source: "none" };
85
87
  }
86
- function oe(e) {
87
- var g, p;
88
- const t = (p = (g = e == null ? void 0 : e.candidates) == null ? void 0 : g.extracted) == null ? void 0 : p.reasoning;
88
+ function de(e) {
89
+ var g, x;
90
+ const t = (x = (g = e == null ? void 0 : e.candidates) == null ? void 0 : g.extracted) == null ? void 0 : x.reasoning;
89
91
  if (t == null) return null;
90
92
  const a = String(t).trim();
91
93
  return a === "" ? null : a;
92
94
  }
93
- function ue(e) {
94
- var g, p;
95
- const t = (p = (g = e == null ? void 0 : e.candidates) == null ? void 0 : g.extracted) == null ? void 0 : p.cited_text;
95
+ function ce(e) {
96
+ var g, x;
97
+ const t = (x = (g = e == null ? void 0 : e.candidates) == null ? void 0 : g.extracted) == null ? void 0 : x.cited_text;
96
98
  if (t == null) return null;
97
99
  const a = String(t).trim();
98
100
  return a === "" ? null : a;
99
101
  }
100
- function De(e) {
102
+ function Ie(e) {
101
103
  return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : Xe(e.candidates) : !1;
102
104
  }
103
105
  function Xe(e) {
104
106
  if (!e) return !1;
105
- const t = Ve.map((a) => e[a]).filter((a) => a != null).map((a) => Ze(a.value));
107
+ const t = Oe.map((a) => e[a]).filter((a) => a != null).map((a) => Ze(a.value));
106
108
  return t.length < 2 ? !1 : new Set(t).size > 1;
107
109
  }
108
110
  function Ze(e) {
109
111
  return JSON.stringify(e ?? null);
110
112
  }
111
113
  const et = /* @__PURE__ */ new Set(["name", "type"]);
112
- function Oe(e, t = "") {
114
+ function Te(e, t = "") {
113
115
  const a = [];
114
- return de(e, t, a), a;
116
+ return ve(e, t, a), a;
115
117
  }
116
- function de(e, t, a) {
118
+ function ve(e, t, a) {
117
119
  if (Array.isArray(e)) {
118
- e.forEach((n, y) => de(n, `${t}[${y}]`, a));
120
+ e.forEach((o, c) => ve(o, `${t}[${c}]`, a));
119
121
  return;
120
122
  }
121
- if (!_e(e)) return;
122
- const p = e.__meta ?? {};
123
- for (const [n, y] of Object.entries(e)) {
124
- if (n === "__meta") continue;
125
- const s = t ? `${t}.${n}` : n;
126
- if (Array.isArray(y) || _e(y)) {
127
- de(y, s, a);
123
+ if (!we(e)) return;
124
+ const x = e.__meta ?? {};
125
+ for (const [o, c] of Object.entries(e)) {
126
+ if (o === "__meta") continue;
127
+ const n = t ? `${t}.${o}` : o;
128
+ if (Array.isArray(c) || we(c)) {
129
+ ve(c, n, a);
128
130
  continue;
129
131
  }
130
- const h = p[n];
131
- !h && et.has(n) || a.push({
132
- path: s,
133
- label: n,
134
- meta: h ?? null,
135
- value: y,
136
- unanchored: !h
132
+ const w = x[o];
133
+ !w && et.has(o) || a.push({
134
+ path: n,
135
+ label: o,
136
+ meta: w ?? null,
137
+ value: c,
138
+ unanchored: !w
137
139
  });
138
140
  }
139
141
  }
140
- function _e(e) {
142
+ function we(e) {
141
143
  return typeof e == "object" && e !== null && !Array.isArray(e);
142
144
  }
143
- function Ie(e) {
145
+ function Ue(e) {
144
146
  var a;
145
147
  if (e.candidates.override) return !1;
146
148
  const t = (a = e.candidates.extracted) == null ? void 0 : a.confidence;
147
149
  return e.discrepancy || t == null || t <= 2;
148
150
  }
149
151
  function tt(e) {
150
- const t = Oe(e).filter(
151
- (n) => n.meta !== null
152
+ const t = Te(e).filter(
153
+ (o) => o.meta !== null
152
154
  ), a = t.length;
153
- let g = 0, p = 0;
154
- for (const n of t) {
155
- if (n.meta.candidates.override) {
155
+ let g = 0, x = 0;
156
+ for (const o of t) {
157
+ if (o.meta.candidates.override) {
156
158
  g++;
157
159
  continue;
158
160
  }
159
- Ie(n.meta) && p++;
161
+ Ue(o.meta) && x++;
160
162
  }
161
163
  return {
162
164
  total: a,
163
165
  verified: g,
164
- needsReview: p,
166
+ needsReview: x,
165
167
  percent: a === 0 ? 100 : Math.round(g / a * 100)
166
168
  };
167
169
  }
168
170
  function at(e, t, a) {
169
- var n;
170
- const g = (n = t.value) == null ? void 0 : n.anchor;
171
+ var o;
172
+ const g = (o = t.value) == null ? void 0 : o.anchor;
171
173
  if (!e.saveOverride || !g) return null;
172
- const p = e.saveOverride;
173
- return async (y, s) => {
174
- const h = await p({
174
+ const x = e.saveOverride;
175
+ return async (c, n) => {
176
+ const w = await x({
175
177
  workflow_input_id: e.workflowInputId,
176
178
  object_ids: g.object_ids,
177
179
  field: g.field,
178
180
  field_path: g.field_path,
179
- value: y,
180
- source_choice: s
181
+ value: c,
182
+ source_choice: n
181
183
  });
182
- return a(h), h;
184
+ return a(w), w;
183
185
  };
184
186
  }
185
187
  const lt = ["data-status", "title"], nt = {
@@ -188,7 +190,7 @@ const lt = ["data-status", "title"], nt = {
188
190
  }, st = {
189
191
  key: 0,
190
192
  class: "tv-confidence-label"
191
- }, ce = /* @__PURE__ */ H({
193
+ }, fe = /* @__PURE__ */ G({
192
194
  __name: "ConfidenceIcon",
193
195
  props: {
194
196
  confidence: {},
@@ -197,7 +199,7 @@ const lt = ["data-status", "title"], nt = {
197
199
  },
198
200
  setup(e) {
199
201
  const t = e, a = d(
200
- () => t.status ?? fe(t.confidence)
202
+ () => t.status ?? me(t.confidence)
201
203
  ), g = {
202
204
  high: "✔",
203
205
  // check
@@ -206,14 +208,14 @@ const lt = ["data-status", "title"], nt = {
206
208
  low: "✕",
207
209
  // x
208
210
  unverifiable: "?"
209
- }, p = d(() => g[a.value]), n = d(() => Qe[a.value]), y = d(() => le[a.value]);
210
- return (s, h) => (l(), o("span", {
211
- class: R(["tv-confidence-icon inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold leading-none", n.value]),
211
+ }, x = d(() => g[a.value]), o = d(() => Qe[a.value]), c = d(() => re[a.value]);
212
+ return (n, w) => (l(), i("span", {
213
+ class: A(["tv-confidence-icon inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold leading-none", o.value]),
212
214
  "data-status": a.value,
213
- title: y.value
215
+ title: c.value
214
216
  }, [
215
- i("span", nt, m(p.value), 1),
216
- e.showLabel ? (l(), o("span", st, m(y.value), 1)) : b("", !0)
217
+ r("span", nt, m(x.value), 1),
218
+ e.showLabel ? (l(), i("span", st, m(c.value), 1)) : b("", !0)
217
219
  ], 10, lt));
218
220
  }
219
221
  });
@@ -221,26 +223,26 @@ async function rt(e, t) {
221
223
  const a = t.object_ids.at(-1), g = new URLSearchParams({
222
224
  object_id: String(a),
223
225
  field: t.field
224
- }), p = e.includes("?") ? "&" : "?", n = await fetch(`${e}${p}${g}`);
225
- if (!n.ok)
226
+ }), x = e.includes("?") ? "&" : "?", o = await fetch(`${e}${x}${g}`);
227
+ if (!o.ok)
226
228
  throw new Error(
227
- `data-point-audit ${n.status}: ${await n.text()}`
229
+ `data-point-audit ${o.status}: ${await o.text()}`
228
230
  );
229
- return (await n.json()).data ?? [];
231
+ return (await o.json()).data ?? [];
230
232
  }
231
- function Te(e) {
232
- var a, g, p;
233
+ function Ne(e) {
234
+ var a, g, x;
233
235
  if (!e || e.length === 0) return [];
234
236
  const t = /* @__PURE__ */ new Map();
235
- for (const n of e) {
236
- const y = it(n);
237
- let s = t.get(y);
238
- s || (s = {
239
- fileLabel: ot(n),
240
- fileUrl: n.file_url ?? ((a = n.file) == null ? void 0 : a.url),
241
- file: n.file,
237
+ for (const o of e) {
238
+ const c = it(o);
239
+ let n = t.get(c);
240
+ n || (n = {
241
+ fileLabel: ot(o),
242
+ fileUrl: o.file_url ?? ((a = o.file) == null ? void 0 : a.url),
243
+ file: o.file,
242
244
  sources: []
243
- }, t.set(y, s)), !s.fileUrl && (n.file_url ?? ((g = n.file) == null ? void 0 : g.url)) && (s.fileUrl = n.file_url ?? ((p = n.file) == null ? void 0 : p.url)), !s.file && n.file && (s.file = n.file), s.sources.push(n);
245
+ }, t.set(c, n)), !n.fileUrl && (o.file_url ?? ((g = o.file) == null ? void 0 : g.url)) && (n.fileUrl = o.file_url ?? ((x = o.file) == null ? void 0 : x.url)), !n.file && o.file && (n.file = o.file), n.sources.push(o);
244
246
  }
245
247
  return [...t.values()];
246
248
  }
@@ -265,30 +267,30 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
265
267
  }, pt = {
266
268
  key: 5,
267
269
  class: "text-[11px] text-gray-400"
268
- }, mt = { class: "tv-audit-call-body flex flex-col gap-2 p-3" }, gt = /* @__PURE__ */ H({
270
+ }, mt = { class: "tv-audit-call-body flex flex-col gap-2 p-3" }, gt = /* @__PURE__ */ G({
269
271
  __name: "AuditCallCard",
270
272
  props: {
271
273
  call: {}
272
274
  },
273
275
  setup(e) {
274
276
  const t = e, a = d(() => {
275
- const s = t.call.status_code;
276
- return s == null ? "muted" : s >= 200 && s < 300 ? "success" : s >= 400 ? "danger" : "warning";
277
+ const n = t.call.status_code;
278
+ return n == null ? "muted" : n >= 200 && n < 300 ? "success" : n >= 400 ? "danger" : "warning";
277
279
  }), g = d(() => {
278
- const s = t.call.run_time_ms;
279
- return s == null ? null : s >= 1e3 ? `${(s / 1e3).toFixed(1)}s` : `${s}ms`;
280
- }), p = d(() => {
280
+ const n = t.call.run_time_ms;
281
+ return n == null ? null : n >= 1e3 ? `${(n / 1e3).toFixed(1)}s` : `${n}ms`;
282
+ }), x = d(() => {
281
283
  if (!t.call.started_at) return null;
282
- const s = new Date(t.call.started_at);
283
- return Number.isNaN(s.getTime()) ? t.call.started_at : s.toLocaleString();
284
- }), n = d(
284
+ const n = new Date(t.call.started_at);
285
+ return Number.isNaN(n.getTime()) ? t.call.started_at : n.toLocaleString();
286
+ }), o = d(
285
287
  () => JSON.stringify(t.call.request ?? null, null, 2)
286
- ), y = d(
288
+ ), c = d(
287
289
  () => JSON.stringify(t.call.response ?? null, null, 2)
288
290
  );
289
- return (s, h) => (l(), o("div", dt, [
290
- i("div", ct, [
291
- e.call.stage ? (l(), N(r(J), {
291
+ return (n, w) => (l(), i("div", dt, [
292
+ r("div", ct, [
293
+ e.call.stage ? (l(), U(s(Y), {
292
294
  key: 0,
293
295
  variant: "muted",
294
296
  size: "xxs",
@@ -299,7 +301,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
299
301
  ]),
300
302
  _: 1
301
303
  })) : b("", !0),
302
- e.call.model ? (l(), N(r(J), {
304
+ e.call.model ? (l(), U(s(Y), {
303
305
  key: 1,
304
306
  variant: "info",
305
307
  size: "xs",
@@ -310,7 +312,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
310
312
  ]),
311
313
  _: 1
312
314
  })) : b("", !0),
313
- e.call.service ? (l(), N(r(J), {
315
+ e.call.service ? (l(), U(s(Y), {
314
316
  key: 2,
315
317
  variant: "muted",
316
318
  size: "xxs"
@@ -320,9 +322,9 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
320
322
  ]),
321
323
  _: 1
322
324
  })) : b("", !0),
323
- e.call.endpoint ? (l(), o("span", vt, m(e.call.endpoint), 1)) : b("", !0),
324
- h[0] || (h[0] = i("span", { class: "flex-1" }, null, -1)),
325
- D(r(J), {
325
+ e.call.endpoint ? (l(), i("span", vt, m(e.call.endpoint), 1)) : b("", !0),
326
+ w[0] || (w[0] = r("span", { class: "flex-1" }, null, -1)),
327
+ D(s(Y), {
326
328
  variant: a.value,
327
329
  size: "xxs",
328
330
  class: "tv-audit-status"
@@ -332,24 +334,24 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
332
334
  ]),
333
335
  _: 1
334
336
  }, 8, ["variant"]),
335
- g.value ? (l(), o("span", ft, m(g.value), 1)) : b("", !0),
336
- p.value ? (l(), o("span", pt, m(p.value), 1)) : b("", !0)
337
+ g.value ? (l(), i("span", ft, m(g.value), 1)) : b("", !0),
338
+ x.value ? (l(), i("span", pt, m(x.value), 1)) : b("", !0)
337
339
  ]),
338
- i("div", mt, [
339
- i("div", null, [
340
- h[1] || (h[1] = i("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Request ", -1)),
341
- D(r(ye), {
342
- "model-value": n.value,
340
+ r("div", mt, [
341
+ r("div", null, [
342
+ w[1] || (w[1] = r("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Request ", -1)),
343
+ D(s(be), {
344
+ "model-value": o.value,
343
345
  format: "json",
344
346
  collapsible: "",
345
347
  "default-collapsed": "",
346
348
  class: "tv-audit-request"
347
349
  }, null, 8, ["model-value"])
348
350
  ]),
349
- i("div", null, [
350
- h[2] || (h[2] = i("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Response ", -1)),
351
- D(r(ye), {
352
- "model-value": y.value,
351
+ r("div", null, [
352
+ w[2] || (w[2] = r("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Response ", -1)),
353
+ D(s(be), {
354
+ "model-value": c.value,
353
355
  format: "json",
354
356
  collapsible: "",
355
357
  "default-collapsed": "",
@@ -398,7 +400,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
398
400
  }, Ft = {
399
401
  key: 2,
400
402
  class: "tv-audit-empty rounded-lg border border-dashed border-gray-200 p-6 text-center text-sm text-gray-400"
401
- }, qt = /* @__PURE__ */ H({
403
+ }, qt = /* @__PURE__ */ G({
402
404
  __name: "VerificationModal",
403
405
  props: {
404
406
  modelValue: { type: Boolean },
@@ -408,191 +410,191 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
408
410
  },
409
411
  emits: ["update:modelValue", "saved"],
410
412
  setup(e, { emit: t }) {
411
- const a = e, g = t, p = ne(), n = we(), y = d({
413
+ const a = e, g = t, x = ie(), o = ke(), c = d({
412
414
  get: () => a.modelValue,
413
- set: (v) => g("update:modelValue", v)
414
- }), s = d(() => pe(a.meta)), h = d(() => a.meta.candidates.extracted), $ = d(() => a.meta.candidates.claim), _ = d(() => a.meta.candidates.override), x = d(() => {
415
- var v;
416
- return ((v = h.value) == null ? void 0 : v.confidence) ?? null;
417
- }), k = d(() => fe(x.value)), S = d(() => oe(a.meta)), A = d(() => ue(a.meta)), O = d(() => {
418
- var v;
419
- return Te((v = h.value) == null ? void 0 : v.sources);
420
- }), M = d(() => (a.meta.anchor.field_path || a.label || "Data point").split(".").map(
415
+ set: (f) => g("update:modelValue", f)
416
+ }), n = d(() => ge(a.meta)), w = d(() => a.meta.candidates.extracted), k = d(() => a.meta.candidates.claim), h = d(() => a.meta.candidates.override), y = d(() => {
417
+ var f;
418
+ return ((f = w.value) == null ? void 0 : f.confidence) ?? null;
419
+ }), $ = d(() => me(y.value)), S = d(() => de(a.meta)), N = d(() => ce(a.meta)), O = d(() => {
420
+ var f;
421
+ return Ne((f = w.value) == null ? void 0 : f.sources);
422
+ }), F = d(() => (a.meta.anchor.field_path || a.label || "Data point").split(".").map(
421
423
  (u) => u.replace(/\[\d+\]/g, "").replace(/_/g, " ").replace(/^\w/, (C) => C.toUpperCase())
422
- ).join(" › ")), B = {
424
+ ).join(" › ")), Z = {
423
425
  high: "success",
424
426
  medium: "warning",
425
427
  low: "danger",
426
428
  unverifiable: "muted"
427
- }, j = U("evidence"), G = d(() => !!p.auditUrl), X = d(() => {
429
+ }, z = R("evidence"), J = d(() => !!x.auditUrl), ee = d(() => {
428
430
  var u;
429
- const v = [
431
+ const f = [
430
432
  {
431
433
  value: "evidence",
432
434
  label: "Evidence",
433
- count: O.value.reduce((C, c) => C + c.sources.length, 0)
435
+ count: O.value.reduce((C, v) => C + v.sources.length, 0)
434
436
  },
435
437
  {
436
438
  value: "candidates",
437
439
  label: "Candidates",
438
- count: W.value.length
440
+ count: _.value.length
439
441
  }
440
442
  ];
441
- return G.value && v.push({
443
+ return J.value && f.push({
442
444
  value: "audit",
443
445
  label: "Audit trail",
444
- count: ((u = Y.value) == null ? void 0 : u.length) ?? void 0
445
- }), v;
446
- }), F = d(
447
- () => O.value.map((v) => v.file).filter((v) => !!v)
448
- ), Q = U(null), f = d(() => {
449
- const v = Q.value ?? F.value[0];
450
- if (!v) return null;
446
+ count: ((u = q.value) == null ? void 0 : u.length) ?? void 0
447
+ }), f;
448
+ }), P = d(
449
+ () => O.value.map((f) => f.file).filter((f) => !!f)
450
+ ), K = R(null), Q = d(() => {
451
+ const f = K.value ?? P.value[0];
452
+ if (!f) return null;
451
453
  const u = O.value.find(
452
- (c) => c.file && String(c.file.id) === String(v.id)
454
+ (v) => v.file && String(v.file.id) === String(f.id)
453
455
  );
454
456
  if (!u) return null;
455
- const C = u.sources.find((c) => c.explanation);
457
+ const C = u.sources.find((v) => v.explanation);
456
458
  return (C == null ? void 0 : C.explanation) ?? null;
457
- }), w = d(() => {
458
- const v = /* @__PURE__ */ new Map();
459
+ }), W = d(() => {
460
+ const f = /* @__PURE__ */ new Map();
459
461
  for (const u of O.value)
460
462
  for (const C of u.sources) {
461
- const c = C.original_file;
462
- c && !v.has(String(c.id)) && v.set(String(c.id), c);
463
+ const v = C.original_file;
464
+ v && !f.has(String(v.id)) && f.set(String(v.id), v);
463
465
  }
464
- return [...v.values()];
465
- }), V = U(null), K = d({
466
- get: () => V.value !== null,
467
- set: (v) => {
468
- v || (V.value = null);
466
+ return [...f.values()];
467
+ }), M = R(null), p = d({
468
+ get: () => M.value !== null,
469
+ set: (f) => {
470
+ f || (M.value = null);
469
471
  }
470
- }), W = d(() => {
471
- const v = [];
472
- return _.value && v.push({
472
+ }), _ = d(() => {
473
+ const f = [];
474
+ return h.value && f.push({
473
475
  key: "override",
474
476
  title: "Human override",
475
477
  variant: "success",
476
- value: _.value.value,
478
+ value: h.value.value,
477
479
  detail: [
478
- _.value.source_choice ? `basis: ${_.value.source_choice}` : null,
479
- _.value.set_at ? new Date(_.value.set_at).toLocaleString() : null
480
+ h.value.source_choice ? `basis: ${h.value.source_choice}` : null,
481
+ h.value.set_at ? new Date(h.value.set_at).toLocaleString() : null
480
482
  ].filter(Boolean).join(" · "),
481
- winner: s.value.source === "override"
482
- }), h.value && v.push({
483
+ winner: n.value.source === "override"
484
+ }), w.value && f.push({
483
485
  key: "extracted",
484
486
  title: "Extracted",
485
- variant: B[k.value],
486
- value: h.value.value,
487
- detail: x.value != null ? `Confidence ${x.value}/5 · ${le[k.value]}` : "No confidence recorded",
487
+ variant: Z[$.value],
488
+ value: w.value.value,
489
+ detail: y.value != null ? `Confidence ${y.value}/5 · ${re[$.value]}` : "No confidence recorded",
488
490
  accept: a.save ? () => {
489
491
  var u;
490
- return se(me((u = h.value) == null ? void 0 : u.value), "extracted");
492
+ return H(X((u = w.value) == null ? void 0 : u.value), "extracted");
491
493
  } : void 0,
492
- winner: s.value.source === "extracted"
493
- }), $.value && v.push({
494
+ winner: n.value.source === "extracted"
495
+ }), k.value && f.push({
494
496
  key: "claim",
495
497
  title: "Claim",
496
498
  variant: "info",
497
- value: $.value.value,
498
- detail: $.value.claim_set_label ?? "Reference output",
499
+ value: k.value.value,
500
+ detail: k.value.claim_set_label ?? "Reference output",
499
501
  accept: a.save ? () => {
500
502
  var u;
501
- return se(me((u = $.value) == null ? void 0 : u.value), "claim");
503
+ return H(X((u = k.value) == null ? void 0 : u.value), "claim");
502
504
  } : void 0,
503
- winner: s.value.source === "claim"
504
- }), v;
505
- }), q = U(""), E = U(!1);
506
- async function se(v, u) {
507
- if (!(!a.save || E.value)) {
508
- E.value = !0;
505
+ winner: n.value.source === "claim"
506
+ }), f;
507
+ }), V = R(""), j = R(!1);
508
+ async function H(f, u) {
509
+ if (!(!a.save || j.value)) {
510
+ j.value = !0;
509
511
  try {
510
- const C = await a.save(v, u);
511
- g("saved", C), n.success(`Verified — ${M.value} locked in`);
512
+ const C = await a.save(f, u);
513
+ g("saved", C), o.success(`Verified — ${F.value} locked in`);
512
514
  } catch (C) {
513
- console.error("template-verification: save failed", C), n.danger(`Could not save ${M.value} — try again`);
515
+ console.error("template-verification: save failed", C), o.danger(`Could not save ${F.value} — try again`);
514
516
  } finally {
515
- E.value = !1;
517
+ j.value = !1;
516
518
  }
517
519
  }
518
520
  }
519
- const Ue = () => se(q.value, "custom");
520
- function me(v) {
521
- return v == null ? null : String(v);
521
+ const te = () => H(V.value, "custom");
522
+ function X(f) {
523
+ return f == null ? null : String(f);
522
524
  }
523
- function ge(v) {
524
- return v == null ? "—" : String(v);
525
+ function xe(f) {
526
+ return f == null ? "—" : String(f);
525
527
  }
526
- const Y = U(null), Z = U(!1), ee = U(null);
527
- return ve(
528
- [j, y],
529
- async ([v, u]) => {
530
- if (!(v !== "audit" || !u || Y.value !== null || Z.value) && p.auditUrl) {
531
- Z.value = !0, ee.value = null;
528
+ const q = R(null), ae = R(!1), le = R(null);
529
+ return pe(
530
+ [z, c],
531
+ async ([f, u]) => {
532
+ if (!(f !== "audit" || !u || q.value !== null || ae.value) && x.auditUrl) {
533
+ ae.value = !0, le.value = null;
532
534
  try {
533
- Y.value = await rt(
534
- p.auditUrl,
535
+ q.value = await rt(
536
+ x.auditUrl,
535
537
  a.meta.anchor
536
538
  );
537
539
  } catch (C) {
538
- ee.value = C instanceof Error ? C.message : String(C);
540
+ le.value = C instanceof Error ? C.message : String(C);
539
541
  } finally {
540
- Z.value = !1;
542
+ ae.value = !1;
541
543
  }
542
544
  }
543
545
  },
544
546
  { immediate: !0 }
545
- ), (v, u) => (l(), o(L, null, [
546
- D(r(ie), {
547
- modelValue: y.value,
548
- "onUpdate:modelValue": u[3] || (u[3] = (C) => y.value = C),
549
- title: M.value,
547
+ ), (f, u) => (l(), i(L, null, [
548
+ D(s(ue), {
549
+ modelValue: c.value,
550
+ "onUpdate:modelValue": u[3] || (u[3] = (C) => c.value = C),
551
+ title: F.value,
550
552
  width: 90,
551
553
  height: 90,
552
554
  "close-x": "",
553
- class: R(r(z))
555
+ class: A(s(E))
554
556
  }, {
555
557
  default: I(() => {
556
558
  var C;
557
559
  return [
558
- i("div", xt, [
559
- i("section", yt, [
560
- i("div", bt, [
561
- i("div", ht, [
562
- u[6] || (u[6] = i("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Resolved value ", -1)),
563
- i("div", _t, m(ge(s.value.value)), 1),
564
- i("div", wt, [
560
+ r("div", xt, [
561
+ r("section", yt, [
562
+ r("div", bt, [
563
+ r("div", ht, [
564
+ u[6] || (u[6] = r("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Resolved value ", -1)),
565
+ r("div", _t, m(xe(n.value.value)), 1),
566
+ r("div", wt, [
565
567
  u[5] || (u[5] = T(" source of truth: ", -1)),
566
- i("span", kt, m(s.value.source), 1)
568
+ r("span", kt, m(n.value.source), 1)
567
569
  ])
568
570
  ]),
569
- i("div", $t, [
570
- u[7] || (u[7] = i("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Extraction confidence ", -1)),
571
- i("div", St, [
572
- x.value != null ? (l(), N(r(ke), {
571
+ r("div", $t, [
572
+ u[7] || (u[7] = r("div", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Extraction confidence ", -1)),
573
+ r("div", St, [
574
+ y.value != null ? (l(), U(s($e), {
573
575
  key: 0,
574
- value: x.value,
576
+ value: y.value,
575
577
  max: 5,
576
578
  size: "md",
577
- variant: B[k.value],
579
+ variant: Z[$.value],
578
580
  gradient: "",
579
581
  shimmer: "",
580
582
  "show-text": "",
581
583
  "text-position": "beside",
582
- label: `${x.value}/5`
583
- }, null, 8, ["value", "variant", "label"])) : (l(), o("div", Ct, " No confidence recorded "))
584
+ label: `${y.value}/5`
585
+ }, null, 8, ["value", "variant", "label"])) : (l(), i("div", Ct, " No confidence recorded "))
584
586
  ]),
585
- i("div", {
586
- class: R(["tv-confidence-label mt-1 text-right text-xs font-medium", {
587
- "text-green-600": k.value === "high",
588
- "text-yellow-600": k.value === "medium",
589
- "text-red-600": k.value === "low",
590
- "text-gray-400": k.value === "unverifiable"
587
+ r("div", {
588
+ class: A(["tv-confidence-label mt-1 text-right text-xs font-medium", {
589
+ "text-green-600": $.value === "high",
590
+ "text-yellow-600": $.value === "medium",
591
+ "text-red-600": $.value === "low",
592
+ "text-gray-400": $.value === "unverifiable"
591
593
  }])
592
- }, m(r(le)[k.value]), 3)
594
+ }, m(s(re)[$.value]), 3)
593
595
  ])
594
596
  ]),
595
- e.meta.discrepancy ? (l(), N(r(be), {
597
+ e.meta.discrepancy ? (l(), U(s(he), {
596
598
  key: 0,
597
599
  variant: "warning",
598
600
  class: "tv-discrepancy"
@@ -603,88 +605,88 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
603
605
  _: 1
604
606
  })) : b("", !0)
605
607
  ]),
606
- D(r(je), {
607
- modelValue: j.value,
608
- "onUpdate:modelValue": u[0] || (u[0] = (c) => j.value = c),
609
- tabs: X.value,
608
+ D(s(Ee), {
609
+ modelValue: z.value,
610
+ "onUpdate:modelValue": u[0] || (u[0] = (v) => z.value = v),
611
+ tabs: ee.value,
610
612
  class: "tv-modal-tabs"
611
613
  }, null, 8, ["modelValue", "tabs"]),
612
- j.value === "evidence" ? (l(), o("section", Vt, [
613
- S.value ? (l(), o("div", Dt, [
614
- u[9] || (u[9] = i("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Reasoning ", -1)),
615
- D(r(Ee), {
614
+ z.value === "evidence" ? (l(), i("section", Vt, [
615
+ S.value ? (l(), i("div", Dt, [
616
+ u[9] || (u[9] = r("div", { class: "mb-1 text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, " Reasoning ", -1)),
617
+ D(s(ze), {
616
618
  "model-value": S.value,
617
619
  readonly: "",
618
620
  class: "tv-reasoning"
619
621
  }, null, 8, ["model-value"])
620
622
  ])) : b("", !0),
621
- A.value ? (l(), o("blockquote", Ot, [
622
- T(" “" + m(A.value) + "” ", 1),
623
- D(r(J), {
624
- variant: (C = h.value) != null && C.cited_text_verified ? "success" : "muted",
623
+ N.value ? (l(), i("blockquote", Ot, [
624
+ T(" “" + m(N.value) + "” ", 1),
625
+ D(s(Y), {
626
+ variant: (C = w.value) != null && C.cited_text_verified ? "success" : "muted",
625
627
  size: "xxs",
626
628
  class: "tv-cited-verified ml-2 not-italic"
627
629
  }, {
628
630
  default: I(() => {
629
- var c;
631
+ var v;
630
632
  return [
631
- T(m((c = h.value) != null && c.cited_text_verified ? "✔ verified in source" : "unverified"), 1)
633
+ T(m((v = w.value) != null && v.cited_text_verified ? "✔ verified in source" : "unverified"), 1)
632
634
  ];
633
635
  }),
634
636
  _: 1
635
637
  }, 8, ["variant"])
636
638
  ])) : b("", !0),
637
- F.value.length ? (l(), o("div", It, [
638
- D(r(he), {
639
- file: F.value[0],
640
- "file-in-preview": Q.value,
641
- "onUpdate:fileInPreview": u[1] || (u[1] = (c) => Q.value = c),
642
- "related-files": F.value,
639
+ P.value.length ? (l(), i("div", It, [
640
+ D(s(_e), {
641
+ file: P.value[0],
642
+ "file-in-preview": K.value,
643
+ "onUpdate:fileInPreview": u[1] || (u[1] = (v) => K.value = v),
644
+ "related-files": P.value,
643
645
  "layout-toggles": ["sidebar", "continuous"],
644
646
  "default-sidebar": "",
645
647
  zoomable: "",
646
648
  "storage-key": "tv-evidence-viewer",
647
649
  class: "h-full min-h-0 flex-1"
648
650
  }, null, 8, ["file", "file-in-preview", "related-files"]),
649
- f.value ? (l(), o("div", Tt, m(f.value), 1)) : b("", !0)
650
- ])) : (l(), o("div", Ut, " No source pages recorded for this data point ")),
651
- w.value.length ? (l(), o("div", Nt, [
652
- u[10] || (u[10] = i("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Full documents:", -1)),
653
- (l(!0), o(L, null, P(w.value, (c) => (l(), N(r(re), {
654
- key: String(c.id),
651
+ Q.value ? (l(), i("div", Tt, m(Q.value), 1)) : b("", !0)
652
+ ])) : (l(), i("div", Ut, " No source pages recorded for this data point ")),
653
+ W.value.length ? (l(), i("div", Nt, [
654
+ u[10] || (u[10] = r("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Full documents:", -1)),
655
+ (l(!0), i(L, null, B(W.value, (v) => (l(), U(s(oe), {
656
+ key: String(v.id),
655
657
  size: "sm",
656
658
  variant: "info",
657
659
  class: "tv-open-document",
658
- onClick: (xa) => V.value = c
660
+ onClick: (xa) => M.value = v
659
661
  }, {
660
662
  default: I(() => [
661
- T(m(c.name), 1)
663
+ T(m(v.name), 1)
662
664
  ]),
663
665
  _: 2
664
666
  }, 1032, ["onClick"]))), 128))
665
667
  ])) : b("", !0)
666
668
  ])) : b("", !0),
667
- j.value === "candidates" ? (l(), o("section", Rt, [
668
- (l(!0), o(L, null, P(W.value, (c) => (l(), o("div", {
669
- key: c.key,
670
- class: R(["tv-candidate-row rounded-lg border p-4 transition-shadow", [
671
- c.winner ? "border-gray-300 bg-gray-50 shadow-sm" : "border-gray-200",
672
- e.meta.discrepancy && !c.winner ? "tv-candidate-disagrees border-amber-200" : ""
669
+ z.value === "candidates" ? (l(), i("section", Rt, [
670
+ (l(!0), i(L, null, B(_.value, (v) => (l(), i("div", {
671
+ key: v.key,
672
+ class: A(["tv-candidate-row rounded-lg border p-4 transition-shadow", [
673
+ v.winner ? "border-gray-300 bg-gray-50 shadow-sm" : "border-gray-200",
674
+ e.meta.discrepancy && !v.winner ? "tv-candidate-disagrees border-amber-200" : ""
673
675
  ]])
674
676
  }, [
675
- i("div", At, [
676
- i("div", Lt, [
677
- i("div", jt, [
678
- D(r(J), {
679
- variant: c.variant,
677
+ r("div", At, [
678
+ r("div", Lt, [
679
+ r("div", jt, [
680
+ D(s(Y), {
681
+ variant: v.variant,
680
682
  size: "xs"
681
683
  }, {
682
684
  default: I(() => [
683
- T(m(c.title), 1)
685
+ T(m(v.title), 1)
684
686
  ]),
685
687
  _: 2
686
688
  }, 1032, ["variant"]),
687
- c.winner ? (l(), N(r(J), {
689
+ v.winner ? (l(), U(s(Y), {
688
690
  key: 0,
689
691
  variant: "success",
690
692
  size: "xxs",
@@ -696,16 +698,16 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
696
698
  _: 1
697
699
  })) : b("", !0)
698
700
  ]),
699
- i("div", Et, m(ge(c.value)), 1),
700
- i("div", zt, m(c.detail), 1)
701
+ r("div", Et, m(xe(v.value)), 1),
702
+ r("div", zt, m(v.detail), 1)
701
703
  ]),
702
- c.accept && !c.winner ? (l(), N(r(re), {
704
+ v.accept && !v.winner ? (l(), U(s(oe), {
703
705
  key: 0,
704
706
  size: "sm",
705
- variant: c.variant,
706
- loading: E.value,
707
- class: R(`tv-accept-${c.key}`),
708
- onClick: c.accept
707
+ variant: v.variant,
708
+ loading: j.value,
709
+ class: A(`tv-accept-${v.key}`),
710
+ onClick: v.accept
709
711
  }, {
710
712
  default: I(() => [...u[12] || (u[12] = [
711
713
  T("Accept this value", -1)
@@ -714,47 +716,47 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
714
716
  }, 8, ["variant", "loading", "class", "onClick"])) : b("", !0)
715
717
  ])
716
718
  ], 2))), 128)),
717
- e.save ? (l(), o("div", Pt, [
718
- D(r(ze), {
719
- modelValue: q.value,
720
- "onUpdate:modelValue": u[2] || (u[2] = (c) => q.value = c),
719
+ e.save ? (l(), i("div", Pt, [
720
+ D(s(Pe), {
721
+ modelValue: V.value,
722
+ "onUpdate:modelValue": u[2] || (u[2] = (v) => V.value = v),
721
723
  size: "sm",
722
724
  class: "tv-custom-input flex-1",
723
725
  placeholder: "Type the correct value…",
724
- disabled: E.value
726
+ disabled: j.value
725
727
  }, null, 8, ["modelValue", "disabled"]),
726
- D(r(re), {
728
+ D(s(oe), {
727
729
  variant: "success",
728
730
  size: "sm",
729
731
  class: "tv-accept-custom",
730
- loading: E.value,
731
- disabled: !q.value,
732
- onClick: Ue
732
+ loading: j.value,
733
+ disabled: !V.value,
734
+ onClick: te
733
735
  }, {
734
736
  default: I(() => [...u[13] || (u[13] = [
735
737
  T("Save custom value", -1)
736
738
  ])]),
737
739
  _: 1
738
740
  }, 8, ["loading", "disabled"])
739
- ])) : (l(), o("div", Mt, " Read-only render — corrections are disabled here "))
741
+ ])) : (l(), i("div", Mt, " Read-only render — corrections are disabled here "))
740
742
  ])) : b("", !0),
741
- j.value === "audit" ? (l(), o("section", Bt, [
742
- Z.value ? (l(), o(L, { key: 0 }, P(2, (c) => D(r(Pe), {
743
- key: c,
743
+ z.value === "audit" ? (l(), i("section", Bt, [
744
+ ae.value ? (l(), i(L, { key: 0 }, B(2, (v) => D(s(Se), {
745
+ key: v,
744
746
  shape: "rounded",
745
747
  class: "tv-audit-skeleton h-24 w-full"
746
- })), 64)) : ee.value ? (l(), N(r(be), {
748
+ })), 64)) : le.value ? (l(), U(s(he), {
747
749
  key: 1,
748
750
  variant: "danger",
749
751
  class: "tv-audit-error"
750
752
  }, {
751
753
  default: I(() => [
752
- T(" Could not load the audit trail: " + m(ee.value), 1)
754
+ T(" Could not load the audit trail: " + m(le.value), 1)
753
755
  ]),
754
756
  _: 1
755
- })) : Y.value && Y.value.length === 0 ? (l(), o("div", Ft, " No LLM calls recorded for this data point ")) : Y.value ? (l(!0), o(L, { key: 3 }, P(Y.value, (c) => (l(), N(gt, {
756
- key: String(c.id),
757
- call: c
757
+ })) : q.value && q.value.length === 0 ? (l(), i("div", Ft, " No LLM calls recorded for this data point ")) : q.value ? (l(!0), i(L, { key: 3 }, B(q.value, (v) => (l(), U(gt, {
758
+ key: String(v.id),
759
+ call: v
758
760
  }, null, 8, ["call"]))), 128)) : b("", !0)
759
761
  ])) : b("", !0)
760
762
  ])
@@ -762,19 +764,19 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
762
764
  }),
763
765
  _: 1
764
766
  }, 8, ["modelValue", "title", "class"]),
765
- V.value ? (l(), N(r(ie), {
767
+ M.value ? (l(), U(s(ue), {
766
768
  key: 0,
767
- modelValue: K.value,
768
- "onUpdate:modelValue": u[4] || (u[4] = (C) => K.value = C),
769
- title: V.value.name,
769
+ modelValue: p.value,
770
+ "onUpdate:modelValue": u[4] || (u[4] = (C) => p.value = C),
771
+ title: M.value.name,
770
772
  width: 90,
771
773
  height: 90,
772
774
  "close-x": "",
773
- class: R(r(z))
775
+ class: A(s(E))
774
776
  }, {
775
777
  default: I(() => [
776
- D(r(he), {
777
- file: V.value,
778
+ D(s(_e), {
779
+ file: M.value,
778
780
  downloadable: "",
779
781
  zoomable: "",
780
782
  class: "tv-document-viewer h-full"
@@ -792,7 +794,7 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
792
794
  key: 2,
793
795
  class: "tv-discrepancy-indicator ml-0.5 text-amber-500",
794
796
  "aria-label": "discrepancy"
795
- }, _a = /* @__PURE__ */ H({
797
+ }, _a = /* @__PURE__ */ G({
796
798
  __name: "VerifiedField",
797
799
  props: {
798
800
  source: {},
@@ -801,106 +803,114 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
801
803
  format: { type: Function }
802
804
  },
803
805
  setup(e) {
804
- const t = e, a = ne(), g = d(() => a.enabled.value), p = U(null), n = d(() => {
805
- var f;
806
- return p.value ? p.value : t.source && t.field ? ((f = t.source.__meta) == null ? void 0 : f[t.field]) ?? null : null;
807
- }), y = d(() => pe(n.value)), s = d(() => {
806
+ const t = e, a = ie(), g = d(() => a.enabled.value), x = d(() => a.loading), o = R(null), c = d(() => {
807
+ var p;
808
+ return o.value ? o.value : t.source && t.field ? ((p = t.source.__meta) == null ? void 0 : p[t.field]) ?? null : null;
809
+ }), n = d(() => ge(c.value)), w = d(() => {
808
810
  if (t.original !== void 0 && t.original !== null)
809
811
  return t.original;
810
- if (n.value && y.value.value !== null && y.value.value !== void 0)
811
- return y.value.value;
812
+ if (c.value && n.value.value !== null && n.value.value !== void 0)
813
+ return n.value.value;
812
814
  if (t.source && t.field) return t.source[t.field];
813
- }), h = d(() => {
814
- const f = s.value;
815
- return f == null ? "" : typeof t.format == "function" ? t.format(f) : String(f);
816
- }), $ = d(
815
+ }), k = d(() => {
816
+ const p = w.value;
817
+ return p == null ? "" : typeof t.format == "function" ? t.format(p) : String(p);
818
+ }), h = d(
817
819
  () => {
818
- var f, w, V;
819
- return fe((V = (w = (f = n.value) == null ? void 0 : f.candidates) == null ? void 0 : w.extracted) == null ? void 0 : V.confidence);
820
+ var p, _, V;
821
+ return me((V = (_ = (p = c.value) == null ? void 0 : p.candidates) == null ? void 0 : _.extracted) == null ? void 0 : V.confidence);
820
822
  }
821
- ), _ = d(() => De(n.value)), x = d(() => {
822
- var f, w;
823
- return !!((w = (f = n.value) == null ? void 0 : f.candidates) != null && w.override);
824
- }), k = d(() => {
825
- var w;
826
- const f = (w = n.value) == null ? void 0 : w.candidates;
827
- return !!(f != null && f.override || f != null && f.extracted || f != null && f.claim);
828
- }), S = d(() => g.value && !!n.value), A = d(
829
- () => S.value && !!n.value && Ie(n.value)
830
- ), O = d(() => {
831
- var W, q, E;
832
- const f = (q = (W = n.value) == null ? void 0 : W.candidates) == null ? void 0 : q.extracted;
833
- if (!f) return "No verification data";
834
- const w = [], V = le[$.value];
835
- w.push(
836
- f.confidence != null ? `${V} (${f.confidence}/5)` : V
823
+ ), y = d(() => Ie(c.value)), $ = d(() => {
824
+ var p, _;
825
+ return !!((_ = (p = c.value) == null ? void 0 : p.candidates) != null && _.override);
826
+ }), S = d(() => {
827
+ var _;
828
+ const p = (_ = c.value) == null ? void 0 : _.candidates;
829
+ return !!(p != null && p.override || p != null && p.extracted || p != null && p.claim);
830
+ }), N = d(() => g.value), O = d(() => !!c.value), F = d(() => {
831
+ const p = c.value;
832
+ return N.value && !!p && Ue(p);
833
+ }), Z = d(() => {
834
+ var H, te, X;
835
+ const p = (te = (H = c.value) == null ? void 0 : H.candidates) == null ? void 0 : te.extracted;
836
+ if (!p) return "No verification data";
837
+ const _ = [], V = re[h.value];
838
+ _.push(
839
+ p.confidence != null ? `${V} (${p.confidence}/5)` : V
837
840
  );
838
- const K = ((E = f.sources) == null ? void 0 : E.length) ?? 0;
839
- return K > 0 && w.push(`${K} source ${K === 1 ? "page" : "pages"}`), _.value && w.push("sources disagree"), w.join(" · ");
841
+ const j = ((X = p.sources) == null ? void 0 : X.length) ?? 0;
842
+ return j > 0 && _.push(`${j} source ${j === 1 ? "page" : "pages"}`), y.value && _.push("sources disagree"), _.join(" · ");
840
843
  });
841
- function M(f) {
842
- var w;
843
- p.value = f, (w = t.source) != null && w.__meta && t.field && (t.source.__meta[t.field] = f);
844
+ function z(p) {
845
+ var _;
846
+ o.value = p, (_ = t.source) != null && _.__meta && t.field && (t.source.__meta[t.field] = p);
844
847
  }
845
- const B = d(() => at(a, n, M)), j = d(() => !!B.value), G = U(!1), X = U(!1);
846
- function F() {
847
- n.value && (G.value = !0);
848
+ const J = d(() => at(a, c, z)), ee = d(() => !!J.value), P = R(!1), K = R(!1);
849
+ function Q() {
850
+ c.value && (P.value = !0);
848
851
  }
849
- async function Q(f) {
850
- X.value = !1;
851
- const V = (f.target.textContent ?? "").trim();
852
- !B.value || V === h.value || await B.value(V, "custom");
852
+ const W = d(() => O.value);
853
+ async function M(p) {
854
+ K.value = !1;
855
+ const V = (p.target.textContent ?? "").trim();
856
+ !J.value || V === k.value || await J.value(V, "custom");
853
857
  }
854
- return (f, w) => (l(), o("span", {
855
- class: R(["tv-field inline-flex items-baseline gap-1", A.value ? "tv-needs-review" : ""])
858
+ return (p, _) => (l(), i("span", {
859
+ class: A(["tv-field inline-flex items-baseline gap-1", F.value ? "tv-needs-review" : ""])
856
860
  }, [
857
- i("span", {
858
- class: R([
859
- "tv-field-value",
860
- S.value && !k.value ? "tv-field-unverified cursor-pointer border-b border-dotted border-gray-300" : ""
861
- ]),
862
- contenteditable: j.value,
863
- "data-editable": j.value ? "true" : "false",
864
- onFocus: w[0] || (w[0] = (V) => X.value = !0),
865
- onBlur: Q,
866
- onKeydown: w[1] || (w[1] = Ne(te((V) => V.target.blur(), ["prevent"]), ["enter"])),
867
- onClick: w[2] || (w[2] = (V) => S.value && !k.value ? F() : void 0)
868
- }, [
869
- Re(f.$slots, "default", {
870
- value: s.value,
871
- formatted: h.value
872
- }, () => [
873
- T(m(h.value), 1)
874
- ])
875
- ], 42, Yt),
876
- S.value && k.value ? (l(), N(r(Me), {
861
+ x.value ? (l(), U(s(Se), {
877
862
  key: 0,
878
- tooltip: O.value,
879
- placement: "top"
880
- }, {
881
- trigger: I(() => [
882
- i("button", {
883
- type: "button",
884
- class: R(["tv-overlay inline-flex cursor-pointer items-center align-middle transition-transform duration-150 hover:scale-110", r(z)]),
885
- onClick: F
886
- }, [
887
- x.value ? (l(), o("span", Jt, "✔")) : (l(), N(ce, {
888
- key: 0,
889
- status: $.value
890
- }, null, 8, ["status"])),
891
- _.value && !x.value ? (l(), o("span", Kt, "⚠")) : b("", !0)
892
- ], 2)
893
- ]),
894
- _: 1
895
- }, 8, ["tooltip"])) : b("", !0),
896
- n.value ? (l(), N(qt, {
897
- key: 1,
898
- modelValue: G.value,
899
- "onUpdate:modelValue": w[3] || (w[3] = (V) => G.value = V),
900
- meta: n.value,
901
- label: e.field,
902
- save: B.value
903
- }, null, 8, ["modelValue", "meta", "label", "save"])) : b("", !0)
863
+ shape: "rounded",
864
+ class: "tv-field-skeleton inline-block h-[1em] w-16 align-middle"
865
+ })) : (l(), i(L, { key: 1 }, [
866
+ r("span", {
867
+ class: A([
868
+ "tv-field-value",
869
+ N.value && !S.value ? "tv-field-unverified cursor-pointer border-b border-dotted border-gray-300" : ""
870
+ ]),
871
+ contenteditable: ee.value,
872
+ "data-editable": ee.value ? "true" : "false",
873
+ onFocus: _[0] || (_[0] = (V) => K.value = !0),
874
+ onBlur: M,
875
+ onKeydown: _[1] || (_[1] = Re(ne((V) => V.target.blur(), ["prevent"]), ["enter"])),
876
+ onClick: _[2] || (_[2] = (V) => N.value && !S.value ? Q() : void 0)
877
+ }, [
878
+ Ae(p.$slots, "default", {
879
+ value: w.value,
880
+ formatted: k.value
881
+ }, () => [
882
+ T(m(k.value), 1)
883
+ ])
884
+ ], 42, Yt),
885
+ N.value ? (l(), U(s(Me), {
886
+ key: 0,
887
+ tooltip: Z.value,
888
+ placement: "top"
889
+ }, {
890
+ trigger: I(() => [
891
+ r("button", {
892
+ type: "button",
893
+ class: A(["tv-overlay inline-flex items-center align-middle transition-transform duration-150", [s(E), W.value ? "cursor-pointer hover:scale-110" : "cursor-default"]]),
894
+ onClick: _[3] || (_[3] = (V) => W.value ? Q() : void 0)
895
+ }, [
896
+ $.value ? (l(), i("span", Jt, "✔")) : (l(), U(fe, {
897
+ key: 0,
898
+ status: h.value
899
+ }, null, 8, ["status"])),
900
+ y.value && !$.value ? (l(), i("span", Kt, "⚠")) : b("", !0)
901
+ ], 2)
902
+ ]),
903
+ _: 1
904
+ }, 8, ["tooltip"])) : b("", !0),
905
+ c.value ? (l(), U(qt, {
906
+ key: 1,
907
+ modelValue: P.value,
908
+ "onUpdate:modelValue": _[4] || (_[4] = (V) => P.value = V),
909
+ meta: c.value,
910
+ label: e.field,
911
+ save: J.value
912
+ }, null, 8, ["modelValue", "meta", "label", "save"])) : b("", !0)
913
+ ], 64))
904
914
  ], 2));
905
915
  }
906
916
  }), Ht = { class: "tv-comparison-page flex flex-col gap-4" }, Gt = {
@@ -921,106 +931,106 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
921
931
  }, sa = { class: "tv-datapoint-sources ml-4 text-xs text-gray-500" }, ra = ["href"], ia = { key: 1 }, oa = { class: "ml-1" }, ua = {
922
932
  key: 2,
923
933
  class: "tv-unanchored-group flex flex-col gap-1"
924
- }, da = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, ca = { class: "tv-datapoint-value" }, va = /* @__PURE__ */ H({
934
+ }, da = { class: "tv-datapoint-path font-mono text-xs text-gray-500" }, ca = { class: "tv-datapoint-value" }, va = /* @__PURE__ */ G({
925
935
  __name: "ComparisonPage",
926
936
  setup(e) {
927
- const t = ne(), a = d(() => Oe(t.data)), g = d(() => a.value.filter(($) => !$.unanchored)), p = d(() => a.value.filter(($) => $.unanchored));
928
- function n($) {
929
- const _ = pe($).value;
930
- return _ == null ? "" : String(_);
937
+ const t = ie(), a = d(() => Te(t.data)), g = d(() => a.value.filter((k) => !k.unanchored)), x = d(() => a.value.filter((k) => k.unanchored));
938
+ function o(k) {
939
+ const h = ge(k).value;
940
+ return h == null ? "" : String(h);
931
941
  }
932
- function y($) {
933
- return $ == null ? "" : String($);
942
+ function c(k) {
943
+ return k == null ? "" : String(k);
934
944
  }
935
- function s($) {
936
- var _, x, k;
937
- return (k = (x = (_ = $.meta) == null ? void 0 : _.candidates) == null ? void 0 : x.extracted) == null ? void 0 : k.confidence;
945
+ function n(k) {
946
+ var h, y, $;
947
+ return ($ = (y = (h = k.meta) == null ? void 0 : h.candidates) == null ? void 0 : y.extracted) == null ? void 0 : $.confidence;
938
948
  }
939
- function h($) {
940
- var k;
941
- const _ = (k = $.meta) == null ? void 0 : k.candidates;
942
- if (!_) return [];
943
- const x = [];
944
- return _.override && x.push({ source: "override", value: _.override.value }), _.extracted && x.push({ source: "extracted", value: _.extracted.value }), _.claim && x.push({ source: "claim", value: _.claim.value }), x;
949
+ function w(k) {
950
+ var $;
951
+ const h = ($ = k.meta) == null ? void 0 : $.candidates;
952
+ if (!h) return [];
953
+ const y = [];
954
+ return h.override && y.push({ source: "override", value: h.override.value }), h.extracted && y.push({ source: "extracted", value: h.extracted.value }), h.claim && y.push({ source: "claim", value: h.claim.value }), y;
945
955
  }
946
- return ($, _) => (l(), o("div", Ht, [
947
- _[1] || (_[1] = i("h2", { class: "tv-comparison-title text-lg font-semibold" }, "Verification comparison", -1)),
948
- a.value.length === 0 ? (l(), o("p", Gt, " No data points to compare. ")) : b("", !0),
949
- g.value.length ? (l(), o("section", Qt, [
950
- (l(!0), o(L, null, P(g.value, (x) => {
951
- var k, S, A;
952
- return l(), o("div", {
953
- key: x.path,
956
+ return (k, h) => (l(), i("div", Ht, [
957
+ h[1] || (h[1] = r("h2", { class: "tv-comparison-title text-lg font-semibold" }, "Verification comparison", -1)),
958
+ a.value.length === 0 ? (l(), i("p", Gt, " No data points to compare. ")) : b("", !0),
959
+ g.value.length ? (l(), i("section", Qt, [
960
+ (l(!0), i(L, null, B(g.value, (y) => {
961
+ var $, S, N;
962
+ return l(), i("div", {
963
+ key: y.path,
954
964
  class: "tv-datapoint border-t border-gray-100 pt-2"
955
965
  }, [
956
- i("div", Wt, [
957
- i("span", Xt, m(x.path), 1),
958
- i("span", Zt, m(n(x.meta)), 1),
959
- D(ce, {
960
- confidence: s(x),
966
+ r("div", Wt, [
967
+ r("span", Xt, m(y.path), 1),
968
+ r("span", Zt, m(o(y.meta)), 1),
969
+ D(fe, {
970
+ confidence: n(y),
961
971
  "show-label": ""
962
972
  }, null, 8, ["confidence"]),
963
- r(De)(x.meta) ? (l(), o("span", ea, "⚠ discrepancy")) : b("", !0)
973
+ s(Ie)(y.meta) ? (l(), i("span", ea, "⚠ discrepancy")) : b("", !0)
964
974
  ]),
965
- i("ul", ta, [
966
- (l(!0), o(L, null, P(h(x), (O) => (l(), o("li", {
975
+ r("ul", ta, [
976
+ (l(!0), i(L, null, B(w(y), (O) => (l(), i("li", {
967
977
  key: O.source,
968
978
  class: "tv-candidate"
969
979
  }, [
970
- i("span", aa, m(O.source) + ":", 1),
971
- T(" " + m(y(O.value)), 1)
980
+ r("span", aa, m(O.source) + ":", 1),
981
+ T(" " + m(c(O.value)), 1)
972
982
  ]))), 128))
973
983
  ]),
974
- r(oe)(x.meta) ? (l(), o("p", la, m(r(oe)(x.meta)), 1)) : b("", !0),
975
- r(ue)(x.meta) ? (l(), o("p", na, " “" + m(r(ue)(x.meta)) + "” ", 1)) : b("", !0),
976
- i("ul", sa, [
977
- (l(!0), o(L, null, P(r(Te)((A = (S = (k = x.meta) == null ? void 0 : k.candidates) == null ? void 0 : S.extracted) == null ? void 0 : A.sources), (O, M) => (l(), o("li", {
978
- key: M,
984
+ s(de)(y.meta) ? (l(), i("p", la, m(s(de)(y.meta)), 1)) : b("", !0),
985
+ s(ce)(y.meta) ? (l(), i("p", na, " “" + m(s(ce)(y.meta)) + "” ", 1)) : b("", !0),
986
+ r("ul", sa, [
987
+ (l(!0), i(L, null, B(s(Ne)((N = (S = ($ = y.meta) == null ? void 0 : $.candidates) == null ? void 0 : S.extracted) == null ? void 0 : N.sources), (O, F) => (l(), i("li", {
988
+ key: F,
979
989
  class: "tv-source-group"
980
990
  }, [
981
- O.fileUrl ? (l(), o("a", {
991
+ O.fileUrl ? (l(), i("a", {
982
992
  key: 0,
983
993
  href: O.fileUrl,
984
994
  class: "tv-source-link text-blue-600 underline",
985
995
  target: "_blank",
986
996
  rel: "noopener"
987
- }, m(O.fileLabel), 9, ra)) : (l(), o("span", ia, m(O.fileLabel), 1)),
988
- i("span", oa, "(" + m(O.sources.map(r(ut)).join(", ")) + ")", 1)
997
+ }, m(O.fileLabel), 9, ra)) : (l(), i("span", ia, m(O.fileLabel), 1)),
998
+ r("span", oa, "(" + m(O.sources.map(s(ut)).join(", ")) + ")", 1)
989
999
  ]))), 128))
990
1000
  ])
991
1001
  ]);
992
1002
  }), 128))
993
1003
  ])) : b("", !0),
994
- p.value.length ? (l(), o("section", ua, [
995
- _[0] || (_[0] = i("h3", { class: "tv-unanchored-title text-sm font-semibold text-gray-500" }, " Unanchored / not from source ", -1)),
996
- (l(!0), o(L, null, P(p.value, (x) => (l(), o("div", {
997
- key: x.path,
1004
+ x.value.length ? (l(), i("section", ua, [
1005
+ h[0] || (h[0] = r("h3", { class: "tv-unanchored-title text-sm font-semibold text-gray-500" }, " Unanchored / not from source ", -1)),
1006
+ (l(!0), i(L, null, B(x.value, (y) => (l(), i("div", {
1007
+ key: y.path,
998
1008
  class: "tv-unanchored-datapoint flex items-center gap-2 text-sm"
999
1009
  }, [
1000
- i("span", da, m(x.path), 1),
1001
- i("span", ca, m(y(x.value)), 1),
1002
- D(ce, { status: "unverifiable" })
1010
+ r("span", da, m(y.path), 1),
1011
+ r("span", ca, m(c(y.value)), 1),
1012
+ D(fe, { status: "unverifiable" })
1003
1013
  ]))), 128))
1004
1014
  ])) : b("", !0)
1005
1015
  ]));
1006
1016
  }
1007
- }), fa = { class: "tv-enable-toggle flex items-center justify-between text-sm font-medium text-gray-700" }, pa = { class: "tv-progress-block" }, ma = { class: "mb-1 flex items-baseline justify-between" }, ga = { class: "tv-progress-count text-xs font-semibold text-gray-600" }, wa = /* @__PURE__ */ H({
1017
+ }), fa = { class: "tv-enable-toggle flex items-center justify-between text-sm font-medium text-gray-700" }, pa = { class: "tv-progress-block" }, ma = { class: "mb-1 flex items-baseline justify-between" }, ga = { class: "tv-progress-count text-xs font-semibold text-gray-600" }, wa = /* @__PURE__ */ G({
1008
1018
  __name: "VerificationChrome",
1009
1019
  setup(e) {
1010
- const t = ne(), { enabled: a, openComparison: g } = t, p = Ge(), n = we(), y = U(!1), s = d(() => tt(t.data)), h = U(!1);
1011
- ve(
1012
- () => s.value.percent,
1013
- (k) => {
1014
- k === 100 && s.value.total > 0 && !h.value && (h.value = !0, n.success("All data points verified 🎯"));
1020
+ const t = ie(), { enabled: a, openComparison: g } = t, x = Ge(), o = ke(), c = R(!1), n = d(() => tt(t.data)), w = R(!1);
1021
+ pe(
1022
+ () => n.value.percent,
1023
+ ($) => {
1024
+ $ === 100 && n.value.total > 0 && !w.value && (w.value = !0, o.success("All data points verified 🎯"));
1015
1025
  }
1016
1026
  );
1017
- let $ = 0;
1018
- function _() {
1019
- const k = document.querySelectorAll(".tv-needs-review");
1020
- if (!k.length) return;
1021
- $ = $ % k.length;
1022
- const S = k[$];
1023
- $++, S.scrollIntoView({ behavior: "smooth", block: "center" }), S.animate(
1027
+ let k = 0;
1028
+ function h() {
1029
+ const $ = document.querySelectorAll(".tv-needs-review");
1030
+ if (!$.length) return;
1031
+ k = k % $.length;
1032
+ const S = $[k];
1033
+ k++, S.scrollIntoView({ behavior: "smooth", block: "center" }), S.animate(
1024
1034
  [
1025
1035
  { boxShadow: "0 0 0 0 rgba(245, 158, 11, 0.8)" },
1026
1036
  { boxShadow: "0 0 0 12px rgba(245, 158, 11, 0)" }
@@ -1028,116 +1038,116 @@ const dt = { class: "tv-audit-call rounded-lg border border-gray-200 shadow-sm"
1028
1038
  { duration: 900, iterations: 2 }
1029
1039
  );
1030
1040
  }
1031
- function x() {
1032
- g(), y.value = !1;
1041
+ function y() {
1042
+ g(), c.value = !1;
1033
1043
  }
1034
- return (k, S) => (l(), o(L, null, [
1035
- i("button", {
1044
+ return ($, S) => (l(), i(L, null, [
1045
+ r("button", {
1036
1046
  type: "button",
1037
- class: R(["tv-settings-button fixed bottom-4 right-4 z-50 flex h-11 w-11 items-center justify-center rounded-full bg-gray-900 text-white shadow-lg transition-transform hover:scale-105", r(z)]),
1047
+ class: A(["tv-settings-button fixed bottom-4 right-4 z-50 flex h-11 w-11 items-center justify-center rounded-full bg-gray-900 text-white shadow-lg transition-transform hover:scale-105", s(E)]),
1038
1048
  title: "Verification",
1039
- onClick: S[0] || (S[0] = te((A) => y.value = !y.value, ["stop"]))
1049
+ onClick: S[0] || (S[0] = ne((N) => c.value = !c.value, ["stop"]))
1040
1050
  }, [
1041
- D(r(Be), {
1042
- icon: r(Fe),
1051
+ D(s(Be), {
1052
+ icon: s(Fe),
1043
1053
  class: "h-5 w-5"
1044
1054
  }, null, 8, ["icon"]),
1045
- r(a) && s.value.needsReview > 0 ? (l(), N(r(qe), {
1055
+ s(a) && n.value.needsReview > 0 ? (l(), U(s(qe), {
1046
1056
  key: 0,
1047
- value: s.value.needsReview,
1057
+ value: n.value.needsReview,
1048
1058
  variant: "warning",
1049
1059
  class: "tv-needs-review-badge absolute -right-1 -top-1"
1050
1060
  }, null, 8, ["value"])) : b("", !0)
1051
1061
  ], 2),
1052
- y.value ? (l(), o("div", {
1062
+ c.value ? (l(), i("div", {
1053
1063
  key: 0,
1054
- class: R(["tv-settings-panel fixed bottom-20 right-4 z-50 flex w-72 flex-col gap-4 rounded-xl bg-white p-4 shadow-2xl ring-1 ring-gray-200", r(z)])
1064
+ class: A(["tv-settings-panel fixed bottom-20 right-4 z-50 flex w-72 flex-col gap-4 rounded-xl bg-white p-4 shadow-2xl ring-1 ring-gray-200", s(E)])
1055
1065
  }, [
1056
- i("label", fa, [
1057
- S[3] || (S[3] = i("span", null, "Verification overlay", -1)),
1058
- Ae(i("input", {
1059
- "onUpdate:modelValue": S[1] || (S[1] = (A) => xe(a) ? a.value = A : null),
1066
+ r("label", fa, [
1067
+ S[3] || (S[3] = r("span", null, "Verification overlay", -1)),
1068
+ Le(r("input", {
1069
+ "onUpdate:modelValue": S[1] || (S[1] = (N) => ye(a) ? a.value = N : null),
1060
1070
  type: "checkbox",
1061
1071
  class: "tv-enable-checkbox h-4 w-4 accent-gray-900"
1062
1072
  }, null, 512), [
1063
- [Le, r(a)]
1073
+ [je, s(a)]
1064
1074
  ])
1065
1075
  ]),
1066
- r(a) && s.value.total > 0 ? (l(), o(L, { key: 0 }, [
1067
- i("div", pa, [
1068
- i("div", ma, [
1069
- S[4] || (S[4] = i("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Review progress", -1)),
1070
- i("span", ga, m(s.value.verified) + " / " + m(s.value.total), 1)
1076
+ s(a) && n.value.total > 0 ? (l(), i(L, { key: 0 }, [
1077
+ r("div", pa, [
1078
+ r("div", ma, [
1079
+ S[4] || (S[4] = r("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Review progress", -1)),
1080
+ r("span", ga, m(n.value.verified) + " / " + m(n.value.total), 1)
1071
1081
  ]),
1072
- D(r(ke), {
1073
- value: s.value.verified,
1074
- max: s.value.total,
1082
+ D(s($e), {
1083
+ value: n.value.verified,
1084
+ max: n.value.total,
1075
1085
  size: "md",
1076
- variant: s.value.percent === 100 ? "success" : "info",
1077
- striped: s.value.percent < 100,
1078
- "animate-stripes": s.value.percent < 100,
1079
- glow: s.value.percent === 100,
1086
+ variant: n.value.percent === 100 ? "success" : "info",
1087
+ striped: n.value.percent < 100,
1088
+ "animate-stripes": n.value.percent < 100,
1089
+ glow: n.value.percent === 100,
1080
1090
  gradient: ""
1081
1091
  }, null, 8, ["value", "max", "variant", "striped", "animate-stripes", "glow"])
1082
1092
  ]),
1083
- s.value.needsReview > 0 ? (l(), o("button", {
1093
+ n.value.needsReview > 0 ? (l(), i("button", {
1084
1094
  key: 0,
1085
1095
  type: "button",
1086
- class: R(["tv-next-flagged flex items-center justify-between rounded-lg bg-amber-50 px-3 py-2 text-left text-xs font-medium text-amber-700 ring-1 ring-inset ring-amber-600/20 transition hover:bg-amber-100", r(z)]),
1087
- onClick: te(_, ["stop"])
1096
+ class: A(["tv-next-flagged flex items-center justify-between rounded-lg bg-amber-50 px-3 py-2 text-left text-xs font-medium text-amber-700 ring-1 ring-inset ring-amber-600/20 transition hover:bg-amber-100", s(E)]),
1097
+ onClick: ne(h, ["stop"])
1088
1098
  }, [
1089
- i("span", null, m(s.value.needsReview) + " need" + m(s.value.needsReview === 1 ? "s" : "") + " review", 1),
1090
- S[5] || (S[5] = i("span", { "aria-hidden": "true" }, "→", -1))
1099
+ r("span", null, m(n.value.needsReview) + " need" + m(n.value.needsReview === 1 ? "s" : "") + " review", 1),
1100
+ S[5] || (S[5] = r("span", { "aria-hidden": "true" }, "→", -1))
1091
1101
  ], 2)) : b("", !0)
1092
1102
  ], 64)) : b("", !0),
1093
- i("button", {
1103
+ r("button", {
1094
1104
  type: "button",
1095
- class: R(["tv-open-comparison rounded-lg border border-gray-200 px-3 py-2 text-sm font-medium text-gray-600 transition hover:bg-gray-50", r(z)]),
1096
- onClick: te(x, ["stop"])
1105
+ class: A(["tv-open-comparison rounded-lg border border-gray-200 px-3 py-2 text-sm font-medium text-gray-600 transition hover:bg-gray-50", s(E)]),
1106
+ onClick: ne(y, ["stop"])
1097
1107
  }, " Open comparison page ", 2)
1098
1108
  ], 2)) : b("", !0),
1099
- D(r(ie), {
1100
- modelValue: r(p),
1101
- "onUpdate:modelValue": S[2] || (S[2] = (A) => xe(p) ? p.value = A : null),
1109
+ D(s(ue), {
1110
+ modelValue: s(x),
1111
+ "onUpdate:modelValue": S[2] || (S[2] = (N) => ye(x) ? x.value = N : null),
1102
1112
  title: "Verification comparison",
1103
1113
  width: 80,
1104
1114
  "close-x": "",
1105
- class: R(r(z))
1115
+ class: A(s(E))
1106
1116
  }, {
1107
1117
  default: I(() => [
1108
1118
  D(va)
1109
1119
  ]),
1110
1120
  _: 1
1111
1121
  }, 8, ["modelValue", "class"]),
1112
- D(r(Ye), {
1113
- class: R(r(z))
1122
+ D(s(Ye), {
1123
+ class: A(s(E))
1114
1124
  }, null, 8, ["class"])
1115
1125
  ], 64));
1116
1126
  }
1117
1127
  });
1118
1128
  export {
1119
- z as CHROME_CLASS,
1129
+ E as CHROME_CLASS,
1120
1130
  va as ComparisonPage,
1121
- ce as ConfidenceIcon,
1122
- $e as ENABLED_STORAGE_KEY,
1123
- Ve as RESOLUTION_PRIORITY,
1131
+ fe as ConfidenceIcon,
1132
+ Ce as ENABLED_STORAGE_KEY,
1133
+ Oe as RESOLUTION_PRIORITY,
1124
1134
  Qe as STATUS_COLORS,
1125
- le as STATUS_LABELS,
1135
+ re as STATUS_LABELS,
1126
1136
  wa as VerificationChrome,
1127
1137
  qt as VerificationModal,
1128
1138
  _a as VerifiedField,
1129
- fe as bucketConfidence,
1139
+ me as bucketConfidence,
1130
1140
  Xe as candidatesDisagree,
1131
- ue as citedTextOf,
1141
+ ce as citedTextOf,
1132
1142
  tt as computeProgress,
1133
1143
  rt as fetchDataPointAudit,
1134
- Te as groupSources,
1135
- De as hasDiscrepancy,
1144
+ Ne as groupSources,
1145
+ Ie as hasDiscrepancy,
1136
1146
  ha as initVerification,
1137
- oe as reasoningOf,
1147
+ de as reasoningOf,
1138
1148
  We as resolveCandidates,
1139
- pe as resolveDataPoint,
1149
+ ge as resolveDataPoint,
1140
1150
  ut as sourceRowLabel,
1141
- ne as useVerification,
1142
- Oe as walkDataPoints
1151
+ ie as useVerification,
1152
+ Te as walkDataPoints
1143
1153
  };