@skopon-cool/form-sdk 0.3.0 → 0.3.2

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