@baishuyun/ai-feat-utils 2.0.44 → 2.0.45

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.
@@ -6,62 +6,62 @@ const y = (e) => {
6
6
  let t;
7
7
  try {
8
8
  t = JSON.parse(e.providerMetadata.raw.data);
9
- } catch (r) {
9
+ } catch (n) {
10
10
  console.error("invalid raw data");
11
11
  }
12
12
  return t || e.providerMetadata.raw.data;
13
- }, L = (e) => {
13
+ }, B = (e) => {
14
14
  if ((e == null ? void 0 : e.type) === "error")
15
15
  return !0;
16
16
  const t = y(e);
17
17
  return (t == null ? void 0 : t.type) === "agent-error";
18
- }, Fe = (e) => {
18
+ }, $e = (e) => {
19
19
  const t = y(e);
20
20
  return (t == null ? void 0 : t.type) === "agent-fake-msg";
21
- }, Re = (e) => (e == null ? void 0 : e.type) === "file", De = (e) => {
21
+ }, Te = (e) => (e == null ? void 0 : e.type) === "file", Oe = (e) => {
22
22
  const t = y(e);
23
23
  return (t == null ? void 0 : t.type) === "query-stream-parsed-info";
24
- }, Te = (e) => {
24
+ }, Pe = (e) => {
25
25
  const t = y(e);
26
26
  if ((t == null ? void 0 : t.type) !== "query-stream-parsed-info")
27
27
  return null;
28
- const r = t.result;
29
- console.log("query result raw data:", r);
28
+ const n = t.result;
29
+ console.log("query result raw data:", n);
30
30
  try {
31
- return JSON.parse(r);
32
- } catch (n) {
31
+ return JSON.parse(n);
32
+ } catch (r) {
33
33
  return console.error("invalid query result data"), null;
34
34
  }
35
- }, $e = (e) => {
35
+ }, Ie = (e) => {
36
36
  if (!Array.isArray(e))
37
37
  return !1;
38
38
  for (const t of e)
39
39
  if ((t == null ? void 0 : t.type) === "file")
40
40
  return !0;
41
41
  return !1;
42
- }, Oe = (e) => {
42
+ }, Le = (e) => {
43
43
  const t = y(e);
44
44
  return (t == null ? void 0 : t.type) === "agent-loading";
45
- }, Pe = (e) => {
45
+ }, We = (e) => {
46
46
  const t = y(e);
47
47
  return (t == null ? void 0 : t.type) !== "agent-loading" ? "" : (t == null ? void 0 : t.label) || "加载中";
48
- }, Ie = (e) => {
49
- if (!L(e))
48
+ }, Be = (e) => {
49
+ if (!B(e))
50
50
  return "";
51
51
  if (e != null && e.errorText)
52
52
  return e.errorText;
53
53
  const t = y(e);
54
54
  return (t == null ? void 0 : t.error) || "未知错误";
55
- }, Le = (e) => {
55
+ }, je = (e) => {
56
56
  if (e != null && e.errorText)
57
57
  return e.errorText;
58
58
  const t = y(e);
59
59
  return (t == null ? void 0 : t.error) || "未知错误";
60
- }, E = "data-shadow-slot-injected", v = "host-clone", W = (e) => {
60
+ }, M = "data-shadow-slot-injected", v = "host-clone", j = (e) => {
61
61
  try {
62
62
  const t = new CSSStyleSheet();
63
63
  t.replaceSync(e);
64
- const r = [], n = [], l = [];
64
+ const n = [], r = [], l = [];
65
65
  let a = [];
66
66
  const i = () => {
67
67
  a.length && (l.push(`@layer ${v} {
@@ -70,87 +70,87 @@ ${a.join(`
70
70
  }`), a = []);
71
71
  };
72
72
  for (const o of Array.from(t.cssRules))
73
- o instanceof CSSImportRule ? r.push(o.cssText) : o instanceof CSSFontFaceRule || o instanceof CSSKeyframesRule || typeof CSSPropertyRule != "undefined" && o instanceof CSSPropertyRule ? n.push(o.cssText) : o instanceof CSSLayerBlockRule ? (i(), l.push(o.cssText)) : a.push(o.cssText);
74
- return i(), [...r, ...n, ...l].join(`
73
+ o instanceof CSSImportRule ? n.push(o.cssText) : o instanceof CSSFontFaceRule || o instanceof CSSKeyframesRule || typeof CSSPropertyRule != "undefined" && o instanceof CSSPropertyRule ? r.push(o.cssText) : o instanceof CSSLayerBlockRule ? (i(), l.push(o.cssText)) : a.push(o.cssText);
74
+ return i(), [...n, ...r, ...l].join(`
75
75
  `);
76
76
  } catch (t) {
77
77
  return `@layer ${v} {
78
78
  ${e}
79
79
  }`;
80
80
  }
81
- }, We = (e, t) => {
82
- if (e.querySelector(`[${E}]`)) return;
83
- const r = [], n = [], l = (o) => {
81
+ }, Ue = (e, t) => {
82
+ if (e.querySelector(`[${M}]`)) return;
83
+ const n = [], r = [], l = (o) => {
84
84
  if (o instanceof HTMLLinkElement) {
85
85
  const s = `@import url("${o.href}") layer(${v})`;
86
- r.push(o.media ? `${s} ${o.media};` : `${s};`);
87
- } else o instanceof HTMLStyleElement && n.push(W(o.textContent || ""));
86
+ n.push(o.media ? `${s} ${o.media};` : `${s};`);
87
+ } else o instanceof HTMLStyleElement && r.push(j(o.textContent || ""));
88
88
  };
89
89
  document.head.querySelectorAll("style").forEach(l), document.head.querySelectorAll('link[rel="stylesheet"]').forEach(l);
90
90
  let a = t.parentNode;
91
91
  for (; a; )
92
92
  a instanceof ShadowRoot && (a.querySelectorAll("style").forEach(l), a.querySelectorAll('link[rel="stylesheet"]').forEach(l)), a = a.parentNode;
93
93
  const i = document.createElement("style");
94
- i.setAttribute(E, ""), i.textContent = [
94
+ i.setAttribute(M, ""), i.textContent = [
95
95
  `@layer ${v};`,
96
- ...r,
97
- ...n
96
+ ...n,
97
+ ...r
98
98
  ].join(`
99
99
  `), e.appendChild(i);
100
- }, _ = "data-bs-host-style", k = /* @__PURE__ */ new WeakMap(), N = (e, t) => e.replace(
100
+ }, x = "data-bs-host-style", k = /* @__PURE__ */ new WeakMap(), N = (e, t) => e.replace(
101
101
  /url\(\s*(?:"([^"\n]*)"|'([^'\n]*)'|([^\s)]*))\s*\)/gi,
102
- (r, n, l, a) => {
102
+ (n, r, l, a) => {
103
103
  var o;
104
- const i = (o = n != null ? n : l) != null ? o : a;
105
- if (!i || /^(?:data:|blob:|#|var\()/i.test(i)) return r;
104
+ const i = (o = r != null ? r : l) != null ? o : a;
105
+ if (!i || /^(?:data:|blob:|#|var\()/i.test(i)) return n;
106
106
  try {
107
107
  return `url(${JSON.stringify(new URL(i, t).href)})`;
108
108
  } catch (s) {
109
- return r;
109
+ return n;
110
110
  }
111
111
  }
112
- ), B = (e) => e.replace(/(^|,\s*)(?::root|html)(?=$|[\s>.:#\[])/g, "$1:host").replace(/:host\s+(?:>\s*)?body(?=$|[\s>.:#\[])/g, ":host > [data-bs-shadow-content]").replace(/(^|,\s*)body(?=$|[\s>.:#\[])/g, "$1[data-bs-shadow-content]"), C = (e, t) => Array.from(e).map((r) => {
113
- if (r.type === 1) {
114
- const n = r, l = r.cssText.slice(r.cssText.indexOf("{"));
115
- return B(n.selectorText) + N(l, t);
112
+ ), U = (e) => e.replace(/(^|,\s*)(?::root|html)(?=$|[\s>.:#\[])/g, "$1:host").replace(/:host\s+(?:>\s*)?body(?=$|[\s>.:#\[])/g, ":host > [data-bs-shadow-content]").replace(/(^|,\s*)body(?=$|[\s>.:#\[])/g, "$1[data-bs-shadow-content]"), C = (e, t) => Array.from(e).map((n) => {
113
+ if (n.type === 1) {
114
+ const r = n, l = n.cssText.slice(n.cssText.indexOf("{"));
115
+ return U(r.selectorText) + N(l, t);
116
116
  }
117
- return "cssRules" in r && r.type !== 7 ? r.cssText.slice(0, r.cssText.indexOf("{") + 1) + C(r.cssRules, t) + "}" : N(r.cssText, t);
117
+ return "cssRules" in n && n.type !== 7 ? n.cssText.slice(0, n.cssText.indexOf("{") + 1) + C(n.cssRules, t) + "}" : N(n.cssText, t);
118
118
  }).join(`
119
- `), M = (e) => {
120
- var n, l;
121
- const t = e.nodeType === 9 ? e : e.ownerDocument, r = [];
119
+ `), q = (e) => {
120
+ var r, l;
121
+ const t = e.nodeType === 9 ? e : e.ownerDocument, n = [];
122
122
  if (e.nodeType === 9 && t.body) {
123
- const a = t.defaultView.getComputedStyle(t.body), i = ["font", "color", "line-height", "letter-spacing", "text-align", "text-transform", "direction", "color-scheme"], o = Array.from(a).filter((p) => p.startsWith("--")), s = [...i, ...o].map((p) => `${p}:${a.getPropertyValue(p)};`).join("");
124
- r.push({ source: t, css: `:host {display:contents;${s}}`, media: "", nonce: "", classes: `${t.documentElement.className} ${t.body.className}` });
123
+ const a = t.defaultView.getComputedStyle(t.body), i = ["font", "color", "line-height", "letter-spacing", "text-align", "text-transform", "direction", "color-scheme"], o = Array.from(a).filter((m) => m.startsWith("--")), s = [...i, ...o].map((m) => `${m}:${a.getPropertyValue(m)};`).join("");
124
+ n.push({ source: t, css: `:host {display:contents;${s}}`, media: "", nonce: "", classes: `${t.documentElement.className} ${t.body.className}` });
125
125
  }
126
126
  for (const a of Array.from(e.querySelectorAll('style,link[rel~="stylesheet"]'))) {
127
- if (a.hasAttribute(_) || a.hasAttribute("data-bs-sdk-styles") || a.hasAttribute("data-shadow-slot-injected") || a.disabled || (n = a.sheet) != null && n.disabled) continue;
127
+ if (a.hasAttribute(x) || a.hasAttribute("data-bs-sdk-styles") || a.hasAttribute("data-shadow-slot-injected") || a.disabled || (r = a.sheet) != null && r.disabled) continue;
128
128
  const i = a.media || "", o = a.nonce || "";
129
129
  try {
130
130
  if (a.sheet) {
131
- r.push({ source: a, css: C(a.sheet.cssRules, a.sheet.href || a.baseURI), media: i, nonce: o });
131
+ n.push({ source: a, css: C(a.sheet.cssRules, a.sheet.href || a.baseURI), media: i, nonce: o });
132
132
  continue;
133
133
  }
134
134
  } catch (s) {
135
135
  if (a.tagName === "LINK") {
136
- r.push({ source: a, href: a.href, media: i, nonce: o });
136
+ n.push({ source: a, href: a.href, media: i, nonce: o });
137
137
  continue;
138
138
  }
139
139
  }
140
- a.tagName === "LINK" ? r.push({ source: a, href: a.href, media: i, nonce: o }) : r.push({ source: a, css: N(a.textContent || "", a.baseURI), media: i, nonce: o });
140
+ a.tagName === "LINK" ? n.push({ source: a, href: a.href, media: i, nonce: o }) : n.push({ source: a, css: N(a.textContent || "", a.baseURI), media: i, nonce: o });
141
141
  }
142
142
  for (const a of Array.from(e.adoptedStyleSheets || []))
143
- a.disabled || r.push({ source: a, css: C(a.cssRules, t.baseURI), media: a.media.mediaText, nonce: "" });
144
- return ((l = r[0]) == null ? void 0 : l.source) === t && r.push(r.shift()), r;
145
- }, j = (e) => {
143
+ a.disabled || n.push({ source: a, css: C(a.cssRules, t.baseURI), media: a.media.mediaText, nonce: "" });
144
+ return ((l = n[0]) == null ? void 0 : l.source) === t && n.push(n.shift()), n;
145
+ }, G = (e) => {
146
146
  const t = k.get(e);
147
147
  if (t) return t;
148
- const r = e.nodeType === 9 ? e : e.ownerDocument;
149
- let n = M(e), l = !1;
148
+ const n = e.nodeType === 9 ? e : e.ownerDocument;
149
+ let r = q(e), l = !1;
150
150
  const a = /* @__PURE__ */ new Set(), i = () => {
151
151
  l = !1;
152
- const u = M(e);
153
- u.length === n.length && u.every((c, b) => c.source === n[b].source && c.css === n[b].css && c.href === n[b].href && c.media === n[b].media && c.nonce === n[b].nonce && c.classes === n[b].classes) || (n = u, a.forEach((c) => c()));
152
+ const u = q(e);
153
+ u.length === r.length && u.every((c, b) => c.source === r[b].source && c.css === r[b].css && c.href === r[b].href && c.media === r[b].media && c.nonce === r[b].nonce && c.classes === r[b].classes) || (r = u, a.forEach((c) => c()));
154
154
  }, o = () => {
155
155
  l || (l = !0, queueMicrotask(() => {
156
156
  a.size && i();
@@ -158,68 +158,68 @@ ${e}
158
158
  }, s = new MutationObserver((u) => {
159
159
  u.some((c) => {
160
160
  const b = c.target.nodeType === 1 ? c.target : c.target.parentElement;
161
- return b != null && b.closest(`style[${_}],style[data-bs-sdk-styles]`) ? !1 : (b === r.documentElement || b === r.body) && c.type === "attributes" || b != null && b.matches('style,link[rel~="stylesheet"]') ? !0 : [...Array.from(c.addedNodes), ...Array.from(c.removedNodes)].some(
161
+ return b != null && b.closest(`style[${x}],style[data-bs-sdk-styles]`) ? !1 : (b === n.documentElement || b === n.body) && c.type === "attributes" || b != null && b.matches('style,link[rel~="stylesheet"]') ? !0 : [...Array.from(c.addedNodes), ...Array.from(c.removedNodes)].some(
162
162
  (h) => h.nodeType === 1 && (h.matches('style,link[rel~="stylesheet"]') || h.querySelector('style,link[rel~="stylesheet"]'))
163
163
  );
164
164
  }) && o();
165
165
  });
166
166
  s.observe(e, { childList: !0, subtree: !0, characterData: !0, attributes: !0, attributeFilter: ["href", "rel", "media", "disabled", "class", "style"] }), e.addEventListener("load", o, !0);
167
- const p = r.defaultView.setInterval(i, 1e3), d = {
168
- read: () => n,
167
+ const m = n.defaultView.setInterval(i, 1e3), d = {
168
+ read: () => r,
169
169
  refresh: o,
170
170
  subscribe(u) {
171
171
  return a.add(u), () => {
172
- a.delete(u), !a.size && (s.disconnect(), e.removeEventListener("load", o, !0), r.defaultView.clearInterval(p), k.delete(e));
172
+ a.delete(u), !a.size && (s.disconnect(), e.removeEventListener("load", o, !0), n.defaultView.clearInterval(m), k.delete(e));
173
173
  };
174
174
  }
175
175
  };
176
176
  return k.set(e, d), d;
177
- }, Be = (e, t) => {
178
- const r = [t.ownerDocument];
179
- let n = t.getRootNode();
180
- for (; n.nodeType === 11 && "host" in n; ) {
181
- const d = n;
182
- d.host.getAttribute("data-bs-style-mode") !== "sdk" && r.splice(1, 0, d), n = d.host.getRootNode();
177
+ }, Ge = (e, t) => {
178
+ const n = [t.ownerDocument];
179
+ let r = t.getRootNode();
180
+ for (; r.nodeType === 11 && "host" in r; ) {
181
+ const d = r;
182
+ d.host.getAttribute("data-bs-style-mode") !== "sdk" && n.splice(1, 0, d), r = d.host.getRootNode();
183
183
  }
184
- const l = r.map(j), a = t.ownerDocument.createComment("host styles");
184
+ const l = n.map(G), a = t.ownerDocument.createComment("host styles");
185
185
  e.prepend(a);
186
186
  const i = /* @__PURE__ */ new Map(), o = () => {
187
- var x;
188
- const d = l.reduce((f, g) => f.concat(g.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((x = t.ownerDocument.body) == null ? void 0 : x.className) || ""}`;
187
+ var E;
188
+ const d = l.reduce((p, f) => p.concat(f.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((E = t.ownerDocument.body) == null ? void 0 : E.className) || ""}`;
189
189
  u && u.className !== c && (u.className = c);
190
- const b = new Set(d.map((f) => f.source));
191
- for (const [f, g] of i) b.has(f) || (g.remove(), i.delete(f));
190
+ const b = new Set(d.map((p) => p.source));
191
+ for (const [p, f] of i) b.has(p) || (f.remove(), i.delete(p));
192
192
  let h = a;
193
- for (const f of d) {
194
- let g = i.get(f.source);
195
- const I = f.href ? "LINK" : "STYLE";
196
- if (g && g.tagName !== I && (g.remove(), i.delete(f.source), g = void 0), g || (g = t.ownerDocument.createElement(f.href ? "link" : "style"), g.setAttribute(_, ""), i.set(f.source, g)), g.media = f.media, g.nonce = f.nonce, f.href) {
197
- const A = g;
198
- A.rel = "stylesheet", A.href !== f.href && (A.href = f.href);
199
- } else g.textContent !== f.css && (g.textContent = f.css || "");
200
- h.nextSibling !== g && h.after(g), h = g;
193
+ for (const p of d) {
194
+ let f = i.get(p.source);
195
+ const W = p.href ? "LINK" : "STYLE";
196
+ if (f && f.tagName !== W && (f.remove(), i.delete(p.source), f = void 0), f || (f = t.ownerDocument.createElement(p.href ? "link" : "style"), f.setAttribute(x, ""), i.set(p.source, f)), f.media = p.media, f.nonce = p.nonce, p.href) {
197
+ const A = f;
198
+ A.rel = "stylesheet", A.href !== p.href && (A.href = p.href);
199
+ } else f.textContent !== p.css && (f.textContent = p.css || "");
200
+ h.nextSibling !== f && h.after(f), h = f;
201
201
  }
202
202
  }, s = l.map((d) => d.subscribe(o));
203
203
  o();
204
- const p = new MutationObserver((d) => {
204
+ const m = new MutationObserver((d) => {
205
205
  d.some((u) => {
206
206
  const c = u.target.nodeType === 1 ? u.target : u.target.parentElement;
207
207
  return c && !c.closest("style,link");
208
208
  }) && l.forEach((u) => u.refresh());
209
209
  });
210
- return p.observe(e, { subtree: !0, childList: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] }), () => {
211
- p.disconnect(), s.forEach((d) => d()), i.forEach((d) => d.remove()), a.remove();
210
+ return m.observe(e, { subtree: !0, childList: !0, characterData: !0, attributes: !0, attributeFilter: ["class"] }), () => {
211
+ m.disconnect(), s.forEach((d) => d()), i.forEach((d) => d.remove()), a.remove();
212
212
  };
213
213
  };
214
- function U(e) {
214
+ function H(e) {
215
215
  return Array.isArray(e) ? e.every((t) => typeof t == "string") : !1;
216
216
  }
217
- function G(e) {
217
+ function z(e) {
218
218
  return Array.isArray(e) ? e.every(
219
219
  (t) => typeof t == "object" && t !== null && "label" in t && "value" in t && typeof t.label == "string" && typeof t.value == "string"
220
220
  ) : !1;
221
221
  }
222
- const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ") : e, H = /* @__PURE__ */ new Set([
222
+ const He = (e) => H(e) ? e.join(", ") : z(e) ? e.map((n) => n.value).join(", ") : e, Q = /* @__PURE__ */ new Set([
223
223
  "password",
224
224
  "textarea",
225
225
  "datetime",
@@ -230,16 +230,16 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
230
230
  "combocheck",
231
231
  "checkboxgroup",
232
232
  "number"
233
- ]), Ue = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? H.has(t.widget.type) : !1) : [], z = (e) => (t) => {
234
- const r = y(t);
235
- return (r == null ? void 0 : r.type) === e;
236
- }, Ge = (e) => (t) => {
237
- const r = t, n = r == null ? void 0 : r.part;
238
- return z(e)(n);
239
- }, He = (e) => (t) => {
240
- const r = y(t);
241
- return (r == null ? void 0 : r.type) !== e ? null : (r == null ? void 0 : r.field) || null;
242
- }, ze = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Qe = (e) => {
233
+ ]), ze = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? Q.has(t.widget.type) : !1) : [], Y = (e) => (t) => {
234
+ const n = y(t);
235
+ return (n == null ? void 0 : n.type) === e;
236
+ }, Qe = (e) => (t) => {
237
+ const n = t, r = n == null ? void 0 : n.part;
238
+ return Y(e)(r);
239
+ }, Ye = (e) => (t) => {
240
+ const n = y(t);
241
+ return (n == null ? void 0 : n.type) !== e ? null : (n == null ? void 0 : n.field) || null;
242
+ }, Ke = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Ve = (e) => {
243
243
  if (typeof e != "string")
244
244
  return e;
245
245
  try {
@@ -247,14 +247,14 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
247
247
  } catch (t) {
248
248
  return console.info("[safeParseJson] Failed to parse JSON:", t), null;
249
249
  }
250
- }, q = (e) => !!(e && typeof e == "object" && e.qnKey), Ye = (e) => {
251
- var n, l;
252
- const t = (n = e == null ? void 0 : e.widget) == null ? void 0 : n.value, r = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.type;
253
- return t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "number" && Number.isNaN(t) || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0 ? !1 : r === "signature" ? q(t) : r === "upload" || r === "image" ? Array.isArray(t) && t.length > 0 && t.every(q) : !0;
254
- }, Q = (e = "_widget_") => {
255
- const t = Date.now(), r = String(t), n = r.length, l = r.slice(0, n - 5), a = String(Math.floor(Math.random() * 1e5)).padStart(5, "0");
250
+ }, F = (e) => !!(e && typeof e == "object" && e.qnKey), Xe = (e) => {
251
+ var r, l;
252
+ const t = (r = e == null ? void 0 : e.widget) == null ? void 0 : r.value, n = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.type;
253
+ return t == null || t === "" || Array.isArray(t) && t.length === 0 || typeof t == "number" && Number.isNaN(t) || typeof t == "object" && !Array.isArray(t) && Object.keys(t).length === 0 ? !1 : n === "signature" ? F(t) : n === "upload" || n === "image" ? Array.isArray(t) && t.length > 0 && t.every(F) : !0;
254
+ }, K = (e = "_widget_") => {
255
+ const t = Date.now(), n = String(t), r = n.length, l = n.slice(0, r - 5), a = String(Math.floor(Math.random() * 1e5)).padStart(5, "0");
256
256
  return `${e}${l}${a}`;
257
- }, Ke = (e, t) => ({
257
+ }, Ze = (e, t) => ({
258
258
  field: e,
259
259
  onLoaded: () => {
260
260
  t.fillWidget({
@@ -262,22 +262,22 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
262
262
  field: e
263
263
  });
264
264
  },
265
- onChange: (r, n, l, a) => {
265
+ onChange: (n, r, l, a) => {
266
266
  const i = {
267
- field: n,
268
- checked: r,
267
+ field: r,
268
+ checked: n,
269
269
  parentFieldName: l,
270
270
  rowIndex: a
271
271
  };
272
272
  t.fillWidget(i);
273
273
  }
274
- }), Ve = 10, Xe = (e, t = "image/png") => new Promise((r) => {
275
- const n = new Image();
276
- n.crossOrigin = "anonymous", n.onload = () => {
274
+ }), Je = 10, et = (e, t = "image/png") => new Promise((n) => {
275
+ const r = new Image();
276
+ r.crossOrigin = "anonymous", r.onload = () => {
277
277
  const l = document.createElement("canvas");
278
- l.width = n.naturalWidth, l.height = n.naturalHeight, l.getContext("2d").drawImage(n, 0, 0), r(l.toDataURL(t));
279
- }, n.onerror = () => r(e), n.src = e;
280
- }), Y = {
278
+ l.width = r.naturalWidth, l.height = r.naturalHeight, l.getContext("2d").drawImage(r, 0, 0), n(l.toDataURL(t));
279
+ }, r.onerror = () => n(e), r.src = e;
280
+ }), V = {
281
281
  eq: "等于",
282
282
  neq: "不等于",
283
283
  gt: "大于",
@@ -294,7 +294,7 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
294
294
  range: "选择范围",
295
295
  like: "模糊匹配",
296
296
  unlike: "模糊不匹配"
297
- }, K = {
297
+ }, X = {
298
298
  usergroup: { in: "包含任意一个" },
299
299
  deptgroup: { in: "包含任意一个" },
300
300
  checkboxgroup: { in: "包含任意一个" },
@@ -302,12 +302,12 @@ const je = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ")
302
302
  address: { in: "属于", nin: "不属于" },
303
303
  location: { in: "包含", nin: "不包含" }
304
304
  };
305
- function Ze(e, t) {
306
- var n, l;
307
- const r = t ? K[t] : void 0;
308
- return (l = (n = r == null ? void 0 : r[e]) != null ? n : Y[e]) != null ? l : e;
305
+ function tt(e, t) {
306
+ var r, l;
307
+ const n = t ? X[t] : void 0;
308
+ return (l = (r = n == null ? void 0 : n[e]) != null ? r : V[e]) != null ? l : e;
309
309
  }
310
- const V = {
310
+ const Z = {
311
311
  // Text-like: equality, fuzzy, empty checks
312
312
  text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
313
313
  password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
@@ -351,7 +351,7 @@ const V = {
351
351
  button: [],
352
352
  subform: [],
353
353
  unknown: []
354
- }, X = {
354
+ }, J = {
355
355
  text: "eq",
356
356
  password: "eq",
357
357
  radiogroup: "eq",
@@ -379,106 +379,136 @@ const V = {
379
379
  dataload: "eq",
380
380
  formula: "eq"
381
381
  };
382
- function Je(e) {
382
+ function nt(e) {
383
383
  var t;
384
- return e ? (t = V[e]) != null ? t : [] : [];
384
+ return e ? (t = Z[e]) != null ? t : [] : [];
385
385
  }
386
- function et(e) {
386
+ function rt(e) {
387
387
  var t;
388
- return e && (t = X[e]) != null ? t : "eq";
388
+ return e && (t = J[e]) != null ? t : "eq";
389
389
  }
390
390
  function S(e) {
391
391
  return typeof e == "object" && e !== null && !Array.isArray(e);
392
392
  }
393
- function O(e) {
393
+ function I(e) {
394
394
  return S(e) ? e : null;
395
395
  }
396
- function F(e) {
397
- return !!(e == null || e === "" || Array.isArray(e) && e.length === 0);
396
+ function R(e) {
397
+ return !!(e == null || e === "" || e === "{}" || Array.isArray(e) && e.length === 0);
398
398
  }
399
- function R(e, t) {
399
+ function _(e, t) {
400
400
  if (Array.isArray(e) && Array.isArray(t)) {
401
401
  if (e.length !== t.length) return !1;
402
- const r = e.map(String).sort(), n = t.map(String).sort();
403
- return r.every((l, a) => l === n[a]);
402
+ const n = e.map(String).sort(), r = t.map(String).sort();
403
+ return n.every((l, a) => l === r[a]);
404
404
  }
405
405
  if (S(e) && S(t)) {
406
- const r = Object.keys(e), n = Object.keys(t);
407
- return r.length !== n.length ? !1 : r.every((l) => String(e[l]) === String(t[l]));
406
+ const n = Object.keys(e), r = Object.keys(t);
407
+ return n.length !== r.length ? !1 : n.every((l) => String(e[l]) === String(t[l]));
408
408
  }
409
409
  return String(e) === String(t);
410
410
  }
411
- function D(e, t) {
411
+ function D(e) {
412
+ if (e == null) return null;
413
+ let t = null;
414
+ if (e instanceof Date)
415
+ t = e.toISOString();
416
+ else if (typeof e == "number" && Number.isFinite(e)) {
417
+ const r = new Date(e), l = r.getFullYear(), a = String(r.getMonth() + 1).padStart(2, "0"), i = String(r.getDate()).padStart(2, "0");
418
+ return `${l}-${a}-${i}`;
419
+ } else
420
+ t = String(e).trim();
421
+ const n = /^(\d{4})-(\d{1,2})-(\d{1,2})/.exec(t);
422
+ return n ? `${n[1]}-${n[2].padStart(2, "0")}-${n[3].padStart(2, "0")}` : null;
423
+ }
424
+ function $(e, t) {
425
+ const n = D(e), r = D(t);
426
+ return n !== null && r !== null ? n === r : _(e, t);
427
+ }
428
+ function T(e, t) {
412
429
  if (S(t)) {
413
- const n = O(e);
414
- return !(!n || t.province !== void 0 && String(n.province) !== String(t.province) || t.city !== void 0 && String(n.city) !== String(t.city) || t.district !== void 0 && String(n.district) !== String(t.district));
430
+ const r = I(e);
431
+ return !(!r || t.province !== void 0 && String(r.province) !== String(t.province) || t.city !== void 0 && String(r.city) !== String(t.city) || t.district !== void 0 && String(r.district) !== String(t.district));
415
432
  }
416
- const r = Array.isArray(t) ? t.map(String) : [];
417
- return Array.isArray(e) ? e.some((n) => r.includes(String(n))) : r.includes(String(e));
433
+ const n = Array.isArray(t) ? t.map(String) : [];
434
+ return Array.isArray(e) ? e.some((r) => n.includes(String(r))) : n.includes(String(e));
418
435
  }
419
- function Z(e, t) {
420
- const r = Array.isArray(t) ? t.map(String) : [];
421
- if (r.length === 0) return !1;
422
- const n = Array.isArray(e) ? e.map(String) : [];
423
- return r.every((l) => n.includes(l));
436
+ function ee(e, t) {
437
+ const n = Array.isArray(t) ? t.map(String) : [];
438
+ if (n.length === 0) return !1;
439
+ const r = Array.isArray(e) ? e.map(String) : [];
440
+ return n.every((l) => r.includes(l));
424
441
  }
425
- function J(e, t) {
426
- const r = O(t);
427
- if (!r) return !1;
428
- const n = Number(e);
429
- return !(isNaN(n) || r.min !== void 0 && r.min !== null && n < Number(r.min) || r.max !== void 0 && r.max !== null && n > Number(r.max));
442
+ function te(e, t) {
443
+ const n = I(t);
444
+ if (!n) return !1;
445
+ const r = Number(e);
446
+ return !(isNaN(r) || n.min !== void 0 && n.min !== null && r < Number(n.min) || n.max !== void 0 && n.max !== null && r > Number(n.max));
430
447
  }
431
- function ee(e, t) {
432
- var i;
433
- const r = (i = e.field.widget) == null ? void 0 : i.widgetName;
434
- if (!r) return !1;
435
- const n = t[r], { operator: l, value: a } = e;
436
- switch (l) {
448
+ const ne = (e, t) => t === "user" ? e._id : e;
449
+ function re(e, t) {
450
+ var m, d, u;
451
+ const n = (m = e.field.widget) == null ? void 0 : m.widgetName;
452
+ if (!n) return !1;
453
+ const r = (d = e.field.widget) == null ? void 0 : d.type, l = t[n], a = ne(l, r), { operator: i, value: o } = e, s = ((u = e.field.widget) == null ? void 0 : u.type) === "datetime";
454
+ switch (i) {
437
455
  case "empty":
438
- return F(n);
456
+ return R(a);
439
457
  case "not_empty":
440
- return !F(n);
458
+ return !R(a);
441
459
  case "eq":
442
- return R(n, a);
460
+ return s ? $(a, o) : _(a, o);
443
461
  case "neq":
444
- return !R(n, a);
462
+ return s ? !$(a, o) : !_(a, o);
445
463
  case "contains":
446
464
  case "like":
447
- return String(n).includes(String(a));
465
+ return String(a).includes(String(o));
448
466
  case "not_contains":
449
467
  case "unlike":
450
- return !String(n).includes(String(a));
468
+ return !String(a).includes(String(o));
451
469
  case "gt":
452
- return Number(n) > Number(a);
470
+ return Number(a) > Number(o);
453
471
  case "gte":
454
- return Number(n) >= Number(a);
472
+ return Number(a) >= Number(o);
455
473
  case "lt":
456
- return Number(n) < Number(a);
474
+ return Number(a) < Number(o);
457
475
  case "lte":
458
- return Number(n) <= Number(a);
476
+ return Number(a) <= Number(o);
459
477
  case "in":
460
- return D(n, a);
478
+ return T(a, o);
461
479
  case "nin":
462
- return !D(n, a);
480
+ return !T(a, o);
463
481
  case "all":
464
- return Z(n, a);
482
+ return ee(a, o);
465
483
  case "range":
466
- return J(n, a);
484
+ return te(a, o);
467
485
  default:
468
486
  return !1;
469
487
  }
470
488
  }
471
- function tt(e, t) {
489
+ function at(e, t) {
490
+ if (!t || !(t != null && t.length))
491
+ return !1;
492
+ const n = e.formFieldEditPreference;
493
+ if (n === "edit_any_field")
494
+ return !!(t != null && t.length);
495
+ const r = new Set(t);
496
+ return n == null ? void 0 : n.fields.some((l) => {
497
+ var a;
498
+ return r.has((a = l == null ? void 0 : l.widget) == null ? void 0 : a.widgetName);
499
+ });
500
+ }
501
+ function lt(e, t) {
472
502
  if (!e.enabled)
473
503
  return !1;
474
- const r = e.triggerCondition;
475
- if (!r) return !0;
476
- const { items: n, quantifier: l } = r;
477
- if (!n || n.length === 0) return !0;
478
- const a = n.map((i) => ee(i, t));
504
+ const n = e.triggerCondition;
505
+ if (!n) return !0;
506
+ const { items: r, quantifier: l } = n;
507
+ if (!r || r.length === 0) return !0;
508
+ const a = r.map((i) => re(i, t));
479
509
  return l === "any" ? a.some((i) => i) : a.every((i) => i);
480
510
  }
481
- const rt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form" && t.params.formId === e.formId : e.appId ? (t.type === "app" || t.type === "form") && t.params.appId === e.appId : t.type === "global" || t.type === "app" || t.type === "form", te = {
511
+ const it = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form" && t.params.formId === e.formId : e.appId ? (t.type === "app" || t.type === "form") && t.params.appId === e.appId : t.type === "global" || t.type === "app" || t.type === "form", ae = {
482
512
  eq: "eq",
483
513
  neq: "ne",
484
514
  gt: "gt",
@@ -495,7 +525,7 @@ const rt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
495
525
  empty: "empty",
496
526
  not_empty: "not_empty",
497
527
  range: "range"
498
- }, re = {
528
+ }, le = {
499
529
  eq: "eq",
500
530
  ne: "neq",
501
531
  gt: "gt",
@@ -513,24 +543,24 @@ const rt = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
513
543
  not_empty: "not_empty",
514
544
  range: "range"
515
545
  };
516
- function nt(e) {
517
- const t = e.quantifier === "any" ? "or" : "and", r = e.items.map((n) => {
518
- var i, o, s, p, d, u;
519
- const l = (i = te[n.operator]) != null ? i : "eq";
546
+ function ot(e) {
547
+ const t = e.quantifier === "any" ? "or" : "and", n = e.items.map((r) => {
548
+ var i, o, s, m, d, u;
549
+ const l = (i = ae[r.operator]) != null ? i : "eq";
520
550
  let a;
521
- return n.operator === "range" && S(n.value) ? a = [n.value.min, n.value.max] : Array.isArray(n.value) ? a = n.value : a = [n.value], {
522
- field: (p = (s = (o = n.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? p : "",
551
+ return r.operator === "range" && S(r.value) ? a = [r.value.min, r.value.max] : Array.isArray(r.value) ? a = r.value : a = [r.value], {
552
+ field: (m = (s = (o = r.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? m : "",
523
553
  method: l,
524
554
  value: a,
525
- type: (u = (d = n.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
555
+ type: (u = (d = r.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
526
556
  };
527
557
  });
528
- return JSON.stringify({ rel: t, cond: r });
558
+ return JSON.stringify({ rel: t, cond: n });
529
559
  }
530
- function at(e) {
531
- const t = JSON.parse(e), r = t.rel === "or" ? "any" : "all", n = t.cond.map((l, a) => {
532
- var s, p;
533
- const i = (s = re[l.method]) != null ? s : "eq";
560
+ function st(e) {
561
+ const t = JSON.parse(e), n = t.rel === "or" ? "any" : "all", r = t.cond.map((l, a) => {
562
+ var s, m;
563
+ const i = (s = le[l.method]) != null ? s : "eq";
534
564
  let o = l.value;
535
565
  return i === "range" ? o = { min: l.value[0], max: l.value[1] } : ["eq", "neq", "contains", "not_contains", "gt", "gte", "lt", "lte"].includes(i) && (o = l.value[0]), {
536
566
  id: `${l.field}_${a}`,
@@ -538,7 +568,7 @@ function at(e) {
538
568
  label: l.field,
539
569
  widget: {
540
570
  widgetName: l.field,
541
- type: (p = l.type) != null ? p : "unknown",
571
+ type: (m = l.type) != null ? m : "unknown",
542
572
  value: void 0
543
573
  }
544
574
  },
@@ -546,25 +576,25 @@ function at(e) {
546
576
  value: o
547
577
  };
548
578
  });
549
- return { targetName: "", quantifier: r, items: n };
579
+ return { targetName: "", quantifier: n, items: r };
550
580
  }
551
- function lt(e) {
552
- const t = (r) => String(r).padStart(2, "0");
581
+ function ut(e) {
582
+ const t = (n) => String(n).padStart(2, "0");
553
583
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
554
584
  }
555
- function it(e, t, r = 1) {
556
- const n = [], l = [];
585
+ function dt(e, t, n = 1) {
586
+ const r = [], l = [];
557
587
  for (const a of e)
558
- t(a) ? l.push(a) : (l.length > 0 && (n.push(l.length >= r ? [...l] : l[0]), l.length = 0), n.push(a));
559
- return l.length > 0 && n.push(l.length >= 2 ? [...l] : l[0]), n;
588
+ t(a) ? l.push(a) : (l.length > 0 && (r.push(l.length >= n ? [...l] : l[0]), l.length = 0), r.push(a));
589
+ return l.length > 0 && r.push(l.length >= 2 ? [...l] : l[0]), r;
560
590
  }
561
- function P(e) {
591
+ function L(e) {
562
592
  const t = [];
563
- for (const r of e)
564
- Array.isArray(r) ? t.push(...P(r)) : t.push(r);
593
+ for (const n of e)
594
+ Array.isArray(n) ? t.push(...L(n)) : t.push(n);
565
595
  return t;
566
596
  }
567
- const ne = {
597
+ const ie = {
568
598
  projectdevelopment: "e914",
569
599
  resourcelibrary: "e915",
570
600
  Plugin2: "e90e",
@@ -971,36 +1001,36 @@ const ne = {
971
1001
  Automation1: "ea95",
972
1002
  Avatar: "ea96"
973
1003
  };
974
- function ot(e) {
975
- const t = ne[e];
1004
+ function ct(e) {
1005
+ const t = ie[e];
976
1006
  return t ? `&#x${t};` : void 0;
977
1007
  }
978
- const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6: "e7b8", 7: "e7c8", 8: "e7c1", 9: "e7bb", 10: "e7ca", 11: "e7c4", 12: "e7b4", 13: "e7ba", 14: "e7b6", 15: "e7c5", 16: "e7bf", 17: "e7c3", 18: "e7c2", 19: "e7c6", 20: "e7bd", 21: "e7c0", 22: "e7cb", 23: "e7b7", 24: "e7b9", 25: "e814", 26: "e81d", 27: "e81c", 28: "e81a", 29: "e813", 30: "e81b", 31: "e818", 32: "e819", 33: "e817", 34: "e816", 35: "e810", 36: "e815", 37: "e812", 38: "e811", 39: "e80e", 40: "e80f", 41: "e80d", 42: "e807", 43: "e80b", 44: "e80a", 45: "e81d", 46: "e809", 47: "e808", 48: "e805", 49: "e7ff", 50: "e803", 51: "e806", 52: "e802", 53: "e800", 54: "e804", 55: "e801", 56: "e7fe", 57: "e7fc", 58: "e7fd", 59: "e7fb", 60: "e7fa" }, ut = (e, t, r) => {
979
- if (!r)
1008
+ const gt = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6: "e7b8", 7: "e7c8", 8: "e7c1", 9: "e7bb", 10: "e7ca", 11: "e7c4", 12: "e7b4", 13: "e7ba", 14: "e7b6", 15: "e7c5", 16: "e7bf", 17: "e7c3", 18: "e7c2", 19: "e7c6", 20: "e7bd", 21: "e7c0", 22: "e7cb", 23: "e7b7", 24: "e7b9", 25: "e814", 26: "e81d", 27: "e81c", 28: "e81a", 29: "e813", 30: "e81b", 31: "e818", 32: "e819", 33: "e817", 34: "e816", 35: "e810", 36: "e815", 37: "e812", 38: "e811", 39: "e80e", 40: "e80f", 41: "e80d", 42: "e807", 43: "e80b", 44: "e80a", 45: "e81d", 46: "e809", 47: "e808", 48: "e805", 49: "e7ff", 50: "e803", 51: "e806", 52: "e802", 53: "e800", 54: "e804", 55: "e801", 56: "e7fe", 57: "e7fc", 58: "e7fd", 59: "e7fb", 60: "e7fa" }, mt = (e, t, n) => {
1009
+ if (!n)
980
1010
  return {
981
1011
  translated: ""
982
1012
  };
983
- const n = new Map(t.map((i) => [i.widget.widgetName, i.label]));
1013
+ const r = new Map(t.map((i) => [i.widget.widgetName, i.label]));
984
1014
  for (const i of t)
985
1015
  if (i.widget.type === "subform" && i.widget.items) {
986
1016
  for (const o of i.widget.items)
987
1017
  if ("widget" in o && !("options" in o)) {
988
1018
  const s = `${i.widget.widgetName}.${o.widget.widgetName}`;
989
- n.set(s, o.label);
1019
+ r.set(s, o.label);
990
1020
  }
991
1021
  }
992
1022
  const l = [], a = e.replace(
993
1023
  /\$\{(virtual\.)?(_widget_\d+(?:\._widget_\d+)?)\}/g,
994
1024
  (i, o, s) => {
995
- const p = !!o, { translated: d, meta: u } = r(s, p);
1025
+ const m = !!o, { translated: d, meta: u } = n(s, m);
996
1026
  return u && l.push(u), d;
997
1027
  }
998
1028
  );
999
1029
  return {
1000
- meta: l.length ? P(l) : null,
1030
+ meta: l.length ? L(l) : null,
1001
1031
  translated: (a != null ? a : "").trim()
1002
1032
  };
1003
- }, ae = {
1033
+ }, oe = {
1004
1034
  手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
1005
1035
  电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
1006
1036
  邮政编码: "^\\d{6}$",
@@ -1012,8 +1042,8 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1012
1042
  二维码图片: "qrcode",
1013
1043
  条形码图片: "barcode",
1014
1044
  自定义: "custom"
1015
- }, T = (e) => {
1016
- const { widget: t, labelStyle: r, label: n, ...l } = e || {}, a = ae[r] || "";
1045
+ }, O = (e) => {
1046
+ const { widget: t, labelStyle: n, label: r, ...l } = e || {}, a = oe[n] || "";
1017
1047
  return {
1018
1048
  widget: {
1019
1049
  widgetName: `_widget_${Date.now()}`,
@@ -1053,26 +1083,26 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1053
1083
  ...t,
1054
1084
  regex: a,
1055
1085
  type: "text",
1056
- labelStyle: n
1086
+ labelStyle: r
1057
1087
  },
1058
1088
  // description,
1059
- label: n,
1089
+ label: r,
1060
1090
  lineWidth: 6,
1061
1091
  tab: null,
1062
1092
  ...l
1063
1093
  };
1064
- }, m = (e = "_widget", t) => {
1065
- const r = `${e}_${Date.now()}`;
1094
+ }, g = (e = "_widget", t) => {
1095
+ const n = `${e}_${Date.now()}`;
1066
1096
  if (t === void 0)
1067
- return r;
1068
- const n = t.toString().length;
1069
- return `${r.slice(0, -n)}${t}`;
1070
- }, le = (e) => {
1071
- const { widget: t, label: r, ...n } = e || {};
1097
+ return n;
1098
+ const r = t.toString().length;
1099
+ return `${n.slice(0, -r)}${t}`;
1100
+ }, se = (e) => {
1101
+ const { widget: t, label: n, ...r } = e || {};
1072
1102
  return {
1073
1103
  widget: {
1074
1104
  type: "number",
1075
- widgetName: m(),
1105
+ widgetName: g(),
1076
1106
  widgetNameAlias: "",
1077
1107
  triggerEvent: !1,
1078
1108
  customCls: null,
@@ -1124,16 +1154,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1124
1154
  //繁体的
1125
1155
  },
1126
1156
  ...t,
1127
- labelStyle: r
1157
+ labelStyle: n
1128
1158
  },
1129
1159
  // description,
1130
- label: r,
1160
+ label: n,
1131
1161
  lineWidth: 6,
1132
1162
  tab: null,
1133
- ...n
1163
+ ...r
1134
1164
  };
1135
- }, ie = (e) => {
1136
- const { widget: t, label: r, ...n } = e || {};
1165
+ }, ue = (e) => {
1166
+ const { widget: t, label: n, ...r } = e || {};
1137
1167
  return {
1138
1168
  widget: {
1139
1169
  type: "combo",
@@ -1161,16 +1191,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1161
1191
  colorEnable: !0,
1162
1192
  //颜色 是否开启颜色
1163
1193
  ...t,
1164
- labelStyle: r
1194
+ labelStyle: n
1165
1195
  },
1166
1196
  // description,
1167
- label: r,
1197
+ label: n,
1168
1198
  lineWidth: 6,
1169
1199
  tab: null,
1170
- ...n
1200
+ ...r
1171
1201
  };
1172
- }, $ = (e) => {
1173
- const { widget: t, label: r, ...n } = e || {};
1202
+ }, P = (e) => {
1203
+ const { widget: t, label: n, ...r } = e || {};
1174
1204
  return {
1175
1205
  widget: {
1176
1206
  enable: !0,
@@ -1199,14 +1229,14 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1199
1229
  type: "radiogroup"
1200
1230
  },
1201
1231
  // description,
1202
- label: r,
1232
+ label: n,
1203
1233
  lineWidth: 6,
1204
1234
  tab: null,
1205
- ...n,
1206
- labelStyle: r
1235
+ ...r,
1236
+ labelStyle: n
1207
1237
  };
1208
- }, oe = (e) => {
1209
- const { widget: t, label: r, ...n } = e || {};
1238
+ }, de = (e) => {
1239
+ const { widget: t, label: n, ...r } = e || {};
1210
1240
  return {
1211
1241
  widget: {
1212
1242
  type: "datetime",
@@ -1265,19 +1295,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1265
1295
  }
1266
1296
  },
1267
1297
  ...t,
1268
- labelStyle: r
1298
+ labelStyle: n
1269
1299
  },
1270
- label: r,
1300
+ label: n,
1271
1301
  lineWidth: 6,
1272
1302
  tab: null,
1273
- ...n
1303
+ ...r
1274
1304
  };
1275
- }, w = (e) => e, se = (e) => {
1276
- const { widget: t, label: r, ...n } = e || {};
1305
+ }, w = (e) => e, ce = (e) => {
1306
+ const { widget: t, label: n, ...r } = e || {};
1277
1307
  return {
1278
1308
  widget: {
1279
1309
  type: "deptgroup",
1280
- widgetName: m(),
1310
+ widgetName: g(),
1281
1311
  widgetNameAlias: "",
1282
1312
  customCls: null,
1283
1313
  height: "34",
@@ -1299,19 +1329,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1299
1329
  limit: {},
1300
1330
  valueOption: 0,
1301
1331
  ...t,
1302
- labelStyle: r
1332
+ labelStyle: n
1303
1333
  },
1304
- label: r,
1334
+ label: n,
1305
1335
  lineWidth: 6,
1306
1336
  tab: null,
1307
- ...n
1337
+ ...r
1308
1338
  };
1309
- }, ue = (e) => {
1310
- const { widget: t, label: r, ...n } = e || {};
1339
+ }, ge = (e) => {
1340
+ const { widget: t, label: n, ...r } = e || {};
1311
1341
  return {
1312
1342
  widget: {
1313
1343
  type: "sn",
1314
- widgetName: m(),
1344
+ widgetName: g(),
1315
1345
  widgetNameAlias: "",
1316
1346
  triggerEvent: 0,
1317
1347
  customCls: null,
@@ -1335,20 +1365,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1335
1365
  type: "incNumber"
1336
1366
  }
1337
1367
  ],
1338
- labelStyle: r
1368
+ labelStyle: n
1339
1369
  },
1340
1370
  // description,
1341
- label: r,
1371
+ label: n,
1342
1372
  lineWidth: 6,
1343
1373
  tab: null,
1344
- ...n
1374
+ ...r
1345
1375
  };
1346
- }, de = (e) => {
1347
- const { widget: t, label: r, ...n } = e || {};
1376
+ }, me = (e) => {
1377
+ const { widget: t, label: n, ...r } = e || {};
1348
1378
  return {
1349
1379
  widget: {
1350
1380
  type: "dept",
1351
- widgetName: m(),
1381
+ widgetName: g(),
1352
1382
  widgetNameAlias: "",
1353
1383
  customCls: null,
1354
1384
  height: "34",
@@ -1370,19 +1400,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1370
1400
  limit: {},
1371
1401
  valueOption: 0,
1372
1402
  ...t,
1373
- labelStyle: r
1403
+ labelStyle: n
1374
1404
  },
1375
- label: r,
1405
+ label: n,
1376
1406
  lineWidth: 6,
1377
1407
  tab: null,
1378
- ...n
1408
+ ...r
1379
1409
  };
1380
- }, ce = (e) => {
1381
- const { widget: t, label: r, ...n } = e || {};
1410
+ }, fe = (e) => {
1411
+ const { widget: t, label: n, ...r } = e || {};
1382
1412
  return {
1383
1413
  widget: {
1384
1414
  type: "usergroup",
1385
- widgetName: m(),
1415
+ widgetName: g(),
1386
1416
  widgetNameAlias: "",
1387
1417
  customCls: null,
1388
1418
  height: "34",
@@ -1406,19 +1436,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1406
1436
  //可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
1407
1437
  valueOption: 0,
1408
1438
  ...t,
1409
- labelStyle: r
1439
+ labelStyle: n
1410
1440
  },
1411
1441
  // description,
1412
- label: r,
1442
+ label: n,
1413
1443
  lineWidth: 6,
1414
1444
  tab: null,
1415
- ...n
1445
+ ...r
1416
1446
  };
1417
- }, me = (e) => {
1418
- const { widget: t, label: r, ...n } = e || {};
1447
+ }, pe = (e) => {
1448
+ const { widget: t, label: n, ...r } = e || {};
1419
1449
  return {
1420
1450
  widget: {
1421
- widgetName: m(),
1451
+ widgetName: g(),
1422
1452
  widgetNameAlias: "",
1423
1453
  customCls: null,
1424
1454
  enable: !0,
@@ -1434,16 +1464,16 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1434
1464
  //关联表的类型,只能是form
1435
1465
  ...t,
1436
1466
  linkFields: [],
1437
- labelStyle: r,
1467
+ labelStyle: n,
1438
1468
  type: "linkdata"
1439
1469
  },
1440
- label: r,
1470
+ label: n,
1441
1471
  lineWidth: 6,
1442
1472
  tab: null,
1443
- ...n
1473
+ ...r
1444
1474
  };
1445
- }, ge = (e) => !e || !e.length ? e : e.map((t, r) => ({
1446
- id: r,
1475
+ }, be = (e) => !e || !e.length ? e : e.map((t, n) => ({
1476
+ id: n,
1447
1477
  // name: "_widget_1761976674767",
1448
1478
  // form: "a2f34ef882158a3e97da4ef7",
1449
1479
  // tag: buildWidgetName("f_", index),
@@ -1454,20 +1484,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1454
1484
  isEditable: !0,
1455
1485
  group: "dimension,filter,select",
1456
1486
  formula: ""
1457
- })), fe = (e) => !e || !e.length ? e : e.map((t) => ({
1487
+ })), ye = (e) => !e || !e.length ? e : e.map((t) => ({
1458
1488
  mode: "depend",
1459
1489
  ...t
1460
- })), pe = (e) => {
1490
+ })), he = (e) => {
1461
1491
  var l, a, i;
1462
- const { widget: t, label: r, ...n } = e || {};
1492
+ const { widget: t, label: n, ...r } = e || {};
1463
1493
  return {
1464
1494
  widget: {
1465
1495
  type: "dataload",
1466
- widgetName: m(),
1496
+ widgetName: g(),
1467
1497
  widgetNameAlias: "",
1468
1498
  customCls: null,
1469
1499
  width: 350,
1470
- text: r,
1500
+ text: n,
1471
1501
  enable: !0,
1472
1502
  visible: !0,
1473
1503
  allowBlank: !0,
@@ -1499,22 +1529,22 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1499
1529
  forms: (l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.forms,
1500
1530
  selectArg: [],
1501
1531
  selectRel: "and",
1502
- fields: ge((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
1503
- mapFields: fe((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1532
+ fields: be((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
1533
+ mapFields: ye((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1504
1534
  },
1505
- labelStyle: r
1535
+ labelStyle: n
1506
1536
  },
1507
- label: r,
1537
+ label: n,
1508
1538
  lineWidth: 6,
1509
1539
  tab: null,
1510
- ...n
1540
+ ...r
1511
1541
  };
1512
- }, be = (e) => {
1513
- const { widget: t, label: r, ...n } = e || {};
1542
+ }, we = (e) => {
1543
+ const { widget: t, label: n, ...r } = e || {};
1514
1544
  return {
1515
1545
  widget: {
1516
1546
  type: "user",
1517
- widgetName: m(),
1547
+ widgetName: g(),
1518
1548
  widgetNameAlias: "",
1519
1549
  customCls: null,
1520
1550
  height: "34",
@@ -1538,20 +1568,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1538
1568
  //可选范围 由部门字段确定,如果有值 是 _widget_1762226067008 这种,另一个部门字段的id。和limit互斥,limit将为[]
1539
1569
  valueOption: 0,
1540
1570
  ...t,
1541
- labelStyle: r
1571
+ labelStyle: n
1542
1572
  },
1543
1573
  // description,
1544
- label: r,
1574
+ label: n,
1545
1575
  lineWidth: 6,
1546
1576
  tab: null,
1547
- ...n
1577
+ ...r
1548
1578
  };
1549
- }, ye = (e) => {
1550
- const { widget: t, label: r, ...n } = e || {};
1579
+ }, Se = (e) => {
1580
+ const { widget: t, label: n, ...r } = e || {};
1551
1581
  return {
1552
1582
  widget: {
1553
1583
  type: "signature",
1554
- widgetName: m(),
1584
+ widgetName: g(),
1555
1585
  widgetNameAlias: "",
1556
1586
  customCls: null,
1557
1587
  height: 34,
@@ -1561,20 +1591,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1561
1591
  allowBlank: !0,
1562
1592
  rely: null,
1563
1593
  ...t,
1564
- labelStyle: r
1594
+ labelStyle: n
1565
1595
  },
1566
1596
  description: null,
1567
- label: r,
1597
+ label: n,
1568
1598
  lineWidth: 6,
1569
1599
  tab: null,
1570
- ...n
1600
+ ...r
1571
1601
  };
1572
- }, he = (e) => {
1573
- const { widget: t, label: r, ...n } = e || {};
1602
+ }, ve = (e) => {
1603
+ const { widget: t, label: n, ...r } = e || {};
1574
1604
  return {
1575
1605
  widget: {
1576
1606
  type: "image",
1577
- widgetName: m(),
1607
+ widgetName: g(),
1578
1608
  widgetNameAlias: "",
1579
1609
  customCls: null,
1580
1610
  height: 100,
@@ -1634,19 +1664,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1634
1664
  quality: 0.7,
1635
1665
  //压缩图片比例,开启 浏览器图片压缩 后才能设置
1636
1666
  ...t,
1637
- labelStyle: r
1667
+ labelStyle: n
1638
1668
  },
1639
- label: r,
1669
+ label: n,
1640
1670
  lineWidth: 6,
1641
1671
  tab: null,
1642
- ...n
1672
+ ...r
1643
1673
  };
1644
- }, we = (e) => {
1645
- const { widget: t, label: r, ...n } = e || {};
1674
+ }, Ae = (e) => {
1675
+ const { widget: t, label: n, ...r } = e || {};
1646
1676
  return {
1647
1677
  widget: {
1648
1678
  type: "upload",
1649
- widgetName: m(),
1679
+ widgetName: g(),
1650
1680
  widgetNameAlias: "",
1651
1681
  customCls: null,
1652
1682
  enable: !0,
@@ -1668,20 +1698,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1668
1698
  //设置单个文件大小上限,单位是字节,范围 1M-20M
1669
1699
  // fileType,
1670
1700
  ...t,
1671
- labelStyle: r
1701
+ labelStyle: n
1672
1702
  },
1673
1703
  // description,
1674
- label: r,
1704
+ label: n,
1675
1705
  lineWidth: 6,
1676
1706
  tab: null,
1677
- ...n
1707
+ ...r
1678
1708
  };
1679
- }, Se = (e) => {
1680
- const { widget: t, label: r, ...n } = e || {};
1709
+ }, ke = (e) => {
1710
+ const { widget: t, label: n, ...r } = e || {};
1681
1711
  return {
1682
1712
  widget: {
1683
1713
  type: "checkboxgroup",
1684
- widgetName: m(),
1714
+ widgetName: g(),
1685
1715
  widgetNameAlias: "",
1686
1716
  customCls: null,
1687
1717
  enable: !0,
@@ -1703,38 +1733,38 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1703
1733
  allowAddOptions: !1,
1704
1734
  //允许成员填写时添加新选项
1705
1735
  ...t,
1706
- labelStyle: r
1736
+ labelStyle: n
1707
1737
  },
1708
- label: r,
1738
+ label: n,
1709
1739
  lineWidth: 6,
1710
1740
  tab: null,
1711
- ...n
1741
+ ...r
1712
1742
  };
1713
- }, ve = (e) => {
1714
- const { widget: t, label: r, ...n } = e || {};
1743
+ }, Ne = (e) => {
1744
+ const { widget: t, label: n, ...r } = e || {};
1715
1745
  return {
1716
1746
  widget: {
1717
1747
  type: "separator",
1718
- widgetName: m(),
1748
+ widgetName: g(),
1719
1749
  widgetNameAlias: "",
1720
1750
  customCls: null,
1721
1751
  enable: !0,
1722
1752
  visible: !0,
1723
1753
  allowBlank: !0,
1724
1754
  ...t,
1725
- labelStyle: r
1755
+ labelStyle: n
1726
1756
  },
1727
- label: r,
1757
+ label: n,
1728
1758
  lineWidth: 12,
1729
1759
  tab: null,
1730
- ...n
1760
+ ...r
1731
1761
  };
1732
- }, Ae = (e) => {
1733
- const { widget: t, label: r, ...n } = e || {};
1762
+ }, Ce = (e) => {
1763
+ const { widget: t, label: n, ...r } = e || {};
1734
1764
  return {
1735
1765
  widget: {
1736
1766
  type: "combocheck",
1737
- widgetName: m(),
1767
+ widgetName: g(),
1738
1768
  widgetNameAlias: "",
1739
1769
  customCls: null,
1740
1770
  height: 34,
@@ -1759,19 +1789,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1759
1789
  //允许成员填写时添加新选项
1760
1790
  allowAddLinkData: !1,
1761
1791
  ...t,
1762
- labelStyle: r
1792
+ labelStyle: n
1763
1793
  },
1764
- label: r,
1794
+ label: n,
1765
1795
  lineWidth: 6,
1766
1796
  tab: null,
1767
- ...n
1797
+ ...r
1768
1798
  };
1769
- }, ke = (e) => {
1770
- const { widget: t, label: r, ...n } = e || {};
1799
+ }, _e = (e) => {
1800
+ const { widget: t, label: n, ...r } = e || {};
1771
1801
  return {
1772
1802
  widget: {
1773
1803
  type: "location",
1774
- widgetName: m(),
1804
+ widgetName: g(),
1775
1805
  widgetNameAlias: "",
1776
1806
  customCls: null,
1777
1807
  enable: !0,
@@ -1796,19 +1826,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1796
1826
  enablePcLocation: !0,
1797
1827
  //允许PC端定位并选择位置
1798
1828
  ...t,
1799
- labelStyle: r
1829
+ labelStyle: n
1800
1830
  },
1801
- label: r,
1831
+ label: n,
1802
1832
  lineWidth: 6,
1803
1833
  tab: null,
1804
- ...n
1834
+ ...r
1805
1835
  };
1806
- }, Ne = (e) => {
1807
- const { widget: t, label: r, ...n } = e || {};
1836
+ }, xe = (e) => {
1837
+ const { widget: t, label: n, ...r } = e || {};
1808
1838
  return {
1809
1839
  widget: {
1810
1840
  type: "textarea",
1811
- widgetName: m(),
1841
+ widgetName: g(),
1812
1842
  widgetNameAlias: "",
1813
1843
  triggerEvent: !1,
1814
1844
  customCls: null,
@@ -1838,20 +1868,20 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1838
1868
  maxLength: 5e3,
1839
1869
  //限制输入最大字符数 不限制的话,整个maxLength不存在
1840
1870
  ...t,
1841
- labelStyle: r
1871
+ labelStyle: n
1842
1872
  },
1843
1873
  // description,
1844
- label: r,
1874
+ label: n,
1845
1875
  lineWidth: 6,
1846
1876
  tab: null,
1847
- ...n
1877
+ ...r
1848
1878
  };
1849
- }, Ce = (e = {}) => {
1850
- const { widget: t, label: r, ...n } = e;
1879
+ }, Ee = (e = {}) => {
1880
+ const { widget: t, label: n, ...r } = e;
1851
1881
  return {
1852
1882
  widget: {
1853
1883
  type: "button",
1854
- widgetName: m(),
1884
+ widgetName: g(),
1855
1885
  widgetNameAlias: "",
1856
1886
  triggerEvent: 0,
1857
1887
  customCls: null,
@@ -1883,19 +1913,19 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1883
1913
  tip: "请设置提示内容"
1884
1914
  },
1885
1915
  ...t,
1886
- labelStyle: r
1916
+ labelStyle: n
1887
1917
  },
1888
- label: r,
1918
+ label: n,
1889
1919
  lineWidth: 6,
1890
1920
  tab: null,
1891
- ...n
1921
+ ...r
1892
1922
  };
1893
- }, _e = (e = {}) => {
1894
- const { widget: t, label: r, ...n } = e;
1923
+ }, Me = (e = {}) => {
1924
+ const { widget: t, label: n, ...r } = e;
1895
1925
  return {
1896
1926
  widget: {
1897
1927
  type: "address",
1898
- widgetName: m(),
1928
+ widgetName: g(),
1899
1929
  widgetNameAlias: "",
1900
1930
  customCls: null,
1901
1931
  width: 720,
@@ -1917,25 +1947,25 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1917
1947
  seleceMapAddress: !0,
1918
1948
  //开启经纬度定位
1919
1949
  ...t,
1920
- labelStyle: r
1950
+ labelStyle: n
1921
1951
  },
1922
- label: r,
1952
+ label: n,
1923
1953
  lineWidth: 6,
1924
1954
  tab: null,
1925
- ...n
1955
+ ...r
1926
1956
  };
1927
- }, xe = (e = {}) => {
1928
- const { widget: t, label: r, ...n } = e;
1957
+ }, qe = (e = {}) => {
1958
+ const { widget: t, label: n, ...r } = e;
1929
1959
  return {
1930
1960
  widget: {
1931
1961
  type: "subform",
1932
- widgetName: m(),
1962
+ widgetName: g(),
1933
1963
  widgetNameAlias: "",
1934
1964
  customCls: null,
1935
1965
  enable: !0,
1936
1966
  visible: !0,
1937
1967
  allowBlank: !0,
1938
- labelStyle: r,
1968
+ labelStyle: n,
1939
1969
  extendSet: {
1940
1970
  sort: ["datahelp", "module", "formEvent"],
1941
1971
  status: !0,
@@ -1944,8 +1974,8 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1944
1974
  version: 1
1945
1975
  },
1946
1976
  items: (t.items || []).map((l, a) => {
1947
- const i = qe(l, !0);
1948
- return i.widget.widgetName = m("_widget", a), i;
1977
+ const i = De(l, !0);
1978
+ return i.widget.widgetName = g("_widget", a), i;
1949
1979
  }),
1950
1980
  sortable: !0,
1951
1981
  //启用子表单数据排序
@@ -2003,15 +2033,15 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2003
2033
  //从excel填报数据
2004
2034
  },
2005
2035
  description: null,
2006
- label: r,
2036
+ label: n,
2007
2037
  lineWidth: 12,
2008
2038
  tab: null
2009
2039
  };
2010
- }, Ee = (e) => {
2011
- const { widget: t, label: r, ...n } = e || {};
2040
+ }, Fe = (e) => {
2041
+ const { widget: t, label: n, ...r } = e || {};
2012
2042
  return {
2013
2043
  widget: {
2014
- widgetName: m(),
2044
+ widgetName: g(),
2015
2045
  widgetNameAlias: "",
2016
2046
  customCls: null,
2017
2047
  enable: !0,
@@ -2032,61 +2062,61 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2032
2062
  addExtendSet: [],
2033
2063
  ...t,
2034
2064
  linkFields: [],
2035
- labelStyle: r,
2065
+ labelStyle: n,
2036
2066
  type: "linkquery"
2037
2067
  },
2038
2068
  description: null,
2039
- label: r,
2069
+ label: n,
2040
2070
  lineWidth: 6,
2041
2071
  tab: null,
2042
- ...n
2072
+ ...r
2043
2073
  };
2044
- }, Me = {
2045
- address: _e,
2046
- button: Ce,
2047
- textarea: Ne,
2048
- datetime: oe,
2049
- text: T,
2050
- password: T,
2051
- location: ke,
2052
- radiogroup: $,
2053
- radio: $,
2054
- combo: ie,
2055
- combocheck: Ae,
2056
- separator: ve,
2057
- checkboxgroup: Se,
2058
- upload: we,
2059
- number: le,
2060
- image: he,
2061
- signature: ye,
2062
- user: be,
2063
- dataload: pe,
2064
- linkdata: me,
2065
- linkquery: Ee,
2066
- usergroup: ce,
2067
- subform: xe,
2068
- dept: de,
2069
- sn: ue,
2070
- deptgroup: se,
2074
+ }, Re = {
2075
+ address: Me,
2076
+ button: Ee,
2077
+ textarea: xe,
2078
+ datetime: de,
2079
+ text: O,
2080
+ password: O,
2081
+ location: _e,
2082
+ radiogroup: P,
2083
+ radio: P,
2084
+ combo: ue,
2085
+ combocheck: Ce,
2086
+ separator: Ne,
2087
+ checkboxgroup: ke,
2088
+ upload: Ae,
2089
+ number: se,
2090
+ image: ve,
2091
+ signature: Se,
2092
+ user: we,
2093
+ dataload: he,
2094
+ linkdata: pe,
2095
+ linkquery: Fe,
2096
+ usergroup: fe,
2097
+ subform: qe,
2098
+ dept: me,
2099
+ sn: ge,
2100
+ deptgroup: ce,
2071
2101
  flowState: w,
2072
2102
  flowstate: w,
2073
2103
  formula: w,
2074
2104
  unknown: w
2075
- }, qe = (e, t = !1) => {
2105
+ }, De = (e, t = !1) => {
2076
2106
  var a, i;
2077
2107
  if (!e || !e.widget || !e.widget.type)
2078
2108
  return e;
2079
- const r = e.widget.type || "unknown";
2080
- return t && r === "subform" ? w(e) : (((i = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = Q()), (Me[r] || w)(e));
2081
- }, dt = (e) => {
2082
- var t, r, n, l, a, i, o, s;
2083
- return !e || !((t = e.corp) != null && t.name) || !((r = e.user) != null && r.nickname) ? "" : `${(n = e.corp) == null ? void 0 : n.name} ${(l = e.user) == null ? void 0 : l.nickname}(${(a = e.user) == null ? void 0 : a.username}) ${(i = e.appName) != null ? i : ""} ${(o = e.entryName) != null ? o : ""} ${(s = e.agentName) != null ? s : ""}`;
2084
- }, ct = (e) => {
2085
- var r;
2109
+ const n = e.widget.type || "unknown";
2110
+ return t && n === "subform" ? w(e) : (((i = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = K()), (Re[n] || w)(e));
2111
+ }, ft = (e) => {
2112
+ var t, n, r, l, a, i, o, s;
2113
+ return !e || !((t = e.corp) != null && t.name) || !((n = e.user) != null && n.nickname) ? "" : `${(r = e.corp) == null ? void 0 : r.name} ${(l = e.user) == null ? void 0 : l.nickname}(${(a = e.user) == null ? void 0 : a.username}) ${(i = e.appName) != null ? i : ""} ${(o = e.entryName) != null ? o : ""} ${(s = e.agentName) != null ? s : ""}`;
2114
+ }, pt = (e) => {
2115
+ var n;
2086
2116
  if (!e)
2087
2117
  return "";
2088
2118
  const t = {
2089
- corpId: (r = e.corp) == null ? void 0 : r.id,
2119
+ corpId: (n = e.corp) == null ? void 0 : n.id,
2090
2120
  userId: e.user._id,
2091
2121
  appName: e.appName,
2092
2122
  appId: e.appId,
@@ -2096,55 +2126,56 @@ const st = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
2096
2126
  };
2097
2127
  try {
2098
2128
  return JSON.stringify(t);
2099
- } catch (n) {
2100
- return console.warn("getChatCtxForMcp error", n), "";
2129
+ } catch (r) {
2130
+ return console.warn("getChatCtxForMcp error", r), "";
2101
2131
  }
2102
2132
  };
2103
2133
  export {
2104
- Ve as DATA_COUNT_PER_BATCH,
2105
- K as FIELD_TYPE_OPERATOR_LABEL_OVERRIDES,
2106
- V as FIELD_TYPE_OPERATOR_MAP,
2107
- st as FORM_ICON_UNICODE_MAP,
2108
- Pe as GetLoadingMsg,
2109
- Ie as GetPartErrMsg,
2110
- Te as GetQueryResult,
2111
- Ue as GetSafeFormStructure,
2112
- ne as ICON_UNICODE_MAP,
2113
- L as IsErrorPart,
2114
- Fe as IsFakeMsgPart,
2115
- $e as IsFileGroupPart,
2116
- Re as IsFilePart,
2117
- Oe as IsLoadingPart,
2118
- De as IsQueryResultPart,
2119
- Y as OPERATOR_LABEL_MAP,
2120
- H as WHITE_LIST_FIELDS_SET,
2121
- at as bsConditionParse2Condition,
2122
- nt as conditionStringify2bsCondition,
2123
- ze as createFieldPartsExtractor,
2124
- He as createGetFieldJsonInfo,
2125
- z as createPartTypeChecker,
2126
- Ge as createPayloadTypeChecker,
2134
+ Je as DATA_COUNT_PER_BATCH,
2135
+ X as FIELD_TYPE_OPERATOR_LABEL_OVERRIDES,
2136
+ Z as FIELD_TYPE_OPERATOR_MAP,
2137
+ gt as FORM_ICON_UNICODE_MAP,
2138
+ We as GetLoadingMsg,
2139
+ Be as GetPartErrMsg,
2140
+ Pe as GetQueryResult,
2141
+ ze as GetSafeFormStructure,
2142
+ ie as ICON_UNICODE_MAP,
2143
+ B as IsErrorPart,
2144
+ $e as IsFakeMsgPart,
2145
+ Ie as IsFileGroupPart,
2146
+ Te as IsFilePart,
2147
+ Le as IsLoadingPart,
2148
+ Oe as IsQueryResultPart,
2149
+ V as OPERATOR_LABEL_MAP,
2150
+ Q as WHITE_LIST_FIELDS_SET,
2151
+ st as bsConditionParse2Condition,
2152
+ ot as conditionStringify2bsCondition,
2153
+ Ke as createFieldPartsExtractor,
2154
+ Ye as createGetFieldJsonInfo,
2155
+ Y as createPartTypeChecker,
2156
+ Qe as createPayloadTypeChecker,
2127
2157
  y as extractTextPartMeta,
2128
- Ke as field2config,
2129
- P as flatArr,
2130
- lt as formatLocalDate,
2131
- Je as getAvailableOperators,
2132
- dt as getChatCtxForHuman,
2133
- ct as getChatCtxForMcp,
2134
- et as getDefaultOperator,
2135
- ot as getIconUnicode,
2136
- Le as getMetaErrorMsg,
2137
- Ze as getOperatorLabel,
2138
- Ye as hasValidFieldValue,
2139
- Xe as imageUrlToBase64,
2140
- We as injectHostStylesIntoShadow,
2141
- rt as isCtxMatch,
2142
- tt as isHelperCondMet,
2143
- it as mergeConsecutiveTargets,
2144
- ut as promptParser,
2145
- qe as rebuildFieldsJsonStructure,
2146
- Qe as safeParseJson,
2147
- Be as syncHostStylesIntoShadow,
2148
- je as valueNormalizer
2158
+ Ze as field2config,
2159
+ L as flatArr,
2160
+ ut as formatLocalDate,
2161
+ nt as getAvailableOperators,
2162
+ ft as getChatCtxForHuman,
2163
+ pt as getChatCtxForMcp,
2164
+ rt as getDefaultOperator,
2165
+ ct as getIconUnicode,
2166
+ je as getMetaErrorMsg,
2167
+ tt as getOperatorLabel,
2168
+ Xe as hasValidFieldValue,
2169
+ et as imageUrlToBase64,
2170
+ Ue as injectHostStylesIntoShadow,
2171
+ it as isCtxMatch,
2172
+ lt as isHelperCondMet,
2173
+ at as isHelperPrefMet,
2174
+ dt as mergeConsecutiveTargets,
2175
+ mt as promptParser,
2176
+ De as rebuildFieldsJsonStructure,
2177
+ Ve as safeParseJson,
2178
+ Ge as syncHostStylesIntoShadow,
2179
+ He as valueNormalizer
2149
2180
  };
2150
2181
  //# sourceMappingURL=ai-feat-utils.js.map