bi-components-library 1.0.75 → 1.0.76

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as M, jsxs as ue, Fragment as Sn } from "react/jsx-runtime";
2
- import Tn, { useState as oe, useRef as te, useMemo as qt, useCallback as ce, useEffect as fe, useLayoutEffect as Je } from "react";
2
+ import Tn, { useState as se, useRef as ne, useMemo as qt, useCallback as ce, useEffect as fe, useLayoutEffect as Je } from "react";
3
3
  import { Button as Pe, Card as At, Modal as Nn, Table as _t, Flex as Kt, Spin as qn, Empty as An, Select as gt, Form as pt, Input as tn, Space as _n, DatePicker as Ln, message as Mn, Dropdown as In, Tooltip as Dn, Progress as Bn, Pagination as Hn, theme as Pn } from "antd";
4
4
  import { createFromIconfontCN as Vn, LeftOutlined as Rn, SearchOutlined as On, ReloadOutlined as Gn, InfoCircleOutlined as Fn, SendOutlined as zn, PauseCircleOutlined as Yn, PlayCircleOutlined as jn } from "@ant-design/icons";
5
5
  import { createPortal as Lt } from "react-dom";
@@ -554,22 +554,22 @@ const { Option: nr } = gt, rr = ({
554
554
  externalParams: $ = {},
555
555
  ...E
556
556
  }) => {
557
- const [T, w] = oe([]), [V, k] = oe(!1), [e, n] = oe({
557
+ const [T, w] = se([]), [V, k] = se(!1), [e, n] = se({
558
558
  current: 1,
559
559
  pageSize: S,
560
560
  total: 0
561
- }), [r, u] = oe({}), [d, B] = oe({}), [C] = pt.useForm(), F = te(e);
561
+ }), [r, u] = se({}), [d, B] = se({}), [C] = pt.useForm(), F = ne(e);
562
562
  F.current = e;
563
- const Y = te($);
563
+ const Y = ne($);
564
564
  Y.current = $;
565
- const z = te(!1), O = qt(() => t.map((p) => {
566
- const { sortable: c, render: b, ...P } = p;
565
+ const z = ne(!1), O = qt(() => t.map((f) => {
566
+ const { sortable: c, render: b, ...P } = f;
567
567
  return {
568
568
  ...P,
569
569
  sorter: c ? !0 : void 0,
570
570
  render: b || ((H) => H)
571
571
  };
572
- }), [t]), L = ce(async (p = {}) => {
572
+ }), [t]), L = ce(async (f = {}) => {
573
573
  if (m) {
574
574
  k(!0);
575
575
  try {
@@ -579,7 +579,7 @@ const { Option: nr } = gt, rr = ({
579
579
  sortField: d.field,
580
580
  sortOrder: d.order,
581
581
  searchParams: { ...r, ...Y.current },
582
- ...p
582
+ ...f
583
583
  }, b = await m(c);
584
584
  b.success && (w(b.data), n((P) => ({
585
585
  ...P,
@@ -592,17 +592,17 @@ const { Option: nr } = gt, rr = ({
592
592
  k(!1);
593
593
  }
594
594
  }
595
- }, [m, d, r]), G = ce((p) => {
596
- u(p), n((c) => ({ ...c, current: 1 }));
595
+ }, [m, d, r]), G = ce((f) => {
596
+ u(f), n((c) => ({ ...c, current: 1 }));
597
597
  }, []), I = ce(() => {
598
- C.resetFields(), u({}), n((p) => ({ ...p, current: 1 }));
598
+ C.resetFields(), u({}), n((f) => ({ ...f, current: 1 }));
599
599
  }, [C]), R = ce(() => {
600
600
  L();
601
- }, [L]), X = ce((p, c, b) => {
601
+ }, [L]), X = ce((f, c, b) => {
602
602
  const P = {
603
- current: p.current || 1,
604
- pageSize: p.pageSize || S,
605
- total: p.total || 0
603
+ current: f.current || 1,
604
+ pageSize: f.pageSize || S,
605
+ total: f.total || 0
606
606
  }, H = {
607
607
  field: b?.field,
608
608
  order: b?.order
@@ -610,8 +610,8 @@ const { Option: nr } = gt, rr = ({
610
610
  n(P), B(H);
611
611
  }, [S]);
612
612
  return fe(() => {
613
- const p = Object.keys($).length > 0;
614
- (A && !z.current || p) && (L(), z.current = !0);
613
+ const f = Object.keys($).length > 0;
614
+ (A && !z.current || f) && (L(), z.current = !0);
615
615
  }, [A, $, L]), /* @__PURE__ */ ue("div", { children: [
616
616
  o && s.length > 0 && /* @__PURE__ */ M(At, { size: "small", style: { marginBottom: 16 }, children: /* @__PURE__ */ ue(
617
617
  pt,
@@ -619,23 +619,23 @@ const { Option: nr } = gt, rr = ({
619
619
  form: C,
620
620
  layout: "inline",
621
621
  onFinish: G,
622
- initialValues: s.reduce((p, c) => (c.defaultValue !== void 0 && (p[c.key] = c.defaultValue), p), {}),
622
+ initialValues: s.reduce((f, c) => (c.defaultValue !== void 0 && (f[c.key] = c.defaultValue), f), {}),
623
623
  children: [
624
- s.map((p) => /* @__PURE__ */ M(pt.Item, { name: p.key, label: p.label, children: p.type === "input" ? /* @__PURE__ */ M(
624
+ s.map((f) => /* @__PURE__ */ M(pt.Item, { name: f.key, label: f.label, children: f.type === "input" ? /* @__PURE__ */ M(
625
625
  tn,
626
626
  {
627
- placeholder: p.placeholder || `请输入${p.label}`,
627
+ placeholder: f.placeholder || `请输入${f.label}`,
628
628
  style: { width: 200 }
629
629
  }
630
630
  ) : /* @__PURE__ */ M(
631
631
  gt,
632
632
  {
633
- placeholder: p.placeholder || `请选择${p.label}`,
633
+ placeholder: f.placeholder || `请选择${f.label}`,
634
634
  style: { width: 200 },
635
635
  allowClear: !0,
636
- children: p.options?.map((c) => /* @__PURE__ */ M(nr, { value: c.value, children: c.label }, c.value))
636
+ children: f.options?.map((c) => /* @__PURE__ */ M(nr, { value: c.value, children: c.label }, c.value))
637
637
  }
638
- ) }, p.key)),
638
+ ) }, f.key)),
639
639
  /* @__PURE__ */ M(pt.Item, { children: /* @__PURE__ */ ue(_n, { children: [
640
640
  /* @__PURE__ */ M(Pe, { type: "primary", htmlType: "submit", icon: /* @__PURE__ */ M(On, {}), children: "查询" }),
641
641
  /* @__PURE__ */ M(Pe, { onClick: I, children: "重置" }),
@@ -655,7 +655,7 @@ const { Option: nr } = gt, rr = ({
655
655
  ...e,
656
656
  showSizeChanger: !0,
657
657
  showQuickJumper: !0,
658
- showTotal: (p, c) => `第 ${c[0]}-${c[1]} 条/共 ${p} 条`,
658
+ showTotal: (f, c) => `第 ${c[0]}-${c[1]} 条/共 ${f} 条`,
659
659
  pageSizeOptions: D
660
660
  },
661
661
  onChange: X,
@@ -1173,7 +1173,7 @@ const ar = ({ host: t, onChange: m }) => {
1173
1173
  } catch {
1174
1174
  return [];
1175
1175
  }
1176
- }, [g]), [$, E] = oe(D || void 0), [T, w] = oe(80), V = (e) => {
1176
+ }, [g]), [$, E] = se(D || void 0), [T, w] = se(80), V = (e) => {
1177
1177
  const r = document.createElement("canvas").getContext("2d");
1178
1178
  return r ? (r.font = '14px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif', r.measureText(e).width) : e.length * 14;
1179
1179
  };
@@ -1214,7 +1214,7 @@ const ar = ({ host: t, onChange: m }) => {
1214
1214
  t
1215
1215
  );
1216
1216
  }, or = (t) => {
1217
- const [m, s] = oe([]);
1217
+ const [m, s] = se([]);
1218
1218
  return fe(() => {
1219
1219
  const o = t.current;
1220
1220
  if (!o) return;
@@ -1265,7 +1265,7 @@ const ar = ({ host: t, onChange: m }) => {
1265
1265
  return S.observe(o, { childList: !0, subtree: !0 }), () => S.disconnect();
1266
1266
  }, [t]), m;
1267
1267
  }, ft = (t) => t.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
1268
- function sr(t, m, s, o, g, S = {}, D, A) {
1268
+ function lr(t, m, s, o, g, S = {}, D, A) {
1269
1269
  if (!t.current) return;
1270
1270
  const $ = /[;;,,。.!!??::、]/, E = (e) => {
1271
1271
  const n = (e ?? "").trim();
@@ -1285,10 +1285,10 @@ function sr(t, m, s, o, g, S = {}, D, A) {
1285
1285
  const O = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "", L = `<span ${O} class="exclusion-wrapper required-upload-group">`, G = "</span>";
1286
1286
  let I = "";
1287
1287
  e.className ? I = `<span class="${e.className}">${e.text ?? ""}</span>` : I = e.text ?? "";
1288
- const R = n, X = s[R.key] !== null && s[R.key] !== void 0, p = X ? s[R.key] : null, c = X ? s[R.key]?.name : R.text, b = X ? "" : "hidden", P = R.tooltip && !X ? "" : "hidden", H = X ? "has-file" : "", j = X && c ? ` data-file-name="${c.replace(/"/g, "&quot;")}"` : "";
1288
+ const R = n, X = s[R.key] !== null && s[R.key] !== void 0, f = X ? s[R.key] : null, c = X ? s[R.key]?.name : R.text, b = X ? "" : "hidden", P = R.tooltip && !X ? "" : "hidden", H = X ? "has-file" : "", j = X && c ? ` data-file-name="${c.replace(/"/g, "&quot;")}"` : "";
1289
1289
  let J = "";
1290
- X && p ? p.type?.startsWith("image/") ? J = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(p)}" alt="preview" />` : J = "<i class='iconfont icon-exlwenjian'></i>" : J = "<i class='iconfont icon-shangchuan1'></i>";
1291
- const re = (R.text || "").trim(), de = X && re.length >= 12 ? `<span ${O} contenteditable="false" class="exclusion-wrapper upload-hint">${re}</span>` : "", ye = `<span contenteditable="false" data-type="upload" data-key="${R.key}" class="upload-chip"><span class="upload-inner-wrapper ${H}"><span class="upload-icon">${J}</span><span class="upload-label"${j}>${c || R.text}</span>${R.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${P}" data-upload-key="${R.key}" data-tooltip="${R.tooltip}"></i>` : ""}<span class="file-remove-btn ${b}" title="移除文件">×</span></span></span>`;
1290
+ X && f ? f.type?.startsWith("image/") ? J = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(f)}" alt="preview" />` : J = "<i class='iconfont icon-exlwenjian'></i>" : J = "<i class='iconfont icon-shangchuan1'></i>";
1291
+ const ae = (R.text || "").trim(), de = X && ae.length >= 12 ? `<span ${O} contenteditable="false" class="exclusion-wrapper upload-hint">${ae}</span>` : "", ye = `<span contenteditable="false" data-type="upload" data-key="${R.key}" class="upload-chip"><span class="upload-inner-wrapper ${H}"><span class="upload-icon">${J}</span><span class="upload-label"${j}>${c || R.text}</span>${R.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${P}" data-upload-key="${R.key}" data-tooltip="${R.tooltip}"></i>` : ""}<span class="file-remove-btn ${b}" title="移除文件">×</span></span></span>`;
1292
1292
  V.push(L + I + ye + G + de), k += 2;
1293
1293
  continue;
1294
1294
  }
@@ -1296,8 +1296,8 @@ function sr(t, m, s, o, g, S = {}, D, A) {
1296
1296
  const L = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group">`, G = "</span>";
1297
1297
  let I = "";
1298
1298
  e.className ? I = `<span class="${e.className}">${e.text ?? ""}</span>` : I = e.text ?? "";
1299
- const R = n, p = (R.key ? g[R.key] : void 0) || R.text || "", c = !p, b = c ? "​" : p, P = c ? "show-placeholder" : "", H = R.exclusionGroup ? ` data-group="${R.exclusionGroup}"` : "", j = R.tooltip ? ` data-tooltip="${R.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${R.key || ""}"` : "", J = R.tooltip && c ? "" : "hidden", re = `<span contenteditable="true" data-type="variable" data-key="${R.key}" data-placeholder="${R.placeholder || ""}"${H}${j} class="variable-chip ${P}">${b}${R.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${J}" data-variable-key="${R.key}" data-tooltip="${R.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1300
- V.push(L + I + re + G), k += 2;
1299
+ const R = n, f = (R.key ? g[R.key] : void 0) || R.text || "", c = !f, b = c ? "​" : f, P = c ? "show-placeholder" : "", H = R.exclusionGroup ? ` data-group="${R.exclusionGroup}"` : "", j = R.tooltip ? ` data-tooltip="${R.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${R.key || ""}"` : "", J = R.tooltip && c ? "" : "hidden", ae = `<span contenteditable="true" data-type="variable" data-key="${R.key}" data-placeholder="${R.placeholder || ""}"${H}${j} class="variable-chip ${P}">${b}${R.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${J}" data-variable-key="${R.key}" data-tooltip="${R.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1300
+ V.push(L + I + ae + G), k += 2;
1301
1301
  continue;
1302
1302
  }
1303
1303
  }
@@ -1310,11 +1310,11 @@ function sr(t, m, s, o, g, S = {}, D, A) {
1310
1310
  const Y = o ? ' data-locked="true" contenteditable="false"' : ' contenteditable="false"', O = (e.text ?? "").replace(/\n/g, "<br/>");
1311
1311
  e.className ? C = `<span data-type="text" class="${e.className}"${Y}>${O}</span>` : C = o ? `<span data-type="text"${Y}>${O}</span>` : `<span data-type="text" contenteditable="false">${O}</span>`;
1312
1312
  } else if (e.type === "variable" && e.key) {
1313
- const z = g[e.key] || e.text || "", O = !z, L = O ? "​" : z, G = O ? "show-placeholder" : "", I = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", R = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && O ? "" : "hidden", p = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${I}${R} class="variable-chip ${G}">${L}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1314
- e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${p}</span>` : C = p;
1313
+ const z = g[e.key] || e.text || "", O = !z, L = O ? "​" : z, G = O ? "show-placeholder" : "", I = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", R = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && O ? "" : "hidden", f = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-placeholder="${e.placeholder || ""}"${I}${R} class="variable-chip ${G}">${L}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1314
+ e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${f}</span>` : C = f;
1315
1315
  } else if (e.type === "report-url" && e.key) {
1316
- const z = g[e.key] || e.text || "", O = !z, L = O ? "​" : z, G = O ? "show-placeholder" : "", I = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", R = e.tooltip ? ` data-tooltip="${ft(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && O ? "" : "hidden", p = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${ft(e.placeholder || "")}"${I}${R} class="variable-chip rte-report-url ${G}">${L}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${ft(e.tooltip)}" ></i>` : ""}</span>`;
1317
- e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${p}</span>` : C = p;
1316
+ const z = g[e.key] || e.text || "", O = !z, L = O ? "​" : z, G = O ? "show-placeholder" : "", I = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", R = e.tooltip ? ` data-tooltip="${ft(e.tooltip)}" data-variable-key="${e.key || ""}"` : "", X = e.tooltip && O ? "" : "hidden", f = `<span contenteditable="true" data-type="variable" data-key="${e.key}" data-node-type="report-url" data-placeholder="${ft(e.placeholder || "")}"${I}${R} class="variable-chip rte-report-url ${G}">${L}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${X}" data-variable-key="${e.key}" data-tooltip="${ft(e.tooltip)}" ></i>` : ""}</span>`;
1317
+ e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${f}</span>` : C = f;
1318
1318
  } else if (e.type === "upload" && e.key)
1319
1319
  if (typeof e.maxCount == "number" && typeof e.minCount == "number" && e.maxCount > 1) {
1320
1320
  const z = e.minCount || 1, O = e.maxCount || 3;
@@ -1329,18 +1329,18 @@ function sr(t, m, s, o, g, S = {}, D, A) {
1329
1329
  );
1330
1330
  let I = "";
1331
1331
  for (let R = 0; R < G; R++) {
1332
- const X = `${e.key}-${R}`, p = s[X] !== null && s[X] !== void 0, c = p ? s[X] : null, b = p ? s[X]?.name : e.text, P = p ? "" : "hidden", H = e.tooltip && !p ? "" : "hidden", j = p ? "has-file" : "", J = p && b ? ` data-file-name="${b.replace(/"/g, "&quot;")}"` : "";
1333
- let re = "";
1334
- p && c ? c.type?.startsWith("image/") ? re = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(c)}" alt="preview" />` : re = "<i class='iconfont icon-exlwenjian'></i>" : re = "<i class='iconfont icon-shangchuan1'></i>";
1335
- const me = ` data-batch-key="${e.key}"`, de = ` data-batch-index="${R}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${X}"${me}${de} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${j}"><span class="upload-icon">${re}</span><span class="upload-label"${J}>${b || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${H}" data-upload-key="${X}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;
1332
+ const X = `${e.key}-${R}`, f = s[X] !== null && s[X] !== void 0, c = f ? s[X] : null, b = f ? s[X]?.name : e.text, P = f ? "" : "hidden", H = e.tooltip && !f ? "" : "hidden", j = f ? "has-file" : "", J = f && b ? ` data-file-name="${b.replace(/"/g, "&quot;")}"` : "";
1333
+ let ae = "";
1334
+ f && c ? c.type?.startsWith("image/") ? ae = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(c)}" alt="preview" />` : ae = "<i class='iconfont icon-exlwenjian'></i>" : ae = "<i class='iconfont icon-shangchuan1'></i>";
1335
+ const me = ` data-batch-key="${e.key}"`, de = ` data-batch-index="${R}"`, ye = `<span contenteditable="false" data-type="upload" data-key="${X}"${me}${de} class="upload-chip upload-chip-batch"><span class="upload-inner-wrapper ${j}"><span class="upload-icon">${ae}</span><span class="upload-label"${J}>${b || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${H}" data-upload-key="${X}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${P}" title="移除文件">×</span></span></span>`;
1336
1336
  I += ye;
1337
1337
  }
1338
1338
  e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group rte-required-upload-batch"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span><span class="rte-upload-batch-chips">${I}</span></span>` : C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-upload-batch-chips">${I}</span>`;
1339
1339
  } else {
1340
1340
  const z = s[e.key] !== null && s[e.key] !== void 0, O = z ? s[e.key] : null, L = z ? s[e.key]?.name : e.text, G = z ? "" : "hidden", I = e.tooltip && !z ? "" : "hidden", R = z ? "has-file" : "", X = z && L ? ` data-file-name="${L.replace(/"/g, "&quot;")}"` : "";
1341
- let p = "";
1342
- z && O ? O.type?.startsWith("image/") ? p = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(O)}" alt="preview" />` : p = "<i class='iconfont icon-exlwenjian'></i>" : p = "<i class='iconfont icon-shangchuan1'></i>";
1343
- const c = (e.text || "").trim(), P = z && e.showHint === !0 && c.length >= 12 ? `<span ${u} contenteditable="false" class="exclusion-wrapper upload-hint">${c}</span>` : "", H = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${R}"><span class="upload-icon">${p}</span><span class="upload-label"${X}>${L || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${I}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${G}" title="移除文件">×</span></span></span>`;
1341
+ let f = "";
1342
+ z && O ? O.type?.startsWith("image/") ? f = `<img class="upload-icon-img upload-icon-preview" src="${URL.createObjectURL(O)}" alt="preview" />` : f = "<i class='iconfont icon-exlwenjian'></i>" : f = "<i class='iconfont icon-shangchuan1'></i>";
1343
+ const c = (e.text || "").trim(), P = z && e.showHint === !0 && c.length >= 12 ? `<span ${u} contenteditable="false" class="exclusion-wrapper upload-hint">${c}</span>` : "", H = `<span contenteditable="false" data-type="upload" data-key="${e.key}" class="upload-chip"><span class="upload-inner-wrapper ${R}"><span class="upload-icon">${f}</span><span class="upload-label"${X}>${L || e.text}</span>${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi upload-info-icon ${I}" data-upload-key="${e.key}" data-tooltip="${e.tooltip}" ></i>` : ""}<span class="file-remove-btn ${G}" title="移除文件">×</span></span></span>`;
1344
1344
  e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${H}</span>${P}` : C = H + P;
1345
1345
  }
1346
1346
  else if (e.type === "select" && e.key) {
@@ -1350,10 +1350,10 @@ function sr(t, m, s, o, g, S = {}, D, A) {
1350
1350
  const Y = g[e.key] || "", z = typeof e.maxHeight == "number" ? e.maxHeight : A?.textarea?.maxHeight ?? 252, O = typeof e.expandable == "boolean" ? e.expandable : A?.textarea?.expandable ?? !0, L = e.placeholder ? ` placeholder="${e.placeholder}"` : "", G = `<textarea data-type="textarea" data-key="${e.key}" class="rte-textarea" data-max-height="${z}" style="max-height:${z}px;"${L}>${Y}</textarea>`, I = O ? `<button type="button" class="rte-textarea-toggle" data-key="${e.key}" data-expanded="false">展开</button>` : "", R = `<div class="rte-textarea-wrapper" data-key="${e.key}">${G}${I}</div>`;
1351
1351
  e.required ? C = `<span ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper required-upload-group"><span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>${R}</span>` : C = R;
1352
1352
  } else if (e.type === "richtext" && e.key) {
1353
- const Y = g[e.key] || e.text || "", z = typeof e.minHeight == "number" ? e.minHeight : A?.richtext?.minHeight ?? 40, O = typeof e.maxHeight == "number" ? e.maxHeight : A?.richtext?.maxHeight ?? 160, L = Math.max(O, z), G = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", I = typeof e.expandable == "boolean" ? e.expandable : A?.richtext?.expandable ?? !0, R = Y, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${G} style="min-height:${z}px;max-height:${L}px;overflow:auto;">${R}</div>`, p = I ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>` : "", c = `<div class="rte-richtext-wrapper" data-key="${e.key}">${X}${p}</div>`, b = `<div class="rte-richtext-container" data-key="${e.key}">${c}</div>`;
1353
+ const Y = g[e.key] || e.text || "", z = typeof e.minHeight == "number" ? e.minHeight : A?.richtext?.minHeight ?? 40, O = typeof e.maxHeight == "number" ? e.maxHeight : A?.richtext?.maxHeight ?? 160, L = Math.max(O, z), G = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", I = typeof e.expandable == "boolean" ? e.expandable : A?.richtext?.expandable ?? !0, R = Y, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" class="rte-richtext"${G} style="min-height:${z}px;max-height:${L}px;overflow:auto;">${R}</div>`, f = I ? `<button type="button" class="rte-richtext-toggle" data-key="${e.key}" data-expanded="false"><i class="iconfont icon-zhankai2"></i><span class="rte-richtext-toggle-label">展开</span></button>` : "", c = `<div class="rte-richtext-wrapper" data-key="${e.key}">${X}${f}</div>`, b = `<div class="rte-richtext-container" data-key="${e.key}">${c}</div>`;
1354
1354
  e.required ? C = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${b}</div>` : C = b;
1355
1355
  } else if (e.type === "report-module" && e.key) {
1356
- const z = Object.prototype.hasOwnProperty.call(g, e.key) ? g[e.key] : e.text || "", O = typeof e.minHeight == "number" ? e.minHeight : 80, L = typeof e.maxHeight == "number" ? e.maxHeight : 240, G = Math.max(L, O), I = e.placeholder ? ` data-placeholder="${ft(e.placeholder)}"` : "", R = z, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" class="rte-richtext rte-report-module"${I} style="min-height:${O}px;max-height:${G}px;overflow:auto;">${R}</div>`, p = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${X}</div>`, c = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${p}</div>`;
1356
+ const z = Object.prototype.hasOwnProperty.call(g, e.key) ? g[e.key] : e.text || "", O = typeof e.minHeight == "number" ? e.minHeight : 80, L = typeof e.maxHeight == "number" ? e.maxHeight : 240, G = Math.max(L, O), I = e.placeholder ? ` data-placeholder="${ft(e.placeholder)}"` : "", R = z, X = `<div contenteditable="true" data-type="richtext" data-key="${e.key}" data-node-type="report-module" class="rte-richtext rte-report-module"${I} style="min-height:${O}px;max-height:${G}px;overflow:auto;">${R}</div>`, f = `<div class="rte-richtext-wrapper rte-report-module-wrapper" data-key="${e.key}">${X}</div>`, c = `<div class="rte-richtext-container rte-report-module-container" data-key="${e.key}">${f}</div>`;
1357
1357
  e.required ? C = `<div ${e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : ""} class="exclusion-wrapper rte-richtext-required">${c}</div>` : C = c;
1358
1358
  } else if (e.type === "datepicker" && e.key) {
1359
1359
  const Y = g[e.key] || "", z = e.placeholder ? ` data-placeholder="${e.placeholder}"` : "", O = e.limitRange ? ` data-limit-range="${e.limitRange}"` : "", L = e.disableFuture ? ' data-disable-future="true"' : "", G = `<div data-type="datepicker" data-key="${e.key}" data-value="${Y}" class="rte-datepicker-host"${z}${O}${L}></div>`;
@@ -1364,14 +1364,14 @@ function sr(t, m, s, o, g, S = {}, D, A) {
1364
1364
  const L = `<span class="rte-text-required"><i class='iconfont icon-bitian' style='font-size: 10px;'></i></span>`, G = e.exclusionGroup ? `data-group="${e.exclusionGroup}"` : "";
1365
1365
  let I = "";
1366
1366
  for (let R = 0; R < O; R++) {
1367
- const X = `${e.key}_${R}`, p = g[X] || "", c = !p, b = c ? "​" : p, P = c ? "show-placeholder" : "", H = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", j = e.tooltip && c ? "" : "hidden", J = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", re = `<span contenteditable="true" data-type="variable" data-key="${X}" data-multi-key="${e.key}" data-index="${R}" data-placeholder="${e.placeholder || ""}"${J}${H} class="variable-chip ${P}">${b}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${j}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1368
- R === 0 ? I += `<span ${G} class="exclusion-wrapper required-upload-group required-multi-first">${L}${re}</span>` : I += re;
1367
+ const X = `${e.key}_${R}`, f = g[X] || "", c = !f, b = c ? "​" : f, P = c ? "show-placeholder" : "", H = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", j = e.tooltip && c ? "" : "hidden", J = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", ae = `<span contenteditable="true" data-type="variable" data-key="${X}" data-multi-key="${e.key}" data-index="${R}" data-placeholder="${e.placeholder || ""}"${J}${H} class="variable-chip ${P}">${b}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${j}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1368
+ R === 0 ? I += `<span ${G} class="exclusion-wrapper required-upload-group required-multi-first">${L}${ae}</span>` : I += ae;
1369
1369
  }
1370
1370
  C = I;
1371
1371
  } else {
1372
1372
  let L = "";
1373
1373
  for (let G = 0; G < O; G++) {
1374
- const I = `${e.key}_${G}`, R = g[I] || "", X = !R, p = X ? "​" : R, c = X ? "show-placeholder" : "", b = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && X ? "" : "hidden", H = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", j = `<span contenteditable="true" data-type="variable" data-key="${I}" data-multi-key="${e.key}" data-index="${G}" data-placeholder="${e.placeholder || ""}"${H}${b} class="variable-chip ${c}">${p}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1374
+ const I = `${e.key}_${G}`, R = g[I] || "", X = !R, f = X ? "​" : R, c = X ? "show-placeholder" : "", b = e.tooltip ? ` data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" data-variable-key="${e.key || ""}"` : "", P = e.tooltip && X ? "" : "hidden", H = e.exclusionGroup ? ` data-group="${e.exclusionGroup}"` : "", j = `<span contenteditable="true" data-type="variable" data-key="${I}" data-multi-key="${e.key}" data-index="${G}" data-placeholder="${e.placeholder || ""}"${H}${b} class="variable-chip ${c}">${f}${e.tooltip ? `<i contenteditable="false" style="font-weight: 100;" class="iconfont icon-tishi variable-info-icon ${P}" data-variable-key="${e.key}" data-tooltip="${e.tooltip.replace(/"/g, "&quot;")}" ></i>` : ""}</span>`;
1375
1375
  L += j;
1376
1376
  }
1377
1377
  C = L;
@@ -1407,7 +1407,7 @@ function sr(t, m, s, o, g, S = {}, D, A) {
1407
1407
  });
1408
1408
  }, 0));
1409
1409
  }
1410
- function lr(t, m, s, o, g = {}, S, D, A, $) {
1410
+ function sr(t, m, s, o, g = {}, S, D, A, $) {
1411
1411
  const E = ce(() => {
1412
1412
  if (!t.current) return;
1413
1413
  if (m.length === 0) {
@@ -1451,7 +1451,7 @@ function lr(t, m, s, o, g = {}, S, D, A, $) {
1451
1451
  const C = (d.getAttribute("data-value") || "").trim();
1452
1452
  C && (T[B] = C);
1453
1453
  }
1454
- })), sr(
1454
+ })), lr(
1455
1455
  t,
1456
1456
  m,
1457
1457
  s,
@@ -1648,7 +1648,7 @@ function pr(t, m, s, o) {
1648
1648
  }, [s, m, t, o]);
1649
1649
  }
1650
1650
  function fr(t, m) {
1651
- const s = te(0), o = te(0);
1651
+ const s = ne(0), o = ne(0);
1652
1652
  fe(() => {
1653
1653
  if (!t.current) return;
1654
1654
  let g = !1, S = 0;
@@ -1733,55 +1733,55 @@ function nn() {
1733
1733
  (function(s, o) {
1734
1734
  t.exports = o();
1735
1735
  })(yr, function() {
1736
- var s = 1e3, o = 6e4, g = 36e5, S = "millisecond", D = "second", A = "minute", $ = "hour", E = "day", T = "week", w = "month", V = "quarter", k = "year", e = "date", n = "Invalid Date", r = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, u = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, d = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(p) {
1737
- var c = ["th", "st", "nd", "rd"], b = p % 100;
1738
- return "[" + p + (c[(b - 20) % 10] || c[b] || c[0]) + "]";
1739
- } }, B = function(p, c, b) {
1740
- var P = String(p);
1741
- return !P || P.length >= c ? p : "" + Array(c + 1 - P.length).join(b) + p;
1742
- }, C = { s: B, z: function(p) {
1743
- var c = -p.utcOffset(), b = Math.abs(c), P = Math.floor(b / 60), H = b % 60;
1736
+ var s = 1e3, o = 6e4, g = 36e5, S = "millisecond", D = "second", A = "minute", $ = "hour", E = "day", T = "week", w = "month", V = "quarter", k = "year", e = "date", n = "Invalid Date", r = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, u = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, d = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(f) {
1737
+ var c = ["th", "st", "nd", "rd"], b = f % 100;
1738
+ return "[" + f + (c[(b - 20) % 10] || c[b] || c[0]) + "]";
1739
+ } }, B = function(f, c, b) {
1740
+ var P = String(f);
1741
+ return !P || P.length >= c ? f : "" + Array(c + 1 - P.length).join(b) + f;
1742
+ }, C = { s: B, z: function(f) {
1743
+ var c = -f.utcOffset(), b = Math.abs(c), P = Math.floor(b / 60), H = b % 60;
1744
1744
  return (c <= 0 ? "+" : "-") + B(P, 2, "0") + ":" + B(H, 2, "0");
1745
- }, m: function p(c, b) {
1746
- if (c.date() < b.date()) return -p(b, c);
1745
+ }, m: function f(c, b) {
1746
+ if (c.date() < b.date()) return -f(b, c);
1747
1747
  var P = 12 * (b.year() - c.year()) + (b.month() - c.month()), H = c.clone().add(P, w), j = b - H < 0, J = c.clone().add(P + (j ? -1 : 1), w);
1748
1748
  return +(-(P + (b - H) / (j ? H - J : J - H)) || 0);
1749
- }, a: function(p) {
1750
- return p < 0 ? Math.ceil(p) || 0 : Math.floor(p);
1751
- }, p: function(p) {
1752
- return { M: w, y: k, w: T, d: E, D: e, h: $, m: A, s: D, ms: S, Q: V }[p] || String(p || "").toLowerCase().replace(/s$/, "");
1753
- }, u: function(p) {
1754
- return p === void 0;
1749
+ }, a: function(f) {
1750
+ return f < 0 ? Math.ceil(f) || 0 : Math.floor(f);
1751
+ }, p: function(f) {
1752
+ return { M: w, y: k, w: T, d: E, D: e, h: $, m: A, s: D, ms: S, Q: V }[f] || String(f || "").toLowerCase().replace(/s$/, "");
1753
+ }, u: function(f) {
1754
+ return f === void 0;
1755
1755
  } }, F = "en", Y = {};
1756
1756
  Y[F] = d;
1757
- var z = "$isDayjsObject", O = function(p) {
1758
- return p instanceof R || !(!p || !p[z]);
1759
- }, L = function p(c, b, P) {
1757
+ var z = "$isDayjsObject", O = function(f) {
1758
+ return f instanceof R || !(!f || !f[z]);
1759
+ }, L = function f(c, b, P) {
1760
1760
  var H;
1761
1761
  if (!c) return F;
1762
1762
  if (typeof c == "string") {
1763
1763
  var j = c.toLowerCase();
1764
1764
  Y[j] && (H = j), b && (Y[j] = b, H = j);
1765
1765
  var J = c.split("-");
1766
- if (!H && J.length > 1) return p(J[0]);
1766
+ if (!H && J.length > 1) return f(J[0]);
1767
1767
  } else {
1768
- var re = c.name;
1769
- Y[re] = c, H = re;
1768
+ var ae = c.name;
1769
+ Y[ae] = c, H = ae;
1770
1770
  }
1771
1771
  return !P && H && (F = H), H || !P && F;
1772
- }, G = function(p, c) {
1773
- if (O(p)) return p.clone();
1772
+ }, G = function(f, c) {
1773
+ if (O(f)) return f.clone();
1774
1774
  var b = typeof c == "object" ? c : {};
1775
- return b.date = p, b.args = arguments, new R(b);
1775
+ return b.date = f, b.args = arguments, new R(b);
1776
1776
  }, I = C;
1777
- I.l = L, I.i = O, I.w = function(p, c) {
1778
- return G(p, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
1777
+ I.l = L, I.i = O, I.w = function(f, c) {
1778
+ return G(f, { locale: c.$L, utc: c.$u, x: c.$x, $offset: c.$offset });
1779
1779
  };
1780
1780
  var R = function() {
1781
- function p(b) {
1781
+ function f(b) {
1782
1782
  this.$L = L(b.locale, null, !0), this.parse(b), this.$x = this.$x || b.x || {}, this[z] = !0;
1783
1783
  }
1784
- var c = p.prototype;
1784
+ var c = f.prototype;
1785
1785
  return c.parse = function(b) {
1786
1786
  this.$d = function(P) {
1787
1787
  var H = P.date, j = P.utc;
@@ -1791,8 +1791,8 @@ function nn() {
1791
1791
  if (typeof H == "string" && !/Z$/i.test(H)) {
1792
1792
  var J = H.match(r);
1793
1793
  if (J) {
1794
- var re = J[2] - 1 || 0, me = (J[7] || "0").substring(0, 3);
1795
- return j ? new Date(Date.UTC(J[1], re, J[3] || 1, J[4] || 0, J[5] || 0, J[6] || 0, me)) : new Date(J[1], re, J[3] || 1, J[4] || 0, J[5] || 0, J[6] || 0, me);
1794
+ var ae = J[2] - 1 || 0, me = (J[7] || "0").substring(0, 3);
1795
+ return j ? new Date(Date.UTC(J[1], ae, J[3] || 1, J[4] || 0, J[5] || 0, J[6] || 0, me)) : new Date(J[1], ae, J[3] || 1, J[4] || 0, J[5] || 0, J[6] || 0, me);
1796
1796
  }
1797
1797
  }
1798
1798
  return new Date(H);
@@ -1818,7 +1818,7 @@ function nn() {
1818
1818
  }, c.valueOf = function() {
1819
1819
  return this.$d.getTime();
1820
1820
  }, c.startOf = function(b, P) {
1821
- var H = this, j = !!I.u(P) || P, J = I.p(b), re = function($e, ve) {
1821
+ var H = this, j = !!I.u(P) || P, J = I.p(b), ae = function($e, ve) {
1822
1822
  var Ae = I.w(H.$u ? Date.UTC(H.$y, ve, $e) : new Date(H.$y, ve, $e), H);
1823
1823
  return j ? Ae : Ae.endOf(E);
1824
1824
  }, me = function($e, ve) {
@@ -1826,12 +1826,12 @@ function nn() {
1826
1826
  }, de = this.$W, ye = this.$M, N = this.$D, be = "set" + (this.$u ? "UTC" : "");
1827
1827
  switch (J) {
1828
1828
  case k:
1829
- return j ? re(1, 0) : re(31, 11);
1829
+ return j ? ae(1, 0) : ae(31, 11);
1830
1830
  case w:
1831
- return j ? re(1, ye) : re(0, ye + 1);
1831
+ return j ? ae(1, ye) : ae(0, ye + 1);
1832
1832
  case T:
1833
1833
  var U = this.$locale().weekStart || 0, ge = (de < U ? de + 7 : de) - U;
1834
- return re(j ? N - ge : N + (6 - ge), ye);
1834
+ return ae(j ? N - ge : N + (6 - ge), ye);
1835
1835
  case E:
1836
1836
  case e:
1837
1837
  return me(be + "Hours", 0);
@@ -1847,11 +1847,11 @@ function nn() {
1847
1847
  }, c.endOf = function(b) {
1848
1848
  return this.startOf(b, !1);
1849
1849
  }, c.$set = function(b, P) {
1850
- var H, j = I.p(b), J = "set" + (this.$u ? "UTC" : ""), re = (H = {}, H[E] = J + "Date", H[e] = J + "Date", H[w] = J + "Month", H[k] = J + "FullYear", H[$] = J + "Hours", H[A] = J + "Minutes", H[D] = J + "Seconds", H[S] = J + "Milliseconds", H)[j], me = j === E ? this.$D + (P - this.$W) : P;
1850
+ var H, j = I.p(b), J = "set" + (this.$u ? "UTC" : ""), ae = (H = {}, H[E] = J + "Date", H[e] = J + "Date", H[w] = J + "Month", H[k] = J + "FullYear", H[$] = J + "Hours", H[A] = J + "Minutes", H[D] = J + "Seconds", H[S] = J + "Milliseconds", H)[j], me = j === E ? this.$D + (P - this.$W) : P;
1851
1851
  if (j === w || j === k) {
1852
1852
  var de = this.clone().set(e, 1);
1853
- de.$d[re](me), de.init(), this.$d = de.set(e, Math.min(this.$D, de.daysInMonth())).$d;
1854
- } else re && this.$d[re](me);
1853
+ de.$d[ae](me), de.init(), this.$d = de.set(e, Math.min(this.$D, de.daysInMonth())).$d;
1854
+ } else ae && this.$d[ae](me);
1855
1855
  return this.init(), this;
1856
1856
  }, c.set = function(b, P) {
1857
1857
  return this.clone().$set(b, P);
@@ -1860,14 +1860,14 @@ function nn() {
1860
1860
  }, c.add = function(b, P) {
1861
1861
  var H, j = this;
1862
1862
  b = Number(b);
1863
- var J = I.p(P), re = function(ye) {
1863
+ var J = I.p(P), ae = function(ye) {
1864
1864
  var N = G(j);
1865
1865
  return I.w(N.date(N.date() + Math.round(ye * b)), j);
1866
1866
  };
1867
1867
  if (J === w) return this.set(w, this.$M + b);
1868
1868
  if (J === k) return this.set(k, this.$y + b);
1869
- if (J === E) return re(1);
1870
- if (J === T) return re(7);
1869
+ if (J === E) return ae(1);
1870
+ if (J === T) return ae(7);
1871
1871
  var me = (H = {}, H[A] = o, H[$] = g, H[D] = s, H)[J] || 1, de = this.$d.getTime() + b * me;
1872
1872
  return I.w(de, this);
1873
1873
  }, c.subtract = function(b, P) {
@@ -1875,10 +1875,10 @@ function nn() {
1875
1875
  }, c.format = function(b) {
1876
1876
  var P = this, H = this.$locale();
1877
1877
  if (!this.isValid()) return H.invalidDate || n;
1878
- var j = b || "YYYY-MM-DDTHH:mm:ssZ", J = I.z(this), re = this.$H, me = this.$m, de = this.$M, ye = H.weekdays, N = H.months, be = H.meridiem, U = function(ve, Ae, Te, he) {
1878
+ var j = b || "YYYY-MM-DDTHH:mm:ssZ", J = I.z(this), ae = this.$H, me = this.$m, de = this.$M, ye = H.weekdays, N = H.months, be = H.meridiem, U = function(ve, Ae, Te, he) {
1879
1879
  return ve && (ve[Ae] || ve(P, j)) || Te[Ae].slice(0, he);
1880
1880
  }, ge = function(ve) {
1881
- return I.s(re % 12 || 12, ve, "0");
1881
+ return I.s(ae % 12 || 12, ve, "0");
1882
1882
  }, $e = be || function(ve, Ae, Te) {
1883
1883
  var he = ve < 12 ? "AM" : "PM";
1884
1884
  return Te ? he.toLowerCase() : he;
@@ -1911,17 +1911,17 @@ function nn() {
1911
1911
  case "dddd":
1912
1912
  return ye[P.$W];
1913
1913
  case "H":
1914
- return String(re);
1914
+ return String(ae);
1915
1915
  case "HH":
1916
- return I.s(re, 2, "0");
1916
+ return I.s(ae, 2, "0");
1917
1917
  case "h":
1918
1918
  return ge(1);
1919
1919
  case "hh":
1920
1920
  return ge(2);
1921
1921
  case "a":
1922
- return $e(re, me, !0);
1922
+ return $e(ae, me, !0);
1923
1923
  case "A":
1924
- return $e(re, me, !1);
1924
+ return $e(ae, me, !1);
1925
1925
  case "m":
1926
1926
  return String(me);
1927
1927
  case "mm":
@@ -1941,10 +1941,10 @@ function nn() {
1941
1941
  }, c.utcOffset = function() {
1942
1942
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
1943
1943
  }, c.diff = function(b, P, H) {
1944
- var j, J = this, re = I.p(P), me = G(b), de = (me.utcOffset() - this.utcOffset()) * o, ye = this - me, N = function() {
1944
+ var j, J = this, ae = I.p(P), me = G(b), de = (me.utcOffset() - this.utcOffset()) * o, ye = this - me, N = function() {
1945
1945
  return I.m(J, me);
1946
1946
  };
1947
- switch (re) {
1947
+ switch (ae) {
1948
1948
  case k:
1949
1949
  j = N() / 12;
1950
1950
  break;
@@ -1991,16 +1991,16 @@ function nn() {
1991
1991
  return this.$d.toISOString();
1992
1992
  }, c.toString = function() {
1993
1993
  return this.$d.toUTCString();
1994
- }, p;
1994
+ }, f;
1995
1995
  }(), X = R.prototype;
1996
- return G.prototype = X, [["$ms", S], ["$s", D], ["$m", A], ["$H", $], ["$W", E], ["$M", w], ["$y", k], ["$D", e]].forEach(function(p) {
1997
- X[p[1]] = function(c) {
1998
- return this.$g(c, p[0], p[1]);
1996
+ return G.prototype = X, [["$ms", S], ["$s", D], ["$m", A], ["$H", $], ["$W", E], ["$M", w], ["$y", k], ["$D", e]].forEach(function(f) {
1997
+ X[f[1]] = function(c) {
1998
+ return this.$g(c, f[0], f[1]);
1999
1999
  };
2000
- }), G.extend = function(p, c) {
2001
- return p.$i || (p(c, R, G), p.$i = !0), G;
2002
- }, G.locale = L, G.isDayjs = O, G.unix = function(p) {
2003
- return G(1e3 * p);
2000
+ }), G.extend = function(f, c) {
2001
+ return f.$i || (f(c, R, G), f.$i = !0), G;
2002
+ }, G.locale = L, G.isDayjs = O, G.unix = function(f) {
2003
+ return G(1e3 * f);
2004
2004
  }, G.en = Y[F], G.Ls = Y, G.p = {}, G;
2005
2005
  });
2006
2006
  }(mt)), mt.exports;
@@ -2132,11 +2132,11 @@ const Er = {
2132
2132
  rn.lang.ok = "确定";
2133
2133
  yt.locale("zh-cn");
2134
2134
  const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2135
- const s = t.dataset.key, o = t.dataset.value, g = t.dataset.placeholder, S = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, D = t.dataset.disableFuture === "true", [A, $] = oe(() => {
2135
+ const s = t.dataset.key, o = t.dataset.value, g = t.dataset.placeholder, S = t.dataset.limitRange ? parseInt(t.dataset.limitRange, 10) : void 0, D = t.dataset.disableFuture === "true", [A, $] = se(() => {
2136
2136
  if (!o) return null;
2137
2137
  const n = o.split(",");
2138
2138
  return n.length === 2 && n[0] && n[1] ? [yt(n[0]), yt(n[1])] : null;
2139
- }), [E, T] = oe(null);
2139
+ }), [E, T] = se(null);
2140
2140
  return Lt(
2141
2141
  /* @__PURE__ */ M("div", { className: "rte-datepicker-wrapper", contentEditable: !1, style: { display: "inline-block", verticalAlign: "middle", width: "260px", marginLeft: "4px", marginRight: "4px", fontSize: "16px", height: "30px", lineHeight: "30px" }, children: /* @__PURE__ */ M(
2142
2142
  Cr,
@@ -2168,7 +2168,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2168
2168
  t
2169
2169
  );
2170
2170
  }, Tr = (t) => {
2171
- const [m, s] = oe([]);
2171
+ const [m, s] = se([]);
2172
2172
  return fe(() => {
2173
2173
  const o = t.current;
2174
2174
  if (!o) return;
@@ -2249,7 +2249,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2249
2249
  collapseAutoToggleThrottleMs: I = 0,
2250
2250
  collapsedTotalHeight: R = 132,
2251
2251
  clickOverrideAutoCollapseMs: X = 360,
2252
- toggleOnBlankClick: p,
2252
+ toggleOnBlankClick: f,
2253
2253
  scrollThrottleMs: c,
2254
2254
  collapsed: b,
2255
2255
  defaultCollapsed: P,
@@ -2257,30 +2257,30 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2257
2257
  reportAnalyze: j,
2258
2258
  nodeDefaults: J
2259
2259
  }) => {
2260
- const [re, me] = Mn.useMessage(), de = te(null), ye = te(null), N = te(null), be = te(null), [U, ge] = oe({}), [$e, ve] = oe(null), [Ae, Te] = oe(null), [he, Ye] = oe(null), Ve = te(!1), Re = te(null), [Mt, Oe] = oe(!1), [Ze, et] = oe({}), bt = te(() => {
2261
- }), Ge = te({}), tt = te({}), nt = te(null), [on, rt] = oe(!0), It = te(null), [sn, ln] = oe(0), at = typeof b == "boolean", [ot, cn] = oe(
2260
+ const [ae, me] = Mn.useMessage(), de = ne(null), ye = ne(null), N = ne(null), be = ne(null), [U, ge] = se({}), [$e, ve] = se(null), [Ae, Te] = se(null), [he, Ye] = se(null), Ve = ne(!1), Re = ne(null), [Mt, Oe] = se(!1), [Ze, et] = se({}), bt = ne(() => {
2261
+ }), Ge = ne({}), tt = ne({}), nt = ne(null), [on, rt] = se(!0), It = ne(null), [ln, sn] = se(0), at = typeof b == "boolean", [ot, cn] = se(
2262
2262
  P ?? !1
2263
- ), [je, un] = oe(!1), We = te(!1), Dt = te(ot), Bt = te(window), vt = te(null), st = te(!1), [dn, Ht] = oe(!1), xt = te(null), lt = te(null), it = te(null), De = te(0), _e = te(null), wt = te(0), Ue = te(0), Fe = te(null), ct = te(null), Pt = ce(() => {
2263
+ ), [je, un] = se(!1), We = ne(!1), Dt = ne(ot), Bt = ne(window), vt = ne(null), lt = ne(!1), [dn, Ht] = se(!1), xt = ne(null), st = ne(null), it = ne(null), De = ne(0), _e = ne(null), wt = ne(0), Ue = ne(0), Fe = ne(null), ct = ne(null), Pt = ce(() => {
2264
2264
  wt.current = 0;
2265
2265
  }, []), kt = ce(() => {
2266
2266
  Fe.current != null && (window.clearTimeout(Fe.current), Fe.current = null);
2267
2267
  }, []), Ke = ce(
2268
- (a, l, i = !1) => {
2268
+ (a, i, l = !1) => {
2269
2269
  if ((at ? b : Dt.current) === a) return;
2270
2270
  const y = G && typeof L == "number" && L > 0;
2271
- if (!i && y && st.current) {
2272
- xt.current = { next: a, reason: l };
2271
+ if (!l && y && lt.current) {
2272
+ xt.current = { next: a, reason: i };
2273
2273
  return;
2274
2274
  }
2275
- y && (st.current = !0, Ht(!0), lt.current && window.clearTimeout(lt.current), lt.current = window.setTimeout(() => {
2276
- st.current = !1, Ht(!1), lt.current = null;
2275
+ y && (lt.current = !0, Ht(!0), st.current && window.clearTimeout(st.current), st.current = window.setTimeout(() => {
2276
+ lt.current = !1, Ht(!1), st.current = null;
2277
2277
  const _ = xt.current;
2278
2278
  xt.current = null, _ && Ke(_.next, _.reason, !0);
2279
2279
  try {
2280
2280
  it.current?.();
2281
2281
  } catch {
2282
2282
  }
2283
- }, L)), at || cn(a), H?.(a, l);
2283
+ }, L)), at || cn(a), H?.(a, i);
2284
2284
  },
2285
2285
  [
2286
2286
  at,
@@ -2297,88 +2297,88 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2297
2297
  }, [je]), Je(() => {
2298
2298
  const a = It.current;
2299
2299
  if (!a) return;
2300
- const l = () => {
2300
+ const i = () => {
2301
2301
  const x = Math.ceil(a.getBoundingClientRect().height || 0);
2302
- ln((y) => y === x ? y : x);
2302
+ sn((y) => y === x ? y : x);
2303
2303
  };
2304
- if (l(), typeof ResizeObserver > "u") return;
2305
- const i = new ResizeObserver(() => l());
2306
- return i.observe(a), () => i.disconnect();
2304
+ if (i(), typeof ResizeObserver > "u") return;
2305
+ const l = new ResizeObserver(() => i());
2306
+ return l.observe(a), () => l.disconnect();
2307
2307
  }, []), fe(() => {
2308
2308
  if (!d) return;
2309
- const a = B?.current ?? null, i = ((Z) => {
2310
- let le = Z;
2311
- for (; le && le !== document.body; ) {
2312
- const we = window.getComputedStyle(le), xe = we.overflowY, Ne = we.overflowX, ke = (xe === "auto" || xe === "scroll") && le.scrollHeight > le.clientHeight + 1, Ce = (Ne === "auto" || Ne === "scroll") && le.scrollWidth > le.clientWidth + 1;
2313
- if (ke || Ce) return le;
2314
- le = le.parentElement;
2309
+ const a = B?.current ?? null, l = ((ee) => {
2310
+ let ie = ee;
2311
+ for (; ie && ie !== document.body; ) {
2312
+ const we = window.getComputedStyle(ie), xe = we.overflowY, Ne = we.overflowX, ke = (xe === "auto" || xe === "scroll") && ie.scrollHeight > ie.clientHeight + 1, Ce = (Ne === "auto" || Ne === "scroll") && ie.scrollWidth > ie.clientWidth + 1;
2313
+ if (ke || Ce) return ie;
2314
+ ie = ie.parentElement;
2315
2315
  }
2316
2316
  return null;
2317
- })(de.current?.parentElement ?? null), x = C === "approach-input" ? a ?? window : a ?? i ?? window;
2317
+ })(de.current?.parentElement ?? null), x = C === "approach-input" ? a ?? window : a ?? l ?? window;
2318
2318
  Bt.current = x;
2319
2319
  const y = () => {
2320
2320
  Pt();
2321
- }, _ = (Z) => {
2322
- const le = Z.target;
2323
- le && (x !== window ? x.contains(le) && y() : de.current?.contains(le) && y());
2321
+ }, _ = (ee) => {
2322
+ const ie = ee.target;
2323
+ ie && (x !== window ? x.contains(ie) && y() : de.current?.contains(ie) && y());
2324
2324
  };
2325
2325
  window.addEventListener("wheel", y, { passive: !0 }), window.addEventListener("touchmove", y, { passive: !0 }), window.addEventListener("pointerdown", _, { passive: !0 });
2326
- let v = 0, h = 0, q = null, f = -1, Q = "none", K = -1;
2327
- const ee = () => {
2326
+ let v = 0, h = 0, q = null, p = -1, Q = "none", K = -1;
2327
+ const te = () => {
2328
2328
  if (x === window) {
2329
- const le = document.documentElement;
2329
+ const ie = document.documentElement;
2330
2330
  return {
2331
- scrollTop: le.scrollTop,
2332
- scrollHeight: le.scrollHeight,
2333
- clientHeight: le.clientHeight
2331
+ scrollTop: ie.scrollTop,
2332
+ scrollHeight: ie.scrollHeight,
2333
+ clientHeight: ie.clientHeight
2334
2334
  };
2335
2335
  }
2336
- const Z = x;
2336
+ const ee = x;
2337
2337
  return {
2338
- scrollTop: Z.scrollTop,
2339
- scrollHeight: Z.scrollHeight,
2340
- clientHeight: Z.clientHeight
2338
+ scrollTop: ee.scrollTop,
2339
+ scrollHeight: ee.scrollHeight,
2340
+ clientHeight: ee.clientHeight
2341
2341
  };
2342
- }, ne = () => {
2342
+ }, Z = () => {
2343
2343
  if (x === window) {
2344
- const Z = document.documentElement;
2345
- Z.scrollTop = Math.max(0, Z.scrollHeight - Z.clientHeight);
2344
+ const ee = document.documentElement;
2345
+ ee.scrollTop = Math.max(0, ee.scrollHeight - ee.clientHeight);
2346
2346
  } else {
2347
- const Z = x;
2348
- Z.scrollTop = Math.max(0, Z.scrollHeight - Z.clientHeight);
2347
+ const ee = x;
2348
+ ee.scrollTop = Math.max(0, ee.scrollHeight - ee.clientHeight);
2349
2349
  }
2350
2350
  }, W = () => {
2351
- const Z = F, le = Math.max(
2352
- Z + 1,
2353
- typeof Y == "number" ? Y : Z + 16
2351
+ const ee = F, ie = Math.max(
2352
+ ee + 1,
2353
+ typeof Y == "number" ? Y : ee + 16
2354
2354
  ), we = We.current;
2355
2355
  if (Date.now() < De.current) return !0;
2356
2356
  if (x === window) {
2357
2357
  const ke = document.documentElement;
2358
2358
  if (ke.scrollHeight <= ke.clientHeight + F) return !1;
2359
2359
  const Ce = ke.scrollHeight - ke.scrollTop - ke.clientHeight;
2360
- return we ? Ce <= le : Ce <= Z;
2360
+ return we ? Ce <= ie : Ce <= ee;
2361
2361
  }
2362
2362
  const xe = x;
2363
2363
  if (xe.scrollHeight <= xe.clientHeight + F) return !1;
2364
2364
  const Ne = xe.scrollHeight - xe.scrollTop - xe.clientHeight;
2365
- return we ? Ne <= le : Ne <= Z;
2366
- }, se = (Z) => {
2367
- De.current = Math.max(De.current, Date.now() + Z);
2368
- const le = () => {
2369
- _e.current = null, !(Date.now() >= De.current) && (ne(), _e.current = window.requestAnimationFrame(le));
2365
+ return we ? Ne <= ie : Ne <= ee;
2366
+ }, oe = (ee) => {
2367
+ De.current = Math.max(De.current, Date.now() + ee);
2368
+ const ie = () => {
2369
+ _e.current = null, !(Date.now() >= De.current) && (Z(), _e.current = window.requestAnimationFrame(ie));
2370
2370
  };
2371
- _e.current == null && (ne(), _e.current = window.requestAnimationFrame(le));
2372
- }, ie = () => {
2371
+ _e.current == null && (Z(), _e.current = window.requestAnimationFrame(ie));
2372
+ }, le = () => {
2373
2373
  De.current = 0, _e.current != null && (window.cancelAnimationFrame(_e.current), _e.current = null);
2374
- }, ae = (Z, le) => {
2374
+ }, re = (ee, ie) => {
2375
2375
  if (typeof X == "number" && X > 0 && Date.now() < wt.current)
2376
2376
  return;
2377
2377
  const we = typeof I == "number" ? I : 0;
2378
2378
  if (we > 0) {
2379
2379
  const xe = Date.now();
2380
2380
  if (xe < Ue.current) {
2381
- if (ct.current = { next: Z, reason: le }, Fe.current == null) {
2381
+ if (ct.current = { next: ee, reason: ie }, Fe.current == null) {
2382
2382
  const Ne = Math.max(0, Ue.current - xe);
2383
2383
  Fe.current = window.setTimeout(() => {
2384
2384
  Fe.current = null;
@@ -2390,49 +2390,49 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2390
2390
  }
2391
2391
  Ue.current = xe + we, kt();
2392
2392
  }
2393
- Ke(Z, le);
2394
- }, pe = (Z = !1) => {
2395
- if (!Z && typeof c == "number" && c > 0) {
2393
+ Ke(ee, ie);
2394
+ }, pe = (ee = !1) => {
2395
+ if (!ee && typeof c == "number" && c > 0) {
2396
2396
  const xe = Date.now();
2397
2397
  if (xe - h < c) return;
2398
2398
  h = xe;
2399
2399
  }
2400
- const le = We.current, we = W();
2400
+ const ie = We.current, we = W();
2401
2401
  if (We.current = we, un((xe) => xe === we ? xe : we), C === "approach-input" && x !== window) {
2402
- const { scrollTop: xe, scrollHeight: Ne, clientHeight: ke } = ee(), Ce = Ne - xe - ke, Xe = K >= 0 && Ce < K - 2;
2403
- if (K = Ce, Z) {
2404
- we ? ae(!1, "bottom") : ae(!0, "scroll");
2402
+ const { scrollTop: xe, scrollHeight: Ne, clientHeight: ke } = te(), Ce = Ne - xe - ke, Xe = K >= 0 && Ce < K - 2;
2403
+ if (K = Ce, ee) {
2404
+ we ? re(!1, "bottom") : re(!0, "scroll");
2405
2405
  return;
2406
2406
  }
2407
2407
  if (we) {
2408
- if (ae(!1, "bottom"), Q !== "up" && !le) {
2408
+ if (re(!1, "bottom"), Q !== "up" && !ie) {
2409
2409
  const Ut = Math.max(200, Le + 80);
2410
- se(Ut);
2410
+ oe(Ut);
2411
2411
  }
2412
2412
  return;
2413
2413
  }
2414
- Xe && ae(!0, "scroll");
2414
+ Xe && re(!0, "scroll");
2415
2415
  return;
2416
2416
  }
2417
2417
  if (we) {
2418
- if (!(z && Q === "up") && (ae(!1, "bottom"), Q !== "up" && !le)) {
2418
+ if (!(z && Q === "up") && (re(!1, "bottom"), Q !== "up" && !ie)) {
2419
2419
  const xe = Math.max(200, Le + 80);
2420
- se(xe);
2420
+ oe(xe);
2421
2421
  }
2422
2422
  return;
2423
2423
  }
2424
- De.current && ie(), ae(!0, "scroll");
2424
+ De.current && le(), re(!0, "scroll");
2425
2425
  };
2426
2426
  it.current = () => pe(!0);
2427
2427
  const Ee = () => {
2428
- if (G && typeof L == "number" && L > 0 && st.current) {
2429
- const { scrollTop: Z } = ee();
2430
- f >= 0 && (Z > f ? Q = "down" : Z < f && (Q = "up")), f >= 0 && Z < f && ie(), f = Z;
2428
+ if (G && typeof L == "number" && L > 0 && lt.current) {
2429
+ const { scrollTop: ee } = te();
2430
+ p >= 0 && (ee > p ? Q = "down" : ee < p && (Q = "up")), p >= 0 && ee < p && le(), p = ee;
2431
2431
  return;
2432
2432
  }
2433
2433
  {
2434
- const { scrollTop: Z } = ee();
2435
- f >= 0 && (Z > f ? Q = "down" : Z < f && (Q = "up")), f >= 0 && Z < f && ie(), z && f >= 0 && We.current && Z < f && (vt.current = de.current?.getBoundingClientRect().height ?? null, ae(!0, "scroll")), f = Z;
2434
+ const { scrollTop: ee } = te();
2435
+ p >= 0 && (ee > p ? Q = "down" : ee < p && (Q = "up")), p >= 0 && ee < p && le(), z && p >= 0 && We.current && ee < p && (vt.current = de.current?.getBoundingClientRect().height ?? null, re(!0, "scroll")), p = ee;
2436
2436
  }
2437
2437
  v || (v = window.requestAnimationFrame(() => {
2438
2438
  v = 0, pe();
@@ -2440,10 +2440,10 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2440
2440
  pe(!0);
2441
2441
  }, O)));
2442
2442
  };
2443
- x === window ? window.addEventListener("scroll", Ee, { passive: !0 }) : x.addEventListener("scroll", Ee, { passive: !0 }), f = ee().scrollTop;
2443
+ x === window ? window.addEventListener("scroll", Ee, { passive: !0 }) : x.addEventListener("scroll", Ee, { passive: !0 }), p = te().scrollTop;
2444
2444
  {
2445
- const Z = ee();
2446
- K = Z.scrollHeight - Z.scrollTop - Z.clientHeight;
2445
+ const ee = te();
2446
+ K = ee.scrollHeight - ee.scrollTop - ee.clientHeight;
2447
2447
  }
2448
2448
  return pe(!0), () => {
2449
2449
  it.current && (it.current = null), _e.current != null && (window.cancelAnimationFrame(_e.current), _e.current = null), De.current = 0, kt(), Ue.current = 0, ct.current = null, window.removeEventListener("wheel", y), window.removeEventListener("touchmove", y), window.removeEventListener("pointerdown", _), x === window ? window.removeEventListener("scroll", Ee) : x.removeEventListener("scroll", Ee), q && window.clearTimeout(q), v && window.cancelAnimationFrame(v);
@@ -2462,55 +2462,55 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2462
2462
  I,
2463
2463
  kt
2464
2464
  ]);
2465
- const [Be, Me] = oe(() => {
2465
+ const [Be, Me] = se(() => {
2466
2466
  const a = {};
2467
- return t.forEach((l) => {
2468
- l.type === "multi-variable" && l.key && (a[l.key] = 1);
2467
+ return t.forEach((i) => {
2468
+ i.type === "multi-variable" && i.key && (a[i.key] = 1);
2469
2469
  }), a;
2470
- }), $t = te({}), Vt = te({}), Rt = te({});
2470
+ }), $t = ne({}), Vt = ne({}), Rt = ne({});
2471
2471
  fe(() => {
2472
2472
  Vt.current = U;
2473
2473
  }, [U]), fe(() => {
2474
2474
  Rt.current = Be;
2475
2475
  }, [Be]);
2476
- const Et = ce((a) => a.find((i) => i.type === "tag")?.text || null, []), Ot = te(t), He = te(null);
2476
+ const Et = ce((a) => a.find((l) => l.type === "tag")?.text || null, []), Ot = ne(t), He = ne(null);
2477
2477
  fe(() => {
2478
- const a = Et(Ot.current), l = Et(t);
2479
- if (a && a !== l && N.current) {
2480
- const i = {};
2478
+ const a = Et(Ot.current), i = Et(t);
2479
+ if (a && a !== i && N.current) {
2480
+ const l = {};
2481
2481
  N.current.querySelectorAll('[data-type="variable"]').forEach((v) => {
2482
2482
  const h = v.dataset.key;
2483
2483
  if (h) {
2484
2484
  const q = v.innerText.replace(/[\u200B\n]/g, "").trim();
2485
- q && (i[h] = q);
2485
+ q && (l[h] = q);
2486
2486
  }
2487
2487
  }), N.current.querySelectorAll('[data-type="select"]').forEach((v) => {
2488
2488
  const h = v.dataset.key;
2489
2489
  if (h) {
2490
2490
  const q = (v.getAttribute("data-value") || "").trim();
2491
- q && (i[h] = q);
2491
+ q && (l[h] = q);
2492
2492
  }
2493
2493
  }), N.current.querySelectorAll('[data-type="textarea"]').forEach((v) => {
2494
2494
  const h = v.dataset.key;
2495
2495
  if (h) {
2496
2496
  const q = v.value.replace(/[\u200B]/g, "").trim();
2497
- q && (i[h] = q);
2497
+ q && (l[h] = q);
2498
2498
  }
2499
2499
  }), $t.current[a] = {
2500
- variableValues: i,
2500
+ variableValues: l,
2501
2501
  files: { ...Vt.current },
2502
2502
  multiVariableCounts: { ...Rt.current }
2503
2503
  };
2504
2504
  }
2505
- if (l && $t.current[l]) {
2506
- const i = $t.current[l];
2507
- He.current = i, ge(i.files), Me(i.multiVariableCounts);
2508
- } else if (l) {
2505
+ if (i && $t.current[i]) {
2506
+ const l = $t.current[i];
2507
+ He.current = l, ge(l.files), Me(l.multiVariableCounts);
2508
+ } else if (i) {
2509
2509
  He.current = null;
2510
- const i = {};
2510
+ const l = {};
2511
2511
  t.forEach((x) => {
2512
- x.type === "multi-variable" && x.key && (i[x.key] = 1);
2513
- }), Me(i), ge({});
2512
+ x.type === "multi-variable" && x.key && (l[x.key] = 1);
2513
+ }), Me(l), ge({});
2514
2514
  } else
2515
2515
  He.current = null, Me({}), ge({});
2516
2516
  Ot.current = t;
@@ -2521,10 +2521,10 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2521
2521
  });
2522
2522
  const Se = qt(() => {
2523
2523
  if (!t || t.length === 0) return t;
2524
- const a = [], l = (i) => i.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2525
- for (const i of t) {
2526
- if (a.push(i), i.type !== "report-url" || !i.key) continue;
2527
- const x = Ze[i.key], y = x?.status ?? "idle", _ = x?.modules ?? [];
2524
+ const a = [], i = (l) => l.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#39;");
2525
+ for (const l of t) {
2526
+ if (a.push(l), l.type !== "report-url" || !l.key) continue;
2527
+ const x = Ze[l.key], y = x?.status ?? "idle", _ = x?.modules ?? [];
2528
2528
  y === "loading" && a.push({
2529
2529
  type: "text",
2530
2530
  className: "rte-report-parsing",
@@ -2533,12 +2533,12 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2533
2533
  }), y === "error" && x?.error && a.push({
2534
2534
  type: "text",
2535
2535
  className: "rte-report-error",
2536
- text: `解析失败:${l(x.error)}
2536
+ text: `解析失败:${i(x.error)}
2537
2537
  `
2538
2538
  }), _.length > 0 && (_.forEach((v, h) => {
2539
2539
  a.push({
2540
2540
  type: "report-module",
2541
- key: `${i.key}__module_${h}`,
2541
+ key: `${l.key}__module_${h}`,
2542
2542
  placeholder: "可编辑,内容不能为空",
2543
2543
  required: !0,
2544
2544
  minHeight: 80,
@@ -2550,7 +2550,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2550
2550
  }
2551
2551
  return a;
2552
2552
  }, [t, Ze]);
2553
- lr(
2553
+ sr(
2554
2554
  N,
2555
2555
  Se,
2556
2556
  U,
@@ -2562,61 +2562,61 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2562
2562
  J
2563
2563
  ), ir(N, Se, U, Ye), cr(N, Se, Ye, k), dr(N, Se, U, Ye), ur(N, Se, Ye), pr(N, Se, U, Oe), fr(N, Ve);
2564
2564
  const fn = or(N), mn = Tr(N), Ct = ce((a) => {
2565
- const l = a.trim();
2566
- if (!l) return { url: "" };
2567
- let i = null;
2565
+ const i = a.trim();
2566
+ if (!i) return { url: "" };
2567
+ let l = null;
2568
2568
  try {
2569
- i = new URL(l);
2569
+ l = new URL(i);
2570
2570
  } catch {
2571
2571
  try {
2572
- i = new URL(`https://${l}`);
2572
+ l = new URL(`https://${i}`);
2573
2573
  } catch {
2574
- return { url: l };
2574
+ return { url: i };
2575
2575
  }
2576
2576
  }
2577
- const x = i.pathname.split("/").filter(Boolean), y = x.findIndex((q) => q === "report"), _ = y >= 0 ? x[y + 1] : void 0, v = x[0] && x[0].length <= 5 ? x[0] : void 0, h = i.searchParams.get("agentId") || void 0;
2578
- return { url: l, reportId: _, agentId: h, lang: v };
2577
+ const x = l.pathname.split("/").filter(Boolean), y = x.findIndex((q) => q === "report"), _ = y >= 0 ? x[y + 1] : void 0, v = x[0] && x[0].length <= 5 ? x[0] : void 0, h = l.searchParams.get("agentId") || void 0;
2578
+ return { url: i, reportId: _, agentId: h, lang: v };
2579
2579
  }, []), Gt = ce(() => {
2580
2580
  const a = {};
2581
2581
  if (!N.current) return a;
2582
- const l = N.current;
2583
- return l.querySelectorAll('[data-type="variable"]').forEach((h) => {
2582
+ const i = N.current;
2583
+ return i.querySelectorAll('[data-type="variable"]').forEach((h) => {
2584
2584
  const q = h.dataset.key;
2585
2585
  if (!q) return;
2586
- const f = h.innerText.replace(/[\u200B\n]/g, "").trim();
2587
- f && (a[q] = f);
2588
- }), l.querySelectorAll('[data-type="select"]').forEach((h) => {
2586
+ const p = h.innerText.replace(/[\u200B\n]/g, "").trim();
2587
+ p && (a[q] = p);
2588
+ }), i.querySelectorAll('[data-type="select"]').forEach((h) => {
2589
2589
  const q = h.dataset.key;
2590
2590
  if (!q) return;
2591
- const f = (h.getAttribute("data-value") || "").trim();
2592
- f && (a[q] = f);
2593
- }), l.querySelectorAll('[data-type="textarea"]').forEach((h) => {
2591
+ const p = (h.getAttribute("data-value") || "").trim();
2592
+ p && (a[q] = p);
2593
+ }), i.querySelectorAll('[data-type="textarea"]').forEach((h) => {
2594
2594
  const q = h.dataset.key;
2595
2595
  if (!q) return;
2596
- const f = h.value.replace(/[\u200B]/g, "").trim();
2597
- f && (a[q] = f);
2598
- }), l.querySelectorAll('[data-type="richtext"]').forEach((h) => {
2596
+ const p = h.value.replace(/[\u200B]/g, "").trim();
2597
+ p && (a[q] = p);
2598
+ }), i.querySelectorAll('[data-type="richtext"]').forEach((h) => {
2599
2599
  const q = h.dataset.key;
2600
2600
  if (!q) return;
2601
- const f = (h.textContent || "").replace(/[\u200B]/g, "").trim();
2602
- f && (a[q] = f);
2603
- }), l.querySelectorAll('[data-type="datepicker"]').forEach((h) => {
2601
+ const p = (h.textContent || "").replace(/[\u200B]/g, "").trim();
2602
+ p && (a[q] = p);
2603
+ }), i.querySelectorAll('[data-type="datepicker"]').forEach((h) => {
2604
2604
  const q = h.dataset.key;
2605
2605
  if (!q) return;
2606
- const f = (h.getAttribute("data-value") || "").trim();
2607
- f && (a[q] = f);
2606
+ const p = (h.getAttribute("data-value") || "").trim();
2607
+ p && (a[q] = p);
2608
2608
  }), a;
2609
2609
  }, []), Ft = ce(
2610
- (a) => (a?.modules || []).map((i, x) => {
2611
- const y = (i?.title || `模块${x + 1}`).trim() || `模块${x + 1}`, _ = (i?.content || "").trim(), v = _.length > 0 ? _ : `请补充:${y}`;
2610
+ (a) => (a?.modules || []).map((l, x) => {
2611
+ const y = (l?.title || `模块${x + 1}`).trim() || `模块${x + 1}`, _ = (l?.content || "").trim(), v = _.length > 0 ? _ : `请补充:${y}`;
2612
2612
  return { title: y, content: v };
2613
2613
  }),
2614
2614
  []
2615
2615
  ), zt = ce(
2616
- (a, l) => {
2617
- const i = (l || "").trim();
2616
+ (a, i) => {
2617
+ const l = (i || "").trim();
2618
2618
  if (!a) return;
2619
- if (!i) {
2619
+ if (!l) {
2620
2620
  et((v) => ({
2621
2621
  ...v,
2622
2622
  [a]: { status: "idle", modules: [], lastParsedUrl: void 0, error: void 0 }
@@ -2626,10 +2626,10 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2626
2626
  try {
2627
2627
  const v = window.getSelection();
2628
2628
  if (v && v.rangeCount > 0) {
2629
- const h = v.getRangeAt(0), q = h.startContainer, f = q.nodeType === Node.ELEMENT_NODE ? q.closest(`[data-type="variable"][data-key="${a}"]`) : q.parentElement?.closest(`[data-type="variable"][data-key="${a}"]`);
2630
- if (f && N.current?.contains(f)) {
2629
+ const h = v.getRangeAt(0), q = h.startContainer, p = q.nodeType === Node.ELEMENT_NODE ? q.closest(`[data-type="variable"][data-key="${a}"]`) : q.parentElement?.closest(`[data-type="variable"][data-key="${a}"]`);
2630
+ if (p && N.current?.contains(p)) {
2631
2631
  const Q = document.createRange();
2632
- Q.setStartBefore(f), Q.setEnd(h.startContainer, h.startOffset);
2632
+ Q.setStartBefore(p), Q.setEnd(h.startContainer, h.startOffset);
2633
2633
  const K = Q.toString().length;
2634
2634
  nt.current = { key: a, offset: K };
2635
2635
  }
@@ -2637,17 +2637,17 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2637
2637
  } catch {
2638
2638
  }
2639
2639
  const x = Ze[a];
2640
- if (x?.lastParsedUrl && x.lastParsedUrl === i && x.status === "loading") return;
2640
+ if (x?.lastParsedUrl && x.lastParsedUrl === l && x.status === "loading") return;
2641
2641
  et((v) => ({
2642
2642
  ...v,
2643
2643
  [a]: {
2644
2644
  ...v[a] || { modules: [] },
2645
2645
  status: "loading",
2646
2646
  error: void 0,
2647
- lastParsedUrl: i
2647
+ lastParsedUrl: l
2648
2648
  }
2649
2649
  }));
2650
- const y = Ct(i);
2650
+ const y = Ct(l);
2651
2651
  (j || (async (v) => ({
2652
2652
  modules: [
2653
2653
  {
@@ -2664,13 +2664,13 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2664
2664
  const h = Ft(v);
2665
2665
  if (N.current) {
2666
2666
  const q = Gt();
2667
- h.forEach((f, Q) => {
2668
- q[`${a}__module_${Q}`] = f.content;
2667
+ h.forEach((p, Q) => {
2668
+ q[`${a}__module_${Q}`] = p.content;
2669
2669
  }), N.current.__tempVariableValues = q;
2670
2670
  }
2671
2671
  et((q) => ({
2672
2672
  ...q,
2673
- [a]: { status: "success", error: void 0, lastParsedUrl: i, modules: h }
2673
+ [a]: { status: "success", error: void 0, lastParsedUrl: l, modules: h }
2674
2674
  }));
2675
2675
  }).catch((v) => {
2676
2676
  const h = v instanceof Error ? v.message : String(v);
@@ -2680,7 +2680,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2680
2680
  ...q[a] || { modules: [] },
2681
2681
  status: "error",
2682
2682
  error: h || "解析失败",
2683
- lastParsedUrl: i,
2683
+ lastParsedUrl: l,
2684
2684
  modules: []
2685
2685
  }
2686
2686
  }));
@@ -2692,7 +2692,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2692
2692
  bt.current = zt;
2693
2693
  }, [zt]), fe(() => () => {
2694
2694
  const a = Ge.current;
2695
- Object.keys(a).forEach((l) => window.clearTimeout(a[l])), Ge.current = {}, tt.current = {};
2695
+ Object.keys(a).forEach((i) => window.clearTimeout(a[i])), Ge.current = {}, tt.current = {};
2696
2696
  }, []), fe(() => {
2697
2697
  if (Se.length > 0) {
2698
2698
  rt(!1);
@@ -2703,24 +2703,24 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2703
2703
  rt(!0);
2704
2704
  return;
2705
2705
  }
2706
- const i = N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", x = N.current.querySelectorAll('[data-type="variable"]'), y = N.current.querySelectorAll('[data-type="upload"]');
2706
+ const l = N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "", x = N.current.querySelectorAll('[data-type="variable"]'), y = N.current.querySelectorAll('[data-type="upload"]');
2707
2707
  let _ = !1;
2708
2708
  x.forEach((h) => {
2709
2709
  (h.textContent?.replace(/[\u200B\n]/g, "").trim() || "") && (_ = !0);
2710
2710
  }), y.forEach((h) => {
2711
2711
  h.querySelector(".upload-inner-wrapper.has-file") && (_ = !0);
2712
2712
  });
2713
- const v = !i && !_;
2713
+ const v = !l && !_;
2714
2714
  rt(v), Se.length === 0 && Oe(!v);
2715
2715
  };
2716
2716
  a();
2717
- const l = new MutationObserver(a);
2718
- return N.current && l.observe(N.current, {
2717
+ const i = new MutationObserver(a);
2718
+ return N.current && i.observe(N.current, {
2719
2719
  childList: !0,
2720
2720
  subtree: !0,
2721
2721
  characterData: !0
2722
2722
  }), () => {
2723
- l.disconnect();
2723
+ i.disconnect();
2724
2724
  };
2725
2725
  }, [Se]);
2726
2726
  const yn = (a) => {
@@ -2729,56 +2729,56 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2729
2729
  return;
2730
2730
  }
2731
2731
  a.preventDefault();
2732
- const l = a.clipboardData.getData("text/plain"), i = window.getSelection();
2733
- if (i && i.rangeCount > 0) {
2734
- const x = i.anchorNode;
2732
+ const i = a.clipboardData.getData("text/plain"), l = window.getSelection();
2733
+ if (l && l.rangeCount > 0) {
2734
+ const x = l.anchorNode;
2735
2735
  if (x) {
2736
2736
  let y = null;
2737
2737
  if (x.nodeType === Node.ELEMENT_NODE ? y = x.closest('[data-type="variable"]') : x.nodeType === Node.TEXT_NODE && x.parentElement && (y = x.parentElement.closest('[data-type="variable"]')), y) {
2738
2738
  const _ = y.dataset.multiKey;
2739
2739
  if (_) {
2740
- const v = /[、,,\s\n\r\t]+/, h = l.split(v).map((q) => q.trim()).filter((q) => q.length > 0);
2741
- if (console.log("[Paste Event] 粘贴的内容:", l), console.log("[Paste Event] 拆分后的值:", h), h.length > 1) {
2742
- const q = parseInt(y.dataset.index || "0", 10), f = t.find((pe) => pe.type === "multi-variable" && pe.key === _)?.maxCount || 9, Q = Be[_] || 1, K = Math.min(q + h.length, f);
2743
- K > Q && Me((ae) => ({
2744
- ...ae,
2740
+ const v = /[、,,\s\n\r\t]+/, h = i.split(v).map((q) => q.trim()).filter((q) => q.length > 0);
2741
+ if (console.log("[Paste Event] 粘贴的内容:", i), console.log("[Paste Event] 拆分后的值:", h), h.length > 1) {
2742
+ const q = parseInt(y.dataset.index || "0", 10), p = t.find((pe) => pe.type === "multi-variable" && pe.key === _)?.maxCount || 9, Q = Be[_] || 1, K = Math.min(q + h.length, p);
2743
+ K > Q && Me((re) => ({
2744
+ ...re,
2745
2745
  [_]: K
2746
2746
  }));
2747
- const ee = [];
2748
- for (let ae = 0; ae < Q; ae++) {
2749
- const pe = `${_}_${ae}`, Ee = N.current.querySelector(
2747
+ const te = [];
2748
+ for (let re = 0; re < Q; re++) {
2749
+ const pe = `${_}_${re}`, Ee = N.current.querySelector(
2750
2750
  `[data-type="variable"][data-key="${pe}"][data-multi-key="${_}"]`
2751
2751
  );
2752
2752
  if (Ee) {
2753
- const Z = Ee.innerText.replace(/[\u200B\n]/g, "").trim();
2754
- ee.push(Z);
2753
+ const ee = Ee.innerText.replace(/[\u200B\n]/g, "").trim();
2754
+ te.push(ee);
2755
2755
  }
2756
2756
  }
2757
- ee.splice(q, 1, ...h.slice(0, f - q));
2758
- const ne = ee.slice(0, f);
2759
- ne.length > 0 && ne[ne.length - 1] !== "" && ne.length < f && ne.push("");
2760
- const W = Math.max(ne.length, 1), se = {};
2761
- ne.forEach((ae, pe) => {
2762
- ae && (se[`${_}_${pe}`] = ae);
2757
+ te.splice(q, 1, ...h.slice(0, p - q));
2758
+ const Z = te.slice(0, p);
2759
+ Z.length > 0 && Z[Z.length - 1] !== "" && Z.length < p && Z.push("");
2760
+ const W = Math.max(Z.length, 1), oe = {};
2761
+ Z.forEach((re, pe) => {
2762
+ re && (oe[`${_}_${pe}`] = re);
2763
2763
  }), N.current.querySelectorAll(
2764
2764
  '[data-type="variable"]'
2765
- ).forEach((ae) => {
2766
- const pe = ae.dataset.key, Ee = ae.dataset.multiKey;
2765
+ ).forEach((re) => {
2766
+ const pe = re.dataset.key, Ee = re.dataset.multiKey;
2767
2767
  if (pe && Ee !== _) {
2768
- const Z = ae.innerText.replace(/[\u200B\n]/g, "").trim();
2769
- Z && (se[pe] = Z);
2768
+ const ee = re.innerText.replace(/[\u200B\n]/g, "").trim();
2769
+ ee && (oe[pe] = ee);
2770
2770
  }
2771
- }), N.current.__tempVariableValues = se, Me((ae) => ({
2772
- ...ae,
2771
+ }), N.current.__tempVariableValues = oe, Me((re) => ({
2772
+ ...re,
2773
2773
  [_]: W
2774
- })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", ne);
2774
+ })), console.log("[Paste Event] 粘贴完成,已填充到多个输入框,值:", Z);
2775
2775
  return;
2776
2776
  } else h.length === 1 && console.log("[Paste Event] 粘贴单个值,将在失去焦点时检查是否需要拆分");
2777
2777
  }
2778
2778
  }
2779
2779
  }
2780
2780
  }
2781
- document.execCommand("insertText", !1, l), jt(), setTimeout(() => {
2781
+ document.execCommand("insertText", !1, i), jt(), setTimeout(() => {
2782
2782
  const x = window.getSelection();
2783
2783
  if (x && x.rangeCount > 0) {
2784
2784
  const y = x.anchorNode;
@@ -2796,46 +2796,46 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2796
2796
  a.target && (a.target.value = ""), ve(null), Te(null);
2797
2797
  return;
2798
2798
  }
2799
- const l = 10 * 1024 * 1024, i = (y) => y.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(y.name || ""), x = (y) => i(y) && y.size > l;
2799
+ const i = 10 * 1024 * 1024, l = (y) => y.type?.startsWith("image/") ? !0 : /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(y.name || ""), x = (y) => l(y) && y.size > i;
2800
2800
  if (Ae && a.target.files && a.target.files.length > 0) {
2801
- const y = Ae, _ = t.find((f) => f.type === "upload" && f.key === y), v = Array.from(a.target.files), h = v.filter((f) => !x(f)), q = v.length - h.length;
2802
- if (q > 0 && re.error(`已自动过滤 ${q} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), _ && typeof _.maxCount == "number" && typeof _.minCount == "number") {
2803
- const f = _.maxCount;
2801
+ const y = Ae, _ = t.find((p) => p.type === "upload" && p.key === y), v = Array.from(a.target.files), h = v.filter((p) => !x(p)), q = v.length - h.length;
2802
+ if (q > 0 && ae.error(`已自动过滤 ${q} 张超过 10MB 的图片,仅允许上传 10MB 以内图片`), _ && typeof _.maxCount == "number" && typeof _.minCount == "number") {
2803
+ const p = _.maxCount;
2804
2804
  let Q = 0;
2805
2805
  ge((K) => {
2806
- for (let se = 0; se < f; se++) {
2807
- const ie = `${y}-${se}`;
2808
- K[ie] && (Q = se + 1);
2806
+ for (let oe = 0; oe < p; oe++) {
2807
+ const le = `${y}-${oe}`;
2808
+ K[le] && (Q = oe + 1);
2809
2809
  }
2810
- const ee = f - Q, ne = h.slice(0, ee), W = { ...K };
2811
- return ne.forEach((se, ie) => {
2812
- const ae = `${y}-${Q + ie}`;
2813
- W[ae] = se;
2810
+ const te = p - Q, Z = h.slice(0, te), W = { ...K };
2811
+ return Z.forEach((oe, le) => {
2812
+ const re = `${y}-${Q + le}`;
2813
+ W[re] = oe;
2814
2814
  }), W;
2815
2815
  });
2816
2816
  }
2817
2817
  } else if ($e && a.target.files[0]) {
2818
2818
  const y = a.target.files[0], _ = $e;
2819
- x(y) ? re.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : ge((v) => ({ ...v, [_]: y }));
2819
+ x(y) ? ae.error("图片大小不能超过 10MB(仅允许上传 10MB 以内图片)") : ge((v) => ({ ...v, [_]: y }));
2820
2820
  }
2821
2821
  a.target && (a.target.value = ""), ve(null), Te(null);
2822
2822
  }, Yt = (a) => {
2823
- ge((l) => {
2824
- const i = { ...l };
2825
- return delete i[a], i;
2823
+ ge((i) => {
2824
+ const l = { ...i };
2825
+ return delete l[a], l;
2826
2826
  });
2827
2827
  }, gn = (a) => {
2828
- const l = a.target;
2829
- if (l.closest(".rte-datepicker-wrapper") || l.closest(".rte-datepicker-host") || l.closest(".rte-select-wrapper") || l.closest(".rte-select-host") || l.closest(".ant-select-dropdown"))
2828
+ const i = a.target;
2829
+ if (i.closest(".rte-datepicker-wrapper") || i.closest(".rte-datepicker-host") || i.closest(".rte-select-wrapper") || i.closest(".rte-select-host") || i.closest(".ant-select-dropdown"))
2830
2830
  return;
2831
- if (l.closest(".tag-close-btn")) {
2831
+ if (i.closest(".tag-close-btn")) {
2832
2832
  if (a.preventDefault(), a.stopPropagation(), S)
2833
2833
  return;
2834
2834
  Ye(null), $ ? $() : N.current && (N.current.innerHTML = "", N.current.focus());
2835
2835
  return;
2836
2836
  }
2837
2837
  if (S) {
2838
- const y = l.closest(".tag-node"), _ = l.closest('[data-type="text"]');
2838
+ const y = i.closest(".tag-node"), _ = i.closest('[data-type="text"]');
2839
2839
  if (y || _) {
2840
2840
  a.preventDefault(), a.stopPropagation();
2841
2841
  const v = window.getSelection();
@@ -2843,7 +2843,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2843
2843
  return;
2844
2844
  }
2845
2845
  }
2846
- l.closest('[data-type="variable"]') || (Re.current = { x: a.clientX, y: a.clientY }, Ve.current = !1, l.closest(".file-remove-btn") && (a.preventDefault(), a.stopPropagation()));
2846
+ i.closest('[data-type="variable"]') || (Re.current = { x: a.clientX, y: a.clientY }, Ve.current = !1, i.closest(".file-remove-btn") && (a.preventDefault(), a.stopPropagation()));
2847
2847
  }, bn = (a) => {
2848
2848
  if (!a.target.closest('[data-type="variable"]') && Re.current) {
2849
2849
  const x = Math.abs(a.clientX - Re.current.x), y = Math.abs(a.clientY - Re.current.y);
@@ -2858,28 +2858,28 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2858
2858
  }, xn = (a) => {
2859
2859
  if (o)
2860
2860
  return;
2861
- const l = a.target;
2862
- if (l.closest('[data-type="datepicker"]'))
2861
+ const i = a.target;
2862
+ if (i.closest('[data-type="datepicker"]'))
2863
2863
  return;
2864
- if (l.closest(".tag-close-btn")) {
2864
+ if (i.closest(".tag-close-btn")) {
2865
2865
  a.preventDefault(), a.stopPropagation();
2866
2866
  return;
2867
2867
  }
2868
2868
  if (t.length === 0)
2869
2869
  return;
2870
- if (l.closest('[data-type="text"]')) {
2870
+ if (i.closest('[data-type="text"]')) {
2871
2871
  a.preventDefault(), a.stopPropagation();
2872
2872
  const q = window.getSelection();
2873
2873
  q && q.removeAllRanges();
2874
2874
  return;
2875
2875
  }
2876
- if (S && l.closest(".tag-node")) {
2876
+ if (S && i.closest(".tag-node")) {
2877
2877
  a.preventDefault(), a.stopPropagation();
2878
- const f = window.getSelection();
2879
- f && f.removeAllRanges();
2878
+ const p = window.getSelection();
2879
+ p && p.removeAllRanges();
2880
2880
  return;
2881
2881
  }
2882
- if (l.closest('[data-type="variable"]')) {
2882
+ if (i.closest('[data-type="variable"]')) {
2883
2883
  if (Ve.current)
2884
2884
  return;
2885
2885
  setTimeout(() => {
@@ -2888,49 +2888,49 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2888
2888
  }, 10);
2889
2889
  return;
2890
2890
  }
2891
- const v = l.closest(".file-remove-btn");
2891
+ const v = i.closest(".file-remove-btn");
2892
2892
  if (v) {
2893
2893
  a.preventDefault(), a.stopPropagation();
2894
- const q = v.closest('[data-type="upload"]'), f = q?.dataset.key, Q = q?.dataset.batchKey;
2895
- if (f)
2894
+ const q = v.closest('[data-type="upload"]'), p = q?.dataset.key, Q = q?.dataset.batchKey;
2895
+ if (p)
2896
2896
  if (Q) {
2897
- const K = t.find((ee) => ee.type === "upload" && ee.key === Q);
2897
+ const K = t.find((te) => te.type === "upload" && te.key === Q);
2898
2898
  if (K && typeof K.maxCount == "number" && typeof K.minCount == "number") {
2899
- const ee = K.maxCount;
2900
- ge((ne) => {
2901
- const W = { ...ne }, se = [];
2902
- for (let ie = 0; ie < ee; ie++) {
2903
- const ae = `${Q}-${ie}`, pe = W[ae];
2904
- pe != null && ae !== f && se.push(pe);
2899
+ const te = K.maxCount;
2900
+ ge((Z) => {
2901
+ const W = { ...Z }, oe = [];
2902
+ for (let le = 0; le < te; le++) {
2903
+ const re = `${Q}-${le}`, pe = W[re];
2904
+ pe != null && re !== p && oe.push(pe);
2905
2905
  }
2906
- for (let ie = 0; ie < ee; ie++)
2907
- delete W[`${Q}-${ie}`];
2908
- return se.forEach((ie, ae) => {
2909
- W[`${Q}-${ae}`] = ie;
2906
+ for (let le = 0; le < te; le++)
2907
+ delete W[`${Q}-${le}`];
2908
+ return oe.forEach((le, re) => {
2909
+ W[`${Q}-${re}`] = le;
2910
2910
  }), W;
2911
2911
  });
2912
2912
  } else
2913
- Yt(f);
2913
+ Yt(p);
2914
2914
  } else
2915
- Yt(f);
2915
+ Yt(p);
2916
2916
  return;
2917
2917
  }
2918
- const h = l.closest('[data-type="upload"]');
2918
+ const h = i.closest('[data-type="upload"]');
2919
2919
  if (h) {
2920
- const q = h.dataset.key, f = h.dataset.batchKey;
2920
+ const q = h.dataset.key, p = h.dataset.batchKey;
2921
2921
  if (q)
2922
- if (f) {
2923
- const Q = t.find((K) => K.type === "upload" && K.key === f);
2922
+ if (p) {
2923
+ const Q = t.find((K) => K.type === "upload" && K.key === p);
2924
2924
  if (Q && typeof Q.maxCount == "number" && typeof Q.minCount == "number") {
2925
2925
  const K = Q.maxCount;
2926
2926
  if (U[q] != null) {
2927
2927
  be.current && (be.current.multiple = !1), Te(null), ve(q), be.current?.click();
2928
2928
  return;
2929
2929
  }
2930
- let ne = 0;
2930
+ let Z = 0;
2931
2931
  for (let W = 0; W < K; W++)
2932
- U[`${f}-${W}`] != null && (ne += 1);
2933
- ne < K && be.current ? (be.current.multiple = !0, Te(f), ve(null), be.current.click()) : (be.current && (be.current.multiple = !1), Te(null), ve(q), be.current?.click());
2932
+ U[`${p}-${W}`] != null && (Z += 1);
2933
+ Z < K && be.current ? (be.current.multiple = !0, Te(p), ve(null), be.current.click()) : (be.current && (be.current.multiple = !1), Te(null), ve(q), be.current?.click());
2934
2934
  } else
2935
2935
  be.current && (be.current.multiple = !1), Te(null), ve(q), be.current?.click();
2936
2936
  } else
@@ -2938,36 +2938,36 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2938
2938
  return;
2939
2939
  }
2940
2940
  }, wn = (a) => {
2941
- const i = a.target.closest('[data-type="variable"]');
2942
- if (i) {
2941
+ const l = a.target.closest('[data-type="variable"]');
2942
+ if (l) {
2943
2943
  const x = window.getSelection();
2944
2944
  if (x) {
2945
- const y = document.createRange(), _ = i.textContent || "";
2945
+ const y = document.createRange(), _ = l.textContent || "";
2946
2946
  if (_.replace(/\u200B/g, "")) {
2947
2947
  let h = 0, q = _.length;
2948
2948
  _.startsWith("​") && (h = 1), _.endsWith("​") && _.length > 1 && (q = _.length - 1);
2949
- const f = i.firstChild;
2950
- f && f.nodeType === Node.TEXT_NODE ? (y.setStart(f, h), y.setEnd(f, q)) : y.selectNodeContents(i);
2949
+ const p = l.firstChild;
2950
+ p && p.nodeType === Node.TEXT_NODE ? (y.setStart(p, h), y.setEnd(p, q)) : y.selectNodeContents(l);
2951
2951
  } else
2952
- y.selectNodeContents(i), y.collapse(!0);
2952
+ y.selectNodeContents(l), y.collapse(!0);
2953
2953
  x.removeAllRanges(), x.addRange(y);
2954
2954
  }
2955
2955
  }
2956
2956
  }, jt = () => {
2957
2957
  if (t.length === 0) {
2958
2958
  if (N.current) {
2959
- const i = !(N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2960
- rt(i), Oe(!i);
2959
+ const l = !(N.current.textContent?.replace(/[\u200B\n]/g, "").trim() || "");
2960
+ rt(l), Oe(!l);
2961
2961
  }
2962
2962
  return;
2963
2963
  }
2964
2964
  St(N);
2965
2965
  try {
2966
- const i = window.getSelection()?.anchorNode ?? null;
2966
+ const l = window.getSelection()?.anchorNode ?? null;
2967
2967
  let x = null;
2968
- if (i && (i.nodeType === Node.ELEMENT_NODE ? x = i.closest(
2968
+ if (l && (l.nodeType === Node.ELEMENT_NODE ? x = l.closest(
2969
2969
  '[data-type="variable"][data-node-type="report-url"]'
2970
- ) : i.nodeType === Node.TEXT_NODE && i.parentElement && (x = i.parentElement.closest(
2970
+ ) : l.nodeType === Node.TEXT_NODE && l.parentElement && (x = l.parentElement.closest(
2971
2971
  '[data-type="variable"][data-node-type="report-url"]'
2972
2972
  ))), x) {
2973
2973
  const y = x.dataset.key;
@@ -2988,12 +2988,12 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
2988
2988
  }
2989
2989
  } catch {
2990
2990
  }
2991
- if (N.current && N.current.querySelectorAll('[data-type="variable"]').forEach((i) => {
2992
- const x = i.querySelector(".variable-info-icon");
2991
+ if (N.current && N.current.querySelectorAll('[data-type="variable"]').forEach((l) => {
2992
+ const x = l.querySelector(".variable-info-icon");
2993
2993
  if (x) {
2994
2994
  let y = !1;
2995
2995
  const _ = document.createTreeWalker(
2996
- i,
2996
+ l,
2997
2997
  NodeFilter.SHOW_TEXT,
2998
2998
  {
2999
2999
  acceptNode: (v) => x.contains(v) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT
@@ -3007,36 +3007,36 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3007
3007
  y ? x.classList.add("hidden") : x.classList.remove("hidden");
3008
3008
  }
3009
3009
  }), Tt(N, t, U), Nt(N, Se, U, Oe), !N.current) return;
3010
- t.filter((l) => l.type === "multi-variable" && l.key).forEach((l) => {
3011
- if (!l.key) return;
3012
- const i = l.maxCount || 9, x = Be[l.key] || 1, y = [];
3013
- for (let f = 0; f < x; f++) {
3014
- const Q = `${l.key}_${f}`, K = N.current.querySelector(
3015
- `[data-type="variable"][data-key="${Q}"][data-multi-key="${l.key}"]`
3010
+ t.filter((i) => i.type === "multi-variable" && i.key).forEach((i) => {
3011
+ if (!i.key) return;
3012
+ const l = i.maxCount || 9, x = Be[i.key] || 1, y = [];
3013
+ for (let p = 0; p < x; p++) {
3014
+ const Q = `${i.key}_${p}`, K = N.current.querySelector(
3015
+ `[data-type="variable"][data-key="${Q}"][data-multi-key="${i.key}"]`
3016
3016
  );
3017
3017
  if (K) {
3018
- const ee = K.innerText.replace(/[\u200B\n]/g, "").trim();
3019
- y.push(ee);
3018
+ const te = K.innerText.replace(/[\u200B\n]/g, "").trim();
3019
+ y.push(te);
3020
3020
  }
3021
3021
  }
3022
3022
  const v = (y[y.length - 1] || "") === "";
3023
3023
  let h = !1, q = -1;
3024
- for (let f = 0; f < y.length - 1; f++)
3025
- if (y[f] === "") {
3026
- h = !0, q = f;
3024
+ for (let p = 0; p < y.length - 1; p++)
3025
+ if (y[p] === "") {
3026
+ h = !0, q = p;
3027
3027
  break;
3028
3028
  }
3029
3029
  if (h && q >= 0) {
3030
- const f = window.getSelection();
3031
- if (f && f.rangeCount > 0) {
3032
- const W = f.getRangeAt(0), se = W.startContainer, ie = se.nodeType === Node.ELEMENT_NODE ? se.closest('[data-type="variable"][data-multi-key]') : se.parentElement?.closest('[data-type="variable"][data-multi-key]');
3033
- if (ie) {
3034
- const ae = ie.dataset.key;
3035
- if (ae) {
3030
+ const p = window.getSelection();
3031
+ if (p && p.rangeCount > 0) {
3032
+ const W = p.getRangeAt(0), oe = W.startContainer, le = oe.nodeType === Node.ELEMENT_NODE ? oe.closest('[data-type="variable"][data-multi-key]') : oe.parentElement?.closest('[data-type="variable"][data-multi-key]');
3033
+ if (le) {
3034
+ const re = le.dataset.key;
3035
+ if (re) {
3036
3036
  const pe = document.createRange();
3037
- pe.setStartBefore(ie), pe.setEnd(W.startContainer, W.startOffset);
3037
+ pe.setStartBefore(le), pe.setEnd(W.startContainer, W.startOffset);
3038
3038
  const Ee = pe.toString().length;
3039
- nt.current = { key: ae, offset: Ee };
3039
+ nt.current = { key: re, offset: Ee };
3040
3040
  }
3041
3041
  }
3042
3042
  }
@@ -3045,45 +3045,45 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3045
3045
  Q[W] = Q[W + 1];
3046
3046
  Q.pop();
3047
3047
  const K = {};
3048
- Q.forEach((W, se) => {
3049
- W && (K[`${l.key}_${se}`] = W);
3048
+ Q.forEach((W, oe) => {
3049
+ W && (K[`${i.key}_${oe}`] = W);
3050
3050
  });
3051
- const ee = Math.max(v ? Q.length : Q.length + 1, 1);
3051
+ const te = Math.max(v ? Q.length : Q.length + 1, 1);
3052
3052
  N.current.querySelectorAll(
3053
3053
  '[data-type="variable"]'
3054
3054
  ).forEach((W) => {
3055
- const se = W.dataset.key, ie = W.dataset.multiKey;
3056
- if (se && ie !== l.key) {
3057
- const ae = W.innerText.replace(/[\u200B\n]/g, "").trim();
3058
- ae && (K[se] = ae);
3055
+ const oe = W.dataset.key, le = W.dataset.multiKey;
3056
+ if (oe && le !== i.key) {
3057
+ const re = W.innerText.replace(/[\u200B\n]/g, "").trim();
3058
+ re && (K[oe] = re);
3059
3059
  }
3060
3060
  }), N.current.__tempVariableValues = K, Me((W) => ({
3061
3061
  ...W,
3062
- [l.key]: ee
3062
+ [i.key]: te
3063
3063
  }));
3064
3064
  return;
3065
3065
  }
3066
3066
  if (!v) {
3067
- const f = x - 1, Q = `${l.key}_${f}`, K = N.current.querySelector(
3068
- `[data-type="variable"][data-key="${Q}"][data-multi-key="${l.key}"]`
3067
+ const p = x - 1, Q = `${i.key}_${p}`, K = N.current.querySelector(
3068
+ `[data-type="variable"][data-key="${Q}"][data-multi-key="${i.key}"]`
3069
3069
  );
3070
- if (K && K.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && x < i) {
3071
- const ne = window.getSelection();
3072
- if (ne && ne.rangeCount > 0) {
3073
- const W = ne.getRangeAt(0), se = W.startContainer, ie = se.nodeType === Node.ELEMENT_NODE ? se.closest('[data-type="variable"][data-multi-key]') : se.parentElement?.closest('[data-type="variable"][data-multi-key]');
3074
- if (ie) {
3075
- const ae = ie.dataset.key;
3076
- if (ae) {
3070
+ if (K && K.innerText.replace(/[\u200B\n]/g, "").trim().length > 0 && x < l) {
3071
+ const Z = window.getSelection();
3072
+ if (Z && Z.rangeCount > 0) {
3073
+ const W = Z.getRangeAt(0), oe = W.startContainer, le = oe.nodeType === Node.ELEMENT_NODE ? oe.closest('[data-type="variable"][data-multi-key]') : oe.parentElement?.closest('[data-type="variable"][data-multi-key]');
3074
+ if (le) {
3075
+ const re = le.dataset.key;
3076
+ if (re) {
3077
3077
  const pe = document.createRange();
3078
- pe.setStartBefore(ie), pe.setEnd(W.startContainer, W.startOffset);
3078
+ pe.setStartBefore(le), pe.setEnd(W.startContainer, W.startOffset);
3079
3079
  const Ee = pe.toString().length;
3080
- nt.current = { key: ae, offset: Ee };
3080
+ nt.current = { key: re, offset: Ee };
3081
3081
  }
3082
3082
  }
3083
3083
  }
3084
3084
  Me((W) => ({
3085
3085
  ...W,
3086
- [l.key]: x + 1
3086
+ [i.key]: x + 1
3087
3087
  }));
3088
3088
  }
3089
3089
  }
@@ -3092,7 +3092,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3092
3092
  Je(() => {
3093
3093
  const a = N.current;
3094
3094
  if (!a) return;
3095
- const l = /* @__PURE__ */ new Map(), i = (_) => {
3095
+ const i = /* @__PURE__ */ new Map(), l = (_) => {
3096
3096
  const v = _.target, h = _.relatedTarget;
3097
3097
  !v || !N.current || !N.current.contains(v) || h && N.current.contains(h) || setTimeout(() => {
3098
3098
  if (N.current) {
@@ -3105,12 +3105,12 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3105
3105
  }
3106
3106
  }, 0);
3107
3107
  };
3108
- a.addEventListener("blur", i, !0);
3108
+ a.addEventListener("blur", l, !0);
3109
3109
  const x = () => {
3110
3110
  if (!N.current) return;
3111
- l.forEach((h, q) => {
3111
+ i.forEach((h, q) => {
3112
3112
  q.removeEventListener("blur", h, !1);
3113
- }), l.clear();
3113
+ }), i.clear();
3114
3114
  const _ = N.current.querySelectorAll(
3115
3115
  '[data-type="variable"][data-multi-key]'
3116
3116
  ), v = (h) => {
@@ -3118,35 +3118,35 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3118
3118
  const q = h.target;
3119
3119
  if (!q || !N.current || !N.current.contains(q))
3120
3120
  return;
3121
- const f = q.closest('[data-type="variable"][data-multi-key]');
3122
- if (!f || !N.current.contains(f))
3121
+ const p = q.closest('[data-type="variable"][data-multi-key]');
3122
+ if (!p || !N.current.contains(p))
3123
3123
  return;
3124
3124
  let Q = !1;
3125
- if (l.forEach((pe, Ee) => {
3126
- (Ee === f || Ee.contains(q)) && (Q = !0);
3125
+ if (i.forEach((pe, Ee) => {
3126
+ (Ee === p || Ee.contains(q)) && (Q = !0);
3127
3127
  }), !Q)
3128
3128
  return;
3129
- const K = f.dataset.multiKey, ee = f.dataset.key, ne = f.dataset.index;
3130
- if (!K || !ee || ne === void 0) return;
3129
+ const K = p.dataset.multiKey, te = p.dataset.key, Z = p.dataset.index;
3130
+ if (!K || !te || Z === void 0) return;
3131
3131
  const W = h.relatedTarget;
3132
3132
  if (!(!W || !N.current.contains(W)))
3133
3133
  return;
3134
- const ie = f.innerText.replace(/[\u200B\n]/g, "").trim();
3134
+ const le = p.innerText.replace(/[\u200B\n]/g, "").trim();
3135
3135
  console.log("[Blur Event] 失去焦点的 multi-variable 输入框:", {
3136
3136
  multiKey: K,
3137
- currentKey: ee,
3138
- index: ne,
3139
- content: ie
3137
+ currentKey: te,
3138
+ index: Z,
3139
+ content: le
3140
3140
  });
3141
- const ae = /[、,,\s]+/;
3142
- if (ae.test(ie)) {
3143
- const pe = ie.split(ae).map((le) => le.trim()).filter((le) => le.length > 0);
3144
- console.log("[Blur Event] 拆分前的内容:", ie), console.log("[Blur Event] 拆分后的部分:", pe);
3145
- const Z = pe.slice(0, 9);
3146
- if (console.log("[Blur Event] 有效的部分(最多9个):", Z), Z.length > 1) {
3147
- const le = t.find((we) => we.type === "multi-variable" && we.key === K);
3148
- if (le) {
3149
- const we = Be[K] || 1, xe = parseInt(ne, 10), Ne = le.maxCount || 9, ke = [];
3141
+ const re = /[、,,\s]+/;
3142
+ if (re.test(le)) {
3143
+ const pe = le.split(re).map((ie) => ie.trim()).filter((ie) => ie.length > 0);
3144
+ console.log("[Blur Event] 拆分前的内容:", le), console.log("[Blur Event] 拆分后的部分:", pe);
3145
+ const ee = pe.slice(0, 9);
3146
+ if (console.log("[Blur Event] 有效的部分(最多9个):", ee), ee.length > 1) {
3147
+ const ie = t.find((we) => we.type === "multi-variable" && we.key === K);
3148
+ if (ie) {
3149
+ const we = Be[K] || 1, xe = parseInt(Z, 10), Ne = ie.maxCount || 9, ke = [];
3150
3150
  for (let qe = 0; qe < we; qe++) {
3151
3151
  const ze = `${K}_${qe}`, ut = N.current.querySelector(
3152
3152
  `[data-type="variable"][data-key="${ze}"][data-multi-key="${K}"]`
@@ -3156,7 +3156,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3156
3156
  ke.push(dt);
3157
3157
  }
3158
3158
  }
3159
- console.log("[Blur Event] 拆分前的所有值:", ke), console.log("[Blur Event] 当前索引:", xe), console.log("[Blur Event] 要插入的值:", Z), ke.splice(xe, 1, ...Z);
3159
+ console.log("[Blur Event] 拆分前的所有值:", ke), console.log("[Blur Event] 当前索引:", xe), console.log("[Blur Event] 要插入的值:", ee), ke.splice(xe, 1, ...ee);
3160
3160
  const Ce = ke.slice(0, Ne);
3161
3161
  console.log("[Blur Event] 拆分后的所有值:", Ce), Ce.length > 0 && Ce[Ce.length - 1] !== "" && Ce.length < Ne && Ce.push("");
3162
3162
  const Wt = Math.max(Ce.length, 1), Xe = {};
@@ -3179,15 +3179,15 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3179
3179
  }
3180
3180
  };
3181
3181
  _.forEach((h) => {
3182
- h.addEventListener("blur", v, !1), l.set(h, v);
3182
+ h.addEventListener("blur", v, !1), i.set(h, v);
3183
3183
  });
3184
3184
  }, y = setTimeout(() => {
3185
3185
  x();
3186
3186
  }, 0);
3187
3187
  return () => {
3188
- clearTimeout(y), a.removeEventListener("blur", i, !0), l.forEach((_, v) => {
3188
+ clearTimeout(y), a.removeEventListener("blur", l, !0), i.forEach((_, v) => {
3189
3189
  v.removeEventListener("blur", _, !1);
3190
- }), l.clear();
3190
+ }), i.clear();
3191
3191
  };
3192
3192
  }, [t, Se, Be, U]);
3193
3193
  const kn = (a) => {
@@ -3199,11 +3199,11 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3199
3199
  a.preventDefault();
3200
3200
  return;
3201
3201
  }
3202
- const l = window.getSelection();
3203
- if (l && l.rangeCount > 0) {
3204
- const i = l.anchorNode;
3202
+ const i = window.getSelection();
3203
+ if (i && i.rangeCount > 0) {
3204
+ const l = i.anchorNode;
3205
3205
  let x = null;
3206
- if (i && (i.nodeType === Node.ELEMENT_NODE ? x = i.closest('[data-type="text"]') : i.nodeType === Node.TEXT_NODE && i.parentElement && (x = i.parentElement.closest('[data-type="text"]'))), x) {
3206
+ if (l && (l.nodeType === Node.ELEMENT_NODE ? x = l.closest('[data-type="text"]') : l.nodeType === Node.TEXT_NODE && l.parentElement && (x = l.parentElement.closest('[data-type="text"]'))), x) {
3207
3207
  if (a.preventDefault(), a.stopPropagation(), N.current) {
3208
3208
  const y = N.current.querySelector(
3209
3209
  '[data-type="variable"], [data-type="upload"]'
@@ -3213,10 +3213,10 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3213
3213
  return;
3214
3214
  }
3215
3215
  }
3216
- if (S && l && l.rangeCount > 0) {
3217
- const i = l.anchorNode;
3216
+ if (S && i && i.rangeCount > 0) {
3217
+ const l = i.anchorNode;
3218
3218
  let x = null;
3219
- if (i && (i.nodeType === Node.ELEMENT_NODE ? x = i.closest(".tag-node") : i.nodeType === Node.TEXT_NODE && i.parentElement && (x = i.parentElement.closest(".tag-node"))), x) {
3219
+ if (l && (l.nodeType === Node.ELEMENT_NODE ? x = l.closest(".tag-node") : l.nodeType === Node.TEXT_NODE && l.parentElement && (x = l.parentElement.closest(".tag-node"))), x) {
3220
3220
  if (a.preventDefault(), a.stopPropagation(), N.current) {
3221
3221
  const y = N.current.querySelector(
3222
3222
  '[data-type="variable"], [data-type="upload"]'
@@ -3234,9 +3234,9 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3234
3234
  N.current.innerHTML = "", N.current.focus();
3235
3235
  }
3236
3236
  if (a.key === "Backspace") {
3237
- const i = window.getSelection();
3238
- if (i && i.rangeCount > 0) {
3239
- const x = i.getRangeAt(0), y = i.anchorNode;
3237
+ const l = window.getSelection();
3238
+ if (l && l.rangeCount > 0) {
3239
+ const x = l.getRangeAt(0), y = l.anchorNode;
3240
3240
  if (S) {
3241
3241
  let v = null, h = null;
3242
3242
  if (y && (y.nodeType === Node.ELEMENT_NODE ? (v = y.closest(".tag-node"), h = y.closest('[data-type="text"]')) : y.nodeType === Node.TEXT_NODE && y.parentElement && (v = y.parentElement.closest(".tag-node"), h = y.parentElement.closest('[data-type="text"]'))), (v || h) && x.collapsed && x.startOffset === 0) {
@@ -3281,96 +3281,100 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3281
3281
  return;
3282
3282
  }
3283
3283
  const a = N.current;
3284
- let l = "";
3285
- const i = {}, x = /* @__PURE__ */ new Set(), y = (v) => {
3284
+ let i = "";
3285
+ const l = {}, x = /* @__PURE__ */ new Set(), y = (v) => {
3286
3286
  if (!(v.nodeType === Node.ELEMENT_NODE && v.style.display === "none")) {
3287
3287
  if (v.nodeType === Node.TEXT_NODE)
3288
- l += (v.textContent || "").replace(/\u200B/g, "");
3288
+ i += (v.textContent || "").replace(/\u200B/g, "");
3289
3289
  else if (v.nodeType === Node.ELEMENT_NODE) {
3290
- const h = v, q = h.dataset.type, f = h.dataset.key, Q = h.getAttribute("data-node-type") || "";
3291
- if (q === "variable" && f) {
3290
+ const h = v, q = h.dataset.type, p = h.dataset.key, Q = h.getAttribute("data-node-type") || "";
3291
+ if (q === "variable" && p) {
3292
3292
  let K = "";
3293
- const ee = document.createTreeWalker(
3293
+ const te = document.createTreeWalker(
3294
3294
  h,
3295
3295
  NodeFilter.SHOW_TEXT,
3296
3296
  {
3297
3297
  acceptNode: (W) => {
3298
- const se = h.querySelector(".variable-info-icon");
3299
- return se && se.contains(W) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3298
+ const oe = h.querySelector(".variable-info-icon");
3299
+ return oe && oe.contains(W) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
3300
3300
  }
3301
3301
  }
3302
3302
  );
3303
- for (; ee.nextNode(); )
3304
- K += ee.currentNode.textContent || "";
3305
- const ne = K.replace(/[\u200B\n]/g, "").trim();
3306
- if (ne) {
3303
+ for (; te.nextNode(); )
3304
+ K += te.currentNode.textContent || "";
3305
+ const Z = K.replace(/[\u200B\n]/g, "").trim();
3306
+ if (Z) {
3307
3307
  const W = h.dataset.multiKey;
3308
3308
  if (W) {
3309
- (!i[W] || !Array.isArray(i[W])) && (i[W] = []);
3310
- const se = i[W];
3311
- se.push(ne), se.length > 1 && (l += " "), l += ne;
3309
+ (!l[W] || !Array.isArray(l[W])) && (l[W] = []);
3310
+ const oe = l[W];
3311
+ oe.push(Z), oe.length > 1 && (i += " "), i += Z;
3312
+ } else if (Q === "report-url") {
3313
+ l[`${p}__sourceUrl`] = Z;
3314
+ const le = (t.find((re) => re.type === "report-url" && re.key === p)?.sourceUrlKey || "").trim();
3315
+ le ? l[le] = Z : l.url === void 0 && (l.url = Z), i += Z;
3312
3316
  } else
3313
- Q === "report-url" ? (i[`${f}__sourceUrl`] = ne, l += ne) : (i[f] = ne, l += ne);
3317
+ l[p] = Z, i += Z;
3314
3318
  }
3315
- } else if (q === "select" && f) {
3319
+ } else if (q === "select" && p) {
3316
3320
  const K = (h.getAttribute("data-value") || "").trim();
3317
- K && (i[f] = K, l += K);
3318
- } else if (q === "textarea" && f) {
3319
- const ee = (h.value || "").replace(/\u200B/g, "").trim();
3320
- ee && (i[f] = ee, l += ee);
3321
- } else if (q === "richtext" && f) {
3322
- const ee = (h.textContent || "").replace(/\u200B/g, "").trim();
3323
- if (ee)
3321
+ K && (l[p] = K, i += K);
3322
+ } else if (q === "textarea" && p) {
3323
+ const te = (h.value || "").replace(/\u200B/g, "").trim();
3324
+ te && (l[p] = te, i += te);
3325
+ } else if (q === "richtext" && p) {
3326
+ const te = (h.textContent || "").replace(/\u200B/g, "").trim();
3327
+ if (te)
3324
3328
  if (Q === "report-module") {
3325
- const W = (f.match(/^(.*)__module_\d+$/)?.[1] || f).trim();
3326
- (!i[W] || !Array.isArray(i[W])) && (i[W] = []), i[W].push(ee), x.add(W), l += ee;
3329
+ const W = (p.match(/^(.*)__module_\d+$/)?.[1] || p).trim();
3330
+ (!l[W] || !Array.isArray(l[W])) && (l[W] = []), l[W].push(te), x.add(W), i += te;
3327
3331
  } else
3328
- i[f] = ee, l += ee;
3329
- } else if (q === "datepicker" && f) {
3330
- const ee = (h.getAttribute("data-value") || "").trim();
3331
- if (ee)
3332
- if (ee.includes(",")) {
3333
- const ne = ee.split(",");
3334
- ne.length === 2 ? (i[f] = ne, l += `[${ne[0]}, ${ne[1]}]`) : (i[f] = ee, l += ee);
3332
+ l[p] = te, i += te;
3333
+ } else if (q === "datepicker" && p) {
3334
+ const te = (h.getAttribute("data-value") || "").trim();
3335
+ if (te)
3336
+ if (te.includes(",")) {
3337
+ const Z = te.split(",");
3338
+ Z.length === 2 ? (l[p] = Z, i += `[${Z[0]}, ${Z[1]}]`) : (l[p] = te, i += te);
3335
3339
  } else
3336
- i[f] = ee, l += ee;
3337
- } else if (q === "upload" && f) {
3340
+ l[p] = te, i += te;
3341
+ } else if (q === "upload" && p) {
3338
3342
  const K = h.dataset.batchKey;
3339
3343
  if (K) {
3340
- const ee = t.find((ne) => ne.type === "upload" && ne.key === K);
3341
- if (ee && typeof ee.maxCount == "number" && typeof ee.minCount == "number") {
3342
- const ne = [];
3343
- for (let W = 0; W < ee.maxCount; W++) {
3344
- const se = `${K}-${W}`, ie = U[se];
3345
- ie && ne.push(ie);
3344
+ const te = t.find((Z) => Z.type === "upload" && Z.key === K);
3345
+ if (te && typeof te.maxCount == "number" && typeof te.minCount == "number") {
3346
+ const Z = [];
3347
+ for (let W = 0; W < te.maxCount; W++) {
3348
+ const oe = `${K}-${W}`, le = U[oe];
3349
+ le && Z.push(le);
3346
3350
  }
3347
- i[K] || (i[K] = ne.length > 0 ? ne : null, ne.length > 0 && (l += ` [附带${ne.length}个文件: ${ne.map((W) => W.name).join(", ")}] `));
3351
+ l[K] || (l[K] = Z.length > 0 ? Z : null, Z.length > 0 && (i += ` [附带${Z.length}个文件: ${Z.map((W) => W.name).join(", ")}] `));
3348
3352
  } else
3349
- i[f] = U[f] ?? null, U[f] && (l += ` [附带文件: ${U[f]?.name}] `);
3353
+ l[p] = U[p] ?? null, U[p] && (i += ` [附带文件: ${U[p]?.name}] `);
3350
3354
  } else
3351
- i[f] = U[f] ?? null, U[f] && (l += ` [附带文件: ${U[f]?.name}] `);
3355
+ l[p] = U[p] ?? null, U[p] && (i += ` [附带文件: ${U[p]?.name}] `);
3352
3356
  } else {
3353
3357
  if (h.classList.contains("tag-close-btn") || h.classList.contains("file-remove-btn")) return;
3354
- h.getAttribute("contenteditable") === "false" && !q && h.classList.contains("tag-node") ? l += h.innerText : h.childNodes.forEach(y);
3358
+ h.getAttribute("contenteditable") === "false" && !q && h.classList.contains("tag-node") ? i += h.innerText : h.childNodes.forEach(y);
3355
3359
  }
3356
3360
  }
3357
3361
  }
3358
3362
  };
3359
- if (a.childNodes.forEach(y), l = l.trim(), !l) return;
3363
+ if (a.childNodes.forEach(y), i = i.trim(), !i) return;
3360
3364
  const _ = new FormData();
3361
- _.append("fullPrompt", l), Object.keys(i).forEach((v) => {
3362
- const h = i[v];
3365
+ _.append("fullPrompt", i), Object.keys(l).forEach((v) => {
3366
+ const h = l[v];
3363
3367
  h != null && (h instanceof File ? _.append(v, h) : Array.isArray(h) ? t.some(
3364
- (f) => f.type === "multi-variable" && f.key === v
3365
- ) || x.has(v) ? h.forEach((f) => {
3366
- f != null && f !== "" && _.append(v, String(f));
3367
- }) : h.forEach((f, Q) => {
3368
- f != null && (f instanceof File ? _.append(`${v}[${Q}]`, f) : typeof f == "string" ? _.append(`${v}[${Q}]`, f) : _.append(`${v}[${Q}]`, String(f)));
3368
+ (p) => p.type === "multi-variable" && p.key === v
3369
+ ) || x.has(v) ? h.forEach((p) => {
3370
+ p != null && p !== "" && _.append(v, String(p));
3371
+ }) : h.forEach((p, Q) => {
3372
+ p != null && (p instanceof File ? _.append(`${v}[${Q}]`, p) : typeof p == "string" ? _.append(`${v}[${Q}]`, p) : _.append(`${v}[${Q}]`, String(p)));
3369
3373
  }) : typeof h == "string" ? _.append(v, h) : _.append(v, String(h)));
3370
- }), m(_, l);
3374
+ }), m(_, i);
3371
3375
  }, Ie = je ? !1 : at ? b : ot, En = Math.max(
3372
3376
  0,
3373
- R - sn
3377
+ R - ln
3374
3378
  ), Le = typeof L == "number" && L > 0 ? L : 0, Cn = {
3375
3379
  ...g ? { width: typeof g == "number" ? `${g}px` : g } : {},
3376
3380
  ...w ? { border: w } : {},
@@ -3389,23 +3393,23 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3389
3393
  };
3390
3394
  return Je(() => {
3391
3395
  if (!Ie || !ye.current) return;
3392
- const l = window.requestAnimationFrame(() => {
3396
+ const i = window.requestAnimationFrame(() => {
3393
3397
  ye.current && (ye.current.scrollTop = 0, ye.current.scrollLeft = 0);
3394
3398
  });
3395
- return () => window.cancelAnimationFrame(l);
3399
+ return () => window.cancelAnimationFrame(i);
3396
3400
  }, [Ie]), Je(() => {
3397
3401
  if (!Ie) return;
3398
3402
  const a = vt.current;
3399
3403
  if (!a) return;
3400
- const l = de.current?.getBoundingClientRect().height ?? 0, i = Math.max(0, a - l);
3401
- if (i > 0) {
3404
+ const i = de.current?.getBoundingClientRect().height ?? 0, l = Math.max(0, a - i);
3405
+ if (l > 0) {
3402
3406
  const x = Bt.current;
3403
3407
  if (x === window) {
3404
3408
  const y = document.documentElement;
3405
- y.scrollTop = Math.max(0, y.scrollTop - i);
3409
+ y.scrollTop = Math.max(0, y.scrollTop - l);
3406
3410
  } else {
3407
3411
  const y = x;
3408
- y.scrollTop = Math.max(0, y.scrollTop - i);
3412
+ y.scrollTop = Math.max(0, y.scrollTop - l);
3409
3413
  }
3410
3414
  }
3411
3415
  vt.current = null;
@@ -3445,8 +3449,8 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3445
3449
  onMouseUp: vn,
3446
3450
  onClick: (a) => {
3447
3451
  xn(a);
3448
- const l = a.target;
3449
- if (l) {
3452
+ const i = a.target;
3453
+ if (i) {
3450
3454
  const x = [
3451
3455
  "button",
3452
3456
  "a",
@@ -3472,9 +3476,9 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3472
3476
  ".rte-agent-badge",
3473
3477
  ".rich-text-editor-send-button"
3474
3478
  ].join(",");
3475
- if (l.closest(x)) return;
3479
+ if (i.closest(x)) return;
3476
3480
  }
3477
- if (p || d && !je) {
3481
+ if (f || d && !je) {
3478
3482
  if (dn || d && je) return;
3479
3483
  d && typeof X == "number" && X > 0 && (wt.current = Date.now() + X), pn(!Ie, "click");
3480
3484
  }
@@ -3533,14 +3537,14 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3533
3537
  ] }) }),
3534
3538
  /* @__PURE__ */ ue("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
3535
3539
  (() => {
3536
- const a = t.find((i) => i.type === "tag");
3540
+ const a = t.find((l) => l.type === "tag");
3537
3541
  if (!a || !a.text) return null;
3538
- const l = D.find((i) => i.label === a.text);
3539
- return !l || l.points === void 0 || l.points === null ? null : /* @__PURE__ */ ue("div", { className: "rte-points-badge", children: [
3542
+ const i = D.find((l) => l.label === a.text);
3543
+ return !i || i.points === void 0 || i.points === null ? null : /* @__PURE__ */ ue("div", { className: "rte-points-badge", children: [
3540
3544
  /* @__PURE__ */ M("i", { className: "iconfont icon-jifen", style: { marginRight: "4px", fontSize: "16px" } }),
3541
3545
  /* @__PURE__ */ ue("span", { style: { fontSize: "16px", lineHeight: "22px" }, children: [
3542
3546
  "-",
3543
- String(l.points)
3547
+ String(i.points)
3544
3548
  ] })
3545
3549
  ] });
3546
3550
  })(),
@@ -3559,7 +3563,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3559
3563
  he?.anchorEl && (() => {
3560
3564
  if (!document.body.contains(he.anchorEl))
3561
3565
  return null;
3562
- let a = "", l = {
3566
+ let a = "", i = {
3563
3567
  background: "var(--neutral-800, #262626)"
3564
3568
  };
3565
3569
  if (he.type === "upload")
@@ -3576,7 +3580,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3576
3580
  const _ = U[he.key], v = !!_ && (_.type?.startsWith("image/") || /\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(_.name || ""));
3577
3581
  if (_ && v) {
3578
3582
  const h = URL.createObjectURL(_);
3579
- a = /* @__PURE__ */ M("div", { className: "rte-upload-preview", children: /* @__PURE__ */ M("img", { className: "rte-upload-preview-img", src: h, alt: _.name }) }), l = {
3583
+ a = /* @__PURE__ */ M("div", { className: "rte-upload-preview", children: /* @__PURE__ */ M("img", { className: "rte-upload-preview-img", src: h, alt: _.name }) }), i = {
3580
3584
  background: "#fff",
3581
3585
  padding: 0,
3582
3586
  borderRadius: 4,
@@ -3586,7 +3590,7 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3586
3590
  a = "";
3587
3591
  }
3588
3592
  if (!a) return null;
3589
- const i = he.type === "upload-preview" ? "#0A0A0A" : "#fff", x = [
3593
+ const l = he.type === "upload-preview" ? "#0A0A0A" : "#fff", x = [
3590
3594
  "rte-tooltip",
3591
3595
  he.type === "upload-preview" ? "rte-tooltip-preview" : "",
3592
3596
  he.type === "tag" ? "rte-tooltip-tag" : ""
@@ -3597,11 +3601,11 @@ const { RangePicker: Cr } = Ln, Sr = ({ host: t, onChange: m }) => {
3597
3601
  {
3598
3602
  arrow: !1,
3599
3603
  overlayClassName: x,
3600
- title: he.type === "upload-preview" ? a : /* @__PURE__ */ M("div", { style: { maxWidth: "200px", fontSize: "12px", color: i }, children: a }),
3604
+ title: he.type === "upload-preview" ? a : /* @__PURE__ */ M("div", { style: { maxWidth: "200px", fontSize: "12px", color: l }, children: a }),
3601
3605
  open: !0,
3602
3606
  placement: he.type === "upload-preview" ? "topLeft" : "top",
3603
3607
  getPopupContainer: () => document.body,
3604
- overlayInnerStyle: l,
3608
+ overlayInnerStyle: i,
3605
3609
  children: /* @__PURE__ */ M(
3606
3610
  "div",
3607
3611
  {
@@ -3747,7 +3751,7 @@ const en = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3747
3751
  onStartAutoLoad: T,
3748
3752
  onStopLoading: w
3749
3753
  }) => {
3750
- const [V, k] = oe(5), e = Math.ceil(o / s), n = qt(() => g.length >= e, [g, e]), r = () => Array.from(
3754
+ const [V, k] = se(5), e = Math.ceil(o / s), n = qt(() => g.length >= e, [g, e]), r = () => Array.from(
3751
3755
  { length: e },
3752
3756
  (B, C) => C + 1
3753
3757
  ).filter((B) => !g.includes(B)).slice(0, V);
@@ -3830,7 +3834,7 @@ const en = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAA
3830
3834
  onStartAutoLoad: V,
3831
3835
  onStopLoading: k,
3832
3836
  ...e
3833
- } = t, n = te(null), r = ce(
3837
+ } = t, n = ne(null), r = ce(
3834
3838
  (u) => {
3835
3839
  T(u), E.includes(u) && n.current?.scrollTo({
3836
3840
  key: `${(u - 1) * $ + 1}`
@@ -3985,34 +3989,34 @@ const Mr = ({
3985
3989
  onChange: S,
3986
3990
  ...D
3987
3991
  }) => {
3988
- const [A, $] = oe(""), [E, T] = oe(0), [w, V] = oe(!1), [k, e] = oe(!1), [n, r] = oe(!1), u = te(void 0), d = te(void 0), B = te(t), C = te(E), F = te(k), Y = te(A);
3992
+ const [A, $] = se(""), [E, T] = se(0), [w, V] = se(!1), [k, e] = se(!1), [n, r] = se(!1), u = ne(void 0), d = ne(void 0), B = ne(t), C = ne(E), F = ne(k), Y = ne(A);
3989
3993
  fe(() => {
3990
3994
  B.current = t, C.current = E, F.current = k, Y.current = A;
3991
3995
  });
3992
- const z = ce((p, c) => {
3996
+ const z = ce((f, c) => {
3993
3997
  let b = 0;
3994
3998
  r(!0);
3995
3999
  const P = () => {
3996
- b < p.length ? ($(p.slice(0, b + 1)), b++, d.current = window.setTimeout(P, s)) : (r(!1), c?.());
4000
+ b < f.length ? ($(f.slice(0, b + 1)), b++, d.current = window.setTimeout(P, s)) : (r(!1), c?.());
3997
4001
  };
3998
4002
  P();
3999
- }, [s]), O = ce((p) => {
4003
+ }, [s]), O = ce((f) => {
4000
4004
  let c = Y.current.length;
4001
4005
  const b = () => {
4002
- c > 0 ? ($(Y.current.slice(0, c - 1)), c--, d.current = window.setTimeout(b, s / 2)) : p?.();
4006
+ c > 0 ? ($(Y.current.slice(0, c - 1)), c--, d.current = window.setTimeout(b, s / 2)) : f?.();
4003
4007
  };
4004
4008
  b();
4005
4009
  }, [s]), L = ce(() => {
4006
4010
  if (B.current.length === 0 || F.current) return;
4007
4011
  V(!0);
4008
- const p = B.current[C.current];
4012
+ const f = B.current[C.current];
4009
4013
  Y.current ? O(() => {
4010
- z(p, () => {
4014
+ z(f, () => {
4011
4015
  u.current = window.setTimeout(() => {
4012
4016
  T((c) => (c + 1) % B.current.length), V(!1);
4013
4017
  }, 2e3);
4014
4018
  });
4015
- }) : z(p, () => {
4019
+ }) : z(f, () => {
4016
4020
  u.current = window.setTimeout(() => {
4017
4021
  T((c) => (c + 1) % B.current.length), V(!1);
4018
4022
  }, 2e3);
@@ -4028,14 +4032,14 @@ const Mr = ({
4028
4032
  {
4029
4033
  ...D,
4030
4034
  value: g,
4031
- onChange: (p) => {
4032
- S?.(p.target.value), D.onChange?.(p);
4035
+ onChange: (f) => {
4036
+ S?.(f.target.value), D.onChange?.(f);
4033
4037
  },
4034
- onFocus: (p) => {
4035
- e(!0), u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current), V(!1), r(!1), D.onFocus?.(p);
4038
+ onFocus: (f) => {
4039
+ e(!0), u.current && window.clearTimeout(u.current), d.current && window.clearTimeout(d.current), V(!1), r(!1), D.onFocus?.(f);
4036
4040
  },
4037
- onBlur: (p) => {
4038
- e(!1), !g && t.length > 0 && ($(""), T(0)), D.onBlur?.(p);
4041
+ onBlur: (f) => {
4042
+ e(!1), !g && t.length > 0 && ($(""), T(0)), D.onBlur?.(f);
4039
4043
  },
4040
4044
  placeholder: k || g ? m : A || m,
4041
4045
  style: {
@@ -4166,9 +4170,9 @@ const Ir = ({
4166
4170
  ...k
4167
4171
  // 其他原生属性
4168
4172
  }) => {
4169
- const [e, n] = oe(""), [r, u] = oe(0), [d, B] = oe(!1), [C, F] = oe(!1), [Y, z] = oe(!1), [O, L] = oe(g || ""), G = te(void 0), I = te(void 0), R = te(t), X = te(r), p = te(C), c = te(e), b = te(null);
4173
+ const [e, n] = se(""), [r, u] = se(0), [d, B] = se(!1), [C, F] = se(!1), [Y, z] = se(!1), [O, L] = se(g || ""), G = ne(void 0), I = ne(void 0), R = ne(t), X = ne(r), f = ne(C), c = ne(e), b = ne(null);
4170
4174
  fe(() => {
4171
- R.current = t, X.current = r, p.current = C, c.current = e;
4175
+ R.current = t, X.current = r, f.current = C, c.current = e;
4172
4176
  });
4173
4177
  const P = ce((U, ge) => {
4174
4178
  let $e = 0;
@@ -4184,7 +4188,7 @@ const Ir = ({
4184
4188
  };
4185
4189
  $e();
4186
4190
  }, [s]), j = ce(() => {
4187
- if (R.current.length === 0 || p.current) return;
4191
+ if (R.current.length === 0 || f.current) return;
4188
4192
  B(!0);
4189
4193
  const U = R.current[X.current];
4190
4194
  c.current ? H(() => {
@@ -4206,7 +4210,7 @@ const Ir = ({
4206
4210
  }, [r, d, o, t.length, C, j]);
4207
4211
  const J = (U) => {
4208
4212
  F(!0), G.current && window.clearTimeout(G.current), I.current && window.clearTimeout(I.current), B(!1), z(!1), k.onFocus?.(U);
4209
- }, re = (U) => {
4213
+ }, ae = (U) => {
4210
4214
  F(!1), !g && t.length > 0 && (n(""), u(0)), k.onBlur?.(U);
4211
4215
  }, me = (U) => {
4212
4216
  const ge = U.target.value;
@@ -4229,7 +4233,7 @@ const Ir = ({
4229
4233
  U.target.style.borderColor = "#1890ff", U.target.style.boxShadow = "0 0 0 2px rgba(24, 144, 255, 0.2)", J(U);
4230
4234
  },
4231
4235
  onBlur: (U) => {
4232
- U.target.style.borderColor = "#d9d9d9", U.target.style.boxShadow = "none", re(U);
4236
+ U.target.style.borderColor = "#d9d9d9", U.target.style.boxShadow = "none", ae(U);
4233
4237
  },
4234
4238
  onKeyDown: ye,
4235
4239
  placeholder: C || N ? m : "",
@@ -4456,7 +4460,7 @@ const an = ({
4456
4460
  style: e,
4457
4461
  ...n
4458
4462
  }) => {
4459
- const r = te(null), [u, d] = oe(!1), [B, C] = oe(!1), [F, Y] = oe(!1), z = ce(() => {
4463
+ const r = ne(null), [u, d] = se(!1), [B, C] = se(!1), [F, Y] = se(!1), z = ce(() => {
4460
4464
  r.current && (r.current.play(), d(!0), T?.());
4461
4465
  }, [T]), O = ce(() => {
4462
4466
  r.current && (r.current.pause(), d(!1), w?.());
@@ -4470,7 +4474,7 @@ const an = ({
4470
4474
  Y(!0), E?.();
4471
4475
  }, [E]), X = ce(() => {
4472
4476
  d(!0), T?.();
4473
- }, [T]), p = ce(() => {
4477
+ }, [T]), f = ce(() => {
4474
4478
  d(!1), w?.();
4475
4479
  }, [w]), c = ce(() => {
4476
4480
  d(!1), V?.();
@@ -4506,7 +4510,7 @@ const an = ({
4506
4510
  preload: "metadata",
4507
4511
  onLoadedData: R,
4508
4512
  onPlay: X,
4509
- onPause: p,
4513
+ onPause: f,
4510
4514
  onEnded: c,
4511
4515
  muted: !0,
4512
4516
  loop: !0
@@ -4643,7 +4647,7 @@ const Dr = (t) => [".mp4", ".webm", ".ogg", ".mov", ".avi", ".wmv", ".flv", ".mk
4643
4647
  style: D,
4644
4648
  onClick: A
4645
4649
  }) => {
4646
- const $ = te(null), [E, T] = oe(m || g.md || 3), w = te(/* @__PURE__ */ new Map()), V = ce(() => {
4650
+ const $ = ne(null), [E, T] = se(m || g.md || 3), w = ne(/* @__PURE__ */ new Map()), V = ce(() => {
4647
4651
  if (!o || m)
4648
4652
  return m || g.md || 3;
4649
4653
  const r = window.innerWidth;