@skopon-cool/form-sdk 0.4.5 → 0.4.7

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.
package/dist/index.js CHANGED
@@ -1,34 +1,43 @@
1
1
  import './form-sdk.css';
2
- var En = Object.defineProperty;
3
- var Rn = (e, t, n) => t in e ? En(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var G = (e, t, n) => Rn(e, typeof t != "symbol" ? t + "" : t, n);
5
- import { jsx as c, jsxs as N } from "react/jsx-runtime";
6
- import { useRef as A, useState as U, useCallback as $, useMemo as j, createContext as ge, useContext as ye, useEffect as z, useSyncExternalStore as Un, forwardRef as wn, useImperativeHandle as Pn } from "react";
7
- import { Spin as mt, Button as Pe, Typography as te, Avatar as zn, Tag as pe, Select as ot, Checkbox as On, Radio as qn, Switch as Bn, TimePicker as Ln, DatePicker as Vn, Upload as Je, Input as We, InputNumber as jn, ConfigProvider as $n, Tooltip as de } from "antd";
8
- import { ReloadOutlined as Jt, FileTextOutlined as Wt, UserOutlined as Dn, FileImageOutlined as Hn, FileExcelOutlined as Kn, FileOutlined as Yt, PictureOutlined as Gn, SoundOutlined as Jn, VideoCameraOutlined as Wn } from "@ant-design/icons";
9
- import { createBinderlessComponentImplementation as Q, basicCatalog as Fe, A2uiSurface as Qt } from "@a2ui/react/v0_9";
2
+ var zn = Object.defineProperty;
3
+ var On = (e, t, n) => t in e ? zn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var G = (e, t, n) => On(e, typeof t != "symbol" ? t + "" : t, n);
5
+ import { jsx as u, jsxs as M } from "react/jsx-runtime";
6
+ import { useRef as A, useState as P, useCallback as j, useMemo as L, createContext as Se, useContext as ke, useEffect as q, useSyncExternalStore as qn, forwardRef as Bn, useImperativeHandle as Vn } from "react";
7
+ import { Spin as ft, Button as Oe, Typography as ne, Avatar as Ln, Tag as ge, Select as st, Checkbox as jn, Radio as $n, Switch as Dn, TimePicker as Hn, DatePicker as Kn, Upload as Ye, Input as Qe, InputNumber as Jn, ConfigProvider as Gn, Tooltip as he } from "antd";
8
+ import { ReloadOutlined as Yt, FileTextOutlined as Qt, UserOutlined as Wn, FileImageOutlined as Yn, FileExcelOutlined as Qn, FileOutlined as Xt, PictureOutlined as Xn, SoundOutlined as Zn, VideoCameraOutlined as er } from "@ant-design/icons";
9
+ import { createBinderlessComponentImplementation as X, basicCatalog as Ue, A2uiSurface as Zt } from "@a2ui/react/v0_9";
10
10
  import { z as h } from "zod";
11
- import { Catalog as Yn, MessageProcessor as Xt } from "@a2ui/web_core/v0_9";
12
- import { injectBasicCatalogStyles as Zt } from "@a2ui/web_core/v0_9/basic_catalog";
13
- import { injectStyles as en } from "@a2ui/react/styles";
14
- import Vt from "dayjs";
15
- const is = "v0.9", Qn = [
11
+ import { Catalog as tr, MessageProcessor as en } from "@a2ui/web_core/v0_9";
12
+ import { injectBasicCatalogStyles as tn } from "@a2ui/web_core/v0_9/basic_catalog";
13
+ import { injectStyles as nn } from "@a2ui/react/styles";
14
+ import jt from "dayjs";
15
+ const ds = "v0.9", nr = [
16
16
  "huge",
17
17
  "large",
18
18
  "medium",
19
19
  "small",
20
20
  "icon"
21
21
  ];
22
- function Ee(e) {
22
+ function de(e) {
23
23
  return e === "image" || e === "video" || e === "audio";
24
24
  }
25
- function ze(e) {
25
+ function Ce(e) {
26
26
  return e === "heading" || e === "paragraph";
27
27
  }
28
- function ae(e) {
29
- return !ze(e) && !Ee(e);
28
+ function Z(e) {
29
+ return !Ce(e) && !de(e);
30
+ }
31
+ function fs(e) {
32
+ return Ce(e) || de(e);
33
+ }
34
+ function rr(e) {
35
+ return e === "select" || e === "multiselect" || e === "radio" || e === "checkbox";
36
+ }
37
+ function ps(e) {
38
+ return Z(e) && e !== "file" && e !== "resume_multiselect" && e !== "case_multiselect";
30
39
  }
31
- function Xn() {
40
+ function or() {
32
41
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
33
42
  return crypto.randomUUID();
34
43
  if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
@@ -42,11 +51,11 @@ function Xn() {
42
51
  return (e === "x" ? t : t & 3 | 8).toString(16);
43
52
  });
44
53
  }
45
- function ve(e) {
46
- const t = Xn().replace(/-/g, "").slice(0, 8);
54
+ function le(e) {
55
+ const t = or().replace(/-/g, "").slice(0, 8);
47
56
  return `${e}${t}`;
48
57
  }
49
- const tn = [
58
+ const rn = [
50
59
  { value: "image/*", label: "图片" },
51
60
  { value: "video/*", label: "视频" },
52
61
  { value: "audio/*", label: "音频" },
@@ -57,7 +66,7 @@ const tn = [
57
66
  { value: "text/plain", label: "纯文本" },
58
67
  { value: "application/zip", label: "ZIP 压缩包" },
59
68
  { value: "application/x-rar-compressed", label: "RAR 压缩包" }
60
- ], Zn = {
69
+ ], ir = {
61
70
  "image/*": ["image/*"],
62
71
  "video/*": ["video/*"],
63
72
  "audio/*": ["audio/*"],
@@ -77,7 +86,7 @@ const tn = [
77
86
  "text/plain": ["text/plain"],
78
87
  "application/zip": ["application/zip"],
79
88
  "application/x-rar-compressed": ["application/x-rar-compressed"]
80
- }, er = {
89
+ }, sr = {
81
90
  "image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
82
91
  "video/*": [".mp4", ".mov", ".avi", ".webm"],
83
92
  "audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
@@ -88,14 +97,14 @@ const tn = [
88
97
  "text/plain": [".txt"],
89
98
  "application/zip": [".zip", ".7z"],
90
99
  "application/x-rar-compressed": [".rar"]
91
- }, tr = {
100
+ }, ar = {
92
101
  "application/msword": "office/word",
93
102
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
94
103
  "application/vnd.ms-excel": "office/excel",
95
104
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "office/excel",
96
105
  "application/vnd.ms-powerpoint": "office/ppt",
97
106
  "application/vnd.openxmlformats-officedocument.presentationml.presentation": "office/ppt"
98
- }, dt = [
107
+ }, pt = [
99
108
  { value: ".jpg", label: ".jpg" },
100
109
  { value: ".jpeg", label: ".jpeg" },
101
110
  { value: ".png", label: ".png" },
@@ -121,120 +130,119 @@ const tn = [
121
130
  { value: ".zip", label: ".zip" },
122
131
  { value: ".rar", label: ".rar" },
123
132
  { value: ".7z", label: ".7z" }
124
- ], nr = Object.fromEntries(
125
- tn.map((e) => [e.value, e.label])
126
- ), rr = Object.fromEntries(
127
- dt.map((e) => [e.value, e.label])
128
- ), or = new Set(tn.map((e) => e.value)), ir = new Set(
129
- dt.map((e) => e.value)
133
+ ], lr = Object.fromEntries(
134
+ rn.map((e) => [e.value, e.label])
135
+ ), cr = Object.fromEntries(
136
+ pt.map((e) => [e.value, e.label])
137
+ ), ur = new Set(rn.map((e) => e.value)), mr = new Set(
138
+ pt.map((e) => e.value)
130
139
  );
131
- function sr(e) {
140
+ function dr(e) {
132
141
  const t = e.trim();
133
- return t ? or.has(t) ? t : tr[t] ?? null : null;
142
+ return t ? ur.has(t) ? t : ar[t] ?? null : null;
134
143
  }
135
- function ar(e) {
144
+ function fr(e) {
136
145
  return Array.isArray(e) ? e.map((t) => {
137
146
  const n = t.trim().toLowerCase();
138
147
  return n ? n.startsWith(".") ? n : `.${n}` : "";
139
148
  }).filter(Boolean) : [];
140
149
  }
141
- function Se(e) {
150
+ function Ae(e) {
142
151
  if (!Array.isArray(e)) return [];
143
152
  const t = [], n = /* @__PURE__ */ new Set();
144
153
  for (const r of e) {
145
- const o = sr(r);
154
+ const o = dr(r);
146
155
  o && !n.has(o) && (n.add(o), t.push(o));
147
156
  }
148
157
  return t;
149
158
  }
150
- function lr(e) {
151
- const t = Se(e), n = [];
159
+ function pr(e) {
160
+ const t = Ae(e), n = [];
152
161
  for (const r of t)
153
- n.push(...Zn[r] ?? [r]);
162
+ n.push(...ir[r] ?? [r]);
154
163
  return n;
155
164
  }
156
- function cr(e) {
157
- const t = Se(e);
165
+ function hr(e) {
166
+ const t = Ae(e);
158
167
  if (t.length === 0) return [];
159
168
  const n = /* @__PURE__ */ new Set();
160
169
  for (const r of t)
161
- for (const o of er[r] ?? [])
170
+ for (const o of sr[r] ?? [])
162
171
  n.add(o);
163
- return dt.filter((r) => n.has(r.value));
172
+ return pt.filter((r) => n.has(r.value));
164
173
  }
165
- function pt(e, t) {
166
- const n = ar(t), r = Se(e);
174
+ function ht(e, t) {
175
+ const n = fr(t), r = Ae(e);
167
176
  if (r.length === 0)
168
- return n.filter((i) => ir.has(i));
177
+ return n.filter((i) => mr.has(i));
169
178
  const o = new Set(
170
- cr(r).map((i) => i.value)
179
+ hr(r).map((i) => i.value)
171
180
  );
172
181
  return n.filter((i) => o.has(i));
173
182
  }
174
- function ur(e, t) {
175
- const n = lr(e), r = pt(e, t), o = [...n, ...r];
183
+ function gr(e, t) {
184
+ const n = pr(e), r = ht(e, t), o = [...n, ...r];
176
185
  return o.length > 0 ? o.join(",") : void 0;
177
186
  }
178
- function mr(e, t) {
179
- const n = Se(e), r = pt(
187
+ function yr(e, t) {
188
+ const n = Ae(e), r = ht(
180
189
  n,
181
190
  t
182
191
  ), o = [
183
- ...n.map((i) => nr[i] ?? i),
184
- ...r.map((i) => rr[i] ?? i)
192
+ ...n.map((i) => lr[i] ?? i),
193
+ ...r.map((i) => cr[i] ?? i)
185
194
  ];
186
195
  return o.length === 0 ? null : o.join("、");
187
196
  }
188
- const dr = [
197
+ const vr = [
189
198
  "video",
190
199
  "audio",
191
200
  "image",
192
201
  "file",
193
202
  "spreadsheet",
194
203
  "document"
195
- ], pr = new Set(dr);
196
- function fr(e) {
197
- return e && pr.has(e) ? e : "file";
204
+ ], br = new Set(vr);
205
+ function Sr(e) {
206
+ return e && br.has(e) ? e : "file";
198
207
  }
199
- function be(e) {
200
- return typeof e == "string" && Qn.includes(e) ? e : "medium";
208
+ function _e(e) {
209
+ return typeof e == "string" && nr.includes(e) ? e : "medium";
201
210
  }
202
- function hr(e, t) {
211
+ function kr(e, t) {
203
212
  var o;
204
213
  const n = Math.max(1, t);
205
214
  let r = [];
206
215
  return Array.isArray(e.mediaUrls) ? r = e.mediaUrls.map((i) => String(i).trim()) : (o = e.mediaUrl) != null && o.trim() && (r = [e.mediaUrl.trim()]), r.length === 0 ? [""] : r.slice(0, n);
207
216
  }
208
- function gr(e) {
217
+ function Cr(e) {
209
218
  var t;
210
219
  return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
211
220
  }
212
- function yr(e) {
213
- return `form-media-size-${be(e)}`;
221
+ function Ar(e) {
222
+ return `form-media-size-${_e(e)}`;
214
223
  }
215
- function vr(e) {
216
- return `form-media-preview form-media-list ${yr(e)}`;
224
+ function _r(e) {
225
+ return `form-media-preview form-media-list ${Ar(e)}`;
217
226
  }
218
- const Sr = 10;
219
- function ft(e) {
227
+ const Tr = 10;
228
+ function on(e) {
220
229
  return e && typeof e == "object" && !Array.isArray(e) ? e : {};
221
230
  }
222
- function ke(e) {
231
+ function Te(e) {
223
232
  return e === !0 || e === "true" || e === 1 || e === "1";
224
233
  }
225
- function jt(e, t = 1) {
234
+ function Re(e, t = 1) {
226
235
  const n = typeof e == "number" ? e : Number(e);
227
236
  return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
228
237
  }
229
- function Ne(e, t = 1) {
238
+ function ue(e, t = 1) {
230
239
  const n = typeof e == "number" ? e : Number(e);
231
240
  return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
232
241
  }
233
- function br(e, t) {
234
- if (t !== void 0)
235
- return e === "toggle" ? ke(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String) : typeof t == "string" && t ? [t] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t);
242
+ function sn(e, t) {
243
+ return t == null ? void 0 : e === "toggle" ? Te(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String).map((o) => o.trim()).filter(Boolean) : typeof t == "string" && t.trim() ? [t.trim()] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t).trim() || void 0;
236
244
  }
237
- function kr(e) {
245
+ function xr(e) {
238
246
  if (Array.isArray(e)) return e.map(String).filter(Boolean);
239
247
  if (typeof e == "string" && e.trim())
240
248
  try {
@@ -244,83 +252,223 @@ function kr(e) {
244
252
  }
245
253
  return [];
246
254
  }
247
- function Cr(e) {
248
- const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, s = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, a = kr(e == null ? void 0 : e.flowUniqueIds);
255
+ function Mr(e) {
256
+ const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, s = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, a = xr(e == null ? void 0 : e.flowUniqueIds);
249
257
  return { agentKind: r, agentUniqueId: o, flowType: i, category: s, flowUniqueIds: a, pageSize: n };
250
258
  }
251
- function Ar(e) {
252
- const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20;
259
+ function Nr(e) {
260
+ const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0;
253
261
  return {
254
262
  names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
263
+ agentKind: r,
255
264
  agentUniqueIds: Array.isArray(e == null ? void 0 : e.agentUniqueIds) ? e.agentUniqueIds.map(String).filter(Boolean) : [],
256
265
  resumeUniqueIds: Array.isArray(e == null ? void 0 : e.resumeUniqueIds) ? e.resumeUniqueIds.map(String).filter(Boolean) : [],
257
266
  pageSize: n
258
267
  };
259
268
  }
260
- function _r(e) {
269
+ function Ir(e) {
261
270
  if (e.type !== "case_singleselect") return e;
262
271
  const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
263
272
  return { ...e, type: "case_multiselect", defaultValue: t };
264
273
  }
265
- function Tr(e) {
266
- var o, i;
267
- const t = _r(e), n = Se(t.fileAcceptTypes), r = t.type;
274
+ function Fr(e) {
275
+ var o, i, s, a;
276
+ const t = Ir(e), n = Ae(t.fileAcceptTypes), r = t.type;
268
277
  return {
269
- id: ((o = t.id) == null ? void 0 : o.trim()) || ve("block-"),
278
+ id: ((o = t.id) == null ? void 0 : o.trim()) || le("block-"),
270
279
  type: r,
271
280
  name: ((i = t.name) == null ? void 0 : i.trim()) || void 0,
272
281
  label: t.label ?? "",
273
282
  placeholder: t.placeholder ?? "",
274
283
  help: t.help ?? "",
275
284
  required: t.required === !0,
276
- mediaUrls: Ee(r) ? hr(t, Sr) : void 0,
277
- mediaSize: Ee(r) ? be(t.mediaSize) : void 0,
285
+ mediaUrls: de(r) ? kr(t, Tr) : void 0,
286
+ mediaSize: de(r) ? _e(t.mediaSize) : void 0,
278
287
  fileAcceptTypes: n,
279
- fileAcceptExtensions: pt(
288
+ fileAcceptExtensions: ht(
280
289
  n,
281
290
  t.fileAcceptExtensions
282
291
  ),
283
- filePlaceholderIcon: fr(t.filePlaceholderIcon),
284
- fileMinCount: r === "file" ? jt(t.fileMinCount, 1) : void 0,
285
- fileMaxCount: r === "file" ? jt(t.fileMaxCount, 1) : void 0,
286
- defaultValue: br(r, t.defaultValue),
287
- options: Array.isArray(t.options) ? t.options.map((s, a) => {
288
- var l, u;
292
+ filePlaceholderIcon: Sr(t.filePlaceholderIcon),
293
+ fileMinCount: r === "file" ? Re(t.fileMinCount, 1) : void 0,
294
+ fileMaxCount: r === "file" ? Re(t.fileMaxCount, 1) : void 0,
295
+ defaultValue: sn(r, t.defaultValue),
296
+ jsonSchemaDescription: ((s = t.jsonSchemaDescription) == null ? void 0 : s.trim()) ?? "",
297
+ hidden: r === "text" ? t.hidden === !0 : void 0,
298
+ needLLM: t.needLLM === !0 ? !0 : void 0,
299
+ options: Array.isArray(t.options) ? t.options.map((l, c) => {
300
+ var m, d;
289
301
  return {
290
- value: ((l = s.value) == null ? void 0 : l.trim()) || `option_${a + 1}`,
291
- label: ((u = s.label) == null ? void 0 : u.trim()) || `选项 ${a + 1}`
302
+ value: ((m = l.value) == null ? void 0 : m.trim()) || `option_${c + 1}`,
303
+ label: ((d = l.label) == null ? void 0 : d.trim()) || `选项 ${c + 1}`
292
304
  };
293
305
  }) : void 0,
306
+ condition: (a = t.condition) != null && a.fieldName ? {
307
+ fieldName: t.condition.fieldName.trim(),
308
+ operator: t.condition.operator ?? "eq",
309
+ value: t.condition.value
310
+ } : void 0,
294
311
  resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
295
- resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? Ne(t.resumeMinCount, 1) : void 0,
296
- resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? Ne(t.resumeMaxCount, 1) : void 0,
297
- resumeFilter: r === "resume_multiselect" ? Ar(t.resumeFilter) : void 0,
312
+ resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? ue(t.resumeMinCount, 1) : void 0,
313
+ resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? ue(t.resumeMaxCount, 1) : void 0,
314
+ resumeFilter: r === "resume_multiselect" ? Nr(t.resumeFilter) : void 0,
298
315
  caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
299
- caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? Ne(t.caseMinCount, 1) : void 0,
300
- caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? Ne(t.caseMaxCount, 1) : void 0,
301
- caseFilter: r === "case_multiselect" ? Cr(t.caseFilter) : void 0
316
+ caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? ue(t.caseMinCount, 1) : void 0,
317
+ caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? ue(t.caseMaxCount, 1) : void 0,
318
+ caseFilter: r === "case_multiselect" ? Mr(t.caseFilter) : void 0
302
319
  };
303
320
  }
304
- function Re(e) {
321
+ function Er(e) {
322
+ return new Set((e.options ?? []).map((t) => t.value));
323
+ }
324
+ function $t(e, t) {
325
+ const n = {
326
+ type: "array",
327
+ items: { type: "string" }
328
+ };
329
+ return e !== void 0 && (n.minItems = ue(e, 1)), t !== void 0 && (n.maxItems = ue(t, 1)), n;
330
+ }
331
+ function Ur(e) {
332
+ const t = sn(e.type, e.defaultValue);
333
+ if (t === void 0) return;
334
+ const n = Er(e);
335
+ switch (e.type) {
336
+ case "toggle":
337
+ return t;
338
+ case "number": {
339
+ const r = Number(t);
340
+ return Number.isNaN(r) ? void 0 : r;
341
+ }
342
+ case "multiselect":
343
+ case "checkbox": {
344
+ const r = t.filter((o) => n.has(o));
345
+ return r.length > 0 ? r : void 0;
346
+ }
347
+ case "select":
348
+ case "radio": {
349
+ const r = t;
350
+ return n.has(r) ? r : void 0;
351
+ }
352
+ case "resume_multiselect":
353
+ case "case_multiselect": {
354
+ const r = Array.isArray(t) ? t.map(String).filter(Boolean) : [];
355
+ return r.length > 0 ? r : void 0;
356
+ }
357
+ default:
358
+ return t;
359
+ }
360
+ }
361
+ function Rr(e) {
362
+ var i, s;
363
+ if (!((i = e.name) == null ? void 0 : i.trim()) || !Z(e.type)) return null;
364
+ let n;
365
+ switch (e.type) {
366
+ case "number":
367
+ n = { type: "number" };
368
+ break;
369
+ case "toggle":
370
+ n = { type: "boolean" };
371
+ break;
372
+ case "select":
373
+ case "radio": {
374
+ n = { type: "string" };
375
+ const a = (e.options ?? []).map((l) => l.value).filter(Boolean);
376
+ a.length > 0 && (n.enum = a);
377
+ break;
378
+ }
379
+ case "multiselect":
380
+ case "checkbox": {
381
+ const a = (e.options ?? []).map((l) => l.value).filter(Boolean);
382
+ n = {
383
+ type: "array",
384
+ items: a.length > 0 ? { type: "string", enum: a } : { type: "string" }
385
+ };
386
+ break;
387
+ }
388
+ case "file": {
389
+ const a = Re(e.fileMinCount, 1), l = Re(e.fileMaxCount, 1);
390
+ l <= 1 ? n = { type: "string" } : n = {
391
+ type: "array",
392
+ items: { type: "string" },
393
+ minItems: a,
394
+ maxItems: l
395
+ };
396
+ break;
397
+ }
398
+ case "resume_multiselect":
399
+ n = $t(e.resumeMinCount, e.resumeMaxCount);
400
+ break;
401
+ case "case_multiselect":
402
+ n = $t(e.caseMinCount, e.caseMaxCount);
403
+ break;
404
+ case "text":
405
+ n = { type: "string" }, e.hidden && (n["x-hidden"] = !0);
406
+ break;
407
+ default:
408
+ n = { type: "string" };
409
+ break;
410
+ }
411
+ const r = (s = e.jsonSchemaDescription) == null ? void 0 : s.trim();
412
+ r && (n.$comment = r);
413
+ const o = Ur(e);
414
+ return o !== void 0 && (n.default = o), n;
415
+ }
416
+ function Pr(e, t, n) {
417
+ var l;
418
+ const r = {}, o = [];
419
+ for (const c of e) {
420
+ const m = (l = c.name) == null ? void 0 : l.trim();
421
+ if (!m || !Z(c.type)) continue;
422
+ const d = Rr(c);
423
+ d && (r[m] = d, c.required && o.push(m));
424
+ }
425
+ const i = {
426
+ type: "object",
427
+ properties: r,
428
+ required: o,
429
+ additionalProperties: !1
430
+ }, s = t == null ? void 0 : t.trim(), a = n == null ? void 0 : n.trim();
431
+ return s && (i.title = s), a && (i.description = a), i;
432
+ }
433
+ function ye(e) {
434
+ const t = e.title ?? "", n = e.description ?? "";
305
435
  return {
306
- title: e.title ?? "",
307
- description: e.description ?? "",
436
+ title: t,
437
+ description: n,
308
438
  blocks: e.blocks,
309
- jsonSchema: e.jsonSchema ?? {}
439
+ jsonSchema: Pr(e.blocks, t, n)
310
440
  };
311
441
  }
312
- function Oe(e) {
442
+ function qe(e) {
313
443
  if (!e || !Array.isArray(e.blocks))
314
- return Re({ title: "", description: "", blocks: [], jsonSchema: {} });
315
- const t = e.blocks.map(Tr);
316
- return Re({
444
+ return ye({ title: "", description: "", blocks: [] });
445
+ const t = e.blocks.map(Fr);
446
+ return ye({
317
447
  title: typeof e.title == "string" ? e.title : "",
318
448
  description: typeof e.description == "string" ? e.description : "",
319
- blocks: t,
320
- jsonSchema: ft(e.jsonSchema)
449
+ blocks: t
321
450
  });
322
451
  }
323
- function xr(e) {
452
+ function hs() {
453
+ return ye({ title: "", description: "", blocks: [] });
454
+ }
455
+ function gs(e) {
456
+ const t = {
457
+ id: le("block-"),
458
+ type: e,
459
+ label: e
460
+ };
461
+ return Z(e) && (t.label = "", t.name = le("field_"), t.placeholder = "", t.required = !1), de(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), rr(e) && (t.options = [
462
+ { value: "option_1", label: "选项 1" },
463
+ { value: "option_2", label: "选项 2" }
464
+ ]), e === "file" && (t.fileAcceptTypes = [], t.fileAcceptExtensions = [], t.filePlaceholderIcon = "file", t.fileMinCount = 1, t.fileMaxCount = 1), e === "resume_multiselect" && (t.resumeEnableRefresh = !0, t.resumeMinCount = 1, t.resumeMaxCount = 1, t.resumeFilter = {
465
+ names: [],
466
+ agentUniqueIds: [],
467
+ resumeUniqueIds: [],
468
+ pageSize: 20
469
+ }, t.defaultValue = []), e === "case_multiselect" && (t.caseEnableRefresh = !0, t.caseMinCount = 1, t.caseMaxCount = 1, t.caseFilter = { flowUniqueIds: [], pageSize: 20 }, t.defaultValue = []), t;
470
+ }
471
+ function wr(e) {
324
472
  const t = typeof e.pageSize == "number" ? e.pageSize : Number(e.pageSize), n = typeof e.agentKind == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, r = typeof e.agentUniqueId == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, o = typeof e.flowType == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, i = typeof e.category == "string" && e.category.trim() ? e.category.trim() : void 0, s = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
325
473
  return {
326
474
  agentKind: n,
@@ -331,14 +479,14 @@ function xr(e) {
331
479
  pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
332
480
  };
333
481
  }
334
- function $t(e) {
482
+ function Dt(e) {
335
483
  if (e == null) return;
336
484
  const t = typeof e == "number" ? e : Number(e);
337
485
  if (!(!Number.isFinite(t) || t < 1))
338
486
  return Math.floor(t);
339
487
  }
340
- function Nr(e, t) {
341
- var s, a, l, u, m, d;
488
+ function zr(e, t) {
489
+ var s, a, l, c, m, d;
342
490
  const { id: n, label: r, path: o, withData: i } = t;
343
491
  return i({
344
492
  id: n,
@@ -351,7 +499,7 @@ function Nr(e, t) {
351
499
  agentKind: (s = e.caseFilter) == null ? void 0 : s.agentKind,
352
500
  agentUniqueId: (a = e.caseFilter) == null ? void 0 : a.agentUniqueId,
353
501
  flowType: (l = e.caseFilter) == null ? void 0 : l.flowType,
354
- category: (u = e.caseFilter) == null ? void 0 : u.category,
502
+ category: (c = e.caseFilter) == null ? void 0 : c.category,
355
503
  flowUniqueIds: ((m = e.caseFilter) == null ? void 0 : m.flowUniqueIds) ?? [],
356
504
  pageSize: ((d = e.caseFilter) == null ? void 0 : d.pageSize) ?? 20
357
505
  },
@@ -360,7 +508,7 @@ function Nr(e, t) {
360
508
  value: { path: o }
361
509
  });
362
510
  }
363
- function Ir(e, t, n) {
511
+ function Or(e, t, n) {
364
512
  const r = n.nameFromValue(e.value), o = {
365
513
  ...t("case_multiselect"),
366
514
  name: r,
@@ -368,23 +516,23 @@ function Ir(e, t, n) {
368
516
  }, i = n.asLiteral(e.placeholder);
369
517
  i && (o.placeholder = i);
370
518
  const s = n.asLiteral(e.help);
371
- s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = xr(e.caseFilter));
372
- const a = $t(e.minCount);
519
+ s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = wr(e.caseFilter));
520
+ const a = Dt(e.minCount);
373
521
  a !== void 0 && (o.caseMinCount = a);
374
- const l = $t(e.maxCount);
522
+ const l = Dt(e.maxCount);
375
523
  return l !== void 0 && (o.caseMaxCount = l), o;
376
524
  }
377
- const nn = ge(
525
+ const an = Se(
378
526
  null
379
527
  );
380
- function Mr(e) {
528
+ function qr(e) {
381
529
  try {
382
530
  return JSON.stringify(e);
383
531
  } catch {
384
532
  return String(e.length);
385
533
  }
386
534
  }
387
- const Fr = {
535
+ const Br = {
388
536
  publishLiveOptions: () => {
389
537
  },
390
538
  liveOptions: /* @__PURE__ */ new Map(),
@@ -393,23 +541,23 @@ const Fr = {
393
541
  clearPendingChangeFields: () => {
394
542
  }
395
543
  };
396
- function Er({ children: e }) {
397
- const t = A(/* @__PURE__ */ new Map()), n = A(/* @__PURE__ */ new Map()), r = A([]), [o, i] = U(0), [s, a] = U(() => /* @__PURE__ */ new Map()), [l, u] = U(
544
+ function Vr({ children: e }) {
545
+ const t = A(/* @__PURE__ */ new Map()), n = A(/* @__PURE__ */ new Map()), r = A([]), [o, i] = P(0), [s, a] = P(() => /* @__PURE__ */ new Map()), [l, c] = P(
398
546
  []
399
- ), m = $(
400
- (g, b) => {
547
+ ), m = j(
548
+ (g, S) => {
401
549
  const y = g.trim();
402
550
  if (!y) return;
403
- const k = b.map((p) => ({
404
- value: String(p.value ?? ""),
405
- label: String(p.label ?? p.value ?? "")
406
- })), f = Mr(k);
407
- n.current.get(y) !== f && (n.current.set(y, f), t.current.set(y, k), r.current.includes(y) || (r.current = [...r.current, y]), a(new Map(t.current)), u(r.current), i((p) => p + 1));
551
+ const k = S.map((f) => ({
552
+ value: String(f.value ?? ""),
553
+ label: String(f.label ?? f.value ?? "")
554
+ })), p = qr(k);
555
+ n.current.get(y) !== p && (n.current.set(y, p), t.current.set(y, k), r.current.includes(y) || (r.current = [...r.current, y]), a(new Map(t.current)), c(r.current), i((f) => f + 1));
408
556
  },
409
557
  []
410
- ), d = $(() => {
411
- r.current = [], u([]);
412
- }, []), S = j(
558
+ ), d = j(() => {
559
+ r.current = [], c([]);
560
+ }, []), b = L(
413
561
  () => ({
414
562
  publishLiveOptions: m,
415
563
  liveOptions: s,
@@ -425,26 +573,26 @@ function Er({ children: e }) {
425
573
  d
426
574
  ]
427
575
  );
428
- return /* @__PURE__ */ c(nn.Provider, { value: S, children: e });
576
+ return /* @__PURE__ */ u(an.Provider, { value: b, children: e });
429
577
  }
430
- function ht() {
431
- return ye(nn) ?? Fr;
578
+ function gt() {
579
+ return ke(an) ?? Br;
432
580
  }
433
- const rn = ge({ interactive: !0 });
434
- function it({
581
+ const ln = Se({ interactive: !0 });
582
+ function at({
435
583
  interactive: e,
436
584
  children: t
437
585
  }) {
438
- return /* @__PURE__ */ c(rn.Provider, { value: { interactive: e }, children: t });
586
+ return /* @__PURE__ */ u(ln.Provider, { value: { interactive: e }, children: t });
439
587
  }
440
- function ie() {
441
- return ye(rn);
588
+ function se() {
589
+ return ke(ln);
442
590
  }
443
- const on = ge(null);
444
- function Rr(e) {
591
+ const cn = Se(null);
592
+ function Lr(e) {
445
593
  return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
446
594
  }
447
- const Ur = {
595
+ const jr = {
448
596
  reportEvent: () => {
449
597
  },
450
598
  reportData: () => {
@@ -452,7 +600,7 @@ const Ur = {
452
600
  runAutoControl: (e) => e(),
453
601
  isAutoControl: () => !1
454
602
  };
455
- function wr(e) {
603
+ function $r(e) {
456
604
  const t = {};
457
605
  for (const [n, r] of Object.entries(e.form_values ?? {}))
458
606
  r !== void 0 && (t[n] = r);
@@ -462,40 +610,40 @@ function wr(e) {
462
610
  form_change: Array.isArray(e.form_change) ? [...e.form_change] : []
463
611
  };
464
612
  }
465
- function Pr({
613
+ function Dr({
466
614
  client: e,
467
615
  children: t
468
616
  }) {
469
617
  const n = A(0), r = A(e);
470
618
  r.current = e;
471
- const o = $((u) => {
619
+ const o = j((c) => {
472
620
  const m = r.current;
473
621
  if (!m) return;
474
622
  const d = {
475
- action: u.action,
476
- component: u.component
623
+ action: c.action,
624
+ component: c.component
477
625
  };
478
- u.field !== void 0 && (d.field = u.field), u.value !== void 0 && (d.value = u.value);
479
- const S = n.current > 0 ? "form_auto_control_bac_event" : "form_runtime_event";
480
- m.send(S, d);
481
- }, []), i = $((u) => {
626
+ c.field !== void 0 && (d.field = c.field), c.value !== void 0 && (d.value = c.value);
627
+ const b = n.current > 0 ? "form_auto_control_bac_event" : "form_runtime_event";
628
+ m.send(b, d);
629
+ }, []), i = j((c) => {
482
630
  const m = r.current;
483
- m && m.send("form_runtime_data", wr(u));
484
- }, []), s = $((u) => {
631
+ m && m.send("form_runtime_data", $r(c));
632
+ }, []), s = j((c) => {
485
633
  n.current += 1;
486
634
  let m;
487
635
  try {
488
- m = u();
636
+ m = c();
489
637
  } catch (d) {
490
638
  throw n.current = Math.max(0, n.current - 1), d;
491
639
  }
492
- return Rr(m) ? Promise.resolve(m).finally(() => {
640
+ return Lr(m) ? Promise.resolve(m).finally(() => {
493
641
  n.current = Math.max(0, n.current - 1);
494
642
  }) : (n.current = Math.max(0, n.current - 1), m);
495
- }, []), a = $(
643
+ }, []), a = j(
496
644
  () => n.current > 0,
497
645
  []
498
- ), l = j(
646
+ ), l = L(
499
647
  () => ({
500
648
  reportEvent: o,
501
649
  reportData: i,
@@ -504,89 +652,89 @@ function Pr({
504
652
  }),
505
653
  [o, i, s, a]
506
654
  );
507
- return /* @__PURE__ */ c(on.Provider, { value: l, children: t });
655
+ return /* @__PURE__ */ u(cn.Provider, { value: l, children: t });
508
656
  }
509
- function sn() {
510
- return ye(on) ?? Ur;
657
+ function un() {
658
+ return ke(cn) ?? jr;
511
659
  }
512
- const zr = 300;
513
- function an(e) {
660
+ const Hr = 300;
661
+ function mn(e) {
514
662
  return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
515
663
  }
516
- function Or(e) {
664
+ function Kr(e) {
517
665
  if (!e) return;
518
666
  const t = e.trim();
519
667
  if (t)
520
668
  return t.startsWith("/") ? t.slice(1) : t;
521
669
  }
522
- function Dt(e, t = "value") {
670
+ function Ht(e, t = "value") {
523
671
  const r = e.componentModel.properties[t];
524
- if (!(!an(r) || r === void 0))
672
+ if (!(!mn(r) || r === void 0))
525
673
  return e.dataContext.resolveDynamicValue(r);
526
674
  }
527
- function se(e, t = "value", n = {}) {
528
- const o = e.componentModel.properties[t], i = an(o), s = Or(i), a = sn(), {
675
+ function ae(e, t = "value", n = {}) {
676
+ const o = e.componentModel.properties[t], i = mn(o), s = Kr(i), a = un(), {
529
677
  component: l = "Unknown",
530
- changeAction: u = "change",
678
+ changeAction: c = "change",
531
679
  debounceChange: m = !1
532
- } = n, d = A(null), S = A(void 0), g = A(!1), b = A(a);
533
- b.current = a;
534
- const y = A(u);
535
- y.current = u;
680
+ } = n, d = A(null), b = A(void 0), g = A(!1), S = A(a);
681
+ S.current = a;
682
+ const y = A(c);
683
+ y.current = c;
536
684
  const k = A(l);
537
685
  k.current = l;
538
- const f = A(s);
539
- f.current = s, z(() => () => {
540
- d.current != null && (clearTimeout(d.current), d.current = null), g.current && f.current && (g.current = !1, b.current.reportEvent({
686
+ const p = A(s);
687
+ p.current = s, q(() => () => {
688
+ d.current != null && (clearTimeout(d.current), d.current = null), g.current && p.current && (g.current = !1, S.current.reportEvent({
541
689
  action: y.current,
542
690
  component: k.current,
543
- field: f.current,
544
- value: S.current
691
+ field: p.current,
692
+ value: b.current
545
693
  }));
546
694
  }, []);
547
- const p = $(
548
- (O) => {
695
+ const f = j(
696
+ (B) => {
549
697
  if (!i || o === void 0) return () => {
550
698
  };
551
- const B = e.dataContext.subscribeDynamicValue(o, () => O());
552
- return () => B.unsubscribe();
699
+ const V = e.dataContext.subscribeDynamicValue(o, () => B());
700
+ return () => V.unsubscribe();
553
701
  },
554
702
  [e, o, i]
555
- ), v = $(() => {
703
+ ), v = j(() => {
556
704
  if (!(!i || o === void 0))
557
705
  return e.dataContext.resolveDynamicValue(o);
558
- }, [e, o, i]), x = Un(p, v, v), I = $(
559
- (O) => {
706
+ }, [e, o, i]), x = qn(f, v, v), N = j(
707
+ (B) => {
560
708
  if (!s) return;
561
- const B = () => {
562
- g.current = !1, b.current.reportEvent({
563
- action: u,
709
+ const V = () => {
710
+ g.current = !1, S.current.reportEvent({
711
+ action: c,
564
712
  component: l,
565
713
  field: s,
566
- value: O
714
+ value: B
567
715
  });
568
716
  };
569
717
  if (!m) {
570
- B();
718
+ V();
571
719
  return;
572
720
  }
573
- S.current = O, g.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
574
- d.current = null, B();
575
- }, zr);
721
+ b.current = B, g.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
722
+ d.current = null, V();
723
+ }, Hr);
576
724
  },
577
- [s, u, l, m]
578
- ), _ = $(
579
- (O) => {
580
- !i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), O);
725
+ [s, c, l, m]
726
+ ), _ = j(
727
+ (B) => {
728
+ !i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), B);
581
729
  },
582
730
  [e, o, i]
583
- ), w = $(
584
- (O) => {
585
- _(O), I(O);
731
+ ), w = j(
732
+ (B) => {
733
+ _(B), N(B);
586
734
  },
587
- [_, I]
588
- ), C = $(() => {
589
- s && b.current.reportEvent({
735
+ [_, N]
736
+ ), C = j(() => {
737
+ s && S.current.reportEvent({
590
738
  action: "focus",
591
739
  component: l,
592
740
  field: s
@@ -602,59 +750,59 @@ function se(e, t = "value", n = {}) {
602
750
  reportFocus: C
603
751
  };
604
752
  }
605
- function fe(e) {
753
+ function ve(e) {
606
754
  if (typeof e == "string") return e || void 0;
607
755
  if (typeof e == "number") return String(e);
608
756
  }
609
- function Y(e) {
757
+ function Q(e) {
610
758
  return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
611
759
  }
612
- function ln(e, t) {
613
- return t ? Array.isArray(e) ? null : Y(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
760
+ function dn(e, t) {
761
+ return t ? Array.isArray(e) ? null : Q(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
614
762
  }
615
- function Ue(e) {
763
+ function Pe(e) {
616
764
  if (e == null) return;
617
765
  const t = typeof e == "number" ? e : Number(e);
618
766
  if (!(!Number.isFinite(t) || t < 1))
619
767
  return Math.floor(t);
620
768
  }
621
- function cn(e, t, n, r) {
769
+ function fn(e, t, n, r) {
622
770
  return e.includes(t) ? e.filter((i) => i !== t) : r === 1 ? [t] : r !== void 0 && e.length >= r ? null : [...e, t];
623
771
  }
624
- function un(e, t, n, r, o) {
772
+ function pn(e, t, n, r, o) {
625
773
  return n ? e.includes(t) || o === 1 ? !1 : o !== void 0 && e.length >= o : !0;
626
774
  }
627
- function mn(e, t) {
775
+ function hn(e, t) {
628
776
  return t === void 0 || e.length <= t ? null : e.slice(0, t);
629
777
  }
630
- const dn = ge(null);
631
- function st({
778
+ const gn = Se(null);
779
+ function lt({
632
780
  caseSearch: e,
633
781
  children: t
634
782
  }) {
635
- return /* @__PURE__ */ c(dn.Provider, { value: e ?? null, children: t });
783
+ return /* @__PURE__ */ u(gn.Provider, { value: e ?? null, children: t });
636
784
  }
637
- function qr() {
638
- return ye(dn);
785
+ function Jr() {
786
+ return ke(gn);
639
787
  }
640
- function Ye(e) {
788
+ function Xe(e) {
641
789
  return typeof e == "string" ? e : "";
642
790
  }
643
- function Qe(e) {
791
+ function Ze(e) {
644
792
  if (!e || typeof e != "object")
645
793
  return { flowUniqueIds: [], pageSize: 20 };
646
794
  const t = e, n = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), r = Number.isFinite(n) && n >= 1 && n <= 100 ? Math.floor(n) : 20, o = typeof t.agentKind == "string" && t.agentKind.trim() ? t.agentKind.trim() : void 0, i = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, s = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, a = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, l = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
647
795
  return { agentKind: o, agentUniqueId: i, flowType: s, category: a, flowUniqueIds: l, pageSize: r };
648
796
  }
649
- function Xe(e) {
797
+ function et(e) {
650
798
  var r;
651
799
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
652
800
  return t || n;
653
801
  }
654
- function Br(e) {
802
+ function Gr(e) {
655
803
  return JSON.stringify(e);
656
804
  }
657
- const Lr = {
805
+ const Wr = {
658
806
  name: "SkoponCaseSelect",
659
807
  schema: h.object({
660
808
  label: h.any().optional(),
@@ -667,13 +815,13 @@ const Lr = {
667
815
  value: h.any().optional()
668
816
  }).passthrough()
669
817
  };
670
- function Vr({
818
+ function Yr({
671
819
  item: e,
672
820
  selected: t,
673
821
  disabled: n,
674
822
  onToggle: r
675
823
  }) {
676
- return /* @__PURE__ */ N(
824
+ return /* @__PURE__ */ M(
677
825
  "button",
678
826
  {
679
827
  type: "button",
@@ -681,11 +829,11 @@ function Vr({
681
829
  disabled: n,
682
830
  onClick: r,
683
831
  children: [
684
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ c(Wt, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
685
- /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-body", children: [
686
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-name", children: e.name }),
687
- e.description ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
688
- /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-meta", children: [
832
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(Qt, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
833
+ /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-body", children: [
834
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name }),
835
+ e.description ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
836
+ /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-meta", children: [
689
837
  e.caseUniqueId,
690
838
  e.platform ? ` · ${e.platform}` : "",
691
839
  e.link ? ` · ${e.link}` : ""
@@ -695,121 +843,121 @@ function Vr({
695
843
  }
696
844
  );
697
845
  }
698
- function jr({ context: e }) {
699
- const { interactive: t } = ie(), n = qr(), { publishLiveOptions: r } = ht(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = se(e, "value", {
846
+ function Qr({ context: e }) {
847
+ const { interactive: t } = se(), n = Jr(), { publishLiveOptions: r } = gt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = ae(e, "value", {
700
848
  component: "SkoponCaseSelect",
701
849
  changeAction: "click"
702
- }), l = e.componentModel.properties, u = Ye(l.label), m = Ye(l.placeholder), d = Ye(l.help), S = l.enableRefresh !== !1, g = Ue(l.minCount), b = Ue(l.maxCount), y = j(() => Qe(l.caseFilter), [l.caseFilter]), k = Br(y), [f, p] = U(1), [v, x] = U(!1), [I, _] = U(""), [w, C] = U([]), [O, B] = U(0), [ne, K] = U(y.pageSize ?? 20), D = A(0), J = Y(o);
703
- z(() => {
704
- const T = mn(J, b);
850
+ }), l = e.componentModel.properties, c = Xe(l.label), m = Xe(l.placeholder), d = Xe(l.help), b = l.enableRefresh !== !1, g = Pe(l.minCount), S = Pe(l.maxCount), y = L(() => Ze(l.caseFilter), [l.caseFilter]), k = Gr(y), [p, f] = P(1), [v, x] = P(!1), [N, _] = P(""), [w, C] = P([]), [B, V] = P(0), [re, K] = P(y.pageSize ?? 20), $ = A(0), W = Q(o);
851
+ q(() => {
852
+ const T = hn(W, S);
705
853
  T !== null && s(T);
706
- }, [b, J, s]);
707
- const Z = j(() => n ? Xe(y) ? I || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, y, I, m]), ee = $(
854
+ }, [S, W, s]);
855
+ const ee = L(() => n ? et(y) ? N || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, y, N, m]), te = j(
708
856
  async (T) => {
709
- const V = Qe(JSON.parse(k)), P = ++D.current;
710
- if (!n || !Xe(V)) {
711
- C([]), B(0), _(""), x(!1);
857
+ const D = Ze(JSON.parse(k)), z = ++$.current;
858
+ if (!n || !et(D)) {
859
+ C([]), V(0), _(""), x(!1);
712
860
  return;
713
861
  }
714
862
  x(!0), _("");
715
863
  try {
716
- const M = await n({ filter: V, page: T });
717
- if (P !== D.current) return;
718
- C(M.list), B(M.total), p(M.page), K(M.pageSize), a && r(
864
+ const I = await n({ filter: D, page: T });
865
+ if (z !== $.current) return;
866
+ C(I.list), V(I.total), f(I.page), K(I.pageSize), a && r(
719
867
  a,
720
- M.list.map((W) => ({
721
- value: W.caseUniqueId,
722
- label: W.name || W.caseUniqueId
868
+ I.list.map((Y) => ({
869
+ value: Y.caseUniqueId,
870
+ label: Y.name || Y.caseUniqueId
723
871
  }))
724
872
  );
725
- } catch (M) {
726
- if (P !== D.current) return;
727
- C([]), B(0), _(M instanceof Error ? M.message : "加载案例列表失败");
873
+ } catch (I) {
874
+ if (z !== $.current) return;
875
+ C([]), V(0), _(I instanceof Error ? I.message : "加载案例列表失败");
728
876
  } finally {
729
- P === D.current && x(!1);
877
+ z === $.current && x(!1);
730
878
  }
731
879
  },
732
880
  [n, k, a, r]
733
881
  );
734
- z(() => {
735
- p(1), ee(1);
736
- }, [k, ee]);
737
- const F = (T) => {
882
+ q(() => {
883
+ f(1), te(1);
884
+ }, [k, te]);
885
+ const E = (T) => {
738
886
  if (!t) return;
739
- const V = cn(
740
- J,
887
+ const D = fn(
888
+ W,
741
889
  T,
742
890
  g,
743
- b
891
+ S
744
892
  );
745
- V !== null && i(V);
746
- }, L = () => {
747
- const T = Qe(JSON.parse(k)), V = ne || T.pageSize || 20, P = Math.max(1, Math.ceil(O / V)), M = f >= P ? 1 : f + 1;
748
- ee(M);
893
+ D !== null && i(D);
894
+ }, R = () => {
895
+ const T = Ze(JSON.parse(k)), D = re || T.pageSize || 20, z = Math.max(1, Math.ceil(B / D)), I = p >= z ? 1 : p + 1;
896
+ te(I);
749
897
  };
750
- return /* @__PURE__ */ N(
898
+ return /* @__PURE__ */ M(
751
899
  "div",
752
900
  {
753
901
  className: "form-block-preview skopon-resume-select",
754
902
  "data-skopon-field": a || void 0,
755
903
  children: [
756
- u ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: u }) : null,
757
- v && w.length === 0 ? /* @__PURE__ */ N("div", { className: "skopon-resume-select-status", children: [
758
- /* @__PURE__ */ c(mt, { size: "small" }),
904
+ c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
905
+ v && w.length === 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-status", children: [
906
+ /* @__PURE__ */ u(ft, { size: "small" }),
759
907
  " 加载案例…"
760
908
  ] }) : null,
761
- !v && w.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: Z }) : null,
762
- w.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ c(
763
- Vr,
909
+ !v && w.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: ee }) : null,
910
+ w.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ u(
911
+ Yr,
764
912
  {
765
913
  item: T,
766
- selected: J.includes(T.caseUniqueId),
767
- disabled: un(
768
- J,
914
+ selected: W.includes(T.caseUniqueId),
915
+ disabled: pn(
916
+ W,
769
917
  T.caseUniqueId,
770
918
  t,
771
919
  g,
772
- b
920
+ S
773
921
  ),
774
- onToggle: () => F(T.caseUniqueId)
922
+ onToggle: () => E(T.caseUniqueId)
775
923
  },
776
924
  T.caseUniqueId
777
925
  )) }) : null,
778
- S && n && Xe(y) ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ c(
779
- Pe,
926
+ b && n && et(y) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
927
+ Oe,
780
928
  {
781
929
  type: "default",
782
930
  size: "small",
783
- icon: /* @__PURE__ */ c(Jt, {}),
931
+ icon: /* @__PURE__ */ u(Yt, {}),
784
932
  loading: v,
785
933
  disabled: !t,
786
- onClick: L,
934
+ onClick: R,
787
935
  children: "换一批"
788
936
  }
789
937
  ) }) : null,
790
- d ? /* @__PURE__ */ c(te.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
938
+ d ? /* @__PURE__ */ u(ne.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
791
939
  ]
792
940
  }
793
941
  );
794
942
  }
795
- const $r = Q(
796
- Lr,
797
- jr
798
- ), Dr = {
943
+ const Xr = X(
944
+ Wr,
945
+ Qr
946
+ ), Zr = {
799
947
  type: "case_multiselect",
800
948
  componentName: "SkoponCaseSelect",
801
- toComponent: Nr,
802
- fromComponent: Ir,
803
- catalogComponents: [$r]
949
+ toComponent: zr,
950
+ fromComponent: Or,
951
+ catalogComponents: [Xr]
804
952
  };
805
- function Ht(e) {
953
+ function Kt(e) {
806
954
  if (e == null) return;
807
955
  const t = typeof e == "number" ? e : Number(e);
808
956
  if (!(!Number.isFinite(t) || t < 1))
809
957
  return Math.floor(t);
810
958
  }
811
- function Hr(e, t) {
812
- var s, a, l, u;
959
+ function eo(e, t) {
960
+ var s, a, l, c;
813
961
  const { id: n, label: r, path: o, withData: i } = t;
814
962
  return i({
815
963
  id: n,
@@ -822,14 +970,14 @@ function Hr(e, t) {
822
970
  names: ((s = e.resumeFilter) == null ? void 0 : s.names) ?? [],
823
971
  agentUniqueIds: ((a = e.resumeFilter) == null ? void 0 : a.agentUniqueIds) ?? [],
824
972
  resumeUniqueIds: ((l = e.resumeFilter) == null ? void 0 : l.resumeUniqueIds) ?? [],
825
- pageSize: ((u = e.resumeFilter) == null ? void 0 : u.pageSize) ?? 20
973
+ pageSize: ((c = e.resumeFilter) == null ? void 0 : c.pageSize) ?? 20
826
974
  },
827
975
  ...e.resumeMinCount !== void 0 ? { minCount: e.resumeMinCount } : {},
828
976
  ...e.resumeMaxCount !== void 0 ? { maxCount: e.resumeMaxCount } : {},
829
977
  value: { path: o }
830
978
  });
831
979
  }
832
- function Kr(e, t, n) {
980
+ function to(e, t, n) {
833
981
  const r = n.nameFromValue(e.value), o = {
834
982
  ...t("resume_multiselect"),
835
983
  name: r,
@@ -838,42 +986,42 @@ function Kr(e, t, n) {
838
986
  i && (o.placeholder = i);
839
987
  const s = n.asLiteral(e.help);
840
988
  if (s && (o.help = s), e.resumeFilter && typeof e.resumeFilter == "object") {
841
- const u = e.resumeFilter;
989
+ const c = e.resumeFilter;
842
990
  o.resumeFilter = {
843
- names: Array.isArray(u.names) ? u.names.map(String) : [],
844
- agentUniqueIds: Array.isArray(u.agentUniqueIds) ? u.agentUniqueIds.map(String) : [],
845
- resumeUniqueIds: Array.isArray(u.resumeUniqueIds) ? u.resumeUniqueIds.map(String) : [],
846
- pageSize: typeof u.pageSize == "number" ? u.pageSize : 20
991
+ names: Array.isArray(c.names) ? c.names.map(String) : [],
992
+ agentUniqueIds: Array.isArray(c.agentUniqueIds) ? c.agentUniqueIds.map(String) : [],
993
+ resumeUniqueIds: Array.isArray(c.resumeUniqueIds) ? c.resumeUniqueIds.map(String) : [],
994
+ pageSize: typeof c.pageSize == "number" ? c.pageSize : 20
847
995
  };
848
996
  }
849
- const a = Ht(e.minCount);
997
+ const a = Kt(e.minCount);
850
998
  a !== void 0 && (o.resumeMinCount = a);
851
- const l = Ht(e.maxCount);
999
+ const l = Kt(e.maxCount);
852
1000
  return l !== void 0 && (o.resumeMaxCount = l), o;
853
1001
  }
854
- const pn = ge(null);
855
- function at({
1002
+ const yn = Se(null);
1003
+ function ct({
856
1004
  resumeSearch: e,
857
1005
  children: t
858
1006
  }) {
859
- return /* @__PURE__ */ c(pn.Provider, { value: e ?? null, children: t });
1007
+ return /* @__PURE__ */ u(yn.Provider, { value: e ?? null, children: t });
860
1008
  }
861
- function Gr() {
862
- return ye(pn);
1009
+ function no() {
1010
+ return ke(yn);
863
1011
  }
864
- function Ze(e) {
1012
+ function tt(e) {
865
1013
  return typeof e == "string" ? e : "";
866
1014
  }
867
- function et(e) {
1015
+ function nt(e) {
868
1016
  if (!e || typeof e != "object")
869
1017
  return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
870
1018
  const t = e, n = Array.isArray(t.names) ? t.names.map(String).filter(Boolean) : [], r = Array.isArray(t.agentUniqueIds) ? t.agentUniqueIds.map(String).filter(Boolean) : [], o = Array.isArray(t.resumeUniqueIds) ? t.resumeUniqueIds.map(String).filter(Boolean) : [], i = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), s = Number.isFinite(i) && i >= 1 && i <= 100 ? Math.floor(i) : 20;
871
1019
  return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: s };
872
1020
  }
873
- function Jr(e) {
1021
+ function ro(e) {
874
1022
  return JSON.stringify(e);
875
1023
  }
876
- const Wr = {
1024
+ const oo = {
877
1025
  name: "SkoponResumeSelect",
878
1026
  schema: h.object({
879
1027
  label: h.any().optional(),
@@ -885,40 +1033,40 @@ const Wr = {
885
1033
  maxCount: h.any().optional(),
886
1034
  value: h.any().optional()
887
1035
  }).passthrough()
888
- }, Yr = 3, Qr = 2;
889
- function tt(e, t) {
890
- const n = (t ?? []).filter(Boolean), r = n.slice(0, Yr), o = n.length - r.length;
891
- return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-tags", children: [
892
- /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-label", children: e }),
893
- n.length > 0 ? /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-tags-list", children: [
894
- r.map((i) => /* @__PURE__ */ c(pe, { className: "skopon-resume-select-card-tag", children: i }, i)),
895
- o > 0 ? /* @__PURE__ */ N(pe, { className: "skopon-resume-select-card-tag", children: [
1036
+ }, io = 3, so = 2;
1037
+ function rt(e, t) {
1038
+ const n = (t ?? []).filter(Boolean), r = n.slice(0, io), o = n.length - r.length;
1039
+ return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-tags", children: [
1040
+ /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: e }),
1041
+ n.length > 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-tags-list", children: [
1042
+ r.map((i) => /* @__PURE__ */ u(ge, { className: "skopon-resume-select-card-tag", children: i }, i)),
1043
+ o > 0 ? /* @__PURE__ */ M(ge, { className: "skopon-resume-select-card-tag", children: [
896
1044
  "+",
897
1045
  o
898
1046
  ] }) : null
899
- ] }) : /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
1047
+ ] }) : /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
900
1048
  ] });
901
1049
  }
902
- function Xr(e) {
903
- return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-field", children: [
904
- /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
905
- /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
1050
+ function ao(e) {
1051
+ return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-field", children: [
1052
+ /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
1053
+ /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
906
1054
  ] });
907
1055
  }
908
- function Zr({ work: e }) {
909
- return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-work", children: [
910
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ c("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ c(Hn, { className: "skopon-resume-select-card-work-placeholder" }) }),
911
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
1056
+ function lo({ work: e }) {
1057
+ return /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-work", children: [
1058
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ u(Yn, { className: "skopon-resume-select-card-work-placeholder" }) }),
1059
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
912
1060
  ] });
913
1061
  }
914
- function eo({
1062
+ function co({
915
1063
  item: e,
916
1064
  selected: t,
917
1065
  disabled: n,
918
1066
  onToggle: r
919
1067
  }) {
920
- const o = (e.works ?? []).slice(0, Qr);
921
- return /* @__PURE__ */ N(
1068
+ const o = (e.works ?? []).slice(0, so);
1069
+ return /* @__PURE__ */ M(
922
1070
  "button",
923
1071
  {
924
1072
  type: "button",
@@ -926,185 +1074,185 @@ function eo({
926
1074
  disabled: n,
927
1075
  onClick: r,
928
1076
  children: [
929
- /* @__PURE__ */ c(
930
- zn,
1077
+ /* @__PURE__ */ u(
1078
+ Ln,
931
1079
  {
932
1080
  size: 48,
933
1081
  src: e.avatarUrl || void 0,
934
- icon: e.avatarUrl ? void 0 : /* @__PURE__ */ c(Dn, {}),
1082
+ icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(Wn, {}),
935
1083
  className: "skopon-resume-select-card-avatar"
936
1084
  }
937
1085
  ),
938
- /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
939
- /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-body", children: [
940
- Xr(e.satisfaction),
941
- tt("性格", e.personality),
942
- tt("专长", e.specialties),
943
- tt("擅长领域", e.traits),
944
- /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-works", children: [
945
- /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
946
- o.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ c(Zr, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
1086
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
1087
+ /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-body", children: [
1088
+ ao(e.satisfaction),
1089
+ rt("性格", e.personality),
1090
+ rt("专长", e.specialties),
1091
+ rt("擅长领域", e.traits),
1092
+ /* @__PURE__ */ M("div", { className: "skopon-resume-select-card-works", children: [
1093
+ /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
1094
+ o.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, s) => /* @__PURE__ */ u(lo, { work: i }, `${i.title}-${s}`)) }) : /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
947
1095
  ] })
948
1096
  ] })
949
1097
  ]
950
1098
  }
951
1099
  );
952
1100
  }
953
- function to({ context: e }) {
954
- const { interactive: t } = ie(), n = Gr(), { publishLiveOptions: r } = ht(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = se(e, "value", {
1101
+ function uo({ context: e }) {
1102
+ const { interactive: t } = se(), n = no(), { publishLiveOptions: r } = gt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = ae(e, "value", {
955
1103
  component: "SkoponResumeSelect",
956
1104
  changeAction: "click"
957
- }), l = e.componentModel.properties, u = Ze(l.label), m = Ze(l.placeholder), d = Ze(l.help), S = l.enableRefresh !== !1, g = Ue(l.minCount), b = Ue(l.maxCount), y = j(() => et(l.resumeFilter), [l.resumeFilter]), k = Jr(y), [f, p] = U(1), [v, x] = U(!1), [I, _] = U(""), [w, C] = U([]), [O, B] = U(0), [ne, K] = U(y.pageSize ?? 20), D = A(0), J = Y(o);
958
- z(() => {
959
- const T = mn(J, b);
1105
+ }), l = e.componentModel.properties, c = tt(l.label), m = tt(l.placeholder), d = tt(l.help), b = l.enableRefresh !== !1, g = Pe(l.minCount), S = Pe(l.maxCount), y = L(() => nt(l.resumeFilter), [l.resumeFilter]), k = ro(y), [p, f] = P(1), [v, x] = P(!1), [N, _] = P(""), [w, C] = P([]), [B, V] = P(0), [re, K] = P(y.pageSize ?? 20), $ = A(0), W = Q(o);
1106
+ q(() => {
1107
+ const T = hn(W, S);
960
1108
  T !== null && s(T);
961
- }, [b, J, s]);
962
- const Z = $(
1109
+ }, [S, W, s]);
1110
+ const ee = j(
963
1111
  async (T) => {
964
- const V = et(JSON.parse(k)), P = ++D.current;
1112
+ const D = nt(JSON.parse(k)), z = ++$.current;
965
1113
  if (!n) {
966
- C([]), B(0), _("未配置简历搜索服务"), x(!1);
1114
+ C([]), V(0), _("未配置简历搜索服务"), x(!1);
967
1115
  return;
968
1116
  }
969
1117
  x(!0), _("");
970
1118
  try {
971
- const M = await n({ filter: V, page: T });
972
- if (P !== D.current) return;
973
- C(M.list), B(M.total), p(M.page), K(M.pageSize), a && r(
1119
+ const I = await n({ filter: D, page: T });
1120
+ if (z !== $.current) return;
1121
+ C(I.list), V(I.total), f(I.page), K(I.pageSize), a && r(
974
1122
  a,
975
- M.list.map((W) => ({
976
- value: W.resumeUniqueId,
977
- label: W.name || W.resumeUniqueId
1123
+ I.list.map((Y) => ({
1124
+ value: Y.resumeUniqueId,
1125
+ label: Y.name || Y.resumeUniqueId
978
1126
  }))
979
1127
  );
980
- } catch (M) {
981
- if (P !== D.current) return;
982
- C([]), B(0), _(M instanceof Error ? M.message : "加载简历列表失败");
1128
+ } catch (I) {
1129
+ if (z !== $.current) return;
1130
+ C([]), V(0), _(I instanceof Error ? I.message : "加载简历列表失败");
983
1131
  } finally {
984
- P === D.current && x(!1);
1132
+ z === $.current && x(!1);
985
1133
  }
986
1134
  },
987
1135
  [n, k, a, r]
988
1136
  );
989
- z(() => {
990
- p(1), Z(1);
991
- }, [k, Z]);
992
- const ee = (T) => {
1137
+ q(() => {
1138
+ f(1), ee(1);
1139
+ }, [k, ee]);
1140
+ const te = (T) => {
993
1141
  if (!t) return;
994
- const V = cn(
995
- J,
1142
+ const D = fn(
1143
+ W,
996
1144
  T,
997
1145
  g,
998
- b
1146
+ S
999
1147
  );
1000
- V !== null && i(V);
1001
- }, F = () => {
1002
- const T = et(JSON.parse(k)), V = ne || T.pageSize || 20, P = Math.max(1, Math.ceil(O / V)), M = f >= P ? 1 : f + 1;
1003
- Z(M);
1004
- }, L = m || "暂无匹配的简历";
1005
- return /* @__PURE__ */ N(
1148
+ D !== null && i(D);
1149
+ }, E = () => {
1150
+ const T = nt(JSON.parse(k)), D = re || T.pageSize || 20, z = Math.max(1, Math.ceil(B / D)), I = p >= z ? 1 : p + 1;
1151
+ ee(I);
1152
+ }, R = m || "暂无匹配的简历";
1153
+ return /* @__PURE__ */ M(
1006
1154
  "div",
1007
1155
  {
1008
1156
  className: "form-block-preview skopon-resume-select",
1009
1157
  "data-skopon-field": a || void 0,
1010
1158
  children: [
1011
- u ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: u }) : null,
1012
- v && w.length === 0 ? /* @__PURE__ */ N("div", { className: "skopon-resume-select-status", children: [
1013
- /* @__PURE__ */ c(mt, { size: "small" }),
1159
+ c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
1160
+ v && w.length === 0 ? /* @__PURE__ */ M("div", { className: "skopon-resume-select-status", children: [
1161
+ /* @__PURE__ */ u(ft, { size: "small" }),
1014
1162
  " 加载简历…"
1015
1163
  ] }) : null,
1016
- !v && I ? /* @__PURE__ */ c(te.Text, { type: "danger", className: "skopon-resume-select-status", children: I }) : null,
1017
- !v && !I && w.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: L }) : null,
1018
- w.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ c(
1019
- eo,
1164
+ !v && N ? /* @__PURE__ */ u(ne.Text, { type: "danger", className: "skopon-resume-select-status", children: N }) : null,
1165
+ !v && !N && w.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: R }) : null,
1166
+ w.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: w.map((T) => /* @__PURE__ */ u(
1167
+ co,
1020
1168
  {
1021
1169
  item: T,
1022
- selected: J.includes(T.resumeUniqueId),
1023
- disabled: un(
1024
- J,
1170
+ selected: W.includes(T.resumeUniqueId),
1171
+ disabled: pn(
1172
+ W,
1025
1173
  T.resumeUniqueId,
1026
1174
  t,
1027
1175
  g,
1028
- b
1176
+ S
1029
1177
  ),
1030
- onToggle: () => ee(T.resumeUniqueId)
1178
+ onToggle: () => te(T.resumeUniqueId)
1031
1179
  },
1032
1180
  T.resumeUniqueId
1033
1181
  )) }) : null,
1034
- S && n ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ c(
1035
- Pe,
1182
+ b && n ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
1183
+ Oe,
1036
1184
  {
1037
1185
  type: "default",
1038
1186
  size: "small",
1039
- icon: /* @__PURE__ */ c(Jt, {}),
1187
+ icon: /* @__PURE__ */ u(Yt, {}),
1040
1188
  loading: v,
1041
1189
  disabled: !t,
1042
- onClick: F,
1190
+ onClick: E,
1043
1191
  children: "换一批"
1044
1192
  }
1045
1193
  ) }) : null,
1046
- d ? /* @__PURE__ */ c(te.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
1194
+ d ? /* @__PURE__ */ u(ne.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
1047
1195
  ]
1048
1196
  }
1049
1197
  );
1050
1198
  }
1051
- const no = Q(
1052
- Wr,
1053
- to
1054
- ), ro = {
1199
+ const mo = X(
1200
+ oo,
1201
+ uo
1202
+ ), fo = {
1055
1203
  type: "resume_multiselect",
1056
1204
  componentName: "SkoponResumeSelect",
1057
- toComponent: Hr,
1058
- fromComponent: Kr,
1059
- catalogComponents: [no]
1060
- }, qe = [ro, Dr], oo = new Map(
1061
- qe.map((e) => [e.type, e])
1062
- ), io = new Map(
1063
- qe.map((e) => [e.componentName, e])
1205
+ toComponent: eo,
1206
+ fromComponent: to,
1207
+ catalogComponents: [mo]
1208
+ }, Be = [fo, Zr], po = new Map(
1209
+ Be.map((e) => [e.type, e])
1210
+ ), ho = new Map(
1211
+ Be.map((e) => [e.componentName, e])
1064
1212
  );
1065
- function so(e) {
1066
- return oo.get(e);
1213
+ function go(e) {
1214
+ return po.get(e);
1067
1215
  }
1068
- function ao(e) {
1069
- return io.get(e);
1216
+ function yo(e) {
1217
+ return ho.get(e);
1070
1218
  }
1071
- function lo() {
1072
- return qe.flatMap((e) => e.catalogComponents);
1219
+ function vo() {
1220
+ return Be.flatMap((e) => e.catalogComponents);
1073
1221
  }
1074
- function co() {
1075
- return qe.map((e) => e.componentName);
1222
+ function bo() {
1223
+ return Be.map((e) => e.componentName);
1076
1224
  }
1077
- const we = "root", lt = "__title__", ct = "__desc__", gt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
1078
- function uo(e) {
1225
+ const we = "root", ut = "__title__", mt = "__desc__", yt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
1226
+ function So(e) {
1079
1227
  return `/${e}`;
1080
1228
  }
1081
- function Kt(e) {
1229
+ function Jt(e) {
1082
1230
  return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
1083
1231
  }
1084
1232
  function H(e) {
1085
1233
  if (typeof e == "string") return e;
1086
1234
  }
1087
- function mo(e) {
1088
- const t = e.id || ve("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
1235
+ function ko(e) {
1236
+ const t = e.id || le("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
1089
1237
  return {
1090
1238
  id: t,
1091
1239
  component: "SkoponMedia",
1092
1240
  mediaType: n,
1093
- urls: gr(e),
1094
- mediaSize: be(e.mediaSize),
1241
+ urls: Cr(e),
1242
+ mediaSize: _e(e.mediaSize),
1095
1243
  label: e.label ?? "",
1096
1244
  help: e.help ?? "",
1097
1245
  placeholder: e.placeholder ?? ""
1098
1246
  };
1099
1247
  }
1100
- function po(e) {
1248
+ function Co(e) {
1101
1249
  if (Array.isArray(e.urls))
1102
1250
  return e.urls.map((n) => String(n).trim()).filter(Boolean);
1103
1251
  const t = H(e.url);
1104
1252
  return t != null && t.trim() ? [t.trim()] : [];
1105
1253
  }
1106
- function Ie(e, t, n) {
1107
- const r = typeof e.id == "string" ? e.id : ve("block-"), o = po(e), i = H(e.label) ?? H(e.description) ?? n, s = H(e.help), a = H(e.placeholder), l = be(e.mediaSize);
1254
+ function Fe(e, t, n) {
1255
+ const r = typeof e.id == "string" ? e.id : le("block-"), o = Co(e), i = H(e.label) ?? H(e.description) ?? n, s = H(e.help), a = H(e.placeholder), l = _e(e.mediaSize);
1108
1256
  return {
1109
1257
  id: r,
1110
1258
  type: t,
@@ -1115,10 +1263,10 @@ function Ie(e, t, n) {
1115
1263
  mediaUrls: o.length > 0 ? o : [""]
1116
1264
  };
1117
1265
  }
1118
- function fo(e) {
1266
+ function Gt(e) {
1119
1267
  switch (e.type) {
1120
1268
  case "toggle":
1121
- return ke(e.defaultValue);
1269
+ return Te(e.defaultValue);
1122
1270
  case "multiselect":
1123
1271
  case "checkbox":
1124
1272
  case "resume_multiselect":
@@ -1132,9 +1280,9 @@ function fo(e) {
1132
1280
  return typeof e.defaultValue == "string" ? e.defaultValue : "";
1133
1281
  }
1134
1282
  }
1135
- function ho(e) {
1136
- var u;
1137
- const t = e.id || ve("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? uo(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), s = (m) => r ? { node: m, dataKey: r, dataValue: fo(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = so(e.type);
1283
+ function Ao(e) {
1284
+ var c;
1285
+ const t = e.id || le("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? So(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), s = (m) => r ? { node: m, dataKey: r, dataValue: Gt(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = go(e.type);
1138
1286
  if (l)
1139
1287
  return l.toComponent(e, a);
1140
1288
  switch (e.type) {
@@ -1143,6 +1291,14 @@ function ho(e) {
1143
1291
  case "paragraph":
1144
1292
  return { node: { id: t, component: "Text", text: n, variant: "body" } };
1145
1293
  case "text":
1294
+ return e.hidden ? r ? { node: null, dataKey: r, dataValue: Gt(e) } : { node: null } : s({
1295
+ id: t,
1296
+ component: "TextField",
1297
+ label: n,
1298
+ variant: "shortText",
1299
+ ...e.placeholder ? { placeholder: e.placeholder } : {},
1300
+ value: { path: o }
1301
+ });
1146
1302
  case "tel":
1147
1303
  case "url":
1148
1304
  return s({
@@ -1159,7 +1315,7 @@ function ho(e) {
1159
1315
  component: "TextField",
1160
1316
  label: n,
1161
1317
  variant: "shortText",
1162
- validationRegexp: gt,
1318
+ validationRegexp: yt,
1163
1319
  ...e.placeholder ? { placeholder: e.placeholder } : {},
1164
1320
  value: { path: o }
1165
1321
  });
@@ -1245,7 +1401,7 @@ function ho(e) {
1245
1401
  case "image":
1246
1402
  case "video":
1247
1403
  case "audio":
1248
- return { node: mo(e) };
1404
+ return { node: ko(e) };
1249
1405
  case "file":
1250
1406
  return s({
1251
1407
  id: t,
@@ -1262,31 +1418,31 @@ function ho(e) {
1262
1418
  return { node: null };
1263
1419
  }
1264
1420
  }
1265
- function ut(e) {
1421
+ function dt(e) {
1266
1422
  if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
1267
1423
  const t = e.components.find((r) => r.id === we);
1268
1424
  if (!t) return e.components.length === 0;
1269
1425
  const n = t.children;
1270
1426
  return !Array.isArray(n) || n.length === 0;
1271
1427
  }
1272
- function fn(e, t) {
1428
+ function vn(e, t) {
1273
1429
  const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, s = (e.title ?? "").trim(), a = (e.description ?? "").trim();
1274
- i && s && (n.push({ id: lt, component: "Text", text: s, variant: "h2" }), r.push(lt)), i && a && (n.push({ id: ct, component: "Text", text: a, variant: "body" }), r.push(ct));
1430
+ i && s && (n.push({ id: ut, component: "Text", text: s, variant: "h2" }), r.push(ut)), i && a && (n.push({ id: mt, component: "Text", text: a, variant: "body" }), r.push(mt));
1275
1431
  for (const m of e.blocks ?? []) {
1276
- const { node: d, dataKey: S, dataValue: g } = ho(m);
1277
- d && (n.push(d), r.push(d.id), S && (o[S] = g));
1432
+ const { node: d, dataKey: b, dataValue: g } = Ao(m);
1433
+ b && (o[b] = g), d && (n.push(d), r.push(d.id));
1278
1434
  }
1279
1435
  n.unshift({ id: we, component: "Column", children: r });
1280
- const l = { root: we, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
1281
- return u !== void 0 && (l.surfaceProperties = { styleId: u ?? null }), l;
1436
+ const l = { root: we, components: n, dataModel: o }, c = t == null ? void 0 : t.styleId;
1437
+ return c !== void 0 && (l.surfaceProperties = { styleId: c ?? null }), l;
1282
1438
  }
1283
- function go(e) {
1439
+ function _o(e) {
1284
1440
  const t = /* @__PURE__ */ new Map();
1285
1441
  for (const n of e.components ?? [])
1286
1442
  n && typeof n.id == "string" && t.set(n.id, n);
1287
1443
  return t;
1288
1444
  }
1289
- function nt(e) {
1445
+ function ot(e) {
1290
1446
  const t = e.options;
1291
1447
  return Array.isArray(t) ? t.map((n) => {
1292
1448
  if (!n || typeof n != "object") return null;
@@ -1297,10 +1453,10 @@ function nt(e) {
1297
1453
  };
1298
1454
  }).filter((n) => !!n) : [];
1299
1455
  }
1300
- function yo(e) {
1301
- const t = typeof e.id == "string" ? e.id : ve("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o = Kt(e.value), i = (a) => ({ id: t, type: a, label: r }), s = ao(n);
1456
+ function To(e) {
1457
+ const t = typeof e.id == "string" ? e.id : le("block-"), n = String(e.component ?? ""), r = H(e.label) ?? H(e.text) ?? "", o = Jt(e.value), i = (a) => ({ id: t, type: a, label: r }), s = yo(n);
1302
1458
  if (s)
1303
- return s.fromComponent(e, i, { asLiteral: H, nameFromValue: Kt });
1459
+ return s.fromComponent(e, i, { asLiteral: H, nameFromValue: Jt });
1304
1460
  switch (n) {
1305
1461
  case "Text": {
1306
1462
  const a = String(e.variant ?? "body"), l = /^h[1-6]$/i.test(a) || a === "title" || a === "subtitle";
@@ -1309,19 +1465,19 @@ function yo(e) {
1309
1465
  case "TextField": {
1310
1466
  const a = String(e.variant ?? "shortText");
1311
1467
  let l = "text";
1312
- a === "longText" ? l = "textarea" : a === "number" ? l = "number" : H(e.validationRegexp) === gt && (l = "email");
1313
- const u = { ...i(l), name: o }, m = H(e.placeholder);
1314
- return m && (u.placeholder = m), u;
1468
+ a === "longText" ? l = "textarea" : a === "number" ? l = "number" : H(e.validationRegexp) === yt && (l = "email");
1469
+ const c = { ...i(l), name: o }, m = H(e.placeholder);
1470
+ return m && (c.placeholder = m), c;
1315
1471
  }
1316
1472
  case "CheckBox":
1317
1473
  return { ...i("toggle"), name: o };
1318
1474
  case "SkoponSelect": {
1319
- const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", u = {
1475
+ const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", c = {
1320
1476
  ...i(l),
1321
1477
  name: o,
1322
- options: nt(e)
1478
+ options: ot(e)
1323
1479
  }, m = H(e.placeholder);
1324
- return m && (u.placeholder = m), u;
1480
+ return m && (c.placeholder = m), c;
1325
1481
  }
1326
1482
  case "ChoicePicker": {
1327
1483
  const a = H(e.skoponPickerType);
@@ -1329,12 +1485,12 @@ function yo(e) {
1329
1485
  const m = {
1330
1486
  ...i(a),
1331
1487
  name: o,
1332
- options: nt(e)
1488
+ options: ot(e)
1333
1489
  }, d = H(e.placeholder);
1334
1490
  return d && (m.placeholder = d), m;
1335
1491
  }
1336
- const u = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
1337
- return { ...i(u), name: o, options: nt(e) };
1492
+ const c = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
1493
+ return { ...i(c), name: o, options: ot(e) };
1338
1494
  }
1339
1495
  case "DateTimeInput": {
1340
1496
  const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d = H(e.placeholder);
@@ -1342,23 +1498,23 @@ function yo(e) {
1342
1498
  }
1343
1499
  case "SkoponMedia": {
1344
1500
  const a = String(e.mediaType ?? "image");
1345
- return Ie(e, a === "video" ? "video" : a === "audio" ? "audio" : "image", r);
1501
+ return Fe(e, a === "video" ? "video" : a === "audio" ? "audio" : "image", r);
1346
1502
  }
1347
1503
  case "Image":
1348
- return Ie(e, "image", r);
1504
+ return Fe(e, "image", r);
1349
1505
  case "Video":
1350
- return Ie(e, "video", r);
1506
+ return Fe(e, "video", r);
1351
1507
  case "AudioPlayer":
1352
- return Ie(e, "audio", r);
1508
+ return Fe(e, "audio", r);
1353
1509
  case "FileUpload": {
1354
1510
  const a = H(e.accept) ?? "", l = { ...i("file"), name: o };
1355
- return a && (l.fileAcceptExtensions = a.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (l.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (l.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (l.fileMinCount = e.minCount), typeof e.maxCount == "number" && (l.fileMaxCount = e.maxCount), l;
1511
+ return a && (l.fileAcceptExtensions = a.split(",").map((c) => c.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (l.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (l.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (l.fileMinCount = e.minCount), typeof e.maxCount == "number" && (l.fileMaxCount = e.maxCount), l;
1356
1512
  }
1357
1513
  default:
1358
1514
  return null;
1359
1515
  }
1360
1516
  }
1361
- function hn(e, t, n, r) {
1517
+ function bn(e, t, n, r) {
1362
1518
  if (n.has(e)) return;
1363
1519
  n.add(e);
1364
1520
  const o = t.get(e);
@@ -1366,47 +1522,46 @@ function hn(e, t, n, r) {
1366
1522
  const i = String(o.component ?? "");
1367
1523
  if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
1368
1524
  for (const s of o.children)
1369
- typeof s == "string" && hn(s, t, n, r);
1525
+ typeof s == "string" && bn(s, t, n, r);
1370
1526
  return;
1371
1527
  }
1372
1528
  r.push(o);
1373
1529
  }
1374
- function vo(e, t) {
1530
+ function xo(e, t) {
1375
1531
  return t ? e.map((n) => {
1376
1532
  var i;
1377
1533
  const r = (i = n.name) == null ? void 0 : i.trim();
1378
1534
  if (!r || !(r in t)) return n;
1379
1535
  const o = t[r];
1380
- return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: ke(o) } : { ...n, defaultValue: o };
1536
+ return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: Te(o) } : { ...n, defaultValue: o };
1381
1537
  }) : e;
1382
1538
  }
1383
- function So(e) {
1539
+ function Mo(e) {
1384
1540
  if (!e || !Array.isArray(e.components))
1385
- return Re({ title: "", description: "", blocks: [], jsonSchema: {} });
1386
- const t = go(e), n = [];
1387
- hn(e.root ?? we, t, /* @__PURE__ */ new Set(), n);
1541
+ return ye({ title: "", description: "", blocks: [] });
1542
+ const t = _o(e), n = [];
1543
+ bn(e.root ?? we, t, /* @__PURE__ */ new Set(), n);
1388
1544
  let r = "", o = "";
1389
1545
  const i = [];
1390
1546
  for (const s of n) {
1391
- if (s.id === lt) {
1547
+ if (s.id === ut) {
1392
1548
  r = H(s.text) ?? r;
1393
1549
  continue;
1394
1550
  }
1395
- if (s.id === ct) {
1551
+ if (s.id === mt) {
1396
1552
  o = H(s.text) ?? o;
1397
1553
  continue;
1398
1554
  }
1399
- const a = yo(s);
1555
+ const a = To(s);
1400
1556
  a && i.push(a);
1401
1557
  }
1402
- return Re({
1558
+ return ye({
1403
1559
  title: r,
1404
1560
  description: o,
1405
- blocks: vo(i, e.dataModel),
1406
- jsonSchema: {}
1561
+ blocks: xo(i, e.dataModel)
1407
1562
  });
1408
1563
  }
1409
- function bo(e, t) {
1564
+ function No(e, t) {
1410
1565
  const { surfaceId: n, catalogId: r } = t, o = [
1411
1566
  { version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
1412
1567
  {
@@ -1419,25 +1574,25 @@ function bo(e, t) {
1419
1574
  updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
1420
1575
  }), o;
1421
1576
  }
1422
- function gn(e) {
1577
+ function Sn(e) {
1423
1578
  return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
1424
1579
  }
1425
- function ko(e, t) {
1580
+ function Io(e, t) {
1426
1581
  if (!e || typeof e != "object") return null;
1427
- const n = e, r = gn(n.a2ui) ? n.a2ui : void 0;
1428
- if (r && !ut(r)) return r;
1582
+ const n = e, r = Sn(n.a2ui) ? n.a2ui : void 0;
1583
+ if (r && !dt(r)) return r;
1429
1584
  const o = Array.isArray(n.blocks) ? n.blocks : [];
1430
1585
  if (o.length === 0) return null;
1431
- const i = Oe({
1586
+ const i = qe({
1432
1587
  title: typeof n.title == "string" ? n.title : "",
1433
1588
  description: typeof n.description == "string" ? n.description : "",
1434
1589
  blocks: o,
1435
- jsonSchema: ft(n.jsonSchema ?? n.json_schema)
1436
- }), s = fn(i, t);
1437
- return ut(s) ? null : s;
1590
+ jsonSchema: on(n.jsonSchema ?? n.json_schema)
1591
+ }), s = vn(i, t);
1592
+ return dt(s) ? null : s;
1438
1593
  }
1439
- function Co(e, t, n) {
1440
- return fn(
1594
+ function Fo(e, t, n) {
1595
+ return vn(
1441
1596
  {
1442
1597
  title: e.title,
1443
1598
  description: e.description,
@@ -1446,18 +1601,18 @@ function Co(e, t, n) {
1446
1601
  n
1447
1602
  );
1448
1603
  }
1449
- function Ao(e) {
1604
+ function Eo(e) {
1450
1605
  if (!e || typeof e != "object" || Array.isArray(e))
1451
1606
  return;
1452
1607
  const t = e;
1453
- return !(Array.isArray(t.blocks) && t.blocks.length > 0) && gn(t.a2ui) ? So(t.a2ui) : Oe({
1608
+ return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Sn(t.a2ui) ? Mo(t.a2ui) : qe({
1454
1609
  title: typeof t.title == "string" ? t.title : "",
1455
1610
  description: typeof t.description == "string" ? t.description : "",
1456
1611
  blocks: Array.isArray(t.blocks) ? t.blocks : [],
1457
- jsonSchema: ft(t.jsonSchema ?? t.json_schema)
1612
+ jsonSchema: on(t.jsonSchema ?? t.json_schema)
1458
1613
  });
1459
1614
  }
1460
- function _o(e, t, n) {
1615
+ function Uo(e, t, n) {
1461
1616
  const r = e.model.surfacesMap.get(t);
1462
1617
  if (!r) return {};
1463
1618
  const o = {};
@@ -1467,16 +1622,18 @@ function _o(e, t, n) {
1467
1622
  }
1468
1623
  return o;
1469
1624
  }
1470
- const To = /* @__PURE__ */ new Set(["type", "name", "id"]);
1471
- function yt(e) {
1472
- return Oe({
1625
+ const Ro = /* @__PURE__ */ new Set(["type", "name", "id"]);
1626
+ function vt(e) {
1627
+ return e.type === "text" && e.hidden === !0;
1628
+ }
1629
+ function bt(e) {
1630
+ return qe({
1473
1631
  title: "",
1474
1632
  description: "",
1475
- blocks: [e],
1476
- jsonSchema: {}
1633
+ blocks: [e]
1477
1634
  }).blocks[0];
1478
1635
  }
1479
- function xo(e, t) {
1636
+ function Po(e, t) {
1480
1637
  var o, i;
1481
1638
  const n = /* @__PURE__ */ new Map();
1482
1639
  for (const s of t) {
@@ -1485,19 +1642,19 @@ function xo(e, t) {
1485
1642
  }
1486
1643
  const r = [];
1487
1644
  for (const s of e.blocks) {
1488
- if (ze(s.type)) {
1489
- r.push(yt(s));
1645
+ if (Ce(s.type)) {
1646
+ r.push(bt(s));
1490
1647
  continue;
1491
1648
  }
1492
- if (!ae(s.type)) continue;
1649
+ if (!Z(s.type)) continue;
1493
1650
  const a = (i = s.name) == null ? void 0 : i.trim();
1494
1651
  if (!a) continue;
1495
1652
  const l = n.get(a);
1496
- l && r.push(l);
1653
+ l && (vt(l) || r.push(l));
1497
1654
  }
1498
1655
  return r;
1499
1656
  }
1500
- function No(e, t, n) {
1657
+ function wo(e, t, n) {
1501
1658
  const r = e.rawBlocks;
1502
1659
  if (!(r != null && r.length)) return n;
1503
1660
  for (const o of r) {
@@ -1506,27 +1663,26 @@ function No(e, t, n) {
1506
1663
  }
1507
1664
  return n;
1508
1665
  }
1509
- function Io(e, t) {
1666
+ function zo(e, t) {
1510
1667
  var r;
1511
1668
  const n = { ...e };
1512
1669
  for (const o of Object.keys(t)) {
1513
- if (To.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
1670
+ if (Ro.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
1514
1671
  const i = t[o];
1515
1672
  i !== void 0 && Object.assign(n, { [o]: i });
1516
1673
  }
1517
- return n.type = e.type, n.name = ((r = e.name) == null ? void 0 : r.trim()) || t.name, n.id = e.id, yt(n);
1674
+ return n.type = e.type, n.name = ((r = e.name) == null ? void 0 : r.trim()) || t.name, n.id = e.id, bt(n);
1518
1675
  }
1519
- function Be(e) {
1676
+ function Ve(e) {
1520
1677
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1521
1678
  const t = e;
1522
1679
  if (!Array.isArray(t.blocks)) return null;
1523
1680
  const n = t.blocks.filter(
1524
1681
  (o) => !!o && typeof o == "object" && !Array.isArray(o)
1525
- ), r = Oe({
1682
+ ), r = qe({
1526
1683
  title: typeof t.title == "string" ? t.title : "",
1527
1684
  description: typeof t.description == "string" ? t.description : "",
1528
- blocks: n,
1529
- jsonSchema: {}
1685
+ blocks: n
1530
1686
  });
1531
1687
  return {
1532
1688
  title: r.title,
@@ -1535,108 +1691,118 @@ function Be(e) {
1535
1691
  rawBlocks: n
1536
1692
  };
1537
1693
  }
1538
- function Mo(e, t) {
1539
- var i, s, a, l, u, m;
1694
+ function Oo(e, t) {
1695
+ var i, s, a, l, c, m;
1540
1696
  const n = /* @__PURE__ */ new Map();
1541
1697
  for (const d of (t == null ? void 0 : t.blocks) ?? [])
1542
- ae(d.type) && ((i = d.name) != null && i.trim()) && n.set(d.name.trim(), d);
1698
+ Z(d.type) && ((i = d.name) != null && i.trim()) && n.set(d.name.trim(), d);
1543
1699
  const r = [], o = [];
1544
1700
  for (const d of e.blocks) {
1545
- if (!ae(d.type)) continue;
1546
- const S = (s = d.name) == null ? void 0 : s.trim();
1547
- if (!S) continue;
1548
- const g = n.get(S);
1701
+ if (!Z(d.type)) continue;
1702
+ const b = (s = d.name) == null ? void 0 : s.trim();
1703
+ if (!b) continue;
1704
+ const g = n.get(b);
1549
1705
  if (g) {
1550
- const b = No(e, S, d);
1551
- r.push(Io(g, b));
1706
+ const S = wo(e, b, d);
1707
+ r.push(zo(g, S));
1552
1708
  } else
1553
- o.push(yt(d));
1709
+ o.push(bt(d));
1554
1710
  }
1555
1711
  return {
1556
1712
  matchedBlocks: r,
1557
1713
  extraBlocks: o,
1558
- renderBlocks: xo(e, r),
1714
+ renderBlocks: Po(e, r),
1559
1715
  title: ((a = e.title) == null ? void 0 : a.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
1560
- description: ((u = e.description) == null ? void 0 : u.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1716
+ description: ((c = e.description) == null ? void 0 : c.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1561
1717
  };
1562
1718
  }
1563
- function Fo(e) {
1719
+ function kn(e) {
1564
1720
  const { type: t, defaultValue: n } = e;
1565
1721
  return n !== void 0 ? t === "toggle" ? n === !0 || n === "true" : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? Array.isArray(n) ? n.map(String) : typeof n == "string" && n ? [n] : [] : n : t === "toggle" ? !1 : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? [] : t === "number" ? null : "";
1566
1722
  }
1567
- function vt(e) {
1723
+ function ze(e) {
1568
1724
  var n;
1569
1725
  const t = {};
1570
1726
  for (const r of e) {
1571
- if (!ae(r.type)) continue;
1727
+ if (!Z(r.type)) continue;
1572
1728
  const o = (n = r.name) == null ? void 0 : n.trim();
1573
- o && (t[o] = Fo(r));
1729
+ o && (t[o] = kn(r));
1574
1730
  }
1575
1731
  return t;
1576
1732
  }
1577
- function Eo(e) {
1733
+ function qo(e) {
1578
1734
  return e.blocks.some(
1579
1735
  (t) => {
1580
1736
  var n;
1581
- return ae(t.type) && !!((n = t.name) != null && n.trim());
1737
+ return Z(t.type) && !!((n = t.name) != null && n.trim());
1582
1738
  }
1583
1739
  );
1584
1740
  }
1585
- function Ro(e) {
1741
+ function Bo(e) {
1586
1742
  return e.blocks.filter((t) => {
1587
1743
  var n;
1588
- return ze(t.type) ? !0 : ae(t.type) && !!((n = t.name) != null && n.trim());
1744
+ return Ce(t.type) ? !0 : !Z(t.type) || !((n = t.name) != null && n.trim()) ? !1 : !vt(t);
1589
1745
  });
1590
1746
  }
1591
- function Uo(e) {
1747
+ function ys(e) {
1592
1748
  return e.blocks.filter((t) => {
1593
1749
  var n;
1594
- return ae(t.type) && ((n = t.name) == null ? void 0 : n.trim());
1750
+ return Z(t.type) && ((n = t.name) == null ? void 0 : n.trim());
1595
1751
  }).map((t) => t.name.trim());
1596
1752
  }
1753
+ function Vo(e) {
1754
+ var n;
1755
+ const t = {};
1756
+ for (const r of e.blocks) {
1757
+ if (!vt(r)) continue;
1758
+ const o = (n = r.name) == null ? void 0 : n.trim();
1759
+ o && (t[o] = kn(r));
1760
+ }
1761
+ return t;
1762
+ }
1597
1763
  function St(e) {
1598
1764
  return e.replace(/'/g, "'\\''");
1599
1765
  }
1600
- function yn(e) {
1766
+ function Cn(e) {
1601
1767
  var n;
1602
1768
  const t = (n = e == null ? void 0 : e.Authorization) == null ? void 0 : n.trim();
1603
1769
  return t ? ` -H 'Authorization: ${St(t)}' \\` : " -H 'Authorization: Bearer <token>' \\";
1604
1770
  }
1605
- function vn(e, t, n) {
1771
+ function An(e, t, n) {
1606
1772
  const r = (t ?? "").trim() || "<callback_url>", o = JSON.stringify(e ?? {}, null, 2);
1607
1773
  return [
1608
1774
  `curl -X POST '${r}' \\`,
1609
1775
  " -H 'Content-Type: application/json' \\",
1610
- yn(n),
1776
+ Cn(n),
1611
1777
  ` -d '${St(o)}'`
1612
1778
  ].join(`
1613
1779
  `);
1614
1780
  }
1615
- function wo(e, t) {
1781
+ function Lo(e, t) {
1616
1782
  return JSON.stringify({ ...e, ...t }, null, 2);
1617
1783
  }
1618
- function Po({
1784
+ function jo({
1619
1785
  cardValues: e,
1620
1786
  extraValues: t = {},
1621
1787
  callbackUrl: n,
1622
1788
  headers: r
1623
1789
  }) {
1624
- const o = (n ?? "").trim() || "<callback_url>", i = wo(e, t);
1790
+ const o = (n ?? "").trim() || "<callback_url>", i = Lo(e, t);
1625
1791
  return [
1626
1792
  `curl -X POST '${o}' \\`,
1627
1793
  " -H 'Content-Type: application/json' \\",
1628
- yn(r),
1794
+ Cn(r),
1629
1795
  ` -d '${St(i)}'`
1630
1796
  ].join(`
1631
1797
  `);
1632
1798
  }
1633
- function ss(e, t, n) {
1634
- const r = Be(e);
1635
- if (!r) return vn(e, t, n);
1636
- const o = vt(r.blocks);
1637
- return Po({ cardValues: o, callbackUrl: t, headers: n });
1799
+ function vs(e, t, n) {
1800
+ const r = Ve(e);
1801
+ if (!r) return An(e, t, n);
1802
+ const o = ze(r.blocks);
1803
+ return jo({ cardValues: o, callbackUrl: t, headers: n });
1638
1804
  }
1639
- async function Sn(e, t, n) {
1805
+ async function _n(e, t, n) {
1640
1806
  const r = e.trim();
1641
1807
  if (!r)
1642
1808
  throw new Error("callback_url 为空");
@@ -1663,7 +1829,7 @@ async function Sn(e, t, n) {
1663
1829
  }
1664
1830
  return { ok: i.ok, status: i.status, body: s };
1665
1831
  }
1666
- async function as(e) {
1832
+ async function bs(e) {
1667
1833
  var n;
1668
1834
  if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
1669
1835
  await navigator.clipboard.writeText(e);
@@ -1679,7 +1845,7 @@ async function as(e) {
1679
1845
  document.body.removeChild(t);
1680
1846
  }
1681
1847
  }
1682
- async function bt(e) {
1848
+ async function kt(e) {
1683
1849
  let t;
1684
1850
  try {
1685
1851
  t = await e.json();
@@ -1692,8 +1858,8 @@ async function bt(e) {
1692
1858
  throw new Error(t.message || `响应缺少 data (${e.status})`);
1693
1859
  return t.data;
1694
1860
  }
1695
- const kt = "auth_user", zo = "token", Oo = "answer_agent_callback_url", qo = "realtime_ws_url", Bo = "/api/v1/mock/ask_user_answer_mock";
1696
- function Ct(e) {
1861
+ const Ct = "auth_user", $o = "token", Do = "answer_agent_callback_url", Ho = "realtime_ws_url", Ko = "/api/v1/mock/ask_user_answer_mock";
1862
+ function At(e) {
1697
1863
  if (typeof window > "u") return null;
1698
1864
  try {
1699
1865
  return e === "localStorage" ? window.localStorage : window.sessionStorage;
@@ -1701,7 +1867,7 @@ function Ct(e) {
1701
1867
  return null;
1702
1868
  }
1703
1869
  }
1704
- function At(e) {
1870
+ function _t(e) {
1705
1871
  try {
1706
1872
  const t = JSON.parse(e);
1707
1873
  return !t || typeof t != "object" || Array.isArray(t) ? null : t;
@@ -1709,50 +1875,50 @@ function At(e) {
1709
1875
  return null;
1710
1876
  }
1711
1877
  }
1712
- function Lo(e, t) {
1713
- const n = At(e);
1878
+ function Jo(e, t) {
1879
+ const n = _t(e);
1714
1880
  if (!n) return "";
1715
1881
  const r = n[t];
1716
1882
  return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
1717
1883
  }
1718
- function Vo(e = {}) {
1719
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.answerAgentCallbackUrlField ?? Oo, o = Ct(t);
1884
+ function Go(e = {}) {
1885
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.answerAgentCallbackUrlField ?? Do, o = At(t);
1720
1886
  if (!o) return "";
1721
1887
  const i = o.getItem(n);
1722
1888
  if (!i) return "";
1723
- const s = At(i);
1889
+ const s = _t(i);
1724
1890
  if (!s) return "";
1725
1891
  const a = s[r];
1726
- return (typeof a == "string" ? a.trim() : "") || Bo;
1892
+ return (typeof a == "string" ? a.trim() : "") || Ko;
1727
1893
  }
1728
- function jo(e = {}) {
1729
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.realtimeWsUrlField ?? qo, o = Ct(t);
1894
+ function Wo(e = {}) {
1895
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.realtimeWsUrlField ?? Ho, o = At(t);
1730
1896
  if (!o) return "";
1731
1897
  const i = o.getItem(n);
1732
1898
  if (!i) return "";
1733
- const s = At(i);
1899
+ const s = _t(i);
1734
1900
  if (!s) return "";
1735
1901
  const a = s[r];
1736
1902
  return typeof a == "string" ? a.trim() : "";
1737
1903
  }
1738
- function _t(e, t) {
1904
+ function Tt(e, t) {
1739
1905
  return {
1740
- ...bn(t),
1906
+ ...Tn(t),
1741
1907
  ...e ?? {}
1742
1908
  };
1743
1909
  }
1744
- function bn(e = {}) {
1745
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? kt, r = e.tokenField ?? zo, o = Ct(t);
1910
+ function Tn(e = {}) {
1911
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? Ct, r = e.tokenField ?? $o, o = At(t);
1746
1912
  if (!o) return {};
1747
1913
  const i = o.getItem(n);
1748
1914
  if (!i) return {};
1749
- const s = Lo(i, r);
1915
+ const s = Jo(i, r);
1750
1916
  return s ? { Authorization: `Bearer ${s}` } : {};
1751
1917
  }
1752
- async function Tt(e = {}) {
1753
- return e.getHeaders ? await e.getHeaders() ?? {} : bn(e.authStorage);
1918
+ async function xt(e = {}) {
1919
+ return e.getHeaders ? await e.getHeaders() ?? {} : Tn(e.authStorage);
1754
1920
  }
1755
- function $o(e = {}) {
1921
+ function Yo(e = {}) {
1756
1922
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
1757
1923
  async function o(i) {
1758
1924
  const s = new URLSearchParams();
@@ -1762,21 +1928,21 @@ function $o(e = {}) {
1762
1928
  s.set("form_unique_id", i.formUniqueId);
1763
1929
  else
1764
1930
  throw new Error("form_id 或 form_unique_id 至少传一个");
1765
- const a = await Tt(e), l = await r(`${t}${n}?${s.toString()}`, {
1931
+ const a = await xt(e), l = await r(`${t}${n}?${s.toString()}`, {
1766
1932
  method: "GET",
1767
1933
  headers: a
1768
- }), u = await bt(l), m = Ao(u.form_definition);
1934
+ }), c = await kt(l), m = Eo(c.form_definition);
1769
1935
  return {
1770
- formUniqueId: u.form_unique_id,
1771
- formId: u.form_id,
1772
- disabled: u.disabled === 1,
1936
+ formUniqueId: c.form_unique_id,
1937
+ formId: c.form_id,
1938
+ disabled: c.disabled === 1,
1773
1939
  formDefinition: m,
1774
- a2ui: ko(u.form_definition) ?? void 0
1940
+ a2ui: Io(c.form_definition) ?? void 0
1775
1941
  };
1776
1942
  }
1777
1943
  return { fetchDetail: o };
1778
1944
  }
1779
- function Do(e) {
1945
+ function Qo(e) {
1780
1946
  if (!e || typeof e != "object" || Array.isArray(e))
1781
1947
  return e ?? null;
1782
1948
  const t = e;
@@ -1786,13 +1952,13 @@ function Do(e) {
1786
1952
  blocks: t.blocks
1787
1953
  } : e;
1788
1954
  }
1789
- function xt({
1955
+ function Mt({
1790
1956
  context: e,
1791
1957
  payload: t,
1792
1958
  form: n,
1793
1959
  answer: r
1794
1960
  }) {
1795
- const o = Be(t) ?? t, i = n ? Do(n) : o;
1961
+ const o = Ve(t) ?? t, i = n ? Qo(n) : o;
1796
1962
  return {
1797
1963
  mission_id: e.missionId ?? null,
1798
1964
  tenant_id: e.tenantId ?? null,
@@ -1820,34 +1986,34 @@ function Nt(e) {
1820
1986
  const o = e.mission_id;
1821
1987
  return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
1822
1988
  }
1823
- function ls(e) {
1989
+ function Ss(e) {
1824
1990
  return Nt(
1825
- xt({
1991
+ Mt({
1826
1992
  context: e,
1827
1993
  payload: {},
1828
1994
  answer: {}
1829
1995
  })
1830
1996
  );
1831
1997
  }
1832
- const Gt = "answer_agent_callback_url 未配置,无法提交";
1833
- function Ho(e) {
1998
+ const Wt = "answer_agent_callback_url 未配置,无法提交";
1999
+ function Xo(e) {
1834
2000
  if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
1835
2001
  const n = e.answerAgentCallbackUrl.trim();
1836
2002
  if (!n)
1837
- throw new Error(Gt);
2003
+ throw new Error(Wt);
1838
2004
  return n;
1839
2005
  }
1840
- const t = Vo(e == null ? void 0 : e.authStorage).trim();
2006
+ const t = Go(e == null ? void 0 : e.authStorage).trim();
1841
2007
  if (!t)
1842
- throw new Error(Gt);
2008
+ throw new Error(Wt);
1843
2009
  return t;
1844
2010
  }
1845
- function kn(e) {
2011
+ function xn(e) {
1846
2012
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1847
2013
  const n = e.data;
1848
2014
  return !n || typeof n != "object" || Array.isArray(n) ? null : n;
1849
2015
  }
1850
- function Ko(e, t) {
2016
+ function Zo(e, t) {
1851
2017
  if (t && typeof t == "object" && t !== null && "message" in t) {
1852
2018
  const n = t.message;
1853
2019
  if (typeof n == "string" && n.trim())
@@ -1855,27 +2021,27 @@ function Ko(e, t) {
1855
2021
  }
1856
2022
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
1857
2023
  }
1858
- function Go(e) {
2024
+ function ei(e) {
1859
2025
  return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
1860
2026
  }
1861
- function Cn(e) {
1862
- const t = kn(e.body);
1863
- return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: Go(t) } : e.ok ? { type: "success", message: "提交成功" } : {
2027
+ function Mn(e) {
2028
+ const t = xn(e.body);
2029
+ return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: ei(t) } : e.ok ? { type: "success", message: "提交成功" } : {
1864
2030
  type: "error",
1865
- message: Ko(e.status, e.body)
2031
+ message: Zo(e.status, e.body)
1866
2032
  };
1867
2033
  }
1868
- async function An(e, t) {
2034
+ async function Nn(e, t) {
1869
2035
  const n = Nt(e);
1870
2036
  if (n)
1871
2037
  throw new Error(n);
1872
- const r = Ho(t), o = await Sn(r, e, {
2038
+ const r = Xo(t), o = await _n(r, e, {
1873
2039
  ...t,
1874
- headers: _t(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
1875
- }), i = kn(o.body);
2040
+ headers: Tt(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
2041
+ }), i = xn(o.body);
1876
2042
  return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
1877
2043
  }
1878
- function Jo(e) {
2044
+ function ti(e) {
1879
2045
  return {
1880
2046
  resumeUniqueId: e.resume_unique_id,
1881
2047
  resumeId: e.resume_id,
@@ -1896,7 +2062,7 @@ function Jo(e) {
1896
2062
  }))
1897
2063
  };
1898
2064
  }
1899
- function Wo(e, t, n) {
2065
+ function ni(e, t, n) {
1900
2066
  const r = new URLSearchParams();
1901
2067
  r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20));
1902
2068
  for (const o of e.names ?? [])
@@ -1909,27 +2075,27 @@ function Wo(e, t, n) {
1909
2075
  r.append("published", String(o));
1910
2076
  return r;
1911
2077
  }
1912
- function Yo(e = {}) {
2078
+ function ri(e = {}) {
1913
2079
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch, o = e.published ?? [1];
1914
2080
  return async ({ filter: i, page: s }) => {
1915
- const a = await Tt(e), l = Wo(i, s, o), u = await r(`${t}${n}?${l.toString()}`, {
2081
+ const a = await xt(e), l = ni(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
1916
2082
  method: "GET",
1917
2083
  headers: a
1918
- }), m = await bt(u);
2084
+ }), m = await kt(c);
1919
2085
  return {
1920
- list: (m.list ?? []).map(Jo),
2086
+ list: (m.list ?? []).map(ti),
1921
2087
  total: m.total ?? 0,
1922
2088
  page: m.page ?? s,
1923
2089
  pageSize: m.page_size ?? i.pageSize ?? 20
1924
2090
  };
1925
2091
  };
1926
2092
  }
1927
- function Qo(e) {
2093
+ function oi(e) {
1928
2094
  var r, o, i, s;
1929
2095
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!((o = e.agentUniqueId) != null && o.trim() && ((i = e.flowType) != null && i.trim()) && ((s = e.category) != null && s.trim()));
1930
2096
  return t || n;
1931
2097
  }
1932
- function Xo(e) {
2098
+ function ii(e) {
1933
2099
  return {
1934
2100
  caseUniqueId: e.case_unique_id,
1935
2101
  caseId: e.case_id,
@@ -1940,7 +2106,7 @@ function Xo(e) {
1940
2106
  description: e.description ?? void 0
1941
2107
  };
1942
2108
  }
1943
- function Zo(e, t, n) {
2109
+ function si(e, t, n) {
1944
2110
  var o, i, s;
1945
2111
  const r = new URLSearchParams();
1946
2112
  r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20)), r.set("published", String(n)), (o = e.agentUniqueId) != null && o.trim() && r.set("agent_unique_id", e.agentUniqueId.trim()), (i = e.flowType) != null && i.trim() && r.set("flow_type", e.flowType.trim()), (s = e.category) != null && s.trim() && r.set("category_unique_id", e.category.trim());
@@ -1948,24 +2114,24 @@ function Zo(e, t, n) {
1948
2114
  a && r.append("flow_unique_ids", a);
1949
2115
  return r;
1950
2116
  }
1951
- function ei(e = {}) {
2117
+ function ai(e = {}) {
1952
2118
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
1953
2119
  return async ({ filter: i, page: s }) => {
1954
- if (!Qo(i))
2120
+ if (!oi(i))
1955
2121
  return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
1956
- const a = await Tt(e), l = Zo(i, s, o), u = await r(`${t}${n}?${l.toString()}`, {
2122
+ const a = await xt(e), l = si(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
1957
2123
  method: "GET",
1958
2124
  headers: a
1959
- }), m = await bt(u);
2125
+ }), m = await kt(c);
1960
2126
  return {
1961
- list: (m.list ?? []).map(Xo),
2127
+ list: (m.list ?? []).map(ii),
1962
2128
  total: m.total ?? 0,
1963
2129
  page: m.page ?? s,
1964
2130
  pageSize: m.page_size ?? i.pageSize ?? 20
1965
2131
  };
1966
2132
  };
1967
2133
  }
1968
- function cs(e = {}) {
2134
+ function ks(e = {}) {
1969
2135
  var r, o, i, s, a;
1970
2136
  const t = {
1971
2137
  baseUrl: e.baseUrl,
@@ -1974,23 +2140,23 @@ function cs(e = {}) {
1974
2140
  authStorage: e.authStorage
1975
2141
  };
1976
2142
  return {
1977
- fetchDetail: $o({
2143
+ fetchDetail: Yo({
1978
2144
  ...t,
1979
2145
  detailPath: (r = e.form) == null ? void 0 : r.detailPath
1980
2146
  }).fetchDetail,
1981
- resumeSearch: Yo({
2147
+ resumeSearch: ri({
1982
2148
  ...t,
1983
2149
  searchPath: (o = e.resume) == null ? void 0 : o.searchPath,
1984
2150
  published: (i = e.resume) == null ? void 0 : i.published
1985
2151
  }),
1986
- caseSearch: ei({
2152
+ caseSearch: ai({
1987
2153
  ...t,
1988
2154
  listPath: (s = e.case) == null ? void 0 : s.listPath,
1989
2155
  published: (a = e.case) == null ? void 0 : a.published
1990
2156
  })
1991
2157
  };
1992
2158
  }
1993
- function _n(e, t) {
2159
+ function In(e, t) {
1994
2160
  if (!t.trim()) return !0;
1995
2161
  try {
1996
2162
  return new RegExp(t).test(e);
@@ -1998,44 +2164,44 @@ function _n(e, t) {
1998
2164
  return !0;
1999
2165
  }
2000
2166
  }
2001
- function Tn(e) {
2167
+ function Fn(e) {
2002
2168
  return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
2003
2169
  }
2004
- function ti(e, t) {
2170
+ function li(e, t) {
2005
2171
  switch (e.type) {
2006
2172
  case "multiselect":
2007
2173
  case "checkbox":
2008
2174
  case "file":
2009
2175
  case "resume_multiselect":
2010
2176
  case "case_multiselect":
2011
- return Y(t).length === 0;
2177
+ return Q(t).length === 0;
2012
2178
  case "toggle":
2013
- return !ke(t);
2179
+ return !Te(t);
2014
2180
  case "number":
2015
2181
  return t == null || t === "";
2016
2182
  default:
2017
- return Tn(t);
2183
+ return Fn(t);
2018
2184
  }
2019
2185
  }
2020
- function rt(e, t) {
2186
+ function it(e, t) {
2021
2187
  return e.required === !0 || t > 0;
2022
2188
  }
2023
- function ni(e, t) {
2189
+ function ci(e, t) {
2024
2190
  var n, r;
2025
2191
  for (const o of e) {
2026
2192
  const i = (n = o.name) == null ? void 0 : n.trim();
2027
- if (!i || ze(o.type) || Ee(o.type)) continue;
2193
+ if (!i || Ce(o.type) || de(o.type)) continue;
2028
2194
  const s = t[i], a = ((r = o.label) == null ? void 0 : r.trim()) || i;
2029
- if (o.required && ti(o, s))
2195
+ if (o.required && li(o, s))
2030
2196
  return { fieldName: i, label: a, message: `请填写「${a}」` };
2031
- if (o.type === "email" && !Tn(s)) {
2197
+ if (o.type === "email" && !Fn(s)) {
2032
2198
  const l = String(s).trim();
2033
- if (!_n(l, gt))
2199
+ if (!In(l, yt))
2034
2200
  return { fieldName: i, label: a, message: `「${a}」格式不正确` };
2035
2201
  }
2036
2202
  if (o.type === "file") {
2037
- const l = o.fileMinCount ?? 0, u = Y(s).length;
2038
- if (l > 0 && u < l && rt(o, u))
2203
+ const l = o.fileMinCount ?? 0, c = Q(s).length;
2204
+ if (l > 0 && c < l && it(o, c))
2039
2205
  return {
2040
2206
  fieldName: i,
2041
2207
  label: a,
@@ -2043,8 +2209,8 @@ function ni(e, t) {
2043
2209
  };
2044
2210
  }
2045
2211
  if (o.type === "resume_multiselect") {
2046
- const l = o.resumeMinCount, u = Y(s).length;
2047
- if (l !== void 0 && u < l && rt(o, u))
2212
+ const l = o.resumeMinCount, c = Q(s).length;
2213
+ if (l !== void 0 && c < l && it(o, c))
2048
2214
  return {
2049
2215
  fieldName: i,
2050
2216
  label: a,
@@ -2052,8 +2218,8 @@ function ni(e, t) {
2052
2218
  };
2053
2219
  }
2054
2220
  if (o.type === "case_multiselect") {
2055
- const l = o.caseMinCount, u = Y(s).length;
2056
- if (l !== void 0 && u < l && rt(o, u))
2221
+ const l = o.caseMinCount, c = Q(s).length;
2222
+ if (l !== void 0 && c < l && it(o, c))
2057
2223
  return {
2058
2224
  fieldName: i,
2059
2225
  label: a,
@@ -2063,21 +2229,21 @@ function ni(e, t) {
2063
2229
  }
2064
2230
  return null;
2065
2231
  }
2066
- const ri = {
2067
- video: Wn,
2068
- audio: Jn,
2069
- image: Gn,
2070
- file: Yt,
2071
- spreadsheet: Kn,
2072
- document: Wt
2232
+ const ui = {
2233
+ video: er,
2234
+ audio: Zn,
2235
+ image: Xn,
2236
+ file: Xt,
2237
+ spreadsheet: Qn,
2238
+ document: Qt
2073
2239
  };
2074
- function oi({
2240
+ function mi({
2075
2241
  type: e,
2076
2242
  size: t = 40,
2077
2243
  className: n
2078
2244
  }) {
2079
- const r = ri[e] ?? Yt;
2080
- return /* @__PURE__ */ c(
2245
+ const r = ui[e] ?? Xt;
2246
+ return /* @__PURE__ */ u(
2081
2247
  r,
2082
2248
  {
2083
2249
  className: n ?? "skopon-form-file-placeholder-icon",
@@ -2086,7 +2252,7 @@ function oi({
2086
2252
  }
2087
2253
  );
2088
2254
  }
2089
- const xn = "skopon-form-v0_9", ii = /* @__PURE__ */ new Set([
2255
+ const En = "skopon-form-v0_9", di = /* @__PURE__ */ new Set([
2090
2256
  "SkoponMedia",
2091
2257
  "SkoponSelect",
2092
2258
  "Image",
@@ -2098,17 +2264,17 @@ const xn = "skopon-form-v0_9", ii = /* @__PURE__ */ new Set([
2098
2264
  "FileUpload",
2099
2265
  "TextField",
2100
2266
  "Text",
2101
- ...co()
2102
- ]), si = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
2103
- function Ce(e) {
2104
- const t = [...Fe.components.values()].find((n) => n.name === e);
2267
+ ...bo()
2268
+ ]), fi = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
2269
+ function xe(e) {
2270
+ const t = [...Ue.components.values()].find((n) => n.name === e);
2105
2271
  if (!t) throw new Error(`Missing basic catalog component: ${e}`);
2106
2272
  return t.schema;
2107
2273
  }
2108
- function E(e) {
2274
+ function U(e) {
2109
2275
  return typeof e == "string" ? e : "";
2110
2276
  }
2111
- function Nn(e) {
2277
+ function Un(e) {
2112
2278
  return Array.isArray(e) ? e.map((t) => {
2113
2279
  if (!t || typeof t != "object") return null;
2114
2280
  const n = t, r = String(n.value ?? n.label ?? ""), o = String(n.label ?? n.value ?? "");
@@ -2123,10 +2289,10 @@ function Le({
2123
2289
  help: o,
2124
2290
  placeholder: i
2125
2291
  }) {
2126
- const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = vr(n), u = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
2127
- return /* @__PURE__ */ N("div", { className: "form-block-preview", children: [
2128
- s ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: s }) : null,
2129
- t.length === 0 ? /* @__PURE__ */ c("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ c("div", { className: l, children: t.map((m, d) => e === "image" ? /* @__PURE__ */ c(
2292
+ const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = _r(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
2293
+ return /* @__PURE__ */ M("div", { className: "form-block-preview", children: [
2294
+ s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2295
+ t.length === 0 ? /* @__PURE__ */ u("div", { className: "form-media-preview form-media-preview--empty", children: c }) : /* @__PURE__ */ u("div", { className: l, children: t.map((m, d) => e === "image" ? /* @__PURE__ */ u(
2130
2296
  "img",
2131
2297
  {
2132
2298
  src: m,
@@ -2134,7 +2300,7 @@ function Le({
2134
2300
  className: "form-media-item"
2135
2301
  },
2136
2302
  `media-${d}`
2137
- ) : e === "video" ? /* @__PURE__ */ c(
2303
+ ) : e === "video" ? /* @__PURE__ */ u(
2138
2304
  "video",
2139
2305
  {
2140
2306
  src: m,
@@ -2142,7 +2308,7 @@ function Le({
2142
2308
  className: "form-media-item"
2143
2309
  },
2144
2310
  `media-${d}`
2145
- ) : /* @__PURE__ */ c(
2311
+ ) : /* @__PURE__ */ u(
2146
2312
  "audio",
2147
2313
  {
2148
2314
  src: m,
@@ -2151,21 +2317,21 @@ function Le({
2151
2317
  },
2152
2318
  `media-${d}`
2153
2319
  )) }),
2154
- a ? /* @__PURE__ */ c(te.Text, { type: "secondary", className: "form-block-preview-help", children: a }) : null
2320
+ a ? /* @__PURE__ */ u(ne.Text, { type: "secondary", className: "form-block-preview-help", children: a }) : null
2155
2321
  ] });
2156
2322
  }
2157
- function Ve(e, t) {
2158
- const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : E(e.url).trim() ? [E(e.url).trim()] : [];
2323
+ function je(e, t) {
2324
+ const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : U(e.url).trim() ? [U(e.url).trim()] : [];
2159
2325
  return {
2160
2326
  mediaType: t,
2161
2327
  urls: n,
2162
- mediaSize: be(e.mediaSize),
2163
- label: E(e.label) || E(e.description),
2164
- help: E(e.help),
2165
- placeholder: E(e.placeholder)
2328
+ mediaSize: _e(e.mediaSize),
2329
+ label: U(e.label) || U(e.description),
2330
+ help: U(e.help),
2331
+ placeholder: U(e.placeholder)
2166
2332
  };
2167
2333
  }
2168
- const ai = {
2334
+ const pi = {
2169
2335
  name: "SkoponMedia",
2170
2336
  schema: h.object({
2171
2337
  mediaType: h.any().optional(),
@@ -2175,19 +2341,19 @@ const ai = {
2175
2341
  help: h.any().optional(),
2176
2342
  placeholder: h.any().optional()
2177
2343
  }).passthrough()
2178
- }, li = Q(ai, ({ context: e }) => {
2179
- const t = e.componentModel.properties, n = E(t.mediaType);
2180
- return /* @__PURE__ */ c(Le, { ...Ve(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
2181
- }), ci = Q(
2182
- { name: "Image", schema: Ce("Image") },
2183
- ({ context: e }) => /* @__PURE__ */ c(Le, { ...Ve(e.componentModel.properties, "image") })
2184
- ), ui = Q(
2185
- { name: "Video", schema: Ce("Video") },
2186
- ({ context: e }) => /* @__PURE__ */ c(Le, { ...Ve(e.componentModel.properties, "video") })
2187
- ), mi = Q(
2188
- { name: "AudioPlayer", schema: Ce("AudioPlayer") },
2189
- ({ context: e }) => /* @__PURE__ */ c(Le, { ...Ve(e.componentModel.properties, "audio") })
2190
- ), di = {
2344
+ }, hi = X(pi, ({ context: e }) => {
2345
+ const t = e.componentModel.properties, n = U(t.mediaType);
2346
+ return /* @__PURE__ */ u(Le, { ...je(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
2347
+ }), gi = X(
2348
+ { name: "Image", schema: xe("Image") },
2349
+ ({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "image") })
2350
+ ), yi = X(
2351
+ { name: "Video", schema: xe("Video") },
2352
+ ({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "video") })
2353
+ ), vi = X(
2354
+ { name: "AudioPlayer", schema: xe("AudioPlayer") },
2355
+ ({ context: e }) => /* @__PURE__ */ u(Le, { ...je(e.componentModel.properties, "audio") })
2356
+ ), bi = {
2191
2357
  name: "SkoponSelect",
2192
2358
  schema: h.object({
2193
2359
  label: h.any().optional(),
@@ -2197,18 +2363,18 @@ const ai = {
2197
2363
  value: h.any().optional()
2198
2364
  }).passthrough()
2199
2365
  };
2200
- function pi({ context: e }) {
2201
- const { interactive: t } = ie(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = se(e, "value", {
2366
+ function Si({ context: e }) {
2367
+ const { interactive: t } = se(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = ae(e, "value", {
2202
2368
  component: "SkoponSelect",
2203
2369
  changeAction: "select"
2204
- }), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), u = Nn(s.options), m = E(s.mode) === "multiple";
2205
- return z(() => {
2206
- const d = ln(n, m);
2370
+ }), s = e.componentModel.properties, a = U(s.label), l = U(s.placeholder), c = Un(s.options), m = U(s.mode) === "multiple";
2371
+ return q(() => {
2372
+ const d = dn(n, m);
2207
2373
  d !== null && o(d);
2208
- }, [m, n, o]), /* @__PURE__ */ N("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2209
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
2210
- /* @__PURE__ */ c(
2211
- ot,
2374
+ }, [m, n, o]), /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2375
+ a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2376
+ /* @__PURE__ */ u(
2377
+ st,
2212
2378
  {
2213
2379
  mode: m ? "multiple" : void 0,
2214
2380
  disabled: !t,
@@ -2216,29 +2382,29 @@ function pi({ context: e }) {
2216
2382
  className: "form-block-preview-control",
2217
2383
  style: { width: "100%" },
2218
2384
  placeholder: l || (m ? "请选择多项" : "请选择"),
2219
- options: u,
2220
- value: m ? Y(n) : fe(n),
2385
+ options: c,
2386
+ value: m ? Q(n) : ve(n),
2221
2387
  onChange: (d) => r(m ? d ?? [] : d ?? "")
2222
2388
  }
2223
2389
  )
2224
2390
  ] });
2225
2391
  }
2226
- const fi = Q(
2227
- di,
2228
- pi
2392
+ const ki = X(
2393
+ bi,
2394
+ Si
2229
2395
  );
2230
- function hi({ context: e }) {
2231
- const { interactive: t } = ie(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = se(e, "value", {
2396
+ function Ci({ context: e }) {
2397
+ const { interactive: t } = se(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = ae(e, "value", {
2232
2398
  component: "ChoicePicker",
2233
2399
  changeAction: "select"
2234
- }), s = e.componentModel.properties, a = E(s.label), l = E(s.variant) || "mutuallyExclusive", u = E(s.skoponPickerType), m = E(s.placeholder), d = Nn(s.options), g = u === "select" || u === "multiselect" || u === "radio" || u === "checkbox" ? u : l === "multipleSelection" ? "checkbox" : "radio", b = g === "multiselect" || g === "checkbox";
2235
- return z(() => {
2236
- const y = ln(n, b);
2400
+ }), s = e.componentModel.properties, a = U(s.label), l = U(s.variant) || "mutuallyExclusive", c = U(s.skoponPickerType), m = U(s.placeholder), d = Un(s.options), g = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", S = g === "multiselect" || g === "checkbox";
2401
+ return q(() => {
2402
+ const y = dn(n, S);
2237
2403
  y !== null && o(y);
2238
- }, [b, n, o]), /* @__PURE__ */ N("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2239
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
2240
- g === "select" ? /* @__PURE__ */ c(
2241
- ot,
2404
+ }, [S, n, o]), /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2405
+ a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2406
+ g === "select" ? /* @__PURE__ */ u(
2407
+ st,
2242
2408
  {
2243
2409
  disabled: !t,
2244
2410
  allowClear: !0,
@@ -2246,11 +2412,11 @@ function hi({ context: e }) {
2246
2412
  style: { width: "100%" },
2247
2413
  placeholder: m || "请选择",
2248
2414
  options: d,
2249
- value: fe(n),
2415
+ value: ve(n),
2250
2416
  onChange: (y) => r(y ?? "")
2251
2417
  }
2252
- ) : g === "multiselect" ? /* @__PURE__ */ c(
2253
- ot,
2418
+ ) : g === "multiselect" ? /* @__PURE__ */ u(
2419
+ st,
2254
2420
  {
2255
2421
  mode: "multiple",
2256
2422
  disabled: !t,
@@ -2259,31 +2425,31 @@ function hi({ context: e }) {
2259
2425
  style: { width: "100%" },
2260
2426
  placeholder: m || "请选择多项",
2261
2427
  options: d,
2262
- value: Y(n),
2428
+ value: Q(n),
2263
2429
  onChange: (y) => r(y ?? [])
2264
2430
  }
2265
- ) : g === "checkbox" ? /* @__PURE__ */ c(
2266
- On.Group,
2431
+ ) : g === "checkbox" ? /* @__PURE__ */ u(
2432
+ jn.Group,
2267
2433
  {
2268
2434
  disabled: !t,
2269
2435
  className: "form-block-preview-control",
2270
2436
  options: d,
2271
- value: Y(n),
2437
+ value: Q(n),
2272
2438
  onChange: (y) => r(y)
2273
2439
  }
2274
- ) : /* @__PURE__ */ c(
2275
- qn.Group,
2440
+ ) : /* @__PURE__ */ u(
2441
+ $n.Group,
2276
2442
  {
2277
2443
  disabled: !t,
2278
2444
  className: "form-block-preview-control",
2279
2445
  options: d,
2280
- value: fe(n),
2446
+ value: ve(n),
2281
2447
  onChange: (y) => r(y.target.value)
2282
2448
  }
2283
2449
  )
2284
2450
  ] });
2285
2451
  }
2286
- const gi = Q(
2452
+ const Ai = X(
2287
2453
  {
2288
2454
  name: "ChoicePicker",
2289
2455
  schema: h.object({
@@ -2295,88 +2461,88 @@ const gi = Q(
2295
2461
  placeholder: h.any().optional()
2296
2462
  }).passthrough()
2297
2463
  },
2298
- hi
2464
+ Ci
2299
2465
  );
2300
- function yi({ context: e }) {
2301
- const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o } = se(e, "value", {
2466
+ function _i({ context: e }) {
2467
+ const { interactive: t } = se(), { value: n, setValue: r, fieldName: o } = ae(e, "value", {
2302
2468
  component: "CheckBox",
2303
2469
  changeAction: "change"
2304
- }), i = e.componentModel.properties, s = E(i.label);
2305
- return /* @__PURE__ */ N("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2306
- s ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: s }) : null,
2307
- /* @__PURE__ */ c(
2308
- Bn,
2470
+ }), i = e.componentModel.properties, s = U(i.label);
2471
+ return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2472
+ s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2473
+ /* @__PURE__ */ u(
2474
+ Dn,
2309
2475
  {
2310
2476
  disabled: !t,
2311
2477
  className: "form-block-preview-control",
2312
- checked: ke(n),
2478
+ checked: Te(n),
2313
2479
  onChange: (a) => r(a)
2314
2480
  }
2315
2481
  )
2316
2482
  ] });
2317
2483
  }
2318
- const vi = Q(
2319
- { name: "CheckBox", schema: Ce("CheckBox") },
2320
- yi
2484
+ const Ti = X(
2485
+ { name: "CheckBox", schema: xe("CheckBox") },
2486
+ _i
2321
2487
  );
2322
- function Si(e, t, n) {
2323
- const r = fe(e);
2488
+ function xi(e, t, n) {
2489
+ const r = ve(e);
2324
2490
  if (!r) return;
2325
2491
  if (!t && n) {
2326
- const i = Vt(r, "HH:mm", !0);
2492
+ const i = jt(r, "HH:mm", !0);
2327
2493
  return i.isValid() ? i : void 0;
2328
2494
  }
2329
- const o = Vt(r);
2495
+ const o = jt(r);
2330
2496
  return o.isValid() ? o : void 0;
2331
2497
  }
2332
- function bi({ context: e }) {
2333
- const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o, reportFocus: i } = se(e, "value", {
2498
+ function Mi({ context: e }) {
2499
+ const { interactive: t } = se(), { value: n, setValue: r, fieldName: o, reportFocus: i } = ae(e, "value", {
2334
2500
  component: "DateTimeInput",
2335
2501
  changeAction: "change"
2336
- }), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), u = s.enableDate === !0, m = s.enableTime === !0, d = Si(n, u, m), S = (g) => {
2502
+ }), s = e.componentModel.properties, a = U(s.label), l = U(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = xi(n, c, m), b = (g) => {
2337
2503
  if (!g) {
2338
2504
  r("");
2339
2505
  return;
2340
2506
  }
2341
- if (!u && m) {
2507
+ if (!c && m) {
2342
2508
  r(g.format("HH:mm"));
2343
2509
  return;
2344
2510
  }
2345
- if (u && m) {
2511
+ if (c && m) {
2346
2512
  r(g.format("YYYY-MM-DDTHH:mm"));
2347
2513
  return;
2348
2514
  }
2349
2515
  r(g.format("YYYY-MM-DD"));
2350
2516
  };
2351
- return /* @__PURE__ */ N("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2352
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
2353
- !u && m ? /* @__PURE__ */ c(
2354
- Ln,
2517
+ return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2518
+ a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2519
+ !c && m ? /* @__PURE__ */ u(
2520
+ Hn,
2355
2521
  {
2356
2522
  disabled: !t,
2357
2523
  className: "form-block-preview-control",
2358
2524
  style: { width: "100%" },
2359
2525
  placeholder: l || "选择时间",
2360
2526
  value: d,
2361
- onChange: S,
2527
+ onChange: b,
2362
2528
  onFocus: i
2363
2529
  }
2364
- ) : /* @__PURE__ */ c(
2365
- Vn,
2530
+ ) : /* @__PURE__ */ u(
2531
+ Kn,
2366
2532
  {
2367
- showTime: u && m,
2533
+ showTime: c && m,
2368
2534
  disabled: !t,
2369
2535
  className: "form-block-preview-control",
2370
2536
  style: { width: "100%" },
2371
- placeholder: l || (u && m ? "选择日期时间" : "选择日期"),
2537
+ placeholder: l || (c && m ? "选择日期时间" : "选择日期"),
2372
2538
  value: d,
2373
- onChange: S,
2539
+ onChange: b,
2374
2540
  onFocus: i
2375
2541
  }
2376
2542
  )
2377
2543
  ] });
2378
2544
  }
2379
- const ki = Q(
2545
+ const Ni = X(
2380
2546
  {
2381
2547
  name: "DateTimeInput",
2382
2548
  schema: h.object({
@@ -2389,8 +2555,8 @@ const ki = Q(
2389
2555
  max: h.any().optional()
2390
2556
  }).passthrough()
2391
2557
  },
2392
- bi
2393
- ), Ci = {
2558
+ Mi
2559
+ ), Ii = {
2394
2560
  name: "FileUpload",
2395
2561
  schema: h.object({
2396
2562
  label: h.any().optional(),
@@ -2402,141 +2568,141 @@ const ki = Q(
2402
2568
  value: h.any().optional()
2403
2569
  }).passthrough()
2404
2570
  };
2405
- function Ai({ context: e }) {
2406
- const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o } = se(e, "value", {
2571
+ function Fi({ context: e }) {
2572
+ const { interactive: t } = se(), { value: n, setValue: r, fieldName: o } = ae(e, "value", {
2407
2573
  component: "FileUpload",
2408
2574
  changeAction: "change"
2409
- }), i = e.componentModel.properties, s = E(i.label), a = E(i.accept), l = Array.isArray(i.fileAcceptTypes) ? i.fileAcceptTypes.map(String) : void 0, u = a ? a.split(",").map((p) => p.trim()).filter(Boolean) : void 0, m = mr(l, u), d = typeof i.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
2575
+ }), i = e.componentModel.properties, s = U(i.label), a = U(i.accept), l = Array.isArray(i.fileAcceptTypes) ? i.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((f) => f.trim()).filter(Boolean) : void 0, m = yr(l, c), d = typeof i.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
2410
2576
  i.filePlaceholderIcon
2411
- ) ? i.filePlaceholderIcon : "document", S = typeof i.minCount == "number" ? Math.max(0, i.minCount) : 0, g = typeof i.maxCount == "number" ? i.maxCount : 1, b = g > 0, y = Y(n), k = b && y.length >= g, f = y.length < S;
2412
- return /* @__PURE__ */ N("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2413
- s ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: s }) : null,
2414
- /* @__PURE__ */ N(
2415
- Je.Dragger,
2577
+ ) ? i.filePlaceholderIcon : "document", b = typeof i.minCount == "number" ? Math.max(0, i.minCount) : 0, g = typeof i.maxCount == "number" ? i.maxCount : 1, S = g > 0, y = Q(n), k = S && y.length >= g, p = y.length < b;
2578
+ return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2579
+ s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2580
+ /* @__PURE__ */ M(
2581
+ Ye.Dragger,
2416
2582
  {
2417
2583
  disabled: !t || k,
2418
- accept: ur(l, u),
2584
+ accept: gr(l, c),
2419
2585
  className: "form-file-upload-preview",
2420
2586
  showUploadList: t && y.length > 0,
2421
- fileList: t ? y.map((p, v) => ({
2422
- uid: `${v}-${p}`,
2423
- name: p,
2587
+ fileList: t ? y.map((f, v) => ({
2588
+ uid: `${v}-${f}`,
2589
+ name: f,
2424
2590
  status: "done"
2425
2591
  })) : [],
2426
- beforeUpload: (p) => {
2427
- if (!t) return Je.LIST_IGNORE;
2428
- const v = Y(Dt(e));
2429
- if (b && v.length >= g) return Je.LIST_IGNORE;
2430
- const x = b ? [...v, p.name].slice(0, g) : [...v, p.name];
2592
+ beforeUpload: (f) => {
2593
+ if (!t) return Ye.LIST_IGNORE;
2594
+ const v = Q(Ht(e));
2595
+ if (S && v.length >= g) return Ye.LIST_IGNORE;
2596
+ const x = S ? [...v, f.name].slice(0, g) : [...v, f.name];
2431
2597
  return r(x), !1;
2432
2598
  },
2433
- onRemove: (p) => {
2434
- const v = Y(Dt(e)), x = /^(\d+)-/.exec(p.uid ?? ""), I = x ? Number(x[1]) : -1, _ = I >= 0 && I < v.length ? v.filter((w, C) => C !== I) : v.filter((w) => w !== p.name);
2435
- if (_.length < S) return !1;
2599
+ onRemove: (f) => {
2600
+ const v = Q(Ht(e)), x = /^(\d+)-/.exec(f.uid ?? ""), N = x ? Number(x[1]) : -1, _ = N >= 0 && N < v.length ? v.filter((w, C) => C !== N) : v.filter((w) => w !== f.name);
2601
+ if (_.length < b) return !1;
2436
2602
  r(_);
2437
2603
  },
2438
2604
  children: [
2439
- /* @__PURE__ */ c("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ c(oi, { type: d, size: 40 }) }),
2440
- /* @__PURE__ */ c("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
2605
+ /* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(mi, { type: d, size: 40 }) }),
2606
+ /* @__PURE__ */ u("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
2441
2607
  ]
2442
2608
  }
2443
2609
  ),
2444
- /* @__PURE__ */ N(te.Text, { type: "secondary", className: "form-block-preview-help", children: [
2610
+ /* @__PURE__ */ M(ne.Text, { type: "secondary", className: "form-block-preview-help", children: [
2445
2611
  "允许:",
2446
2612
  m ?? "全部类型",
2447
- S > 0 ? `;至少 ${S} 个文件` : "",
2448
- b ? `;最多 ${g} 个文件` : "",
2613
+ b > 0 ? `;至少 ${b} 个文件` : "",
2614
+ S ? `;最多 ${g} 个文件` : "",
2449
2615
  ";当前仅收集文件名(不含文件内容,需宿主另行上传)",
2450
- f && t ? `(当前 ${y.length} 个,未达下限)` : ""
2616
+ p && t ? `(当前 ${y.length} 个,未达下限)` : ""
2451
2617
  ] })
2452
2618
  ] });
2453
2619
  }
2454
- const _i = Q(
2455
- Ci,
2456
- Ai
2620
+ const Ei = X(
2621
+ Ii,
2622
+ Fi
2457
2623
  );
2458
- function Ti({ context: e }) {
2459
- const { interactive: t } = ie(), { value: n, setValue: r, fieldName: o, reportFocus: i } = se(e, "value", {
2624
+ function Ui({ context: e }) {
2625
+ const { interactive: t } = se(), { value: n, setValue: r, fieldName: o, reportFocus: i } = ae(e, "value", {
2460
2626
  component: "TextField",
2461
2627
  changeAction: "change",
2462
2628
  debounceChange: !0
2463
- }), s = e.componentModel.properties, a = E(s.label), l = E(s.placeholder), u = E(s.variant) || "shortText", m = E(s.validationRegexp), d = fe(n) ?? "", S = !t, [g, b] = U(""), y = (p) => {
2464
- if (!m || !p.trim()) {
2465
- b("");
2629
+ }), s = e.componentModel.properties, a = U(s.label), l = U(s.placeholder), c = U(s.variant) || "shortText", m = U(s.validationRegexp), d = ve(n) ?? "", b = !t, [g, S] = P(""), y = (f) => {
2630
+ if (!m || !f.trim()) {
2631
+ S("");
2466
2632
  return;
2467
2633
  }
2468
- b(_n(p, m) ? "" : "格式不正确");
2634
+ S(In(f, m) ? "" : "格式不正确");
2469
2635
  };
2470
- z(() => {
2636
+ q(() => {
2471
2637
  y(d);
2472
2638
  }, [m, d]);
2473
2639
  const k = "form-block-preview-control";
2474
- let f;
2475
- if (u === "longText")
2476
- f = /* @__PURE__ */ c(
2477
- We.TextArea,
2640
+ let p;
2641
+ if (c === "longText")
2642
+ p = /* @__PURE__ */ u(
2643
+ Qe.TextArea,
2478
2644
  {
2479
- disabled: S,
2645
+ disabled: b,
2480
2646
  className: k,
2481
2647
  placeholder: l || "长文本回答...",
2482
2648
  autoSize: { minRows: 2, maxRows: 6 },
2483
2649
  value: d,
2484
2650
  status: g ? "error" : void 0,
2485
- onChange: (p) => {
2486
- const v = p.target.value;
2651
+ onChange: (f) => {
2652
+ const v = f.target.value;
2487
2653
  r(v), y(v);
2488
2654
  },
2489
2655
  onFocus: i,
2490
- onBlur: (p) => y(p.target.value)
2656
+ onBlur: (f) => y(f.target.value)
2491
2657
  }
2492
2658
  );
2493
- else if (u === "number") {
2494
- const p = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
2495
- f = /* @__PURE__ */ c(
2496
- jn,
2659
+ else if (c === "number") {
2660
+ const f = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
2661
+ p = /* @__PURE__ */ u(
2662
+ Jn,
2497
2663
  {
2498
- disabled: S,
2664
+ disabled: b,
2499
2665
  className: k,
2500
2666
  style: { width: "100%" },
2501
2667
  placeholder: l || "数字",
2502
- value: p,
2668
+ value: f,
2503
2669
  onChange: (v) => r(v == null ? "" : String(v)),
2504
2670
  onFocus: i
2505
2671
  }
2506
2672
  );
2507
- } else u === "obscured" ? f = /* @__PURE__ */ c(
2508
- We.Password,
2673
+ } else c === "obscured" ? p = /* @__PURE__ */ u(
2674
+ Qe.Password,
2509
2675
  {
2510
- disabled: S,
2676
+ disabled: b,
2511
2677
  className: k,
2512
2678
  placeholder: l,
2513
2679
  value: d,
2514
- onChange: (p) => r(p.target.value),
2680
+ onChange: (f) => r(f.target.value),
2515
2681
  onFocus: i
2516
2682
  }
2517
- ) : f = /* @__PURE__ */ c(
2518
- We,
2683
+ ) : p = /* @__PURE__ */ u(
2684
+ Qe,
2519
2685
  {
2520
- disabled: S,
2686
+ disabled: b,
2521
2687
  className: k,
2522
2688
  placeholder: l,
2523
2689
  value: d,
2524
2690
  status: g ? "error" : void 0,
2525
- onChange: (p) => {
2526
- const v = p.target.value;
2691
+ onChange: (f) => {
2692
+ const v = f.target.value;
2527
2693
  r(v), y(v);
2528
2694
  },
2529
2695
  onFocus: i,
2530
- onBlur: (p) => y(p.target.value)
2696
+ onBlur: (f) => y(f.target.value)
2531
2697
  }
2532
2698
  );
2533
- return /* @__PURE__ */ N("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2534
- a ? /* @__PURE__ */ c("div", { className: "form-block-preview-label", children: a }) : null,
2535
- f,
2536
- g ? /* @__PURE__ */ c(te.Text, { type: "danger", className: "form-block-preview-help", children: g }) : null
2699
+ return /* @__PURE__ */ M("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
2700
+ a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2701
+ p,
2702
+ g ? /* @__PURE__ */ u(ne.Text, { type: "danger", className: "form-block-preview-help", children: g }) : null
2537
2703
  ] });
2538
2704
  }
2539
- const xi = Q(
2705
+ const Ri = X(
2540
2706
  {
2541
2707
  name: "TextField",
2542
2708
  schema: h.object({
@@ -2547,37 +2713,37 @@ const xi = Q(
2547
2713
  value: h.any().optional()
2548
2714
  }).passthrough()
2549
2715
  },
2550
- Ti
2716
+ Ui
2551
2717
  );
2552
- function Ni({ context: e }) {
2553
- const t = e.componentModel.properties, n = E(t.text), r = E(t.variant) || "body";
2554
- return si.has(r) ? r === "caption" ? /* @__PURE__ */ c(te.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ c("em", { children: n }) }) : /* @__PURE__ */ c(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ c(te.Paragraph, { className: "form-block-preview-paragraph", children: n });
2718
+ function Pi({ context: e }) {
2719
+ const t = e.componentModel.properties, n = U(t.text), r = U(t.variant) || "body";
2720
+ return fi.has(r) ? r === "caption" ? /* @__PURE__ */ u(ne.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ u("em", { children: n }) }) : /* @__PURE__ */ u(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ u(ne.Paragraph, { className: "form-block-preview-paragraph", children: n });
2555
2721
  }
2556
- const Ii = Q(
2557
- { name: "Text", schema: Ce("Text") },
2558
- Ni
2722
+ const wi = X(
2723
+ { name: "Text", schema: xe("Text") },
2724
+ Pi
2559
2725
  );
2560
- function In() {
2726
+ function Rn() {
2561
2727
  const t = [
2562
- ...[...Fe.components.values()].filter(
2563
- (r) => !ii.has(r.name)
2728
+ ...[...Ue.components.values()].filter(
2729
+ (r) => !di.has(r.name)
2564
2730
  ),
2565
- li,
2566
- fi,
2567
- ci,
2568
- ui,
2569
- mi,
2731
+ hi,
2732
+ ki,
2570
2733
  gi,
2734
+ yi,
2571
2735
  vi,
2572
- ki,
2573
- _i,
2574
- xi,
2575
- Ii,
2576
- ...lo()
2577
- ], n = [...Fe.functions.values()];
2578
- return new Yn(xn, t, n, Fe.themeSchema);
2579
- }
2580
- const oe = {
2736
+ Ai,
2737
+ Ti,
2738
+ Ni,
2739
+ Ei,
2740
+ Ri,
2741
+ wi,
2742
+ ...vo()
2743
+ ], n = [...Ue.functions.values()];
2744
+ return new tr(En, t, n, Ue.themeSchema);
2745
+ }
2746
+ const ie = {
2581
2747
  jade9: "#29a383",
2582
2748
  jade10: "#26997b",
2583
2749
  jade11: "#208368",
@@ -2589,20 +2755,20 @@ const oe = {
2589
2755
  primaryHover: "#26997b",
2590
2756
  primaryActive: "#1d3b31",
2591
2757
  onPrimary: "#ffffff"
2592
- }, Mi = {
2758
+ }, zi = {
2593
2759
  cssVar: { key: "vidtempl" },
2594
2760
  token: {
2595
- colorPrimary: oe.primarySolid,
2596
- colorPrimaryHover: oe.primaryHover,
2597
- colorPrimaryActive: oe.primaryActive,
2598
- colorLink: oe.primary,
2599
- colorLinkHover: oe.primaryHover,
2600
- colorSuccess: oe.jade9,
2761
+ colorPrimary: ie.primarySolid,
2762
+ colorPrimaryHover: ie.primaryHover,
2763
+ colorPrimaryActive: ie.primaryActive,
2764
+ colorLink: ie.primary,
2765
+ colorLinkHover: ie.primaryHover,
2766
+ colorSuccess: ie.jade9,
2601
2767
  colorWarning: "#f5a623",
2602
2768
  gold6: "#f5a623",
2603
2769
  gold7: "#e6951a",
2604
2770
  colorError: "#e5484d",
2605
- colorInfo: oe.primary,
2771
+ colorInfo: ie.primary,
2606
2772
  colorBgLayout: "#f9f9f9",
2607
2773
  colorBgContainer: "#ffffff",
2608
2774
  colorBgElevated: "#ffffff",
@@ -2662,7 +2828,7 @@ const oe = {
2662
2828
  },
2663
2829
  Tag: {
2664
2830
  defaultBg: "#e6f7ed",
2665
- defaultColor: oe.primary,
2831
+ defaultColor: ie.primary,
2666
2832
  fontSizeSM: 13
2667
2833
  },
2668
2834
  Form: {
@@ -2674,14 +2840,14 @@ const oe = {
2674
2840
  }
2675
2841
  }
2676
2842
  };
2677
- function he({
2843
+ function be({
2678
2844
  children: e,
2679
2845
  locale: t,
2680
2846
  theme: n
2681
2847
  }) {
2682
- return /* @__PURE__ */ c($n, { theme: n ?? Mi, locale: t, children: e });
2848
+ return /* @__PURE__ */ u(Gn, { theme: n ?? zi, locale: t, children: e });
2683
2849
  }
2684
- const Fi = wn(
2850
+ const Oi = Bn(
2685
2851
  function({
2686
2852
  doc: t,
2687
2853
  surfaceId: n = "skopon-form",
@@ -2691,68 +2857,68 @@ const Fi = wn(
2691
2857
  resumeSearch: s = null,
2692
2858
  caseSearch: a = null,
2693
2859
  wrapProvider: l = !0
2694
- }, u) {
2695
- z(() => {
2696
- en(), Zt();
2860
+ }, c) {
2861
+ q(() => {
2862
+ nn(), tn();
2697
2863
  }, []);
2698
2864
  const m = A(null), d = A(i);
2699
2865
  d.current = i;
2700
- const S = j(() => {
2701
- if (ut(t)) return "";
2866
+ const b = L(() => {
2867
+ if (dt(t)) return "";
2702
2868
  try {
2703
2869
  return JSON.stringify(t);
2704
2870
  } catch {
2705
2871
  return String(t);
2706
2872
  }
2707
- }, [t]), g = j(() => {
2708
- if (!S)
2873
+ }, [t]), g = L(() => {
2874
+ if (!b)
2709
2875
  return { surfaces: [], processor: null };
2710
2876
  try {
2711
- const f = JSON.parse(S), p = new Xt([In()]), v = bo(f, {
2877
+ const p = JSON.parse(b), f = new en([Rn()]), v = No(p, {
2712
2878
  surfaceId: n,
2713
- catalogId: xn
2879
+ catalogId: En
2714
2880
  });
2715
- return p.processMessages(v), {
2716
- surfaces: Array.from(p.model.surfacesMap.values()),
2717
- processor: p
2881
+ return f.processMessages(v), {
2882
+ surfaces: Array.from(f.model.surfacesMap.values()),
2883
+ processor: f
2718
2884
  };
2719
- } catch (f) {
2720
- return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", f), { surfaces: [], processor: null };
2885
+ } catch (p) {
2886
+ return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", p), { surfaces: [], processor: null };
2721
2887
  }
2722
- }, [S, n]), { surfaces: b, processor: y } = g;
2723
- if (m.current = y, Pn(
2724
- u,
2888
+ }, [b, n]), { surfaces: S, processor: y } = g;
2889
+ if (m.current = y, Vn(
2890
+ c,
2725
2891
  () => ({
2726
- getValues(f) {
2727
- const p = m.current;
2728
- if (!p) return {};
2729
- const v = (f ?? d.current).map((x) => x.trim()).filter(Boolean);
2730
- return _o(p, n, v);
2892
+ getValues(p) {
2893
+ const f = m.current;
2894
+ if (!f) return {};
2895
+ const v = (p ?? d.current).map((x) => x.trim()).filter(Boolean);
2896
+ return Uo(f, n, v);
2731
2897
  },
2732
- setValues(f) {
2733
- const p = m.current;
2734
- if (!p) return;
2735
- const v = p.model.surfacesMap.get(n);
2898
+ setValues(p) {
2899
+ const f = m.current;
2900
+ if (!f) return;
2901
+ const v = f.model.surfacesMap.get(n);
2736
2902
  if (v)
2737
- for (const [x, I] of Object.entries(f)) {
2903
+ for (const [x, N] of Object.entries(p)) {
2738
2904
  const _ = x.trim();
2739
- _ && v.dataModel.set(`/${_}`, I);
2905
+ _ && v.dataModel.set(`/${_}`, N);
2740
2906
  }
2741
2907
  }
2742
2908
  }),
2743
2909
  [n]
2744
- ), b.length === 0) {
2745
- const f = /* @__PURE__ */ c(at, { resumeSearch: s, children: /* @__PURE__ */ c(st, { caseSearch: a, children: /* @__PURE__ */ c(it, { interactive: o, children: r }) }) });
2746
- return l ? /* @__PURE__ */ c(he, { children: f }) : f;
2910
+ ), S.length === 0) {
2911
+ const p = /* @__PURE__ */ u(ct, { resumeSearch: s, children: /* @__PURE__ */ u(lt, { caseSearch: a, children: /* @__PURE__ */ u(at, { interactive: o, children: r }) }) });
2912
+ return l ? /* @__PURE__ */ u(be, { children: p }) : p;
2747
2913
  }
2748
- const k = /* @__PURE__ */ c(at, { resumeSearch: s, children: /* @__PURE__ */ c(st, { caseSearch: a, children: /* @__PURE__ */ c(it, { interactive: o, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: b.map((f) => /* @__PURE__ */ c(Qt, { surface: f }, f.id)) }) }) }) });
2749
- return l ? /* @__PURE__ */ c(he, { children: k }) : k;
2914
+ const k = /* @__PURE__ */ u(ct, { resumeSearch: s, children: /* @__PURE__ */ u(lt, { caseSearch: a, children: /* @__PURE__ */ u(at, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: S.map((p) => /* @__PURE__ */ u(Zt, { surface: p }, p.id)) }) }) }) });
2915
+ return l ? /* @__PURE__ */ u(be, { children: k }) : k;
2750
2916
  }
2751
2917
  );
2752
- function Me() {
2753
- return new Xt([In()]);
2918
+ function Ee() {
2919
+ return new en([Rn()]);
2754
2920
  }
2755
- function us({
2921
+ function Cs({
2756
2922
  messages: e,
2757
2923
  surfaceId: t = "skopon-form-stream",
2758
2924
  emptyHint: n = null,
@@ -2760,84 +2926,84 @@ function us({
2760
2926
  resumeSearch: o = null,
2761
2927
  caseSearch: i = null
2762
2928
  }) {
2763
- z(() => {
2764
- en(), Zt();
2929
+ q(() => {
2930
+ nn(), tn();
2765
2931
  }, []);
2766
2932
  const s = A(null);
2767
- s.current === null && (s.current = Me());
2768
- const a = A(0), l = A(""), u = A(!0), m = A(t);
2769
- function d(f, p) {
2770
- s.current = f, a.current = p.length, l.current = JSON.stringify(p), u.current && (b(f), k(Array.from(f.model.surfacesMap.values())));
2933
+ s.current === null && (s.current = Ee());
2934
+ const a = A(0), l = A(""), c = A(!0), m = A(t);
2935
+ function d(p, f) {
2936
+ s.current = p, a.current = f.length, l.current = JSON.stringify(f), c.current && (S(p), k(Array.from(p.model.surfacesMap.values())));
2771
2937
  }
2772
- function S(f, p) {
2773
- if (p <= 0) return !1;
2774
- const v = JSON.stringify(f.slice(0, p)), x = l.current;
2938
+ function b(p, f) {
2939
+ if (f <= 0) return !1;
2940
+ const v = JSON.stringify(p.slice(0, f)), x = l.current;
2775
2941
  if (!x) return !0;
2776
2942
  try {
2777
- const I = JSON.parse(x);
2778
- return JSON.stringify(I.slice(0, p)) !== v;
2943
+ const N = JSON.parse(x);
2944
+ return JSON.stringify(N.slice(0, f)) !== v;
2779
2945
  } catch {
2780
2946
  return !0;
2781
2947
  }
2782
2948
  }
2783
- const [g, b] = U(
2949
+ const [g, S] = P(
2784
2950
  () => s.current
2785
- ), [y, k] = U(
2951
+ ), [y, k] = P(
2786
2952
  () => Array.from(
2787
2953
  s.current.model.surfacesMap.values()
2788
2954
  )
2789
2955
  );
2790
- return z(() => (u.current = !0, () => {
2791
- u.current = !1;
2792
- }), []), z(() => {
2956
+ return q(() => (c.current = !0, () => {
2957
+ c.current = !1;
2958
+ }), []), q(() => {
2793
2959
  s.current = g;
2794
- }, [g]), z(() => {
2795
- const f = () => {
2796
- u.current && k(Array.from(g.model.surfacesMap.values()));
2797
- }, p = g.onSurfaceCreated(f), v = g.onSurfaceDeleted(f);
2960
+ }, [g]), q(() => {
2961
+ const p = () => {
2962
+ c.current && k(Array.from(g.model.surfacesMap.values()));
2963
+ }, f = g.onSurfaceCreated(p), v = g.onSurfaceDeleted(p);
2798
2964
  return () => {
2799
- p.unsubscribe(), v.unsubscribe();
2965
+ f.unsubscribe(), v.unsubscribe();
2800
2966
  };
2801
- }, [g]), z(() => {
2802
- let f = !1;
2803
- const p = m.current !== t;
2804
- if (m.current = t, p) {
2805
- const _ = Me();
2806
- return Array.isArray(e) && e.length > 0 ? (_.processMessages(e), f || d(_, e)) : (s.current = _, a.current = 0, l.current = "", f || (b(_), k([]))), () => {
2807
- f = !0;
2967
+ }, [g]), q(() => {
2968
+ let p = !1;
2969
+ const f = m.current !== t;
2970
+ if (m.current = t, f) {
2971
+ const _ = Ee();
2972
+ return Array.isArray(e) && e.length > 0 ? (_.processMessages(e), p || d(_, e)) : (s.current = _, a.current = 0, l.current = "", p || (S(_), k([]))), () => {
2973
+ p = !0;
2808
2974
  };
2809
2975
  }
2810
2976
  if (!Array.isArray(e) || e.length === 0) {
2811
2977
  if (a.current > 0) {
2812
- const _ = Me();
2813
- s.current = _, a.current = 0, l.current = "", f || (b(_), k([]));
2978
+ const _ = Ee();
2979
+ s.current = _, a.current = 0, l.current = "", p || (S(_), k([]));
2814
2980
  }
2815
2981
  return () => {
2816
- f = !0;
2982
+ p = !0;
2817
2983
  };
2818
2984
  }
2819
2985
  const v = s.current, x = a.current;
2820
- if (e.length < x || S(e, x)) {
2821
- const _ = Me();
2822
- return _.processMessages(e), f || d(_, e), () => {
2823
- f = !0;
2986
+ if (e.length < x || b(e, x)) {
2987
+ const _ = Ee();
2988
+ return _.processMessages(e), p || d(_, e), () => {
2989
+ p = !0;
2824
2990
  };
2825
2991
  }
2826
- const I = e.slice(x);
2827
- return I.length === 0 ? () => {
2828
- f = !0;
2829
- } : (v.processMessages(I), a.current = e.length, l.current = JSON.stringify(e), f || k(Array.from(v.model.surfacesMap.values())), () => {
2830
- f = !0;
2992
+ const N = e.slice(x);
2993
+ return N.length === 0 ? () => {
2994
+ p = !0;
2995
+ } : (v.processMessages(N), a.current = e.length, l.current = JSON.stringify(e), p || k(Array.from(v.model.surfacesMap.values())), () => {
2996
+ p = !0;
2831
2997
  });
2832
- }, [e, t]), y.length === 0 ? /* @__PURE__ */ c(he, { children: n }) : /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(at, { resumeSearch: o, children: /* @__PURE__ */ c(st, { caseSearch: i, children: /* @__PURE__ */ c(it, { interactive: r, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: y.map((f) => /* @__PURE__ */ c(Qt, { surface: f }, f.id)) }) }) }) }) });
2998
+ }, [e, t]), y.length === 0 ? /* @__PURE__ */ u(be, { children: n }) : /* @__PURE__ */ u(be, { children: /* @__PURE__ */ u(ct, { resumeSearch: o, children: /* @__PURE__ */ u(lt, { caseSearch: i, children: /* @__PURE__ */ u(at, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: y.map((p) => /* @__PURE__ */ u(Zt, { surface: p }, p.id)) }) }) }) }) });
2833
2999
  }
2834
- const Ei = 100, Ri = 3e4, Ui = 1500, ce = /* @__PURE__ */ new Map();
2835
- function wi(e) {
3000
+ const qi = 100, Bi = 3e4, Vi = 1500, me = /* @__PURE__ */ new Map();
3001
+ function Li(e) {
2836
3002
  const t = e.trim();
2837
- let n = ce.get(t);
2838
- return n || (n = new Pi(t), ce.set(t, n)), n.acquire(), n;
3003
+ let n = me.get(t);
3004
+ return n || (n = new ji(t), me.set(t, n)), n.acquire(), n;
2839
3005
  }
2840
- class Pi {
3006
+ class ji {
2841
3007
  constructor(t) {
2842
3008
  G(this, "url");
2843
3009
  G(this, "ws", null);
@@ -2855,12 +3021,12 @@ class Pi {
2855
3021
  }
2856
3022
  release() {
2857
3023
  this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
2858
- this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), ce.get(this.url) === this && ce.delete(this.url));
2859
- }, Ui));
3024
+ this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), me.get(this.url) === this && me.delete(this.url));
3025
+ }, Vi));
2860
3026
  }
2861
3027
  /** 强制关闭(测试用),跳过宽限期。 */
2862
3028
  forceClose() {
2863
- this.refCount = 0, this.teardown(), ce.get(this.url) === this && ce.delete(this.url);
3029
+ this.refCount = 0, this.teardown(), me.get(this.url) === this && me.delete(this.url);
2864
3030
  }
2865
3031
  subscribe(t, n) {
2866
3032
  const r = t.trim();
@@ -2929,7 +3095,7 @@ class Pi {
2929
3095
  }
2930
3096
  }
2931
3097
  enqueue(t) {
2932
- for (this.sendQueue.push(t); this.sendQueue.length > Ei; )
3098
+ for (this.sendQueue.push(t); this.sendQueue.length > qi; )
2933
3099
  this.sendQueue.shift();
2934
3100
  }
2935
3101
  flushQueue() {
@@ -2943,7 +3109,7 @@ class Pi {
2943
3109
  if (!this.connectRequested || this.refCount <= 0) return;
2944
3110
  this.clearReconnectTimer();
2945
3111
  const t = Math.min(
2946
- Ri,
3112
+ Bi,
2947
3113
  1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
2948
3114
  );
2949
3115
  this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
@@ -2981,13 +3147,13 @@ class Pi {
2981
3147
  }
2982
3148
  }
2983
3149
  }
2984
- class zi {
3150
+ class $i {
2985
3151
  constructor(t) {
2986
3152
  G(this, "askUserMessageId");
2987
3153
  G(this, "connection");
2988
3154
  G(this, "unsubscribe");
2989
3155
  G(this, "closed", !1);
2990
- this.askUserMessageId = t.askUserMessageId.trim(), this.connection = wi(t.url);
3156
+ this.askUserMessageId = t.askUserMessageId.trim(), this.connection = Li(t.url);
2991
3157
  const n = t.onAutoControl;
2992
3158
  this.unsubscribe = n ? this.connection.subscribe(this.askUserMessageId, n) : () => {
2993
3159
  };
@@ -3002,24 +3168,24 @@ class zi {
3002
3168
  this.closed || (this.closed = !0, this.unsubscribe(), this.connection.release());
3003
3169
  }
3004
3170
  }
3005
- function Mn(e) {
3171
+ function Pn(e) {
3006
3172
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
3007
3173
  }
3008
- function Oi(e, t) {
3174
+ function Di(e, t) {
3009
3175
  if (!e) return !1;
3010
- const n = e.querySelector(`[data-skopon-field="${Mn(t)}"]`);
3176
+ const n = e.querySelector(`[data-skopon-field="${Pn(t)}"]`);
3011
3177
  return n instanceof HTMLElement ? ((n.querySelector(
3012
3178
  'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
3013
3179
  ) ?? n).focus(), !0) : !1;
3014
3180
  }
3015
- function qi(e, t) {
3181
+ function Hi(e, t) {
3016
3182
  if (!e) return !1;
3017
- const n = e.querySelector(`[data-skopon-field="${Mn(t)}"]`);
3183
+ const n = e.querySelector(`[data-skopon-field="${Pn(t)}"]`);
3018
3184
  return n instanceof HTMLElement ? ((n.querySelector(
3019
3185
  'button, [role="button"], .skopon-resume-select-card, input, label'
3020
3186
  ) ?? n).click(), !0) : !1;
3021
3187
  }
3022
- function Bi(e, t, n) {
3188
+ function Ki(e, t, n) {
3023
3189
  const r = e.action;
3024
3190
  if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
3025
3191
  console.warn("[FormAutoControl] unknown action", r);
@@ -3049,47 +3215,47 @@ function Bi(e, t, n) {
3049
3215
  return;
3050
3216
  }
3051
3217
  if (r === "focus") {
3052
- Oi(t.rootElement, o), n.reportEvent({
3218
+ Di(t.rootElement, o), n.reportEvent({
3053
3219
  action: "focus",
3054
3220
  component: i,
3055
3221
  field: o
3056
3222
  });
3057
3223
  return;
3058
3224
  }
3059
- qi(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
3225
+ Hi(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
3060
3226
  });
3061
3227
  }
3062
- function Li(e) {
3228
+ function Ji(e) {
3063
3229
  const t = {};
3064
3230
  for (const [n, r] of Object.entries(e))
3065
3231
  r !== void 0 && (t[n] = r);
3066
3232
  return t;
3067
3233
  }
3068
- function Vi(e, t) {
3234
+ function Gi(e, t) {
3069
3235
  var o;
3070
3236
  const n = (o = e.name) == null ? void 0 : o.trim();
3071
3237
  if (!n || !t) return { ...e };
3072
3238
  const r = t.get(n);
3073
3239
  return r ? e.type !== "resume_multiselect" && e.type !== "case_multiselect" ? { ...e } : { ...e, options: r.map((i) => ({ ...i })) } : { ...e };
3074
3240
  }
3075
- function ji(e) {
3241
+ function Wi(e) {
3076
3242
  var i, s;
3077
3243
  const n = {
3078
3244
  blocks: (e.blocks ?? []).map(
3079
- (a) => Vi(a, e.liveOptions)
3245
+ (a) => Gi(a, e.liveOptions)
3080
3246
  )
3081
3247
  }, r = (i = e.title) == null ? void 0 : i.trim(), o = (s = e.description) == null ? void 0 : s.trim();
3082
3248
  return r && (n.title = r), o && (n.description = o), {
3083
3249
  form_schema: n,
3084
- form_values: Li(e.values ?? {}),
3250
+ form_values: Ji(e.values ?? {}),
3085
3251
  form_change: [...e.formChange ?? []]
3086
3252
  };
3087
3253
  }
3088
- function $i(e) {
3089
- const t = Be(e);
3090
- return t ? vt(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
3254
+ function Yi(e) {
3255
+ const t = Ve(e);
3256
+ return t ? ze(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
3091
3257
  }
3092
- function Di({
3258
+ function Qi({
3093
3259
  payload: e,
3094
3260
  callbackUrl: t,
3095
3261
  title: n,
@@ -3099,70 +3265,70 @@ function Di({
3099
3265
  submitHeaders: s,
3100
3266
  onNotify: a
3101
3267
  }) {
3102
- const [l, u] = U(!1), m = A(!0);
3103
- z(() => (m.current = !0, () => {
3268
+ const [l, c] = P(!1), m = A(!0);
3269
+ q(() => (m.current = !0, () => {
3104
3270
  m.current = !1;
3105
3271
  }), []);
3106
- const d = j(
3107
- () => _t(s),
3272
+ const d = L(
3273
+ () => Tt(s),
3108
3274
  [s]
3109
- ), S = j(
3110
- () => vn(e, t, d),
3275
+ ), b = L(
3276
+ () => An(e, t, d),
3111
3277
  [e, t, d]
3112
- ), g = j(
3278
+ ), g = L(
3113
3279
  () => ({
3114
3280
  ...i,
3115
3281
  callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? t ?? null
3116
3282
  }),
3117
3283
  [i, t]
3118
3284
  );
3119
- async function b() {
3285
+ async function S() {
3120
3286
  if (!l) {
3121
- u(!0);
3287
+ c(!0);
3122
3288
  try {
3123
- const y = $i(e), k = xt({
3289
+ const y = Yi(e), k = Mt({
3124
3290
  context: g,
3125
3291
  payload: e,
3126
3292
  answer: y
3127
- }), f = await An(k, {
3293
+ }), p = await Nn(k, {
3128
3294
  headers: d
3129
3295
  });
3130
3296
  if (!m.current) return;
3131
- const p = Cn(f);
3132
- a == null || a(p.type, p.message);
3297
+ const f = Mn(p);
3298
+ a == null || a(f.type, f.message);
3133
3299
  } catch (y) {
3134
3300
  if (!m.current) return;
3135
3301
  const k = y instanceof Error ? y.message : "提交失败";
3136
3302
  a == null || a("error", k);
3137
3303
  } finally {
3138
- m.current && u(!1);
3304
+ m.current && c(!1);
3139
3305
  }
3140
3306
  }
3141
3307
  }
3142
- return /* @__PURE__ */ N("div", { className: "ask-user-curl-card", children: [
3143
- /* @__PURE__ */ N("div", { className: "ask-user-curl-card-header", children: [
3144
- /* @__PURE__ */ N("div", { className: "ask-user-curl-card-header-title", children: [
3145
- /* @__PURE__ */ c(te.Text, { type: "secondary", children: n ?? "curl 命令" }),
3146
- r ? /* @__PURE__ */ c(de, { title: r, children: /* @__PURE__ */ c(pe, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
3147
- o ? /* @__PURE__ */ c(de, { title: o, children: /* @__PURE__ */ c(pe, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
3308
+ return /* @__PURE__ */ M("div", { className: "ask-user-curl-card", children: [
3309
+ /* @__PURE__ */ M("div", { className: "ask-user-curl-card-header", children: [
3310
+ /* @__PURE__ */ M("div", { className: "ask-user-curl-card-header-title", children: [
3311
+ /* @__PURE__ */ u(ne.Text, { type: "secondary", children: n ?? "curl 命令" }),
3312
+ r ? /* @__PURE__ */ u(he, { title: r, children: /* @__PURE__ */ u(ge, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
3313
+ o ? /* @__PURE__ */ u(he, { title: o, children: /* @__PURE__ */ u(ge, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
3148
3314
  ] }),
3149
- /* @__PURE__ */ c(de, { title: "提交到 answer_agent_callback_url", children: /* @__PURE__ */ c(
3150
- Pe,
3315
+ /* @__PURE__ */ u(he, { title: "提交到 answer_agent_callback_url", children: /* @__PURE__ */ u(
3316
+ Oe,
3151
3317
  {
3152
3318
  size: "small",
3153
3319
  type: "text",
3154
3320
  loading: l,
3155
3321
  disabled: l,
3156
- onClick: () => void b(),
3322
+ onClick: () => void S(),
3157
3323
  children: "提交"
3158
3324
  }
3159
3325
  ) })
3160
3326
  ] }),
3161
- /* @__PURE__ */ c("pre", { className: "skopon-form-curl-json", children: S })
3327
+ /* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children: b })
3162
3328
  ] });
3163
3329
  }
3164
- const Hi = 80;
3165
- function Ki(e, t) {
3330
+ const Xi = 80;
3331
+ function Zi(e, t) {
3166
3332
  if (t && typeof t == "object" && t !== null && "message" in t) {
3167
3333
  const n = t.message;
3168
3334
  if (typeof n == "string" && n.trim())
@@ -3170,7 +3336,7 @@ function Ki(e, t) {
3170
3336
  }
3171
3337
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
3172
3338
  }
3173
- function Gi({
3339
+ function es({
3174
3340
  payload: e,
3175
3341
  formUniqueId: t,
3176
3342
  askUserMessageId: n,
@@ -3180,250 +3346,258 @@ function Gi({
3180
3346
  submitHeaders: s,
3181
3347
  fetchFormDetail: a,
3182
3348
  onNotify: l,
3183
- resumeSearch: u = null,
3349
+ resumeSearch: c = null,
3184
3350
  caseSearch: m = null,
3185
3351
  onSurfaceReadyChange: d,
3186
- onAutoControlReady: S
3352
+ onAutoControlReady: b
3187
3353
  }) {
3188
- const [g, b] = U(null), [y, k] = U(!1), [f, p] = U(!0), [v, x] = U(!1), I = A(null), _ = A(null), w = A(!0), C = A(l);
3354
+ const [g, S] = P(null), [y, k] = P(!1), [p, f] = P(!0), [v, x] = P(!1), N = A(null), _ = A(null), w = A(!0), C = A(l);
3189
3355
  C.current = l;
3190
- const O = sn(), B = ht(), ne = A(""), K = A(null), D = (t == null ? void 0 : t.trim()) ?? "", J = (n == null ? void 0 : n.trim()) ?? "", Z = j(
3191
- () => _t(s),
3356
+ const B = un(), V = gt(), re = A(""), K = A(null), $ = (t == null ? void 0 : t.trim()) ?? "", W = (n == null ? void 0 : n.trim()) ?? "", ee = L(
3357
+ () => Tt(s),
3192
3358
  [s]
3193
- ), ee = j(
3359
+ ), te = L(
3194
3360
  () => ({
3195
3361
  ...i,
3196
3362
  callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? r ?? null
3197
3363
  }),
3198
3364
  [i, r]
3199
3365
  );
3200
- z(() => (w.current = !0, () => {
3366
+ q(() => (w.current = !0, () => {
3201
3367
  w.current = !1, K.current != null && (clearTimeout(K.current), K.current = null);
3202
- }), []), z(() => {
3203
- let R = !1;
3204
- return D ? (p(!0), k(!1), a({ formUniqueId: D }).then((q) => {
3205
- R || (k(!!q.disabled), b(q.formDefinition ?? null));
3206
- }).catch((q) => {
3207
- var X;
3208
- if (!R) {
3209
- k(!1), b(null);
3210
- const Te = q instanceof Error ? q.message : "获取表单定义失败";
3211
- (X = C.current) == null || X.call(C, "error", Te);
3368
+ }), []), q(() => {
3369
+ let F = !1;
3370
+ return $ ? (f(!0), k(!1), a({ formUniqueId: $ }).then((O) => {
3371
+ F || (k(!!O.disabled), S(O.formDefinition ?? null));
3372
+ }).catch((O) => {
3373
+ var J;
3374
+ if (!F) {
3375
+ k(!1), S(null);
3376
+ const Ie = O instanceof Error ? O.message : "获取表单定义失败";
3377
+ (J = C.current) == null || J.call(C, "error", Ie);
3212
3378
  }
3213
3379
  }).finally(() => {
3214
- R || p(!1);
3380
+ F || f(!1);
3215
3381
  }), () => {
3216
- R = !0;
3217
- }) : (p(!1), k(!1), b(null), () => {
3218
- R = !0;
3382
+ F = !0;
3383
+ }) : (f(!1), k(!1), S(null), () => {
3384
+ F = !0;
3219
3385
  });
3220
- }, [D, a]);
3221
- const F = j(() => Be(e), [e]), L = j(() => F ? Mo(F, g ?? void 0) : null, [F, g]), T = (L == null ? void 0 : L.matchedBlocks) ?? [], V = !!(F && Eo(F) && T.length === 0), P = j(() => V && F ? Ro(F) : L && L.renderBlocks.length > 0 ? L.renderBlocks : [], [L, V, F]), M = j(
3222
- () => V ? {} : vt((L == null ? void 0 : L.extraBlocks) ?? []),
3223
- [V, L]
3224
- ), W = j(() => V && F ? Uo(F) : P.filter((R) => {
3225
- var q;
3226
- return (q = R.name) == null ? void 0 : q.trim();
3227
- }).map((R) => R.name.trim()), [V, F, P]), Ae = (L == null ? void 0 : L.title) ?? (F == null ? void 0 : F.title) ?? "", _e = (L == null ? void 0 : L.description) ?? (F == null ? void 0 : F.description) ?? "", le = j(() => P.length === 0 ? null : Co(
3228
- { title: Ae, description: _e },
3229
- P
3230
- ), [Ae, _e, P]), je = j(() => {
3231
- if (!le) return "";
3386
+ }, [$, a]);
3387
+ const E = L(() => Ve(e), [e]), R = L(() => E ? Oo(E, g ?? void 0) : null, [E, g]), T = (R == null ? void 0 : R.matchedBlocks) ?? [], D = !!(E && qo(E) && T.length === 0), z = L(() => D && E ? Bo(E) : R && R.renderBlocks.length > 0 ? R.renderBlocks : [], [R, D, E]), I = L(() => {
3388
+ if (D && E)
3389
+ return Vo(E);
3390
+ const F = ze((R == null ? void 0 : R.extraBlocks) ?? []);
3391
+ return { ...ze(
3392
+ ((R == null ? void 0 : R.matchedBlocks) ?? []).filter(
3393
+ (J) => J.type === "text" && J.hidden === !0
3394
+ )
3395
+ ), ...F };
3396
+ }, [D, E, R]), Y = L(
3397
+ () => z.filter((F) => {
3398
+ var O;
3399
+ return (O = F.name) == null ? void 0 : O.trim();
3400
+ }).map((F) => F.name.trim()),
3401
+ [z]
3402
+ ), Me = (R == null ? void 0 : R.title) ?? (E == null ? void 0 : E.title) ?? "", Ne = (R == null ? void 0 : R.description) ?? (E == null ? void 0 : E.description) ?? "", ce = L(() => z.length === 0 ? null : Fo(
3403
+ { title: Me, description: Ne },
3404
+ z
3405
+ ), [Me, Ne, z]), $e = L(() => {
3406
+ if (!ce) return "";
3232
3407
  try {
3233
- return JSON.stringify(le);
3408
+ return JSON.stringify(ce);
3234
3409
  } catch {
3235
- return String(le);
3410
+ return String(ce);
3236
3411
  }
3237
- }, [le]), $e = D ? `ask-user-${D}` : "ask-user-payload", re = !!(!f && F && P.length > 0 && le);
3238
- z(() => (d(re), () => d(!1)), [re, d]);
3239
- const It = $(() => {
3240
- var q;
3241
- return { ...((q = I.current) == null ? void 0 : q.getValues(W)) ?? {}, ...M };
3242
- }, [W, M]), Mt = A(B.liveOptions);
3243
- Mt.current = B.liveOptions;
3244
- const De = A(B.pendingChangeFields);
3245
- De.current = B.pendingChangeFields;
3246
- const ue = $(
3247
- (R) => {
3248
- const q = ji({
3249
- title: Ae,
3250
- description: _e,
3251
- blocks: P,
3412
+ }, [ce]), De = $ ? `ask-user-${$}` : "ask-user-payload", oe = !!(!p && E && z.length > 0 && ce);
3413
+ q(() => (d(oe), () => d(!1)), [oe, d]);
3414
+ const It = j(() => {
3415
+ var O;
3416
+ return { ...((O = N.current) == null ? void 0 : O.getValues(Y)) ?? {}, ...I };
3417
+ }, [Y, I]), Ft = A(V.liveOptions);
3418
+ Ft.current = V.liveOptions;
3419
+ const He = A(V.pendingChangeFields);
3420
+ He.current = V.pendingChangeFields;
3421
+ const fe = j(
3422
+ (F) => {
3423
+ const O = Wi({
3424
+ title: Me,
3425
+ description: Ne,
3426
+ blocks: z,
3252
3427
  values: It(),
3253
- liveOptions: Mt.current,
3254
- formChange: R
3428
+ liveOptions: Ft.current,
3429
+ formChange: F
3255
3430
  });
3256
- O.reportData(q);
3431
+ B.reportData(O);
3257
3432
  },
3258
- [Ae, _e, P, It, O]
3259
- ), He = A(ue);
3260
- He.current = ue, z(() => {
3261
- if (!re) {
3262
- ne.current = "";
3433
+ [Me, Ne, z, It, B]
3434
+ ), Ke = A(fe);
3435
+ Ke.current = fe, q(() => {
3436
+ if (!oe) {
3437
+ re.current = "";
3263
3438
  return;
3264
3439
  }
3265
- if (!je) return;
3266
- const R = `${$e}::${je}`;
3267
- if (ne.current === R) return;
3268
- const q = setTimeout(() => {
3269
- w.current && ne.current !== R && (ne.current = R, He.current([]));
3440
+ if (!$e) return;
3441
+ const F = `${De}::${$e}`;
3442
+ if (re.current === F) return;
3443
+ const O = setTimeout(() => {
3444
+ w.current && re.current !== F && (re.current = F, Ke.current([]));
3270
3445
  }, 0);
3271
- return () => clearTimeout(q);
3272
- }, [re, $e, je]), z(() => {
3273
- if (!(!re || B.version === 0) && De.current.length !== 0)
3446
+ return () => clearTimeout(O);
3447
+ }, [oe, De, $e]), q(() => {
3448
+ if (!(!oe || V.version === 0) && He.current.length !== 0)
3274
3449
  return K.current != null && clearTimeout(K.current), K.current = setTimeout(() => {
3275
3450
  if (K.current = null, !w.current) return;
3276
- const R = [...De.current];
3277
- B.clearPendingChangeFields(), R.length !== 0 && He.current(R);
3278
- }, Hi), () => {
3451
+ const F = [...He.current];
3452
+ V.clearPendingChangeFields(), F.length !== 0 && Ke.current(F);
3453
+ }, Xi), () => {
3279
3454
  K.current != null && (clearTimeout(K.current), K.current = null);
3280
3455
  };
3281
- }, [re, B.version, B.clearPendingChangeFields]);
3282
- const Ke = $(async () => {
3283
- var R, q, X, Te, Rt, Ut, wt, Pt;
3456
+ }, [oe, V.version, V.clearPendingChangeFields]);
3457
+ const Je = j(async () => {
3458
+ var F, O, J, Ie, Rt, Pt, wt, zt;
3284
3459
  if (!v) {
3285
3460
  x(!0);
3286
3461
  try {
3287
- const me = ((R = I.current) == null ? void 0 : R.getValues(W)) ?? {}, xe = ni(P, me);
3288
- if (xe) {
3289
- (q = C.current) == null || q.call(C, "error", xe.message);
3462
+ const pe = { ...((F = N.current) == null ? void 0 : F.getValues(Y)) ?? {}, ...I }, Ot = ci(z, pe);
3463
+ if (Ot) {
3464
+ (O = C.current) == null || O.call(C, "error", Ot.message);
3290
3465
  return;
3291
3466
  }
3292
- const zt = { ...me, ...M };
3293
3467
  if (o === "post") {
3294
3468
  const Lt = (r ?? "").trim();
3295
3469
  if (!Lt) {
3296
- (X = C.current) == null || X.call(C, "error", "callback_url 为空,无法提交");
3470
+ (J = C.current) == null || J.call(C, "error", "callback_url 为空,无法提交");
3297
3471
  return;
3298
3472
  }
3299
- ue([]), O.reportEvent({
3473
+ fe([]), B.reportEvent({
3300
3474
  action: "submit",
3301
3475
  component: "SubmitButton"
3302
3476
  });
3303
- const Ge = await Sn(Lt, zt, {
3304
- headers: Z
3477
+ const We = await _n(Lt, pe, {
3478
+ headers: ee
3305
3479
  });
3306
3480
  if (!w.current) return;
3307
- Ge.ok ? (Te = C.current) == null || Te.call(C, "success", "提交成功") : (Rt = C.current) == null || Rt.call(C, "error", Ki(Ge.status, Ge.body));
3481
+ We.ok ? (Ie = C.current) == null || Ie.call(C, "success", "提交成功") : (Rt = C.current) == null || Rt.call(C, "error", Zi(We.status, We.body));
3308
3482
  return;
3309
3483
  }
3310
- const Ot = xt({
3311
- context: ee,
3484
+ const qt = Mt({
3485
+ context: te,
3312
3486
  payload: e,
3313
- form: g ?? F,
3314
- answer: zt
3315
- }), qt = Nt(Ot);
3316
- if (qt) {
3317
- (Ut = C.current) == null || Ut.call(C, "error", qt);
3487
+ form: g ?? E,
3488
+ answer: pe
3489
+ }), Bt = Nt(qt);
3490
+ if (Bt) {
3491
+ (Pt = C.current) == null || Pt.call(C, "error", Bt);
3318
3492
  return;
3319
3493
  }
3320
- ue([]), O.reportEvent({
3494
+ fe([]), B.reportEvent({
3321
3495
  action: "submit",
3322
3496
  component: "SubmitButton"
3323
3497
  });
3324
- const Fn = await An(Ot, {
3325
- headers: Z
3498
+ const wn = await Nn(qt, {
3499
+ headers: ee
3326
3500
  });
3327
3501
  if (!w.current) return;
3328
- const Bt = Cn(Fn);
3329
- (wt = C.current) == null || wt.call(C, Bt.type, Bt.message);
3330
- } catch (me) {
3502
+ const Vt = Mn(wn);
3503
+ (wt = C.current) == null || wt.call(C, Vt.type, Vt.message);
3504
+ } catch (Ge) {
3331
3505
  if (!w.current) return;
3332
- const xe = me instanceof Error ? me.message : "提交失败";
3333
- (Pt = C.current) == null || Pt.call(C, "error", xe);
3506
+ const pe = Ge instanceof Error ? Ge.message : "提交失败";
3507
+ (zt = C.current) == null || zt.call(C, "error", pe);
3334
3508
  } finally {
3335
3509
  w.current && x(!1);
3336
3510
  }
3337
3511
  }
3338
3512
  }, [
3339
3513
  v,
3340
- W,
3341
- P,
3342
- M,
3343
- ue,
3344
- O,
3514
+ Y,
3515
+ z,
3516
+ I,
3517
+ fe,
3518
+ B,
3345
3519
  o,
3346
3520
  r,
3347
- Z,
3348
3521
  ee,
3522
+ te,
3349
3523
  e,
3350
3524
  g,
3351
- F
3352
- ]), Ft = A(Ke);
3353
- Ft.current = Ke;
3354
- const Et = $(
3355
- (R) => {
3356
- Bi(
3357
- R,
3525
+ E
3526
+ ]), Et = A(Je);
3527
+ Et.current = Je;
3528
+ const Ut = j(
3529
+ (F) => {
3530
+ Ki(
3531
+ F,
3358
3532
  {
3359
- setValues: (q) => {
3360
- var X;
3361
- return (X = I.current) == null ? void 0 : X.setValues(q);
3533
+ setValues: (O) => {
3534
+ var J;
3535
+ return (J = N.current) == null ? void 0 : J.setValues(O);
3362
3536
  },
3363
- getValues: (q) => {
3364
- var X;
3365
- return ((X = I.current) == null ? void 0 : X.getValues(q)) ?? {};
3537
+ getValues: (O) => {
3538
+ var J;
3539
+ return ((J = N.current) == null ? void 0 : J.getValues(O)) ?? {};
3366
3540
  },
3367
- submit: () => Ft.current(),
3541
+ submit: () => Et.current(),
3368
3542
  rootElement: _.current
3369
3543
  },
3370
3544
  {
3371
- reportEvent: O.reportEvent,
3372
- runAutoControl: O.runAutoControl
3545
+ reportEvent: B.reportEvent,
3546
+ runAutoControl: B.runAutoControl
3373
3547
  }
3374
3548
  );
3375
3549
  },
3376
- [O]
3550
+ [B]
3377
3551
  );
3378
- return z(() => {
3379
- if (!re) {
3380
- S(null);
3552
+ return q(() => {
3553
+ if (!oe) {
3554
+ b(null);
3381
3555
  return;
3382
3556
  }
3383
- return S(Et), () => S(null);
3384
- }, [re, Et, S]), f ? /* @__PURE__ */ c("div", { className: "ask-user-form-card", children: /* @__PURE__ */ c(mt, { size: "small" }) }) : !F || P.length === 0 ? /* @__PURE__ */ c(
3385
- Di,
3557
+ return b(Ut), () => b(null);
3558
+ }, [oe, Ut, b]), p ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(ft, { size: "small" }) }) : !E || z.length === 0 ? /* @__PURE__ */ u(
3559
+ Qi,
3386
3560
  {
3387
3561
  payload: e,
3388
3562
  callbackUrl: r,
3389
- answerAgentContext: ee,
3563
+ answerAgentContext: te,
3390
3564
  submitHeaders: s,
3391
- unpublishedFormId: y && D ? D : void 0,
3565
+ unpublishedFormId: y && $ ? $ : void 0,
3392
3566
  onNotify: l
3393
3567
  }
3394
- ) : /* @__PURE__ */ N(
3568
+ ) : /* @__PURE__ */ M(
3395
3569
  "div",
3396
3570
  {
3397
3571
  className: "ask-user-form-card",
3398
3572
  ref: _,
3399
- "data-ask-user-message-id": J || void 0,
3573
+ "data-ask-user-message-id": W || void 0,
3400
3574
  children: [
3401
- y && D ? /* @__PURE__ */ c("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ c(de, { title: D, children: /* @__PURE__ */ c(pe, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
3402
- /* @__PURE__ */ c(
3403
- Fi,
3575
+ y && $ ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(he, { title: $, children: /* @__PURE__ */ u(ge, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
3576
+ /* @__PURE__ */ u(
3577
+ Oi,
3404
3578
  {
3405
- ref: I,
3406
- doc: le,
3407
- surfaceId: $e,
3408
- fieldNames: W,
3579
+ ref: N,
3580
+ doc: ce,
3581
+ surfaceId: De,
3582
+ fieldNames: Y,
3409
3583
  interactive: !0,
3410
3584
  wrapProvider: !1,
3411
- resumeSearch: u,
3585
+ resumeSearch: c,
3412
3586
  caseSearch: m
3413
3587
  }
3414
3588
  ),
3415
- /* @__PURE__ */ c("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ c(
3416
- de,
3589
+ /* @__PURE__ */ u("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ u(
3590
+ he,
3417
3591
  {
3418
3592
  title: o === "post" ? "提交 JSON 到 callback_url" : "提交到 answer_agent_callback_url",
3419
- children: /* @__PURE__ */ c(
3420
- Pe,
3593
+ children: /* @__PURE__ */ u(
3594
+ Oe,
3421
3595
  {
3422
3596
  type: "primary",
3423
3597
  size: "small",
3424
3598
  loading: v,
3425
3599
  disabled: v,
3426
- onClick: () => void Ke(),
3600
+ onClick: () => void Je(),
3427
3601
  children: "提交"
3428
3602
  }
3429
3603
  )
@@ -3433,16 +3607,16 @@ function Gi({
3433
3607
  }
3434
3608
  );
3435
3609
  }
3436
- function ms(e) {
3437
- var u;
3438
- const t = ((u = e.askUserMessageId) == null ? void 0 : u.trim()) ?? "", n = j(() => jo(), []), [r, o] = U(!1), i = A(null), s = $((m) => {
3610
+ function As(e) {
3611
+ var c;
3612
+ const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = L(() => Wo(), []), [r, o] = P(!1), i = A(null), s = j((m) => {
3439
3613
  o(m);
3440
- }, []), a = $(
3614
+ }, []), a = j(
3441
3615
  (m) => {
3442
3616
  i.current = m;
3443
3617
  },
3444
3618
  []
3445
- ), l = j(() => !n || !t ? null : new zi({
3619
+ ), l = L(() => !n || !t ? null : new $i({
3446
3620
  url: n,
3447
3621
  askUserMessageId: t,
3448
3622
  onAutoControl: (m) => {
@@ -3450,15 +3624,15 @@ function ms(e) {
3450
3624
  (d = i.current) == null || d.call(i, m);
3451
3625
  }
3452
3626
  }), [n, t]);
3453
- return z(() => {
3627
+ return q(() => {
3454
3628
  if (l)
3455
3629
  return () => {
3456
3630
  l.close();
3457
3631
  };
3458
- }, [l]), z(() => {
3632
+ }, [l]), q(() => {
3459
3633
  !l || !r || l.connect();
3460
- }, [l, r]), /* @__PURE__ */ c(he, { children: /* @__PURE__ */ c(Pr, { client: l, children: /* @__PURE__ */ c(Er, { children: /* @__PURE__ */ c(
3461
- Gi,
3634
+ }, [l, r]), /* @__PURE__ */ u(be, { children: /* @__PURE__ */ u(Dr, { client: l, children: /* @__PURE__ */ u(Vr, { children: /* @__PURE__ */ u(
3635
+ es,
3462
3636
  {
3463
3637
  ...e,
3464
3638
  onSurfaceReadyChange: s,
@@ -3467,61 +3641,71 @@ function ms(e) {
3467
3641
  ) }) }) });
3468
3642
  }
3469
3643
  export {
3470
- is as A2UI_PROTOCOL_VERSION,
3471
- ms as AskUserFormCard,
3472
- st as CaseSearchProvider,
3473
- Di as CurlSubmitBlock,
3474
- Bo as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
3475
- Oo as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
3476
- qo as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
3477
- kt as DEFAULT_AUTH_STORAGE_KEY,
3478
- zo as DEFAULT_AUTH_TOKEN_FIELD,
3479
- Qn as FORM_MEDIA_SIZES,
3480
- at as ResumeSearchProvider,
3481
- us as SkoponA2uiStreamRenderer,
3482
- he as SkoponFormProvider,
3483
- Fi as SkoponFormRenderer,
3484
- So as a2uiToBlocks,
3485
- fn as blocksToA2ui,
3486
- xt as buildAnswerAgentBody,
3487
- wo as buildAskUserCurlBodyJson,
3488
- Po as buildAskUserCurlStatement,
3489
- ss as buildAskUserSubmitCurlFromPayload,
3490
- Co as buildAskUserSurface,
3491
- vn as buildCurlStatement,
3492
- as as copyTextToClipboard,
3493
- ei as createCaseSearchClient,
3494
- $o as createFormClient,
3495
- Yo as createResumeSearchClient,
3496
- cs as createSkoponSdkClients,
3497
- vt as extractExtraBlockValues,
3498
- _o as extractSurfaceValues,
3499
- Cn as formatAnswerAgentSubmitMessage,
3500
- Uo as getPayloadInputFieldNames,
3501
- Ro as getPayloadRenderableBlocks,
3502
- Mo as intersectPayloadBlocksWithForm,
3503
- ut as isA2uiSurfaceEmpty,
3504
- ae as isInputBlockType,
3505
- ze as isLayoutBlockType,
3506
- Ee as isMediaBlockType,
3507
- Ao as mapFormDefinitionFromDto,
3508
- Oe as normalizeFormDefinition,
3509
- Be as parsePayloadBlocksJson,
3510
- Eo as payloadHasInputBlocks,
3511
- Vo as resolveAnswerAgentCallbackUrl,
3512
- Tt as resolveClientHeaders,
3513
- jo as resolveRealtimeWsUrl,
3514
- bn as resolveSkoponAuthHeaders,
3515
- _t as resolveSubmitAuthHeaders,
3516
- ko as resolveSurfaceFromFormDefinition,
3517
- Mi as skoponAntdTheme,
3518
- oe as skoponBrandColors,
3519
- An as submitAnswerAgent,
3520
- Sn as submitFormJson,
3521
- bo as surfaceDocToMessages,
3522
- Re as syncFormDefinition,
3523
- qr as useCaseSearch,
3524
- Gr as useResumeSearch,
3644
+ ds as A2UI_PROTOCOL_VERSION,
3645
+ As as AskUserFormCard,
3646
+ lt as CaseSearchProvider,
3647
+ Qi as CurlSubmitBlock,
3648
+ Ko as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
3649
+ Do as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
3650
+ Ho as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
3651
+ Ct as DEFAULT_AUTH_STORAGE_KEY,
3652
+ $o as DEFAULT_AUTH_TOKEN_FIELD,
3653
+ nr as FORM_MEDIA_SIZES,
3654
+ ct as ResumeSearchProvider,
3655
+ Cs as SkoponA2uiStreamRenderer,
3656
+ be as SkoponFormProvider,
3657
+ Oi as SkoponFormRenderer,
3658
+ Mo as a2uiToBlocks,
3659
+ vn as blocksToA2ui,
3660
+ Pr as blocksToJsonSchema,
3661
+ Mt as buildAnswerAgentBody,
3662
+ Lo as buildAskUserCurlBodyJson,
3663
+ jo as buildAskUserCurlStatement,
3664
+ vs as buildAskUserSubmitCurlFromPayload,
3665
+ Fo as buildAskUserSurface,
3666
+ An as buildCurlStatement,
3667
+ Te as coerceToggleValue,
3668
+ bs as copyTextToClipboard,
3669
+ ai as createCaseSearchClient,
3670
+ gs as createEmptyBlock,
3671
+ hs as createEmptyFormDefinition,
3672
+ Yo as createFormClient,
3673
+ ri as createResumeSearchClient,
3674
+ ks as createSkoponSdkClients,
3675
+ ze as extractExtraBlockValues,
3676
+ Uo as extractSurfaceValues,
3677
+ Mn as formatAnswerAgentSubmitMessage,
3678
+ Vo as getPayloadHiddenBlockValues,
3679
+ ys as getPayloadInputFieldNames,
3680
+ Bo as getPayloadRenderableBlocks,
3681
+ Oo as intersectPayloadBlocksWithForm,
3682
+ dt as isA2uiSurfaceEmpty,
3683
+ fs as isDisplayBlockType,
3684
+ Z as isInputBlockType,
3685
+ Ce as isLayoutBlockType,
3686
+ de as isMediaBlockType,
3687
+ rr as isOptionsBlockType,
3688
+ Eo as mapFormDefinitionFromDto,
3689
+ qe as normalizeFormDefinition,
3690
+ ue as normalizeMultiselectCount,
3691
+ Ve as parsePayloadBlocksJson,
3692
+ qo as payloadHasInputBlocks,
3693
+ Go as resolveAnswerAgentCallbackUrl,
3694
+ xt as resolveClientHeaders,
3695
+ Wo as resolveRealtimeWsUrl,
3696
+ Ur as resolveSchemaDefaultValue,
3697
+ Tn as resolveSkoponAuthHeaders,
3698
+ Tt as resolveSubmitAuthHeaders,
3699
+ Io as resolveSurfaceFromFormDefinition,
3700
+ zi as skoponAntdTheme,
3701
+ ie as skoponBrandColors,
3702
+ Nn as submitAnswerAgent,
3703
+ _n as submitFormJson,
3704
+ ps as supportsDefaultValue,
3705
+ No as surfaceDocToMessages,
3706
+ ye as syncFormDefinition,
3707
+ Jr as useCaseSearch,
3708
+ no as useResumeSearch,
3525
3709
  Nt as validateAnswerAgentBody,
3526
- ls as validateAnswerAgentContext
3710
+ Ss as validateAnswerAgentContext
3527
3711
  };