wi-chat 0.5.1 → 0.6.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,71 +1,73 @@
1
1
  import "wi-chat/style.css";
2
- import { defineAsyncComponent as J, defineComponent as D, computed as T, openBlock as i, createElementBlock as u, createElementVNode as s, Fragment as M, renderList as F, createBlock as Z, resolveDynamicComponent as ge, createCommentVNode as V, createTextVNode as ke, pushScopeId as Q, popScopeId as ee, unref as l, toDisplayString as m, withDirectives as Se, vShow as $e, getCurrentInstance as ue, inject as ce, toValue as A, ref as L, watch as de, onBeforeUnmount as xe, provide as _e, withKeys as re, withModifiers as te, normalizeClass as q, Teleport as Ie, createVNode as Ce, Transition as Ee, withCtx as Oe, reactive as Te, normalizeStyle as Ve } from "vue";
3
- import { knowledgeStreamParser as Ue, iframePageParser as Le, outputFileParser as Me, actionExecuteParser as Pe, formatFileSize as je, IFRAME_RESIZER_CHILD_SCRIPT as Re, submitClarification as Ne, cancelClarification as Fe } from "wi-chat/parser";
4
- import { createStyleScope as pe, renderMarkdown as fe, downloadTableAsExcel as Ae } from "wi-chat/tools";
5
- import le from "@iframe-resizer/vue/iframe-resizer.vue";
6
- const De = [
7
- { ...Ue, component: J(() => Promise.resolve().then(() => _t)) },
8
- { ...Le, component: J(() => Promise.resolve().then(() => _s)) },
9
- { ...Me, component: J(() => Promise.resolve().then(() => ss)) },
10
- // 确认卡片(action_execute → collect_clarifications):解析由内置 actionExecuteParser 完成,
11
- // 提交/取消经 wi-chat/parser 的 submitClarification / cancelClarification 回传 wait_reply
12
- { ...Pe, component: J(() => Promise.resolve().then(() => Qs)) }
13
- ], Be = (n) => {
2
+ import { defineAsyncComponent as K, defineComponent as j, computed as I, openBlock as l, createElementBlock as u, createElementVNode as e, Fragment as M, renderList as B, createBlock as ee, resolveDynamicComponent as ke, createCommentVNode as V, createTextVNode as Se, pushScopeId as H, popScopeId as X, unref as i, toDisplayString as v, withDirectives as $e, vShow as xe, getCurrentInstance as ue, inject as ce, toValue as z, ref as U, watch as de, onBeforeUnmount as Ie, provide as _e, withKeys as re, withModifiers as te, normalizeClass as D, Teleport as Ce, createVNode as Ee, Transition as Oe, withCtx as Te, reactive as Ve, normalizeStyle as Pe } from "vue";
3
+ import { knowledgeStreamParser as Ue, iframePageParser as Me, outputFileParser as Le, collectClarificationsParser as je, agentActionParser as Ae, formatFileSize as Ne, IFRAME_RESIZER_CHILD_SCRIPT as Re, submitClarification as Fe, cancelClarification as De } from "wi-chat/parser";
4
+ import { createStyleScope as pe, renderMarkdown as fe, downloadTableAsExcel as Be } from "wi-chat/tools";
5
+ import ie from "@iframe-resizer/vue/iframe-resizer.vue";
6
+ const ze = [
7
+ { ...Ue, component: K(() => Promise.resolve().then(() => ft)) },
8
+ { ...Me, component: K(() => Promise.resolve().then(() => fs)) },
9
+ { ...Le, component: K(() => Promise.resolve().then(() => os)) },
10
+ // 确认卡片(front_reply + action_execute + executor=host + collect_clarifications):
11
+ // 解析由内置 collectClarificationsParser 完成,提交/取消经 wi-chat/parser 回传 wait_reply
12
+ { ...je, component: K(() => Promise.resolve().then(() => tn)) },
13
+ // agent 指令执行过程(front_reply + action_execute + executor=agent):宿主执行、进度卡片
14
+ { ...Ae, component: K(() => Promise.resolve().then(() => fn)) }
15
+ ], qe = (n) => {
14
16
  const a = (c) => {
15
- const r = {};
16
- for (const t of c)
17
- !t.answerType || !t.component || (r[t.answerType] = t.component);
18
- return r;
17
+ const t = {};
18
+ for (const o of c)
19
+ !o.answerType || !o.component || (t[o.answerType] = o.component);
20
+ return t;
19
21
  };
20
- return { ...a(De), ...a(n ?? []) };
21
- }, ze = (n) => (Q("data-v-efad55c8"), n = n(), ee(), n), qe = { class: "flex justify-start" }, Ke = { class: "ai-answer-bubble" }, He = {
22
+ return { ...a(ze), ...a(n ?? []) };
23
+ }, Ke = (n) => (H("data-v-efad55c8"), n = n(), X(), n), He = { class: "flex justify-start" }, Xe = { class: "ai-answer-bubble" }, Ge = {
22
24
  key: 0,
23
25
  class: "ai-answer-bubble__error"
24
- }, Xe = { class: "ai-answer-bubble__body" }, Ge = {
26
+ }, We = { class: "ai-answer-bubble__body" }, Ye = {
25
27
  key: 0,
26
28
  class: "ai-answer-bubble__status"
27
- }, We = {
29
+ }, Je = {
28
30
  key: 2,
29
31
  class: "ai-answer-bubble__status"
30
- }, Ye = {
32
+ }, Ze = {
31
33
  key: 3,
32
34
  class: "ai-answer-bubble__loading"
33
- }, Je = /* @__PURE__ */ ze(() => /* @__PURE__ */ s("span", { class: "ai-answer-bubble__pulse" }, null, -1)), Ze = /* @__PURE__ */ D({
35
+ }, Qe = /* @__PURE__ */ Ke(() => /* @__PURE__ */ e("span", { class: "ai-answer-bubble__pulse" }, null, -1)), et = /* @__PURE__ */ j({
34
36
  __name: "AiAnswerBubble",
35
37
  props: {
36
38
  answer: {},
37
39
  error: { type: Boolean, default: !1 },
38
40
  stopped: { type: Boolean, default: !1 },
39
- contentMap: { default: () => Be() }
41
+ contentMap: { default: () => qe() }
40
42
  },
41
43
  setup(n) {
42
- const a = n, c = T(() => {
43
- var t, _;
44
- return ((_ = (t = a.answer) == null ? void 0 : t.answer) == null ? void 0 : _.reports) ?? [];
45
- }), r = T(() => c.value.filter((t) => a.contentMap[t.answer_type]));
46
- return (t, _) => (i(), u("div", qe, [
47
- s("div", Ke, [
48
- t.error ? (i(), u("div", He, "回答加载失败")) : r.value.length ? (i(), u(M, { key: 1 }, [
49
- s("div", Xe, [
50
- (i(!0), u(M, null, F(r.value, (w, x) => (i(), Z(ge(t.contentMap[w.answer_type]), {
51
- key: x,
44
+ const a = n, c = I(() => {
45
+ var o, d;
46
+ return ((d = (o = a.answer) == null ? void 0 : o.answer) == null ? void 0 : d.reports) ?? [];
47
+ }), t = I(() => c.value.filter((o) => a.contentMap[o.answer_type]));
48
+ return (o, d) => (l(), u("div", He, [
49
+ e("div", Xe, [
50
+ o.error ? (l(), u("div", Ge, "回答加载失败")) : t.value.length ? (l(), u(M, { key: 1 }, [
51
+ e("div", We, [
52
+ (l(!0), u(M, null, B(t.value, (w, $) => (l(), ee(ke(o.contentMap[w.answer_type]), {
53
+ key: $,
52
54
  report: w
53
55
  }, null, 8, ["report"]))), 128))
54
56
  ]),
55
- t.stopped ? (i(), u("div", Ge, "回答已停止")) : V("", !0)
56
- ], 64)) : t.stopped ? (i(), u("div", We, "回答已停止")) : c.value.length ? V("", !0) : (i(), u("div", Ye, [
57
- Je,
58
- ke("正在思考...")
57
+ o.stopped ? (l(), u("div", Ye, "回答已停止")) : V("", !0)
58
+ ], 64)) : o.stopped ? (l(), u("div", Je, "回答已停止")) : c.value.length ? V("", !0) : (l(), u("div", Ze, [
59
+ Qe,
60
+ Se("正在思考...")
59
61
  ]))
60
62
  ])
61
63
  ]));
62
64
  }
63
- }), B = (n, a) => {
65
+ }), A = (n, a) => {
64
66
  const c = n.__vccOpts || n;
65
- for (const [r, t] of a)
66
- c[r] = t;
67
+ for (const [t, o] of a)
68
+ c[t] = o;
67
69
  return c;
68
- }, an = /* @__PURE__ */ B(Ze, [["__scopeId", "data-v-efad55c8"]]), Qe = (n) => (Q("data-v-de333356"), n = n(), ee(), n), et = ["data-wi-md-scope"], tt = ["aria-expanded"], st = /* @__PURE__ */ Qe(() => /* @__PURE__ */ s("span", { class: "deep-thinking__title" }, "深度思考", -1)), nt = { class: "deep-thinking__count" }, ot = { class: "deep-thinking__list" }, at = { class: "deep-thinking__index" }, rt = ["innerHTML"], lt = /* @__PURE__ */ D({
70
+ }, bn = /* @__PURE__ */ A(et, [["__scopeId", "data-v-efad55c8"]]), tt = (n) => (H("data-v-de333356"), n = n(), X(), n), st = ["data-wi-md-scope"], nt = ["aria-expanded"], ot = /* @__PURE__ */ tt(() => /* @__PURE__ */ e("span", { class: "deep-thinking__title" }, "深度思考", -1)), at = { class: "deep-thinking__count" }, rt = { class: "deep-thinking__list" }, it = { class: "deep-thinking__index" }, lt = ["innerHTML"], ut = /* @__PURE__ */ j({
69
71
  __name: "DeepThinkingSteps",
70
72
  props: {
71
73
  steps: {},
@@ -73,77 +75,77 @@ const De = [
73
75
  },
74
76
  emits: ["update:expanded"],
75
77
  setup(n, { emit: a }) {
76
- const c = n, r = a, t = { imageDownload: !1, tableDownload: !1 }, _ = pe(), w = { ...t, styleScope: _.selector }, x = /* @__PURE__ */ new Map(), b = (p) => {
77
- let y = x.get(p);
78
- return y === void 0 && (x.size > 500 && x.clear(), y = fe(p, w), x.set(p, y)), y;
79
- }, g = T(() => c.steps.map(b));
80
- return (p, y) => g.value.length ? (i(), u("div", {
78
+ const c = n, t = a, o = { imageDownload: !1, tableDownload: !1 }, d = pe(), w = { ...o, styleScope: d.selector }, $ = /* @__PURE__ */ new Map(), b = (p) => {
79
+ let h = $.get(p);
80
+ return h === void 0 && ($.size > 500 && $.clear(), h = fe(p, w), $.set(p, h)), h;
81
+ }, g = I(() => c.steps.map(b));
82
+ return (p, h) => g.value.length ? (l(), u("div", {
81
83
  key: 0,
82
84
  class: "deep-thinking",
83
- "data-wi-md-scope": l(_).id
85
+ "data-wi-md-scope": i(d).id
84
86
  }, [
85
- s("button", {
87
+ e("button", {
86
88
  type: "button",
87
89
  class: "deep-thinking__header",
88
90
  "aria-expanded": p.expanded,
89
- onClick: y[0] || (y[0] = (k) => r("update:expanded", !p.expanded))
91
+ onClick: h[0] || (h[0] = (k) => t("update:expanded", !p.expanded))
90
92
  }, [
91
- st,
92
- s("span", nt, m(g.value.length), 1),
93
- s("span", null, m(p.expanded ? "收起" : "展开"), 1)
94
- ], 8, tt),
95
- Se(s("div", ot, [
96
- (i(!0), u(M, null, F(g.value, (k, E) => (i(), u("div", {
97
- key: E,
93
+ ot,
94
+ e("span", at, v(g.value.length), 1),
95
+ e("span", null, v(p.expanded ? "收起" : "展开"), 1)
96
+ ], 8, nt),
97
+ $e(e("div", rt, [
98
+ (l(!0), u(M, null, B(g.value, (k, O) => (l(), u("div", {
99
+ key: O,
98
100
  class: "deep-thinking__item"
99
101
  }, [
100
- s("span", at, m(E + 1), 1),
101
- s("div", {
102
+ e("span", it, v(O + 1), 1),
103
+ e("div", {
102
104
  class: "markdown-it",
103
105
  innerHTML: k
104
- }, null, 8, rt)
106
+ }, null, 8, lt)
105
107
  ]))), 128))
106
108
  ], 512), [
107
- [$e, p.expanded]
109
+ [xe, p.expanded]
108
110
  ])
109
- ], 8, et)) : V("", !0);
111
+ ], 8, st)) : V("", !0);
110
112
  }
111
- }), rn = /* @__PURE__ */ B(lt, [["__scopeId", "data-v-de333356"]]), it = ["data-wi-md-scope"], ut = ["innerHTML"], ct = /* @__PURE__ */ D({
113
+ }), gn = /* @__PURE__ */ A(ut, [["__scopeId", "data-v-de333356"]]), ct = ["data-wi-md-scope"], dt = ["innerHTML"], _t = /* @__PURE__ */ j({
112
114
  __name: "KnowledgeStreamResult",
113
115
  props: {
114
116
  report: {}
115
117
  },
116
118
  setup(n) {
117
- const a = n, c = { imageDownload: !1, tableDownload: !0 }, r = pe(), t = { ...c, styleScope: r.selector }, _ = (g) => {
118
- var E;
119
- const y = g.target.closest(".wi-md-table-download");
120
- if (!y)
119
+ const a = n, c = { imageDownload: !1, tableDownload: !0 }, t = pe(), o = { ...c, styleScope: t.selector }, d = (g) => {
120
+ var O;
121
+ const h = g.target.closest(".wi-md-table-download");
122
+ if (!h)
121
123
  return;
122
124
  g.preventDefault(), g.stopPropagation();
123
- const k = (E = y.closest(".wi-md-table-wrap")) == null ? void 0 : E.querySelector("table");
124
- k && Ae(k);
125
- }, w = /* @__PURE__ */ new Map(), x = (g) => {
125
+ const k = (O = h.closest(".wi-md-table-wrap")) == null ? void 0 : O.querySelector("table");
126
+ k && Be(k);
127
+ }, w = /* @__PURE__ */ new Map(), $ = (g) => {
126
128
  let p = w.get(g);
127
- return p === void 0 && (w.size > 300 && w.clear(), p = fe(g, t), w.set(g, p)), p;
128
- }, b = T(() => (a.report.values || []).map((g) => x(g.answer || "")));
129
- return (g, p) => (i(), u("div", {
129
+ return p === void 0 && (w.size > 300 && w.clear(), p = fe(g, o), w.set(g, p)), p;
130
+ }, b = I(() => (a.report.values || []).map((g) => $(g.answer || "")));
131
+ return (g, p) => (l(), u("div", {
130
132
  class: "knowledge-result",
131
- "data-wi-md-scope": l(r).id,
132
- onClick: _
133
+ "data-wi-md-scope": i(t).id,
134
+ onClick: d
133
135
  }, [
134
- (i(!0), u(M, null, F(b.value, (y, k) => (i(), u("div", {
136
+ (l(!0), u(M, null, B(b.value, (h, k) => (l(), u("div", {
135
137
  key: k,
136
138
  class: "markdown-it",
137
- innerHTML: y
138
- }, null, 8, ut))), 128))
139
- ], 8, it));
139
+ innerHTML: h
140
+ }, null, 8, dt))), 128))
141
+ ], 8, ct));
140
142
  }
141
- }), dt = /* @__PURE__ */ B(ct, [["__scopeId", "data-v-857bc0d2"]]), _t = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
143
+ }), pt = /* @__PURE__ */ A(_t, [["__scopeId", "data-v-857bc0d2"]]), ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
142
144
  __proto__: null,
143
- default: dt
144
- }, Symbol.toStringTag, { value: "Module" })), ve = Symbol("wi-chat-output-file-config"), ln = (n) => {
145
+ default: pt
146
+ }, Symbol.toStringTag, { value: "Module" })), ve = Symbol("wi-chat-output-file-config"), kn = (n) => {
145
147
  _e(ve, n);
146
- }, pt = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg", "ico"]), ft = /* @__PURE__ */ new Set(["mp3", "wav", "ogg", "m4a", "aac", "flac"]), vt = /* @__PURE__ */ new Set(["mp4", "webm", "mov", "avi", "mkv"]), wt = /* @__PURE__ */ new Set(["doc", "docx", "xls", "xlsx", "ppt", "pptx"]), yt = /* @__PURE__ */ new Set(["html", "htm"]), ht = /* @__PURE__ */ new Set([
148
+ }, vt = /* @__PURE__ */ new Set(["png", "jpg", "jpeg", "gif", "webp", "bmp", "svg", "ico"]), wt = /* @__PURE__ */ new Set(["mp3", "wav", "ogg", "m4a", "aac", "flac"]), yt = /* @__PURE__ */ new Set(["mp4", "webm", "mov", "avi", "mkv"]), ht = /* @__PURE__ */ new Set(["doc", "docx", "xls", "xlsx", "ppt", "pptx"]), mt = /* @__PURE__ */ new Set(["html", "htm"]), bt = /* @__PURE__ */ new Set([
147
149
  "js",
148
150
  "mjs",
149
151
  "cjs",
@@ -169,7 +171,7 @@ const De = [
169
171
  "css",
170
172
  "scss",
171
173
  "less"
172
- ]), mt = /* @__PURE__ */ new Set([
174
+ ]), gt = /* @__PURE__ */ new Set([
173
175
  "txt",
174
176
  "text",
175
177
  "md",
@@ -185,122 +187,122 @@ const De = [
185
187
  "env",
186
188
  "toml",
187
189
  "sql"
188
- ]), bt = 20, N = /* @__PURE__ */ new Map(), se = /* @__PURE__ */ new Map(), gt = (n, a) => {
189
- if (!N.has(n) && N.size >= bt) {
190
- const c = N.keys().next().value;
191
- c !== void 0 && N.delete(c);
190
+ ]), kt = 20, F = /* @__PURE__ */ new Map(), se = /* @__PURE__ */ new Map(), St = (n, a) => {
191
+ if (!F.has(n) && F.size >= kt) {
192
+ const c = F.keys().next().value;
193
+ c !== void 0 && F.delete(c);
192
194
  }
193
- N.set(n, a);
194
- }, kt = (n) => {
195
+ F.set(n, a);
196
+ }, $t = (n) => {
195
197
  const a = n.lastIndexOf(".");
196
198
  return a >= 0 ? n.slice(a + 1).toLowerCase() : "";
197
- }, St = (n) => pt.has(n) ? "image" : n === "pdf" ? "pdf" : yt.has(n) ? "html" : ft.has(n) ? "audio" : vt.has(n) ? "video" : wt.has(n) ? "office" : ht.has(n) ? "code" : mt.has(n) ? "text" : "unknown", $t = (n) => {
198
- const a = ue() ? ce(ve, {}) : {}, c = T(() => {
199
- var I;
200
- const d = A(n);
201
- return ((I = d == null ? void 0 : d.values) == null ? void 0 : I.file_id) ?? (d == null ? void 0 : d.file_id) ?? "";
202
- }), r = T(() => {
203
- var I;
204
- const d = A(n);
205
- return ((I = d == null ? void 0 : d.values) == null ? void 0 : I.file_name) ?? (d == null ? void 0 : d.file_name) ?? "未命名文件";
206
- }), t = T(() => kt(r.value)), _ = T(() => St(t.value)), w = L(!1), x = L(!1), b = L(""), g = L(!1), p = L(""), y = L(""), k = L(null), E = T(() => k.value ? je(k.value.size) : ""), O = () => {
207
- y.value && typeof URL < "u" && typeof URL.revokeObjectURL == "function" && URL.revokeObjectURL(y.value), y.value = "";
208
- }, j = async () => {
209
- const d = c.value, I = r.value;
210
- if (!d)
199
+ }, xt = (n) => vt.has(n) ? "image" : n === "pdf" ? "pdf" : mt.has(n) ? "html" : wt.has(n) ? "audio" : yt.has(n) ? "video" : ht.has(n) ? "office" : bt.has(n) ? "code" : gt.has(n) ? "text" : "unknown", It = (n) => {
200
+ const a = ue() ? ce(ve, {}) : {}, c = I(() => {
201
+ var C;
202
+ const _ = z(n);
203
+ return ((C = _ == null ? void 0 : _.values) == null ? void 0 : C.file_id) ?? (_ == null ? void 0 : _.file_id) ?? "";
204
+ }), t = I(() => {
205
+ var C;
206
+ const _ = z(n);
207
+ return ((C = _ == null ? void 0 : _.values) == null ? void 0 : C.file_name) ?? (_ == null ? void 0 : _.file_name) ?? "未命名文件";
208
+ }), o = I(() => $t(t.value)), d = I(() => xt(o.value)), w = U(!1), $ = U(!1), b = U(""), g = U(!1), p = U(""), h = U(""), k = U(null), O = I(() => k.value ? Ne(k.value.size) : ""), T = () => {
209
+ h.value && typeof URL < "u" && typeof URL.revokeObjectURL == "function" && URL.revokeObjectURL(h.value), h.value = "";
210
+ }, N = async () => {
211
+ const _ = c.value, C = t.value;
212
+ if (!_)
211
213
  throw new Error("缺少文件 id,无法加载文件");
212
- const C = d || I, X = N.get(C);
213
- if (X)
214
- return X;
215
- let R = se.get(C);
214
+ const E = _ || C, Y = F.get(E);
215
+ if (Y)
216
+ return Y;
217
+ let R = se.get(E);
216
218
  return R || (R = (async () => {
217
- var G, W;
219
+ var J, Z;
218
220
  if (a.loadFile)
219
- return a.loadFile(d);
220
- const P = (G = a.getFileUrl) == null ? void 0 : G.call(a, d);
221
- if (!P)
221
+ return a.loadFile(_);
222
+ const L = (J = a.getFileUrl) == null ? void 0 : J.call(a, _);
223
+ if (!L)
222
224
  throw new Error("未配置文件加载方式(请提供 loadFile 或 getFileUrl)");
223
- const v = await fetch(P, { headers: (W = a.getHeaders) == null ? void 0 : W.call(a) });
224
- if (!v.ok)
225
- throw new Error(`文件加载失败(HTTP ${v.status})`);
226
- return v.blob();
227
- })().then((P) => (gt(C, P), P)).finally(() => se.delete(C)), se.set(C, R)), R;
225
+ const y = await fetch(L, { headers: (Z = a.getHeaders) == null ? void 0 : Z.call(a) });
226
+ if (!y.ok)
227
+ throw new Error(`文件加载失败(HTTP ${y.status})`);
228
+ return y.blob();
229
+ })().then((L) => (St(E, L), L)).finally(() => se.delete(E)), se.set(E, R)), R;
228
230
  }, S = async () => {
229
- x.value = !0, b.value = "", g.value = !1, p.value = "", O();
231
+ $.value = !0, b.value = "", g.value = !1, p.value = "", T();
230
232
  try {
231
- const d = await j();
232
- k.value = d;
233
- const I = _.value;
234
- if (I === "office") {
233
+ const _ = await N();
234
+ k.value = _;
235
+ const C = d.value;
236
+ if (C === "office") {
235
237
  g.value = !0;
236
238
  return;
237
239
  }
238
- if (I === "image" || I === "pdf" || I === "audio" || I === "video") {
239
- typeof URL < "u" && typeof URL.createObjectURL == "function" && (y.value = URL.createObjectURL(d));
240
+ if (C === "image" || C === "pdf" || C === "audio" || C === "video") {
241
+ typeof URL < "u" && typeof URL.createObjectURL == "function" && (h.value = URL.createObjectURL(_));
240
242
  return;
241
243
  }
242
- const C = await d.text();
243
- if (C.includes("\0")) {
244
+ const E = await _.text();
245
+ if (E.includes("\0")) {
244
246
  g.value = !0;
245
247
  return;
246
248
  }
247
- p.value = C;
248
- } catch (d) {
249
- b.value = d instanceof Error ? d.message : String(d);
249
+ p.value = E;
250
+ } catch (_) {
251
+ b.value = _ instanceof Error ? _.message : String(_);
250
252
  } finally {
251
- x.value = !1;
253
+ $.value = !1;
252
254
  }
253
- }, $ = async () => {
255
+ }, x = async () => {
254
256
  if (a.openPreview) {
255
257
  a.openPreview({
256
258
  fileId: c.value,
257
- fileName: r.value,
258
- loadFile: j,
259
- download: H
259
+ fileName: t.value,
260
+ loadFile: N,
261
+ download: W
260
262
  });
261
263
  return;
262
264
  }
263
265
  w.value = !0, await S();
264
- }, K = () => {
265
- w.value = !1, x.value = !1, b.value = "", g.value = !1, p.value = "", O();
266
- }, H = async () => {
266
+ }, G = () => {
267
+ w.value = !1, $.value = !1, b.value = "", g.value = !1, p.value = "", T();
268
+ }, W = async () => {
267
269
  try {
268
- const d = k.value ?? await j();
269
- if (k.value = d, a.downloadFile) {
270
- a.downloadFile({ fileId: c.value, fileName: r.value, blob: d });
270
+ const _ = k.value ?? await N();
271
+ if (k.value = _, a.downloadFile) {
272
+ a.downloadFile({ fileId: c.value, fileName: t.value, blob: _ });
271
273
  return;
272
274
  }
273
275
  if (typeof document > "u" || typeof URL > "u")
274
276
  return;
275
- const I = URL.createObjectURL(d), C = document.createElement("a");
276
- C.href = I, C.download = r.value, document.body.appendChild(C), C.click(), C.remove(), URL.revokeObjectURL(I);
277
- } catch (d) {
278
- b.value = d instanceof Error ? d.message : String(d), !w.value && !a.openPreview && (w.value = !0);
277
+ const C = URL.createObjectURL(_), E = document.createElement("a");
278
+ E.href = C, E.download = t.value, document.body.appendChild(E), E.click(), E.remove(), URL.revokeObjectURL(C);
279
+ } catch (_) {
280
+ b.value = _ instanceof Error ? _.message : String(_), !w.value && !a.openPreview && (w.value = !0);
279
281
  }
280
- }, z = (d) => {
281
- d.key === "Escape" && w.value && K();
282
+ }, q = (_) => {
283
+ _.key === "Escape" && w.value && G();
282
284
  };
283
- return de(w, (d) => {
284
- typeof window > "u" || (d ? window.addEventListener("keydown", z) : window.removeEventListener("keydown", z));
285
- }), xe(() => {
286
- typeof window < "u" && window.removeEventListener("keydown", z), O();
285
+ return de(w, (_) => {
286
+ typeof window > "u" || (_ ? window.addEventListener("keydown", q) : window.removeEventListener("keydown", q));
287
+ }), Ie(() => {
288
+ typeof window < "u" && window.removeEventListener("keydown", q), T();
287
289
  }), {
288
290
  fileId: c,
289
- fileName: r,
290
- extension: t,
291
- previewKind: _,
292
- fileSize: E,
291
+ fileName: t,
292
+ extension: o,
293
+ previewKind: d,
294
+ fileSize: O,
293
295
  visible: w,
294
- loading: x,
296
+ loading: $,
295
297
  error: b,
296
298
  unsupported: g,
297
299
  textContent: p,
298
- objectUrl: y,
299
- open: $,
300
- close: K,
301
- download: H
300
+ objectUrl: h,
301
+ open: x,
302
+ close: G,
303
+ download: W
302
304
  };
303
- }, oe = (n) => (Q("data-v-f61a91b5"), n = n(), ee(), n), xt = { class: "wi-output-file" }, It = ["aria-label"], Ct = /* @__PURE__ */ oe(() => /* @__PURE__ */ s("svg", {
305
+ }, oe = (n) => (H("data-v-f61a91b5"), n = n(), X(), n), Ct = { class: "wi-output-file" }, Et = ["aria-label"], Ot = /* @__PURE__ */ oe(() => /* @__PURE__ */ e("svg", {
304
306
  viewBox: "0 0 24 24",
305
307
  fill: "none",
306
308
  stroke: "currentColor",
@@ -308,14 +310,14 @@ const De = [
308
310
  "stroke-linecap": "round",
309
311
  "stroke-linejoin": "round"
310
312
  }, [
311
- /* @__PURE__ */ s("path", { d: "M7 2.5h7l4 4V21.5H7z" }),
312
- /* @__PURE__ */ s("path", { d: "M14 2.5v4h4" })
313
- ], -1)), Et = [
314
- Ct
315
- ], Ot = { class: "wi-output-file__info" }, Tt = ["title"], Vt = { class: "wi-output-file__meta" }, Ut = { class: "wi-output-file__ext" }, Lt = {
313
+ /* @__PURE__ */ e("path", { d: "M7 2.5h7l4 4V21.5H7z" }),
314
+ /* @__PURE__ */ e("path", { d: "M14 2.5v4h4" })
315
+ ], -1)), Tt = [
316
+ Ot
317
+ ], Vt = { class: "wi-output-file__info" }, Pt = ["title"], Ut = { class: "wi-output-file__meta" }, Mt = { class: "wi-output-file__ext" }, Lt = {
316
318
  key: 0,
317
319
  class: "wi-output-file__size"
318
- }, Mt = /* @__PURE__ */ oe(() => /* @__PURE__ */ s("svg", {
320
+ }, jt = /* @__PURE__ */ oe(() => /* @__PURE__ */ e("svg", {
319
321
  viewBox: "0 0 24 24",
320
322
  fill: "none",
321
323
  stroke: "currentColor",
@@ -323,27 +325,27 @@ const De = [
323
325
  "stroke-linecap": "round",
324
326
  "stroke-linejoin": "round"
325
327
  }, [
326
- /* @__PURE__ */ s("path", { d: "M12 3v12" }),
327
- /* @__PURE__ */ s("path", { d: "m7 10 5 5 5-5" }),
328
- /* @__PURE__ */ s("path", { d: "M5 21h14" })
329
- ], -1)), Pt = [
330
- Mt
331
- ], jt = ["aria-label"], Rt = { class: "wi-output-file-drawer__head" }, Nt = { class: "wi-output-file-drawer__title" }, Ft = { class: "wi-output-file-drawer__ext" }, At = ["title"], Dt = {
328
+ /* @__PURE__ */ e("path", { d: "M12 3v12" }),
329
+ /* @__PURE__ */ e("path", { d: "m7 10 5 5 5-5" }),
330
+ /* @__PURE__ */ e("path", { d: "M5 21h14" })
331
+ ], -1)), At = [
332
+ jt
333
+ ], Nt = ["aria-label"], Rt = { class: "wi-output-file-drawer__head" }, Ft = { class: "wi-output-file-drawer__title" }, Dt = { class: "wi-output-file-drawer__ext" }, Bt = ["title"], zt = {
332
334
  key: 0,
333
335
  class: "wi-output-file-drawer__size"
334
- }, Bt = { class: "wi-output-file-drawer__actions" }, zt = { class: "wi-output-file-drawer__body" }, qt = {
336
+ }, qt = { class: "wi-output-file-drawer__actions" }, Kt = { class: "wi-output-file-drawer__body" }, Ht = {
335
337
  key: 0,
336
338
  class: "wi-output-file-drawer__state"
337
- }, Kt = {
339
+ }, Xt = {
338
340
  key: 1,
339
341
  class: "wi-output-file-drawer__state is-error"
340
- }, Ht = {
342
+ }, Gt = {
341
343
  key: 2,
342
344
  class: "wi-output-file-drawer__state"
343
- }, Xt = /* @__PURE__ */ oe(() => /* @__PURE__ */ s("p", null, "该文件类型暂不支持在线预览,请下载后查看。", -1)), Gt = ["src", "alt"], Wt = ["src", "title"], Yt = ["srcdoc", "title"], Jt = ["src"], Zt = ["src"], Qt = {
345
+ }, Wt = /* @__PURE__ */ oe(() => /* @__PURE__ */ e("p", null, "该文件类型暂不支持在线预览,请下载后查看。", -1)), Yt = ["src", "alt"], Jt = ["src", "title"], Zt = ["srcdoc", "title"], Qt = ["src"], es = ["src"], ts = {
344
346
  key: 8,
345
347
  class: "wi-output-file-drawer__text"
346
- }, es = /* @__PURE__ */ D({
348
+ }, ss = /* @__PURE__ */ j({
347
349
  __name: "OutputFile",
348
350
  props: {
349
351
  report: {}
@@ -351,155 +353,155 @@ const De = [
351
353
  setup(n) {
352
354
  const a = n, {
353
355
  fileName: c,
354
- extension: r,
355
- previewKind: t,
356
- fileSize: _,
356
+ extension: t,
357
+ previewKind: o,
358
+ fileSize: d,
357
359
  visible: w,
358
- loading: x,
360
+ loading: $,
359
361
  error: b,
360
362
  unsupported: g,
361
363
  textContent: p,
362
- objectUrl: y,
364
+ objectUrl: h,
363
365
  open: k,
364
- close: E,
365
- download: O
366
- } = $t(() => a.report);
367
- return (j, S) => (i(), u("div", xt, [
368
- s("div", {
366
+ close: O,
367
+ download: T
368
+ } = It(() => a.report);
369
+ return (N, S) => (l(), u("div", Ct, [
370
+ e("div", {
369
371
  class: "wi-output-file__card",
370
372
  role: "button",
371
373
  tabindex: "0",
372
- "aria-label": `预览文件 ${l(c)}`,
374
+ "aria-label": `预览文件 ${i(c)}`,
373
375
  onClick: S[1] || (S[1] = //@ts-ignore
374
- (...$) => l(k) && l(k)(...$)),
376
+ (...x) => i(k) && i(k)(...x)),
375
377
  onKeydown: [
376
378
  S[2] || (S[2] = re(
377
379
  //@ts-ignore
378
- (...$) => l(k) && l(k)(...$),
380
+ (...x) => i(k) && i(k)(...x),
379
381
  ["enter"]
380
382
  )),
381
383
  S[3] || (S[3] = re(te(
382
384
  //@ts-ignore
383
- (...$) => l(k) && l(k)(...$),
385
+ (...x) => i(k) && i(k)(...x),
384
386
  ["prevent"]
385
387
  ), ["space"]))
386
388
  ]
387
389
  }, [
388
- s("span", {
389
- class: q(["wi-output-file__icon", `is-${l(t)}`])
390
- }, Et, 2),
391
- s("div", Ot, [
392
- s("div", {
390
+ e("span", {
391
+ class: D(["wi-output-file__icon", `is-${i(o)}`])
392
+ }, Tt, 2),
393
+ e("div", Vt, [
394
+ e("div", {
393
395
  class: "wi-output-file__name",
394
- title: l(c)
395
- }, m(l(c)), 9, Tt),
396
- s("div", Vt, [
397
- s("span", Ut, m(l(r).toUpperCase() || "FILE"), 1),
398
- l(_) ? (i(), u("span", Lt, m(l(_)), 1)) : V("", !0)
396
+ title: i(c)
397
+ }, v(i(c)), 9, Pt),
398
+ e("div", Ut, [
399
+ e("span", Mt, v(i(t).toUpperCase() || "FILE"), 1),
400
+ i(d) ? (l(), u("span", Lt, v(i(d)), 1)) : V("", !0)
399
401
  ])
400
402
  ]),
401
- s("button", {
403
+ e("button", {
402
404
  type: "button",
403
405
  class: "wi-output-file__download",
404
406
  title: "下载文件",
405
407
  "aria-label": "下载文件",
406
408
  onClick: S[0] || (S[0] = te(
407
409
  //@ts-ignore
408
- (...$) => l(O) && l(O)(...$),
410
+ (...x) => i(T) && i(T)(...x),
409
411
  ["stop"]
410
412
  ))
411
- }, Pt)
412
- ], 40, It),
413
- (i(), Z(Ie, { to: "body" }, [
414
- Ce(Ee, { name: "wi-output-file-fade" }, {
415
- default: Oe(() => [
416
- l(w) ? (i(), u("div", {
413
+ }, At)
414
+ ], 40, Et),
415
+ (l(), ee(Ce, { to: "body" }, [
416
+ Ee(Oe, { name: "wi-output-file-fade" }, {
417
+ default: Te(() => [
418
+ i(w) ? (l(), u("div", {
417
419
  key: 0,
418
420
  class: "wi-output-file-mask",
419
421
  onClick: S[8] || (S[8] = te(
420
422
  //@ts-ignore
421
- (...$) => l(E) && l(E)(...$),
423
+ (...x) => i(O) && i(O)(...x),
422
424
  ["self"]
423
425
  ))
424
426
  }, [
425
- s("aside", {
427
+ e("aside", {
426
428
  class: "wi-output-file-drawer",
427
429
  role: "dialog",
428
430
  "aria-modal": "true",
429
- "aria-label": `预览文件 ${l(c)}`
431
+ "aria-label": `预览文件 ${i(c)}`
430
432
  }, [
431
- s("header", Rt, [
432
- s("div", Nt, [
433
- s("span", Ft, m(l(r).toUpperCase() || "FILE"), 1),
434
- s("div", {
433
+ e("header", Rt, [
434
+ e("div", Ft, [
435
+ e("span", Dt, v(i(t).toUpperCase() || "FILE"), 1),
436
+ e("div", {
435
437
  class: "wi-output-file-drawer__name",
436
- title: l(c)
437
- }, m(l(c)), 9, At),
438
- l(_) ? (i(), u("div", Dt, m(l(_)), 1)) : V("", !0)
438
+ title: i(c)
439
+ }, v(i(c)), 9, Bt),
440
+ i(d) ? (l(), u("div", zt, v(i(d)), 1)) : V("", !0)
439
441
  ]),
440
- s("div", Bt, [
441
- s("button", {
442
+ e("div", qt, [
443
+ e("button", {
442
444
  type: "button",
443
445
  class: "wi-output-file-drawer__btn",
444
446
  onClick: S[4] || (S[4] = //@ts-ignore
445
- (...$) => l(O) && l(O)(...$))
447
+ (...x) => i(T) && i(T)(...x))
446
448
  }, "下载"),
447
- s("button", {
449
+ e("button", {
448
450
  type: "button",
449
451
  class: "wi-output-file-drawer__btn wi-output-file-drawer__btn--close",
450
452
  title: "关闭",
451
453
  "aria-label": "关闭预览",
452
454
  onClick: S[5] || (S[5] = //@ts-ignore
453
- (...$) => l(E) && l(E)(...$))
455
+ (...x) => i(O) && i(O)(...x))
454
456
  }, " × ")
455
457
  ])
456
458
  ]),
457
- s("div", zt, [
458
- l(x) ? (i(), u("div", qt, "文件加载中…")) : l(b) ? (i(), u("div", Kt, [
459
- s("p", null, m(l(b)), 1),
460
- s("button", {
459
+ e("div", Kt, [
460
+ i($) ? (l(), u("div", Ht, "文件加载中…")) : i(b) ? (l(), u("div", Xt, [
461
+ e("p", null, v(i(b)), 1),
462
+ e("button", {
461
463
  type: "button",
462
464
  class: "wi-output-file-drawer__btn",
463
465
  onClick: S[6] || (S[6] = //@ts-ignore
464
- (...$) => l(O) && l(O)(...$))
466
+ (...x) => i(T) && i(T)(...x))
465
467
  }, "下载文件")
466
- ])) : l(g) ? (i(), u("div", Ht, [
467
- Xt,
468
- s("button", {
468
+ ])) : i(g) ? (l(), u("div", Gt, [
469
+ Wt,
470
+ e("button", {
469
471
  type: "button",
470
472
  class: "wi-output-file-drawer__btn",
471
473
  onClick: S[7] || (S[7] = //@ts-ignore
472
- (...$) => l(O) && l(O)(...$))
474
+ (...x) => i(T) && i(T)(...x))
473
475
  }, "下载文件")
474
- ])) : l(t) === "image" && l(y) ? (i(), u("img", {
476
+ ])) : i(o) === "image" && i(h) ? (l(), u("img", {
475
477
  key: 3,
476
478
  class: "wi-output-file-drawer__image",
477
- src: l(y),
478
- alt: l(c)
479
- }, null, 8, Gt)) : l(t) === "pdf" && l(y) ? (i(), u("iframe", {
479
+ src: i(h),
480
+ alt: i(c)
481
+ }, null, 8, Yt)) : i(o) === "pdf" && i(h) ? (l(), u("iframe", {
480
482
  key: 4,
481
483
  class: "wi-output-file-drawer__frame",
482
- src: l(y),
483
- title: l(c)
484
- }, null, 8, Wt)) : l(t) === "html" ? (i(), u("iframe", {
484
+ src: i(h),
485
+ title: i(c)
486
+ }, null, 8, Jt)) : i(o) === "html" ? (l(), u("iframe", {
485
487
  key: 5,
486
488
  class: "wi-output-file-drawer__frame",
487
- srcdoc: l(p),
489
+ srcdoc: i(p),
488
490
  sandbox: "allow-scripts allow-forms allow-modals",
489
- title: l(c)
490
- }, null, 8, Yt)) : l(t) === "audio" && l(y) ? (i(), u("audio", {
491
+ title: i(c)
492
+ }, null, 8, Zt)) : i(o) === "audio" && i(h) ? (l(), u("audio", {
491
493
  key: 6,
492
494
  class: "wi-output-file-drawer__media",
493
- src: l(y),
495
+ src: i(h),
494
496
  controls: ""
495
- }, null, 8, Jt)) : l(t) === "video" && l(y) ? (i(), u("video", {
497
+ }, null, 8, Qt)) : i(o) === "video" && i(h) ? (l(), u("video", {
496
498
  key: 7,
497
499
  class: "wi-output-file-drawer__media",
498
- src: l(y),
500
+ src: i(h),
499
501
  controls: ""
500
- }, null, 8, Zt)) : (i(), u("pre", Qt, m(l(p)), 1))
502
+ }, null, 8, es)) : (l(), u("pre", ts, v(i(p)), 1))
501
503
  ])
502
- ], 8, jt)
504
+ ], 8, Nt)
503
505
  ])) : V("", !0)
504
506
  ]),
505
507
  _: 1
@@ -507,51 +509,51 @@ const De = [
507
509
  ]))
508
510
  ]));
509
511
  }
510
- }), ts = /* @__PURE__ */ B(es, [["__scopeId", "data-v-f61a91b5"]]), ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
512
+ }), ns = /* @__PURE__ */ A(ss, [["__scopeId", "data-v-f61a91b5"]]), os = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
511
513
  __proto__: null,
512
- default: ts
513
- }, Symbol.toStringTag, { value: "Module" })), ns = () => {
514
+ default: ns
515
+ }, Symbol.toStringTag, { value: "Module" })), as = () => {
514
516
  var a, c;
515
517
  const n = (c = (a = window == null ? void 0 : window.globalConfig) == null ? void 0 : a.WebApiUrl) == null ? void 0 : c.MainUrl;
516
518
  return typeof n == "string" ? n : "";
517
- }, os = () => window.location.origin + window.location.pathname, ne = "access-session", as = () => {
519
+ }, rs = () => window.location.origin + window.location.pathname, ne = "access-session", is = () => {
518
520
  const n = window.location.pathname.split("/").filter((a) => !!a).join("-");
519
521
  return n ? `${n}-` : "";
520
- }, rs = () => {
521
- const n = `${as()}${ne}`, a = [];
522
- for (let r = 0; r < localStorage.length; r++) {
523
- const t = localStorage.key(r);
524
- !t || !t.endsWith(ne) || t.slice(0, t.lastIndexOf(":")) !== "wi admin" && (t.endsWith(`x-${ne}`) || a.push(t));
522
+ }, ls = () => {
523
+ const n = `${is()}${ne}`, a = [];
524
+ for (let t = 0; t < localStorage.length; t++) {
525
+ const o = localStorage.key(t);
526
+ !o || !o.endsWith(ne) || o.slice(0, o.lastIndexOf(":")) !== "wi admin" && (o.endsWith(`x-${ne}`) || a.push(o));
525
527
  }
526
- const c = a.find((r) => r.endsWith(n)) ?? a[0];
528
+ const c = a.find((t) => t.endsWith(n)) ?? a[0];
527
529
  if (!c)
528
530
  return "";
529
531
  try {
530
- const r = localStorage.getItem(c);
531
- if (!r || r === "undefined")
532
+ const t = localStorage.getItem(c);
533
+ if (!t || t === "undefined")
532
534
  return "";
533
- const t = JSON.parse(r);
534
- return t == null ? "" : String(t);
535
+ const o = JSON.parse(t);
536
+ return o == null ? "" : String(o);
535
537
  } catch {
536
538
  return "";
537
539
  }
538
- }, we = Symbol("wi-chat-iframe-page-config"), un = (n) => {
540
+ }, we = Symbol("wi-chat-iframe-page-config"), Sn = (n) => {
539
541
  _e(we, n);
540
- }, ls = (n, a) => {
541
- const c = (a == null ? void 0 : a.mainUrl) !== void 0 ? String(A(a.mainUrl)) : ns(), r = (a == null ? void 0 : a.token) !== void 0 ? String(A(a.token)) : rs();
542
- return n.replace(/\{\{\s*MAIN_URL\s*\}\}/g, c).replace(/\{\{\s*SERVE_URL\s*\}\}/g, os()).replace(/\{\{\s*token\s*\}\}/g, r);
543
- }, is = (n) => {
544
- const a = ue() ? ce(we, {}) : {}, c = T(() => {
542
+ }, us = (n, a) => {
543
+ const c = (a == null ? void 0 : a.mainUrl) !== void 0 ? String(z(a.mainUrl)) : as(), t = (a == null ? void 0 : a.token) !== void 0 ? String(z(a.token)) : ls();
544
+ return n.replace(/\{\{\s*MAIN_URL\s*\}\}/g, c).replace(/\{\{\s*SERVE_URL\s*\}\}/g, rs()).replace(/\{\{\s*token\s*\}\}/g, t);
545
+ }, cs = (n) => {
546
+ const a = ue() ? ce(we, {}) : {}, c = I(() => {
545
547
  var w;
546
- const t = A(n), _ = ((w = t == null ? void 0 : t.values) == null ? void 0 : w.url) ?? (t == null ? void 0 : t.url) ?? "";
547
- return _ ? a.resolveUrl ? a.resolveUrl(_) : ls(_, a) : "";
548
- }), r = T(() => {
549
- var _;
550
- const t = A(n);
551
- return ((_ = t == null ? void 0 : t.values) == null ? void 0 : _.srcdoc) ?? (t == null ? void 0 : t.srcdoc) ?? "";
548
+ const o = z(n), d = ((w = o == null ? void 0 : o.values) == null ? void 0 : w.url) ?? (o == null ? void 0 : o.url) ?? "";
549
+ return d ? a.resolveUrl ? a.resolveUrl(d) : us(d, a) : "";
550
+ }), t = I(() => {
551
+ var d;
552
+ const o = z(n);
553
+ return ((d = o == null ? void 0 : o.values) == null ? void 0 : d.srcdoc) ?? (o == null ? void 0 : o.srcdoc) ?? "";
552
554
  });
553
- return { url: c, srcdoc: r };
554
- }, ie = "data-wi-iframe-resizer-child", us = (n) => {
555
+ return { url: c, srcdoc: t };
556
+ }, le = "data-wi-iframe-resizer-child", ds = (n) => {
555
557
  if (!n)
556
558
  return !1;
557
559
  let a = null;
@@ -565,33 +567,33 @@ const De = [
565
567
  const c = a.head || a.documentElement;
566
568
  if (!c)
567
569
  return !1;
568
- const r = a.defaultView;
569
- if (r != null && r.parentIframe || r != null && r.parentIFrame || a.querySelector(`script[${ie}]`))
570
+ const t = a.defaultView;
571
+ if (t != null && t.parentIframe || t != null && t.parentIFrame || a.querySelector(`script[${le}]`))
570
572
  return !1;
571
- const t = a.createElement("script");
572
- return t.textContent = Re, t.setAttribute(ie, ""), c.appendChild(t), !0;
573
- }, cs = /* @__PURE__ */ D({
573
+ const o = a.createElement("script");
574
+ return o.textContent = Re, o.setAttribute(le, ""), c.appendChild(o), !0;
575
+ }, _s = /* @__PURE__ */ j({
574
576
  __name: "IframePage",
575
577
  props: {
576
578
  report: {}
577
579
  },
578
580
  setup(n) {
579
- const a = n, { url: c, srcdoc: r } = is(() => a.report), t = (_) => {
580
- us(_.target);
581
+ const a = n, { url: c, srcdoc: t } = cs(() => a.report), o = (d) => {
582
+ ds(d.target);
581
583
  };
582
- return (_, w) => l(c) ? (i(), Z(le, {
584
+ return (d, w) => i(c) ? (l(), ee(ie, {
583
585
  key: 0,
584
586
  class: "iframe-page__frame iframe-page__frame--url",
585
587
  license: "GPLv3",
586
- src: l(c),
588
+ src: i(c),
587
589
  width: "100%",
588
590
  "warning-timeout": 0,
589
- onLoad: t
590
- }, null, 8, ["src"])) : l(r) ? (i(), Z(le, {
591
+ onLoad: o
592
+ }, null, 8, ["src"])) : i(t) ? (l(), ee(ie, {
591
593
  key: 1,
592
594
  class: "iframe-page iframe-page--srcdoc",
593
595
  license: "GPLv3",
594
- srcdoc: l(r),
596
+ srcdoc: i(t),
595
597
  width: "100%",
596
598
  frameborder: "no",
597
599
  border: "0",
@@ -600,45 +602,45 @@ const De = [
600
602
  scrolling: "no"
601
603
  }, null, 8, ["srcdoc"])) : V("", !0);
602
604
  }
603
- }), ds = /* @__PURE__ */ B(cs, [["__scopeId", "data-v-f4c94a4e"]]), _s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
605
+ }), ps = /* @__PURE__ */ A(_s, [["__scopeId", "data-v-f4c94a4e"]]), fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
604
606
  __proto__: null,
605
- default: ds
606
- }, Symbol.toStringTag, { value: "Module" })), ae = (n) => (Q("data-v-74053305"), n = n(), ee(), n), ps = { class: "wi-clarify__header" }, fs = { class: "wi-clarify__heading" }, vs = /* @__PURE__ */ ae(() => /* @__PURE__ */ s("div", { class: "wi-clarify__eyebrow" }, "需要补充信息", -1)), ws = { class: "wi-clarify__title" }, ys = {
607
+ default: ps
608
+ }, Symbol.toStringTag, { value: "Module" })), ae = (n) => (H("data-v-74053305"), n = n(), X(), n), vs = { class: "wi-clarify__header" }, ws = { class: "wi-clarify__heading" }, ys = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("div", { class: "wi-clarify__eyebrow" }, "需要补充信息", -1)), hs = { class: "wi-clarify__title" }, ms = {
607
609
  key: 0,
608
610
  class: "wi-clarify__desc"
609
- }, hs = { class: "wi-clarify__status" }, ms = { class: "wi-clarify__progress" }, bs = { class: "wi-clarify__progress-track" }, gs = {
611
+ }, bs = { class: "wi-clarify__status" }, gs = { class: "wi-clarify__progress" }, ks = { class: "wi-clarify__progress-track" }, Ss = {
610
612
  key: 0,
611
613
  class: "wi-clarify__panel"
612
- }, ks = { class: "wi-clarify__question" }, Ss = {
614
+ }, $s = { class: "wi-clarify__question" }, xs = {
613
615
  key: 0,
614
616
  class: "wi-clarify__question-desc"
615
- }, $s = {
617
+ }, Is = {
616
618
  key: 1,
617
619
  class: "wi-clarify__binding"
618
- }, xs = {
620
+ }, Cs = {
619
621
  key: 2,
620
622
  class: "wi-clarify__options"
621
- }, Is = ["onClick"], Cs = { class: "wi-clarify__option-indicator" }, Es = {
623
+ }, Es = ["onClick"], Os = { class: "wi-clarify__option-indicator" }, Ts = {
622
624
  key: 3,
623
625
  class: "wi-clarify__date"
624
- }, Os = ["for"], Ts = ["id", "value"], Vs = { class: "wi-clarify__text" }, Us = {
626
+ }, Vs = ["for"], Ps = ["id", "value"], Us = { class: "wi-clarify__text" }, Ms = {
625
627
  key: 0,
626
628
  class: "wi-clarify__or"
627
- }, Ls = /* @__PURE__ */ ae(() => /* @__PURE__ */ s("span", null, "或者,用自己的话说明", -1)), Ms = [
629
+ }, Ls = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("span", null, "或者,用自己的话说明", -1)), js = [
628
630
  Ls
629
- ], Ps = ["for"], js = ["id", "value", "placeholder"], Rs = {
631
+ ], As = ["for"], Ns = ["id", "value", "placeholder"], Rs = {
630
632
  class: "wi-clarify__dots",
631
633
  "aria-label": "确认问题导航"
632
- }, Ns = ["aria-label", "onClick"], Fs = { class: "wi-clarify__footer" }, As = /* @__PURE__ */ ae(() => /* @__PURE__ */ s("span", { class: "wi-clarify__confirm-text" }, "取消后本次操作将停止等待这些回答", -1)), Ds = { class: "wi-clarify__actions" }, Bs = { class: "wi-clarify__actions" }, zs = ["disabled"], qs = {
634
+ }, Fs = ["aria-label", "onClick"], Ds = { class: "wi-clarify__footer" }, Bs = /* @__PURE__ */ ae(() => /* @__PURE__ */ e("span", { class: "wi-clarify__confirm-text" }, "取消后本次操作将停止等待这些回答", -1)), zs = { class: "wi-clarify__actions" }, qs = { class: "wi-clarify__actions" }, Ks = ["disabled"], Hs = {
633
635
  key: 1,
634
636
  class: "wi-clarify__result"
635
- }, Ks = { class: "wi-clarify__result-icon" }, Hs = { class: "wi-clarify__result-body" }, Xs = {
637
+ }, Xs = { class: "wi-clarify__result-icon" }, Gs = { class: "wi-clarify__result-body" }, Ws = {
636
638
  key: 0,
637
639
  class: "wi-clarify__summary"
638
- }, Gs = { key: 1 }, Ws = { key: 2 }, Ys = {
640
+ }, Ys = { key: 1 }, Js = { key: 2 }, Zs = {
639
641
  key: 2,
640
642
  class: "wi-clarify__feedback"
641
- }, Js = /* @__PURE__ */ D({
643
+ }, Qs = /* @__PURE__ */ j({
642
644
  __name: "ClarificationCard",
643
645
  props: {
644
646
  report: {}
@@ -651,246 +653,290 @@ const De = [
651
653
  items: [],
652
654
  status: "expired",
653
655
  resultMessage: "本次补充信息已失效(回答已结束)"
654
- }, r = T(() => a.report.values ?? c), t = T(() => r.value.items ?? []), _ = L(0), w = Te({}), x = L(!1), b = L("");
656
+ }, t = I(() => a.report.values ?? c), o = I(() => t.value.items ?? []), d = U(0), w = Ve({}), $ = U(!1), b = U("");
655
657
  de(() => {
656
- var e;
657
- return (e = r.value) == null ? void 0 : e.requestId;
658
+ var s;
659
+ return (s = t.value) == null ? void 0 : s.requestId;
658
660
  }, () => {
659
- Object.keys(w).forEach((e) => delete w[e]), t.value.forEach((e) => {
660
- const o = { structuredValue: void 0, structuredValues: [], textValue: "" };
661
- e.default !== void 0 && (e.input.type === "multi_select" ? o.structuredValues = Array.isArray(e.default) ? [...e.default] : [] : e.input.type === "text" ? o.textValue = String(e.default) : o.structuredValue = e.default), w[e.id] = o;
662
- }), _.value = 0;
661
+ Object.keys(w).forEach((s) => delete w[s]), o.value.forEach((s) => {
662
+ const r = { structuredValue: void 0, structuredValues: [], textValue: "" };
663
+ s.default !== void 0 && (s.input.type === "multi_select" ? r.structuredValues = Array.isArray(s.default) ? [...s.default] : [] : s.input.type === "text" ? r.textValue = String(s.default) : r.structuredValue = s.default), w[s.id] = r;
664
+ }), d.value = 0;
663
665
  }, { immediate: !0 });
664
- const p = (e) => (w[e] || (w[e] = { structuredValue: void 0, structuredValues: [], textValue: "" }), w[e]), y = T(() => {
665
- var e, o, f;
666
- return ((e = r.value) == null ? void 0 : e.status) === "submitted" ? "已提交" : ((o = r.value) == null ? void 0 : o.status) === "cancelled" ? "已取消" : ((f = r.value) == null ? void 0 : f.status) === "expired" ? "已失效" : "等待回答";
667
- }), k = (e) => {
666
+ const p = (s) => (w[s] || (w[s] = { structuredValue: void 0, structuredValues: [], textValue: "" }), w[s]), h = I(() => {
667
+ var s, r, f;
668
+ return ((s = t.value) == null ? void 0 : s.status) === "submitted" ? "已提交" : ((r = t.value) == null ? void 0 : r.status) === "cancelled" ? "已取消" : ((f = t.value) == null ? void 0 : f.status) === "expired" ? "已失效" : "等待回答";
669
+ }), k = (s) => {
668
670
  try {
669
- const o = JSON.stringify(e);
670
- return o === void 0 ? String(e) : o;
671
+ const r = JSON.stringify(s);
672
+ return r === void 0 ? String(s) : r;
671
673
  } catch {
672
- return String(e);
674
+ return String(s);
673
675
  }
674
- }, E = (e, o) => k(e) === k(o), O = (e, o) => {
675
- const f = p(e.id);
676
- return e.input.type === "multi_select" ? f.structuredValues.some((h) => E(h, o)) : E(f.structuredValue, o);
677
- }, j = (e, o) => {
678
- const f = p(e.id);
679
- if (f.textValue = "", e.input.type === "multi_select") {
680
- const h = f.structuredValues.findIndex((U) => E(U, o));
681
- h >= 0 ? f.structuredValues.splice(h, 1) : f.structuredValues.push(o);
676
+ }, O = (s, r) => k(s) === k(r), T = (s, r) => {
677
+ const f = p(s.id);
678
+ return s.input.type === "multi_select" ? f.structuredValues.some((m) => O(m, r)) : O(f.structuredValue, r);
679
+ }, N = (s, r) => {
680
+ const f = p(s.id);
681
+ if (f.textValue = "", s.input.type === "multi_select") {
682
+ const m = f.structuredValues.findIndex((P) => O(P, r));
683
+ m >= 0 ? f.structuredValues.splice(m, 1) : f.structuredValues.push(r);
682
684
  return;
683
685
  }
684
- f.structuredValue = o;
685
- }, S = (e) => {
686
- var o;
687
- return ((o = e.target) == null ? void 0 : o.value) ?? "";
688
- }, $ = (e, o) => {
689
- const f = p(e.id);
690
- f.textValue = S(o), e.input.type !== "text" && (f.structuredValue = void 0, f.structuredValues.splice(0));
691
- }, K = (e, o) => {
692
- const f = p(e.id);
693
- f.structuredValue = S(o), f.textValue = "";
694
- }, H = (e) => {
695
- const o = p(e.id).structuredValue;
696
- return o == null ? "" : String(o);
697
- }, z = (e) => {
698
- var o;
699
- return ((o = e.input.textInput) == null ? void 0 : o.placeholder) ?? e.input.placeholder ?? (e.input.type === "text" ? "请输入需要补充的信息" : "例如:使用阀门,或者说明你的具体要求");
700
- }, d = (e) => {
701
- const o = e.binding;
702
- if (!o)
686
+ f.structuredValue = r;
687
+ }, S = (s) => {
688
+ var r;
689
+ return ((r = s.target) == null ? void 0 : r.value) ?? "";
690
+ }, x = (s, r) => {
691
+ const f = p(s.id);
692
+ f.textValue = S(r), s.input.type !== "text" && (f.structuredValue = void 0, f.structuredValues.splice(0));
693
+ }, G = (s, r) => {
694
+ const f = p(s.id);
695
+ f.structuredValue = S(r), f.textValue = "";
696
+ }, W = (s) => {
697
+ const r = p(s.id).structuredValue;
698
+ return r == null ? "" : String(r);
699
+ }, q = (s) => {
700
+ var r;
701
+ return ((r = s.input.textInput) == null ? void 0 : r.placeholder) ?? s.input.placeholder ?? (s.input.type === "text" ? "请输入需要补充的信息" : "例如:使用阀门,或者说明你的具体要求");
702
+ }, _ = (s) => {
703
+ const r = s.binding;
704
+ if (!r)
703
705
  return "";
704
- const f = o.actionName ? `动作:${o.actionName}` : "", h = o.parameterPath ? `参数:${o.parameterPath}` : "";
705
- return [f, h].filter(Boolean).join(" · ");
706
- }, I = (e) => {
707
- const o = p(e.id);
708
- return e.input.type === "multi_select" ? o.structuredValues.length > 0 : e.input.type === "single_select" ? o.structuredValue !== void 0 : e.input.type === "date" ? !!o.structuredValue : !1;
709
- }, C = (e) => !!p(e.id).textValue.trim() || I(e), X = (e) => !e.required || C(e) ? !0 : (b.value = `请回答“${e.question}”`, !1), R = () => {
710
- b.value = "", _.value = Math.max(0, _.value - 1);
711
- }, P = () => {
712
- !v.value || !X(v.value) || (b.value = "", _.value = Math.min(t.value.length - 1, _.value + 1));
713
- }, v = T(() => t.value[_.value]), G = (e, o) => e.input.type === "date" ? String(o ?? "") : (Array.isArray(o) ? o : [o]).map((h) => {
714
- var Y;
715
- const U = (Y = e.input.options) == null ? void 0 : Y.find((be) => E(be.value, h));
716
- return (U == null ? void 0 : U.label) ?? String(h ?? "");
717
- }).filter(Boolean).join("、"), W = (e) => {
718
- const o = p(e.id), f = o.textValue.trim();
719
- if (e.input.type === "text" || f || !I(e))
720
- return { id: e.id, mode: "text", value: f, displayText: f };
721
- const h = e.input.type === "multi_select" ? [...o.structuredValues] : o.structuredValue;
706
+ const f = r.actionName ? `动作:${r.actionName}` : "", m = r.parameterPath ? `参数:${r.parameterPath}` : "";
707
+ return [f, m].filter(Boolean).join(" · ");
708
+ }, C = (s) => {
709
+ const r = p(s.id);
710
+ return s.input.type === "multi_select" ? r.structuredValues.length > 0 : s.input.type === "single_select" ? r.structuredValue !== void 0 : s.input.type === "date" ? !!r.structuredValue : !1;
711
+ }, E = (s) => !!p(s.id).textValue.trim() || C(s), Y = (s) => !s.required || E(s) ? !0 : (b.value = `请回答“${s.question}”`, !1), R = () => {
712
+ b.value = "", d.value = Math.max(0, d.value - 1);
713
+ }, L = () => {
714
+ !y.value || !Y(y.value) || (b.value = "", d.value = Math.min(o.value.length - 1, d.value + 1));
715
+ }, y = I(() => o.value[d.value]), J = (s, r) => s.input.type === "date" ? String(r ?? "") : (Array.isArray(r) ? r : [r]).map((m) => {
716
+ var Q;
717
+ const P = (Q = s.input.options) == null ? void 0 : Q.find((ge) => O(ge.value, m));
718
+ return (P == null ? void 0 : P.label) ?? String(m ?? "");
719
+ }).filter(Boolean).join("、"), Z = (s) => {
720
+ const r = p(s.id), f = r.textValue.trim();
721
+ if (s.input.type === "text" || f || !C(s))
722
+ return { id: s.id, mode: "text", value: f, displayText: f };
723
+ const m = s.input.type === "multi_select" ? [...r.structuredValues] : r.structuredValue;
722
724
  return {
723
- id: e.id,
725
+ id: s.id,
724
726
  mode: "structured",
725
- value: h,
726
- displayText: G(e, h)
727
+ value: m,
728
+ displayText: J(s, m)
727
729
  };
728
- }, ye = () => {
729
- const e = t.value.findIndex((f) => f.required && !C(f));
730
- if (e >= 0) {
731
- _.value = e, b.value = `请回答“${t.value[e].question}”`;
730
+ }, he = () => {
731
+ const s = o.value.findIndex((f) => f.required && !E(f));
732
+ if (s >= 0) {
733
+ d.value = s, b.value = `请回答“${o.value[s].question}”`;
732
734
  return;
733
735
  }
734
736
  b.value = "";
735
- const o = t.value.map(W);
736
- Ne(r.value.requestId, o) || (b.value = "本次补充信息已经处理");
737
- }, he = () => {
738
- x.value = !1, b.value = "", Fe(r.value.requestId) || (b.value = "本次补充信息已经处理");
739
- }, me = (e) => {
740
- var o;
741
- return ((o = t.value.find((f) => f.id === e)) == null ? void 0 : o.question) ?? e;
737
+ const r = o.value.map(Z);
738
+ Fe(t.value.requestId, r) || (b.value = "本次补充信息已经处理");
739
+ }, me = () => {
740
+ $.value = !1, b.value = "", De(t.value.requestId) || (b.value = "本次补充信息已经处理");
741
+ }, be = (s) => {
742
+ var r;
743
+ return ((r = o.value.find((f) => f.id === s)) == null ? void 0 : r.question) ?? s;
742
744
  };
743
- return (e, o) => {
745
+ return (s, r) => {
744
746
  var f;
745
- return i(), u("section", {
746
- class: q(["wi-clarify", `is-${r.value.status}`])
747
+ return l(), u("section", {
748
+ class: D(["wi-clarify", `is-${t.value.status}`])
747
749
  }, [
748
- s("header", ps, [
749
- s("div", fs, [
750
- vs,
751
- s("h3", ws, m(r.value.title), 1),
752
- r.value.description ? (i(), u("p", ys, m(r.value.description), 1)) : V("", !0)
750
+ e("header", vs, [
751
+ e("div", ws, [
752
+ ys,
753
+ e("h3", hs, v(t.value.title), 1),
754
+ t.value.description ? (l(), u("p", ms, v(t.value.description), 1)) : V("", !0)
753
755
  ]),
754
- s("span", hs, m(y.value), 1)
756
+ e("span", bs, v(h.value), 1)
755
757
  ]),
756
- r.value.status === "pending" ? (i(), u(M, { key: 0 }, [
757
- s("div", ms, [
758
- s("span", null, "问题 " + m(_.value + 1) + " / " + m(t.value.length), 1),
759
- s("div", bs, [
760
- s("span", {
761
- style: Ve({ width: `${(_.value + 1) / t.value.length * 100}%` })
758
+ t.value.status === "pending" ? (l(), u(M, { key: 0 }, [
759
+ e("div", gs, [
760
+ e("span", null, "问题 " + v(d.value + 1) + " / " + v(o.value.length), 1),
761
+ e("div", ks, [
762
+ e("span", {
763
+ style: Pe({ width: `${(d.value + 1) / o.value.length * 100}%` })
762
764
  }, null, 4)
763
765
  ])
764
766
  ]),
765
- v.value ? (i(), u("div", gs, [
766
- s("div", ks, [
767
- s("span", {
768
- class: q(v.value.required ? "wi-clarify__required" : "wi-clarify__optional")
769
- }, m(v.value.required ? "必填" : "选填"), 3),
770
- s("h4", null, m(v.value.question), 1)
767
+ y.value ? (l(), u("div", Ss, [
768
+ e("div", $s, [
769
+ e("span", {
770
+ class: D(y.value.required ? "wi-clarify__required" : "wi-clarify__optional")
771
+ }, v(y.value.required ? "必填" : "选填"), 3),
772
+ e("h4", null, v(y.value.question), 1)
771
773
  ]),
772
- v.value.description ? (i(), u("p", Ss, m(v.value.description), 1)) : V("", !0),
773
- d(v.value) ? (i(), u("div", $s, m(d(v.value)), 1)) : V("", !0),
774
- v.value.input.type === "single_select" || v.value.input.type === "multi_select" ? (i(), u("div", xs, [
775
- (i(!0), u(M, null, F(v.value.input.options, (h, U) => (i(), u("button", {
776
- key: U,
774
+ y.value.description ? (l(), u("p", xs, v(y.value.description), 1)) : V("", !0),
775
+ _(y.value) ? (l(), u("div", Is, v(_(y.value)), 1)) : V("", !0),
776
+ y.value.input.type === "single_select" || y.value.input.type === "multi_select" ? (l(), u("div", Cs, [
777
+ (l(!0), u(M, null, B(y.value.input.options, (m, P) => (l(), u("button", {
778
+ key: P,
777
779
  type: "button",
778
- class: q(["wi-clarify__option", { "is-selected": O(v.value, h.value) }]),
779
- onClick: (Y) => j(v.value, h.value)
780
+ class: D(["wi-clarify__option", { "is-selected": T(y.value, m.value) }]),
781
+ onClick: (Q) => N(y.value, m.value)
780
782
  }, [
781
- s("span", Cs, m(O(v.value, h.value) ? "✓" : ""), 1),
782
- s("span", null, m(h.label), 1)
783
- ], 10, Is))), 128))
784
- ])) : v.value.input.type === "date" ? (i(), u("div", Es, [
785
- s("label", {
786
- for: `wi-clarify-date-${v.value.id}`
787
- }, "选择日期", 8, Os),
788
- s("input", {
789
- id: `wi-clarify-date-${v.value.id}`,
783
+ e("span", Os, v(T(y.value, m.value) ? "✓" : ""), 1),
784
+ e("span", null, v(m.label), 1)
785
+ ], 10, Es))), 128))
786
+ ])) : y.value.input.type === "date" ? (l(), u("div", Ts, [
787
+ e("label", {
788
+ for: `wi-clarify-date-${y.value.id}`
789
+ }, "选择日期", 8, Vs),
790
+ e("input", {
791
+ id: `wi-clarify-date-${y.value.id}`,
790
792
  type: "date",
791
- value: H(v.value),
792
- onInput: o[0] || (o[0] = (h) => K(v.value, h))
793
- }, null, 40, Ts)
793
+ value: W(y.value),
794
+ onInput: r[0] || (r[0] = (m) => G(y.value, m))
795
+ }, null, 40, Ps)
794
796
  ])) : V("", !0),
795
- s("div", Vs, [
796
- v.value.input.type !== "text" ? (i(), u("div", Us, Ms)) : V("", !0),
797
- s("label", {
798
- for: `wi-clarify-text-${v.value.id}`
799
- }, m(v.value.input.type === "text" ? "你的回答" : "自然语言回答"), 9, Ps),
800
- s("textarea", {
801
- id: `wi-clarify-text-${v.value.id}`,
802
- value: p(v.value.id).textValue,
803
- placeholder: z(v.value),
797
+ e("div", Us, [
798
+ y.value.input.type !== "text" ? (l(), u("div", Ms, js)) : V("", !0),
799
+ e("label", {
800
+ for: `wi-clarify-text-${y.value.id}`
801
+ }, v(y.value.input.type === "text" ? "你的回答" : "自然语言回答"), 9, As),
802
+ e("textarea", {
803
+ id: `wi-clarify-text-${y.value.id}`,
804
+ value: p(y.value.id).textValue,
805
+ placeholder: q(y.value),
804
806
  rows: "3",
805
- onInput: o[1] || (o[1] = (h) => $(v.value, h))
806
- }, null, 40, js)
807
+ onInput: r[1] || (r[1] = (m) => x(y.value, m))
808
+ }, null, 40, Ns)
807
809
  ])
808
810
  ])) : V("", !0),
809
- s("div", Rs, [
810
- (i(!0), u(M, null, F(t.value, (h, U) => (i(), u("button", {
811
- key: h.id,
811
+ e("div", Rs, [
812
+ (l(!0), u(M, null, B(o.value, (m, P) => (l(), u("button", {
813
+ key: m.id,
812
814
  type: "button",
813
- "aria-label": `查看第 ${U + 1} 个问题`,
814
- class: q({ "is-active": U === _.value, "is-answered": C(h) }),
815
- onClick: (Y) => _.value = U
816
- }, null, 10, Ns))), 128))
815
+ "aria-label": `查看第 ${P + 1} 个问题`,
816
+ class: D({ "is-active": P === d.value, "is-answered": E(m) }),
817
+ onClick: (Q) => d.value = P
818
+ }, null, 10, Fs))), 128))
817
819
  ]),
818
- s("footer", Fs, [
819
- x.value ? (i(), u(M, { key: 0 }, [
820
- As,
821
- s("div", Ds, [
822
- s("button", {
820
+ e("footer", Ds, [
821
+ $.value ? (l(), u(M, { key: 0 }, [
822
+ Bs,
823
+ e("div", zs, [
824
+ e("button", {
823
825
  type: "button",
824
826
  class: "wi-clarify__btn wi-clarify__btn--secondary",
825
- onClick: o[2] || (o[2] = (h) => x.value = !1)
827
+ onClick: r[2] || (r[2] = (m) => $.value = !1)
826
828
  }, " 继续填写 "),
827
- s("button", {
829
+ e("button", {
828
830
  type: "button",
829
831
  class: "wi-clarify__btn wi-clarify__btn--danger",
830
- onClick: he
832
+ onClick: me
831
833
  }, "确认取消")
832
834
  ])
833
- ], 64)) : (i(), u(M, { key: 1 }, [
834
- s("button", {
835
+ ], 64)) : (l(), u(M, { key: 1 }, [
836
+ e("button", {
835
837
  type: "button",
836
838
  class: "wi-clarify__cancel",
837
- onClick: o[3] || (o[3] = (h) => x.value = !0)
839
+ onClick: r[3] || (r[3] = (m) => $.value = !0)
838
840
  }, "取消"),
839
- s("div", Bs, [
840
- s("button", {
841
+ e("div", qs, [
842
+ e("button", {
841
843
  type: "button",
842
844
  class: "wi-clarify__btn wi-clarify__btn--secondary",
843
- disabled: _.value === 0,
845
+ disabled: d.value === 0,
844
846
  onClick: R
845
- }, " 上一项 ", 8, zs),
846
- _.value < t.value.length - 1 ? (i(), u("button", {
847
+ }, " 上一项 ", 8, Ks),
848
+ d.value < o.value.length - 1 ? (l(), u("button", {
847
849
  key: 0,
848
850
  type: "button",
849
851
  class: "wi-clarify__btn wi-clarify__btn--primary",
850
- onClick: P
851
- }, " 下一项 ")) : (i(), u("button", {
852
+ onClick: L
853
+ }, " 下一项 ")) : (l(), u("button", {
852
854
  key: 1,
853
855
  type: "button",
854
856
  class: "wi-clarify__btn wi-clarify__btn--primary",
855
- onClick: ye
857
+ onClick: he
856
858
  }, "提交全部"))
857
859
  ])
858
860
  ], 64))
859
861
  ])
860
- ], 64)) : (i(), u("div", qs, [
861
- s("div", Ks, m(r.value.status === "submitted" ? "✓" : r.value.status === "cancelled" ? "—" : "!"), 1),
862
- s("div", Hs, [
863
- s("h4", null, m(r.value.resultMessage || y.value), 1),
864
- r.value.status === "submitted" && ((f = r.value.answers) != null && f.length) ? (i(), u("div", Xs, [
865
- (i(!0), u(M, null, F(r.value.answers, (h) => (i(), u("div", {
866
- key: h.id
862
+ ], 64)) : (l(), u("div", Hs, [
863
+ e("div", Xs, v(t.value.status === "submitted" ? "✓" : t.value.status === "cancelled" ? "—" : "!"), 1),
864
+ e("div", Gs, [
865
+ e("h4", null, v(t.value.resultMessage || h.value), 1),
866
+ t.value.status === "submitted" && ((f = t.value.answers) != null && f.length) ? (l(), u("div", Ws, [
867
+ (l(!0), u(M, null, B(t.value.answers, (m) => (l(), u("div", {
868
+ key: m.id
867
869
  }, [
868
- s("span", null, m(me(h.id)), 1),
869
- s("strong", null, m(h.displayText || "未填写"), 1)
870
+ e("span", null, v(be(m.id)), 1),
871
+ e("strong", null, v(m.displayText || "未填写"), 1)
870
872
  ]))), 128))
871
- ])) : r.value.status === "cancelled" ? (i(), u("p", Gs, "本次确认未提交,工作流将收到取消结果。")) : (i(), u("p", Ws, "该确认项已失效,无法再提交。"))
873
+ ])) : t.value.status === "cancelled" ? (l(), u("p", Ys, "本次确认未提交,工作流将收到取消结果。")) : (l(), u("p", Js, "该确认项已失效,无法再提交。"))
872
874
  ])
873
875
  ])),
874
- b.value ? (i(), u("div", Ys, m(b.value), 1)) : V("", !0)
876
+ b.value ? (l(), u("div", Zs, v(b.value), 1)) : V("", !0)
875
877
  ], 2);
876
878
  };
877
879
  }
878
- }), Zs = /* @__PURE__ */ B(Js, [["__scopeId", "data-v-74053305"]]), Qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
880
+ }), en = /* @__PURE__ */ A(Qs, [["__scopeId", "data-v-74053305"]]), tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
881
+ __proto__: null,
882
+ default: en
883
+ }, Symbol.toStringTag, { value: "Module" })), ye = (n) => (H("data-v-14805363"), n = n(), X(), n), sn = { class: "wi-agent-action__head" }, nn = {
884
+ class: "wi-agent-action__icon",
885
+ "aria-hidden": "true"
886
+ }, on = { class: "wi-agent-action__title" }, an = /* @__PURE__ */ ye(() => /* @__PURE__ */ e("span", { class: "wi-agent-action__label" }, "执行操作", -1)), rn = { class: "wi-agent-action__name" }, ln = { class: "wi-agent-action__chip" }, un = { class: "wi-agent-action__message" }, cn = {
887
+ key: 0,
888
+ class: "wi-agent-action__args"
889
+ }, dn = /* @__PURE__ */ ye(() => /* @__PURE__ */ e("summary", null, "查看参数", -1)), _n = /* @__PURE__ */ j({
890
+ __name: "AgentActionStatus",
891
+ props: {
892
+ report: {}
893
+ },
894
+ setup(n) {
895
+ const a = n, c = {
896
+ id: "",
897
+ name: "",
898
+ arguments: {},
899
+ status: "unknown",
900
+ message: "执行状态未知(回答已结束)"
901
+ }, t = I(() => a.report.values ?? c), o = I(() => t.value.status === "running" ? "●" : t.value.status === "success" ? "✓" : t.value.status === "error" ? "!" : "?"), d = I(() => t.value.status === "running" ? "执行中" : t.value.status === "success" ? "已完成" : t.value.status === "error" ? "执行失败" : "状态未知"), w = I(() => {
902
+ const b = t.value.arguments;
903
+ return !!b && typeof b == "object" && Object.keys(b).length > 0;
904
+ }), $ = I(() => JSON.stringify(t.value.arguments ?? {}, null, 2));
905
+ return (b, g) => (l(), u("section", {
906
+ class: D(["wi-agent-action", `is-${t.value.status}`])
907
+ }, [
908
+ e("header", sn, [
909
+ e("span", nn, v(o.value), 1),
910
+ e("div", on, [
911
+ an,
912
+ e("code", rn, v(t.value.name || "未知操作"), 1)
913
+ ]),
914
+ e("span", ln, v(d.value), 1)
915
+ ]),
916
+ e("p", un, v(t.value.message || d.value), 1),
917
+ w.value ? (l(), u("details", cn, [
918
+ dn,
919
+ e("pre", null, v($.value), 1)
920
+ ])) : V("", !0)
921
+ ], 2));
922
+ }
923
+ }), pn = /* @__PURE__ */ A(_n, [["__scopeId", "data-v-14805363"]]), fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
879
924
  __proto__: null,
880
- default: Zs
925
+ default: pn
881
926
  }, Symbol.toStringTag, { value: "Module" }));
882
927
  export {
883
- an as AiAnswerBubble,
884
- Zs as ClarificationCard,
885
- rn as DeepThinkingSteps,
886
- ds as IframePage,
887
- dt as KnowledgeStreamResult,
888
- ts as OutputFile,
889
- Be as createAnswerContentMap,
890
- us as injectIframeResizerChild,
891
- un as provideIframePageConfig,
892
- ln as provideOutputFileConfig,
893
- ls as resolveIframePlaceholders,
894
- is as useIframePage
928
+ pn as AgentActionStatus,
929
+ bn as AiAnswerBubble,
930
+ en as ClarificationCard,
931
+ gn as DeepThinkingSteps,
932
+ ps as IframePage,
933
+ pt as KnowledgeStreamResult,
934
+ ns as OutputFile,
935
+ qe as createAnswerContentMap,
936
+ ds as injectIframeResizerChild,
937
+ Sn as provideIframePageConfig,
938
+ kn as provideOutputFileConfig,
939
+ us as resolveIframePlaceholders,
940
+ cs as useIframePage
895
941
  };
896
942
  //# sourceMappingURL=index.js.map