@skopon-cool/form-sdk 0.5.0 → 0.5.1

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