@thehammer/template-verification 0.2.11 → 0.2.13

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,8 +1,8 @@
1
- import { ref as P, watch as K, defineComponent as U, computed as l, openBlock as c, createElementBlock as m, normalizeClass as x, createElementVNode as g, toDisplayString as y, createCommentVNode as _, createBlock as j, unref as f, Fragment as M, renderSlot as te, createTextVNode as ne, withModifiers as G, createVNode as N, withDirectives as re, isRef as ae, vModelCheckbox as le } from "vue";
2
- import { DanxSkeleton as oe, useToast as ie, DanxIcon as se, gearIcon as ue, DanxBadge as ce, DanxProgressBar as de, DanxToastContainer as fe } from "@thehammer/danx-ui";
3
- const C = "tv-chrome", q = "template-verification:enabled";
1
+ import { ref as P, watch as K, defineComponent as U, computed as l, openBlock as u, createElementBlock as g, normalizeClass as y, createElementVNode as p, toDisplayString as w, createCommentVNode as _, createBlock as j, unref as f, Fragment as M, renderSlot as ne, createTextVNode as re, withModifiers as G, createVNode as N, withDirectives as ae, isRef as le, vModelCheckbox as oe } from "vue";
2
+ import { DanxSkeleton as ie, useToast as se, DanxIcon as ue, gearIcon as ce, DanxBadge as de, DanxProgressBar as fe, DanxToastContainer as ve } from "@thehammer/danx-ui";
3
+ const $ = "tv-chrome", q = "template-verification:enabled";
4
4
  let O = null;
