@glodon-aiot/dataset-annotation 3.25.0 → 3.25.1-alpha.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.
@@ -1,16 +1,16 @@
1
- var Yt = Object.defineProperty, en = Object.defineProperties;
2
- var tn = Object.getOwnPropertyDescriptors;
3
- var at = Object.getOwnPropertySymbols;
4
- var nn = Object.prototype.hasOwnProperty, rn = Object.prototype.propertyIsEnumerable;
5
- var dt = (w, g, a) => g in w ? Yt(w, g, { enumerable: !0, configurable: !0, writable: !0, value: a }) : w[g] = a, b = (w, g) => {
6
- for (var a in g || (g = {}))
7
- nn.call(g, a) && dt(w, a, g[a]);
8
- if (at)
9
- for (var a of at(g))
10
- rn.call(g, a) && dt(w, a, g[a]);
1
+ var en = Object.defineProperty, tn = Object.defineProperties;
2
+ var nn = Object.getOwnPropertyDescriptors;
3
+ var dt = Object.getOwnPropertySymbols;
4
+ var rn = Object.prototype.hasOwnProperty, on = Object.prototype.propertyIsEnumerable;
5
+ var ft = (w, h, a) => h in w ? en(w, h, { enumerable: !0, configurable: !0, writable: !0, value: a }) : w[h] = a, p = (w, h) => {
6
+ for (var a in h || (h = {}))
7
+ rn.call(h, a) && ft(w, a, h[a]);
8
+ if (dt)
9
+ for (var a of dt(h))
10
+ on.call(h, a) && ft(w, a, h[a]);
11
11
  return w;
12
- }, S = (w, g) => en(w, tn(g));
13
- var He = (w, g, a) => new Promise((Q, ye) => {
12
+ }, S = (w, h) => tn(w, nn(h));
13
+ var Ue = (w, h, a) => new Promise((Y, ye) => {
14
14
  var Se = (I) => {
15
15
  try {
16
16
  oe(a.next(I));
@@ -23,43 +23,43 @@ var He = (w, g, a) => new Promise((Q, ye) => {
23
23
  } catch (le) {
24
24
  ye(le);
25
25
  }
26
- }, oe = (I) => I.done ? Q(I.value) : Promise.resolve(I.value).then(Se, T);
27
- oe((a = a.apply(w, g)).next());
26
+ }, oe = (I) => I.done ? Y(I.value) : Promise.resolve(I.value).then(Se, T);
27
+ oe((a = a.apply(w, h)).next());
28
28
  });
29
- import { jsx as s, jsxs as p, Fragment as ft } from "react/jsx-runtime";
30
- import { useRef as W, useState as m, useLayoutEffect as on, useEffect as C, useCallback as ln } from "react";
31
- import { message as k, ConfigProvider as sn, Space as ve, Select as cn, Button as re, Dropdown as ut, Tabs as an, Checkbox as ht, Col as dn, Tooltip as fn, Empty as un, Spin as hn, Modal as Ne } from "antd";
32
- import gn from "rc-virtual-list";
33
- import { UploadZipsStatus as ie, PreLabelTaskStatus as mn } from "@glodon-aiot/apis";
34
- import pn from "antd/es/locale/zh_CN";
35
- import bn from "../../DatasetContext/index.mjs";
36
- import vn from "./icon_item_empty.svg.mjs";
29
+ import { jsx as c, jsxs as b, Fragment as ut } from "react/jsx-runtime";
30
+ import { useRef as H, useState as g, useLayoutEffect as ln, useEffect as C, useCallback as sn } from "react";
31
+ import { message as k, ConfigProvider as cn, Space as ve, Select as an, Button as re, Dropdown as ht, Tabs as dn, Checkbox as gt, Col as fn, Tooltip as un, Empty as hn, Spin as gn, Modal as Re } from "antd";
32
+ import mn from "rc-virtual-list";
33
+ import { UploadZipsStatus as ie, PreLabelTaskStatus as pn } from "@glodon-aiot/apis";
34
+ import bn from "antd/es/locale/zh_CN";
35
+ import vn from "../../DatasetContext/index.mjs";
36
+ import yn from "./icon_item_empty.svg.mjs";
37
37
  import "./style.less.mjs";
38
- import { tagColors as gt } from "../../utils/index.mjs";
39
- import { scrollSampleIntoView as yn, getVirtualListHolder as Sn } from "../../utils/scrollSampleIntoView.mjs";
40
- import Cn from "./components/Labels/index.mjs";
41
- import { useKeyPress as In } from "ahooks";
42
- import mt from "./components/DisabledTooltip/index.mjs";
43
- import xn from "./PreSamplesPage/index.mjs";
44
- import { DownOutlined as pt, SearchOutlined as kn } from "@ant-design/icons";
45
- import wn from "../../Common/Page/index.mjs";
46
- import Ln from "../PicZipImportModal/index.mjs";
47
- import Dn from "../PageNav/index.mjs";
48
- import Nn from "../Thumbnail/index.mjs";
38
+ import { tagColors as mt } from "../../utils/index.mjs";
39
+ import { scrollSampleIntoView as Sn, getVirtualListHolder as Cn } from "../../utils/scrollSampleIntoView.mjs";
40
+ import In from "./components/Labels/index.mjs";
41
+ import { useKeyPress as xn } from "ahooks";
42
+ import pt from "./components/DisabledTooltip/index.mjs";
43
+ import kn from "./PreSamplesPage/index.mjs";
44
+ import { DownOutlined as bt, SearchOutlined as wn } from "@ant-design/icons";
45
+ import Ln from "../../Common/Page/index.mjs";
46
+ import Dn from "../PicZipImportModal/index.mjs";
47
+ import Nn from "../PageNav/index.mjs";
48
+ import Rn from "../Thumbnail/index.mjs";
49
49
  import Tn from "../CompositionInput/index.mjs";
50
- import { Prompt as Rn } from "../hooks/Prompt.mjs";
51
- import Pn from "../PreLabelOCR/index.mjs";
52
- import Vn from "lodash/merge";
53
- import { DEFAULT_FILTER_SWITCH as zn } from "../../constant.mjs";
54
- import An from "../DetectionStatus/index.mjs";
55
- import En from "./components/ImageModal/index.mjs";
56
- import Fn from "./hooks/useSamplePreload.mjs";
57
- var Bn = /* @__PURE__ */ ((w) => (w.Next = "NEXT", w.Prev = "PREV", w.Confirm = "CONFIRM", w.Save = "Save", w))(Bn || {});
58
- const mr = (w) => {
50
+ import { Prompt as Pn } from "../hooks/Prompt.mjs";
51
+ import Vn from "../PreLabelOCR/index.mjs";
52
+ import zn from "lodash/merge";
53
+ import { DEFAULT_FILTER_SWITCH as An } from "../../constant.mjs";
54
+ import En from "../DetectionStatus/index.mjs";
55
+ import Fn from "./components/ImageModal/index.mjs";
56
+ import Bn from "./hooks/useSamplePreload.mjs";
57
+ var Mn = /* @__PURE__ */ ((w) => (w.Next = "NEXT", w.Prev = "PREV", w.Confirm = "CONFIRM", w.Save = "Save", w))(Mn || {});
58
+ const pr = (w) => {
59
59
  const {
60
- services: g,
60
+ services: h,
61
61
  datasetId: a,
62
- versionId: Q,
62
+ versionId: Y,
63
63
  backTo: ye,
64
64
  labelManager: Se = !1,
65
65
  datasetManager: T = !1,
@@ -68,21 +68,23 @@ const mr = (w) => {
68
68
  versionSelect: !1
69
69
  },
70
70
  exampleSrcRoot: le
71
- } = w, se = b({}, zn);
72
- Vn(se, w.filterSwitch);
73
- const Ce = !!(T && T.delete), G = !!(T && T.label), Te = Ce || G, ce = W(null), Re = W(null), [bt, vt] = m(0), [x, Ue] = m(), [l, ae] = m(), [Ie, yt] = m([]), [qe, Ke] = m(!1), [de, We] = m(0), [fe, $e] = m(0), [u, Pe] = m(""), [Y, je] = m(0), [St, Ct] = m(), [Ge, Ve] = m(!1), [Ze, It] = m(!1), [_e, xt] = m(!0), [kt, wt] = m(!1), [B, Xe] = m([]), [v, H] = m([]), [ue, Z] = m(!1), [ee, he] = m(!1), [F, z] = m(-1), [h, N] = m(), [Lt, Je] = m(), [Dt, xe] = m(!1), [f, A] = m(), [o, R] = m({
71
+ } = w, se = p({}, An);
72
+ zn(se, w.filterSwitch);
73
+ const Ce = !!(T && T.delete), G = !!(T && T.label), Te = Ce || G, ce = H(null), Pe = H(null), [vt, yt] = g(0), [x, qe] = g(), [l, ae] = g(), [Ie, St] = g([]), [Ke, We] = g(!1), [de, $e] = g(0), [fe, je] = g(0), [u, Ve] = g(""), [ee, Ge] = g(0), [Ct, It] = g(), [Ze, ze] = g(!1), [_e, xt] = g(!1), [Xe, kt] = g(!0), [wt, Lt] = g(!1), [B, Je] = g([]), [v, U] = g([]), [ue, Z] = g(!1), [_, he] = g(!1), [F, z] = g(-1), [m, N] = g(), [Dt, Qe] = g(), [Nt, xe] = g(!1), [f, A] = g(), [o, R] = g({
74
74
  current: 0,
75
75
  pageSize: 100
76
- }), [$, ze] = m([]), [_, Nt] = m(""), [Tt, Rt] = m(!1), [Qe, Ye] = m(), [ke, Ae] = m(null), [M, et] = m(!1), [Pt, Vt] = m(!1), [Mn, zt] = m(0), [On, Ee] = m(""), [ge, At] = m(""), X = W({}), me = W(void 0), we = W(!1), pe = W(0), tt = W(0), U = W(0), [P, Fe] = m(/* @__PURE__ */ new Set()), [Et, Le] = m(!1), nt = W(-1);
77
- on(() => {
76
+ }), [$, Ae] = g([]), [X, Rt] = g(""), [Tt, Pt] = g(!1), [Ye, et] = g(), [ke, Ee] = g(null), [M, tt] = g(!1), [Vt, zt] = g(!1), [On, At] = g(0), [Hn, Fe] = g(""), [ge, Et] = g(""), J = H({}), me = H(void 0), we = H(!1), pe = H(0), nt = H(0), q = H(0), Le = H(_);
77
+ Le.current = _;
78
+ const [P, Be] = g(/* @__PURE__ */ new Set()), [Ft, De] = g(!1), rt = H(-1);
79
+ ln(() => {
78
80
  const e = ce.current;
79
81
  if (!e)
80
82
  return;
81
83
  let t = 0;
82
84
  const n = () => {
83
85
  cancelAnimationFrame(t), t = requestAnimationFrame(() => {
84
- const c = e.clientHeight, d = Math.max(1, Math.round(c));
85
- d !== nt.current && (nt.current = d, vt(d));
86
+ const s = e.clientHeight, d = Math.max(1, Math.round(s));
87
+ d !== rt.current && (rt.current = d, yt(d));
86
88
  });
87
89
  };
88
90
  n();
@@ -94,52 +96,52 @@ const mr = (w) => {
94
96
  };
95
97
  }, [x]);
96
98
  const te = () => {
97
- N(void 0), A(void 0), z(-1), Z(!1), q(), setTimeout(() => {
98
- R((e) => S(b({}, e), {
99
+ N(void 0), A(void 0), z(-1), Z(!1), K(), setTimeout(() => {
100
+ R((e) => S(p({}, e), {
99
101
  current: 1,
100
102
  type: void 0
101
103
  }));
102
104
  }, 10);
103
105
  };
104
- In("Esc", te), C(() => {
105
- a && g.cvforceDatahub.getS3Iam(a).then((e) => {
106
- Ct(e);
106
+ xn("Esc", te), C(() => {
107
+ a && h.cvforceDatahub.getS3Iam(a).then((e) => {
108
+ It(e);
107
109
  });
108
110
  }, [a]), C(() => {
109
111
  L();
110
112
  }, [l == null ? void 0 : l.id]), C(() => {
111
- a && (Ke(!0), Promise.all([
113
+ a && (We(!0), Promise.all([
112
114
  // 数据集
113
- g.cvforceDatahub.getDatasetsId(a).then((e) => {
114
- Ue(e);
115
+ h.cvforceDatahub.getDatasetsId(a).then((e) => {
116
+ qe(e);
115
117
  }),
116
118
  // 版本列表
117
- g.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
118
- yt(e.recordList), ae(Q ? e.recordList.find((t) => t.id === Q) : e.recordList[0]);
119
+ h.cvforceDatahub.getDatasetsIdVersions(a, 1, 1e3).then((e) => {
120
+ St(e.recordList), ae(Y ? e.recordList.find((t) => t.id === Y) : e.recordList[0]);
119
121
  })
120
- ]).finally(() => Ke(!1)));
121
- }, [a, Q]);
122
- const rt = () => {
123
- !a || !l || g.cvforceDatahub.getDatasetsIdVersionsVid(a, l.id).then((e) => {
124
- ae(e), Nt(e.versionAsyncTask.state);
122
+ ]).finally(() => We(!1)));
123
+ }, [a, Y]);
124
+ const it = () => {
125
+ !a || !l || h.cvforceDatahub.getDatasetsIdVersionsVid(a, l.id).then((e) => {
126
+ ae(e), Rt(e.versionAsyncTask.state);
125
127
  });
126
128
  };
127
129
  C(() => {
128
- _ !== ie.Pending && _ !== ie.Started || k.warning("文件导入中,请刷新页面再试");
129
- }, [_]), C(() => {
130
- ae(void 0), R(S(b({}, o), {
130
+ X !== ie.Pending && X !== ie.Started || k.warning("文件导入中,请刷新页面再试");
131
+ }, [X]), C(() => {
132
+ ae(void 0), R(S(p({}, o), {
131
133
  current: 1
132
- })), H([]), rt();
133
- }, [a, Q]), C(() => {
134
- a && g.cvforceDatahub.getDatasetsId(a).then((e) => {
135
- Ue(e);
134
+ })), U([]), it();
135
+ }, [a, Y]), C(() => {
136
+ a && h.cvforceDatahub.getDatasetsId(a).then((e) => {
137
+ qe(e);
136
138
  });
137
139
  }, [a]), C(() => {
138
- pe.current++, U.current++;
140
+ pe.current++, q.current++;
139
141
  }, [x == null ? void 0 : x.id, l == null ? void 0 : l.id, u, $]), C(() => {
140
- q();
142
+ K();
141
143
  }, [$, l, u]), C(() => {
142
- !l || !x || E(S(b({}, o), {
144
+ !l || !x || E(S(p({}, o), {
143
145
  current: 1
144
146
  })).then((e) => {
145
147
  });
@@ -156,29 +158,29 @@ const mr = (w) => {
156
158
  }), L();
157
159
  }, [o.current]), C(() => {
158
160
  M && L();
159
- }, [Qe]), C(() => {
161
+ }, [Ye]), C(() => {
160
162
  let e = !1;
161
- const t = X.current[u];
163
+ const t = J.current[u];
162
164
  let n;
163
- return t && t.page > 1 ? n = E(S(b({}, o), {
165
+ return t && t.page > 1 ? n = E(S(p({}, o), {
164
166
  current: 1,
165
167
  pageSize: t.page * 100,
166
168
  // 假设默认pageSize为100
167
169
  total: void 0
168
- })).then((i) => (e || (me.current = t.page, R((r) => S(b({}, r), {
170
+ })).then((i) => (e || (me.current = t.page, R((r) => S(p({}, r), {
169
171
  current: t.page,
170
172
  pageSize: 100
171
- }))), i)) : n = E(S(b({}, o), {
173
+ }))), i)) : n = E(S(p({}, o), {
172
174
  current: 1,
173
175
  total: void 0
174
176
  })), n.then((i) => {
175
- if (!e && (xe(!1), !!i && !(!h && !ee)))
177
+ if (!e && (xe(!1), !!i && Le.current))
176
178
  if (Array.isArray(i) && i.length) {
177
- const r = X.current[u], c = r == null ? void 0 : r.index, d = c !== void 0 && c >= 0 && c < i.length ? c : 0;
179
+ const r = J.current[u], s = r == null ? void 0 : r.index, d = s !== void 0 && s >= 0 && s < i.length ? s : 0;
178
180
  z(d), N(i[d]), A(void 0);
179
181
  } else
180
- N(void 0), A(void 0), z(-1), q(), setTimeout(() => {
181
- R((r) => S(b({}, r), {
182
+ N(void 0), A(void 0), z(-1), K(), setTimeout(() => {
183
+ R((r) => S(p({}, r), {
182
184
  current: 1,
183
185
  type: void 0
184
186
  }));
@@ -189,68 +191,70 @@ const mr = (w) => {
189
191
  }, [u]), C(() => {
190
192
  var t;
191
193
  let e;
192
- if (!ee) {
193
- const n = h !== void 0, i = h == null ? void 0 : h.id, r = F;
194
- U.current++, X.current = {}, N(void 0), A(void 0), Z(!1), z(-1), Je(void 0), xe(!1), q(), n && ((t = Re.current) == null || t.fetchLabels()), L(), i !== void 0 && (e = requestAnimationFrame(() => {
195
- yn(Sn(ce.current), i, r);
194
+ if (!_) {
195
+ const n = m !== void 0, i = m == null ? void 0 : m.id, r = F;
196
+ q.current++, J.current = {}, R((s) => s.type ? S(p({}, s), {
197
+ type: void 0
198
+ }) : s), N(void 0), A(void 0), Z(!1), z(-1), Qe(void 0), xe(!1), K(), n && ((t = Pe.current) == null || t.fetchLabels()), L(), i !== void 0 && (e = requestAnimationFrame(() => {
199
+ Sn(Cn(ce.current), i, r);
196
200
  }));
197
201
  }
198
202
  return () => {
199
203
  e !== void 0 && cancelAnimationFrame(e);
200
204
  };
201
- }, [ee]);
202
- const Ft = ln((e, t) => {
203
- Je(e ? void 0 : t);
205
+ }, [_]);
206
+ const Bt = sn((e, t) => {
207
+ Qe(e ? void 0 : t);
204
208
  }, []);
205
- Fn({
209
+ Bn({
206
210
  samples: v,
207
211
  currentIndex: F,
208
- active: ee,
209
- loadedImageUrl: Lt
212
+ active: _,
213
+ loadedImageUrl: Dt
210
214
  }), C(() => {
211
- wt(!_e && Ze);
212
- }, [_e, Ze]), C(() => {
215
+ Lt(!Xe && _e);
216
+ }, [Xe, _e]), C(() => {
213
217
  if (!a) {
214
- ke && (clearTimeout(ke), Ae(null)), Ye(void 0);
218
+ ke && (clearTimeout(ke), Ee(null)), et(void 0);
215
219
  return;
216
220
  }
217
- Me();
221
+ Oe();
218
222
  }, [a, l == null ? void 0 : l.id]), C(() => {
219
- Me();
223
+ Oe();
220
224
  }, [Tt]), C(() => {
221
- Be();
225
+ Me();
222
226
  }, [M, a, l]), C(() => {
223
- pe.current++, U.current++, E(S(b({}, o), {
227
+ pe.current++, q.current++, E(S(p({}, o), {
224
228
  current: 1
225
229
  })), L();
226
230
  }, [ge]), C(() => {
227
- Ee("");
228
- }, [h]), C(() => {
231
+ Fe("");
232
+ }, [m]), C(() => {
229
233
  if (v.length === 0) {
230
- Le(!1);
234
+ De(!1);
231
235
  return;
232
236
  }
233
237
  const e = v.every((t) => P.has(t.id));
234
- Le(e);
238
+ De(e);
235
239
  }, [v, P]);
236
- const Be = () => {
237
- l && g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, l.id, {
240
+ const Me = () => {
241
+ l && h.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, l.id, {
238
242
  pageNo: 1,
239
243
  pageSize: 1e3,
240
244
  confirmStatus: 1
241
245
  }).then((e) => {
242
- zt(e.recordList.length);
246
+ At(e.recordList.length);
243
247
  });
244
- }, Me = () => {
245
- !a || !l || g.cvforceDatahub.getPreLabelTask(a, l.id).then((e) => {
248
+ }, Oe = () => {
249
+ !a || !l || h.cvforceDatahub.getPreLabelTask(a, l.id).then((e) => {
246
250
  const t = e[0];
247
- if (Ye(t), ke && (clearTimeout(ke), Ae(null)), !(t != null && t.state) || t.state !== mn.Started) {
248
- et(!1), L();
251
+ if (et(t), ke && (clearTimeout(ke), Ee(null)), !(t != null && t.state) || t.state !== pn.Started) {
252
+ tt(!1), L();
249
253
  return;
250
254
  } else
251
- et(!0);
252
- Ae(setTimeout(() => {
253
- Me();
255
+ tt(!0);
256
+ Ee(setTimeout(() => {
257
+ Oe();
254
258
  }, 1e4));
255
259
  });
256
260
  };
@@ -261,16 +265,16 @@ const mr = (w) => {
261
265
  const n = (e == null ? void 0 : e.current) || o.current, i = (e == null ? void 0 : e.pageSize) || o.pageSize;
262
266
  if (!a || !l || !n)
263
267
  return Promise.resolve(!1);
264
- const r = pe.current, c = $.map((D) => D.label), d = () => {
268
+ const r = pe.current, s = $.map((D) => D.label), d = () => {
265
269
  switch (u) {
266
270
  case "nocode":
267
271
  return "nocode";
268
272
  case "pending":
269
- return c.length ? c : "";
273
+ return s.length ? s : "";
270
274
  case "hascode":
271
- return c.length ? c : "hascode";
275
+ return s.length ? s : "hascode";
272
276
  default:
273
- return c.length ? c : void 0;
277
+ return s.length ? s : void 0;
274
278
  }
275
279
  }, y = () => {
276
280
  switch (u) {
@@ -283,10 +287,10 @@ const mr = (w) => {
283
287
  return 2;
284
288
  }
285
289
  };
286
- return n === 1 && Wt(), R(S(b({}, o), {
290
+ return n === 1 && $t(), R(S(p({}, o), {
287
291
  current: n,
288
292
  pageSize: i
289
- })), g.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, l.id, {
293
+ })), h.cvforceDatahub.getDatasetsIdVersionsVidSamples(a, l.id, {
290
294
  pageNo: n,
291
295
  pageSize: i,
292
296
  labels: d(),
@@ -295,8 +299,8 @@ const mr = (w) => {
295
299
  }).then((D) => {
296
300
  if (r !== pe.current)
297
301
  return !1;
298
- const O = D.recordList || [], J = n === 1 ? O : [...t || v, ...O];
299
- if (H(J), R(S(b({}, o), {
302
+ const O = D.recordList || [], Q = n === 1 ? O : [...t || v, ...O];
303
+ if (U(Q), R(S(p({}, o), {
300
304
  current: n,
301
305
  pageSize: i,
302
306
  total: D.totalResults
@@ -310,57 +314,57 @@ const mr = (w) => {
310
314
  const j = D.recordList[o.pageSize - 1];
311
315
  N(j);
312
316
  }
313
- return ue && F < 0 && (z(0), N(O[0]), he(!0)), J;
317
+ return ue && F < 0 && (z(0), N(O[0]), he(!0)), Q;
314
318
  }).catch(() => !1);
315
319
  };
316
320
  C(() => {
317
- $.length > 0 || R(u === "nocode" ? S(b({}, o), {
321
+ $.length > 0 || R(u === "nocode" ? S(p({}, o), {
318
322
  total: de
319
- }) : u === "" ? S(b({}, o), {
320
- total: Y
321
- }) : u === "pending" ? S(b({}, o), {
323
+ }) : u === "" ? S(p({}, o), {
324
+ total: ee
325
+ }) : u === "pending" ? S(p({}, o), {
322
326
  total: fe
323
- }) : S(b({}, o), {
324
- total: Y - de - fe
327
+ }) : S(p({}, o), {
328
+ total: ee - de - fe
325
329
  }));
326
- }, [de, Y, fe]);
330
+ }, [de, ee, fe]);
327
331
  const L = () => {
328
- !a || !l || g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
332
+ !a || !l || h.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
329
333
  label: "allcode",
330
334
  confirmStatus: 2,
331
335
  searchName: ge
332
336
  }).then((e) => {
333
337
  const t = e.find((r) => r.id === "allcodeid"), n = e.find((r) => r.id === "nocodeid"), i = e.find((r) => r.id === "pendingid");
334
- je(t ? t.count : 0), We(n ? n.count : 0), $e(i ? i.count : 0);
338
+ Ge(t ? t.count : 0), $e(n ? n.count : 0), je(i ? i.count : 0);
335
339
  });
336
- }, q = () => {
340
+ }, K = () => {
337
341
  if (!a || !(l != null && l.id))
338
342
  return;
339
- const e = ++tt.current;
343
+ const e = ++nt.current;
340
344
  let t = 2;
341
- return u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
345
+ return u === "pending" ? t = 1 : u === "hascode" && (t = 0), h.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
342
346
  confirmStatus: t
343
347
  }).then((n) => {
344
- if (e !== tt.current)
348
+ if (e !== nt.current)
345
349
  return;
346
- const r = (n || []).filter((c) => c.label !== "nocode").map((c, d) => {
350
+ const r = (n || []).filter((s) => s.label !== "nocode").map((s, d) => {
347
351
  var y;
348
352
  return {
349
- label: c.label,
350
- count: c.count,
351
- boxCount: (y = c.boxCount) != null ? y : 0,
352
- id: c.id,
353
- color: gt[d % 40]
353
+ label: s.label,
354
+ count: s.count,
355
+ boxCount: (y = s.boxCount) != null ? y : 0,
356
+ id: s.id,
357
+ color: mt[d % 40]
354
358
  };
355
359
  });
356
- return Xe(r), n;
360
+ return Je(r), n;
357
361
  });
358
- }, Bt = (e) => {
362
+ }, Mt = (e) => {
359
363
  if (!v)
360
364
  return;
361
365
  Z(!1), z(e);
362
366
  const t = v[e];
363
- N(t), A(void 0), he(!0), u !== void 0 && (X.current[u] = {
367
+ N(t), A(void 0), he(!0), u !== void 0 && (J.current[u] = {
364
368
  index: e,
365
369
  page: o.current || 1
366
370
  });
@@ -373,64 +377,64 @@ const mr = (w) => {
373
377
  const e = [];
374
378
  f == null || f.labels.forEach((t) => {
375
379
  B != null && B.find((n) => n.id === t.id) && e.push(t);
376
- }), e.length !== f.labels.length && A(S(b({}, f), {
380
+ }), e.length !== f.labels.length && A(S(p({}, f), {
377
381
  labels: e
378
382
  }));
379
383
  }, [B]);
380
- const K = (e, t, n, i) => {
384
+ const W = (e, t, n, i) => {
381
385
  setTimeout(() => {
382
- i === U.current && (z(t), N(e[t]), A(void 0), u !== void 0 && (X.current[u] = {
386
+ i === q.current && (z(t), N(e[t]), A(void 0), u !== void 0 && (J.current[u] = {
383
387
  index: t,
384
388
  page: n
385
389
  }));
386
390
  }, 0);
387
- }, it = (e, t) => {
391
+ }, ot = (e, t) => {
388
392
  if (!v)
389
393
  return;
390
- const n = ++U.current;
394
+ const n = ++q.current;
391
395
  if (!ue) {
392
- H((i) => {
396
+ U((i) => {
393
397
  var d;
394
398
  if (!Array.isArray(i) || !i.length)
395
399
  return te(), i;
396
- const r = F + 1, c = (d = o.total) != null ? d : i.length;
397
- return r >= i.length ? r >= c ? k.error("已经是最后一个了") : (me.current = o.current + 1, E({
400
+ const r = F + 1, s = (d = o.total) != null ? d : i.length;
401
+ return r >= i.length ? r >= s ? k.error("已经是最后一个了") : (me.current = o.current + 1, E({
398
402
  current: o.current + 1,
399
403
  pageSize: o.pageSize,
400
404
  type: "next"
401
405
  }, i).then((y) => {
402
406
  if (Array.isArray(y)) {
403
407
  if (r >= y.length) {
404
- y.length > 0 && K(y, y.length - 1, o.current || 1, n), k.error("已经是最后一个了");
408
+ y.length > 0 && W(y, y.length - 1, o.current || 1, n), k.error("已经是最后一个了");
405
409
  return;
406
410
  }
407
- K(y, r, o.current + 1, n);
411
+ W(y, r, o.current + 1, n);
408
412
  }
409
- })) : K(i, r, o.current || 1, n), i;
413
+ })) : W(i, r, o.current || 1, n), i;
410
414
  });
411
415
  return;
412
416
  }
413
- return De(e, t).then((i) => (i && n === U.current && (console.log("action", t, "changedSample", f), L(), H((r) => {
417
+ return Ne(e, t).then((i) => (i && n === q.current && (console.log("action", t, "changedSample", f), L(), U((r) => {
414
418
  var d, y;
415
- let c;
419
+ let s;
416
420
  if (Array.isArray(r)) {
417
421
  if (!r.length)
418
422
  return te(), r;
419
- const D = u === "", O = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && u === "nocode", J = t !== "CONFIRM" && u === "pending", j = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && u === "hascode", be = D || J || j || O ? F + 1 : F;
423
+ const D = u === "", O = (!((d = f == null ? void 0 : f.labels) != null && d.length) || !f) && u === "nocode", Q = t !== "CONFIRM" && u === "pending", j = (((y = f == null ? void 0 : f.labels) == null ? void 0 : y.length) || !f) && u === "hascode", be = D || Q || j || O ? F + 1 : F;
420
424
  if (f) {
421
425
  if (f.labels.length && u === "nocode" || !f.labels.length && u === "hascode" || t === "CONFIRM" && u === "pending") {
422
- const V = r.findIndex((Oe) => Oe.id === f.id);
423
- V > -1 && (r.splice(V, 1), c = [...r], o.total && (o.total = o.total - 1));
426
+ const V = r.findIndex((He) => He.id === f.id);
427
+ V > -1 && (r.splice(V, 1), s = [...r], o.total && (o.total = o.total - 1));
424
428
  }
425
429
  } else if (t === "CONFIRM" && u === "pending") {
426
- const V = r.findIndex((Oe) => Oe.id === (h == null ? void 0 : h.id));
427
- V > -1 && (r.splice(V, 1), c = [...r], o.total && (o.total = o.total - 1));
430
+ const V = r.findIndex((He) => He.id === (m == null ? void 0 : m.id));
431
+ V > -1 && (r.splice(V, 1), s = [...r], o.total && (o.total = o.total - 1));
428
432
  }
429
433
  if (be >= r.length)
430
434
  if (o.total && be >= o.total) {
431
435
  if (r.length > 0) {
432
436
  const V = r.length - 1;
433
- K(r, V, o.current || 1, n);
437
+ W(r, V, o.current || 1, n);
434
438
  }
435
439
  k.error("已经是最后一个了");
436
440
  } else
@@ -441,39 +445,39 @@ const mr = (w) => {
441
445
  }, r).then((V) => {
442
446
  if (Array.isArray(V)) {
443
447
  if (be >= V.length) {
444
- V.length > 0 && K(V, V.length - 1, o.current || 1, n), k.error("已经是最后一个了");
448
+ V.length > 0 && W(V, V.length - 1, o.current || 1, n), k.error("已经是最后一个了");
445
449
  return;
446
450
  }
447
- K(V, be, o.current + 1, n);
451
+ W(V, be, o.current + 1, n);
448
452
  }
449
453
  });
450
454
  else
451
- K(r, be, o.current || 1, n);
455
+ W(r, be, o.current || 1, n);
452
456
  }
453
- return c || r;
457
+ return s || r;
454
458
  })), i));
455
- }, Mt = (e) => {
459
+ }, Ot = (e) => {
456
460
  if (!v)
457
461
  return;
458
- const t = ++U.current;
462
+ const t = ++q.current;
459
463
  if (!ue) {
460
- H((n) => {
464
+ U((n) => {
461
465
  if (!Array.isArray(n) || !n.length)
462
466
  return te(), n;
463
467
  const i = F - 1;
464
- return i < 0 ? k.error("已经是第一个了") : K(n, i, o.current || 1, t), n;
468
+ return i < 0 ? k.error("已经是第一个了") : W(n, i, o.current || 1, t), n;
465
469
  });
466
470
  return;
467
471
  }
468
- De(e).then((n) => {
469
- n && t === U.current && (L(), H((i) => {
472
+ Ne(e).then((n) => {
473
+ n && t === q.current && (L(), U((i) => {
470
474
  let r;
471
475
  if (Array.isArray(i)) {
472
476
  if (!i.length)
473
477
  return te(), i;
474
- const c = F - 1;
475
- if (c < 0)
476
- c < 0 ? k.error("已经是第一个了") : R({
478
+ const s = F - 1;
479
+ if (s < 0)
480
+ s < 0 ? k.error("已经是第一个了") : R({
477
481
  current: o.current - 1,
478
482
  pageSize: o.pageSize,
479
483
  type: "prev"
@@ -483,64 +487,64 @@ const mr = (w) => {
483
487
  const d = i.findIndex((y) => y.id === f.id);
484
488
  d > -1 && (i.splice(d, 1), r = [...i], o.total && (o.total = o.total - 1));
485
489
  }
486
- K(i, c, o.current || 1, t);
490
+ W(i, s, o.current || 1, t);
487
491
  }
488
492
  }
489
493
  return r || i;
490
494
  }));
491
495
  });
492
- }, Ot = (e) => {
496
+ }, Ht = (e) => {
493
497
  const t = Object.keys(e.labels.reduce((n, i) => (n[i.label] ? ++n[i.label] : n[i.label] = 1, n), {})).length;
494
498
  return t >= 2 ? `+${t - 1}` : null;
495
- }, Ht = (e) => {
499
+ }, Ut = (e) => {
496
500
  var D, O;
497
501
  const {
498
502
  scrollTop: t,
499
503
  scrollHeight: n,
500
504
  clientHeight: i
501
- } = e.currentTarget, r = n - t - i, c = 3, d = (D = o.pageSize) != null ? D : 100, y = (O = o.current) != null ? O : 0;
502
- y >= 1 && v.length > 0 && v.length < y * d || (!o.total || o.total > v.length) && r <= c && R((J) => {
505
+ } = e.currentTarget, r = n - t - i, s = 3, d = (D = o.pageSize) != null ? D : 100, y = (O = o.current) != null ? O : 0;
506
+ y >= 1 && v.length > 0 && v.length < y * d || (!o.total || o.total > v.length) && r <= s && R((Q) => {
503
507
  var j;
504
- return S(b({}, J), {
505
- current: ((j = J.current) != null ? j : 0) + 1
508
+ return S(p({}, Q), {
509
+ current: ((j = Q.current) != null ? j : 0) + 1
506
510
  });
507
511
  });
508
- }, De = (e, t) => {
512
+ }, Ne = (e, t) => {
509
513
  var n, i;
510
514
  if (!l)
511
515
  return Promise.resolve(!1);
512
516
  if (f && !M) {
513
- const r = S(b({}, f), {
517
+ const r = S(p({}, f), {
514
518
  labels: f.labels ? [...f.labels] : []
515
519
  });
516
- return r.labels && (r.labels = r.labels.filter((c) => !!c.id)), e !== void 0 && (r.confirmStatus = e, r.isLabeled = ((n = r.labels) == null ? void 0 : n.length) > 0), g.cvforceDatahub.updateSamples(a, l.id, [r], e).then(() => {
520
+ return r.labels && (r.labels = r.labels.filter((s) => !!s.id)), e !== void 0 && (r.confirmStatus = e, r.isLabeled = ((n = r.labels) == null ? void 0 : n.length) > 0), h.cvforceDatahub.updateSamples(a, l.id, [r], e).then(() => {
517
521
  k.success({
518
522
  content: "保存成功"
519
523
  });
520
- const c = S(b({}, r), {
524
+ const s = S(p({}, r), {
521
525
  labels: r.labels ? [...r.labels] : []
522
526
  });
523
- return H((d) => {
524
- const y = d.findIndex((D) => D.id === (c == null ? void 0 : c.id));
527
+ return U((d) => {
528
+ const y = d.findIndex((D) => D.id === (s == null ? void 0 : s.id));
525
529
  if (y > -1) {
526
530
  const D = [...d];
527
- return D[y] = c, D;
531
+ return D[y] = s, D;
528
532
  }
529
533
  return d;
530
- }), N(c), A(c), !0;
534
+ }), Le.current && (N(s), A(s)), !0;
531
535
  }).catch(() => !1);
532
536
  } else
533
- return !f && !M && h ? t !== "CONFIRM" && u === "pending" || u === "nocode" || u === "hascode" || u === "" && (h.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (h.labels && (h.labels = h.labels.filter((r) => !!r.id)), e !== void 0 && (h.confirmStatus = e, h.isLabeled = ((i = h.labels) == null ? void 0 : i.length) > 0), g.cvforceDatahub.updateSamples(a, l.id, [h], e).then(() => (k.success({
537
+ return !f && !M && m ? t !== "CONFIRM" && u === "pending" || u === "nocode" || u === "hascode" || u === "" && (m.confirmStatus !== 1 || t !== "CONFIRM") ? Promise.resolve(!0) : (m.labels && (m.labels = m.labels.filter((r) => !!r.id)), e !== void 0 && (m.confirmStatus = e, m.isLabeled = ((i = m.labels) == null ? void 0 : i.length) > 0), h.cvforceDatahub.updateSamples(a, l.id, [m], e).then(() => (k.success({
534
538
  content: "保存成功"
535
- }), H((r) => {
536
- const c = r.findIndex((d) => d.id === (h == null ? void 0 : h.id));
537
- return c > -1 && (r[c] = h), [...r];
538
- }), N(b({}, h)), !0)).catch(() => !1)) : Promise.resolve(!0);
539
- }, Ut = (e, t) => {
539
+ }), U((r) => {
540
+ const s = r.findIndex((d) => d.id === (m == null ? void 0 : m.id));
541
+ return s > -1 && (r[s] = m), [...r];
542
+ }), Le.current && N(p({}, m)), !0)).catch(() => !1)) : Promise.resolve(!0);
543
+ }, qt = (e, t) => {
540
544
  if (f && f.labels.some((n) => !n.id))
541
545
  return k.error("所有标注需设置标签"), Promise.resolve(!1);
542
- it(e, t);
543
- }, qt = (e) => {
546
+ ot(e, t);
547
+ }, Kt = (e) => {
544
548
  if (f && f.labels.some((t) => !t.id)) {
545
549
  k.error("所有标注需设置标签");
546
550
  return;
@@ -549,22 +553,22 @@ const mr = (w) => {
549
553
  Z(!1);
550
554
  return;
551
555
  }
552
- De(e).then((t) => {
553
- t && (A(void 0), Z(!1), L(), q());
556
+ Ne(e).then((t) => {
557
+ t && (A(void 0), Z(!1), L(), K());
554
558
  });
555
- }, Kt = () => {
556
- Ne.confirm({
559
+ }, Wt = () => {
560
+ Re.confirm({
557
561
  title: "确认要删除当前数据吗?",
558
562
  content: "数据包含当前标注的内容和图片,删除后无法恢复,请确认是否删除!",
559
563
  onOk: () => {
560
- !h || !l || g.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, l.id, h.id).then(() => {
561
- const e = v.findIndex((n) => n.id === h.id);
564
+ !m || !l || h.cvforceDatahub.delDatasetsIdVersionsVidSamplesId(a, l.id, m.id).then(() => {
565
+ const e = v.findIndex((n) => n.id === m.id);
562
566
  v.splice(e, 1);
563
567
  const t = v.length;
564
- H([...v]), R(S(b({}, o), {
568
+ U([...v]), R(S(p({}, o), {
565
569
  total: o.total ? o.total - 1 : 0
566
570
  })), e <= v.length - 1 ? N(v[e]) : (N(v[e - 1]), z(e - 1)), L(), A(void 0), (t === 0 || o.total && o.total - 1 === 0) && (N(void 0), A(void 0), z(-1), ue || he(!1), setTimeout(() => {
567
- R((n) => S(b({}, n), {
571
+ R((n) => S(p({}, n), {
568
572
  current: 1,
569
573
  type: void 0
570
574
  }));
@@ -572,9 +576,9 @@ const mr = (w) => {
572
576
  });
573
577
  }
574
578
  });
575
- }, ot = [{
579
+ }, lt = [{
576
580
  key: "",
577
- label: `全部(${Y})`,
581
+ label: `全部(${ee})`,
578
582
  children: null
579
583
  }, {
580
584
  key: "nocode",
@@ -586,58 +590,58 @@ const mr = (w) => {
586
590
  children: null
587
591
  }, {
588
592
  key: "hascode",
589
- label: `已标注(${Y - de - fe})`,
593
+ label: `已标注(${ee - de - fe})`,
590
594
  children: null
591
- }], Wt = () => {
595
+ }], $t = () => {
592
596
  var e, t;
593
597
  (t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
594
598
  top: 0
595
599
  });
596
- }, $t = (e) => {
597
- At(e), ne();
598
- }, lt = (e) => {
599
- if (pe.current++, U.current++, F >= 0 && u !== void 0 && u !== null) {
600
- const n = X.current[u];
601
- !!n && n.page > 1 && (o.current || 1) === 1 || (X.current[u] = {
600
+ }, jt = (e) => {
601
+ Et(e), ne();
602
+ }, st = (e) => {
603
+ if (pe.current++, q.current++, F >= 0 && u !== void 0 && u !== null) {
604
+ const n = J.current[u];
605
+ !!n && n.page > 1 && (o.current || 1) === 1 || (J.current[u] = {
602
606
  index: F,
603
607
  page: o.current || 1
604
608
  });
605
609
  }
606
610
  ne(), e !== u && xe(!0);
607
611
  const t = (o.current || 1) !== 1;
608
- f ? De(f == null ? void 0 : f.confirmStatus).then((n) => {
609
- n ? (we.current = t, Pe(e), L()) : (xe(!1), k.error("保存失败"));
610
- }) : (we.current = t, R(S(b({}, o), {
612
+ f ? Ne(f == null ? void 0 : f.confirmStatus).then((n) => {
613
+ n ? (we.current = t, Ve(e), L()) : (xe(!1), k.error("保存失败"));
614
+ }) : (we.current = t, R(S(p({}, o), {
611
615
  current: 1,
612
616
  total: void 0
613
- })), Pe(e)), e === "nocode" && ze([]);
614
- }, jt = () => {
615
- if (console.log("一键确认", g, l), !(g != null && g.cvforceDatahub) || !(l != null && l.id))
617
+ })), Ve(e)), e === "nocode" && Ae([]);
618
+ }, Gt = () => {
619
+ if (console.log("一键确认", h, l), !(h != null && h.cvforceDatahub) || !(l != null && l.id))
616
620
  return Promise.resolve(!1);
617
- Ne.confirm({
621
+ Re.confirm({
618
622
  title: "一键保存所有标注?",
619
623
  content: "待确认的所有带预标注信息的图片将保存至已标注页签下",
620
624
  onOk: () => {
621
- g.cvforceDatahub.getAllConfirmSamples(a, l.id).then((e) => {
622
- k.success("保存成功"), E(S(b({}, o), {
625
+ h.cvforceDatahub.getAllConfirmSamples(a, l.id).then((e) => {
626
+ k.success("保存成功"), E(S(p({}, o), {
623
627
  current: 1
624
628
  })), L();
625
629
  });
626
630
  }
627
631
  });
628
- }, Gt = (e, t) => {
632
+ }, Zt = (e, t) => {
629
633
  const n = new Set(P);
630
- t ? n.add(e) : n.delete(e), Fe(n);
631
- }, Zt = (e) => {
634
+ t ? n.add(e) : n.delete(e), Be(n);
635
+ }, _t = (e) => {
632
636
  const t = new Set(P);
633
637
  e ? v.forEach((n) => {
634
638
  t.add(n.id);
635
639
  }) : v.forEach((n) => {
636
640
  t.delete(n.id);
637
- }), Fe(t), Le(e);
641
+ }), Be(t), De(e);
638
642
  }, ne = () => {
639
- Fe(/* @__PURE__ */ new Set()), Le(!1);
640
- }, st = () => {
643
+ Be(/* @__PURE__ */ new Set()), De(!1);
644
+ }, ct = () => {
641
645
  const e = v.filter((n) => P.has(n.id)), t = {
642
646
  nocode: 0,
643
647
  pending: 0,
@@ -646,30 +650,30 @@ const mr = (w) => {
646
650
  return e.forEach((n) => {
647
651
  n.confirmStatus === 1 ? t.pending++ : !n.labels || n.labels.length === 0 ? t.nocode++ : t.hascode++;
648
652
  }), t;
649
- }, _t = () => {
653
+ }, Xt = () => {
650
654
  if (!Ce)
651
655
  return;
652
656
  if (P.size === 0) {
653
657
  k.warning("请先选择要删除的图片");
654
658
  return;
655
659
  }
656
- const e = st(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ p("div", {
657
- children: [/* @__PURE__ */ s("p", {
660
+ const e = ct(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ b("div", {
661
+ children: [/* @__PURE__ */ c("p", {
658
662
  style: {
659
663
  marginBottom: 16
660
664
  },
661
665
  children: "所选类型下的数量统计:"
662
- }), /* @__PURE__ */ p("div", {
666
+ }), /* @__PURE__ */ b("div", {
663
667
  style: {
664
668
  marginBottom: 16
665
669
  },
666
- children: [t && /* @__PURE__ */ p("div", {
670
+ children: [t && /* @__PURE__ */ b("div", {
667
671
  style: {
668
672
  display: "flex",
669
673
  alignItems: "center",
670
674
  marginBottom: 4
671
675
  },
672
- children: [/* @__PURE__ */ s("span", {
676
+ children: [/* @__PURE__ */ c("span", {
673
677
  style: {
674
678
  display: "inline-block",
675
679
  padding: "2px 8px",
@@ -680,16 +684,16 @@ const mr = (w) => {
680
684
  fontSize: 12
681
685
  },
682
686
  children: "未标注"
683
- }), /* @__PURE__ */ p("span", {
687
+ }), /* @__PURE__ */ b("span", {
684
688
  children: [e.nocode, "张"]
685
689
  })]
686
- }), n && /* @__PURE__ */ p("div", {
690
+ }), n && /* @__PURE__ */ b("div", {
687
691
  style: {
688
692
  display: "flex",
689
693
  alignItems: "center",
690
694
  marginBottom: 4
691
695
  },
692
- children: [/* @__PURE__ */ s("span", {
696
+ children: [/* @__PURE__ */ c("span", {
693
697
  style: {
694
698
  display: "inline-block",
695
699
  padding: "2px 8px",
@@ -700,16 +704,16 @@ const mr = (w) => {
700
704
  fontSize: 12
701
705
  },
702
706
  children: "待确认"
703
- }), /* @__PURE__ */ p("span", {
707
+ }), /* @__PURE__ */ b("span", {
704
708
  children: [e.pending, "张"]
705
709
  })]
706
- }), i && /* @__PURE__ */ p("div", {
710
+ }), i && /* @__PURE__ */ b("div", {
707
711
  style: {
708
712
  display: "flex",
709
713
  alignItems: "center",
710
714
  marginBottom: 4
711
715
  },
712
- children: [/* @__PURE__ */ s("span", {
716
+ children: [/* @__PURE__ */ c("span", {
713
717
  style: {
714
718
  display: "inline-block",
715
719
  padding: "2px 8px",
@@ -720,64 +724,64 @@ const mr = (w) => {
720
724
  fontSize: 12
721
725
  },
722
726
  children: "已标注"
723
- }), /* @__PURE__ */ p("span", {
727
+ }), /* @__PURE__ */ b("span", {
724
728
  children: [e.hascode, "张"]
725
729
  })]
726
730
  })]
727
- }), /* @__PURE__ */ s("p", {
731
+ }), /* @__PURE__ */ c("p", {
728
732
  style: {
729
733
  color: "red"
730
734
  },
731
735
  children: "彻底移除选中的图片文件及其关联的所有标注坐标、标签信息。数据不可恢复。"
732
736
  })]
733
737
  });
734
- Ne.confirm({
738
+ Re.confirm({
735
739
  title: "删除操作确认",
736
740
  content: r,
737
741
  okText: "确定",
738
742
  cancelText: "取消",
739
743
  width: 500,
740
- onOk: () => He(void 0, null, function* () {
744
+ onOk: () => Ue(void 0, null, function* () {
741
745
  if (!l)
742
746
  return;
743
- const c = Array.from(P);
744
- if (c.length === 0) {
747
+ const s = Array.from(P);
748
+ if (s.length === 0) {
745
749
  k.warning("没有选中的图片");
746
750
  return;
747
751
  }
748
752
  try {
749
- yield g.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, l.id, c), k.success("删除成功"), ne(), E(S(b({}, o), {
753
+ yield h.cvforceDatahub.delDatasetsIdVersionsVidSamples(a, l.id, s), k.success("删除成功"), ne(), E(S(p({}, o), {
750
754
  current: 1
751
- })), L(), q();
755
+ })), L(), K();
752
756
  } catch (d) {
753
757
  k.error("删除失败");
754
758
  }
755
759
  })
756
760
  });
757
- }, Xt = () => {
761
+ }, Jt = () => {
758
762
  if (!G)
759
763
  return;
760
764
  if (P.size === 0) {
761
765
  k.warning("请先选择要清除标注的图片");
762
766
  return;
763
767
  }
764
- const e = st(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ p("div", {
765
- children: [/* @__PURE__ */ s("p", {
768
+ const e = ct(), t = e.nocode > 0, n = e.pending > 0, i = e.hascode > 0, r = /* @__PURE__ */ b("div", {
769
+ children: [/* @__PURE__ */ c("p", {
766
770
  style: {
767
771
  marginBottom: 16
768
772
  },
769
773
  children: "所选类型下的数量统计:"
770
- }), /* @__PURE__ */ p("div", {
774
+ }), /* @__PURE__ */ b("div", {
771
775
  style: {
772
776
  marginBottom: 16
773
777
  },
774
- children: [t && /* @__PURE__ */ p("div", {
778
+ children: [t && /* @__PURE__ */ b("div", {
775
779
  style: {
776
780
  display: "flex",
777
781
  alignItems: "center",
778
782
  marginBottom: 4
779
783
  },
780
- children: [/* @__PURE__ */ s("span", {
784
+ children: [/* @__PURE__ */ c("span", {
781
785
  style: {
782
786
  display: "inline-block",
783
787
  padding: "2px 8px",
@@ -788,16 +792,16 @@ const mr = (w) => {
788
792
  fontSize: 12
789
793
  },
790
794
  children: "未标注"
791
- }), /* @__PURE__ */ p("span", {
795
+ }), /* @__PURE__ */ b("span", {
792
796
  children: [e.nocode, "张"]
793
797
  })]
794
- }), n && /* @__PURE__ */ p("div", {
798
+ }), n && /* @__PURE__ */ b("div", {
795
799
  style: {
796
800
  display: "flex",
797
801
  alignItems: "center",
798
802
  marginBottom: 4
799
803
  },
800
- children: [/* @__PURE__ */ s("span", {
804
+ children: [/* @__PURE__ */ c("span", {
801
805
  style: {
802
806
  display: "inline-block",
803
807
  padding: "2px 8px",
@@ -808,16 +812,16 @@ const mr = (w) => {
808
812
  fontSize: 12
809
813
  },
810
814
  children: "待确认"
811
- }), /* @__PURE__ */ p("span", {
815
+ }), /* @__PURE__ */ b("span", {
812
816
  children: [e.pending, "张"]
813
817
  })]
814
- }), i && /* @__PURE__ */ p("div", {
818
+ }), i && /* @__PURE__ */ b("div", {
815
819
  style: {
816
820
  display: "flex",
817
821
  alignItems: "center",
818
822
  marginBottom: 4
819
823
  },
820
- children: [/* @__PURE__ */ s("span", {
824
+ children: [/* @__PURE__ */ c("span", {
821
825
  style: {
822
826
  display: "inline-block",
823
827
  padding: "2px 8px",
@@ -828,64 +832,64 @@ const mr = (w) => {
828
832
  fontSize: 12
829
833
  },
830
834
  children: "已标注"
831
- }), /* @__PURE__ */ p("span", {
835
+ }), /* @__PURE__ */ b("span", {
832
836
  children: [e.hascode, "张"]
833
837
  })]
834
838
  })]
835
- }), /* @__PURE__ */ s("p", {
839
+ }), /* @__PURE__ */ c("p", {
836
840
  children: '保留图片文件,仅删除其内部的标注框(含 AI 预标注)。删除后图片状态变更为"未标注"。'
837
841
  })]
838
842
  });
839
- Ne.confirm({
843
+ Re.confirm({
840
844
  title: "删除操作确认",
841
845
  content: r,
842
846
  okText: "确定",
843
847
  cancelText: "取消",
844
848
  width: 500,
845
- onOk: () => He(void 0, null, function* () {
849
+ onOk: () => Ue(void 0, null, function* () {
846
850
  if (!l)
847
851
  return;
848
- const c = v.filter((d) => P.has(d.id));
849
- if (c.length === 0) {
852
+ const s = v.filter((d) => P.has(d.id));
853
+ if (s.length === 0) {
850
854
  k.warning("没有选中的图片");
851
855
  return;
852
856
  }
853
857
  try {
854
- const d = c.map((y) => S(b({}, y), {
858
+ const d = s.map((y) => S(p({}, y), {
855
859
  labels: [],
856
860
  confirmStatus: 0,
857
861
  isLabeled: !1
858
862
  }));
859
- yield g.cvforceDatahub.updateSamples(a, l.id, d, 0), k.success("清除标注成功"), ne(), E(S(b({}, o), {
863
+ yield h.cvforceDatahub.updateSamples(a, l.id, d, 0), k.success("清除标注成功"), ne(), E(S(p({}, o), {
860
864
  current: 1
861
- })), L(), q();
865
+ })), L(), K();
862
866
  } catch (d) {
863
867
  k.error("清除标注失败");
864
868
  }
865
869
  })
866
870
  });
867
- }, Jt = [...Ce ? [{
871
+ }, Qt = [...Ce ? [{
868
872
  key: "deleteWithAnnotations",
869
873
  label: "删除所选图片(含标注)",
870
- onClick: _t
874
+ onClick: Xt
871
875
  }] : [], ...G ? [{
872
876
  key: "clearAnnotations",
873
877
  label: "仅清除所选图片内的标注",
874
- onClick: Xt
875
- }] : []], ct = !h && !!(T && T.preLabel) && !!(l != null && l.id), Qt = G || ct;
876
- return /* @__PURE__ */ s(sn, {
877
- locale: pn,
878
- children: /* @__PURE__ */ s(bn.Provider, {
878
+ onClick: Jt
879
+ }] : []], at = !!(T && T.preLabel) && !!(l != null && l.id), Yt = G || at;
880
+ return /* @__PURE__ */ c(cn, {
881
+ locale: bn,
882
+ children: /* @__PURE__ */ c(vn.Provider, {
879
883
  value: {
880
884
  datasetId: a,
881
885
  versionId: (l == null ? void 0 : l.id) || "",
882
886
  no: (l == null ? void 0 : l.no) || "",
883
- loading: qe,
887
+ loading: Ke,
884
888
  version: l,
885
889
  versions: Ie,
886
890
  samples: v,
887
891
  pagination: o,
888
- services: g,
892
+ services: h,
889
893
  featuresConfig: {
890
894
  labelManager: Se,
891
895
  datasetManager: T,
@@ -895,31 +899,31 @@ const mr = (w) => {
895
899
  exampleSrcRoot: le
896
900
  }
897
901
  },
898
- children: x ? x.markType === "detection" ? /* @__PURE__ */ s("div", {
902
+ children: x ? x.markType === "detection" ? /* @__PURE__ */ c("div", {
899
903
  className: "detection-version-detail",
900
- children: Pt ? l != null && l.id && T && T.preLabel ? /* @__PURE__ */ s(xn, {
904
+ children: Vt ? l != null && l.id && T && T.preLabel ? /* @__PURE__ */ c(kn, {
901
905
  datasetId: a,
902
906
  versionId: l.id,
903
907
  onClose: () => {
904
- Vt(!1), Be(), q(), L(), E();
908
+ zt(!1), Me(), K(), L(), E();
905
909
  },
906
910
  samples: v,
907
911
  labels: B,
908
- fetchLength: Be
909
- }) : null : /* @__PURE__ */ p(wn, {
912
+ fetchLength: Me
913
+ }) : null : /* @__PURE__ */ b(Ln, {
910
914
  className: "product-details-page",
911
- header: I === !1 ? void 0 : /* @__PURE__ */ s(Dn, {
915
+ header: I === !1 ? void 0 : /* @__PURE__ */ c(Nn, {
912
916
  backTo: ye,
913
917
  onBackClick: I != null && I.onBackClick ? () => {
914
- h && te(), I.onBackClick && I.onBackClick();
918
+ m && te(), I.onBackClick && I.onBackClick();
915
919
  } : void 0,
916
- left: !qe && /* @__PURE__ */ p(ve, {
917
- children: [/* @__PURE__ */ s("span", {
920
+ left: !Ke && /* @__PURE__ */ b(ve, {
921
+ children: [/* @__PURE__ */ c("span", {
918
922
  style: {
919
923
  fontWeight: "bold"
920
924
  },
921
925
  children: x == null ? void 0 : x.name
922
- }), /* @__PURE__ */ s(cn, {
926
+ }), /* @__PURE__ */ c(an, {
923
927
  disabled: (I == null ? void 0 : I.versionSelect) === !1,
924
928
  value: l == null ? void 0 : l.id,
925
929
  style: {
@@ -938,234 +942,234 @@ const mr = (w) => {
938
942
  }
939
943
  })]
940
944
  }),
941
- right: /* @__PURE__ */ p(ve, {
942
- children: [!h && T && T.add && /* @__PURE__ */ s(mt, {
945
+ right: /* @__PURE__ */ b(ve, {
946
+ children: [T && T.add && /* @__PURE__ */ c(pt, {
943
947
  isPreLabel: M,
944
948
  placement: "bottom",
945
- children: /* @__PURE__ */ s(re, {
949
+ children: /* @__PURE__ */ c(re, {
946
950
  type: "default",
947
- onClick: () => Ve(!0),
948
- disabled: _ === ie.Pending || _ === ie.Started || M,
951
+ onClick: () => ze(!0),
952
+ disabled: X === ie.Pending || X === ie.Started || M,
949
953
  children: "导入数据"
950
954
  }, "del")
951
- }), Qt && /* @__PURE__ */ s(ut, {
955
+ }), Yt && /* @__PURE__ */ c(ht, {
952
956
  menu: {
953
957
  items: [...G ? [{
954
958
  key: "manual",
955
- label: /* @__PURE__ */ s(mt, {
959
+ label: /* @__PURE__ */ c(pt, {
956
960
  isPreLabel: M,
957
- children: /* @__PURE__ */ s(ve, {
958
- children: /* @__PURE__ */ s(re, {
961
+ children: /* @__PURE__ */ c(ve, {
962
+ children: /* @__PURE__ */ c(re, {
959
963
  type: "text",
960
964
  disabled: M,
961
965
  onClick: () => {
962
- h || Pe("nocode"), Z(!0), z(-1), u === "nocode" && (z(0), N(v[0])), he(!0);
966
+ m || Ve("nocode"), Z(!0), z(-1), u === "nocode" && (z(0), N(v[0])), he(!0);
963
967
  },
964
968
  children: "人工标注"
965
969
  })
966
970
  })
967
971
  })
968
- }] : [], ct ? {
972
+ }] : [], at ? {
969
973
  key: "auto",
970
- label: /* @__PURE__ */ s(Pn, {
974
+ label: /* @__PURE__ */ c(Vn, {
971
975
  buttonType: "text",
972
976
  datasetId: a,
973
977
  versionId: (l == null ? void 0 : l.id) || "",
974
978
  disabled: !v.length,
975
- setIsTaskChange: Rt,
979
+ setIsTaskChange: Pt,
976
980
  datasetType: "detection",
977
- preLabelTask: Qe
981
+ preLabelTask: Ye
978
982
  })
979
983
  } : null]
980
984
  },
981
985
  placement: "bottom",
982
- children: /* @__PURE__ */ p(re, {
986
+ children: /* @__PURE__ */ b(re, {
983
987
  type: "primary",
984
- children: ["开始标注", /* @__PURE__ */ s(pt, {})]
988
+ children: ["开始标注", /* @__PURE__ */ c(bt, {})]
985
989
  })
986
- }), /* @__PURE__ */ s(Rn, {
987
- when: kt,
990
+ }), /* @__PURE__ */ c(Pn, {
991
+ when: wt,
988
992
  content: "确认要离开此页面吗?",
989
993
  subContent: "离开此页面后,将结束导入,放弃未上传的文件,请谨慎操作!"
990
- }), Ge && /* @__PURE__ */ s(Ln, {
991
- datasetIam: St,
994
+ }), Ze && /* @__PURE__ */ c(Dn, {
995
+ datasetIam: Ct,
992
996
  datasetId: a,
993
997
  currentVersion: l,
994
998
  tenCode: x == null ? void 0 : x.tenantCode,
995
- isVisible: Ge,
996
- setIsVisible: Ve,
999
+ isVisible: Ze,
1000
+ setIsVisible: ze,
997
1001
  getVersionListRequest: L,
998
- setIsConfirm: xt,
1002
+ setIsConfirm: kt,
999
1003
  onUploadStatusChange: (e) => {
1000
- It(e);
1004
+ xt(e);
1001
1005
  },
1002
1006
  tableReload: () => {
1003
1007
  var e, t, n;
1004
1008
  l != null && l.id && ((t = (e = ce.current) == null ? void 0 : e.getElementsByClassName("rc-virtual-list-holder")[0]) == null || t.scrollTo({
1005
1009
  top: 0
1006
- }), E(S(b({}, o), {
1010
+ }), E(S(p({}, o), {
1007
1011
  current: 1
1008
- })), (n = Re.current) == null || n.fetchLabels());
1012
+ })), (n = Pe.current) == null || n.fetchLabels());
1009
1013
  },
1010
- loadVersionData: rt,
1014
+ loadVersionData: it,
1011
1015
  markType: x.markType
1012
1016
  })]
1013
1017
  })
1014
1018
  }),
1015
- children: [/* @__PURE__ */ p("div", {
1019
+ children: [/* @__PURE__ */ b("div", {
1016
1020
  className: "detection-header",
1017
- children: [/* @__PURE__ */ p(ve, {
1018
- children: [se.tabs && /* @__PURE__ */ s(an, {
1021
+ children: [/* @__PURE__ */ b(ve, {
1022
+ children: [se.tabs && /* @__PURE__ */ c(dn, {
1019
1023
  className: "header-tab",
1020
1024
  activeKey: u,
1021
- items: ot,
1022
- onChange: lt
1023
- }), !h && se.search && /* @__PURE__ */ s(Tn, {
1025
+ items: lt,
1026
+ onChange: st
1027
+ }), se.search && /* @__PURE__ */ c(Tn, {
1024
1028
  placeholder: "请输入图片名称搜索",
1025
1029
  style: {
1026
1030
  width: 200
1027
1031
  },
1028
- suffix: /* @__PURE__ */ s(kn, {}),
1032
+ suffix: /* @__PURE__ */ c(wn, {}),
1029
1033
  value: ge,
1030
- onChange: $t,
1034
+ onChange: jt,
1031
1035
  allowClear: !0
1032
- }), !h && Te && /* @__PURE__ */ s(ut, {
1036
+ }), Te && /* @__PURE__ */ c(ht, {
1033
1037
  menu: {
1034
- items: Jt
1038
+ items: Qt
1035
1039
  },
1036
1040
  disabled: P.size === 0,
1037
- children: /* @__PURE__ */ p(re, {
1041
+ children: /* @__PURE__ */ b(re, {
1038
1042
  size: "middle",
1039
1043
  disabled: P.size === 0,
1040
- children: ["删除", /* @__PURE__ */ s(pt, {})]
1044
+ children: ["删除", /* @__PURE__ */ c(bt, {})]
1041
1045
  })
1042
- }), !h && Te && /* @__PURE__ */ p(ft, {
1043
- children: [/* @__PURE__ */ s(ht, {
1044
- checked: Et,
1045
- onChange: (e) => Zt(e.target.checked),
1046
+ }), Te && /* @__PURE__ */ b(ut, {
1047
+ children: [/* @__PURE__ */ c(gt, {
1048
+ checked: Ft,
1049
+ onChange: (e) => _t(e.target.checked),
1046
1050
  children: "选择当前页"
1047
- }), P.size > 0 && /* @__PURE__ */ p("span", {
1051
+ }), P.size > 0 && /* @__PURE__ */ b("span", {
1048
1052
  style: {
1049
1053
  color: "#666"
1050
1054
  },
1051
1055
  children: ["已选中", P.size, "张,共", o.total || 0, "张"]
1052
1056
  })]
1053
1057
  })]
1054
- }), /* @__PURE__ */ s(ve, {
1055
- children: u === "pending" && G && /* @__PURE__ */ s(re, {
1058
+ }), /* @__PURE__ */ c(ve, {
1059
+ children: u === "pending" && G && /* @__PURE__ */ c(re, {
1056
1060
  type: "primary",
1057
1061
  className: "pending-confirm-button",
1058
- onClick: jt,
1062
+ onClick: Gt,
1059
1063
  children: "一键确认"
1060
1064
  })
1061
1065
  })]
1062
- }), /* @__PURE__ */ p("div", {
1066
+ }), /* @__PURE__ */ b("div", {
1063
1067
  className: "d-row",
1064
- children: [/* @__PURE__ */ p("div", {
1068
+ children: [/* @__PURE__ */ b("div", {
1065
1069
  className: "d-right",
1066
1070
  ref: ce,
1067
- children: [ee && /* @__PURE__ */ s(En, {
1071
+ children: [_ && /* @__PURE__ */ c(Fn, {
1068
1072
  datasetId: a,
1069
- isImageDetailVisible: ee,
1073
+ isImageDetailVisible: _,
1070
1074
  setIsImageDetailVisible: he,
1071
- currentSample: f != null ? f : h,
1075
+ currentSample: f != null ? f : m,
1072
1076
  labels: B,
1073
1077
  previewMode: !ue,
1074
- filterItems: ot,
1078
+ filterItems: lt,
1075
1079
  filterMode: u,
1076
- onFilterChange: lt,
1080
+ onFilterChange: st,
1077
1081
  onChange: A,
1078
- onNextClick: (e) => it(e),
1079
- onPrevClick: (e) => Mt(e),
1080
- onSave: (e, t) => Ut(e, t),
1081
- onDeleteSample: () => Kt(),
1082
+ onNextClick: (e) => ot(e),
1083
+ onPrevClick: (e) => Ot(e),
1084
+ onSave: (e, t) => qt(e, t),
1085
+ onDeleteSample: () => Wt(),
1082
1086
  onEnterEdit: () => {
1083
1087
  Z(!0);
1084
1088
  },
1085
- onBackToDetail: (e) => qt(e),
1086
- onLoadingChange: Ft,
1087
- switchingSample: Dt,
1089
+ onBackToDetail: (e) => Kt(e),
1090
+ onLoadingChange: Bt,
1091
+ switchingSample: Nt,
1088
1092
  onRefresh: () => {
1089
1093
  var e;
1090
- (e = q()) == null || e.then((t) => {
1094
+ (e = K()) == null || e.then((t) => {
1091
1095
  var n, i;
1092
1096
  if (f) {
1093
1097
  const r = [];
1094
- (n = f.labels) == null || n.forEach((c) => {
1095
- t != null && t.find((d) => d.id === c.id) && r.push(c);
1096
- }), f.labels = r, A(b({}, f));
1098
+ (n = f.labels) == null || n.forEach((s) => {
1099
+ t != null && t.find((d) => d.id === s.id) && r.push(s);
1100
+ }), f.labels = r, A(p({}, f));
1097
1101
  }
1098
- if (h) {
1102
+ if (m) {
1099
1103
  const r = [];
1100
- (i = h.labels) == null || i.forEach((c) => {
1101
- t != null && t.find((d) => d.id === c.id) && r.push(c);
1102
- }), h.labels = r, N(b({}, h));
1104
+ (i = m.labels) == null || i.forEach((s) => {
1105
+ t != null && t.find((d) => d.id === s.id) && r.push(s);
1106
+ }), m.labels = r, N(p({}, m));
1103
1107
  }
1104
1108
  }), L();
1105
1109
  },
1106
1110
  isPreLabel: M,
1107
1111
  imgCount: {
1108
- total: Y,
1112
+ total: ee,
1109
1113
  index: F + 1
1110
1114
  },
1111
1115
  settingHide: !Se,
1112
1116
  canLabel: G,
1113
1117
  canDelete: Ce
1114
- }), o.total !== void 0 && o.total > 0 ? /* @__PURE__ */ s(ft, {
1115
- children: /* @__PURE__ */ s(gn, {
1118
+ }), o.total !== void 0 && o.total > 0 ? /* @__PURE__ */ c(ut, {
1119
+ children: /* @__PURE__ */ c(mn, {
1116
1120
  innerProps: {
1117
1121
  className: "d-right-row"
1118
1122
  },
1119
1123
  data: v,
1120
1124
  itemKey: "id",
1121
- height: Math.max(bt, 1),
1122
- onScroll: Ht,
1125
+ height: Math.max(vt, 1),
1126
+ onScroll: Ut,
1123
1127
  children: (e, t) => {
1124
1128
  var n;
1125
- return /* @__PURE__ */ s(dn, {
1129
+ return /* @__PURE__ */ c(fn, {
1126
1130
  className: "d-right-col",
1127
1131
  "data-sample-id": e.id,
1128
- children: /* @__PURE__ */ p("div", {
1132
+ children: /* @__PURE__ */ b("div", {
1129
1133
  className: "right-col-wrapper",
1130
- onMouseEnter: () => Ee(e.id),
1131
- onMouseLeave: () => Ee(""),
1132
- children: [/* @__PURE__ */ s("div", {
1134
+ onMouseEnter: () => Fe(e.id),
1135
+ onMouseLeave: () => Fe(""),
1136
+ children: [/* @__PURE__ */ c("div", {
1133
1137
  className: "detection-status-wrapper",
1134
- children: /* @__PURE__ */ s(An, {
1138
+ children: /* @__PURE__ */ c(En, {
1135
1139
  sample: e
1136
1140
  })
1137
- }), Te && /* @__PURE__ */ s("div", {
1141
+ }), Te && /* @__PURE__ */ c("div", {
1138
1142
  className: "sample-checkbox-wrapper",
1139
- children: /* @__PURE__ */ s(ht, {
1143
+ children: /* @__PURE__ */ c(gt, {
1140
1144
  checked: P.has(e.id),
1141
1145
  onChange: (i) => {
1142
- i.stopPropagation(), Gt(e.id, i.target.checked);
1146
+ i.stopPropagation(), Zt(e.id, i.target.checked);
1143
1147
  },
1144
1148
  onClick: (i) => i.stopPropagation()
1145
1149
  })
1146
- }), /* @__PURE__ */ s("div", {
1150
+ }), /* @__PURE__ */ c("div", {
1147
1151
  className: "right-col-img",
1148
- onClick: () => Bt(t),
1149
- children: /* @__PURE__ */ s(Nn, {
1152
+ onClick: () => Mt(t),
1153
+ children: /* @__PURE__ */ c(Rn, {
1150
1154
  fileKey: e.fileKey,
1151
1155
  width: 124,
1152
1156
  thumbnailUrl: e.thumbnailUrl
1153
1157
  })
1154
- }), /* @__PURE__ */ p("div", {
1158
+ }), /* @__PURE__ */ b("div", {
1155
1159
  className: "right-col-text",
1156
- children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ s(fn, {
1160
+ children: [(n = e.labels) != null && n.length ? /* @__PURE__ */ c(un, {
1157
1161
  placement: "top",
1158
- title: /* @__PURE__ */ s("div", {
1159
- children: Object.keys(e.labels.reduce((i, r) => (i[r.label] ? ++i[r.label] : i[r.label] = 1, i), {})).map((i) => /* @__PURE__ */ s("div", {
1162
+ title: /* @__PURE__ */ c("div", {
1163
+ children: Object.keys(e.labels.reduce((i, r) => (i[r.label] ? ++i[r.label] : i[r.label] = 1, i), {})).map((i) => /* @__PURE__ */ c("div", {
1160
1164
  children: i
1161
1165
  }, i))
1162
1166
  }),
1163
- children: /* @__PURE__ */ p("div", {
1167
+ children: /* @__PURE__ */ b("div", {
1164
1168
  style: {
1165
1169
  width: "100%",
1166
1170
  display: "flex"
1167
1171
  },
1168
- children: [/* @__PURE__ */ s("span", {
1172
+ children: [/* @__PURE__ */ c("span", {
1169
1173
  style: {
1170
1174
  display: "inline-block",
1171
1175
  maxWidth: "calc(100% - 25px)",
@@ -1174,21 +1178,21 @@ const mr = (w) => {
1174
1178
  whiteSpace: "nowrap"
1175
1179
  },
1176
1180
  children: e.labels[0].label
1177
- }), e.labels.length > 1 ? /* @__PURE__ */ s("span", {
1181
+ }), e.labels.length > 1 ? /* @__PURE__ */ c("span", {
1178
1182
  style: {
1179
1183
  color: "rgba(0,0,0,0.45)",
1180
1184
  marginLeft: 5
1181
1185
  },
1182
- children: Ot(e)
1186
+ children: Ht(e)
1183
1187
  }) : null]
1184
1188
  })
1185
- }) : /* @__PURE__ */ s("span", {
1189
+ }) : /* @__PURE__ */ c("span", {
1186
1190
  style: {
1187
1191
  color: "rgba(0,0,0,0.45)",
1188
1192
  width: "100%"
1189
1193
  },
1190
1194
  children: "无标签"
1191
- }), /* @__PURE__ */ s("div", {
1195
+ }), /* @__PURE__ */ c("div", {
1192
1196
  children: t + 1
1193
1197
  })]
1194
1198
  })]
@@ -1196,21 +1200,21 @@ const mr = (w) => {
1196
1200
  }, e.id);
1197
1201
  }
1198
1202
  })
1199
- }) : /* @__PURE__ */ s("div", {
1203
+ }) : /* @__PURE__ */ c("div", {
1200
1204
  className: "empty",
1201
- children: o.total === 0 ? /* @__PURE__ */ s(un, {
1202
- image: vn,
1203
- description: /* @__PURE__ */ p("span", {
1204
- children: ["暂无数据", u !== "hascode" && !ge && /* @__PURE__ */ s("span", {
1205
- children: T && T.add && /* @__PURE__ */ p(re, {
1205
+ children: o.total === 0 ? /* @__PURE__ */ c(hn, {
1206
+ image: yn,
1207
+ description: /* @__PURE__ */ b("span", {
1208
+ children: ["暂无数据", u !== "hascode" && !ge && /* @__PURE__ */ c("span", {
1209
+ children: T && T.add && /* @__PURE__ */ b(re, {
1206
1210
  type: "link",
1207
1211
  size: "small",
1208
1212
  style: {
1209
1213
  padding: 0
1210
1214
  },
1211
- onClick: () => Ve(!0),
1212
- disabled: _ === ie.Pending || _ === ie.Started,
1213
- children: [/* @__PURE__ */ s("span", {
1215
+ onClick: () => ze(!0),
1216
+ disabled: X === ie.Pending || X === ie.Started,
1217
+ children: [/* @__PURE__ */ c("span", {
1214
1218
  style: {
1215
1219
  color: "black"
1216
1220
  },
@@ -1219,24 +1223,24 @@ const mr = (w) => {
1219
1223
  })
1220
1224
  })]
1221
1225
  })
1222
- }) : /* @__PURE__ */ s(hn, {})
1226
+ }) : /* @__PURE__ */ c(gn, {})
1223
1227
  })]
1224
- }), u !== "nocode" && se.labels && /* @__PURE__ */ s("div", {
1228
+ }), u !== "nocode" && se.labels && /* @__PURE__ */ c("div", {
1225
1229
  className: "d-sider",
1226
- children: /* @__PURE__ */ s(Cn, {
1227
- ref: Re,
1230
+ children: /* @__PURE__ */ c(In, {
1231
+ ref: Pe,
1228
1232
  datasetId: a,
1229
1233
  data: B || [],
1230
1234
  showStatColumns: !0,
1231
1235
  selected: $,
1232
1236
  onSelectedChange: (e) => {
1233
- ne(), ze((B == null ? void 0 : B.filter((t) => e.find((n) => n.label === t.label))) || []);
1237
+ ne(), Ae((B == null ? void 0 : B.filter((t) => e.find((n) => n.label === t.label))) || []);
1234
1238
  },
1235
1239
  onListChange: (e) => {
1236
1240
  if (!l)
1237
1241
  return;
1238
1242
  let t = 2;
1239
- u === "pending" ? t = 1 : u === "hascode" && (t = 0), g.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
1243
+ u === "pending" ? t = 1 : u === "hascode" && (t = 0), h.cvforceDatahub.getDatasetsIdVersionsVidLabelcount(a, l.id, {
1240
1244
  confirmStatus: t
1241
1245
  }).then((n) => {
1242
1246
  const r = (n || []).filter((d) => d.label !== "nocode").map((d, y) => {
@@ -1246,10 +1250,10 @@ const mr = (w) => {
1246
1250
  count: d.count,
1247
1251
  boxCount: (D = d.boxCount) != null ? D : 0,
1248
1252
  id: d.id,
1249
- color: gt[y % 40]
1253
+ color: mt[y % 40]
1250
1254
  };
1251
- }), c = $.filter((d) => r.some((y) => y.id === d.id));
1252
- Xe(r), $.length !== c.length && ze(c);
1255
+ }), s = $.filter((d) => r.some((y) => y.id === d.id));
1256
+ Je(r), $.length !== s.length && Ae(s);
1253
1257
  }), L();
1254
1258
  },
1255
1259
  isPreLabel: M
@@ -1257,7 +1261,7 @@ const mr = (w) => {
1257
1261
  })]
1258
1262
  })]
1259
1263
  })
1260
- }) : /* @__PURE__ */ s("div", {
1264
+ }) : /* @__PURE__ */ c("div", {
1261
1265
  style: {
1262
1266
  color: "red",
1263
1267
  textAlign: "center"
@@ -1268,6 +1272,6 @@ const mr = (w) => {
1268
1272
  });
1269
1273
  };
1270
1274
  export {
1271
- Bn as ISampleActionType,
1272
- mr as default
1275
+ Mn as ISampleActionType,
1276
+ pr as default
1273
1277
  };