@glodon-aiot/dataset-annotation 3.10.0-alpha.15 → 3.10.0-alpha.16

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,52 +1,51 @@
1
- var pl = Object.defineProperty;
1
+ var ml = Object.defineProperty;
2
2
  var Ve = Object.getOwnPropertySymbols;
3
- var ul = Object.prototype.hasOwnProperty, ml = Object.prototype.propertyIsEnumerable;
4
- var Pe = (z, e, s) => e in z ? pl(z, e, { enumerable: !0, configurable: !0, writable: !0, value: s }) : z[e] = s, Me = (z, e) => {
5
- for (var s in e || (e = {}))
6
- ul.call(e, s) && Pe(z, s, e[s]);
3
+ var fl = Object.prototype.hasOwnProperty, hl = Object.prototype.propertyIsEnumerable;
4
+ var Pe = (z, e, i) => e in z ? ml(z, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : z[e] = i, Me = (z, e) => {
5
+ for (var i in e || (e = {}))
6
+ fl.call(e, i) && Pe(z, i, e[i]);
7
7
  if (Ve)
8
- for (var s of Ve(e))
9
- ml.call(e, s) && Pe(z, s, e[s]);
8
+ for (var i of Ve(e))
9
+ hl.call(e, i) && Pe(z, i, e[i]);
10
10
  return z;
11
11
  };
12
- var ce = (z, e, s) => new Promise((m, K) => {
12
+ var ce = (z, e, i) => new Promise((m, K) => {
13
13
  var _ = (N) => {
14
14
  try {
15
- T(s.next(N));
15
+ T(i.next(N));
16
16
  } catch (v) {
17
17
  K(v);
18
18
  }
19
19
  }, h = (N) => {
20
20
  try {
21
- T(s.throw(N));
21
+ T(i.throw(N));
22
22
  } catch (v) {
23
23
  K(v);
24
24
  }
25
25
  }, T = (N) => N.done ? m(N.value) : Promise.resolve(N.value).then(_, h);
26
- T((s = s.apply(z, e)).next());
26
+ T((i = i.apply(z, e)).next());
27
27
  });
28
28
  import { jsxs as d, Fragment as de, jsx as l } from "react/jsx-runtime";
29
- import { useContext as fl, useState as r, useRef as hl, useEffect as O } from "react";
30
- import { Form as V, message as $, Modal as H, Button as P, Radio as k, Tooltip as gl, Space as je, Upload as Cl, Row as pe, Col as bl, Spin as yl, Result as De } from "antd";
29
+ import { useContext as gl, useState as r, useRef as Cl, useEffect as O } from "react";
30
+ import { Form as V, message as $, Modal as H, Button as P, Radio as k, Tooltip as bl, Space as je, Upload as De, Row as pe, Col as yl, Spin as Sl, Result as Ke } from "antd";
31
31
  import "./style.less.mjs";
32
- import { InfoCircleOutlined as Sl, CloudUploadOutlined as zl, PaperClipOutlined as wl, DeleteOutlined as El, PlusOutlined as Nl } from "@ant-design/icons";
33
- import vl from "browser-md5-file";
34
- import { initMinio as Ke, putObjectBuffer as _e } from "@glodon-aiot/minio";
35
- import xl from "antd/lib/upload/Dragger";
32
+ import { InfoCircleOutlined as zl, CloudUploadOutlined as wl, PaperClipOutlined as El, DeleteOutlined as Nl, PlusOutlined as vl } from "@ant-design/icons";
33
+ import xl from "browser-md5-file";
34
+ import { initMinio as _e, putObjectBuffer as Ze } from "@glodon-aiot/minio";
36
35
  import Al from "./pic_zip.svg.mjs";
37
36
  import Fl from "./pic_zip_json.svg.mjs";
38
37
  import Rl from "./pic_vlm_json_zip.svg.mjs";
39
38
  import Bl from "./pic_vlm_zip.svg.mjs";
40
- import { MB as Ze, GB as $l } from "../../constant.mjs";
39
+ import { MB as Ge, GB as $l } from "../../constant.mjs";
41
40
  import { fileSuffixToLowerCase as kl } from "../../utils/index.mjs";
42
41
  import Tl from "../../DatasetContext/index.mjs";
43
42
  import { EXAMPLE_SRC_ROOT as Ul, VLM_EXAMPLE_SRC_ROOT as Ll } from "../../featuresConfig.mjs";
44
43
  import { getImportConfig as Ol } from "./config.mjs";
45
44
  let f = 0, G = 0, M = 0, I = 0;
46
- const ot = (z) => {
45
+ const nt = (z) => {
47
46
  const {
48
47
  datasetIam: e,
49
- datasetId: s,
48
+ datasetId: i,
50
49
  currentVersion: m,
51
50
  tenCode: K,
52
51
  isVisible: _,
@@ -69,33 +68,35 @@ const ot = (z) => {
69
68
  exampleSrcRoot: Ul,
70
69
  vlmExampleSrcRoot: Ll
71
70
  }
72
- } = fl(Tl), [w, Ge] = r(0), [E, Ie] = r(0), [Y, qe] = r([]), [j, Xe] = r(), [ge, Vl] = r([]), [ee, X] = r(!1), [Ce, le] = r(!1), [Z, te] = r(!1), [ie, Je] = r(0), [be, We] = r(0), [J, ye] = r(-1), [se, Pl] = r([]), [Se, Ml] = r([]), [ze, ne] = r(!1), He = new vl(), [W] = V.useForm(), n = V.useWatch("acceptType", W), F = V.useWatch("labelState", W), [C, we] = r([]), [R, Ee] = r([]), [B, Qe] = r(), [Ne, ve] = r(0), [xe, Ae] = r(!1), [jl, Fe] = r(""), [Ye, Re] = r(!1), [Be, el] = r(
71
+ } = gl(Tl), [w, Ie] = r(0), [E, qe] = r(0), [Y, Xe] = r([]), [j, Je] = r(), [ge, Vl] = r([]), [ee, X] = r(!1), [Ce, le] = r(!1), [Z, te] = r(!1), [se, We] = r(0), [be, He] = r(0), [J, ye] = r(-1), [ie, Pl] = r([]), [Se, Ml] = r([]), [ze, ne] = r(!1), Qe = new xl(), [W] = V.useForm(), n = V.useWatch("acceptType", W), F = V.useWatch("labelState", W), [C, we] = r([]), [R, Ee] = r([]), [B, Ye] = r(), [Ne, ve] = r(0), [xe, Ae] = r(!1), [jl, Fe] = r(""), [el, Re] = r(!1), [Be, ll] = r(
73
72
  "unlabeled"
74
73
  /* Unlabeled */
75
- ), oe = hl(!0), g = Ol(h), ae = g.imageMimeTypes, $e = g.imageAccept, re = g.maxImageSize;
74
+ ), oe = Cl(!0), {
75
+ Dragger: tl
76
+ } = De, g = Ol(h), ae = g.imageMimeTypes, $e = g.imageAccept, re = g.maxImageSize;
76
77
  O(() => {
77
78
  f = 0, G = 0, M = 0, I = 0, te(!1), _ && (oe.current = !1, q && q());
78
79
  }, [_]);
79
- const ke = (t, i) => {
80
+ const ke = (t, s) => {
80
81
  var o;
81
82
  if (n === "image") {
82
83
  ne(!0);
83
84
  let a = 0;
84
- if (f = f + 1, G = G + 1, i.length === 0)
85
+ if (f = f + 1, G = G + 1, s.length === 0)
85
86
  return;
86
87
  let u = 0;
87
- const [...c] = i, y = window.URL || window.webkitURL, S = new Image();
88
+ const [...c] = s, y = window.URL || window.webkitURL, S = new Image();
88
89
  S.src = y.createObjectURL(t), S.onload = () => {
89
90
  Y.push({
90
91
  name: t.name,
91
92
  src: S.src,
92
93
  width: S.width,
93
94
  height: S.height
94
- }), qe(Y);
95
- }, i.map((x) => {
95
+ }), Xe(Y);
96
+ }, s.map((x) => {
96
97
  const A = ae.some((L) => L === x.type), U = x.size <= re;
97
98
  A ? U || (a = a + 1, c.splice(c.findIndex((L) => L.name === x.name), 1)) : (u = u + 1, c.splice(c.findIndex((L) => L.name === x.name), 1));
98
- }), c.length > 100 && c.splice(100, c.length), Ge(u), Ie(a), G === i.length && (ne(!0), G = 0);
99
+ }), c.length > 100 && c.splice(100, c.length), Ie(u), qe(a), G === s.length && (ne(!0), G = 0);
99
100
  const b = ae.some((x) => x === t.type), D = t.size <= re;
100
101
  if (b) {
101
102
  if (!D)
@@ -113,54 +114,54 @@ const ot = (z) => {
113
114
  return !1;
114
115
  };
115
116
  O(() => {
116
- ze !== !1 && (!w && !E && !f || (f = f - I - w - E, f < 101 ? w > 0 && E > 0 ? ($.error(`${w + E}个文件添加失败,格式、大小或数量不符合要求`), f = f - w - E) : w > 0 && E === 0 ? $.error(`${w}个文件添加失败,格式不符合要求`) : w === 0 && E > 0 ? $.error(`${E}个文件添加失败,单张图片超过${g.maxImageSize / Ze}M`) : w === 0 && E === 0 && $.success("校验成功") : w + E === 0 ? ($.error(`${f - 100}个文件添加失败,超过数量限制`), f = 100) : ($.error(`${f - 100 + w + E}个文件添加失败,格式、大小或数量不符合要求`), f = f < 101 ? f : 100), ne(!1)));
117
+ ze !== !1 && (!w && !E && !f || (f = f - I - w - E, f < 101 ? w > 0 && E > 0 ? ($.error(`${w + E}个文件添加失败,格式、大小或数量不符合要求`), f = f - w - E) : w > 0 && E === 0 ? $.error(`${w}个文件添加失败,格式不符合要求`) : w === 0 && E > 0 ? $.error(`${E}个文件添加失败,单张图片超过${g.maxImageSize / Ge}M`) : w === 0 && E === 0 && $.success("校验成功") : w + E === 0 ? ($.error(`${f - 100}个文件添加失败,超过数量限制`), f = 100) : ($.error(`${f - 100 + w + E}个文件添加失败,格式、大小或数量不符合要求`), f = f < 101 ? f : 100), ne(!1)));
117
118
  }, [ze]);
118
- const ll = (t) => {
119
- const i = t.originFileObj;
119
+ const sl = (t) => {
120
+ const s = t.originFileObj;
120
121
  return new Promise((o, a) => {
121
- He.md5(i, (u, c) => {
122
- u && a(u), il(c, i), o(c);
122
+ Qe.md5(s, (u, c) => {
123
+ u && a(u), nl(c, s), o(c);
123
124
  });
124
125
  });
125
- }, tl = () => ce(void 0, null, function* () {
126
+ }, il = () => ce(void 0, null, function* () {
126
127
  if (!C)
127
128
  return;
128
129
  const t = [];
129
- for (let i = 0; i < C.length; i++) {
130
- const o = C[i], a = yield ll(o);
130
+ for (let s = 0; s < C.length; s++) {
131
+ const o = C[s], a = yield sl(o);
131
132
  t.push(a);
132
133
  }
133
- !s || t.length === 0 || p == null || p.getDeduplication(t, s).then((i) => {
134
- Xe(i), Re(!1);
134
+ !i || t.length === 0 || p == null || p.getDeduplication(t, i).then((s) => {
135
+ Je(s), Re(!1);
135
136
  });
136
137
  });
137
138
  O(() => {
138
- tl();
139
+ il();
139
140
  }, [C]);
140
- const il = (t, i) => {
141
- i.md5 = t, ge.push(i);
141
+ const nl = (t, s) => {
142
+ s.md5 = t, ge.push(s);
142
143
  }, Te = ({
143
144
  fileList: t
144
145
  }) => {
145
146
  if (n === "zip")
146
147
  return;
147
148
  Re(!0);
148
- const i = t.filter((o) => o.size && o.size <= re ? ae.some((a) => o.type === a) : !1);
149
- i.splice(100, i.length), i.length < C.length ? (we(i), I++) : (M = M - I, I = 0, M++, M == i.length && we(i), M > i.length && (M = i.length));
149
+ const s = t.filter((o) => o.size && o.size <= re ? ae.some((a) => o.type === a) : !1);
150
+ s.splice(100, s.length), s.length < C.length ? (we(s), I++) : (M = M - I, I = 0, M++, M == s.length && we(s), M > s.length && (M = s.length));
150
151
  }, Ue = () => {
151
152
  n === "zip" && (oe.current = !0), T(!1);
152
- }, sl = () => {
153
+ }, ol = () => {
153
154
  if (n === "image") {
154
155
  if (!j)
155
156
  return;
156
- let t = 0, i = 0;
157
+ let t = 0, s = 0;
157
158
  if (j.duplicated.length !== 0 && j.duplicated.map((o, a) => {
158
159
  var y;
159
160
  const u = j.duplicatedMd5[a], c = ((y = C.find((S) => {
160
161
  var b;
161
162
  return ((b = S.originFileObj) == null ? void 0 : b.md5) === u;
162
163
  })) == null ? void 0 : y.name) || "";
163
- se.push({
164
+ ie.push({
164
165
  labels: [],
165
166
  fileKey: o,
166
167
  sampleFileName: {
@@ -176,17 +177,17 @@ const ot = (z) => {
176
177
  "Content-Type": "application/octet-stream",
177
178
  "X-Amz-Meta-Width": b == null ? void 0 : b.width,
178
179
  "X-Amz-Meta-Height": b == null ? void 0 : b.height
179
- }, x = `dataset/${s}/sample/${a}${kl(S)}`;
180
+ }, x = `dataset/${i}/sample/${a}${kl(S)}`;
180
181
  delete c.md5;
181
182
  const A = new FileReader();
182
183
  A.readAsArrayBuffer(c), A.onload = (U) => {
183
- Ke({
184
+ _e({
184
185
  endPoint: e == null ? void 0 : e.endpoints[0],
185
186
  useSSL: e == null ? void 0 : e.useSSL,
186
187
  accessKey: e == null ? void 0 : e.accessKey,
187
188
  secretKey: e == null ? void 0 : e.secretKey
188
- }), _e(K, x, U.target.result, D, (L, Dl) => {
189
- X(!0), i += 1, L && (t += 1, We(t)), Je(i), Se.push({
189
+ }), Ze(K, x, U.target.result, D, (L, Dl) => {
190
+ X(!0), s += 1, L && (t += 1, He(t)), We(s), Se.push({
190
191
  labels: [],
191
192
  fileKey: `${K}/${x}`,
192
193
  sampleFileName: {
@@ -197,31 +198,31 @@ const ot = (z) => {
197
198
  };
198
199
  }));
199
200
  Promise.all(o).then(() => {
200
- !s || !m || setTimeout(() => {
201
- p == null || p.postDatasetsIdVersionsVidSamples(s, m.id, {
202
- samples: Se.concat(se)
201
+ !i || !m || setTimeout(() => {
202
+ p == null || p.postDatasetsIdVersionsVidSamples(i, m.id, {
203
+ samples: Se.concat(ie)
203
204
  }).then(() => {
204
- p.getDatasetsIdVersionsVid(s, m.id).then((a) => {
205
+ p.getDatasetsIdVersionsVid(i, m.id).then((a) => {
205
206
  ye(a.samplesCount - m.samplesCount);
206
207
  }), Q(!0), v && v(!1);
207
208
  });
208
209
  }, 100);
209
210
  });
210
211
  } else {
211
- if (!s || !m)
212
+ if (!i || !m)
212
213
  return;
213
- p == null || p.postDatasetsIdVersionsVidSamples(s, m.id, {
214
- samples: se
214
+ p == null || p.postDatasetsIdVersionsVidSamples(i, m.id, {
215
+ samples: ie
215
216
  }).then(() => {
216
- p.getDatasetsIdVersionsVid(s, m.id).then((o) => {
217
+ p.getDatasetsIdVersionsVid(i, m.id).then((o) => {
217
218
  ye(o.samplesCount - m.samplesCount);
218
219
  }), Q(!0), v && v(!1);
219
220
  });
220
221
  }
221
222
  } else
222
- nl(R);
223
- }, nl = (t) => {
224
- !s || !m || t.map((i, o) => {
223
+ al(R);
224
+ }, al = (t) => {
225
+ !i || !m || t.map((s, o) => {
225
226
  var S;
226
227
  const a = {
227
228
  "Content-Type": "application/octet-stream"
@@ -231,19 +232,19 @@ const ot = (z) => {
231
232
  accessKey: e == null ? void 0 : e.accessKey,
232
233
  secretKey: e == null ? void 0 : e.secretKey
233
234
  }, c = (e == null ? void 0 : e.prefix) + ((S = t[0]) == null ? void 0 : S.name), y = new FileReader();
234
- y.readAsArrayBuffer(i), y.onload = (b) => {
235
- Ke(u), _e(e == null ? void 0 : e.bucket, c, b.target.result, a, (D, x) => {
235
+ y.readAsArrayBuffer(s), y.onload = (b) => {
236
+ _e(u), Ze(e == null ? void 0 : e.bucket, c, b.target.result, a, (D, x) => {
236
237
  if (D)
237
238
  console.log(D);
238
239
  else {
239
240
  if (oe.current)
240
241
  return;
241
- X(!0), h === "vlm" ? p == null || p.postVlmUploadPicsZip(s, m.id, {
242
+ X(!0), h === "vlm" ? p == null || p.postVlmUploadPicsZip(i, m.id, {
242
243
  zipUrl: (e == null ? void 0 : e.bucket) + "/" + c,
243
244
  type: F === "labeled" ? 2 : 1
244
245
  }).then((A) => {
245
246
  Le(A), Fe(A);
246
- }) : p == null || p.postUploadPicsZip(s, m.id, Me({
247
+ }) : p == null || p.postUploadPicsZip(i, m.id, Me({
247
248
  zipUrls: [(e == null ? void 0 : e.bucket) + "/" + c]
248
249
  }, (h === "ocr" || h === "vlm") && {
249
250
  type: F === "labeled" ? 1 : 0
@@ -255,17 +256,17 @@ const ot = (z) => {
255
256
  };
256
257
  });
257
258
  }, Le = (t) => ce(void 0, null, function* () {
258
- var i;
259
- if (!(!s || !m || !p))
259
+ var s;
260
+ if (!(!i || !m || !p))
260
261
  try {
261
- const o = yield p.checkFileResult(s, m.id, {
262
+ const o = yield p.checkFileResult(i, m.id, {
262
263
  taskId: t
263
264
  }, 5e3, h, (a) => {
264
265
  ve(a);
265
266
  });
266
- o && Qe(JSON.parse(o));
267
+ o && Ye(JSON.parse(o));
267
268
  } catch (o) {
268
- if (((i = o.cause) == null ? void 0 : i.code) === -101) {
269
+ if (((s = o.cause) == null ? void 0 : s.code) === -101) {
269
270
  Ae(!0);
270
271
  return;
271
272
  }
@@ -274,27 +275,27 @@ const ot = (z) => {
274
275
  O(() => {
275
276
  B && (ve(100), le(!0));
276
277
  }, [B]), O(() => {
277
- ie !== 0 && (Q(!1), v && v(!0));
278
- }, [ie]), O(() => {
278
+ se !== 0 && (Q(!1), v && v(!0));
279
+ }, [se]), O(() => {
279
280
  J !== -1 && (le(!0), te(!1));
280
281
  }, [J]);
281
- const ol = () => {
282
+ const rl = () => {
282
283
  Oe(), le(!1), me && me();
283
284
  }, Oe = () => {
284
285
  N(), X(!1), T(!1), ue && ue(), q && q();
285
- }, al = /* @__PURE__ */ d("div", {
286
- children: [/* @__PURE__ */ l(Nl, {}), /* @__PURE__ */ l("div", {
286
+ }, cl = /* @__PURE__ */ d("div", {
287
+ children: [/* @__PURE__ */ l(vl, {}), /* @__PURE__ */ l("div", {
287
288
  style: {
288
289
  marginTop: 8
289
290
  },
290
291
  children: "添加图片"
291
292
  })]
292
- }), rl = (t) => {
293
- const i = R.filter((o) => o.uid !== t.uid);
294
- Ee(i);
295
- }, cl = () => {
293
+ }), dl = (t) => {
294
+ const s = R.filter((o) => o.uid !== t.uid);
295
+ Ee(s);
296
+ }, pl = () => {
296
297
  F === "labeled" ? h === "vlm" ? window.location.href = `${he}/%E6%9C%89%E6%A0%87%E6%B3%A8%E7%A4%BA%E4%BE%8B.zip` : window.location.href = `${fe}/%E6%A0%87%E6%B3%A8%E6%A0%BC%E5%BC%8F%E7%A4%BA%E4%BE%8B.zip` : h === "vlm" ? window.location.href = `${he}/%E6%97%A0%E6%A0%87%E6%B3%A8%E7%A4%BA%E4%BE%8B.zip` : window.location.href = `${fe}/%E7%A4%BA%E4%BE%8B%E5%8E%8B%E7%BC%A9%E5%8C%85.zip`;
297
- }, dl = () => {
298
+ }, ul = () => {
298
299
  N(), Ae(!1), X(!1), T(!1);
299
300
  };
300
301
  return O(() => {
@@ -320,10 +321,10 @@ const ot = (z) => {
320
321
  type: "primary",
321
322
  htmlType: "submit",
322
323
  form: "importModal",
323
- disabled: n === "image" && !C.length || n === "zip" && !R.length || ee && Ne == 0 || Ye,
324
+ disabled: n === "image" && !C.length || n === "zip" && !R.length || ee && Ne == 0 || el,
324
325
  loading: Z == !0,
325
326
  onClick: () => {
326
- sl(), te(!0);
327
+ ol(), te(!0);
327
328
  },
328
329
  children: "导入"
329
330
  }, "confirm")],
@@ -353,16 +354,16 @@ const ot = (z) => {
353
354
  children: /* @__PURE__ */ d(k.Group, {
354
355
  disabled: Z,
355
356
  onChange: (t) => {
356
- el(t.target.value);
357
+ ll(t.target.value);
357
358
  },
358
359
  children: [/* @__PURE__ */ l(k, {
359
360
  value: "unlabeled",
360
361
  children: "无标注信息"
361
362
  }), /* @__PURE__ */ d(k, {
362
363
  value: "labeled",
363
- children: ["有标注信息", h === "vlm" && /* @__PURE__ */ l(gl, {
364
+ children: ["有标注信息", h === "vlm" && /* @__PURE__ */ l(bl, {
364
365
  title: "支持上传带OCR标注信息的数据",
365
- children: /* @__PURE__ */ l(Sl, {
366
+ children: /* @__PURE__ */ l(zl, {
366
367
  style: {
367
368
  cursor: "pointer",
368
369
  marginLeft: 4,
@@ -405,7 +406,7 @@ const ot = (z) => {
405
406
  })
406
407
  }), /* @__PURE__ */ d("div", {
407
408
  className: "file-upload",
408
- children: [(n === "image" && !C.length || n === "zip") && /* @__PURE__ */ d(xl, {
409
+ children: [(n === "image" && !C.length || n === "zip") && /* @__PURE__ */ d(tl, {
409
410
  name: "file",
410
411
  showUploadList: !1,
411
412
  multiple: !0,
@@ -416,7 +417,7 @@ const ot = (z) => {
416
417
  disabled: n === "zip" ? R.length === 1 : !1,
417
418
  children: [/* @__PURE__ */ l("span", {
418
419
  className: "file-upload-icon",
419
- children: /* @__PURE__ */ l(zl, {})
420
+ children: /* @__PURE__ */ l(wl, {})
420
421
  }), /* @__PURE__ */ d(je, {
421
422
  className: "file-upload-action",
422
423
  children: [n === "image" && "拖拽图片至此,或者", n === "zip" && "拖拽包含“图片”的压缩包至此,或者", /* @__PURE__ */ l(P, {
@@ -434,7 +435,7 @@ const ot = (z) => {
434
435
  },
435
436
  children: [/* @__PURE__ */ d("div", {
436
437
  className: "item-upload-desc item-upload-desc__1",
437
- children: ["1. 支持", g.imageFormatsText, "格式,单张图片不超过", g.maxImageSize / Ze, "M;"]
438
+ children: ["1. 支持", g.imageFormatsText, "格式,单张图片不超过", g.maxImageSize / Ge, "M;"]
438
439
  }), /* @__PURE__ */ l("div", {
439
440
  className: "item-upload-desc",
440
441
  children: "2. 单次上传最多可选择100个文件。"
@@ -448,10 +449,10 @@ const ot = (z) => {
448
449
  className: "item-upload-desc item-upload-desc__1",
449
450
  children: "1. 仅支持.zip格式,单个压缩包不超过2G;"
450
451
  }), F === "labeled" ? /* @__PURE__ */ l(de, {
451
- children: g.zipUploadTexts.labeled.description.map((t, i) => /* @__PURE__ */ d("div", {
452
+ children: g.zipUploadTexts.labeled.description.map((t, s) => /* @__PURE__ */ d("div", {
452
453
  className: "item-upload-desc",
453
- children: [i + 2, ". ", t]
454
- }, i))
454
+ children: [s + 2, ". ", t]
455
+ }, s))
455
456
  }) : /* @__PURE__ */ d("div", {
456
457
  className: "item-upload-desc",
457
458
  children: ["2. ", g.zipUploadTexts.unlabeled.description[0]]
@@ -462,7 +463,7 @@ const ot = (z) => {
462
463
  })]
463
464
  }), n === "image" && C.length ? /* @__PURE__ */ l("div", {
464
465
  className: "picture-upload",
465
- children: /* @__PURE__ */ l(Cl, {
466
+ children: /* @__PURE__ */ l(De, {
466
467
  listType: "picture-card",
467
468
  fileList: C,
468
469
  multiple: !0,
@@ -472,7 +473,7 @@ const ot = (z) => {
472
473
  beforeUpload: ke,
473
474
  accept: $e,
474
475
  onChange: Te,
475
- children: C.length < 100 ? al : null
476
+ children: C.length < 100 ? cl : null
476
477
  })
477
478
  }) : /* @__PURE__ */ l(de, {}), n === "zip" && /* @__PURE__ */ d("div", {
478
479
  className: "upload-wrapper",
@@ -481,7 +482,7 @@ const ot = (z) => {
481
482
  children: /* @__PURE__ */ l(pe, {
482
483
  gutter: [24, 8],
483
484
  className: "upload-pannel",
484
- children: R.map((t) => /* @__PURE__ */ l(bl, {
485
+ children: R.map((t) => /* @__PURE__ */ l(yl, {
485
486
  span: 24,
486
487
  className: "upload-item",
487
488
  children: /* @__PURE__ */ d(pe, {
@@ -491,7 +492,7 @@ const ot = (z) => {
491
492
  align: "middle",
492
493
  children: [/* @__PURE__ */ l("span", {
493
494
  className: "upload-item-file-icon",
494
- children: /* @__PURE__ */ l(wl, {})
495
+ children: /* @__PURE__ */ l(El, {})
495
496
  }), /* @__PURE__ */ l("span", {
496
497
  className: "upload-item-name",
497
498
  children: t.name
@@ -500,8 +501,8 @@ const ot = (z) => {
500
501
  className: "upload-item-upload-delete",
501
502
  type: "link",
502
503
  disabled: Z,
503
- onClick: () => rl(t),
504
- children: /* @__PURE__ */ l(El, {})
504
+ onClick: () => dl(t),
505
+ children: /* @__PURE__ */ l(Nl, {})
505
506
  })]
506
507
  })
507
508
  }, t.uid))
@@ -520,7 +521,7 @@ const ot = (z) => {
520
521
  padding: 0
521
522
  },
522
523
  onClick: (t) => {
523
- t.stopPropagation(), cl();
524
+ t.stopPropagation(), pl();
524
525
  },
525
526
  children: "下载示例 >"
526
527
  })]
@@ -548,8 +549,8 @@ const ot = (z) => {
548
549
  footer: null,
549
550
  children: /* @__PURE__ */ l("div", {
550
551
  className: "upload-spin",
551
- children: /* @__PURE__ */ l(yl, {
552
- tip: n === "image" ? `数据导入中(${ie}/${C.length}),请耐心等待` : `处理中(${Ne}/100%),请耐心等待`,
552
+ children: /* @__PURE__ */ l(Sl, {
553
+ tip: n === "image" ? `数据导入中(${se}/${C.length}),请耐心等待` : `处理中(${Ne}/100%),请耐心等待`,
553
554
  size: "large",
554
555
  children: /* @__PURE__ */ l("div", {
555
556
  className: "content"
@@ -565,11 +566,11 @@ const ot = (z) => {
565
566
  footer: null,
566
567
  children: /* @__PURE__ */ l("div", {
567
568
  className: "upload-result",
568
- children: /* @__PURE__ */ l(De, {
569
+ children: /* @__PURE__ */ l(Ke, {
569
570
  status: "success",
570
571
  title: n === "image" ? `数据导入完成,成功${J}个,失败${be}个,去重${C.length - J - be}个` : B && `数据导入完成,格式不符合的图片${B.formatErrorCount || 0}个,成功${B.successCount || 0}个,去重${B.repeatCount || 0}个,失败${B.failedCount || 0}个` + (F === "labeled" ? `(${(g.labelFormat || "json").toUpperCase()}格式不符合${B.labelErrorCount}个)` : ""),
571
572
  extra: [/* @__PURE__ */ l(P, {
572
- onClick: ol,
573
+ onClick: rl,
573
574
  children: "关闭"
574
575
  }, "close")]
575
576
  })
@@ -583,11 +584,11 @@ const ot = (z) => {
583
584
  footer: null,
584
585
  children: /* @__PURE__ */ l("div", {
585
586
  className: "upload-result",
586
- children: /* @__PURE__ */ l(De, {
587
+ children: /* @__PURE__ */ l(Ke, {
587
588
  status: "error",
588
589
  title: "文件处理失败",
589
590
  extra: [/* @__PURE__ */ l(P, {
590
- onClick: dl,
591
+ onClick: ul,
591
592
  children: "关闭"
592
593
  }, "close")]
593
594
  })
@@ -596,5 +597,5 @@ const ot = (z) => {
596
597
  });
597
598
  };
598
599
  export {
599
- ot as default
600
+ nt as default
600
601
  };