@skopon-cool/form-sdk 0.6.2 → 0.6.3

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,18 +1,18 @@
1
1
  import './form-sdk.css';
2
2
  var fr = Object.defineProperty;
3
- var pr = (e, t, n) => t in e ? fr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
- var re = (e, t, n) => pr(e, typeof t != "symbol" ? t + "" : t, n);
5
- import { jsx as u, jsxs as B } from "react/jsx-runtime";
6
- import { useRef as T, useState as E, useCallback as V, useMemo as W, createContext as Ce, useContext as Ae, useEffect as O, useSyncExternalStore as hr, forwardRef as gr, useImperativeHandle as yr } from "react";
7
- import { Spin as Rt, Button as qe, Typography as ue, Avatar as vr, Tag as Ee, Tooltip as Fe, Modal as br, Select as kt, Checkbox as Sr, Radio as Cr, Switch as Ar, TimePicker as kr, DatePicker as _r, Upload as ft, Input as pt, InputNumber as Tr, ConfigProvider as xr } from "antd";
8
- import { ReloadOutlined as Sn, FileTextOutlined as Cn, UserOutlined as Fr, FileImageOutlined as Ur, CaretRightOutlined as Ir, FullscreenOutlined as Mr, FileExcelOutlined as Nr, FileOutlined as An, PictureOutlined as Er, SoundOutlined as Rr, VideoCameraOutlined as Pr } from "@ant-design/icons";
9
- import { createBinderlessComponentImplementation as oe, basicCatalog as Ye, A2uiSurface as kn } from "@a2ui/react/v0_9";
3
+ var hr = (e, t, n) => t in e ? fr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
4
+ var ae = (e, t, n) => hr(e, typeof t != "symbol" ? t + "" : t, n);
5
+ import { jsx as u, jsxs as w } from "react/jsx-runtime";
6
+ import { useRef as _, useState as R, useCallback as V, useMemo as G, createContext as Ce, useContext as Ae, useEffect as z, useSyncExternalStore as gr, forwardRef as yr, useImperativeHandle as vr } from "react";
7
+ import { Spin as Rt, Button as qe, Typography as le, Avatar as Sr, Tag as Ee, Tooltip as Fe, Modal as br, Select as kt, Checkbox as Cr, Radio as Ar, Switch as kr, TimePicker as _r, DatePicker as Tr, Image as rn, Upload as pt, Input as ft, InputNumber as xr, ConfigProvider as Fr } from "antd";
8
+ import { ReloadOutlined as Cn, FileTextOutlined as An, UserOutlined as Ur, FileImageOutlined as Ir, CaretRightOutlined as Mr, FullscreenOutlined as Nr, FileExcelOutlined as Er, FileOutlined as kn, PictureOutlined as Rr, SoundOutlined as wr, VideoCameraOutlined as Pr } from "@ant-design/icons";
9
+ import { createBinderlessComponentImplementation as ce, basicCatalog as Ye, A2uiSurface as _n } from "@a2ui/react/v0_9";
10
10
  import { z as g } from "zod";
