@baishuyun/ai-feat-utils 2.0.40 → 2.0.43

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.
@@ -1,4 +1,4 @@
1
- const d = (e) => {
1
+ const y = (e) => {
2
2
  if ((e == null ? void 0 : e.type) !== "text" || !e.providerMetadata || !e.providerMetadata.raw || !e.providerMetadata.raw.data)
3
3
  return null;
4
4
  if (typeof e.providerMetadata.raw.data != "string")
@@ -10,19 +10,19 @@ const d = (e) => {
10
10
  console.error("invalid raw data");
11
11
  }
12
12
  return t || e.providerMetadata.raw.data;
13
- }, N = (e) => {
13
+ }, W = (e) => {
14
14
  if ((e == null ? void 0 : e.type) === "error")
15
15
  return !0;
16
- const t = d(e);
16
+ const t = y(e);
17
17
  return (t == null ? void 0 : t.type) === "agent-error";
18
- }, fe = (e) => {
19
- const t = d(e);
18
+ }, Ee = (e) => {
19
+ const t = y(e);
20
20
  return (t == null ? void 0 : t.type) === "agent-fake-msg";
21
- }, pe = (e) => (e == null ? void 0 : e.type) === "file", be = (e) => {
22
- const t = d(e);
21
+ }, qe = (e) => (e == null ? void 0 : e.type) === "file", Fe = (e) => {
22
+ const t = y(e);
23
23
  return (t == null ? void 0 : t.type) === "query-stream-parsed-info";
24
- }, ye = (e) => {
25
- const t = d(e);
24
+ }, Re = (e) => {
25
+ const t = y(e);
26
26
  if ((t == null ? void 0 : t.type) !== "query-stream-parsed-info")
27
27
  return null;
28
28
  const r = t.result;
@@ -32,81 +32,194 @@ const d = (e) => {
32
32
  } catch (n) {
33
33
  return console.error("invalid query result data"), null;
34
34
  }
35
- }, we = (e) => {
35
+ }, Te = (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
- }, he = (e) => {
43
- const t = d(e);
42
+ }, De = (e) => {
43
+ const t = y(e);
44
44
  return (t == null ? void 0 : t.type) === "agent-loading";
45
- }, Se = (e) => {
46
- const t = d(e);
45
+ }, $e = (e) => {
46
+ const t = y(e);
47
47
  return (t == null ? void 0 : t.type) !== "agent-loading" ? "" : (t == null ? void 0 : t.label) || "加载中";
48
- }, ve = (e) => {
49
- if (!N(e))
48
+ }, Pe = (e) => {
49
+ if (!W(e))
50
50
  return "";
51
51
  if (e != null && e.errorText)
52
52
  return e.errorText;
53
- const t = d(e);
53
+ const t = y(e);
54
54
  return (t == null ? void 0 : t.error) || "未知错误";
55
- }, Ae = (e) => {
55
+ }, Oe = (e) => {
56
56
  if (e != null && e.errorText)
57
57
  return e.errorText;
58
- const t = d(e);
58
+ const t = y(e);
59
59
  return (t == null ? void 0 : t.error) || "未知错误";
60
- }, y = "data-shadow-slot-injected", b = "host-clone", M = (e) => {
60
+ }, M = "data-shadow-slot-injected", v = "host-clone", B = (e) => {
61
61
  try {
62
62
  const t = new CSSStyleSheet();
63
63
  t.replaceSync(e);
64
- const r = [], n = [], a = [];
65
- let l = [];
64
+ const r = [], n = [], l = [];
65
+ let a = [];
66
66
  const i = () => {
67
- l.length && (a.push(`@layer ${b} {
68
- ${l.join(`
67
+ a.length && (l.push(`@layer ${v} {
68
+ ${a.join(`
69
69
  `)}
70
- }`), l = []);
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(), a.push(o.cssText)) : l.push(o.cssText);
74
- return i(), [...r, ...n, ...a].join(`
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(`
75
75
  `);
76
76
  } catch (t) {
77
- return `@layer ${b} {
77
+ return `@layer ${v} {
78
78
  ${e}
79
79
  }`;
80
80
  }
81
- }, ke = (e, t) => {
82
- if (e.querySelector(`[${y}]`)) return;
83
- const r = [], n = [], a = (o) => {
81
+ }, Le = (e, t) => {
82
+ if (e.querySelector(`[${M}]`)) return;
83
+ const r = [], n = [], l = (o) => {
84
84
  if (o instanceof HTMLLinkElement) {
85
- const u = `@import url("${o.href}") layer(${b})`;
86
- r.push(o.media ? `${u} ${o.media};` : `${u};`);
87
- } else o instanceof HTMLStyleElement && n.push(M(o.textContent || ""));
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(B(o.textContent || ""));
88
88
  };
89
- document.head.querySelectorAll("style").forEach(a), document.head.querySelectorAll('link[rel="stylesheet"]').forEach(a);
90
- let l = t.parentNode;
91
- for (; l; )
92
- l instanceof ShadowRoot && (l.querySelectorAll("style").forEach(a), l.querySelectorAll('link[rel="stylesheet"]').forEach(a)), l = l.parentNode;
89
+ document.head.querySelectorAll("style").forEach(l), document.head.querySelectorAll('link[rel="stylesheet"]').forEach(l);
90
+ let a = t.parentNode;
91
+ for (; a; )
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(y, ""), i.textContent = [
95
- `@layer ${b};`,
94
+ i.setAttribute(M, ""), i.textContent = [
95
+ `@layer ${v};`,
96
96
  ...r,
97
97
  ...n
98
98
  ].join(`
99
99
  `), e.appendChild(i);
100
+ }, _ = "data-bs-host-style", k = /* @__PURE__ */ new WeakMap(), C = (e, t) => e.replace(
101
+ /url\(\s*(?:"([^"\n]*)"|'([^'\n]*)'|([^\s)]*))\s*\)/gi,
102
+ (r, n, l, a) => {
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;
106
+ try {
107
+ return `url(${JSON.stringify(new URL(i, t).href)})`;
108
+ } catch (s) {
109
+ return r;
110
+ }
111
+ }
112
+ ), I = (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]"), N = (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 I(n.selectorText) + C(l, t);
116
+ }
117
+ return "cssRules" in r && r.type !== 7 ? r.cssText.slice(0, r.cssText.indexOf("{") + 1) + N(r.cssRules, t) + "}" : C(r.cssText, t);
118
+ }).join(`
119
+ `), E = (e) => {
120
+ var n, l;
121
+ const t = e.nodeType === 9 ? e : e.ownerDocument, r = [];
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}` });
125
+ }
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;
128
+ const i = a.media || "", o = a.nonce || "";
129
+ try {
130
+ if (a.sheet) {
131
+ r.push({ source: a, css: N(a.sheet.cssRules, a.sheet.href || a.baseURI), media: i, nonce: o });
132
+ continue;
133
+ }
134
+ } catch (s) {
135
+ if (a.tagName === "LINK") {
136
+ r.push({ source: a, href: a.href, media: i, nonce: o });
137
+ continue;
138
+ }
139
+ }
140
+ a.tagName === "LINK" ? r.push({ source: a, href: a.href, media: i, nonce: o }) : r.push({ source: a, css: C(a.textContent || "", a.baseURI), media: i, nonce: o });
141
+ }
142
+ for (const a of Array.from(e.adoptedStyleSheets || []))
143
+ a.disabled || r.push({ source: a, css: N(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) => {
146
+ const t = k.get(e);
147
+ if (t) return t;
148
+ const r = e.nodeType === 9 ? e : e.ownerDocument;
149
+ let n = E(e), l = !1;
150
+ const a = /* @__PURE__ */ new Set(), i = () => {
151
+ l = !1;
152
+ const u = E(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()));
154
+ }, o = () => {
155
+ l || (l = !0, queueMicrotask(() => {
156
+ a.size && i();
157
+ }));
158
+ }, s = new MutationObserver((u) => {
159
+ u.some((c) => {
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(
162
+ (h) => h.nodeType === 1 && (h.matches('style,link[rel~="stylesheet"]') || h.querySelector('style,link[rel~="stylesheet"]'))
163
+ );
164
+ }) && o();
165
+ });
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,
169
+ refresh: o,
170
+ subscribe(u) {
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));
173
+ };
174
+ }
175
+ };
176
+ return k.set(e, d), d;
177
+ }, We = (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();
183
+ }
184
+ const l = r.map(j), a = t.ownerDocument.createComment("host styles");
185
+ e.prepend(a);
186
+ const i = /* @__PURE__ */ new Map(), o = () => {
187
+ var x;
188
+ const d = l.reduce((f, m) => f.concat(m.read()), []), u = e.querySelector("[data-bs-shadow-content]"), c = `${t.ownerDocument.documentElement.className} ${((x = t.ownerDocument.body) == null ? void 0 : x.className) || ""}`;
189
+ u && u.className !== c && (u.className = c);
190
+ const b = new Set(d.map((f) => f.source));
191
+ for (const [f, m] of i) b.has(f) || (m.remove(), i.delete(f));
192
+ let h = a;
193
+ for (const f of d) {
194
+ let m = i.get(f.source);
195
+ const L = f.href ? "LINK" : "STYLE";
196
+ if (m && m.tagName !== L && (m.remove(), i.delete(f.source), m = void 0), m || (m = t.ownerDocument.createElement(f.href ? "link" : "style"), m.setAttribute(_, ""), i.set(f.source, m)), m.media = f.media, m.nonce = f.nonce, f.href) {
197
+ const A = m;
198
+ A.rel = "stylesheet", A.href !== f.href && (A.href = f.href);
199
+ } else m.textContent !== f.css && (m.textContent = f.css || "");
200
+ h.nextSibling !== m && h.after(m), h = m;
201
+ }
202
+ }, s = l.map((d) => d.subscribe(o));
203
+ o();
204
+ const p = new MutationObserver((d) => {
205
+ d.some((u) => {
206
+ const c = u.target.nodeType === 1 ? u.target : u.target.parentElement;
207
+ return c && !c.closest("style,link");
208
+ }) && l.forEach((u) => u.refresh());
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();
212
+ };
100
213
  };
101
- function x(e) {
214
+ function U(e) {
102
215
  return Array.isArray(e) ? e.every((t) => typeof t == "string") : !1;
103
216
  }
104
- function q(e) {
217
+ function G(e) {
105
218
  return Array.isArray(e) ? e.every(
106
219
  (t) => typeof t == "object" && t !== null && "label" in t && "value" in t && typeof t.label == "string" && typeof t.value == "string"
107
220
  ) : !1;
108
221
  }
109
- const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ") : e, F = /* @__PURE__ */ new Set([
222
+ const Be = (e) => U(e) ? e.join(", ") : G(e) ? e.map((r) => r.value).join(", ") : e, H = /* @__PURE__ */ new Set([
110
223
  "password",
111
224
  "textarea",
112
225
  "datetime",
@@ -117,16 +230,16 @@ const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ")
117
230
  "combocheck",
118
231
  "checkboxgroup",
119
232
  "number"
120
- ]), _e = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? F.has(t.widget.type) : !1) : [], E = (e) => (t) => {
121
- const r = d(t);
233
+ ]), Ie = (e) => Array.isArray(e) ? e.filter((t) => t.widget ? H.has(t.widget.type) : !1) : [], z = (e) => (t) => {
234
+ const r = y(t);
122
235
  return (r == null ? void 0 : r.type) === e;
123
- }, Ne = (e) => (t) => {
236
+ }, je = (e) => (t) => {
124
237
  const r = t, n = r == null ? void 0 : r.part;
125
- return E(e)(n);
126
- }, Me = (e) => (t) => {
127
- const r = d(t);
238
+ return z(e)(n);
239
+ }, Ue = (e) => (t) => {
240
+ const r = y(t);
128
241
  return (r == null ? void 0 : r.type) !== e ? null : (r == null ? void 0 : r.field) || null;
129
- }, xe = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], qe = (e) => {
242
+ }, Ge = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], He = (e) => {
130
243
  if (typeof e != "string")
131
244
  return e;
132
245
  try {
@@ -134,14 +247,14 @@ const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ")
134
247
  } catch (t) {
135
248
  return console.info("[safeParseJson] Failed to parse JSON:", t), null;
136
249
  }
137
- }, w = (e) => !!(e && typeof e == "object" && e.qnKey), Fe = (e) => {
138
- var n, a;
139
- const t = (n = e == null ? void 0 : e.widget) == null ? void 0 : n.value, r = (a = e == null ? void 0 : e.widget) == null ? void 0 : a.type;
140
- 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" ? w(t) : r === "upload" || r === "image" ? Array.isArray(t) && t.length > 0 && t.every(w) : !0;
141
- }, R = (e = "_widget_") => {
142
- const t = Date.now(), r = String(t), n = r.length, a = r.slice(0, n - 5), l = String(Math.floor(Math.random() * 1e5)).padStart(5, "0");
143
- return `${e}${a}${l}`;
144
- }, Ee = (e, t) => ({
250
+ }, q = (e) => !!(e && typeof e == "object" && e.qnKey), ze = (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");
256
+ return `${e}${l}${a}`;
257
+ }, Qe = (e, t) => ({
145
258
  field: e,
146
259
  onLoaded: () => {
147
260
  t.fillWidget({
@@ -149,22 +262,22 @@ const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ")
149
262
  field: e
150
263
  });
151
264
  },
152
- onChange: (r, n, a, l) => {
265
+ onChange: (r, n, l, a) => {
153
266
  const i = {
154
267
  field: n,
155
268
  checked: r,
156
- parentFieldName: a,
157
- rowIndex: l
269
+ parentFieldName: l,
270
+ rowIndex: a
158
271
  };
159
272
  t.fillWidget(i);
160
273
  }
161
- }), Re = 10, De = (e, t = "image/png") => new Promise((r) => {
274
+ }), Ke = 10, Ye = (e, t = "image/png") => new Promise((r) => {
162
275
  const n = new Image();
163
276
  n.crossOrigin = "anonymous", n.onload = () => {
164
- const a = document.createElement("canvas");
165
- a.width = n.naturalWidth, a.height = n.naturalHeight, a.getContext("2d").drawImage(n, 0, 0), r(a.toDataURL(t));
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));
166
279
  }, n.onerror = () => r(e), n.src = e;
167
- }), Pe = {
280
+ }), Ve = {
168
281
  eq: "等于",
169
282
  neq: "不等于",
170
283
  gt: "大于",
@@ -181,7 +294,7 @@ const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ")
181
294
  range: "选择范围",
182
295
  like: "模糊匹配",
183
296
  unlike: "模糊不匹配"
184
- }, D = {
297
+ }, K = {
185
298
  // Text-like: equality, fuzzy, empty checks
186
299
  text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
187
300
  password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
@@ -225,7 +338,7 @@ const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ")
225
338
  button: [],
226
339
  subform: [],
227
340
  unknown: []
228
- }, P = {
341
+ }, Y = {
229
342
  text: "eq",
230
343
  password: "eq",
231
344
  radiogroup: "eq",
@@ -253,106 +366,106 @@ const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ")
253
366
  dataload: "eq",
254
367
  formula: "eq"
255
368
  };
256
- function $e(e) {
369
+ function Xe(e) {
257
370
  var t;
258
- return e ? (t = D[e]) != null ? t : [] : [];
371
+ return e ? (t = K[e]) != null ? t : [] : [];
259
372
  }
260
- function Te(e) {
373
+ function Ze(e) {
261
374
  var t;
262
- return e && (t = P[e]) != null ? t : "eq";
375
+ return e && (t = Y[e]) != null ? t : "eq";
263
376
  }
264
- function f(e) {
377
+ function S(e) {
265
378
  return typeof e == "object" && e !== null && !Array.isArray(e);
266
379
  }
267
- function C(e) {
268
- return f(e) ? e : null;
380
+ function P(e) {
381
+ return S(e) ? e : null;
269
382
  }
270
- function h(e) {
383
+ function F(e) {
271
384
  return !!(e == null || e === "" || Array.isArray(e) && e.length === 0);
272
385
  }
273
- function S(e, t) {
386
+ function R(e, t) {
274
387
  if (Array.isArray(e) && Array.isArray(t)) {
275
388
  if (e.length !== t.length) return !1;
276
389
  const r = e.map(String).sort(), n = t.map(String).sort();
277
- return r.every((a, l) => a === n[l]);
390
+ return r.every((l, a) => l === n[a]);
278
391
  }
279
- if (f(e) && f(t)) {
392
+ if (S(e) && S(t)) {
280
393
  const r = Object.keys(e), n = Object.keys(t);
281
- return r.length !== n.length ? !1 : r.every((a) => String(e[a]) === String(t[a]));
394
+ return r.length !== n.length ? !1 : r.every((l) => String(e[l]) === String(t[l]));
282
395
  }
283
396
  return String(e) === String(t);
284
397
  }
285
- function v(e, t) {
286
- if (f(t)) {
287
- const n = C(e);
398
+ function T(e, t) {
399
+ if (S(t)) {
400
+ const n = P(e);
288
401
  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));
289
402
  }
290
403
  const r = Array.isArray(t) ? t.map(String) : [];
291
404
  return Array.isArray(e) ? e.some((n) => r.includes(String(n))) : r.includes(String(e));
292
405
  }
293
- function $(e, t) {
406
+ function V(e, t) {
294
407
  const r = Array.isArray(t) ? t.map(String) : [];
295
408
  if (r.length === 0) return !1;
296
409
  const n = Array.isArray(e) ? e.map(String) : [];
297
- return r.every((a) => n.includes(a));
410
+ return r.every((l) => n.includes(l));
298
411
  }
299
- function T(e, t) {
300
- const r = C(t);
412
+ function X(e, t) {
413
+ const r = P(t);
301
414
  if (!r) return !1;
302
415
  const n = Number(e);
303
416
  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));
304
417
  }
305
- function B(e, t) {
418
+ function Z(e, t) {
306
419
  var i;
307
420
  const r = (i = e.field.widget) == null ? void 0 : i.widgetName;
308
421
  if (!r) return !1;
309
- const n = t[r], { operator: a, value: l } = e;
310
- switch (a) {
422
+ const n = t[r], { operator: l, value: a } = e;
423
+ switch (l) {
311
424
  case "empty":
312
- return h(n);
425
+ return F(n);
313
426
  case "not_empty":
314
- return !h(n);
427
+ return !F(n);
315
428
  case "eq":
316
- return S(n, l);
429
+ return R(n, a);
317
430
  case "neq":
318
- return !S(n, l);
431
+ return !R(n, a);
319
432
  case "contains":
320
433
  case "like":
321
- return String(n).includes(String(l));
434
+ return String(n).includes(String(a));
322
435
  case "not_contains":
323
436
  case "unlike":
324
- return !String(n).includes(String(l));
437
+ return !String(n).includes(String(a));
325
438
  case "gt":
326
- return Number(n) > Number(l);
439
+ return Number(n) > Number(a);
327
440
  case "gte":
328
- return Number(n) >= Number(l);
441
+ return Number(n) >= Number(a);
329
442
  case "lt":
330
- return Number(n) < Number(l);
443
+ return Number(n) < Number(a);
331
444
  case "lte":
332
- return Number(n) <= Number(l);
445
+ return Number(n) <= Number(a);
333
446
  case "in":
334
- return v(n, l);
447
+ return T(n, a);
335
448
  case "nin":
336
- return !v(n, l);
449
+ return !T(n, a);
337
450
  case "all":
338
- return $(n, l);
451
+ return V(n, a);
339
452
  case "range":
340
- return T(n, l);
453
+ return X(n, a);
341
454
  default:
342
455
  return !1;
343
456
  }
344
457
  }
345
- function Be(e, t) {
458
+ function Je(e, t) {
346
459
  if (!e.enabled)
347
460
  return !1;
348
461
  const r = e.triggerCondition;
349
462
  if (!r) return !0;
350
- const { items: n, quantifier: a } = r;
463
+ const { items: n, quantifier: l } = r;
351
464
  if (!n || n.length === 0) return !0;
352
- const l = n.map((i) => B(i, t));
353
- return a === "any" ? l.some((i) => i) : l.every((i) => i);
465
+ const a = n.map((i) => Z(i, t));
466
+ return l === "any" ? a.some((i) => i) : a.every((i) => i);
354
467
  }
355
- const Oe = (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", O = {
468
+ const et = (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", J = {
356
469
  eq: "eq",
357
470
  neq: "ne",
358
471
  gt: "gt",
@@ -369,7 +482,7 @@ const Oe = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
369
482
  empty: "empty",
370
483
  not_empty: "not_empty",
371
484
  range: "range"
372
- }, W = {
485
+ }, ee = {
373
486
  eq: "eq",
374
487
  ne: "neq",
375
488
  gt: "gt",
@@ -387,32 +500,32 @@ const Oe = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
387
500
  not_empty: "not_empty",
388
501
  range: "range"
389
502
  };
390
- function We(e) {
503
+ function tt(e) {
391
504
  const t = e.quantifier === "any" ? "or" : "and", r = e.items.map((n) => {
392
- var i, o, u, c, p, m;
393
- const a = (i = O[n.operator]) != null ? i : "eq";
394
- let l;
395
- return n.operator === "range" && f(n.value) ? l = [n.value.min, n.value.max] : Array.isArray(n.value) ? l = n.value : l = [n.value], {
396
- field: (c = (u = (o = n.field) == null ? void 0 : o.widget) == null ? void 0 : u.widgetName) != null ? c : "",
397
- method: a,
398
- value: l,
399
- type: (m = (p = n.field) == null ? void 0 : p.widget) == null ? void 0 : m.type
505
+ var i, o, s, p, d, u;
506
+ const l = (i = J[n.operator]) != null ? i : "eq";
507
+ let a;
508
+ return n.operator === "range" && S(n.value) ? a = [n.value.min, n.value.max] : Array.isArray(n.value) ? a = n.value : a = [n.value], {
509
+ field: (p = (s = (o = n.field) == null ? void 0 : o.widget) == null ? void 0 : s.widgetName) != null ? p : "",
510
+ method: l,
511
+ value: a,
512
+ type: (u = (d = n.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
400
513
  };
401
514
  });
402
515
  return JSON.stringify({ rel: t, cond: r });
403
516
  }
404
- function Le(e) {
405
- const t = JSON.parse(e), r = t.rel === "or" ? "any" : "all", n = t.cond.map((a, l) => {
406
- var u, c;
407
- const i = (u = W[a.method]) != null ? u : "eq";
408
- let o = a.value;
409
- return i === "range" ? o = { min: a.value[0], max: a.value[1] } : ["eq", "neq", "contains", "not_contains", "gt", "gte", "lt", "lte"].includes(i) && (o = a.value[0]), {
410
- id: `${a.field}_${l}`,
517
+ function rt(e) {
518
+ const t = JSON.parse(e), r = t.rel === "or" ? "any" : "all", n = t.cond.map((l, a) => {
519
+ var s, p;
520
+ const i = (s = ee[l.method]) != null ? s : "eq";
521
+ let o = l.value;
522
+ 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]), {
523
+ id: `${l.field}_${a}`,
411
524
  field: {
412
- label: a.field,
525
+ label: l.field,
413
526
  widget: {
414
- widgetName: a.field,
415
- type: (c = a.type) != null ? c : "unknown",
527
+ widgetName: l.field,
528
+ type: (p = l.type) != null ? p : "unknown",
416
529
  value: void 0
417
530
  }
418
531
  },
@@ -422,23 +535,23 @@ function Le(e) {
422
535
  });
423
536
  return { targetName: "", quantifier: r, items: n };
424
537
  }
425
- function Ie(e) {
538
+ function nt(e) {
426
539
  const t = (r) => String(r).padStart(2, "0");
427
540
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
428
541
  }
429
- function je(e, t, r = 1) {
430
- const n = [], a = [];
431
- for (const l of e)
432
- t(l) ? a.push(l) : (a.length > 0 && (n.push(a.length >= r ? [...a] : a[0]), a.length = 0), n.push(l));
433
- return a.length > 0 && n.push(a.length >= 2 ? [...a] : a[0]), n;
542
+ function at(e, t, r = 1) {
543
+ const n = [], l = [];
544
+ for (const a of e)
545
+ t(a) ? l.push(a) : (l.length > 0 && (n.push(l.length >= r ? [...l] : l[0]), l.length = 0), n.push(a));
546
+ return l.length > 0 && n.push(l.length >= 2 ? [...l] : l[0]), n;
434
547
  }
435
- function _(e) {
548
+ function O(e) {
436
549
  const t = [];
437
550
  for (const r of e)
438
- Array.isArray(r) ? t.push(..._(r)) : t.push(r);
551
+ Array.isArray(r) ? t.push(...O(r)) : t.push(r);
439
552
  return t;
440
553
  }
441
- const L = {
554
+ const te = {
442
555
  projectdevelopment: "e914",
443
556
  resourcelibrary: "e915",
444
557
  Plugin2: "e90e",
@@ -845,11 +958,11 @@ const L = {
845
958
  Automation1: "ea95",
846
959
  Avatar: "ea96"
847
960
  };
848
- function Ge(e) {
849
- const t = L[e];
961
+ function lt(e) {
962
+ const t = te[e];
850
963
  return t ? `&#x${t};` : void 0;
851
964
  }
852
- const Ue = { 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" }, He = (e, t, r) => {
965
+ const it = { 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" }, ot = (e, t, r) => {
853
966
  if (!r)
854
967
  return {
855
968
  translated: ""
@@ -859,22 +972,22 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
859
972
  if (i.widget.type === "subform" && i.widget.items) {
860
973
  for (const o of i.widget.items)
861
974
  if ("widget" in o && !("options" in o)) {
862
- const u = `${i.widget.widgetName}.${o.widget.widgetName}`;
863
- n.set(u, o.label);
975
+ const s = `${i.widget.widgetName}.${o.widget.widgetName}`;
976
+ n.set(s, o.label);
864
977
  }
865
978
  }
866
- const a = [], l = e.replace(
979
+ const l = [], a = e.replace(
867
980
  /\$\{(virtual\.)?(_widget_\d+(?:\._widget_\d+)?)\}/g,
868
- (i, o, u) => {
869
- const c = !!o, { translated: p, meta: m } = r(u, c);
870
- return m && a.push(m), p;
981
+ (i, o, s) => {
982
+ const p = !!o, { translated: d, meta: u } = r(s, p);
983
+ return u && l.push(u), d;
871
984
  }
872
985
  );
873
986
  return {
874
- meta: a.length ? _(a) : null,
875
- translated: (l != null ? l : "").trim()
987
+ meta: l.length ? O(l) : null,
988
+ translated: (a != null ? a : "").trim()
876
989
  };
877
- }, I = {
990
+ }, re = {
878
991
  手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
879
992
  电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
880
993
  邮政编码: "^\\d{6}$",
@@ -886,8 +999,8 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
886
999
  二维码图片: "qrcode",
887
1000
  条形码图片: "barcode",
888
1001
  自定义: "custom"
889
- }, A = (e) => {
890
- const { widget: t, labelStyle: r, label: n, ...a } = e || {}, l = I[r] || "";
1002
+ }, D = (e) => {
1003
+ const { widget: t, labelStyle: r, label: n, ...l } = e || {}, a = re[r] || "";
891
1004
  return {
892
1005
  widget: {
893
1006
  widgetName: `_widget_${Date.now()}`,
@@ -925,7 +1038,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
925
1038
  },
926
1039
  enterClearText: !0,
927
1040
  ...t,
928
- regex: l,
1041
+ regex: a,
929
1042
  type: "text",
930
1043
  labelStyle: n
931
1044
  },
@@ -933,20 +1046,20 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
933
1046
  label: n,
934
1047
  lineWidth: 6,
935
1048
  tab: null,
936
- ...a
1049
+ ...l
937
1050
  };
938
- }, s = (e = "_widget", t) => {
1051
+ }, g = (e = "_widget", t) => {
939
1052
  const r = `${e}_${Date.now()}`;
940
1053
  if (t === void 0)
941
1054
  return r;
942
1055
  const n = t.toString().length;
943
1056
  return `${r.slice(0, -n)}${t}`;
944
- }, j = (e) => {
1057
+ }, ne = (e) => {
945
1058
  const { widget: t, label: r, ...n } = e || {};
946
1059
  return {
947
1060
  widget: {
948
1061
  type: "number",
949
- widgetName: s(),
1062
+ widgetName: g(),
950
1063
  widgetNameAlias: "",
951
1064
  triggerEvent: !1,
952
1065
  customCls: null,
@@ -1006,7 +1119,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1006
1119
  tab: null,
1007
1120
  ...n
1008
1121
  };
1009
- }, G = (e) => {
1122
+ }, ae = (e) => {
1010
1123
  const { widget: t, label: r, ...n } = e || {};
1011
1124
  return {
1012
1125
  widget: {
@@ -1043,7 +1156,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1043
1156
  tab: null,
1044
1157
  ...n
1045
1158
  };
1046
- }, k = (e) => {
1159
+ }, $ = (e) => {
1047
1160
  const { widget: t, label: r, ...n } = e || {};
1048
1161
  return {
1049
1162
  widget: {
@@ -1079,7 +1192,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1079
1192
  ...n,
1080
1193
  labelStyle: r
1081
1194
  };
1082
- }, U = (e) => {
1195
+ }, le = (e) => {
1083
1196
  const { widget: t, label: r, ...n } = e || {};
1084
1197
  return {
1085
1198
  widget: {
@@ -1146,12 +1259,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1146
1259
  tab: null,
1147
1260
  ...n
1148
1261
  };
1149
- }, g = (e) => e, H = (e) => {
1262
+ }, w = (e) => e, ie = (e) => {
1150
1263
  const { widget: t, label: r, ...n } = e || {};
1151
1264
  return {
1152
1265
  widget: {
1153
1266
  type: "deptgroup",
1154
- widgetName: s(),
1267
+ widgetName: g(),
1155
1268
  widgetNameAlias: "",
1156
1269
  customCls: null,
1157
1270
  height: "34",
@@ -1180,12 +1293,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1180
1293
  tab: null,
1181
1294
  ...n
1182
1295
  };
1183
- }, Q = (e) => {
1296
+ }, oe = (e) => {
1184
1297
  const { widget: t, label: r, ...n } = e || {};
1185
1298
  return {
1186
1299
  widget: {
1187
1300
  type: "sn",
1188
- widgetName: s(),
1301
+ widgetName: g(),
1189
1302
  widgetNameAlias: "",
1190
1303
  triggerEvent: 0,
1191
1304
  customCls: null,
@@ -1217,12 +1330,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1217
1330
  tab: null,
1218
1331
  ...n
1219
1332
  };
1220
- }, z = (e) => {
1333
+ }, se = (e) => {
1221
1334
  const { widget: t, label: r, ...n } = e || {};
1222
1335
  return {
1223
1336
  widget: {
1224
1337
  type: "dept",
1225
- widgetName: s(),
1338
+ widgetName: g(),
1226
1339
  widgetNameAlias: "",
1227
1340
  customCls: null,
1228
1341
  height: "34",
@@ -1251,12 +1364,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1251
1364
  tab: null,
1252
1365
  ...n
1253
1366
  };
1254
- }, Y = (e) => {
1367
+ }, ue = (e) => {
1255
1368
  const { widget: t, label: r, ...n } = e || {};
1256
1369
  return {
1257
1370
  widget: {
1258
1371
  type: "usergroup",
1259
- widgetName: s(),
1372
+ widgetName: g(),
1260
1373
  widgetNameAlias: "",
1261
1374
  customCls: null,
1262
1375
  height: "34",
@@ -1288,11 +1401,11 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1288
1401
  tab: null,
1289
1402
  ...n
1290
1403
  };
1291
- }, K = (e) => {
1404
+ }, de = (e) => {
1292
1405
  const { widget: t, label: r, ...n } = e || {};
1293
1406
  return {
1294
1407
  widget: {
1295
- widgetName: s(),
1408
+ widgetName: g(),
1296
1409
  widgetNameAlias: "",
1297
1410
  customCls: null,
1298
1411
  enable: !0,
@@ -1316,7 +1429,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1316
1429
  tab: null,
1317
1430
  ...n
1318
1431
  };
1319
- }, X = (e) => !e || !e.length ? e : e.map((t, r) => ({
1432
+ }, ce = (e) => !e || !e.length ? e : e.map((t, r) => ({
1320
1433
  id: r,
1321
1434
  // name: "_widget_1761976674767",
1322
1435
  // form: "a2f34ef882158a3e97da4ef7",
@@ -1328,16 +1441,16 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1328
1441
  isEditable: !0,
1329
1442
  group: "dimension,filter,select",
1330
1443
  formula: ""
1331
- })), Z = (e) => !e || !e.length ? e : e.map((t) => ({
1444
+ })), ge = (e) => !e || !e.length ? e : e.map((t) => ({
1332
1445
  mode: "depend",
1333
1446
  ...t
1334
- })), V = (e) => {
1335
- var a, l, i;
1447
+ })), me = (e) => {
1448
+ var l, a, i;
1336
1449
  const { widget: t, label: r, ...n } = e || {};
1337
1450
  return {
1338
1451
  widget: {
1339
1452
  type: "dataload",
1340
- widgetName: s(),
1453
+ widgetName: g(),
1341
1454
  widgetNameAlias: "",
1342
1455
  customCls: null,
1343
1456
  width: 350,
@@ -1370,11 +1483,11 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1370
1483
  triggerWidget: null,
1371
1484
  triggerFieldMode: "none",
1372
1485
  triggerField: null,
1373
- forms: (a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.forms,
1486
+ forms: (l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.forms,
1374
1487
  selectArg: [],
1375
1488
  selectRel: "and",
1376
- fields: X((l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.mapFields),
1377
- mapFields: Z((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1489
+ fields: ce((a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.mapFields),
1490
+ mapFields: ge((i = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : i.mapFields)
1378
1491
  },
1379
1492
  labelStyle: r
1380
1493
  },
@@ -1383,12 +1496,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1383
1496
  tab: null,
1384
1497
  ...n
1385
1498
  };
1386
- }, J = (e) => {
1499
+ }, fe = (e) => {
1387
1500
  const { widget: t, label: r, ...n } = e || {};
1388
1501
  return {
1389
1502
  widget: {
1390
1503
  type: "user",
1391
- widgetName: s(),
1504
+ widgetName: g(),
1392
1505
  widgetNameAlias: "",
1393
1506
  customCls: null,
1394
1507
  height: "34",
@@ -1420,12 +1533,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1420
1533
  tab: null,
1421
1534
  ...n
1422
1535
  };
1423
- }, ee = (e) => {
1536
+ }, pe = (e) => {
1424
1537
  const { widget: t, label: r, ...n } = e || {};
1425
1538
  return {
1426
1539
  widget: {
1427
1540
  type: "signature",
1428
- widgetName: s(),
1541
+ widgetName: g(),
1429
1542
  widgetNameAlias: "",
1430
1543
  customCls: null,
1431
1544
  height: 34,
@@ -1443,12 +1556,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1443
1556
  tab: null,
1444
1557
  ...n
1445
1558
  };
1446
- }, te = (e) => {
1559
+ }, be = (e) => {
1447
1560
  const { widget: t, label: r, ...n } = e || {};
1448
1561
  return {
1449
1562
  widget: {
1450
1563
  type: "image",
1451
- widgetName: s(),
1564
+ widgetName: g(),
1452
1565
  widgetNameAlias: "",
1453
1566
  customCls: null,
1454
1567
  height: 100,
@@ -1515,12 +1628,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1515
1628
  tab: null,
1516
1629
  ...n
1517
1630
  };
1518
- }, re = (e) => {
1631
+ }, ye = (e) => {
1519
1632
  const { widget: t, label: r, ...n } = e || {};
1520
1633
  return {
1521
1634
  widget: {
1522
1635
  type: "upload",
1523
- widgetName: s(),
1636
+ widgetName: g(),
1524
1637
  widgetNameAlias: "",
1525
1638
  customCls: null,
1526
1639
  enable: !0,
@@ -1550,12 +1663,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1550
1663
  tab: null,
1551
1664
  ...n
1552
1665
  };
1553
- }, ne = (e) => {
1666
+ }, he = (e) => {
1554
1667
  const { widget: t, label: r, ...n } = e || {};
1555
1668
  return {
1556
1669
  widget: {
1557
1670
  type: "checkboxgroup",
1558
- widgetName: s(),
1671
+ widgetName: g(),
1559
1672
  widgetNameAlias: "",
1560
1673
  customCls: null,
1561
1674
  enable: !0,
@@ -1584,12 +1697,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1584
1697
  tab: null,
1585
1698
  ...n
1586
1699
  };
1587
- }, ae = (e) => {
1700
+ }, we = (e) => {
1588
1701
  const { widget: t, label: r, ...n } = e || {};
1589
1702
  return {
1590
1703
  widget: {
1591
1704
  type: "separator",
1592
- widgetName: s(),
1705
+ widgetName: g(),
1593
1706
  widgetNameAlias: "",
1594
1707
  customCls: null,
1595
1708
  enable: !0,
@@ -1603,12 +1716,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1603
1716
  tab: null,
1604
1717
  ...n
1605
1718
  };
1606
- }, le = (e) => {
1719
+ }, Se = (e) => {
1607
1720
  const { widget: t, label: r, ...n } = e || {};
1608
1721
  return {
1609
1722
  widget: {
1610
1723
  type: "combocheck",
1611
- widgetName: s(),
1724
+ widgetName: g(),
1612
1725
  widgetNameAlias: "",
1613
1726
  customCls: null,
1614
1727
  height: 34,
@@ -1640,12 +1753,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1640
1753
  tab: null,
1641
1754
  ...n
1642
1755
  };
1643
- }, ie = (e) => {
1756
+ }, ve = (e) => {
1644
1757
  const { widget: t, label: r, ...n } = e || {};
1645
1758
  return {
1646
1759
  widget: {
1647
1760
  type: "location",
1648
- widgetName: s(),
1761
+ widgetName: g(),
1649
1762
  widgetNameAlias: "",
1650
1763
  customCls: null,
1651
1764
  enable: !0,
@@ -1677,12 +1790,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1677
1790
  tab: null,
1678
1791
  ...n
1679
1792
  };
1680
- }, oe = (e) => {
1793
+ }, Ae = (e) => {
1681
1794
  const { widget: t, label: r, ...n } = e || {};
1682
1795
  return {
1683
1796
  widget: {
1684
1797
  type: "textarea",
1685
- widgetName: s(),
1798
+ widgetName: g(),
1686
1799
  widgetNameAlias: "",
1687
1800
  triggerEvent: !1,
1688
1801
  customCls: null,
@@ -1720,12 +1833,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1720
1833
  tab: null,
1721
1834
  ...n
1722
1835
  };
1723
- }, se = (e = {}) => {
1836
+ }, ke = (e = {}) => {
1724
1837
  const { widget: t, label: r, ...n } = e;
1725
1838
  return {
1726
1839
  widget: {
1727
1840
  type: "button",
1728
- widgetName: s(),
1841
+ widgetName: g(),
1729
1842
  widgetNameAlias: "",
1730
1843
  triggerEvent: 0,
1731
1844
  customCls: null,
@@ -1764,12 +1877,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1764
1877
  tab: null,
1765
1878
  ...n
1766
1879
  };
1767
- }, ue = (e = {}) => {
1880
+ }, Ce = (e = {}) => {
1768
1881
  const { widget: t, label: r, ...n } = e;
1769
1882
  return {
1770
1883
  widget: {
1771
1884
  type: "address",
1772
- widgetName: s(),
1885
+ widgetName: g(),
1773
1886
  widgetNameAlias: "",
1774
1887
  customCls: null,
1775
1888
  width: 720,
@@ -1798,12 +1911,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1798
1911
  tab: null,
1799
1912
  ...n
1800
1913
  };
1801
- }, de = (e = {}) => {
1914
+ }, Ne = (e = {}) => {
1802
1915
  const { widget: t, label: r, ...n } = e;
1803
1916
  return {
1804
1917
  widget: {
1805
1918
  type: "subform",
1806
- widgetName: s(),
1919
+ widgetName: g(),
1807
1920
  widgetNameAlias: "",
1808
1921
  customCls: null,
1809
1922
  enable: !0,
@@ -1817,9 +1930,9 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1817
1930
  triggerFieldMode: "none",
1818
1931
  version: 1
1819
1932
  },
1820
- items: (t.items || []).map((a, l) => {
1821
- const i = me(a, !0);
1822
- return i.widget.widgetName = s("_widget", l), i;
1933
+ items: (t.items || []).map((l, a) => {
1934
+ const i = Me(l, !0);
1935
+ return i.widget.widgetName = g("_widget", a), i;
1823
1936
  }),
1824
1937
  sortable: !0,
1825
1938
  //启用子表单数据排序
@@ -1881,11 +1994,11 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1881
1994
  lineWidth: 12,
1882
1995
  tab: null
1883
1996
  };
1884
- }, ce = (e) => {
1997
+ }, _e = (e) => {
1885
1998
  const { widget: t, label: r, ...n } = e || {};
1886
1999
  return {
1887
2000
  widget: {
1888
- widgetName: s(),
2001
+ widgetName: g(),
1889
2002
  widgetNameAlias: "",
1890
2003
  customCls: null,
1891
2004
  enable: !0,
@@ -1915,47 +2028,47 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1915
2028
  tab: null,
1916
2029
  ...n
1917
2030
  };
1918
- }, ge = {
1919
- address: ue,
1920
- button: se,
1921
- textarea: oe,
1922
- datetime: U,
1923
- text: A,
1924
- password: A,
1925
- location: ie,
1926
- radiogroup: k,
1927
- radio: k,
1928
- combo: G,
1929
- combocheck: le,
1930
- separator: ae,
1931
- checkboxgroup: ne,
1932
- upload: re,
1933
- number: j,
1934
- image: te,
1935
- signature: ee,
1936
- user: J,
1937
- dataload: V,
1938
- linkdata: K,
1939
- linkquery: ce,
1940
- usergroup: Y,
1941
- subform: de,
1942
- dept: z,
1943
- sn: Q,
1944
- deptgroup: H,
1945
- flowState: g,
1946
- flowstate: g,
1947
- formula: g,
1948
- unknown: g
1949
- }, me = (e, t = !1) => {
1950
- var l, i;
2031
+ }, xe = {
2032
+ address: Ce,
2033
+ button: ke,
2034
+ textarea: Ae,
2035
+ datetime: le,
2036
+ text: D,
2037
+ password: D,
2038
+ location: ve,
2039
+ radiogroup: $,
2040
+ radio: $,
2041
+ combo: ae,
2042
+ combocheck: Se,
2043
+ separator: we,
2044
+ checkboxgroup: he,
2045
+ upload: ye,
2046
+ number: ne,
2047
+ image: be,
2048
+ signature: pe,
2049
+ user: fe,
2050
+ dataload: me,
2051
+ linkdata: de,
2052
+ linkquery: _e,
2053
+ usergroup: ue,
2054
+ subform: Ne,
2055
+ dept: se,
2056
+ sn: oe,
2057
+ deptgroup: ie,
2058
+ flowState: w,
2059
+ flowstate: w,
2060
+ formula: w,
2061
+ unknown: w
2062
+ }, Me = (e, t = !1) => {
2063
+ var a, i;
1951
2064
  if (!e || !e.widget || !e.widget.type)
1952
2065
  return e;
1953
2066
  const r = e.widget.type || "unknown";
1954
- return t && r === "subform" ? g(e) : (((i = (l = e == null ? void 0 : e.widget) == null ? void 0 : l.widgetName) != null ? i : "").startsWith("_widget_") || (e.widget.widgetName = R()), (ge[r] || g)(e));
1955
- }, Qe = (e) => {
1956
- var t, r, n, a, l, i, o, u;
1957
- return !e || !((t = e.corp) != null && t.name) || !((r = e.user) != null && r.nickname) ? "" : `${(n = e.corp) == null ? void 0 : n.name} ${(a = e.user) == null ? void 0 : a.nickname}(${(l = e.user) == null ? void 0 : l.username}) ${(i = e.appName) != null ? i : ""} ${(o = e.entryName) != null ? o : ""} ${(u = e.agentName) != null ? u : ""}`;
1958
- }, ze = (e) => {
2067
+ 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()), (xe[r] || w)(e));
2068
+ }, st = (e) => {
2069
+ var t, r, n, l, a, i, o, s;
2070
+ 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 : ""}`;
2071
+ }, ut = (e) => {
1959
2072
  if (!e)
1960
2073
  return "";
1961
2074
  try {
@@ -1967,47 +2080,48 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1967
2080
  }
1968
2081
  };
1969
2082
  export {
1970
- Re as DATA_COUNT_PER_BATCH,
1971
- D as FIELD_TYPE_OPERATOR_MAP,
1972
- Ue as FORM_ICON_UNICODE_MAP,
1973
- Se as GetLoadingMsg,
1974
- ve as GetPartErrMsg,
1975
- ye as GetQueryResult,
1976
- _e as GetSafeFormStructure,
1977
- L as ICON_UNICODE_MAP,
1978
- N as IsErrorPart,
1979
- fe as IsFakeMsgPart,
1980
- we as IsFileGroupPart,
1981
- pe as IsFilePart,
1982
- he as IsLoadingPart,
1983
- be as IsQueryResultPart,
1984
- Pe as OPERATOR_LABEL_MAP,
1985
- F as WHITE_LIST_FIELDS_SET,
1986
- Le as bsConditionParse2Condition,
1987
- We as conditionStringify2bsCondition,
1988
- xe as createFieldPartsExtractor,
1989
- Me as createGetFieldJsonInfo,
1990
- E as createPartTypeChecker,
1991
- Ne as createPayloadTypeChecker,
1992
- d as extractTextPartMeta,
1993
- Ee as field2config,
1994
- _ as flatArr,
1995
- Ie as formatLocalDate,
1996
- $e as getAvailableOperators,
1997
- Qe as getChatCtxForHuman,
1998
- ze as getChatCtxForMcp,
1999
- Te as getDefaultOperator,
2000
- Ge as getIconUnicode,
2001
- Ae as getMetaErrorMsg,
2002
- Fe as hasValidFieldValue,
2003
- De as imageUrlToBase64,
2004
- ke as injectHostStylesIntoShadow,
2005
- Oe as isCtxMatch,
2006
- Be as isHelperCondMet,
2007
- je as mergeConsecutiveTargets,
2008
- He as promptParser,
2009
- me as rebuildFieldsJsonStructure,
2010
- qe as safeParseJson,
2011
- Ce as valueNormalizer
2083
+ Ke as DATA_COUNT_PER_BATCH,
2084
+ K as FIELD_TYPE_OPERATOR_MAP,
2085
+ it as FORM_ICON_UNICODE_MAP,
2086
+ $e as GetLoadingMsg,
2087
+ Pe as GetPartErrMsg,
2088
+ Re as GetQueryResult,
2089
+ Ie as GetSafeFormStructure,
2090
+ te as ICON_UNICODE_MAP,
2091
+ W as IsErrorPart,
2092
+ Ee as IsFakeMsgPart,
2093
+ Te as IsFileGroupPart,
2094
+ qe as IsFilePart,
2095
+ De as IsLoadingPart,
2096
+ Fe as IsQueryResultPart,
2097
+ Ve as OPERATOR_LABEL_MAP,
2098
+ H as WHITE_LIST_FIELDS_SET,
2099
+ rt as bsConditionParse2Condition,
2100
+ tt as conditionStringify2bsCondition,
2101
+ Ge as createFieldPartsExtractor,
2102
+ Ue as createGetFieldJsonInfo,
2103
+ z as createPartTypeChecker,
2104
+ je as createPayloadTypeChecker,
2105
+ y as extractTextPartMeta,
2106
+ Qe as field2config,
2107
+ O as flatArr,
2108
+ nt as formatLocalDate,
2109
+ Xe as getAvailableOperators,
2110
+ st as getChatCtxForHuman,
2111
+ ut as getChatCtxForMcp,
2112
+ Ze as getDefaultOperator,
2113
+ lt as getIconUnicode,
2114
+ Oe as getMetaErrorMsg,
2115
+ ze as hasValidFieldValue,
2116
+ Ye as imageUrlToBase64,
2117
+ Le as injectHostStylesIntoShadow,
2118
+ et as isCtxMatch,
2119
+ Je as isHelperCondMet,
2120
+ at as mergeConsecutiveTargets,
2121
+ ot as promptParser,
2122
+ Me as rebuildFieldsJsonStructure,
2123
+ He as safeParseJson,
2124
+ We as syncHostStylesIntoShadow,
2125
+ Be as valueNormalizer
2012
2126
  };
2013
2127
  //# sourceMappingURL=ai-feat-utils.js.map