@baishuyun/ai-feat-utils 2.0.42 → 2.0.44

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
+ }, L = (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
+ }, Fe = (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
+ }, Re = (e) => (e == null ? void 0 : e.type) === "file", De = (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
+ }, Te = (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
+ }, $e = (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
+ }, Oe = (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
+ }, Pe = (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
+ }, Ie = (e) => {
49
+ if (!L(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
+ }, Le = (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
+ }, E = "data-shadow-slot-injected", v = "host-clone", W = (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
+ }, We = (e, t) => {
82
+ if (e.querySelector(`[${E}]`)) 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(W(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(E, ""), 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(), N = (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
+ ), 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);
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);
118
+ }).join(`
119
+ `), M = (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: C(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: N(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: 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) => {
146
+ const t = k.get(e);
147
+ if (t) return t;
148
+ const r = e.nodeType === 9 ? e : e.ownerDocument;
149
+ let n = M(e), l = !1;
150
+ const a = /* @__PURE__ */ new Set(), i = () => {
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()));
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
+ }, 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();
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, 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) || ""}`;
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));
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;
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 je = (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
+ ]), Ue = (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
+ }, Ge = (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
+ }, He = (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
+ }, ze = (e) => (t) => Array.isArray(t) && t.length > 0 ? t.filter(e) : e(t) ? [t] : [], Qe = (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), 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");
256
+ return `${e}${l}${a}`;
257
+ }, Ke = (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
+ }), Ve = 10, Xe = (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
+ }), Y = {
168
281
  eq: "等于",
169
282
  neq: "不等于",
170
283
  gt: "大于",
@@ -181,7 +294,20 @@ 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 = {
298
+ usergroup: { in: "包含任意一个" },
299
+ deptgroup: { in: "包含任意一个" },
300
+ checkboxgroup: { in: "包含任意一个" },
301
+ combocheck: { in: "包含任意一个" },
302
+ address: { in: "属于", nin: "不属于" },
303
+ location: { in: "包含", nin: "不包含" }
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;
309
+ }
310
+ const V = {
185
311
  // Text-like: equality, fuzzy, empty checks
186
312
  text: ["eq", "neq", "in", "nin", "contains", "not_contains", "empty", "not_empty"],
187
313
  password: ["eq", "neq", "contains", "not_contains", "empty", "not_empty"],
@@ -225,7 +351,7 @@ const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ")
225
351
  button: [],
226
352
  subform: [],
227
353
  unknown: []
228
- }, P = {
354
+ }, X = {
229
355
  text: "eq",
230
356
  password: "eq",
231
357
  radiogroup: "eq",
@@ -253,106 +379,106 @@ const Ce = (e) => x(e) ? e.join(", ") : q(e) ? e.map((r) => r.value).join(", ")
253
379
  dataload: "eq",
254
380
  formula: "eq"
255
381
  };
256
- function $e(e) {
382
+ function Je(e) {
257
383
  var t;
258
- return e ? (t = D[e]) != null ? t : [] : [];
384
+ return e ? (t = V[e]) != null ? t : [] : [];
259
385
  }
260
- function Te(e) {
386
+ function et(e) {
261
387
  var t;
262
- return e && (t = P[e]) != null ? t : "eq";
388
+ return e && (t = X[e]) != null ? t : "eq";
263
389
  }
264
- function f(e) {
390
+ function S(e) {
265
391
  return typeof e == "object" && e !== null && !Array.isArray(e);
266
392
  }
267
- function C(e) {
268
- return f(e) ? e : null;
393
+ function O(e) {
394
+ return S(e) ? e : null;
269
395
  }
270
- function h(e) {
396
+ function F(e) {
271
397
  return !!(e == null || e === "" || Array.isArray(e) && e.length === 0);
272
398
  }
273
- function S(e, t) {
399
+ function R(e, t) {
274
400
  if (Array.isArray(e) && Array.isArray(t)) {
275
401
  if (e.length !== t.length) return !1;
276
402
  const r = e.map(String).sort(), n = t.map(String).sort();
277
- return r.every((a, l) => a === n[l]);
403
+ return r.every((l, a) => l === n[a]);
278
404
  }
279
- if (f(e) && f(t)) {
405
+ if (S(e) && S(t)) {
280
406
  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]));
407
+ return r.length !== n.length ? !1 : r.every((l) => String(e[l]) === String(t[l]));
282
408
  }
283
409
  return String(e) === String(t);
284
410
  }
285
- function v(e, t) {
286
- if (f(t)) {
287
- const n = C(e);
411
+ function D(e, t) {
412
+ if (S(t)) {
413
+ const n = O(e);
288
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));
289
415
  }
290
416
  const r = Array.isArray(t) ? t.map(String) : [];
291
417
  return Array.isArray(e) ? e.some((n) => r.includes(String(n))) : r.includes(String(e));
292
418
  }
293
- function $(e, t) {
419
+ function Z(e, t) {
294
420
  const r = Array.isArray(t) ? t.map(String) : [];
295
421
  if (r.length === 0) return !1;
296
422
  const n = Array.isArray(e) ? e.map(String) : [];
297
- return r.every((a) => n.includes(a));
423
+ return r.every((l) => n.includes(l));
298
424
  }
299
- function T(e, t) {
300
- const r = C(t);
425
+ function J(e, t) {
426
+ const r = O(t);
301
427
  if (!r) return !1;
302
428
  const n = Number(e);
303
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));
304
430
  }
305
- function B(e, t) {
431
+ function ee(e, t) {
306
432
  var i;
307
433
  const r = (i = e.field.widget) == null ? void 0 : i.widgetName;
308
434
  if (!r) return !1;
309
- const n = t[r], { operator: a, value: l } = e;
310
- switch (a) {
435
+ const n = t[r], { operator: l, value: a } = e;
436
+ switch (l) {
311
437
  case "empty":
312
- return h(n);
438
+ return F(n);
313
439
  case "not_empty":
314
- return !h(n);
440
+ return !F(n);
315
441
  case "eq":
316
- return S(n, l);
442
+ return R(n, a);
317
443
  case "neq":
318
- return !S(n, l);
444
+ return !R(n, a);
319
445
  case "contains":
320
446
  case "like":
321
- return String(n).includes(String(l));
447
+ return String(n).includes(String(a));
322
448
  case "not_contains":
323
449
  case "unlike":
324
- return !String(n).includes(String(l));
450
+ return !String(n).includes(String(a));
325
451
  case "gt":
326
- return Number(n) > Number(l);
452
+ return Number(n) > Number(a);
327
453
  case "gte":
328
- return Number(n) >= Number(l);
454
+ return Number(n) >= Number(a);
329
455
  case "lt":
330
- return Number(n) < Number(l);
456
+ return Number(n) < Number(a);
331
457
  case "lte":
332
- return Number(n) <= Number(l);
458
+ return Number(n) <= Number(a);
333
459
  case "in":
334
- return v(n, l);
460
+ return D(n, a);
335
461
  case "nin":
336
- return !v(n, l);
462
+ return !D(n, a);
337
463
  case "all":
338
- return $(n, l);
464
+ return Z(n, a);
339
465
  case "range":
340
- return T(n, l);
466
+ return J(n, a);
341
467
  default:
342
468
  return !1;
343
469
  }
344
470
  }
345
- function Be(e, t) {
471
+ function tt(e, t) {
346
472
  if (!e.enabled)
347
473
  return !1;
348
474
  const r = e.triggerCondition;
349
475
  if (!r) return !0;
350
- const { items: n, quantifier: a } = r;
476
+ const { items: n, quantifier: l } = r;
351
477
  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);
478
+ const a = n.map((i) => ee(i, t));
479
+ return l === "any" ? a.some((i) => i) : a.every((i) => i);
354
480
  }
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 = {
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 = {
356
482
  eq: "eq",
357
483
  neq: "ne",
358
484
  gt: "gt",
@@ -369,7 +495,7 @@ const Oe = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
369
495
  empty: "empty",
370
496
  not_empty: "not_empty",
371
497
  range: "range"
372
- }, W = {
498
+ }, re = {
373
499
  eq: "eq",
374
500
  ne: "neq",
375
501
  gt: "gt",
@@ -387,32 +513,32 @@ const Oe = (e, t) => e === null || t === null ? !1 : e.formId ? t.type === "form
387
513
  not_empty: "not_empty",
388
514
  range: "range"
389
515
  };
390
- function We(e) {
516
+ function nt(e) {
391
517
  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
518
+ var i, o, s, p, d, u;
519
+ const l = (i = te[n.operator]) != null ? i : "eq";
520
+ 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 : "",
523
+ method: l,
524
+ value: a,
525
+ type: (u = (d = n.field) == null ? void 0 : d.widget) == null ? void 0 : u.type
400
526
  };
401
527
  });
402
528
  return JSON.stringify({ rel: t, cond: r });
403
529
  }
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}`,
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";
534
+ let o = l.value;
535
+ 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
+ id: `${l.field}_${a}`,
411
537
  field: {
412
- label: a.field,
538
+ label: l.field,
413
539
  widget: {
414
- widgetName: a.field,
415
- type: (c = a.type) != null ? c : "unknown",
540
+ widgetName: l.field,
541
+ type: (p = l.type) != null ? p : "unknown",
416
542
  value: void 0
417
543
  }
418
544
  },
