@glodon-aiot/dataset-annotation 3.23.0-alpha.3 → 3.23.0-alpha.4

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.
@@ -10,27 +10,27 @@ var rt = (L, g, a) => g in L ? Wt(L, g, { enumerable: !0, configurable: !0, writ
10
10
  Zt.call(g, a) && rt(L, a, g[a]);
11
11
  return L;
12
12
  }, S = (L, g) => $t(L, jt(g));
13
- var Be = (L, g, a) => new Promise((J, me) => {
14
- var be = (x) => {
13
+ var Ee = (L, g, a) => new Promise((J, be) => {
14
+ var ve = (x) => {
15
15
  try {
16
- oe(a.next(x));
17
- } catch (le) {
18
- me(le);
16
+ re(a.next(x));
17
+ } catch (oe) {
18
+ be(oe);
19
19
  }
20
20
  }, N = (x) => {
21
21
  try {
22
- oe(a.throw(x));
23
- } catch (le) {
24
- me(le);
22
+ re(a.throw(x));
23
+ } catch (oe) {
24
+ be(oe);
25
25
  }
26
- }, oe = (x) => x.done ? J(x.value) : Promise.resolve(x.value).then(be, N);
27
- oe((a = a.apply(L, g)).next());
26
+ }, re = (x) => x.done ? J(x.value) : Promise.resolve(x.value).then(ve, N);
27
+ re((a = a.apply(L, g)).next());
28
28
  });
29
29
  import { jsx as c, jsxs as m, Fragment as ot } from "react/jsx-runtime";
30
- import { useRef as $, useState as p, useLayoutEffect as _t, useEffect as I, useCallback as Xt } from "react";
31
- import { message as D, ConfigProvider as Jt, Space as pe, Select as Qt, Button as ie, Dropdown as lt, Tabs as Yt, Checkbox as st, Col as en, Tooltip as tn, Empty as nn, Spin as rn, Modal as ke } from "antd";
30
+ import { useRef as j, useState as p, useLayoutEffect as _t, useEffect as I, useCallback as Xt } from "react";
31
+ import { message as D, ConfigProvider as Jt, Space as me, Select as Qt, Button as ne, Dropdown as lt, Tabs as Yt, Checkbox as st, Col as en, Tooltip as tn, Empty as nn, Spin as rn, Modal as xe } from "antd";
32
32
  import on from "rc-virtual-list";
33
- import { UploadZipsStatus as re, PreLabelTaskStatus as ln } from "@glodon-aiot/apis";
33
+ import { UploadZipsStatus as ie, PreLabelTaskStatus as ln } from "@glodon-aiot/apis";
34
34
  import sn from "antd/es/locale/zh_CN";
35
35
  import cn from "../../DatasetContext/index.mjs";
36
36
  import an from "./icon_item_empty.svg.mjs";
@@ -59,22 +59,22 @@ const ii = (L) => {
59
59
  services: g,
60
60
  datasetId: a,
61
61
  versionId: J,
62
- backTo: me,
63
- labelManager: be = !1,
62
+ backTo: be,
63
+ labelManager: ve = !1,
64
64
  datasetManager: N = !1,
65
- annotation: oe,
65
+ annotation: re,
66
66
  header: x = {
67
67
  versionSelect: !1
68
68
  },
69
- exampleSrcRoot: le
70
- } = L, se = b({}, In);
71
- Cn(se, L.filterSwitch);
72
- const ce = $(null), Le = $(null), [ft, ht] = p(0), [k, Me] = p(), [o, ae] = p(), [ve, ut] = p([]), [Fe, Oe] = p(!1), [de, He] = p(0), [fe, Ue] = p(0), [h, we] = p(""), [Q, qe] = p(0), [gt, pt] = p(), [Ke, De] = p(!1), [We, mt] = p(!1), [$e, bt] = p(!0), [vt, yt] = p(!1), [O, je] = p([]), [v, U] = p([]), [he, j] = p(!1), [Y, ue] = p(!1), [M, V] = p(-1), [u, R] = p(), [St, Ge] = p(), [f, z] = p(), [l, T] = p({
69
+ exampleSrcRoot: oe
70
+ } = L, le = b({}, In);
71
+ Cn(le, L.filterSwitch);
72
+ const se = j(null), ke = j(null), [ft, ht] = p(0), [k, Be] = p(), [o, ce] = p(), [ye, ut] = p([]), [Me, Fe] = p(!1), [ae, Oe] = p(0), [de, He] = p(0), [h, Le] = p(""), [Q, Ue] = p(0), [gt, pt] = p(), [qe, we] = p(!1), [Ke, mt] = p(!1), [We, bt] = p(!0), [vt, yt] = p(!1), [O, $e] = p([]), [v, U] = p([]), [fe, G] = p(!1), [Y, he] = p(!1), [M, V] = p(-1), [u, R] = p(), [St, je] = p(), [f, z] = p(), [l, T] = p({
73
73
  current: 0,
74
74
  pageSize: 100
75
- }), [W, Ne] = p([]), [G, Ct] = p(""), [It, xt] = p(!1), [Ze, _e] = p(), [ye, Re] = p(null), [H, Xe] = p(!1), [kt, Lt] = p(!1), [Dn, wt] = p(0), [Nn, Te] = p(""), [ee, Dt] = p(""), ge = $({}), Pe = $(!1), Se = $(0), Ce = $(0), Z = $(0), [P, Ve] = p(/* @__PURE__ */ new Set()), [Nt, Ie] = p(!1), Je = $(-1);
75
+ }), [W, De] = p([]), [Z, Ct] = p(""), [It, xt] = p(!1), [Ge, Ze] = p(), [Se, Ne] = p(null), [H, _e] = p(!1), [kt, Lt] = p(!1), [Dn, wt] = p(0), [Nn, Re] = p(""), [ue, Dt] = p(""), ge = j({}), Te = j(!1), pe = j(0), Xe = j(0), $ = j(0), [P, Pe] = p(/* @__PURE__ */ new Set()), [Nt, Ce] = p(!1), Je = j(-1);
76
76
  _t(() => {
77
- const e = ce.current;
77
+ const e = se.current;
78
78
  if (!e)
79
79
  return;
80
80
  let t = 0;
@@ -92,50 +92,50 @@ const ii = (L) => {
92
92
  cancelAnimationFrame(t), i == null || i.disconnect(), r == null || r.removeEventListener("resize", n), window.removeEventListener("resize", n);
93
93
  };
94
94
  }, [k]);
95
- const te = () => {
96
- R(void 0), z(void 0), V(-1), j(!1), q(), setTimeout(() => {
95
+ const ee = () => {
96
+ R(void 0), z(void 0), V(-1), G(!1), q(), setTimeout(() => {
97
97
  T((e) => S(b({}, e), {
98
98
  current: 1,
99
99
  type: void 0
100
100
  }));
101
101
  }, 10);
102
102
  };
103
- fn("Esc", te), I(() => {
103
+ fn("Esc", ee), I(() => {
104
104
  a && g.cvforceDatahub.getS3Iam(a).then((e) => {
105
105
  pt(e);
106
106
  });
107
107
  }, [a]), I(() => {
108
108
  w();
109
109
  }, [o == null ? void 0 : o.id]), I(() => {
110
- a && (Oe(!0), Promise.all([
110
+ a && (Fe(!0), Promise.all([
111
111
  // 数据集
112
112
  g.cvforceDatahub.getDatasetsId(a).then((e) => {
113
- Me(e);
113
+ Be(e);
114
114
  }),
115
115
  // 版本列表
116
116
  g.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
117
- ut(e.recordList), ae(J ? e.recordList.find((t) => t.id === J) : e.recordList[0]);
117
+ ut(e.recordList), ce(J ? e.recordList.find((t) => t.id === J) : e.recordList[0]);
118
118
  })
119
- ]).finally(() => Oe(!1)));
119
+ ]).finally(() => Fe(!1)));
120
120
  }, [a, J]);
121
121
  const Qe = () => {
122
122
  !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVid(a, o.id).then((e) => {
123
- ae(e), Ct(e.versionAsyncTask.state);
123
+ ce(e), Ct(e.versionAsyncTask.state);
124
124
  });
125
125
  };
126
126
  I(() => {
127
- G !== re.Pending && G !== re.Started || D.warning("文件导入中,请刷新页面再试");
128
- }, [G]), I(() => {
129
- ae(void 0), T(S(b({}, l), {
127
+ Z !== ie.Pending && Z !== ie.Started || D.warning("文件导入中,请刷新页面再试");
128
+ }, [Z]), I(() => {
129
+ ce(void 0), T(S(b({}, l), {
130
130
  current: 1
131
131
  })), U([]), Qe();
132
132
  }, [a, J]), I(() => {
133
133
  a && g.cvforceDatahub.getDatasetsId(a).then((e) => {
134
- Me(e);
134
+ Be(e);
135
135
  });
136
136
  }, [a]), I(() => {
137
- Se.current++, Ce.current++, Z.current++;
138
- }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, h, W, ee]), I(() => {
137
+ pe.current++, $.current++;
138
+ }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, h, W]), I(() => {
139
139
  q();
140
140
  }, [W, o, h]), I(() => {
141
141
  !o || !k || A(S(b({}, l), {
@@ -143,15 +143,15 @@ const ii = (L) => {
143
143
  })).then((e) => {
144
144
  });
145
145
  }, [k == null ? void 0 : k.id, o == null ? void 0 : o.id, W]), I(() => {
146
- if (Pe.current) {
147
- Pe.current = !1, w();
146
+ if (Te.current) {
147
+ Te.current = !1, w();
148
148
  return;
149
149
  }
150
150
  A().then((e) => {
151
151
  }), w();
152
152
  }, [l.current]), I(() => {
153
153
  H && w();
154
- }, [Ze]), I(() => {
154
+ }, [Ge]), I(() => {
155
155
  const e = ge.current[h];
156
156
  let t;
157
157
  e && e.page > 1 ? t = A(S(b({}, l), {
@@ -159,7 +159,7 @@ const ii = (L) => {
159
159
  pageSize: e.page * 100,
160
160
  // 假设默认pageSize为100
161
161
  total: void 0
162
- })).then((n) => (Pe.current = !0, T((i) => S(b({}, i), {
162
+ })).then((n) => (Te.current = !0, T((i) => S(b({}, i), {
163
163
  current: e.page,
164
164
  pageSize: 100
165
165
  })), n)) : t = A(S(b({}, l), {
@@ -183,9 +183,9 @@ const ii = (L) => {
183
183
  let e;
184
184
  if (!Y) {
185
185
  const n = u !== void 0, i = u == null ? void 0 : u.id, r = M;
186
- R(void 0), z(void 0), j(!1), V(-1), Ge(void 0), q(), n && ((t = Le.current) == null || t.fetchLabels()), w(), i !== void 0 && (e = requestAnimationFrame(() => {
186
+ R(void 0), z(void 0), G(!1), V(-1), je(void 0), q(), n && ((t = ke.current) == null || t.fetchLabels()), w(), i !== void 0 && (e = requestAnimationFrame(() => {
187
187
  var F, X;
188
- const s = (F = ce.current) == null ? void 0 : F.getElementsByClassName("rc-virtual-list-holder")[0];
188
+ const s = (F = se.current) == null ? void 0 : F.getElementsByClassName("rc-virtual-list-holder")[0];
189
189
  if (!s)
190
190
  return;
191
191
  const d = Array.from(s.querySelectorAll("[data-sample-id]")), y = (X = d.find((B) => B.dataset.sampleId === String(i))) != null ? X : r >= 0 ? d[r] : void 0;
@@ -202,7 +202,7 @@ const ii = (L) => {
202
202
  };
203
203
  }, [Y]);
204
204
  const Rt = Xt((e, t) => {
205
- Ge(e ? void 0 : t);
205
+ je(e ? void 0 : t);
206
206
  }, []);
207
207
  Ln({
208
208
  samples: v,
@@ -210,32 +210,32 @@ const ii = (L) => {
210
210
  active: Y,
211
211
  loadedImageUrl: St
212
212
  }), I(() => {
213
- yt(!$e && We);
214
- }, [$e, We]), I(() => {
213
+ yt(!We && Ke);
214
+ }, [We, Ke]), I(() => {
215
215
  if (!a) {
216
- ye && (clearTimeout(ye), Re(null)), _e(void 0);
216
+ Se && (clearTimeout(Se), Ne(null)), Ze(void 0);
217
217
  return;
218
218
  }
219
- Ae();
219
+ ze();
220
220
  }, [a, o == null ? void 0 : o.id]), I(() => {
221
- Ae();
222
- }, [It]), I(() => {
223
221
  ze();
222
+ }, [It]), I(() => {
223
+ Ve();
224
224
  }, [H, a, o]), I(() => {
225
- A(S(b({}, l), {
225
+ pe.current++, $.current++, A(S(b({}, l), {
226
226
  current: 1
227
227
  })), w();
228
- }, [ee]), I(() => {
229
- Te("");
228
+ }, [ue]), I(() => {
229
+ Re("");
230
230
  }, [u]), I(() => {
231
231
  if (v.length === 0) {
232
- Ie(!1);
232
+ Ce(!1);
233
233
  return;
234
234
  }
235
235
  const e = v.every((t) => P.has(t.id));
236
- Ie(e);
236
+ Ce(e);
237
237
  }, [v, P]);
238
- const ze = () => {
238
+ const Ve = () => {
239
239
  o && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, o.id, {
240
240
  pageNo: 1,
241
241
  pageSize: 1e3,
@@ -243,16 +243,16 @@ const ii = (L) => {
243
243
  }).then((e) => {
244
244
  wt(e.recordList.length);
245
245
  });
246
- }, Ae = () => {
246
+ }, ze = () => {
247
247
  !a || !o || g.cvforceDatahub.getPreLabelTask(a, o.id).then((e) => {
248
248
  const t = e[0];
249
- if (_e(t), ye && (clearTimeout(ye), Re(null)), !(t != null && t.state) || t.state !== ln.Started) {
250
- Xe(!1), w();
249
+ if (Ze(t), Se && (clearTimeout(Se), Ne(null)), !(t != null && t.state) || t.state !== ln.Started) {
250
+ _e(!1), w();
251
251
  return;
252
252
  } else
253
- Xe(!0);
254
- Re(setTimeout(() => {
255
- Ae();
253
+ _e(!0);
254
+ Ne(setTimeout(() => {
255
+ ze();
256
256
  }, 1e4));
257
257
  });
258
258
  };
@@ -263,7 +263,7 @@ const ii = (L) => {
263
263
  const n = (e == null ? void 0 : e.current) || l.current, i = (e == null ? void 0 : e.pageSize) || l.pageSize;
264
264
  if (!a || !o || !n)
265
265
  return Promise.resolve(!1);
266
- const r = Se.current, s = W.map((C) => C.label), d = () => {
266
+ const r = pe.current, s = W.map((C) => C.label), d = () => {
267
267
  switch (h) {
268
268
  case "nocode":
269
269
  return "nocode";
@@ -293,9 +293,9 @@ const ii = (L) => {
293
293
  pageSize: i,
294
294
  labels: d(),
295
295
  confirmStatus: y(),
296
- searchName: ee
296
+ searchName: ue
297
297
  }).then((C) => {
298
- if (r !== Se.current)
298
+ if (r !== pe.current)
299
299
  return !1;
300
300
  const E = C.recordList || [], K = n === 1 ? E : [...t || v, ...E];
301
301
  if (U(K), T(S(b({}, l), {
@@ -312,38 +312,38 @@ const ii = (L) => {
312
312
  const F = C.recordList[l.pageSize - 1];
313
313
  R(F);
314
314
  }
315
- return he && M < 0 && (V(0), R(E[0]), ue(!0)), K;
315
+ return fe && M < 0 && (V(0), R(E[0]), he(!0)), K;
316
316
  }).catch(() => !1);
317
317
  };
318
318
  I(() => {
319
319
  T(h === "nocode" ? S(b({}, l), {
320
- total: de
320
+ total: ae
321
321
  }) : h === "" ? S(b({}, l), {
322
322
  total: Q
323
323
  }) : h === "pending" ? S(b({}, l), {
324
- total: fe
324
+ total: de
325
325
  }) : S(b({}, l), {
326
- total: Q - de - fe
326
+ total: Q - ae - de
327
327
  }));
328
- }, [de, Q, fe]);
328
+ }, [ae, Q, de]);
329
329
  const w = () => {
330
330
  !a || !o || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
331
331
  label: "allcode",
332
332
  confirmStatus: 2,
333
- searchName: ee
333
+ searchName: ue
334
334
  }).then((e) => {
335
335
  const t = e.find((r) => r.id === "allcodeid"), n = e.find((r) => r.id === "nocodeid"), i = e.find((r) => r.id === "pendingid");
336
- qe(t ? t.count : 0), He(n ? n.count : 0), Ue(i ? i.count : 0);
336
+ Ue(t ? t.count : 0), Oe(n ? n.count : 0), He(i ? i.count : 0);
337
337
  });
338
338
  }, q = () => {
339
339
  if (!a || !(o != null && o.id))
340
340
  return;
341
- const e = Ce.current;
341
+ const e = ++Xe.current;
342
342
  let t = 2;
343
343
  return h === "pending" ? t = 1 : h === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, o.id, {
344
344
  confirmStatus: t
345
345
  }).then((n) => {
346
- if (e !== Ce.current)
346
+ if (e !== Xe.current)
347
347
  return;
348
348
  const r = (n || []).filter((s) => s.label !== "nocode").map((s, d) => {
349
349
  var y;
@@ -355,14 +355,14 @@ const ii = (L) => {
355
355
  color: ct[d % 40]
356
356
  };
357
357
  });
358
- return je(r), n;
358
+ return $e(r), n;
359
359
  });
360
360
  }, Tt = (e) => {
361
361
  if (!v)
362
362
  return;
363
- j(!1), V(e);
363
+ G(!1), V(e);
364
364
  const t = v[e];
365
- R(t), z(void 0), ue(!0), h !== void 0 && (ge.current[h] = {
365
+ R(t), z(void 0), he(!0), h !== void 0 && (ge.current[h] = {
366
366
  index: e,
367
367
  page: l.current || 1
368
368
  });
@@ -381,7 +381,7 @@ const ii = (L) => {
381
381
  }, [O]);
382
382
  const _ = (e, t, n, i) => {
383
383
  setTimeout(() => {
384
- i === Z.current && (V(t), R(e[t]), z(void 0), h !== void 0 && (ge.current[h] = {
384
+ i === $.current && (V(t), R(e[t]), z(void 0), h !== void 0 && (ge.current[h] = {
385
385
  index: t,
386
386
  page: n
387
387
  }));
@@ -389,12 +389,12 @@ const ii = (L) => {
389
389
  }, Ye = (e, t) => {
390
390
  if (!v)
391
391
  return;
392
- const n = ++Z.current;
393
- if (!he) {
392
+ const n = ++$.current;
393
+ if (!fe) {
394
394
  U((i) => {
395
395
  var y;
396
396
  if (!Array.isArray(i) || !i.length)
397
- return te(), i;
397
+ return ee(), i;
398
398
  const r = M + 1, d = !!W.length ? i.length : (y = l.total) != null ? y : i.length;
399
399
  return r >= i.length ? r >= d ? D.error("已经是最后一个了") : A({
400
400
  current: l.current + 1,
@@ -406,20 +406,20 @@ const ii = (L) => {
406
406
  });
407
407
  return;
408
408
  }
409
- return xe(e, t).then((i) => (i && n === Z.current && (console.log("action", t, "changedSample", f), w(), U((r) => {
409
+ return Ie(e, t).then((i) => (i && n === $.current && (console.log("action", t, "changedSample", f), w(), U((r) => {
410
410
  var d, y;
411
411
  let s;
412
412
  if (Array.isArray(r)) {
413
413
  if (!r.length)
414
- return te(), r;
414
+ return ee(), r;
415
415
  const C = h === "", E = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && h === "nocode", K = t !== "CONFIRM" && h === "pending", F = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && h === "hascode", X = C || K || F || E ? M + 1 : M;
416
416
  if (f) {
417
417
  if (f.labels.length && h === "nocode" || !f.labels.length && h === "hascode" || t === "CONFIRM" && h === "pending") {
418
- const B = r.findIndex((Ee) => Ee.id === f.id);
418
+ const B = r.findIndex((Ae) => Ae.id === f.id);
419
419
  B > -1 && (r.splice(B, 1), s = [...r], l.total && (l.total = l.total - 1));
420
420
  }
421
421
  } else if (t === "CONFIRM" && h === "pending") {
422
- const B = r.findIndex((Ee) => Ee.id === (u == null ? void 0 : u.id));
422
+ const B = r.findIndex((Ae) => Ae.id === (u == null ? void 0 : u.id));
423
423
  B > -1 && (r.splice(B, 1), s = [...r], l.total && (l.total = l.total - 1));
424
424
  }
425
425
  if (X >= r.length)
@@ -445,22 +445,22 @@ const ii = (L) => {
445
445
  }, Pt = (e) => {
446
446
  if (!v)
447
447
  return;
448
- const t = ++Z.current;
449
- if (!he) {
448
+ const t = ++$.current;
449
+ if (!fe) {
450
450
  U((n) => {
451
451
  if (!Array.isArray(n) || !n.length)
452
- return te(), n;
452
+ return ee(), n;
453
453
  const i = M - 1;
454
454
  return i < 0 ? D.error("已经是第一个了") : _(n, i, l.current || 1, t), n;
455
455
  });
456
456
  return;
457
457
  }
458
- xe(e).then((n) => {
459
- n && t === Z.current && (w(), U((i) => {
458
+ Ie(e).then((n) => {
459
+ n && t === $.current && (w(), U((i) => {
460
460
  let r;
461
461
  if (Array.isArray(i)) {
462
462
  if (!i.length)
463
- return te(), i;
463
+ return ee(), i;
464
464
  const s = M - 1;
465
465
  if (s < 0)
466
466
  s < 0 ? D.error("已经是第一个了") : T({
@@ -495,7 +495,7 @@ const ii = (L) => {
495
495
  current: ((F = K.current) != null ? F : 0) + 1
496
496
  });
497
497
  });
498
- }, xe = (e, t) => {
498
+ }, Ie = (e, t) => {
499
499
  var n, i;
500
500
  if (!o)
501
501
  return Promise.resolve(!1);
@@ -536,14 +536,14 @@ const ii = (L) => {
536
536
  return;
537
537
  }
538
538
  if (!f) {
539
- j(!1);
539
+ G(!1);
540
540
  return;
541
541
  }
542
- xe(e).then((t) => {
543
- t && (z(void 0), j(!1), w(), q());
542
+ Ie(e).then((t) => {
543
+ t && (z(void 0), G(!1), w(), q());
544
544
  });
545
545
  }, Bt = () => {
546
- ke.confirm({
546
+ xe.confirm({
547
547
  title: "确认要删除当前数据吗?",
548
548
  content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
549
549
  onOk: () => {
@@ -553,7 +553,7 @@ const ii = (L) => {
553
553
  const t = v.length;
554
554
  U([...v]), T(S(b({}, l), {
555
555
  total: l.total ? l.total - 1 : 0
556
- })), e <= v.length - 1 ? R(v[e]) : (R(v[e - 1]), V(e - 1)), w(), z(void 0), (t === 0 || l.total && l.total - 1 === 0) && (R(void 0), z(void 0), V(-1), he || ue(!1), setTimeout(() => {
556
+ })), e <= v.length - 1 ? R(v[e]) : (R(v[e - 1]), V(e - 1)), w(), z(void 0), (t === 0 || l.total && l.total - 1 === 0) && (R(void 0), z(void 0), V(-1), fe || he(!1), setTimeout(() => {
557
557
  T((n) => S(b({}, n), {
558
558
  current: 1,
559
559
  type: void 0
@@ -568,37 +568,37 @@ const ii = (L) => {
568
568
  children: null
569
569
  }, {
570
570
  key: "nocode",
571
- label: `未标注(${de})`,
571
+ label: `未标注(${ae})`,
572
572
  children: null
573
573
  }, {
574
574
  key: "pending",
575
- label: `待确认(${fe})`,
575
+ label: `待确认(${de})`,
576
576
  children: null
577
577
  }, {
578
578
  key: "hascode",
579
- label: `已标注(${Q - de - fe})`,
579
+ label: `已标注(${Q - ae - de})`,
580
580
  children: null
581
581
  }], Mt = () => {
582
582
  var e, t;
583
- (t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
583
+ (t = (e = se.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
584
584
  top: 0
585
585
  });
586
586
  }, Ft = (e) => {
587
- Dt(e), ne();
587
+ Dt(e), te();
588
588
  }, tt = (e) => {
589
- Se.current++, Ce.current++, Z.current++, M >= 0 && h !== void 0 && h !== null && (ge.current[h] = {
589
+ pe.current++, $.current++, M >= 0 && h !== void 0 && h !== null && (ge.current[h] = {
590
590
  index: M,
591
591
  page: l.current || 1
592
- }), ne(), f ? xe(f == null ? void 0 : f.confirmStatus).then((t) => {
593
- t ? (we(e), w()) : D.error("保存失败");
592
+ }), te(), f ? Ie(f == null ? void 0 : f.confirmStatus).then((t) => {
593
+ t ? (Le(e), w()) : D.error("保存失败");
594
594
  }) : (T(S(b({}, l), {
595
595
  current: 1,
596
596
  total: void 0
597
- })), we(e)), e === "nocode" && Ne([]);
597
+ })), Le(e)), e === "nocode" && De([]);
598
598
  }, Ot = () => {
599
599
  if (console.log("一键确认", g, o), !(g != null && g.cvforceDatahub) || !(o != null && o.id))
600
600
  return Promise.resolve(!1);
601
- ke.confirm({
601
+ xe.confirm({
602
602
  title: "一键保存所有标注?",
603
603
  content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
604
604
  onOk: () => {
@@ -611,16 +611,16 @@ const ii = (L) => {
611
611
  });
612
612
  }, Ht = (e, t) => {
613
613
  const n = new Set(P);
614
- t ? n.add(e) : n.delete(e), Ve(n);
614
+ t ? n.add(e) : n.delete(e), Pe(n);
615
615
  }, Ut = (e) => {
616
616
  const t = new Set(P);
617
617
  e ? v.forEach((n) => {
618
618
  t.add(n.id);
619
619
  }) : v.forEach((n) => {
620
620
  t.delete(n.id);
621
- }), Ve(t), Ie(e);
622
- }, ne = () => {
623
- Ve(/* @__PURE__ */ new Set()), Ie(!1);
621
+ }), Pe(t), Ce(e);
622
+ }, te = () => {
623
+ Pe(/* @__PURE__ */ new Set()), Ce(!1);
624
624
  }, nt = () => {
625
625
  const e = v.filter((n) => P.has(n.id)), t = {
626
626
  nocode: 0,
@@ -713,13 +713,13 @@ const ii = (L) => {
713
713
  children: "彻底移除选中的图片文件及其关联的所有标注坐标、标签信息。数据不可恢复。"
714
714
  })]
715
715
  });
716
- ke.confirm({
716
+ xe.confirm({
717
717
  title: "删除操作确认",
718
718
  content: r,
719
719
  okText: "确定",
720
720
  cancelText: "取消",
721
721
  width: 500,
722
- onOk: () => Be(void 0, null, function* () {
722
+ onOk: () => Ee(void 0, null, function* () {
723
723
  if (!o)
724
724
  return;
725
725
  const s = Array.from(P);
@@ -728,7 +728,7 @@ const ii = (L) => {
728
728
  return;
729
729
  }
730
730
  try {
731
- yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, s), D.success("删除成功"), ne(), A(S(b({}, l), {
731
+ yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, o.id, s), D.success("删除成功"), te(), A(S(b({}, l), {
732
732
  current: 1
733
733
  })), w(), q();
734
734
  } catch (d) {
@@ -816,13 +816,13 @@ const ii = (L) => {
816
816
  children: '保留图片文件,仅删除其内部的标注框(含 AI 预标注)。删除后图片状态变更为"未标注"。'
817
817
  })]
818
818
  });
819
- ke.confirm({
819
+ xe.confirm({
820
820
  title: "删除操作确认",
821
821
  content: r,
822
822
  okText: "确定",
823
823
  cancelText: "取消",
824
824
  width: 500,
825
- onOk: () => Be(void 0, null, function* () {
825
+ onOk: () => Ee(void 0, null, function* () {
826
826
  if (!o)
827
827
  return;
828
828
  const s = v.filter((d) => P.has(d.id));
@@ -836,7 +836,7 @@ const ii = (L) => {
836
836
  confirmStatus: 0,
837
837
  isLabeled: !1
838
838
  }));
839
- yield g.cvforceDatahub.updateSamples(a, o.id, d, 0), D.success("清除标注成功"), ne(), A(S(b({}, l), {
839
+ yield g.cvforceDatahub.updateSamples(a, o.id, d, 0), D.success("清除标注成功"), te(), A(S(b({}, l), {
840
840
  current: 1
841
841
  })), w(), q();
842
842
  } catch (d) {
@@ -852,19 +852,19 @@ const ii = (L) => {
852
852
  datasetId: a,
853
853
  versionId: (o == null ? void 0 : o.id) || "",
854
854
  no: (o == null ? void 0 : o.no) || "",
855
- loading: Fe,
855
+ loading: Me,
856
856
  version: o,
857
- versions: ve,
857
+ versions: ye,
858
858
  samples: v,
859
859
  pagination: l,
860
860
  services: g,
861
861
  featuresConfig: {
862
- labelManager: be,
862
+ labelManager: ve,
863
863
  datasetManager: N,
864
- annotation: oe,
865
- filterSwitch: se,
864
+ annotation: re,
865
+ filterSwitch: le,
866
866
  header: x,
867
- exampleSrcRoot: le
867
+ exampleSrcRoot: oe
868
868
  }
869
869
  },
870
870
  children: k ? k.markType === "detection" ? /* @__PURE__ */ c("div", {
@@ -873,19 +873,19 @@ const ii = (L) => {
873
873
  datasetId: a,
874
874
  versionId: o.id,
875
875
  onClose: () => {
876
- Lt(!1), ze(), q(), w(), A();
876
+ Lt(!1), Ve(), q(), w(), A();
877
877
  },
878
878
  samples: v,
879
879
  labels: O,
880
- fetchLength: ze
880
+ fetchLength: Ve
881
881
  }) : null : /* @__PURE__ */ m(gn, {
882
882
  className: "product-details-page",
883
883
  header: x === !1 ? void 0 : /* @__PURE__ */ c(mn, {
884
- backTo: me,
884
+ backTo: be,
885
885
  onBackClick: x != null && x.onBackClick ? () => {
886
- u && te(), x.onBackClick && x.onBackClick();
886
+ u && ee(), x.onBackClick && x.onBackClick();
887
887
  } : void 0,
888
- left: !Fe && /* @__PURE__ */ m(pe, {
888
+ left: !Me && /* @__PURE__ */ m(me, {
889
889
  children: [/* @__PURE__ */ c("span", {
890
890
  style: {
891
891
  fontWeight: "bold"
@@ -897,27 +897,27 @@ const ii = (L) => {
897
897
  style: {
898
898
  width: 70
899
899
  },
900
- options: ve.map((e) => ({
900
+ options: ye.map((e) => ({
901
901
  label: e.no,
902
902
  value: e.id
903
903
  })),
904
904
  onChange: (e) => {
905
- const t = ve.find((i) => i.id === e);
905
+ const t = ye.find((i) => i.id === e);
906
906
  if (!k || !t)
907
907
  return;
908
- const n = ve.find((i) => i.id === t.id);
909
- ae(n), ne(), x != null && x.onVersionChange && x.onVersionChange(n);
908
+ const n = ye.find((i) => i.id === t.id);
909
+ ce(n), te(), x != null && x.onVersionChange && x.onVersionChange(n);
910
910
  }
911
911
  })]
912
912
  }),
913
- right: /* @__PURE__ */ m(pe, {
913
+ right: /* @__PURE__ */ m(me, {
914
914
  children: [!u && N && N.add && /* @__PURE__ */ c(at, {
915
915
  isPreLabel: H,
916
916
  placement: "bottom",
917
- children: /* @__PURE__ */ c(ie, {
917
+ children: /* @__PURE__ */ c(ne, {
918
918
  type: "default",
919
- onClick: () => De(!0),
920
- disabled: G === re.Pending || G === re.Started || H,
919
+ onClick: () => we(!0),
920
+ disabled: Z === ie.Pending || Z === ie.Started || H,
921
921
  children: "导入数据"
922
922
  }, "del")
923
923
  }), /* @__PURE__ */ c(lt, {
@@ -926,12 +926,12 @@ const ii = (L) => {
926
926
  key: "manual",
927
927
  label: /* @__PURE__ */ c(at, {
928
928
  isPreLabel: H,
929
- children: /* @__PURE__ */ c(pe, {
930
- children: N && N.label && /* @__PURE__ */ c(ie, {
929
+ children: /* @__PURE__ */ c(me, {
930
+ children: N && N.label && /* @__PURE__ */ c(ne, {
931
931
  type: "text",
932
932
  disabled: H,
933
933
  onClick: () => {
934
- u || we("nocode"), j(!0), V(-1), h === "nocode" && (V(0), R(v[0])), ue(!0);
934
+ u || Le("nocode"), G(!0), V(-1), h === "nocode" && (V(0), R(v[0])), he(!0);
935
935
  },
936
936
  children: "人工标注"
937
937
  })
@@ -946,12 +946,12 @@ const ii = (L) => {
946
946
  disabled: !v.length,
947
947
  setIsTaskChange: xt,
948
948
  datasetType: "detection",
949
- preLabelTask: Ze
949
+ preLabelTask: Ge
950
950
  })
951
951
  } : null]
952
952
  },
953
953
  placement: "bottom",
954
- children: /* @__PURE__ */ m(ie, {
954
+ children: /* @__PURE__ */ m(ne, {
955
955
  type: "primary",
956
956
  children: ["开始标注", /* @__PURE__ */ c(dt, {})]
957
957
  })
@@ -959,13 +959,13 @@ const ii = (L) => {
959
959
  when: vt,
960
960
  content: "确认要离开此页面吗?",
961
961
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
962
- }), Ke && /* @__PURE__ */ c(pn, {
962
+ }), qe && /* @__PURE__ */ c(pn, {
963
963
  datasetIam: gt,
964
964
  datasetId: a,
965
965
  currentVersion: o,
966
966
  tenCode: k == null ? void 0 : k.tenantCode,
967
- isVisible: Ke,
968
- setIsVisible: De,
967
+ isVisible: qe,
968
+ setIsVisible: we,
969
969
  getVersionListRequest: w,
970
970
  setIsConfirm: bt,
971
971
  onUploadStatusChange: (e) => {
@@ -973,11 +973,11 @@ const ii = (L) => {
973
973
  },
974
974
  tableReload: () => {
975
975
  var e, t, n;
976
- o != null && o.id && ((t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
976
+ o != null && o.id && ((t = (e = se.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
977
977
  top: 0
978
978
  }), A(S(b({}, l), {
979
979
  current: 1
980
- })), (n = Le.current) == null || n.fetchLabels());
980
+ })), (n = ke.current) == null || n.fetchLabels());
981
981
  },
982
982
  loadVersionData: Qe,
983
983
  markType: k.markType
@@ -986,19 +986,19 @@ const ii = (L) => {
986
986
  }),
987
987
  children: [/* @__PURE__ */ m("div", {
988
988
  className: "detection-header",
989
- children: [/* @__PURE__ */ m(pe, {
990
- children: [se.tabs && /* @__PURE__ */ c(Yt, {
989
+ children: [/* @__PURE__ */ m(me, {
990
+ children: [le.tabs && /* @__PURE__ */ c(Yt, {
991
991
  className: "header-tab",
992
992
  activeKey: h,
993
993
  items: et,
994
994
  onChange: tt
995
- }), !u && se.search && /* @__PURE__ */ c(vn, {
995
+ }), !u && le.search && /* @__PURE__ */ c(vn, {
996
996
  placeholder: "请输入图片名称搜索",
997
997
  style: {
998
998
  width: 200
999
999
  },
1000
1000
  suffix: /* @__PURE__ */ c(un, {}),
1001
- value: ee,
1001
+ value: ue,
1002
1002
  onChange: Ft,
1003
1003
  allowClear: !0
1004
1004
  }), !u && /* @__PURE__ */ c(lt, {
@@ -1014,7 +1014,7 @@ const ii = (L) => {
1014
1014
  }]
1015
1015
  },
1016
1016
  disabled: P.size === 0,
1017
- children: /* @__PURE__ */ m(ie, {
1017
+ children: /* @__PURE__ */ m(ne, {
1018
1018
  size: "middle",
1019
1019
  disabled: P.size === 0,
1020
1020
  children: ["删除", /* @__PURE__ */ c(dt, {})]
@@ -1031,8 +1031,8 @@ const ii = (L) => {
1031
1031
  children: ["已选中", P.size, "张,共", l.total || 0, "张"]
1032
1032
  })]
1033
1033
  })]
1034
- }), /* @__PURE__ */ c(pe, {
1035
- children: h === "pending" && /* @__PURE__ */ c(ie, {
1034
+ }), /* @__PURE__ */ c(me, {
1035
+ children: h === "pending" && /* @__PURE__ */ c(ne, {
1036
1036
  type: "primary",
1037
1037
  className: "pending-confirm-button",
1038
1038
  onClick: Ot,
@@ -1043,14 +1043,14 @@ const ii = (L) => {
1043
1043
  className: "d-row",
1044
1044
  children: [/* @__PURE__ */ m("div", {
1045
1045
  className: "d-right",
1046
- ref: ce,
1046
+ ref: se,
1047
1047
  children: [Y && /* @__PURE__ */ c(kn, {
1048
1048
  datasetId: a,
1049
1049
  isImageDetailVisible: Y,
1050
- setIsImageDetailVisible: ue,
1050
+ setIsImageDetailVisible: he,
1051
1051
  currentSample: f != null ? f : u,
1052
1052
  labels: O,
1053
- previewMode: !he,
1053
+ previewMode: !fe,
1054
1054
  filterItems: et,
1055
1055
  filterMode: h,
1056
1056
  onFilterChange: tt,
@@ -1060,7 +1060,7 @@ const ii = (L) => {
1060
1060
  onSave: (e, t) => At(e, t),
1061
1061
  onDeleteSample: () => Bt(),
1062
1062
  onEnterEdit: () => {
1063
- j(!0);
1063
+ G(!0);
1064
1064
  },
1065
1065
  onBackToDetail: (e) => Et(e),
1066
1066
  onLoadingChange: Rt,
@@ -1087,7 +1087,7 @@ const ii = (L) => {
1087
1087
  total: Q,
1088
1088
  index: M + 1
1089
1089
  },
1090
- settingHide: !be,
1090
+ settingHide: !ve,
1091
1091
  canLabel: !!(N && N.label),
1092
1092
  canDelete: !!(N && N.delete)
1093
1093
  }), l.total !== void 0 && l.total > 0 ? /* @__PURE__ */ c(ot, {
@@ -1106,8 +1106,8 @@ const ii = (L) => {
1106
1106
  "data-sample-id": e.id,
1107
1107
  children: /* @__PURE__ */ m("div", {
1108
1108
  className: "right-col-wrapper",
1109
- onMouseEnter: () => Te(e.id),
1110
- onMouseLeave: () => Te(""),
1109
+ onMouseEnter: () => Re(e.id),
1110
+ onMouseLeave: () => Re(""),
1111
1111
  children: [/* @__PURE__ */ c("div", {
1112
1112
  className: "detection-status-wrapper",
1113
1113
  children: /* @__PURE__ */ c(xn, {
@@ -1180,15 +1180,15 @@ const ii = (L) => {
1180
1180
  children: l.total === 0 ? /* @__PURE__ */ c(nn, {
1181
1181
  image: an,
1182
1182
  description: /* @__PURE__ */ m("span", {
1183
- children: ["暂无数据", h !== "hascode" && !ee && /* @__PURE__ */ c("span", {
1184
- children: N && N.add && /* @__PURE__ */ m(ie, {
1183
+ children: ["暂无数据", h !== "hascode" && !ue && /* @__PURE__ */ c("span", {
1184
+ children: N && N.add && /* @__PURE__ */ m(ne, {
1185
1185
  type: "link",
1186
1186
  size: "small",
1187
1187
  style: {
1188
1188
  padding: 0
1189
1189
  },
1190
- onClick: () => De(!0),
1191
- disabled: G === re.Pending || G === re.Started,
1190
+ onClick: () => we(!0),
1191
+ disabled: Z === ie.Pending || Z === ie.Started,
1192
1192
  children: [/* @__PURE__ */ c("span", {
1193
1193
  style: {
1194
1194
  color: "black"
@@ -1200,16 +1200,16 @@ const ii = (L) => {
1200
1200
  })
1201
1201
  }) : /* @__PURE__ */ c(rn, {})
1202
1202
  })]
1203
- }), h !== "nocode" && se.labels && /* @__PURE__ */ c("div", {
1203
+ }), h !== "nocode" && le.labels && /* @__PURE__ */ c("div", {
1204
1204
  className: "d-sider",
1205
1205
  children: /* @__PURE__ */ c(dn, {
1206
- ref: Le,
1206
+ ref: ke,
1207
1207
  datasetId: a,
1208
1208
  data: O || [],
1209
1209
  showStatColumns: !0,
1210
1210
  selected: W,
1211
1211
  onSelectedChange: (e) => {
1212
- ne(), Ne((O == null ? void 0 : O.filter((t) => e.find((n) => n.label === t.label))) || []);
1212
+ te(), De((O == null ? void 0 : O.filter((t) => e.find((n) => n.label === t.label))) || []);
1213
1213
  },
1214
1214
  onListChange: (e) => {
1215
1215
  if (!o)
@@ -1228,7 +1228,7 @@ const ii = (L) => {
1228
1228
  color: ct[y % 40]
1229
1229
  };
1230
1230
  }), s = W.filter((d) => r.some((y) => y.id === d.id));
1231
- je(r), W.length !== s.length && Ne(s);
1231
+ $e(r), W.length !== s.length && De(s);
1232
1232
  }), w();
1233
1233
  },
1234
1234
  isPreLabel: H