@skopon-cool/form-sdk 0.1.9 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,31 +1,31 @@
1
1
  import './form-sdk.css';
2
- import { jsx as s, jsxs as C, Fragment as Ye } from "react/jsx-runtime";
3
- import { createContext as ze, useContext as Re, useCallback as Q, useSyncExternalStore as Nt, useMemo as B, useState as U, useRef as q, useEffect as j, forwardRef as It, useImperativeHandle as Mt } from "react";
4
- import { Spin as Oe, Button as fe, Typography as D, Avatar as Ft, Tag as te, Select as Fe, Checkbox as Pt, Radio as Ut, Switch as _t, TimePicker as Et, DatePicker as zt, Upload as Se, Input as xe, InputNumber as Rt, Tooltip as ee } from "antd";
5
- import { ReloadOutlined as Xe, FileTextOutlined as Ge, UserOutlined as Ot, FileImageOutlined as Bt, FileExcelOutlined as Vt, FileOutlined as We, PictureOutlined as wt, SoundOutlined as qt, VideoCameraOutlined as jt } from "@ant-design/icons";
6
- import { createBinderlessComponentImplementation as V, basicCatalog as ue, A2uiSurface as Ze } from "@a2ui/react/v0_9";
7
- import { z as d } from "zod";
8
- import { Catalog as $t, MessageProcessor as Qe } from "@a2ui/web_core/v0_9";
9
- import { injectBasicCatalogStyles as et } from "@a2ui/web_core/v0_9/basic_catalog";
10
- import { injectStyles as tt } from "@a2ui/react/styles";
11
- import $e from "dayjs";
12
- const oo = "v0.9", Lt = [
2
+ import { jsx as l, jsxs as C } from "react/jsx-runtime";
3
+ import { createContext as Be, useContext as Oe, useCallback as te, useSyncExternalStore as Mt, useMemo as O, useState as z, useRef as q, useEffect as L, forwardRef as It, useImperativeHandle as Ft } from "react";
4
+ import { Spin as Ve, Button as ge, Typography as H, Avatar as Pt, Tag as re, Select as ze, Checkbox as zt, Radio as Ut, Switch as _t, TimePicker as Et, DatePicker as Rt, Upload as Ce, Input as ke, InputNumber as Bt, ConfigProvider as Ot, Tooltip as ne } from "antd";
5
+ import { ReloadOutlined as Xe, FileTextOutlined as We, UserOutlined as Vt, FileImageOutlined as wt, FileExcelOutlined as qt, FileOutlined as Qe, PictureOutlined as Lt, SoundOutlined as jt, VideoCameraOutlined as $t } from "@ant-design/icons";
6
+ import { createBinderlessComponentImplementation as V, basicCatalog as de, A2uiSurface as Ze } from "@a2ui/react/v0_9";
7
+ import { z as m } from "zod";
8
+ import { Catalog as Dt, MessageProcessor as et } from "@a2ui/web_core/v0_9";
9
+ import { injectBasicCatalogStyles as tt } from "@a2ui/web_core/v0_9/basic_catalog";
10
+ import { injectStyles as nt } from "@a2ui/react/styles";
11
+ import De from "dayjs";
12
+ const lo = "v0.9", Ht = [
13
13
  "huge",
14
14
  "large",
15
15
  "medium",
16
16
  "small",
17
17
  "icon"
18
18
  ];
19
- function Pe(e) {
19
+ function Ue(e) {
20
20
  return e === "image" || e === "video" || e === "audio";
21
21
  }
22
- function Be(e) {
22
+ function we(e) {
23
23
  return e === "heading" || e === "paragraph";
24
24
  }
25
- function X(e) {
26
- return !Be(e) && !Pe(e);
25
+ function W(e) {
26
+ return !we(e) && !Ue(e);
27
27
  }
28
- function Dt() {
28
+ function Kt() {
29
29
  if (typeof crypto < "u" && typeof crypto.randomUUID == "function")
30
30
  return crypto.randomUUID();
31
31
  if (typeof crypto < "u" && typeof crypto.getRandomValues == "function") {
@@ -39,11 +39,11 @@ function Dt() {
39
39
  return (e === "x" ? t : t & 3 | 8).toString(16);
40
40
  });
41
41
  }
42
- function re(e) {
43
- const t = Dt().replace(/-/g, "").slice(0, 8);
42
+ function ie(e) {
43
+ const t = Kt().replace(/-/g, "").slice(0, 8);
44
44
  return `${e}${t}`;
45
45
  }
46
- const nt = [
46
+ const rt = [
47
47
  { value: "image/*", label: "图片" },
48
48
  { value: "video/*", label: "视频" },
49
49
  { value: "audio/*", label: "音频" },
@@ -54,7 +54,7 @@ const nt = [
54
54
  { value: "text/plain", label: "纯文本" },
55
55
  { value: "application/zip", label: "ZIP 压缩包" },
56
56
  { value: "application/x-rar-compressed", label: "RAR 压缩包" }
57
- ], Kt = {
57
+ ], Gt = {
58
58
  "image/*": ["image/*"],
59
59
  "video/*": ["video/*"],
60
60
  "audio/*": ["audio/*"],
@@ -85,14 +85,14 @@ const nt = [
85
85
  "text/plain": [".txt"],
86
86
  "application/zip": [".zip", ".7z"],
87
87
  "application/x-rar-compressed": [".rar"]
88
- }, Ht = {
88
+ }, Yt = {
89
89
  "application/msword": "office/word",
90
90
  "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "office/word",
91
91
  "application/vnd.ms-excel": "office/excel",
92
92
  "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "office/excel",
93
93
  "application/vnd.ms-powerpoint": "office/ppt",
94
94
  "application/vnd.openxmlformats-officedocument.presentationml.presentation": "office/ppt"
95
- }, Ve = [
95
+ }, qe = [
96
96
  { value: ".jpg", label: ".jpg" },
97
97
  { value: ".jpeg", label: ".jpeg" },
98
98
  { value: ".png", label: ".png" },
@@ -118,121 +118,121 @@ const nt = [
118
118
  { value: ".zip", label: ".zip" },
119
119
  { value: ".rar", label: ".rar" },
120
120
  { value: ".7z", label: ".7z" }
121
- ], Yt = Object.fromEntries(
122
- nt.map((e) => [e.value, e.label])
123
- ), Xt = Object.fromEntries(
124
- Ve.map((e) => [e.value, e.label])
125
- ), Gt = new Set(nt.map((e) => e.value)), Wt = new Set(
126
- Ve.map((e) => e.value)
121
+ ], Xt = Object.fromEntries(
122
+ rt.map((e) => [e.value, e.label])
123
+ ), Wt = Object.fromEntries(
124
+ qe.map((e) => [e.value, e.label])
125
+ ), Qt = new Set(rt.map((e) => e.value)), Zt = new Set(
126
+ qe.map((e) => e.value)
127
127
  );
128
- function Zt(e) {
128
+ function en(e) {
129
129
  const t = e.trim();
130
- return t ? Gt.has(t) ? t : Ht[t] ?? null : null;
130
+ return t ? Qt.has(t) ? t : Yt[t] ?? null : null;
131
131
  }
132
- function Qt(e) {
132
+ function tn(e) {
133
133
  return Array.isArray(e) ? e.map((t) => {
134
134
  const n = t.trim().toLowerCase();
135
135
  return n ? n.startsWith(".") ? n : `.${n}` : "";
136
136
  }).filter(Boolean) : [];
137
137
  }
138
- function oe(e) {
138
+ function ae(e) {
139
139
  if (!Array.isArray(e)) return [];
140
140
  const t = [], n = /* @__PURE__ */ new Set();
141
141
  for (const r of e) {
142
- const o = Zt(r);
142
+ const o = en(r);
143
143
  o && !n.has(o) && (n.add(o), t.push(o));
144
144
  }
145
145
  return t;
146
146
  }
147
- function en(e) {
148
- const t = oe(e), n = [];
147
+ function nn(e) {
148
+ const t = ae(e), n = [];
149
149
  for (const r of t)
150
- n.push(...Kt[r] ?? [r]);
150
+ n.push(...Gt[r] ?? [r]);
151
151
  return n;
152
152
  }
153
- function tn(e) {
154
- const t = oe(e);
153
+ function rn(e) {
154
+ const t = ae(e);
155
155
  if (t.length === 0) return [];
156
156
  const n = /* @__PURE__ */ new Set();
157
157
  for (const r of t)
158
158
  for (const o of Jt[r] ?? [])
159
159
  n.add(o);
160
- return Ve.filter((r) => n.has(r.value));
160
+ return qe.filter((r) => n.has(r.value));
161
161
  }
162
- function we(e, t) {
163
- const n = Qt(t), r = oe(e);
162
+ function Le(e, t) {
163
+ const n = tn(t), r = ae(e);
164
164
  if (r.length === 0)
165
- return n.filter((i) => Wt.has(i));
165
+ return n.filter((i) => Zt.has(i));
166
166
  const o = new Set(
167
- tn(r).map((i) => i.value)
167
+ rn(r).map((i) => i.value)
168
168
  );
169
169
  return n.filter((i) => o.has(i));
170
170
  }
171
- function nn(e, t) {
172
- const n = en(e), r = we(e, t), o = [...n, ...r];
171
+ function on(e, t) {
172
+ const n = nn(e), r = Le(e, t), o = [...n, ...r];
173
173
  return o.length > 0 ? o.join(",") : void 0;
174
174
  }
175
- function rn(e, t) {
176
- const n = oe(e), r = we(
175
+ function an(e, t) {
176
+ const n = ae(e), r = Le(
177
177
  n,
178
178
  t
179
179
  ), o = [
180
- ...n.map((i) => Yt[i] ?? i),
181
- ...r.map((i) => Xt[i] ?? i)
180
+ ...n.map((i) => Xt[i] ?? i),
181
+ ...r.map((i) => Wt[i] ?? i)
182
182
  ];
183
183
  return o.length === 0 ? null : o.join("、");
184
184
  }
185
- const on = [
185
+ const ln = [
186
186
  "video",
187
187
  "audio",
188
188
  "image",
189
189
  "file",
190
190
  "spreadsheet",
191
191
  "document"
192
- ], an = new Set(on);
193
- function ln(e) {
194
- return e && an.has(e) ? e : "file";
192
+ ], sn = new Set(ln);
193
+ function cn(e) {
194
+ return e && sn.has(e) ? e : "file";
195
195
  }
196
- function ie(e) {
197
- return typeof e == "string" && Lt.includes(e) ? e : "medium";
196
+ function le(e) {
197
+ return typeof e == "string" && Ht.includes(e) ? e : "medium";
198
198
  }
199
- function sn(e, t) {
199
+ function un(e, t) {
200
200
  var o;
201
201
  const n = Math.max(1, t);
202
202
  let r = [];
203
203
  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);
204
204
  }
205
- function cn(e) {
205
+ function pn(e) {
206
206
  var t;
207
207
  return Array.isArray(e.mediaUrls) ? e.mediaUrls.map((n) => n.trim()).filter(Boolean) : (t = e.mediaUrl) != null && t.trim() ? [e.mediaUrl.trim()] : [];
208
208
  }
209
- function un(e) {
210
- return `form-media-size-${ie(e)}`;
209
+ function dn(e) {
210
+ return `form-media-size-${le(e)}`;
211
211
  }
212
- function pn(e) {
213
- return `form-media-preview form-media-list ${un(e)}`;
212
+ function mn(e) {
213
+ return `form-media-preview form-media-list ${dn(e)}`;
214
214
  }
215
- const mn = 10;
216
- function qe(e) {
215
+ const fn = 10;
216
+ function je(e) {
217
217
  return e === !0 || e === "true";
218
218
  }
219
- function Le(e, t = 1) {
219
+ function He(e, t = 1) {
220
220
  const n = typeof e == "number" ? e : Number(e);
221
221
  return Number.isFinite(n) ? Math.max(0, Math.floor(n)) : t;
222
222
  }
223
- function le(e, t = 1) {
223
+ function ce(e, t = 1) {
224
224
  const n = typeof e == "number" ? e : Number(e);
225
225
  return Number.isFinite(n) ? Math.max(1, Math.floor(n)) : t;
226
226
  }
227
- function dn(e, t) {
227
+ function hn(e, t) {
228
228
  if (t !== void 0)
229
- return e === "toggle" ? qe(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String) : typeof t == "string" && t ? [t] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t);
229
+ return e === "toggle" ? je(t) : e === "multiselect" || e === "checkbox" || e === "resume_multiselect" || e === "case_multiselect" ? Array.isArray(t) ? t.map(String) : typeof t == "string" && t ? [t] : [] : typeof t == "boolean" ? t ? "true" : "false" : Array.isArray(t) ? t.map(String) : String(t);
230
230
  }
231
- function fn(e) {
232
- const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, a = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, l = Array.isArray(e == null ? void 0 : e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
233
- return { agentKind: r, agentUniqueId: o, flowType: i, category: a, flowUniqueIds: l, pageSize: n };
231
+ function gn(e) {
232
+ const t = typeof (e == null ? void 0 : e.pageSize) == "number" ? e.pageSize : Number(e == null ? void 0 : e.pageSize), n = Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20, r = typeof (e == null ? void 0 : e.agentKind) == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, o = typeof (e == null ? void 0 : e.agentUniqueId) == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, i = typeof (e == null ? void 0 : e.flowType) == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, a = typeof (e == null ? void 0 : e.category) == "string" && e.category.trim() ? e.category.trim() : void 0, s = Array.isArray(e == null ? void 0 : e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
233
+ return { agentKind: r, agentUniqueId: o, flowType: i, category: a, flowUniqueIds: s, pageSize: n };
234
234
  }
235
- function hn(e) {
235
+ function yn(e) {
236
236
  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;
237
237
  return {
238
238
  names: Array.isArray(e == null ? void 0 : e.names) ? e.names.map(String).filter(Boolean) : [],
@@ -241,51 +241,51 @@ function hn(e) {
241
241
  pageSize: n
242
242
  };
243
243
  }
244
- function gn(e) {
244
+ function vn(e) {
245
245
  if (e.type !== "case_singleselect") return e;
246
246
  const t = typeof e.defaultValue == "string" && e.defaultValue.trim() ? [e.defaultValue.trim()] : Array.isArray(e.defaultValue) ? e.defaultValue.map(String).filter(Boolean) : [];
247
247
  return { ...e, type: "case_multiselect", defaultValue: t };
248
248
  }
249
- function yn(e) {
249
+ function bn(e) {
250
250
  var o, i;
251
- const t = gn(e), n = oe(t.fileAcceptTypes), r = t.type;
251
+ const t = vn(e), n = ae(t.fileAcceptTypes), r = t.type;
252
252
  return {
253
- id: ((o = t.id) == null ? void 0 : o.trim()) || re("block-"),
253
+ id: ((o = t.id) == null ? void 0 : o.trim()) || ie("block-"),
254
254
  type: r,
255
255
  name: ((i = t.name) == null ? void 0 : i.trim()) || void 0,
256
256
  label: t.label ?? "",
257
257
  placeholder: t.placeholder ?? "",
258
258
  help: t.help ?? "",
259
259
  required: t.required === !0,
260
- mediaUrls: Pe(r) ? sn(t, mn) : void 0,
261
- mediaSize: Pe(r) ? ie(t.mediaSize) : void 0,
260
+ mediaUrls: Ue(r) ? un(t, fn) : void 0,
261
+ mediaSize: Ue(r) ? le(t.mediaSize) : void 0,
262
262
  fileAcceptTypes: n,
263
- fileAcceptExtensions: we(
263
+ fileAcceptExtensions: Le(
264
264
  n,
265
265
  t.fileAcceptExtensions
266
266
  ),
267
- filePlaceholderIcon: ln(t.filePlaceholderIcon),
268
- fileMinCount: r === "file" ? Le(t.fileMinCount, 1) : void 0,
269
- fileMaxCount: r === "file" ? Le(t.fileMaxCount, 1) : void 0,
270
- defaultValue: dn(r, t.defaultValue),
271
- options: Array.isArray(t.options) ? t.options.map((a, l) => {
267
+ filePlaceholderIcon: cn(t.filePlaceholderIcon),
268
+ fileMinCount: r === "file" ? He(t.fileMinCount, 1) : void 0,
269
+ fileMaxCount: r === "file" ? He(t.fileMaxCount, 1) : void 0,
270
+ defaultValue: hn(r, t.defaultValue),
271
+ options: Array.isArray(t.options) ? t.options.map((a, s) => {
272
272
  var c, u;
273
273
  return {
274
- value: ((c = a.value) == null ? void 0 : c.trim()) || `option_${l + 1}`,
275
- label: ((u = a.label) == null ? void 0 : u.trim()) || `选项 ${l + 1}`
274
+ value: ((c = a.value) == null ? void 0 : c.trim()) || `option_${s + 1}`,
275
+ label: ((u = a.label) == null ? void 0 : u.trim()) || `选项 ${s + 1}`
276
276
  };
277
277
  }) : void 0,
278
278
  resumeEnableRefresh: r === "resume_multiselect" ? t.resumeEnableRefresh !== !1 : void 0,
279
- resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? le(t.resumeMinCount, 1) : void 0,
280
- resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? le(t.resumeMaxCount, 1) : void 0,
281
- resumeFilter: r === "resume_multiselect" ? hn(t.resumeFilter) : void 0,
279
+ resumeMinCount: r === "resume_multiselect" && t.resumeMinCount != null ? ce(t.resumeMinCount, 1) : void 0,
280
+ resumeMaxCount: r === "resume_multiselect" && t.resumeMaxCount != null ? ce(t.resumeMaxCount, 1) : void 0,
281
+ resumeFilter: r === "resume_multiselect" ? yn(t.resumeFilter) : void 0,
282
282
  caseEnableRefresh: r === "case_multiselect" ? t.caseEnableRefresh !== !1 : void 0,
283
- caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? le(t.caseMinCount, 1) : void 0,
284
- caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? le(t.caseMaxCount, 1) : void 0,
285
- caseFilter: r === "case_multiselect" ? fn(t.caseFilter) : void 0
283
+ caseMinCount: r === "case_multiselect" && t.caseMinCount != null ? ce(t.caseMinCount, 1) : void 0,
284
+ caseMaxCount: r === "case_multiselect" && t.caseMaxCount != null ? ce(t.caseMaxCount, 1) : void 0,
285
+ caseFilter: r === "case_multiselect" ? gn(t.caseFilter) : void 0
286
286
  };
287
287
  }
288
- function pe(e) {
288
+ function me(e) {
289
289
  return {
290
290
  title: e.title ?? "",
291
291
  description: e.description ?? "",
@@ -293,18 +293,18 @@ function pe(e) {
293
293
  jsonSchema: e.jsonSchema ?? {}
294
294
  };
295
295
  }
296
- function W(e) {
296
+ function Z(e) {
297
297
  if (!e || !Array.isArray(e.blocks))
298
- return pe({ title: "", description: "", blocks: [], jsonSchema: {} });
299
- const t = e.blocks.map(yn);
300
- return pe({
298
+ return me({ title: "", description: "", blocks: [], jsonSchema: {} });
299
+ const t = e.blocks.map(bn);
300
+ return me({
301
301
  title: typeof e.title == "string" ? e.title : "",
302
302
  description: typeof e.description == "string" ? e.description : "",
303
303
  blocks: t,
304
304
  jsonSchema: {}
305
305
  });
306
306
  }
307
- function vn(e) {
307
+ function Sn(e) {
308
308
  const t = typeof e.pageSize == "number" ? e.pageSize : Number(e.pageSize), n = typeof e.agentKind == "string" && e.agentKind.trim() ? e.agentKind.trim() : void 0, r = typeof e.agentUniqueId == "string" && e.agentUniqueId.trim() ? e.agentUniqueId.trim() : void 0, o = typeof e.flowType == "string" && e.flowType.trim() ? e.flowType.trim() : void 0, i = typeof e.category == "string" && e.category.trim() ? e.category.trim() : void 0, a = Array.isArray(e.flowUniqueIds) ? e.flowUniqueIds.map(String).filter(Boolean) : [];
309
309
  return {
310
310
  agentKind: n,
@@ -315,14 +315,14 @@ function vn(e) {
315
315
  pageSize: Number.isFinite(t) && t >= 1 && t <= 100 ? Math.floor(t) : 20
316
316
  };
317
317
  }
318
- function De(e) {
318
+ function Ke(e) {
319
319
  if (e == null) return;
320
320
  const t = typeof e == "number" ? e : Number(e);
321
321
  if (!(!Number.isFinite(t) || t < 1))
322
322
  return Math.floor(t);
323
323
  }
324
- function bn(e, t) {
325
- var a, l, c, u, m, p;
324
+ function xn(e, t) {
325
+ var a, s, c, u, d, p;
326
326
  const { id: n, label: r, path: o, withData: i } = t;
327
327
  return i({
328
328
  id: n,
@@ -333,10 +333,10 @@ function bn(e, t) {
333
333
  enableRefresh: e.caseEnableRefresh !== !1,
334
334
  caseFilter: {
335
335
  agentKind: (a = e.caseFilter) == null ? void 0 : a.agentKind,
336
- agentUniqueId: (l = e.caseFilter) == null ? void 0 : l.agentUniqueId,
336
+ agentUniqueId: (s = e.caseFilter) == null ? void 0 : s.agentUniqueId,
337
337
  flowType: (c = e.caseFilter) == null ? void 0 : c.flowType,
338
338
  category: (u = e.caseFilter) == null ? void 0 : u.category,
339
- flowUniqueIds: ((m = e.caseFilter) == null ? void 0 : m.flowUniqueIds) ?? [],
339
+ flowUniqueIds: ((d = e.caseFilter) == null ? void 0 : d.flowUniqueIds) ?? [],
340
340
  pageSize: ((p = e.caseFilter) == null ? void 0 : p.pageSize) ?? 20
341
341
  },
342
342
  ...e.caseMinCount !== void 0 ? { minCount: e.caseMinCount } : {},
@@ -344,7 +344,7 @@ function bn(e, t) {
344
344
  value: { path: o }
345
345
  });
346
346
  }
347
- function Sn(e, t, n) {
347
+ function Cn(e, t, n) {
348
348
  const r = n.nameFromValue(e.value), o = {
349
349
  ...t("case_multiselect"),
350
350
  name: r,
@@ -352,119 +352,119 @@ function Sn(e, t, n) {
352
352
  }, i = n.asLiteral(e.placeholder);
353
353
  i && (o.placeholder = i);
354
354
  const a = n.asLiteral(e.help);
355
- a && (o.help = a), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = vn(e.caseFilter));
356
- const l = De(e.minCount);
357
- l !== void 0 && (o.caseMinCount = l);
358
- const c = De(e.maxCount);
355
+ a && (o.help = a), e.caseFilter && typeof e.caseFilter == "object" && (o.caseFilter = Sn(e.caseFilter));
356
+ const s = Ke(e.minCount);
357
+ s !== void 0 && (o.caseMinCount = s);
358
+ const c = Ke(e.maxCount);
359
359
  return c !== void 0 && (o.caseMaxCount = c), o;
360
360
  }
361
- const rt = ze({ interactive: !0 });
362
- function ot({
361
+ const ot = Be({ interactive: !0 });
362
+ function it({
363
363
  interactive: e,
364
364
  children: t
365
365
  }) {
366
- return /* @__PURE__ */ s(rt.Provider, { value: { interactive: e }, children: t });
366
+ return /* @__PURE__ */ l(ot.Provider, { value: { interactive: e }, children: t });
367
367
  }
368
368
  function K() {
369
- return Re(rt);
369
+ return Oe(ot);
370
370
  }
371
- function it(e) {
371
+ function at(e) {
372
372
  return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
373
373
  }
374
- function Ke(e, t = "value") {
374
+ function Ge(e, t = "value") {
375
375
  const r = e.componentModel.properties[t];
376
- if (!(!it(r) || r === void 0))
376
+ if (!(!at(r) || r === void 0))
377
377
  return e.dataContext.resolveDynamicValue(r);
378
378
  }
379
- function J(e, t = "value") {
380
- const r = e.componentModel.properties[t], o = it(r), i = Q(
379
+ function G(e, t = "value") {
380
+ const r = e.componentModel.properties[t], o = at(r), i = te(
381
381
  (u) => {
382
382
  if (!o || r === void 0) return () => {
383
383
  };
384
- const m = e.dataContext.subscribeDynamicValue(r, () => u());
385
- return () => m.unsubscribe();
384
+ const d = e.dataContext.subscribeDynamicValue(r, () => u());
385
+ return () => d.unsubscribe();
386
386
  },
387
387
  [e, r, o]
388
- ), a = Q(() => {
388
+ ), a = te(() => {
389
389
  if (!(!o || r === void 0))
390
390
  return e.dataContext.resolveDynamicValue(r);
391
- }, [e, r, o]), l = Nt(i, a, a), c = Q(
391
+ }, [e, r, o]), s = Mt(i, a, a), c = te(
392
392
  (u) => {
393
393
  !o || !r || typeof r != "object" || !("path" in r) || e.dataContext.set(String(r.path), u);
394
394
  },
395
395
  [e, r, o]
396
396
  );
397
- return { value: l, setValue: c, hasBinding: !!o };
397
+ return { value: s, setValue: c, hasBinding: !!o };
398
398
  }
399
- function ne(e) {
399
+ function oe(e) {
400
400
  if (typeof e == "string") return e || void 0;
401
401
  if (typeof e == "number") return String(e);
402
402
  }
403
- function L(e) {
403
+ function D(e) {
404
404
  return Array.isArray(e) ? e.map(String) : typeof e == "string" && e ? [e] : [];
405
405
  }
406
- function me(e) {
406
+ function fe(e) {
407
407
  if (e == null) return;
408
408
  const t = typeof e == "number" ? e : Number(e);
409
409
  if (!(!Number.isFinite(t) || t < 1))
410
410
  return Math.floor(t);
411
411
  }
412
- function at(e, t, n, r) {
412
+ function lt(e, t, n, r) {
413
413
  if (e.includes(t)) {
414
414
  const i = e.filter((a) => a !== t);
415
415
  return n !== void 0 && i.length < n ? null : i;
416
416
  }
417
417
  return r !== void 0 && e.length >= r ? null : [...e, t];
418
418
  }
419
- function lt(e, t, n, r, o) {
419
+ function st(e, t, n, r, o) {
420
420
  if (!n) return !0;
421
421
  const i = e.includes(t);
422
422
  return !!(!i && o !== void 0 && e.length >= o || i && r !== void 0 && e.length <= r);
423
423
  }
424
- function st(e, t) {
424
+ function ct(e, t) {
425
425
  return t === void 0 || e.length <= t ? null : e.slice(0, t);
426
426
  }
427
- const ct = ze(null);
428
- function ut({
427
+ const ut = Be(null);
428
+ function pt({
429
429
  caseSearch: e,
430
430
  children: t
431
431
  }) {
432
- return /* @__PURE__ */ s(ct.Provider, { value: e ?? null, children: t });
432
+ return /* @__PURE__ */ l(ut.Provider, { value: e ?? null, children: t });
433
433
  }
434
- function xn() {
435
- return Re(ct);
434
+ function kn() {
435
+ return Oe(ut);
436
436
  }
437
- function Ce(e) {
437
+ function Ae(e) {
438
438
  return typeof e == "string" ? e : "";
439
439
  }
440
- function ke(e) {
440
+ function Te(e) {
441
441
  if (!e || typeof e != "object")
442
442
  return { flowUniqueIds: [], pageSize: 20 };
443
- const t = e, n = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), r = Number.isFinite(n) && n >= 1 && n <= 100 ? Math.floor(n) : 20, o = typeof t.agentKind == "string" && t.agentKind.trim() ? t.agentKind.trim() : void 0, i = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, a = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, l = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, c = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
444
- return { agentKind: o, agentUniqueId: i, flowType: a, category: l, flowUniqueIds: c, pageSize: r };
443
+ const t = e, n = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), r = Number.isFinite(n) && n >= 1 && n <= 100 ? Math.floor(n) : 20, o = typeof t.agentKind == "string" && t.agentKind.trim() ? t.agentKind.trim() : void 0, i = typeof t.agentUniqueId == "string" && t.agentUniqueId.trim() ? t.agentUniqueId.trim() : void 0, a = typeof t.flowType == "string" && t.flowType.trim() ? t.flowType.trim() : void 0, s = typeof t.category == "string" && t.category.trim() ? t.category.trim() : void 0, c = Array.isArray(t.flowUniqueIds) ? t.flowUniqueIds.map(String).filter(Boolean) : [];
444
+ return { agentKind: o, agentUniqueId: i, flowType: a, category: s, flowUniqueIds: c, pageSize: r };
445
445
  }
446
- function Ae(e) {
446
+ function Ne(e) {
447
447
  var r;
448
448
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
449
449
  return t || n;
450
450
  }
451
- function Cn(e) {
451
+ function An(e) {
452
452
  return JSON.stringify(e);
453
453
  }
454
- const kn = {
454
+ const Tn = {
455
455
  name: "SkoponCaseSelect",
456
- schema: d.object({
457
- label: d.any().optional(),
458
- placeholder: d.any().optional(),
459
- help: d.any().optional(),
460
- enableRefresh: d.any().optional(),
461
- caseFilter: d.any().optional(),
462
- minCount: d.any().optional(),
463
- maxCount: d.any().optional(),
464
- value: d.any().optional()
456
+ schema: m.object({
457
+ label: m.any().optional(),
458
+ placeholder: m.any().optional(),
459
+ help: m.any().optional(),
460
+ enableRefresh: m.any().optional(),
461
+ caseFilter: m.any().optional(),
462
+ minCount: m.any().optional(),
463
+ maxCount: m.any().optional(),
464
+ value: m.any().optional()
465
465
  }).passthrough()
466
466
  };
467
- function An({
467
+ function Nn({
468
468
  item: e,
469
469
  selected: t,
470
470
  disabled: n,
@@ -478,10 +478,10 @@ function An({
478
478
  disabled: n,
479
479
  onClick: r,
480
480
  children: [
481
- /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ s(Ge, { style: { fontSize: 24, color: "var(--color-primary, #1677ff)" } }) }),
481
+ /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-avatar", children: /* @__PURE__ */ l(We, { style: { fontSize: 24, color: "var(--color-primary, #1677ff)" } }) }),
482
482
  /* @__PURE__ */ C("div", { className: "skopon-resume-select-card-body", children: [
483
- /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-name", children: e.name }),
484
- e.description ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
483
+ /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-name", children: e.name }),
484
+ e.description ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-desc", children: e.description }) : null,
485
485
  /* @__PURE__ */ C("div", { className: "skopon-resume-select-card-meta", children: [
486
486
  e.caseUniqueId,
487
487
  e.platform ? ` · ${e.platform}` : "",
@@ -492,96 +492,96 @@ function An({
492
492
  }
493
493
  );
494
494
  }
495
- function Tn({ context: e }) {
496
- const { interactive: t } = K(), n = xn(), { value: r, setValue: o } = J(e), i = e.componentModel.properties, a = Ce(i.label), l = Ce(i.placeholder), c = Ce(i.help), u = i.enableRefresh !== !1, m = me(i.minCount), p = me(i.maxCount), g = B(() => ke(i.caseFilter), [i.caseFilter]), v = Cn(g), [I, T] = U(1), [k, f] = U(!1), [h, x] = U(""), [y, S] = U([]), [M, z] = U(0), [$, G] = U(g.pageSize ?? 20), w = q(0), O = L(r);
497
- j(() => {
498
- const b = st(O, p);
495
+ function Mn({ context: e }) {
496
+ const { interactive: t } = K(), n = kn(), { value: r, setValue: o } = G(e), i = e.componentModel.properties, a = Ae(i.label), s = Ae(i.placeholder), c = Ae(i.help), u = i.enableRefresh !== !1, d = fe(i.minCount), p = fe(i.maxCount), g = O(() => Te(i.caseFilter), [i.caseFilter]), v = An(g), [M, T] = z(1), [k, f] = z(!1), [h, x] = z(""), [y, S] = z([]), [I, E] = z(0), [j, Q] = z(g.pageSize ?? 20), w = q(0), B = D(r);
497
+ L(() => {
498
+ const b = ct(B, p);
499
499
  b !== null && o(b);
500
- }, [p, O, o]);
501
- const H = B(() => n ? Ae(g) ? h || l || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, g, h, l]), Y = Q(
500
+ }, [p, B, o]);
501
+ const J = O(() => n ? Ne(g) ? h || s || "暂无匹配的案例" : "未配置案例列表筛选条件" : "未配置案例搜索服务", [n, g, h, s]), Y = te(
502
502
  async (b) => {
503
- const F = ke(JSON.parse(v)), R = ++w.current;
504
- if (!n || !Ae(F)) {
505
- S([]), z(0), x("");
503
+ const F = Te(JSON.parse(v)), R = ++w.current;
504
+ if (!n || !Ne(F)) {
505
+ S([]), E(0), x("");
506
506
  return;
507
507
  }
508
508
  f(!0), x("");
509
509
  try {
510
510
  const N = await n({ filter: F, page: b });
511
511
  if (R !== w.current) return;
512
- S(N.list), z(N.total), T(N.page), G(N.pageSize);
512
+ S(N.list), E(N.total), T(N.page), Q(N.pageSize);
513
513
  } catch (N) {
514
514
  if (R !== w.current) return;
515
- S([]), z(0), x(N instanceof Error ? N.message : "加载案例列表失败");
515
+ S([]), E(0), x(N instanceof Error ? N.message : "加载案例列表失败");
516
516
  } finally {
517
517
  R === w.current && f(!1);
518
518
  }
519
519
  },
520
520
  [n, v]
521
521
  );
522
- j(() => {
522
+ L(() => {
523
523
  T(1), Y(1);
524
524
  }, [v, Y]);
525
525
  const P = (b) => {
526
526
  if (!t) return;
527
- const F = at(
528
- O,
527
+ const F = lt(
528
+ B,
529
529
  b,
530
- m,
530
+ d,
531
531
  p
532
532
  );
533
533
  F !== null && o(F);
534
- }, _ = () => {
535
- const b = ke(JSON.parse(v)), F = $ || b.pageSize || 20, R = Math.max(1, Math.ceil(M / F)), N = I >= R ? 1 : I + 1;
534
+ }, U = () => {
535
+ const b = Te(JSON.parse(v)), F = j || b.pageSize || 20, R = Math.max(1, Math.ceil(I / F)), N = M >= R ? 1 : M + 1;
536
536
  Y(N);
537
537
  };
538
538
  return /* @__PURE__ */ C("div", { className: "form-block-preview skopon-resume-select", children: [
539
- a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
539
+ a ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: a }) : null,
540
540
  k && y.length === 0 ? /* @__PURE__ */ C("div", { className: "skopon-resume-select-status", children: [
541
- /* @__PURE__ */ s(Oe, { size: "small" }),
541
+ /* @__PURE__ */ l(Ve, { size: "small" }),
542
542
  " 加载案例…"
543
543
  ] }) : null,
544
- !k && y.length === 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-empty", children: H }) : null,
545
- y.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-list", children: y.map((b) => /* @__PURE__ */ s(
546
- An,
544
+ !k && y.length === 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-empty", children: J }) : null,
545
+ y.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-list", children: y.map((b) => /* @__PURE__ */ l(
546
+ Nn,
547
547
  {
548
548
  item: b,
549
- selected: O.includes(b.caseUniqueId),
550
- disabled: lt(
551
- O,
549
+ selected: B.includes(b.caseUniqueId),
550
+ disabled: st(
551
+ B,
552
552
  b.caseUniqueId,
553
553
  t,
554
- m,
554
+ d,
555
555
  p
556
556
  ),
557
557
  onToggle: () => P(b.caseUniqueId)
558
558
  },
559
559
  b.caseUniqueId
560
560
  )) }) : null,
561
- u && n && Ae(g) ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ s(
562
- fe,
561
+ u && n && Ne(g) ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ l(
562
+ ge,
563
563
  {
564
564
  type: "default",
565
565
  size: "small",
566
- icon: /* @__PURE__ */ s(Xe, {}),
566
+ icon: /* @__PURE__ */ l(Xe, {}),
567
567
  loading: k,
568
568
  disabled: !t,
569
- onClick: _,
569
+ onClick: U,
570
570
  children: "换一批"
571
571
  }
572
572
  ) }) : null,
573
- c ? /* @__PURE__ */ s(D.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
573
+ c ? /* @__PURE__ */ l(H.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
574
574
  ] });
575
575
  }
576
- const Nn = V(
577
- kn,
578
- Tn
579
- ), In = {
576
+ const In = V(
577
+ Tn,
578
+ Mn
579
+ ), Fn = {
580
580
  type: "case_multiselect",
581
581
  componentName: "SkoponCaseSelect",
582
- toComponent: bn,
583
- fromComponent: Sn,
584
- catalogComponents: [Nn]
582
+ toComponent: xn,
583
+ fromComponent: Cn,
584
+ catalogComponents: [In]
585
585
  };
586
586
  function Je(e) {
587
587
  if (e == null) return;
@@ -589,8 +589,8 @@ function Je(e) {
589
589
  if (!(!Number.isFinite(t) || t < 1))
590
590
  return Math.floor(t);
591
591
  }
592
- function Mn(e, t) {
593
- var a, l, c, u;
592
+ function Pn(e, t) {
593
+ var a, s, c, u;
594
594
  const { id: n, label: r, path: o, withData: i } = t;
595
595
  return i({
596
596
  id: n,
@@ -601,7 +601,7 @@ function Mn(e, t) {
601
601
  enableRefresh: e.resumeEnableRefresh !== !1,
602
602
  resumeFilter: {
603
603
  names: ((a = e.resumeFilter) == null ? void 0 : a.names) ?? [],
604
- agentUniqueIds: ((l = e.resumeFilter) == null ? void 0 : l.agentUniqueIds) ?? [],
604
+ agentUniqueIds: ((s = e.resumeFilter) == null ? void 0 : s.agentUniqueIds) ?? [],
605
605
  resumeUniqueIds: ((c = e.resumeFilter) == null ? void 0 : c.resumeUniqueIds) ?? [],
606
606
  pageSize: ((u = e.resumeFilter) == null ? void 0 : u.pageSize) ?? 20
607
607
  },
@@ -610,7 +610,7 @@ function Mn(e, t) {
610
610
  value: { path: o }
611
611
  });
612
612
  }
613
- function Fn(e, t, n) {
613
+ function zn(e, t, n) {
614
614
  const r = n.nameFromValue(e.value), o = {
615
615
  ...t("resume_multiselect"),
616
616
  name: r,
@@ -627,78 +627,78 @@ function Fn(e, t, n) {
627
627
  pageSize: typeof u.pageSize == "number" ? u.pageSize : 20
628
628
  };
629
629
  }
630
- const l = Je(e.minCount);
631
- l !== void 0 && (o.resumeMinCount = l);
630
+ const s = Je(e.minCount);
631
+ s !== void 0 && (o.resumeMinCount = s);
632
632
  const c = Je(e.maxCount);
633
633
  return c !== void 0 && (o.resumeMaxCount = c), o;
634
634
  }
635
- const pt = ze(null);
635
+ const dt = Be(null);
636
636
  function mt({
637
637
  resumeSearch: e,
638
638
  children: t
639
639
  }) {
640
- return /* @__PURE__ */ s(pt.Provider, { value: e ?? null, children: t });
640
+ return /* @__PURE__ */ l(dt.Provider, { value: e ?? null, children: t });
641
641
  }
642
- function Pn() {
643
- return Re(pt);
642
+ function Un() {
643
+ return Oe(dt);
644
644
  }
645
- function Te(e) {
645
+ function Me(e) {
646
646
  return typeof e == "string" ? e : "";
647
647
  }
648
- function Ne(e) {
648
+ function Ie(e) {
649
649
  if (!e || typeof e != "object")
650
650
  return { names: [], agentUniqueIds: [], resumeUniqueIds: [], pageSize: 20 };
651
651
  const t = e, n = Array.isArray(t.names) ? t.names.map(String).filter(Boolean) : [], r = Array.isArray(t.agentUniqueIds) ? t.agentUniqueIds.map(String).filter(Boolean) : [], o = Array.isArray(t.resumeUniqueIds) ? t.resumeUniqueIds.map(String).filter(Boolean) : [], i = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), a = Number.isFinite(i) && i >= 1 && i <= 100 ? Math.floor(i) : 20;
652
652
  return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: a };
653
653
  }
654
- function Un(e) {
654
+ function _n(e) {
655
655
  return JSON.stringify(e);
656
656
  }
657
- const _n = {
657
+ const En = {
658
658
  name: "SkoponResumeSelect",
659
- schema: d.object({
660
- label: d.any().optional(),
661
- placeholder: d.any().optional(),
662
- help: d.any().optional(),
663
- enableRefresh: d.any().optional(),
664
- resumeFilter: d.any().optional(),
665
- minCount: d.any().optional(),
666
- maxCount: d.any().optional(),
667
- value: d.any().optional()
659
+ schema: m.object({
660
+ label: m.any().optional(),
661
+ placeholder: m.any().optional(),
662
+ help: m.any().optional(),
663
+ enableRefresh: m.any().optional(),
664
+ resumeFilter: m.any().optional(),
665
+ minCount: m.any().optional(),
666
+ maxCount: m.any().optional(),
667
+ value: m.any().optional()
668
668
  }).passthrough()
669
- }, En = 3, zn = 2;
670
- function Ie(e, t) {
671
- const n = (t ?? []).filter(Boolean), r = n.slice(0, En), o = n.length - r.length;
669
+ }, Rn = 3, Bn = 2;
670
+ function Fe(e, t) {
671
+ const n = (t ?? []).filter(Boolean), r = n.slice(0, Rn), o = n.length - r.length;
672
672
  return /* @__PURE__ */ C("div", { className: "skopon-resume-select-card-tags", children: [
673
- /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-label", children: e }),
673
+ /* @__PURE__ */ l("span", { className: "skopon-resume-select-card-tags-label", children: e }),
674
674
  n.length > 0 ? /* @__PURE__ */ C("div", { className: "skopon-resume-select-card-tags-list", children: [
675
- r.map((i) => /* @__PURE__ */ s(te, { className: "skopon-resume-select-card-tag", children: i }, i)),
676
- o > 0 ? /* @__PURE__ */ C(te, { className: "skopon-resume-select-card-tag", children: [
675
+ r.map((i) => /* @__PURE__ */ l(re, { className: "skopon-resume-select-card-tag", children: i }, i)),
676
+ o > 0 ? /* @__PURE__ */ C(re, { className: "skopon-resume-select-card-tag", children: [
677
677
  "+",
678
678
  o
679
679
  ] }) : null
680
- ] }) : /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
680
+ ] }) : /* @__PURE__ */ l("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
681
681
  ] });
682
682
  }
683
- function Rn(e) {
683
+ function On(e) {
684
684
  return /* @__PURE__ */ C("div", { className: "skopon-resume-select-card-field", children: [
685
- /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
686
- /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
685
+ /* @__PURE__ */ l("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
686
+ /* @__PURE__ */ l("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
687
687
  ] });
688
688
  }
689
- function On({ work: e }) {
689
+ function Vn({ work: e }) {
690
690
  return /* @__PURE__ */ C("div", { className: "skopon-resume-select-card-work", children: [
691
- /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ s("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ s(Bt, { className: "skopon-resume-select-card-work-placeholder" }) }),
692
- /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
691
+ /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ l("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ l(wt, { className: "skopon-resume-select-card-work-placeholder" }) }),
692
+ /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
693
693
  ] });
694
694
  }
695
- function Bn({
695
+ function wn({
696
696
  item: e,
697
697
  selected: t,
698
698
  disabled: n,
699
699
  onToggle: r
700
700
  }) {
701
- const o = (e.works ?? []).slice(0, zn);
701
+ const o = (e.works ?? []).slice(0, Bn);
702
702
  return /* @__PURE__ */ C(
703
703
  "button",
704
704
  {
@@ -707,183 +707,183 @@ function Bn({
707
707
  disabled: n,
708
708
  onClick: r,
709
709
  children: [
710
- /* @__PURE__ */ s(
711
- Ft,
710
+ /* @__PURE__ */ l(
711
+ Pt,
712
712
  {
713
713
  size: 48,
714
714
  src: e.avatarUrl || void 0,
715
- icon: e.avatarUrl ? void 0 : /* @__PURE__ */ s(Ot, {}),
715
+ icon: e.avatarUrl ? void 0 : /* @__PURE__ */ l(Vt, {}),
716
716
  className: "skopon-resume-select-card-avatar"
717
717
  }
718
718
  ),
719
- /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
719
+ /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
720
720
  /* @__PURE__ */ C("div", { className: "skopon-resume-select-card-body", children: [
721
- Rn(e.satisfaction),
722
- Ie("性格", e.personality),
723
- Ie("专长", e.specialties),
724
- Ie("擅长领域", e.traits),
721
+ On(e.satisfaction),
722
+ Fe("性格", e.personality),
723
+ Fe("专长", e.specialties),
724
+ Fe("擅长领域", e.traits),
725
725
  /* @__PURE__ */ C("div", { className: "skopon-resume-select-card-works", children: [
726
- /* @__PURE__ */ s("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
727
- o.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, a) => /* @__PURE__ */ s(On, { work: i }, `${i.title}-${a}`)) }) : /* @__PURE__ */ s("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
726
+ /* @__PURE__ */ l("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
727
+ o.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, a) => /* @__PURE__ */ l(Vn, { work: i }, `${i.title}-${a}`)) }) : /* @__PURE__ */ l("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
728
728
  ] })
729
729
  ] })
730
730
  ]
731
731
  }
732
732
  );
733
733
  }
734
- function Vn({ context: e }) {
735
- const { interactive: t } = K(), n = Pn(), { value: r, setValue: o } = J(e), i = e.componentModel.properties, a = Te(i.label), l = Te(i.placeholder), c = Te(i.help), u = i.enableRefresh !== !1, m = me(i.minCount), p = me(i.maxCount), g = B(() => Ne(i.resumeFilter), [i.resumeFilter]), v = Un(g), [I, T] = U(1), [k, f] = U(!1), [h, x] = U(""), [y, S] = U([]), [M, z] = U(0), [$, G] = U(g.pageSize ?? 20), w = q(0), O = L(r);
736
- j(() => {
737
- const b = st(O, p);
734
+ function qn({ context: e }) {
735
+ const { interactive: t } = K(), n = Un(), { value: r, setValue: o } = G(e), i = e.componentModel.properties, a = Me(i.label), s = Me(i.placeholder), c = Me(i.help), u = i.enableRefresh !== !1, d = fe(i.minCount), p = fe(i.maxCount), g = O(() => Ie(i.resumeFilter), [i.resumeFilter]), v = _n(g), [M, T] = z(1), [k, f] = z(!1), [h, x] = z(""), [y, S] = z([]), [I, E] = z(0), [j, Q] = z(g.pageSize ?? 20), w = q(0), B = D(r);
736
+ L(() => {
737
+ const b = ct(B, p);
738
738
  b !== null && o(b);
739
- }, [p, O, o]);
740
- const H = Q(
739
+ }, [p, B, o]);
740
+ const J = te(
741
741
  async (b) => {
742
- const F = Ne(JSON.parse(v)), R = ++w.current;
742
+ const F = Ie(JSON.parse(v)), R = ++w.current;
743
743
  if (!n) {
744
- S([]), z(0), x("未配置简历搜索服务");
744
+ S([]), E(0), x("未配置简历搜索服务");
745
745
  return;
746
746
  }
747
747
  f(!0), x("");
748
748
  try {
749
749
  const N = await n({ filter: F, page: b });
750
750
  if (R !== w.current) return;
751
- S(N.list), z(N.total), T(N.page), G(N.pageSize);
751
+ S(N.list), E(N.total), T(N.page), Q(N.pageSize);
752
752
  } catch (N) {
753
753
  if (R !== w.current) return;
754
- S([]), z(0), x(N instanceof Error ? N.message : "加载简历列表失败");
754
+ S([]), E(0), x(N instanceof Error ? N.message : "加载简历列表失败");
755
755
  } finally {
756
756
  R === w.current && f(!1);
757
757
  }
758
758
  },
759
759
  [n, v]
760
760
  );
761
- j(() => {
762
- T(1), H(1);
763
- }, [v, H]);
761
+ L(() => {
762
+ T(1), J(1);
763
+ }, [v, J]);
764
764
  const Y = (b) => {
765
765
  if (!t) return;
766
- const F = at(
767
- O,
766
+ const F = lt(
767
+ B,
768
768
  b,
769
- m,
769
+ d,
770
770
  p
771
771
  );
772
772
  F !== null && o(F);
773
773
  }, P = () => {
774
- const b = Ne(JSON.parse(v)), F = $ || b.pageSize || 20, R = Math.max(1, Math.ceil(M / F)), N = I >= R ? 1 : I + 1;
775
- H(N);
776
- }, _ = l || "暂无匹配的简历";
774
+ const b = Ie(JSON.parse(v)), F = j || b.pageSize || 20, R = Math.max(1, Math.ceil(I / F)), N = M >= R ? 1 : M + 1;
775
+ J(N);
776
+ }, U = s || "暂无匹配的简历";
777
777
  return /* @__PURE__ */ C("div", { className: "form-block-preview skopon-resume-select", children: [
778
- a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
778
+ a ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: a }) : null,
779
779
  k && y.length === 0 ? /* @__PURE__ */ C("div", { className: "skopon-resume-select-status", children: [
780
- /* @__PURE__ */ s(Oe, { size: "small" }),
780
+ /* @__PURE__ */ l(Ve, { size: "small" }),
781
781
  " 加载简历…"
782
782
  ] }) : null,
783
- !k && h ? /* @__PURE__ */ s(D.Text, { type: "danger", className: "skopon-resume-select-status", children: h }) : null,
784
- !k && !h && y.length === 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-empty", children: _ }) : null,
785
- y.length > 0 ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-list", children: y.map((b) => /* @__PURE__ */ s(
786
- Bn,
783
+ !k && h ? /* @__PURE__ */ l(H.Text, { type: "danger", className: "skopon-resume-select-status", children: h }) : null,
784
+ !k && !h && y.length === 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-empty", children: U }) : null,
785
+ y.length > 0 ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-list", children: y.map((b) => /* @__PURE__ */ l(
786
+ wn,
787
787
  {
788
788
  item: b,
789
- selected: O.includes(b.resumeUniqueId),
790
- disabled: lt(
791
- O,
789
+ selected: B.includes(b.resumeUniqueId),
790
+ disabled: st(
791
+ B,
792
792
  b.resumeUniqueId,
793
793
  t,
794
- m,
794
+ d,
795
795
  p
796
796
  ),
797
797
  onToggle: () => Y(b.resumeUniqueId)
798
798
  },
799
799
  b.resumeUniqueId
800
800
  )) }) : null,
801
- u && n ? /* @__PURE__ */ s("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ s(
802
- fe,
801
+ u && n ? /* @__PURE__ */ l("div", { className: "skopon-resume-select-actions", children: /* @__PURE__ */ l(
802
+ ge,
803
803
  {
804
804
  type: "default",
805
805
  size: "small",
806
- icon: /* @__PURE__ */ s(Xe, {}),
806
+ icon: /* @__PURE__ */ l(Xe, {}),
807
807
  loading: k,
808
808
  disabled: !t,
809
809
  onClick: P,
810
810
  children: "换一批"
811
811
  }
812
812
  ) }) : null,
813
- c ? /* @__PURE__ */ s(D.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
813
+ c ? /* @__PURE__ */ l(H.Text, { type: "secondary", className: "form-block-preview-help", children: c }) : null
814
814
  ] });
815
815
  }
816
- const wn = V(
817
- _n,
818
- Vn
819
- ), qn = {
816
+ const Ln = V(
817
+ En,
818
+ qn
819
+ ), jn = {
820
820
  type: "resume_multiselect",
821
821
  componentName: "SkoponResumeSelect",
822
- toComponent: Mn,
823
- fromComponent: Fn,
824
- catalogComponents: [wn]
825
- }, he = [qn, In], jn = new Map(
826
- he.map((e) => [e.type, e])
827
- ), $n = new Map(
828
- he.map((e) => [e.componentName, e])
822
+ toComponent: Pn,
823
+ fromComponent: zn,
824
+ catalogComponents: [Ln]
825
+ }, ye = [jn, Fn], $n = new Map(
826
+ ye.map((e) => [e.type, e])
827
+ ), Dn = new Map(
828
+ ye.map((e) => [e.componentName, e])
829
829
  );
830
- function Ln(e) {
831
- return jn.get(e);
832
- }
833
- function Dn(e) {
830
+ function Hn(e) {
834
831
  return $n.get(e);
835
832
  }
836
- function Kn() {
837
- return he.flatMap((e) => e.catalogComponents);
833
+ function Kn(e) {
834
+ return Dn.get(e);
835
+ }
836
+ function Gn() {
837
+ return ye.flatMap((e) => e.catalogComponents);
838
838
  }
839
839
  function Jn() {
840
- return he.map((e) => e.componentName);
840
+ return ye.map((e) => e.componentName);
841
841
  }
842
- const de = "root", Ue = "__title__", _e = "__desc__", dt = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
843
- function Hn(e) {
842
+ const he = "root", _e = "__title__", Ee = "__desc__", ft = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
843
+ function Yn(e) {
844
844
  return `/${e}`;
845
845
  }
846
- function He(e) {
846
+ function Ye(e) {
847
847
  return e && typeof e == "object" && "path" in e ? String(e.path ?? "").replace(/^\//, "") : "";
848
848
  }
849
- function E(e) {
849
+ function _(e) {
850
850
  if (typeof e == "string") return e;
851
851
  }
852
- function Yn(e) {
853
- const t = e.id || re("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
852
+ function Xn(e) {
853
+ const t = e.id || ie("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
854
854
  return {
855
855
  id: t,
856
856
  component: "SkoponMedia",
857
857
  mediaType: n,
858
- urls: cn(e),
859
- mediaSize: ie(e.mediaSize),
858
+ urls: pn(e),
859
+ mediaSize: le(e.mediaSize),
860
860
  label: e.label ?? "",
861
861
  help: e.help ?? "",
862
862
  placeholder: e.placeholder ?? ""
863
863
  };
864
864
  }
865
- function Xn(e) {
865
+ function Wn(e) {
866
866
  if (Array.isArray(e.urls))
867
867
  return e.urls.map((n) => String(n).trim()).filter(Boolean);
868
- const t = E(e.url);
868
+ const t = _(e.url);
869
869
  return t != null && t.trim() ? [t.trim()] : [];
870
870
  }
871
- function se(e, t, n) {
872
- const r = typeof e.id == "string" ? e.id : re("block-"), o = Xn(e), i = E(e.label) ?? E(e.description) ?? n, a = E(e.help), l = E(e.placeholder), c = ie(e.mediaSize);
871
+ function ue(e, t, n) {
872
+ const r = typeof e.id == "string" ? e.id : ie("block-"), o = Wn(e), i = _(e.label) ?? _(e.description) ?? n, a = _(e.help), s = _(e.placeholder), c = le(e.mediaSize);
873
873
  return {
874
874
  id: r,
875
875
  type: t,
876
876
  label: i,
877
877
  ...a ? { help: a } : {},
878
- ...l ? { placeholder: l } : {},
878
+ ...s ? { placeholder: s } : {},
879
879
  mediaSize: c,
880
880
  mediaUrls: o.length > 0 ? o : [""]
881
881
  };
882
882
  }
883
- function Gn(e) {
883
+ function Qn(e) {
884
884
  switch (e.type) {
885
885
  case "toggle":
886
- return qe(e.defaultValue);
886
+ return je(e.defaultValue);
887
887
  case "multiselect":
888
888
  case "checkbox":
889
889
  case "resume_multiselect":
@@ -897,11 +897,11 @@ function Gn(e) {
897
897
  return typeof e.defaultValue == "string" ? e.defaultValue : "";
898
898
  }
899
899
  }
900
- function Wn(e) {
900
+ function Zn(e) {
901
901
  var u;
902
- const t = e.id || re("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? Hn(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), a = (m) => r ? { node: m, dataKey: r, dataValue: Gn(e) } : { node: m }, l = { id: t, label: n, name: r, path: o, withData: a }, c = Ln(e.type);
902
+ const t = e.id || ie("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? Yn(r) : void 0, i = (e.options ?? []).map((d) => ({ label: d.label, value: d.value })), a = (d) => r ? { node: d, dataKey: r, dataValue: Qn(e) } : { node: d }, s = { id: t, label: n, name: r, path: o, withData: a }, c = Hn(e.type);
903
903
  if (c)
904
- return c.toComponent(e, l);
904
+ return c.toComponent(e, s);
905
905
  switch (e.type) {
906
906
  case "heading":
907
907
  return { node: { id: t, component: "Text", text: n, variant: "h3" } };
@@ -924,7 +924,7 @@ function Wn(e) {
924
924
  component: "TextField",
925
925
  label: n,
926
926
  variant: "shortText",
927
- validationRegexp: dt,
927
+ validationRegexp: ft,
928
928
  ...e.placeholder ? { placeholder: e.placeholder } : {},
929
929
  value: { path: o }
930
930
  });
@@ -1010,7 +1010,7 @@ function Wn(e) {
1010
1010
  case "image":
1011
1011
  case "video":
1012
1012
  case "audio":
1013
- return { node: Yn(e) };
1013
+ return { node: Xn(e) };
1014
1014
  case "file":
1015
1015
  return a({
1016
1016
  id: t,
@@ -1027,31 +1027,31 @@ function Wn(e) {
1027
1027
  return { node: null };
1028
1028
  }
1029
1029
  }
1030
- function Ee(e) {
1030
+ function Re(e) {
1031
1031
  if (!e || !Array.isArray(e.components) || e.components.length === 0) return !0;
1032
- const t = e.components.find((r) => r.id === de);
1032
+ const t = e.components.find((r) => r.id === he);
1033
1033
  if (!t) return e.components.length === 0;
1034
1034
  const n = t.children;
1035
1035
  return !Array.isArray(n) || n.length === 0;
1036
1036
  }
1037
- function ft(e, t) {
1038
- const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, a = (e.title ?? "").trim(), l = (e.description ?? "").trim();
1039
- i && a && (n.push({ id: Ue, component: "Text", text: a, variant: "h2" }), r.push(Ue)), i && l && (n.push({ id: _e, component: "Text", text: l, variant: "body" }), r.push(_e));
1040
- for (const m of e.blocks ?? []) {
1041
- const { node: p, dataKey: g, dataValue: v } = Wn(m);
1037
+ function ht(e, t) {
1038
+ const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, a = (e.title ?? "").trim(), s = (e.description ?? "").trim();
1039
+ i && a && (n.push({ id: _e, component: "Text", text: a, variant: "h2" }), r.push(_e)), i && s && (n.push({ id: Ee, component: "Text", text: s, variant: "body" }), r.push(Ee));
1040
+ for (const d of e.blocks ?? []) {
1041
+ const { node: p, dataKey: g, dataValue: v } = Zn(d);
1042
1042
  p && (n.push(p), r.push(p.id), g && (o[g] = v));
1043
1043
  }
1044
- n.unshift({ id: de, component: "Column", children: r });
1045
- const c = { root: de, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
1044
+ n.unshift({ id: he, component: "Column", children: r });
1045
+ const c = { root: he, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
1046
1046
  return u !== void 0 && (c.surfaceProperties = { styleId: u ?? null }), c;
1047
1047
  }
1048
- function Zn(e) {
1048
+ function er(e) {
1049
1049
  const t = /* @__PURE__ */ new Map();
1050
1050
  for (const n of e.components ?? [])
1051
1051
  n && typeof n.id == "string" && t.set(n.id, n);
1052
1052
  return t;
1053
1053
  }
1054
- function Me(e) {
1054
+ function Pe(e) {
1055
1055
  const t = e.options;
1056
1056
  return Array.isArray(t) ? t.map((n) => {
1057
1057
  if (!n || typeof n != "object") return null;
@@ -1062,21 +1062,21 @@ function Me(e) {
1062
1062
  };
1063
1063
  }).filter((n) => !!n) : [];
1064
1064
  }
1065
- function Qn(e) {
1066
- const t = typeof e.id == "string" ? e.id : re("block-"), n = String(e.component ?? ""), r = E(e.label) ?? E(e.text) ?? "", o = He(e.value), i = (l) => ({ id: t, type: l, label: r }), a = Dn(n);
1065
+ function tr(e) {
1066
+ const t = typeof e.id == "string" ? e.id : ie("block-"), n = String(e.component ?? ""), r = _(e.label) ?? _(e.text) ?? "", o = Ye(e.value), i = (s) => ({ id: t, type: s, label: r }), a = Kn(n);
1067
1067
  if (a)
1068
- return a.fromComponent(e, i, { asLiteral: E, nameFromValue: He });
1068
+ return a.fromComponent(e, i, { asLiteral: _, nameFromValue: Ye });
1069
1069
  switch (n) {
1070
1070
  case "Text": {
1071
- const l = String(e.variant ?? "body"), c = /^h[1-6]$/i.test(l) || l === "title" || l === "subtitle";
1071
+ const s = String(e.variant ?? "body"), c = /^h[1-6]$/i.test(s) || s === "title" || s === "subtitle";
1072
1072
  return { id: t, type: c ? "heading" : "paragraph", label: r };
1073
1073
  }
1074
1074
  case "TextField": {
1075
- const l = String(e.variant ?? "shortText");
1075
+ const s = String(e.variant ?? "shortText");
1076
1076
  let c = "text";
1077
- l === "longText" ? c = "textarea" : l === "number" ? c = "number" : E(e.validationRegexp) === dt && (c = "email");
1078
- const u = { ...i(c), name: o }, m = E(e.placeholder);
1079
- return m && (u.placeholder = m), u;
1077
+ s === "longText" ? c = "textarea" : s === "number" ? c = "number" : _(e.validationRegexp) === ft && (c = "email");
1078
+ const u = { ...i(c), name: o }, d = _(e.placeholder);
1079
+ return d && (u.placeholder = d), u;
1080
1080
  }
1081
1081
  case "CheckBox":
1082
1082
  return { ...i("toggle"), name: o };
@@ -1084,46 +1084,46 @@ function Qn(e) {
1084
1084
  const c = String(e.mode ?? "single") === "multiple" ? "multiselect" : "select", u = {
1085
1085
  ...i(c),
1086
1086
  name: o,
1087
- options: Me(e)
1088
- }, m = E(e.placeholder);
1089
- return m && (u.placeholder = m), u;
1087
+ options: Pe(e)
1088
+ }, d = _(e.placeholder);
1089
+ return d && (u.placeholder = d), u;
1090
1090
  }
1091
1091
  case "ChoicePicker": {
1092
- const l = E(e.skoponPickerType);
1093
- if (l === "select" || l === "multiselect" || l === "radio" || l === "checkbox") {
1094
- const m = {
1095
- ...i(l),
1092
+ const s = _(e.skoponPickerType);
1093
+ if (s === "select" || s === "multiselect" || s === "radio" || s === "checkbox") {
1094
+ const d = {
1095
+ ...i(s),
1096
1096
  name: o,
1097
- options: Me(e)
1098
- }, p = E(e.placeholder);
1099
- return p && (m.placeholder = p), m;
1097
+ options: Pe(e)
1098
+ }, p = _(e.placeholder);
1099
+ return p && (d.placeholder = p), d;
1100
1100
  }
1101
1101
  const u = String(e.variant ?? "mutuallyExclusive") === "multipleSelection" ? "checkbox" : "radio";
1102
- return { ...i(u), name: o, options: Me(e) };
1102
+ return { ...i(u), name: o, options: Pe(e) };
1103
1103
  }
1104
1104
  case "DateTimeInput": {
1105
- const l = e.enableDate === !0, c = e.enableTime === !0, m = { ...i(!l && c ? "time" : "datetime"), name: o }, p = E(e.placeholder);
1106
- return p && (m.placeholder = p), m;
1105
+ const s = e.enableDate === !0, c = e.enableTime === !0, d = { ...i(!s && c ? "time" : "datetime"), name: o }, p = _(e.placeholder);
1106
+ return p && (d.placeholder = p), d;
1107
1107
  }
1108
1108
  case "SkoponMedia": {
1109
- const l = String(e.mediaType ?? "image");
1110
- return se(e, l === "video" ? "video" : l === "audio" ? "audio" : "image", r);
1109
+ const s = String(e.mediaType ?? "image");
1110
+ return ue(e, s === "video" ? "video" : s === "audio" ? "audio" : "image", r);
1111
1111
  }
1112
1112
  case "Image":
1113
- return se(e, "image", r);
1113
+ return ue(e, "image", r);
1114
1114
  case "Video":
1115
- return se(e, "video", r);
1115
+ return ue(e, "video", r);
1116
1116
  case "AudioPlayer":
1117
- return se(e, "audio", r);
1117
+ return ue(e, "audio", r);
1118
1118
  case "FileUpload": {
1119
- const l = E(e.accept) ?? "", c = { ...i("file"), name: o };
1120
- return l && (c.fileAcceptExtensions = l.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (c.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (c.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (c.fileMinCount = e.minCount), typeof e.maxCount == "number" && (c.fileMaxCount = e.maxCount), c;
1119
+ const s = _(e.accept) ?? "", c = { ...i("file"), name: o };
1120
+ return s && (c.fileAcceptExtensions = s.split(",").map((u) => u.trim()).filter(Boolean)), Array.isArray(e.fileAcceptTypes) && (c.fileAcceptTypes = e.fileAcceptTypes.map(String)), typeof e.filePlaceholderIcon == "string" && (c.filePlaceholderIcon = e.filePlaceholderIcon), typeof e.minCount == "number" && (c.fileMinCount = e.minCount), typeof e.maxCount == "number" && (c.fileMaxCount = e.maxCount), c;
1121
1121
  }
1122
1122
  default:
1123
1123
  return null;
1124
1124
  }
1125
1125
  }
1126
- function ht(e, t, n, r) {
1126
+ function gt(e, t, n, r) {
1127
1127
  if (n.has(e)) return;
1128
1128
  n.add(e);
1129
1129
  const o = t.get(e);
@@ -1131,12 +1131,12 @@ function ht(e, t, n, r) {
1131
1131
  const i = String(o.component ?? "");
1132
1132
  if ((i === "Column" || i === "Row") && Array.isArray(o.children)) {
1133
1133
  for (const a of o.children)
1134
- typeof a == "string" && ht(a, t, n, r);
1134
+ typeof a == "string" && gt(a, t, n, r);
1135
1135
  return;
1136
1136
  }
1137
1137
  r.push(o);
1138
1138
  }
1139
- function er(e, t) {
1139
+ function nr(e, t) {
1140
1140
  return t ? e.map((n) => {
1141
1141
  var i;
1142
1142
  const r = (i = n.name) == null ? void 0 : i.trim();
@@ -1145,33 +1145,33 @@ function er(e, t) {
1145
1145
  return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: o === !0 || o === "true" } : { ...n, defaultValue: o };
1146
1146
  }) : e;
1147
1147
  }
1148
- function tr(e) {
1148
+ function rr(e) {
1149
1149
  if (!e || !Array.isArray(e.components))
1150
- return pe({ title: "", description: "", blocks: [], jsonSchema: {} });
1151
- const t = Zn(e), n = [];
1152
- ht(e.root ?? de, t, /* @__PURE__ */ new Set(), n);
1150
+ return me({ title: "", description: "", blocks: [], jsonSchema: {} });
1151
+ const t = er(e), n = [];
1152
+ gt(e.root ?? he, t, /* @__PURE__ */ new Set(), n);
1153
1153
  let r = "", o = "";
1154
1154
  const i = [];
1155
1155
  for (const a of n) {
1156
- if (a.id === Ue) {
1157
- r = E(a.text) ?? r;
1156
+ if (a.id === _e) {
1157
+ r = _(a.text) ?? r;
1158
1158
  continue;
1159
1159
  }
1160
- if (a.id === _e) {
1161
- o = E(a.text) ?? o;
1160
+ if (a.id === Ee) {
1161
+ o = _(a.text) ?? o;
1162
1162
  continue;
1163
1163
  }
1164
- const l = Qn(a);
1165
- l && i.push(l);
1164
+ const s = tr(a);
1165
+ s && i.push(s);
1166
1166
  }
1167
- return pe({
1167
+ return me({
1168
1168
  title: r,
1169
1169
  description: o,
1170
- blocks: er(i, e.dataModel),
1170
+ blocks: nr(i, e.dataModel),
1171
1171
  jsonSchema: {}
1172
1172
  });
1173
1173
  }
1174
- function nr(e, t) {
1174
+ function or(e, t) {
1175
1175
  const { surfaceId: n, catalogId: r } = t, o = [
1176
1176
  { version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
1177
1177
  {
@@ -1184,24 +1184,24 @@ function nr(e, t) {
1184
1184
  updateDataModel: { surfaceId: n, path: "/", value: e.dataModel }
1185
1185
  }), o;
1186
1186
  }
1187
- function gt(e) {
1187
+ function yt(e) {
1188
1188
  return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
1189
1189
  }
1190
- function rr(e, t) {
1190
+ function ir(e, t) {
1191
1191
  if (!e || typeof e != "object") return null;
1192
- const n = e, r = gt(n.a2ui) ? n.a2ui : void 0;
1193
- if (r && !Ee(r)) return r;
1192
+ const n = e, r = yt(n.a2ui) ? n.a2ui : void 0;
1193
+ if (r && !Re(r)) return r;
1194
1194
  const o = Array.isArray(n.blocks) ? n.blocks : [];
1195
1195
  if (o.length === 0) return null;
1196
- const i = W({
1196
+ const i = Z({
1197
1197
  title: typeof n.title == "string" ? n.title : "",
1198
1198
  description: typeof n.description == "string" ? n.description : "",
1199
1199
  blocks: o
1200
- }), a = ft(i, t);
1201
- return Ee(a) ? null : a;
1200
+ }), a = ht(i, t);
1201
+ return Re(a) ? null : a;
1202
1202
  }
1203
- function or(e, t, n) {
1204
- return ft(
1203
+ function ar(e, t, n) {
1204
+ return ht(
1205
1205
  {
1206
1206
  title: e.title,
1207
1207
  description: e.description,
@@ -1210,17 +1210,17 @@ function or(e, t, n) {
1210
1210
  n
1211
1211
  );
1212
1212
  }
1213
- function ir(e) {
1213
+ function lr(e) {
1214
1214
  if (!e || typeof e != "object" || Array.isArray(e))
1215
1215
  return;
1216
1216
  const t = e;
1217
- return !(Array.isArray(t.blocks) && t.blocks.length > 0) && gt(t.a2ui) ? tr(t.a2ui) : W({
1217
+ return !(Array.isArray(t.blocks) && t.blocks.length > 0) && yt(t.a2ui) ? rr(t.a2ui) : Z({
1218
1218
  title: typeof t.title == "string" ? t.title : "",
1219
1219
  description: typeof t.description == "string" ? t.description : "",
1220
1220
  blocks: Array.isArray(t.blocks) ? t.blocks : []
1221
1221
  });
1222
1222
  }
1223
- function ar(e, t, n) {
1223
+ function sr(e, t, n) {
1224
1224
  const r = e.model.surfacesMap.get(t);
1225
1225
  if (!r) return {};
1226
1226
  const o = {};
@@ -1230,68 +1230,68 @@ function ar(e, t, n) {
1230
1230
  }
1231
1231
  return o;
1232
1232
  }
1233
- function lr(e) {
1234
- return W({
1233
+ function cr(e) {
1234
+ return Z({
1235
1235
  title: "",
1236
1236
  description: "",
1237
1237
  blocks: [e]
1238
1238
  }).blocks[0];
1239
1239
  }
1240
- function sr(e, t) {
1240
+ function ur(e, t) {
1241
1241
  var o, i;
1242
1242
  const n = /* @__PURE__ */ new Map();
1243
1243
  for (const a of t) {
1244
- const l = (o = a.name) == null ? void 0 : o.trim();
1245
- l && n.set(l, a);
1244
+ const s = (o = a.name) == null ? void 0 : o.trim();
1245
+ s && n.set(s, a);
1246
1246
  }
1247
1247
  const r = [];
1248
1248
  for (const a of e.blocks) {
1249
- if (Be(a.type)) {
1250
- r.push(lr(a));
1249
+ if (we(a.type)) {
1250
+ r.push(cr(a));
1251
1251
  continue;
1252
1252
  }
1253
- if (!X(a.type)) continue;
1254
- const l = (i = a.name) == null ? void 0 : i.trim();
1255
- if (!l) continue;
1256
- const c = n.get(l);
1253
+ if (!W(a.type)) continue;
1254
+ const s = (i = a.name) == null ? void 0 : i.trim();
1255
+ if (!s) continue;
1256
+ const c = n.get(s);
1257
1257
  c && r.push(c);
1258
1258
  }
1259
1259
  return r;
1260
1260
  }
1261
- function cr(e, t) {
1261
+ function pr(e, t) {
1262
1262
  var r;
1263
1263
  const n = {
1264
1264
  ...e,
1265
1265
  name: ((r = e.name) == null ? void 0 : r.trim()) || t.name
1266
1266
  };
1267
- return t.defaultValue !== void 0 && (n.defaultValue = t.defaultValue), W({
1267
+ return t.defaultValue !== void 0 && (n.defaultValue = t.defaultValue), Z({
1268
1268
  title: "",
1269
1269
  description: "",
1270
1270
  blocks: [n]
1271
1271
  }).blocks[0];
1272
1272
  }
1273
- function yt(e) {
1273
+ function vt(e) {
1274
1274
  if (!e || typeof e != "object" || Array.isArray(e)) return null;
1275
1275
  const t = e;
1276
- return Array.isArray(t.blocks) ? W({
1276
+ return Array.isArray(t.blocks) ? Z({
1277
1277
  title: typeof t.title == "string" ? t.title : "",
1278
1278
  description: typeof t.description == "string" ? t.description : "",
1279
1279
  blocks: t.blocks
1280
1280
  }) : null;
1281
1281
  }
1282
- function ur(e, t) {
1283
- var i, a, l, c, u, m;
1282
+ function dr(e, t) {
1283
+ var i, a, s, c, u, d;
1284
1284
  const n = /* @__PURE__ */ new Map();
1285
1285
  for (const p of (t == null ? void 0 : t.blocks) ?? [])
1286
- X(p.type) && ((i = p.name) != null && i.trim()) && n.set(p.name.trim(), p);
1286
+ W(p.type) && ((i = p.name) != null && i.trim()) && n.set(p.name.trim(), p);
1287
1287
  const r = [], o = [];
1288
1288
  for (const p of e.blocks) {
1289
- if (!X(p.type)) continue;
1289
+ if (!W(p.type)) continue;
1290
1290
  const g = (a = p.name) == null ? void 0 : a.trim();
1291
1291
  if (!g) continue;
1292
1292
  const v = n.get(g);
1293
- v ? r.push(cr(v, p)) : o.push(
1294
- W({
1293
+ v ? r.push(pr(v, p)) : o.push(
1294
+ Z({
1295
1295
  title: "",
1296
1296
  description: "",
1297
1297
  blocks: [p]
@@ -1301,80 +1301,80 @@ function ur(e, t) {
1301
1301
  return {
1302
1302
  matchedBlocks: r,
1303
1303
  extraBlocks: o,
1304
- renderBlocks: sr(e, r),
1305
- title: ((l = e.title) == null ? void 0 : l.trim()) || ((c = t == null ? void 0 : t.title) == null ? void 0 : c.trim()) || "",
1306
- description: ((u = e.description) == null ? void 0 : u.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1304
+ renderBlocks: ur(e, r),
1305
+ title: ((s = e.title) == null ? void 0 : s.trim()) || ((c = t == null ? void 0 : t.title) == null ? void 0 : c.trim()) || "",
1306
+ description: ((u = e.description) == null ? void 0 : u.trim()) || ((d = t == null ? void 0 : t.description) == null ? void 0 : d.trim()) || ""
1307
1307
  };
1308
1308
  }
1309
- function pr(e) {
1309
+ function mr(e) {
1310
1310
  const { type: t, defaultValue: n } = e;
1311
1311
  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 : "";
1312
1312
  }
1313
- function vt(e) {
1313
+ function bt(e) {
1314
1314
  var n;
1315
1315
  const t = {};
1316
1316
  for (const r of e) {
1317
- if (!X(r.type)) continue;
1317
+ if (!W(r.type)) continue;
1318
1318
  const o = (n = r.name) == null ? void 0 : n.trim();
1319
- o && (t[o] = pr(r));
1319
+ o && (t[o] = mr(r));
1320
1320
  }
1321
1321
  return t;
1322
1322
  }
1323
- function mr(e) {
1323
+ function fr(e) {
1324
1324
  return e.blocks.some(
1325
1325
  (t) => {
1326
1326
  var n;
1327
- return X(t.type) && !!((n = t.name) != null && n.trim());
1327
+ return W(t.type) && !!((n = t.name) != null && n.trim());
1328
1328
  }
1329
1329
  );
1330
1330
  }
1331
- function dr(e) {
1331
+ function hr(e) {
1332
1332
  return e.blocks.filter((t) => {
1333
1333
  var n;
1334
- return Be(t.type) ? !0 : X(t.type) && !!((n = t.name) != null && n.trim());
1334
+ return we(t.type) ? !0 : W(t.type) && !!((n = t.name) != null && n.trim());
1335
1335
  });
1336
1336
  }
1337
- function fr(e) {
1337
+ function gr(e) {
1338
1338
  return e.blocks.filter((t) => {
1339
1339
  var n;
1340
- return X(t.type) && ((n = t.name) == null ? void 0 : n.trim());
1340
+ return W(t.type) && ((n = t.name) == null ? void 0 : n.trim());
1341
1341
  }).map((t) => t.name.trim());
1342
1342
  }
1343
- function bt(e) {
1343
+ function St(e) {
1344
1344
  return e.replace(/'/g, "'\\''");
1345
1345
  }
1346
- function St(e, t) {
1346
+ function xt(e, t) {
1347
1347
  const n = (t ?? "").trim() || "<callback_url>", r = JSON.stringify(e ?? {}, null, 2);
1348
1348
  return [
1349
1349
  `curl -X POST '${n}' \\`,
1350
1350
  " -H 'Content-Type: application/json' \\",
1351
- ` -d '${bt(r)}'`
1351
+ ` -d '${St(r)}'`
1352
1352
  ].join(`
1353
1353
  `);
1354
1354
  }
1355
- function hr(e, t) {
1355
+ function yr(e, t) {
1356
1356
  return JSON.stringify({ ...e, ...t }, null, 2);
1357
1357
  }
1358
- function xt({
1358
+ function Ct({
1359
1359
  cardValues: e,
1360
1360
  extraValues: t = {},
1361
1361
  callbackUrl: n
1362
1362
  }) {
1363
- const r = (n ?? "").trim() || "<callback_url>", o = hr(e, t);
1363
+ const r = (n ?? "").trim() || "<callback_url>", o = yr(e, t);
1364
1364
  return [
1365
1365
  `curl -X POST '${r}' \\`,
1366
1366
  " -H 'Content-Type: application/json' \\",
1367
- ` -d '${bt(o)}'`
1367
+ ` -d '${St(o)}'`
1368
1368
  ].join(`
1369
1369
  `);
1370
1370
  }
1371
- function gr(e, t) {
1372
- const n = yt(e);
1373
- if (!n) return St(e, t);
1374
- const r = vt(n.blocks);
1375
- return xt({ cardValues: r, callbackUrl: t });
1371
+ function vr(e, t) {
1372
+ const n = vt(e);
1373
+ if (!n) return xt(e, t);
1374
+ const r = bt(n.blocks);
1375
+ return Ct({ cardValues: r, callbackUrl: t });
1376
1376
  }
1377
- async function yr(e, t, n) {
1377
+ async function br(e, t, n) {
1378
1378
  const r = e.trim();
1379
1379
  if (!r)
1380
1380
  throw new Error("callback_url 为空");
@@ -1401,7 +1401,7 @@ async function yr(e, t, n) {
1401
1401
  }
1402
1402
  return { ok: i.ok, status: i.status, body: a };
1403
1403
  }
1404
- async function Ct(e) {
1404
+ async function kt(e) {
1405
1405
  var n;
1406
1406
  if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
1407
1407
  await navigator.clipboard.writeText(e);
@@ -1417,7 +1417,7 @@ async function Ct(e) {
1417
1417
  document.body.removeChild(t);
1418
1418
  }
1419
1419
  }
1420
- async function vr(e) {
1420
+ async function Sr(e) {
1421
1421
  let t;
1422
1422
  try {
1423
1423
  t = await e.json();
@@ -1430,7 +1430,7 @@ async function vr(e) {
1430
1430
  throw new Error(t.message || `响应缺少 data (${e.status})`);
1431
1431
  return t.data;
1432
1432
  }
1433
- function io(e = {}) {
1433
+ function so(e = {}) {
1434
1434
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
1435
1435
  async function o(i) {
1436
1436
  var p;
@@ -1441,35 +1441,35 @@ function io(e = {}) {
1441
1441
  a.set("form_unique_id", i.formUniqueId);
1442
1442
  else
1443
1443
  throw new Error("form_id 或 form_unique_id 至少传一个");
1444
- const l = await ((p = e.getHeaders) == null ? void 0 : p.call(e)) ?? {}, c = await r(`${t}${n}?${a.toString()}`, {
1444
+ const s = await ((p = e.getHeaders) == null ? void 0 : p.call(e)) ?? {}, c = await r(`${t}${n}?${a.toString()}`, {
1445
1445
  method: "GET",
1446
- headers: l
1447
- }), u = await vr(c), m = ir(u.form_definition);
1446
+ headers: s
1447
+ }), u = await Sr(c), d = lr(u.form_definition);
1448
1448
  return {
1449
1449
  formUniqueId: u.form_unique_id,
1450
1450
  formId: u.form_id,
1451
1451
  disabled: u.disabled === 1,
1452
- formDefinition: m,
1453
- a2ui: rr(u.form_definition) ?? void 0
1452
+ formDefinition: d,
1453
+ a2ui: ir(u.form_definition) ?? void 0
1454
1454
  };
1455
1455
  }
1456
1456
  return { fetchDetail: o };
1457
1457
  }
1458
- const br = {
1459
- video: jt,
1460
- audio: qt,
1461
- image: wt,
1462
- file: We,
1463
- spreadsheet: Vt,
1464
- document: Ge
1458
+ const xr = {
1459
+ video: $t,
1460
+ audio: jt,
1461
+ image: Lt,
1462
+ file: Qe,
1463
+ spreadsheet: qt,
1464
+ document: We
1465
1465
  };
1466
- function Sr({
1466
+ function Cr({
1467
1467
  type: e,
1468
1468
  size: t = 40,
1469
1469
  className: n
1470
1470
  }) {
1471
- const r = br[e] ?? We;
1472
- return /* @__PURE__ */ s(
1471
+ const r = xr[e] ?? Qe;
1472
+ return /* @__PURE__ */ l(
1473
1473
  r,
1474
1474
  {
1475
1475
  className: n ?? "skopon-form-file-placeholder-icon",
@@ -1478,7 +1478,7 @@ function Sr({
1478
1478
  }
1479
1479
  );
1480
1480
  }
1481
- const kt = "skopon-form-v0_9", xr = /* @__PURE__ */ new Set([
1481
+ const At = "skopon-form-v0_9", kr = /* @__PURE__ */ new Set([
1482
1482
  "SkoponMedia",
1483
1483
  "SkoponSelect",
1484
1484
  "Image",
@@ -1491,23 +1491,23 @@ const kt = "skopon-form-v0_9", xr = /* @__PURE__ */ new Set([
1491
1491
  "TextField",
1492
1492
  "Text",
1493
1493
  ...Jn()
1494
- ]), Cr = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
1495
- function ae(e) {
1496
- const t = [...ue.components.values()].find((n) => n.name === e);
1494
+ ]), Ar = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
1495
+ function se(e) {
1496
+ const t = [...de.components.values()].find((n) => n.name === e);
1497
1497
  if (!t) throw new Error(`Missing basic catalog component: ${e}`);
1498
1498
  return t.schema;
1499
1499
  }
1500
1500
  function A(e) {
1501
1501
  return typeof e == "string" ? e : "";
1502
1502
  }
1503
- function At(e) {
1503
+ function Tt(e) {
1504
1504
  return Array.isArray(e) ? e.map((t) => {
1505
1505
  if (!t || typeof t != "object") return null;
1506
1506
  const n = t, r = String(n.value ?? n.label ?? ""), o = String(n.label ?? n.value ?? "");
1507
1507
  return { value: r, label: o };
1508
1508
  }).filter((t) => !!t) : [];
1509
1509
  }
1510
- function ge({
1510
+ function ve({
1511
1511
  mediaType: e,
1512
1512
  urls: t,
1513
1513
  mediaSize: n,
@@ -1515,86 +1515,86 @@ function ge({
1515
1515
  help: o,
1516
1516
  placeholder: i
1517
1517
  }) {
1518
- const a = r == null ? void 0 : r.trim(), l = o == null ? void 0 : o.trim(), c = pn(n), u = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
1518
+ const a = r == null ? void 0 : r.trim(), s = o == null ? void 0 : o.trim(), c = mn(n), u = (i == null ? void 0 : i.trim()) || (e === "image" ? "未设置图片 URL" : e === "video" ? "未设置视频 URL" : "未设置音频 URL");
1519
1519
  return /* @__PURE__ */ C("div", { className: "form-block-preview", children: [
1520
- a ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: a }) : null,
1521
- t.length === 0 ? /* @__PURE__ */ s("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ s("div", { className: c, children: t.map((m, p) => e === "image" ? /* @__PURE__ */ s(
1520
+ a ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: a }) : null,
1521
+ t.length === 0 ? /* @__PURE__ */ l("div", { className: "form-media-preview form-media-preview--empty", children: u }) : /* @__PURE__ */ l("div", { className: c, children: t.map((d, p) => e === "image" ? /* @__PURE__ */ l(
1522
1522
  "img",
1523
1523
  {
1524
- src: m,
1524
+ src: d,
1525
1525
  alt: a || "图片",
1526
1526
  className: "form-media-item"
1527
1527
  },
1528
1528
  `media-${p}`
1529
- ) : e === "video" ? /* @__PURE__ */ s(
1529
+ ) : e === "video" ? /* @__PURE__ */ l(
1530
1530
  "video",
1531
1531
  {
1532
- src: m,
1532
+ src: d,
1533
1533
  controls: !0,
1534
1534
  className: "form-media-item"
1535
1535
  },
1536
1536
  `media-${p}`
1537
- ) : /* @__PURE__ */ s(
1537
+ ) : /* @__PURE__ */ l(
1538
1538
  "audio",
1539
1539
  {
1540
- src: m,
1540
+ src: d,
1541
1541
  controls: !0,
1542
1542
  className: "form-media-item form-media-item--audio"
1543
1543
  },
1544
1544
  `media-${p}`
1545
1545
  )) }),
1546
- l ? /* @__PURE__ */ s(D.Text, { type: "secondary", className: "form-block-preview-help", children: l }) : null
1546
+ s ? /* @__PURE__ */ l(H.Text, { type: "secondary", className: "form-block-preview-help", children: s }) : null
1547
1547
  ] });
1548
1548
  }
1549
- function ye(e, t) {
1549
+ function be(e, t) {
1550
1550
  const n = Array.isArray(e.urls) ? e.urls.map((r) => String(r).trim()).filter(Boolean) : A(e.url).trim() ? [A(e.url).trim()] : [];
1551
1551
  return {
1552
1552
  mediaType: t,
1553
1553
  urls: n,
1554
- mediaSize: ie(e.mediaSize),
1554
+ mediaSize: le(e.mediaSize),
1555
1555
  label: A(e.label) || A(e.description),
1556
1556
  help: A(e.help),
1557
1557
  placeholder: A(e.placeholder)
1558
1558
  };
1559
1559
  }
1560
- const kr = {
1560
+ const Tr = {
1561
1561
  name: "SkoponMedia",
1562
- schema: d.object({
1563
- mediaType: d.any().optional(),
1564
- urls: d.any().optional(),
1565
- mediaSize: d.any().optional(),
1566
- label: d.any().optional(),
1567
- help: d.any().optional(),
1568
- placeholder: d.any().optional()
1562
+ schema: m.object({
1563
+ mediaType: m.any().optional(),
1564
+ urls: m.any().optional(),
1565
+ mediaSize: m.any().optional(),
1566
+ label: m.any().optional(),
1567
+ help: m.any().optional(),
1568
+ placeholder: m.any().optional()
1569
1569
  }).passthrough()
1570
- }, Ar = V(kr, ({ context: e }) => {
1570
+ }, Nr = V(Tr, ({ context: e }) => {
1571
1571
  const t = e.componentModel.properties, n = A(t.mediaType);
1572
- return /* @__PURE__ */ s(ge, { ...ye(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
1573
- }), Tr = V(
1574
- { name: "Image", schema: ae("Image") },
1575
- ({ context: e }) => /* @__PURE__ */ s(ge, { ...ye(e.componentModel.properties, "image") })
1576
- ), Nr = V(
1577
- { name: "Video", schema: ae("Video") },
1578
- ({ context: e }) => /* @__PURE__ */ s(ge, { ...ye(e.componentModel.properties, "video") })
1572
+ return /* @__PURE__ */ l(ve, { ...be(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
1573
+ }), Mr = V(
1574
+ { name: "Image", schema: se("Image") },
1575
+ ({ context: e }) => /* @__PURE__ */ l(ve, { ...be(e.componentModel.properties, "image") })
1579
1576
  ), Ir = V(
1580
- { name: "AudioPlayer", schema: ae("AudioPlayer") },
1581
- ({ context: e }) => /* @__PURE__ */ s(ge, { ...ye(e.componentModel.properties, "audio") })
1582
- ), Mr = {
1577
+ { name: "Video", schema: se("Video") },
1578
+ ({ context: e }) => /* @__PURE__ */ l(ve, { ...be(e.componentModel.properties, "video") })
1579
+ ), Fr = V(
1580
+ { name: "AudioPlayer", schema: se("AudioPlayer") },
1581
+ ({ context: e }) => /* @__PURE__ */ l(ve, { ...be(e.componentModel.properties, "audio") })
1582
+ ), Pr = {
1583
1583
  name: "SkoponSelect",
1584
- schema: d.object({
1585
- label: d.any().optional(),
1586
- mode: d.any().optional(),
1587
- placeholder: d.any().optional(),
1588
- options: d.any().optional(),
1589
- value: d.any().optional()
1584
+ schema: m.object({
1585
+ label: m.any().optional(),
1586
+ mode: m.any().optional(),
1587
+ placeholder: m.any().optional(),
1588
+ options: m.any().optional(),
1589
+ value: m.any().optional()
1590
1590
  }).passthrough()
1591
1591
  };
1592
- function Fr({ context: e }) {
1593
- const { interactive: t } = K(), { value: n, setValue: r } = J(e), o = e.componentModel.properties, i = A(o.label), a = A(o.placeholder), l = At(o.options), c = A(o.mode) === "multiple";
1592
+ function zr({ context: e }) {
1593
+ const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = A(o.label), a = A(o.placeholder), s = Tt(o.options), c = A(o.mode) === "multiple";
1594
1594
  return /* @__PURE__ */ C("div", { className: "form-block-preview", children: [
1595
- i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
1596
- /* @__PURE__ */ s(
1597
- Fe,
1595
+ i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
1596
+ /* @__PURE__ */ l(
1597
+ ze,
1598
1598
  {
1599
1599
  mode: c ? "multiple" : void 0,
1600
1600
  disabled: !t,
@@ -1602,23 +1602,23 @@ function Fr({ context: e }) {
1602
1602
  className: "form-block-preview-control",
1603
1603
  style: { width: "100%" },
1604
1604
  placeholder: a || (c ? "请选择多项" : "请选择"),
1605
- options: l,
1606
- value: c ? L(n) : ne(n),
1605
+ options: s,
1606
+ value: c ? D(n) : oe(n),
1607
1607
  onChange: (u) => r(c ? u ?? [] : u ?? "")
1608
1608
  }
1609
1609
  )
1610
1610
  ] });
1611
1611
  }
1612
- const Pr = V(
1613
- Mr,
1614
- Fr
1612
+ const Ur = V(
1613
+ Pr,
1614
+ zr
1615
1615
  );
1616
- function Ur({ context: e }) {
1617
- const { interactive: t } = K(), { value: n, setValue: r } = J(e), o = e.componentModel.properties, i = A(o.label), a = A(o.variant) || "mutuallyExclusive", l = A(o.skoponPickerType), c = A(o.placeholder), u = At(o.options), p = l === "select" || l === "multiselect" || l === "radio" || l === "checkbox" ? l : a === "multipleSelection" ? "checkbox" : "radio";
1616
+ function _r({ context: e }) {
1617
+ const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = A(o.label), a = A(o.variant) || "mutuallyExclusive", s = A(o.skoponPickerType), c = A(o.placeholder), u = Tt(o.options), p = s === "select" || s === "multiselect" || s === "radio" || s === "checkbox" ? s : a === "multipleSelection" ? "checkbox" : "radio";
1618
1618
  return /* @__PURE__ */ C("div", { className: "form-block-preview", children: [
1619
- i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
1620
- p === "select" ? /* @__PURE__ */ s(
1621
- Fe,
1619
+ i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
1620
+ p === "select" ? /* @__PURE__ */ l(
1621
+ ze,
1622
1622
  {
1623
1623
  disabled: !t,
1624
1624
  allowClear: !0,
@@ -1626,11 +1626,11 @@ function Ur({ context: e }) {
1626
1626
  style: { width: "100%" },
1627
1627
  placeholder: c || "请选择",
1628
1628
  options: u,
1629
- value: ne(n),
1629
+ value: oe(n),
1630
1630
  onChange: (g) => r(g ?? "")
1631
1631
  }
1632
- ) : p === "multiselect" ? /* @__PURE__ */ s(
1633
- Fe,
1632
+ ) : p === "multiselect" ? /* @__PURE__ */ l(
1633
+ ze,
1634
1634
  {
1635
1635
  mode: "multiple",
1636
1636
  disabled: !t,
@@ -1639,92 +1639,92 @@ function Ur({ context: e }) {
1639
1639
  style: { width: "100%" },
1640
1640
  placeholder: c || "请选择多项",
1641
1641
  options: u,
1642
- value: L(n),
1642
+ value: D(n),
1643
1643
  onChange: (g) => r(g ?? [])
1644
1644
  }
1645
- ) : p === "checkbox" ? /* @__PURE__ */ s(
1646
- Pt.Group,
1645
+ ) : p === "checkbox" ? /* @__PURE__ */ l(
1646
+ zt.Group,
1647
1647
  {
1648
1648
  disabled: !t,
1649
1649
  className: "form-block-preview-control",
1650
1650
  options: u,
1651
- value: L(n),
1651
+ value: D(n),
1652
1652
  onChange: (g) => r(g)
1653
1653
  }
1654
- ) : /* @__PURE__ */ s(
1654
+ ) : /* @__PURE__ */ l(
1655
1655
  Ut.Group,
1656
1656
  {
1657
1657
  disabled: !t,
1658
1658
  className: "form-block-preview-control",
1659
1659
  options: u,
1660
- value: ne(n),
1660
+ value: oe(n),
1661
1661
  onChange: (g) => r(g.target.value)
1662
1662
  }
1663
1663
  )
1664
1664
  ] });
1665
1665
  }
1666
- const _r = V(
1666
+ const Er = V(
1667
1667
  {
1668
1668
  name: "ChoicePicker",
1669
- schema: d.object({
1670
- label: d.any().optional(),
1671
- variant: d.any().optional(),
1672
- options: d.any().optional(),
1673
- value: d.any().optional(),
1674
- skoponPickerType: d.any().optional(),
1675
- placeholder: d.any().optional()
1669
+ schema: m.object({
1670
+ label: m.any().optional(),
1671
+ variant: m.any().optional(),
1672
+ options: m.any().optional(),
1673
+ value: m.any().optional(),
1674
+ skoponPickerType: m.any().optional(),
1675
+ placeholder: m.any().optional()
1676
1676
  }).passthrough()
1677
1677
  },
1678
- Ur
1678
+ _r
1679
1679
  );
1680
- function Er({ context: e }) {
1681
- const { interactive: t } = K(), { value: n, setValue: r } = J(e), o = e.componentModel.properties, i = A(o.label);
1680
+ function Rr({ context: e }) {
1681
+ const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = A(o.label);
1682
1682
  return /* @__PURE__ */ C("div", { className: "form-block-preview", children: [
1683
- i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
1684
- /* @__PURE__ */ s(
1683
+ i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
1684
+ /* @__PURE__ */ l(
1685
1685
  _t,
1686
1686
  {
1687
1687
  disabled: !t,
1688
1688
  className: "form-block-preview-control",
1689
- checked: qe(n),
1689
+ checked: je(n),
1690
1690
  onChange: (a) => r(a)
1691
1691
  }
1692
1692
  )
1693
1693
  ] });
1694
1694
  }
1695
- const zr = V(
1696
- { name: "CheckBox", schema: ae("CheckBox") },
1697
- Er
1695
+ const Br = V(
1696
+ { name: "CheckBox", schema: se("CheckBox") },
1697
+ Rr
1698
1698
  );
1699
- function Rr(e, t, n) {
1700
- const r = ne(e);
1699
+ function Or(e, t, n) {
1700
+ const r = oe(e);
1701
1701
  if (!r) return;
1702
1702
  if (!t && n) {
1703
- const i = $e(r, "HH:mm", !0);
1703
+ const i = De(r, "HH:mm", !0);
1704
1704
  return i.isValid() ? i : void 0;
1705
1705
  }
1706
- const o = $e(r);
1706
+ const o = De(r);
1707
1707
  return o.isValid() ? o : void 0;
1708
1708
  }
1709
- function Or({ context: e }) {
1710
- const { interactive: t } = K(), { value: n, setValue: r } = J(e), o = e.componentModel.properties, i = A(o.label), a = A(o.placeholder), l = o.enableDate === !0, c = o.enableTime === !0, u = Rr(n, l, c), m = (p) => {
1709
+ function Vr({ context: e }) {
1710
+ const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = A(o.label), a = A(o.placeholder), s = o.enableDate === !0, c = o.enableTime === !0, u = Or(n, s, c), d = (p) => {
1711
1711
  if (!p) {
1712
1712
  r("");
1713
1713
  return;
1714
1714
  }
1715
- if (!l && c) {
1715
+ if (!s && c) {
1716
1716
  r(p.format("HH:mm"));
1717
1717
  return;
1718
1718
  }
1719
- if (l && c) {
1719
+ if (s && c) {
1720
1720
  r(p.format("YYYY-MM-DDTHH:mm"));
1721
1721
  return;
1722
1722
  }
1723
1723
  r(p.format("YYYY-MM-DD"));
1724
1724
  };
1725
1725
  return /* @__PURE__ */ C("div", { className: "form-block-preview", children: [
1726
- i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
1727
- !l && c ? /* @__PURE__ */ s(
1726
+ i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
1727
+ !s && c ? /* @__PURE__ */ l(
1728
1728
  Et,
1729
1729
  {
1730
1730
  disabled: !t,
@@ -1732,191 +1732,295 @@ function Or({ context: e }) {
1732
1732
  style: { width: "100%" },
1733
1733
  placeholder: a || "选择时间",
1734
1734
  value: u,
1735
- onChange: m
1735
+ onChange: d
1736
1736
  }
1737
- ) : /* @__PURE__ */ s(
1738
- zt,
1737
+ ) : /* @__PURE__ */ l(
1738
+ Rt,
1739
1739
  {
1740
- showTime: l && c,
1740
+ showTime: s && c,
1741
1741
  disabled: !t,
1742
1742
  className: "form-block-preview-control",
1743
1743
  style: { width: "100%" },
1744
- placeholder: a || (l && c ? "选择日期时间" : "选择日期"),
1744
+ placeholder: a || (s && c ? "选择日期时间" : "选择日期"),
1745
1745
  value: u,
1746
- onChange: m
1746
+ onChange: d
1747
1747
  }
1748
1748
  )
1749
1749
  ] });
1750
1750
  }
1751
- const Br = V(
1751
+ const wr = V(
1752
1752
  {
1753
1753
  name: "DateTimeInput",
1754
- schema: d.object({
1755
- label: d.any().optional(),
1756
- enableDate: d.any().optional(),
1757
- enableTime: d.any().optional(),
1758
- placeholder: d.any().optional(),
1759
- value: d.any().optional(),
1760
- min: d.any().optional(),
1761
- max: d.any().optional()
1754
+ schema: m.object({
1755
+ label: m.any().optional(),
1756
+ enableDate: m.any().optional(),
1757
+ enableTime: m.any().optional(),
1758
+ placeholder: m.any().optional(),
1759
+ value: m.any().optional(),
1760
+ min: m.any().optional(),
1761
+ max: m.any().optional()
1762
1762
  }).passthrough()
1763
1763
  },
1764
- Or
1765
- ), Vr = {
1764
+ Vr
1765
+ ), qr = {
1766
1766
  name: "FileUpload",
1767
- schema: d.object({
1768
- label: d.any().optional(),
1769
- accept: d.any().optional(),
1770
- fileAcceptTypes: d.any().optional(),
1771
- filePlaceholderIcon: d.any().optional(),
1772
- minCount: d.any().optional(),
1773
- maxCount: d.any().optional(),
1774
- value: d.any().optional()
1767
+ schema: m.object({
1768
+ label: m.any().optional(),
1769
+ accept: m.any().optional(),
1770
+ fileAcceptTypes: m.any().optional(),
1771
+ filePlaceholderIcon: m.any().optional(),
1772
+ minCount: m.any().optional(),
1773
+ maxCount: m.any().optional(),
1774
+ value: m.any().optional()
1775
1775
  }).passthrough()
1776
1776
  };
1777
- function wr({ context: e }) {
1778
- const { interactive: t } = K(), { value: n, setValue: r } = J(e), o = e.componentModel.properties, i = A(o.label), a = A(o.accept), l = Array.isArray(o.fileAcceptTypes) ? o.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((f) => f.trim()).filter(Boolean) : void 0, u = rn(l, c), m = typeof o.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
1777
+ function Lr({ context: e }) {
1778
+ const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = A(o.label), a = A(o.accept), s = Array.isArray(o.fileAcceptTypes) ? o.fileAcceptTypes.map(String) : void 0, c = a ? a.split(",").map((f) => f.trim()).filter(Boolean) : void 0, u = an(s, c), d = typeof o.filePlaceholderIcon == "string" && ["video", "audio", "image", "file", "spreadsheet", "document"].includes(
1779
1779
  o.filePlaceholderIcon
1780
- ) ? o.filePlaceholderIcon : "document", p = typeof o.minCount == "number" ? Math.max(0, o.minCount) : 0, g = typeof o.maxCount == "number" ? o.maxCount : 1, v = g > 0, I = L(n), T = v && I.length >= g, k = I.length < p;
1780
+ ) ? o.filePlaceholderIcon : "document", p = typeof o.minCount == "number" ? Math.max(0, o.minCount) : 0, g = typeof o.maxCount == "number" ? o.maxCount : 1, v = g > 0, M = D(n), T = v && M.length >= g, k = M.length < p;
1781
1781
  return /* @__PURE__ */ C("div", { className: "form-block-preview", children: [
1782
- i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
1782
+ i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
1783
1783
  /* @__PURE__ */ C(
1784
- Se.Dragger,
1784
+ Ce.Dragger,
1785
1785
  {
1786
1786
  disabled: !t || T,
1787
- accept: nn(l, c),
1787
+ accept: on(s, c),
1788
1788
  className: "form-file-upload-preview",
1789
- showUploadList: t && I.length > 0,
1790
- fileList: t ? I.map((f, h) => ({
1789
+ showUploadList: t && M.length > 0,
1790
+ fileList: t ? M.map((f, h) => ({
1791
1791
  uid: `${h}-${f}`,
1792
1792
  name: f,
1793
1793
  status: "done"
1794
1794
  })) : [],
1795
1795
  beforeUpload: (f) => {
1796
- if (!t) return Se.LIST_IGNORE;
1797
- const h = L(Ke(e));
1798
- if (v && h.length >= g) return Se.LIST_IGNORE;
1796
+ if (!t) return Ce.LIST_IGNORE;
1797
+ const h = D(Ge(e));
1798
+ if (v && h.length >= g) return Ce.LIST_IGNORE;
1799
1799
  const x = v ? [...h, f.name].slice(0, g) : [...h, f.name];
1800
1800
  return r(x), !1;
1801
1801
  },
1802
1802
  onRemove: (f) => {
1803
- const h = L(Ke(e)), x = /^(\d+)-/.exec(f.uid ?? ""), y = x ? Number(x[1]) : -1, S = y >= 0 && y < h.length ? h.filter((M, z) => z !== y) : h.filter((M) => M !== f.name);
1803
+ const h = D(Ge(e)), x = /^(\d+)-/.exec(f.uid ?? ""), y = x ? Number(x[1]) : -1, S = y >= 0 && y < h.length ? h.filter((I, E) => E !== y) : h.filter((I) => I !== f.name);
1804
1804
  if (S.length < p) return !1;
1805
1805
  r(S);
1806
1806
  },
1807
1807
  children: [
1808
- /* @__PURE__ */ s("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ s(Sr, { type: m, size: 40 }) }),
1809
- /* @__PURE__ */ s("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
1808
+ /* @__PURE__ */ l("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ l(Cr, { type: d, size: 40 }) }),
1809
+ /* @__PURE__ */ l("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
1810
1810
  ]
1811
1811
  }
1812
1812
  ),
1813
- /* @__PURE__ */ C(D.Text, { type: "secondary", className: "form-block-preview-help", children: [
1813
+ /* @__PURE__ */ C(H.Text, { type: "secondary", className: "form-block-preview-help", children: [
1814
1814
  "允许:",
1815
1815
  u ?? "全部类型",
1816
1816
  p > 0 ? `;至少 ${p} 个文件` : "",
1817
1817
  v ? `;最多 ${g} 个文件` : "",
1818
- k && t ? `(当前 ${I.length} 个,未达下限)` : ""
1818
+ k && t ? `(当前 ${M.length} 个,未达下限)` : ""
1819
1819
  ] })
1820
1820
  ] });
1821
1821
  }
1822
- const qr = V(
1823
- Vr,
1824
- wr
1822
+ const jr = V(
1823
+ qr,
1824
+ Lr
1825
1825
  );
1826
- function jr({ context: e }) {
1827
- const { interactive: t } = K(), { value: n, setValue: r } = J(e), o = e.componentModel.properties, i = A(o.label), a = A(o.placeholder), l = A(o.variant) || "shortText", c = ne(n) ?? "", u = !t, m = "form-block-preview-control";
1826
+ function $r({ context: e }) {
1827
+ const { interactive: t } = K(), { value: n, setValue: r } = G(e), o = e.componentModel.properties, i = A(o.label), a = A(o.placeholder), s = A(o.variant) || "shortText", c = oe(n) ?? "", u = !t, d = "form-block-preview-control";
1828
1828
  let p;
1829
- if (l === "longText")
1830
- p = /* @__PURE__ */ s(
1831
- xe.TextArea,
1829
+ if (s === "longText")
1830
+ p = /* @__PURE__ */ l(
1831
+ ke.TextArea,
1832
1832
  {
1833
1833
  disabled: u,
1834
- className: m,
1834
+ className: d,
1835
1835
  placeholder: a || "长文本回答...",
1836
1836
  autoSize: { minRows: 2, maxRows: 6 },
1837
1837
  value: c,
1838
1838
  onChange: (g) => r(g.target.value)
1839
1839
  }
1840
1840
  );
1841
- else if (l === "number") {
1841
+ else if (s === "number") {
1842
1842
  const g = c && Number.isFinite(Number(c)) ? Number(c) : void 0;
1843
- p = /* @__PURE__ */ s(
1844
- Rt,
1843
+ p = /* @__PURE__ */ l(
1844
+ Bt,
1845
1845
  {
1846
1846
  disabled: u,
1847
- className: m,
1847
+ className: d,
1848
1848
  style: { width: "100%" },
1849
1849
  placeholder: a || "数字",
1850
1850
  value: g,
1851
1851
  onChange: (v) => r(v == null ? "" : String(v))
1852
1852
  }
1853
1853
  );
1854
- } else l === "obscured" ? p = /* @__PURE__ */ s(
1855
- xe.Password,
1854
+ } else s === "obscured" ? p = /* @__PURE__ */ l(
1855
+ ke.Password,
1856
1856
  {
1857
1857
  disabled: u,
1858
- className: m,
1858
+ className: d,
1859
1859
  placeholder: a,
1860
1860
  value: c,
1861
1861
  onChange: (g) => r(g.target.value)
1862
1862
  }
1863
- ) : p = /* @__PURE__ */ s(
1864
- xe,
1863
+ ) : p = /* @__PURE__ */ l(
1864
+ ke,
1865
1865
  {
1866
1866
  disabled: u,
1867
- className: m,
1867
+ className: d,
1868
1868
  placeholder: a,
1869
1869
  value: c,
1870
1870
  onChange: (g) => r(g.target.value)
1871
1871
  }
1872
1872
  );
1873
1873
  return /* @__PURE__ */ C("div", { className: "form-block-preview", children: [
1874
- i ? /* @__PURE__ */ s("div", { className: "form-block-preview-label", children: i }) : null,
1874
+ i ? /* @__PURE__ */ l("div", { className: "form-block-preview-label", children: i }) : null,
1875
1875
  p
1876
1876
  ] });
1877
1877
  }
1878
- const $r = V(
1878
+ const Dr = V(
1879
1879
  {
1880
1880
  name: "TextField",
1881
- schema: d.object({
1882
- label: d.any().optional(),
1883
- variant: d.any().optional(),
1884
- placeholder: d.any().optional(),
1885
- validationRegexp: d.any().optional(),
1886
- value: d.any().optional()
1881
+ schema: m.object({
1882
+ label: m.any().optional(),
1883
+ variant: m.any().optional(),
1884
+ placeholder: m.any().optional(),
1885
+ validationRegexp: m.any().optional(),
1886
+ value: m.any().optional()
1887
1887
  }).passthrough()
1888
1888
  },
1889
- jr
1889
+ $r
1890
1890
  );
1891
- function Lr({ context: e }) {
1891
+ function Hr({ context: e }) {
1892
1892
  const t = e.componentModel.properties, n = A(t.text), r = A(t.variant) || "body";
1893
- return Cr.has(r) ? r === "caption" ? /* @__PURE__ */ s(D.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ s("em", { children: n }) }) : /* @__PURE__ */ s(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ s(D.Paragraph, { className: "form-block-preview-paragraph", children: n });
1893
+ return Ar.has(r) ? r === "caption" ? /* @__PURE__ */ l(H.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ l("em", { children: n }) }) : /* @__PURE__ */ l(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ l(H.Paragraph, { className: "form-block-preview-paragraph", children: n });
1894
1894
  }
1895
- const Dr = V(
1896
- { name: "Text", schema: ae("Text") },
1897
- Lr
1895
+ const Kr = V(
1896
+ { name: "Text", schema: se("Text") },
1897
+ Hr
1898
1898
  );
1899
- function Tt() {
1899
+ function Nt() {
1900
1900
  const t = [
1901
- ...[...ue.components.values()].filter(
1902
- (r) => !xr.has(r.name)
1901
+ ...[...de.components.values()].filter(
1902
+ (r) => !kr.has(r.name)
1903
1903
  ),
1904
- Ar,
1905
- Pr,
1906
- Tr,
1907
1904
  Nr,
1905
+ Ur,
1906
+ Mr,
1908
1907
  Ir,
1909
- _r,
1910
- zr,
1908
+ Fr,
1909
+ Er,
1911
1910
  Br,
1912
- qr,
1913
- $r,
1911
+ wr,
1912
+ jr,
1914
1913
  Dr,
1915
- ...Kn()
1916
- ], n = [...ue.functions.values()];
1917
- return new $t(kt, t, n, ue.themeSchema);
1914
+ Kr,
1915
+ ...Gn()
1916
+ ], n = [...de.functions.values()];
1917
+ return new Dt(At, t, n, de.themeSchema);
1918
+ }
1919
+ const $ = {
1920
+ jade9: "#29a383",
1921
+ jade10: "#26997b",
1922
+ jade11: "#208368",
1923
+ jade12: "#1d3b31",
1924
+ /** 链接、边框、Logo 图形、实心底(与 primarySolid 同色) */
1925
+ primary: "#208368",
1926
+ /** Primary 实心按钮、Sider 胶囊、发布等 type="primary" */
1927
+ primarySolid: "#208368",
1928
+ primaryHover: "#26997b",
1929
+ primaryActive: "#1d3b31",
1930
+ onPrimary: "#ffffff"
1931
+ }, Gr = {
1932
+ cssVar: { key: "vidtempl" },
1933
+ token: {
1934
+ colorPrimary: $.primarySolid,
1935
+ colorPrimaryHover: $.primaryHover,
1936
+ colorPrimaryActive: $.primaryActive,
1937
+ colorLink: $.primary,
1938
+ colorLinkHover: $.primaryHover,
1939
+ colorSuccess: $.jade9,
1940
+ colorWarning: "#f5a623",
1941
+ gold6: "#f5a623",
1942
+ gold7: "#e6951a",
1943
+ colorError: "#e5484d",
1944
+ colorInfo: $.primary,
1945
+ colorBgLayout: "#f9f9f9",
1946
+ colorBgContainer: "#ffffff",
1947
+ colorBgElevated: "#ffffff",
1948
+ colorBorder: "#d9d9d9",
1949
+ colorBorderSecondary: "#f0f0f0",
1950
+ colorText: "#202020",
1951
+ colorTextSecondary: "#646464",
1952
+ colorTextTertiary: "#8d8d8d",
1953
+ colorTextQuaternary: "#bbbbbb",
1954
+ borderRadius: 8,
1955
+ borderRadiusSM: 4,
1956
+ borderRadiusLG: 12,
1957
+ fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Noto Sans SC', sans-serif",
1958
+ fontSize: 14,
1959
+ fontSizeLG: 16,
1960
+ fontSizeSM: 13,
1961
+ fontWeightStrong: 600,
1962
+ lineHeight: 1.5715,
1963
+ lineHeightLG: 1.5,
1964
+ lineHeightSM: 1.5715,
1965
+ controlHeight: 36,
1966
+ controlHeightLG: 40,
1967
+ controlHeightSM: 28,
1968
+ paddingContentHorizontal: 16,
1969
+ paddingContentHorizontalLG: 20,
1970
+ paddingContentHorizontalSM: 12,
1971
+ marginLG: 24,
1972
+ marginMD: 16,
1973
+ marginSM: 12,
1974
+ marginXS: 8
1975
+ },
1976
+ components: {
1977
+ Button: {
1978
+ borderRadius: 9999,
1979
+ borderRadiusSM: 9999,
1980
+ borderRadiusLG: 9999,
1981
+ controlHeight: 36,
1982
+ controlHeightLG: 40,
1983
+ controlHeightSM: 28,
1984
+ paddingInline: 16,
1985
+ paddingInlineLG: 20,
1986
+ paddingInlineSM: 12,
1987
+ fontSize: 14,
1988
+ fontSizeLG: 16,
1989
+ fontSizeSM: 13,
1990
+ fontWeight: 600,
1991
+ primaryShadow: "none",
1992
+ defaultShadow: "none",
1993
+ dangerShadow: "none"
1994
+ },
1995
+ Card: {
1996
+ borderRadiusLG: 8
1997
+ },
1998
+ Layout: {
1999
+ headerBg: "#ffffff",
2000
+ bodyBg: "#f9f9f9"
2001
+ },
2002
+ Tag: {
2003
+ defaultBg: "#e6f7ed",
2004
+ defaultColor: $.primary,
2005
+ fontSizeSM: 13
2006
+ },
2007
+ Form: {
2008
+ itemMarginBottom: 24
2009
+ },
2010
+ Typography: {
2011
+ titleMarginBottom: 16,
2012
+ titleMarginTop: 0
2013
+ }
2014
+ }
2015
+ };
2016
+ function X({
2017
+ children: e,
2018
+ locale: t,
2019
+ theme: n
2020
+ }) {
2021
+ return /* @__PURE__ */ l(Ot, { theme: n ?? Gr, locale: t, children: e });
1918
2022
  }
1919
- const Kr = It(
2023
+ const Jr = It(
1920
2024
  function({
1921
2025
  doc: t,
1922
2026
  surfaceId: n = "skopon-form",
@@ -1924,27 +2028,27 @@ const Kr = It(
1924
2028
  interactive: o = !0,
1925
2029
  fieldNames: i = [],
1926
2030
  resumeSearch: a = null,
1927
- caseSearch: l = null
2031
+ caseSearch: s = null
1928
2032
  }, c) {
1929
- j(() => {
1930
- tt(), et();
2033
+ L(() => {
2034
+ nt(), tt();
1931
2035
  }, []);
1932
- const u = q(null), m = q(i);
1933
- m.current = i;
1934
- const p = B(() => {
1935
- if (Ee(t)) return "";
2036
+ const u = q(null), d = q(i);
2037
+ d.current = i;
2038
+ const p = O(() => {
2039
+ if (Re(t)) return "";
1936
2040
  try {
1937
2041
  return JSON.stringify(t);
1938
2042
  } catch {
1939
2043
  return String(t);
1940
2044
  }
1941
- }, [t]), g = B(() => {
2045
+ }, [t]), g = O(() => {
1942
2046
  if (!p)
1943
2047
  return { surfaces: [], processor: null };
1944
2048
  try {
1945
- const T = JSON.parse(p), k = new Qe([Tt()]), f = nr(T, {
2049
+ const T = JSON.parse(p), k = new et([Nt()]), f = or(T, {
1946
2050
  surfaceId: n,
1947
- catalogId: kt
2051
+ catalogId: At
1948
2052
  });
1949
2053
  return k.processMessages(f), {
1950
2054
  surfaces: Array.from(k.model.surfacesMap.values()),
@@ -1953,25 +2057,25 @@ const Kr = It(
1953
2057
  } catch (T) {
1954
2058
  return console.error("[SkoponFormRenderer] 渲染 A2UI surface 失败", T), { surfaces: [], processor: null };
1955
2059
  }
1956
- }, [p, n]), { surfaces: v, processor: I } = g;
1957
- return u.current = I, Mt(
2060
+ }, [p, n]), { surfaces: v, processor: M } = g;
2061
+ return u.current = M, Ft(
1958
2062
  c,
1959
2063
  () => ({
1960
2064
  getValues(T) {
1961
2065
  const k = u.current;
1962
2066
  if (!k) return {};
1963
- const f = (T ?? m.current).map((h) => h.trim()).filter(Boolean);
1964
- return ar(k, n, f);
2067
+ const f = (T ?? d.current).map((h) => h.trim()).filter(Boolean);
2068
+ return sr(k, n, f);
1965
2069
  }
1966
2070
  }),
1967
2071
  [n]
1968
- ), v.length === 0 ? /* @__PURE__ */ s(Ye, { children: r }) : /* @__PURE__ */ s(mt, { resumeSearch: a, children: /* @__PURE__ */ s(ut, { caseSearch: l, children: /* @__PURE__ */ s(ot, { interactive: o, children: /* @__PURE__ */ s("div", { className: "a2ui-surface a2ui-container", children: v.map((T) => /* @__PURE__ */ s(Ze, { surface: T }, T.id)) }) }) }) });
2072
+ ), v.length === 0 ? /* @__PURE__ */ l(X, { children: r }) : /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l(mt, { resumeSearch: a, children: /* @__PURE__ */ l(pt, { caseSearch: s, children: /* @__PURE__ */ l(it, { interactive: o, children: /* @__PURE__ */ l("div", { className: "a2ui-surface a2ui-container", children: v.map((T) => /* @__PURE__ */ l(Ze, { surface: T }, T.id)) }) }) }) }) });
1969
2073
  }
1970
2074
  );
1971
- function ce() {
1972
- return new Qe([Tt()]);
2075
+ function pe() {
2076
+ return new et([Nt()]);
1973
2077
  }
1974
- function ao({
2078
+ function co({
1975
2079
  messages: e,
1976
2080
  surfaceId: t = "skopon-form-stream",
1977
2081
  emptyHint: n = null,
@@ -1979,14 +2083,14 @@ function ao({
1979
2083
  resumeSearch: o = null,
1980
2084
  caseSearch: i = null
1981
2085
  }) {
1982
- j(() => {
1983
- tt(), et();
2086
+ L(() => {
2087
+ nt(), tt();
1984
2088
  }, []);
1985
2089
  const a = q(null);
1986
- a.current === null && (a.current = ce());
1987
- const l = q(0), c = q(""), u = q(!0), m = q(t);
2090
+ a.current === null && (a.current = pe());
2091
+ const s = q(0), c = q(""), u = q(!0), d = q(t);
1988
2092
  function p(f, h) {
1989
- a.current = f, l.current = h.length, c.current = JSON.stringify(h), u.current && (I(f), k(Array.from(f.model.surfacesMap.values())));
2093
+ a.current = f, s.current = h.length, c.current = JSON.stringify(h), u.current && (M(f), k(Array.from(f.model.surfacesMap.values())));
1990
2094
  }
1991
2095
  function g(f, h) {
1992
2096
  if (h <= 0) return !1;
@@ -1999,58 +2103,58 @@ function ao({
1999
2103
  return !0;
2000
2104
  }
2001
2105
  }
2002
- const [v, I] = U(
2106
+ const [v, M] = z(
2003
2107
  () => a.current
2004
- ), [T, k] = U(
2108
+ ), [T, k] = z(
2005
2109
  () => Array.from(
2006
2110
  a.current.model.surfacesMap.values()
2007
2111
  )
2008
2112
  );
2009
- return j(() => (u.current = !0, () => {
2113
+ return L(() => (u.current = !0, () => {
2010
2114
  u.current = !1;
2011
- }), []), j(() => {
2115
+ }), []), L(() => {
2012
2116
  a.current = v;
2013
- }, [v]), j(() => {
2117
+ }, [v]), L(() => {
2014
2118
  const f = () => {
2015
2119
  u.current && k(Array.from(v.model.surfacesMap.values()));
2016
2120
  }, h = v.onSurfaceCreated(f), x = v.onSurfaceDeleted(f);
2017
2121
  return () => {
2018
2122
  h.unsubscribe(), x.unsubscribe();
2019
2123
  };
2020
- }, [v]), j(() => {
2124
+ }, [v]), L(() => {
2021
2125
  let f = !1;
2022
- const h = m.current !== t;
2023
- if (m.current = t, h) {
2024
- const M = ce();
2025
- return Array.isArray(e) && e.length > 0 ? (M.processMessages(e), f || p(M, e)) : (a.current = M, l.current = 0, c.current = "", f || (I(M), k([]))), () => {
2126
+ const h = d.current !== t;
2127
+ if (d.current = t, h) {
2128
+ const I = pe();
2129
+ return Array.isArray(e) && e.length > 0 ? (I.processMessages(e), f || p(I, e)) : (a.current = I, s.current = 0, c.current = "", f || (M(I), k([]))), () => {
2026
2130
  f = !0;
2027
2131
  };
2028
2132
  }
2029
2133
  if (!Array.isArray(e) || e.length === 0) {
2030
- if (l.current > 0) {
2031
- const M = ce();
2032
- a.current = M, l.current = 0, c.current = "", f || (I(M), k([]));
2134
+ if (s.current > 0) {
2135
+ const I = pe();
2136
+ a.current = I, s.current = 0, c.current = "", f || (M(I), k([]));
2033
2137
  }
2034
2138
  return () => {
2035
2139
  f = !0;
2036
2140
  };
2037
2141
  }
2038
- const x = a.current, y = l.current;
2142
+ const x = a.current, y = s.current;
2039
2143
  if (e.length < y || g(e, y)) {
2040
- const M = ce();
2041
- return M.processMessages(e), f || p(M, e), () => {
2144
+ const I = pe();
2145
+ return I.processMessages(e), f || p(I, e), () => {
2042
2146
  f = !0;
2043
2147
  };
2044
2148
  }
2045
2149
  const S = e.slice(y);
2046
2150
  return S.length === 0 ? () => {
2047
2151
  f = !0;
2048
- } : (x.processMessages(S), l.current = e.length, c.current = JSON.stringify(e), f || k(Array.from(x.model.surfacesMap.values())), () => {
2152
+ } : (x.processMessages(S), s.current = e.length, c.current = JSON.stringify(e), f || k(Array.from(x.model.surfacesMap.values())), () => {
2049
2153
  f = !0;
2050
2154
  });
2051
- }, [e, t]), T.length === 0 ? /* @__PURE__ */ s(Ye, { children: n }) : /* @__PURE__ */ s(mt, { resumeSearch: o, children: /* @__PURE__ */ s(ut, { caseSearch: i, children: /* @__PURE__ */ s(ot, { interactive: r, children: /* @__PURE__ */ s("div", { className: "a2ui-surface a2ui-container", children: T.map((f) => /* @__PURE__ */ s(Ze, { surface: f }, f.id)) }) }) }) });
2155
+ }, [e, t]), T.length === 0 ? /* @__PURE__ */ l(X, { children: n }) : /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l(mt, { resumeSearch: o, children: /* @__PURE__ */ l(pt, { caseSearch: i, children: /* @__PURE__ */ l(it, { interactive: r, children: /* @__PURE__ */ l("div", { className: "a2ui-surface a2ui-container", children: T.map((f) => /* @__PURE__ */ l(Ze, { surface: f }, f.id)) }) }) }) }) });
2052
2156
  }
2053
- function Jr({
2157
+ function Yr({
2054
2158
  payload: e,
2055
2159
  callbackUrl: t,
2056
2160
  title: n,
@@ -2059,31 +2163,31 @@ function Jr({
2059
2163
  copyMode: i = "display",
2060
2164
  onNotify: a
2061
2165
  }) {
2062
- const l = B(
2063
- () => St(e, t),
2166
+ const s = O(
2167
+ () => xt(e, t),
2064
2168
  [e, t]
2065
- ), c = B(() => i === "submitFields" ? gr(e, t) : l, [i, e, t, l]);
2169
+ ), c = O(() => i === "submitFields" ? vr(e, t) : s, [i, e, t, s]);
2066
2170
  async function u() {
2067
2171
  try {
2068
- await Ct(c), a == null || a("success", "已复制到剪贴板");
2172
+ await kt(c), a == null || a("success", "已复制到剪贴板");
2069
2173
  } catch {
2070
2174
  a == null || a("error", "复制失败");
2071
2175
  }
2072
2176
  }
2073
- const m = i === "submitFields" ? "复制提交字段 curl(向 callback 回传)" : "复制 curl";
2177
+ const d = i === "submitFields" ? "复制提交字段 curl(向 callback 回传)" : "复制 curl";
2074
2178
  return /* @__PURE__ */ C("div", { className: "ask-user-curl-card", children: [
2075
2179
  /* @__PURE__ */ C("div", { className: "ask-user-curl-card-header", children: [
2076
2180
  /* @__PURE__ */ C("div", { className: "ask-user-curl-card-header-title", children: [
2077
- /* @__PURE__ */ s(D.Text, { type: "secondary", children: n ?? "curl 命令" }),
2078
- r ? /* @__PURE__ */ s(ee, { title: r, children: /* @__PURE__ */ s(te, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
2079
- o ? /* @__PURE__ */ s(ee, { title: o, children: /* @__PURE__ */ s(te, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
2181
+ /* @__PURE__ */ l(H.Text, { type: "secondary", children: n ?? "curl 命令" }),
2182
+ r ? /* @__PURE__ */ l(ne, { title: r, children: /* @__PURE__ */ l(re, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) : null,
2183
+ o ? /* @__PURE__ */ l(ne, { title: o, children: /* @__PURE__ */ l(re, { className: "ask-user-curl-incomplete-tag", children: "卡片 ID 待补足" }) }) : null
2080
2184
  ] }),
2081
- /* @__PURE__ */ s(ee, { title: m, children: /* @__PURE__ */ s(fe, { size: "small", type: "text", onClick: () => void u(), children: "复制" }) })
2185
+ /* @__PURE__ */ l(ne, { title: d, children: /* @__PURE__ */ l(ge, { size: "small", type: "text", onClick: () => void u(), children: "复制" }) })
2082
2186
  ] }),
2083
- /* @__PURE__ */ s("pre", { className: "skopon-form-curl-json", children: l })
2187
+ /* @__PURE__ */ l("pre", { className: "skopon-form-curl-json", children: s })
2084
2188
  ] });
2085
2189
  }
2086
- function Hr(e, t) {
2190
+ function Xr(e, t) {
2087
2191
  if (t && typeof t == "object" && t !== null && "message" in t) {
2088
2192
  const n = t.message;
2089
2193
  if (typeof n == "string" && n.trim())
@@ -2091,7 +2195,7 @@ function Hr(e, t) {
2091
2195
  }
2092
2196
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
2093
2197
  }
2094
- function lo({
2198
+ function uo({
2095
2199
  payload: e,
2096
2200
  formUniqueId: t,
2097
2201
  callbackUrl: n,
@@ -2099,22 +2203,22 @@ function lo({
2099
2203
  fetchFormDetail: o,
2100
2204
  onNotify: i,
2101
2205
  resumeSearch: a = null,
2102
- caseSearch: l = null
2206
+ caseSearch: s = null
2103
2207
  }) {
2104
- const [c, u] = U(null), [m, p] = U(!1), [g, v] = U(!0), [I, T] = U(!1), k = q(null), f = q(!0), h = q(i);
2208
+ const [c, u] = z(null), [d, p] = z(!1), [g, v] = z(!0), [M, T] = z(!1), k = q(null), f = q(!0), h = q(i);
2105
2209
  h.current = i;
2106
2210
  const x = (t == null ? void 0 : t.trim()) ?? "";
2107
- j(() => (f.current = !0, () => {
2211
+ L(() => (f.current = !0, () => {
2108
2212
  f.current = !1;
2109
- }), []), j(() => {
2213
+ }), []), L(() => {
2110
2214
  let P = !1;
2111
- return x ? (v(!0), p(!1), o({ formUniqueId: x }).then((_) => {
2112
- P || (p(!!_.disabled), u(_.formDefinition ?? null));
2113
- }).catch((_) => {
2215
+ return x ? (v(!0), p(!1), o({ formUniqueId: x }).then((U) => {
2216
+ P || (p(!!U.disabled), u(U.formDefinition ?? null));
2217
+ }).catch((U) => {
2114
2218
  var b;
2115
2219
  if (!P) {
2116
2220
  p(!1), u(null);
2117
- const F = _ instanceof Error ? _.message : "获取表单定义失败";
2221
+ const F = U instanceof Error ? U.message : "获取表单定义失败";
2118
2222
  (b = h.current) == null || b.call(h, "error", F);
2119
2223
  }
2120
2224
  }).finally(() => {
@@ -2125,122 +2229,125 @@ function lo({
2125
2229
  P = !0;
2126
2230
  });
2127
2231
  }, [x, o]);
2128
- const y = B(() => yt(e), [e]), S = B(() => y ? ur(y, c ?? void 0) : null, [y, c]), M = (S == null ? void 0 : S.matchedBlocks) ?? [], z = !!(y && mr(y) && M.length === 0), $ = B(() => z && y ? dr(y) : S && S.renderBlocks.length > 0 ? S.renderBlocks : [], [S, z, y]), G = B(
2129
- () => z ? {} : vt((S == null ? void 0 : S.extraBlocks) ?? []),
2130
- [z, S]
2131
- ), w = B(() => z && y ? fr(y) : $.filter((P) => {
2132
- var _;
2133
- return (_ = P.name) == null ? void 0 : _.trim();
2134
- }).map((P) => P.name.trim()), [z, y, $]), O = B(() => {
2135
- if ($.length === 0) return null;
2136
- const P = (S == null ? void 0 : S.title) ?? (y == null ? void 0 : y.title) ?? "", _ = (S == null ? void 0 : S.description) ?? (y == null ? void 0 : y.description) ?? "";
2137
- return or({ title: P, description: _ }, $);
2138
- }, [S, y, $]), H = x ? `ask-user-${x}` : "ask-user-payload";
2232
+ const y = O(() => vt(e), [e]), S = O(() => y ? dr(y, c ?? void 0) : null, [y, c]), I = (S == null ? void 0 : S.matchedBlocks) ?? [], E = !!(y && fr(y) && I.length === 0), j = O(() => E && y ? hr(y) : S && S.renderBlocks.length > 0 ? S.renderBlocks : [], [S, E, y]), Q = O(
2233
+ () => E ? {} : bt((S == null ? void 0 : S.extraBlocks) ?? []),
2234
+ [E, S]
2235
+ ), w = O(() => E && y ? gr(y) : j.filter((P) => {
2236
+ var U;
2237
+ return (U = P.name) == null ? void 0 : U.trim();
2238
+ }).map((P) => P.name.trim()), [E, y, j]), B = O(() => {
2239
+ if (j.length === 0) return null;
2240
+ const P = (S == null ? void 0 : S.title) ?? (y == null ? void 0 : y.title) ?? "", U = (S == null ? void 0 : S.description) ?? (y == null ? void 0 : y.description) ?? "";
2241
+ return ar({ title: P, description: U }, j);
2242
+ }, [S, y, j]), J = x ? `ask-user-${x}` : "ask-user-payload";
2139
2243
  if (g)
2140
- return /* @__PURE__ */ s("div", { className: "ask-user-form-card", children: /* @__PURE__ */ s(Oe, { size: "small" }) });
2141
- if (!y || $.length === 0)
2142
- return /* @__PURE__ */ s(
2143
- Jr,
2244
+ return /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l("div", { className: "ask-user-form-card", children: /* @__PURE__ */ l(Ve, { size: "small" }) }) });
2245
+ if (!y || j.length === 0)
2246
+ return /* @__PURE__ */ l(X, { children: /* @__PURE__ */ l(
2247
+ Yr,
2144
2248
  {
2145
2249
  payload: e,
2146
2250
  callbackUrl: n,
2147
2251
  copyMode: "submitFields",
2148
- unpublishedFormId: m && x ? x : void 0,
2252
+ unpublishedFormId: d && x ? x : void 0,
2149
2253
  onNotify: i
2150
2254
  }
2151
- );
2255
+ ) });
2152
2256
  async function Y() {
2153
- var P, _, b, F, R, N;
2154
- if (!I) {
2257
+ var P, U, b, F, R, N;
2258
+ if (!M) {
2155
2259
  T(!0);
2156
2260
  try {
2157
- const Z = ((P = k.current) == null ? void 0 : P.getValues(w)) ?? {}, ve = { ...Z, ...G };
2261
+ const ee = ((P = k.current) == null ? void 0 : P.getValues(w)) ?? {}, Se = { ...ee, ...Q };
2158
2262
  if (r === "post") {
2159
- const je = (n ?? "").trim();
2160
- if (!je) {
2161
- (_ = h.current) == null || _.call(h, "error", "callback_url 为空,无法提交");
2263
+ const $e = (n ?? "").trim();
2264
+ if (!$e) {
2265
+ (U = h.current) == null || U.call(h, "error", "callback_url 为空,无法提交");
2162
2266
  return;
2163
2267
  }
2164
- const be = await yr(je, ve);
2268
+ const xe = await br($e, Se);
2165
2269
  if (!f.current) return;
2166
- be.ok ? (b = h.current) == null || b.call(h, "success", "提交成功") : (F = h.current) == null || F.call(h, "error", Hr(be.status, be.body));
2270
+ xe.ok ? (b = h.current) == null || b.call(h, "success", "提交成功") : (F = h.current) == null || F.call(h, "error", Xr(xe.status, xe.body));
2167
2271
  return;
2168
2272
  }
2169
- if (await Ct(
2170
- xt({ cardValues: Z, extraValues: G, callbackUrl: n })
2273
+ if (await kt(
2274
+ Ct({ cardValues: ee, extraValues: Q, callbackUrl: n })
2171
2275
  ), !f.current) return;
2172
2276
  (R = h.current) == null || R.call(h, "success", "已复制 curl 到剪贴板");
2173
- } catch (Z) {
2277
+ } catch (ee) {
2174
2278
  if (!f.current) return;
2175
- const ve = Z instanceof Error ? Z.message : "复制失败";
2176
- (N = h.current) == null || N.call(h, "error", ve);
2279
+ const Se = ee instanceof Error ? ee.message : "复制失败";
2280
+ (N = h.current) == null || N.call(h, "error", Se);
2177
2281
  } finally {
2178
2282
  f.current && T(!1);
2179
2283
  }
2180
2284
  }
2181
2285
  }
2182
- return /* @__PURE__ */ C("div", { className: "ask-user-form-card", children: [
2183
- m && x ? /* @__PURE__ */ s("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ s(ee, { title: x, children: /* @__PURE__ */ s(te, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
2184
- /* @__PURE__ */ s(
2185
- Kr,
2286
+ return /* @__PURE__ */ l(X, { children: /* @__PURE__ */ C("div", { className: "ask-user-form-card", children: [
2287
+ d && x ? /* @__PURE__ */ l("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ l(ne, { title: x, children: /* @__PURE__ */ l(re, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
2288
+ /* @__PURE__ */ l(
2289
+ Jr,
2186
2290
  {
2187
2291
  ref: k,
2188
- doc: O,
2189
- surfaceId: H,
2292
+ doc: B,
2293
+ surfaceId: J,
2190
2294
  fieldNames: w,
2191
2295
  interactive: !0,
2192
2296
  resumeSearch: a,
2193
- caseSearch: l
2297
+ caseSearch: s
2194
2298
  }
2195
2299
  ),
2196
- /* @__PURE__ */ s("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ s(ee, { title: r === "curl" ? "点击复制 curl" : "提交 JSON 到 callback_url", children: /* @__PURE__ */ s(
2197
- fe,
2300
+ /* @__PURE__ */ l("div", { className: "ask-user-form-actions", children: /* @__PURE__ */ l(ne, { title: r === "curl" ? "点击复制 curl" : "提交 JSON 到 callback_url", children: /* @__PURE__ */ l(
2301
+ ge,
2198
2302
  {
2199
2303
  type: "primary",
2200
2304
  size: "small",
2201
- loading: I,
2202
- disabled: I,
2305
+ loading: M,
2306
+ disabled: M,
2203
2307
  onClick: () => void Y(),
2204
2308
  children: "提交"
2205
2309
  }
2206
2310
  ) }) })
2207
- ] });
2311
+ ] }) });
2208
2312
  }
2209
2313
  export {
2210
- oo as A2UI_PROTOCOL_VERSION,
2211
- lo as AskUserFormCard,
2212
- ut as CaseSearchProvider,
2213
- Jr as CurlSubmitBlock,
2214
- Lt as FORM_MEDIA_SIZES,
2314
+ lo as A2UI_PROTOCOL_VERSION,
2315
+ uo as AskUserFormCard,
2316
+ pt as CaseSearchProvider,
2317
+ Yr as CurlSubmitBlock,
2318
+ Ht as FORM_MEDIA_SIZES,
2215
2319
  mt as ResumeSearchProvider,
2216
- ao as SkoponA2uiStreamRenderer,
2217
- Kr as SkoponFormRenderer,
2218
- tr as a2uiToBlocks,
2219
- ft as blocksToA2ui,
2220
- hr as buildAskUserCurlBodyJson,
2221
- xt as buildAskUserCurlStatement,
2222
- gr as buildAskUserSubmitCurlFromPayload,
2223
- or as buildAskUserSurface,
2224
- St as buildCurlStatement,
2225
- Ct as copyTextToClipboard,
2226
- io as createFormClient,
2227
- vt as extractExtraBlockValues,
2228
- ar as extractSurfaceValues,
2229
- fr as getPayloadInputFieldNames,
2230
- dr as getPayloadRenderableBlocks,
2231
- ur as intersectPayloadBlocksWithForm,
2232
- Ee as isA2uiSurfaceEmpty,
2233
- X as isInputBlockType,
2234
- Be as isLayoutBlockType,
2235
- Pe as isMediaBlockType,
2236
- ir as mapFormDefinitionFromDto,
2237
- W as normalizeFormDefinition,
2238
- yt as parsePayloadBlocksJson,
2239
- mr as payloadHasInputBlocks,
2240
- rr as resolveSurfaceFromFormDefinition,
2241
- yr as submitFormJson,
2242
- nr as surfaceDocToMessages,
2243
- pe as syncFormDefinition,
2244
- xn as useCaseSearch,
2245
- Pn as useResumeSearch
2320
+ co as SkoponA2uiStreamRenderer,
2321
+ X as SkoponFormProvider,
2322
+ Jr as SkoponFormRenderer,
2323
+ rr as a2uiToBlocks,
2324
+ ht as blocksToA2ui,
2325
+ yr as buildAskUserCurlBodyJson,
2326
+ Ct as buildAskUserCurlStatement,
2327
+ vr as buildAskUserSubmitCurlFromPayload,
2328
+ ar as buildAskUserSurface,
2329
+ xt as buildCurlStatement,
2330
+ kt as copyTextToClipboard,
2331
+ so as createFormClient,
2332
+ bt as extractExtraBlockValues,
2333
+ sr as extractSurfaceValues,
2334
+ gr as getPayloadInputFieldNames,
2335
+ hr as getPayloadRenderableBlocks,
2336
+ dr as intersectPayloadBlocksWithForm,
2337
+ Re as isA2uiSurfaceEmpty,
2338
+ W as isInputBlockType,
2339
+ we as isLayoutBlockType,
2340
+ Ue as isMediaBlockType,
2341
+ lr as mapFormDefinitionFromDto,
2342
+ Z as normalizeFormDefinition,
2343
+ vt as parsePayloadBlocksJson,
2344
+ fr as payloadHasInputBlocks,
2345
+ ir as resolveSurfaceFromFormDefinition,
2346
+ Gr as skoponAntdTheme,
2347
+ $ as skoponBrandColors,
2348
+ br as submitFormJson,
2349
+ or as surfaceDocToMessages,
2350
+ me as syncFormDefinition,
2351
+ kn as useCaseSearch,
2352
+ Un as useResumeSearch
2246
2353
  };