@glodon-aiot/agent-cli-ui 3.3.2-beta.15 → 3.3.2-beta.17

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.
Files changed (47) hide show
  1. package/dist/es/AgentClientUI.mjs +119 -109
  2. package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +1 -1
  3. package/dist/es/Dialog/AgentChat/index.mjs +282 -269
  4. package/dist/es/Dialog/SessionList/index.mjs +35 -34
  5. package/dist/es/Dialog/index.mjs +101 -94
  6. package/dist/es/ReactTextGenerationUI/components/TextSiders/index.mjs +124 -120
  7. package/dist/es/components/FilePreview/index.mjs +26 -25
  8. package/dist/es/index.mjs +238 -211
  9. package/dist/es/packages/agent-cli-ui/package.json.mjs +3 -3
  10. package/dist/es/packages/react-components/dist/es/index.mjs +1 -1
  11. package/dist/es/src/style.css +1 -1
  12. package/dist/es/src/style10.css +1 -1
  13. package/dist/es/src/style11.css +1 -1
  14. package/dist/es/src/style12.css +1 -1
  15. package/dist/es/src/style13.css +1 -1
  16. package/dist/es/src/style14.css +1 -1
  17. package/dist/es/src/style15.css +1 -1
  18. package/dist/es/src/style16.css +1 -1
  19. package/dist/es/src/style17.css +1 -1
  20. package/dist/es/src/style18.css +1 -1
  21. package/dist/es/src/style19.css +1 -1
  22. package/dist/es/src/style20.css +1 -1
  23. package/dist/es/src/style21.css +1 -1
  24. package/dist/es/src/style22.css +1 -1
  25. package/dist/es/src/style23.css +1 -1
  26. package/dist/es/src/style24.css +1 -1
  27. package/dist/es/src/style25.css +1 -1
  28. package/dist/es/src/style26.css +1 -1
  29. package/dist/es/src/style27.css +1 -1
  30. package/dist/es/src/style28.css +1 -1
  31. package/dist/es/src/style29.css +1 -1
  32. package/dist/es/src/style3.css +1 -1
  33. package/dist/es/src/style30.css +1 -1
  34. package/dist/es/src/style31.css +1 -1
  35. package/dist/es/src/style5.css +1 -1
  36. package/dist/es/src/style6.css +1 -1
  37. package/dist/es/src/style7.css +1 -1
  38. package/dist/es/src/style8.css +1 -1
  39. package/dist/es/src/style9.css +1 -1
  40. package/dist/lib/index.css +1 -1
  41. package/dist/lib/index.js +30 -30
  42. package/dist/src/AgentClientUI.d.ts +10 -2
  43. package/dist/src/Dialog/SessionList/index.d.ts +1 -0
  44. package/dist/src/Dialog/index.d.ts +9 -1
  45. package/dist/src/index.d.ts +7 -2
  46. package/dist/src/types.d.ts +2 -1
  47. package/package.json +3 -3
@@ -1,56 +1,56 @@
1
1
  var me = Object.defineProperty, ue = Object.defineProperties;