11
- import { Catalog as wr, MessageProcessor as _n } from "@a2ui/web_core/v0_9";
12
- import { injectBasicCatalogStyles as Tn } from "@a2ui/web_core/v0_9/basic_catalog";
13
- import { injectStyles as xn } from "@a2ui/react/styles";
14
- import rn from "dayjs";
15
- const ka = "v0.9", zr = [
11
+ import { Catalog as zr, MessageProcessor as Tn } from "@a2ui/web_core/v0_9";
12
+ import { injectBasicCatalogStyles as xn } from "@a2ui/web_core/v0_9/basic_catalog";
13
+ import { injectStyles as Fn } from "@a2ui/react/styles";
14
+ import on from "dayjs";
15
+ const _a = "v0.9", Or = [
16
16
  "huge",
17
17
  "large",
18
18
  "medium",
@@ -22,35 +22,35 @@ const ka = "v0.9", zr = [
22
22
  function Re(e) {
23
23
  return e === "image" || e === "video" || e === "audio";
24
24
  }
25
- function Pe(e) {
25
+ function we(e) {
26
26
  return e === "web";
27
27
  }
28
- function Fn(e) {
28
+ function Un(e) {
29
29
  return e === "heading" || e === "paragraph";
30
30
  }
31
- function se(e) {
32
- return !Fn(e) && !Re(e) && !Pe(e);
33
- }
34
- function Un(e) {
35
- return Fn(e) || Re(e) || Pe(e);
31
+ function ue(e) {
32
+ return !Un(e) && !Re(e) && !we(e);
36
33
  }
37
34
  function In(e) {
35
+ return Un(e) || Re(e) || we(e);
36
+ }
37
+ function Mn(e) {
38
38
  return e === "select" || e === "multiselect" || e === "radio" || e === "checkbox";
39
39
  }
40
- function _a(e) {
41
- return se(e) && e !== "file" && e !== "resume_multiselect" && e !== "case_multiselect";
40
+ function Ta(e) {
41
+ return ue(e) && e !== "file" && e !== "resume_multiselect" && e !== "case_multiselect";
42
42
  }
43
- const _t = 360, Or = 200, qr = 1200;
43
+ const _t = 360, qr = 200, Lr = 1200;
44
44
  function Le(e) {
45
45
  if (e == null || e === "")
46
46
  return _t;
47
47
  const t = typeof e == "number" ? e : Number(e);
48
48
  return Number.isFinite(t) ? Math.min(
49
- qr,
50
- Math.max(Or, Math.floor(t))
49
+ Lr,
50
+ Math.max(qr, Math.floor(t))
51
51
  ) : _t;
52
52
  }
53
- function Lr(e) {
53
+ function Br(e) {
54
54
  if (typeof e != "string") return !1;
55
55
  const t = e.trim();
56
56
  if (!t) return !1;
@@ -64,7 +64,7 @@ function Lr(e) {
64
64
  return !1;
65
65
  }
66
66
  }
67
- function Br() {
67
+ function Dr() {
68
68
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
69
69
  return crypto.randomUUID();
70
70
  if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
@@ -78,11 +78,11 @@ function Br() {
78
78
  return (e === "x" ? t : t & 3 | 8).toString(16);
79
79
  });
80
80
  }
81
- function Se(e) {
82
- const t = Br().replace(/-/g, "").slice(0, 8);
81
+ function be(e) {
82
+ const t = Dr().replace(/-/g, "").slice(0, 8);
83
83
  return `${e}${t}`;
84
84
  }
85
- const Mn = [
85
+ const Nn = [
86
86
  { value: "image/*", label: "图片" },
87
87
  { value: "video/*", label: "视频" },
88
88
  { value: "audio/*", label: "音频" },
@@ -93,7 +93,7 @@ const Mn = [
93
93
  { value: "text/plain", label: "纯文本" },
94
94
  { value: "application/zip", label: "ZIP 压缩包" },
95
95
  { value: "application/x-rar-compressed", label: "RAR 压缩包" }
96
- ], Dr = {
96
+ ], Vr = {
97
97
  "image/*": ["image/*"],
98
98
  "video/*": ["video/*"],
99
99
  "audio/*": ["audio/*"],
@@ -113,7 +113,7 @@ const Mn = [
113
113
  "text/plain": ["text/plain"],
114
114
  "application/zip": ["application/zip"],
115
115
  "application/x-rar-compressed": ["application/x-rar-compressed"]
116
- }, Vr = {
116
+ }, $r = {
117
117
  "image/*": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"],
118
118
  "video/*": [".mp4", ".mov", ".avi", ".webm"],
119
119
  "audio/*": [".mp3", ".wav", ".ogg", ".m4a"],
@@ -124,14 +124,14 @@ const Mn = [
124
124
  "text/plain": [".txt"],
125
125
  "application/zip": [".zip", ".7z"],
126
126
  "application/x-rar-compressed": [".rar"]
127
- }, $r = {
127
+ }, jr = {
128
128
  "application/msword": "office/word",
129
129
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
130
130
  "application/vnd.ms-excel": "office/excel",
131
131
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "office/excel",
132
132
  "application/vnd.ms-powerpoint": "office/ppt",
133
133
  "application/vnd.openxmlformats-officedocument.presentationml.presentation": "office/ppt"
134
- }, Pt = [
134
+ }, wt = [
135
135
  { value: ".jpg", label: ".jpg" },
136
136
  { value: ".jpeg", label: ".jpeg" },
137
137
  { value: ".png", label: ".png" },
@@ -157,18 +157,18 @@ const Mn = [
157
157
  { value: ".zip", label: ".zip" },
158
158
  { value: ".rar", label: ".rar" },
159
159
  { value: ".7z", label: ".7z" }
160
- ], jr = Object.fromEntries(
161
- Mn.map((e) => [e.value, e.label])
162
- ), Hr = Object.fromEntries(
163
- Pt.map((e) => [e.value, e.label])
164
- ), Kr = new Set(Mn.map((e) => e.value)), Wr = new Set(
165
- Pt.map((e) => e.value)
160
+ ], Hr = Object.fromEntries(
161
+ Nn.map((e) => [e.value, e.label])
162
+ ), Kr = Object.fromEntries(
163
+ wt.map((e) => [e.value, e.label])
164
+ ), Wr = new Set(Nn.map((e) => e.value)), Gr = new Set(
165
+ wt.map((e) => e.value)
166
166
  );
167
- function Gr(e) {
167
+ function Jr(e) {
168
168
  const t = e.trim();
169
- return t ? Kr.has(t) ? t : $r[t] ?? null : null;
169
+ return t ? Wr.has(t) ? t : jr[t] ?? null : null;
170
170
  }
171
- function Jr(e) {
171
+ function Yr(e) {
172
172
  return Array.isArray(e) ? e.map((t) => {
173
173
  const n = t.trim().toLowerCase();
174
174
  return n ? n.startsWith(".") ? n : `.${n}` : "";
@@ -178,80 +178,80 @@ function Be(e) {
178
178
  if (!Array.isArray(e)) return [];
179
179
  const t = [], n = /* @__PURE__ */ new Set();
180
180
  for (const r of e) {
181
- const o = Gr(r);
181
+ const o = Jr(r);
182
182
  o && !n.has(o) && (n.add(o), t.push(o));
183
183
  }
184
184
  return t;
185
185
  }
186
- function Yr(e) {
186
+ function Qr(e) {
187
187
  const t = Be(e), n = [];
188
188
  for (const r of t)
189
- n.push(...Dr[r] ?? [r]);
189
+ n.push(...Vr[r] ?? [r]);
190
190
  return n;
191
191
  }
192
- function Qr(e) {
192
+ function Xr(e) {
193
193
  const t = Be(e);
194
194
  if (t.length === 0) return [];
195
195
  const n = /* @__PURE__ */ new Set();
196
196
  for (const r of t)
197
- for (const o of Vr[r] ?? [])
197
+ for (const o of $r[r] ?? [])
198
198
  n.add(o);
199
- return Pt.filter((r) => n.has(r.value));
199
+ return wt.filter((r) => n.has(r.value));
200
200
  }
201
- function wt(e, t) {
202
- const n = Jr(t), r = Be(e);
201
+ function Pt(e, t) {
202
+ const n = Yr(t), r = Be(e);
203
203
  if (r.length === 0)
204
- return n.filter((i) => Wr.has(i));
204
+ return n.filter((i) => Gr.has(i));
205
205
  const o = new Set(
206
- Qr(r).map((i) => i.value)
206
+ Xr(r).map((i) => i.value)
207
207
  );
208
208
  return n.filter((i) => o.has(i));
209
209
  }
210
- function Xr(e, t) {
211
- const n = Yr(e), r = wt(e, t), o = [...n, ...r];
210
+ function Zr(e, t) {
211
+ const n = Qr(e), r = Pt(e, t), o = [...n, ...r];
212
212
  return o.length > 0 ? o.join(",") : void 0;
213
213
  }
214
- function Zr(e, t) {
215
- const n = Be(e), r = wt(
214
+ function eo(e, t) {
215
+ const n = Be(e), r = Pt(
216
216
  n,
217
217
  t
218
218
  ), o = [
219
- ...n.map((i) => jr[i] ?? i),
220
- ...r.map((i) => Hr[i] ?? i)
219
+ ...n.map((i) => Hr[i] ?? i),
220
+ ...r.map((i) => Kr[i] ?? i)
221
221
  ];
222
222
  return o.length === 0 ? null : o.join("、");
223
223
  }
224
- const eo = [
224
+ const to = [
225
225
  "video",
226
226
  "audio",
227
227
  "image",
228
228
  "file",
229
229
  "spreadsheet",
230
230
  "document"
231
- ], to = new Set(eo);
232
- function no(e) {
233
- return e && to.has(e) ? e : "file";
231
+ ], no = new Set(to);
232
+ function ro(e) {
233
+ return e && no.has(e) ? e : "file";
234
234
  }
235
235
  function De(e) {
236
- return typeof e == "string" && zr.includes(e) ? e : "medium";
236
+ return typeof e == "string" && Or.includes(e) ? e : "medium";
237
237
  }
238
- function ro(e, t) {
238
+ function oo(e, t) {
239
239
  var o;
240
240
  const n = Math.max(1, t);
241
241
  let r = [];
242
242
  return Array.isArray(e.mediaUrls) ? r = e.mediaUrls.map((i) => String(i).trim()) : (o = e.mediaUrl) != null && o.trim() && (r = [e.mediaUrl.trim()]), r.length === 0 ? [""] : r.slice(0, n);
243
243
  }
244
- function oo(e) {
244
+ function io(e) {
245
245
  var t;
246
246
  return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
247
247
  }
248
- function io(e) {
248
+ function so(e) {
249
249
  return `form-media-size-${De(e)}`;
250
250
  }
251
- function so(e) {
252
- return `form-media-preview form-media-list ${io(e)}`;
251
+ function ao(e) {
252
+ return `form-media-preview form-media-list ${so(e)}`;
253
253
  }
254
- function on(e) {
254
+ function sn(e) {
255
255
  if (typeof e == "number")
256
256
  return Number.isFinite(e) ? String(e) : void 0;
257
257
  if (typeof e != "string") return;
@@ -264,16 +264,16 @@ function ye(e) {
264
264
  const t = [];
265
265
  for (const n of e) {
266
266
  if (!n || typeof n != "object" || Array.isArray(n)) continue;
267
- const r = n, o = on(r.value), i = on(r.label);
267
+ const r = n, o = sn(r.value), i = sn(r.label);
268
268
  o === void 0 || i === void 0 || t.push({ value: o, label: i });
269
269
  }
270
270
  return t;
271
271
  }
272
272
  function ke(e) {
273
- return !In(e.type) || ye(e.options).length > 0;
273
+ return !Mn(e.type) || ye(e.options).length > 0;
274
274
  }
275
- const ao = 10;
276
- function Nn(e) {
275
+ const lo = 10;
276
+ function En(e) {
277
277
  return e && typeof e == "object" && !Array.isArray(e) ? e : {};
278
278
  }
279
279
  function Ve(e) {
@@ -287,10 +287,10 @@ function Te(e, t = 1) {
287
287
  const n = typeof e == "number" ? e : Number(e);
288
288
  return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
289
289
  }
290
- function En(e, t) {
290
+ function Rn(e, t) {
291
291
  return t == null ? void 0 : e === "toggle" ? Ve(t) : e === "multiselect" || e === "checkbox" || e === "file" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String).map((o) => o.trim()).filter(Boolean) : typeof t == "string" && t.trim() ? [t.trim()] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t).trim() || void 0;
292
292
  }
293
- function lo(e) {
293
+ function co(e) {
294
294
  if (Array.isArray(e)) return e.map(String).filter(Boolean);
295
295
  if (typeof e == "string" && e.trim())
296
296
  try {
@@ -300,11 +300,11 @@ function lo(e) {
300
300
  }
301
301
  return [];
302
302
  }
303
- function co(e) {
304
- const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, s = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, a = lo(e == null ? void 0 : e.flowUniqueIds);
303
+ function uo(e) {
304
+ const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, s = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, a = co(e == null ? void 0 : e.flowUniqueIds);
305
305
  return { agentKind: r, agentUniqueId: o, flowType: i, category: s, flowUniqueIds: a, pageSize: n };
306
306
  }
307
- function uo(e) {
307
+ function mo(e) {
308
308
  const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0;
309
309
  return {
310
310
  names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
@@ -315,14 +315,14 @@ function uo(e) {
315
315
  pageSize: n
316
316
  };
317
317
  }
318
- const Rn = "content-production", Pn = 5;
319
- function mo(e) {
318
+ const wn = "content-production", Pn = 5;
319
+ function po(e) {
320
320
  const t = typeof e == "number" ? e : Number(e);
321
321
  return !Number.isFinite(t) || t < 1 ? Pn : Math.min(100, Math.floor(t));
322
322
  }
323
323
  function fo(e) {
324
324
  var s, a;
325
- 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 = ((s = e == null ? void 0 : e.flowType) == null ? void 0 : s.trim()) || Rn, o = ((a = e == null ? void 0 : e.category) == null ? void 0 : a.trim()) || void 0, i = (e == null ? void 0 : e.tagMatch) === "any" ? "any" : "all";
325
+ 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 = ((s = e == null ? void 0 : e.flowType) == null ? void 0 : s.trim()) || wn, o = ((a = e == null ? void 0 : e.category) == null ? void 0 : a.trim()) || void 0, i = (e == null ? void 0 : e.tagMatch) === "any" ? "any" : "all";
326
326
  return {
327
327
  flowType: r,
328
328
  ...o ? { category: o } : {},
@@ -331,40 +331,44 @@ function fo(e) {
331
331
  pageSize: n
332
332
  };
333
333
  }
334
- function po(e) {
334
+ function ho(e) {
335
335
  if (e.type !== "case_singleselect") return e;
336
336
  const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
337
337
  return { ...e, type: "case_multiselect", defaultValue: t };
338
338
  }
339
- function ho(e) {
340
- var o, i, s, a, l;
341
- const t = po(e), n = Be(t.fileAcceptTypes), r = t.type;
339
+ function go(e) {
340
+ var o, i, s, a, l, c;
341
+ const t = ho(e), n = Be(t.fileAcceptTypes), r = t.type;
342
342
  return {
343
- id: ((o = t.id) == null ? void 0 : o.trim()) || Se("block-"),
343
+ id: ((o = t.id) == null ? void 0 : o.trim()) || be("block-"),
344
344
  type: r,
345
345
  name: ((i = t.name) == null ? void 0 : i.trim()) || void 0,
346
346
  label: t.label ?? "",
347
347
  placeholder: t.placeholder ?? "",
348
348
  help: t.help ?? "",
349
349
  required: t.required === !0,
350
- mediaUrls: Re(r) ? ro(t, ao) : void 0,
350
+ mediaUrls: Re(r) ? oo(t, lo) : void 0,
351
351
  mediaSize: Re(r) ? De(t.mediaSize) : void 0,
352
- webUrl: Pe(r) ? ((s = t.webUrl) == null ? void 0 : s.trim()) ?? "" : void 0,
353
- webHeight: Pe(r) ? Le(t.webHeight) : void 0,
352
+ webUrl: we(r) ? ((s = t.webUrl) == null ? void 0 : s.trim()) ?? "" : void 0,
353
+ webHeight: we(r) ? Le(t.webHeight) : void 0,
354
354
  fileAcceptTypes: n,
355
- fileAcceptExtensions: wt(
355
+ fileAcceptExtensions: Pt(
356
356
  n,
357
357
  t.fileAcceptExtensions
358
358
  ),
359
- filePlaceholderIcon: no(t.filePlaceholderIcon),
359
+ filePlaceholderIcon: ro(t.filePlaceholderIcon),
360
360
  fileMinCount: r === "file" ? Qe(t.fileMinCount, 1) : void 0,
361
361
  fileMaxCount: r === "file" ? Qe(t.fileMaxCount, 1) : void 0,
362
- defaultValue: En(r, t.defaultValue),
363
- jsonSchemaDescription: ((a = t.jsonSchemaDescription) == null ? void 0 : a.trim()) ?? "",
362
+ fileExampleUrls: r === "file" && Array.isArray(t.fileExampleUrls) ? [...new Set(t.fileExampleUrls.filter(
363
+ (m) => typeof m == "string" && /^https?:\/\//i.test(m.trim())
364
+ ).map((m) => m.trim()))] : void 0,
365
+ fileReviewCriteria: r === "file" ? ((a = t.fileReviewCriteria) == null ? void 0 : a.trim()) ?? "" : void 0,
366
+ defaultValue: Rn(r, t.defaultValue),
367
+ jsonSchemaDescription: ((l = t.jsonSchemaDescription) == null ? void 0 : l.trim()) ?? "",
364
368
  hidden: r === "text" ? t.hidden === !0 : void 0,
365
369
  needLLM: t.needLLM === !0 ? !0 : void 0,
366
370
  options: Array.isArray(t.options) ? ye(t.options) : void 0,
367
- condition: (l = t.condition) != null && l.fieldName ? {
371
+ condition: (c = t.condition) != null && c.fieldName ? {
368
372
  fieldName: t.condition.fieldName.trim(),
369
373
  operator: t.condition.operator ?? "eq",
370
374
  value: t.condition.value
@@ -373,29 +377,29 @@ function ho(e) {
373
377
  resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? Te(t.resumeMinCount, 1) : void 0,
374
378
  resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? Te(t.resumeMaxCount, 1) : void 0,
375
379
  resumeDisplayMode: r === "resume_multiselect" ? t.resumeDisplayMode === "content-only" ? "content-only" : "profile-content" : void 0,
376
- resumeDisplayCount: r === "resume_multiselect" ? mo(t.resumeDisplayCount) : void 0,
377
- resumeFilter: r === "resume_multiselect" ? uo(t.resumeFilter) : void 0,
380
+ resumeDisplayCount: r === "resume_multiselect" ? po(t.resumeDisplayCount) : void 0,
381
+ resumeFilter: r === "resume_multiselect" ? mo(t.resumeFilter) : void 0,
378
382
  contentFilter: r === "resume_multiselect" ? fo(t.contentFilter) : void 0,
379
383
  caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
380
384
  caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? Te(t.caseMinCount, 1) : void 0,
381
385
  caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? Te(t.caseMaxCount, 1) : void 0,
382
- caseFilter: r === "case_multiselect" ? co(t.caseFilter) : void 0
386
+ caseFilter: r === "case_multiselect" ? uo(t.caseFilter) : void 0
383
387
  };
384
388
  }
385
- function go(e) {
389
+ function yo(e) {
386
390
  return new Set(ye(e.options).map((t) => t.value));
387
391
  }
388
- function sn(e, t) {
392
+ function an(e, t) {
389
393
  const n = {
390
394
  type: "array",
391
395
  items: { type: "string" }
392
396
  };
393
397
  return e !== void 0 && (n.minItems = Te(e, 1)), t !== void 0 && (n.maxItems = Te(t, 1)), n;
394
398
  }
395
- function yo(e) {
396
- const t = En(e.type, e.defaultValue);
399
+ function vo(e) {
400
+ const t = Rn(e.type, e.defaultValue);
397
401
  if (t === void 0) return;
398
- const n = go(e);
402
+ const n = yo(e);
399
403
  switch (e.type) {
400
404
  case "toggle":
401
405
  return t;
@@ -426,9 +430,9 @@ function yo(e) {
426
430
  return t;
427
431
  }
428
432
  }
429
- function vo(e) {
433
+ function So(e) {
430
434
  var i, s;
431
- if (!((i = e.name) == null ? void 0 : i.trim()) || !se(e.type)) return null;
435
+ if (!((i = e.name) == null ? void 0 : i.trim()) || !ue(e.type)) return null;
432
436
  let n;
433
437
  switch (e.type) {
434
438
  case "number":
@@ -464,10 +468,10 @@ function vo(e) {
464
468
  break;
465
469
  }
466
470
  case "resume_multiselect":
467
- n = sn(e.resumeMinCount, e.resumeMaxCount);
471
+ n = an(e.resumeMinCount, e.resumeMaxCount);
468
472
  break;
469
473
  case "case_multiselect":
470
- n = sn(e.caseMinCount, e.caseMaxCount);
474
+ n = an(e.caseMinCount, e.caseMaxCount);
471
475
  break;
472
476
  case "text":
473
477
  n = { type: "string" }, e.hidden && (n["x-hidden"] = !0);
@@ -478,7 +482,7 @@ function vo(e) {
478
482
  }
479
483
  const r = (s = e.jsonSchemaDescription) == null ? void 0 : s.trim();
480
484
  r && (n.$comment = r);
481
- const o = yo(e);
485
+ const o = vo(e);
482
486
  return o !== void 0 && (n.default = o), n;
483
487
  }
484
488
  function bo(e, t, n) {
@@ -486,8 +490,8 @@ function bo(e, t, n) {
486
490
  const r = {}, o = [];
487
491
  for (const c of e) {
488
492
  const m = (l = c.name) == null ? void 0 : l.trim();
489
- if (!m || !se(c.type) || !ke(c)) continue;
490
- const d = vo(c);
493
+ if (!m || !ue(c.type) || !ke(c)) continue;
494
+ const d = So(c);
491
495
  d && (r[m] = d, c.required && o.push(m));
492
496
  }
493
497
  const i = {
@@ -498,7 +502,7 @@ function bo(e, t, n) {
498
502
  }, s = t == null ? void 0 : t.trim(), a = n == null ? void 0 : n.trim();
499
503
  return s && (i.title = s), a && (i.description = a), i;
500
504
  }
501
- function we(e) {
505
+ function Pe(e) {
502
506
  const t = e.title ?? "", n = e.description ?? "";
503
507
  return {
504
508
  title: t,
@@ -509,28 +513,28 @@ function we(e) {
509
513
  }
510
514
  function tt(e) {
511
515
  if (!e || !Array.isArray(e.blocks))
512
- return we({ title: "", description: "", blocks: [] });
513
- const t = e.blocks.map(ho);
514
- return we({
516
+ return Pe({ title: "", description: "", blocks: [] });
517
+ const t = e.blocks.map(go);
518
+ return Pe({
515
519
  title: typeof e.title == "string" ? e.title : "",
516
520
  description: typeof e.description == "string" ? e.description : "",
517
521
  blocks: t
518
522
  });
519
523
  }
520
- function Ta() {
521
- return we({ title: "", description: "", blocks: [] });
524
+ function xa() {
525
+ return Pe({ title: "", description: "", blocks: [] });
522
526
  }
523
- function xa(e) {
527
+ function Fa(e) {
524
528
  const t = {
525
- id: Se("block-"),
529
+ id: be("block-"),
526
530
  type: e,
527
531
  label: e
528
532
  };
529
- return se(e) && (t.label = "", t.name = Se("field_"), t.placeholder = "", t.required = !1), Re(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), Pe(e) && (t.label = "", t.help = "", t.webUrl = "", t.webHeight = _t), In(e) && (t.options = [
533
+ return ue(e) && (t.label = "", t.name = be("field_"), t.placeholder = "", t.required = !1), Re(e) && (t.label = "", t.placeholder = "", t.help = "", t.mediaUrls = [""], t.mediaSize = "medium"), we(e) && (t.label = "", t.help = "", t.webUrl = "", t.webHeight = _t), Mn(e) && (t.options = [
530
534
  { value: "option_1", label: "选项 1" },
531
535
  { value: "option_2", label: "选项 2" }
532
536
  ]), e === "file" && (t.fileAcceptTypes = [], t.fileAcceptExtensions = [], t.filePlaceholderIcon = "file", t.fileMinCount = 1, t.fileMaxCount = 1), e === "resume_multiselect" && (t.resumeEnableRefresh = !0, t.resumeMinCount = 1, t.resumeMaxCount = 1, t.resumeDisplayCount = Pn, t.contentFilter = {
533
- flowType: Rn,
537
+ flowType: wn,
534
538
  tagUniqueIds: [],
535
539
  pageSize: 20
536
540
  }, t.resumeFilter = {
@@ -541,7 +545,7 @@ function xa(e) {
541
545
  pageSize: 20
542
546
  }, t.defaultValue = []), e === "case_multiselect" && (t.caseEnableRefresh = !0, t.caseMinCount = 1, t.caseMaxCount = 1, t.caseFilter = { flowUniqueIds: [], pageSize: 20 }, t.defaultValue = []), t;
543
547
  }
544
- function So(e) {
548
+ function Co(e) {
545
549
  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) : [];
546
550
  return {
547
551
  agentKind: n,
@@ -552,13 +556,13 @@ function So(e) {
552
556
  pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
553
557
  };
554
558
  }
555
- function an(e) {
559
+ function ln(e) {
556
560
  if (e == null) return;
557
561
  const t = typeof e == "number" ? e : Number(e);
558
562
  if (!(!Number.isFinite(t) || t < 1))
559
563
  return Math.floor(t);
560
564
  }
561
- function Co(e, t) {
565
+ function Ao(e, t) {
562
566
  var s, a, l, c, m, d;
563
567
  const { id: n, label: r, path: o, withData: i } = t;
564
568
  return i({
@@ -581,7 +585,7 @@ function Co(e, t) {
581
585
  value: { path: o }
582
586
  });
583
587
  }
584
- function Ao(e, t, n) {
588
+ function ko(e, t, n) {
585
589
  const r = n.nameFromValue(e.value), o = {
586
590
  ...t("case_multiselect"),
587
591
  name: r,
@@ -589,23 +593,23 @@ function Ao(e, t, n) {
589
593
  }, i = n.asLiteral(e.placeholder);
590
594
  i && (o.placeholder = i);
591
595
  const s = n.asLiteral(e.help);
592
- s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = So(e.caseFilter));
593
- const a = an(e.minCount);
596
+ s && (o.help = s), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = Co(e.caseFilter));
597
+ const a = ln(e.minCount);
594
598
  a !== void 0 && (o.caseMinCount = a);
595
- const l = an(e.maxCount);
599
+ const l = ln(e.maxCount);
596
600
  return l !== void 0 && (o.caseMaxCount = l), o;
597
601
  }
598
- const wn = Ce(
602
+ const zn = Ce(
599
603
  null
600
604
  );
601
- function ko(e) {
605
+ function _o(e) {
602
606
  try {
603
607
  return JSON.stringify(e);
604
608
  } catch {
605
609
  return String(e.length);
606
610
  }
607
611
  }
608
- const _o = {
612
+ const To = {
609
613
  publishLiveOptions: () => {
610
614
  },
611
615
  liveOptions: /* @__PURE__ */ new Map(),
@@ -614,23 +618,23 @@ const _o = {
614
618
  clearPendingChangeFields: () => {
615
619
  }
616
620
  };
617
- function To({ children: e }) {
618
- const t = T(/* @__PURE__ */ new Map()), n = T(/* @__PURE__ */ new Map()), r = T([]), [o, i] = E(0), [s, a] = E(() => /* @__PURE__ */ new Map()), [l, c] = E(
621
+ function xo({ children: e }) {
622
+ const t = _(/* @__PURE__ */ new Map()), n = _(/* @__PURE__ */ new Map()), r = _([]), [o, i] = R(0), [s, a] = R(() => /* @__PURE__ */ new Map()), [l, c] = R(
619
623
  []
620
624
  ), m = V(
621
- (f, b) => {
622
- const p = f.trim();
623
- if (!p) return;
624
- const S = b.map((h) => ({
625
- value: String(h.value ?? ""),
626
- label: String(h.label ?? h.value ?? "")
627
- })), k = ko(S);
628
- n.current.get(p) !== k && (n.current.set(p, k), t.current.set(p, S), r.current.includes(p) || (r.current = [...r.current, p]), a(new Map(t.current)), c(r.current), i((h) => h + 1));
625
+ (p, b) => {
626
+ const y = p.trim();
627
+ if (!y) return;
628
+ const C = b.map((f) => ({
629
+ value: String(f.value ?? ""),
630
+ label: String(f.label ?? f.value ?? "")
631
+ })), A = _o(C);
632
+ n.current.get(y) !== A && (n.current.set(y, A), t.current.set(y, C), r.current.includes(y) || (r.current = [...r.current, y]), a(new Map(t.current)), c(r.current), i((f) => f + 1));
629
633
  },
630
634
  []
631
635
  ), d = V(() => {
632
636
  r.current = [], c([]);
633
- }, []), y = W(
637
+ }, []), v = G(
634
638
  () => ({
635
639
  publishLiveOptions: m,
636
640
  liveOptions: s,
@@ -646,26 +650,26 @@ function To({ children: e }) {
646
650
  d
647
651
  ]
648
652
  );
649
- return /* @__PURE__ */ u(wn.Provider, { value: y, children: e });
653
+ return /* @__PURE__ */ u(zn.Provider, { value: v, children: e });
650
654
  }
651
655
  function zt() {
652
- return Ae(wn) ?? _o;
656
+ return Ae(zn) ?? To;
653
657
  }
654
- const zn = Ce({ interactive: !0 });
658
+ const On = Ce({ interactive: !0 });
655
659
  function Tt({
656
660
  interactive: e,
657
661
  children: t
658
662
  }) {
659
- return /* @__PURE__ */ u(zn.Provider, { value: { interactive: e }, children: t });
663
+ return /* @__PURE__ */ u(On.Provider, { value: { interactive: e }, children: t });
660
664
  }
661
665
  function ve() {
662
- return Ae(zn);
666
+ return Ae(On);
663
667
  }
664
- const On = Ce(null);
665
- function xo(e) {
668
+ const qn = Ce(null);
669
+ function Fo(e) {
666
670
  return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
667
671
  }
668
- const Fo = {
672
+ const Uo = {
669
673
  reportEvent: () => {
670
674
  },
671
675
  reportData: () => {
@@ -673,7 +677,7 @@ const Fo = {
673
677
  runAutoControl: (e) => e(),
674
678
  isAutoControl: () => !1
675
679
  };
676
- function Uo(e) {
680
+ function Io(e) {
677
681
  const t = {};
678
682
  for (const [n, r] of Object.entries(e.form_values ?? {}))
679
683
  r !== void 0 && (t[n] = r);
@@ -683,11 +687,11 @@ function Uo(e) {
683
687
  form_change: Array.isArray(e.form_change) ? [...e.form_change] : []
684
688
  };
685
689
  }
686
- function Io({
690
+ function Mo({
687
691
  client: e,
688
692
  children: t
689
693
  }) {
690
- const n = T(0), r = T(e);
694
+ const n = _(0), r = _(e);
691
695
  r.current = e;
692
696
  const o = V((c) => {
693
697
  const m = r.current;
@@ -697,11 +701,11 @@ function Io({
697
701
  component: c.component
698
702
  };
699
703
  c.field !== void 0 && (d.field = c.field), c.value !== void 0 && (d.value = c.value);
700
- const y = n.current > 0 ? "form_auto_control_bac_event" : "form_runtime_event";
701
- m.send(y, d);
704
+ const v = n.current > 0 ? "form_auto_control_bac_event" : "form_runtime_event";
705
+ m.send(v, d);
702
706
  }, []), i = V((c) => {
703
707
  const m = r.current;
704
- m && m.send("form_runtime_data", Uo(c));
708
+ m && m.send("form_runtime_data", Io(c));
705
709
  }, []), s = V((c) => {
706
710
  n.current += 1;
707
711
  let m;
@@ -710,13 +714,13 @@ function Io({
710
714
  } catch (d) {
711
715
  throw n.current = Math.max(0, n.current - 1), d;
712
716
  }
713
- return xo(m) ? Promise.resolve(m).finally(() => {
717
+ return Fo(m) ? Promise.resolve(m).finally(() => {
714
718
  n.current = Math.max(0, n.current - 1);
715
719
  }) : (n.current = Math.max(0, n.current - 1), m);
716
720
  }, []), a = V(
717
721
  () => n.current > 0,
718
722
  []
719
- ), l = W(
723
+ ), l = G(
720
724
  () => ({
721
725
  reportEvent: o,
722
726
  reportData: i,
@@ -725,83 +729,83 @@ function Io({
725
729
  }),
726
730
  [o, i, s, a]
727
731
  );
728
- return /* @__PURE__ */ u(On.Provider, { value: l, children: t });
732
+ return /* @__PURE__ */ u(qn.Provider, { value: l, children: t });
729
733
  }
730
- function qn() {
731
- return Ae(On) ?? Fo;
734
+ function Ln() {
735
+ return Ae(qn) ?? Uo;
732
736
  }
733
- const Mo = 300;
734
- function No(e) {
737
+ const No = 300;
738
+ function Eo(e) {
735
739
  return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
736
740
  }
737
- function Eo(e) {
741
+ function Ro(e) {
738
742
  if (!e) return;
739
743
  const t = e.trim();
740
744
  if (t)
741
745
  return t.startsWith("/") ? t.slice(1) : t;
742
746
  }
743
- function be(e, t = "value", n = {}) {
744
- const o = e.componentModel.properties[t], i = No(o), s = Eo(i), a = qn(), {
747
+ function Se(e, t = "value", n = {}) {
748
+ const o = e.componentModel.properties[t], i = Eo(o), s = Ro(i), a = Ln(), {
745
749
  component: l = "Unknown",
746
750
  changeAction: c = "change",
747
751
  debounceChange: m = !1
748
- } = n, d = T(null), y = T(void 0), f = T(!1), b = T(a);
752
+ } = n, d = _(null), v = _(void 0), p = _(!1), b = _(a);
749
753
  b.current = a;
750
- const p = T(c);
751
- p.current = c;
752
- const S = T(l);
753
- S.current = l;
754
- const k = T(s);
755
- k.current = s, O(() => () => {
756
- d.current != null && (clearTimeout(d.current), d.current = null), f.current && k.current && (f.current = !1, b.current.reportEvent({
757
- action: p.current,
758
- component: S.current,
759
- field: k.current,
760
- value: y.current
754
+ const y = _(c);
755
+ y.current = c;
756
+ const C = _(l);
757
+ C.current = l;
758
+ const A = _(s);
759
+ A.current = s, z(() => () => {
760
+ d.current != null && (clearTimeout(d.current), d.current = null), p.current && A.current && (p.current = !1, b.current.reportEvent({
761
+ action: y.current,
762
+ component: C.current,
763
+ field: A.current,
764
+ value: v.current
761
765
  }));
762
766
  }, []);
763
- const h = V(
764
- (z) => {
767
+ const f = V(
768
+ (O) => {
765
769
  if (!i || o === void 0) return () => {
766
770
  };
767
- const K = e.dataContext.subscribeDynamicValue(o, () => z());
771
+ const K = e.dataContext.subscribeDynamicValue(o, () => O());
768
772
  return () => K.unsubscribe();
769
773
  },
770
774
  [e, o, i]
771
- ), v = V(() => {
775
+ ), S = V(() => {
772
776
  if (!(!i || o === void 0))
773
777
  return e.dataContext.resolveDynamicValue(o);
774
- }, [e, o, i]), F = hr(h, v, v), R = V(
775
- (z) => {
778
+ }, [e, o, i]), I = gr(f, S, S), E = V(
779
+ (O) => {
776
780
  if (!s) return;
777
781
  const K = () => {
778
- f.current = !1, b.current.reportEvent({
782
+ p.current = !1, b.current.reportEvent({
779
783
  action: c,
780
784
  component: l,
781
785
  field: s,
782
- value: z
786
+ value: O
783
787
  });
784
788
  };
785
789
  if (!m) {
786
790
  K();
787
791
  return;
788
792
  }
789
- y.current = z, f.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
793
+ v.current = O, p.current = !0, d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
790
794
  d.current = null, K();
791
- }, Mo);
795
+ }, No);
792
796
  },
793
797
  [s, c, l, m]
794
- ), U = V(
795
- (z) => {
796
- !i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), z);
798
+ ), F = V(
799
+ (O) => {
800
+ !i || !o || typeof o != "object" || !("path" in o) || e.dataContext.set(String(o.path), O);
797
801
  },
798
802
  [e, o, i]
799
- ), w = V(
800
- (z) => {
801
- U(z), R(z);
803
+ ), U = V(
804
+ (O) => {
805
+ F(O), E(O);
802
806
  },
803
- [U, R]
804
- ), q = V(() => {
807
+ [F, E]
808
+ ), B = V(() => {
805
809
  s && b.current.reportEvent({
806
810
  action: "focus",
807
811
  component: l,
@@ -809,24 +813,24 @@ function be(e, t = "value", n = {}) {
809
813
  });
810
814
  }, [s, l]);
811
815
  return {
812
- value: F,
813
- setValue: w,
816
+ value: I,
817
+ setValue: U,
814
818
  /** 写入 dataModel 但不上报(用于模式切换规范化等内部同步) */
815
- setValueSilent: U,
819
+ setValueSilent: F,
816
820
  hasBinding: !!i,
817
821
  fieldName: s,
818
- reportFocus: q
822
+ reportFocus: B
819
823
  };
820
824
  }
821
825
  function ze(e) {
822
826
  if (typeof e == "string") return e || void 0;
823
827
  if (typeof e == "number") return String(e);
824
828
  }
825
- function ce(e) {
829
+ function me(e) {
826
830
  return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
827
831
  }
828
- function Ln(e, t) {
829
- return t ? Array.isArray(e) ? null : ce(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
832
+ function Bn(e, t) {
833
+ return t ? Array.isArray(e) ? null : me(e) : Array.isArray(e) ? e.length > 0 ? String(e[0]) : "" : e == null || typeof e == "string" || typeof e == "number" ? null : "";
830
834
  }
831
835
  function Xe(e) {
832
836
  if (e == null) return;
@@ -834,24 +838,24 @@ function Xe(e) {
834
838
  if (!(!Number.isFinite(t) || t < 1))
835
839
  return Math.floor(t);
836
840
  }
837
- function Bn(e, t, n, r) {
841
+ function Dn(e, t, n, r) {
838
842
  return e.includes(t) ? e.filter((i) => i !== t) : r === 1 ? [t] : r !== void 0 && e.length >= r ? null : [...e, t];
839
843
  }
840
- function Dn(e, t, n, r, o) {
844
+ function Vn(e, t, n, r, o) {
841
845
  return n ? e.includes(t) || o === 1 ? !1 : o !== void 0 && e.length >= o : !0;
842
846
  }
843
- function Vn(e, t) {
847
+ function $n(e, t) {
844
848
  return t === void 0 || e.length <= t ? null : e.slice(0, t);
845
849
  }
846
- const $n = Ce(null);
850
+ const jn = Ce(null);
847
851
  function xt({
848
852
  caseSearch: e,
849
853
  children: t
850
854
  }) {
851
- return /* @__PURE__ */ u($n.Provider, { value: e ?? null, children: t });
855
+ return /* @__PURE__ */ u(jn.Provider, { value: e ?? null, children: t });
852
856
  }
853
- function Ro() {
854
- return Ae($n);
857
+ function wo() {
858
+ return Ae(jn);
855
859
  }
856
860
  function ht(e) {
857
861
  return typeof e == "string" ? e : "";
@@ -877,10 +881,10 @@ function yt(e) {
877
881
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
878
882
  return t || n;
879
883
  }
880
- function wo(e) {
884
+ function zo(e) {
881
885
  return JSON.stringify(e);
882
886
  }
883
- const zo = {
887
+ const Oo = {
884
888
  name: "SkoponCaseSelect",
885
889
  schema: g.object({
886
890
  label: g.any().optional(),
@@ -893,13 +897,13 @@ const zo = {
893
897
  value: g.any().optional()
894
898
  }).passthrough()
895
899
  };
896
- function Oo({
900
+ function qo({
897
901
  item: e,
898
902
  selected: t,
899
903
  disabled: n,
900
904
  onToggle: r
901
905
  }) {
902
- return /* @__PURE__ */ B(
906
+ return /* @__PURE__ */ w(
903
907
  "button",
904
908
  {
905
909
  type: "button",
@@ -907,11 +911,11 @@ function Oo({
907
911
  disabled: n,
908
912
  onClick: r,
909
913
  children: [
910
- /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(Cn, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
911
- /* @__PURE__ */ B("div", { className: "skopon-resume-select-card-body", children: [
914
+ /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ u(An, { style: { fontSize: 24, color: "var(--color-primary, #208368)" } }) }),
915
+ /* @__PURE__ */ w("div", { className: "skopon-resume-select-card-body", children: [
912
916
  /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-name", children: e.name }),
913
917
  e.description ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
914
- /* @__PURE__ */ B("div", { className: "skopon-resume-select-card-meta", children: [
918
+ /* @__PURE__ */ w("div", { className: "skopon-resume-select-card-meta", children: [
915
919
  e.caseUniqueId,
916
920
  e.platform ? ` · ${e.platform}` : "",
917
921
  e.link ? ` · ${e.link}` : ""
@@ -921,112 +925,112 @@ function Oo({
921
925
  }
922
926
  );
923
927
  }
924
- function qo({ context: e }) {
925
- const { interactive: t } = ve(), n = Ro(), { publishLiveOptions: r } = zt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = be(e, "value", {
928
+ function Lo({ context: e }) {
929
+ const { interactive: t } = ve(), n = wo(), { publishLiveOptions: r } = zt(), { value: o, setValue: i, setValueSilent: s, fieldName: a } = Se(e, "value", {
926
930
  component: "SkoponCaseSelect",
927
931
  changeAction: "click"
928
- }), l = e.componentModel.properties, c = ht(l.label), m = ht(l.placeholder), d = ht(l.help), y = l.enableRefresh !== !1, f = Xe(l.minCount), b = Xe(l.maxCount), p = W(() => gt(l.caseFilter), [l.caseFilter]), S = wo(p), [k, h] = E(1), [v, F] = E(!1), [R, U] = E(""), [w, q] = E([]), [z, K] = E(0), [I, Z] = E(p.pageSize ?? 20), J = T(0), Q = ce(o);
929
- O(() => {
930
- const M = Vn(Q, b);
931
- M !== null && s(M);
932
- }, [b, Q, s]);
933
- const G = W(() => n ? yt(p) ? R || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, p, R, m]), Y = V(
934
- async (M) => {
935
- const A = gt(JSON.parse(S)), x = ++J.current;
936
- if (!n || !yt(A)) {
937
- q([]), K(0), U(""), F(!1);
932
+ }), l = e.componentModel.properties, c = ht(l.label), m = ht(l.placeholder), d = ht(l.help), v = l.enableRefresh !== !1, p = Xe(l.minCount), b = Xe(l.maxCount), y = G(() => gt(l.caseFilter), [l.caseFilter]), C = zo(y), [A, f] = R(1), [S, I] = R(!1), [E, F] = R(""), [U, B] = R([]), [O, K] = R(0), [T, W] = R(y.pageSize ?? 20), Y = _(0), ne = me(o);
933
+ z(() => {
934
+ const $ = $n(ne, b);
935
+ $ !== null && s($);
936
+ }, [b, ne, s]);
937
+ const J = G(() => n ? yt(y) ? E || m || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, y, E, m]), Q = V(
938
+ async ($) => {
939
+ const x = gt(JSON.parse(C)), h = ++Y.current;
940
+ if (!n || !yt(x)) {
941
+ B([]), K(0), F(""), I(!1);
938
942
  return;
939
943
  }
940
- F(!0), U("");
944
+ I(!0), F("");
941
945
  try {
942
- const N = await n({ filter: A, page: M });
943
- if (x !== J.current) return;
944
- q(N.list), K(N.total), h(N.page), Z(N.pageSize), a && r(
946
+ const M = await n({ filter: x, page: $ });
947
+ if (h !== Y.current) return;
948
+ B(M.list), K(M.total), f(M.page), W(M.pageSize), a && r(
945
949
  a,
946
- N.list.map((j) => ({
947
- value: j.caseUniqueId,
948
- label: j.name || j.caseUniqueId
950
+ M.list.map((P) => ({
951
+ value: P.caseUniqueId,
952
+ label: P.name || P.caseUniqueId
949
953
  }))
950
954
  );
951
- } catch (N) {
952
- if (x !== J.current) return;
953
- q([]), K(0), U(N instanceof Error ? N.message : "加载案例列表失败");
955
+ } catch (M) {
956
+ if (h !== Y.current) return;
957
+ B([]), K(0), F(M instanceof Error ? M.message : "加载案例列表失败");
954
958
  } finally {
955
- x === J.current && F(!1);
959
+ h === Y.current && I(!1);
956
960
  }
957
961
  },
958
- [n, S, a, r]
962
+ [n, C, a, r]
959
963
  );
960
- O(() => {
961
- h(1), Y(1);
962
- }, [S, Y]);
963
- const ae = (M) => {
964
+ z(() => {
965
+ f(1), Q(1);
966
+ }, [C, Q]);
967
+ const de = ($) => {
964
968
  if (!t) return;
965
- const A = Bn(
966
- Q,
967
- M,
968
- f,
969
+ const x = Dn(
970
+ ne,
971
+ $,
972
+ p,
969
973
  b
970
974
  );
971
- A !== null && i(A);
972
- }, C = () => {
973
- const M = gt(JSON.parse(S)), A = I || M.pageSize || 20, x = Math.max(1, Math.ceil(z / A)), N = k >= x ? 1 : k + 1;
974
- Y(N);
975
+ x !== null && i(x);
976
+ }, ee = () => {
977
+ const $ = gt(JSON.parse(C)), x = T || $.pageSize || 20, h = Math.max(1, Math.ceil(O / x)), M = A >= h ? 1 : A + 1;
978
+ Q(M);
975
979
  };
976
- return /* @__PURE__ */ B(
980
+ return /* @__PURE__ */ w(
977
981
  "div",
978
982
  {
979
983
  className: "form-block-preview skopon-resume-select",
980
984
  "data-skopon-field": a || void 0,
981
985
  children: [
982
986
  c ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: c }) : null,
983
- v && w.length === 0 ? /* @__PURE__ */ B("div", { className: "skopon-resume-select-status", children: [
987
+ S && U.length === 0 ? /* @__PURE__ */ w("div", { className: "skopon-resume-select-status", children: [
984
988
  /* @__PURE__ */ u(Rt, { size: "small" }),
985
989
  " 加载案例…"
986
990
  ] }) : null,
987
- !v && w.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: G }) : null,
988
- w.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: w.map((M) => /* @__PURE__ */ u(
989
- Oo,
991
+ !S && U.length === 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: J }) : null,
992
+ U.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: U.map(($) => /* @__PURE__ */ u(
993
+ qo,
990
994
  {
991
- item: M,
992
- selected: Q.includes(M.caseUniqueId),
993
- disabled: Dn(
994
- Q,
995
- M.caseUniqueId,
995
+ item: $,
996
+ selected: ne.includes($.caseUniqueId),
997
+ disabled: Vn(
998
+ ne,
999
+ $.caseUniqueId,
996
1000
  t,
997
- f,
1001
+ p,
998
1002
  b
999
1003
  ),
1000
- onToggle: () => ae(M.caseUniqueId)
1004
+ onToggle: () => de($.caseUniqueId)
1001
1005
  },
1002
- M.caseUniqueId
1006
+ $.caseUniqueId
1003
1007
  )) }) : null,
1004
- y && n && yt(p) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
1008
+ v && n && yt(y) ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
1005
1009
  qe,
1006
1010
  {
1007
1011
  type: "default",
1008
1012
  size: "small",
1009
- icon: /* @__PURE__ */ u(Sn, {}),
1010
- loading: v,
1013
+ icon: /* @__PURE__ */ u(Cn, {}),
1014
+ loading: S,
1011
1015
  disabled: !t,
1012
- onClick: C,
1016
+ onClick: ee,
1013
1017
  children: "换一批"
1014
1018
  }
1015
1019
  ) }) : null,
1016
- d ? /* @__PURE__ */ u(ue.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
1020
+ d ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-help", children: d }) : null
1017
1021
  ]
1018
1022
  }
1019
1023
  );
1020
1024
  }
1021
- const Lo = oe(
1022
- zo,
1023
- qo
1024
- ), Bo = {
1025
+ const Bo = ce(
1026
+ Oo,
1027
+ Lo
1028
+ ), Do = {
1025
1029
  type: "case_multiselect",
1026
1030
  componentName: "SkoponCaseSelect",
1027
- toComponent: Co,
1028
- fromComponent: Ao,
1029
- catalogComponents: [Lo]
1031
+ toComponent: Ao,
1032
+ fromComponent: ko,
1033
+ catalogComponents: [Bo]
1030
1034
  };
1031
1035
  function vt(e) {
1032
1036
  if (e == null) return;
@@ -1034,8 +1038,8 @@ function vt(e) {
1034
1038
  if (!(!Number.isFinite(t) || t < 1))
1035
1039
  return Math.floor(t);
1036
1040
  }
1037
- function Do(e, t) {
1038
- var s, a, l, c, m, d, y, f, b, p, S, k, h;
1041
+ function Vo(e, t) {
1042
+ var s, a, l, c, m, d, v, p, b, y, C, A, f;
1039
1043
  const { id: n, label: r, path: o, withData: i } = t;
1040
1044
  return i({
1041
1045
  id: n,
@@ -1051,23 +1055,23 @@ function Do(e, t) {
1051
1055
  ...(c = (l = e.contentFilter) == null ? void 0 : l.category) != null && c.trim() ? { category: e.contentFilter.category.trim() } : {},
1052
1056
  tagUniqueIds: ((m = e.contentFilter) == null ? void 0 : m.tagUniqueIds) ?? [],
1053
1057
  tagMatch: ((d = e.contentFilter) == null ? void 0 : d.tagMatch) === "any" ? "any" : "all",
1054
- pageSize: ((y = e.contentFilter) == null ? void 0 : y.pageSize) ?? 20
1058
+ pageSize: ((v = e.contentFilter) == null ? void 0 : v.pageSize) ?? 20
1055
1059
  },
1056
1060
  resumeFilter: {
1057
- names: ((f = e.resumeFilter) == null ? void 0 : f.names) ?? [],
1061
+ names: ((p = e.resumeFilter) == null ? void 0 : p.names) ?? [],
1058
1062
  ...(b = e.resumeFilter) != null && b.agentKind ? { agentKind: e.resumeFilter.agentKind } : {},
1059
- agentUniqueIds: ((p = e.resumeFilter) == null ? void 0 : p.agentUniqueIds) ?? [],
1060
- tagUniqueIds: ((S = e.resumeFilter) == null ? void 0 : S.tagUniqueIds) ?? [],
1061
- resumeUniqueIds: ((k = e.resumeFilter) == null ? void 0 : k.resumeUniqueIds) ?? [],
1062
- pageSize: ((h = e.resumeFilter) == null ? void 0 : h.pageSize) ?? 20
1063
+ agentUniqueIds: ((y = e.resumeFilter) == null ? void 0 : y.agentUniqueIds) ?? [],
1064
+ tagUniqueIds: ((C = e.resumeFilter) == null ? void 0 : C.tagUniqueIds) ?? [],
1065
+ resumeUniqueIds: ((A = e.resumeFilter) == null ? void 0 : A.resumeUniqueIds) ?? [],
1066
+ pageSize: ((f = e.resumeFilter) == null ? void 0 : f.pageSize) ?? 20
1063
1067
  },
1064
1068
  ...e.resumeMinCount !== void 0 ? { minCount: e.resumeMinCount } : {},
1065
1069
  ...e.resumeMaxCount !== void 0 ? { maxCount: e.resumeMaxCount } : {},
1066
1070
  value: { path: o }
1067
1071
  });
1068
1072
  }
1069
- function Vo(e, t, n) {
1070
- var m, d, y;
1073
+ function $o(e, t, n) {
1074
+ var m, d, v;
1071
1075
  const r = n.nameFromValue(e.value), o = {
1072
1076
  ...t("resume_multiselect"),
1073
1077
  name: r,
@@ -1077,25 +1081,25 @@ function Vo(e, t, n) {
1077
1081
  i && (o.placeholder = i);
1078
1082
  const s = n.asLiteral(e.help);
1079
1083
  if (s && (o.help = s), e.resumeFilter && typeof e.resumeFilter == "object") {
1080
- const f = e.resumeFilter, b = (m = n.asLiteral(f.agentKind)) == null ? void 0 : m.trim();
1084
+ const p = e.resumeFilter, b = (m = n.asLiteral(p.agentKind)) == null ? void 0 : m.trim();
1081
1085
  o.resumeFilter = {
1082
- names: Array.isArray(f.names) ? f.names.map(String) : [],
1086
+ names: Array.isArray(p.names) ? p.names.map(String) : [],
1083
1087
  ...b ? { agentKind: b } : {},
1084
- agentUniqueIds: Array.isArray(f.agentUniqueIds) ? f.agentUniqueIds.map(String) : [],
1085
- tagUniqueIds: Array.isArray(f.tagUniqueIds) ? f.tagUniqueIds.map(String).filter(Boolean) : [],
1086
- resumeUniqueIds: Array.isArray(f.resumeUniqueIds) ? f.resumeUniqueIds.map(String) : [],
1087
- pageSize: typeof f.pageSize == "number" ? f.pageSize : 20
1088
+ agentUniqueIds: Array.isArray(p.agentUniqueIds) ? p.agentUniqueIds.map(String) : [],
1089
+ tagUniqueIds: Array.isArray(p.tagUniqueIds) ? p.tagUniqueIds.map(String).filter(Boolean) : [],
1090
+ resumeUniqueIds: Array.isArray(p.resumeUniqueIds) ? p.resumeUniqueIds.map(String) : [],
1091
+ pageSize: typeof p.pageSize == "number" ? p.pageSize : 20
1088
1092
  };
1089
1093
  }
1090
1094
  const a = vt(e.resumeDisplayCount);
1091
1095
  if (a !== void 0 && (o.resumeDisplayCount = a), e.contentFilter && typeof e.contentFilter == "object") {
1092
- const f = e.contentFilter, b = (d = n.asLiteral(f.flowType)) == null ? void 0 : d.trim(), p = (y = n.asLiteral(f.category)) == null ? void 0 : y.trim();
1096
+ const p = e.contentFilter, b = (d = n.asLiteral(p.flowType)) == null ? void 0 : d.trim(), y = (v = n.asLiteral(p.category)) == null ? void 0 : v.trim();
1093
1097
  o.contentFilter = {
1094
1098
  flowType: b || "content-production",
1095
- ...p ? { category: p } : {},
1096
- tagUniqueIds: Array.isArray(f.tagUniqueIds) ? f.tagUniqueIds.map(String).filter(Boolean) : [],
1097
- tagMatch: f.tagMatch === "any" ? "any" : "all",
1098
- pageSize: typeof f.pageSize == "number" ? f.pageSize : 20
1099
+ ...y ? { category: y } : {},
1100
+ tagUniqueIds: Array.isArray(p.tagUniqueIds) ? p.tagUniqueIds.map(String).filter(Boolean) : [],
1101
+ tagMatch: p.tagMatch === "any" ? "any" : "all",
1102
+ pageSize: typeof p.pageSize == "number" ? p.pageSize : 20
1099
1103
  };
1100
1104
  }
1101
1105
  const l = vt(e.minCount);
@@ -1103,61 +1107,61 @@ function Vo(e, t, n) {
1103
1107
  const c = vt(e.maxCount);
1104
1108
  return c !== void 0 && (o.resumeMaxCount = c), o;
1105
1109
  }
1106
- const jn = Ce(null);
1110
+ const Hn = Ce(null);
1107
1111
  function Ft({
1108
1112
  contentSearch: e,
1109
1113
  children: t
1110
1114
  }) {
1111
- return /* @__PURE__ */ u(jn.Provider, { value: e ?? null, children: t });
1115
+ return /* @__PURE__ */ u(Hn.Provider, { value: e ?? null, children: t });
1112
1116
  }
1113
- function $o() {
1114
- return Ae(jn);
1117
+ function jo() {
1118
+ return Ae(Hn);
1115
1119
  }
1116
- const jo = 5;
1117
- function Ho(e, t = jo) {
1120
+ const Ho = 5;
1121
+ function Ko(e, t = Ho) {
1118
1122
  const n = typeof e == "number" ? e : Number(e);
1119
1123
  return !Number.isFinite(n) || n < 1 ? t : Math.min(100, Math.floor(n));
1120
1124
  }
1121
- function Ko(e, t) {
1125
+ function Wo(e, t) {
1122
1126
  return `${e}|${t}`;
1123
1127
  }
1124
- function Wo(e) {
1128
+ function Go(e) {
1125
1129
  return e.total <= 0 || e.pageSize <= 0 ? !1 : e.fetchedPage * e.pageSize < e.total;
1126
1130
  }
1127
- function ln(e, t, n) {
1131
+ function cn(e, t, n) {
1128
1132
  if (n <= 0) return 0;
1129
1133
  const r = Math.max(1, t);
1130
1134
  return ((e % n + n) % n + r) % n;
1131
1135
  }
1132
- function Hn(e, t, n) {
1136
+ function Kn(e, t, n) {
1133
1137
  if (n <= 0 || t <= 0) return [];
1134
1138
  const r = Math.min(t, n), o = (e % n + n) % n;
1135
1139
  return Array.from({ length: r }, (i, s) => (o + s) % n);
1136
1140
  }
1137
- function Go(e, t) {
1138
- return t.length === 0 || !t.some((n) => n >= e.itemCount) || !Wo(e) ? null : e.fetchedPage + 1;
1141
+ function Jo(e, t) {
1142
+ return t.length === 0 || !t.some((n) => n >= e.itemCount) || !Go(e) ? null : e.fetchedPage + 1;
1139
1143
  }
1140
- function cn(e, t, n, r) {
1141
- const o = Hn(t, n, r);
1144
+ function un(e, t, n, r) {
1145
+ const o = Kn(t, n, r);
1142
1146
  return o.length === 0 ? [] : o.some((i) => i >= e.length) ? [] : o.map((i) => e[i]);
1143
1147
  }
1144
- const Kn = Ce(null);
1148
+ const Wn = Ce(null);
1145
1149
  function Ut({
1146
1150
  resumeSearch: e,
1147
1151
  children: t
1148
1152
  }) {
1149
- return /* @__PURE__ */ u(Kn.Provider, { value: e ?? null, children: t });
1153
+ return /* @__PURE__ */ u(Wn.Provider, { value: e ?? null, children: t });
1150
1154
  }
1151
- function Jo() {
1152
- return Ae(Kn);
1155
+ function Yo() {
1156
+ return Ae(Wn);
1153
1157
  }
1154
- function bt(e) {
1158
+ function St(e) {
1155
1159
  return typeof e == "string" ? e : "";
1156
1160
  }
1157
1161
  function Ne(e) {
1158
1162
  return Array.isArray(e) ? e.map(String).filter(Boolean) : [];
1159
1163
  }
1160
- function un(e) {
1164
+ function mn(e) {
1161
1165
  if (!e || typeof e != "object")
1162
1166
  return { names: [], agentUniqueIds: [], tagUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
1163
1167
  const t = e, n = typeof t.agentKind == "string" ? t.agentKind.trim() : "", r = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), o = Number.isFinite(r) && r >= 1 && r <= 100 ? Math.floor(r) : 20;
@@ -1170,10 +1174,10 @@ function un(e) {
1170
1174
  pageSize: o
1171
1175
  };
1172
1176
  }
1173
- function mn(e) {
1177
+ function dn(e) {
1174
1178
  return JSON.stringify(e);
1175
1179
  }
1176
- const Yo = {
1180
+ const Qo = {
1177
1181
  name: "SkoponResumeSelect",
1178
1182
  schema: g.object({
1179
1183
  label: g.any().optional(),
@@ -1188,13 +1192,13 @@ const Yo = {
1188
1192
  maxCount: g.any().optional(),
1189
1193
  value: g.any().optional()
1190
1194
  }).passthrough()
1191
- }, Qo = {
1195
+ }, Xo = {
1192
1196
  flowType: "content-production",
1193
1197
  tagUniqueIds: [],
1194
1198
  pageSize: 20
1195
1199
  };
1196
- function dn(e) {
1197
- if (!e || typeof e != "object") return Qo;
1200
+ function pn(e) {
1201
+ if (!e || typeof e != "object") return Xo;
1198
1202
  const t = e, n = typeof t.flowType == "string" ? t.flowType.trim() : "", r = typeof t.category == "string" ? t.category.trim() : "", o = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), i = Number.isFinite(o) && o >= 1 && o <= 100 ? Math.floor(o) : 20;
1199
1203
  return {
1200
1204
  flowType: n || "content-production",
@@ -1207,7 +1211,7 @@ function dn(e) {
1207
1211
  function _e(e) {
1208
1212
  return { items: [], total: 0, fetchedPage: 0, pageSize: e };
1209
1213
  }
1210
- function Xo(e) {
1214
+ function Zo(e) {
1211
1215
  return {
1212
1216
  itemCount: e.items.length,
1213
1217
  total: e.total,
@@ -1218,9 +1222,9 @@ function Xo(e) {
1218
1222
  async function Ke(e, t, n, r) {
1219
1223
  let o = e;
1220
1224
  for (let i = 0; i < 20; i += 1) {
1221
- const s = Go(
1222
- Xo(o),
1223
- Hn(t, n, o.total)
1225
+ const s = Jo(
1226
+ Zo(o),
1227
+ Kn(t, n, o.total)
1224
1228
  );
1225
1229
  if (s == null) return o;
1226
1230
  const a = await r(s), l = a.page || s;
@@ -1233,8 +1237,8 @@ async function Ke(e, t, n, r) {
1233
1237
  }
1234
1238
  return o;
1235
1239
  }
1236
- function Zo({ content: e }) {
1237
- const [t, n] = E(!1), r = !!(e.mediaUrl || e.link || e.coverUrl), o = (i) => {
1240
+ function ei({ content: e }) {
1241
+ const [t, n] = R(!1), r = !!(e.mediaUrl || e.link || e.coverUrl), o = (i) => {
1238
1242
  if (i.stopPropagation(), i.preventDefault(), e.mediaKind === "video" && e.mediaUrl) {
1239
1243
  n(!0);
1240
1244
  return;
@@ -1253,7 +1257,7 @@ function Zo({ content: e }) {
1253
1257
  playsInline: !0,
1254
1258
  onClick: (i) => i.stopPropagation()
1255
1259
  }
1256
- ) : /* @__PURE__ */ B(
1260
+ ) : /* @__PURE__ */ w(
1257
1261
  "button",
1258
1262
  {
1259
1263
  type: "button",
@@ -1262,13 +1266,13 @@ function Zo({ content: e }) {
1262
1266
  disabled: !r,
1263
1267
  onClick: o,
1264
1268
  children: [
1265
- e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-cover-img" }) : /* @__PURE__ */ u(Ur, { className: "skopon-resume-select-card-cover-placeholder" }),
1266
- r ? /* @__PURE__ */ u(Ir, { className: "skopon-resume-select-card-play" }) : null
1269
+ e.coverUrl ? /* @__PURE__ */ u("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-cover-img" }) : /* @__PURE__ */ u(Ir, { className: "skopon-resume-select-card-cover-placeholder" }),
1270
+ r ? /* @__PURE__ */ u(Mr, { className: "skopon-resume-select-card-play" }) : null
1267
1271
  ]
1268
1272
  }
1269
1273
  ) });
1270
1274
  }
1271
- function ei({
1275
+ function ti({
1272
1276
  item: e,
1273
1277
  content: t,
1274
1278
  selected: n,
@@ -1276,7 +1280,7 @@ function ei({
1276
1280
  onToggle: o
1277
1281
  }) {
1278
1282
  const i = ((e == null ? void 0 : e.specialties) ?? []).filter(Boolean).slice(0, 3);
1279
- return /* @__PURE__ */ B(
1283
+ return /* @__PURE__ */ w(
1280
1284
  "div",
1281
1285
  {
1282
1286
  role: "button",
@@ -1291,198 +1295,198 @@ function ei({
1291
1295
  r || (s.key === "Enter" || s.key === " ") && (s.preventDefault(), o());
1292
1296
  },
1293
1297
  children: [
1294
- e ? /* @__PURE__ */ B("div", { className: "skopon-resume-select-card-person", children: [
1298
+ e ? /* @__PURE__ */ w("div", { className: "skopon-resume-select-card-person", children: [
1295
1299
  /* @__PURE__ */ u(
1296
- vr,
1300
+ Sr,
1297
1301
  {
1298
1302
  size: 36,
1299
1303
  src: e.avatarUrl || void 0,
1300
- icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(Fr, {}),
1304
+ icon: e.avatarUrl ? void 0 : /* @__PURE__ */ u(Ur, {}),
1301
1305
  className: "skopon-resume-select-card-avatar"
1302
1306
  }
1303
1307
  ),
1304
- /* @__PURE__ */ B("div", { className: "skopon-resume-select-card-person-text", children: [
1308
+ /* @__PURE__ */ w("div", { className: "skopon-resume-select-card-person-text", children: [
1305
1309
  /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-person-name", children: e.name || "未命名简历" }),
1306
1310
  i.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-specialties", children: i.map((s) => /* @__PURE__ */ u(Ee, { className: "skopon-resume-select-card-tag", children: s }, s)) }) : null
1307
1311
  ] })
1308
1312
  ] }) : null,
1309
1313
  /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-content-title", children: t.title || "未命名内容" }),
1310
- (t.tagLabels ?? []).length > 0 ? /* @__PURE__ */ B("div", { className: "skopon-resume-select-card-content-tags", "aria-label": "内容标签", children: [
1314
+ (t.tagLabels ?? []).length > 0 ? /* @__PURE__ */ w("div", { className: "skopon-resume-select-card-content-tags", "aria-label": "内容标签", children: [
1311
1315
  /* @__PURE__ */ u("span", { className: "skopon-resume-select-card-content-tags-label", children: "内容标签" }),
1312
1316
  /* @__PURE__ */ u("div", { className: "skopon-resume-select-card-content-tags-list", children: (t.tagLabels ?? []).map((s) => /* @__PURE__ */ u(Ee, { className: "skopon-resume-select-card-content-tag", children: s }, s)) })
1313
1317
  ] }) : null,
1314
- /* @__PURE__ */ u(Zo, { content: t })
1318
+ /* @__PURE__ */ u(ei, { content: t })
1315
1319
  ]
1316
1320
  }
1317
1321
  );
1318
1322
  }
1319
- function ti({ context: e }) {
1320
- const { interactive: t } = ve(), n = Jo(), r = $o(), { publishLiveOptions: o } = zt(), { value: i, setValue: s, setValueSilent: a, fieldName: l } = be(e, "value", {
1323
+ function ni({ context: e }) {
1324
+ const { interactive: t } = ve(), n = Yo(), r = jo(), { publishLiveOptions: o } = zt(), { value: i, setValue: s, setValueSilent: a, fieldName: l } = Se(e, "value", {
1321
1325
  component: "SkoponResumeSelect",
1322
1326
  changeAction: "click"
1323
- }), c = e.componentModel.properties, m = bt(c.label), d = bt(c.placeholder), y = bt(c.help), f = c.enableRefresh !== !1, b = Xe(c.minCount), p = Xe(c.maxCount), S = c.resumeDisplayMode === "content-only", k = Ho(c.resumeDisplayCount), h = W(() => un(c.resumeFilter), [c.resumeFilter]), v = W(() => dn(c.contentFilter), [c.contentFilter]), F = mn(h), R = mn(v), [U, w] = E(() => _e(20)), [q, z] = E(() => _e(20)), [K, I] = E(0), [Z, J] = E(0), [Q, G] = E(!1), [Y, ae] = E(""), C = T(0), M = T(!1), A = T(U), x = T(q);
1324
- A.current = U, x.current = q;
1325
- const N = ce(i);
1326
- O(() => {
1327
- const _ = Vn(N, p);
1328
- _ !== null && a(_);
1329
- }, [p, N, a]);
1330
- const j = V(
1331
- (_) => {
1332
- const D = un(JSON.parse(F));
1333
- return n ? n({ filter: D, page: _ }) : Promise.reject(new Error("未配置简历搜索服务"));
1327
+ }), c = e.componentModel.properties, m = St(c.label), d = St(c.placeholder), v = St(c.help), p = c.enableRefresh !== !1, b = Xe(c.minCount), y = Xe(c.maxCount), C = c.resumeDisplayMode === "content-only", A = Ko(c.resumeDisplayCount), f = G(() => mn(c.resumeFilter), [c.resumeFilter]), S = G(() => pn(c.contentFilter), [c.contentFilter]), I = dn(f), E = dn(S), [F, U] = R(() => _e(20)), [B, O] = R(() => _e(20)), [K, T] = R(0), [W, Y] = R(0), [ne, J] = R(!1), [Q, de] = R(""), ee = _(0), $ = _(!1), x = _(F), h = _(B);
1328
+ x.current = F, h.current = B;
1329
+ const M = me(i);
1330
+ z(() => {
1331
+ const k = $n(M, y);
1332
+ k !== null && a(k);
1333
+ }, [y, M, a]);
1334
+ const P = V(
1335
+ (k) => {
1336
+ const D = mn(JSON.parse(I));
1337
+ return n ? n({ filter: D, page: k }) : Promise.reject(new Error("未配置简历搜索服务"));
1334
1338
  },
1335
- [n, F]
1336
- ), P = V(
1337
- (_) => {
1338
- const D = dn(JSON.parse(R));
1339
- return r ? r({ filter: D, page: _ }) : Promise.reject(new Error("未配置内容搜索服务"));
1339
+ [n, I]
1340
+ ), N = V(
1341
+ (k) => {
1342
+ const D = pn(JSON.parse(E));
1343
+ return r ? r({ filter: D, page: k }) : Promise.reject(new Error("未配置内容搜索服务"));
1340
1344
  },
1341
- [r, R]
1345
+ [r, E]
1342
1346
  );
1343
- O(() => {
1344
- const _ = ++C.current;
1345
- if (!S && !n || !r) {
1346
- w(_e(h.pageSize ?? 20)), z(_e(v.pageSize ?? 20)), I(0), J(0), ae(!S && !n ? "未配置简历搜索服务" : "未配置内容搜索服务"), G(!1);
1347
+ z(() => {
1348
+ const k = ++ee.current;
1349
+ if (!C && !n || !r) {
1350
+ U(_e(f.pageSize ?? 20)), O(_e(S.pageSize ?? 20)), T(0), Y(0), de(!C && !n ? "未配置简历搜索服务" : "未配置内容搜索服务"), J(!1);
1347
1351
  return;
1348
1352
  }
1349
- G(!0), ae(""), I(0), J(0), (async () => {
1353
+ J(!0), de(""), T(0), Y(0), (async () => {
1350
1354
  try {
1351
- const [D, ee] = await Promise.all([
1352
- S ? Promise.resolve({ list: [], total: 0, page: 1, pageSize: 20 }) : j(1),
1353
- P(1)
1355
+ const [D, re] = await Promise.all([
1356
+ C ? Promise.resolve({ list: [], total: 0, page: 1, pageSize: 20 }) : P(1),
1357
+ N(1)
1354
1358
  ]);
1355
- if (_ !== C.current) return;
1356
- let te = {
1359
+ if (k !== ee.current) return;
1360
+ let ie = {
1357
1361
  items: D.list,
1358
1362
  total: D.total,
1359
1363
  fetchedPage: D.page || 1,
1360
1364
  pageSize: D.pageSize
1361
- }, fe = {
1362
- items: ee.list,
1363
- total: ee.total,
1364
- fetchedPage: ee.page || 1,
1365
- pageSize: ee.pageSize
1365
+ }, he = {
1366
+ items: re.list,
1367
+ total: re.total,
1368
+ fetchedPage: re.page || 1,
1369
+ pageSize: re.pageSize
1366
1370
  };
1367
- if (S || (te = await Ke(te, 0, k, j)), fe = await Ke(fe, 0, k, P), _ !== C.current) return;
1368
- w(te), z(fe);
1371
+ if (C || (ie = await Ke(ie, 0, A, P)), he = await Ke(he, 0, A, N), k !== ee.current) return;
1372
+ U(ie), O(he);
1369
1373
  } catch (D) {
1370
- if (_ !== C.current) return;
1371
- w(_e(20)), z(_e(20)), ae(D instanceof Error ? D.message : S ? "加载内容失败" : "加载简历和内容失败");
1374
+ if (k !== ee.current) return;
1375
+ U(_e(20)), O(_e(20)), de(D instanceof Error ? D.message : C ? "加载内容失败" : "加载简历和内容失败");
1372
1376
  } finally {
1373
- _ === C.current && G(!1);
1377
+ k === ee.current && J(!1);
1374
1378
  }
1375
1379
  })();
1376
1380
  }, [
1377
- S,
1378
- v.pageSize,
1381
+ C,
1382
+ S.pageSize,
1379
1383
  r,
1380
- k,
1384
+ A,
1385
+ N,
1381
1386
  P,
1382
- j,
1383
- h.pageSize,
1387
+ f.pageSize,
1384
1388
  n
1385
1389
  ]);
1386
- const le = cn(U.items, K, k, U.total), me = cn(q.items, Z, k, q.total), ie = S ? me.map((_) => ({ content: _, key: _.flowUniqueId })) : le.flatMap((_, D) => {
1387
- const ee = me[D];
1388
- return ee ? [{ item: _, content: ee, key: Ko(_.resumeUniqueId, ee.flowUniqueId) }] : [];
1389
- }), pe = ie.map((_) => {
1390
+ const X = un(F.items, K, A, F.total), te = un(B.items, W, A, B.total), j = C ? te.map((k) => ({ content: k, key: k.flowUniqueId })) : X.flatMap((k, D) => {
1391
+ const re = te[D];
1392
+ return re ? [{ item: k, content: re, key: Wo(k.resumeUniqueId, re.flowUniqueId) }] : [];
1393
+ }), oe = j.map((k) => {
1390
1394
  var D;
1391
- return `${_.key} ${((D = _.item) == null ? void 0 : D.name) ?? ""} ${_.content.title}`;
1395
+ return `${k.key} ${((D = k.item) == null ? void 0 : D.name) ?? ""} ${k.content.title}`;
1392
1396
  }).join(`
1393
1397
  `);
1394
- O(() => {
1398
+ z(() => {
1395
1399
  l && o(
1396
1400
  l,
1397
- ie.map((_) => ({
1398
- value: _.key,
1399
- label: _.item ? `${_.item.name || _.item.resumeUniqueId} / ${_.content.title}` : _.content.title
1401
+ j.map((k) => ({
1402
+ value: k.key,
1403
+ label: k.item ? `${k.item.name || k.item.resumeUniqueId} / ${k.content.title}` : k.content.title
1400
1404
  }))
1401
1405
  );
1402
- }, [l, pe, o]);
1403
- const he = (_) => {
1406
+ }, [l, oe, o]);
1407
+ const pe = (k) => {
1404
1408
  if (!t) return;
1405
- const D = Bn(N, _, b, p);
1409
+ const D = Dn(M, k, b, y);
1406
1410
  D !== null && s(D);
1407
1411
  }, Ue = () => {
1408
- if (M.current || !S && U.total <= 0 || q.total <= 0) return;
1409
- M.current = !0;
1410
- const _ = ++C.current, D = ln(K, k, U.total), ee = ln(Z, k, q.total);
1411
- G(!0), ae(""), (async () => {
1412
+ if ($.current || !C && F.total <= 0 || B.total <= 0) return;
1413
+ $.current = !0;
1414
+ const k = ++ee.current, D = cn(K, A, F.total), re = cn(W, A, B.total);
1415
+ J(!0), de(""), (async () => {
1412
1416
  try {
1413
- const [te, fe] = await Promise.all([
1414
- S ? Promise.resolve(A.current) : Ke(A.current, D, k, j),
1415
- Ke(x.current, ee, k, P)
1417
+ const [ie, he] = await Promise.all([
1418
+ C ? Promise.resolve(x.current) : Ke(x.current, D, A, P),
1419
+ Ke(h.current, re, A, N)
1416
1420
  ]);
1417
- if (_ !== C.current) return;
1418
- w(te), z(fe), I(D), J(ee);
1419
- } catch (te) {
1420
- if (_ !== C.current) return;
1421
- ae(te instanceof Error ? te.message : "换一批失败");
1421
+ if (k !== ee.current) return;
1422
+ U(ie), O(he), T(D), Y(re);
1423
+ } catch (ie) {
1424
+ if (k !== ee.current) return;
1425
+ de(ie instanceof Error ? ie.message : "换一批失败");
1422
1426
  } finally {
1423
- M.current = !1, _ === C.current && G(!1);
1427
+ $.current = !1, k === ee.current && J(!1);
1424
1428
  }
1425
1429
  })();
1426
- }, Ie = d || (S ? "暂无匹配的内容" : "暂无匹配的简历或内容"), de = !Q && !Y && ie.length === 0;
1427
- return /* @__PURE__ */ B(
1430
+ }, Ie = d || (C ? "暂无匹配的内容" : "暂无匹配的简历或内容"), fe = !ne && !Q && j.length === 0;
1431
+ return /* @__PURE__ */ w(
1428
1432
  "div",
1429
1433
  {
1430
1434
  className: "form-block-preview skopon-resume-select",
1431
1435
  "data-skopon-field": l || void 0,
1432
1436
  children: [
1433
1437
  m ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: m }) : null,
1434
- Q && ie.length === 0 ? /* @__PURE__ */ B("div", { className: "skopon-resume-select-status", children: [
1438
+ ne && j.length === 0 ? /* @__PURE__ */ w("div", { className: "skopon-resume-select-status", children: [
1435
1439
  /* @__PURE__ */ u(Rt, { size: "small" }),
1436
1440
  " ",
1437
- S ? "加载内容…" : "加载简历和内容…"
1441
+ C ? "加载内容…" : "加载简历和内容…"
1438
1442
  ] }) : null,
1439
- !Q && Y ? /* @__PURE__ */ u(ue.Text, { type: "danger", className: "skopon-resume-select-status", children: Y }) : null,
1440
- de ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: Ie }) : null,
1441
- ie.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: ie.map((_) => /* @__PURE__ */ u(
1442
- ei,
1443
+ !ne && Q ? /* @__PURE__ */ u(le.Text, { type: "danger", className: "skopon-resume-select-status", children: Q }) : null,
1444
+ fe ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-empty", children: Ie }) : null,
1445
+ j.length > 0 ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-list", children: j.map((k) => /* @__PURE__ */ u(
1446
+ ti,
1443
1447
  {
1444
- item: _.item,
1445
- content: _.content,
1446
- selected: N.includes(_.key),
1447
- disabled: Dn(
1448
- N,
1449
- _.key,
1448
+ item: k.item,
1449
+ content: k.content,
1450
+ selected: M.includes(k.key),
1451
+ disabled: Vn(
1452
+ M,
1453
+ k.key,
1450
1454
  t,
1451
1455
  b,
1452
- p
1456
+ y
1453
1457
  ),
1454
- onToggle: () => he(_.key)
1458
+ onToggle: () => pe(k.key)
1455
1459
  },
1456
- _.key
1460
+ k.key
1457
1461
  )) }) : null,
1458
- f && (S || n) && r ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
1462
+ p && (C || n) && r ? /* @__PURE__ */ u("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ u(
1459
1463
  qe,
1460
1464
  {
1461
1465
  type: "default",
1462
1466
  size: "small",
1463
- icon: /* @__PURE__ */ u(Sn, {}),
1464
- loading: Q,
1465
- disabled: !t || !S && U.total <= 0 || q.total <= 0,
1467
+ icon: /* @__PURE__ */ u(Cn, {}),
1468
+ loading: ne,
1469
+ disabled: !t || !C && F.total <= 0 || B.total <= 0,
1466
1470
  onClick: Ue,
1467
1471
  children: "换一批"
1468
1472
  }
1469
1473
  ) }) : null,
1470
- y ? /* @__PURE__ */ u(ue.Text, { type: "secondary", className: "form-block-preview-help", children: y }) : null
1474
+ v ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-help", children: v }) : null
1471
1475
  ]
1472
1476
  }
1473
1477
  );
1474
1478
  }
1475
- const ni = oe(
1476
- Yo,
1477
- ti
1478
- ), ri = {
1479
+ const ri = ce(
1480
+ Qo,
1481
+ ni
1482
+ ), oi = {
1479
1483
  type: "resume_multiselect",
1480
1484
  componentName: "SkoponResumeSelect",
1481
- toComponent: Do,
1482
- fromComponent: Vo,
1483
- catalogComponents: [ni]
1485
+ toComponent: Vo,
1486
+ fromComponent: $o,
1487
+ catalogComponents: [ri]
1484
1488
  };
1485
- function oi(e, t) {
1489
+ function ii(e, t) {
1486
1490
  var n;
1487
1491
  return {
1488
1492
  node: {
@@ -1495,7 +1499,7 @@ function oi(e, t) {
1495
1499
  }
1496
1500
  };
1497
1501
  }
1498
- function ii(e, t, n) {
1502
+ function si(e, t, n) {
1499
1503
  var o, i;
1500
1504
  const r = (o = n.asLiteral(e.help)) == null ? void 0 : o.trim();
1501
1505
  return {
@@ -1526,16 +1530,16 @@ function fn({
1526
1530
  }
1527
1531
  );
1528
1532
  }
1529
- function si({
1533
+ function ai({
1530
1534
  url: e = "",
1531
1535
  height: t,
1532
1536
  label: n,
1533
1537
  help: r
1534
1538
  }) {
1535
- const [o, i] = E(!1), [s, a] = E(!0), l = T(null), c = e.trim(), m = Lr(c) ? c : null, d = Le(t), y = (n == null ? void 0 : n.trim()) || "网页展示", f = r == null ? void 0 : r.trim(), b = c ? "网页 URL 无效" : "未设置网页 URL";
1536
- return /* @__PURE__ */ B("div", { className: "form-block-preview skopon-web-preview", children: [
1539
+ const [o, i] = R(!1), [s, a] = R(!0), l = _(null), c = e.trim(), m = Br(c) ? c : null, d = Le(t), v = (n == null ? void 0 : n.trim()) || "网页展示", p = r == null ? void 0 : r.trim(), b = c ? "网页 URL 无效" : "未设置网页 URL";
1540
+ return /* @__PURE__ */ w("div", { className: "form-block-preview skopon-web-preview", children: [
1537
1541
  n != null && n.trim() ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: n.trim() }) : null,
1538
- /* @__PURE__ */ B(
1542
+ /* @__PURE__ */ w(
1539
1543
  "div",
1540
1544
  {
1541
1545
  className: `skopon-web-frame-shell${m ? "" : " skopon-web-frame-shell--empty"}`,
@@ -1545,7 +1549,7 @@ function si({
1545
1549
  fn,
1546
1550
  {
1547
1551
  url: m,
1548
- title: y,
1552
+ title: v,
1549
1553
  className: "skopon-web-frame skopon-web-frame--inline",
1550
1554
  height: d
1551
1555
  }
@@ -1557,7 +1561,7 @@ function si({
1557
1561
  type: "default",
1558
1562
  shape: "circle",
1559
1563
  className: "skopon-web-expand-button",
1560
- icon: /* @__PURE__ */ u(Mr, {}),
1564
+ icon: /* @__PURE__ */ u(Nr, {}),
1561
1565
  "aria-label": "扩展显示",
1562
1566
  onClick: () => {
1563
1567
  a(!1), i(!0);
@@ -1567,26 +1571,26 @@ function si({
1567
1571
  ]
1568
1572
  }
1569
1573
  ),
1570
- f ? /* @__PURE__ */ u(ue.Text, { type: "secondary", className: "form-block-preview-help", children: f }) : null,
1574
+ p ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-help", children: p }) : null,
1571
1575
  /* @__PURE__ */ u(
1572
1576
  br,
1573
1577
  {
1574
1578
  open: o,
1575
- title: y,
1579
+ title: v,
1576
1580
  footer: null,
1577
1581
  width: "min(1200px, calc(100vw - 32px))",
1578
1582
  className: "skopon-web-modal",
1579
1583
  destroyOnHidden: !0,
1580
1584
  mask: { closable: !0 },
1581
1585
  onCancel: () => {
1582
- var p;
1583
- (p = l.current) == null || p.removeAttribute("src"), i(!1), a(!0);
1586
+ var y;
1587
+ (y = l.current) == null || y.removeAttribute("src"), i(!1), a(!0);
1584
1588
  },
1585
1589
  children: m && !s ? /* @__PURE__ */ u(
1586
1590
  fn,
1587
1591
  {
1588
1592
  url: m,
1589
- title: `${y}(扩展显示)`,
1593
+ title: `${v}(扩展显示)`,
1590
1594
  className: "skopon-web-frame skopon-web-frame--modal",
1591
1595
  frameRef: l
1592
1596
  }
@@ -1595,7 +1599,7 @@ function si({
1595
1599
  )
1596
1600
  ] });
1597
1601
  }
1598
- const ai = {
1602
+ const li = {
1599
1603
  name: "SkoponWeb",
1600
1604
  schema: g.object({
1601
1605
  url: g.any().optional(),
@@ -1603,12 +1607,12 @@ const ai = {
1603
1607
  label: g.any().optional(),
1604
1608
  help: g.any().optional()
1605
1609
  }).passthrough()
1606
- }, li = oe(
1607
- ai,
1610
+ }, ci = ce(
1611
+ li,
1608
1612
  ({ context: e }) => {
1609
1613
  const t = e.componentModel.properties;
1610
1614
  return /* @__PURE__ */ u(
1611
- si,
1615
+ ai,
1612
1616
  {
1613
1617
  url: typeof t.url == "string" ? t.url : "",
1614
1618
  height: Le(t.height),
@@ -1617,64 +1621,64 @@ const ai = {
1617
1621
  }
1618
1622
  );
1619
1623
  }
1620
- ), ci = {
1624
+ ), ui = {
1621
1625
  type: "web",
1622
1626
  componentName: "SkoponWeb",
1623
- toComponent: oi,
1624
- fromComponent: ii,
1625
- catalogComponents: [li]
1627
+ toComponent: ii,
1628
+ fromComponent: si,
1629
+ catalogComponents: [ci]
1626
1630
  }, nt = [
1627
- ri,
1628
- Bo,
1629
- ci
1630
- ], ui = new Map(
1631
+ oi,
1632
+ Do,
1633
+ ui
1634
+ ], mi = new Map(
1631
1635
  nt.map((e) => [e.type, e])
1632
- ), mi = new Map(
1636
+ ), di = new Map(
1633
1637
  nt.map((e) => [e.componentName, e])
1634
1638
  );
1635
- function di(e) {
1636
- return ui.get(e);
1639
+ function pi(e) {
1640
+ return mi.get(e);
1637
1641
  }
1638
1642
  function fi(e) {
1639
- return mi.get(e);
1643
+ return di.get(e);
1640
1644
  }
1641
- function pi() {
1645
+ function hi() {
1642
1646
  return nt.flatMap((e) => e.catalogComponents);
1643
1647
  }
1644
- function hi() {
1648
+ function gi() {
1645
1649
  return nt.map((e) => e.componentName);
1646
1650
  }
1647
1651
  const Ze = "root", It = "__title__", Mt = "__desc__", Ot = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
1648
- function gi(e) {
1652
+ function yi(e) {
1649
1653
  return `/${e}`;
1650
1654
  }
1651
- function pn(e) {
1655
+ function hn(e) {
1652
1656
  return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
1653
1657
  }
1654
- function X(e) {
1658
+ function Z(e) {
1655
1659
  if (typeof e == "string") return e;
1656
1660
  }
1657
- function yi(e) {
1658
- const t = e.id || Se("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
1661
+ function vi(e) {
1662
+ const t = e.id || be("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
1659
1663
  return {
1660
1664
  id: t,
1661
1665
  component: "SkoponMedia",
1662
1666
  mediaType: n,
1663
- urls: oo(e),
1667
+ urls: io(e),
1664
1668
  mediaSize: De(e.mediaSize),
1665
1669
  label: e.label ?? "",
1666
1670
  help: e.help ?? "",
1667
1671
  placeholder: e.placeholder ?? ""
1668
1672
  };
1669
1673
  }
1670
- function vi(e) {
1674
+ function Si(e) {
1671
1675
  if (Array.isArray(e.urls))
1672
1676
  return e.urls.map((n) => String(n).trim()).filter(Boolean);
1673
- const t = X(e.url);
1677
+ const t = Z(e.url);
1674
1678
  return t != null && t.trim() ? [t.trim()] : [];
1675
1679
  }
1676
1680
  function We(e, t, n) {
1677
- const r = typeof e.id == "string" ? e.id : Se("block-"), o = vi(e), i = X(e.label) ?? X(e.description) ?? n, s = X(e.help), a = X(e.placeholder), l = De(e.mediaSize);
1681
+ const r = typeof e.id == "string" ? e.id : be("block-"), o = Si(e), i = Z(e.label) ?? Z(e.description) ?? n, s = Z(e.help), a = Z(e.placeholder), l = De(e.mediaSize);
1678
1682
  return {
1679
1683
  id: r,
1680
1684
  type: t,
@@ -1685,7 +1689,7 @@ function We(e, t, n) {
1685
1689
  mediaUrls: o.length > 0 ? o : [""]
1686
1690
  };
1687
1691
  }
1688
- function hn(e) {
1692
+ function gn(e) {
1689
1693
  switch (e.type) {
1690
1694
  case "toggle":
1691
1695
  return Ve(e.defaultValue);
@@ -1705,7 +1709,7 @@ function hn(e) {
1705
1709
  }
1706
1710
  function bi(e) {
1707
1711
  var c;
1708
- const t = e.id || Se("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? gi(r) : void 0, i = ye(e.options), s = (m) => r ? { node: m, dataKey: r, dataValue: hn(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = di(e.type);
1712
+ const t = e.id || be("a2-"), n = e.label ?? "", r = ((c = e.name) == null ? void 0 : c.trim()) || "", o = r ? yi(r) : void 0, i = ye(e.options), s = (m) => r ? { node: m, dataKey: r, dataValue: gn(e) } : { node: m }, a = { id: t, label: n, name: r, path: o, withData: s }, l = pi(e.type);
1709
1713
  if (l)
1710
1714
  return l.toComponent(e, a);
1711
1715
  switch (e.type) {
@@ -1714,7 +1718,7 @@ function bi(e) {
1714
1718
  case "paragraph":
1715
1719
  return { node: { id: t, component: "Text", text: n, variant: "body" } };
1716
1720
  case "text":
1717
- return e.hidden ? r ? { node: null, dataKey: r, dataValue: hn(e) } : { node: null } : s({
1721
+ return e.hidden ? r ? { node: null, dataKey: r, dataValue: gn(e) } : { node: null } : s({
1718
1722
  id: t,
1719
1723
  component: "TextField",
1720
1724
  label: n,
@@ -1824,12 +1828,15 @@ function bi(e) {
1824
1828
  case "image":
1825
1829
  case "video":
1826
1830
  case "audio":
1827
- return { node: yi(e) };
1831
+ return { node: vi(e) };
1828
1832
  case "file":
1829
1833
  return s({
1830
1834
  id: t,
1831
1835
  component: "FileUpload",
1832
1836
  label: n,
1837
+ help: e.help ?? "",
1838
+ fileExampleUrls: e.fileExampleUrls ?? [],
1839
+ fileReviewCriteria: e.fileReviewCriteria ?? "",
1833
1840
  accept: (e.fileAcceptExtensions ?? []).join(","),
1834
1841
  fileAcceptTypes: e.fileAcceptTypes ?? [],
1835
1842
  filePlaceholderIcon: e.filePlaceholderIcon ?? "document",
@@ -1848,31 +1855,31 @@ function Nt(e) {
1848
1855
  const n = t.children;
1849
1856
  return !Array.isArray(n) || n.length === 0;
1850
1857
  }
1851
- function Wn(e, t) {
1858
+ function Gn(e, t) {
1852
1859
  const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, s = (e.title ?? "").trim(), a = (e.description ?? "").trim();
1853
1860
  i && s && (n.push({ id: It, component: "Text", text: s, variant: "h2" }), r.push(It)), i && a && (n.push({ id: Mt, component: "Text", text: a, variant: "body" }), r.push(Mt));
1854
1861
  for (const m of e.blocks ?? []) {
1855
1862
  if (!ke(m)) continue;
1856
- const { node: d, dataKey: y, dataValue: f } = bi(m);
1857
- y && (o[y] = f), d && (n.push(d), r.push(d.id));
1863
+ const { node: d, dataKey: v, dataValue: p } = bi(m);
1864
+ v && (o[v] = p), d && (n.push(d), r.push(d.id));
1858
1865
  }
1859
1866
  n.unshift({ id: Ze, component: "Column", children: r });
1860
1867
  const l = { root: Ze, components: n, dataModel: o }, c = t == null ? void 0 : t.styleId;
1861
1868
  return c !== void 0 && (l.surfaceProperties = { styleId: c ?? null }), l;
1862
1869
  }
1863
- function Si(e) {
1870
+ function Ci(e) {
1864
1871
  const t = /* @__PURE__ */ new Map();
1865
1872
  for (const n of e.components ?? [])
1866
1873
  n && typeof n.id == "string" && t.set(n.id, n);
1867
1874
  return t;
1868
1875
  }
1869
- function St(e) {
1876
+ function bt(e) {
1870
1877
  return ye(e.options);
1871
1878
  }
1872
- function Ci(e) {
1873
- const t = typeof e.id == "string" ? e.id : Se("block-"), n = String(e.component ?? ""), r = X(e.label) ?? X(e.text) ?? "", o = pn(e.value), i = (a) => ({ id: t, type: a, label: r }), s = fi(n);
1879
+ function Ai(e) {
1880
+ const t = typeof e.id == "string" ? e.id : be("block-"), n = String(e.component ?? ""), r = Z(e.label) ?? Z(e.text) ?? "", o = hn(e.value), i = (a) => ({ id: t, type: a, label: r }), s = fi(n);
1874
1881
  if (s)
1875
- return s.fromComponent(e, i, { asLiteral: X, nameFromValue: pn });
1882
+ return s.fromComponent(e, i, { asLiteral: Z, nameFromValue: hn });
1876
1883
  switch (n) {
1877
1884
  case "Text": {
1878
1885
  const a = String(e.variant ?? "body"), l = /^h[1-6]$/i.test(a) || a === "title" || a === "subtitle";
@@ -1881,8 +1888,8 @@ function Ci(e) {
1881
1888
  case "TextField": {
1882
1889
  const a = String(e.variant ?? "shortText");
1883
1890
  let l = "text";
1884
- a === "longText" ? l = "textarea" : a === "number" ? l = "number" : X(e.validationRegexp) === Ot && (l = "email");
1885
- const c = { ...i(l), name: o }, m = X(e.placeholder);
1891
+ a === "longText" ? l = "textarea" : a === "number" ? l = "number" : Z(e.validationRegexp) === Ot && (l = "email");
1892
+ const c = { ...i(l), name: o }, m = Z(e.placeholder);
1886
1893
  return m && (c.placeholder = m), c;
1887
1894
  }
1888
1895
  case "CheckBox":
@@ -1891,25 +1898,25 @@ function Ci(e) {
1891
1898
  const l = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", c = {
1892
1899
  ...i(l),
1893
1900
  name: o,
1894
- options: St(e)
1895
- }, m = X(e.placeholder);
1901
+ options: bt(e)
1902
+ }, m = Z(e.placeholder);
1896
1903
  return m && (c.placeholder = m), c;
1897
1904
  }
1898
1905
  case "ChoicePicker": {
1899
- const a = X(e.skoponPickerType);
1906
+ const a = Z(e.skoponPickerType);
1900
1907
  if (a === "select" || a === "multiselect" || a === "radio" || a === "checkbox") {
1901
1908
  const m = {
1902
1909
  ...i(a),
1903
1910
  name: o,
1904
- options: St(e)
1905
- }, d = X(e.placeholder);
1911
+ options: bt(e)
1912
+ }, d = Z(e.placeholder);
1906
1913
  return d && (m.placeholder = d), m;
1907
1914
  }
1908
1915
  const c = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
1909
- return { ...i(c), name: o, options: St(e) };
1916
+ return { ...i(c), name: o, options: bt(e) };
1910
1917
  }
1911
1918
  case "DateTimeInput": {
1912
- const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d = X(e.placeholder);
1919
+ const a = e.enableDate === !0, l = e.enableTime === !0, m = { ...i(!a && l ? "time" : "datetime"), name: o }, d = Z(e.placeholder);
1913
1920
  return d && (m.placeholder = d), m;
1914
1921
  }
1915
1922
  case "SkoponMedia": {
@@ -1923,14 +1930,14 @@ function Ci(e) {
1923
1930
  case "AudioPlayer":
1924
1931
  return We(e, "audio", r);
1925
1932
  case "FileUpload": {
1926
- const a = X(e.accept) ?? "", l = { ...i("file"), name: o };
1927
- return a && (l.fileAcceptExtensions = a.split(",").map((c) => c.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (l.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (l.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (l.fileMinCount = e.minCount), typeof e.maxCount == "number" && (l.fileMaxCount = e.maxCount), l;
1933
+ const a = Z(e.accept) ?? "", l = { ...i("file"), name: o };
1934
+ return l.help = Z(e.help), l.fileReviewCriteria = Z(e.fileReviewCriteria), Array.isArray(e.fileExampleUrls) && (l.fileExampleUrls = e.fileExampleUrls.filter((c) => typeof c == "string")), a && (l.fileAcceptExtensions = a.split(",").map((c) => c.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (l.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (l.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (l.fileMinCount = e.minCount), typeof e.maxCount == "number" && (l.fileMaxCount = e.maxCount), l;
1928
1935
  }
1929
1936
  default:
1930
1937
  return null;
1931
1938
  }
1932
1939
  }
1933
- function Gn(e, t, n, r) {
1940
+ function Jn(e, t, n, r) {
1934
1941
  if (n.has(e)) return;
1935
1942
  n.add(e);
1936
1943
  const o = t.get(e);
@@ -1938,12 +1945,12 @@ function Gn(e, t, n, r) {
1938
1945
  const i = String(o.component ?? "");
1939
1946
  if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
1940
1947
  for (const s of o.children)
1941
- typeof s == "string" && Gn(s, t, n, r);
1948
+ typeof s == "string" && Jn(s, t, n, r);
1942
1949
  return;
1943
1950
  }
1944
1951
  r.push(o);
1945
1952
  }
1946
- function Ai(e, t) {
1953
+ function ki(e, t) {
1947
1954
  return t ? e.map((n) => {
1948
1955
  var i;
1949
1956
  const r = (i = n.name) == null ? void 0 : i.trim();
@@ -1952,32 +1959,32 @@ function Ai(e, t) {
1952
1959
  return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: Ve(o) } : { ...n, defaultValue: o };
1953
1960
  }) : e;
1954
1961
  }
1955
- function ki(e) {
1962
+ function _i(e) {
1956
1963
  if (!e || !Array.isArray(e.components))
1957
- return we({ title: "", description: "", blocks: [] });
1958
- const t = Si(e), n = [];
1959
- Gn(e.root ?? Ze, t, /* @__PURE__ */ new Set(), n);
1964
+ return Pe({ title: "", description: "", blocks: [] });
1965
+ const t = Ci(e), n = [];
1966
+ Jn(e.root ?? Ze, t, /* @__PURE__ */ new Set(), n);
1960
1967
  let r = "", o = "";
1961
1968
  const i = [];
1962
1969
  for (const s of n) {
1963
1970
  if (s.id === It) {
1964
- r = X(s.text) ?? r;
1971
+ r = Z(s.text) ?? r;
1965
1972
  continue;
1966
1973
  }
1967
1974
  if (s.id === Mt) {
1968
- o = X(s.text) ?? o;
1975
+ o = Z(s.text) ?? o;
1969
1976
  continue;
1970
1977
  }
1971
- const a = Ci(s);
1978
+ const a = Ai(s);
1972
1979
  a && i.push(a);
1973
1980
  }
1974
- return we({
1981
+ return Pe({
1975
1982
  title: r,
1976
1983
  description: o,
1977
- blocks: Ai(i, e.dataModel)
1984
+ blocks: ki(i, e.dataModel)
1978
1985
  });
1979
1986
  }
1980
- function _i(e, t) {
1987
+ function Ti(e, t) {
1981
1988
  const { surfaceId: n, catalogId: r } = t, o = [
1982
1989
  { version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
1983
1990
  {
@@ -1990,12 +1997,12 @@ function _i(e, t) {
1990
1997
  updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
1991
1998
  }), o;
1992
1999
  }
1993
- function Jn(e) {
2000
+ function Yn(e) {
1994
2001
  return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
1995
2002
  }
1996
- function Ti(e, t) {
2003
+ function xi(e, t) {
1997
2004
  if (!e || typeof e != "object") return null;
1998
- const n = e, r = Jn(n.a2ui) ? n.a2ui : void 0;
2005
+ const n = e, r = Yn(n.a2ui) ? n.a2ui : void 0;
1999
2006
  if (r && !Nt(r)) return r;
2000
2007
  const o = Array.isArray(n.blocks) ? n.blocks : [];
2001
2008
  if (o.length === 0) return null;
@@ -2003,12 +2010,12 @@ function Ti(e, t) {
2003
2010
  title: typeof n.title == "string" ? n.title : "",
2004
2011
  description: typeof n.description == "string" ? n.description : "",
2005
2012
  blocks: o,
2006
- jsonSchema: Nn(n.jsonSchema ?? n.json_schema)
2007
- }), s = Wn(i, t);
2013
+ jsonSchema: En(n.jsonSchema ?? n.json_schema)
2014
+ }), s = Gn(i, t);
2008
2015
  return Nt(s) ? null : s;
2009
2016
  }
2010
- function xi(e, t, n) {
2011
- return Wn(
2017
+ function Fi(e, t, n) {
2018
+ return Gn(
2012
2019
  {
2013
2020
  title: e.title,
2014
2021
  description: e.description,
@@ -2017,18 +2024,18 @@ function xi(e, t, n) {
2017
2024
  n
2018
2025
  );
2019
2026
  }
2020
- function Fi(e) {
2027
+ function Ui(e) {
2021
2028
  if (!e || typeof e != "object" || Array.isArray(e))
2022
2029
  return;
2023
2030
  const t = e;
2024
- return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Jn(t.a2ui) ? ki(t.a2ui) : tt({
2031
+ return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Yn(t.a2ui) ? _i(t.a2ui) : tt({
2025
2032
  title: typeof t.title == "string" ? t.title : "",
2026
2033
  description: typeof t.description == "string" ? t.description : "",
2027
2034
  blocks: Array.isArray(t.blocks) ? t.blocks : [],
2028
- jsonSchema: Nn(t.jsonSchema ?? t.json_schema)
2035
+ jsonSchema: En(t.jsonSchema ?? t.json_schema)
2029
2036
  });
2030
2037
  }
2031
- function Ui(e, t, n) {
2038
+ function Ii(e, t, n) {
2032
2039
  const r = e.model.surfacesMap.get(t);
2033
2040
  if (!r) return {};
2034
2041
  const o = {};
@@ -2038,7 +2045,7 @@ function Ui(e, t, n) {
2038
2045
  }
2039
2046
  return o;
2040
2047
  }
2041
- const Ii = /* @__PURE__ */ new Set(["type", "name", "id"]);
2048
+ const Mi = /* @__PURE__ */ new Set(["type", "name", "id"]);
2042
2049
  function qt(e) {
2043
2050
  return e.type === "text" && e.hidden === !0;
2044
2051
  }
@@ -2049,7 +2056,7 @@ function Lt(e) {
2049
2056
  blocks: [e]
2050
2057
  }).blocks[0];
2051
2058
  }
2052
- function Mi(e, t) {
2059
+ function Ni(e, t) {
2053
2060
  var o, i;
2054
2061
  const n = /* @__PURE__ */ new Map();
2055
2062
  for (const s of t) {
@@ -2058,11 +2065,11 @@ function Mi(e, t) {
2058
2065
  }
2059
2066
  const r = [];
2060
2067
  for (const s of e.blocks) {
2061
- if (Un(s.type)) {
2068
+ if (In(s.type)) {
2062
2069
  r.push(Lt(s));
2063
2070
  continue;
2064
2071
  }
2065
- if (!se(s.type)) continue;
2072
+ if (!ue(s.type)) continue;
2066
2073
  const a = (i = s.name) == null ? void 0 : i.trim();
2067
2074
  if (!a) continue;
2068
2075
  const l = n.get(a);
@@ -2070,7 +2077,7 @@ function Mi(e, t) {
2070
2077
  }
2071
2078
  return r;
2072
2079
  }
2073
- function Ni(e, t, n) {
2080
+ function Ei(e, t, n) {
2074
2081
  const r = e.rawBlocks;
2075
2082
  if (!(r != null && r.length)) return n;
2076
2083
  for (const o of r) {
@@ -2079,11 +2086,11 @@ function Ni(e, t, n) {
2079
2086
  }
2080
2087
  return n;
2081
2088
  }
2082
- function Ei(e, t) {
2089
+ function Ri(e, t) {
2083
2090
  var r;
2084
2091
  const n = { ...e };
2085
2092
  for (const o of Object.keys(t)) {
2086
- if (Ii.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
2093
+ if (Mi.has(o) || !Object.prototype.hasOwnProperty.call(t, o)) continue;
2087
2094
  const i = t[o];
2088
2095
  i !== void 0 && Object.assign(n, { [o]: i });
2089
2096
  }
@@ -2107,32 +2114,32 @@ function rt(e) {
2107
2114
  rawBlocks: n
2108
2115
  };
2109
2116
  }
2110
- function Ri(e, t) {
2117
+ function wi(e, t) {
2111
2118
  var i, s, a, l, c, m;
2112
2119
  const n = /* @__PURE__ */ new Map();
2113
2120
  for (const d of (t == null ? void 0 : t.blocks) ?? [])
2114
- se(d.type) && ((i = d.name) != null && i.trim()) && n.set(d.name.trim(), d);
2121
+ ue(d.type) && ((i = d.name) != null && i.trim()) && n.set(d.name.trim(), d);
2115
2122
  const r = [], o = [];
2116
2123
  for (const d of e.blocks) {
2117
- if (!se(d.type)) continue;
2118
- const y = (s = d.name) == null ? void 0 : s.trim();
2119
- if (!y) continue;
2120
- const f = n.get(y);
2121
- if (f) {
2122
- const b = Ni(e, y, d);
2123
- r.push(Ei(f, b));
2124
+ if (!ue(d.type)) continue;
2125
+ const v = (s = d.name) == null ? void 0 : s.trim();
2126
+ if (!v) continue;
2127
+ const p = n.get(v);
2128
+ if (p) {
2129
+ const b = Ei(e, v, d);
2130
+ r.push(Ri(p, b));
2124
2131
  } else
2125
2132
  o.push(Lt(d));
2126
2133
  }
2127
2134
  return {
2128
2135
  matchedBlocks: r,
2129
2136
  extraBlocks: o,
2130
- renderBlocks: Mi(e, r),
2137
+ renderBlocks: Ni(e, r),
2131
2138
  title: ((a = e.title) == null ? void 0 : a.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
2132
2139
  description: ((c = e.description) == null ? void 0 : c.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
2133
2140
  };
2134
2141
  }
2135
- function Yn(e) {
2142
+ function Qn(e) {
2136
2143
  const { type: t, defaultValue: n } = e;
2137
2144
  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 : "";
2138
2145
  }
@@ -2140,9 +2147,9 @@ function et(e) {
2140
2147
  var n;
2141
2148
  const t = {};
2142
2149
  for (const r of e) {
2143
- if (!se(r.type) || !ke(r)) continue;
2150
+ if (!ue(r.type) || !ke(r)) continue;
2144
2151
  const o = (n = r.name) == null ? void 0 : n.trim();
2145
- o && (t[o] = Yn(r));
2152
+ o && (t[o] = Qn(r));
2146
2153
  }
2147
2154
  return t;
2148
2155
  }
@@ -2150,77 +2157,77 @@ function Pi(e) {
2150
2157
  return e.blocks.some(
2151
2158
  (t) => {
2152
2159
  var n;
2153
- return se(t.type) && !!((n = t.name) != null && n.trim()) && ke(t);
2160
+ return ue(t.type) && !!((n = t.name) != null && n.trim()) && ke(t);
2154
2161
  }
2155
2162
  );
2156
2163
  }
2157
- function wi(e) {
2164
+ function zi(e) {
2158
2165
  return e.blocks.filter((t) => {
2159
2166
  var n;
2160
- return Un(t.type) ? !0 : !se(t.type) || !((n = t.name) != null && n.trim()) || !ke(t) ? !1 : !qt(t);
2167
+ return In(t.type) ? !0 : !ue(t.type) || !((n = t.name) != null && n.trim()) || !ke(t) ? !1 : !qt(t);
2161
2168
  });
2162
2169
  }
2163
- function Fa(e) {
2170
+ function Ua(e) {
2164
2171
  return e.blocks.filter(
2165
2172
  (t) => {
2166
2173
  var n;
2167
- return se(t.type) && ((n = t.name) == null ? void 0 : n.trim()) && ke(t);
2174
+ return ue(t.type) && ((n = t.name) == null ? void 0 : n.trim()) && ke(t);
2168
2175
  }
2169
2176
  ).map((t) => t.name.trim());
2170
2177
  }
2171
- function zi(e) {
2178
+ function Oi(e) {
2172
2179
  var n;
2173
2180
  const t = {};
2174
2181
  for (const r of e.blocks) {
2175
2182
  if (!qt(r)) continue;
2176
2183
  const o = (n = r.name) == null ? void 0 : n.trim();
2177
- o && (t[o] = Yn(r));
2184
+ o && (t[o] = Qn(r));
2178
2185
  }
2179
2186
  return t;
2180
2187
  }
2181
2188
  function Bt(e) {
2182
2189
  return e.replace(/'/g, "'\\''");
2183
2190
  }
2184
- function Qn(e) {
2191
+ function Xn(e) {
2185
2192
  var n;
2186
2193
  const t = (n = e == null ? void 0 : e.Authorization) == null ? void 0 : n.trim();
2187
2194
  return t ? ` -H 'Authorization: ${Bt(t)}' \\` : " -H 'Authorization: Bearer <token>' \\";
2188
2195
  }
2189
- function Xn(e, t, n) {
2196
+ function Zn(e, t, n) {
2190
2197
  const r = (t ?? "").trim() || "<callback_url>", o = JSON.stringify(e ?? {}, null, 2);
2191
2198
  return [
2192
2199
  `curl -X POST '${r}' \\`,
2193
2200
  " -H 'Content-Type: application/json' \\",
2194
- Qn(n),
2201
+ Xn(n),
2195
2202
  ` -d '${Bt(o)}'`
2196
2203
  ].join(`
2197
2204
  `);
2198
2205
  }
2199
- function Oi(e, t) {
2206
+ function qi(e, t) {
2200
2207
  return JSON.stringify({ ...e, ...t }, null, 2);
2201
2208
  }
2202
- function qi({
2209
+ function Li({
2203
2210
  cardValues: e,
2204
2211
  extraValues: t = {},
2205
2212
  callbackUrl: n,
2206
2213
  headers: r
2207
2214
  }) {
2208
- const o = (n ?? "").trim() || "<callback_url>", i = Oi(e, t);
2215
+ const o = (n ?? "").trim() || "<callback_url>", i = qi(e, t);
2209
2216
  return [
2210
2217
  `curl -X POST '${o}' \\`,
2211
2218
  " -H 'Content-Type: application/json' \\",
2212
- Qn(r),
2219
+ Xn(r),
2213
2220
  ` -d '${Bt(i)}'`
2214
2221
  ].join(`
2215
2222
  `);
2216
2223
  }
2217
- function Ua(e, t, n) {
2224
+ function Ia(e, t, n) {
2218
2225
  const r = rt(e);
2219
- if (!r) return Xn(e, t, n);
2226
+ if (!r) return Zn(e, t, n);
2220
2227
  const o = et(r.blocks);
2221
- return qi({ cardValues: o, callbackUrl: t, headers: n });
2228
+ return Li({ cardValues: o, callbackUrl: t, headers: n });
2222
2229
  }
2223
- async function Zn(e, t, n) {
2230
+ async function er(e, t, n) {
2224
2231
  const r = e.trim();
2225
2232
  if (!r)
2226
2233
  throw new Error("callback_url 为空");
@@ -2247,7 +2254,7 @@ async function Zn(e, t, n) {
2247
2254
  }
2248
2255
  return { ok: i.ok, status: i.status, body: s };
2249
2256
  }
2250
- async function Ia(e) {
2257
+ async function Ma(e) {
2251
2258
  var n;
2252
2259
  if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
2253
2260
  await navigator.clipboard.writeText(e);
@@ -2276,7 +2283,7 @@ async function $e(e) {
2276
2283
  throw new Error(t.message || `响应缺少 data (${e.status})`);
2277
2284
  return t.data;
2278
2285
  }
2279
- const ot = "auth_user", Li = "token", Bi = "answer_agent_callback_url", Di = "realtime_ws_url", Vi = "skopon_api_base_url", $i = "/api/v1/mock/ask_user_answer_mock", Ge = "/api/v1";
2286
+ const ot = "auth_user", Bi = "token", Di = "answer_agent_callback_url", Vi = "realtime_ws_url", $i = "skopon_api_base_url", ji = "/api/v1/mock/ask_user_answer_mock", Ge = "/api/v1";
2280
2287
  function it(e) {
2281
2288
  if (typeof window > "u") return null;
2282
2289
  try {
@@ -2302,8 +2309,8 @@ function Ct() {
2302
2309
  return Ge;
2303
2310
  }
2304
2311
  }
2305
- function ji(e = {}) {
2306
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.skoponApiBaseUrlField ?? Vi, o = it(t);
2312
+ function Hi(e = {}) {
2313
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.skoponApiBaseUrlField ?? $i, o = it(t);
2307
2314
  let i = null;
2308
2315
  try {
2309
2316
  i = (o == null ? void 0 : o.getItem(n)) ?? null;
@@ -2327,24 +2334,24 @@ function ji(e = {}) {
2327
2334
  throw new Error("skopon_api_base_url 格式无效,无法上传文件");
2328
2335
  }
2329
2336
  }
2330
- function Hi(e, t) {
2337
+ function Ki(e, t) {
2331
2338
  const n = st(e);
2332
2339
  if (!n) return "";
2333
2340
  const r = n[t];
2334
2341
  return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
2335
2342
  }
2336
- function Ki(e = {}) {
2337
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.answerAgentCallbackUrlField ?? Bi, o = it(t);
2343
+ function Wi(e = {}) {
2344
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.answerAgentCallbackUrlField ?? Di, o = it(t);
2338
2345
  if (!o) return "";
2339
2346
  const i = o.getItem(n);
2340
2347
  if (!i) return "";
2341
2348
  const s = st(i);
2342
2349
  if (!s) return "";
2343
2350
  const a = s[r];
2344
- return (typeof a == "string" ? a.trim() : "") || $i;
2351
+ return (typeof a == "string" ? a.trim() : "") || ji;
2345
2352
  }
2346
- function Wi(e = {}) {
2347
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.realtimeWsUrlField ?? Di, o = it(t);
2353
+ function Gi(e = {}) {
2354
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.realtimeWsUrlField ?? Vi, o = it(t);
2348
2355
  if (!o) return "";
2349
2356
  const i = o.getItem(n);
2350
2357
  if (!i) return "";
@@ -2360,17 +2367,17 @@ function Dt(e, t) {
2360
2367
  };
2361
2368
  }
2362
2369
  function Vt(e = {}) {
2363
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.tokenField ?? Li, o = it(t);
2370
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ot, r = e.tokenField ?? Bi, o = it(t);
2364
2371
  if (!o) return {};
2365
2372
  const i = o.getItem(n);
2366
2373
  if (!i) return {};
2367
- const s = Hi(i, r);
2374
+ const s = Ki(i, r);
2368
2375
  return s ? { Authorization: `Bearer ${s}` } : {};
2369
2376
  }
2370
2377
  async function at(e = {}) {
2371
2378
  return e.getHeaders ? await e.getHeaders() ?? {} : Vt(e.authStorage);
2372
2379
  }
2373
- function Gi(e = {}) {
2380
+ function Ji(e = {}) {
2374
2381
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
2375
2382
  async function o(i) {
2376
2383
  const s = new URLSearchParams();
@@ -2383,18 +2390,18 @@ function Gi(e = {}) {
2383
2390
  const a = await at(e), l = await r(`${t}${n}?${s.toString()}`, {
2384
2391
  method: "GET",
2385
2392
  headers: a
2386
- }), c = await $e(l), m = Fi(c.form_definition);
2393
+ }), c = await $e(l), m = Ui(c.form_definition);
2387
2394
  return {
2388
2395
  formUniqueId: c.form_unique_id,
2389
2396
  formId: c.form_id,
2390
2397
  disabled: c.disabled === 1,
2391
2398
  formDefinition: m,
2392
- a2ui: Ti(c.form_definition) ?? void 0
2399
+ a2ui: xi(c.form_definition) ?? void 0
2393
2400
  };
2394
2401
  }
2395
2402
  return { fetchDetail: o };
2396
2403
  }
2397
- function Ji(e) {
2404
+ function Yi(e) {
2398
2405
  if (!e || typeof e != "object" || Array.isArray(e))
2399
2406
  return e ?? null;
2400
2407
  const t = e;
@@ -2410,7 +2417,7 @@ function $t({
2410
2417
  form: n,
2411
2418
  answer: r
2412
2419
  }) {
2413
- const o = rt(t) ?? t, i = n ? Ji(n) : o;
2420
+ const o = rt(t) ?? t, i = n ? Yi(n) : o;
2414
2421
  return {
2415
2422
  mission_id: e.missionId ?? null,
2416
2423
  tenant_id: e.tenantId ?? null,
@@ -2438,7 +2445,7 @@ function jt(e) {
2438
2445
  const o = e.mission_id;
2439
2446
  return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
2440
2447
  }
2441
- function Ma(e) {
2448
+ function Na(e) {
2442
2449
  return jt(
2443
2450
  $t({
2444
2451
  context: e,
@@ -2447,25 +2454,25 @@ function Ma(e) {
2447
2454
  })
2448
2455
  );
2449
2456
  }
2450
- const gn = "answer_agent_callback_url 未配置,无法提交";
2451
- function Yi(e) {
2457
+ const yn = "answer_agent_callback_url 未配置,无法提交";
2458
+ function Qi(e) {
2452
2459
  if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
2453
2460
  const n = e.answerAgentCallbackUrl.trim();
2454
2461
  if (!n)
2455
- throw new Error(gn);
2462
+ throw new Error(yn);
2456
2463
  return n;
2457
2464
  }
2458
- const t = Ki(e == null ? void 0 : e.authStorage).trim();
2465
+ const t = Wi(e == null ? void 0 : e.authStorage).trim();
2459
2466
  if (!t)
2460
- throw new Error(gn);
2467
+ throw new Error(yn);
2461
2468
  return t;
2462
2469
  }
2463
- function er(e) {
2470
+ function tr(e) {
2464
2471
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
2465
2472
  const n = e.data;
2466
2473
  return !n || typeof n != "object" || Array.isArray(n) ? null : n;
2467
2474
  }
2468
- function Qi(e, t) {
2475
+ function Xi(e, t) {
2469
2476
  if (t && typeof t == "object" && t !== null && "message" in t) {
2470
2477
  const n = t.message;
2471
2478
  if (typeof n == "string" && n.trim())
@@ -2473,27 +2480,27 @@ function Qi(e, t) {
2473
2480
  }
2474
2481
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
2475
2482
  }
2476
- function Xi(e) {
2483
+ function Zi(e) {
2477
2484
  return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
2478
2485
  }
2479
- function tr(e) {
2480
- const t = er(e.body);
2481
- return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: Xi(t) } : e.ok ? { type: "success", message: "提交成功" } : {
2486
+ function nr(e) {
2487
+ const t = tr(e.body);
2488
+ return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: Zi(t) } : e.ok ? { type: "success", message: "提交成功" } : {
2482
2489
  type: "error",
2483
- message: Qi(e.status, e.body)
2490
+ message: Xi(e.status, e.body)
2484
2491
  };
2485
2492
  }
2486
- async function nr(e, t) {
2493
+ async function rr(e, t) {
2487
2494
  const n = jt(e);
2488
2495
  if (n)
2489
2496
  throw new Error(n);
2490
- const r = Yi(t), o = await Zn(r, e, {
2497
+ const r = Qi(t), o = await er(r, e, {
2491
2498
  ...t,
2492
2499
  headers: Dt(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
2493
- }), i = er(o.body);
2500
+ }), i = tr(o.body);
2494
2501
  return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
2495
2502
  }
2496
- function Zi(e) {
2503
+ function es(e) {
2497
2504
  return {
2498
2505
  resumeUniqueId: e.resume_unique_id,
2499
2506
  resumeId: e.resume_id,
@@ -2514,7 +2521,7 @@ function Zi(e) {
2514
2521
  }))
2515
2522
  };
2516
2523
  }
2517
- function es(e, t, n) {
2524
+ function ts(e, t, n) {
2518
2525
  var i;
2519
2526
  const r = new URLSearchParams();
2520
2527
  r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20));
@@ -2532,41 +2539,41 @@ function es(e, t, n) {
2532
2539
  r.append("published", String(s));
2533
2540
  return r;
2534
2541
  }
2535
- function ts(e = {}) {
2542
+ function ns(e = {}) {
2536
2543
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch, o = e.published ?? [1];
2537
2544
  return async ({ filter: i, page: s }) => {
2538
- const a = await at(e), l = es(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2545
+ const a = await at(e), l = ts(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2539
2546
  method: "GET",
2540
2547
  headers: a
2541
2548
  }), m = await $e(c);
2542
2549
  return {
2543
- list: (m.list ?? []).map(Zi),
2550
+ list: (m.list ?? []).map(es),
2544
2551
  total: m.total ?? 0,
2545
2552
  page: m.page ?? s,
2546
2553
  pageSize: m.page_size ?? i.pageSize ?? 20
2547
2554
  };
2548
2555
  };
2549
2556
  }
2550
- const yn = "content-production";
2551
- function ns(e) {
2557
+ const vn = "content-production";
2558
+ function rs(e) {
2552
2559
  return (e ?? []).map((t) => {
2553
2560
  const n = (t.mime_type ?? t.mimeType ?? "").trim().toLowerCase(), o = (t.type ?? "").trim().toLowerCase() || (n.startsWith("video/") ? "video" : n.startsWith("image/") ? "image" : ""), i = (t.url ?? t.dataUrl ?? t.data_url ?? "").trim();
2554
2561
  return { type: o, mime: n, url: i };
2555
2562
  }).filter((t) => t.url);
2556
2563
  }
2557
- function rs(e) {
2564
+ function os(e) {
2558
2565
  return e.type === "video" || e.type === "视频" || e.mime.startsWith("video/");
2559
2566
  }
2560
- function os(e) {
2567
+ function is(e) {
2561
2568
  return e.type === "image" || e.type === "图片" || e.mime.startsWith("image/") || e.type === "";
2562
2569
  }
2563
- function is(e) {
2564
- const t = ns(e), n = t.find(rs), r = t.find(os);
2570
+ function ss(e) {
2571
+ const t = rs(e), n = t.find(os), r = t.find(is);
2565
2572
  return n ? { coverUrl: (r == null ? void 0 : r.url) ?? null, mediaUrl: n.url, mediaKind: "video" } : r ? { coverUrl: r.url, mediaUrl: null, mediaKind: "image" } : { coverUrl: null, mediaUrl: null, mediaKind: null };
2566
2573
  }
2567
- function ss(e) {
2574
+ function as(e) {
2568
2575
  var i, s, a;
2569
- const t = ((i = e.name) == null ? void 0 : i.trim()) || "未命名内容", n = (s = e.cases) == null ? void 0 : s[0], r = (a = n == null ? void 0 : n.name) == null ? void 0 : a.trim(), o = is(n == null ? void 0 : n.attachments_json);
2576
+ const t = ((i = e.name) == null ? void 0 : i.trim()) || "未命名内容", n = (s = e.cases) == null ? void 0 : s[0], r = (a = n == null ? void 0 : n.name) == null ? void 0 : a.trim(), o = ss(n == null ? void 0 : n.attachments_json);
2570
2577
  return {
2571
2578
  flowUniqueId: e.flow_unique_id,
2572
2579
  flowId: e.flow_id,
@@ -2581,38 +2588,38 @@ function ss(e) {
2581
2588
  link: n == null ? void 0 : n.link
2582
2589
  };
2583
2590
  }
2584
- function as(e, t, n) {
2591
+ function ls(e, t, n) {
2585
2592
  var o;
2586
2593
  const r = new URLSearchParams();
2587
- r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20)), r.set("owner_scope", "content"), r.set("published", String(n)), r.set("flow_type", (e.flowType ?? yn).trim() || yn), (o = e.category) != null && o.trim() && r.set("category_unique_id", e.category.trim());
2594
+ r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20)), r.set("owner_scope", "content"), r.set("published", String(n)), r.set("flow_type", (e.flowType ?? vn).trim() || vn), (o = e.category) != null && o.trim() && r.set("category_unique_id", e.category.trim());
2588
2595
  for (const i of e.tagUniqueIds ?? [])
2589
2596
  i && r.append("tag_unique_ids", i);
2590
2597
  return r.set("tag_match", e.tagMatch === "any" ? "any" : "all"), r;
2591
2598
  }
2592
- function ls(e = {}) {
2599
+ function cs(e = {}) {
2593
2600
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/flow/list", r = e.fetch ?? fetch, o = e.published ?? 1;
2594
2601
  return async ({ filter: i, page: s }) => {
2595
2602
  const a = await at(e), c = await (async (m) => {
2596
- const d = as(m, s, o), y = await r(`${t}${n}?${d.toString()}`, {
2603
+ const d = ls(m, s, o), v = await r(`${t}${n}?${d.toString()}`, {
2597
2604
  method: "GET",
2598
2605
  headers: a
2599
2606
  });
2600
- return $e(y);
2607
+ return $e(v);
2601
2608
  })(i);
2602
2609
  return {
2603
- list: (c.list ?? []).map(ss),
2610
+ list: (c.list ?? []).map(as),
2604
2611
  total: c.total ?? 0,
2605
2612
  page: c.page ?? s,
2606
2613
  pageSize: c.page_size ?? i.pageSize ?? 20
2607
2614
  };
2608
2615
  };
2609
2616
  }
2610
- function cs(e) {
2617
+ function us(e) {
2611
2618
  var r, o, i, s;
2612
2619
  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()));
2613
2620
  return t || n;
2614
2621
  }
2615
- function us(e) {
2622
+ function ms(e) {
2616
2623
  return {
2617
2624
  caseUniqueId: e.case_unique_id,
2618
2625
  caseId: e.case_id,
@@ -2623,7 +2630,7 @@ function us(e) {
2623
2630
  description: e.description ?? void 0
2624
2631
  };
2625
2632
  }
2626
- function ms(e, t, n) {
2633
+ function ds(e, t, n) {
2627
2634
  var o, i, s;
2628
2635
  const r = new URLSearchParams();
2629
2636
  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());
@@ -2631,24 +2638,24 @@ function ms(e, t, n) {
2631
2638
  a && r.append("flow_unique_ids", a);
2632
2639
  return r;
2633
2640
  }
2634
- function ds(e = {}) {
2641
+ function ps(e = {}) {
2635
2642
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
2636
2643
  return async ({ filter: i, page: s }) => {
2637
- if (!cs(i))
2644
+ if (!us(i))
2638
2645
  return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
2639
- const a = await at(e), l = ms(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2646
+ const a = await at(e), l = ds(i, s, o), c = await r(`${t}${n}?${l.toString()}`, {
2640
2647
  method: "GET",
2641
2648
  headers: a
2642
2649
  }), m = await $e(c);
2643
2650
  return {
2644
- list: (m.list ?? []).map(us),
2651
+ list: (m.list ?? []).map(ms),
2645
2652
  total: m.total ?? 0,
2646
2653
  page: m.page ?? s,
2647
2654
  pageSize: m.page_size ?? i.pageSize ?? 20
2648
2655
  };
2649
2656
  };
2650
2657
  }
2651
- function Na(e = {}) {
2658
+ function Ea(e = {}) {
2652
2659
  var r, o, i, s, a, l, c;
2653
2660
  const t = {
2654
2661
  baseUrl: e.baseUrl,
@@ -2657,28 +2664,28 @@ function Na(e = {}) {
2657
2664
  authStorage: e.authStorage
2658
2665
  };
2659
2666
  return {
2660
- fetchDetail: Gi({
2667
+ fetchDetail: Ji({
2661
2668
  ...t,
2662
2669
  detailPath: (r = e.form) == null ? void 0 : r.detailPath
2663
2670
  }).fetchDetail,
2664
- resumeSearch: ts({
2671
+ resumeSearch: ns({
2665
2672
  ...t,
2666
2673
  searchPath: (o = e.resume) == null ? void 0 : o.searchPath,
2667
2674
  published: (i = e.resume) == null ? void 0 : i.published
2668
2675
  }),
2669
- contentSearch: ls({
2676
+ contentSearch: cs({
2670
2677
  ...t,
2671
2678
  listPath: (s = e.content) == null ? void 0 : s.listPath,
2672
2679
  published: (a = e.content) == null ? void 0 : a.published
2673
2680
  }),
2674
- caseSearch: ds({
2681
+ caseSearch: ps({
2675
2682
  ...t,
2676
2683
  listPath: (l = e.case) == null ? void 0 : l.listPath,
2677
2684
  published: (c = e.case) == null ? void 0 : c.published
2678
2685
  })
2679
2686
  };
2680
2687
  }
2681
- function rr(e, t) {
2688
+ function or(e, t) {
2682
2689
  if (!t.trim()) return !0;
2683
2690
  try {
2684
2691
  return new RegExp(t).test(e);
@@ -2686,7 +2693,7 @@ function rr(e, t) {
2686
2693
  return !0;
2687
2694
  }
2688
2695
  }
2689
- function or(e) {
2696
+ function ir(e) {
2690
2697
  return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
2691
2698
  }
2692
2699
  function fs(e, t) {
@@ -2696,34 +2703,34 @@ function fs(e, t) {
2696
2703
  case "file":
2697
2704
  case "resume_multiselect":
2698
2705
  case "case_multiselect":
2699
- return ce(t).length === 0;
2706
+ return me(t).length === 0;
2700
2707
  case "toggle":
2701
2708
  return !Ve(t);
2702
2709
  case "number":
2703
2710
  return t == null || t === "";
2704
2711
  default:
2705
- return or(t);
2712
+ return ir(t);
2706
2713
  }
2707
2714
  }
2708
2715
  function At(e, t) {
2709
2716
  return e.required === !0 || t > 0;
2710
2717
  }
2711
- function ps(e, t) {
2718
+ function hs(e, t) {
2712
2719
  var n, r;
2713
2720
  for (const o of e) {
2714
- if (!se(o.type)) continue;
2721
+ if (!ue(o.type)) continue;
2715
2722
  const i = (n = o.name) == null ? void 0 : n.trim();
2716
2723
  if (!i) continue;
2717
2724
  const s = t[i], a = ((r = o.label) == null ? void 0 : r.trim()) || i;
2718
2725
  if (o.required && fs(o, s))
2719
2726
  return { fieldName: i, label: a, message: `请填写「${a}」` };
2720
- if (o.type === "email" && !or(s)) {
2727
+ if (o.type === "email" && !ir(s)) {
2721
2728
  const l = String(s).trim();
2722
- if (!rr(l, Ot))
2729
+ if (!or(l, Ot))
2723
2730
  return { fieldName: i, label: a, message: `「${a}」格式不正确` };
2724
2731
  }
2725
2732
  if (o.type === "file") {
2726
- const l = o.fileMinCount ?? 0, c = ce(s).length;
2733
+ const l = o.fileMinCount ?? 0, c = me(s).length;
2727
2734
  if (l > 0 && c < l && At(o, c))
2728
2735
  return {
2729
2736
  fieldName: i,
@@ -2732,7 +2739,7 @@ function ps(e, t) {
2732
2739
  };
2733
2740
  }
2734
2741
  if (o.type === "resume_multiselect") {
2735
- const l = o.resumeMinCount, c = ce(s).length;
2742
+ const l = o.resumeMinCount, c = me(s).length;
2736
2743
  if (l !== void 0 && c < l && At(o, c))
2737
2744
  return {
2738
2745
  fieldName: i,
@@ -2741,7 +2748,7 @@ function ps(e, t) {
2741
2748
  };
2742
2749
  }
2743
2750
  if (o.type === "case_multiselect") {
2744
- const l = o.caseMinCount, c = ce(s).length;
2751
+ const l = o.caseMinCount, c = me(s).length;
2745
2752
  if (l !== void 0 && c < l && At(o, c))
2746
2753
  return {
2747
2754
  fieldName: i,
@@ -2752,20 +2759,20 @@ function ps(e, t) {
2752
2759
  }
2753
2760
  return null;
2754
2761
  }
2755
- const hs = {
2762
+ const gs = {
2756
2763
  video: Pr,
2757
- audio: Rr,
2758
- image: Er,
2759
- file: An,
2760
- spreadsheet: Nr,
2761
- document: Cn
2764
+ audio: wr,
2765
+ image: Rr,
2766
+ file: kn,
2767
+ spreadsheet: Er,
2768
+ document: An
2762
2769
  };
2763
- function gs({
2770
+ function ys({
2764
2771
  type: e,
2765
2772
  size: t = 40,
2766
2773
  className: n
2767
2774
  }) {
2768
- const r = hs[e] ?? An;
2775
+ const r = gs[e] ?? kn;
2769
2776
  return /* @__PURE__ */ u(
2770
2777
  r,
2771
2778
  {
@@ -2775,24 +2782,24 @@ function gs({
2775
2782
  }
2776
2783
  );
2777
2784
  }
2778
- const ys = "/univ/upload/cdn", vs = 12e4;
2779
- class ir extends Error {
2785
+ const vs = "/univ/upload/cdn", Ss = 12e4;
2786
+ class sr extends Error {
2780
2787
  constructor(t = "上传已取消") {
2781
2788
  super(t), this.name = "UploadCancelledError";
2782
2789
  }
2783
2790
  }
2784
2791
  function bs(e) {
2785
- return e instanceof ir;
2792
+ return e instanceof sr;
2786
2793
  }
2787
- async function Ss(e, t = {}) {
2794
+ async function Cs(e, t = {}) {
2788
2795
  var a, l, c;
2789
- const n = `${ji()}${ys}`, r = new AbortController();
2796
+ const n = `${Hi()}${vs}`, r = new AbortController();
2790
2797
  let o = !1;
2791
2798
  const i = () => r.abort();
2792
2799
  (a = t.signal) != null && a.aborted ? r.abort() : (l = t.signal) == null || l.addEventListener("abort", i, { once: !0 });
2793
2800
  const s = setTimeout(() => {
2794
2801
  o = !0, r.abort();
2795
- }, vs);
2802
+ }, Ss);
2796
2803
  try {
2797
2804
  const m = new FormData();
2798
2805
  m.append("file", e);
@@ -2801,16 +2808,16 @@ async function Ss(e, t = {}) {
2801
2808
  headers: Vt(),
2802
2809
  body: m,
2803
2810
  signal: r.signal
2804
- }), y = await $e(d), f = typeof y.url == "string" ? y.url.trim() : "";
2805
- if (!f) throw new Error("上传成功但响应缺少文件地址");
2806
- return { ...y, url: f };
2811
+ }), v = await $e(d), p = typeof v.url == "string" ? v.url.trim() : "";
2812
+ if (!p) throw new Error("上传成功但响应缺少文件地址");
2813
+ return { ...v, url: p };
2807
2814
  } catch (m) {
2808
- throw r.signal.aborted ? o ? new Error("上传超时,请稍后重试") : new ir() : m;
2815
+ throw r.signal.aborted ? o ? new Error("上传超时,请稍后重试") : new sr() : m;
2809
2816
  } finally {
2810
2817
  clearTimeout(s), (c = t.signal) == null || c.removeEventListener("abort", i);
2811
2818
  }
2812
2819
  }
2813
- const sr = Ce({
2820
+ const ar = Ce({
2814
2821
  beginUpload: () => () => {
2815
2822
  }
2816
2823
  });
@@ -2818,11 +2825,11 @@ function Et({
2818
2825
  children: e,
2819
2826
  onUploadingChange: t
2820
2827
  }) {
2821
- const [n, r] = E(0), o = T(!0), i = T(t);
2822
- i.current = t, O(() => (o.current = !0, () => {
2828
+ const [n, r] = R(0), o = _(!0), i = _(t);
2829
+ i.current = t, z(() => (o.current = !0, () => {
2823
2830
  var a;
2824
2831
  o.current = !1, (a = i.current) == null || a.call(i, !1);
2825
- }), []), O(() => {
2832
+ }), []), z(() => {
2826
2833
  t == null || t(n > 0);
2827
2834
  }, [n, t]);
2828
2835
  const s = V(() => {
@@ -2832,12 +2839,12 @@ function Et({
2832
2839
  a || (a = !0, o.current && r((l) => Math.max(0, l - 1)));
2833
2840
  };
2834
2841
  }, []);
2835
- return /* @__PURE__ */ u(sr.Provider, { value: { beginUpload: s }, children: e });
2842
+ return /* @__PURE__ */ u(ar.Provider, { value: { beginUpload: s }, children: e });
2836
2843
  }
2837
- function Cs() {
2838
- return Ae(sr);
2844
+ function As() {
2845
+ return Ae(ar);
2839
2846
  }
2840
- const ar = "skopon-form-v0_9", As = /* @__PURE__ */ new Set([
2847
+ const lr = "skopon-form-v0_9", ks = /* @__PURE__ */ new Set([
2841
2848
  "SkoponMedia",
2842
2849
  "SkoponSelect",
2843
2850
  "Image",
@@ -2849,17 +2856,17 @@ const ar = "skopon-form-v0_9", As = /* @__PURE__ */ new Set([
2849
2856
  "FileUpload",
2850
2857
  "TextField",
2851
2858
  "Text",
2852
- ...hi()
2853
- ]), ks = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
2859
+ ...gi()
2860
+ ]), _s = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
2854
2861
  function je(e) {
2855
2862
  const t = [...Ye.components.values()].find((n) => n.name === e);
2856
2863
  if (!t) throw new Error(`Missing basic catalog component: ${e}`);
2857
2864
  return t.schema;
2858
2865
  }
2859
- function $(e) {
2866
+ function L(e) {
2860
2867
  return typeof e == "string" ? e : "";
2861
2868
  }
2862
- function lr(e) {
2869
+ function cr(e) {
2863
2870
  return ye(e);
2864
2871
  }
2865
2872
  function lt({
@@ -2870,8 +2877,8 @@ function lt({
2870
2877
  help: o,
2871
2878
  placeholder: i
2872
2879
  }) {
2873
- const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = so(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
2874
- return /* @__PURE__ */ B("div", { className: "form-block-preview", children: [
2880
+ const s = r == null ? void 0 : r.trim(), a = o == null ? void 0 : o.trim(), l = ao(n), c = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
2881
+ return /* @__PURE__ */ w("div", { className: "form-block-preview", children: [
2875
2882
  s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
2876
2883
  t.length === 0 ? /* @__PURE__ */ u("div", { className: "form-media-preview form-media-preview--empty", children: c }) : /* @__PURE__ */ u("div", { className: l, children: t.map((m, d) => e === "image" ? /* @__PURE__ */ u(
2877
2884
  "img",
@@ -2898,21 +2905,21 @@ function lt({
2898
2905
  },
2899
2906
  `media-${d}`
2900
2907
  )) }),
2901
- a ? /* @__PURE__ */ u(ue.Text, { type: "secondary", className: "form-block-preview-help", children: a }) : null
2908
+ a ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-help", children: a }) : null
2902
2909
  ] });
2903
2910
  }
2904
2911
  function ct(e, t) {
2905
- const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : $(e.url).trim() ? [$(e.url).trim()] : [];
2912
+ const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : L(e.url).trim() ? [L(e.url).trim()] : [];
2906
2913
  return {
2907
2914
  mediaType: t,
2908
2915
  urls: n,
2909
2916
  mediaSize: De(e.mediaSize),
2910
- label: $(e.label) || $(e.description),
2911
- help: $(e.help),
2912
- placeholder: $(e.placeholder)
2917
+ label: L(e.label) || L(e.description),
2918
+ help: L(e.help),
2919
+ placeholder: L(e.placeholder)
2913
2920
  };
2914
2921
  }
2915
- const _s = {
2922
+ const Ts = {
2916
2923
  name: "SkoponMedia",
2917
2924
  schema: g.object({
2918
2925
  mediaType: g.any().optional(),
@@ -2922,19 +2929,19 @@ const _s = {
2922
2929
  help: g.any().optional(),
2923
2930
  placeholder: g.any().optional()
2924
2931
  }).passthrough()
2925
- }, Ts = oe(_s, ({ context: e }) => {
2926
- const t = e.componentModel.properties, n = $(t.mediaType);
2932
+ }, xs = ce(Ts, ({ context: e }) => {
2933
+ const t = e.componentModel.properties, n = L(t.mediaType);
2927
2934
  return /* @__PURE__ */ u(lt, { ...ct(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
2928
- }), xs = oe(
2935
+ }), Fs = ce(
2929
2936
  { name: "Image", schema: je("Image") },
2930
2937
  ({ context: e }) => /* @__PURE__ */ u(lt, { ...ct(e.componentModel.properties, "image") })
2931
- ), Fs = oe(
2938
+ ), Us = ce(
2932
2939
  { name: "Video", schema: je("Video") },
2933
2940
  ({ context: e }) => /* @__PURE__ */ u(lt, { ...ct(e.componentModel.properties, "video") })
2934
- ), Us = oe(
2941
+ ), Is = ce(
2935
2942
  { name: "AudioPlayer", schema: je("AudioPlayer") },
2936
2943
  ({ context: e }) => /* @__PURE__ */ u(lt, { ...ct(e.componentModel.properties, "audio") })
2937
- ), Is = {
2944
+ ), Ms = {
2938
2945
  name: "SkoponSelect",
2939
2946
  schema: g.object({
2940
2947
  label: g.any().optional(),
@@ -2944,15 +2951,15 @@ const _s = {
2944
2951
  value: g.any().optional()
2945
2952
  }).passthrough()
2946
2953
  };
2947
- function Ms({ context: e }) {
2948
- const { interactive: t } = ve(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = be(e, "value", {
2954
+ function Ns({ context: e }) {
2955
+ const { interactive: t } = ve(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = Se(e, "value", {
2949
2956
  component: "SkoponSelect",
2950
2957
  changeAction: "select"
2951
- }), s = e.componentModel.properties, a = $(s.label), l = $(s.placeholder), c = lr(s.options), m = $(s.mode) === "multiple";
2952
- return O(() => {
2953
- const d = Ln(n, m);
2958
+ }), s = e.componentModel.properties, a = L(s.label), l = L(s.placeholder), c = cr(s.options), m = L(s.mode) === "multiple";
2959
+ return z(() => {
2960
+ const d = Bn(n, m);
2954
2961
  d !== null && o(d);
2955
- }, [m, n, o]), c.length === 0 ? null : /* @__PURE__ */ B("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2962
+ }, [m, n, o]), c.length === 0 ? null : /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2956
2963
  a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2957
2964
  /* @__PURE__ */ u(
2958
2965
  kt,
@@ -2964,27 +2971,27 @@ function Ms({ context: e }) {
2964
2971
  style: { width: "100%" },
2965
2972
  placeholder: l || (m ? "请选择多项" : "请选择"),
2966
2973
  options: c,
2967
- value: m ? ce(n) : ze(n),
2974
+ value: m ? me(n) : ze(n),
2968
2975
  onChange: (d) => r(m ? d ?? [] : d ?? "")
2969
2976
  }
2970
2977
  )
2971
2978
  ] });
2972
2979
  }
2973
- const Ns = oe(
2974
- Is,
2975
- Ms
2980
+ const Es = ce(
2981
+ Ms,
2982
+ Ns
2976
2983
  );
2977
- function Es({ context: e }) {
2978
- const { interactive: t } = ve(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = be(e, "value", {
2984
+ function Rs({ context: e }) {
2985
+ const { interactive: t } = ve(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = Se(e, "value", {
2979
2986
  component: "ChoicePicker",
2980
2987
  changeAction: "select"
2981
- }), s = e.componentModel.properties, a = $(s.label), l = $(s.variant) || "mutuallyExclusive", c = $(s.skoponPickerType), m = $(s.placeholder), d = lr(s.options), f = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", b = f === "multiselect" || f === "checkbox";
2982
- return O(() => {
2983
- const p = Ln(n, b);
2984
- p !== null && o(p);
2985
- }, [b, n, o]), d.length === 0 ? null : /* @__PURE__ */ B("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2988
+ }), s = e.componentModel.properties, a = L(s.label), l = L(s.variant) || "mutuallyExclusive", c = L(s.skoponPickerType), m = L(s.placeholder), d = cr(s.options), p = c === "select" || c === "multiselect" || c === "radio" || c === "checkbox" ? c : l === "multipleSelection" ? "checkbox" : "radio", b = p === "multiselect" || p === "checkbox";
2989
+ return z(() => {
2990
+ const y = Bn(n, b);
2991
+ y !== null && o(y);
2992
+ }, [b, n, o]), d.length === 0 ? null : /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": i || void 0, children: [
2986
2993
  a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
2987
- f === "select" ? /* @__PURE__ */ u(
2994
+ p === "select" ? /* @__PURE__ */ u(
2988
2995
  kt,
2989
2996
  {
2990
2997
  disabled: !t,
@@ -2994,9 +3001,9 @@ function Es({ context: e }) {
2994
3001
  placeholder: m || "请选择",
2995
3002
  options: d,
2996
3003
  value: ze(n),
2997
- onChange: (p) => r(p ?? "")
3004
+ onChange: (y) => r(y ?? "")
2998
3005
  }
2999
- ) : f === "multiselect" ? /* @__PURE__ */ u(
3006
+ ) : p === "multiselect" ? /* @__PURE__ */ u(
3000
3007
  kt,
3001
3008
  {
3002
3009
  mode: "multiple",
@@ -3006,31 +3013,31 @@ function Es({ context: e }) {
3006
3013
  style: { width: "100%" },
3007
3014
  placeholder: m || "请选择多项",
3008
3015
  options: d,
3009
- value: ce(n),
3010
- onChange: (p) => r(p ?? [])
3016
+ value: me(n),
3017
+ onChange: (y) => r(y ?? [])
3011
3018
  }
3012
- ) : f === "checkbox" ? /* @__PURE__ */ u(
3013
- Sr.Group,
3019
+ ) : p === "checkbox" ? /* @__PURE__ */ u(
3020
+ Cr.Group,
3014
3021
  {
3015
3022
  disabled: !t,
3016
3023
  className: "form-block-preview-control",
3017
3024
  options: d,
3018
- value: ce(n),
3019
- onChange: (p) => r(p)
3025
+ value: me(n),
3026
+ onChange: (y) => r(y)
3020
3027
  }
3021
3028
  ) : /* @__PURE__ */ u(
3022
- Cr.Group,
3029
+ Ar.Group,
3023
3030
  {
3024
3031
  disabled: !t,
3025
3032
  className: "form-block-preview-control",
3026
3033
  options: d,
3027
3034
  value: ze(n),
3028
- onChange: (p) => r(p.target.value)
3035
+ onChange: (y) => r(y.target.value)
3029
3036
  }
3030
3037
  )
3031
3038
  ] });
3032
3039
  }
3033
- const Rs = oe(
3040
+ const ws = ce(
3034
3041
  {
3035
3042
  name: "ChoicePicker",
3036
3043
  schema: g.object({
@@ -3042,17 +3049,17 @@ const Rs = oe(
3042
3049
  placeholder: g.any().optional()
3043
3050
  }).passthrough()
3044
3051
  },
3045
- Es
3052
+ Rs
3046
3053
  );
3047
3054
  function Ps({ context: e }) {
3048
- const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o } = be(e, "value", {
3055
+ const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o } = Se(e, "value", {
3049
3056
  component: "CheckBox",
3050
3057
  changeAction: "change"
3051
- }), i = e.componentModel.properties, s = $(i.label);
3052
- return /* @__PURE__ */ B("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
3058
+ }), i = e.componentModel.properties, s = L(i.label);
3059
+ return /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
3053
3060
  s ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: s }) : null,
3054
3061
  /* @__PURE__ */ u(
3055
- Ar,
3062
+ kr,
3056
3063
  {
3057
3064
  disabled: !t,
3058
3065
  className: "form-block-preview-control",
@@ -3062,54 +3069,54 @@ function Ps({ context: e }) {
3062
3069
  )
3063
3070
  ] });
3064
3071
  }
3065
- const ws = oe(
3072
+ const zs = ce(
3066
3073
  { name: "CheckBox", schema: je("CheckBox") },
3067
3074
  Ps
3068
3075
  );
3069
- function zs(e, t, n) {
3076
+ function Os(e, t, n) {
3070
3077
  const r = ze(e);
3071
3078
  if (!r) return;
3072
3079
  if (!t && n) {
3073
- const i = rn(r, "HH:mm", !0);
3080
+ const i = on(r, "HH:mm", !0);
3074
3081
  return i.isValid() ? i : void 0;
3075
3082
  }
3076
- const o = rn(r);
3083
+ const o = on(r);
3077
3084
  return o.isValid() ? o : void 0;
3078
3085
  }
3079
- function Os({ context: e }) {
3080
- const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o, reportFocus: i } = be(e, "value", {
3086
+ function qs({ context: e }) {
3087
+ const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o, reportFocus: i } = Se(e, "value", {
3081
3088
  component: "DateTimeInput",
3082
3089
  changeAction: "change"
3083
- }), s = e.componentModel.properties, a = $(s.label), l = $(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = zs(n, c, m), y = (f) => {
3084
- if (!f) {
3090
+ }), s = e.componentModel.properties, a = L(s.label), l = L(s.placeholder), c = s.enableDate === !0, m = s.enableTime === !0, d = Os(n, c, m), v = (p) => {
3091
+ if (!p) {
3085
3092
  r("");
3086
3093
  return;
3087
3094
  }
3088
3095
  if (!c && m) {
3089
- r(f.format("HH:mm"));
3096
+ r(p.format("HH:mm"));
3090
3097
  return;
3091
3098
  }
3092
3099
  if (c && m) {
3093
- r(f.format("YYYY-MM-DDTHH:mm"));
3100
+ r(p.format("YYYY-MM-DDTHH:mm"));
3094
3101
  return;
3095
3102
  }
3096
- r(f.format("YYYY-MM-DD"));
3103
+ r(p.format("YYYY-MM-DD"));
3097
3104
  };
3098
- return /* @__PURE__ */ B("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
3105
+ return /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
3099
3106
  a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
3100
3107
  !c && m ? /* @__PURE__ */ u(
3101
- kr,
3108
+ _r,
3102
3109
  {
3103
3110
  disabled: !t,
3104
3111
  className: "form-block-preview-control",
3105
3112
  style: { width: "100%" },
3106
3113
  placeholder: l || "选择时间",
3107
3114
  value: d,
3108
- onChange: y,
3115
+ onChange: v,
3109
3116
  onFocus: i
3110
3117
  }
3111
3118
  ) : /* @__PURE__ */ u(
3112
- _r,
3119
+ Tr,
3113
3120
  {
3114
3121
  showTime: c && m,
3115
3122
  disabled: !t,
@@ -3117,13 +3124,13 @@ function Os({ context: e }) {
3117
3124
  style: { width: "100%" },
3118
3125
  placeholder: l || (c && m ? "选择日期时间" : "选择日期"),
3119
3126
  value: d,
3120
- onChange: y,
3127
+ onChange: v,
3121
3128
  onFocus: i
3122
3129
  }
3123
3130
  )
3124
3131
  ] });
3125
3132
  }
3126
- const qs = oe(
3133
+ const Ls = ce(
3127
3134
  {
3128
3135
  name: "DateTimeInput",
3129
3136
  schema: g.object({
@@ -3136,8 +3143,8 @@ const qs = oe(
3136
3143
  max: g.any().optional()
3137
3144
  }).passthrough()
3138
3145
  },
3139
- Os
3140
- ), Ls = {
3146
+ qs
3147
+ ), Bs = {
3141
3148
  name: "FileUpload",
3142
3149
  schema: g.object({
3143
3150
  label: g.any().optional(),
@@ -3149,10 +3156,10 @@ const qs = oe(
3149
3156
  value: g.any().optional()
3150
3157
  }).passthrough()
3151
3158
  };
3152
- function vn(e) {
3153
- return ce(e).map((t) => t.trim()).filter(Boolean);
3159
+ function Sn(e) {
3160
+ return me(e).map((t) => t.trim()).filter(Boolean);
3154
3161
  }
3155
- function Bs(e) {
3162
+ function Ds(e) {
3156
3163
  const n = e.split(/[?#]/, 1)[0].split("/").filter(Boolean).pop() || e;
3157
3164
  try {
3158
3165
  return decodeURIComponent(n);
@@ -3161,212 +3168,221 @@ function Bs(e) {
3161
3168
  }
3162
3169
  }
3163
3170
  function bn(e, t) {
3164
- return { uid: t, name: Bs(e), status: "done", url: e };
3171
+ return { uid: t, name: Ds(e), status: "done", url: e };
3165
3172
  }
3166
- function Ds({ context: e }) {
3167
- var ae;
3168
- const { interactive: t } = ve(), { beginUpload: n } = Cs(), { value: r, setValue: o, setValueSilent: i, fieldName: s } = be(e, "value", {
3173
+ function Vs({ context: e }) {
3174
+ var x;
3175
+ const { interactive: t } = ve(), { beginUpload: n } = As(), { value: r, setValue: o, setValueSilent: i, fieldName: s } = Se(e, "value", {
3169
3176
  component: "FileUpload",
3170
3177
  changeAction: "change"
3171
- }), a = e.componentModel.properties, l = $(a.label), c = $(a.accept), m = Array.isArray(a.fileAcceptTypes) ? a.fileAcceptTypes.map(String) : void 0, d = c ? c.split(",").map((C) => C.trim()).filter(Boolean) : void 0, y = Zr(m, d), f = typeof a.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
3178
+ }), a = e.componentModel.properties, l = L(a.label), c = L(a.accept), m = L(a.help), d = L(a.fileReviewCriteria), v = me(a.fileExampleUrls).filter((h) => /^https?:\/\//i.test(h)), p = Array.isArray(a.fileAcceptTypes) ? a.fileAcceptTypes.map(String) : void 0, b = c ? c.split(",").map((h) => h.trim()).filter(Boolean) : void 0, y = eo(p, b), C = typeof a.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
3172
3179
  a.filePlaceholderIcon
3173
- ) ? a.filePlaceholderIcon : "document", b = typeof a.minCount == "number" ? Math.max(0, a.minCount) : 0, p = typeof a.maxCount == "number" ? a.maxCount : 1, S = p > 0, k = vn(r), h = T(0), v = T(!0), F = T(/* @__PURE__ */ new Map()), R = T(o);
3174
- R.current = o;
3175
- const [U, w] = E(
3176
- () => k.map((C) => bn(C, `external-${h.current++}`))
3177
- ), q = T(U);
3178
- q.current = U;
3179
- const z = V(
3180
- (C, M) => {
3181
- const A = C(q.current);
3182
- return q.current = A, v.current && w(A), M && R.current(
3183
- A.filter((x) => x.status === "done" && x.url).map((x) => x.url)
3184
- ), A;
3180
+ ) ? a.filePlaceholderIcon : "document", A = typeof a.minCount == "number" ? Math.max(0, a.minCount) : 0, f = typeof a.maxCount == "number" ? a.maxCount : 1, S = f > 0, I = Sn(r), E = _(0), F = _(!0), U = _(/* @__PURE__ */ new Map()), B = _(o);
3181
+ B.current = o;
3182
+ const [O, K] = R(
3183
+ () => I.map((h) => bn(h, `external-${E.current++}`))
3184
+ ), T = _(O);
3185
+ T.current = O;
3186
+ const W = V(
3187
+ (h, M) => {
3188
+ const P = h(T.current);
3189
+ return T.current = P, F.current && K(P), M && B.current(
3190
+ P.filter((N) => N.status === "done" && N.url).map((N) => N.url)
3191
+ ), P;
3185
3192
  },
3186
3193
  []
3187
3194
  );
3188
- O(() => (v.current = !0, () => {
3189
- v.current = !1;
3190
- for (const C of F.current.values()) C.abort();
3191
- F.current.clear();
3192
- }), []), O(() => {
3193
- const C = vn(r);
3194
- Array.isArray(r) && r.length === C.length && r.every((x, N) => typeof x == "string" && x === C[N]) || i(C);
3195
- const A = /* @__PURE__ */ new Set();
3196
- z(
3197
- (x) => {
3198
- const N = x.filter((j) => {
3199
- if (j.status !== "done" || !j.url) return !0;
3200
- const P = C.findIndex((le, me) => !A.has(me) && le === j.url);
3201
- return P < 0 ? !1 : (A.add(P), !0);
3195
+ z(() => (F.current = !0, () => {
3196
+ F.current = !1;
3197
+ for (const h of U.current.values()) h.abort();
3198
+ U.current.clear();
3199
+ }), []), z(() => {
3200
+ const h = Sn(r);
3201
+ Array.isArray(r) && r.length === h.length && r.every((N, X) => typeof N == "string" && N === h[X]) || i(h);
3202
+ const P = /* @__PURE__ */ new Set();
3203
+ W(
3204
+ (N) => {
3205
+ const X = N.filter((te) => {
3206
+ if (te.status !== "done" || !te.url) return !0;
3207
+ const j = h.findIndex((oe, pe) => !P.has(pe) && oe === te.url);
3208
+ return j < 0 ? !1 : (P.add(j), !0);
3202
3209
  });
3203
- return C.forEach((j, P) => {
3204
- A.has(P) || N.push(bn(j, `external-${h.current++}`));
3205
- }), N;
3210
+ return h.forEach((te, j) => {
3211
+ P.has(j) || X.push(bn(te, `external-${E.current++}`));
3212
+ }), X;
3206
3213
  },
3207
3214
  !1
3208
3215
  );
3209
- }, [r, i, z]);
3210
- const K = V(
3211
- (C) => {
3212
- if (!t || S && q.current.length >= p) return;
3213
- const M = `${C.uid ?? "file"}-${h.current++}`, A = new AbortController();
3214
- F.current.set(M, A), z(
3215
- (N) => [...N, { uid: M, name: C.name, status: "uploading" }],
3216
+ }, [r, i, W]);
3217
+ const Y = V(
3218
+ (h) => {
3219
+ if (!t || S && T.current.length >= f) return;
3220
+ const M = `${h.uid ?? "file"}-${E.current++}`, P = new AbortController();
3221
+ U.current.set(M, P), W(
3222
+ (X) => [...X, { uid: M, name: h.name, status: "uploading" }],
3216
3223
  !1
3217
3224
  );
3218
- const x = n();
3219
- Ss(C, { signal: A.signal }).then((N) => {
3220
- !v.current || A.signal.aborted || z(
3221
- (j) => j.map(
3222
- (P) => P.uid === M ? { ...P, status: "done", url: N.url, error: void 0 } : P
3225
+ const N = n();
3226
+ Cs(h, { signal: P.signal }).then((X) => {
3227
+ !F.current || P.signal.aborted || W(
3228
+ (te) => te.map(
3229
+ (j) => j.uid === M ? { ...j, status: "done", url: X.url, error: void 0 } : j
3223
3230
  ),
3224
3231
  !0
3225
3232
  );
3226
- }).catch((N) => {
3227
- if (!v.current || bs(N)) return;
3228
- const j = N instanceof Error ? N.message : "上传失败";
3229
- z(
3230
- (P) => P.map(
3231
- (le) => le.uid === M ? { ...le, status: "error", error: j } : le
3233
+ }).catch((X) => {
3234
+ if (!F.current || bs(X)) return;
3235
+ const te = X instanceof Error ? X.message : "上传失败";
3236
+ W(
3237
+ (j) => j.map(
3238
+ (oe) => oe.uid === M ? { ...oe, status: "error", error: te } : oe
3232
3239
  ),
3233
3240
  !1
3234
3241
  );
3235
3242
  }).finally(() => {
3236
- F.current.delete(M), x();
3243
+ U.current.delete(M), N();
3237
3244
  });
3238
3245
  },
3239
- [n, z, S, t, p]
3240
- ), I = V(
3241
- (C) => {
3246
+ [n, W, S, t, f]
3247
+ ), ne = V(
3248
+ (h) => {
3242
3249
  var M;
3243
- (M = F.current.get(C)) == null || M.abort(), F.current.delete(C), z((A) => A.filter((x) => x.uid !== C), !0);
3250
+ (M = U.current.get(h)) == null || M.abort(), U.current.delete(h), W((P) => P.filter((N) => N.uid !== h), !0);
3244
3251
  },
3245
- [z]
3246
- ), Z = U.filter((C) => C.status === "done").length, J = S && U.length >= p, Q = Z < b, G = (ae = [...U].reverse().find((C) => C.error)) == null ? void 0 : ae.error, Y = U.map((C) => ({
3247
- uid: C.uid,
3248
- name: C.name,
3249
- status: C.status,
3250
- url: C.url,
3251
- response: C.error
3252
+ [W]
3253
+ ), J = O.filter((h) => h.status === "done").length, Q = S && O.length >= f, de = J < A, ee = (x = [...O].reverse().find((h) => h.error)) == null ? void 0 : x.error, $ = O.map((h) => ({
3254
+ uid: h.uid,
3255
+ name: h.name,
3256
+ status: h.status,
3257
+ url: h.url,
3258
+ response: h.error
3252
3259
  }));
3253
- return /* @__PURE__ */ B("div", { className: "form-block-preview", "data-skopon-field": s || void 0, children: [
3260
+ return /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": s || void 0, children: [
3254
3261
  l ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: l }) : null,
3255
- /* @__PURE__ */ B(
3256
- ft.Dragger,
3262
+ m ? /* @__PURE__ */ u(le.Paragraph, { type: "secondary", children: m }) : null,
3263
+ d ? /* @__PURE__ */ w(le.Paragraph, { type: "secondary", children: [
3264
+ "素材要求:",
3265
+ d
3266
+ ] }) : null,
3267
+ v.length ? /* @__PURE__ */ w("div", { className: "form-file-examples", children: [
3268
+ /* @__PURE__ */ u(le.Text, { type: "secondary", children: "参考示例(不作为上传素材提交)" }),
3269
+ /* @__PURE__ */ u("div", { style: { display: "flex", gap: 8, flexWrap: "wrap", margin: "8px 0" }, children: /* @__PURE__ */ u(rn.PreviewGroup, { children: v.map((h, M) => /* @__PURE__ */ u(rn, { src: h, alt: `${l || "素材"}示例 ${M + 1}`, width: 120, height: 120, style: { objectFit: "contain" } }, h)) }) })
3270
+ ] }) : null,
3271
+ /* @__PURE__ */ w(
3272
+ pt.Dragger,
3257
3273
  {
3258
3274
  disabled: !t,
3259
- openFileDialogOnClick: !J,
3260
- accept: Xr(m, d),
3275
+ openFileDialogOnClick: !Q,
3276
+ accept: Zr(p, b),
3261
3277
  className: "form-file-upload-preview",
3262
- multiple: !S || p > 1,
3263
- showUploadList: t && U.length > 0,
3264
- fileList: t ? Y : [],
3265
- beforeUpload: (C) => t ? (K(C), ft.LIST_IGNORE) : ft.LIST_IGNORE,
3266
- onRemove: (C) => (I(C.uid), !0),
3278
+ multiple: !S || f > 1,
3279
+ showUploadList: t && O.length > 0,
3280
+ fileList: t ? $ : [],
3281
+ beforeUpload: (h) => t ? (Y(h), pt.LIST_IGNORE) : pt.LIST_IGNORE,
3282
+ onRemove: (h) => (ne(h.uid), !0),
3267
3283
  children: [
3268
- /* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(gs, { type: f, size: 40 }) }),
3284
+ /* @__PURE__ */ u("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ u(ys, { type: C, size: 40 }) }),
3269
3285
  /* @__PURE__ */ u("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
3270
3286
  ]
3271
3287
  }
3272
3288
  ),
3273
- /* @__PURE__ */ B(ue.Text, { type: "secondary", className: "form-block-preview-help", children: [
3289
+ /* @__PURE__ */ w(le.Text, { type: "secondary", className: "form-block-preview-help", children: [
3274
3290
  "允许:",
3275
3291
  y ?? "全部类型",
3276
- b > 0 ? `;至少 ${b} 个文件` : "",
3277
- S ? `;最多 ${p} 个文件` : "",
3292
+ A > 0 ? `;至少 ${A} 个文件` : "",
3293
+ S ? `;最多 ${f} 个文件` : "",
3278
3294
  ";选择后自动上传至 CDN",
3279
- Q && t ? `(当前 ${Z} 个,未达下限)` : ""
3295
+ de && t ? `(当前 ${J} 个,未达下限)` : ""
3280
3296
  ] }),
3281
- G ? /* @__PURE__ */ u(ue.Text, { type: "danger", className: "form-block-preview-help", children: G }) : null
3297
+ ee ? /* @__PURE__ */ u(le.Text, { type: "danger", className: "form-block-preview-help", children: ee }) : null
3282
3298
  ] });
3283
3299
  }
3284
- const Vs = oe(
3285
- Ls,
3286
- Ds
3300
+ const $s = ce(
3301
+ Bs,
3302
+ Vs
3287
3303
  );
3288
- function $s({ context: e }) {
3289
- const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o, reportFocus: i } = be(e, "value", {
3304
+ function js({ context: e }) {
3305
+ const { interactive: t } = ve(), { value: n, setValue: r, fieldName: o, reportFocus: i } = Se(e, "value", {
3290
3306
  component: "TextField",
3291
3307
  changeAction: "change",
3292
3308
  debounceChange: !0
3293
- }), s = e.componentModel.properties, a = $(s.label), l = $(s.placeholder), c = $(s.variant) || "shortText", m = $(s.validationRegexp), d = ze(n) ?? "", y = !t, [f, b] = E(""), p = (h) => {
3294
- if (!m || !h.trim()) {
3309
+ }), s = e.componentModel.properties, a = L(s.label), l = L(s.placeholder), c = L(s.variant) || "shortText", m = L(s.validationRegexp), d = ze(n) ?? "", v = !t, [p, b] = R(""), y = (f) => {
3310
+ if (!m || !f.trim()) {
3295
3311
  b("");
3296
3312
  return;
3297
3313
  }
3298
- b(rr(h, m) ? "" : "格式不正确");
3314
+ b(or(f, m) ? "" : "格式不正确");
3299
3315
  };
3300
- O(() => {
3301
- p(d);
3316
+ z(() => {
3317
+ y(d);
3302
3318
  }, [m, d]);
3303
- const S = "form-block-preview-control";
3304
- let k;
3319
+ const C = "form-block-preview-control";
3320
+ let A;
3305
3321
  if (c === "longText")
3306
- k = /* @__PURE__ */ u(
3307
- pt.TextArea,
3322
+ A = /* @__PURE__ */ u(
3323
+ ft.TextArea,
3308
3324
  {
3309
- disabled: y,
3310
- className: S,
3325
+ disabled: v,
3326
+ className: C,
3311
3327
  placeholder: l || "长文本回答...",
3312
3328
  autoSize: { minRows: 2, maxRows: 6 },
3313
3329
  value: d,
3314
- status: f ? "error" : void 0,
3315
- onChange: (h) => {
3316
- const v = h.target.value;
3317
- r(v), p(v);
3330
+ status: p ? "error" : void 0,
3331
+ onChange: (f) => {
3332
+ const S = f.target.value;
3333
+ r(S), y(S);
3318
3334
  },
3319
3335
  onFocus: i,
3320
- onBlur: (h) => p(h.target.value)
3336
+ onBlur: (f) => y(f.target.value)
3321
3337
  }
3322
3338
  );
3323
3339
  else if (c === "number") {
3324
- const h = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
3325
- k = /* @__PURE__ */ u(
3326
- Tr,
3340
+ const f = d && Number.isFinite(Number(d)) ? Number(d) : void 0;
3341
+ A = /* @__PURE__ */ u(
3342
+ xr,
3327
3343
  {
3328
- disabled: y,
3329
- className: S,
3344
+ disabled: v,
3345
+ className: C,
3330
3346
  style: { width: "100%" },
3331
3347
  placeholder: l || "数字",
3332
- value: h,
3333
- onChange: (v) => r(v == null ? "" : String(v)),
3348
+ value: f,
3349
+ onChange: (S) => r(S == null ? "" : String(S)),
3334
3350
  onFocus: i
3335
3351
  }
3336
3352
  );
3337
- } else c === "obscured" ? k = /* @__PURE__ */ u(
3338
- pt.Password,
3353
+ } else c === "obscured" ? A = /* @__PURE__ */ u(
3354
+ ft.Password,
3339
3355
  {
3340
- disabled: y,
3341
- className: S,
3356
+ disabled: v,
3357
+ className: C,
3342
3358
  placeholder: l,
3343
3359
  value: d,
3344
- onChange: (h) => r(h.target.value),
3360
+ onChange: (f) => r(f.target.value),
3345
3361
  onFocus: i
3346
3362
  }
3347
- ) : k = /* @__PURE__ */ u(
3348
- pt,
3363
+ ) : A = /* @__PURE__ */ u(
3364
+ ft,
3349
3365
  {
3350
- disabled: y,
3351
- className: S,
3366
+ disabled: v,
3367
+ className: C,
3352
3368
  placeholder: l,
3353
3369
  value: d,
3354
- status: f ? "error" : void 0,
3355
- onChange: (h) => {
3356
- const v = h.target.value;
3357
- r(v), p(v);
3370
+ status: p ? "error" : void 0,
3371
+ onChange: (f) => {
3372
+ const S = f.target.value;
3373
+ r(S), y(S);
3358
3374
  },
3359
3375
  onFocus: i,
3360
- onBlur: (h) => p(h.target.value)
3376
+ onBlur: (f) => y(f.target.value)
3361
3377
  }
3362
3378
  );
3363
- return /* @__PURE__ */ B("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
3379
+ return /* @__PURE__ */ w("div", { className: "form-block-preview", "data-skopon-field": o || void 0, children: [
3364
3380
  a ? /* @__PURE__ */ u("div", { className: "form-block-preview-label", children: a }) : null,
3365
- k,
3366
- f ? /* @__PURE__ */ u(ue.Text, { type: "danger", className: "form-block-preview-help", children: f }) : null
3381
+ A,
3382
+ p ? /* @__PURE__ */ u(le.Text, { type: "danger", className: "form-block-preview-help", children: p }) : null
3367
3383
  ] });
3368
3384
  }
3369
- const js = oe(
3385
+ const Hs = ce(
3370
3386
  {
3371
3387
  name: "TextField",
3372
3388
  schema: g.object({
@@ -3377,35 +3393,35 @@ const js = oe(
3377
3393
  value: g.any().optional()
3378
3394
  }).passthrough()
3379
3395
  },
3380
- $s
3396
+ js
3381
3397
  );
3382
- function Hs({ context: e }) {
3383
- const t = e.componentModel.properties, n = $(t.text), r = $(t.variant) || "body";
3384
- return ks.has(r) ? r === "caption" ? /* @__PURE__ */ u(ue.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ u("em", { children: n }) }) : /* @__PURE__ */ u(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ u(ue.Paragraph, { className: "form-block-preview-paragraph", children: n });
3398
+ function Ks({ context: e }) {
3399
+ const t = e.componentModel.properties, n = L(t.text), r = L(t.variant) || "body";
3400
+ return _s.has(r) ? r === "caption" ? /* @__PURE__ */ u(le.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ u("em", { children: n }) }) : /* @__PURE__ */ u(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ u(le.Paragraph, { className: "form-block-preview-paragraph", children: n });
3385
3401
  }
3386
- const Ks = oe(
3402
+ const Ws = ce(
3387
3403
  { name: "Text", schema: je("Text") },
3388
- Hs
3404
+ Ks
3389
3405
  );
3390
- function cr() {
3406
+ function ur() {
3391
3407
  const t = [
3392
3408
  ...[...Ye.components.values()].filter(
3393
- (r) => !As.has(r.name)
3409
+ (r) => !ks.has(r.name)
3394
3410
  ),
3395
- Ts,
3396
- Ns,
3397
3411
  xs,
3412
+ Es,
3398
3413
  Fs,
3399
3414
  Us,
3400
- Rs,
3415
+ Is,
3401
3416
  ws,
3402
- qs,
3403
- Vs,
3404
- js,
3405
- Ks,
3406
- ...pi()
3417
+ zs,
3418
+ Ls,
3419
+ $s,
3420
+ Hs,
3421
+ Ws,
3422
+ ...hi()
3407
3423
  ], n = [...Ye.functions.values()];
3408
- return new wr(ar, t, n, Ye.themeSchema);
3424
+ return new zr(lr, t, n, Ye.themeSchema);
3409
3425
  }
3410
3426
  const ge = {
3411
3427
  jade9: "#29a383",
@@ -3419,7 +3435,7 @@ const ge = {
3419
3435
  primaryHover: "#26997b",
3420
3436
  primaryActive: "#1d3b31",
3421
3437
  onPrimary: "#ffffff"
3422
- }, Ws = {
3438
+ }, Gs = {
3423
3439
  cssVar: { key: "vidtempl" },
3424
3440
  token: {
3425
3441
  colorPrimary: ge.primarySolid,
@@ -3509,9 +3525,9 @@ function Oe({
3509
3525
  locale: t,
3510
3526
  theme: n
3511
3527
  }) {
3512
- return /* @__PURE__ */ u(xr, { theme: n ?? Ws, locale: t, children: e });
3528
+ return /* @__PURE__ */ u(Fr, { theme: n ?? Gs, locale: t, children: e });
3513
3529
  }
3514
- const Gs = gr(
3530
+ const Js = yr(
3515
3531
  function({
3516
3532
  doc: t,
3517
3533
  surfaceId: n = "skopon-form",
@@ -3524,67 +3540,67 @@ const Gs = gr(
3524
3540
  onUploadingChange: c,
3525
3541
  wrapProvider: m = !0
3526
3542
  }, d) {
3527
- O(() => {
3528
- xn(), Tn();
3543
+ z(() => {
3544
+ Fn(), xn();
3529
3545
  }, []);
3530
- const y = T(null), f = T(i);
3531
- f.current = i;
3532
- const b = W(() => {
3546
+ const v = _(null), p = _(i);
3547
+ p.current = i;
3548
+ const b = G(() => {
3533
3549
  if (Nt(t)) return "";
3534
3550
  try {
3535
3551
  return JSON.stringify(t);
3536
3552
  } catch {
3537
3553
  return String(t);
3538
3554
  }
3539
- }, [t]), p = W(() => {
3555
+ }, [t]), y = G(() => {
3540
3556
  if (!b)
3541
3557
  return { surfaces: [], processor: null };
3542
3558
  try {
3543
- const v = JSON.parse(b), F = new _n([cr()]), R = _i(v, {
3559
+ const S = JSON.parse(b), I = new Tn([ur()]), E = Ti(S, {
3544
3560
  surfaceId: n,
3545
- catalogId: ar
3561
+ catalogId: lr
3546
3562
  });
3547
- return F.processMessages(R), {
3548
- surfaces: Array.from(F.model.surfacesMap.values()),
3549
- processor: F
3563
+ return I.processMessages(E), {
3564
+ surfaces: Array.from(I.model.surfacesMap.values()),
3565
+ processor: I
3550
3566
  };
3551
- } catch (v) {
3552
- return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", v), { surfaces: [], processor: null };
3567
+ } catch (S) {
3568
+ return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", S), { surfaces: [], processor: null };
3553
3569
  }
3554
- }, [b, n]), { surfaces: S, processor: k } = p;
3555
- if (y.current = k, yr(
3570
+ }, [b, n]), { surfaces: C, processor: A } = y;
3571
+ if (v.current = A, vr(
3556
3572
  d,
3557
3573
  () => ({
3558
- getValues(v) {
3559
- const F = y.current;
3560
- if (!F) return {};
3561
- const R = (v ?? f.current).map((U) => U.trim()).filter(Boolean);
3562
- return Ui(F, n, R);
3574
+ getValues(S) {
3575
+ const I = v.current;
3576
+ if (!I) return {};
3577
+ const E = (S ?? p.current).map((F) => F.trim()).filter(Boolean);
3578
+ return Ii(I, n, E);
3563
3579
  },
3564
- setValues(v) {
3565
- const F = y.current;
3566
- if (!F) return;
3567
- const R = F.model.surfacesMap.get(n);
3568
- if (R)
3569
- for (const [U, w] of Object.entries(v)) {
3570
- const q = U.trim();
3571
- q && R.dataModel.set(`/${q}`, w);
3580
+ setValues(S) {
3581
+ const I = v.current;
3582
+ if (!I) return;
3583
+ const E = I.model.surfacesMap.get(n);
3584
+ if (E)
3585
+ for (const [F, U] of Object.entries(S)) {
3586
+ const B = F.trim();
3587
+ B && E.dataModel.set(`/${B}`, U);
3572
3588
  }
3573
3589
  }
3574
3590
  }),
3575
3591
  [n]
3576
- ), S.length === 0) {
3577
- const v = /* @__PURE__ */ u(Et, { onUploadingChange: c, children: /* @__PURE__ */ u(Ut, { resumeSearch: s, children: /* @__PURE__ */ u(Ft, { contentSearch: a, children: /* @__PURE__ */ u(xt, { caseSearch: l, children: /* @__PURE__ */ u(Tt, { interactive: o, children: r }) }) }) }) });
3578
- return m ? /* @__PURE__ */ u(Oe, { children: v }) : v;
3592
+ ), C.length === 0) {
3593
+ const S = /* @__PURE__ */ u(Et, { onUploadingChange: c, children: /* @__PURE__ */ u(Ut, { resumeSearch: s, children: /* @__PURE__ */ u(Ft, { contentSearch: a, children: /* @__PURE__ */ u(xt, { caseSearch: l, children: /* @__PURE__ */ u(Tt, { interactive: o, children: r }) }) }) }) });
3594
+ return m ? /* @__PURE__ */ u(Oe, { children: S }) : S;
3579
3595
  }
3580
- const h = /* @__PURE__ */ u(Et, { onUploadingChange: c, children: /* @__PURE__ */ u(Ut, { resumeSearch: s, children: /* @__PURE__ */ u(Ft, { contentSearch: a, children: /* @__PURE__ */ u(xt, { caseSearch: l, children: /* @__PURE__ */ u(Tt, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: S.map((v) => /* @__PURE__ */ u(kn, { surface: v }, v.id)) }) }) }) }) }) });
3581
- return m ? /* @__PURE__ */ u(Oe, { children: h }) : h;
3596
+ const f = /* @__PURE__ */ u(Et, { onUploadingChange: c, children: /* @__PURE__ */ u(Ut, { resumeSearch: s, children: /* @__PURE__ */ u(Ft, { contentSearch: a, children: /* @__PURE__ */ u(xt, { caseSearch: l, children: /* @__PURE__ */ u(Tt, { interactive: o, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: C.map((S) => /* @__PURE__ */ u(_n, { surface: S }, S.id)) }) }) }) }) }) });
3597
+ return m ? /* @__PURE__ */ u(Oe, { children: f }) : f;
3582
3598
  }
3583
3599
  );
3584
3600
  function Je() {
3585
- return new _n([cr()]);
3601
+ return new Tn([ur()]);
3586
3602
  }
3587
- function Ea({
3603
+ function Ra({
3588
3604
  messages: e,
3589
3605
  surfaceId: t = "skopon-form-stream",
3590
3606
  emptyHint: n = null,
@@ -3593,94 +3609,94 @@ function Ea({
3593
3609
  contentSearch: i = null,
3594
3610
  caseSearch: s = null
3595
3611
  }) {
3596
- O(() => {
3597
- xn(), Tn();
3612
+ z(() => {
3613
+ Fn(), xn();
3598
3614
  }, []);
3599
- const a = T(null);
3615
+ const a = _(null);
3600
3616
  a.current === null && (a.current = Je());
3601
- const l = T(0), c = T(""), m = T(!0), d = T(t);
3602
- function y(h, v) {
3603
- a.current = h, l.current = v.length, c.current = JSON.stringify(v), m.current && (p(h), k(Array.from(h.model.surfacesMap.values())));
3617
+ const l = _(0), c = _(""), m = _(!0), d = _(t);
3618
+ function v(f, S) {
3619
+ a.current = f, l.current = S.length, c.current = JSON.stringify(S), m.current && (y(f), A(Array.from(f.model.surfacesMap.values())));
3604
3620
  }
3605
- function f(h, v) {
3606
- if (v <= 0) return !1;
3607
- const F = JSON.stringify(h.slice(0, v)), R = c.current;
3608
- if (!R) return !0;
3621
+ function p(f, S) {
3622
+ if (S <= 0) return !1;
3623
+ const I = JSON.stringify(f.slice(0, S)), E = c.current;
3624
+ if (!E) return !0;
3609
3625
  try {
3610
- const U = JSON.parse(R);
3611
- return JSON.stringify(U.slice(0, v)) !== F;
3626
+ const F = JSON.parse(E);
3627
+ return JSON.stringify(F.slice(0, S)) !== I;
3612
3628
  } catch {
3613
3629
  return !0;
3614
3630
  }
3615
3631
  }
3616
- const [b, p] = E(
3632
+ const [b, y] = R(
3617
3633
  () => a.current
3618
- ), [S, k] = E(
3634
+ ), [C, A] = R(
3619
3635
  () => Array.from(
3620
3636
  a.current.model.surfacesMap.values()
3621
3637
  )
3622
3638
  );
3623
- return O(() => (m.current = !0, () => {
3639
+ return z(() => (m.current = !0, () => {
3624
3640
  m.current = !1;
3625
- }), []), O(() => {
3641
+ }), []), z(() => {
3626
3642
  a.current = b;
3627
- }, [b]), O(() => {
3628
- const h = () => {
3629
- m.current && k(Array.from(b.model.surfacesMap.values()));
3630
- }, v = b.onSurfaceCreated(h), F = b.onSurfaceDeleted(h);
3643
+ }, [b]), z(() => {
3644
+ const f = () => {
3645
+ m.current && A(Array.from(b.model.surfacesMap.values()));
3646
+ }, S = b.onSurfaceCreated(f), I = b.onSurfaceDeleted(f);
3631
3647
  return () => {
3632
- v.unsubscribe(), F.unsubscribe();
3648
+ S.unsubscribe(), I.unsubscribe();
3633
3649
  };
3634
- }, [b]), O(() => {
3635
- let h = !1;
3636
- const v = d.current !== t;
3637
- if (d.current = t, v) {
3638
- const w = Je();
3639
- return Array.isArray(e) && e.length > 0 ? (w.processMessages(e), h || y(w, e)) : (a.current = w, l.current = 0, c.current = "", h || (p(w), k([]))), () => {
3640
- h = !0;
3650
+ }, [b]), z(() => {
3651
+ let f = !1;
3652
+ const S = d.current !== t;
3653
+ if (d.current = t, S) {
3654
+ const U = Je();
3655
+ return Array.isArray(e) && e.length > 0 ? (U.processMessages(e), f || v(U, e)) : (a.current = U, l.current = 0, c.current = "", f || (y(U), A([]))), () => {
3656
+ f = !0;
3641
3657
  };
3642
3658
  }
3643
3659
  if (!Array.isArray(e) || e.length === 0) {
3644
3660
  if (l.current > 0) {
3645
- const w = Je();
3646
- a.current = w, l.current = 0, c.current = "", h || (p(w), k([]));
3661
+ const U = Je();
3662
+ a.current = U, l.current = 0, c.current = "", f || (y(U), A([]));
3647
3663
  }
3648
3664
  return () => {
3649
- h = !0;
3665
+ f = !0;
3650
3666
  };
3651
3667
  }
3652
- const F = a.current, R = l.current;
3653
- if (e.length < R || f(e, R)) {
3654
- const w = Je();
3655
- return w.processMessages(e), h || y(w, e), () => {
3656
- h = !0;
3668
+ const I = a.current, E = l.current;
3669
+ if (e.length < E || p(e, E)) {
3670
+ const U = Je();
3671
+ return U.processMessages(e), f || v(U, e), () => {
3672
+ f = !0;
3657
3673
  };
3658
3674
  }
3659
- const U = e.slice(R);
3660
- return U.length === 0 ? () => {
3661
- h = !0;
3662
- } : (F.processMessages(U), l.current = e.length, c.current = JSON.stringify(e), h || k(Array.from(F.model.surfacesMap.values())), () => {
3663
- h = !0;
3675
+ const F = e.slice(E);
3676
+ return F.length === 0 ? () => {
3677
+ f = !0;
3678
+ } : (I.processMessages(F), l.current = e.length, c.current = JSON.stringify(e), f || A(Array.from(I.model.surfacesMap.values())), () => {
3679
+ f = !0;
3664
3680
  });
3665
- }, [e, t]), S.length === 0 ? /* @__PURE__ */ u(Oe, { children: n }) : /* @__PURE__ */ u(Oe, { children: /* @__PURE__ */ u(Et, { children: /* @__PURE__ */ u(Ut, { resumeSearch: o, children: /* @__PURE__ */ u(Ft, { contentSearch: i, children: /* @__PURE__ */ u(xt, { caseSearch: s, children: /* @__PURE__ */ u(Tt, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: S.map((h) => /* @__PURE__ */ u(kn, { surface: h }, h.id)) }) }) }) }) }) }) });
3681
+ }, [e, t]), C.length === 0 ? /* @__PURE__ */ u(Oe, { children: n }) : /* @__PURE__ */ u(Oe, { children: /* @__PURE__ */ u(Et, { children: /* @__PURE__ */ u(Ut, { resumeSearch: o, children: /* @__PURE__ */ u(Ft, { contentSearch: i, children: /* @__PURE__ */ u(xt, { caseSearch: s, children: /* @__PURE__ */ u(Tt, { interactive: r, children: /* @__PURE__ */ u("div", { className: "a2ui-surface a2ui-container", children: C.map((f) => /* @__PURE__ */ u(_n, { surface: f }, f.id)) }) }) }) }) }) }) });
3666
3682
  }
3667
- const Js = 100, Ys = 3e4, Qs = 1500, xe = /* @__PURE__ */ new Map();
3668
- function Xs(e) {
3683
+ const Ys = 100, Qs = 3e4, Xs = 1500, xe = /* @__PURE__ */ new Map();
3684
+ function Zs(e) {
3669
3685
  const t = e.trim();
3670
3686
  let n = xe.get(t);
3671
- return n || (n = new Zs(t), xe.set(t, n)), n.acquire(), n;
3687
+ return n || (n = new ea(t), xe.set(t, n)), n.acquire(), n;
3672
3688
  }
3673
- class Zs {
3689
+ class ea {
3674
3690
  constructor(t) {
3675
- re(this, "url");
3676
- re(this, "ws", null);
3677
- re(this, "refCount", 0);
3678
- re(this, "connectRequested", !1);
3679
- re(this, "reconnectAttempt", 0);
3680
- re(this, "reconnectTimer", null);
3681
- re(this, "releaseTimer", null);
3682
- re(this, "sendQueue", []);
3683
- re(this, "handlers", /* @__PURE__ */ new Map());
3691
+ ae(this, "url");
3692
+ ae(this, "ws", null);
3693
+ ae(this, "refCount", 0);
3694
+ ae(this, "connectRequested", !1);
3695
+ ae(this, "reconnectAttempt", 0);
3696
+ ae(this, "reconnectTimer", null);
3697
+ ae(this, "releaseTimer", null);
3698
+ ae(this, "sendQueue", []);
3699
+ ae(this, "handlers", /* @__PURE__ */ new Map());
3684
3700
  this.url = t;
3685
3701
  }
3686
3702
  acquire() {
@@ -3689,7 +3705,7 @@ class Zs {
3689
3705
  release() {
3690
3706
  this.refCount = Math.max(0, this.refCount - 1), !(this.refCount > 0) && (this.clearReleaseTimer(), this.releaseTimer = setTimeout(() => {
3691
3707
  this.releaseTimer = null, !(this.refCount > 0) && (this.teardown(), xe.get(this.url) === this && xe.delete(this.url));
3692
- }, Qs));
3708
+ }, Xs));
3693
3709
  }
3694
3710
  /** 强制关闭(测试用),跳过宽限期。 */
3695
3711
  forceClose() {
@@ -3762,7 +3778,7 @@ class Zs {
3762
3778
  }
3763
3779
  }
3764
3780
  enqueue(t) {
3765
- for (this.sendQueue.push(t); this.sendQueue.length > Js; )
3781
+ for (this.sendQueue.push(t); this.sendQueue.length > Ys; )
3766
3782
  this.sendQueue.shift();
3767
3783
  }
3768
3784
  flushQueue() {
@@ -3776,7 +3792,7 @@ class Zs {
3776
3792
  if (!this.connectRequested || this.refCount <= 0) return;
3777
3793
  this.clearReconnectTimer();
3778
3794
  const t = Math.min(
3779
- Ys,
3795
+ Qs,
3780
3796
  1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
3781
3797
  );
3782
3798
  this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
@@ -3814,13 +3830,13 @@ class Zs {
3814
3830
  }
3815
3831
  }
3816
3832
  }
3817
- class ea {
3833
+ class ta {
3818
3834
  constructor(t) {
3819
- re(this, "askUserMessageId");
3820
- re(this, "connection");
3821
- re(this, "unsubscribe");
3822
- re(this, "closed", !1);
3823
- this.askUserMessageId = t.askUserMessageId.trim(), this.connection = Xs(t.url);
3835
+ ae(this, "askUserMessageId");
3836
+ ae(this, "connection");
3837
+ ae(this, "unsubscribe");
3838
+ ae(this, "closed", !1);
3839
+ this.askUserMessageId = t.askUserMessageId.trim(), this.connection = Zs(t.url);
3824
3840
  const n = t.onAutoControl;
3825
3841
  this.unsubscribe = n ? this.connection.subscribe(this.askUserMessageId, n) : () => {
3826
3842
  };
@@ -3835,24 +3851,24 @@ class ea {
3835
3851
  this.closed || (this.closed = !0, this.unsubscribe(), this.connection.release());
3836
3852
  }
3837
3853
  }
3838
- function ur(e) {
3854
+ function mr(e) {
3839
3855
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
3840
3856
  }
3841
- function ta(e, t) {
3857
+ function na(e, t) {
3842
3858
  if (!e) return !1;
3843
- const n = e.querySelector(`[data-skopon-field="${ur(t)}"]`);
3859
+ const n = e.querySelector(`[data-skopon-field="${mr(t)}"]`);
3844
3860
  return n instanceof HTMLElement ? ((n.querySelector(
3845
3861
  'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
3846
3862
  ) ?? n).focus(), !0) : !1;
3847
3863
  }
3848
- function na(e, t) {
3864
+ function ra(e, t) {
3849
3865
  if (!e) return !1;
3850
- const n = e.querySelector(`[data-skopon-field="${ur(t)}"]`);
3866
+ const n = e.querySelector(`[data-skopon-field="${mr(t)}"]`);
3851
3867
  return n instanceof HTMLElement ? ((n.querySelector(
3852
3868
  'button, [role="button"], .skopon-resume-select-card, input, label'
3853
3869
  ) ?? n).click(), !0) : !1;
3854
3870
  }
3855
- function ra(e, t, n) {
3871
+ function oa(e, t, n) {
3856
3872
  const r = e.action;
3857
3873
  if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
3858
3874
  console.warn("[FormAutoControl] unknown action", r);
@@ -3882,47 +3898,47 @@ function ra(e, t, n) {
3882
3898
  return;
3883
3899
  }
3884
3900
  if (r === "focus") {
3885
- ta(t.rootElement, o), n.reportEvent({
3901
+ na(t.rootElement, o), n.reportEvent({
3886
3902
  action: "focus",
3887
3903
  component: i,
3888
3904
  field: o
3889
3905
  });
3890
3906
  return;
3891
3907
  }
3892
- na(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
3908
+ ra(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
3893
3909
  });
3894
3910
  }
3895
- function oa(e) {
3911
+ function ia(e) {
3896
3912
  const t = {};
3897
3913
  for (const [n, r] of Object.entries(e))
3898
3914
  r !== void 0 && (t[n] = r);
3899
3915
  return t;
3900
3916
  }
3901
- function ia(e, t) {
3917
+ function sa(e, t) {
3902
3918
  var o;
3903
3919
  const n = (o = e.name) == null ? void 0 : o.trim();
3904
3920
  if (!n || !t) return { ...e };
3905
3921
  const r = t.get(n);
3906
3922
  return r ? e.type !== "resume_multiselect" && e.type !== "case_multiselect" ? { ...e } : { ...e, options: r.map((i) => ({ ...i })) } : { ...e };
3907
3923
  }
3908
- function sa(e) {
3924
+ function aa(e) {
3909
3925
  var i, s;
3910
3926
  const n = {
3911
3927
  blocks: (e.blocks ?? []).map(
3912
- (a) => ia(a, e.liveOptions)
3928
+ (a) => sa(a, e.liveOptions)
3913
3929
  )
3914
3930
  }, r = (i = e.title) == null ? void 0 : i.trim(), o = (s = e.description) == null ? void 0 : s.trim();
3915
3931
  return r && (n.title = r), o && (n.description = o), {
3916
3932
  form_schema: n,
3917
- form_values: oa(e.values ?? {}),
3933
+ form_values: ia(e.values ?? {}),
3918
3934
  form_change: [...e.formChange ?? []]
3919
3935
  };
3920
3936
  }
3921
- function aa(e) {
3937
+ function la(e) {
3922
3938
  const t = rt(e);
3923
3939
  return t ? et(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
3924
3940
  }
3925
- function la({
3941
+ function ca({
3926
3942
  payload: e,
3927
3943
  callbackUrl: t,
3928
3944
  title: n,
@@ -3932,17 +3948,17 @@ function la({
3932
3948
  submitHeaders: s,
3933
3949
  onNotify: a
3934
3950
  }) {
3935
- const [l, c] = E(!1), m = T(!0);
3936
- O(() => (m.current = !0, () => {
3951
+ const [l, c] = R(!1), m = _(!0);
3952
+ z(() => (m.current = !0, () => {
3937
3953
  m.current = !1;
3938
3954
  }), []);
3939
- const d = W(
3955
+ const d = G(
3940
3956
  () => Dt(s),
3941
3957
  [s]
3942
- ), y = W(
3943
- () => Xn(e, t, d),
3958
+ ), v = G(
3959
+ () => Zn(e, t, d),
3944
3960
  [e, t, d]
3945
- ), f = W(
3961
+ ), p = G(
3946
3962
  () => ({
3947
3963
  ...i,
3948
3964
  callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? t ?? null
@@ -3953,29 +3969,29 @@ function la({
3953
3969
  if (!l) {
3954
3970
  c(!0);
3955
3971
  try {
3956
- const p = aa(e), S = $t({
3957
- context: f,
3972
+ const y = la(e), C = $t({
3973
+ context: p,
3958
3974
  payload: e,
3959
- answer: p
3960
- }), k = await nr(S, {
3975
+ answer: y
3976
+ }), A = await rr(C, {
3961
3977
  headers: d
3962
3978
  });
3963
3979
  if (!m.current) return;
3964
- const h = tr(k);
3965
- a == null || a(h.type, h.message);
3966
- } catch (p) {
3980
+ const f = nr(A);
3981
+ a == null || a(f.type, f.message);
3982
+ } catch (y) {
3967
3983
  if (!m.current) return;
3968
- const S = p instanceof Error ? p.message : "提交失败";
3969
- a == null || a("error", S);
3984
+ const C = y instanceof Error ? y.message : "提交失败";
3985
+ a == null || a("error", C);
3970
3986
  } finally {
3971
3987
  m.current && c(!1);
3972
3988
  }
3973
3989
  }
3974
3990
  }
3975
- return /* @__PURE__ */ B("div", { className: "ask-user-curl-card", children: [
3976
- /* @__PURE__ */ B("div", { className: "ask-user-curl-card-header", children: [
3977
- /* @__PURE__ */ B("div", { className: "ask-user-curl-card-header-title", children: [
3978
- /* @__PURE__ */ u(ue.Text, { type: "secondary", children: n ?? "curl 命令" }),
3991
+ return /* @__PURE__ */ w("div", { className: "ask-user-curl-card", children: [
3992
+ /* @__PURE__ */ w("div", { className: "ask-user-curl-card-header", children: [
3993
+ /* @__PURE__ */ w("div", { className: "ask-user-curl-card-header-title", children: [
3994
+ /* @__PURE__ */ u(le.Text, { type: "secondary", children: n ?? "curl 命令" }),
3979
3995
  r ? /* @__PURE__ */ u(Fe, { title: r, children: /* @__PURE__ */ u(Ee, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
3980
3996
  o ? /* @__PURE__ */ u(Fe, { title: o, children: /* @__PURE__ */ u(Ee, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
3981
3997
  ] }),
@@ -3991,11 +4007,11 @@ function la({
3991
4007
  }
3992
4008
  ) })
3993
4009
  ] }),
3994
- /* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children: y })
4010
+ /* @__PURE__ */ u("pre", { className: "skopon-form-curl-json", children: v })
3995
4011
  ] });
3996
4012
  }
3997
- const ca = 80;
3998
- function ua(e, t) {
4013
+ const ua = 80;
4014
+ function ma(e, t) {
3999
4015
  if (t && typeof t == "object" && t !== null && "message" in t) {
4000
4016
  const n = t.message;
4001
4017
  if (typeof n == "string" && n.trim())
@@ -4003,7 +4019,7 @@ function ua(e, t) {
4003
4019
  }
4004
4020
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
4005
4021
  }
4006
- function ma({
4022
+ function da({
4007
4023
  payload: e,
4008
4024
  formUniqueId: t,
4009
4025
  askUserMessageId: n,
@@ -4016,254 +4032,254 @@ function ma({
4016
4032
  resumeSearch: c = null,
4017
4033
  contentSearch: m = null,
4018
4034
  caseSearch: d = null,
4019
- onSurfaceReadyChange: y,
4020
- onAutoControlReady: f
4035
+ onSurfaceReadyChange: v,
4036
+ onAutoControlReady: p
4021
4037
  }) {
4022
- const [b, p] = E(null), [S, k] = E(!1), [h, v] = E(!0), [F, R] = E(!1), [U, w] = E(!1), q = T(null), z = T(null), K = T(!0), I = T(l);
4023
- I.current = l;
4024
- const Z = qn(), J = zt(), Q = T(""), G = T(null), Y = (t == null ? void 0 : t.trim()) ?? "", ae = (n == null ? void 0 : n.trim()) ?? "", C = W(
4038
+ const [b, y] = R(null), [C, A] = R(!1), [f, S] = R(!0), [I, E] = R(!1), [F, U] = R(!1), B = _(null), O = _(null), K = _(!0), T = _(l);
4039
+ T.current = l;
4040
+ const W = Ln(), Y = zt(), ne = _(""), J = _(null), Q = (t == null ? void 0 : t.trim()) ?? "", de = (n == null ? void 0 : n.trim()) ?? "", ee = G(
4025
4041
  () => Dt(s),
4026
4042
  [s]
4027
- ), M = W(
4043
+ ), $ = G(
4028
4044
  () => ({
4029
4045
  ...i,
4030
4046
  callbackUrl: (i == null ? void 0 : i.callbackUrl) ?? r ?? null
4031
4047
  }),
4032
4048
  [i, r]
4033
4049
  );
4034
- O(() => (K.current = !0, () => {
4035
- K.current = !1, G.current != null && (clearTimeout(G.current), G.current = null);
4036
- }), []), O(() => {
4037
- let L = !1;
4038
- return Y ? (v(!0), k(!1), a({ formUniqueId: Y }).then((H) => {
4039
- L || (k(!!H.disabled), p(H.formDefinition ?? null));
4050
+ z(() => (K.current = !0, () => {
4051
+ K.current = !1, J.current != null && (clearTimeout(J.current), J.current = null);
4052
+ }), []), z(() => {
4053
+ let q = !1;
4054
+ return Q ? (S(!0), A(!1), a({ formUniqueId: Q }).then((H) => {
4055
+ q || (A(!!H.disabled), y(H.formDefinition ?? null));
4040
4056
  }).catch((H) => {
4041
- var ne;
4042
- if (!L) {
4043
- k(!1), p(null);
4057
+ var se;
4058
+ if (!q) {
4059
+ A(!1), y(null);
4044
4060
  const He = H instanceof Error ? H.message : "获取表单定义失败";
4045
- (ne = I.current) == null || ne.call(I, "error", He);
4061
+ (se = T.current) == null || se.call(T, "error", He);
4046
4062
  }
4047
4063
  }).finally(() => {
4048
- L || v(!1);
4064
+ q || S(!1);
4049
4065
  }), () => {
4050
- L = !0;
4051
- }) : (v(!1), k(!1), p(null), () => {
4052
- L = !0;
4066
+ q = !0;
4067
+ }) : (S(!1), A(!1), y(null), () => {
4068
+ q = !0;
4053
4069
  });
4054
- }, [Y, a]);
4055
- const A = W(() => rt(e), [e]), x = W(() => A ? Ri(A, b ?? void 0) : null, [A, b]), N = (x == null ? void 0 : x.matchedBlocks) ?? [], j = !!(A && Pi(A) && N.length === 0), P = W(() => j && A ? wi(A) : x && x.renderBlocks.length > 0 ? x.renderBlocks : [], [x, j, A]), le = W(() => {
4056
- if (j && A)
4057
- return zi(A);
4058
- const L = et((x == null ? void 0 : x.extraBlocks) ?? []);
4070
+ }, [Q, a]);
4071
+ const x = G(() => rt(e), [e]), h = G(() => x ? wi(x, b ?? void 0) : null, [x, b]), M = (h == null ? void 0 : h.matchedBlocks) ?? [], P = !!(x && Pi(x) && M.length === 0), N = G(() => P && x ? zi(x) : h && h.renderBlocks.length > 0 ? h.renderBlocks : [], [h, P, x]), X = G(() => {
4072
+ if (P && x)
4073
+ return Oi(x);
4074
+ const q = et((h == null ? void 0 : h.extraBlocks) ?? []);
4059
4075
  return { ...et(
4060
- ((x == null ? void 0 : x.matchedBlocks) ?? []).filter(
4061
- (ne) => ne.type === "text" && ne.hidden === !0
4076
+ ((h == null ? void 0 : h.matchedBlocks) ?? []).filter(
4077
+ (se) => se.type === "text" && se.hidden === !0
4062
4078
  )
4063
- ), ...L };
4064
- }, [j, A, x]), me = W(
4065
- () => P.filter((L) => {
4079
+ ), ...q };
4080
+ }, [P, x, h]), te = G(
4081
+ () => N.filter((q) => {
4066
4082
  var H;
4067
- return se(L.type) && ((H = L.name) == null ? void 0 : H.trim());
4068
- }).map((L) => L.name.trim()),
4069
- [P]
4070
- ), ie = (x == null ? void 0 : x.title) ?? (A == null ? void 0 : A.title) ?? "", pe = (x == null ? void 0 : x.description) ?? (A == null ? void 0 : A.description) ?? "", he = W(() => P.length === 0 ? null : xi(
4071
- { title: ie, description: pe },
4072
- P
4073
- ), [ie, pe, P]), Ue = W(() => {
4074
- if (!he) return "";
4083
+ return ue(q.type) && ((H = q.name) == null ? void 0 : H.trim());
4084
+ }).map((q) => q.name.trim()),
4085
+ [N]
4086
+ ), j = (h == null ? void 0 : h.title) ?? (x == null ? void 0 : x.title) ?? "", oe = (h == null ? void 0 : h.description) ?? (x == null ? void 0 : x.description) ?? "", pe = G(() => N.length === 0 ? null : Fi(
4087
+ { title: j, description: oe },
4088
+ N
4089
+ ), [j, oe, N]), Ue = G(() => {
4090
+ if (!pe) return "";
4075
4091
  try {
4076
- return JSON.stringify(he);
4092
+ return JSON.stringify(pe);
4077
4093
  } catch {
4078
- return String(he);
4094
+ return String(pe);
4079
4095
  }
4080
- }, [he]), Ie = Y ? `ask-user-${Y}` : "ask-user-payload", de = !!(!h && A && P.length > 0 && he);
4081
- O(() => (y(de), () => y(!1)), [de, y]);
4082
- const _ = V(() => {
4096
+ }, [pe]), Ie = Q ? `ask-user-${Q}` : "ask-user-payload", fe = !!(!f && x && N.length > 0 && pe);
4097
+ z(() => (v(fe), () => v(!1)), [fe, v]);
4098
+ const k = V(() => {
4083
4099
  var H;
4084
- return { ...((H = q.current) == null ? void 0 : H.getValues(me)) ?? {}, ...le };
4085
- }, [me, le]), D = T(J.liveOptions);
4086
- D.current = J.liveOptions;
4087
- const ee = T(J.pendingChangeFields);
4088
- ee.current = J.pendingChangeFields;
4089
- const te = V(
4090
- (L) => {
4091
- const H = sa({
4092
- title: ie,
4093
- description: pe,
4094
- blocks: P,
4095
- values: _(),
4100
+ return { ...((H = B.current) == null ? void 0 : H.getValues(te)) ?? {}, ...X };
4101
+ }, [te, X]), D = _(Y.liveOptions);
4102
+ D.current = Y.liveOptions;
4103
+ const re = _(Y.pendingChangeFields);
4104
+ re.current = Y.pendingChangeFields;
4105
+ const ie = V(
4106
+ (q) => {
4107
+ const H = aa({
4108
+ title: j,
4109
+ description: oe,
4110
+ blocks: N,
4111
+ values: k(),
4096
4112
  liveOptions: D.current,
4097
- formChange: L
4113
+ formChange: q
4098
4114
  });
4099
- Z.reportData(H);
4115
+ W.reportData(H);
4100
4116
  },
4101
- [ie, pe, P, _, Z]
4102
- ), fe = T(te);
4103
- fe.current = te, O(() => {
4104
- if (!de) {
4105
- Q.current = "";
4117
+ [j, oe, N, k, W]
4118
+ ), he = _(ie);
4119
+ he.current = ie, z(() => {
4120
+ if (!fe) {
4121
+ ne.current = "";
4106
4122
  return;
4107
4123
  }
4108
4124
  if (!Ue) return;
4109
- const L = `${Ie}::${Ue}`;
4110
- if (Q.current === L) return;
4125
+ const q = `${Ie}::${Ue}`;
4126
+ if (ne.current === q) return;
4111
4127
  const H = setTimeout(() => {
4112
- K.current && Q.current !== L && (Q.current = L, fe.current([]));
4128
+ K.current && ne.current !== q && (ne.current = q, he.current([]));
4113
4129
  }, 0);
4114
4130
  return () => clearTimeout(H);
4115
- }, [de, Ie, Ue]), O(() => {
4116
- if (!(!de || J.version === 0) && ee.current.length !== 0)
4117
- return G.current != null && clearTimeout(G.current), G.current = setTimeout(() => {
4118
- if (G.current = null, !K.current) return;
4119
- const L = [...ee.current];
4120
- J.clearPendingChangeFields(), L.length !== 0 && fe.current(L);
4121
- }, ca), () => {
4122
- G.current != null && (clearTimeout(G.current), G.current = null);
4131
+ }, [fe, Ie, Ue]), z(() => {
4132
+ if (!(!fe || Y.version === 0) && re.current.length !== 0)
4133
+ return J.current != null && clearTimeout(J.current), J.current = setTimeout(() => {
4134
+ if (J.current = null, !K.current) return;
4135
+ const q = [...re.current];
4136
+ Y.clearPendingChangeFields(), q.length !== 0 && he.current(q);
4137
+ }, ua), () => {
4138
+ J.current != null && (clearTimeout(J.current), J.current = null);
4123
4139
  };
4124
- }, [de, J.version, J.clearPendingChangeFields]);
4140
+ }, [fe, Y.version, Y.clearPendingChangeFields]);
4125
4141
  const ut = V(async () => {
4126
- var L, H, ne, He, Wt, Gt, Jt, Yt, Qt;
4127
- if (!F) {
4128
- if (U) {
4129
- (L = I.current) == null || L.call(I, "error", "文件正在上传,请稍候");
4142
+ var q, H, se, He, Wt, Gt, Jt, Yt, Qt;
4143
+ if (!I) {
4144
+ if (F) {
4145
+ (q = T.current) == null || q.call(T, "error", "文件正在上传,请稍候");
4130
4146
  return;
4131
4147
  }
4132
- R(!0);
4148
+ E(!0);
4133
4149
  try {
4134
- const Me = { ...((H = q.current) == null ? void 0 : H.getValues(me)) ?? {}, ...le }, Xt = ps(P, Me);
4150
+ const Me = { ...((H = B.current) == null ? void 0 : H.getValues(te)) ?? {}, ...X }, Xt = hs(N, Me);
4135
4151
  if (Xt) {
4136
- (ne = I.current) == null || ne.call(I, "error", Xt.message);
4152
+ (se = T.current) == null || se.call(T, "error", Xt.message);
4137
4153
  return;
4138
4154
  }
4139
4155
  if (o === "post") {
4140
4156
  const nn = (r ?? "").trim();
4141
4157
  if (!nn) {
4142
- (He = I.current) == null || He.call(I, "error", "callback_url 为空,无法提交");
4158
+ (He = T.current) == null || He.call(T, "error", "callback_url 为空,无法提交");
4143
4159
  return;
4144
4160
  }
4145
- te([]), Z.reportEvent({
4161
+ ie([]), W.reportEvent({
4146
4162
  action: "submit",
4147
4163
  component: "SubmitButton"
4148
4164
  });
4149
- const dt = await Zn(nn, Me, {
4150
- headers: C
4165
+ const dt = await er(nn, Me, {
4166
+ headers: ee
4151
4167
  });
4152
4168
  if (!K.current) return;
4153
- dt.ok ? (Wt = I.current) == null || Wt.call(I, "success", "提交成功") : (Gt = I.current) == null || Gt.call(I, "error", ua(dt.status, dt.body));
4169
+ dt.ok ? (Wt = T.current) == null || Wt.call(T, "success", "提交成功") : (Gt = T.current) == null || Gt.call(T, "error", ma(dt.status, dt.body));
4154
4170
  return;
4155
4171
  }
4156
- const mr = P.length > 0 ? {
4157
- title: ie,
4158
- description: pe,
4159
- blocks: P
4160
- } : A ?? void 0, Zt = $t({
4161
- context: M,
4172
+ const dr = N.length > 0 ? {
4173
+ title: j,
4174
+ description: oe,
4175
+ blocks: N
4176
+ } : x ?? void 0, Zt = $t({
4177
+ context: $,
4162
4178
  payload: e,
4163
- form: mr,
4179
+ form: dr,
4164
4180
  answer: Me
4165
4181
  }), en = jt(Zt);
4166
4182
  if (en) {
4167
- (Jt = I.current) == null || Jt.call(I, "error", en);
4183
+ (Jt = T.current) == null || Jt.call(T, "error", en);
4168
4184
  return;
4169
4185
  }
4170
- te([]), Z.reportEvent({
4186
+ ie([]), W.reportEvent({
4171
4187
  action: "submit",
4172
4188
  component: "SubmitButton"
4173
4189
  });
4174
- const dr = await nr(Zt, {
4175
- headers: C
4190
+ const pr = await rr(Zt, {
4191
+ headers: ee
4176
4192
  });
4177
4193
  if (!K.current) return;
4178
- const tn = tr(dr);
4179
- (Yt = I.current) == null || Yt.call(I, tn.type, tn.message);
4194
+ const tn = nr(pr);
4195
+ (Yt = T.current) == null || Yt.call(T, tn.type, tn.message);
4180
4196
  } catch (mt) {
4181
4197
  if (!K.current) return;
4182
4198
  const Me = mt instanceof Error ? mt.message : "提交失败";
4183
- (Qt = I.current) == null || Qt.call(I, "error", Me);
4199
+ (Qt = T.current) == null || Qt.call(T, "error", Me);
4184
4200
  } finally {
4185
- K.current && R(!1);
4201
+ K.current && E(!1);
4186
4202
  }
4187
4203
  }
4188
4204
  }, [
4205
+ I,
4189
4206
  F,
4190
- U,
4191
- me,
4192
- P,
4193
- ie,
4194
- pe,
4195
- le,
4196
4207
  te,
4197
- Z,
4208
+ N,
4209
+ j,
4210
+ oe,
4211
+ X,
4212
+ ie,
4213
+ W,
4198
4214
  o,
4199
4215
  r,
4200
- C,
4201
- M,
4216
+ ee,
4217
+ $,
4202
4218
  e,
4203
- A
4204
- ]), Ht = T(ut);
4219
+ x
4220
+ ]), Ht = _(ut);
4205
4221
  Ht.current = ut;
4206
4222
  const Kt = V(
4207
- (L) => {
4208
- ra(
4209
- L,
4223
+ (q) => {
4224
+ oa(
4225
+ q,
4210
4226
  {
4211
4227
  setValues: (H) => {
4212
- var ne;
4213
- return (ne = q.current) == null ? void 0 : ne.setValues(H);
4228
+ var se;
4229
+ return (se = B.current) == null ? void 0 : se.setValues(H);
4214
4230
  },
4215
4231
  getValues: (H) => {
4216
- var ne;
4217
- return ((ne = q.current) == null ? void 0 : ne.getValues(H)) ?? {};
4232
+ var se;
4233
+ return ((se = B.current) == null ? void 0 : se.getValues(H)) ?? {};
4218
4234
  },
4219
4235
  submit: () => Ht.current(),
4220
- rootElement: z.current
4236
+ rootElement: O.current
4221
4237
  },
4222
4238
  {
4223
- reportEvent: Z.reportEvent,
4224
- runAutoControl: Z.runAutoControl
4239
+ reportEvent: W.reportEvent,
4240
+ runAutoControl: W.runAutoControl
4225
4241
  }
4226
4242
  );
4227
4243
  },
4228
- [Z]
4244
+ [W]
4229
4245
  );
4230
- return O(() => {
4231
- if (!de) {
4232
- f(null);
4246
+ return z(() => {
4247
+ if (!fe) {
4248
+ p(null);
4233
4249
  return;
4234
4250
  }
4235
- return f(Kt), () => f(null);
4236
- }, [de, Kt, f]), h ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(Rt, { size: "small" }) }) : !A || P.length === 0 ? /* @__PURE__ */ u(
4237
- la,
4251
+ return p(Kt), () => p(null);
4252
+ }, [fe, Kt, p]), f ? /* @__PURE__ */ u("div", { className: "ask-user-form-card", children: /* @__PURE__ */ u(Rt, { size: "small" }) }) : !x || N.length === 0 ? /* @__PURE__ */ u(
4253
+ ca,
4238
4254
  {
4239
4255
  payload: e,
4240
4256
  callbackUrl: r,
4241
- answerAgentContext: M,
4257
+ answerAgentContext: $,
4242
4258
  submitHeaders: s,
4243
- unpublishedFormId: S && Y ? Y : void 0,
4259
+ unpublishedFormId: C && Q ? Q : void 0,
4244
4260
  onNotify: l
4245
4261
  }
4246
- ) : /* @__PURE__ */ B(
4262
+ ) : /* @__PURE__ */ w(
4247
4263
  "div",
4248
4264
  {
4249
4265
  className: "ask-user-form-card",
4250
- ref: z,
4251
- "data-ask-user-message-id": ae || void 0,
4266
+ ref: O,
4267
+ "data-ask-user-message-id": de || void 0,
4252
4268
  children: [
4253
- S && Y ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(Fe, { title: Y, children: /* @__PURE__ */ u(Ee, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
4269
+ C && Q ? /* @__PURE__ */ u("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ u(Fe, { title: Q, children: /* @__PURE__ */ u(Ee, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
4254
4270
  /* @__PURE__ */ u(
4255
- Gs,
4271
+ Js,
4256
4272
  {
4257
- ref: q,
4258
- doc: he,
4273
+ ref: B,
4274
+ doc: pe,
4259
4275
  surfaceId: Ie,
4260
- fieldNames: me,
4276
+ fieldNames: te,
4261
4277
  interactive: !0,
4262
4278
  wrapProvider: !1,
4263
4279
  resumeSearch: c,
4264
4280
  contentSearch: m,
4265
4281
  caseSearch: d,
4266
- onUploadingChange: w
4282
+ onUploadingChange: U
4267
4283
  }
4268
4284
  ),
4269
4285
  /* @__PURE__ */ u("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ u(
@@ -4275,8 +4291,8 @@ function ma({
4275
4291
  {
4276
4292
  type: "primary",
4277
4293
  size: "small",
4278
- loading: F,
4279
- disabled: F || U,
4294
+ loading: I,
4295
+ disabled: I || F,
4280
4296
  onClick: () => void ut(),
4281
4297
  children: "提交"
4282
4298
  }
@@ -4287,16 +4303,16 @@ function ma({
4287
4303
  }
4288
4304
  );
4289
4305
  }
4290
- function Ra(e) {
4306
+ function wa(e) {
4291
4307
  var c;
4292
- const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = W(() => Wi(), []), [r, o] = E(!1), i = T(null), s = V((m) => {
4308
+ const t = ((c = e.askUserMessageId) == null ? void 0 : c.trim()) ?? "", n = G(() => Gi(), []), [r, o] = R(!1), i = _(null), s = V((m) => {
4293
4309
  o(m);
4294
4310
  }, []), a = V(
4295
4311
  (m) => {
4296
4312
  i.current = m;
4297
4313
  },
4298
4314
  []
4299
- ), l = W(() => !n || !t ? null : new ea({
4315
+ ), l = G(() => !n || !t ? null : new ta({
4300
4316
  url: n,
4301
4317
  askUserMessageId: t,
4302
4318
  onAutoControl: (m) => {
@@ -4304,15 +4320,15 @@ function Ra(e) {
4304
4320
  (d = i.current) == null || d.call(i, m);
4305
4321
  }
4306
4322
  }), [n, t]);
4307
- return O(() => {
4323
+ return z(() => {
4308
4324
  if (l)
4309
4325
  return () => {
4310
4326
  l.close();
4311
4327
  };
4312
- }, [l]), O(() => {
4328
+ }, [l]), z(() => {
4313
4329
  !l || !r || l.connect();
4314
- }, [l, r]), /* @__PURE__ */ u(Oe, { children: /* @__PURE__ */ u(Io, { client: l, children: /* @__PURE__ */ u(To, { children: /* @__PURE__ */ u(
4315
- ma,
4330
+ }, [l, r]), /* @__PURE__ */ u(Oe, { children: /* @__PURE__ */ u(Mo, { client: l, children: /* @__PURE__ */ u(xo, { children: /* @__PURE__ */ u(
4331
+ da,
4316
4332
  {
4317
4333
  ...e,
4318
4334
  onSurfaceReadyChange: s,
@@ -4321,84 +4337,84 @@ function Ra(e) {
4321
4337
  ) }) }) });
4322
4338
  }
4323
4339
  export {
4324
- ka as A2UI_PROTOCOL_VERSION,
4325
- Ra as AskUserFormCard,
4340
+ _a as A2UI_PROTOCOL_VERSION,
4341
+ wa as AskUserFormCard,
4326
4342
  xt as CaseSearchProvider,
4327
4343
  Ft as ContentSearchProvider,
4328
- la as CurlSubmitBlock,
4329
- $i as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
4330
- Bi as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
4331
- Di as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
4332
- Vi as DEFAULT_AUTH_SKOPON_API_BASE_URL_FIELD,
4344
+ ca as CurlSubmitBlock,
4345
+ ji as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
4346
+ Di as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
4347
+ Vi as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
4348
+ $i as DEFAULT_AUTH_SKOPON_API_BASE_URL_FIELD,
4333
4349
  ot as DEFAULT_AUTH_STORAGE_KEY,
4334
- Li as DEFAULT_AUTH_TOKEN_FIELD,
4335
- yn as DEFAULT_CONTENT_FLOW_TYPE,
4350
+ Bi as DEFAULT_AUTH_TOKEN_FIELD,
4351
+ vn as DEFAULT_CONTENT_FLOW_TYPE,
4336
4352
  Ge as DEFAULT_SKOPON_API_BASE_PATH,
4337
- zr as FORM_MEDIA_SIZES,
4353
+ Or as FORM_MEDIA_SIZES,
4338
4354
  _t as FORM_WEB_DEFAULT_HEIGHT,
4339
- qr as FORM_WEB_MAX_HEIGHT,
4340
- Or as FORM_WEB_MIN_HEIGHT,
4355
+ Lr as FORM_WEB_MAX_HEIGHT,
4356
+ qr as FORM_WEB_MIN_HEIGHT,
4341
4357
  Ut as ResumeSearchProvider,
4342
- Ea as SkoponA2uiStreamRenderer,
4358
+ Ra as SkoponA2uiStreamRenderer,
4343
4359
  Oe as SkoponFormProvider,
4344
- Gs as SkoponFormRenderer,
4345
- ki as a2uiToBlocks,
4346
- Wn as blocksToA2ui,
4360
+ Js as SkoponFormRenderer,
4361
+ _i as a2uiToBlocks,
4362
+ Gn as blocksToA2ui,
4347
4363
  bo as blocksToJsonSchema,
4348
4364
  $t as buildAnswerAgentBody,
4349
- Oi as buildAskUserCurlBodyJson,
4350
- qi as buildAskUserCurlStatement,
4351
- Ua as buildAskUserSubmitCurlFromPayload,
4352
- xi as buildAskUserSurface,
4353
- Xn as buildCurlStatement,
4365
+ qi as buildAskUserCurlBodyJson,
4366
+ Li as buildAskUserCurlStatement,
4367
+ Ia as buildAskUserSubmitCurlFromPayload,
4368
+ Fi as buildAskUserSurface,
4369
+ Zn as buildCurlStatement,
4354
4370
  Ve as coerceToggleValue,
4355
- Ia as copyTextToClipboard,
4356
- ds as createCaseSearchClient,
4357
- ls as createContentSearchClient,
4358
- xa as createEmptyBlock,
4359
- Ta as createEmptyFormDefinition,
4360
- Gi as createFormClient,
4361
- ts as createResumeSearchClient,
4362
- Na as createSkoponSdkClients,
4371
+ Ma as copyTextToClipboard,
4372
+ ps as createCaseSearchClient,
4373
+ cs as createContentSearchClient,
4374
+ Fa as createEmptyBlock,
4375
+ xa as createEmptyFormDefinition,
4376
+ Ji as createFormClient,
4377
+ ns as createResumeSearchClient,
4378
+ Ea as createSkoponSdkClients,
4363
4379
  et as extractExtraBlockValues,
4364
- Ui as extractSurfaceValues,
4365
- tr as formatAnswerAgentSubmitMessage,
4366
- zi as getPayloadHiddenBlockValues,
4367
- Fa as getPayloadInputFieldNames,
4368
- wi as getPayloadRenderableBlocks,
4369
- Ri as intersectPayloadBlocksWithForm,
4380
+ Ii as extractSurfaceValues,
4381
+ nr as formatAnswerAgentSubmitMessage,
4382
+ Oi as getPayloadHiddenBlockValues,
4383
+ Ua as getPayloadInputFieldNames,
4384
+ zi as getPayloadRenderableBlocks,
4385
+ wi as intersectPayloadBlocksWithForm,
4370
4386
  Nt as isA2uiSurfaceEmpty,
4371
- Un as isDisplayBlockType,
4372
- se as isInputBlockType,
4373
- Fn as isLayoutBlockType,
4387
+ In as isDisplayBlockType,
4388
+ ue as isInputBlockType,
4389
+ Un as isLayoutBlockType,
4374
4390
  Re as isMediaBlockType,
4375
- In as isOptionsBlockType,
4376
- Lr as isSupportedWebUrl,
4377
- Pe as isWebBlockType,
4378
- Fi as mapFormDefinitionFromDto,
4391
+ Mn as isOptionsBlockType,
4392
+ Br as isSupportedWebUrl,
4393
+ we as isWebBlockType,
4394
+ Ui as mapFormDefinitionFromDto,
4379
4395
  tt as normalizeFormDefinition,
4380
4396
  Te as normalizeMultiselectCount,
4381
4397
  Le as normalizeWebHeight,
4382
4398
  rt as parsePayloadBlocksJson,
4383
4399
  Pi as payloadHasInputBlocks,
4384
- Ki as resolveAnswerAgentCallbackUrl,
4400
+ Wi as resolveAnswerAgentCallbackUrl,
4385
4401
  at as resolveClientHeaders,
4386
- Wi as resolveRealtimeWsUrl,
4387
- yo as resolveSchemaDefaultValue,
4388
- ji as resolveSkoponApiBaseUrl,
4402
+ Gi as resolveRealtimeWsUrl,
4403
+ vo as resolveSchemaDefaultValue,
4404
+ Hi as resolveSkoponApiBaseUrl,
4389
4405
  Vt as resolveSkoponAuthHeaders,
4390
4406
  Dt as resolveSubmitAuthHeaders,
4391
- Ti as resolveSurfaceFromFormDefinition,
4392
- Ws as skoponAntdTheme,
4407
+ xi as resolveSurfaceFromFormDefinition,
4408
+ Gs as skoponAntdTheme,
4393
4409
  ge as skoponBrandColors,
4394
- nr as submitAnswerAgent,
4395
- Zn as submitFormJson,
4396
- _a as supportsDefaultValue,
4397
- _i as surfaceDocToMessages,
4398
- we as syncFormDefinition,
4399
- Ro as useCaseSearch,
4400
- $o as useContentSearch,
4401
- Jo as useResumeSearch,
4410
+ rr as submitAnswerAgent,
4411
+ er as submitFormJson,
4412
+ Ta as supportsDefaultValue,
4413
+ Ti as surfaceDocToMessages,
4414
+ Pe as syncFormDefinition,
4415
+ wo as useCaseSearch,
4416
+ jo as useContentSearch,
4417
+ Yo as useResumeSearch,
4402
4418
  jt as validateAnswerAgentBody,
4403
- Ma as validateAnswerAgentContext
4419
+ Na as validateAnswerAgentContext
4404
4420
  };