@skopon-cool/form-sdk 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import { Catalog as Pn, MessageProcessor as Pt } from "@a2ui/web_core/v0_9";
12
12
  import { injectBasicCatalogStyles as wt } from "@a2ui/web_core/v0_9/basic_catalog";
13
13
  import { injectStyles as Rt } from "@a2ui/react/styles";
14
14
  import At from "dayjs";
15
- const Mi = "v0.9", wn = [
15
+ const Fi = "v0.9", wn = [
16
16
  "huge",
17
17
  "large",
18
18
  "medium",
@@ -374,7 +374,11 @@ function We({
374
374
  function ee() {
375
375
  return Ne(Bt);
376
376
  }
377
- const qt = Ie(null), mr = {
377
+ const qt = Ie(null);
378
+ function mr(e) {
379
+ return e != null && (typeof e == "object" || typeof e == "function") && typeof e.then == "function";
380
+ }
381
+ const dr = {
378
382
  reportEvent: () => {
379
383
  },
380
384
  reportData: () => {
@@ -382,13 +386,13 @@ const qt = Ie(null), mr = {
382
386
  runAutoControl: (e) => e(),
383
387
  isAutoControl: () => !1
384
388
  };
385
- function dr(e) {
389
+ function pr(e) {
386
390
  const t = {};
387
391
  for (const [n, r] of Object.entries(e))
388
392
  r !== void 0 && (t[n] = r);
389
393
  return t;
390
394
  }
391
- function pr({
395
+ function fr({
392
396
  client: e,
393
397
  children: t
394
398
  }) {
@@ -406,14 +410,18 @@ function pr({
406
410
  m.send(y, d);
407
411
  }, []), i = L((u) => {
408
412
  const m = r.current;
409
- m && m.send("form_runtime_data", dr(u));
413
+ m && m.send("form_runtime_data", pr(u));
410
414
  }, []), a = L((u) => {
411
415
  n.current += 1;
416
+ let m;
412
417
  try {
413
- return u();
414
- } finally {
415
- n.current = Math.max(0, n.current - 1);
418
+ m = u();
419
+ } catch (d) {
420
+ throw n.current = Math.max(0, n.current - 1), d;
416
421
  }
422
+ return mr(m) ? Promise.resolve(m).finally(() => {
423
+ n.current = Math.max(0, n.current - 1);
424
+ }) : (n.current = Math.max(0, n.current - 1), m);
417
425
  }, []), s = L(
418
426
  () => n.current > 0,
419
427
  []
@@ -429,13 +437,13 @@ function pr({
429
437
  return /* @__PURE__ */ c(qt.Provider, { value: l, children: t });
430
438
  }
431
439
  function Ot() {
432
- return Ne(qt) ?? mr;
440
+ return Ne(qt) ?? dr;
433
441
  }
434
- const fr = 300;
442
+ const hr = 300;
435
443
  function Vt(e) {
436
444
  return e && typeof e == "object" && "path" in e && String(e.path ?? "").trim() || null;
437
445
  }
438
- function hr(e) {
446
+ function gr(e) {
439
447
  if (!e) return;
440
448
  const t = e.trim();
441
449
  if (t)
@@ -447,7 +455,7 @@ function xt(e, t = "value") {
447
455
  return e.dataContext.resolveDynamicValue(r);
448
456
  }
449
457
  function te(e, t = "value", n = {}) {
450
- const o = e.componentModel.properties[t], i = Vt(o), a = hr(i), s = Ot(), {
458
+ const o = e.componentModel.properties[t], i = Vt(o), a = gr(i), s = Ot(), {
451
459
  component: l = "Unknown",
452
460
  changeAction: u = "change",
453
461
  debounceChange: m = !1
@@ -483,7 +491,7 @@ function te(e, t = "value", n = {}) {
483
491
  }
484
492
  d.current != null && clearTimeout(d.current), d.current = setTimeout(() => {
485
493
  d.current = null, x();
486
- }, fr);
494
+ }, hr);
487
495
  },
488
496
  [a, u, l, m]
489
497
  ), h = L(
@@ -551,7 +559,7 @@ function Ye({
551
559
  }) {
552
560
  return /* @__PURE__ */ c(Ht.Provider, { value: e ?? null, children: t });
553
561
  }
554
- function gr() {
562
+ function yr() {
555
563
  return Ne(Ht);
556
564
  }
557
565
  function Ve(e) {
@@ -568,10 +576,10 @@ function je(e) {
568
576
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!(e.agentUniqueId && e.flowType && e.category);
569
577
  return t || n;
570
578
  }
571
- function yr(e) {
579
+ function vr(e) {
572
580
  return JSON.stringify(e);
573
581
  }
574
- const vr = {
582
+ const Sr = {
575
583
  name: "SkoponCaseSelect",
576
584
  schema: f.object({
577
585
  label: f.any().optional(),
@@ -584,7 +592,7 @@ const vr = {
584
592
  value: f.any().optional()
585
593
  }).passthrough()
586
594
  };
587
- function Sr({
595
+ function br({
588
596
  item: e,
589
597
  selected: t,
590
598
  disabled: n,
@@ -612,11 +620,11 @@ function Sr({
612
620
  }
613
621
  );
614
622
  }
615
- function br({ context: e }) {
616
- const { interactive: t } = ee(), n = gr(), { value: r, setValue: o, setValueSilent: i, fieldName: a } = te(e, "value", {
623
+ function kr({ context: e }) {
624
+ const { interactive: t } = ee(), n = yr(), { value: r, setValue: o, setValueSilent: i, fieldName: a } = te(e, "value", {
617
625
  component: "SkoponCaseSelect",
618
626
  changeAction: "click"
619
- }), s = e.componentModel.properties, l = Ve(s.label), u = Ve(s.placeholder), m = Ve(s.help), d = s.enableRefresh !== !1, y = xe(s.minCount), g = xe(s.maxCount), k = R(() => Le(s.caseFilter), [s.caseFilter]), v = yr(k), [C, h] = E(1), [p, S] = E(!1), [A, x] = E(""), [_, z] = E([]), [T, D] = E(0), [H, oe] = E(k.pageSize ?? 20), K = P(0), j = G(r);
627
+ }), s = e.componentModel.properties, l = Ve(s.label), u = Ve(s.placeholder), m = Ve(s.help), d = s.enableRefresh !== !1, y = xe(s.minCount), g = xe(s.maxCount), k = R(() => Le(s.caseFilter), [s.caseFilter]), v = vr(k), [C, h] = E(1), [p, S] = E(!1), [A, x] = E(""), [_, z] = E([]), [T, D] = E(0), [H, oe] = E(k.pageSize ?? 20), K = P(0), j = G(r);
620
628
  w(() => {
621
629
  const b = Dt(j, g);
622
630
  b !== null && i(b);
@@ -671,7 +679,7 @@ function br({ context: e }) {
671
679
  ] }) : null,
672
680
  !p && _.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: I }) : null,
673
681
  _.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: _.map((b) => /* @__PURE__ */ c(
674
- Sr,
682
+ br,
675
683
  {
676
684
  item: b,
677
685
  selected: j.includes(b.caseUniqueId),
@@ -703,15 +711,15 @@ function br({ context: e }) {
703
711
  }
704
712
  );
705
713
  }
706
- const kr = J(
707
- vr,
708
- br
709
- ), Ar = {
714
+ const Ar = J(
715
+ Sr,
716
+ kr
717
+ ), Cr = {
710
718
  type: "case_multiselect",
711
719
  componentName: "SkoponCaseSelect",
712
720
  toComponent: cr,
713
721
  fromComponent: ur,
714
- catalogComponents: [kr]
722
+ catalogComponents: [Ar]
715
723
  };
716
724
  function Tt(e) {
717
725
  if (e == null) return;
@@ -719,7 +727,7 @@ function Tt(e) {
719
727
  if (!(!Number.isFinite(t) || t < 1))
720
728
  return Math.floor(t);
721
729
  }
722
- function Cr(e, t) {
730
+ function _r(e, t) {
723
731
  var a, s, l, u;
724
732
  const { id: n, label: r, path: o, withData: i } = t;
725
733
  return i({
@@ -740,7 +748,7 @@ function Cr(e, t) {
740
748
  value: { path: o }
741
749
  });
742
750
  }
743
- function _r(e, t, n) {
751
+ function xr(e, t, n) {
744
752
  const r = n.nameFromValue(e.value), o = {
745
753
  ...t("resume_multiselect"),
746
754
  name: r,
@@ -769,7 +777,7 @@ function Qe({
769
777
  }) {
770
778
  return /* @__PURE__ */ c(Kt.Provider, { value: e ?? null, children: t });
771
779
  }
772
- function xr() {
780
+ function Tr() {
773
781
  return Ne(Kt);
774
782
  }
775
783
  function $e(e) {
@@ -781,10 +789,10 @@ function De(e) {
781
789
  const t = e, n = Array.isArray(t.names) ? t.names.map(String).filter(Boolean) : [], r = Array.isArray(t.agentUniqueIds) ? t.agentUniqueIds.map(String).filter(Boolean) : [], o = Array.isArray(t.resumeUniqueIds) ? t.resumeUniqueIds.map(String).filter(Boolean) : [], i = typeof t.pageSize == "number" ? t.pageSize : Number(t.pageSize), a = Number.isFinite(i) && i >= 1 && i <= 100 ? Math.floor(i) : 20;
782
790
  return { names: n, agentUniqueIds: r, resumeUniqueIds: o, pageSize: a };
783
791
  }
784
- function Tr(e) {
792
+ function Ir(e) {
785
793
  return JSON.stringify(e);
786
794
  }
787
- const Ir = {
795
+ const Nr = {
788
796
  name: "SkoponResumeSelect",
789
797
  schema: f.object({
790
798
  label: f.any().optional(),
@@ -796,9 +804,9 @@ const Ir = {
796
804
  maxCount: f.any().optional(),
797
805
  value: f.any().optional()
798
806
  }).passthrough()
799
- }, Nr = 3, Mr = 2;
807
+ }, Mr = 3, Fr = 2;
800
808
  function He(e, t) {
801
- const n = (t ?? []).filter(Boolean), r = n.slice(0, Nr), o = n.length - r.length;
809
+ const n = (t ?? []).filter(Boolean), r = n.slice(0, Mr), o = n.length - r.length;
802
810
  return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-tags", children: [
803
811
  /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-label", children: e }),
804
812
  n.length > 0 ? /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-tags-list", children: [
@@ -810,25 +818,25 @@ function He(e, t) {
810
818
  ] }) : /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-empty", children: "暂无" })
811
819
  ] });
812
820
  }
813
- function Fr(e) {
821
+ function Ur(e) {
814
822
  return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-field", children: [
815
823
  /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-tags-label", children: "满意度" }),
816
824
  /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-field-value", children: typeof e == "number" ? `${e}%` : "暂无" })
817
825
  ] });
818
826
  }
819
- function Ur({ work: e }) {
827
+ function Er({ work: e }) {
820
828
  return /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-work", children: [
821
829
  /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-work-cover", children: e.coverUrl ? /* @__PURE__ */ c("img", { src: e.coverUrl, alt: "", className: "skopon-resume-select-card-work-img" }) : /* @__PURE__ */ c(Nn, { className: "skopon-resume-select-card-work-placeholder" }) }),
822
830
  /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-work-title", children: e.title || "未命名作品" })
823
831
  ] });
824
832
  }
825
- function Er({
833
+ function Pr({
826
834
  item: e,
827
835
  selected: t,
828
836
  disabled: n,
829
837
  onToggle: r
830
838
  }) {
831
- const o = (e.works ?? []).slice(0, Mr);
839
+ const o = (e.works ?? []).slice(0, Fr);
832
840
  return /* @__PURE__ */ N(
833
841
  "button",
834
842
  {
@@ -848,24 +856,24 @@ function Er({
848
856
  ),
849
857
  /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-name", children: e.name || "未命名简历" }),
850
858
  /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-body", children: [
851
- Fr(e.satisfaction),
859
+ Ur(e.satisfaction),
852
860
  He("性格", e.personality),
853
861
  He("专长", e.specialties),
854
862
  He("擅长领域", e.traits),
855
863
  /* @__PURE__ */ N("div", { className: "skopon-resume-select-card-works", children: [
856
864
  /* @__PURE__ */ c("span", { className: "skopon-resume-select-card-works-label", children: "过往作品" }),
857
- o.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, a) => /* @__PURE__ */ c(Ur, { work: i }, `${i.title}-${a}`)) }) : /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
865
+ o.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-list", children: o.map((i, a) => /* @__PURE__ */ c(Er, { work: i }, `${i.title}-${a}`)) }) : /* @__PURE__ */ c("div", { className: "skopon-resume-select-card-works-empty", children: "暂无作品" })
858
866
  ] })
859
867
  ] })
860
868
  ]
861
869
  }
862
870
  );
863
871
  }
864
- function Pr({ context: e }) {
865
- const { interactive: t } = ee(), n = xr(), { value: r, setValue: o, setValueSilent: i, fieldName: a } = te(e, "value", {
872
+ function wr({ context: e }) {
873
+ const { interactive: t } = ee(), n = Tr(), { value: r, setValue: o, setValueSilent: i, fieldName: a } = te(e, "value", {
866
874
  component: "SkoponResumeSelect",
867
875
  changeAction: "click"
868
- }), s = e.componentModel.properties, l = $e(s.label), u = $e(s.placeholder), m = $e(s.help), d = s.enableRefresh !== !1, y = xe(s.minCount), g = xe(s.maxCount), k = R(() => De(s.resumeFilter), [s.resumeFilter]), v = Tr(k), [C, h] = E(1), [p, S] = E(!1), [A, x] = E(""), [_, z] = E([]), [T, D] = E(0), [H, oe] = E(k.pageSize ?? 20), K = P(0), j = G(r);
876
+ }), s = e.componentModel.properties, l = $e(s.label), u = $e(s.placeholder), m = $e(s.help), d = s.enableRefresh !== !1, y = xe(s.minCount), g = xe(s.maxCount), k = R(() => De(s.resumeFilter), [s.resumeFilter]), v = Ir(k), [C, h] = E(1), [p, S] = E(!1), [A, x] = E(""), [_, z] = E([]), [T, D] = E(0), [H, oe] = E(k.pageSize ?? 20), K = P(0), j = G(r);
869
877
  w(() => {
870
878
  const b = Dt(j, g);
871
879
  b !== null && i(b);
@@ -921,7 +929,7 @@ function Pr({ context: e }) {
921
929
  !p && A ? /* @__PURE__ */ c(X.Text, { type: "danger", className: "skopon-resume-select-status", children: A }) : null,
922
930
  !p && !A && _.length === 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-empty", children: Y }) : null,
923
931
  _.length > 0 ? /* @__PURE__ */ c("div", { className: "skopon-resume-select-list", children: _.map((b) => /* @__PURE__ */ c(
924
- Er,
932
+ Pr,
925
933
  {
926
934
  item: b,
927
935
  selected: j.includes(b.resumeUniqueId),
@@ -953,34 +961,34 @@ function Pr({ context: e }) {
953
961
  }
954
962
  );
955
963
  }
956
- const wr = J(
957
- Ir,
958
- Pr
959
- ), Rr = {
964
+ const Rr = J(
965
+ Nr,
966
+ wr
967
+ ), zr = {
960
968
  type: "resume_multiselect",
961
969
  componentName: "SkoponResumeSelect",
962
- toComponent: Cr,
963
- fromComponent: _r,
964
- catalogComponents: [wr]
965
- }, Ue = [Rr, Ar], zr = new Map(
970
+ toComponent: _r,
971
+ fromComponent: xr,
972
+ catalogComponents: [Rr]
973
+ }, Ue = [zr, Cr], Br = new Map(
966
974
  Ue.map((e) => [e.type, e])
967
- ), Br = new Map(
975
+ ), qr = new Map(
968
976
  Ue.map((e) => [e.componentName, e])
969
977
  );
970
- function qr(e) {
971
- return zr.get(e);
972
- }
973
978
  function Or(e) {
974
979
  return Br.get(e);
975
980
  }
976
- function Vr() {
977
- return Ue.flatMap((e) => e.catalogComponents);
981
+ function Vr(e) {
982
+ return qr.get(e);
978
983
  }
979
984
  function Lr() {
985
+ return Ue.flatMap((e) => e.catalogComponents);
986
+ }
987
+ function jr() {
980
988
  return Ue.map((e) => e.componentName);
981
989
  }
982
990
  const Te = "root", Xe = "__title__", Ze = "__desc__", it = "^[^@\\s]+@[^@\\s]+\\.[^@\\s]+$";
983
- function jr(e) {
991
+ function $r(e) {
984
992
  return `/${e}`;
985
993
  }
986
994
  function It(e) {
@@ -989,7 +997,7 @@ function It(e) {
989
997
  function O(e) {
990
998
  if (typeof e == "string") return e;
991
999
  }
992
- function $r(e) {
1000
+ function Dr(e) {
993
1001
  const t = e.id || me("a2-"), n = e.type === "video" ? "video" : e.type === "audio" ? "audio" : "image";
994
1002
  return {
995
1003
  id: t,
@@ -1002,14 +1010,14 @@ function $r(e) {
1002
1010
  placeholder: e.placeholder ?? ""
1003
1011
  };
1004
1012
  }
1005
- function Dr(e) {
1013
+ function Hr(e) {
1006
1014
  if (Array.isArray(e.urls))
1007
1015
  return e.urls.map((n) => String(n).trim()).filter(Boolean);
1008
1016
  const t = O(e.url);
1009
1017
  return t != null && t.trim() ? [t.trim()] : [];
1010
1018
  }
1011
1019
  function be(e, t, n) {
1012
- const r = typeof e.id == "string" ? e.id : me("block-"), o = Dr(e), i = O(e.label) ?? O(e.description) ?? n, a = O(e.help), s = O(e.placeholder), l = pe(e.mediaSize);
1020
+ const r = typeof e.id == "string" ? e.id : me("block-"), o = Hr(e), i = O(e.label) ?? O(e.description) ?? n, a = O(e.help), s = O(e.placeholder), l = pe(e.mediaSize);
1013
1021
  return {
1014
1022
  id: r,
1015
1023
  type: t,
@@ -1020,7 +1028,7 @@ function be(e, t, n) {
1020
1028
  mediaUrls: o.length > 0 ? o : [""]
1021
1029
  };
1022
1030
  }
1023
- function Hr(e) {
1031
+ function Kr(e) {
1024
1032
  switch (e.type) {
1025
1033
  case "toggle":
1026
1034
  return fe(e.defaultValue);
@@ -1037,9 +1045,9 @@ function Hr(e) {
1037
1045
  return typeof e.defaultValue == "string" ? e.defaultValue : "";
1038
1046
  }
1039
1047
  }
1040
- function Kr(e) {
1048
+ function Gr(e) {
1041
1049
  var u;
1042
- const t = e.id || me("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? jr(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), a = (m) => r ? { node: m, dataKey: r, dataValue: Hr(e) } : { node: m }, s = { id: t, label: n, name: r, path: o, withData: a }, l = qr(e.type);
1050
+ const t = e.id || me("a2-"), n = e.label ?? "", r = ((u = e.name) == null ? void 0 : u.trim()) || "", o = r ? $r(r) : void 0, i = (e.options ?? []).map((m) => ({ label: m.label, value: m.value })), a = (m) => r ? { node: m, dataKey: r, dataValue: Kr(e) } : { node: m }, s = { id: t, label: n, name: r, path: o, withData: a }, l = Or(e.type);
1043
1051
  if (l)
1044
1052
  return l.toComponent(e, s);
1045
1053
  switch (e.type) {
@@ -1150,7 +1158,7 @@ function Kr(e) {
1150
1158
  case "image":
1151
1159
  case "video":
1152
1160
  case "audio":
1153
- return { node: $r(e) };
1161
+ return { node: Dr(e) };
1154
1162
  case "file":
1155
1163
  return a({
1156
1164
  id: t,
@@ -1178,14 +1186,14 @@ function Gt(e, t) {
1178
1186
  const n = [], r = [], o = {}, i = (t == null ? void 0 : t.includeHeader) !== !1, a = (e.title ?? "").trim(), s = (e.description ?? "").trim();
1179
1187
  i && a && (n.push({ id: Xe, component: "Text", text: a, variant: "h2" }), r.push(Xe)), i && s && (n.push({ id: Ze, component: "Text", text: s, variant: "body" }), r.push(Ze));
1180
1188
  for (const m of e.blocks ?? []) {
1181
- const { node: d, dataKey: y, dataValue: g } = Kr(m);
1189
+ const { node: d, dataKey: y, dataValue: g } = Gr(m);
1182
1190
  d && (n.push(d), r.push(d.id), y && (o[y] = g));
1183
1191
  }
1184
1192
  n.unshift({ id: Te, component: "Column", children: r });
1185
1193
  const l = { root: Te, components: n, dataModel: o }, u = t == null ? void 0 : t.styleId;
1186
1194
  return u !== void 0 && (l.surfaceProperties = { styleId: u ?? null }), l;
1187
1195
  }
1188
- function Gr(e) {
1196
+ function Jr(e) {
1189
1197
  const t = /* @__PURE__ */ new Map();
1190
1198
  for (const n of e.components ?? [])
1191
1199
  n && typeof n.id == "string" && t.set(n.id, n);
@@ -1202,8 +1210,8 @@ function Ke(e) {
1202
1210
  };
1203
1211
  }).filter((n) => !!n) : [];
1204
1212
  }
1205
- function Jr(e) {
1206
- const t = typeof e.id == "string" ? e.id : me("block-"), n = String(e.component ?? ""), r = O(e.label) ?? O(e.text) ?? "", o = It(e.value), i = (s) => ({ id: t, type: s, label: r }), a = Or(n);
1213
+ function Wr(e) {
1214
+ const t = typeof e.id == "string" ? e.id : me("block-"), n = String(e.component ?? ""), r = O(e.label) ?? O(e.text) ?? "", o = It(e.value), i = (s) => ({ id: t, type: s, label: r }), a = Vr(n);
1207
1215
  if (a)
1208
1216
  return a.fromComponent(e, i, { asLiteral: O, nameFromValue: It });
1209
1217
  switch (n) {
@@ -1276,7 +1284,7 @@ function Jt(e, t, n, r) {
1276
1284
  }
1277
1285
  r.push(o);
1278
1286
  }
1279
- function Wr(e, t) {
1287
+ function Yr(e, t) {
1280
1288
  return t ? e.map((n) => {
1281
1289
  var i;
1282
1290
  const r = (i = n.name) == null ? void 0 : i.trim();
@@ -1285,10 +1293,10 @@ function Wr(e, t) {
1285
1293
  return o === void 0 ? n : n.type === "toggle" ? { ...n, defaultValue: fe(o) } : { ...n, defaultValue: o };
1286
1294
  }) : e;
1287
1295
  }
1288
- function Yr(e) {
1296
+ function Qr(e) {
1289
1297
  if (!e || !Array.isArray(e.components))
1290
1298
  return _e({ title: "", description: "", blocks: [], jsonSchema: {} });
1291
- const t = Gr(e), n = [];
1299
+ const t = Jr(e), n = [];
1292
1300
  Jt(e.root ?? Te, t, /* @__PURE__ */ new Set(), n);
1293
1301
  let r = "", o = "";
1294
1302
  const i = [];
@@ -1301,17 +1309,17 @@ function Yr(e) {
1301
1309
  o = O(a.text) ?? o;
1302
1310
  continue;
1303
1311
  }
1304
- const s = Jr(a);
1312
+ const s = Wr(a);
1305
1313
  s && i.push(s);
1306
1314
  }
1307
1315
  return _e({
1308
1316
  title: r,
1309
1317
  description: o,
1310
- blocks: Wr(i, e.dataModel),
1318
+ blocks: Yr(i, e.dataModel),
1311
1319
  jsonSchema: {}
1312
1320
  });
1313
1321
  }
1314
- function Qr(e, t) {
1322
+ function Xr(e, t) {
1315
1323
  const { surfaceId: n, catalogId: r } = t, o = [
1316
1324
  { version: "v0.9", createSurface: { surfaceId: n, catalogId: r } },
1317
1325
  {
@@ -1327,7 +1335,7 @@ function Qr(e, t) {
1327
1335
  function Wt(e) {
1328
1336
  return !!e && typeof e == "object" && !Array.isArray(e) && Array.isArray(e.components);
1329
1337
  }
1330
- function Xr(e, t) {
1338
+ function Zr(e, t) {
1331
1339
  if (!e || typeof e != "object") return null;
1332
1340
  const n = e, r = Wt(n.a2ui) ? n.a2ui : void 0;
1333
1341
  if (r && !et(r)) return r;
@@ -1341,7 +1349,7 @@ function Xr(e, t) {
1341
1349
  }), a = Gt(i, t);
1342
1350
  return et(a) ? null : a;
1343
1351
  }
1344
- function Zr(e, t, n) {
1352
+ function eo(e, t, n) {
1345
1353
  return Gt(
1346
1354
  {
1347
1355
  title: e.title,
@@ -1351,18 +1359,18 @@ function Zr(e, t, n) {
1351
1359
  n
1352
1360
  );
1353
1361
  }
1354
- function eo(e) {
1362
+ function to(e) {
1355
1363
  if (!e || typeof e != "object" || Array.isArray(e))
1356
1364
  return;
1357
1365
  const t = e;
1358
- return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Wt(t.a2ui) ? Yr(t.a2ui) : re({
1366
+ return !(Array.isArray(t.blocks) && t.blocks.length > 0) && Wt(t.a2ui) ? Qr(t.a2ui) : re({
1359
1367
  title: typeof t.title == "string" ? t.title : "",
1360
1368
  description: typeof t.description == "string" ? t.description : "",
1361
1369
  blocks: Array.isArray(t.blocks) ? t.blocks : [],
1362
1370
  jsonSchema: ot(t.jsonSchema ?? t.json_schema)
1363
1371
  });
1364
1372
  }
1365
- function to(e, t, n) {
1373
+ function no(e, t, n) {
1366
1374
  const r = e.model.surfacesMap.get(t);
1367
1375
  if (!r) return {};
1368
1376
  const o = {};
@@ -1372,7 +1380,7 @@ function to(e, t, n) {
1372
1380
  }
1373
1381
  return o;
1374
1382
  }
1375
- function no(e) {
1383
+ function ro(e) {
1376
1384
  return re({
1377
1385
  title: "",
1378
1386
  description: "",
@@ -1380,7 +1388,7 @@ function no(e) {
1380
1388
  jsonSchema: {}
1381
1389
  }).blocks[0];
1382
1390
  }
1383
- function ro(e, t) {
1391
+ function oo(e, t) {
1384
1392
  var o, i;
1385
1393
  const n = /* @__PURE__ */ new Map();
1386
1394
  for (const a of t) {
@@ -1390,7 +1398,7 @@ function ro(e, t) {
1390
1398
  const r = [];
1391
1399
  for (const a of e.blocks) {
1392
1400
  if (Fe(a.type)) {
1393
- r.push(no(a));
1401
+ r.push(ro(a));
1394
1402
  continue;
1395
1403
  }
1396
1404
  if (!ne(a.type)) continue;
@@ -1401,7 +1409,7 @@ function ro(e, t) {
1401
1409
  }
1402
1410
  return r;
1403
1411
  }
1404
- function oo(e, t) {
1412
+ function io(e, t) {
1405
1413
  var r;
1406
1414
  const n = {
1407
1415
  ...e,
@@ -1424,7 +1432,7 @@ function Ee(e) {
1424
1432
  jsonSchema: {}
1425
1433
  }) : null;
1426
1434
  }
1427
- function io(e, t) {
1435
+ function ao(e, t) {
1428
1436
  var i, a, s, l, u, m;
1429
1437
  const n = /* @__PURE__ */ new Map();
1430
1438
  for (const d of (t == null ? void 0 : t.blocks) ?? [])
@@ -1435,7 +1443,7 @@ function io(e, t) {
1435
1443
  const y = (a = d.name) == null ? void 0 : a.trim();
1436
1444
  if (!y) continue;
1437
1445
  const g = n.get(y);
1438
- g ? r.push(oo(g, d)) : o.push(
1446
+ g ? r.push(io(g, d)) : o.push(
1439
1447
  re({
1440
1448
  title: "",
1441
1449
  description: "",
@@ -1447,12 +1455,12 @@ function io(e, t) {
1447
1455
  return {
1448
1456
  matchedBlocks: r,
1449
1457
  extraBlocks: o,
1450
- renderBlocks: ro(e, r),
1458
+ renderBlocks: oo(e, r),
1451
1459
  title: ((s = e.title) == null ? void 0 : s.trim()) || ((l = t == null ? void 0 : t.title) == null ? void 0 : l.trim()) || "",
1452
1460
  description: ((u = e.description) == null ? void 0 : u.trim()) || ((m = t == null ? void 0 : t.description) == null ? void 0 : m.trim()) || ""
1453
1461
  };
1454
1462
  }
1455
- function ao(e) {
1463
+ function so(e) {
1456
1464
  const { type: t, defaultValue: n } = e;
1457
1465
  return n !== void 0 ? t === "toggle" ? n === !0 || n === "true" : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? Array.isArray(n) ? n.map(String) : typeof n == "string" && n ? [n] : [] : n : t === "toggle" ? !1 : t === "multiselect" || t === "checkbox" || t === "resume_multiselect" || t === "case_multiselect" ? [] : t === "number" ? null : "";
1458
1466
  }
@@ -1462,11 +1470,11 @@ function at(e) {
1462
1470
  for (const r of e) {
1463
1471
  if (!ne(r.type)) continue;
1464
1472
  const o = (n = r.name) == null ? void 0 : n.trim();
1465
- o && (t[o] = ao(r));
1473
+ o && (t[o] = so(r));
1466
1474
  }
1467
1475
  return t;
1468
1476
  }
1469
- function so(e) {
1477
+ function lo(e) {
1470
1478
  return e.blocks.some(
1471
1479
  (t) => {
1472
1480
  var n;
@@ -1474,13 +1482,13 @@ function so(e) {
1474
1482
  }
1475
1483
  );
1476
1484
  }
1477
- function lo(e) {
1485
+ function co(e) {
1478
1486
  return e.blocks.filter((t) => {
1479
1487
  var n;
1480
1488
  return Fe(t.type) ? !0 : ne(t.type) && !!((n = t.name) != null && n.trim());
1481
1489
  });
1482
1490
  }
1483
- function co(e) {
1491
+ function uo(e) {
1484
1492
  return e.blocks.filter((t) => {
1485
1493
  var n;
1486
1494
  return ne(t.type) && ((n = t.name) == null ? void 0 : n.trim());
@@ -1504,16 +1512,16 @@ function Qt(e, t, n) {
1504
1512
  ].join(`
1505
1513
  `);
1506
1514
  }
1507
- function uo(e, t) {
1515
+ function mo(e, t) {
1508
1516
  return JSON.stringify({ ...e, ...t }, null, 2);
1509
1517
  }
1510
- function mo({
1518
+ function po({
1511
1519
  cardValues: e,
1512
1520
  extraValues: t = {},
1513
1521
  callbackUrl: n,
1514
1522
  headers: r
1515
1523
  }) {
1516
- const o = (n ?? "").trim() || "<callback_url>", i = uo(e, t);
1524
+ const o = (n ?? "").trim() || "<callback_url>", i = mo(e, t);
1517
1525
  return [
1518
1526
  `curl -X POST '${o}' \\`,
1519
1527
  " -H 'Content-Type: application/json' \\",
@@ -1522,11 +1530,11 @@ function mo({
1522
1530
  ].join(`
1523
1531
  `);
1524
1532
  }
1525
- function Fi(e, t, n) {
1533
+ function Ui(e, t, n) {
1526
1534
  const r = Ee(e);
1527
1535
  if (!r) return Qt(e, t, n);
1528
1536
  const o = at(r.blocks);
1529
- return mo({ cardValues: o, callbackUrl: t, headers: n });
1537
+ return po({ cardValues: o, callbackUrl: t, headers: n });
1530
1538
  }
1531
1539
  async function Xt(e, t, n) {
1532
1540
  const r = e.trim();
@@ -1555,7 +1563,7 @@ async function Xt(e, t, n) {
1555
1563
  }
1556
1564
  return { ok: i.ok, status: i.status, body: a };
1557
1565
  }
1558
- async function Ui(e) {
1566
+ async function Ei(e) {
1559
1567
  var n;
1560
1568
  if (typeof navigator < "u" && ((n = navigator.clipboard) != null && n.writeText)) {
1561
1569
  await navigator.clipboard.writeText(e);
@@ -1584,7 +1592,7 @@ async function lt(e) {
1584
1592
  throw new Error(t.message || `响应缺少 data (${e.status})`);
1585
1593
  return t.data;
1586
1594
  }
1587
- const ct = "auth_user", po = "token", fo = "answer_agent_callback_url", ho = "realtime_ws_url", go = "/api/v1/mock/ask_user_answer_mock";
1595
+ const ct = "auth_user", fo = "token", ho = "answer_agent_callback_url", go = "realtime_ws_url", yo = "/api/v1/mock/ask_user_answer_mock";
1588
1596
  function ut(e) {
1589
1597
  if (typeof window > "u") return null;
1590
1598
  try {
@@ -1601,24 +1609,24 @@ function mt(e) {
1601
1609
  return null;
1602
1610
  }
1603
1611
  }
1604
- function yo(e, t) {
1612
+ function vo(e, t) {
1605
1613
  const n = mt(e);
1606
1614
  if (!n) return "";
1607
1615
  const r = n[t];
1608
1616
  return typeof r == "string" ? r.trim().replace(/^bearer\s+/i, "").trim() : "";
1609
1617
  }
1610
- function vo(e = {}) {
1611
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ct, r = e.answerAgentCallbackUrlField ?? fo, o = ut(t);
1618
+ function So(e = {}) {
1619
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ct, r = e.answerAgentCallbackUrlField ?? ho, o = ut(t);
1612
1620
  if (!o) return "";
1613
1621
  const i = o.getItem(n);
1614
1622
  if (!i) return "";
1615
1623
  const a = mt(i);
1616
1624
  if (!a) return "";
1617
1625
  const s = a[r];
1618
- return (typeof s == "string" ? s.trim() : "") || go;
1626
+ return (typeof s == "string" ? s.trim() : "") || yo;
1619
1627
  }
1620
- function So(e = {}) {
1621
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ct, r = e.realtimeWsUrlField ?? ho, o = ut(t);
1628
+ function bo(e = {}) {
1629
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ct, r = e.realtimeWsUrlField ?? go, o = ut(t);
1622
1630
  if (!o) return "";
1623
1631
  const i = o.getItem(n);
1624
1632
  if (!i) return "";
@@ -1634,17 +1642,17 @@ function dt(e, t) {
1634
1642
  };
1635
1643
  }
1636
1644
  function Zt(e = {}) {
1637
- const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ct, r = e.tokenField ?? po, o = ut(t);
1645
+ const t = e.storage ?? "sessionStorage", n = e.storageKey ?? ct, r = e.tokenField ?? fo, o = ut(t);
1638
1646
  if (!o) return {};
1639
1647
  const i = o.getItem(n);
1640
1648
  if (!i) return {};
1641
- const a = yo(i, r);
1649
+ const a = vo(i, r);
1642
1650
  return a ? { Authorization: `Bearer ${a}` } : {};
1643
1651
  }
1644
1652
  async function pt(e = {}) {
1645
1653
  return e.getHeaders ? await e.getHeaders() ?? {} : Zt(e.authStorage);
1646
1654
  }
1647
- function bo(e = {}) {
1655
+ function ko(e = {}) {
1648
1656
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.detailPath ?? "/dev/form/detail", r = e.fetch ?? fetch;
1649
1657
  async function o(i) {
1650
1658
  const a = new URLSearchParams();
@@ -1657,18 +1665,18 @@ function bo(e = {}) {
1657
1665
  const s = await pt(e), l = await r(`${t}${n}?${a.toString()}`, {
1658
1666
  method: "GET",
1659
1667
  headers: s
1660
- }), u = await lt(l), m = eo(u.form_definition);
1668
+ }), u = await lt(l), m = to(u.form_definition);
1661
1669
  return {
1662
1670
  formUniqueId: u.form_unique_id,
1663
1671
  formId: u.form_id,
1664
1672
  disabled: u.disabled === 1,
1665
1673
  formDefinition: m,
1666
- a2ui: Xr(u.form_definition) ?? void 0
1674
+ a2ui: Zr(u.form_definition) ?? void 0
1667
1675
  };
1668
1676
  }
1669
1677
  return { fetchDetail: o };
1670
1678
  }
1671
- function ko(e) {
1679
+ function Ao(e) {
1672
1680
  if (!e || typeof e != "object" || Array.isArray(e))
1673
1681
  return e ?? null;
1674
1682
  const t = e;
@@ -1684,7 +1692,7 @@ function ft({
1684
1692
  form: n,
1685
1693
  answer: r
1686
1694
  }) {
1687
- const o = Ee(t) ?? t, i = n ? ko(n) : o;
1695
+ const o = Ee(t) ?? t, i = n ? Ao(n) : o;
1688
1696
  return {
1689
1697
  mission_id: e.missionId ?? null,
1690
1698
  tenant_id: e.tenantId ?? null,
@@ -1712,7 +1720,7 @@ function en(e) {
1712
1720
  const o = e.mission_id;
1713
1721
  return o == null || o === "" ? "mission_id 缺失,无法提交" : null;
1714
1722
  }
1715
- function Ei(e) {
1723
+ function Pi(e) {
1716
1724
  return en(
1717
1725
  ft({
1718
1726
  context: e,
@@ -1722,14 +1730,14 @@ function Ei(e) {
1722
1730
  );
1723
1731
  }
1724
1732
  const Nt = "answer_agent_callback_url 未配置,无法提交";
1725
- function Ao(e) {
1733
+ function Co(e) {
1726
1734
  if ((e == null ? void 0 : e.answerAgentCallbackUrl) != null) {
1727
1735
  const n = e.answerAgentCallbackUrl.trim();
1728
1736
  if (!n)
1729
1737
  throw new Error(Nt);
1730
1738
  return n;
1731
1739
  }
1732
- const t = vo(e == null ? void 0 : e.authStorage).trim();
1740
+ const t = So(e == null ? void 0 : e.authStorage).trim();
1733
1741
  if (!t)
1734
1742
  throw new Error(Nt);
1735
1743
  return t;
@@ -1739,7 +1747,7 @@ function tn(e) {
1739
1747
  const n = e.data;
1740
1748
  return !n || typeof n != "object" || Array.isArray(n) ? null : n;
1741
1749
  }
1742
- function Co(e, t) {
1750
+ function _o(e, t) {
1743
1751
  if (t && typeof t == "object" && t !== null && "message" in t) {
1744
1752
  const n = t.message;
1745
1753
  if (typeof n == "string" && n.trim())
@@ -1747,27 +1755,27 @@ function Co(e, t) {
1747
1755
  }
1748
1756
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
1749
1757
  }
1750
- function _o(e) {
1758
+ function xo(e) {
1751
1759
  return `提交失败:${typeof e.error == "string" && e.error.trim() ? e.error.trim() : `回调 HTTP ${e.callback_status ?? "失败"}`}`;
1752
1760
  }
1753
1761
  function nn(e) {
1754
1762
  const t = tn(e.body);
1755
- return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: _o(t) } : e.ok ? { type: "success", message: "提交成功" } : {
1763
+ return (t == null ? void 0 : t.callback_ok) === !1 ? { type: "error", message: xo(t) } : e.ok ? { type: "success", message: "提交成功" } : {
1756
1764
  type: "error",
1757
- message: Co(e.status, e.body)
1765
+ message: _o(e.status, e.body)
1758
1766
  };
1759
1767
  }
1760
1768
  async function rn(e, t) {
1761
1769
  const n = en(e);
1762
1770
  if (n)
1763
1771
  throw new Error(n);
1764
- const r = Ao(t), o = await Xt(r, e, {
1772
+ const r = Co(t), o = await Xt(r, e, {
1765
1773
  ...t,
1766
1774
  headers: dt(t == null ? void 0 : t.headers, t == null ? void 0 : t.authStorage)
1767
1775
  }), i = tn(o.body);
1768
1776
  return o.ok && (i == null ? void 0 : i.callback_ok) === !1 ? { ok: !1, status: o.status, body: o.body } : o;
1769
1777
  }
1770
- function xo(e) {
1778
+ function To(e) {
1771
1779
  return {
1772
1780
  resumeUniqueId: e.resume_unique_id,
1773
1781
  resumeId: e.resume_id,
@@ -1788,7 +1796,7 @@ function xo(e) {
1788
1796
  }))
1789
1797
  };
1790
1798
  }
1791
- function To(e, t) {
1799
+ function Io(e, t) {
1792
1800
  const n = new URLSearchParams();
1793
1801
  n.set("page", String(t)), n.set("page_size", String(e.pageSize ?? 20));
1794
1802
  for (const r of e.names ?? [])
@@ -1799,27 +1807,27 @@ function To(e, t) {
1799
1807
  r && n.append("resume_unique_id", r);
1800
1808
  return n;
1801
1809
  }
1802
- function Io(e = {}) {
1810
+ function No(e = {}) {
1803
1811
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.searchPath ?? "/univ/resume/search", r = e.fetch ?? fetch;
1804
1812
  return async ({ filter: o, page: i }) => {
1805
- const a = await pt(e), s = To(o, i), l = await r(`${t}${n}?${s.toString()}`, {
1813
+ const a = await pt(e), s = Io(o, i), l = await r(`${t}${n}?${s.toString()}`, {
1806
1814
  method: "GET",
1807
1815
  headers: a
1808
1816
  }), u = await lt(l);
1809
1817
  return {
1810
- list: (u.list ?? []).map(xo),
1818
+ list: (u.list ?? []).map(To),
1811
1819
  total: u.total ?? 0,
1812
1820
  page: u.page ?? i,
1813
1821
  pageSize: u.page_size ?? o.pageSize ?? 20
1814
1822
  };
1815
1823
  };
1816
1824
  }
1817
- function No(e) {
1825
+ function Mo(e) {
1818
1826
  var r, o, i, a;
1819
1827
  const t = !!((r = e.flowUniqueIds) != null && r.length), n = !!((o = e.agentUniqueId) != null && o.trim() && ((i = e.flowType) != null && i.trim()) && ((a = e.category) != null && a.trim()));
1820
1828
  return t || n;
1821
1829
  }
1822
- function Mo(e) {
1830
+ function Fo(e) {
1823
1831
  return {
1824
1832
  caseUniqueId: e.case_unique_id,
1825
1833
  caseId: e.case_id,
@@ -1830,7 +1838,7 @@ function Mo(e) {
1830
1838
  description: e.description ?? void 0
1831
1839
  };
1832
1840
  }
1833
- function Fo(e, t, n) {
1841
+ function Uo(e, t, n) {
1834
1842
  var o, i, a;
1835
1843
  const r = new URLSearchParams();
1836
1844
  r.set("page", String(t)), r.set("page_size", String(e.pageSize ?? 20)), r.set("published", String(n)), (o = e.agentUniqueId) != null && o.trim() && r.set("agent_unique_id", e.agentUniqueId.trim()), (i = e.flowType) != null && i.trim() && r.set("flow_type", e.flowType.trim()), (a = e.category) != null && a.trim() && r.set("category_unique_id", e.category.trim());
@@ -1838,24 +1846,24 @@ function Fo(e, t, n) {
1838
1846
  s && r.append("flow_unique_ids", s);
1839
1847
  return r;
1840
1848
  }
1841
- function Uo(e = {}) {
1849
+ function Eo(e = {}) {
1842
1850
  const t = (e.baseUrl ?? "/api/v1").replace(/\/$/, ""), n = e.listPath ?? "/univ/case/list", r = e.fetch ?? fetch, o = e.published ?? 1;
1843
1851
  return async ({ filter: i, page: a }) => {
1844
- if (!No(i))
1852
+ if (!Mo(i))
1845
1853
  return { list: [], total: 0, page: 1, pageSize: i.pageSize ?? 20 };
1846
- const s = await pt(e), l = Fo(i, a, o), u = await r(`${t}${n}?${l.toString()}`, {
1854
+ const s = await pt(e), l = Uo(i, a, o), u = await r(`${t}${n}?${l.toString()}`, {
1847
1855
  method: "GET",
1848
1856
  headers: s
1849
1857
  }), m = await lt(u);
1850
1858
  return {
1851
- list: (m.list ?? []).map(Mo),
1859
+ list: (m.list ?? []).map(Fo),
1852
1860
  total: m.total ?? 0,
1853
1861
  page: m.page ?? a,
1854
1862
  pageSize: m.page_size ?? i.pageSize ?? 20
1855
1863
  };
1856
1864
  };
1857
1865
  }
1858
- function Pi(e = {}) {
1866
+ function wi(e = {}) {
1859
1867
  var r, o, i, a;
1860
1868
  const t = {
1861
1869
  baseUrl: e.baseUrl,
@@ -1864,15 +1872,15 @@ function Pi(e = {}) {
1864
1872
  authStorage: e.authStorage
1865
1873
  };
1866
1874
  return {
1867
- fetchDetail: bo({
1875
+ fetchDetail: ko({
1868
1876
  ...t,
1869
1877
  detailPath: (r = e.form) == null ? void 0 : r.detailPath
1870
1878
  }).fetchDetail,
1871
- resumeSearch: Io({
1879
+ resumeSearch: No({
1872
1880
  ...t,
1873
1881
  searchPath: (o = e.resume) == null ? void 0 : o.searchPath
1874
1882
  }),
1875
- caseSearch: Uo({
1883
+ caseSearch: Eo({
1876
1884
  ...t,
1877
1885
  listPath: (i = e.case) == null ? void 0 : i.listPath,
1878
1886
  published: (a = e.case) == null ? void 0 : a.published
@@ -1890,7 +1898,7 @@ function on(e, t) {
1890
1898
  function an(e) {
1891
1899
  return e == null ? !0 : typeof e == "string" ? !e.trim() : !1;
1892
1900
  }
1893
- function Eo(e, t) {
1901
+ function Po(e, t) {
1894
1902
  switch (e.type) {
1895
1903
  case "multiselect":
1896
1904
  case "checkbox":
@@ -1909,13 +1917,13 @@ function Eo(e, t) {
1909
1917
  function Ge(e, t) {
1910
1918
  return e.required === !0 || t > 0;
1911
1919
  }
1912
- function Po(e, t) {
1920
+ function wo(e, t) {
1913
1921
  var n, r;
1914
1922
  for (const o of e) {
1915
1923
  const i = (n = o.name) == null ? void 0 : n.trim();
1916
1924
  if (!i || Fe(o.type) || Ce(o.type)) continue;
1917
1925
  const a = t[i], s = ((r = o.label) == null ? void 0 : r.trim()) || i;
1918
- if (o.required && Eo(o, a))
1926
+ if (o.required && Po(o, a))
1919
1927
  return { fieldName: i, label: s, message: `请填写「${s}」` };
1920
1928
  if (o.type === "email" && !an(a)) {
1921
1929
  const l = String(a).trim();
@@ -1952,7 +1960,7 @@ function Po(e, t) {
1952
1960
  }
1953
1961
  return null;
1954
1962
  }
1955
- const wo = {
1963
+ const Ro = {
1956
1964
  video: En,
1957
1965
  audio: Un,
1958
1966
  image: Fn,
@@ -1960,12 +1968,12 @@ const wo = {
1960
1968
  spreadsheet: Mn,
1961
1969
  document: Ft
1962
1970
  };
1963
- function Ro({
1971
+ function zo({
1964
1972
  type: e,
1965
1973
  size: t = 40,
1966
1974
  className: n
1967
1975
  }) {
1968
- const r = wo[e] ?? Ut;
1976
+ const r = Ro[e] ?? Ut;
1969
1977
  return /* @__PURE__ */ c(
1970
1978
  r,
1971
1979
  {
@@ -1975,7 +1983,7 @@ function Ro({
1975
1983
  }
1976
1984
  );
1977
1985
  }
1978
- const sn = "skopon-form-v0_9", zo = /* @__PURE__ */ new Set([
1986
+ const sn = "skopon-form-v0_9", Bo = /* @__PURE__ */ new Set([
1979
1987
  "SkoponMedia",
1980
1988
  "SkoponSelect",
1981
1989
  "Image",
@@ -1987,8 +1995,8 @@ const sn = "skopon-form-v0_9", zo = /* @__PURE__ */ new Set([
1987
1995
  "FileUpload",
1988
1996
  "TextField",
1989
1997
  "Text",
1990
- ...Lr()
1991
- ]), Bo = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
1998
+ ...jr()
1999
+ ]), qo = /* @__PURE__ */ new Set(["h1", "h2", "h3", "h4", "h5", "caption"]);
1992
2000
  function he(e) {
1993
2001
  const t = [...Ae.components.values()].find((n) => n.name === e);
1994
2002
  if (!t) throw new Error(`Missing basic catalog component: ${e}`);
@@ -2054,7 +2062,7 @@ function we(e, t) {
2054
2062
  placeholder: M(e.placeholder)
2055
2063
  };
2056
2064
  }
2057
- const qo = {
2065
+ const Oo = {
2058
2066
  name: "SkoponMedia",
2059
2067
  schema: f.object({
2060
2068
  mediaType: f.any().optional(),
@@ -2064,19 +2072,19 @@ const qo = {
2064
2072
  help: f.any().optional(),
2065
2073
  placeholder: f.any().optional()
2066
2074
  }).passthrough()
2067
- }, Oo = J(qo, ({ context: e }) => {
2075
+ }, Vo = J(Oo, ({ context: e }) => {
2068
2076
  const t = e.componentModel.properties, n = M(t.mediaType);
2069
2077
  return /* @__PURE__ */ c(Pe, { ...we(t, n === "video" ? "video" : n === "audio" ? "audio" : "image") });
2070
- }), Vo = J(
2078
+ }), Lo = J(
2071
2079
  { name: "Image", schema: he("Image") },
2072
2080
  ({ context: e }) => /* @__PURE__ */ c(Pe, { ...we(e.componentModel.properties, "image") })
2073
- ), Lo = J(
2081
+ ), jo = J(
2074
2082
  { name: "Video", schema: he("Video") },
2075
2083
  ({ context: e }) => /* @__PURE__ */ c(Pe, { ...we(e.componentModel.properties, "video") })
2076
- ), jo = J(
2084
+ ), $o = J(
2077
2085
  { name: "AudioPlayer", schema: he("AudioPlayer") },
2078
2086
  ({ context: e }) => /* @__PURE__ */ c(Pe, { ...we(e.componentModel.properties, "audio") })
2079
- ), $o = {
2087
+ ), Do = {
2080
2088
  name: "SkoponSelect",
2081
2089
  schema: f.object({
2082
2090
  label: f.any().optional(),
@@ -2086,7 +2094,7 @@ const qo = {
2086
2094
  value: f.any().optional()
2087
2095
  }).passthrough()
2088
2096
  };
2089
- function Do({ context: e }) {
2097
+ function Ho({ context: e }) {
2090
2098
  const { interactive: t } = ee(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = te(e, "value", {
2091
2099
  component: "SkoponSelect",
2092
2100
  changeAction: "select"
@@ -2112,11 +2120,11 @@ function Do({ context: e }) {
2112
2120
  )
2113
2121
  ] });
2114
2122
  }
2115
- const Ho = J(
2116
- $o,
2117
- Do
2123
+ const Ko = J(
2124
+ Do,
2125
+ Ho
2118
2126
  );
2119
- function Ko({ context: e }) {
2127
+ function Go({ context: e }) {
2120
2128
  const { interactive: t } = ee(), { value: n, setValue: r, setValueSilent: o, fieldName: i } = te(e, "value", {
2121
2129
  component: "ChoicePicker",
2122
2130
  changeAction: "select"
@@ -2172,7 +2180,7 @@ function Ko({ context: e }) {
2172
2180
  )
2173
2181
  ] });
2174
2182
  }
2175
- const Go = J(
2183
+ const Jo = J(
2176
2184
  {
2177
2185
  name: "ChoicePicker",
2178
2186
  schema: f.object({
@@ -2184,9 +2192,9 @@ const Go = J(
2184
2192
  placeholder: f.any().optional()
2185
2193
  }).passthrough()
2186
2194
  },
2187
- Ko
2195
+ Go
2188
2196
  );
2189
- function Jo({ context: e }) {
2197
+ function Wo({ context: e }) {
2190
2198
  const { interactive: t } = ee(), { value: n, setValue: r, fieldName: o } = te(e, "value", {
2191
2199
  component: "CheckBox",
2192
2200
  changeAction: "change"
@@ -2204,11 +2212,11 @@ function Jo({ context: e }) {
2204
2212
  )
2205
2213
  ] });
2206
2214
  }
2207
- const Wo = J(
2215
+ const Yo = J(
2208
2216
  { name: "CheckBox", schema: he("CheckBox") },
2209
- Jo
2217
+ Wo
2210
2218
  );
2211
- function Yo(e, t, n) {
2219
+ function Qo(e, t, n) {
2212
2220
  const r = ce(e);
2213
2221
  if (!r) return;
2214
2222
  if (!t && n) {
@@ -2218,11 +2226,11 @@ function Yo(e, t, n) {
2218
2226
  const o = At(r);
2219
2227
  return o.isValid() ? o : void 0;
2220
2228
  }
2221
- function Qo({ context: e }) {
2229
+ function Xo({ context: e }) {
2222
2230
  const { interactive: t } = ee(), { value: n, setValue: r, fieldName: o, reportFocus: i } = te(e, "value", {
2223
2231
  component: "DateTimeInput",
2224
2232
  changeAction: "change"
2225
- }), a = e.componentModel.properties, s = M(a.label), l = M(a.placeholder), u = a.enableDate === !0, m = a.enableTime === !0, d = Yo(n, u, m), y = (g) => {
2233
+ }), a = e.componentModel.properties, s = M(a.label), l = M(a.placeholder), u = a.enableDate === !0, m = a.enableTime === !0, d = Qo(n, u, m), y = (g) => {
2226
2234
  if (!g) {
2227
2235
  r("");
2228
2236
  return;
@@ -2265,7 +2273,7 @@ function Qo({ context: e }) {
2265
2273
  )
2266
2274
  ] });
2267
2275
  }
2268
- const Xo = J(
2276
+ const Zo = J(
2269
2277
  {
2270
2278
  name: "DateTimeInput",
2271
2279
  schema: f.object({
@@ -2278,8 +2286,8 @@ const Xo = J(
2278
2286
  max: f.any().optional()
2279
2287
  }).passthrough()
2280
2288
  },
2281
- Qo
2282
- ), Zo = {
2289
+ Xo
2290
+ ), ei = {
2283
2291
  name: "FileUpload",
2284
2292
  schema: f.object({
2285
2293
  label: f.any().optional(),
@@ -2291,7 +2299,7 @@ const Xo = J(
2291
2299
  value: f.any().optional()
2292
2300
  }).passthrough()
2293
2301
  };
2294
- function ei({ context: e }) {
2302
+ function ti({ context: e }) {
2295
2303
  const { interactive: t } = ee(), { value: n, setValue: r, fieldName: o } = te(e, "value", {
2296
2304
  component: "FileUpload",
2297
2305
  changeAction: "change"
@@ -2325,7 +2333,7 @@ function ei({ context: e }) {
2325
2333
  r(_);
2326
2334
  },
2327
2335
  children: [
2328
- /* @__PURE__ */ c("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ c(Ro, { type: d, size: 40 }) }),
2336
+ /* @__PURE__ */ c("p", { className: "form-file-upload-preview-icon", children: /* @__PURE__ */ c(zo, { type: d, size: 40 }) }),
2329
2337
  /* @__PURE__ */ c("p", { className: "form-file-upload-preview-text", children: "点击或拖拽文件到此处上传" })
2330
2338
  ]
2331
2339
  }
@@ -2340,11 +2348,11 @@ function ei({ context: e }) {
2340
2348
  ] })
2341
2349
  ] });
2342
2350
  }
2343
- const ti = J(
2344
- Zo,
2345
- ei
2351
+ const ni = J(
2352
+ ei,
2353
+ ti
2346
2354
  );
2347
- function ni({ context: e }) {
2355
+ function ri({ context: e }) {
2348
2356
  const { interactive: t } = ee(), { value: n, setValue: r, fieldName: o, reportFocus: i } = te(e, "value", {
2349
2357
  component: "TextField",
2350
2358
  changeAction: "change",
@@ -2425,7 +2433,7 @@ function ni({ context: e }) {
2425
2433
  g ? /* @__PURE__ */ c(X.Text, { type: "danger", className: "form-block-preview-help", children: g }) : null
2426
2434
  ] });
2427
2435
  }
2428
- const ri = J(
2436
+ const oi = J(
2429
2437
  {
2430
2438
  name: "TextField",
2431
2439
  schema: f.object({
@@ -2436,33 +2444,33 @@ const ri = J(
2436
2444
  value: f.any().optional()
2437
2445
  }).passthrough()
2438
2446
  },
2439
- ni
2447
+ ri
2440
2448
  );
2441
- function oi({ context: e }) {
2449
+ function ii({ context: e }) {
2442
2450
  const t = e.componentModel.properties, n = M(t.text), r = M(t.variant) || "body";
2443
- return Bo.has(r) ? r === "caption" ? /* @__PURE__ */ c(X.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ c("em", { children: n }) }) : /* @__PURE__ */ c(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ c(X.Paragraph, { className: "form-block-preview-paragraph", children: n });
2451
+ return qo.has(r) ? r === "caption" ? /* @__PURE__ */ c(X.Text, { type: "secondary", className: "form-block-preview-paragraph", children: /* @__PURE__ */ c("em", { children: n }) }) : /* @__PURE__ */ c(r, { className: "form-block-preview-heading", children: n }) : /* @__PURE__ */ c(X.Paragraph, { className: "form-block-preview-paragraph", children: n });
2444
2452
  }
2445
- const ii = J(
2453
+ const ai = J(
2446
2454
  { name: "Text", schema: he("Text") },
2447
- oi
2455
+ ii
2448
2456
  );
2449
2457
  function cn() {
2450
2458
  const t = [
2451
2459
  ...[...Ae.components.values()].filter(
2452
- (r) => !zo.has(r.name)
2460
+ (r) => !Bo.has(r.name)
2453
2461
  ),
2454
- Oo,
2455
- Ho,
2456
2462
  Vo,
2463
+ Ko,
2457
2464
  Lo,
2458
2465
  jo,
2459
- Go,
2460
- Wo,
2461
- Xo,
2462
- ti,
2463
- ri,
2464
- ii,
2465
- ...Vr()
2466
+ $o,
2467
+ Jo,
2468
+ Yo,
2469
+ Zo,
2470
+ ni,
2471
+ oi,
2472
+ ai,
2473
+ ...Lr()
2466
2474
  ], n = [...Ae.functions.values()];
2467
2475
  return new Pn(sn, t, n, Ae.themeSchema);
2468
2476
  }
@@ -2478,7 +2486,7 @@ const Z = {
2478
2486
  primaryHover: "#26997b",
2479
2487
  primaryActive: "#1d3b31",
2480
2488
  onPrimary: "#ffffff"
2481
- }, ai = {
2489
+ }, si = {
2482
2490
  cssVar: { key: "vidtempl" },
2483
2491
  token: {
2484
2492
  colorPrimary: Z.primarySolid,
@@ -2568,9 +2576,9 @@ function ue({
2568
2576
  locale: t,
2569
2577
  theme: n
2570
2578
  }) {
2571
- return /* @__PURE__ */ c(Tn, { theme: n ?? ai, locale: t, children: e });
2579
+ return /* @__PURE__ */ c(Tn, { theme: n ?? si, locale: t, children: e });
2572
2580
  }
2573
- const si = yn(
2581
+ const li = yn(
2574
2582
  function({
2575
2583
  doc: t,
2576
2584
  surfaceId: n = "skopon-form",
@@ -2597,7 +2605,7 @@ const si = yn(
2597
2605
  if (!y)
2598
2606
  return { surfaces: [], processor: null };
2599
2607
  try {
2600
- const h = JSON.parse(y), p = new Pt([cn()]), S = Qr(h, {
2608
+ const h = JSON.parse(y), p = new Pt([cn()]), S = Xr(h, {
2601
2609
  surfaceId: n,
2602
2610
  catalogId: sn
2603
2611
  });
@@ -2616,7 +2624,7 @@ const si = yn(
2616
2624
  const p = m.current;
2617
2625
  if (!p) return {};
2618
2626
  const S = (h ?? d.current).map((A) => A.trim()).filter(Boolean);
2619
- return to(p, n, S);
2627
+ return no(p, n, S);
2620
2628
  },
2621
2629
  setValues(h) {
2622
2630
  const p = m.current;
@@ -2641,7 +2649,7 @@ const si = yn(
2641
2649
  function ke() {
2642
2650
  return new Pt([cn()]);
2643
2651
  }
2644
- function wi({
2652
+ function Ri({
2645
2653
  messages: e,
2646
2654
  surfaceId: t = "skopon-form-stream",
2647
2655
  emptyHint: n = null,
@@ -2720,8 +2728,8 @@ function wi({
2720
2728
  });
2721
2729
  }, [e, t]), v.length === 0 ? /* @__PURE__ */ c(ue, { children: n }) : /* @__PURE__ */ c(ue, { children: /* @__PURE__ */ c(Qe, { resumeSearch: o, children: /* @__PURE__ */ c(Ye, { caseSearch: i, children: /* @__PURE__ */ c(We, { interactive: r, children: /* @__PURE__ */ c("div", { className: "a2ui-surface a2ui-container", children: v.map((h) => /* @__PURE__ */ c(Et, { surface: h }, h.id)) }) }) }) }) });
2722
2730
  }
2723
- const li = 100, ci = 3e4;
2724
- class ui {
2731
+ const ci = 100, ui = 3e4;
2732
+ class mi {
2725
2733
  constructor(t) {
2726
2734
  Q(this, "url");
2727
2735
  Q(this, "askUserMessageId");
@@ -2783,7 +2791,7 @@ class ui {
2783
2791
  }
2784
2792
  }
2785
2793
  enqueue(t) {
2786
- for (this.sendQueue.push(t); this.sendQueue.length > li; )
2794
+ for (this.sendQueue.push(t); this.sendQueue.length > ci; )
2787
2795
  this.sendQueue.shift();
2788
2796
  }
2789
2797
  flushQueue() {
@@ -2797,7 +2805,7 @@ class ui {
2797
2805
  if (this.closed) return;
2798
2806
  this.clearReconnectTimer();
2799
2807
  const t = Math.min(
2800
- ci,
2808
+ ui,
2801
2809
  1e3 * 2 ** Math.min(this.reconnectAttempt, 5)
2802
2810
  );
2803
2811
  this.reconnectAttempt += 1, this.reconnectTimer = setTimeout(() => {
@@ -2826,21 +2834,21 @@ class ui {
2826
2834
  function un(e) {
2827
2835
  return typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
2828
2836
  }
2829
- function mi(e, t) {
2837
+ function di(e, t) {
2830
2838
  if (!e) return !1;
2831
2839
  const n = e.querySelector(`[data-skopon-field="${un(t)}"]`);
2832
2840
  return n instanceof HTMLElement ? ((n.querySelector(
2833
2841
  'input, textarea, select, button, [tabindex]:not([tabindex="-1"])'
2834
2842
  ) ?? n).focus(), !0) : !1;
2835
2843
  }
2836
- function di(e, t) {
2844
+ function pi(e, t) {
2837
2845
  if (!e) return !1;
2838
2846
  const n = e.querySelector(`[data-skopon-field="${un(t)}"]`);
2839
2847
  return n instanceof HTMLElement ? ((n.querySelector(
2840
2848
  'button, [role="button"], .skopon-resume-select-card, input, label'
2841
2849
  ) ?? n).click(), !0) : !1;
2842
2850
  }
2843
- function pi(e, t, n) {
2851
+ function fi(e, t, n) {
2844
2852
  const r = e.action;
2845
2853
  if (r !== "change" && r !== "select" && r !== "focus" && r !== "click" && r !== "submit") {
2846
2854
  console.warn("[FormAutoControl] unknown action", r);
@@ -2848,10 +2856,8 @@ function pi(e, t, n) {
2848
2856
  }
2849
2857
  n.runAutoControl(() => {
2850
2858
  var a;
2851
- if (r === "submit") {
2852
- t.submit();
2853
- return;
2854
- }
2859
+ if (r === "submit")
2860
+ return t.submit();
2855
2861
  const o = typeof e.field == "string" ? e.field.trim() : "";
2856
2862
  if (!o) {
2857
2863
  console.warn("[FormAutoControl] missing field for action", r);
@@ -2872,21 +2878,21 @@ function pi(e, t, n) {
2872
2878
  return;
2873
2879
  }
2874
2880
  if (r === "focus") {
2875
- mi(t.rootElement, o), n.reportEvent({
2881
+ di(t.rootElement, o), n.reportEvent({
2876
2882
  action: "focus",
2877
2883
  component: i,
2878
2884
  field: o
2879
2885
  });
2880
2886
  return;
2881
2887
  }
2882
- di(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
2888
+ pi(t.rootElement, o) || console.warn("[FormAutoControl] click target not found", o);
2883
2889
  });
2884
2890
  }
2885
- function fi(e) {
2891
+ function hi(e) {
2886
2892
  const t = Ee(e);
2887
2893
  return t ? at(t.blocks) : e && typeof e == "object" && !Array.isArray(e) ? e : {};
2888
2894
  }
2889
- function hi({
2895
+ function gi({
2890
2896
  payload: e,
2891
2897
  callbackUrl: t,
2892
2898
  title: n,
@@ -2917,7 +2923,7 @@ function hi({
2917
2923
  if (!l) {
2918
2924
  u(!0);
2919
2925
  try {
2920
- const v = fi(e), C = ft({
2926
+ const v = hi(e), C = ft({
2921
2927
  context: g,
2922
2928
  payload: e,
2923
2929
  answer: v
@@ -2958,7 +2964,7 @@ function hi({
2958
2964
  /* @__PURE__ */ c("pre", { className: "skopon-form-curl-json", children: y })
2959
2965
  ] });
2960
2966
  }
2961
- function gi(e, t) {
2967
+ function yi(e, t) {
2962
2968
  if (t && typeof t == "object" && t !== null && "message" in t) {
2963
2969
  const n = t.message;
2964
2970
  if (typeof n == "string" && n.trim())
@@ -2966,7 +2972,7 @@ function gi(e, t) {
2966
2972
  }
2967
2973
  return typeof t == "string" && t.trim() ? `提交失败 (${e}): ${t.trim()}` : `提交失败 (${e})`;
2968
2974
  }
2969
- function yi({
2975
+ function vi({
2970
2976
  payload: e,
2971
2977
  formUniqueId: t,
2972
2978
  askUserMessageId: n,
@@ -3014,16 +3020,16 @@ function yi({
3014
3020
  V = !0;
3015
3021
  });
3016
3022
  }, [H, s]);
3017
- const I = R(() => Ee(e), [e]), F = R(() => I ? io(I, g ?? void 0) : null, [I, g]), ie = (F == null ? void 0 : F.matchedBlocks) ?? [], Y = !!(I && so(I) && ie.length === 0), b = R(() => Y && I ? lo(I) : F && F.renderBlocks.length > 0 ? F.renderBlocks : [], [F, Y, I]), B = R(
3023
+ const I = R(() => Ee(e), [e]), F = R(() => I ? ao(I, g ?? void 0) : null, [I, g]), ie = (F == null ? void 0 : F.matchedBlocks) ?? [], Y = !!(I && lo(I) && ie.length === 0), b = R(() => Y && I ? co(I) : F && F.renderBlocks.length > 0 ? F.renderBlocks : [], [F, Y, I]), B = R(
3018
3024
  () => Y ? {} : at((F == null ? void 0 : F.extraBlocks) ?? []),
3019
3025
  [Y, F]
3020
- ), $ = R(() => Y && I ? co(I) : b.filter((V) => {
3026
+ ), $ = R(() => Y && I ? uo(I) : b.filter((V) => {
3021
3027
  var q;
3022
3028
  return (q = V.name) == null ? void 0 : q.trim();
3023
3029
  }).map((V) => V.name.trim()), [Y, I, b]), U = R(() => {
3024
3030
  if (b.length === 0) return null;
3025
3031
  const V = (F == null ? void 0 : F.title) ?? (I == null ? void 0 : I.title) ?? "", q = (F == null ? void 0 : F.description) ?? (I == null ? void 0 : I.description) ?? "";
3026
- return Zr({ title: V, description: q }, b);
3032
+ return eo({ title: V, description: q }, b);
3027
3033
  }, [F, I, b]), mn = H ? `ask-user-${H}` : "ask-user-payload", ge = !!(!h && I && b.length > 0 && U);
3028
3034
  w(() => (d(ge), () => d(!1)), [ge, d]);
3029
3035
  const Re = L(async () => {
@@ -3031,7 +3037,7 @@ function yi({
3031
3037
  if (!S) {
3032
3038
  A(!0);
3033
3039
  try {
3034
- const ae = ((V = x.current) == null ? void 0 : V.getValues($)) ?? {}, ve = Po(b, ae);
3040
+ const ae = ((V = x.current) == null ? void 0 : V.getValues($)) ?? {}, ve = wo(b, ae);
3035
3041
  if (ve) {
3036
3042
  (q = T.current) == null || q.call(T, "error", ve.message);
3037
3043
  return;
@@ -3050,7 +3056,7 @@ function yi({
3050
3056
  headers: K
3051
3057
  });
3052
3058
  if (!z.current) return;
3053
- Be.ok ? (ye = T.current) == null || ye.call(T, "success", "提交成功") : (yt = T.current) == null || yt.call(T, "error", gi(Be.status, Be.body));
3059
+ Be.ok ? (ye = T.current) == null || ye.call(T, "success", "提交成功") : (yt = T.current) == null || yt.call(T, "error", yi(Be.status, Be.body));
3054
3060
  return;
3055
3061
  }
3056
3062
  const dn = ft({
@@ -3089,7 +3095,7 @@ function yi({
3089
3095
  ht.current = Re;
3090
3096
  const gt = L(
3091
3097
  (V) => {
3092
- pi(
3098
+ fi(
3093
3099
  V,
3094
3100
  {
3095
3101
  setValues: (q) => {
@@ -3118,7 +3124,7 @@ function yi({
3118
3124
  }
3119
3125
  return y(gt), () => y(null);
3120
3126
  }, [ge, gt, y]), h ? /* @__PURE__ */ c("div", { className: "ask-user-form-card", children: /* @__PURE__ */ c(tt, { size: "small" }) }) : !I || b.length === 0 ? /* @__PURE__ */ c(
3121
- hi,
3127
+ gi,
3122
3128
  {
3123
3129
  payload: e,
3124
3130
  callbackUrl: r,
@@ -3136,7 +3142,7 @@ function yi({
3136
3142
  children: [
3137
3143
  v && H ? /* @__PURE__ */ c("div", { className: "ask-user-form-card-status", children: /* @__PURE__ */ c(se, { title: H, children: /* @__PURE__ */ c(le, { className: "ask-user-curl-unpublished-tag", children: "卡片 ID 未发布" }) }) }) : null,
3138
3144
  /* @__PURE__ */ c(
3139
- si,
3145
+ li,
3140
3146
  {
3141
3147
  ref: x,
3142
3148
  doc: U,
@@ -3169,9 +3175,9 @@ function yi({
3169
3175
  }
3170
3176
  );
3171
3177
  }
3172
- function Ri(e) {
3178
+ function zi(e) {
3173
3179
  var d;
3174
- const t = ((d = e.askUserMessageId) == null ? void 0 : d.trim()) ?? "", n = R(() => So(), []), [r, o] = E(!1), [i, a] = E(null), s = P(null), l = L((y) => {
3180
+ const t = ((d = e.askUserMessageId) == null ? void 0 : d.trim()) ?? "", n = R(() => bo(), []), [r, o] = E(!1), [i, a] = E(null), s = P(null), l = L((y) => {
3175
3181
  o(y);
3176
3182
  }, []), u = L(
3177
3183
  (y) => {
@@ -3184,7 +3190,7 @@ function Ri(e) {
3184
3190
  a(null);
3185
3191
  return;
3186
3192
  }
3187
- const y = new ui({
3193
+ const y = new mi({
3188
3194
  url: n,
3189
3195
  askUserMessageId: t,
3190
3196
  onAutoControl: (g) => {
@@ -3195,8 +3201,8 @@ function Ri(e) {
3195
3201
  return y.connect(), a(y), () => {
3196
3202
  y.close(), a(null);
3197
3203
  };
3198
- }, [m, n, t]), /* @__PURE__ */ c(ue, { children: /* @__PURE__ */ c(pr, { client: i, children: /* @__PURE__ */ c(
3199
- yi,
3204
+ }, [m, n, t]), /* @__PURE__ */ c(ue, { children: /* @__PURE__ */ c(fr, { client: i, children: /* @__PURE__ */ c(
3205
+ vi,
3200
3206
  {
3201
3207
  ...e,
3202
3208
  onSurfaceReadyChange: l,
@@ -3205,61 +3211,61 @@ function Ri(e) {
3205
3211
  ) }) });
3206
3212
  }
3207
3213
  export {
3208
- Mi as A2UI_PROTOCOL_VERSION,
3209
- Ri as AskUserFormCard,
3214
+ Fi as A2UI_PROTOCOL_VERSION,
3215
+ zi as AskUserFormCard,
3210
3216
  Ye as CaseSearchProvider,
3211
- hi as CurlSubmitBlock,
3212
- go as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
3213
- fo as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
3214
- ho as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
3217
+ gi as CurlSubmitBlock,
3218
+ yo as DEFAULT_ANSWER_AGENT_CALLBACK_URL,
3219
+ ho as DEFAULT_AUTH_ANSWER_AGENT_CALLBACK_URL_FIELD,
3220
+ go as DEFAULT_AUTH_REALTIME_WS_URL_FIELD,
3215
3221
  ct as DEFAULT_AUTH_STORAGE_KEY,
3216
- po as DEFAULT_AUTH_TOKEN_FIELD,
3222
+ fo as DEFAULT_AUTH_TOKEN_FIELD,
3217
3223
  wn as FORM_MEDIA_SIZES,
3218
3224
  Qe as ResumeSearchProvider,
3219
- wi as SkoponA2uiStreamRenderer,
3225
+ Ri as SkoponA2uiStreamRenderer,
3220
3226
  ue as SkoponFormProvider,
3221
- si as SkoponFormRenderer,
3222
- Yr as a2uiToBlocks,
3227
+ li as SkoponFormRenderer,
3228
+ Qr as a2uiToBlocks,
3223
3229
  Gt as blocksToA2ui,
3224
3230
  ft as buildAnswerAgentBody,
3225
- uo as buildAskUserCurlBodyJson,
3226
- mo as buildAskUserCurlStatement,
3227
- Fi as buildAskUserSubmitCurlFromPayload,
3228
- Zr as buildAskUserSurface,
3231
+ mo as buildAskUserCurlBodyJson,
3232
+ po as buildAskUserCurlStatement,
3233
+ Ui as buildAskUserSubmitCurlFromPayload,
3234
+ eo as buildAskUserSurface,
3229
3235
  Qt as buildCurlStatement,
3230
- Ui as copyTextToClipboard,
3231
- Uo as createCaseSearchClient,
3232
- bo as createFormClient,
3233
- Io as createResumeSearchClient,
3234
- Pi as createSkoponSdkClients,
3236
+ Ei as copyTextToClipboard,
3237
+ Eo as createCaseSearchClient,
3238
+ ko as createFormClient,
3239
+ No as createResumeSearchClient,
3240
+ wi as createSkoponSdkClients,
3235
3241
  at as extractExtraBlockValues,
3236
- to as extractSurfaceValues,
3242
+ no as extractSurfaceValues,
3237
3243
  nn as formatAnswerAgentSubmitMessage,
3238
- co as getPayloadInputFieldNames,
3239
- lo as getPayloadRenderableBlocks,
3240
- io as intersectPayloadBlocksWithForm,
3244
+ uo as getPayloadInputFieldNames,
3245
+ co as getPayloadRenderableBlocks,
3246
+ ao as intersectPayloadBlocksWithForm,
3241
3247
  et as isA2uiSurfaceEmpty,
3242
3248
  ne as isInputBlockType,
3243
3249
  Fe as isLayoutBlockType,
3244
3250
  Ce as isMediaBlockType,
3245
- eo as mapFormDefinitionFromDto,
3251
+ to as mapFormDefinitionFromDto,
3246
3252
  re as normalizeFormDefinition,
3247
3253
  Ee as parsePayloadBlocksJson,
3248
- so as payloadHasInputBlocks,
3249
- vo as resolveAnswerAgentCallbackUrl,
3254
+ lo as payloadHasInputBlocks,
3255
+ So as resolveAnswerAgentCallbackUrl,
3250
3256
  pt as resolveClientHeaders,
3251
- So as resolveRealtimeWsUrl,
3257
+ bo as resolveRealtimeWsUrl,
3252
3258
  Zt as resolveSkoponAuthHeaders,
3253
3259
  dt as resolveSubmitAuthHeaders,
3254
- Xr as resolveSurfaceFromFormDefinition,
3255
- ai as skoponAntdTheme,
3260
+ Zr as resolveSurfaceFromFormDefinition,
3261
+ si as skoponAntdTheme,
3256
3262
  Z as skoponBrandColors,
3257
3263
  rn as submitAnswerAgent,
3258
3264
  Xt as submitFormJson,
3259
- Qr as surfaceDocToMessages,
3265
+ Xr as surfaceDocToMessages,
3260
3266
  _e as syncFormDefinition,
3261
- gr as useCaseSearch,
3262
- xr as useResumeSearch,
3267
+ yr as useCaseSearch,
3268
+ Tr as useResumeSearch,
3263
3269
  en as validateAnswerAgentBody,
3264
- Ei as validateAnswerAgentContext
3270
+ Pi as validateAnswerAgentContext
3265
3271
  };