2
- var ge = Object.getOwnPropertyDescriptors;
3
- var j = Object.getOwnPropertySymbols;
4
- var fe = Object.prototype.hasOwnProperty, he = Object.prototype.propertyIsEnumerable;
5
- var z = (r, l, s) => l in r ? me(r, l, { enumerable: !0, configurable: !0, writable: !0, value: s }) : r[l] = s, L = (r, l) => {
6
- for (var s in l || (l = {}))
7
- fe.call(l, s) && z(r, s, l[s]);
8
- if (j)
9
- for (var s of j(l))
10
- he.call(l, s) && z(r, s, l[s]);
11
- return r;
12
- }, E = (r, l) => ue(r, ge(l));
13
- var R = (r, l, s) => new Promise((C, N) => {
14
- var x = (u) => {
2
+ var fe = Object.getOwnPropertyDescriptors;
3
+ var $ = Object.getOwnPropertySymbols;
4
+ var ge = Object.prototype.hasOwnProperty, he = Object.prototype.propertyIsEnumerable;
5
+ var j = (s, l, r) => l in s ? me(s, l, { enumerable: !0, configurable: !0, writable: !0, value: r }) : s[l] = r, S = (s, l) => {
6
+ for (var r in l || (l = {}))
7
+ ge.call(l, r) && j(s, r, l[r]);
8
+ if ($)
9
+ for (var r of $(l))
10
+ he.call(l, r) && j(s, r, l[r]);
11
+ return s;
12
+ }, z = (s, l) => ue(s, fe(l));
13
+ var A = (s, l, r) => new Promise((C, N) => {
14
+ var x = (f) => {
15
15
  try {
16
- h(s.next(u));
17
- } catch (I) {
18
- N(I);
16
+ I(r.next(f));
17
+ } catch (y) {
18
+ N(y);
19
19
  }
20
- }, w = (u) => {
20
+ }, p = (f) => {
21
21
  try {
22
- h(s.throw(u));
23
- } catch (I) {
24
- N(I);
22
+ I(r.throw(f));
23
+ } catch (y) {
24
+ N(y);
25
25
  }
26
- }, h = (u) => u.done ? C(u.value) : Promise.resolve(u.value).then(x, w);
27
- h((s = s.apply(r, l)).next());
26
+ }, I = (f) => f.done ? C(f.value) : Promise.resolve(f.value).then(x, p);
27
+ I((r = r.apply(s, l)).next());
28
28
  });
29
- import { jsxs as v, jsx as o, Fragment as ye } from "react/jsx-runtime";
30
- import { useState as m, useRef as Ie, useContext as ke, useEffect as b } from "react";
31
- import { Form as q, Space as ve, Button as K, Input as J, message as F, notification as xe } from "antd";
29
+ import { jsxs as v, jsx as o, Fragment as Ie } from "react/jsx-runtime";
30
+ import { useState as u, useRef as ye, useContext as ke, useEffect as b } from "react";
31
+ import { Form as R, Space as ve, Button as E, Input as J, message as q, notification as xe } from "antd";
32
32
  import { v4 as Ce } from "uuid";
33
- import Se from "../../../context.mjs";
33
+ import we from "../../../context.mjs";
34
34
  import U from "../../../components/Iconfont/index.mjs";
35
- import be from "../../../components/KnowledgeList/KnowledgeSelect/index.mjs";
35
+ import Se from "../../../components/KnowledgeList/KnowledgeSelect/index.mjs";
36
36
  import "../../../packages/react-components/dist/es/index.mjs";
37
- import Ne from "../../../Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs";
38
- import we from "../../../node_modules/moment/dist/moment.mjs";
37
+ import be from "../../../Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs";
38
+ import Ne from "../../../node_modules/moment/dist/moment.mjs";
39
39
  /* empty css */import { fetchEventSource as pe } from "../fetchEventSource/fetch.mjs";
40
- import { Markdown as Me } from "../../../packages/react-components/dist/es/components/Markdown/index.mjs";
41
- const Ee = ({
42
- application: r,
40
+ import { Markdown as Te } from "../../../packages/react-components/dist/es/components/Markdown/index.mjs";
41
+ const ze = ({
42
+ application: s,
43
43
  sessionId: l
44
44
  }) => {
45
- const s = r.id, [C, N] = m(""), [x, w] = m(""), [h, u] = m(), [I, S] = m(!1), B = Ie(null), [D, W] = m([]), [p, H] = m([]), [G, O] = m(0), [Q, Y] = m(), [c, M] = m(), [$] = q.useForm(), [T, X] = m(!1), [A, Z] = m({}), [_, ee] = m(0), {
46
- service: y,
45
+ const r = s.id, [C, N] = u(""), [x, p] = u(""), [I, f] = u(), [y, w] = u(!1), B = ye(null), [D, W] = u([]), [T, H] = u([]), [G, K] = u(0), [Q, O] = u(), [c, P] = u(), [Y] = R.useForm(), [M, X] = u(!1), [V, Z] = u({}), [_, ee] = u(0), {
46
+ service: g,
47
47
  agentClient: k,
48
- beforeMessageSend: Te,
49
- popupContainer: P,
50
- icon: Ae,
48
+ beforeMessageSend: Ae,
49
+ popupContainer: F,
50
+ icon: Pe,
51
51
  token: ne,
52
52
  apiUrl: te
53
- } = ke(Se), se = (n, a, i, e) => {
53
+ } = ke(we), re = (n, a, m, e) => {
54
54
  const t = {
55
55
  messageId: Ce(),
56
56
  content: "",
@@ -60,7 +60,7 @@ const Ee = ({
60
60
  messageTime: "",
61
61
  llmModel: "",
62
62
  searchReference: []
63
- }, g = E(L({}, i), {
63
+ }, d = z(S({}, m), {
64
64
  stream: !0
65
65
  });
66
66
  pe(`${te}/chat/v2/chat?applicationId=${n}&sessionId=${a}`, {
@@ -69,30 +69,30 @@ const Ee = ({
69
69
  Authorization: `Bearer ${ne}`,
70
70
  "Content-Type": "application/json"
71
71
  },
72
- body: JSON.stringify(g),
72
+ body: JSON.stringify(d),
73
73
  openWhenHidden: !0,
74
- onopen(d) {
75
- return console.log("onopen"), d.ok && e != null && e.onopen && e.onopen(), Promise.resolve();
74
+ onopen(i) {
75
+ return console.log("onopen"), i.ok && e != null && e.onopen && e.onopen(), Promise.resolve();
76
76
  },
77
- onmessage(d) {
78
- if (!d.id && !d.data && !d.event && !d.retry)
77
+ onmessage(i) {
78
+ if (!i.id && !i.data && !i.event && !i.retry)
79
79
  return;
80
- if (!d.data.includes('{"code": ')) {
81
- t.content = t.content + d.data;
82
- const V = {
80
+ if (!i.data.includes('{"code": ')) {
81
+ t.content = t.content + i.data;
82
+ const L = {
83
83
  content: t.content,
84
84
  role: 1,
85
85
  reference: t.reference,
86
86
  messageId: t.messageId,
87
87
  sessionId: a,
88
- messageTime: we(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"),
88
+ messageTime: Ne(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss"),
89
89
  searchReference: []
90
90
  };
91
- return (e == null ? void 0 : e.onmessage) && e.onmessage(V);
91
+ return (e == null ? void 0 : e.onmessage) && e.onmessage(L);
92
92
  }
93
- const f = JSON.parse(d.data);
94
- if (t.reference = f.data.reference, t.messageTime = f.data.messageTime, t.messageId = f.data.messageId, t.llmModel = f.data.llmModel, t.content = f.data.content, t.code = f.code, f.code === 200) {
95
- const V = {
93
+ const h = JSON.parse(i.data);
94
+ if (t.reference = h.data.reference, t.messageTime = h.data.messageTime, t.messageId = h.data.messageId, t.llmModel = h.data.llmModel, t.content = h.data.content, t.code = h.code, h.code === 200) {
95
+ const L = {
96
96
  code: t.code,
97
97
  content: t.content,
98
98
  role: 1,
@@ -102,10 +102,10 @@ const Ee = ({
102
102
  messageTime: t.messageTime,
103
103
  searchReference: []
104
104
  };
105
- e != null && e.onmessage && e.onmessage(V);
105
+ e != null && e.onmessage && e.onmessage(L);
106
106
  } else
107
107
  return xe.error({
108
- message: f.message
108
+ message: h.message
109
109
  });
110
110
  },
111
111
  onerror() {
@@ -113,7 +113,7 @@ const Ee = ({
113
113
  },
114
114
  onclose() {
115
115
  console.log("onclose");
116
- const d = {
116
+ const i = {
117
117
  code: t.code,
118
118
  content: t.content,
119
119
  role: 1,
@@ -126,98 +126,102 @@ const Ee = ({
126
126
  },
127
127
  searchReference: []
128
128
  };
129
- e != null && e.onclose && e.onclose(d);
129
+ e != null && e.onclose && e.onclose(i);
130
130
  }
131
131
  });
132
132
  };
133
133
  b(() => {
134
- if (!(r != null && r.id))
134
+ if (!(s != null && s.id))
135
135
  return;
136
- const n = r.arrange;
136
+ const n = s.arrange;
137
137
  if (!(n != null && n.length))
138
138
  return;
139
- const i = n[0].knowledges || [];
140
- W(i), O(i.length);
141
- const e = i.map((t) => t.id);
139
+ const m = n[0].knowledges || [];
140
+ W(m), K(m.length);
141
+ const e = m.map((t) => t.id);
142
142
  H(e);
143
- }, [r]), b(() => {
144
- if (!(r != null && r.id) || !k)
143
+ }, [s]), b(() => {
144
+ if (!(s != null && s.id) || !k)
145
145
  return;
146
146
  const n = k.questionContextMaxLength || 4e3;
147
- ee(n), re();
148
- }, [r, k]);
149
- const re = () => R(void 0, null, function* () {
150
- if (!y || !s)
147
+ ee(n), se();
148
+ }, [s, k]);
149
+ const se = () => A(void 0, null, function* () {
150
+ if (!g || !r)
151
151
  return;
152
- const n = yield y.postApplicationIdSession({
152
+ const n = yield g.postApplicationIdSession({
153
153
  name: "AI 会话",
154
- applicationId: s
154
+ applicationId: r
155
155
  });
156
156
  debugger;
157
- Y(n);
157
+ O(n);
158
158
  });
159
159
  b(() => {
160
- s && (y == null || y.getApplicationIdPromptVariables(s, {
160
+ r && (g == null || g.getApplicationIdPromptVariables(r, {
161
161
  status: 1
162
162
  }).then((n) => {
163
- const i = n.filter((e) => e.key !== "query").map((e) => ({
163
+ const m = n.filter((e) => e.key !== "query").map((e) => ({
164
164
  id: e.id,
165
165
  key: e.key,
166
166
  name: e.name,
167
167
  value: ""
168
168
  }));
169
- M(i);
169
+ P(m);
170
170
  }));
171
- }, [y]), b(() => {
171
+ }, [g]), b(() => {
172
172
  if (!c)
173
173
  return;
174
174
  const n = {};
175
175
  c == null || c.map((a) => {
176
176
  a.key && (n[a.key] = a.value);
177
- }), $.setFieldsValue(L({}, n)), Z(n);
177
+ }), Y.setFieldsValue(S({}, n)), Z(n);
178
178
  }, [c]);
179
179
  const oe = (n, a) => {
180
180
  }, ae = (n) => {
181
181
  N(n.target.value);
182
- }, ce = () => R(void 0, null, function* () {
183
- if (S(!0), !s || !y || !k)
182
+ }, ce = () => A(void 0, null, function* () {
183
+ if (w(!0), !r || !g || !k)
184
184
  return;
185
- for (const e in A)
186
- A[e] || (S(!1), F.config({
187
- getContainer: () => (P == null ? void 0 : P.current) || document.body
188
- }), F.error("变量值不能为空"), F.config({
185
+ for (const e in V)
186
+ V[e] || (w(!1), q.config({
187
+ getContainer: () => (F == null ? void 0 : F.current) || document.body
188
+ }), q.error("变量值不能为空"), q.config({
189
189
  getContainer: void 0
190
190
  }));
191
- const n = yield y.postApplicationIdSession({
191
+ const n = yield g.postApplicationIdSession({
192
192
  name: "AI 会话",
193
- applicationId: s
193
+ applicationId: r
194
194
  });
195
195
  debugger;
196
- Y(n);
197
- const a = p == null ? void 0 : p.map((e) => e.toString()), i = {
196
+ O(n);
197
+ const a = T == null ? void 0 : T.map((e) => e.toString()), m = {
198
198
  content: C,
199
199
  chatMode: 1,
200
200
  knowledges: a,
201
- promptVariables: A
201
+ promptVariables: V
202
202
  };
203
- se(s, n.id, i, {
203
+ re(r, n.id, m, {
204
204
  onmessage: (e) => {
205
- S(!0), u(void 0), w(e.content);
206
- },
207
- onclose: (e) => {
208
- S(!1), e.code == 200 && (w(e.content), u(e));
205
+ w(!0), f(void 0), p(e.content);
209
206
  },
207
+ onclose: (e) => A(void 0, null, function* () {
208
+ if (w(!1), e.code == 200) {
209
+ p(e.content);
210
+ const t = yield Promise.all(e.reference.map((d) => g.getKnowledgeIdFileId(d.knowledgeId, d.docId)));
211
+ e.reference = e.reference.map((d, i) => S(S({}, d), t[i])), f(e);
212
+ }
213
+ }),
210
214
  onerror: () => {
211
- S(!1);
215
+ w(!1);
212
216
  }
213
- }), c && y.getApplicationIdSessionIdPromptVariables(s, n.id).then((e) => {
214
- const t = e.filter((g) => g.key !== "query").map((g) => {
215
- const d = c.filter((f) => f.key === g.key);
216
- return g.value = d[0].value, g;
217
+ }), c && g.getApplicationIdSessionIdPromptVariables(r, n.id).then((e) => {
218
+ const t = e.filter((d) => d.key !== "query").map((d) => {
219
+ const i = c.filter((h) => h.key === d.key);
220
+ return d.value = i[0].value, d;
217
221
  });
218
- Promise.all(t.map((g) => {
219
- oe(g.id, g.value);
220
- })), M(t);
222
+ Promise.all(t.map((d) => {
223
+ oe(d.id, d.value);
224
+ })), P(t);
221
225
  });
222
226
  });
223
227
  b(() => {
@@ -227,13 +231,13 @@ const Ee = ({
227
231
  n && (n.scrollTop = n.scrollHeight);
228
232
  }, [x]);
229
233
  const le = (n) => {
230
- H(n), O(n.length);
234
+ H(n), K(n.length);
231
235
  }, de = (n, a) => {
232
- c && (c.map((i) => {
233
- i.id === n && (i.value = a.target.value);
234
- }), M([...c]));
236
+ c && (c.map((m) => {
237
+ m.id === n && (m.value = a.target.value);
238
+ }), P([...c]));
235
239
  }, ie = () => {
236
- X(!T);
240
+ X(!M);
237
241
  };
238
242
  return /* @__PURE__ */ v("div", {
239
243
  className: "text-main",
@@ -244,9 +248,9 @@ const Ee = ({
244
248
  children: [/* @__PURE__ */ o("div", {
245
249
  className: "prompts-header",
246
250
  children: /* @__PURE__ */ v(ve, {
247
- children: [/* @__PURE__ */ o(K, {
251
+ children: [/* @__PURE__ */ o(E, {
248
252
  className: "prompts-btn",
249
- icon: T ? /* @__PURE__ */ o(U, {
253
+ icon: M ? /* @__PURE__ */ o(U, {
250
254
  type: "icon-biaoge-shouqi"
251
255
  }) : /* @__PURE__ */ o(U, {
252
256
  type: "icon-biaoge-zhankai"
@@ -258,9 +262,9 @@ const Ee = ({
258
262
  children: "文本生成设置"
259
263
  })]
260
264
  })
261
- }), !T && (c != null && c.length ? /* @__PURE__ */ o(q, {
265
+ }), !M && (c != null && c.length ? /* @__PURE__ */ o(R, {
262
266
  autoComplete: "off",
263
- form: $,
267
+ form: Y,
264
268
  labelWrap: !0,
265
269
  labelAlign: "left",
266
270
  labelCol: {
@@ -269,7 +273,7 @@ const Ee = ({
269
273
  }
270
274
  },
271
275
  className: "prompts-form",
272
- children: c == null ? void 0 : c.map((n) => /* @__PURE__ */ o(q.Item, {
276
+ children: c == null ? void 0 : c.map((n) => /* @__PURE__ */ o(R.Item, {
273
277
  label: n.name,
274
278
  name: n.key,
275
279
  style: {
@@ -291,8 +295,8 @@ const Ee = ({
291
295
  children: [/* @__PURE__ */ o("span", {
292
296
  className: "header-title",
293
297
  children: "文本生成输入"
294
- }), D.length !== 0 && /* @__PURE__ */ o(be, {
295
- checkedValues: p,
298
+ }), D.length !== 0 && /* @__PURE__ */ o(Se, {
299
+ checkedValues: T,
296
300
  currKnowledgeList: D,
297
301
  selectCount: G,
298
302
  onSelectChange: le,
@@ -314,13 +318,13 @@ const Ee = ({
314
318
  onChange: ae,
315
319
  value: C,
316
320
  className: "left-input"
317
- }), /* @__PURE__ */ o(K, {
321
+ }), /* @__PURE__ */ o(E, {
318
322
  type: "primary",
319
- disabled: !C || I,
323
+ disabled: !C || y,
320
324
  onClick: ce,
321
325
  className: "sider-btn",
322
- loading: I,
323
- children: I ? "生成中" : "确认生成"
326
+ loading: y,
327
+ children: y ? "生成中" : "确认生成"
324
328
  })]
325
329
  })
326
330
  })]
@@ -331,11 +335,11 @@ const Ee = ({
331
335
  children: /* @__PURE__ */ o("div", {
332
336
  className: "sider-text",
333
337
  ref: B,
334
- children: x ? /* @__PURE__ */ v(ye, {
335
- children: [/* @__PURE__ */ o(Me, {
338
+ children: x ? /* @__PURE__ */ v(Ie, {
339
+ children: [/* @__PURE__ */ o(Te, {
336
340
  children: x
337
- }), h && (h == null ? void 0 : h.reference.length) !== 0 && /* @__PURE__ */ o(Ne, {
338
- history: h,
341
+ }), I && (I == null ? void 0 : I.reference.length) !== 0 && /* @__PURE__ */ o(be, {
342
+ history: I,
339
343
  docViewerUrl: ""
340
344
  })]
341
345
  }) : /* @__PURE__ */ o("div", {
@@ -350,5 +354,5 @@ const Ee = ({
350
354
  });
351
355
  };
352
356
  export {
353
- Ee as default
357
+ ze as default
354
358
  };
@@ -1,22 +1,22 @@
1
- import { jsxs as C, jsx as o, Fragment as U } from "react/jsx-runtime";
1
+ import { jsxs as x, jsx as o, Fragment as U } from "react/jsx-runtime";
2
2
  import { useState as s, useEffect as n } from "react";
3
- import { Image as k, Spin as E, Tooltip as j, Button as z } from "antd";
4
- import { LoadingOutlined as B } from "@ant-design/icons";
3
+ import { Image as k, Spin as E, Tooltip as P, Button as j } from "antd";
4
+ import { LoadingOutlined as z } from "@ant-design/icons";
5
5
  import { AecKnowledgeFileStatus as F } from "@glodon-aiot/apis";
6
- import I from "../Iconfont/index.mjs";
7
- import { getBase64 as P } from "../../utils/index.mjs";
6
+ import B from "../Iconfont/index.mjs";
7
+ import { getBase64 as I } from "../../utils/index.mjs";
8
8
  /* empty css */const D = (i) => {
9
9
  const {
10
- className: y,
11
- style: N,
10
+ className: N,
11
+ style: y,
12
12
  id: r,
13
13
  file: e,
14
14
  actions: {
15
15
  upload: l,
16
- remove: h,
16
+ remove: g,
17
17
  checkStatus: c
18
18
  } = {},
19
- onUrlChange: p,
19
+ onUrlChange: h,
20
20
  onStatusChange: v
21
21
  } = i, [f, u] = s(i.uploading), [w, S] = s(!1);
22
22
  n(() => {
@@ -27,51 +27,52 @@ import { getBase64 as P } from "../../utils/index.mjs";
27
27
  d(i.url);
28
28
  }, [i.url]), n(() => {
29
29
  l && e instanceof File && (m || f || (u(!0), l(e).then((t) => {
30
- d(t), p && p(t);
30
+ d(t), h && h(t);
31
31
  }).catch((t) => S(t)).finally(() => u(!1))));
32
32
  }, [l, m, e]);
33
- const [a, g] = s(e instanceof File || e == null ? void 0 : e.status);
33
+ const [a, p] = s(e instanceof File || e == null ? void 0 : e.status);
34
34
  n(() => {
35
- g(e instanceof File || e == null ? void 0 : e.status);
35
+ p(e instanceof File || e == null ? void 0 : e.status);
36
36
  }, [e]);
37
- const x = () => {
37
+ const C = () => {
38
38
  r && c && a === F.Processing && c(r).then((t) => {
39
- t !== a && (a !== void 0 && v && v(t), g(t));
40
- }).catch((t) => g(F.Failed));
39
+ t !== a && (a !== void 0 && v && v(t), p(t));
40
+ }).catch((t) => p(F.Failed));
41
41
  };
42
42
  return n(() => {
43
- x();
43
+ C();
44
44
  }, [r, c, a]), n(() => {
45
- P(e).then((t) => {
45
+ I(e).then((t) => {
46
46
  d(t);
47
47
  });
48
- }, [e]), e ? /* @__PURE__ */ C("div", {
49
- className: `file-preview ${y}`,
50
- style: N,
48
+ }, [e]), e ? /* @__PURE__ */ x("div", {
49
+ className: `file-preview ${N}`,
50
+ style: y,
51
51
  children: [/* @__PURE__ */ o(k, {
52
52
  src: m,
53
53
  className: "file-icon"
54
54
  }), f && /* @__PURE__ */ o(E, {
55
55
  className: "file-action file-process",
56
- indicator: /* @__PURE__ */ o(B, {
56
+ indicator: /* @__PURE__ */ o(z, {
57
57
  style: {
58
58
  fontSize: 16
59
59
  },
60
60
  spin: !0
61
61
  })
62
- }), !f && h && /* @__PURE__ */ o(j, {
62
+ }), !f && g && /* @__PURE__ */ o(P, {
63
63
  overlayClassName: "file-remove-tooltip",
64
64
  title: "删除文件",
65
- children: /* @__PURE__ */ o(z, {
65
+ getPopupContainer: (t) => t.parentNode,
66
+ children: /* @__PURE__ */ o(j, {
66
67
  className: "file-action file-remove",
67
- icon: /* @__PURE__ */ o(I, {
68
+ icon: /* @__PURE__ */ o(B, {
68
69
  style: {
69
70
  fontSize: "10px"
70
71
  },
71
72
  type: "icon-shanchu"
72
73
  }),
73
74
  onClick: () => {
74
- h(e, r);
75
+ g(e, r);
75
76
  }
76
77
  })
77
78
  })]