5
- function ve(e) {
5
+ function pe(e) {
6
6
  var t;
7
7
  try {
8
8
  return ((t = globalThis.localStorage) == null ? void 0 : t.getItem(e)) ?? null;
@@ -10,22 +10,22 @@ function ve(e) {
10
10
  return null;
11
11
  }
12
12
  }
13
- function pe(e, t) {
13
+ function ge(e, t) {
14
14
  var n;
15
15
  try {
16
16
  (n = globalThis.localStorage) == null || n.setItem(e, t);
17
17
  } catch {
18
18
  }
19
19
  }
20
- function ge(e) {
21
- const t = ve(q);
20
+ function be(e) {
21
+ const t = pe(q);
22
22
  return t === null ? e : t === "true";
23
23
  }
24
24
  function J(e) {
25
- const t = P(ge((e == null ? void 0 : e.defaultEnabled) ?? !1));
25
+ const t = P(be((e == null ? void 0 : e.defaultEnabled) ?? !1));
26
26
  return K(
27
27
  t,
28
- (n) => pe(q, n ? "true" : "false")
28
+ (n) => ge(q, n ? "true" : "false")
29
29
  ), {
30
30
  enabled: t,
31
31
  data: (e == null ? void 0 : e.data) ?? {},
@@ -33,14 +33,14 @@ function J(e) {
33
33
  loading: (e == null ? void 0 : e.loading) ?? !1
34
34
  };
35
35
  }
36
- function me() {
36
+ function he() {
37
37
  return O || (O = J()), O;
38
38
  }
39
- function Ye(e) {
39
+ function qe(e) {
40
40
  O = J(e);
41
41
  }
42
42
  function Q() {
43
- const e = me();
43
+ const e = he();
44
44
  return {
45
45
  enabled: e.enabled,
46
46
  data: e.data,
@@ -51,7 +51,7 @@ function Q() {
51
51
  function W(e) {
52
52
  return typeof e != "number" || Number.isNaN(e) ? "unverifiable" : e <= 2 ? "low" : e === 3 ? "medium" : "high";
53
53
  }
54
- const be = {
54
+ const me = {
55
55
  high: "bg-green-50 text-green-700 ring-1 ring-inset ring-green-600/20",
56
56
  medium: "bg-yellow-50 text-yellow-700 ring-1 ring-inset ring-yellow-600/20",
57
57
  low: "bg-red-50 text-red-700 ring-1 ring-inset ring-red-600/20",
@@ -66,10 +66,10 @@ const be = {
66
66
  unverifiable: "Unverifiable",
67
67
  failed: "Failed"
68
68
  }, X = ["override", "extracted", "claim"];
69
- function he(e) {
70
- return e ? e.resolved && e.resolved.source && e.resolved.source !== "none" ? e.resolved : we(e.candidates) : { value: null, source: "none" };
71
- }
72
69
  function we(e) {
70
+ return e ? e.resolved && e.resolved.source && e.resolved.source !== "none" ? e.resolved : ye(e.candidates) : { value: null, source: "none" };
71
+ }
72
+ function ye(e) {
73
73
  if (e)
74
74
  for (const t of X) {
75
75
  const n = e[t];
@@ -78,44 +78,47 @@ function we(e) {
78
78
  }
79
79
  return { value: null, source: "none" };
80
80
  }
81
- function ye(e) {
82
- return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : xe(e.candidates) : !1;
83
- }
84
81
  function xe(e) {
82
+ return e ? typeof e.discrepancy == "boolean" ? e.discrepancy : _e(e.candidates) : !1;
83
+ }
84
+ function _e(e) {
85
85
  if (!e) return !1;
86
- const t = X.map((n) => e[n]).filter((n) => n != null).map((n) => _e(n.value));
86
+ const t = X.map((n) => e[n]).filter((n) => n != null).map((n) => ke(n.value));
87
87
  return t.length < 2 ? !1 : new Set(t).size > 1;
88
88
  }
89
- function _e(e) {
89
+ function ke(e) {
90
90
  return JSON.stringify(e ?? null);
91
91
  }
92
- function ke(e) {
92
+ function Se(e) {
93
93
  return !!(e != null && e.source_discrepancy);
94
94
  }
95
- const Se = "danxbot-template", Ie = 1, Te = "data-point-activated";
96
- function Ce() {
95
+ function Ie(e) {
96
+ return !!(e != null && e.correction);
97
+ }
98
+ const Ce = "danxbot-template", Te = 1, $e = "data-point-activated";
99
+ function Ae() {
97
100
  if (typeof window > "u") return null;
98
101
  const e = window.location.ancestorOrigins, t = e && e.length > 0 ? e[0] : null;
99
102
  if (t && t !== "null") return t;
100
103
  const n = typeof document > "u" ? "" : document.referrer;
101
104
  if (!n) return null;
102
105
  try {
103
- const u = new URL(n).origin;
104
- return u === "null" ? null : u;
106
+ const c = new URL(n).origin;
107
+ return c === "null" ? null : c;
105
108
  } catch {
106
109
  return null;
107
110
  }
108
111
  }
109
- function Ae(e) {
112
+ function Ee(e) {
110
113
  if (typeof window > "u") return !1;
111
114
  const t = window.parent;
112
115
  if (!t || t === window) return !1;
113
- const n = Ce();
116
+ const n = Ae();
114
117
  if (!n) return !1;
115
- const u = {
116
- source: Se,
117
- version: Ie,
118
- type: Te,
118
+ const c = {
119
+ source: Ce,
120
+ version: Te,
121
+ type: $e,
119
122
  anchor: {
120
123
  object_ids: [...e.anchor.object_ids],
121
124
  field: e.anchor.field,
@@ -125,9 +128,9 @@ function Ae(e) {
125
128
  label: e.label ?? null,
126
129
  value: e.value ?? null
127
130
  };
128
- return t.postMessage(u, n), !0;
131
+ return t.postMessage(c, n), !0;
129
132
  }
130
- const Ee = /* @__PURE__ */ new Set(["name", "type"]);
133
+ const Re = /* @__PURE__ */ new Set(["name", "type"]);
131
134
  function Z(e, t = "") {
132
135
  const n = [];
133
136
  return B(e, t, n), n;
@@ -138,17 +141,17 @@ function B(e, t, n) {
138
141
  return;
139
142
  }
140
143
  if (!H(e)) return;
141
- const p = e.__meta ?? {};
144
+ const b = e.__meta ?? {};
142
145
  for (const [r, i] of Object.entries(e)) {
143
146
  if (r === "__meta") continue;
144
- const h = t ? `${t}.${r}` : r;
147
+ const m = t ? `${t}.${r}` : r;
145
148
  if (Array.isArray(i) || H(i)) {
146
- B(i, h, n);
149
+ B(i, m, n);
147
150
  continue;
148
151
  }
149
- const v = p[r];
150
- !v && Ee.has(r) || n.push({
151
- path: h,
152
+ const v = b[r];
153
+ !v && Re.has(r) || n.push({
154
+ path: m,
152
155
  label: r,
153
156
  meta: v ?? null,
154
157
  value: i,
@@ -165,32 +168,32 @@ function ee(e) {
165
168
  const t = (n = e.candidates.extracted) == null ? void 0 : n.confidence;
166
169
  return e.discrepancy || t == null || t <= 2;
167
170
  }
168
- function $e(e) {
171
+ function Oe(e) {
169
172
  const t = Z(e).filter(
170
173
  (r) => r.meta !== null
171
174
  ), n = t.length;
172
- let u = 0, p = 0;
175
+ let c = 0, b = 0;
173
176
  for (const r of t) {
174
177
  if (r.meta.candidates.override) {
175
- u++;
178
+ c++;
176
179
  continue;
177
180
  }
178
- ee(r.meta) && p++;
181
+ ee(r.meta) && b++;
179
182
  }
180
183
  return {
181
184
  total: n,
182
- verified: u,
183
- needsReview: p,
184
- percent: n === 0 ? 100 : Math.round(u / n * 100)
185
+ verified: c,
186
+ needsReview: b,
187
+ percent: n === 0 ? 100 : Math.round(c / n * 100)
185
188
  };
186
189
  }
187
- const Re = ["data-status", "title"], Oe = {
190
+ const Ve = ["data-status", "title"], De = {
188
191
  class: "tv-confidence-glyph",
189
192
  "aria-hidden": "true"
190
- }, Ve = {
193
+ }, Le = {
191
194
  key: 0,
192
195
  class: "tv-confidence-label"
193
- }, De = /* @__PURE__ */ U({
196
+ }, Ne = /* @__PURE__ */ U({
194
197
  __name: "ConfidenceIcon",
195
198
  props: {
196
199
  confidence: {},
@@ -200,7 +203,7 @@ const Re = ["data-status", "title"], Oe = {
200
203
  setup(e) {
201
204
  const t = e, n = l(
202
205
  () => t.status ?? W(t.confidence)
203
- ), u = {
206
+ ), c = {
204
207
  high: "✔",
205
208
  // check
206
209
  medium: "⚠",
@@ -210,21 +213,25 @@ const Re = ["data-status", "title"], Oe = {
210
213
  unverifiable: "?",
211
214
  failed: "⊗"
212
215
  // circled x — distinct from low's plain x
213
- }, p = l(() => u[n.value]), r = l(() => be[n.value]), i = l(() => V[n.value]);
214
- return (h, v) => (c(), m("span", {
215
- class: x(["tv-confidence-icon inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold leading-none", r.value]),
216
+ }, b = l(() => c[n.value]), r = l(() => me[n.value]), i = l(() => V[n.value]);
217
+ return (m, v) => (u(), g("span", {
218
+ class: y(["tv-confidence-icon inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-[11px] font-semibold leading-none", r.value]),
216
219
  "data-status": n.value,
217
220
  title: i.value
218
221
  }, [
219
- g("span", Oe, y(p.value), 1),
220
- e.showLabel ? (c(), m("span", Ve, y(i.value), 1)) : _("", !0)
221
- ], 10, Re));
222
+ p("span", De, w(b.value), 1),
223
+ e.showLabel ? (u(), g("span", Le, w(i.value), 1)) : _("", !0)
224
+ ], 10, Ve));
222
225
  }
223
- }), Le = ["aria-label", "title"], Ne = {
226
+ }), Pe = { class: "tv-mark-slot" }, je = ["aria-label", "title"], Me = {
224
227
  key: 1,
225
228
  class: "tv-verified-chip inline-flex items-center gap-1 rounded-full bg-green-600 px-2 py-0.5 text-[11px] font-semibold leading-none text-white",
226
229
  "data-status": "verified"
227
- }, Ge = /* @__PURE__ */ U({
230
+ }, Be = {
231
+ key: 3,
232
+ class: "tv-correction-indicator ml-0.5 text-blue-500",
233
+ "aria-hidden": !0
234
+ }, Je = /* @__PURE__ */ U({
228
235
  __name: "VerifiedField",
229
236
  props: {
230
237
  source: {},
@@ -233,123 +240,125 @@ const Re = ["data-status", "title"], Oe = {
233
240
  format: { type: Function }
234
241
  },
235
242
  setup(e) {
236
- const t = e, n = Q(), u = l(() => n.enabled.value), p = l(() => n.loading), r = l(() => {
243
+ const t = e, n = Q(), c = l(() => n.enabled.value), b = l(() => n.loading), r = l(() => {
237
244
  var a;
238
245
  return t.source && t.field ? ((a = t.source.__meta) == null ? void 0 : a[t.field]) ?? null : null;
239
- }), i = l(() => he(r.value)), h = l(() => {
246
+ }), i = l(() => we(r.value)), m = l(() => {
240
247
  if (t.original !== void 0 && t.original !== null)
241
248
  return t.original;
242
249
  if (r.value && i.value.value !== null && i.value.value !== void 0)
243
250
  return i.value.value;
244
251
  if (t.source && t.field) return t.source[t.field];
245
252
  }), v = l(() => {
246
- const a = h.value;
253
+ const a = m.value;
247
254
  return a == null ? "" : typeof t.format == "function" ? t.format(a) : String(a);
248
255
  }), A = l(() => {
249
256
  var s, d;
250
257
  const a = (d = (s = r.value) == null ? void 0 : s.candidates) == null ? void 0 : d.extracted;
251
258
  return (a == null ? void 0 : a.state) === "failed" ? "failed" : W(a == null ? void 0 : a.confidence);
252
- }), b = l(() => ye(r.value)), o = l(() => ke(r.value)), w = l(() => {
259
+ }), h = l(() => xe(r.value)), o = l(() => Se(r.value)), x = l(() => !h.value && Ie(r.value)), k = l(() => {
253
260
  var a, s;
254
261
  return !!((s = (a = r.value) == null ? void 0 : a.candidates) != null && s.override);
255
262
  }), E = l(() => {
256
263
  var s;
257
264
  const a = (s = r.value) == null ? void 0 : s.candidates;
258
265
  return !!(a != null && a.override || a != null && a.extracted || a != null && a.claim);
259
- }), k = l(() => u.value), $ = l(() => {
266
+ }), I = l(() => c.value), R = l(() => {
260
267
  const a = r.value;
261
- return k.value && !!a && ee(a);
262
- }), S = l(() => {
268
+ return I.value && !!a && ee(a);
269
+ }), C = l(() => {
263
270
  var a;
264
271
  return !!((a = r.value) != null && a.anchor);
265
272
  }), T = l(() => {
266
273
  var z, F, Y;
267
- const a = t.field ?? "This value", s = S.value ? " — open in the review panel" : "";
268
- if (w.value) return `${a}: verified by a person${s}`;
269
- const d = (F = (z = r.value) == null ? void 0 : z.candidates) == null ? void 0 : F.extracted, D = A.value, I = [];
270
- D === "failed" ? I.push(V.failed) : (d == null ? void 0 : d.confidence) != null ? I.push(`${V[D]} (${d.confidence}/5)`) : I.push(V[D]);
274
+ const a = t.field ?? "This value", s = C.value ? " — open in the review panel" : "";
275
+ if (k.value) return `${a}: verified by a person${s}`;
276
+ const d = (F = (z = r.value) == null ? void 0 : z.candidates) == null ? void 0 : F.extracted, D = A.value, S = [];
277
+ D === "failed" ? S.push(V.failed) : (d == null ? void 0 : d.confidence) != null ? S.push(`${V[D]} (${d.confidence}/5)`) : S.push(V[D]);
271
278
  const L = (d == null ? void 0 : d.sources_count) ?? ((Y = d == null ? void 0 : d.sources) == null ? void 0 : Y.length) ?? 0;
272
- return L > 0 && I.push(`${L} cited ${L === 1 ? "page" : "pages"}`), b.value && I.push(o.value ? "source document conflict" : "sources disagree"), `${a}: ${I.join(", ")}${s}`;
279
+ return L > 0 && S.push(`${L} cited ${L === 1 ? "page" : "pages"}`), h.value ? S.push(o.value ? "source document conflict" : "sources disagree") : x.value && S.push("value corrected"), `${a}: ${S.join(", ")}${s}`;
273
280
  });
274
- function R() {
281
+ function te() {
275
282
  var s;
276
283
  const a = (s = r.value) == null ? void 0 : s.anchor;
277
- a && Ae({
284
+ a && Ee({
278
285
  anchor: a,
279
286
  workflowInputId: n.workflowInputId,
280
287
  label: t.field ?? null,
281
288
  value: v.value
282
289
  });
283
290
  }
284
- return (a, s) => (c(), m("span", {
285
- class: x(["tv-field", $.value ? "tv-needs-review" : ""])
291
+ return (a, s) => (u(), g("span", {
292
+ class: y(["tv-field", R.value ? "tv-needs-review" : ""])
286
293
  }, [
287
- p.value ? (c(), j(f(oe), {
294
+ b.value ? (u(), j(f(ie), {
288
295
  key: 0,
289
296
  shape: "rounded",
290
297
  class: "tv-field-skeleton inline-block h-[1em] w-16 align-middle"
291
- })) : (c(), m(M, { key: 1 }, [
292
- g("span", {
293
- class: x([
298
+ })) : (u(), g(M, { key: 1 }, [
299
+ p("span", {
300
+ class: y([
294
301
  "tv-field-value",
295
- k.value && !E.value ? "tv-field-unverified border-b border-dotted border-gray-300" : ""
302
+ I.value && !E.value ? "tv-field-unverified border-b border-dotted border-gray-300" : ""
296
303
  ])
297
304
  }, [
298
- te(a.$slots, "default", {
299
- value: h.value,
305
+ ne(a.$slots, "default", {
306
+ value: m.value,
300
307
  formatted: v.value
301
308
  }, () => [
302
- ne(y(v.value), 1)
309
+ re(w(v.value), 1)
303
310
  ])
304
311
  ], 2),
305
- k.value ? (c(), m("button", {
306
- key: 0,
307
- type: "button",
308
- class: x(["tv-overlay", [f(C), S.value ? "cursor-pointer" : "cursor-default"]]),
309
- "aria-label": T.value,
310
- title: T.value,
311
- onClick: s[0] || (s[0] = (d) => S.value ? R() : void 0)
312
- }, [
313
- w.value ? (c(), m("span", Ne, "✔")) : (c(), j(De, {
312
+ p("span", Pe, [
313
+ I.value ? (u(), g("button", {
314
314
  key: 0,
315
- status: A.value
316
- }, null, 8, ["status"])),
317
- b.value && !w.value ? (c(), m("span", {
318
- key: 2,
319
- class: x(["tv-discrepancy-indicator ml-0.5 text-amber-500", o.value ? "tv-source-discrepancy-indicator" : ""]),
320
- "aria-hidden": !0
321
- }, "⚠", 2)) : _("", !0)
322
- ], 10, Le)) : _("", !0)
315
+ type: "button",
316
+ class: y(["tv-overlay", [f($), C.value ? "cursor-pointer" : "cursor-default"]]),
317
+ "aria-label": T.value,
318
+ title: T.value,
319
+ onClick: s[0] || (s[0] = (d) => C.value ? te() : void 0)
320
+ }, [
321
+ k.value ? (u(), g("span", Me, "✔")) : (u(), j(Ne, {
322
+ key: 0,
323
+ status: A.value
324
+ }, null, 8, ["status"])),
325
+ h.value && !k.value ? (u(), g("span", {
326
+ key: 2,
327
+ class: y(["tv-discrepancy-indicator ml-0.5 text-amber-500", o.value ? "tv-source-discrepancy-indicator" : ""]),
328
+ "aria-hidden": !0
329
+ }, "⚠", 2)) : x.value && !k.value ? (u(), g("span", Be, "✎")) : _("", !0)
330
+ ], 10, je)) : _("", !0)
331
+ ])
323
332
  ], 64))
324
333
  ], 2));
325
334
  }
326
- }), Pe = { class: "tv-enable-toggle flex items-center justify-between text-sm font-medium text-gray-700" }, je = { class: "tv-progress-block" }, Me = { class: "mb-1 flex items-baseline justify-between" }, Be = { class: "tv-progress-count text-xs font-semibold text-gray-600" }, Ue = {
335
+ }), Ue = { class: "tv-enable-toggle flex items-center justify-between text-sm font-medium text-gray-700" }, ze = { class: "tv-progress-block" }, Fe = { class: "mb-1 flex items-baseline justify-between" }, Ye = { class: "tv-progress-count text-xs font-semibold text-gray-600" }, Ge = {
327
336
  key: 0,
328
337
  class: "tv-attempts-recorded mt-1 text-[11px] text-gray-400"
329
- }, He = /* @__PURE__ */ U({
338
+ }, Qe = /* @__PURE__ */ U({
330
339
  __name: "VerificationChrome",
331
340
  setup(e) {
332
- const t = Q(), { enabled: n } = t, u = ie(), p = P(!1), r = l(() => $e(t.data)), i = l(
341
+ const t = Q(), { enabled: n } = t, c = se(), b = P(!1), r = l(() => Oe(t.data)), i = l(
333
342
  () => Z(t.data).reduce(
334
- (b, o) => {
335
- var w, E, k, $, S, T, R;
336
- return b + (((k = (E = (w = o.meta) == null ? void 0 : w.candidates) == null ? void 0 : E.extracted) == null ? void 0 : k.history_count) ?? ((R = (T = (S = ($ = o.meta) == null ? void 0 : $.candidates) == null ? void 0 : S.extracted) == null ? void 0 : T.history) == null ? void 0 : R.length) ?? 0);
343
+ (h, o) => {
344
+ var x, k, E, I, R, C, T;
345
+ return h + (((E = (k = (x = o.meta) == null ? void 0 : x.candidates) == null ? void 0 : k.extracted) == null ? void 0 : E.history_count) ?? ((T = (C = (R = (I = o.meta) == null ? void 0 : I.candidates) == null ? void 0 : R.extracted) == null ? void 0 : C.history) == null ? void 0 : T.length) ?? 0);
337
346
  },
338
347
  0
339
348
  )
340
- ), h = P(!1);
349
+ ), m = P(!1);
341
350
  K(
342
351
  () => r.value.percent,
343
- (b) => {
344
- b === 100 && r.value.total > 0 && !h.value && (h.value = !0, u.success("All data points verified 🎯"));
352
+ (h) => {
353
+ h === 100 && r.value.total > 0 && !m.value && (m.value = !0, c.success("All data points verified 🎯"));
345
354
  }
346
355
  );
347
356
  let v = 0;
348
357
  function A() {
349
- const b = document.querySelectorAll(".tv-needs-review");
350
- if (!b.length) return;
351
- v = v % b.length;
352
- const o = b[v];
358
+ const h = document.querySelectorAll(".tv-needs-review");
359
+ if (!h.length) return;
360
+ v = v % h.length;
361
+ const o = h[v];
353
362
  v++, o.scrollIntoView({ behavior: "smooth", block: "center" }), o.animate(
354
363
  [
355
364
  { boxShadow: "0 0 0 0 rgba(245, 158, 11, 0.8)" },
@@ -358,45 +367,45 @@ const Re = ["data-status", "title"], Oe = {
358
367
  { duration: 900, iterations: 2 }
359
368
  );
360
369
  }
361
- return (b, o) => (c(), m(M, null, [
362
- g("button", {
370
+ return (h, o) => (u(), g(M, null, [
371
+ p("button", {
363
372
  type: "button",
364
- class: x(["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", f(C)]),
373
+ class: y(["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", f($)]),
365
374
  title: "Verification",
366
- onClick: o[0] || (o[0] = G((w) => p.value = !p.value, ["stop"]))
375
+ onClick: o[0] || (o[0] = G((x) => b.value = !b.value, ["stop"]))
367
376
  }, [
368
- N(f(se), {
369
- icon: f(ue),
377
+ N(f(ue), {
378
+ icon: f(ce),
370
379
  class: "h-5 w-5"
371
380
  }, null, 8, ["icon"]),
372
- f(n) && r.value.needsReview > 0 ? (c(), j(f(ce), {
381
+ f(n) && r.value.needsReview > 0 ? (u(), j(f(de), {
373
382
  key: 0,
374
383
  value: r.value.needsReview,
375
384
  variant: "warning",
376
385
  class: "tv-needs-review-badge absolute -right-1 -top-1"
377
386
  }, null, 8, ["value"])) : _("", !0)
378
387
  ], 2),
379
- p.value ? (c(), m("div", {
388
+ b.value ? (u(), g("div", {
380
389
  key: 0,
381
- class: x(["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", f(C)])
390
+ class: y(["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", f($)])
382
391
  }, [
383
- g("label", Pe, [
384
- o[2] || (o[2] = g("span", null, "Verification overlay", -1)),
385
- re(g("input", {
386
- "onUpdate:modelValue": o[1] || (o[1] = (w) => ae(n) ? n.value = w : null),
392
+ p("label", Ue, [
393
+ o[2] || (o[2] = p("span", null, "Verification overlay", -1)),
394
+ ae(p("input", {
395
+ "onUpdate:modelValue": o[1] || (o[1] = (x) => le(n) ? n.value = x : null),
387
396
  type: "checkbox",
388
397
  class: "tv-enable-checkbox h-4 w-4 accent-gray-900"
389
398
  }, null, 512), [
390
- [le, f(n)]
399
+ [oe, f(n)]
391
400
  ])
392
401
  ]),
393
- f(n) && r.value.total > 0 ? (c(), m(M, { key: 0 }, [
394
- g("div", je, [
395
- g("div", Me, [
396
- o[3] || (o[3] = g("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Review progress", -1)),
397
- g("span", Be, y(r.value.verified) + " / " + y(r.value.total), 1)
402
+ f(n) && r.value.total > 0 ? (u(), g(M, { key: 0 }, [
403
+ p("div", ze, [
404
+ p("div", Fe, [
405
+ o[3] || (o[3] = p("span", { class: "text-[11px] font-semibold uppercase tracking-wider text-gray-400" }, "Review progress", -1)),
406
+ p("span", Ye, w(r.value.verified) + " / " + w(r.value.total), 1)
398
407
  ]),
399
- N(f(de), {
408
+ N(f(fe), {
400
409
  value: r.value.verified,
401
410
  max: r.value.total,
402
411
  size: "md",
@@ -406,46 +415,46 @@ const Re = ["data-status", "title"], Oe = {
406
415
  glow: r.value.percent === 100,
407
416
  gradient: ""
408
417
  }, null, 8, ["value", "max", "variant", "striped", "animate-stripes", "glow"]),
409
- i.value > 0 ? (c(), m("div", Ue, y(i.value) + " extraction attempt" + y(i.value === 1 ? "" : "s") + " recorded ", 1)) : _("", !0)
418
+ i.value > 0 ? (u(), g("div", Ge, w(i.value) + " extraction attempt" + w(i.value === 1 ? "" : "s") + " recorded ", 1)) : _("", !0)
410
419
  ]),
411
- r.value.needsReview > 0 ? (c(), m("button", {
420
+ r.value.needsReview > 0 ? (u(), g("button", {
412
421
  key: 0,
413
422
  type: "button",
414
- class: x(["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", f(C)]),
423
+ class: y(["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", f($)]),
415
424
  onClick: G(A, ["stop"])
416
425
  }, [
417
- g("span", null, y(r.value.needsReview) + " need" + y(r.value.needsReview === 1 ? "s" : "") + " review", 1),
418
- o[4] || (o[4] = g("span", { "aria-hidden": "true" }, "→", -1))
426
+ p("span", null, w(r.value.needsReview) + " need" + w(r.value.needsReview === 1 ? "s" : "") + " review", 1),
427
+ o[4] || (o[4] = p("span", { "aria-hidden": "true" }, "→", -1))
419
428
  ], 2)) : _("", !0)
420
429
  ], 64)) : _("", !0)
421
430
  ], 2)) : _("", !0),
422
- N(f(fe), {
423
- class: x(f(C))
431
+ N(f(ve), {
432
+ class: y(f($))
424
433
  }, null, 8, ["class"])
425
434
  ], 64));
426
435
  }
427
436
  });
428
437
  export {
429
- C as CHROME_CLASS,
430
- De as ConfidenceIcon,
431
- Te as DATA_POINT_ACTIVATED,
438
+ $ as CHROME_CLASS,
439
+ Ne as ConfidenceIcon,
440
+ $e as DATA_POINT_ACTIVATED,
432
441
  q as ENABLED_STORAGE_KEY,
433
442
  X as RESOLUTION_PRIORITY,
434
- be as STATUS_COLORS,
443
+ me as STATUS_COLORS,
435
444
  V as STATUS_LABELS,
436
- Se as TEMPLATE_MESSAGE_SOURCE,
437
- Ie as TEMPLATE_PROTOCOL_VERSION,
438
- He as VerificationChrome,
439
- Ge as VerifiedField,
445
+ Ce as TEMPLATE_MESSAGE_SOURCE,
446
+ Te as TEMPLATE_PROTOCOL_VERSION,
447
+ Qe as VerificationChrome,
448
+ Je as VerifiedField,
440
449
  W as bucketConfidence,
441
- xe as candidatesDisagree,
442
- $e as computeProgress,
443
- Ce as embedderOrigin,
444
- ye as hasDiscrepancy,
445
- Ye as initVerification,
446
- Ae as notifyDataPointActivated,
447
- we as resolveCandidates,
448
- he as resolveDataPoint,
450
+ _e as candidatesDisagree,
451
+ Oe as computeProgress,
452
+ Ae as embedderOrigin,
453
+ xe as hasDiscrepancy,
454
+ qe as initVerification,
455
+ Ee as notifyDataPointActivated,
456
+ ye as resolveCandidates,
457
+ we as resolveDataPoint,
449
458
  Q as useVerification,
450
459
  Z as walkDataPoints
451
460
  };