@@ -422,23 +548,23 @@ function Le(e) {
422
548
  });
423
549
  return { targetName: "", quantifier: r, items: n };
424
550
  }
425
- function Ie(e) {
551
+ function lt(e) {
426
552
  const t = (r) => String(r).padStart(2, "0");
427
553
  return `${e.getFullYear()}-${t(e.getMonth() + 1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}:${t(e.getSeconds())}`;
428
554
  }
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;
555
+ function it(e, t, r = 1) {
556
+ const n = [], l = [];
557
+ 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;
434
560
  }
435
- function _(e) {
561
+ function P(e) {
436
562
  const t = [];
437
563
  for (const r of e)
438
- Array.isArray(r) ? t.push(..._(r)) : t.push(r);
564
+ Array.isArray(r) ? t.push(...P(r)) : t.push(r);
439
565
  return t;
440
566
  }
441
- const L = {
567
+ const ne = {
442
568
  projectdevelopment: "e914",
443
569
  resourcelibrary: "e915",
444
570
  Plugin2: "e90e",
@@ -845,11 +971,11 @@ const L = {
845
971
  Automation1: "ea95",
846
972
  Avatar: "ea96"
847
973
  };
848
- function Ge(e) {
849
- const t = L[e];
974
+ function ot(e) {
975
+ const t = ne[e];
850
976
  return t ? `&#x${t};` : void 0;
851
977
  }
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) => {
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) => {
853
979
  if (!r)
854
980
  return {
855
981
  translated: ""
@@ -859,22 +985,22 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
859
985
  if (i.widget.type === "subform" && i.widget.items) {
860
986
  for (const o of i.widget.items)
861
987
  if ("widget" in o && !("options" in o)) {
862
- const u = `${i.widget.widgetName}.${o.widget.widgetName}`;
863
- n.set(u, o.label);
988
+ const s = `${i.widget.widgetName}.${o.widget.widgetName}`;
989
+ n.set(s, o.label);
864
990
  }
865
991
  }
866
- const a = [], l = e.replace(
992
+ const l = [], a = e.replace(
867
993
  /\$\{(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;
994
+ (i, o, s) => {
995
+ const p = !!o, { translated: d, meta: u } = r(s, p);
996
+ return u && l.push(u), d;
871
997
  }
872
998
  );
873
999
  return {
874
- meta: a.length ? _(a) : null,
875
- translated: (l != null ? l : "").trim()
1000
+ meta: l.length ? P(l) : null,
1001
+ translated: (a != null ? a : "").trim()
876
1002
  };
877
- }, I = {
1003
+ }, ae = {
878
1004
  手机号码: "^((\\(\\d{2,3}\\))|(\\d{3}\\-))?1\\d{10}$",
879
1005
  电话号码: "^(0[0-9]{2,3}\\-)?([2-9][0-9]{6,7})+(\\-[0-9]{1,4})?$",
880
1006
  邮政编码: "^\\d{6}$",
@@ -886,8 +1012,8 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
886
1012
  二维码图片: "qrcode",
887
1013
  条形码图片: "barcode",
888
1014
  自定义: "custom"
889
- }, A = (e) => {
890
- const { widget: t, labelStyle: r, label: n, ...a } = e || {}, l = I[r] || "";
1015
+ }, T = (e) => {
1016
+ const { widget: t, labelStyle: r, label: n, ...l } = e || {}, a = ae[r] || "";
891
1017
  return {
892
1018
  widget: {
893
1019
  widgetName: `_widget_${Date.now()}`,
@@ -925,7 +1051,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
925
1051
  },
926
1052
  enterClearText: !0,
927
1053
  ...t,
928
- regex: l,
1054
+ regex: a,
929
1055
  type: "text",
930
1056
  labelStyle: n
931
1057
  },
@@ -933,20 +1059,20 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
933
1059
  label: n,
934
1060
  lineWidth: 6,
935
1061
  tab: null,
936
- ...a
1062
+ ...l
937
1063
  };
938
- }, s = (e = "_widget", t) => {
1064
+ }, m = (e = "_widget", t) => {
939
1065
  const r = `${e}_${Date.now()}`;
940
1066
  if (t === void 0)
941
1067
  return r;
942
1068
  const n = t.toString().length;
943
1069
  return `${r.slice(0, -n)}${t}`;
944
- }, j = (e) => {
1070
+ }, le = (e) => {
945
1071
  const { widget: t, label: r, ...n } = e || {};
946
1072
  return {
947
1073
  widget: {
948
1074
  type: "number",
949
- widgetName: s(),
1075
+ widgetName: m(),
950
1076
  widgetNameAlias: "",
951
1077
  triggerEvent: !1,
952
1078
  customCls: null,
@@ -1006,7 +1132,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1006
1132
  tab: null,
1007
1133
  ...n
1008
1134
  };
1009
- }, G = (e) => {
1135
+ }, ie = (e) => {
1010
1136
  const { widget: t, label: r, ...n } = e || {};
1011
1137
  return {
1012
1138
  widget: {
@@ -1043,7 +1169,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1043
1169
  tab: null,
1044
1170
  ...n
1045
1171
  };
1046
- }, k = (e) => {
1172
+ }, $ = (e) => {
1047
1173
  const { widget: t, label: r, ...n } = e || {};
1048
1174
  return {
1049
1175
  widget: {
@@ -1079,7 +1205,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1079
1205
  ...n,
1080
1206
  labelStyle: r
1081
1207
  };
1082
- }, U = (e) => {
1208
+ }, oe = (e) => {
1083
1209
  const { widget: t, label: r, ...n } = e || {};
1084
1210
  return {
1085
1211
  widget: {
@@ -1146,12 +1272,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1146
1272
  tab: null,
1147
1273
  ...n
1148
1274
  };
1149
- }, g = (e) => e, H = (e) => {
1275
+ }, w = (e) => e, se = (e) => {
1150
1276
  const { widget: t, label: r, ...n } = e || {};
1151
1277
  return {
1152
1278
  widget: {
1153
1279
  type: "deptgroup",
1154
- widgetName: s(),
1280
+ widgetName: m(),
1155
1281
  widgetNameAlias: "",
1156
1282
  customCls: null,
1157
1283
  height: "34",
@@ -1180,12 +1306,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1180
1306
  tab: null,
1181
1307
  ...n
1182
1308
  };
1183
- }, Q = (e) => {
1309
+ }, ue = (e) => {
1184
1310
  const { widget: t, label: r, ...n } = e || {};
1185
1311
  return {
1186
1312
  widget: {
1187
1313
  type: "sn",
1188
- widgetName: s(),
1314
+ widgetName: m(),
1189
1315
  widgetNameAlias: "",
1190
1316
  triggerEvent: 0,
1191
1317
  customCls: null,
@@ -1217,12 +1343,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1217
1343
  tab: null,
1218
1344
  ...n
1219
1345
  };
1220
- }, z = (e) => {
1346
+ }, de = (e) => {
1221
1347
  const { widget: t, label: r, ...n } = e || {};
1222
1348
  return {
1223
1349
  widget: {
1224
1350
  type: "dept",
1225
- widgetName: s(),
1351
+ widgetName: m(),
1226
1352
  widgetNameAlias: "",
1227
1353
  customCls: null,
1228
1354
  height: "34",
@@ -1251,12 +1377,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1251
1377
  tab: null,
1252
1378
  ...n
1253
1379
  };
1254
- }, Y = (e) => {
1380
+ }, ce = (e) => {
1255
1381
  const { widget: t, label: r, ...n } = e || {};
1256
1382
  return {
1257
1383
  widget: {
1258
1384
  type: "usergroup",
1259
- widgetName: s(),
1385
+ widgetName: m(),
1260
1386
  widgetNameAlias: "",
1261
1387
  customCls: null,
1262
1388
  height: "34",
@@ -1288,11 +1414,11 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1288
1414
  tab: null,
1289
1415
  ...n
1290
1416
  };
1291
- }, K = (e) => {
1417
+ }, me = (e) => {
1292
1418
  const { widget: t, label: r, ...n } = e || {};
1293
1419
  return {
1294
1420
  widget: {
1295
- widgetName: s(),
1421
+ widgetName: m(),
1296
1422
  widgetNameAlias: "",
1297
1423
  customCls: null,
1298
1424
  enable: !0,
@@ -1316,7 +1442,7 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1316
1442
  tab: null,
1317
1443
  ...n
1318
1444
  };
1319
- }, X = (e) => !e || !e.length ? e : e.map((t, r) => ({
1445
+ }, ge = (e) => !e || !e.length ? e : e.map((t, r) => ({
1320
1446
  id: r,
1321
1447
  // name: "_widget_1761976674767",
1322
1448
  // form: "a2f34ef882158a3e97da4ef7",
@@ -1328,16 +1454,16 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1328
1454
  isEditable: !0,
1329
1455
  group: "dimension,filter,select",
1330
1456
  formula: ""
1331
- })), Z = (e) => !e || !e.length ? e : e.map((t) => ({
1457
+ })), fe = (e) => !e || !e.length ? e : e.map((t) => ({
1332
1458
  mode: "depend",
1333
1459
  ...t
1334
- })), V = (e) => {
1335
- var a, l, i;
1460
+ })), pe = (e) => {
1461
+ var l, a, i;
1336
1462
  const { widget: t, label: r, ...n } = e || {};
1337
1463
  return {
1338
1464
  widget: {
1339
1465
  type: "dataload",
1340
- widgetName: s(),
1466
+ widgetName: m(),
1341
1467
  widgetNameAlias: "",
1342
1468
  customCls: null,
1343
1469
  width: 350,
@@ -1370,11 +1496,11 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1370
1496
  triggerWidget: null,
1371
1497
  triggerFieldMode: "none",
1372
1498
  triggerField: null,
1373
- forms: (a = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : a.forms,
1499
+ forms: (l = t == null ? void 0 : t.loaddataconfig) == null ? void 0 : l.forms,
1374
1500
  selectArg: [],
1375
1501
  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)
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)
1378
1504
  },
1379
1505
  labelStyle: r
1380
1506
  },
@@ -1383,12 +1509,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1383
1509
  tab: null,
1384
1510
  ...n
1385
1511
  };
1386
- }, J = (e) => {
1512
+ }, be = (e) => {
1387
1513
  const { widget: t, label: r, ...n } = e || {};
1388
1514
  return {
1389
1515
  widget: {
1390
1516
  type: "user",
1391
- widgetName: s(),
1517
+ widgetName: m(),
1392
1518
  widgetNameAlias: "",
1393
1519
  customCls: null,
1394
1520
  height: "34",
@@ -1420,12 +1546,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1420
1546
  tab: null,
1421
1547
  ...n
1422
1548
  };
1423
- }, ee = (e) => {
1549
+ }, ye = (e) => {
1424
1550
  const { widget: t, label: r, ...n } = e || {};
1425
1551
  return {
1426
1552
  widget: {
1427
1553
  type: "signature",
1428
- widgetName: s(),
1554
+ widgetName: m(),
1429
1555
  widgetNameAlias: "",
1430
1556
  customCls: null,
1431
1557
  height: 34,
@@ -1443,12 +1569,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1443
1569
  tab: null,
1444
1570
  ...n
1445
1571
  };
1446
- }, te = (e) => {
1572
+ }, he = (e) => {
1447
1573
  const { widget: t, label: r, ...n } = e || {};
1448
1574
  return {
1449
1575
  widget: {
1450
1576
  type: "image",
1451
- widgetName: s(),
1577
+ widgetName: m(),
1452
1578
  widgetNameAlias: "",
1453
1579
  customCls: null,
1454
1580
  height: 100,
@@ -1515,12 +1641,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1515
1641
  tab: null,
1516
1642
  ...n
1517
1643
  };
1518
- }, re = (e) => {
1644
+ }, we = (e) => {
1519
1645
  const { widget: t, label: r, ...n } = e || {};
1520
1646
  return {
1521
1647
  widget: {
1522
1648
  type: "upload",
1523
- widgetName: s(),
1649
+ widgetName: m(),
1524
1650
  widgetNameAlias: "",
1525
1651
  customCls: null,
1526
1652
  enable: !0,
@@ -1550,12 +1676,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1550
1676
  tab: null,
1551
1677
  ...n
1552
1678
  };
1553
- }, ne = (e) => {
1679
+ }, Se = (e) => {
1554
1680
  const { widget: t, label: r, ...n } = e || {};
1555
1681
  return {
1556
1682
  widget: {
1557
1683
  type: "checkboxgroup",
1558
- widgetName: s(),
1684
+ widgetName: m(),
1559
1685
  widgetNameAlias: "",
1560
1686
  customCls: null,
1561
1687
  enable: !0,
@@ -1584,12 +1710,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1584
1710
  tab: null,
1585
1711
  ...n
1586
1712
  };
1587
- }, ae = (e) => {
1713
+ }, ve = (e) => {
1588
1714
  const { widget: t, label: r, ...n } = e || {};
1589
1715
  return {
1590
1716
  widget: {
1591
1717
  type: "separator",
1592
- widgetName: s(),
1718
+ widgetName: m(),
1593
1719
  widgetNameAlias: "",
1594
1720
  customCls: null,
1595
1721
  enable: !0,
@@ -1603,12 +1729,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1603
1729
  tab: null,
1604
1730
  ...n
1605
1731
  };
1606
- }, le = (e) => {
1732
+ }, Ae = (e) => {
1607
1733
  const { widget: t, label: r, ...n } = e || {};
1608
1734
  return {
1609
1735
  widget: {
1610
1736
  type: "combocheck",
1611
- widgetName: s(),
1737
+ widgetName: m(),
1612
1738
  widgetNameAlias: "",
1613
1739
  customCls: null,
1614
1740
  height: 34,
@@ -1640,12 +1766,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1640
1766
  tab: null,
1641
1767
  ...n
1642
1768
  };
1643
- }, ie = (e) => {
1769
+ }, ke = (e) => {
1644
1770
  const { widget: t, label: r, ...n } = e || {};
1645
1771
  return {
1646
1772
  widget: {
1647
1773
  type: "location",
1648
- widgetName: s(),
1774
+ widgetName: m(),
1649
1775
  widgetNameAlias: "",
1650
1776
  customCls: null,
1651
1777
  enable: !0,
@@ -1677,12 +1803,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1677
1803
  tab: null,
1678
1804
  ...n
1679
1805
  };
1680
- }, oe = (e) => {
1806
+ }, Ne = (e) => {
1681
1807
  const { widget: t, label: r, ...n } = e || {};
1682
1808
  return {
1683
1809
  widget: {
1684
1810
  type: "textarea",
1685
- widgetName: s(),
1811
+ widgetName: m(),
1686
1812
  widgetNameAlias: "",
1687
1813
  triggerEvent: !1,
1688
1814
  customCls: null,
@@ -1720,12 +1846,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1720
1846
  tab: null,
1721
1847
  ...n
1722
1848
  };
1723
- }, se = (e = {}) => {
1849
+ }, Ce = (e = {}) => {
1724
1850
  const { widget: t, label: r, ...n } = e;
1725
1851
  return {
1726
1852
  widget: {
1727
1853
  type: "button",
1728
- widgetName: s(),
1854
+ widgetName: m(),
1729
1855
  widgetNameAlias: "",
1730
1856
  triggerEvent: 0,
1731
1857
  customCls: null,
@@ -1764,12 +1890,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1764
1890
  tab: null,
1765
1891
  ...n
1766
1892
  };
1767
- }, ue = (e = {}) => {
1893
+ }, _e = (e = {}) => {
1768
1894
  const { widget: t, label: r, ...n } = e;
1769
1895
  return {
1770
1896
  widget: {
1771
1897
  type: "address",
1772
- widgetName: s(),
1898
+ widgetName: m(),
1773
1899
  widgetNameAlias: "",
1774
1900
  customCls: null,
1775
1901
  width: 720,
@@ -1798,12 +1924,12 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1798
1924
  tab: null,
1799
1925
  ...n
1800
1926
  };
1801
- }, de = (e = {}) => {
1927
+ }, xe = (e = {}) => {
1802
1928
  const { widget: t, label: r, ...n } = e;
1803
1929
  return {
1804
1930
  widget: {
1805
1931
  type: "subform",
1806
- widgetName: s(),
1932
+ widgetName: m(),
1807
1933
  widgetNameAlias: "",
1808
1934
  customCls: null,
1809
1935
  enable: !0,
@@ -1817,9 +1943,9 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1817
1943
  triggerFieldMode: "none",
1818
1944
  version: 1
1819
1945
  },
1820
- items: (t.items || []).map((a, l) => {
1821
- const i = me(a, !0);
1822
- return i.widget.widgetName = s("_widget", l), i;
1946
+ items: (t.items || []).map((l, a) => {
1947
+ const i = qe(l, !0);
1948
+ return i.widget.widgetName = m("_widget", a), i;
1823
1949
  }),
1824
1950
  sortable: !0,
1825
1951
  //启用子表单数据排序
@@ -1881,11 +2007,11 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1881
2007
  lineWidth: 12,
1882
2008
  tab: null
1883
2009
  };
1884
- }, ce = (e) => {
2010
+ }, Ee = (e) => {
1885
2011
  const { widget: t, label: r, ...n } = e || {};
1886
2012
  return {
1887
2013
  widget: {
1888
- widgetName: s(),
2014
+ widgetName: m(),
1889
2015
  widgetNameAlias: "",
1890
2016
  customCls: null,
1891
2017
  enable: !0,
@@ -1915,99 +2041,110 @@ const Ue = { 0: "e7b5", 1: "e7c7", 2: "e7b3", 3: "e7c9", 4: "e7bc", 5: "e7be", 6
1915
2041
  tab: null,
1916
2042
  ...n
1917
2043
  };
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;
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,
2071
+ flowState: w,
2072
+ flowstate: w,
2073
+ formula: w,
2074
+ unknown: w
2075
+ }, qe = (e, t = !1) => {
2076
+ var a, i;
1951
2077
  if (!e || !e.widget || !e.widget.type)
1952
2078
  return e;
1953
2079
  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) => {
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;
1959
2086
  if (!e)
1960
2087
  return "";
2088
+ const t = {
2089
+ corpId: (r = e.corp) == null ? void 0 : r.id,
2090
+ userId: e.user._id,
2091
+ appName: e.appName,
2092
+ appId: e.appId,
2093
+ entryName: e.entryName,
2094
+ entryId: e.entryId,
2095
+ agentName: e.agentName
2096
+ };
1961
2097
  try {
1962
- return JSON.stringify({
1963
- ...e
1964
- });
1965
- } catch (t) {
1966
- return console.warn("getChatCtxForMcp error", t), "";
2098
+ return JSON.stringify(t);
2099
+ } catch (n) {
2100
+ return console.warn("getChatCtxForMcp error", n), "";
1967
2101
  }
1968
2102
  };
1969
2103
  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
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,
2127
+ 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
2012
2149
  };
2013
2150
  //# sourceMappingURL=ai-feat-utils.js.map