@yuwenovo/ocr-result-view 2.1.0 → 2.2.0

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.
@@ -61,13 +61,13 @@ function ae(e, t) {
61
61
  var k = d({
62
62
  name: "lucide-plus",
63
63
  render: ae
64
- }), A = {
64
+ }), oe = {
65
65
  viewBox: "0 0 24 24",
66
66
  width: "1.2em",
67
67
  height: "1.2em"
68
68
  };
69
- function j(e, t) {
70
- return g(), i("svg", A, [...t[0] ||= [a("path", {
69
+ function se(e, t) {
70
+ return g(), i("svg", oe, [...t[0] ||= [a("path", {
71
71
  fill: "none",
72
72
  stroke: "currentColor",
73
73
  "stroke-linecap": "round",
@@ -76,16 +76,16 @@ function j(e, t) {
76
76
  d: "M5 12h14"
77
77
  }, null, -1)]]);
78
78
  }
79
- var oe = d({
79
+ var A = d({
80
80
  name: "lucide-minus",
81
- render: j
82
- }), M = {
81
+ render: se
82
+ }), j = {
83
83
  viewBox: "0 0 24 24",
84
84
  width: "1.2em",
85
85
  height: "1.2em"
86
86
  };
87
- function N(e, t) {
88
- return g(), i("svg", M, [...t[0] ||= [a("path", {
87
+ function M(e, t) {
88
+ return g(), i("svg", j, [...t[0] ||= [a("path", {
89
89
  fill: "none",
90
90
  stroke: "currentColor",
91
91
  "stroke-linecap": "round",
@@ -94,28 +94,28 @@ function N(e, t) {
94
94
  d: "M8 3L4 7l4 4M4 7h16m-4 14l4-4l-4-4m4 4H4"
95
95
  }, null, -1)]]);
96
96
  }
97
- var se = d({
97
+ var ce = d({
98
98
  name: "lucide-arrow-left-right",
99
- render: N
100
- }), ce = { class: "diff-cards" }, le = { class: "card-heading" }, ue = [
99
+ render: M
100
+ }), N = ["data-diff-index"], P = { class: "card-heading" }, le = [
101
101
  "aria-label",
102
102
  "aria-pressed",
103
103
  "onClick"
104
- ], de = {
104
+ ], ue = {
105
105
  class: "type-icon",
106
106
  "aria-hidden": "true"
107
- }, P = { class: "card-type" }, F = { class: "card-number" }, fe = {
107
+ }, de = { class: "card-type" }, fe = { class: "card-number" }, pe = {
108
108
  key: 0,
109
109
  class: "ignored-label"
110
- }, I = [
110
+ }, F = [
111
111
  "disabled",
112
112
  "title",
113
113
  "aria-label",
114
114
  "onClick"
115
- ], L = ["onClick"], pe = { class: "text-row" }, me = { class: "card-text" }, he = { class: "text-row" }, ge = { class: "card-text" }, _e = {
115
+ ], I = ["onClick"], me = { class: "text-row" }, L = { class: "card-text" }, R = { class: "text-row" }, he = { class: "card-text" }, ge = {
116
116
  key: 1,
117
117
  class: "text-row text-row--single"
118
- }, ve = { class: "card-text" }, R = { class: "card-location" }, ye = /*@__PURE__*/ l({
118
+ }, _e = { class: "card-text" }, ve = { class: "card-location" }, ye = /*@__PURE__*/ l({
119
119
  __name: "DiffCards",
120
120
  props: {
121
121
  diffDetail: {},
@@ -126,8 +126,8 @@ var se = d({
126
126
  activeTab: {}
127
127
  },
128
128
  emits: ["select", "ignore"],
129
- setup(o, { emit: s }) {
130
- let c = o, l = s, u = {
129
+ setup(o, { expose: s, emit: c }) {
130
+ let l = o, u = c, d = {
131
131
  table_insert: "新增表格",
132
132
  table_delete: "删除表格",
133
133
  row_insert: "新增表格行",
@@ -141,15 +141,24 @@ var se = d({
141
141
  cell_split: "拆分单元格",
142
142
  cell_span_modify: "单元格跨度修改"
143
143
  };
144
- function d(e, t) {
145
- return e.domain === "table" && e.tableChange ? u[e.tableChange] : t;
144
+ function f(e, t) {
145
+ return e.domain === "table" && e.tableChange ? d[e.tableChange] : t;
146
146
  }
147
- let f = t(() => ne(c.diffDetail, c.activeTab ?? "all", c.reviewFilter));
148
- function m(e) {
147
+ let m = t(() => ne(l.diffDetail, l.activeTab ?? "all", l.reviewFilter)), h = _(null);
148
+ function ee(e) {
149
+ let t = h.value, n = t?.querySelector(`[data-diff-index="${e}"]`);
150
+ if (!t || !n || t.clientHeight <= 0) return;
151
+ let r = t.getBoundingClientRect(), i = n.getBoundingClientRect(), a = r.top + t.clientTop + 12, o = r.top + t.clientTop + t.clientHeight - 12;
152
+ if (i.top >= a && i.bottom <= o) return;
153
+ let s = i.height > o - a || i.top < a ? i.top - a : i.bottom - o;
154
+ t.scrollTop += s;
155
+ }
156
+ s({ scrollToCard: ee });
157
+ function te(e) {
149
158
  let t = e.type !== "insert", n = (t ? e.srcPage : e.tgtPage) + 1, r = t ? e.sourceLine : e.targetLine;
150
159
  return `第 ${n} 页${e.domain === "table" || r < 0 ? "" : ` · ${t ? "标准" : "比对"}第 ${r + 1} 行`}`;
151
160
  }
152
- function h(e, t) {
161
+ function S(e, t) {
153
162
  let n = [...e];
154
163
  if (t === void 0) return [{
155
164
  text: e,
@@ -174,68 +183,73 @@ var se = d({
174
183
  changed: !1
175
184
  }), i;
176
185
  }
177
- return (t, s) => (g(), i("div", ce, [(g(!0), i(e, null, v(f.value, (u) => (g(), i("article", {
178
- key: u.data.diffId,
179
- class: p(["diff-card", [`diff-card--${u.type}`, {
180
- "is-active": o.activeIndex === u.idx,
181
- "is-ignored": u.data.ignored
186
+ return (t, s) => (g(), i("div", {
187
+ ref_key: "cardsRef",
188
+ ref: h,
189
+ class: "diff-cards"
190
+ }, [(g(!0), i(e, null, v(m.value, (c) => (g(), i("article", {
191
+ key: c.data.diffId,
192
+ "data-diff-index": c.idx,
193
+ class: p(["diff-card", [`diff-card--${c.type}`, {
194
+ "is-active": o.activeIndex === c.idx,
195
+ "is-ignored": c.data.ignored
182
196
  }]])
183
197
  }, [y(t.$slots, "default", {
184
- item: u.data,
185
- index: u.idx,
186
- active: o.activeIndex === u.idx,
187
- select: () => l("select", u.idx),
198
+ item: c.data,
199
+ index: c.idx,
200
+ active: o.activeIndex === c.idx,
201
+ select: () => u("select", c.idx),
188
202
  ignore: (e) => {
189
- !c.readonly && !o.busy && l("ignore", u.data.diffId, e);
203
+ !l.readonly && !o.busy && u("ignore", c.data.diffId, e);
190
204
  }
191
- }, () => [a("div", le, [
205
+ }, () => [a("div", P, [
192
206
  a("button", {
193
207
  class: "card-select",
194
- "aria-label": `定位第 ${u.idx + 1} 处差异,${m(u.data)}`,
195
- "aria-pressed": o.activeIndex === u.idx,
196
- onClick: (e) => l("select", u.idx)
208
+ "aria-label": `定位第 ${c.idx + 1} 处差异,${te(c.data)}`,
209
+ "aria-pressed": o.activeIndex === c.idx,
210
+ onClick: (e) => u("select", c.idx)
197
211
  }, [
198
- a("span", de, [u.type === "insert" ? (g(), n(x(k), { key: 0 })) : u.type === "delete" ? (g(), n(x(oe), { key: 1 })) : (g(), n(x(se), { key: 2 }))]),
199
- a("span", P, b(d(u.data, u.type === "modify" ? "修改" : u.type === "delete" ? "删除" : "新增")), 1),
200
- a("span", F, b(String(u.idx + 1).padStart(2, "0")), 1)
201
- ], 8, ue),
202
- u.data.ignored ? (g(), i("span", fe, "已忽略")) : r("", !0),
203
- c.readonly ? r("", !0) : (g(), i("button", {
212
+ a("span", ue, [c.type === "insert" ? (g(), n(x(k), { key: 0 })) : c.type === "delete" ? (g(), n(x(A), { key: 1 })) : (g(), n(x(ce), { key: 2 }))]),
213
+ a("span", de, b(f(c.data, c.type === "modify" ? "修改" : c.type === "delete" ? "删除" : "新增")), 1),
214
+ a("span", fe, b(String(c.idx + 1).padStart(2, "0")), 1)
215
+ ], 8, le),
216
+ c.data.ignored ? (g(), i("span", pe, "已忽略")) : r("", !0),
217
+ l.readonly ? r("", !0) : (g(), i("button", {
204
218
  key: 1,
205
219
  class: "card-action",
206
220
  disabled: o.busy,
207
- title: u.data.ignored ? "撤销忽略" : "忽略此差异",
208
- "aria-label": `${u.data.ignored ? "撤销忽略" : "忽略"}第 ${u.idx + 1} 处差异`,
209
- onClick: (e) => l("ignore", u.data.diffId, !u.data.ignored)
210
- }, [u.data.ignored ? (g(), n(x(ie), {
221
+ title: c.data.ignored ? "撤销忽略" : "忽略此差异",
222
+ "aria-label": `${c.data.ignored ? "撤销忽略" : "忽略"}第 ${c.idx + 1} 处差异`,
223
+ onClick: (e) => u("ignore", c.data.diffId, !c.data.ignored)
224
+ }, [c.data.ignored ? (g(), n(x(ie), {
211
225
  key: 0,
212
226
  "aria-hidden": "true"
213
227
  })) : (g(), n(x(re), {
214
228
  key: 1,
215
229
  "aria-hidden": "true"
216
- }))], 8, I))
230
+ }))], 8, F))
217
231
  ]), a("div", {
218
232
  class: "card-content",
219
- onClick: (e) => l("select", u.idx)
220
- }, [u.data.type === "modify" ? (g(), i(e, { key: 0 }, [a("div", pe, [s[0] ||= a("span", { class: "text-label" }, "标准", -1), a("span", me, [(g(!0), i(e, null, v(h(u.data.delChars, u.data.sourceChangeRanges), (e, t) => (g(), i("span", {
233
+ onClick: (e) => u("select", c.idx)
234
+ }, [c.data.type === "modify" ? (g(), i(e, { key: 0 }, [a("div", me, [s[0] ||= a("span", { class: "text-label" }, "标准", -1), a("span", L, [(g(!0), i(e, null, v(S(c.data.delChars, c.data.sourceChangeRanges), (e, t) => (g(), i("span", {
221
235
  key: t,
222
236
  class: p({ "change-mark": e.changed })
223
- }, b(e.text), 3))), 128))])]), a("div", he, [s[1] ||= a("span", { class: "text-label" }, "比对", -1), a("span", ge, [(g(!0), i(e, null, v(h(u.data.insChars, u.data.targetChangeRanges), (e, t) => (g(), i("span", {
237
+ }, b(e.text), 3))), 128))])]), a("div", R, [s[1] ||= a("span", { class: "text-label" }, "比对", -1), a("span", he, [(g(!0), i(e, null, v(S(c.data.insChars, c.data.targetChangeRanges), (e, t) => (g(), i("span", {
224
238
  key: t,
225
239
  class: p({ "change-mark": e.changed })
226
- }, b(e.text), 3))), 128))])])], 64)) : (g(), i("div", _e, [a("span", ve, b(u.data.chars || "表格结构变更"), 1)])), a("p", R, b(m(u.data)), 1)], 8, L)], !0)], 2))), 128))]));
240
+ }, b(e.text), 3))), 128))])])], 64)) : (g(), i("div", ge, [a("span", _e, b(c.data.chars || "表格结构变更"), 1)])), a("p", ve, b(te(c.data)), 1)], 8, I)], !0)], 10, N))), 128))], 512));
227
241
  }
228
242
  }), z = (e, t) => {
229
243
  let n = e.__vccOpts || e;
230
244
  for (let [e, r] of t) n[e] = r;
231
245
  return n;
232
- }, be = /*#__PURE__*/ z(ye, [["__scopeId", "data-v-61738111"]]), xe = {
246
+ }, be = /*#__PURE__*/ z(ye, [["__scopeId", "data-v-7344a999"]]), B = {
233
247
  viewBox: "0 0 24 24",
234
248
  width: "1.2em",
235
249
  height: "1.2em"
236
250
  };
237
- function Se(e, t) {
238
- return g(), i("svg", xe, [...t[0] ||= [a("path", {
251
+ function xe(e, t) {
252
+ return g(), i("svg", B, [...t[0] ||= [a("path", {
239
253
  fill: "none",
240
254
  stroke: "currentColor",
241
255
  "stroke-linecap": "round",
@@ -244,16 +258,16 @@ function Se(e, t) {
244
258
  d: "M20 6L9 17l-5-5"
245
259
  }, null, -1)]]);
246
260
  }
247
- var Ce = d({
261
+ var Se = d({
248
262
  name: "lucide-check",
249
- render: Se
250
- }), B = {
263
+ render: xe
264
+ }), Ce = {
251
265
  viewBox: "0 0 24 24",
252
266
  width: "1.2em",
253
267
  height: "1.2em"
254
268
  };
255
- function V(e, t) {
256
- return g(), i("svg", B, [...t[0] ||= [a("path", {
269
+ function we(e, t) {
270
+ return g(), i("svg", Ce, [...t[0] ||= [a("path", {
257
271
  fill: "none",
258
272
  stroke: "currentColor",
259
273
  "stroke-linecap": "round",
@@ -262,16 +276,16 @@ function V(e, t) {
262
276
  d: "M2 5h20M6 12h12m-9 7h6"
263
277
  }, null, -1)]]);
264
278
  }
265
- var we = d({
279
+ var Te = d({
266
280
  name: "lucide-list-filter",
267
- render: V
268
- }), H = {
281
+ render: we
282
+ }), Ee = {
269
283
  viewBox: "0 0 24 24",
270
284
  width: "1.2em",
271
285
  height: "1.2em"
272
286
  };
273
- function U(e, t) {
274
- return g(), i("svg", H, [...t[0] ||= [a("path", {
287
+ function V(e, t) {
288
+ return g(), i("svg", Ee, [...t[0] ||= [a("path", {
275
289
  fill: "none",
276
290
  stroke: "currentColor",
277
291
  "stroke-linecap": "round",
@@ -280,16 +294,16 @@ function U(e, t) {
280
294
  d: "m11 17l-5-5l5-5m7 10l-5-5l5-5"
281
295
  }, null, -1)]]);
282
296
  }
283
- var Te = d({
297
+ var De = d({
284
298
  name: "lucide-chevrons-left",
285
- render: U
286
- }), W = {
299
+ render: V
300
+ }), H = {
287
301
  viewBox: "0 0 24 24",
288
302
  width: "1.2em",
289
303
  height: "1.2em"
290
304
  };
291
- function G(e, t) {
292
- return g(), i("svg", W, [...t[0] ||= [a("path", {
305
+ function U(e, t) {
306
+ return g(), i("svg", H, [...t[0] ||= [a("path", {
293
307
  fill: "none",
294
308
  stroke: "currentColor",
295
309
  "stroke-linecap": "round",
@@ -298,16 +312,16 @@ function G(e, t) {
298
312
  d: "m15 18l-6-6l6-6"
299
313
  }, null, -1)]]);
300
314
  }
301
- var Ee = d({
315
+ var Oe = d({
302
316
  name: "lucide-chevron-left",
303
- render: G
304
- }), De = {
317
+ render: U
318
+ }), ke = {
305
319
  viewBox: "0 0 24 24",
306
320
  width: "1.2em",
307
321
  height: "1.2em"
308
322
  };
309
- function Oe(e, t) {
310
- return g(), i("svg", De, [...t[0] ||= [a("path", {
323
+ function W(e, t) {
324
+ return g(), i("svg", ke, [...t[0] ||= [a("path", {
311
325
  fill: "none",
312
326
  stroke: "currentColor",
313
327
  "stroke-linecap": "round",
@@ -316,16 +330,16 @@ function Oe(e, t) {
316
330
  d: "m9 18l6-6l-6-6"
317
331
  }, null, -1)]]);
318
332
  }
319
- var ke = d({
333
+ var Ae = d({
320
334
  name: "lucide-chevron-right",
321
- render: Oe
322
- }), Ae = {
335
+ render: W
336
+ }), G = {
323
337
  viewBox: "0 0 24 24",
324
338
  width: "1.2em",
325
339
  height: "1.2em"
326
340
  };
327
- function K(e, t) {
328
- return g(), i("svg", Ae, [...t[0] ||= [a("path", {
341
+ function je(e, t) {
342
+ return g(), i("svg", G, [...t[0] ||= [a("path", {
329
343
  fill: "none",
330
344
  stroke: "currentColor",
331
345
  "stroke-linecap": "round",
@@ -334,32 +348,35 @@ function K(e, t) {
334
348
  d: "m6 17l5-5l-5-5m7 10l5-5l-5-5"
335
349
  }, null, -1)]]);
336
350
  }
337
- var je = d({
351
+ var Me = d({
338
352
  name: "lucide-chevrons-right",
339
- render: K
340
- }), Me = { class: "ocr-result-view" }, Ne = { class: "ocr-diff-viewer" }, Pe = { class: "viewer-main" }, Fe = { class: "canvas-col" }, Ie = {
353
+ render: je
354
+ }), Ne = { class: "ocr-result-view" }, Pe = { class: "ocr-diff-viewer" }, Fe = { class: "viewer-main" }, Ie = {
355
+ key: 0,
356
+ class: "preview-toolbar"
357
+ }, Le = ["aria-checked"], Re = { class: "canvas-col" }, ze = {
341
358
  key: 0,
342
359
  class: "canvas-info-bar"
343
- }, Le = { class: "canvas-info-bar-left" }, Re = { class: "canvas-info-bar-left-filename" }, ze = { class: "canvas-info-bar-right" }, Be = ["disabled"], Ve = ["disabled"], He = { class: "page-num" }, Ue = ["disabled"], We = ["disabled"], Ge = { class: "canvas-col" }, Ke = {
360
+ }, Be = { class: "canvas-info-bar-left" }, Ve = { class: "canvas-info-bar-left-filename" }, He = { class: "canvas-info-bar-right" }, Ue = ["disabled"], We = ["disabled"], Ge = { class: "page-num" }, Ke = ["disabled"], qe = ["disabled"], Je = { class: "canvas-col" }, Ye = {
344
361
  key: 0,
345
362
  class: "canvas-info-bar"
346
- }, qe = { class: "canvas-info-bar-left" }, Je = { class: "canvas-info-bar-left-filename" }, Ye = { class: "canvas-info-bar-right" }, Xe = ["disabled"], Ze = ["disabled"], Qe = { class: "page-num" }, $e = ["disabled"], et = ["disabled"], tt = {
347
- key: 1,
363
+ }, Xe = { class: "canvas-info-bar-left" }, Ze = { class: "canvas-info-bar-left-filename" }, Qe = { class: "canvas-info-bar-right" }, $e = ["disabled"], et = ["disabled"], tt = { class: "page-num" }, nt = ["disabled"], rt = ["disabled"], it = {
364
+ key: 2,
348
365
  class: "page-loading"
349
- }, nt = {
366
+ }, at = {
350
367
  class: "side-panel",
351
368
  "aria-label": "差异审阅"
352
- }, rt = { class: "review-header" }, it = { class: "review-title-row" }, at = { class: "review-total" }, ot = {
369
+ }, ot = { class: "review-header" }, st = { class: "review-title-row" }, ct = { class: "review-total" }, lt = {
353
370
  class: "review-segments",
354
371
  "aria-label": "差异处理状态"
355
- }, st = ["aria-pressed", "onClick"], ct = { key: 0 }, lt = {
372
+ }, ut = ["aria-pressed", "onClick"], dt = { key: 0 }, ft = {
356
373
  class: "review-types",
357
374
  "aria-label": "差异类型"
358
- }, ut = ["aria-pressed", "onClick"], dt = {
375
+ }, pt = ["aria-pressed", "onClick"], mt = {
359
376
  key: 0,
360
377
  class: "review-empty",
361
378
  role: "status"
362
- }, ft = { class: "empty-symbol is-passed" }, pt = { class: "empty-symbol" }, mt = ["aria-busy"], ht = ["disabled"], gt = { key: 0 }, _t = ["disabled"], vt = 5, yt = 16, bt = 4, xt = /*#__PURE__*/ z(/* @__PURE__ */ l({
379
+ }, ht = { class: "empty-symbol is-passed" }, gt = { class: "empty-symbol" }, _t = ["aria-busy"], vt = ["disabled"], yt = { key: 0 }, bt = ["disabled"], xt = 5, St = 16, Ct = 4, wt = /*#__PURE__*/ z(/* @__PURE__ */ l({
363
380
  __name: "OcrDiffViewer",
364
381
  props: {
365
382
  diffDetail: {},
@@ -387,7 +404,10 @@ var je = d({
387
404
  "image-error"
388
405
  ],
389
406
  setup(l, { expose: d, emit: p }) {
390
- let w = l, T = p, E = t(() => w.review), D = _("pending"), O = t(() => ne(w.diffDetail, j.value, D.value)), ae = t(() => new Set(O.value.map((e) => e.idx))), k = t(() => {
407
+ let w = l, T = p, E = t(() => w.review), D = _("pending"), O = t(() => ne(w.diffDetail, M.value, D.value)), ae = t(() => new Set(O.value.map((e) => e.idx))), k = _(!1), oe = "src", se = {
408
+ src: null,
409
+ tgt: null
410
+ }, A = t(() => {
391
411
  let e = [], t = [], n = 0, r = 0, i = 0;
392
412
  for (let a = 0; a < w.diffDetail.length; a++) {
393
413
  let o = w.diffDetail[a];
@@ -472,13 +492,13 @@ var je = d({
472
492
  insertCount: r,
473
493
  modifyCount: i
474
494
  };
475
- }), A = _(0), j = _("all"), oe = t(() => ({
476
- all: k.value.deleteCount + k.value.insertCount + k.value.modifyCount,
477
- modify: k.value.modifyCount,
478
- delete: k.value.deleteCount,
479
- insert: k.value.insertCount
480
- })), M = _(0), N = _(0), se = _(), ce = _(), le = _(), ue = _(), de = _(), P = _(), F = _(), fe = _(), I = _([]), L = _([]), pe = _(1), me = _(1), he = _(1), ge = _(1), _e = Math.SQRT2, ve = /* @__PURE__ */ new Map(), R = /* @__PURE__ */ new Map(), ye = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Set(), xe = [], Se = [], B = 0, V = 0, H = 0, U = 0, W = 0, G = null, De = !1, Oe = !1, Ae, K = !1, xt = [];
481
- function St(e) {
495
+ }), j = _(0), M = _("all"), ce = t(() => ({
496
+ all: A.value.deleteCount + A.value.insertCount + A.value.modifyCount,
497
+ modify: A.value.modifyCount,
498
+ delete: A.value.deleteCount,
499
+ insert: A.value.insertCount
500
+ })), N = _(0), P = _(0), le = _(), ue = _(), de = _(), fe = _(), pe = _(), F = _(), I = _(), me = _(), L = _([]), R = _([]), he = _(1), ge = _(1), _e = _(1), ve = _(1), ye = Math.SQRT2, z = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map(), xe = /* @__PURE__ */ new Map(), Ce = /* @__PURE__ */ new Set(), we = [], Ee = [], V = 0, H = 0, U = 0, ke = 0, W = 0, G = null, je = !1, wt = !1, Tt, K = !1, Et = [];
501
+ function Dt(e) {
482
502
  let t = /* @__PURE__ */ new Map();
483
503
  for (let n of e) {
484
504
  let e = t.get(n.pageIndex);
@@ -486,34 +506,34 @@ var je = d({
486
506
  }
487
507
  return t;
488
508
  }
489
- let Ct = t(() => St(k.value.srcBoxes)), wt = t(() => St(k.value.tgtBoxes));
509
+ let Ot = t(() => Dt(A.value.srcBoxes)), kt = t(() => Dt(A.value.tgtBoxes));
490
510
  function q(e) {
491
511
  return e === "src" ? w.sourcePages : w.targetPages;
492
512
  }
493
513
  function J(e) {
494
- return e === "src" ? I.value : L.value;
514
+ return e === "src" ? L.value : R.value;
495
515
  }
496
516
  function Y(e) {
497
- return e === "src" ? P.value : F.value;
517
+ return e === "src" ? F.value : I.value;
498
518
  }
499
- function Tt(e) {
500
- return e === "src" ? ce.value : le.value;
501
- }
502
- function Et(e) {
519
+ function At(e) {
503
520
  return e === "src" ? ue.value : de.value;
504
521
  }
505
- function Dt(e) {
506
- let t = ve.get(e.imageUrl);
522
+ function jt(e) {
523
+ return e === "src" ? fe.value : pe.value;
524
+ }
525
+ function Mt(e) {
526
+ let t = z.get(e.imageUrl);
507
527
  if (t) return t;
508
528
  if (e.width && e.height) return {
509
529
  width: e.width,
510
530
  height: e.height
511
531
  };
512
532
  }
513
- function Ot(e, t) {
514
- let n = e.map(Dt).find(Boolean), r = n ? n.height / n.width : _e, i = [], a = 0;
533
+ function Nt(e, t) {
534
+ let n = e.map(Mt).find(Boolean), r = n ? n.height / n.width : ye, i = [], a = 0;
515
535
  for (let n of e) {
516
- let e = Dt(n), o = e ? e.height / e.width : r, s = Math.max(1, Math.round(t * o));
536
+ let e = Mt(n), o = e ? e.height / e.width : r, s = Math.max(1, Math.round(t * o));
517
537
  i.push({
518
538
  top: a,
519
539
  width: t,
@@ -521,17 +541,17 @@ var je = d({
521
541
  naturalWidth: e?.width ?? t,
522
542
  naturalHeight: e?.height ?? s,
523
543
  measured: !!e
524
- }), a += s + vt;
544
+ }), a += s + xt;
525
545
  }
526
546
  return i;
527
547
  }
528
- function kt(e, t) {
548
+ function Pt(e, t) {
529
549
  if (e.length === 0) return 0;
530
550
  let n = 0, r = e.length - 1;
531
551
  for (; n <= r;) {
532
552
  let i = Math.floor((n + r) / 2), a = e[i];
533
553
  if (t < a.top) r = i - 1;
534
- else if (t >= a.top + a.height + vt) n = i + 1;
554
+ else if (t >= a.top + a.height + xt) n = i + 1;
535
555
  else return i;
536
556
  }
537
557
  return Math.max(0, Math.min(e.length - 1, n));
@@ -539,104 +559,104 @@ var je = d({
539
559
  function X(e, t = !1) {
540
560
  let n = Y(e);
541
561
  if (!n || n.clientWidth <= 0) return;
542
- let r = J(e), i = n.scrollTop, a = r.length > 0 ? kt(r, i) : 0, o = r[a], s = o ? Math.max(0, Math.min(1, (i - o.top) / o.height)) : 0, c = Ot(q(e), n.clientWidth), l = c.length > 0 ? c[c.length - 1].top + c[c.length - 1].height : 1;
543
- if (e === "src" ? (I.value = c, pe.value = l, he.value = Math.max(1, n.clientHeight)) : (L.value = c, me.value = l, ge.value = Math.max(1, n.clientHeight)), t && o && c[a]) {
544
- let e = c[a].top + c[a].height * s;
562
+ let r = J(e), i = n.scrollTop, a = r.length > 0 ? Pt(r, i) : 0, o = r[a], s = o ? Math.max(0, Math.min(1, (i - o.top) / o.height)) : 0, c = Nt(q(e), n.clientWidth), l = c.length > 0 ? c[c.length - 1].top + c[c.length - 1].height : 1;
563
+ if (e === "src" ? (L.value = c, he.value = l, _e.value = Math.max(1, n.clientHeight)) : (R.value = c, ge.value = l, ve.value = Math.max(1, n.clientHeight)), t && o && c[a]) {
564
+ let t = c[a].top + c[a].height * s;
545
565
  f(() => {
546
- n.scrollTop = e;
566
+ Yt(e, t);
547
567
  });
548
568
  }
549
569
  Q(e);
550
570
  }
551
- function At() {
552
- for (; V < bt && xt.length > 0;) xt.shift()?.();
571
+ function Ft() {
572
+ for (; H < Ct && Et.length > 0;) Et.shift()?.();
553
573
  }
554
- function jt(e) {
574
+ function It(e) {
555
575
  for (let t of ["src", "tgt"]) {
556
- let n = q(t), r = It(t);
576
+ let n = q(t), r = Vt(t);
557
577
  if (r) {
558
578
  let t = Math.max(0, r.start - 1), i = Math.min(n.length - 1, r.end + 1);
559
579
  for (let r = t; r <= i; r++) if (n[r]?.imageUrl === e) return !0;
560
580
  }
561
581
  }
562
- let t = w.diffDetail[A.value];
582
+ let t = w.diffDetail[j.value];
563
583
  return !(!t || w.sourcePages[t.srcPage]?.imageUrl !== e && w.targetPages[t.tgtPage]?.imageUrl !== e);
564
584
  }
565
- function Mt(e) {
585
+ function Lt(e) {
566
586
  return new Promise((t, n) => {
567
- xt.push(() => {
568
- if (!jt(e)) {
587
+ Et.push(() => {
588
+ if (!It(e)) {
569
589
  let t = /* @__PURE__ */ Error(`已取消非可见页面加载: ${e}`);
570
590
  t.name = "AbortError", n(t);
571
591
  return;
572
592
  }
573
- if (V++, w.imageLoader) {
593
+ if (H++, w.imageLoader) {
574
594
  Promise.resolve().then(() => w.imageLoader(e)).then(t, (t) => {
575
595
  K || T("image-error", e), n(t);
576
596
  }).finally(() => {
577
- V--, At();
597
+ H--, Ft();
578
598
  });
579
599
  return;
580
600
  }
581
601
  let r = new Image();
582
602
  w.imageCrossOrigin !== null && (r.crossOrigin = w.imageCrossOrigin), r.onload = () => {
583
- r.onload = null, r.onerror = null, V--, At(), t(r);
603
+ r.onload = null, r.onerror = null, H--, Ft(), t(r);
584
604
  }, r.onerror = () => {
585
- r.onload = null, r.onerror = null, V--, At(), K || T("image-error", e), n(/* @__PURE__ */ Error(`图片加载失败: ${e}`));
605
+ r.onload = null, r.onerror = null, H--, Ft(), K || T("image-error", e), n(/* @__PURE__ */ Error(`图片加载失败: ${e}`));
586
606
  }, r.src = e;
587
- }), At();
607
+ }), Ft();
588
608
  });
589
609
  }
590
- function Nt(e) {
591
- let t = R.get(e);
592
- if (t?.image) return t.lastUsed = ++B, Promise.resolve(t.image);
610
+ function Rt(e) {
611
+ let t = B.get(e);
612
+ if (t?.image) return t.lastUsed = ++V, Promise.resolve(t.image);
593
613
  if (t?.promise) return t.promise;
594
- if (z.has(e)) return Promise.reject(/* @__PURE__ */ Error(`图片加载失败: ${e}`));
595
- let n = { lastUsed: ++B };
596
- return n.promise = Mt(e).then((e) => (n.image = e, n.promise = void 0, n.lastUsed = ++B, e)).catch((t) => {
597
- throw R.delete(e), t instanceof Error && t.name !== "AbortError" && z.add(e), t;
598
- }), R.set(e, n), n.promise;
614
+ if (Ce.has(e)) return Promise.reject(/* @__PURE__ */ Error(`图片加载失败: ${e}`));
615
+ let n = { lastUsed: ++V };
616
+ return n.promise = Lt(e).then((e) => (n.image = e, n.promise = void 0, n.lastUsed = ++V, e)).catch((t) => {
617
+ throw B.delete(e), t instanceof Error && t.name !== "AbortError" && Ce.add(e), t;
618
+ }), B.set(e, n), n.promise;
599
619
  }
600
- function Pt() {
601
- let e = [...R.entries()].filter(([, e]) => e.image).sort((e, t) => e[1].lastUsed - t[1].lastUsed);
602
- for (; R.size > yt && e.length > 0;) {
620
+ function zt() {
621
+ let e = [...B.entries()].filter(([, e]) => e.image).sort((e, t) => e[1].lastUsed - t[1].lastUsed);
622
+ for (; B.size > St && e.length > 0;) {
603
623
  let [t, n] = e.shift();
604
- n.image.src = "", R.delete(t);
624
+ n.image.src = "", B.delete(t);
605
625
  }
606
626
  }
607
- function Ft(e, t) {
627
+ function Bt(e, t) {
608
628
  let n = q(e)[t];
609
629
  if (!n) return Promise.resolve();
610
- let r = R.get(n.imageUrl)?.image, i = ve.get(n.imageUrl);
611
- if (r && i) return R.get(n.imageUrl).lastUsed = ++B, Promise.resolve();
612
- let a = `${e}:${t}:${n.imageUrl}`, o = ye.get(a);
630
+ let r = B.get(n.imageUrl)?.image, i = z.get(n.imageUrl);
631
+ if (r && i) return B.get(n.imageUrl).lastUsed = ++V, Promise.resolve();
632
+ let a = `${e}:${t}:${n.imageUrl}`, o = xe.get(a);
613
633
  if (o) return o;
614
- let s = Nt(n.imageUrl).then((r) => {
634
+ let s = Rt(n.imageUrl).then((r) => {
615
635
  if (K || q(e)[t]?.imageUrl !== n.imageUrl) return;
616
- let i = ve.get(n.imageUrl), a = i?.width !== r.naturalWidth || i?.height !== r.naturalHeight;
617
- ve.set(n.imageUrl, {
636
+ let i = z.get(n.imageUrl), a = i?.width !== r.naturalWidth || i?.height !== r.naturalHeight;
637
+ z.set(n.imageUrl, {
618
638
  width: r.naturalWidth,
619
639
  height: r.naturalHeight
620
- }), a ? X(e, !0) : Q(e), Pt();
640
+ }), a ? X(e, !0) : Q(e), zt();
621
641
  }).catch(() => void 0).finally(() => {
622
- ye.delete(a);
642
+ xe.delete(a);
623
643
  });
624
- return ye.set(a, s), s;
644
+ return xe.set(a, s), s;
625
645
  }
626
- function It(e) {
646
+ function Vt(e) {
627
647
  let t = Y(e), n = J(e);
628
648
  if (t && n.length !== 0) return {
629
- start: kt(n, t.scrollTop),
630
- end: kt(n, t.scrollTop + t.clientHeight)
649
+ start: Pt(n, t.scrollTop),
650
+ end: Pt(n, t.scrollTop + t.clientHeight)
631
651
  };
632
652
  }
633
- function Lt(e, t, n) {
653
+ function Ht(e, t, n) {
634
654
  let r = Math.min(window.devicePixelRatio || 1, 2), i = Math.max(1, Math.round(t * r)), a = Math.max(1, Math.round(n * r));
635
655
  (e.width !== i || e.height !== a) && (e.width = i, e.height = a), e.style.width = `${t}px`, e.style.height = `${n}px`;
636
656
  let o = e.getContext("2d");
637
657
  return o.setTransform(r, 0, 0, r, 0, 0), o.clearRect(0, 0, t, n), o;
638
658
  }
639
- let Rt = {
659
+ let Ut = {
640
660
  gray: {
641
661
  fill: "rgba(148,163,184,0.12)",
642
662
  stroke: "#94a3b8",
@@ -658,32 +678,32 @@ var je = d({
658
678
  pulse: "rgba(255,136,0,0.7)"
659
679
  }
660
680
  };
661
- function zt(e) {
681
+ function Wt(e) {
662
682
  return e < .3 ? Math.sin(e / .3 * Math.PI) : e >= .38 && e < .7 ? .85 * Math.sin((e - .38) / .32 * Math.PI) : 0;
663
683
  }
664
684
  function Z(e) {
665
- let t = Et(e), n = Y(e), r = It(e);
685
+ let t = jt(e), n = Y(e), r = Vt(e);
666
686
  if (!t || !n || n.clientWidth <= 0 || n.clientHeight <= 0) return;
667
- let i = Lt(t, n.clientWidth, n.clientHeight);
687
+ let i = Ht(t, n.clientWidth, n.clientHeight);
668
688
  if (!r) {
669
- e === "src" ? xe = [] : Se = [];
689
+ e === "src" ? we = [] : Ee = [];
670
690
  return;
671
691
  }
672
- let a = J(e), o = e === "src" ? Ct.value : wt.value, s = [], c;
692
+ let a = J(e), o = e === "src" ? Ot.value : kt.value, s = [], c;
673
693
  for (let e = r.start; e <= r.end; e++) {
674
694
  let t = a[e];
675
695
  if (!t?.measured) continue;
676
696
  let r = t.width / t.naturalWidth;
677
697
  for (let a of o.get(e) ?? []) {
678
- if (a.isGap && a.pairIndex !== A.value) continue;
679
- let e = Math.round(a.x * r), o = Math.round(t.top - n.scrollTop + a.y * r), l = Math.max(1, Math.round(a.w * r)), u = Math.max(1, Math.round(a.h * r)), d = Rt[a.color];
698
+ if (a.isGap && a.pairIndex !== j.value) continue;
699
+ let e = Math.round(a.x * r), o = Math.round(t.top - n.scrollTop + a.y * r), l = Math.max(1, Math.round(a.w * r)), u = Math.max(1, Math.round(a.h * r)), d = Ut[a.color];
680
700
  i.fillStyle = d.fill, i.fillRect(e, o, l, u), i.strokeStyle = d.stroke, i.lineWidth = 1, i.strokeRect(e, o, l, u), s.push({
681
701
  x: e,
682
702
  y: o,
683
703
  w: l,
684
704
  h: u,
685
705
  pairIndex: a.pairIndex
686
- }), a.pairIndex === A.value && (c = {
706
+ }), a.pairIndex === j.value && (c = {
687
707
  x: e,
688
708
  y: o,
689
709
  w: l,
@@ -693,15 +713,15 @@ var je = d({
693
713
  }
694
714
  }
695
715
  if (c && G !== null) {
696
- let e = zt(G);
697
- e > 0 && (i.save(), i.globalAlpha = e, i.strokeStyle = Rt[c.color].pulse, i.lineWidth = 1 + e * 4, i.shadowColor = Rt[c.color].pulse, i.shadowBlur = e * 8, i.strokeRect(c.x, c.y, c.w, c.h), i.restore());
716
+ let e = Wt(G);
717
+ e > 0 && (i.save(), i.globalAlpha = e, i.strokeStyle = Ut[c.color].pulse, i.lineWidth = 1 + e * 4, i.shadowColor = Ut[c.color].pulse, i.shadowBlur = e * 8, i.strokeRect(c.x, c.y, c.w, c.h), i.restore());
698
718
  }
699
- e === "src" ? xe = s : Se = s;
719
+ e === "src" ? we = s : Ee = s;
700
720
  }
701
- function Bt(e) {
702
- let t = Tt(e), n = Y(e), r = It(e);
721
+ function Gt(e) {
722
+ let t = At(e), n = Y(e), r = Vt(e);
703
723
  if (!t || !n || n.clientWidth <= 0 || n.clientHeight <= 0) return;
704
- let i = Lt(t, n.clientWidth, n.clientHeight);
724
+ let i = Ht(t, n.clientWidth, n.clientHeight);
705
725
  if (i.fillStyle = "#eef0f3", i.fillRect(0, 0, n.clientWidth, n.clientHeight), !r) {
706
726
  Z(e);
707
727
  return;
@@ -710,27 +730,27 @@ var je = d({
710
730
  for (let t = r.start; t <= r.end; t++) {
711
731
  let r = o[t], s = a[t], c = s.top - n.scrollTop;
712
732
  i.fillStyle = "#fff", i.fillRect(0, c, s.width, s.height);
713
- let l = R.get(r.imageUrl);
714
- l?.image ? (l.lastUsed = ++B, i.drawImage(l.image, 0, c, s.width, s.height)) : (i.fillStyle = "#8a9099", i.font = "14px Segoe UI, Microsoft YaHei, sans-serif", i.textAlign = "center", i.fillText(`第 ${t + 1} 页加载中…`, s.width / 2, c + Math.min(48, s.height / 2)), Ft(e, t));
733
+ let l = B.get(r.imageUrl);
734
+ l?.image ? (l.lastUsed = ++V, i.drawImage(l.image, 0, c, s.width, s.height)) : (i.fillStyle = "#8a9099", i.font = "14px Segoe UI, Microsoft YaHei, sans-serif", i.textAlign = "center", i.fillText(`第 ${t + 1} 页加载中…`, s.width / 2, c + Math.min(48, s.height / 2)), Bt(e, t));
715
735
  }
716
736
  let s = Math.max(0, r.start - 1), c = Math.min(o.length - 1, r.end + 1);
717
- for (let t = s; t <= c; t++) (t < r.start || t > r.end) && Ft(e, t);
737
+ for (let t = s; t <= c; t++) (t < r.start || t > r.end) && Bt(e, t);
718
738
  Z(e);
719
739
  }
720
740
  function Q(e) {
721
- (!e || e === "src") && (De = !0), (!e || e === "tgt") && (Oe = !0), !H && (H = requestAnimationFrame(() => {
722
- H = 0;
723
- let e = De, t = Oe;
724
- De = !1, Oe = !1, e && Bt("src"), t && Bt("tgt"), Gt(), Ut();
741
+ (!e || e === "src") && (je = !0), (!e || e === "tgt") && (wt = !0), !U && (U = requestAnimationFrame(() => {
742
+ U = 0;
743
+ let e = je, t = wt;
744
+ je = !1, wt = !1, e && Gt("src"), t && Gt("tgt"), $t(), Jt();
725
745
  }));
726
746
  }
727
- function Vt() {
728
- U ||= requestAnimationFrame(() => {
729
- U = 0, X("src", !0), X("tgt", !0);
747
+ function Kt() {
748
+ ke ||= requestAnimationFrame(() => {
749
+ ke = 0, X("src", !0), X("tgt", !0);
730
750
  });
731
751
  }
732
- function Ht(e) {
733
- let t = (e === "src" ? k.value.srcBoxes : k.value.tgtBoxes).find((e) => e.pairIndex === A.value), n = Y(e), r = t ? J(e)[t.pageIndex] : void 0;
752
+ function qt(e) {
753
+ let t = (e === "src" ? A.value.srcBoxes : A.value.tgtBoxes).find((e) => e.pairIndex === j.value), n = Y(e), r = t ? J(e)[t.pageIndex] : void 0;
734
754
  if (!t || !n || !r?.measured) return;
735
755
  let i = r.width / r.naturalWidth;
736
756
  return {
@@ -739,14 +759,14 @@ var je = d({
739
759
  color: t.color
740
760
  };
741
761
  }
742
- function Ut() {
743
- if (!fe.value || !se.value || !P.value || !F.value || !ue.value || !de.value) return;
744
- let e = fe.value, t = e.querySelector("path"), n = Ht("src"), r = Ht("tgt");
762
+ function Jt() {
763
+ if (!me.value || !le.value || !F.value || !I.value || !fe.value || !pe.value) return;
764
+ let e = me.value, t = e.querySelector("path"), n = qt("src"), r = qt("tgt");
745
765
  if (!n || !r) {
746
766
  t?.remove();
747
767
  return;
748
768
  }
749
- let i = se.value.getBoundingClientRect(), a = P.value.getBoundingClientRect(), o = F.value.getBoundingClientRect(), s = ue.value.getBoundingClientRect(), c = de.value.getBoundingClientRect(), l = a.top - i.top, u = a.left - i.left, d = o.right - a.left, f = a.height, p = (t, n) => {
769
+ let i = le.value.getBoundingClientRect(), a = F.value.getBoundingClientRect(), o = I.value.getBoundingClientRect(), s = fe.value.getBoundingClientRect(), c = pe.value.getBoundingClientRect(), l = a.top - i.top, u = a.left - i.left, d = o.right - a.left, f = a.height, p = (t, n) => {
750
770
  let r = `${n}px`;
751
771
  e.style[t] !== r && (e.style[t] = r);
752
772
  }, m = (e, t, n) => {
@@ -754,42 +774,62 @@ var je = d({
754
774
  };
755
775
  p("top", l), p("left", u), p("width", d), p("height", f), m(e, "width", String(d)), m(e, "height", String(f));
756
776
  let h = s.left - a.left, ee = c.left - a.left, te = h + n.x, g = n.y, _ = ee + r.x, v = r.y, y = s.right - a.left, b = ee, x = y + (b - y) / 2, S = `M${te},${g} L${y},${g} C${x},${g} ${x},${v} ${b},${v} L${_},${v}`, C = t ?? document.createElementNS("http://www.w3.org/2000/svg", "path");
757
- m(C, "d", S), m(C, "fill", "none"), m(C, "stroke", Rt[n.color].stroke), m(C, "stroke-width", "2"), m(C, "stroke-dasharray", "6 4"), t || e.appendChild(C);
777
+ m(C, "d", S), m(C, "fill", "none"), m(C, "stroke", Ut[n.color].stroke), m(C, "stroke-width", "2"), m(C, "stroke-dasharray", "6 4"), t || e.appendChild(C);
758
778
  }
759
- function Wt(e) {
779
+ function Yt(e, t) {
780
+ let n = Y(e);
781
+ if (!n) return;
782
+ let r = n.scrollTop;
783
+ n.scrollTop = t, n.scrollTop !== r && (se[e] = n.scrollTop), Q(e);
784
+ }
785
+ function Xt(e) {
786
+ if (!k.value) return;
787
+ let t = e === "src" ? "tgt" : "src", n = Y(e), r = Y(t);
788
+ if (!n || !r) return;
789
+ let i = n.scrollHeight - n.clientHeight, a = Math.max(0, r.scrollHeight - r.clientHeight);
790
+ i <= 0 || Yt(t, Math.max(0, Math.min(1, n.scrollTop / i)) * a);
791
+ }
792
+ function Zt(e) {
760
793
  Q(e);
794
+ let t = se[e];
795
+ se[e] = null;
796
+ let n = Y(e);
797
+ !n || t !== null && Math.abs(n.scrollTop - t) < 1 || (oe = e, Xt(e));
798
+ }
799
+ function Qt() {
800
+ k.value = !k.value, k.value && Xt(oe);
761
801
  }
762
- function Gt() {
763
- P.value && I.value.length > 0 && (M.value = kt(I.value, P.value.scrollTop)), F.value && L.value.length > 0 && (N.value = kt(L.value, F.value.scrollTop));
802
+ function $t() {
803
+ F.value && L.value.length > 0 && (N.value = Pt(L.value, F.value.scrollTop)), I.value && R.value.length > 0 && (P.value = Pt(R.value, I.value.scrollTop));
764
804
  }
765
- function Kt(e, t) {
805
+ function en(e, t) {
766
806
  let n = q(e), r = Y(e), i = J(e)[t];
767
- t < 0 || t >= n.length || !r || !i || (e === "src" ? M.value = t : N.value = t, f(() => {
768
- r.scrollTop = i.top, Q(e);
807
+ t < 0 || t >= n.length || !r || !i || (e === "src" ? N.value = t : P.value = t, f(() => {
808
+ Yt(e, i.top), oe = e, Xt(e);
769
809
  }));
770
810
  }
771
- function qt(e) {
772
- Kt("src", e);
811
+ function tn(e) {
812
+ en("src", e);
773
813
  }
774
- function Jt(e) {
775
- Kt("tgt", e);
814
+ function nn(e) {
815
+ en("tgt", e);
776
816
  }
777
- function Yt(e, t, n) {
817
+ function rn(e, t, n) {
778
818
  let r = q(e), i = Y(e), a = J(e)[n];
779
819
  if (n < 0 || n >= r.length || !i || !a) return;
780
- let o = (e === "src" ? k.value.srcBoxes : k.value.tgtBoxes).find((e) => e.pairIndex === t);
781
- e === "src" ? M.value = n : N.value = n, f(() => {
820
+ let o = (e === "src" ? A.value.srcBoxes : A.value.tgtBoxes).find((e) => e.pairIndex === t);
821
+ e === "src" ? N.value = n : P.value = n, f(() => {
782
822
  let t = J(e)[n];
783
823
  if (!t) return;
784
824
  let r = o ? t.top + (o.y + o.h / 2) * (t.width / t.naturalWidth) - i.clientHeight / 2 : t.top, a = Math.max(0, i.scrollHeight - i.clientHeight);
785
- i.scrollTop = Math.max(0, Math.min(a, r)), Q(e);
825
+ Yt(e, Math.max(0, Math.min(a, r)));
786
826
  });
787
827
  }
788
- function Xt(e) {
828
+ function an(e) {
789
829
  let t = w.diffDetail[e];
790
- t && (Yt("src", e, t.srcPage), Yt("tgt", e, t.tgtPage));
830
+ t && (rn("src", e, t.srcPage), rn("tgt", e, t.tgtPage));
791
831
  }
792
- function Zt() {
832
+ function on() {
793
833
  if (W && cancelAnimationFrame(W), window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
794
834
  W = 0, G = null, Z("src"), Z("tgt");
795
835
  return;
@@ -799,197 +839,210 @@ var je = d({
799
839
  };
800
840
  W = requestAnimationFrame(t);
801
841
  }
802
- async function Qt(e) {
842
+ async function sn(e) {
803
843
  let t = w.diffDetail[e];
804
- t && (await Promise.all([Ft("src", t.srcPage), Ft("tgt", t.tgtPage)]), !(K || A.value !== e) && (Xt(e), Q(), Zt()));
844
+ t && (await Promise.all([Bt("src", t.srcPage), Bt("tgt", t.tgtPage)]), !(K || j.value !== e) && (an(e), Q(), on()));
805
845
  }
806
- function $(e) {
807
- K || (T("select", w.diffDetail[e] ?? null, e), A.value = e, Xt(e), Q(), Qt(e));
846
+ let cn = _(null);
847
+ function $(e, t = !0) {
848
+ K || (T("select", w.diffDetail[e] ?? null, e), j.value = e, t && f(() => {
849
+ !K && j.value === e && cn.value?.scrollToCard(e);
850
+ }), an(e), Q(), sn(e));
808
851
  }
809
- function $t(e, t) {
810
- let n = Et(t), r = Y(t);
852
+ function ln(e, t) {
853
+ let n = jt(t), r = Y(t);
811
854
  if (!n || !r) return;
812
- let i = n.getBoundingClientRect(), a = (e.clientX - i.left) * r.clientWidth / i.width, o = (e.clientY - i.top) * r.clientHeight / i.height, s = t === "src" ? xe : Se;
855
+ let i = n.getBoundingClientRect(), a = (e.clientX - i.left) * r.clientWidth / i.width, o = (e.clientY - i.top) * r.clientHeight / i.height, s = t === "src" ? we : Ee;
813
856
  for (let e = s.length - 1; e >= 0; e--) {
814
857
  let t = s[e];
815
858
  if (a >= t.x - 3 && a <= t.x + t.w + 3 && o >= t.y - 3 && o <= t.y + t.h + 3) return t.pairIndex;
816
859
  }
817
860
  }
818
- function en(e, t) {
819
- let n = $t(e, t);
861
+ function un(e, t) {
862
+ let n = ln(e, t);
820
863
  n !== void 0 && $(n);
821
864
  }
822
- function tn(e, t) {
865
+ function dn(e, t) {
823
866
  let n = e.currentTarget;
824
- n.style.cursor = $t(e, t) === void 0 ? "default" : "pointer";
867
+ n.style.cursor = ln(e, t) === void 0 ? "default" : "pointer";
825
868
  }
826
- let nn = t(() => O.value[0]?.idx ?? -1);
827
- function rn() {
828
- I.value = [], L.value = [], pe.value = 1, me.value = 1, xe = [], Se = [], z.clear();
869
+ let fn = t(() => O.value[0]?.idx ?? -1);
870
+ function pn() {
871
+ L.value = [], R.value = [], he.value = 1, ge.value = 1, we = [], Ee = [], Ce.clear();
829
872
  }
830
873
  te(async () => {
831
- K = !1, await f(), X("src"), X("tgt"), await f(), $(nn.value), Ae = new ResizeObserver(Vt), P.value && Ae.observe(P.value), F.value && Ae.observe(F.value);
874
+ K = !1, await f(), X("src"), X("tgt"), await f(), $(fn.value), Tt = new ResizeObserver(Kt), F.value && Tt.observe(F.value), I.value && Tt.observe(I.value);
832
875
  }), S(() => [w.sourcePages, w.targetPages], async () => {
833
- rn(), await f(), X("src"), X("tgt"), await f(), $(nn.value);
834
- }, { deep: !0 }), S([j, D], () => {
835
- T("filter-change", j.value, D.value), $(nn.value);
876
+ pn(), await f(), X("src"), X("tgt"), await f(), $(fn.value);
877
+ }, { deep: !0 }), S([M, D], () => {
878
+ T("filter-change", M.value, D.value), $(fn.value);
836
879
  }), S(() => w.diffDetail, () => {
837
- let e = A.value;
880
+ let e = j.value;
838
881
  $((O.value.find((t) => t.idx >= e) ?? O.value[O.value.length - 1])?.idx ?? -1);
839
882
  }), ee(() => {
840
- K = !0, Ae?.disconnect(), H && cancelAnimationFrame(H), U && cancelAnimationFrame(U), W && cancelAnimationFrame(W);
841
- for (let e of R.values()) e.image && (e.image.src = "");
842
- R.clear();
883
+ K = !0, Tt?.disconnect(), U && cancelAnimationFrame(U), ke && cancelAnimationFrame(ke), W && cancelAnimationFrame(W);
884
+ for (let e of B.values()) e.image && (e.image.src = "");
885
+ B.clear();
843
886
  });
844
- async function an(e) {
887
+ async function mn(e) {
845
888
  let t = typeof e == "string" ? w.diffDetail.findIndex((t) => t.diffId === e) : e;
846
- return !Number.isInteger(t) || !w.diffDetail[t] || K ? !1 : (ae.value.has(t) || (j.value = "all", D.value = "all", await f()), $(t), !0);
889
+ return !Number.isInteger(t) || !w.diffDetail[t] || K ? !1 : (ae.value.has(t) || (M.value = "all", D.value = "all", await f()), $(t), !0);
847
890
  }
848
- function on(e) {
849
- let t = O.value.findIndex((e) => e.idx === A.value), n = O.value[t + e];
891
+ function hn(e) {
892
+ let t = O.value.findIndex((e) => e.idx === j.value), n = O.value[t + e];
850
893
  return n ? ($(n.idx), !0) : !1;
851
894
  }
852
- function sn(e, t) {
895
+ function gn(e, t) {
853
896
  let n = e === "source" ? "src" : "tgt";
854
- return !Number.isInteger(t) || t < 0 || t >= q(n).length ? !1 : (Kt(n, t), !0);
897
+ return !Number.isInteger(t) || t < 0 || t >= q(n).length ? !1 : (en(n, t), !0);
855
898
  }
856
- function cn(e, t = D.value) {
857
- j.value = e, D.value = t;
899
+ function _n(e, t = D.value) {
900
+ M.value = e, D.value = t;
858
901
  }
859
- function ln() {
860
- z.clear(), Q();
902
+ function vn() {
903
+ Ce.clear(), Q();
861
904
  }
862
- return S(M, (e) => T("page-change", "source", e)), S(N, (e) => T("page-change", "target", e)), d({
863
- selectDiff: an,
864
- nextDiff: () => on(1),
865
- previousDiff: () => on(-1),
866
- goToPage: sn,
867
- setFilter: cn,
868
- resize: Vt,
869
- retryImages: ln
870
- }), (t, d) => (g(), i("div", Me, [
905
+ return S(N, (e) => T("page-change", "source", e)), S(P, (e) => T("page-change", "target", e)), d({
906
+ selectDiff: mn,
907
+ nextDiff: () => hn(1),
908
+ previousDiff: () => hn(-1),
909
+ goToPage: gn,
910
+ setFilter: _n,
911
+ resize: Kt,
912
+ retryImages: vn
913
+ }), (t, d) => (g(), i("div", Ne, [
871
914
  y(t.$slots, "toolbar", {
872
- activeIndex: A.value,
873
- selectDiff: an,
874
- setFilter: cn
915
+ activeIndex: j.value,
916
+ selectDiff: mn,
917
+ setFilter: _n
875
918
  }, void 0, !0),
876
- a("div", Ne, [a("div", Pe, [w.sourcePages.length > 0 || w.targetPages.length > 0 ? (g(), i("div", {
877
- key: 0,
919
+ a("div", Pe, [a("div", Fe, [w.sourcePages.length && w.targetPages.length ? (g(), i("div", Ie, [a("button", {
920
+ type: "button",
921
+ class: "sync-scroll-toggle",
922
+ role: "switch",
923
+ "aria-checked": k.value,
924
+ title: "开启后,两侧预览按文档滚动进度同步",
925
+ onClick: Qt
926
+ }, [...d[19] ||= [a("span", {
927
+ class: "sync-scroll-track",
928
+ "aria-hidden": "true"
929
+ }, [a("span")], -1), s(" 同步滚动 ", -1)]], 8, Le)])) : r("", !0), w.sourcePages.length > 0 || w.targetPages.length > 0 ? (g(), i("div", {
930
+ key: 1,
878
931
  ref_key: "containerRef",
879
- ref: se,
932
+ ref: le,
880
933
  class: "compare-row"
881
934
  }, [
882
- a("div", Fe, [w.sourcePages.length ? (g(), i("div", Ie, [a("div", Le, [d[18] ||= a("div", { class: "canvas-info-bar-left-tag" }, "标准文档", -1), a("div", Re, [y(t.$slots, "source-title", { filename: w.sourceFilename }, () => [s(b(w.sourceFilename || "标准文档"), 1)], !0)])]), a("div", ze, [
935
+ a("div", Re, [w.sourcePages.length ? (g(), i("div", ze, [a("div", Be, [d[20] ||= a("div", { class: "canvas-info-bar-left-tag" }, "标准文档", -1), a("div", Ve, [y(t.$slots, "source-title", { filename: w.sourceFilename }, () => [s(b(w.sourceFilename || "标准文档"), 1)], !0)])]), a("div", He, [
883
936
  a("button", {
884
937
  class: "page-btn",
885
- disabled: M.value <= 0,
938
+ disabled: N.value <= 0,
886
939
  title: "第一页",
887
940
  "aria-label": "标准文档第一页",
888
- onClick: d[0] ||= (e) => qt(0)
889
- }, [c(x(Te), { "aria-hidden": "true" })], 8, Be),
941
+ onClick: d[0] ||= (e) => tn(0)
942
+ }, [c(x(De), { "aria-hidden": "true" })], 8, Ue),
890
943
  a("button", {
891
944
  class: "page-btn",
892
- disabled: M.value <= 0,
945
+ disabled: N.value <= 0,
893
946
  title: "上一页",
894
947
  "aria-label": "标准文档上一页",
895
- onClick: d[1] ||= (e) => qt(M.value - 1)
896
- }, [c(x(Ee), { "aria-hidden": "true" })], 8, Ve),
897
- a("span", He, b(M.value + 1) + " / " + b(w.sourcePages.length), 1),
948
+ onClick: d[1] ||= (e) => tn(N.value - 1)
949
+ }, [c(x(Oe), { "aria-hidden": "true" })], 8, We),
950
+ a("span", Ge, b(N.value + 1) + " / " + b(w.sourcePages.length), 1),
898
951
  a("button", {
899
952
  class: "page-btn",
900
- disabled: M.value >= w.sourcePages.length - 1,
953
+ disabled: N.value >= w.sourcePages.length - 1,
901
954
  title: "下一页",
902
955
  "aria-label": "标准文档下一页",
903
- onClick: d[2] ||= (e) => qt(M.value + 1)
904
- }, [c(x(ke), { "aria-hidden": "true" })], 8, Ue),
956
+ onClick: d[2] ||= (e) => tn(N.value + 1)
957
+ }, [c(x(Ae), { "aria-hidden": "true" })], 8, Ke),
905
958
  a("button", {
906
959
  class: "page-btn",
907
- disabled: M.value >= w.sourcePages.length - 1,
960
+ disabled: N.value >= w.sourcePages.length - 1,
908
961
  title: "最后一页",
909
962
  "aria-label": "标准文档最后一页",
910
- onClick: d[3] ||= (e) => qt(w.sourcePages.length - 1)
911
- }, [c(x(je), { "aria-hidden": "true" })], 8, We)
963
+ onClick: d[3] ||= (e) => tn(w.sourcePages.length - 1)
964
+ }, [c(x(Me), { "aria-hidden": "true" })], 8, qe)
912
965
  ])])) : r("", !0), a("div", {
913
966
  ref_key: "srcScrollRef",
914
- ref: P,
967
+ ref: F,
915
968
  class: "canvas-scroll",
916
- onScroll: d[6] ||= (e) => Wt("src")
969
+ onScroll: d[6] ||= (e) => Zt("src")
917
970
  }, [a("div", {
918
971
  class: "virtual-spacer",
919
- style: h({ height: `${pe.value}px` })
972
+ style: h({ height: `${he.value}px` })
920
973
  }, [a("div", {
921
974
  class: "viewport-canvas-stack",
922
- style: h({ height: `${he.value}px` })
975
+ style: h({ height: `${_e.value}px` })
923
976
  }, [a("canvas", {
924
977
  ref_key: "srcCanvasRef",
925
- ref: ce,
978
+ ref: ue,
926
979
  class: "compare-canvas"
927
980
  }, null, 512), a("canvas", {
928
981
  ref_key: "srcAnnotationCanvasRef",
929
- ref: ue,
982
+ ref: fe,
930
983
  class: "annotation-canvas",
931
- onClick: d[4] ||= (e) => en(e, "src"),
932
- onMousemove: d[5] ||= (e) => tn(e, "src")
984
+ onClick: d[4] ||= (e) => un(e, "src"),
985
+ onMousemove: d[5] ||= (e) => dn(e, "src")
933
986
  }, null, 544)], 4)], 4)], 544)]),
934
- a("div", Ge, [w.targetPages.length ? (g(), i("div", Ke, [a("div", qe, [d[19] ||= a("div", { class: "canvas-info-bar-left-tag gray" }, "对比文档", -1), a("div", Je, [y(t.$slots, "target-title", { filename: w.targetFilename }, () => [s(b(w.targetFilename || "对比文档"), 1)], !0)])]), a("div", Ye, [
987
+ a("div", Je, [w.targetPages.length ? (g(), i("div", Ye, [a("div", Xe, [d[21] ||= a("div", { class: "canvas-info-bar-left-tag gray" }, "对比文档", -1), a("div", Ze, [y(t.$slots, "target-title", { filename: w.targetFilename }, () => [s(b(w.targetFilename || "对比文档"), 1)], !0)])]), a("div", Qe, [
935
988
  a("button", {
936
989
  class: "page-btn",
937
- disabled: N.value <= 0,
990
+ disabled: P.value <= 0,
938
991
  title: "第一页",
939
992
  "aria-label": "对比文档第一页",
940
- onClick: d[7] ||= (e) => Jt(0)
941
- }, [c(x(Te), { "aria-hidden": "true" })], 8, Xe),
993
+ onClick: d[7] ||= (e) => nn(0)
994
+ }, [c(x(De), { "aria-hidden": "true" })], 8, $e),
942
995
  a("button", {
943
996
  class: "page-btn",
944
- disabled: N.value <= 0,
997
+ disabled: P.value <= 0,
945
998
  title: "上一页",
946
999
  "aria-label": "对比文档上一页",
947
- onClick: d[8] ||= (e) => Jt(N.value - 1)
948
- }, [c(x(Ee), { "aria-hidden": "true" })], 8, Ze),
949
- a("span", Qe, b(N.value + 1) + " / " + b(w.targetPages.length), 1),
1000
+ onClick: d[8] ||= (e) => nn(P.value - 1)
1001
+ }, [c(x(Oe), { "aria-hidden": "true" })], 8, et),
1002
+ a("span", tt, b(P.value + 1) + " / " + b(w.targetPages.length), 1),
950
1003
  a("button", {
951
1004
  class: "page-btn",
952
- disabled: N.value >= w.targetPages.length - 1,
1005
+ disabled: P.value >= w.targetPages.length - 1,
953
1006
  title: "下一页",
954
1007
  "aria-label": "对比文档下一页",
955
- onClick: d[9] ||= (e) => Jt(N.value + 1)
956
- }, [c(x(ke), { "aria-hidden": "true" })], 8, $e),
1008
+ onClick: d[9] ||= (e) => nn(P.value + 1)
1009
+ }, [c(x(Ae), { "aria-hidden": "true" })], 8, nt),
957
1010
  a("button", {
958
1011
  class: "page-btn",
959
- disabled: N.value >= w.targetPages.length - 1,
1012
+ disabled: P.value >= w.targetPages.length - 1,
960
1013
  title: "最后一页",
961
1014
  "aria-label": "对比文档最后一页",
962
- onClick: d[10] ||= (e) => Jt(w.targetPages.length - 1)
963
- }, [c(x(je), { "aria-hidden": "true" })], 8, et)
1015
+ onClick: d[10] ||= (e) => nn(w.targetPages.length - 1)
1016
+ }, [c(x(Me), { "aria-hidden": "true" })], 8, rt)
964
1017
  ])])) : r("", !0), a("div", {
965
1018
  ref_key: "tgtScrollRef",
966
- ref: F,
1019
+ ref: I,
967
1020
  class: "canvas-scroll canvas-scroll--flip",
968
- onScroll: d[13] ||= (e) => Wt("tgt")
1021
+ onScroll: d[13] ||= (e) => Zt("tgt")
969
1022
  }, [a("div", {
970
1023
  class: "virtual-spacer",
971
- style: h({ height: `${me.value}px` })
1024
+ style: h({ height: `${ge.value}px` })
972
1025
  }, [a("div", {
973
1026
  class: "viewport-canvas-stack",
974
- style: h({ height: `${ge.value}px` })
1027
+ style: h({ height: `${ve.value}px` })
975
1028
  }, [a("canvas", {
976
1029
  ref_key: "tgtCanvasRef",
977
- ref: le,
1030
+ ref: de,
978
1031
  class: "compare-canvas"
979
1032
  }, null, 512), a("canvas", {
980
1033
  ref_key: "tgtAnnotationCanvasRef",
981
- ref: de,
1034
+ ref: pe,
982
1035
  class: "annotation-canvas",
983
- onClick: d[11] ||= (e) => en(e, "tgt"),
984
- onMousemove: d[12] ||= (e) => tn(e, "tgt")
1036
+ onClick: d[11] ||= (e) => un(e, "tgt"),
1037
+ onMousemove: d[12] ||= (e) => dn(e, "tgt")
985
1038
  }, null, 544)], 4)], 4)], 544)]),
986
1039
  (g(), i("svg", {
987
1040
  ref_key: "svgRef",
988
- ref: fe,
1041
+ ref: me,
989
1042
  class: "line-svg"
990
1043
  }, null, 512))
991
- ], 512)) : (g(), i("div", tt, [y(t.$slots, "empty", {}, () => [d[20] ||= s("暂无可展示的页面数据", -1)], !0)]))]), a("aside", nt, [
992
- a("header", rt, [a("div", it, [a("h2", null, [c(x(we), { "aria-hidden": "true" }), d[21] ||= s("差异审阅", -1)]), a("span", at, "共 " + b(E.value?.total_difference_count ?? w.diffDetail.length) + " 处", 1)]), a("div", ot, [(g(), i(e, null, v([
1044
+ ], 512)) : (g(), i("div", it, [y(t.$slots, "empty", {}, () => [d[22] ||= s("暂无可展示的页面数据", -1)], !0)]))]), a("aside", at, [
1045
+ a("header", ot, [a("div", st, [a("h2", null, [c(x(Te), { "aria-hidden": "true" }), d[23] ||= s("差异审阅", -1)]), a("span", ct, "共 " + b(E.value?.total_difference_count ?? w.diffDetail.length) + " 处", 1)]), a("div", lt, [(g(), i(e, null, v([
993
1046
  "pending",
994
1047
  "ignored",
995
1048
  "all"
@@ -997,8 +1050,8 @@ var je = d({
997
1050
  key: e,
998
1051
  "aria-pressed": D.value === e,
999
1052
  onClick: (t) => D.value = e
1000
- }, [s(b(e === "pending" ? "未忽略" : e === "ignored" ? "已忽略" : "全部") + " ", 1), E.value && e !== "all" ? (g(), i("span", ct, b(e === "pending" ? E.value.remaining_difference_count : E.value.ignored_difference_count), 1)) : r("", !0)], 8, st)), 64))])]),
1001
- a("div", lt, [(g(), i(e, null, v([
1053
+ }, [s(b(e === "pending" ? "未忽略" : e === "ignored" ? "已忽略" : "全部") + " ", 1), E.value && e !== "all" ? (g(), i("span", dt, b(e === "pending" ? E.value.remaining_difference_count : E.value.ignored_difference_count), 1)) : r("", !0)], 8, ut)), 64))])]),
1054
+ a("div", ft, [(g(), i(e, null, v([
1002
1055
  "all",
1003
1056
  "modify",
1004
1057
  "delete",
@@ -1006,19 +1059,21 @@ var je = d({
1006
1059
  ], (e) => a("button", {
1007
1060
  key: e,
1008
1061
  class: "review-type",
1009
- "aria-pressed": j.value === e,
1010
- onClick: (t) => j.value = e
1011
- }, [s(b(e === "all" ? "所有类型" : e === "modify" ? "修改" : e === "delete" ? "删除" : "新增") + " ", 1), a("span", null, b(oe.value[e]), 1)], 8, ut)), 64))]),
1062
+ "aria-pressed": M.value === e,
1063
+ onClick: (t) => M.value = e
1064
+ }, [s(b(e === "all" ? "所有类型" : e === "modify" ? "修改" : e === "delete" ? "删除" : "新增") + " ", 1), a("span", null, b(ce.value[e]), 1)], 8, pt)), 64))]),
1012
1065
  O.value.length ? (g(), n(be, {
1013
1066
  key: 1,
1067
+ ref_key: "diffCardsRef",
1068
+ ref: cn,
1014
1069
  "diff-detail": w.diffDetail,
1015
- "active-index": A.value,
1016
- "active-tab": j.value,
1070
+ "active-index": j.value,
1071
+ "active-tab": M.value,
1017
1072
  "review-filter": D.value,
1018
1073
  busy: l.reviewBusy,
1019
1074
  readonly: w.readonly,
1020
1075
  onIgnore: d[15] ||= (e, t) => T("ignore", e, t),
1021
- onSelect: $
1076
+ onSelect: d[16] ||= (e) => $(e, !1)
1022
1077
  }, o({ _: 2 }, [t.$slots["diff-card"] ? {
1023
1078
  name: "default",
1024
1079
  fn: C((e) => [y(t.$slots, "diff-card", m(u(e)), void 0, !0)]),
@@ -1030,18 +1085,18 @@ var je = d({
1030
1085
  "review-filter",
1031
1086
  "busy",
1032
1087
  "readonly"
1033
- ])) : (g(), i("div", dt, [E.value?.comparison_passed && D.value === "pending" ? (g(), i(e, { key: 0 }, [
1034
- a("span", ft, [c(x(Ce), { "aria-hidden": "true" })]),
1035
- d[22] ||= a("h3", null, "比对通过", -1),
1088
+ ])) : (g(), i("div", mt, [E.value?.comparison_passed && D.value === "pending" ? (g(), i(e, { key: 0 }, [
1089
+ a("span", ht, [c(x(Se), { "aria-hidden": "true" })]),
1090
+ d[24] ||= a("h3", null, "比对通过", -1),
1036
1091
  a("p", null, b(E.value.total_difference_count ? "全部差异已标记为忽略" : "两个文档未发现差异"), 1),
1037
1092
  E.value.ignored_difference_count ? (g(), i("button", {
1038
1093
  key: 0,
1039
1094
  onClick: d[14] ||= (e) => D.value = "ignored"
1040
1095
  }, " 查看已忽略的差异 ")) : r("", !0)
1041
1096
  ], 64)) : (g(), i(e, { key: 1 }, [
1042
- a("span", pt, [c(x(we), { "aria-hidden": "true" })]),
1043
- d[23] ||= a("h3", null, "暂无差异", -1),
1044
- d[24] ||= a("p", null, "当前筛选下没有差异项", -1)
1097
+ a("span", gt, [c(x(Te), { "aria-hidden": "true" })]),
1098
+ d[25] ||= a("h3", null, "暂无差异", -1),
1099
+ d[26] ||= a("p", null, "当前筛选下没有差异项", -1)
1045
1100
  ], 64))])),
1046
1101
  !w.readonly && E.value ? (g(), i("footer", {
1047
1102
  key: 2,
@@ -1052,25 +1107,25 @@ var je = d({
1052
1107
  disabled: l.reviewBusy || !E.value.remaining_difference_count,
1053
1108
  title: "忽略整个任务的所有剩余差异,包含当前筛选之外的差异",
1054
1109
  "aria-label": "忽略整个任务的所有剩余差异,包含筛选外差异",
1055
- onClick: d[16] ||= (e) => T("ignore", null, !0)
1110
+ onClick: d[17] ||= (e) => T("ignore", null, !0)
1056
1111
  }, [
1057
1112
  c(x(re), { "aria-hidden": "true" }),
1058
- d[25] ||= s("忽略全部 ", -1),
1059
- E.value.remaining_difference_count ? (g(), i("span", gt, b(E.value.remaining_difference_count), 1)) : r("", !0)
1060
- ], 8, ht), a("button", {
1113
+ d[27] ||= s("忽略全部 ", -1),
1114
+ E.value.remaining_difference_count ? (g(), i("span", yt, b(E.value.remaining_difference_count), 1)) : r("", !0)
1115
+ ], 8, vt), a("button", {
1061
1116
  class: "batch-restore",
1062
1117
  disabled: l.reviewBusy || !E.value.ignored_difference_count,
1063
1118
  title: "撤销整个任务的所有忽略,包含当前筛选之外的差异",
1064
1119
  "aria-label": "撤销整个任务的所有差异忽略",
1065
- onClick: d[17] ||= (e) => T("ignore", null, !1)
1066
- }, [c(x(ie), { "aria-hidden": "true" }), d[26] ||= s("全部撤销 ", -1)], 8, _t)], 8, mt)) : r("", !0)
1120
+ onClick: d[18] ||= (e) => T("ignore", null, !1)
1121
+ }, [c(x(ie), { "aria-hidden": "true" }), d[28] ||= s("全部撤销 ", -1)], 8, bt)], 8, _t)) : r("", !0)
1067
1122
  ])]),
1068
1123
  y(t.$slots, "footer", {
1069
- activeIndex: A.value,
1124
+ activeIndex: j.value,
1070
1125
  review: E.value
1071
1126
  }, void 0, !0)
1072
1127
  ]));
1073
1128
  }
1074
- }), [["__scopeId", "data-v-0a63a0d3"]]);
1129
+ }), [["__scopeId", "data-v-9aa39b2f"]]);
1075
1130
  //#endregion
1076
- export { xt as OcrResultView };
1131
+ export { wt as OcrResultView };